@warp-ds/elements 2.4.0 → 2.5.0-next.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (426) hide show
  1. package/dist/api.js.map +2 -2
  2. package/dist/custom-elements.json +878 -412
  3. package/dist/index.d.ts +2204 -777
  4. package/dist/packages/affix/{index.js → affix.js} +1 -1
  5. package/dist/packages/affix/{index.js.map → affix.js.map} +1 -1
  6. package/dist/packages/affix/affix.react.stories.d.ts +1 -1
  7. package/dist/packages/affix/affix.stories.d.ts +2 -2
  8. package/dist/packages/affix/affix.stories.js +1 -1
  9. package/dist/packages/affix/affix.test.d.ts +1 -1
  10. package/dist/packages/affix/affix.test.js +1 -1
  11. package/dist/packages/affix/react.d.ts +1 -1
  12. package/dist/packages/alert/{index.js → alert.js} +1 -1
  13. package/dist/packages/alert/{index.js.map → alert.js.map} +1 -1
  14. package/dist/packages/alert/alert.react.stories.d.ts +1 -1
  15. package/dist/packages/alert/alert.stories.d.ts +2 -2
  16. package/dist/packages/alert/alert.stories.js +1 -1
  17. package/dist/packages/alert/alert.test.d.ts +1 -1
  18. package/dist/packages/alert/alert.test.js +1 -1
  19. package/dist/packages/alert/react.d.ts +1 -1
  20. package/dist/packages/alert/react.js +1 -1
  21. package/dist/packages/attention/{index.d.ts → attention.d.ts} +1 -1
  22. package/dist/packages/attention/{index.js → attention.js} +18 -18
  23. package/dist/packages/attention/attention.js.map +7 -0
  24. package/dist/packages/attention/attention.react.stories.d.ts +1 -1
  25. package/dist/packages/attention/attention.stories.d.ts +3 -3
  26. package/dist/packages/attention/attention.stories.js +2 -2
  27. package/dist/packages/attention/attention.test.d.ts +1 -1
  28. package/dist/packages/attention/attention.test.js +1 -1
  29. package/dist/packages/attention/react.d.ts +1 -1
  30. package/dist/packages/attention/react.js +1 -1
  31. package/dist/packages/badge/{index.js → badge.js} +1 -1
  32. package/dist/packages/badge/{index.js.map → badge.js.map} +1 -1
  33. package/dist/packages/badge/badge.react.stories.d.ts +3 -3
  34. package/dist/packages/badge/badge.stories.d.ts +2 -2
  35. package/dist/packages/badge/badge.stories.js +1 -1
  36. package/dist/packages/badge/badge.test.d.ts +1 -1
  37. package/dist/packages/badge/badge.test.js +1 -1
  38. package/dist/packages/badge/react.d.ts +1 -1
  39. package/dist/packages/badge/react.js +1 -1
  40. package/dist/packages/box/{index.js → box.js} +1 -1
  41. package/dist/packages/box/{index.js.map → box.js.map} +1 -1
  42. package/dist/packages/box/box.react.stories.d.ts +3 -3
  43. package/dist/packages/box/box.stories.d.ts +2 -2
  44. package/dist/packages/box/box.stories.js +1 -1
  45. package/dist/packages/box/box.test.d.ts +1 -1
  46. package/dist/packages/box/box.test.js +1 -1
  47. package/dist/packages/box/react.d.ts +1 -1
  48. package/dist/packages/box/react.js +1 -1
  49. package/dist/packages/box/slot.test.d.ts +1 -1
  50. package/dist/packages/box/slot.test.js +1 -1
  51. package/dist/packages/breadcrumbs/{index.js → breadcrumbs.js} +10 -10
  52. package/dist/packages/breadcrumbs/breadcrumbs.js.map +7 -0
  53. package/dist/packages/breadcrumbs/breadcrumbs.react.stories.d.ts +3 -3
  54. package/dist/packages/breadcrumbs/breadcrumbs.stories.d.ts +2 -2
  55. package/dist/packages/breadcrumbs/breadcrumbs.stories.js +1 -1
  56. package/dist/packages/breadcrumbs/breadcrumbs.test.d.ts +1 -1
  57. package/dist/packages/breadcrumbs/breadcrumbs.test.js +1 -1
  58. package/dist/packages/breadcrumbs/react.d.ts +1 -1
  59. package/dist/packages/breadcrumbs/react.js +1 -1
  60. package/dist/packages/button/{index.d.ts → button.d.ts} +1 -1
  61. package/dist/packages/button/{index.js → button.js} +12 -12
  62. package/dist/packages/button/button.js.map +7 -0
  63. package/dist/packages/button/button.react.stories.d.ts +3 -3
  64. package/dist/packages/button/button.stories.d.ts +2 -2
  65. package/dist/packages/button/button.stories.js +1 -1
  66. package/dist/packages/button/button.test.d.ts +1 -1
  67. package/dist/packages/button/button.test.js +1 -1
  68. package/dist/packages/button/react.d.ts +1 -1
  69. package/dist/packages/button/react.js +1 -1
  70. package/dist/packages/card/{index.js → card.js} +9 -9
  71. package/dist/packages/card/card.js.map +7 -0
  72. package/dist/packages/card/card.react.stories.d.ts +3 -3
  73. package/dist/packages/card/card.stories.d.ts +2 -2
  74. package/dist/packages/card/card.stories.js +1 -1
  75. package/dist/packages/card/card.test.d.ts +1 -1
  76. package/dist/packages/card/card.test.js +1 -1
  77. package/dist/packages/card/react.d.ts +1 -1
  78. package/dist/packages/card/react.js +1 -1
  79. package/dist/packages/combobox/{index.js → combobox.js} +14 -14
  80. package/dist/packages/combobox/{index.js.map → combobox.js.map} +4 -4
  81. package/dist/packages/combobox/combobox.react.stories.d.ts +4 -4
  82. package/dist/packages/combobox/combobox.stories.d.ts +3 -3
  83. package/dist/packages/combobox/combobox.stories.js +2 -2
  84. package/dist/packages/combobox/combobox.test.d.ts +2 -2
  85. package/dist/packages/combobox/combobox.test.js +2 -2
  86. package/dist/packages/combobox/react.d.ts +1 -1
  87. package/dist/packages/combobox/react.js +1 -1
  88. package/dist/packages/datepicker/DatePicker.test.d.ts +2 -2
  89. package/dist/packages/datepicker/DatePicker.test.js +2 -2
  90. package/dist/packages/datepicker/datepicker.js +15 -15
  91. package/dist/packages/datepicker/datepicker.js.map +3 -3
  92. package/dist/packages/datepicker/datepicker.react.stories.d.ts +2 -2
  93. package/dist/packages/datepicker/datepicker.stories.d.ts +3 -3
  94. package/dist/packages/datepicker/datepicker.stories.js +2 -2
  95. package/dist/packages/datepicker/datepicker.test.d.ts +2 -2
  96. package/dist/packages/datepicker/datepicker.test.js +2 -2
  97. package/dist/packages/datepicker/react.js +1 -1
  98. package/dist/packages/expandable/{index.js → expandable.js} +1 -1
  99. package/dist/packages/expandable/{index.js.map → expandable.js.map} +1 -1
  100. package/dist/packages/expandable/expandable.react.stories.d.ts +3 -3
  101. package/dist/packages/expandable/expandable.stories.d.ts +2 -2
  102. package/dist/packages/expandable/expandable.stories.js +1 -1
  103. package/dist/packages/expandable/expandable.test.d.ts +1 -1
  104. package/dist/packages/expandable/expandable.test.js +1 -1
  105. package/dist/packages/expandable/react.d.ts +1 -1
  106. package/dist/packages/expandable/react.js +1 -1
  107. package/dist/packages/i18n.js +6 -2
  108. package/dist/packages/icon/icon.d.ts +22 -0
  109. package/dist/packages/icon/icon.js +27 -0
  110. package/dist/packages/icon/icon.js.map +7 -0
  111. package/dist/packages/icon/icon.react.stories.d.ts +28 -0
  112. package/dist/packages/icon/icon.react.stories.js +37 -0
  113. package/dist/packages/icon/icon.stories.d.ts +39 -0
  114. package/dist/packages/icon/icon.stories.js +43 -0
  115. package/dist/packages/icon/react.d.ts +2 -0
  116. package/dist/packages/{deadtoggle → icon}/react.js +3 -3
  117. package/dist/packages/icon/style.js +27 -0
  118. package/dist/packages/link/{index.js → link.js} +3 -3
  119. package/dist/packages/link/link.js.map +7 -0
  120. package/dist/packages/link/link.react.stories.d.ts +3 -3
  121. package/dist/packages/link/link.stories.d.ts +2 -2
  122. package/dist/packages/link/link.stories.js +1 -1
  123. package/dist/packages/link/link.test.d.ts +1 -1
  124. package/dist/packages/link/link.test.js +1 -1
  125. package/dist/packages/link/react.d.ts +1 -1
  126. package/dist/packages/link/react.js +1 -1
  127. package/dist/packages/link/styles.js +2 -2
  128. package/dist/packages/modal/index.d.ts +6 -3
  129. package/dist/packages/modal/index.js +10 -2717
  130. package/dist/packages/modal/{modal-main.js → modal.js} +1 -1
  131. package/dist/packages/modal/{modal-main.js.map → modal.js.map} +1 -1
  132. package/dist/packages/modal/modal.react.stories.d.ts +1 -1
  133. package/dist/packages/modal/modal.stories.d.ts +6 -3
  134. package/dist/packages/modal/modal.stories.js +3 -1
  135. package/dist/packages/modal/react.d.ts +3 -6
  136. package/dist/packages/modal/react.js +4 -15
  137. package/dist/packages/{modal → modal-footer}/modal-footer.d.ts +2 -2
  138. package/dist/packages/{modal → modal-footer}/modal-footer.js +4 -4
  139. package/dist/packages/modal-footer/modal-footer.js.map +7 -0
  140. package/dist/packages/modal-footer/react.d.ts +2 -0
  141. package/dist/packages/{stepindicator → modal-footer}/react.js +3 -8
  142. package/dist/packages/{modal → modal-header}/modal-header.d.ts +1 -1
  143. package/dist/packages/{modal → modal-header}/modal-header.js +7 -7
  144. package/dist/packages/modal-header/modal-header.js.map +7 -0
  145. package/dist/packages/modal-header/react.d.ts +5 -0
  146. package/dist/packages/{pagination → modal-header}/react.js +5 -5
  147. package/dist/packages/page-indicator/locales/da/messages.mjs +1 -0
  148. package/dist/packages/page-indicator/locales/en/messages.mjs +1 -0
  149. package/dist/packages/page-indicator/locales/fi/messages.mjs +1 -0
  150. package/dist/packages/page-indicator/locales/nb/messages.mjs +1 -0
  151. package/dist/packages/page-indicator/locales/sv/messages.mjs +1 -0
  152. package/dist/packages/page-indicator/page-indicator.d.ts +26 -0
  153. package/dist/packages/page-indicator/page-indicator.js +41 -0
  154. package/dist/packages/page-indicator/page-indicator.js.map +7 -0
  155. package/dist/packages/{pageindicator/pageindicator.react.stories.d.ts → page-indicator/page-indicator.react.stories.d.ts} +3 -3
  156. package/dist/packages/{pageindicator/pageindicator.stories.d.ts → page-indicator/page-indicator.stories.d.ts} +1 -1
  157. package/dist/packages/page-indicator/page-indicator.stories.js +87 -0
  158. package/dist/packages/page-indicator/page-indicator.test.d.ts +1 -0
  159. package/dist/packages/page-indicator/page-indicator.test.js +118 -0
  160. package/dist/packages/{pageindicator → page-indicator}/react.d.ts +1 -1
  161. package/dist/packages/{pageindicator → page-indicator}/react.js +2 -2
  162. package/dist/packages/{pageindicator → page-indicator}/style.js +4 -4
  163. package/dist/packages/pill/{index.js → pill.js} +9 -9
  164. package/dist/packages/pill/pill.js.map +7 -0
  165. package/dist/packages/pill/pill.react.stories.d.ts +4 -4
  166. package/dist/packages/pill/pill.stories.d.ts +2 -2
  167. package/dist/packages/pill/pill.stories.js +1 -1
  168. package/dist/packages/pill/pill.test.d.ts +1 -1
  169. package/dist/packages/pill/pill.test.js +1 -1
  170. package/dist/packages/pill/react.d.ts +1 -1
  171. package/dist/packages/pill/react.js +1 -1
  172. package/dist/packages/select/react.d.ts +1 -1
  173. package/dist/packages/select/react.js +1 -1
  174. package/dist/packages/select/{index.js → select.js} +16 -16
  175. package/dist/packages/select/select.js.map +7 -0
  176. package/dist/packages/select/select.react.stories.d.ts +4 -4
  177. package/dist/packages/select/select.react.stories.js +1 -1
  178. package/dist/packages/select/select.stories.d.ts +2 -2
  179. package/dist/packages/select/select.stories.js +1 -1
  180. package/dist/packages/select/select.test.d.ts +1 -1
  181. package/dist/packages/select/select.test.js +1 -1
  182. package/dist/packages/switch/react.d.ts +1 -1
  183. package/dist/packages/switch/react.js +1 -1
  184. package/dist/packages/switch/{index.js → switch.js} +1 -1
  185. package/dist/packages/switch/{index.js.map → switch.js.map} +1 -1
  186. package/dist/packages/switch/switch.react.stories.d.ts +1 -1
  187. package/dist/packages/switch/switch.stories.d.ts +1 -1
  188. package/dist/packages/switch/switch.stories.js +1 -1
  189. package/dist/packages/switch/switch.test.d.ts +1 -1
  190. package/dist/packages/switch/switch.test.js +2 -2
  191. package/dist/packages/tab/react.d.ts +7 -0
  192. package/dist/packages/tab/react.js +17 -0
  193. package/dist/packages/{tabs → tab}/tab.d.ts +2 -5
  194. package/dist/packages/tab/tab.js +2464 -0
  195. package/dist/packages/tab/tab.js.map +7 -0
  196. package/dist/packages/tab-panel/react.d.ts +2 -0
  197. package/dist/packages/tab-panel/react.js +11 -0
  198. package/dist/packages/{tabs → tab-panel}/tab-panel.d.ts +3 -3
  199. package/dist/packages/tab-panel/tab-panel.js +2441 -0
  200. package/dist/packages/tab-panel/tab-panel.js.map +7 -0
  201. package/dist/packages/tabs/index.d.ts +2 -3
  202. package/dist/packages/tabs/index.js +3 -2
  203. package/dist/packages/tabs/react.d.ts +3 -8
  204. package/dist/packages/tabs/react.js +4 -17
  205. package/dist/packages/tabs/tabs.d.ts +2 -5
  206. package/dist/packages/tabs/tabs.js +2447 -252
  207. package/dist/packages/tabs/tabs.js.map +7 -0
  208. package/dist/packages/tabs/tabs.react.stories.d.ts +14 -1
  209. package/dist/packages/tabs/tabs.react.stories.js +55 -35
  210. package/dist/packages/tabs/tabs.stories.d.ts +5 -4
  211. package/dist/packages/tabs/tabs.stories.js +89 -65
  212. package/dist/packages/textfield/react.d.ts +1 -1
  213. package/dist/packages/textfield/react.js +1 -1
  214. package/dist/packages/textfield/{index.js → textfield.js} +1 -1
  215. package/dist/packages/textfield/{index.js.map → textfield.js.map} +1 -1
  216. package/dist/packages/textfield/textfield.react.stories.d.ts +4 -4
  217. package/dist/packages/textfield/textfield.stories.d.ts +2 -2
  218. package/dist/packages/textfield/textfield.stories.js +1 -1
  219. package/dist/packages/textfield/textfield.test.d.ts +2 -2
  220. package/dist/packages/textfield/textfield.test.js +2 -2
  221. package/dist/packages/toast/index.d.ts +5 -3
  222. package/dist/packages/toast/index.js +7 -2483
  223. package/dist/packages/toast/toast.js +8 -8
  224. package/dist/packages/toast/toast.js.map +3 -3
  225. package/dist/packages/toast/toast.stories.d.ts +4 -3
  226. package/dist/packages/toast/toast.stories.js +3 -2
  227. package/dist/packages/{toast → toast-container}/toast-container.d.ts +1 -1
  228. package/dist/packages/toast-container/toast-container.js.map +7 -0
  229. package/dist/web-types.json +175 -38
  230. package/package.json +91 -38
  231. package/dist/packages/attention/index.js.map +0 -7
  232. package/dist/packages/breadcrumbs/index.js.map +0 -7
  233. package/dist/packages/button/index.js.map +0 -7
  234. package/dist/packages/card/index.js.map +0 -7
  235. package/dist/packages/checkbox/checkbox-group.d.ts +0 -10
  236. package/dist/packages/checkbox/checkbox-group.js +0 -15
  237. package/dist/packages/checkbox/checkbox.d.ts +0 -66
  238. package/dist/packages/checkbox/checkbox.js +0 -220
  239. package/dist/packages/checkbox/checkbox.react.stories.d.ts +0 -12
  240. package/dist/packages/checkbox/checkbox.react.stories.js +0 -10
  241. package/dist/packages/checkbox/checkbox.stories.d.ts +0 -11
  242. package/dist/packages/checkbox/checkbox.stories.js +0 -25
  243. package/dist/packages/checkbox/index.d.ts +0 -2
  244. package/dist/packages/checkbox/index.js +0 -2
  245. package/dist/packages/checkbox/react.d.ts +0 -7
  246. package/dist/packages/checkbox/react.js +0 -20
  247. package/dist/packages/checkbox/styles.d.ts +0 -0
  248. package/dist/packages/checkbox/styles.js +0 -0
  249. package/dist/packages/datepicker/index.d.ts +0 -1
  250. package/dist/packages/datepicker/index.js +0 -2785
  251. package/dist/packages/datepicker/index.js.map +0 -7
  252. package/dist/packages/deadtoggle/dead-toggle.react.stories.d.ts +0 -15
  253. package/dist/packages/deadtoggle/dead-toggle.react.stories.js +0 -34
  254. package/dist/packages/deadtoggle/dead-toggle.stories.d.ts +0 -14
  255. package/dist/packages/deadtoggle/dead-toggle.stories.js +0 -45
  256. package/dist/packages/deadtoggle/dead-toggle.test.d.ts +0 -1
  257. package/dist/packages/deadtoggle/dead-toggle.test.js +0 -9
  258. package/dist/packages/deadtoggle/index.d.ts +0 -17
  259. package/dist/packages/deadtoggle/index.js +0 -51
  260. package/dist/packages/deadtoggle/react.d.ts +0 -2
  261. package/dist/packages/link/index.js.map +0 -7
  262. package/dist/packages/modal/index.js.map +0 -7
  263. package/dist/packages/modal/modal-footer.js.map +0 -7
  264. package/dist/packages/modal/modal-header.js.map +0 -7
  265. package/dist/packages/pageindicator/index.d.ts +0 -10
  266. package/dist/packages/pageindicator/index.js +0 -48
  267. package/dist/packages/pageindicator/pageindicator.stories.js +0 -71
  268. package/dist/packages/pagination/index.d.ts +0 -32
  269. package/dist/packages/pagination/index.js +0 -199
  270. package/dist/packages/pagination/locales/da/messages.mjs +0 -1
  271. package/dist/packages/pagination/locales/en/messages.mjs +0 -1
  272. package/dist/packages/pagination/locales/fi/messages.mjs +0 -1
  273. package/dist/packages/pagination/locales/nb/messages.mjs +0 -1
  274. package/dist/packages/pagination/locales/sv/messages.mjs +0 -1
  275. package/dist/packages/pagination/pagination.react.stories.d.ts +0 -21
  276. package/dist/packages/pagination/pagination.react.stories.js +0 -45
  277. package/dist/packages/pagination/pagination.stories.d.ts +0 -14
  278. package/dist/packages/pagination/pagination.stories.js +0 -56
  279. package/dist/packages/pagination/pagination.test.d.ts +0 -1
  280. package/dist/packages/pagination/pagination.test.js +0 -76
  281. package/dist/packages/pagination/react.d.ts +0 -5
  282. package/dist/packages/pagination/styles.js +0 -2
  283. package/dist/packages/pill/index.js.map +0 -7
  284. package/dist/packages/radio/base-element.d.ts +0 -46
  285. package/dist/packages/radio/base-element.js +0 -100
  286. package/dist/packages/radio/custom-error-validator.d.ts +0 -6
  287. package/dist/packages/radio/custom-error-validator.js +0 -22
  288. package/dist/packages/radio/form-associated-element.d.ts +0 -103
  289. package/dist/packages/radio/form-associated-element.js +0 -282
  290. package/dist/packages/radio/host-styles.d.ts +0 -1
  291. package/dist/packages/radio/host-styles.js +0 -12
  292. package/dist/packages/radio/index.d.ts +0 -2
  293. package/dist/packages/radio/index.js +0 -2
  294. package/dist/packages/radio/invalid.d.ts +0 -8
  295. package/dist/packages/radio/invalid.js +0 -5
  296. package/dist/packages/radio/math.d.ts +0 -1
  297. package/dist/packages/radio/math.js +0 -4
  298. package/dist/packages/radio/radio-group-styles.d.ts +0 -1
  299. package/dist/packages/radio/radio-group-styles.js +0 -59
  300. package/dist/packages/radio/radio-group.d.ts +0 -72
  301. package/dist/packages/radio/radio-group.js +0 -342
  302. package/dist/packages/radio/radio-styles.d.ts +0 -0
  303. package/dist/packages/radio/radio-styles.js +0 -0
  304. package/dist/packages/radio/radio.d.ts +0 -38
  305. package/dist/packages/radio/radio.js +0 -115
  306. package/dist/packages/radio/radio.react.stories.d.ts +0 -9
  307. package/dist/packages/radio/radio.react.stories.js +0 -10
  308. package/dist/packages/radio/radio.stories.d.ts +0 -15
  309. package/dist/packages/radio/radio.stories.js +0 -61
  310. package/dist/packages/radio/react.d.ts +0 -9
  311. package/dist/packages/radio/react.js +0 -22
  312. package/dist/packages/radio/required-validator.d.ts +0 -11
  313. package/dist/packages/radio/required-validator.js +0 -34
  314. package/dist/packages/radio/slot.d.ts +0 -20
  315. package/dist/packages/radio/slot.js +0 -71
  316. package/dist/packages/radio/watch.d.ts +0 -26
  317. package/dist/packages/radio/watch.js +0 -39
  318. package/dist/packages/select/index.js.map +0 -7
  319. package/dist/packages/slider/Slider.d.ts +0 -2
  320. package/dist/packages/slider/Slider.js +0 -8
  321. package/dist/packages/slider/SliderThumb.d.ts +0 -2
  322. package/dist/packages/slider/SliderThumb.js +0 -8
  323. package/dist/packages/slider/index.d.ts +0 -2
  324. package/dist/packages/slider/index.js +0 -2
  325. package/dist/packages/slider/locales/da/messages.d.mts +0 -1
  326. package/dist/packages/slider/locales/da/messages.mjs +0 -1
  327. package/dist/packages/slider/locales/en/messages.d.mts +0 -1
  328. package/dist/packages/slider/locales/en/messages.mjs +0 -1
  329. package/dist/packages/slider/locales/fi/messages.d.mts +0 -1
  330. package/dist/packages/slider/locales/fi/messages.mjs +0 -1
  331. package/dist/packages/slider/locales/nb/messages.d.mts +0 -1
  332. package/dist/packages/slider/locales/nb/messages.mjs +0 -1
  333. package/dist/packages/slider/locales/sv/messages.d.mts +0 -1
  334. package/dist/packages/slider/locales/sv/messages.mjs +0 -1
  335. package/dist/packages/slider/oddbird-css-anchor-positioning.d.ts +0 -2
  336. package/dist/packages/slider/oddbird-css-anchor-positioning.js +0 -3
  337. package/dist/packages/slider/react.d.ts +0 -8
  338. package/dist/packages/slider/react.js +0 -20
  339. package/dist/packages/slider/slider-thumb.d.ts +0 -63
  340. package/dist/packages/slider/slider-thumb.js +0 -501
  341. package/dist/packages/slider/slider.d.ts +0 -55
  342. package/dist/packages/slider/slider.js +0 -301
  343. package/dist/packages/slider/slider.react.stories.d.ts +0 -19
  344. package/dist/packages/slider/slider.react.stories.js +0 -140
  345. package/dist/packages/slider/slider.stories.d.ts +0 -21
  346. package/dist/packages/slider/slider.stories.js +0 -404
  347. package/dist/packages/slider/slider.test.d.ts +0 -4
  348. package/dist/packages/slider/slider.test.js +0 -111
  349. package/dist/packages/slider/styles/w-slider-thumb.styles.d.ts +0 -1
  350. package/dist/packages/slider/styles/w-slider-thumb.styles.js +0 -175
  351. package/dist/packages/slider/styles/w-slider.styles.d.ts +0 -1
  352. package/dist/packages/slider/styles/w-slider.styles.js +0 -148
  353. package/dist/packages/slider/styles.d.ts +0 -1
  354. package/dist/packages/slider/styles.js +0 -2
  355. package/dist/packages/stepindicator/index.d.ts +0 -37
  356. package/dist/packages/stepindicator/index.js +0 -195
  357. package/dist/packages/stepindicator/locales/da/messages.d.mts +0 -1
  358. package/dist/packages/stepindicator/locales/da/messages.mjs +0 -1
  359. package/dist/packages/stepindicator/locales/en/messages.d.mts +0 -1
  360. package/dist/packages/stepindicator/locales/en/messages.mjs +0 -1
  361. package/dist/packages/stepindicator/locales/fi/messages.d.mts +0 -1
  362. package/dist/packages/stepindicator/locales/fi/messages.mjs +0 -1
  363. package/dist/packages/stepindicator/locales/nb/messages.d.mts +0 -1
  364. package/dist/packages/stepindicator/locales/nb/messages.mjs +0 -1
  365. package/dist/packages/stepindicator/locales/sv/messages.d.mts +0 -1
  366. package/dist/packages/stepindicator/locales/sv/messages.mjs +0 -1
  367. package/dist/packages/stepindicator/react.d.ts +0 -3
  368. package/dist/packages/stepindicator/stepindicator.react.stories.d.ts +0 -15
  369. package/dist/packages/stepindicator/stepindicator.react.stories.js +0 -112
  370. package/dist/packages/stepindicator/stepindicator.stories.d.ts +0 -12
  371. package/dist/packages/stepindicator/stepindicator.stories.js +0 -172
  372. package/dist/packages/stepindicator/styles.d.ts +0 -1
  373. package/dist/packages/stepindicator/styles.js +0 -2
  374. package/dist/packages/tabs/tab-panel.js +0 -51
  375. package/dist/packages/tabs/tab.js +0 -104
  376. package/dist/packages/textarea/index.d.ts +0 -1
  377. package/dist/packages/textarea/index.js +0 -1
  378. package/dist/packages/textarea/locales/da/messages.d.mts +0 -1
  379. package/dist/packages/textarea/locales/da/messages.mjs +0 -1
  380. package/dist/packages/textarea/locales/en/messages.d.mts +0 -1
  381. package/dist/packages/textarea/locales/en/messages.mjs +0 -1
  382. package/dist/packages/textarea/locales/fi/messages.d.mts +0 -1
  383. package/dist/packages/textarea/locales/fi/messages.mjs +0 -1
  384. package/dist/packages/textarea/locales/nb/messages.d.mts +0 -1
  385. package/dist/packages/textarea/locales/nb/messages.mjs +0 -1
  386. package/dist/packages/textarea/locales/sv/messages.d.mts +0 -1
  387. package/dist/packages/textarea/locales/sv/messages.mjs +0 -1
  388. package/dist/packages/textarea/react.d.ts +0 -11
  389. package/dist/packages/textarea/react.js +0 -21
  390. package/dist/packages/textarea/styles.d.ts +0 -1
  391. package/dist/packages/textarea/styles.js +0 -2
  392. package/dist/packages/textarea/textarea.d.ts +0 -49
  393. package/dist/packages/textarea/textarea.js +0 -220
  394. package/dist/packages/textarea/textarea.react.stories.d.ts +0 -33
  395. package/dist/packages/textarea/textarea.react.stories.js +0 -41
  396. package/dist/packages/textarea/textarea.stories.d.ts +0 -19
  397. package/dist/packages/textarea/textarea.stories.js +0 -85
  398. package/dist/packages/textarea/textarea.test.d.ts +0 -1
  399. package/dist/packages/textarea/textarea.test.js +0 -68
  400. package/dist/packages/toast/index.js.map +0 -7
  401. package/dist/packages/toast/toast-container.js.map +0 -7
  402. package/dist/packages/toggle-styles.d.ts +0 -1
  403. package/dist/packages/toggle-styles.js +0 -108
  404. /package/dist/packages/affix/{index.d.ts → affix.d.ts} +0 -0
  405. /package/dist/packages/alert/{index.d.ts → alert.d.ts} +0 -0
  406. /package/dist/packages/badge/{index.d.ts → badge.d.ts} +0 -0
  407. /package/dist/packages/box/{index.d.ts → box.d.ts} +0 -0
  408. /package/dist/packages/breadcrumbs/{index.d.ts → breadcrumbs.d.ts} +0 -0
  409. /package/dist/packages/card/{index.d.ts → card.d.ts} +0 -0
  410. /package/dist/packages/combobox/{index.d.ts → combobox.d.ts} +0 -0
  411. /package/dist/packages/expandable/{index.d.ts → expandable.d.ts} +0 -0
  412. /package/dist/packages/{pageindicator → icon}/style.d.ts +0 -0
  413. /package/dist/packages/link/{index.d.ts → link.d.ts} +0 -0
  414. /package/dist/packages/modal/{modal-main.d.ts → modal.d.ts} +0 -0
  415. /package/dist/packages/{pagination → page-indicator}/locales/da/messages.d.mts +0 -0
  416. /package/dist/packages/{pagination → page-indicator}/locales/en/messages.d.mts +0 -0
  417. /package/dist/packages/{pagination → page-indicator}/locales/fi/messages.d.mts +0 -0
  418. /package/dist/packages/{pagination → page-indicator}/locales/nb/messages.d.mts +0 -0
  419. /package/dist/packages/{pagination → page-indicator}/locales/sv/messages.d.mts +0 -0
  420. /package/dist/packages/{pageindicator/pageindicator.react.stories.js → page-indicator/page-indicator.react.stories.js} +0 -0
  421. /package/dist/packages/{pagination/styles.d.ts → page-indicator/style.d.ts} +0 -0
  422. /package/dist/packages/pill/{index.d.ts → pill.d.ts} +0 -0
  423. /package/dist/packages/select/{index.d.ts → select.d.ts} +0 -0
  424. /package/dist/packages/switch/{index.d.ts → switch.d.ts} +0 -0
  425. /package/dist/packages/textfield/{index.d.ts → textfield.d.ts} +0 -0
  426. /package/dist/packages/{toast → toast-container}/toast-container.js +0 -0
