@warp-ds/elements 2.2.0-next.8 → 2.2.0

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 (330) hide show
  1. package/README.md +188 -26
  2. package/dist/.storybook/utilities.js +52 -0
  3. package/dist/api.js +1 -1
  4. package/dist/api.js.map +4 -4
  5. package/dist/custom-elements.json +1517 -2876
  6. package/dist/index.d.ts +942 -25
  7. package/dist/packages/affix/affix.react.stories.d.ts +9 -0
  8. package/dist/packages/affix/affix.react.stories.js +10 -0
  9. package/dist/packages/affix/affix.stories.js +25 -0
  10. package/dist/packages/affix/affix.test.js +9 -0
  11. package/dist/packages/affix/index.d.ts +0 -17
  12. package/dist/packages/affix/index.js +5 -5
  13. package/dist/packages/affix/index.js.map +4 -4
  14. package/dist/packages/affix/react.d.ts +1 -1
  15. package/dist/packages/affix/react.js +15 -2482
  16. package/dist/packages/affix/styles.js +2 -0
  17. package/dist/packages/alert/alert.react.stories.d.ts +13 -0
  18. package/dist/packages/alert/alert.react.stories.js +44 -0
  19. package/dist/packages/alert/alert.stories.js +68 -0
  20. package/dist/packages/alert/alert.test.js +18 -0
  21. package/dist/packages/alert/index.d.ts +1 -6
  22. package/dist/packages/alert/index.js +4 -4
  23. package/dist/packages/alert/index.js.map +4 -4
  24. package/dist/packages/alert/react.d.ts +1 -1
  25. package/dist/packages/alert/react.js +11 -2492
  26. package/dist/packages/alert/styles.js +2 -0
  27. package/dist/packages/attention/attention.react.stories.d.ts +15 -0
  28. package/dist/packages/attention/attention.react.stories.js +92 -0
  29. package/dist/packages/attention/attention.stories.d.ts +6 -0
  30. package/dist/packages/attention/attention.stories.js +180 -0
  31. package/dist/packages/attention/attention.test.js +11 -0
  32. package/dist/packages/attention/index.d.ts +24 -91
  33. package/dist/packages/attention/index.js +3585 -17
  34. package/dist/packages/attention/index.js.map +4 -4
  35. package/dist/packages/attention/layout-styles.js +905 -0
  36. package/dist/packages/attention/locales/da/messages.mjs +1 -0
  37. package/dist/packages/attention/locales/en/messages.mjs +1 -0
  38. package/dist/packages/attention/locales/fi/messages.mjs +1 -0
  39. package/dist/packages/attention/locales/nb/messages.mjs +1 -0
  40. package/dist/packages/attention/locales/sv/messages.mjs +1 -0
  41. package/dist/packages/attention/react.d.ts +15 -0
  42. package/dist/packages/attention/react.js +17 -0
  43. package/dist/packages/attention/styles.js +2 -0
  44. package/dist/packages/badge/badge.react.stories.d.ts +18 -0
  45. package/dist/packages/badge/badge.react.stories.js +60 -0
  46. package/dist/packages/badge/badge.stories.js +68 -0
  47. package/dist/packages/badge/badge.test.js +9 -0
  48. package/dist/packages/badge/index.d.ts +0 -5
  49. package/dist/packages/badge/index.js +1 -1
  50. package/dist/packages/badge/index.js.map +4 -4
  51. package/dist/packages/badge/react.d.ts +1 -1
  52. package/dist/packages/badge/react.js +11 -2465
  53. package/dist/packages/badge/styles.js +2 -0
  54. package/dist/packages/box/box.react.stories.d.ts +15 -0
  55. package/dist/packages/box/box.react.stories.js +45 -0
  56. package/dist/packages/box/box.stories.js +59 -0
  57. package/dist/packages/box/box.test.js +9 -0
  58. package/dist/packages/box/index.d.ts +0 -5
  59. package/dist/packages/box/index.js +11 -4
  60. package/dist/packages/box/index.js.map +4 -4
  61. package/dist/packages/box/react.d.ts +1 -1
  62. package/dist/packages/box/react.js +11 -2465
  63. package/dist/packages/box/slot.test.js +9 -0
  64. package/dist/packages/box/styles.js +2 -0
  65. package/dist/packages/breadcrumbs/breadcrumbs.react.stories.d.ts +13 -0
  66. package/dist/packages/breadcrumbs/breadcrumbs.react.stories.js +40 -0
  67. package/dist/packages/breadcrumbs/breadcrumbs.stories.js +60 -0
  68. package/dist/packages/breadcrumbs/breadcrumbs.test.js +16 -0
  69. package/dist/packages/breadcrumbs/index.d.ts +0 -12
  70. package/dist/packages/breadcrumbs/index.js +6 -6
  71. package/dist/packages/breadcrumbs/index.js.map +4 -4
  72. package/dist/packages/breadcrumbs/locales/da/messages.mjs +1 -0
  73. package/dist/packages/breadcrumbs/locales/en/messages.mjs +1 -0
  74. package/dist/packages/breadcrumbs/locales/fi/messages.mjs +1 -0
  75. package/dist/packages/breadcrumbs/locales/nb/messages.mjs +1 -0
  76. package/dist/packages/breadcrumbs/locales/sv/messages.mjs +1 -0
  77. package/dist/packages/breadcrumbs/react.d.ts +1 -1
  78. package/dist/packages/breadcrumbs/react.js +11 -2475
  79. package/dist/packages/breadcrumbs/styles.js +2 -0
  80. package/dist/packages/button/button.react.stories.d.ts +22 -0
  81. package/dist/packages/button/button.react.stories.js +102 -0
  82. package/dist/packages/button/button.stories.d.ts +4 -0
  83. package/dist/packages/button/button.stories.js +151 -0
  84. package/dist/packages/button/button.test.js +25 -0
  85. package/dist/packages/button/index.d.ts +0 -66
  86. package/dist/packages/button/index.js +17 -11
  87. package/dist/packages/button/index.js.map +4 -4
  88. package/dist/packages/button/locales/da/messages.mjs +1 -0
  89. package/dist/packages/button/locales/en/messages.mjs +1 -0
  90. package/dist/packages/button/locales/fi/messages.mjs +1 -0
  91. package/dist/packages/button/locales/nb/messages.mjs +1 -0
  92. package/dist/packages/button/locales/sv/messages.mjs +1 -0
  93. package/dist/packages/button/react.d.ts +1 -1
  94. package/dist/packages/button/react.js +10 -2684
  95. package/dist/packages/button/styles.js +2 -0
  96. package/dist/packages/card/card.react.stories.d.ts +16 -0
  97. package/dist/packages/card/card.react.stories.js +63 -0
  98. package/dist/packages/card/card.stories.js +82 -0
  99. package/dist/packages/card/card.test.js +9 -0
  100. package/dist/packages/card/index.d.ts +1 -18
  101. package/dist/packages/card/index.js +4 -4
  102. package/dist/packages/card/index.js.map +4 -4
  103. package/dist/packages/card/locales/da/messages.mjs +1 -0
  104. package/dist/packages/card/locales/en/messages.mjs +1 -0
  105. package/dist/packages/card/locales/fi/messages.mjs +1 -0
  106. package/dist/packages/card/locales/nb/messages.mjs +1 -0
  107. package/dist/packages/card/locales/sv/messages.mjs +1 -0
  108. package/dist/packages/card/react.d.ts +1 -1
  109. package/dist/packages/card/react.js +11 -2487
  110. package/dist/packages/card/styles.js +2 -0
  111. package/dist/packages/expandable/expandable.react.stories.d.ts +18 -0
  112. package/dist/packages/expandable/expandable.react.stories.js +103 -0
  113. package/dist/packages/expandable/expandable.stories.js +132 -0
  114. package/dist/packages/expandable/expandable.test.js +24 -0
  115. package/dist/packages/expandable/index.d.ts +2 -33
  116. package/dist/packages/expandable/index.js +20 -11
  117. package/dist/packages/expandable/index.js.map +4 -4
  118. package/dist/packages/expandable/react.d.ts +1 -1
  119. package/dist/packages/expandable/react.js +11 -2495
  120. package/dist/packages/expandable/styles.js +2 -0
  121. package/dist/packages/i18n.js +45 -0
  122. package/dist/packages/link/index.d.ts +0 -5
  123. package/dist/packages/link/index.js +93 -2640
  124. package/dist/packages/link/styles.js +200 -0
  125. package/dist/packages/modal/index.js +24 -41
  126. package/dist/packages/modal/index.js.map +4 -4
  127. package/dist/packages/modal/locales/da/messages.mjs +1 -0
  128. package/dist/packages/modal/locales/en/messages.mjs +1 -0
  129. package/dist/packages/modal/locales/fi/messages.mjs +1 -0
  130. package/dist/packages/modal/locales/nb/messages.mjs +1 -0
  131. package/dist/packages/modal/locales/sv/messages.mjs +1 -0
  132. package/dist/packages/modal/modal-footer.d.ts +0 -5
  133. package/dist/packages/{dead-toggle/index.js → modal/modal-footer.js} +20 -47
  134. package/dist/packages/modal/modal-footer.js.map +7 -0
  135. package/dist/packages/modal/modal-header.d.ts +0 -5
  136. package/dist/packages/{steps/index.js → modal/modal-header.js} +122 -20
  137. package/dist/packages/modal/modal-header.js.map +7 -0
  138. package/dist/packages/modal/modal-main.d.ts +0 -5
  139. package/dist/packages/{dead-toggle/react.js → modal/modal-main.js} +124 -59
  140. package/dist/packages/{box/react.js.map → modal/modal-main.js.map} +4 -4
  141. package/dist/packages/modal/modal.react.stories.d.ts +14 -0
  142. package/dist/packages/modal/modal.react.stories.js +27 -0
  143. package/dist/packages/modal/modal.stories.d.ts +3 -3
  144. package/dist/packages/modal/modal.stories.js +254 -0
  145. package/dist/packages/modal/react.d.ts +11 -3
  146. package/dist/packages/modal/react.js +31 -2754
  147. package/dist/packages/modal/util.js +21 -0
  148. package/dist/packages/pill/index.d.ts +0 -17
  149. package/dist/packages/pill/index.js +5 -5
  150. package/dist/packages/pill/index.js.map +2 -2
  151. package/dist/packages/pill/locales/da/messages.mjs +1 -0
  152. package/dist/packages/pill/locales/en/messages.mjs +1 -0
  153. package/dist/packages/pill/locales/fi/messages.mjs +1 -0
  154. package/dist/packages/pill/locales/nb/messages.mjs +1 -0
  155. package/dist/packages/pill/locales/sv/messages.mjs +1 -0
  156. package/dist/packages/pill/pill.react.stories.d.ts +23 -0
  157. package/dist/packages/pill/pill.react.stories.js +22 -0
  158. package/dist/packages/pill/pill.stories.js +33 -0
  159. package/dist/packages/pill/pill.test.js +25 -0
  160. package/dist/packages/pill/react.d.ts +7 -0
  161. package/dist/packages/pill/react.js +17 -0
  162. package/dist/packages/pill/styles.js +2 -0
  163. package/dist/packages/select/index.d.ts +4 -29
  164. package/dist/packages/select/index.js +25 -18
  165. package/dist/packages/select/index.js.map +3 -3
  166. package/dist/packages/select/locales/da/messages.mjs +1 -0
  167. package/dist/packages/select/locales/en/messages.mjs +1 -0
  168. package/dist/packages/select/locales/fi/messages.mjs +1 -0
  169. package/dist/packages/select/locales/nb/messages.mjs +1 -0
  170. package/dist/packages/select/locales/sv/messages.mjs +1 -0
  171. package/dist/packages/select/react.d.ts +6 -2
  172. package/dist/packages/select/react.js +20 -2494
  173. package/dist/packages/select/select.react.stories.d.ts +18 -0
  174. package/dist/packages/select/select.react.stories.js +28 -0
  175. package/dist/packages/select/select.stories.d.ts +7 -0
  176. package/dist/packages/select/select.stories.js +100 -0
  177. package/dist/packages/select/select.test.js +31 -0
  178. package/dist/packages/select/styles.js +2 -0
  179. package/dist/packages/{switch/index.js → styles.js} +5 -18
  180. package/dist/packages/textfield/index.d.ts +12 -26
  181. package/dist/packages/textfield/index.js +86 -28
  182. package/dist/packages/textfield/index.js.map +4 -4
  183. package/dist/packages/textfield/react.d.ts +11 -2
  184. package/dist/packages/textfield/react.js +21 -2490
  185. package/dist/packages/textfield/styles/w-textfield.styles.d.ts +1 -0
  186. package/dist/packages/textfield/styles/w-textfield.styles.js +55 -0
  187. package/dist/packages/textfield/styles.js +2 -0
  188. package/dist/packages/textfield/textfield.react.stories.d.ts +37 -0
  189. package/dist/packages/textfield/textfield.react.stories.js +88 -0
  190. package/dist/packages/textfield/textfield.stories.d.ts +1 -0
  191. package/dist/packages/textfield/textfield.stories.js +105 -0
  192. package/dist/packages/textfield/textfield.test.d.ts +1 -0
  193. package/dist/packages/textfield/textfield.test.js +68 -0
  194. package/dist/packages/toast/api.d.ts +4 -45
  195. package/dist/packages/toast/api.js +41 -0
  196. package/dist/packages/toast/index.d.ts +3 -3
  197. package/dist/packages/toast/index.js +2463 -24
  198. package/dist/packages/toast/index.js.map +4 -4
  199. package/dist/packages/toast/locales/da/messages.mjs +1 -0
  200. package/dist/packages/toast/locales/en/messages.mjs +1 -0
  201. package/dist/packages/toast/locales/fi/messages.mjs +1 -0
  202. package/dist/packages/toast/locales/nb/messages.mjs +1 -0
  203. package/dist/packages/toast/locales/sv/messages.mjs +1 -0
  204. package/dist/packages/toast/styles.js +2 -0
  205. package/dist/packages/toast/toast-container.d.ts +12 -78
  206. package/dist/packages/{switch/react.js → toast/toast-container.js} +21 -38
  207. package/dist/packages/toast/toast-container.js.map +7 -0
  208. package/dist/packages/toast/toast.d.ts +16 -29
  209. package/dist/packages/{pagination/index.js → toast/toast.js} +21 -49
  210. package/dist/packages/toast/toast.js.map +7 -0
  211. package/dist/packages/toast/toast.stories.js +50 -0
  212. package/dist/packages/toast/types.d.ts +15 -0
  213. package/dist/packages/toast/types.js +1 -0
  214. package/dist/packages/utils/expand-transition.d.ts +3 -3
  215. package/dist/packages/utils/expand-transition.js +59 -0
  216. package/dist/packages/utils/index.js +37 -0
  217. package/dist/packages/utils/unstyled-heading.d.ts +2 -3
  218. package/dist/packages/utils/unstyled-heading.js +22 -0
  219. package/dist/packages/utils/window-exists.js +1 -0
  220. package/dist/setup-tests.js +1 -0
  221. package/dist/web-types.json +225 -510
  222. package/package.json +39 -32
  223. package/dist/index.css +0 -2
  224. package/dist/index.css.map +0 -7
  225. package/dist/index.js +0 -3386
  226. package/dist/index.js.map +0 -7
  227. package/dist/packages/affix/react.js.map +0 -7
  228. package/dist/packages/alert/react.js.map +0 -7
  229. package/dist/packages/badge/react.js.map +0 -7
  230. package/dist/packages/breadcrumbs/react.js.map +0 -7
  231. package/dist/packages/button/react.js.map +0 -7
  232. package/dist/packages/card/react.js.map +0 -7
  233. package/dist/packages/datepicker/DatePicker.test.d.ts +0 -1
  234. package/dist/packages/datepicker/datepicker.d.ts +0 -107
  235. package/dist/packages/datepicker/datepicker.stories.d.ts +0 -11
  236. package/dist/packages/datepicker/datepicker.test.d.ts +0 -2
  237. package/dist/packages/datepicker/index.d.ts +0 -1
  238. package/dist/packages/datepicker/index.js +0 -2785
  239. package/dist/packages/datepicker/index.js.map +0 -7
  240. package/dist/packages/datepicker/locales/da/messages.d.mts +0 -1
  241. package/dist/packages/datepicker/locales/en/messages.d.mts +0 -1
  242. package/dist/packages/datepicker/locales/fi/messages.d.mts +0 -1
  243. package/dist/packages/datepicker/locales/nb/messages.d.mts +0 -1
  244. package/dist/packages/datepicker/locales/sv/messages.d.mts +0 -1
  245. package/dist/packages/datepicker/react.d.ts +0 -2
  246. package/dist/packages/datepicker/react.js +0 -2805
  247. package/dist/packages/datepicker/react.js.map +0 -7
  248. package/dist/packages/datepicker/styles/w-datepicker-calendar.styles.d.ts +0 -1
  249. package/dist/packages/datepicker/styles/w-datepicker-day.styles.d.ts +0 -1
  250. package/dist/packages/datepicker/styles/w-datepicker-month.styles.d.ts +0 -1
  251. package/dist/packages/datepicker/styles/w-datepicker.styles.d.ts +0 -1
  252. package/dist/packages/datepicker/utils.d.ts +0 -13
  253. package/dist/packages/dead-toggle/dead-toggle.stories.d.ts +0 -10
  254. package/dist/packages/dead-toggle/index.d.ts +0 -21
  255. package/dist/packages/dead-toggle/index.js.map +0 -7
  256. package/dist/packages/dead-toggle/react.d.ts +0 -2
  257. package/dist/packages/dead-toggle/react.js.map +0 -7
  258. package/dist/packages/expandable/react.js.map +0 -7
  259. package/dist/packages/link/index.js.map +0 -7
  260. package/dist/packages/link/link.stories.d.ts +0 -20
  261. package/dist/packages/link/link.test.d.ts +0 -1
  262. package/dist/packages/link/react.d.ts +0 -2
  263. package/dist/packages/link/react.js +0 -2666
  264. package/dist/packages/link/react.js.map +0 -7
  265. package/dist/packages/modal/react.js.map +0 -7
  266. package/dist/packages/pageindicator/index.d.ts +0 -14
  267. package/dist/packages/pageindicator/index.js +0 -32
  268. package/dist/packages/pageindicator/index.js.map +0 -7
  269. package/dist/packages/pageindicator/pageindicator.stories.d.ts +0 -32
  270. package/dist/packages/pageindicator/react.d.ts +0 -2
  271. package/dist/packages/pageindicator/react.js +0 -52
  272. package/dist/packages/pageindicator/react.js.map +0 -7
  273. package/dist/packages/pagination/index.d.ts +0 -37
  274. package/dist/packages/pagination/index.js.map +0 -7
  275. package/dist/packages/pagination/locales/da/messages.d.mts +0 -1
  276. package/dist/packages/pagination/locales/en/messages.d.mts +0 -1
  277. package/dist/packages/pagination/locales/fi/messages.d.mts +0 -1
  278. package/dist/packages/pagination/locales/nb/messages.d.mts +0 -1
  279. package/dist/packages/pagination/locales/sv/messages.d.mts +0 -1
  280. package/dist/packages/pagination/pagination.stories.d.ts +0 -14
  281. package/dist/packages/pagination/pagination.test.d.ts +0 -1
  282. package/dist/packages/pagination/react.d.ts +0 -2
  283. package/dist/packages/pagination/react.js +0 -2514
  284. package/dist/packages/pagination/react.js.map +0 -7
  285. package/dist/packages/rip-and-tear-checkbox/checkbox.d.ts +0 -64
  286. package/dist/packages/rip-and-tear-checkbox/index.css +0 -2
  287. package/dist/packages/rip-and-tear-checkbox/index.css.map +0 -7
  288. package/dist/packages/rip-and-tear-checkbox/index.d.ts +0 -6
  289. package/dist/packages/rip-and-tear-checkbox/index.js +0 -36
  290. package/dist/packages/rip-and-tear-checkbox/index.js.map +0 -7
  291. package/dist/packages/rip-and-tear-radio/base-element.d.ts +0 -46
  292. package/dist/packages/rip-and-tear-radio/custom-error-validator.d.ts +0 -6
  293. package/dist/packages/rip-and-tear-radio/form-associated-element.d.ts +0 -103
  294. package/dist/packages/rip-and-tear-radio/index.css +0 -2
  295. package/dist/packages/rip-and-tear-radio/index.css.map +0 -7
  296. package/dist/packages/rip-and-tear-radio/index.d.ts +0 -8
  297. package/dist/packages/rip-and-tear-radio/index.js +0 -34
  298. package/dist/packages/rip-and-tear-radio/index.js.map +0 -7
  299. package/dist/packages/rip-and-tear-radio/invalid.d.ts +0 -8
  300. package/dist/packages/rip-and-tear-radio/math.d.ts +0 -1
  301. package/dist/packages/rip-and-tear-radio/radio-group.d.ts +0 -72
  302. package/dist/packages/rip-and-tear-radio/radio.d.ts +0 -38
  303. package/dist/packages/rip-and-tear-radio/required-validator.d.ts +0 -11
  304. package/dist/packages/rip-and-tear-radio/slot.d.ts +0 -20
  305. package/dist/packages/rip-and-tear-radio/watch.d.ts +0 -26
  306. package/dist/packages/select/react.js.map +0 -7
  307. package/dist/packages/steps/index.d.ts +0 -43
  308. package/dist/packages/steps/index.js.map +0 -7
  309. package/dist/packages/steps/locales/da/messages.d.mts +0 -1
  310. package/dist/packages/steps/locales/en/messages.d.mts +0 -1
  311. package/dist/packages/steps/locales/fi/messages.d.mts +0 -1
  312. package/dist/packages/steps/locales/nb/messages.d.mts +0 -1
  313. package/dist/packages/steps/locales/sv/messages.d.mts +0 -1
  314. package/dist/packages/steps/react.d.ts +0 -3
  315. package/dist/packages/steps/react.js +0 -2485
  316. package/dist/packages/steps/react.js.map +0 -7
  317. package/dist/packages/steps/steps.stories.d.ts +0 -12
  318. package/dist/packages/switch/index.d.ts +0 -20
  319. package/dist/packages/switch/index.js.map +0 -7
  320. package/dist/packages/switch/react.d.ts +0 -2
  321. package/dist/packages/switch/react.js.map +0 -7
  322. package/dist/packages/switch/styles.d.ts +0 -1
  323. package/dist/packages/switch/switch.stories.d.ts +0 -9
  324. package/dist/packages/textfield/react.js.map +0 -7
  325. package/dist/vscode.css-custom-data.json +0 -6
  326. package/dist/vscode.html-custom-data.json +0 -418
  327. /package/dist/packages/{dead-toggle/dead-toggle.test.d.ts → attention/attention.test.d.ts} +0 -0
  328. /package/dist/packages/{pageindicator/style.d.ts → attention/layout-styles.d.ts} +0 -0
  329. /package/dist/packages/{pagination → attention}/styles.d.ts +0 -0
  330. /package/dist/packages/{steps → toast}/styles.d.ts +0 -0
