@warp-ds/elements 2.2.0-next.2 → 2.2.0-next.21

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 (516) hide show
  1. package/README.md +228 -28
  2. package/dist/.storybook/utilities.d.ts +28 -0
  3. package/dist/.storybook/utilities.js +52 -0
  4. package/dist/api.js +1 -49
  5. package/dist/api.js.map +4 -4
  6. package/dist/custom-elements.json +7146 -0
  7. package/dist/index.d.ts +1847 -18
  8. package/dist/packages/affix/affix.react.stories.d.ts +9 -0
  9. package/dist/packages/affix/affix.react.stories.js +10 -0
  10. package/dist/packages/affix/affix.stories.d.ts +10 -0
  11. package/dist/packages/affix/affix.stories.js +25 -0
  12. package/dist/packages/affix/affix.test.d.ts +1 -0
  13. package/dist/packages/affix/affix.test.js +9 -0
  14. package/dist/packages/affix/index.d.ts +47 -24
  15. package/dist/packages/affix/index.js +2448 -2240
  16. package/dist/packages/affix/index.js.map +4 -4
  17. package/dist/packages/affix/react.d.ts +2 -0
  18. package/dist/packages/affix/react.js +15 -0
  19. package/dist/packages/affix/styles.d.ts +1 -0
  20. package/dist/packages/affix/styles.js +2 -0
  21. package/dist/packages/alert/alert.react.stories.d.ts +13 -0
  22. package/dist/packages/alert/alert.react.stories.js +44 -0
  23. package/dist/packages/alert/alert.stories.d.ts +15 -0
  24. package/dist/packages/alert/alert.stories.js +68 -0
  25. package/dist/packages/alert/alert.test.d.ts +1 -0
  26. package/dist/packages/alert/alert.test.js +18 -0
  27. package/dist/packages/alert/index.d.ts +21 -16
  28. package/dist/packages/alert/index.js +2452 -2446
  29. package/dist/packages/alert/index.js.map +4 -4
  30. package/dist/packages/alert/react.d.ts +2 -0
  31. package/dist/packages/alert/react.js +11 -0
  32. package/dist/packages/alert/styles.d.ts +1 -0
  33. package/dist/packages/alert/styles.js +2 -0
  34. package/dist/packages/attention/attention.react.stories.d.ts +15 -0
  35. package/dist/packages/attention/attention.react.stories.js +92 -0
  36. package/dist/packages/attention/attention.stories.d.ts +15 -0
  37. package/dist/packages/attention/attention.stories.js +173 -0
  38. package/dist/packages/attention/attention.test.d.ts +1 -0
  39. package/dist/packages/attention/attention.test.js +11 -0
  40. package/dist/packages/attention/index.d.ts +62 -89
  41. package/dist/packages/attention/index.js +3521 -3924
  42. package/dist/packages/attention/index.js.map +4 -4
  43. package/dist/packages/attention/layout-styles.d.ts +1 -0
  44. package/dist/packages/attention/layout-styles.js +905 -0
  45. package/dist/packages/attention/locales/da/messages.mjs +1 -0
  46. package/dist/packages/attention/locales/en/messages.mjs +1 -0
  47. package/dist/packages/attention/locales/fi/messages.mjs +1 -0
  48. package/dist/packages/attention/locales/nb/messages.mjs +1 -0
  49. package/dist/packages/attention/locales/sv/messages.mjs +1 -0
  50. package/dist/packages/attention/react.d.ts +15 -0
  51. package/dist/packages/attention/react.js +17 -0
  52. package/dist/packages/attention/styles.d.ts +1 -0
  53. package/dist/packages/attention/styles.js +2 -0
  54. package/dist/packages/badge/badge.react.stories.d.ts +18 -0
  55. package/dist/packages/badge/badge.react.stories.js +60 -0
  56. package/dist/packages/badge/badge.stories.d.ts +17 -0
  57. package/dist/packages/badge/badge.stories.js +68 -0
  58. package/dist/packages/badge/badge.test.d.ts +1 -0
  59. package/dist/packages/badge/badge.test.js +9 -0
  60. package/dist/packages/badge/index.d.ts +12 -11
  61. package/dist/packages/badge/index.js +2441 -300
  62. package/dist/packages/badge/index.js.map +4 -4
  63. package/dist/packages/badge/react.d.ts +2 -0
  64. package/dist/packages/badge/react.js +11 -0
  65. package/dist/packages/badge/styles.d.ts +1 -0
  66. package/dist/packages/badge/styles.js +2 -0
  67. package/dist/packages/box/box.react.stories.d.ts +15 -0
  68. package/dist/packages/box/box.react.stories.js +45 -0
  69. package/dist/packages/box/box.stories.d.ts +14 -0
  70. package/dist/packages/box/box.stories.js +59 -0
  71. package/dist/packages/box/box.test.d.ts +1 -0
  72. package/dist/packages/box/box.test.js +9 -0
  73. package/dist/packages/box/index.d.ts +17 -20
  74. package/dist/packages/box/index.js +2443 -299
  75. package/dist/packages/box/index.js.map +4 -4
  76. package/dist/packages/box/react.d.ts +2 -0
  77. package/dist/packages/box/react.js +11 -0
  78. package/dist/packages/box/slot.test.d.ts +1 -0
  79. package/dist/packages/box/slot.test.js +9 -0
  80. package/dist/packages/box/styles.d.ts +1 -0
  81. package/dist/packages/box/styles.js +2 -0
  82. package/dist/packages/breadcrumbs/breadcrumbs.react.stories.d.ts +13 -0
  83. package/dist/packages/breadcrumbs/breadcrumbs.react.stories.js +40 -0
  84. package/dist/packages/breadcrumbs/breadcrumbs.stories.d.ts +12 -0
  85. package/dist/packages/breadcrumbs/breadcrumbs.stories.js +60 -0
  86. package/dist/packages/breadcrumbs/breadcrumbs.test.d.ts +1 -0
  87. package/dist/packages/breadcrumbs/breadcrumbs.test.js +16 -0
  88. package/dist/packages/breadcrumbs/index.d.ts +19 -16
  89. package/dist/packages/breadcrumbs/index.js +2402 -2051
  90. package/dist/packages/breadcrumbs/index.js.map +4 -4
  91. package/dist/packages/breadcrumbs/locales/da/messages.mjs +1 -0
  92. package/dist/packages/breadcrumbs/locales/en/messages.mjs +1 -0
  93. package/dist/packages/breadcrumbs/locales/fi/messages.mjs +1 -0
  94. package/dist/packages/breadcrumbs/locales/nb/messages.mjs +1 -0
  95. package/dist/packages/breadcrumbs/locales/sv/messages.mjs +1 -0
  96. package/dist/packages/breadcrumbs/react.d.ts +2 -0
  97. package/dist/packages/breadcrumbs/react.js +11 -0
  98. package/dist/packages/breadcrumbs/styles.d.ts +1 -0
  99. package/dist/packages/breadcrumbs/styles.js +2 -0
  100. package/dist/packages/button/button.react.stories.d.ts +22 -0
  101. package/dist/packages/button/button.react.stories.js +102 -0
  102. package/dist/packages/button/button.stories.d.ts +21 -0
  103. package/dist/packages/button/button.stories.js +119 -0
  104. package/dist/packages/button/button.test.d.ts +1 -0
  105. package/dist/packages/button/button.test.js +25 -0
  106. package/dist/packages/button/index.d.ts +106 -56
  107. package/dist/packages/button/index.js +2618 -2130
  108. package/dist/packages/button/index.js.map +4 -4
  109. package/dist/packages/button/locales/da/messages.mjs +1 -0
  110. package/dist/packages/button/locales/en/messages.mjs +1 -0
  111. package/dist/packages/button/locales/fi/messages.mjs +1 -0
  112. package/dist/packages/button/locales/nb/messages.mjs +1 -0
  113. package/dist/packages/button/locales/sv/messages.mjs +1 -0
  114. package/dist/packages/button/react.d.ts +2 -0
  115. package/dist/packages/button/react.js +11 -0
  116. package/dist/packages/button/styles.d.ts +1 -0
  117. package/dist/packages/button/styles.js +2 -0
  118. package/dist/packages/card/card.react.stories.d.ts +16 -0
  119. package/dist/packages/card/card.react.stories.js +63 -0
  120. package/dist/packages/card/card.stories.d.ts +15 -0
  121. package/dist/packages/card/card.stories.js +82 -0
  122. package/dist/packages/card/card.test.d.ts +1 -0
  123. package/dist/packages/card/card.test.js +9 -0
  124. package/dist/packages/card/index.d.ts +27 -15
  125. package/dist/packages/card/index.js +2403 -2067
  126. package/dist/packages/card/index.js.map +4 -4
  127. package/dist/packages/card/locales/da/messages.mjs +1 -0
  128. package/dist/packages/card/locales/en/messages.mjs +1 -0
  129. package/dist/packages/card/locales/fi/messages.mjs +1 -0
  130. package/dist/packages/card/locales/nb/messages.mjs +1 -0
  131. package/dist/packages/card/locales/sv/messages.mjs +1 -0
  132. package/dist/packages/card/react.d.ts +2 -0
  133. package/dist/packages/card/react.js +11 -0
  134. package/dist/packages/card/styles.d.ts +1 -0
  135. package/dist/packages/card/styles.js +2 -0
  136. package/dist/packages/combobox/combobox.react.stories.d.ts +28 -0
  137. package/dist/packages/combobox/combobox.react.stories.js +90 -0
  138. package/dist/packages/combobox/combobox.stories.d.ts +18 -0
  139. package/dist/packages/combobox/combobox.stories.js +117 -0
  140. package/dist/packages/combobox/index.d.ts +95 -0
  141. package/dist/packages/combobox/index.js +2492 -0
  142. package/dist/packages/combobox/index.js.map +7 -0
  143. package/dist/packages/combobox/locales/da/messages.d.mts +1 -0
  144. package/dist/packages/combobox/locales/da/messages.mjs +1 -0
  145. package/dist/packages/combobox/locales/en/messages.d.mts +1 -0
  146. package/dist/packages/combobox/locales/en/messages.mjs +1 -0
  147. package/dist/packages/combobox/locales/fi/messages.d.mts +1 -0
  148. package/dist/packages/combobox/locales/fi/messages.mjs +1 -0
  149. package/dist/packages/combobox/locales/nb/messages.d.mts +1 -0
  150. package/dist/packages/combobox/locales/nb/messages.mjs +1 -0
  151. package/dist/packages/combobox/locales/sv/messages.d.mts +1 -0
  152. package/dist/packages/combobox/locales/sv/messages.mjs +1 -0
  153. package/dist/packages/combobox/react.d.ts +7 -0
  154. package/dist/packages/combobox/react.js +17 -0
  155. package/dist/packages/combobox/styles.d.ts +1 -0
  156. package/dist/packages/combobox/styles.js +2 -0
  157. package/dist/packages/datepicker/DatePicker.test.d.ts +2 -0
  158. package/dist/packages/datepicker/DatePicker.test.js +69 -0
  159. package/dist/packages/datepicker/datepicker.d.ts +102 -0
  160. package/dist/packages/datepicker/datepicker.js +2785 -0
  161. package/dist/packages/datepicker/datepicker.js.map +7 -0
  162. package/dist/packages/datepicker/datepicker.react.stories.d.ts +18 -0
  163. package/dist/packages/datepicker/datepicker.react.stories.js +26 -0
  164. package/dist/packages/datepicker/datepicker.stories.d.ts +12 -0
  165. package/dist/packages/datepicker/datepicker.stories.js +51 -0
  166. package/dist/packages/datepicker/datepicker.test.d.ts +2 -0
  167. package/dist/packages/datepicker/datepicker.test.js +62 -0
  168. package/dist/packages/datepicker/index.d.ts +1 -0
  169. package/dist/packages/datepicker/index.js +2785 -0
  170. package/dist/packages/datepicker/index.js.map +7 -0
  171. package/dist/packages/datepicker/locales/da/messages.d.mts +1 -0
  172. package/dist/packages/datepicker/locales/da/messages.mjs +1 -0
  173. package/dist/packages/datepicker/locales/en/messages.d.mts +1 -0
  174. package/dist/packages/datepicker/locales/en/messages.mjs +1 -0
  175. package/dist/packages/datepicker/locales/fi/messages.d.mts +1 -0
  176. package/dist/packages/datepicker/locales/fi/messages.mjs +1 -0
  177. package/dist/packages/datepicker/locales/nb/messages.d.mts +1 -0
  178. package/dist/packages/datepicker/locales/nb/messages.mjs +1 -0
  179. package/dist/packages/datepicker/locales/sv/messages.d.mts +1 -0
  180. package/dist/packages/datepicker/locales/sv/messages.mjs +1 -0
  181. package/dist/packages/datepicker/react.d.ts +5 -0
  182. package/dist/packages/datepicker/react.js +15 -0
  183. package/dist/packages/datepicker/styles/w-datepicker-calendar.styles.d.ts +1 -0
  184. package/dist/packages/datepicker/styles/w-datepicker-calendar.styles.js +15 -0
  185. package/dist/packages/datepicker/styles/w-datepicker-day.styles.d.ts +1 -0
  186. package/dist/packages/datepicker/styles/w-datepicker-day.styles.js +64 -0
  187. package/dist/packages/datepicker/styles/w-datepicker-month.styles.d.ts +1 -0
  188. package/dist/packages/datepicker/styles/w-datepicker-month.styles.js +72 -0
  189. package/dist/packages/datepicker/styles/w-datepicker.styles.d.ts +1 -0
  190. package/dist/packages/datepicker/styles/w-datepicker.styles.js +101 -0
  191. package/dist/packages/datepicker/utils.d.ts +13 -0
  192. package/dist/packages/datepicker/utils.js +28 -0
  193. package/dist/packages/dead-toggle/dead-toggle.react.stories.d.ts +15 -0
  194. package/dist/packages/dead-toggle/dead-toggle.react.stories.js +34 -0
  195. package/dist/packages/dead-toggle/dead-toggle.stories.d.ts +14 -0
  196. package/dist/packages/dead-toggle/dead-toggle.stories.js +45 -0
  197. package/dist/packages/dead-toggle/dead-toggle.test.d.ts +1 -0
  198. package/dist/packages/dead-toggle/dead-toggle.test.js +9 -0
  199. package/dist/packages/dead-toggle/index.d.ts +16 -0
  200. package/dist/packages/dead-toggle/index.js +2487 -0
  201. package/dist/packages/dead-toggle/index.js.map +7 -0
  202. package/dist/packages/dead-toggle/react.d.ts +2 -0
  203. package/dist/packages/dead-toggle/react.js +11 -0
  204. package/dist/packages/expandable/expandable.react.stories.d.ts +18 -0
  205. package/dist/packages/expandable/expandable.react.stories.js +103 -0
  206. package/dist/packages/expandable/expandable.stories.d.ts +19 -0
  207. package/dist/packages/expandable/expandable.stories.js +133 -0
  208. package/dist/packages/expandable/expandable.test.d.ts +1 -0
  209. package/dist/packages/expandable/expandable.test.js +24 -0
  210. package/dist/packages/expandable/index.d.ts +52 -50
  211. package/dist/packages/expandable/index.js +2424 -2286
  212. package/dist/packages/expandable/index.js.map +4 -4
  213. package/dist/packages/expandable/react.d.ts +2 -0
  214. package/dist/packages/expandable/react.js +11 -0
  215. package/dist/packages/expandable/styles.d.ts +1 -0
  216. package/dist/packages/expandable/styles.js +2 -0
  217. package/dist/packages/i18n.js +45 -0
  218. package/dist/packages/link/index.d.ts +34 -0
  219. package/dist/packages/link/index.js +2646 -0
  220. package/dist/packages/link/index.js.map +7 -0
  221. package/dist/packages/link/link.react.stories.d.ts +21 -0
  222. package/dist/packages/link/link.react.stories.js +96 -0
  223. package/dist/packages/link/link.stories.d.ts +20 -0
  224. package/dist/packages/link/link.stories.js +110 -0
  225. package/dist/packages/link/link.test.d.ts +1 -0
  226. package/dist/packages/link/link.test.js +9 -0
  227. package/dist/packages/link/react.d.ts +2 -0
  228. package/dist/packages/link/react.js +11 -0
  229. package/dist/packages/link/styles.d.ts +1 -0
  230. package/dist/packages/link/styles.js +200 -0
  231. package/dist/packages/modal/index.d.ts +4 -5
  232. package/dist/packages/modal/index.js +2649 -2575
  233. package/dist/packages/modal/index.js.map +4 -4
  234. package/dist/packages/modal/locales/da/messages.mjs +1 -0
  235. package/dist/packages/modal/locales/en/messages.mjs +1 -0
  236. package/dist/packages/modal/locales/fi/messages.mjs +1 -0
  237. package/dist/packages/modal/locales/nb/messages.mjs +1 -0
  238. package/dist/packages/modal/locales/sv/messages.mjs +1 -0
  239. package/dist/packages/modal/modal-footer.d.ts +13 -11
  240. package/dist/packages/modal/modal-footer.js +2460 -0
  241. package/dist/packages/modal/modal-footer.js.map +7 -0
  242. package/dist/packages/modal/modal-header.d.ts +25 -31
  243. package/dist/packages/modal/modal-header.js +2584 -0
  244. package/dist/packages/modal/modal-header.js.map +7 -0
  245. package/dist/packages/modal/modal-main.d.ts +27 -31
  246. package/dist/packages/modal/modal-main.js +2572 -0
  247. package/dist/packages/modal/modal-main.js.map +7 -0
  248. package/dist/packages/modal/modal.react.stories.d.ts +14 -0
  249. package/dist/packages/modal/modal.react.stories.js +27 -0
  250. package/dist/packages/modal/modal.stories.d.ts +19 -0
  251. package/dist/packages/modal/modal.stories.js +160 -0
  252. package/dist/packages/modal/react.d.ts +12 -0
  253. package/dist/packages/modal/react.js +31 -0
  254. package/dist/packages/modal/util.d.ts +7 -17
  255. package/dist/packages/modal/util.js +21 -0
  256. package/dist/packages/pageindicator/index.d.ts +10 -0
  257. package/dist/packages/pageindicator/index.js +32 -0
  258. package/dist/packages/pageindicator/index.js.map +7 -0
  259. package/dist/packages/pageindicator/pageindicator.react.stories.d.ts +19 -0
  260. package/dist/packages/pageindicator/pageindicator.react.stories.js +20 -0
  261. package/dist/packages/pageindicator/pageindicator.stories.d.ts +32 -0
  262. package/dist/packages/pageindicator/pageindicator.stories.js +71 -0
  263. package/dist/packages/pageindicator/react.d.ts +2 -0
  264. package/dist/packages/pageindicator/react.js +11 -0
  265. package/dist/packages/pageindicator/style.d.ts +1 -0
  266. package/dist/packages/pageindicator/style.js +26 -0
  267. package/dist/packages/pagination/index.d.ts +32 -0
  268. package/dist/packages/pagination/index.js +2500 -0
  269. package/dist/packages/pagination/index.js.map +7 -0
  270. package/dist/packages/pagination/locales/da/messages.d.mts +1 -0
  271. package/dist/packages/pagination/locales/da/messages.mjs +1 -0
  272. package/dist/packages/pagination/locales/en/messages.d.mts +1 -0
  273. package/dist/packages/pagination/locales/en/messages.mjs +1 -0
  274. package/dist/packages/pagination/locales/fi/messages.d.mts +1 -0
  275. package/dist/packages/pagination/locales/fi/messages.mjs +1 -0
  276. package/dist/packages/pagination/locales/nb/messages.d.mts +1 -0
  277. package/dist/packages/pagination/locales/nb/messages.mjs +1 -0
  278. package/dist/packages/pagination/locales/sv/messages.d.mts +1 -0
  279. package/dist/packages/pagination/locales/sv/messages.mjs +1 -0
  280. package/dist/packages/pagination/pagination.react.stories.d.ts +21 -0
  281. package/dist/packages/pagination/pagination.react.stories.js +45 -0
  282. package/dist/packages/pagination/pagination.stories.d.ts +14 -0
  283. package/dist/packages/pagination/pagination.stories.js +56 -0
  284. package/dist/packages/pagination/pagination.test.d.ts +1 -0
  285. package/dist/packages/pagination/pagination.test.js +76 -0
  286. package/dist/packages/pagination/react.d.ts +5 -0
  287. package/dist/packages/pagination/react.js +15 -0
  288. package/dist/packages/pagination/styles.d.ts +1 -0
  289. package/dist/packages/pagination/styles.js +2 -0
  290. package/dist/packages/pill/index.d.ts +39 -23
  291. package/dist/packages/pill/index.js +2408 -2175
  292. package/dist/packages/pill/index.js.map +4 -4
  293. package/dist/packages/pill/locales/da/messages.mjs +1 -0
  294. package/dist/packages/pill/locales/en/messages.mjs +1 -0
  295. package/dist/packages/pill/locales/fi/messages.mjs +1 -0
  296. package/dist/packages/pill/locales/nb/messages.mjs +1 -0
  297. package/dist/packages/pill/locales/sv/messages.mjs +1 -0
  298. package/dist/packages/pill/pill.react.stories.d.ts +23 -0
  299. package/dist/packages/pill/pill.react.stories.js +22 -0
  300. package/dist/packages/pill/pill.stories.d.ts +12 -0
  301. package/dist/packages/pill/pill.stories.js +33 -0
  302. package/dist/packages/pill/pill.test.d.ts +1 -0
  303. package/dist/packages/pill/pill.test.js +25 -0
  304. package/dist/packages/pill/react.d.ts +7 -0
  305. package/dist/packages/pill/react.js +17 -0
  306. package/dist/packages/pill/styles.d.ts +1 -0
  307. package/dist/packages/pill/styles.js +2 -0
  308. package/dist/packages/rip-and-tear-checkbox/checkbox.d.ts +64 -0
  309. package/dist/packages/rip-and-tear-checkbox/checkbox.js +160 -0
  310. package/dist/packages/rip-and-tear-checkbox/checkbox.js.map +7 -0
  311. package/dist/packages/rip-and-tear-checkbox/checkbox.stories.d.ts +8 -0
  312. package/dist/packages/rip-and-tear-checkbox/checkbox.stories.js +11 -0
  313. package/dist/packages/rip-and-tear-checkbox/index.d.ts +1 -0
  314. package/dist/packages/rip-and-tear-checkbox/index.js +160 -0
  315. package/dist/packages/rip-and-tear-checkbox/index.js.map +7 -0
  316. package/dist/packages/rip-and-tear-checkbox/react.d.ts +5 -0
  317. package/dist/packages/rip-and-tear-checkbox/react.js +15 -0
  318. package/dist/packages/rip-and-tear-checkbox/rip-and-tear-checkbox.react.stories.d.ts +12 -0
  319. package/dist/packages/rip-and-tear-checkbox/rip-and-tear-checkbox.react.stories.js +10 -0
  320. package/dist/packages/rip-and-tear-checkbox/styles.d.ts +1 -0
  321. package/dist/packages/rip-and-tear-checkbox/styles.js +116 -0
  322. package/dist/packages/rip-and-tear-radio/base-element.d.ts +46 -0
  323. package/dist/packages/rip-and-tear-radio/base-element.js +100 -0
  324. package/dist/packages/rip-and-tear-radio/custom-error-validator.d.ts +6 -0
  325. package/dist/packages/rip-and-tear-radio/custom-error-validator.js +22 -0
  326. package/dist/packages/rip-and-tear-radio/form-associated-element.d.ts +103 -0
  327. package/dist/packages/rip-and-tear-radio/form-associated-element.js +282 -0
  328. package/dist/packages/rip-and-tear-radio/host-styles.d.ts +1 -0
  329. package/dist/packages/rip-and-tear-radio/host-styles.js +12 -0
  330. package/dist/packages/rip-and-tear-radio/index.d.ts +1 -0
  331. package/dist/packages/rip-and-tear-radio/index.js +270 -0
  332. package/dist/packages/rip-and-tear-radio/index.js.map +7 -0
  333. package/dist/packages/rip-and-tear-radio/invalid.d.ts +8 -0
  334. package/dist/packages/rip-and-tear-radio/invalid.js +5 -0
  335. package/dist/packages/rip-and-tear-radio/math.d.ts +1 -0
  336. package/dist/packages/rip-and-tear-radio/math.js +4 -0
  337. package/dist/packages/rip-and-tear-radio/radio-group-styles.d.ts +1 -0
  338. package/dist/packages/rip-and-tear-radio/radio-group-styles.js +60 -0
  339. package/dist/packages/rip-and-tear-radio/radio-group-styles.js.map +7 -0
  340. package/dist/packages/rip-and-tear-radio/radio-group.d.ts +72 -0
  341. package/dist/packages/rip-and-tear-radio/radio-group.js +270 -0
  342. package/dist/packages/rip-and-tear-radio/radio-group.js.map +7 -0
  343. package/dist/packages/rip-and-tear-radio/radio-styles.d.ts +1 -0
  344. package/dist/packages/rip-and-tear-radio/radio-styles.js +170 -0
  345. package/dist/packages/rip-and-tear-radio/radio-styles.js.map +7 -0
  346. package/dist/packages/rip-and-tear-radio/radio.d.ts +38 -0
  347. package/dist/packages/rip-and-tear-radio/radio.js +183 -0
  348. package/dist/packages/rip-and-tear-radio/radio.js.map +7 -0
  349. package/dist/packages/rip-and-tear-radio/radio.stories.d.ts +8 -0
  350. package/dist/packages/rip-and-tear-radio/radio.stories.js +275 -0
  351. package/dist/packages/rip-and-tear-radio/radio.stories.js.map +7 -0
  352. package/dist/packages/rip-and-tear-radio/react.d.ts +9 -0
  353. package/dist/packages/rip-and-tear-radio/react.js +22 -0
  354. package/dist/packages/rip-and-tear-radio/required-validator.d.ts +11 -0
  355. package/dist/packages/rip-and-tear-radio/required-validator.js +34 -0
  356. package/dist/packages/rip-and-tear-radio/rip-and-tear-radio.react.stories.d.ts +9 -0
  357. package/dist/packages/rip-and-tear-radio/rip-and-tear-radio.react.stories.js +10 -0
  358. package/dist/packages/rip-and-tear-radio/slot.d.ts +20 -0
  359. package/dist/packages/rip-and-tear-radio/slot.js +71 -0
  360. package/dist/packages/rip-and-tear-radio/watch.d.ts +26 -0
  361. package/dist/packages/rip-and-tear-radio/watch.js +39 -0
  362. package/dist/packages/select/index.d.ts +56 -50
  363. package/dist/packages/select/index.js +2421 -2236
  364. package/dist/packages/select/index.js.map +4 -4
  365. package/dist/packages/select/locales/da/messages.mjs +1 -0
  366. package/dist/packages/select/locales/en/messages.mjs +1 -0
  367. package/dist/packages/select/locales/fi/messages.mjs +1 -0
  368. package/dist/packages/select/locales/nb/messages.mjs +1 -0
  369. package/dist/packages/select/locales/sv/messages.mjs +1 -0
  370. package/dist/packages/select/react.d.ts +6 -0
  371. package/dist/packages/select/react.js +20 -0
  372. package/dist/packages/select/select.react.stories.d.ts +18 -0
  373. package/dist/packages/select/select.react.stories.js +28 -0
  374. package/dist/packages/select/select.stories.d.ts +10 -0
  375. package/dist/packages/select/select.stories.js +31 -0
  376. package/dist/packages/select/select.test.d.ts +1 -0
  377. package/dist/packages/select/select.test.js +31 -0
  378. package/dist/packages/select/styles.d.ts +1 -0
  379. package/dist/packages/select/styles.js +2 -0
  380. package/dist/packages/slider/Slider.d.ts +2 -0
  381. package/dist/packages/slider/Slider.js +8 -0
  382. package/dist/packages/slider/SliderThumb.d.ts +2 -0
  383. package/dist/packages/slider/SliderThumb.js +8 -0
  384. package/dist/packages/slider/index.d.ts +2 -0
  385. package/dist/packages/slider/index.js +2791 -0
  386. package/dist/packages/slider/index.js.map +7 -0
  387. package/dist/packages/slider/oddbird-css-anchor-positioning.d.ts +2 -0
  388. package/dist/packages/slider/oddbird-css-anchor-positioning.js +3 -0
  389. package/dist/packages/slider/react.d.ts +8 -0
  390. package/dist/packages/slider/react.js +20 -0
  391. package/dist/packages/slider/slider-thumb.d.ts +57 -0
  392. package/dist/packages/slider/slider-thumb.js +2663 -0
  393. package/dist/packages/slider/slider-thumb.js.map +7 -0
  394. package/dist/packages/slider/slider.d.ts +46 -0
  395. package/dist/packages/slider/slider.js +2569 -0
  396. package/dist/packages/slider/slider.js.map +7 -0
  397. package/dist/packages/slider/slider.react.stories.d.ts +18 -0
  398. package/dist/packages/slider/slider.react.stories.js +119 -0
  399. package/dist/packages/slider/slider.stories.d.ts +17 -0
  400. package/dist/packages/slider/slider.stories.js +203 -0
  401. package/dist/packages/slider/slider.test.d.ts +4 -0
  402. package/dist/packages/slider/slider.test.js +83 -0
  403. package/dist/packages/slider/styles/w-slider-thumb.styles.d.ts +1 -0
  404. package/dist/packages/slider/styles/w-slider-thumb.styles.js +132 -0
  405. package/dist/packages/slider/styles/w-slider.styles.d.ts +1 -0
  406. package/dist/packages/slider/styles/w-slider.styles.js +118 -0
  407. package/dist/packages/slider/styles.d.ts +1 -0
  408. package/dist/packages/slider/styles.js +2 -0
  409. package/dist/packages/steps/index.d.ts +36 -0
  410. package/dist/packages/steps/index.js +2465 -0
  411. package/dist/packages/steps/index.js.map +7 -0
  412. package/dist/packages/steps/locales/da/messages.d.mts +1 -0
  413. package/dist/packages/steps/locales/da/messages.mjs +1 -0
  414. package/dist/packages/steps/locales/en/messages.d.mts +1 -0
  415. package/dist/packages/steps/locales/en/messages.mjs +1 -0
  416. package/dist/packages/steps/locales/fi/messages.d.mts +1 -0
  417. package/dist/packages/steps/locales/fi/messages.mjs +1 -0
  418. package/dist/packages/steps/locales/nb/messages.d.mts +1 -0
  419. package/dist/packages/steps/locales/nb/messages.mjs +1 -0
  420. package/dist/packages/steps/locales/sv/messages.d.mts +1 -0
  421. package/dist/packages/steps/locales/sv/messages.mjs +1 -0
  422. package/dist/packages/steps/react.d.ts +3 -0
  423. package/dist/packages/steps/react.js +16 -0
  424. package/dist/packages/steps/steps.react.stories.d.ts +15 -0
  425. package/dist/packages/steps/steps.react.stories.js +112 -0
  426. package/dist/packages/steps/steps.stories.d.ts +12 -0
  427. package/dist/packages/steps/steps.stories.js +172 -0
  428. package/dist/packages/steps/styles.d.ts +1 -0
  429. package/dist/packages/steps/styles.js +2 -0
  430. package/dist/packages/styles.d.ts +2 -0
  431. package/dist/packages/styles.js +2442 -0
  432. package/dist/packages/switch/index.d.ts +15 -0
  433. package/dist/packages/switch/index.js +2455 -0
  434. package/dist/packages/switch/index.js.map +7 -0
  435. package/dist/packages/switch/react.d.ts +5 -0
  436. package/dist/packages/switch/react.js +15 -0
  437. package/dist/packages/switch/styles.d.ts +1 -0
  438. package/dist/packages/switch/styles.js +2 -0
  439. package/dist/packages/switch/switch.react.stories.d.ts +15 -0
  440. package/dist/packages/switch/switch.react.stories.js +29 -0
  441. package/dist/packages/switch/switch.stories.d.ts +9 -0
  442. package/dist/packages/switch/switch.stories.js +34 -0
  443. package/dist/packages/tabs/index.d.ts +4 -0
  444. package/dist/packages/tabs/index.js +2470 -0
  445. package/dist/packages/tabs/index.js.map +7 -0
  446. package/dist/packages/tabs/react.d.ts +12 -0
  447. package/dist/packages/tabs/react.js +31 -0
  448. package/dist/packages/tabs/styles.d.ts +1 -0
  449. package/dist/packages/tabs/styles.js +2 -0
  450. package/dist/packages/tabs/tab-panel.d.ts +20 -0
  451. package/dist/packages/tabs/tab-panel.js +2441 -0
  452. package/dist/packages/tabs/tab-panel.js.map +7 -0
  453. package/dist/packages/tabs/tab.d.ts +18 -0
  454. package/dist/packages/tabs/tab.js +2463 -0
  455. package/dist/packages/tabs/tab.js.map +7 -0
  456. package/dist/packages/tabs/tabs.d.ts +40 -0
  457. package/dist/packages/tabs/tabs.js +2448 -0
  458. package/dist/packages/tabs/tabs.js.map +7 -0
  459. package/dist/packages/tabs/tabs.react.stories.d.ts +15 -0
  460. package/dist/packages/tabs/tabs.react.stories.js +51 -0
  461. package/dist/packages/tabs/tabs.stories.d.ts +8 -0
  462. package/dist/packages/tabs/tabs.stories.js +2545 -0
  463. package/dist/packages/tabs/tabs.stories.js.map +7 -0
  464. package/dist/packages/textfield/index.d.ts +78 -74
  465. package/dist/packages/textfield/index.js +2514 -422
  466. package/dist/packages/textfield/index.js.map +4 -4
  467. package/dist/packages/textfield/react.d.ts +11 -0
  468. package/dist/packages/textfield/react.js +21 -0
  469. package/dist/packages/textfield/styles/w-textfield.styles.d.ts +1 -0
  470. package/dist/packages/textfield/styles/w-textfield.styles.js +46 -0
  471. package/dist/packages/textfield/styles.d.ts +1 -0
  472. package/dist/packages/textfield/styles.js +2 -0
  473. package/dist/packages/textfield/textfield.react.stories.d.ts +37 -0
  474. package/dist/packages/textfield/textfield.react.stories.js +88 -0
  475. package/dist/packages/textfield/textfield.stories.d.ts +18 -0
  476. package/dist/packages/textfield/textfield.stories.js +105 -0
  477. package/dist/packages/textfield/textfield.test.d.ts +2 -0
  478. package/dist/packages/textfield/textfield.test.js +68 -0
  479. package/dist/packages/toast/api.d.ts +4 -45
  480. package/dist/packages/toast/api.js +41 -0
  481. package/dist/packages/toast/index.d.ts +3 -0
  482. package/dist/packages/toast/index.js +2466 -2787
  483. package/dist/packages/toast/index.js.map +4 -4
  484. package/dist/packages/toast/locales/da/messages.mjs +1 -0
  485. package/dist/packages/toast/locales/en/messages.mjs +1 -0
  486. package/dist/packages/toast/locales/fi/messages.mjs +1 -0
  487. package/dist/packages/toast/locales/nb/messages.mjs +1 -0
  488. package/dist/packages/toast/locales/sv/messages.mjs +1 -0
  489. package/dist/packages/toast/styles.d.ts +1 -0
  490. package/dist/packages/toast/styles.js +2 -0
  491. package/dist/packages/toast/toast-container.d.ts +12 -63
  492. package/dist/packages/toast/toast-container.js +2458 -0
  493. package/dist/packages/toast/toast-container.js.map +7 -0
  494. package/dist/packages/toast/toast.d.ts +34 -29
  495. package/dist/packages/toast/toast.js +2466 -0
  496. package/dist/packages/toast/toast.js.map +7 -0
  497. package/dist/packages/toast/toast.stories.d.ts +12 -0
  498. package/dist/packages/toast/toast.stories.js +50 -0
  499. package/dist/packages/toast/types.d.ts +15 -0
  500. package/dist/packages/toast/types.js +1 -0
  501. package/dist/packages/utils/expand-transition.d.ts +3 -2
  502. package/dist/packages/utils/expand-transition.js +59 -0
  503. package/dist/packages/utils/index.d.ts +1 -1
  504. package/dist/packages/utils/index.js +2 -0
  505. package/dist/packages/utils/index.js.map +7 -0
  506. package/dist/packages/utils/unstyled-heading.d.ts +3 -3
  507. package/dist/packages/utils/unstyled-heading.js +22 -0
  508. package/dist/packages/utils/window-exists.js +1 -0
  509. package/dist/setup-tests.d.ts +1 -0
  510. package/dist/setup-tests.js +1 -0
  511. package/dist/vscode.css-custom-data.json +6 -0
  512. package/dist/vscode.html-custom-data.json +738 -0
  513. package/dist/web-types.json +1693 -0
  514. package/package.json +93 -37
  515. package/dist/index.js +0 -6838
  516. package/dist/index.js.map +0 -7