@@ -1,48 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { html, LitElement } from 'lit';
8
- import { property } from 'lit/decorators.js';
9
- import { classMap } from 'lit/directives/class-map.js';
10
- import { map } from 'lit/directives/map.js';
11
- import { range } from 'lit/directives/range.js';
12
- import { styles } from './style.js';
13
- class WarpPageIndicator extends LitElement {
14
- constructor() {
15
- super(...arguments);
16
- /** Currently selected page (1-based index) */
17
- this.selectedPage = 1;
18
- /** Total number of pages */
19
- this.pageCount = 1;
20
- }
21
- static { this.styles = [styles]; }
22
- render() {
23
- return html `
24
- <div class="w-pageindicator">
25
- <div class="w-pageindicator--container">
26
- ${map(range(this.pageCount), (i) => {
27
- const isSelected = i === this.selectedPage - 1;
28
- const classes = {
29
- 'w-pageindicator--dot': true,
30
- 'w-pageindicator--selecteddot': isSelected,
31
- };
32
- return html `<div class="${classMap(classes)}"></div>`;
33
- })}
34
- </div>
35
- </div>
36
- `;
37
- }
38
- }
39
- __decorate([
40
- property({ type: Number, attribute: 'selected-page' })
41
- ], WarpPageIndicator.prototype, "selectedPage", void 0);
42
- __decorate([
43
- property({ type: Number, attribute: 'page-count' })
44
- ], WarpPageIndicator.prototype, "pageCount", void 0);
45
- if (!customElements.get('w-pageindicator')) {
46
- customElements.define('w-pageindicator', WarpPageIndicator);
47
- }
48
- export { WarpPageIndicator };
@@ -1,71 +0,0 @@
1
- import { html, LitElement } from 'lit';
2
- import './index.js';
3
- export default {
4
- component: 'w-pageindicator',
5
- title: 'Navigation/PageIndicator',
6
- render: ({ pageCount, selectedPage }) => html `
7
- <w-pageindicator page-count=${pageCount} selected-page=${selectedPage}></w-pageindicator>
8
- `,
9
- argTypes: {
10
- pageCount: {
11
- control: { type: 'number' },
12
- },
13
- selectedPage: {
14
- control: { type: 'number' },
15
- },
16
- },
17
- };
18
- export const Default = {
19
- args: {
20
- pageCount: 5,
21
- selectedPage: 1,
22
- },
23
- };
24
- export const InsideContainer = () => html `
25
- <div style="display: grid; height: 60vh; border: 1px solid lightgrey;">
26
- <w-pageindicator page-count="5" selected-page="1" style="padding-bottom: 12px; align-self: end;"> </w-pageindicator>
27
- </div>
28
- `;
29
- class PageIndicatorChangePage extends LitElement {
30
- constructor() {
31
- super(...arguments);
32
- this.page = 1;
33
- }
34
- connectedCallback() {
35
- super.connectedCallback();
36
- this.startPageChanger();
37
- }
38
- startPageChanger() {
39
- setInterval(() => {
40
- if (this.page > 4) {
41
- this.page = 1;
42
- }
43
- else {
44
- this.page = this.page + 1;
45
- }
46
- }, 1000);
47
- }
48
- render() {
49
- return html `
50
- <div style="display: grid; height: 60vh; border: 1px solid lightgrey;">
51
- <div style="align-self: center; justify-self: center;">Page ${this.page}</div>
52
- <w-pageindicator page-count="5" selected-page=${this.page} style="padding-bottom: 12px; align-self: end;"> </w-pageindicator>
53
- </div>
54
- `;
55
- }
56
- }
57
- if (!customElements.get('page-indicator-change-page')) {
58
- customElements.define('page-indicator-change-page', PageIndicatorChangePage);
59
- }
60
- export const InsideContainerChangePage = () => html ` <page-indicator-change-page></page-indicator-change-page> `;
61
- export const InsideContainer10Pages = () => html `
62
- <div style="display: grid; height: 60vh; border: 1px solid lightgrey;">
63
- <w-pageindicator page-count="10" selected-page="3" style="padding-bottom: 12px; align-self: end;"> </w-pageindicator>
64
- </div>
65
- `;
66
- export const OutsideContainer = () => html `
67
- <div style="height: 450px; border: 1px solid lightgrey;">
68
- <div style="height: 300px; border-bottom: 1px solid #e6e6e6;"></div>
69
- <w-pageindicator page-count="5" selected-page="1" style="padding-top: 16px;"> </w-pageindicator>
70
- </div>
71
- `;
@@ -1,32 +0,0 @@
1
- import { LitElement } from 'lit';
2
- import '@warp-ds/icons/elements/chevron-double-left-16';
3
- import '@warp-ds/icons/elements/chevron-left-16';
4
- import '@warp-ds/icons/elements/chevron-right-16';
5
- /**
6
- * Pagination allows users to navigate through multiple pages of content by providing navigation controls with page numbers and directional arrows.
7
- *
8
- * [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/navigation-pagination--docs)
9
- *
10
- * @fires {CustomEvent} page-click - Triggered when a link button in the pagination is clicked. Contains the page number in `string` form.
11
- */
12
- declare class WarpPagination extends LitElement {
13
- #private;
14
- baseUrl: string;
15
- pages: number;
16
- currentPageNumber: number;
17
- visiblePages: number;
18
- static styles: import("lit").CSSResult[];
19
- constructor();
20
- /** @internal */
21
- get shouldShowShowFirstPageButton(): boolean;
22
- /** @internal */
23
- get shouldShowPreviousPageButton(): boolean;
24
- /** @internal */
25
- get shouldShowNextPageButton(): boolean;
26
- /** @internal */
27
- get currentPageIndex(): number;
28
- /** @internal */
29
- get visiblePageNumbers(): number[];
30
- render(): import("lit").TemplateResult<1>;
31
- }
32
- export { WarpPagination };
@@ -1,199 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- // @warp-css;
8
- import { html, LitElement, nothing, css } from 'lit';
9
- import { i18n } from '@lingui/core';
10
- import { property } from 'lit/decorators.js';
11
- import '@warp-ds/icons/elements/chevron-double-left-16';
12
- import '@warp-ds/icons/elements/chevron-left-16';
13
- import '@warp-ds/icons/elements/chevron-right-16';
14
- import { activateI18n } from '../i18n.js';
15
- import { reset } from '../styles.js';
16
- import { messages as daMessages } from './locales/da/messages.mjs';
17
- import { messages as enMessages } from './locales/en/messages.mjs';
18
- import { messages as fiMessages } from './locales/fi/messages.mjs';
19
- import { messages as nbMessages } from './locales/nb/messages.mjs';
20
- import { messages as svMessages } from './locales/sv/messages.mjs';
21
- import { styles } from './styles';
22
- const iconSuffix = i18n._({
23
- id: 'pagination.aria.icon-suffix',
24
- message: 'icon',
25
- comment: 'Suffix added at the end of icon titles when img semantics are lost on an html element',
26
- });
27
- const baseItemStyles = 'hover:no-underline focus:no-underline focusable inline-flex justify-center items-center transition-colors ease-in-out min-h-[44px] min-w-[44px] p-4 rounded-full border-0 hover:bg-clip-padding';
28
- /**
29
- * Pagination allows users to navigate through multiple pages of content by providing navigation controls with page numbers and directional arrows.
30
- *
31
- * [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/navigation-pagination--docs)
32
- *
33
- * @fires {CustomEvent} page-click - Triggered when a link button in the pagination is clicked. Contains the page number in `string` form.
34
- */
35
- class WarpPagination extends LitElement {
36
- static { this.styles = [
37
- reset,
38
- styles,
39
- css `
40
- w-icon-chevron-left-16,
41
- w-icon-chevron-double-left-16,
42
- w-icon-chevron-right-16 {
43
- height: 16px;
44
- }
45
- `,
46
- ]; }
47
- constructor() {
48
- super();
49
- this.currentPageNumber = 1;
50
- this.visiblePages = 7;
51
- activateI18n(enMessages, nbMessages, fiMessages, daMessages, svMessages);
52
- }
53
- /** @internal */
54
- get shouldShowShowFirstPageButton() {
55
- return this.currentPageNumber - 2 > 0;
56
- }
57
- /** @internal */
58
- get shouldShowPreviousPageButton() {
59
- return this.currentPageNumber - 1 > 0;
60
- }
61
- /** @internal */
62
- get shouldShowNextPageButton() {
63
- return this.currentPageNumber < this.pages;
64
- }
65
- /** @internal */
66
- get currentPageIndex() {
67
- return this.currentPageNumber - 1;
68
- }
69
- /** @internal */
70
- get visiblePageNumbers() {
71
- if (this.pages <= this.visiblePages) {
72
- // Show all pages if total pages is less than or equal to visible pages
73
- return Array.from({ length: this.pages }, (_, i) => i + 1);
74
- }
75
- const half = Math.floor(this.visiblePages / 2);
76
- let start = Math.max(1, this.currentPageNumber - half);
77
- const end = Math.min(this.pages, start + this.visiblePages - 1);
78
- // Adjust start if we're near the end
79
- if (end - start + 1 < this.visiblePages) {
80
- start = Math.max(1, end - this.visiblePages + 1);
81
- }
82
- return Array.from({ length: end - start + 1 }, (_, i) => start + i);
83
- }
84
- #dispatchClickPage(e) {
85
- const clickedPage = e.target.getAttribute('data-page-number');
86
- this.dispatchEvent(new CustomEvent('page-click', {
87
- detail: { clickedPage },
88
- bubbles: true,
89
- composed: true,
90
- }));
91
- }
92
- render() {
93
- const visiblePages = this.visiblePageNumbers;
94
- return html `<nav class="flex items-center justify-center p-8" @click="${this.#dispatchClickPage}">
95
- <h1 class="sr-only">
96
- ${i18n._({
97
- id: 'pagination.aria.pagination',
98
- message: 'Pages',
99
- comment: 'Default screenreader message for pagination container in the pagination component',
100
- })}
101
- </h1>
102
- <div class="flex items-center s-text-link">
103
- ${this.shouldShowShowFirstPageButton
104
- ? html `<a
105
- data-page-number="1"
106
- href="${this.baseUrl}1"
107
- class="${baseItemStyles +
108
- ' s-icon hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]'}">
109
- <span class="sr-only"
110
- >${i18n._({
111
- id: 'pagination.aria.first-page',
112
- message: 'First page',
113
- comment: 'Default screenreader message for first page link in the pagination component',
114
- })},</span
115
- >
116
- <w-icon-chevron-double-left-16 class="pointer-events-none flex items-center"></w-icon-chevron-double-left-16>
117
- <span class="sr-only">${iconSuffix}</span>
118
- </a>`
119
- : nothing}
120
- ${this.shouldShowPreviousPageButton
121
- ? html `<a
122
- data-page-number="${this.currentPageNumber - 1}"
123
- href="${this.baseUrl}${this.currentPageNumber - 1}"
124
- class="${baseItemStyles +
125
- ' s-icon hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]'}">
126
- <span class="sr-only"
127
- >${i18n._({
128
- id: 'pagination.aria.prev-page',
129
- message: 'Previous page',
130
- comment: 'Default screenreader message for previous page link in the pagination component',
131
- })},</span
132
- >
133
- <w-icon-chevron-left-16 class="pointer-events-none flex items-center"></w-icon-chevron-left-16>
134
- <span class="sr-only">${iconSuffix}</span>
135
- </a>`
136
- : nothing}
137
- ${visiblePages.map((pageNumber) => {
138
- const isCurrentPage = pageNumber === this.currentPageNumber;
139
- const url = `${this.baseUrl}${pageNumber}`;
140
- let styles = baseItemStyles;
141
- if (isCurrentPage) {
142
- styles += ' s-bg-primary s-text-inverted';
143
- }
144
- else {
145
- styles +=
146
- ' hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]';
147
- }
148
- const ariaLabel = i18n._({
149
- id: 'pagination.aria.page',
150
- message: 'Page {currentPage}',
151
- values: { currentPage: pageNumber },
152
- comment: 'Default screenreader message for page link in the pagination component',
153
- });
154
- return html `<a
155
- data-page-number="${pageNumber}"
156
- aria-label="${ariaLabel}"
157
- href="${url}"
158
- class="${styles}"
159
- aria-current="${isCurrentPage ? 'page' : ''}"
160
- >${pageNumber}</a
161
- >`;
162
- })}
163
- ${this.shouldShowNextPageButton
164
- ? html `<a
165
- data-page-number="${this.currentPageNumber + 1}"
166
- href="${this.baseUrl}${this.currentPageNumber + 1}"
167
- class="${baseItemStyles +
168
- ' s-icon hover:bg-[--w-color-button-pill-background-hover] active:bg-[--w-color-button-pill-background-active]'}">
169
- <span class="sr-only">
170
- ${i18n._({
171
- id: 'pagination.aria.next-page',
172
- message: 'Next page',
173
- comment: 'Default screenreader message for next page link in the pagination component',
174
- })},</span
175
- >
176
- <w-icon-chevron-right-16 class="pointer-events-none flex items-center"></w-icon-chevron-right-16>
177
- <span class="sr-only">${iconSuffix}</span>
178
- </a>`
179
- : nothing}
180
- </div>
181
- </nav>`;
182
- }
183
- }
184
- __decorate([
185
- property({ type: String, reflect: true, attribute: 'base-url' })
186
- ], WarpPagination.prototype, "baseUrl", void 0);
187
- __decorate([
188
- property({ type: Number, reflect: true })
189
- ], WarpPagination.prototype, "pages", void 0);
190
- __decorate([
191
- property({ type: Number, reflect: true, attribute: 'current-page' })
192
- ], WarpPagination.prototype, "currentPageNumber", void 0);
193
- __decorate([
194
- property({ type: Number, reflect: true, attribute: 'visible-pages' })
195
- ], WarpPagination.prototype, "visiblePages", void 0);
196
- if (!customElements.get('w-pagination')) {
197
- customElements.define('w-pagination', WarpPagination);
198
- }
199
- export { WarpPagination };
@@ -1 +0,0 @@
1
- /*eslint-disable*/ export const messages = JSON.parse("{\"pagination.aria.first-page\":[\"Første side\"],\"pagination.aria.icon-suffix\":[\"ikon\"],\"pagination.aria.next-page\":[\"Næste side\"],\"pagination.aria.page\":[\"Side \",[\"currentPage\"]],\"pagination.aria.pagination\":[\"Sider\"],\"pagination.aria.prev-page\":[\"Forrige side\"]}");
@@ -1 +0,0 @@
1
- /*eslint-disable*/ export const messages = JSON.parse("{\"pagination.aria.first-page\":[\"First page\"],\"pagination.aria.icon-suffix\":[\"icon\"],\"pagination.aria.next-page\":[\"Next page\"],\"pagination.aria.page\":[\"Page \",[\"currentPage\"]],\"pagination.aria.pagination\":[\"Pages\"],\"pagination.aria.prev-page\":[\"Previous page\"]}");
@@ -1 +0,0 @@
1
- /*eslint-disable*/ export const messages = JSON.parse("{\"pagination.aria.first-page\":[\"Ensimmäinen sivu\"],\"pagination.aria.icon-suffix\":[\"kuvake\"],\"pagination.aria.next-page\":[\"Seuraava sivu\"],\"pagination.aria.page\":[\"Sivu \",[\"currentPage\"]],\"pagination.aria.pagination\":[\"Sivut\"],\"pagination.aria.prev-page\":[\"Edellinen sivu\"]}");
@@ -1 +0,0 @@
1
- /*eslint-disable*/ export const messages = JSON.parse("{\"pagination.aria.first-page\":[\"Første side\"],\"pagination.aria.icon-suffix\":[\"ikon\"],\"pagination.aria.next-page\":[\"Neste side\"],\"pagination.aria.page\":[\"Side \",[\"currentPage\"]],\"pagination.aria.pagination\":[\"Sider\"],\"pagination.aria.prev-page\":[\"Forrige side\"]}");
@@ -1 +0,0 @@
1
- /*eslint-disable*/ export const messages = JSON.parse("{\"pagination.aria.first-page\":[\"Första sidan\"],\"pagination.aria.icon-suffix\":[\"ikon\"],\"pagination.aria.next-page\":[\"Nästa sida\"],\"pagination.aria.page\":[\"Sida \",[\"currentPage\"]],\"pagination.aria.pagination\":[\"Sidor\"],\"pagination.aria.prev-page\":[\"Föregående sida\"]}");
@@ -1,21 +0,0 @@
1
- import React from 'react';
2
- import { StoryObj } from '@storybook/react';
3
- import { Pagination } from './react';
4
- declare const _default: {
5
- title: string;
6
- render(args: Omit<React.HTMLAttributes<import(".").WarpPagination>, "render" | "renderOptions" | "connectedCallback" | "disconnectedCallback" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "baseUrl" | "pages" | "currentPageNumber" | "visiblePages" | "onPageClick" | "onpage-click" | "shouldShowShowFirstPageButton" | "shouldShowPreviousPageButton" | "shouldShowNextPageButton" | "currentPageIndex" | "visiblePageNumbers"> & {
7
- onPageClick?: (e: Event) => void;
8
- 'onpage-click'?: (e: Event) => void;
9
- } & Partial<Omit<import(".").WarpPagination, keyof HTMLElement>> & React.RefAttributes<import(".").WarpPagination>): React.JSX.Element;
10
- component: import("@lit/react").ReactWebComponent<import(".").WarpPagination, {
11
- onPageClick: string;
12
- 'onpage-click': string;
13
- }>;
14
- };
15
- export default _default;
16
- export type Story = StoryObj<typeof Pagination>;
17
- export declare const BasicPagination: Story;
18
- export declare const MiddlePageSelected: Story;
19
- export declare const LastPageSelected: Story;
20
- export declare const ManyPagesWithLimitedVisible: Story;
21
- export declare const SinglePage: Story;
@@ -1,45 +0,0 @@
1
- import React from 'react';
2
- import { Pagination } from './react';
3
- export default {
4
- title: 'Navigation/Pagination',
5
- render(args) {
6
- return React.createElement(Pagination, { ...args });
7
- },
8
- component: Pagination,
9
- };
10
- export const BasicPagination = {
11
- args: {
12
- currentPageNumber: 1,
13
- pages: 5,
14
- baseUrl: '/search?page=',
15
- },
16
- };
17
- export const MiddlePageSelected = {
18
- args: {
19
- currentPageNumber: 3,
20
- pages: 7,
21
- baseUrl: '/search?page=',
22
- },
23
- };
24
- export const LastPageSelected = {
25
- args: {
26
- currentPageNumber: 10,
27
- pages: 10,
28
- baseUrl: '/search?page=',
29
- },
30
- };
31
- export const ManyPagesWithLimitedVisible = {
32
- args: {
33
- currentPageNumber: 15,
34
- pages: 50,
35
- visiblePages: 5,
36
- baseUrl: '/search?page=',
37
- },
38
- };
39
- export const SinglePage = {
40
- args: {
41
- currentPageNumber: 1,
42
- pages: 1,
43
- baseUrl: '/search?page=',
44
- },
45
- };
@@ -1,14 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
- import type { WarpPagination } from './index.js';
3
- import './index.js';
4
- declare const args: Partial<WarpPagination> & {
5
- [key: string]: any;
6
- };
7
- declare const meta: Meta<typeof args>;
8
- export default meta;
9
- type Story = StoryObj<typeof args>;
10
- export declare const BasicPagination: Story;
11
- export declare const MiddlePageSelected: Story;
12
- export declare const LastPageSelected: Story;
13
- export declare const ManyPagesWithLimitedVisible: Story;
14
- export declare const SinglePage: Story;
@@ -1,56 +0,0 @@
1
- import { spread } from '@open-wc/lit-helpers';
2
- import { getStorybookHelpers } from '@wc-toolkit/storybook-helpers';
3
- import { html } from 'lit';
4
- import { prespread } from '../../.storybook/utilities.js';
5
- import './index.js';
6
- const { events, args, argTypes } = getStorybookHelpers('w-pagination');
7
- const meta = {
8
- title: 'Navigation/Pagination',
9
- render(args) {
10
- return html `<w-pagination ${spread(prespread(args))}></w-pagination>`;
11
- },
12
- args,
13
- argTypes,
14
- parameters: {
15
- actions: {
16
- handles: events,
17
- },
18
- },
19
- };
20
- export default meta;
21
- export const BasicPagination = {
22
- args: {
23
- 'current-page-number': 1,
24
- pages: 5,
25
- 'base-url': '/search?page=',
26
- },
27
- };
28
- export const MiddlePageSelected = {
29
- args: {
30
- 'current-page-number': 3,
31
- pages: 7,
32
- 'base-url': '/search?page=',
33
- },
34
- };
35
- export const LastPageSelected = {
36
- args: {
37
- 'current-page-number': 10,
38
- pages: 10,
39
- 'base-url': '/search?page=',
40
- },
41
- };
42
- export const ManyPagesWithLimitedVisible = {
43
- args: {
44
- 'current-page-number': 15,
45
- pages: 50,
46
- 'visible-pages': 5,
47
- 'base-url': '/search?page=',
48
- },
49
- };
50
- export const SinglePage = {
51
- args: {
52
- 'current-page-number': 1,
53
- pages: 1,
54
- 'base-url': '/search?page=',
55
- },
56
- };
@@ -1 +0,0 @@
1
- import './index.js';
@@ -1,76 +0,0 @@
1
- import { userEvent } from '@vitest/browser/context';
2
- import { html } from 'lit';
3
- import { expect, test, vi } from 'vitest';
4
- import { render } from 'vitest-browser-lit';
5
- import './index.js';
6
- test('current page is the active page', async () => {
7
- const component = html `<w-pagination current-page="5" pages="10" base-url="/page/"></w-pagination>`;
8
- const page = render(component);
9
- await expect.element(page.getByLabelText('Page 5')).toBeInTheDocument();
10
- await expect.element(page.getByLabelText('Page 5')).toHaveAttribute('aria-current', 'page');
11
- });
12
- test('limits the number of displayed pages', async () => {
13
- const component = html `<w-pagination current-page="10" pages="20" visible-pages="5" base-url="/page/"></w-pagination>`;
14
- const page = render(component);
15
- await expect.poll(() => page.getByRole('link').and(page.getByLabelText('Page ')).all()).toHaveLength(5);
16
- });
17
- test('shows link to first page if current page is page 3 or beyond', async () => {
18
- const component = html `<w-pagination current-page="10" pages="20" base-url="/page/"></w-pagination>`;
19
- const page = render(component);
20
- await expect.poll(() => page.getByText('First page')).toBeInTheDocument();
21
- });
22
- test('does not show link to first page if current page is page 1 or 2', async () => {
23
- for (let i = 1; i <= 2; i++) {
24
- const component = html `<w-pagination current-page="${i}" pages="20" base-url="/page/"></w-pagination>`;
25
- const page = render(component);
26
- await expect.poll(() => page.getByText('First page').query()).not.toBeInTheDocument();
27
- }
28
- });
29
- test('shows link to previous page if current page is page 2 or beyond', async () => {
30
- const component = html `<w-pagination current-page="10" pages="20" base-url="/page/"></w-pagination>`;
31
- const page = render(component);
32
- await expect.poll(() => page.getByText('Previous page')).toBeInTheDocument();
33
- });
34
- test('does not show link to previous page if current page is the first page', async () => {
35
- const component = html `<w-pagination current-page="1" pages="20" base-url="/page/"></w-pagination>`;
36
- const page = render(component);
37
- await expect.poll(() => page.getByText('Previous page').query()).not.toBeInTheDocument();
38
- });
39
- test('shows link to next page', async () => {
40
- const component = html `<w-pagination current-page="15" pages="20" base-url="/page/"></w-pagination>`;
41
- const page = render(component);
42
- await expect.poll(() => page.getByText('Next page').query()).toBeInTheDocument();
43
- });
44
- test('does not show link to next page if current page is the last page', async () => {
45
- const component = html `<w-pagination current-page="20" pages="20" base-url="/page/"></w-pagination>`;
46
- const page = render(component);
47
- await expect.poll(() => page.getByText('Next page').query()).not.toBeInTheDocument();
48
- });
49
- test('is able to get the correct data-page-number attribute from the element on click', async () => {
50
- const component = html `<w-pagination current-page="15" pages="20" base-url="/page/" data-testid="pagination"></w-pagination>`;
51
- const page = render(component);
52
- await expect.poll(() => page.getByText('14').query()).toBeInTheDocument();
53
- let clickedPage = null;
54
- page
55
- .getByTestId('pagination')
56
- .element()
57
- .addEventListener('click', (e) => {
58
- e.preventDefault();
59
- });
60
- page
61
- .getByTestId('pagination')
62
- .element()
63
- .addEventListener('page-click', (e) => {
64
- clickedPage = e.detail.clickedPage;
65
- });
66
- const element = page.getByLabelText('page 14');
67
- await userEvent.click(element);
68
- await vi.waitFor(() => {
69
- if (clickedPage === null) {
70
- throw new Error('clickedPage was not set');
71
- }
72
- }, {
73
- interval: 100,
74
- });
75
- expect(clickedPage).toEqual('14');
76
- });
@@ -1,5 +0,0 @@
1
- import { WarpPagination } from './index.js';
2
- export declare const Pagination: import("@lit/react").ReactWebComponent<WarpPagination, {
3
- onPageClick: string;
4
- 'onpage-click': string;
5
- }>;
@@ -1,2 +0,0 @@
1
- import { css } from 'lit';
2
- export const styles = css `*,:before,:after{--w-rotate:0;--w-rotate-x:0;--w-rotate-y:0;--w-rotate-z:0;--w-scale-x:1;--w-scale-y:1;--w-scale-z:1;--w-skew-x:0;--w-skew-y:0;--w-translate-x:0;--w-translate-y:0;--w-translate-z:0}.hover\\:bg-clip-padding:hover{-webkit-background-clip:padding-box;background-clip:padding-box}.hover\\:bg-\\[--w-color-button-pill-background-hover\\]:hover{background-color:var(--w-color-button-pill-background-hover)}.active\\:bg-\\[--w-color-button-pill-background-active\\]:active{background-color:var(--w-color-button-pill-background-active)}.border-0{border-width:0}.rounded-full{border-radius:9999px}.flex{display:flex}.inline-flex{display:inline-flex}.hover\\:no-underline:hover,.focus\\:no-underline:focus{text-decoration:none}.focusable:focus{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:focus-visible{outline:2px solid var(--w-s-color-border-focus);outline-offset:var(--w-outline-offset,1px)}.focusable:not(:focus-visible){outline:none}.items-center{align-items:center}.justify-center{justify-content:center}.static{position:static}.s-bg-primary{background-color:var(--w-s-color-background-primary)}.s-text-inverted{color:var(--w-s-color-text-inverted)}.s-text-link{color:var(--w-s-color-text-link)}.s-icon{color:var(--w-s-color-icon)}.min-h-\\[44px\\]{min-height:44px}.min-w-\\[44px\\]{min-width:44px}.p-4{padding:.4rem}.p-8{padding:.8rem}.visible{visibility:visible}.pointer-events-none{pointer-events:none}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-duration:.15s;transition-timing-function:cubic-bezier(.4,0,.2,1)}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}`;