@@ -1,6 +1,6 @@
1
- import type { Meta, StoryObj } from '@storybook/web-components-vite';
2
- import type { WarpModal, WarpModalHeader, WarpModalFooter } from './index.ts';
3
- import './index.ts';
1
+ import type { Meta, StoryObj } from "@storybook/web-components-vite";
2
+ import type { WarpModal, WarpModalFooter, WarpModalHeader } from "./index.ts";
3
+ import "./index.ts";
4
4
  declare const modalArgs: Partial<WarpModal> & {
5
5
  [key: string]: any;
6
6
  };
@@ -0,0 +1,254 @@
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.ts";
6
+ const { events: modalEvents, args: modalArgs, argTypes: modalArgTypes, } = getStorybookHelpers("w-modal");
7
+ const { events: modalHeaderEvents, args: modalHeaderArgs, argTypes: modalHeaderArgTypes, } = getStorybookHelpers("w-modal-header");
8
+ const { events: modalFooterEvents, args: modalFooterArgs, argTypes: modalFooterArgTypes, } = getStorybookHelpers("w-modal-footer");
9
+ const meta = {
10
+ title: "Overlays/Modal",
11
+ };
12
+ export default meta;
13
+ export const Default = {
14
+ args: {},
15
+ render() {
16
+ return html `
17
+ <w-button id="modal-open-button-one" aria-haspopup="dialog"
18
+ >Open a modal</w-button
19
+ >
20
+ <w-modal id="example-modal-one">
21
+ <w-modal-header
22
+ id="modal-header-one"
23
+ slot="header"
24
+ title="An example modal"
25
+ ></w-modal-header>
26
+ <div slot="content">
27
+ <h2 class="h4 mb-16">Triumph by Wu Tang Clan</h2>
28
+ <div style="margin-bottom: 12px">
29
+ <w-button id="modal-toggle-back-one" variant="utility" small
30
+ >Toggle back button</w-button
31
+ >
32
+ </div>
33
+ <p>
34
+ I bomb atomically, Socrates' philosophies and hypotheses Can't
35
+ define how I be droppin' these mockeries Lyrically perform armed
36
+ robbery Flee with the lottery, possibly they spotted me
37
+ Battle-scarred Shogun, explosion when my pen hits tremendous
38
+ Ultra-violet shine blind forensics I inspect view through the future
39
+ see millennium Killa Beez sold fifty gold, sixty platinum Shackling
40
+ the masses with drastic rap tactics Graphic displays melt the steel
41
+ like blacksmiths Black Wu jackets, Queen Beez ease the guns in
42
+ Rumble with patrolmen, tear gas laced the function Heads by the
43
+ score take flight, incite a war Chicks hit the floor, diehard fans
44
+ demand more Behold the bold soldier, control the globe slowly
45
+ Proceeds to blow, swingin' swords like Shinobi Stomp grounds and
46
+ pound footprints in solid rock Wu got it locked, performin' live on
47
+ your hottest block
48
+ </p>
49
+ <p>
50
+ First I'm gonna getcha, once I gotcha, I gat-cha, You could never
51
+ capture the Method Man's stature. So uhh, tic toc and keep ticking,
52
+ while I get you flipping off what I'm kicking. Yes, the rhythm, the
53
+ rebel, alone in my level heat it up past the boiling point of metal.
54
+ Shackling the masses with drastic rap tactics, graphic displays melt
55
+ the steel like blacksmiths. My beats travel like a vortex through
56
+ your spine, to the top of your cerebral cortex. Yes, the rhythm, the
57
+ rebel, alone in my level heat it up past the boiling point of metal.
58
+ Small change, they putting shame in the game. Murderous material,
59
+ made by a madman, it's the mic wrecker, Inspector, bad man.
60
+ </p>
61
+ <p>
62
+ My beats travel like a vortex through your spine, to the top of your
63
+ cerebral cortex. The rebel, I make more noise than heavy metal. Now,
64
+ lo and behold, another deadly episode, bound to catch another charge
65
+ when I explode Perpendicular to the square we stay in gold like
66
+ Flair, escape from your dragon's lair in particular. Handcuffed in
67
+ the back of a bus, forty of us. Slammin a hype verse til ya head
68
+ burst. Handcuffed in the back of a bus, forty of us. I bomb
69
+ atomically Socrates' philosophies and hypothesis can't define how I
70
+ be dropping these mockeries. I be that insane one from the psycho
71
+ ward, I'm on the trigger, plus I got the Wu-Tang sword. Step through
72
+ your section with the Force like Luke Skywalker, rhyme author,
73
+ orchestrate mind torture.
74
+ </p>
75
+ <p>
76
+ It was the night before New Year's all through the projects, not a
77
+ handgun was silent, not even a Tec. I smoke on the mic like smoking
78
+ Joe Frazier, the hell raiser, raising hell with the flavor. The Wu
79
+ is comin thru, the outcome is critical, Muckin wit my style, is sort
80
+ of like a Miracle. We got stick-up kids, corrupt cops, and pop
81
+ rocks. Step through your section with the Force like Luke Skywalker,
82
+ rhyme author, orchestrate mind torture. Rae got it going on pal,
83
+ call me the rap assassinator, rhymes rugged and built like
84
+ Schwarzenegger.
85
+ </p>
86
+ </div>
87
+ <w-modal-footer slot="footer">
88
+ <div class="flex gap-16">
89
+ <w-button variant="secondary" id="modal-close-button-cancel"
90
+ >Cancel</w-button
91
+ >
92
+ <w-button variant="primary" id="modal-close-button-one"
93
+ >Confirm</w-button
94
+ >
95
+ </div>
96
+ </w-modal-footer>
97
+ </w-modal>
98
+ `;
99
+ },
100
+ play: async ({ canvasElement }) => {
101
+ await Promise.all([
102
+ customElements.whenDefined("w-button"),
103
+ customElements.whenDefined("w-modal"),
104
+ customElements.whenDefined("w-modal-header"),
105
+ customElements.whenDefined("w-modal-footer"),
106
+ ]);
107
+ const openButton = canvasElement.querySelector("#modal-open-button-one");
108
+ const closeButton = canvasElement.querySelector("#modal-close-button-one");
109
+ const toggleBackButton = canvasElement.querySelector("#modal-toggle-back-one");
110
+ const cancelButton = canvasElement.querySelector("#modal-close-button-cancel");
111
+ const modal = canvasElement.querySelector("#example-modal-one");
112
+ const modalHeader = canvasElement.querySelector("#modal-header-one");
113
+ if (openButton && modal) {
114
+ openButton.addEventListener("click", () => modal.open());
115
+ }
116
+ if (closeButton && modal) {
117
+ closeButton.addEventListener("click", () => modal.close());
118
+ }
119
+ if (cancelButton && modal) {
120
+ cancelButton.addEventListener("click", () => modal.close());
121
+ }
122
+ if (toggleBackButton && modalHeader) {
123
+ toggleBackButton.addEventListener("click", () => {
124
+ modalHeader.back = !modalHeader.back;
125
+ });
126
+ }
127
+ },
128
+ parameters: {
129
+ docs: {
130
+ story: {
131
+ autoplay: true,
132
+ },
133
+ },
134
+ },
135
+ };
136
+ export const WithImage = {
137
+ args: {},
138
+ render() {
139
+ return html `
140
+ <w-button id="modal-open-button-two" aria-haspopup="dialog"
141
+ >Open a modal</w-button
142
+ >
143
+ <w-modal id="example-modal-two" style="--w-s-color-icon: var(--w-s-color-icon-inverted)">
144
+ <w-modal-header slot="header" title="Look a doggo!">
145
+ <img
146
+ slot="top"
147
+ style="height: 256px; width: 100%; object-fit: cover;"
148
+ src="https://images.unsplash.com/photo-1534361960057-19889db9621e"
149
+ alt="A really nice dog"
150
+ />
151
+ </w-modal-header>
152
+ <div slot="content">
153
+ <p>
154
+ I bomb atomically, Socrates' philosophies and hypotheses Can't
155
+ define how I be droppin' these mockeries Lyrically perform armed
156
+ robbery Flee with the lottery, possibly they spotted me
157
+ Battle-scarred Shogun, explosion when my pen hits tremendous
158
+ Ultra-violet shine blind forensics I inspect view through the future
159
+ see millennium Killa Beez sold fifty gold, sixty platinum Shackling
160
+ the masses with drastic rap tactics Graphic displays melt the steel
161
+ like blacksmiths Black Wu jackets, Queen Beez ease the guns in
162
+ Rumble with patrolmen, tear gas laced the function Heads by the
163
+ score take flight, incite a war Chicks hit the floor, diehard fans
164
+ demand more Behold the bold soldier, control the globe slowly
165
+ Proceeds to blow, swingin' swords like Shinobi Stomp grounds and
166
+ pound footprints in solid rock Wu got it locked, performin' live on
167
+ your hottest block
168
+ </p>
169
+ </div>
170
+ <w-modal-footer slot="footer">
171
+ <w-button variant="primary" id="modal-close-button-two">OK</w-button>
172
+ </w-modal-footer>
173
+ </w-modal>
174
+ `;
175
+ },
176
+ play: async ({ canvasElement }) => {
177
+ await Promise.all([
178
+ customElements.whenDefined("w-button"),
179
+ customElements.whenDefined("w-modal"),
180
+ customElements.whenDefined("w-modal-header"),
181
+ customElements.whenDefined("w-modal-footer"),
182
+ ]);
183
+ const openButton = canvasElement.querySelector("#modal-open-button-two");
184
+ const closeButton = canvasElement.querySelector("#modal-close-button-two");
185
+ const modal = canvasElement.querySelector("#example-modal-two");
186
+ if (openButton && modal) {
187
+ openButton.addEventListener("click", () => modal.open());
188
+ }
189
+ if (closeButton && modal) {
190
+ closeButton.addEventListener("click", () => modal.close());
191
+ }
192
+ },
193
+ parameters: {
194
+ docs: {
195
+ story: {
196
+ autoplay: true,
197
+ },
198
+ },
199
+ },
200
+ };
201
+ export const Modal = {
202
+ render(args) {
203
+ return html `
204
+ <p>
205
+ This is here to document attributes. See the Default example for a
206
+ complete usage example.
207
+ </p>
208
+ <w-modal ${spread(prespread(args))}></w-modal>
209
+ `;
210
+ },
211
+ args: modalArgs,
212
+ argTypes: modalArgTypes,
213
+ parameters: {
214
+ actions: {
215
+ handles: modalEvents,
216
+ },
217
+ },
218
+ };
219
+ export const ModalHeader = {
220
+ render(args) {
221
+ return html `
222
+ <p>
223
+ This is here to document attributes. See the Default example for a
224
+ complete usage example.
225
+ </p>
226
+ <w-modal-header ${spread(prespread(args))}></w-modal-header>
227
+ `;
228
+ },
229
+ args: modalHeaderArgs,
230
+ argTypes: modalHeaderArgTypes,
231
+ parameters: {
232
+ actions: {
233
+ handles: modalHeaderEvents,
234
+ },
235
+ },
236
+ };
237
+ export const ModalFooter = {
238
+ render(args) {
239
+ return html `
240
+ <p>
241
+ This is here to document attributes. See the Default example for a
242
+ complete usage example.
243
+ </p>
244
+ <w-modal-footer ${spread(prespread(args))}></w-modal-footer>
245
+ `;
246
+ },
247
+ args: modalFooterArgs,
248
+ argTypes: modalFooterArgTypes,
249
+ parameters: {
250
+ actions: {
251
+ handles: modalFooterEvents,
252
+ },
253
+ },
254
+ };
@@ -1,4 +1,12 @@
1
- import { WarpModal, WarpModalFooter, WarpModalHeader } from './index.js';
2
- export declare const Modal: import("@lit/react").ReactWebComponent<WarpModal, {}>;
3
- export declare const ModalHeader: import("@lit/react").ReactWebComponent<WarpModalHeader, {}>;
1
+ import { WarpModalFooter, WarpModal, WarpModalHeader } from '.';
2
+ export declare const Modal: import("@lit/react").ReactWebComponent<WarpModal, {
3
+ onShown: string;
4
+ onshown: string;
5
+ onHidden: string;
6
+ onhidden: string;
7
+ }>;
8
+ export declare const ModalHeader: import("@lit/react").ReactWebComponent<WarpModalHeader, {
9
+ onBackClicked: string;
10
+ onbackClicked: string;
11
+ }>;
4
12
  export declare const ModalFooter: import("@lit/react").ReactWebComponent<WarpModalFooter, {}>;