@@ -0,0 +1 @@
1
+ /*eslint-disable*/ export const messages = JSON.parse("{\"breadcrumbs.ariaLabel\":[\"Du er her\"]}");
@@ -0,0 +1 @@
1
+ /*eslint-disable*/ export const messages = JSON.parse("{\"breadcrumbs.ariaLabel\":[\"You are here\"]}");
@@ -0,0 +1 @@
1
+ /*eslint-disable*/ export const messages = JSON.parse("{\"breadcrumbs.ariaLabel\":[\"Olet tässä\"]}");
@@ -0,0 +1 @@
1
+ /*eslint-disable*/ export const messages = JSON.parse("{\"breadcrumbs.ariaLabel\":[\"Her er du\"]}");
@@ -0,0 +1 @@
1
+ /*eslint-disable*/ export const messages = JSON.parse("{\"breadcrumbs.ariaLabel\":[\"Du är här\"]}");
@@ -0,0 +1,2 @@
1
+ import { WarpBreadcrumbs } from '.';
2
+ export declare const Breadcrumbs: import("@lit/react").ReactWebComponent<WarpBreadcrumbs, {}>;
@@ -0,0 +1,11 @@
1
+ import { LitElement } from 'lit';
2
+ import { createComponent } from '@lit/react';
3
+ import React from 'react';
4
+ // decouple from CDN by providing a dummy class
5
+ class Component extends LitElement {
6
+ }
7
+ export const Breadcrumbs = createComponent({
8
+ tagName: 'w-breadcrumbs',
9
+ elementClass: Component,
10
+ react: React,
11
+ });
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,2 @@
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}.flex{display:flex}.static{position:static}.s-text{color:var(--w-s-color-text)}.s-text-link{color:var(--w-s-color-text-link)}.s-icon{color:var(--w-s-color-icon)}.space-x-8>:not([hidden])~:not([hidden]){--w-space-x-reverse:0;margin-left:calc(.8rem*calc(1 - var(--w-space-x-reverse)));margin-right:calc(.8rem*var(--w-space-x-reverse))}.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}.select-none{-webkit-user-select:none;user-select:none}`;
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+ import { StoryObj } from '@storybook/react';
3
+ import { Button } from './react';
4
+ declare const _default: {
5
+ title: string;
6
+ render(args: Omit<React.HTMLAttributes<import(".").WarpButton>, "rel" | "_classes" | "render" | "renderOptions" | "connectedCallback" | "disconnectedCallback" | "renderRoot" | "isUpdatePending" | "hasUpdated" | "addController" | "removeController" | "attributeChangedCallback" | "requestUpdate" | "updateComplete" | "variant" | "form" | "small" | "quiet" | "href" | "target" | "fullWidth" | "buttonClass" | "name" | "type" | "loading" | "value" | "ariaValueTextLoading" | "updated" | "firstUpdated" | "_primaryClasses" | "_secondaryClasses" | "_utilityClasses" | "_negativeClasses" | "_pillClasses" | "_linkClasses" | "_handleButtonClick" | "validationTarget" | "internals" | "showError" | "validationMessage" | "validity" | "validationComplete" | "checkValidity" | "formResetCallback" | "resetFormControl" | "valueChangedCallback" | "validityCallback" | "validationMessageCallback" | "setValue" | "shouldFormValueUpdate"> & {} & Partial<Omit<import(".").WarpButton, keyof HTMLElement>> & React.RefAttributes<import(".").WarpButton>): React.JSX.Element;
7
+ component: import("@lit/react").ReactWebComponent<import(".").WarpButton, {}>;
8
+ };
9
+ export default _default;
10
+ export type Story = StoryObj<typeof Button>;
11
+ export declare const Primary: Story;
12
+ export declare const Secondary: Story;
13
+ export declare const Negative: Story;
14
+ export declare const Utility: Story;
15
+ export declare const Link: Story;
16
+ export declare const Pill: Story;
17
+ export declare const Small: Story;
18
+ export declare const Quiet: Story;
19
+ export declare const Loading: Story;
20
+ export declare const FullWidth: Story;
21
+ export declare const AsLink: Story;
22
+ export declare const FormControl: Story;
@@ -0,0 +1,102 @@
1
+ import React from 'react';
2
+ import { Button } from './react';
3
+ export default {
4
+ title: 'Buttons/Button',
5
+ render(args) {
6
+ return React.createElement(Button, { ...args }, "Button Text");
7
+ },
8
+ component: Button,
9
+ };
10
+ export const Primary = {
11
+ args: {
12
+ variant: 'primary',
13
+ type: 'button',
14
+ },
15
+ };
16
+ export const Secondary = {
17
+ args: {
18
+ variant: 'secondary',
19
+ type: 'button',
20
+ },
21
+ };
22
+ export const Negative = {
23
+ args: {
24
+ variant: 'negative',
25
+ type: 'button',
26
+ },
27
+ };
28
+ export const Utility = {
29
+ args: {
30
+ variant: 'utility',
31
+ type: 'button',
32
+ },
33
+ };
34
+ export const Link = {
35
+ args: {
36
+ variant: 'link',
37
+ type: 'button',
38
+ href: 'https://developer.mozilla.org/en-US/docs/Web/API/Web_components',
39
+ target: '_new',
40
+ },
41
+ };
42
+ export const Pill = {
43
+ args: {
44
+ variant: 'pill',
45
+ type: 'button',
46
+ },
47
+ render(args) {
48
+ return React.createElement(Button, { ...args }, "\uD83D\uDC99");
49
+ },
50
+ };
51
+ export const Small = {
52
+ args: {
53
+ variant: 'primary',
54
+ small: true,
55
+ type: 'button',
56
+ },
57
+ };
58
+ export const Quiet = {
59
+ args: {
60
+ variant: 'secondary',
61
+ quiet: true,
62
+ type: 'button',
63
+ },
64
+ };
65
+ export const Loading = {
66
+ args: {
67
+ variant: 'primary',
68
+ loading: true,
69
+ type: 'button',
70
+ },
71
+ };
72
+ export const FullWidth = {
73
+ args: {
74
+ variant: 'primary',
75
+ fullWidth: true,
76
+ type: 'button',
77
+ },
78
+ render(args) {
79
+ return (React.createElement("div", { className: "w-full flex flex-col gap-8" },
80
+ React.createElement(Button, { ...args }, "Full width")));
81
+ },
82
+ };
83
+ export const AsLink = {
84
+ args: {
85
+ variant: 'primary',
86
+ href: 'https://example.com',
87
+ target: '_blank',
88
+ type: 'button',
89
+ },
90
+ render(args) {
91
+ return React.createElement(Button, { ...args }, "Visit Example");
92
+ },
93
+ };
94
+ export const FormControl = {
95
+ args: {},
96
+ render() {
97
+ return (React.createElement("form", { name: "form-control" },
98
+ React.createElement("input", { type: "text", defaultValue: "I am an input field", name: "demoValue", style: { border: '1px solid lime' } }),
99
+ React.createElement(Button, { type: "reset", name: "resetButton", value: "fooyoo" }, "Reset"),
100
+ React.createElement(Button, { type: "submit", name: "submuitButtton", value: "fooyoo" }, "Send thing")));
101
+ },
102
+ };
@@ -0,0 +1,21 @@
1
+ import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
+ import type { WarpButton } from './index.js';
3
+ import './index.js';
4
+ declare const args: Partial<WarpButton> & {
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 Primary: Story;
11
+ export declare const Secondary: Story;
12
+ export declare const Negative: Story;
13
+ export declare const Utility: Story;
14
+ export declare const Link: Story;
15
+ export declare const Pill: Story;
16
+ export declare const Small: Story;
17
+ export declare const Quiet: Story;
18
+ export declare const Loading: Story;
19
+ export declare const FullWidth: Story;
20
+ export declare const AsLink: Story;
21
+ export declare const FormControl: Story;
@@ -0,0 +1,119 @@
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-button');
7
+ const meta = {
8
+ title: 'Buttons/Button',
9
+ render(args) {
10
+ return html `<w-button ${spread(prespread(args))}>Button Text</w-button>`;
11
+ },
12
+ args,
13
+ argTypes,
14
+ parameters: {
15
+ actions: {
16
+ handles: events,
17
+ },
18
+ },
19
+ };
20
+ export default meta;
21
+ export const Primary = {
22
+ args: {
23
+ variant: 'primary',
24
+ type: 'button',
25
+ },
26
+ };
27
+ export const Secondary = {
28
+ args: {
29
+ variant: 'secondary',
30
+ type: 'button',
31
+ },
32
+ };
33
+ export const Negative = {
34
+ args: {
35
+ variant: 'negative',
36
+ type: 'button',
37
+ },
38
+ };
39
+ export const Utility = {
40
+ args: {
41
+ variant: 'utility',
42
+ type: 'button',
43
+ },
44
+ };
45
+ export const Link = {
46
+ args: {
47
+ variant: 'link',
48
+ type: 'button',
49
+ href: 'https://developer.mozilla.org/en-US/docs/Web/API/Web_components',
50
+ target: '_new',
51
+ },
52
+ };
53
+ export const Pill = {
54
+ args: {
55
+ variant: 'pill',
56
+ type: 'button',
57
+ },
58
+ render(args) {
59
+ return html `<w-button ${spread(prespread(args))}>💙</w-button>`;
60
+ },
61
+ };
62
+ export const Small = {
63
+ args: {
64
+ variant: 'primary',
65
+ small: true,
66
+ type: 'button',
67
+ },
68
+ };
69
+ export const Quiet = {
70
+ args: {
71
+ variant: 'secondary',
72
+ quiet: true,
73
+ type: 'button',
74
+ },
75
+ };
76
+ export const Loading = {
77
+ args: {
78
+ variant: 'primary',
79
+ loading: true,
80
+ type: 'button',
81
+ },
82
+ };
83
+ export const FullWidth = {
84
+ args: {
85
+ variant: 'primary',
86
+ 'full-width': true,
87
+ type: 'button',
88
+ },
89
+ render(args) {
90
+ return html `
91
+ <div class="w-full flex flex-col gap-8">
92
+ <w-button ${spread(prespread(args))}>Full width</w-button>
93
+ </div>
94
+ `;
95
+ },
96
+ };
97
+ export const AsLink = {
98
+ args: {
99
+ variant: 'primary',
100
+ href: 'https://example.com',
101
+ target: '_blank',
102
+ type: 'button',
103
+ },
104
+ render(args) {
105
+ return html `<w-button ${spread(prespread(args))}>Visit Example</w-button>`;
106
+ },
107
+ };
108
+ export const FormControl = {
109
+ args: {},
110
+ render() {
111
+ return html `
112
+ <form name="form-control">
113
+ <input type="text" value="I am an input field" name="demoValue" style="border: 1px solid lime" />
114
+ <w-button type="reset" name="resetButton" value="fooyoo">Reset</w-button>
115
+ <w-button type="submit" name="submuitButtton" value="fooyoo">Send thing</w-button>
116
+ </form>
117
+ `;
118
+ },
119
+ };
@@ -0,0 +1 @@
1
+ import './index.js';
@@ -0,0 +1,25 @@
1
+ import { html } from 'lit';
2
+ import { expect, test, vi } from 'vitest';
3
+ import { render } from 'vitest-browser-lit';
4
+ import './index.js';
5
+ test('renders the slotted label', async () => {
6
+ const component = html `<w-button>This is a button</w-button>`;
7
+ const page = render(component);
8
+ await expect.element(page.getByText('This is a button')).toBeVisible();
9
+ await expect.element(page.getByRole('button')).toBeVisible();
10
+ });
11
+ test('by default button type is button', async () => {
12
+ const component = html `<w-button>This is a button</w-button>`;
13
+ const page = render(component);
14
+ await expect.element(page.getByRole('button')).toHaveAttribute('type', 'button');
15
+ });
16
+ test.todo('works in a form as type submit');
17
+ test.todo('works in a form as type reset');
18
+ test('calling focus on w-button focuses the button inside the shadow root', async () => {
19
+ const component = html `<w-button>This is a button</w-button>`;
20
+ const page = render(component);
21
+ await expect.element(page.getByRole('button')).toBeVisible();
22
+ // @ts-expect-error if we import and type using WarpButton, the test fails which is nonsense so I've opted to simply ignore this error.
23
+ page.container.querySelector('w-button').focus();
24
+ await vi.waitFor(() => page.container.querySelector(':focus').tagName === 'BUTTON');
25
+ });
@@ -1,70 +1,120 @@
1
- declare const WarpButton_base: {
2
- new (): {
3
- [x: string]: any;
4
- };
5
- [x: string]: any;
6
- createProperty(name: any, options: any): void;
1
+ import { LitElement, PropertyValues } from 'lit';
2
+ import '../link';
3
+ type ButtonVariant = 'primary' | 'secondary' | 'negative' | 'utility' | 'pill' | 'link';
4
+ type ButtonType = 'button' | 'submit' | 'reset';
5
+ export declare const ccButton: {
6
+ secondary: string;
7
+ secondaryHref: string;
8
+ secondaryDisabled: string;
9
+ secondarySmall: string;
10
+ secondarySmallDisabled: string;
11
+ secondaryQuiet: string;
12
+ secondaryQuietDisabled: string;
13
+ secondarySmallQuiet: string;
14
+ secondarySmallQuietDisabled: string;
15
+ secondaryLoading: string;
16
+ secondarySmallLoading: string;
17
+ secondarySmallQuietLoading: string;
18
+ secondaryQuietLoading: string;
19
+ primary: string;
20
+ primaryDisabled: string;
21
+ primarySmall: string;
22
+ primarySmallDisabled: string;
23
+ primaryQuiet: string;
24
+ primaryQuietDisabled: string;
25
+ primarySmallQuiet: string;
26
+ primarySmallQuietDisabled: string;
27
+ primaryLoading: string;
28
+ primarySmallLoading: string;
29
+ primarySmallQuietLoading: string;
30
+ primaryQuietLoading: string;
31
+ utility: string;
32
+ utilityDisabled: string;
33
+ utilityQuiet: string;
34
+ utilityQuietDisabled: string;
35
+ utilitySmall: string;
36
+ utilitySmallDisabled: string;
37
+ utilitySmallQuiet: string;
38
+ utilitySmallQuietDisabled: string;
39
+ utilityLoading: string;
40
+ utilitySmallLoading: string;
41
+ utilityQuietLoading: string;
42
+ utilitySmallQuietLoading: string;
43
+ negative: string;
44
+ negativeDisabled: string;
45
+ negativeQuiet: string;
46
+ negativeQuietDisabled: string;
47
+ negativeSmall: string;
48
+ negativeSmallDisabled: string;
49
+ negativeSmallQuiet: string;
50
+ negativeSmallQuietDisabled: string;
51
+ negativeLoading: string;
52
+ negativeSmallLoading: string;
53
+ negativeQuietLoading: string;
54
+ negativeSmallQuietLoading: string;
55
+ pill: string;
56
+ pillSmall: string;
57
+ pillLoading: string;
58
+ pillSmallLoading: string;
59
+ link: string;
60
+ linkSmall: string;
61
+ linkAsButton: string;
62
+ a11y: string;
63
+ fullWidth: string;
64
+ contentWidth: string;
7
65
  };
8
- export class WarpButton extends WarpButton_base {
9
- static shadowRootOptions: any;
10
- static properties: {
11
- type: {
12
- type: number;
13
- reflect: boolean;
14
- };
15
- autofocus: {
16
- type: BooleanConstructor;
17
- reflect: boolean;
18
- };
19
- variant: {
20
- type: StringConstructor;
21
- reflect: boolean;
22
- };
23
- quiet: {
24
- type: BooleanConstructor;
25
- reflect: boolean;
26
- };
27
- small: {
28
- type: BooleanConstructor;
29
- reflect: boolean;
30
- };
31
- loading: {
32
- type: BooleanConstructor;
33
- reflect: boolean;
34
- };
35
- href: {
36
- type: StringConstructor;
37
- reflect: boolean;
38
- };
39
- target: {
40
- type: StringConstructor;
41
- reflect: boolean;
42
- };
43
- rel: {
44
- type: StringConstructor;
45
- reflect: boolean;
46
- };
47
- fullWidth: {
48
- type: BooleanConstructor;
49
- reflect: boolean;
50
- };
51
- buttonClass: {
52
- type: StringConstructor;
53
- reflect: boolean;
54
- };
66
+ declare const WarpButton_base: import("@open-wc/form-control").Constructor<import("@open-wc/form-control").FormControlInterface> & typeof LitElement;
67
+ /**
68
+ * Buttons are used to perform actions, widh different visuals for different needs.
69
+ *
70
+ * [See Storybook for usage examples](https://warp-ds.github.io/elements/?path=/docs/buttons-button--docs)
71
+ */
72
+ declare class WarpButton extends WarpButton_base {
73
+ static shadowRootOptions: {
74
+ delegatesFocus: boolean;
75
+ mode: ShadowRootMode;
76
+ serializable?: boolean;
77
+ slotAssignment?: SlotAssignmentMode;
55
78
  };
56
- static styles: any[];
57
- variant: string;
79
+ type: ButtonType;
80
+ autofocus: boolean;
81
+ variant: ButtonVariant;
82
+ /**
83
+ * @type {boolean}
84
+ */
85
+ quiet: boolean;
86
+ small: boolean;
87
+ loading: boolean;
88
+ href: string;
89
+ target: string;
90
+ rel: string;
91
+ fullWidth: boolean;
92
+ buttonClass: string;
93
+ name: string;
94
+ value: string;
95
+ /** @internal */
58
96
  ariaValueTextLoading: string;
97
+ static styles: import("lit").CSSResult[];
98
+ updated(changedProperties: PropertyValues<this>): void;
99
+ constructor();
59
100
  connectedCallback(): void;
60
101
  firstUpdated(): void;
102
+ /** @internal */
61
103
  get _primaryClasses(): string[];
104
+ /** @internal */
62
105
  get _secondaryClasses(): string[];
106
+ /** @internal */
63
107
  get _utilityClasses(): string[];
108
+ /** @internal */
64
109
  get _negativeClasses(): string[];
110
+ /** @internal */
65
111
  get _pillClasses(): string[];
112
+ /** @internal */
66
113
  get _linkClasses(): string[];
114
+ /** @internal */
67
115
  get _classes(): string;
116
+ /** @internal */
117
+ _handleButtonClick(): void;
68
118
  render(): import("lit").TemplateResult<1>;
69
119
  }
70
- export {};
120
+ export { WarpButton };