@dropins/tools 0.21.2-alpha2 → 0.21.2-alpha389

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 (478) hide show
  1. package/event-bus.js +1 -49
  2. package/fetch-graphql.js +1 -62
  3. package/initializer.js +1 -61
  4. package/package.json +1 -1
  5. package/preact-compat.js +1 -93
  6. package/preact-hooks.js +1 -40
  7. package/preact-jsx-runtime.js +1 -35
  8. package/preact.js +1 -21
  9. package/runtime.js +1 -69
  10. package/components/Accordion/Accordion.d.ts +0 -25
  11. package/components/Accordion/Accordion.d.ts.map +0 -1
  12. package/components/Accordion/Accordion.jsx +0 -59
  13. package/components/Accordion/Accordion.stories.d.ts +0 -22
  14. package/components/Accordion/Accordion.stories.d.ts.map +0 -1
  15. package/components/Accordion/Accordion.stories.jsx +0 -320
  16. package/components/Accordion/Accordion.test.d.ts +0 -3
  17. package/components/Accordion/Accordion.test.d.ts.map +0 -1
  18. package/components/Accordion/Accordion.test.jsx +0 -79
  19. package/components/Accordion/index.d.ts +0 -3
  20. package/components/Accordion/index.d.ts.map +0 -1
  21. package/components/Accordion/index.js +0 -2
  22. package/components/ActionButton/ActionButton.d.ts +0 -11
  23. package/components/ActionButton/ActionButton.d.ts.map +0 -1
  24. package/components/ActionButton/ActionButton.jsx +0 -14
  25. package/components/ActionButton/ActionButton.stories.d.ts +0 -16
  26. package/components/ActionButton/ActionButton.stories.d.ts.map +0 -1
  27. package/components/ActionButton/ActionButton.stories.jsx +0 -119
  28. package/components/ActionButton/ActionButton.test.d.ts +0 -3
  29. package/components/ActionButton/ActionButton.test.d.ts.map +0 -1
  30. package/components/ActionButton/ActionButton.test.jsx +0 -47
  31. package/components/ActionButton/index.d.ts +0 -2
  32. package/components/ActionButton/index.d.ts.map +0 -1
  33. package/components/ActionButton/index.js +0 -1
  34. package/components/ActionButtonGroup/ActionButtonGroup.d.ts +0 -20
  35. package/components/ActionButtonGroup/ActionButtonGroup.d.ts.map +0 -1
  36. package/components/ActionButtonGroup/ActionButtonGroup.jsx +0 -39
  37. package/components/ActionButtonGroup/ActionButtonGroup.stories.d.ts +0 -16
  38. package/components/ActionButtonGroup/ActionButtonGroup.stories.d.ts.map +0 -1
  39. package/components/ActionButtonGroup/ActionButtonGroup.stories.jsx +0 -72
  40. package/components/ActionButtonGroup/ActionButtonGroup.test.d.ts +0 -3
  41. package/components/ActionButtonGroup/ActionButtonGroup.test.d.ts.map +0 -1
  42. package/components/ActionButtonGroup/ActionButtonGroup.test.jsx +0 -78
  43. package/components/ActionButtonGroup/index.d.ts +0 -2
  44. package/components/ActionButtonGroup/index.d.ts.map +0 -1
  45. package/components/ActionButtonGroup/index.js +0 -1
  46. package/components/AlertBanner/AlertBanner.d.ts +0 -15
  47. package/components/AlertBanner/AlertBanner.d.ts.map +0 -1
  48. package/components/AlertBanner/AlertBanner.jsx +0 -30
  49. package/components/AlertBanner/AlertBanner.stories.d.ts +0 -17
  50. package/components/AlertBanner/AlertBanner.stories.d.ts.map +0 -1
  51. package/components/AlertBanner/AlertBanner.stories.jsx +0 -128
  52. package/components/AlertBanner/AlertBanner.test.d.ts +0 -3
  53. package/components/AlertBanner/AlertBanner.test.d.ts.map +0 -1
  54. package/components/AlertBanner/AlertBanner.test.jsx +0 -40
  55. package/components/AlertBanner/index.d.ts +0 -3
  56. package/components/AlertBanner/index.d.ts.map +0 -1
  57. package/components/AlertBanner/index.js +0 -2
  58. package/components/Breadcrumbs/Breadcrumbs.d.ts +0 -9
  59. package/components/Breadcrumbs/Breadcrumbs.d.ts.map +0 -1
  60. package/components/Breadcrumbs/Breadcrumbs.jsx +0 -26
  61. package/components/Breadcrumbs/Breadcrumbs.stories.d.ts +0 -15
  62. package/components/Breadcrumbs/Breadcrumbs.stories.d.ts.map +0 -1
  63. package/components/Breadcrumbs/Breadcrumbs.stories.jsx +0 -110
  64. package/components/Breadcrumbs/Breadcrumbs.test.d.ts +0 -3
  65. package/components/Breadcrumbs/Breadcrumbs.test.d.ts.map +0 -1
  66. package/components/Breadcrumbs/Breadcrumbs.test.jsx +0 -67
  67. package/components/Breadcrumbs/index.d.ts +0 -3
  68. package/components/Breadcrumbs/index.d.ts.map +0 -1
  69. package/components/Breadcrumbs/index.js +0 -2
  70. package/components/Button/Button.d.ts +0 -15
  71. package/components/Button/Button.d.ts.map +0 -1
  72. package/components/Button/Button.jsx +0 -59
  73. package/components/Button/Button.stories.d.ts +0 -135
  74. package/components/Button/Button.stories.d.ts.map +0 -1
  75. package/components/Button/Button.stories.jsx +0 -354
  76. package/components/Button/Button.test.d.ts +0 -2
  77. package/components/Button/Button.test.d.ts.map +0 -1
  78. package/components/Button/Button.test.jsx +0 -134
  79. package/components/Button/index.d.ts +0 -3
  80. package/components/Button/index.d.ts.map +0 -1
  81. package/components/Button/index.js +0 -2
  82. package/components/Card/Card.d.ts +0 -9
  83. package/components/Card/Card.d.ts.map +0 -1
  84. package/components/Card/Card.jsx +0 -7
  85. package/components/Card/Card.stories.d.ts +0 -16
  86. package/components/Card/Card.stories.d.ts.map +0 -1
  87. package/components/Card/Card.stories.jsx +0 -47
  88. package/components/Card/Card.test.d.ts +0 -3
  89. package/components/Card/Card.test.d.ts.map +0 -1
  90. package/components/Card/Card.test.jsx +0 -26
  91. package/components/Card/index.d.ts +0 -2
  92. package/components/Card/index.d.ts.map +0 -1
  93. package/components/Card/index.js +0 -1
  94. package/components/CartItem/CartItem.d.ts +0 -25
  95. package/components/CartItem/CartItem.d.ts.map +0 -1
  96. package/components/CartItem/CartItem.jsx +0 -124
  97. package/components/CartItem/CartItem.stories.d.ts +0 -54
  98. package/components/CartItem/CartItem.stories.d.ts.map +0 -1
  99. package/components/CartItem/CartItem.stories.jsx +0 -309
  100. package/components/CartItem/CartItem.test.d.ts +0 -3
  101. package/components/CartItem/CartItem.test.d.ts.map +0 -1
  102. package/components/CartItem/CartItem.test.jsx +0 -71
  103. package/components/CartItem/CartItemSkeleton.d.ts +0 -3
  104. package/components/CartItem/CartItemSkeleton.d.ts.map +0 -1
  105. package/components/CartItem/CartItemSkeleton.jsx +0 -25
  106. package/components/CartItem/CartItemSkeleton.test.d.ts +0 -3
  107. package/components/CartItem/CartItemSkeleton.test.d.ts.map +0 -1
  108. package/components/CartItem/CartItemSkeleton.test.jsx +0 -11
  109. package/components/CartItem/index.d.ts +0 -4
  110. package/components/CartItem/index.d.ts.map +0 -1
  111. package/components/CartItem/index.js +0 -3
  112. package/components/CartList/CartList.d.ts +0 -7
  113. package/components/CartList/CartList.d.ts.map +0 -1
  114. package/components/CartList/CartList.jsx +0 -14
  115. package/components/CartList/CartList.stories.d.ts +0 -17
  116. package/components/CartList/CartList.stories.d.ts.map +0 -1
  117. package/components/CartList/CartList.stories.jsx +0 -54
  118. package/components/CartList/CartList.test.d.ts +0 -3
  119. package/components/CartList/CartList.test.d.ts.map +0 -1
  120. package/components/CartList/CartList.test.jsx +0 -12
  121. package/components/CartList/index.d.ts +0 -3
  122. package/components/CartList/index.d.ts.map +0 -1
  123. package/components/CartList/index.js +0 -2
  124. package/components/Checkbox/Checkbox.d.ts +0 -13
  125. package/components/Checkbox/Checkbox.d.ts.map +0 -1
  126. package/components/Checkbox/Checkbox.jsx +0 -51
  127. package/components/Checkbox/Checkbox.stories.d.ts +0 -22
  128. package/components/Checkbox/Checkbox.stories.d.ts.map +0 -1
  129. package/components/Checkbox/Checkbox.stories.jsx +0 -157
  130. package/components/Checkbox/Checkbox.test.d.ts +0 -3
  131. package/components/Checkbox/Checkbox.test.d.ts.map +0 -1
  132. package/components/Checkbox/Checkbox.test.jsx +0 -136
  133. package/components/Checkbox/index.d.ts +0 -2
  134. package/components/Checkbox/index.d.ts.map +0 -1
  135. package/components/Checkbox/index.js +0 -1
  136. package/components/ColorSwatch/ColorSwatch.d.ts +0 -20
  137. package/components/ColorSwatch/ColorSwatch.d.ts.map +0 -1
  138. package/components/ColorSwatch/ColorSwatch.jsx +0 -57
  139. package/components/ColorSwatch/ColorSwatch.stories.d.ts +0 -20
  140. package/components/ColorSwatch/ColorSwatch.stories.d.ts.map +0 -1
  141. package/components/ColorSwatch/ColorSwatch.stories.jsx +0 -206
  142. package/components/ColorSwatch/ColorSwatch.test.d.ts +0 -3
  143. package/components/ColorSwatch/ColorSwatch.test.d.ts.map +0 -1
  144. package/components/ColorSwatch/ColorSwatch.test.jsx +0 -87
  145. package/components/ColorSwatch/index.d.ts +0 -3
  146. package/components/ColorSwatch/index.d.ts.map +0 -1
  147. package/components/ColorSwatch/index.js +0 -2
  148. package/components/Divider/Divider.d.ts +0 -8
  149. package/components/Divider/Divider.d.ts.map +0 -1
  150. package/components/Divider/Divider.jsx +0 -9
  151. package/components/Divider/Divider.stories.d.ts +0 -11
  152. package/components/Divider/Divider.stories.d.ts.map +0 -1
  153. package/components/Divider/Divider.stories.jsx +0 -43
  154. package/components/Divider/Divider.test.d.ts +0 -2
  155. package/components/Divider/Divider.test.d.ts.map +0 -1
  156. package/components/Divider/Divider.test.jsx +0 -19
  157. package/components/Divider/index.d.ts +0 -3
  158. package/components/Divider/index.d.ts.map +0 -1
  159. package/components/Divider/index.js +0 -2
  160. package/components/Field/Field.d.ts +0 -14
  161. package/components/Field/Field.d.ts.map +0 -1
  162. package/components/Field/Field.jsx +0 -29
  163. package/components/Field/Field.stories.d.ts +0 -37
  164. package/components/Field/Field.stories.d.ts.map +0 -1
  165. package/components/Field/Field.stories.jsx +0 -174
  166. package/components/Field/Field.test.d.ts +0 -3
  167. package/components/Field/Field.test.d.ts.map +0 -1
  168. package/components/Field/Field.test.jsx +0 -91
  169. package/components/Field/index.d.ts +0 -2
  170. package/components/Field/index.d.ts.map +0 -1
  171. package/components/Field/index.js +0 -1
  172. package/components/Icon/Icon.d.ts +0 -11
  173. package/components/Icon/Icon.d.ts.map +0 -1
  174. package/components/Icon/Icon.jsx +0 -57
  175. package/components/Icon/Icon.stories.d.ts +0 -16
  176. package/components/Icon/Icon.stories.d.ts.map +0 -1
  177. package/components/Icon/Icon.stories.helpers.d.ts +0 -4
  178. package/components/Icon/Icon.stories.helpers.d.ts.map +0 -1
  179. package/components/Icon/Icon.stories.helpers.jsx +0 -7
  180. package/components/Icon/Icon.stories.jsx +0 -48
  181. package/components/Icon/Icon.test.d.ts +0 -3
  182. package/components/Icon/Icon.test.d.ts.map +0 -1
  183. package/components/Icon/Icon.test.jsx +0 -67
  184. package/components/Icon/index.d.ts +0 -2
  185. package/components/Icon/index.d.ts.map +0 -1
  186. package/components/Icon/index.js +0 -1
  187. package/components/IllustratedMessage/IllustratedMessage.d.ts +0 -13
  188. package/components/IllustratedMessage/IllustratedMessage.d.ts.map +0 -1
  189. package/components/IllustratedMessage/IllustratedMessage.jsx +0 -21
  190. package/components/IllustratedMessage/IllustratedMessage.stories.d.ts +0 -10
  191. package/components/IllustratedMessage/IllustratedMessage.stories.d.ts.map +0 -1
  192. package/components/IllustratedMessage/IllustratedMessage.stories.jsx +0 -90
  193. package/components/IllustratedMessage/IllustratedMessage.test.d.ts +0 -3
  194. package/components/IllustratedMessage/IllustratedMessage.test.d.ts.map +0 -1
  195. package/components/IllustratedMessage/IllustratedMessage.test.jsx +0 -42
  196. package/components/IllustratedMessage/index.d.ts +0 -3
  197. package/components/IllustratedMessage/index.d.ts.map +0 -1
  198. package/components/IllustratedMessage/index.js +0 -2
  199. package/components/Image/Image.d.ts +0 -11
  200. package/components/Image/Image.d.ts.map +0 -1
  201. package/components/Image/Image.jsx +0 -26
  202. package/components/Image/Image.stories.d.ts +0 -11
  203. package/components/Image/Image.stories.d.ts.map +0 -1
  204. package/components/Image/Image.stories.jsx +0 -66
  205. package/components/Image/Image.test.d.ts +0 -3
  206. package/components/Image/Image.test.d.ts.map +0 -1
  207. package/components/Image/Image.test.jsx +0 -82
  208. package/components/Image/index.d.ts +0 -2
  209. package/components/Image/index.d.ts.map +0 -1
  210. package/components/Image/index.js +0 -1
  211. package/components/ImageSwatch/ImageSwatch.d.ts +0 -20
  212. package/components/ImageSwatch/ImageSwatch.d.ts.map +0 -1
  213. package/components/ImageSwatch/ImageSwatch.jsx +0 -49
  214. package/components/ImageSwatch/ImageSwatch.stories.d.ts +0 -20
  215. package/components/ImageSwatch/ImageSwatch.stories.d.ts.map +0 -1
  216. package/components/ImageSwatch/ImageSwatch.stories.jsx +0 -206
  217. package/components/ImageSwatch/ImageSwatch.test.d.ts +0 -3
  218. package/components/ImageSwatch/ImageSwatch.test.d.ts.map +0 -1
  219. package/components/ImageSwatch/ImageSwatch.test.jsx +0 -64
  220. package/components/ImageSwatch/index.d.ts +0 -3
  221. package/components/ImageSwatch/index.d.ts.map +0 -1
  222. package/components/ImageSwatch/index.js +0 -2
  223. package/components/InLineAlert/InLineAlert.d.ts +0 -16
  224. package/components/InLineAlert/InLineAlert.d.ts.map +0 -1
  225. package/components/InLineAlert/InLineAlert.jsx +0 -38
  226. package/components/InLineAlert/InLineAlert.stories.d.ts +0 -86
  227. package/components/InLineAlert/InLineAlert.stories.d.ts.map +0 -1
  228. package/components/InLineAlert/InLineAlert.stories.jsx +0 -193
  229. package/components/InLineAlert/InLineAlert.test.d.ts +0 -3
  230. package/components/InLineAlert/InLineAlert.test.d.ts.map +0 -1
  231. package/components/InLineAlert/InLineAlert.test.jsx +0 -77
  232. package/components/InLineAlert/index.d.ts +0 -3
  233. package/components/InLineAlert/index.d.ts.map +0 -1
  234. package/components/InLineAlert/index.js +0 -2
  235. package/components/Incrementer/Incrementer.d.ts +0 -17
  236. package/components/Incrementer/Incrementer.d.ts.map +0 -1
  237. package/components/Incrementer/Incrementer.jsx +0 -87
  238. package/components/Incrementer/Incrementer.stories.d.ts +0 -10
  239. package/components/Incrementer/Incrementer.stories.d.ts.map +0 -1
  240. package/components/Incrementer/Incrementer.stories.jsx +0 -68
  241. package/components/Incrementer/Incrementer.test.d.ts +0 -3
  242. package/components/Incrementer/Incrementer.test.d.ts.map +0 -1
  243. package/components/Incrementer/Incrementer.test.jsx +0 -112
  244. package/components/Incrementer/index.d.ts +0 -2
  245. package/components/Incrementer/index.d.ts.map +0 -1
  246. package/components/Incrementer/index.js +0 -1
  247. package/components/Input/Input.d.ts +0 -19
  248. package/components/Input/Input.d.ts.map +0 -1
  249. package/components/Input/Input.jsx +0 -73
  250. package/components/Input/Input.stories.d.ts +0 -11
  251. package/components/Input/Input.stories.d.ts.map +0 -1
  252. package/components/Input/Input.stories.jsx +0 -115
  253. package/components/Input/Input.test.d.ts +0 -3
  254. package/components/Input/Input.test.d.ts.map +0 -1
  255. package/components/Input/Input.test.jsx +0 -111
  256. package/components/Input/index.d.ts +0 -3
  257. package/components/Input/index.d.ts.map +0 -1
  258. package/components/Input/index.js +0 -2
  259. package/components/Modal/Modal.d.ts +0 -15
  260. package/components/Modal/Modal.d.ts.map +0 -1
  261. package/components/Modal/Modal.jsx +0 -93
  262. package/components/Modal/Modal.stories.d.ts +0 -56
  263. package/components/Modal/Modal.stories.d.ts.map +0 -1
  264. package/components/Modal/Modal.stories.jsx +0 -189
  265. package/components/Modal/Modal.test.d.ts +0 -3
  266. package/components/Modal/Modal.test.d.ts.map +0 -1
  267. package/components/Modal/Modal.test.jsx +0 -85
  268. package/components/Modal/index.d.ts +0 -2
  269. package/components/Modal/index.d.ts.map +0 -1
  270. package/components/Modal/index.js +0 -14
  271. package/components/Picker/Picker.d.ts +0 -26
  272. package/components/Picker/Picker.d.ts.map +0 -1
  273. package/components/Picker/Picker.jsx +0 -81
  274. package/components/Picker/Picker.stories.d.ts +0 -22
  275. package/components/Picker/Picker.stories.d.ts.map +0 -1
  276. package/components/Picker/Picker.stories.jsx +0 -236
  277. package/components/Picker/Picker.test.d.ts +0 -2
  278. package/components/Picker/Picker.test.d.ts.map +0 -1
  279. package/components/Picker/Picker.test.jsx +0 -190
  280. package/components/Picker/index.d.ts +0 -2
  281. package/components/Picker/index.d.ts.map +0 -1
  282. package/components/Picker/index.js +0 -1
  283. package/components/Price/Price.d.ts +0 -17
  284. package/components/Price/Price.d.ts.map +0 -1
  285. package/components/Price/Price.jsx +0 -24
  286. package/components/Price/Price.stories.d.ts +0 -17
  287. package/components/Price/Price.stories.d.ts.map +0 -1
  288. package/components/Price/Price.stories.jsx +0 -78
  289. package/components/Price/Price.test.d.ts +0 -3
  290. package/components/Price/Price.test.d.ts.map +0 -1
  291. package/components/Price/Price.test.jsx +0 -68
  292. package/components/Price/index.d.ts +0 -2
  293. package/components/Price/index.d.ts.map +0 -1
  294. package/components/Price/index.js +0 -1
  295. package/components/PriceRange/PriceRange.d.ts +0 -17
  296. package/components/PriceRange/PriceRange.d.ts.map +0 -1
  297. package/components/PriceRange/PriceRange.jsx +0 -75
  298. package/components/PriceRange/PriceRange.stories.d.ts +0 -107
  299. package/components/PriceRange/PriceRange.stories.d.ts.map +0 -1
  300. package/components/PriceRange/PriceRange.stories.jsx +0 -210
  301. package/components/PriceRange/PriceRange.test.d.ts +0 -3
  302. package/components/PriceRange/PriceRange.test.d.ts.map +0 -1
  303. package/components/PriceRange/PriceRange.test.jsx +0 -188
  304. package/components/PriceRange/index.d.ts +0 -3
  305. package/components/PriceRange/index.d.ts.map +0 -1
  306. package/components/PriceRange/index.js +0 -2
  307. package/components/PriceSummary/PriceSummary.d.ts +0 -43
  308. package/components/PriceSummary/PriceSummary.d.ts.map +0 -1
  309. package/components/PriceSummary/PriceSummary.jsx +0 -228
  310. package/components/PriceSummary/PriceSummary.stories.d.ts +0 -127
  311. package/components/PriceSummary/PriceSummary.stories.d.ts.map +0 -1
  312. package/components/PriceSummary/PriceSummary.stories.jsx +0 -456
  313. package/components/PriceSummary/PriceSummary.test.d.ts +0 -3
  314. package/components/PriceSummary/PriceSummary.test.d.ts.map +0 -1
  315. package/components/PriceSummary/PriceSummary.test.jsx +0 -275
  316. package/components/PriceSummary/index.d.ts +0 -3
  317. package/components/PriceSummary/index.d.ts.map +0 -1
  318. package/components/PriceSummary/index.js +0 -2
  319. package/components/ProgressSpinner/ProgressSpinner.d.ts +0 -14
  320. package/components/ProgressSpinner/ProgressSpinner.d.ts.map +0 -1
  321. package/components/ProgressSpinner/ProgressSpinner.jsx +0 -31
  322. package/components/ProgressSpinner/ProgressSpinner.stories.d.ts +0 -19
  323. package/components/ProgressSpinner/ProgressSpinner.stories.d.ts.map +0 -1
  324. package/components/ProgressSpinner/ProgressSpinner.stories.jsx +0 -195
  325. package/components/ProgressSpinner/ProgressSpinner.test.d.ts +0 -3
  326. package/components/ProgressSpinner/ProgressSpinner.test.d.ts.map +0 -1
  327. package/components/ProgressSpinner/ProgressSpinner.test.jsx +0 -40
  328. package/components/ProgressSpinner/index.d.ts +0 -3
  329. package/components/ProgressSpinner/index.d.ts.map +0 -1
  330. package/components/ProgressSpinner/index.js +0 -2
  331. package/components/RadioButton/RadioButton.d.ts +0 -15
  332. package/components/RadioButton/RadioButton.d.ts.map +0 -1
  333. package/components/RadioButton/RadioButton.jsx +0 -31
  334. package/components/RadioButton/RadioButton.stories.d.ts +0 -15
  335. package/components/RadioButton/RadioButton.stories.d.ts.map +0 -1
  336. package/components/RadioButton/RadioButton.stories.jsx +0 -92
  337. package/components/RadioButton/RadioButton.test.d.ts +0 -3
  338. package/components/RadioButton/RadioButton.test.d.ts.map +0 -1
  339. package/components/RadioButton/RadioButton.test.jsx +0 -62
  340. package/components/RadioButton/index.d.ts +0 -3
  341. package/components/RadioButton/index.d.ts.map +0 -1
  342. package/components/RadioButton/index.js +0 -2
  343. package/components/Skeleton/Skeleton.d.ts +0 -17
  344. package/components/Skeleton/Skeleton.d.ts.map +0 -1
  345. package/components/Skeleton/Skeleton.jsx +0 -52
  346. package/components/Skeleton/Skeleton.stories.d.ts +0 -67
  347. package/components/Skeleton/Skeleton.stories.d.ts.map +0 -1
  348. package/components/Skeleton/Skeleton.stories.jsx +0 -184
  349. package/components/Skeleton/Skeleton.test.d.ts +0 -3
  350. package/components/Skeleton/Skeleton.test.d.ts.map +0 -1
  351. package/components/Skeleton/Skeleton.test.jsx +0 -62
  352. package/components/Skeleton/index.d.ts +0 -2
  353. package/components/Skeleton/index.d.ts.map +0 -1
  354. package/components/Skeleton/index.js +0 -1
  355. package/components/TextSwatch/TextSwatch.d.ts +0 -18
  356. package/components/TextSwatch/TextSwatch.d.ts.map +0 -1
  357. package/components/TextSwatch/TextSwatch.jsx +0 -56
  358. package/components/TextSwatch/TextSwatch.stories.d.ts +0 -21
  359. package/components/TextSwatch/TextSwatch.stories.d.ts.map +0 -1
  360. package/components/TextSwatch/TextSwatch.stories.jsx +0 -211
  361. package/components/TextSwatch/TextSwatch.test.d.ts +0 -3
  362. package/components/TextSwatch/TextSwatch.test.d.ts.map +0 -1
  363. package/components/TextSwatch/TextSwatch.test.jsx +0 -85
  364. package/components/TextSwatch/index.d.ts +0 -3
  365. package/components/TextSwatch/index.d.ts.map +0 -1
  366. package/components/TextSwatch/index.js +0 -2
  367. package/components/UIProvider/UIProvider.d.ts +0 -18
  368. package/components/UIProvider/UIProvider.d.ts.map +0 -1
  369. package/components/UIProvider/UIProvider.jsx +0 -26
  370. package/components/UIProvider/UIProvider.test.d.ts +0 -2
  371. package/components/UIProvider/UIProvider.test.d.ts.map +0 -1
  372. package/components/UIProvider/UIProvider.test.jsx +0 -9
  373. package/components/UIProvider/index.d.ts +0 -2
  374. package/components/UIProvider/index.d.ts.map +0 -1
  375. package/components/UIProvider/index.js +0 -1
  376. package/components/index.d.ts +0 -34
  377. package/components/index.d.ts.map +0 -1
  378. package/components/index.js +0 -33
  379. package/docs/Design/designBlocks.d.ts +0 -21
  380. package/docs/Design/designBlocks.d.ts.map +0 -1
  381. package/docs/Design/designBlocks.jsx +0 -59
  382. package/docs/Design/getTokenData.d.ts +0 -7
  383. package/docs/Design/getTokenData.d.ts.map +0 -1
  384. package/docs/Design/getTokenData.js +0 -18
  385. package/docs/Design/getTokenData.test.d.ts +0 -2
  386. package/docs/Design/getTokenData.test.d.ts.map +0 -1
  387. package/docs/Design/getTokenData.test.js +0 -92
  388. package/i18n/en_US.json +0 -112
  389. package/i18n/index.d.ts +0 -341
  390. package/i18n/index.d.ts.map +0 -1
  391. package/i18n/index.js +0 -12
  392. package/i18n/index.test.d.ts +0 -2
  393. package/i18n/index.test.d.ts.map +0 -1
  394. package/i18n/index.test.js +0 -11
  395. package/icons/index.d.ts +0 -35
  396. package/icons/index.d.ts.map +0 -1
  397. package/icons/index.js +0 -34
  398. package/lib/classes.d.ts +0 -5
  399. package/lib/classes.d.ts.map +0 -1
  400. package/lib/classes.js +0 -16
  401. package/lib/classes.test.d.ts +0 -2
  402. package/lib/classes.test.d.ts.map +0 -1
  403. package/lib/classes.test.js +0 -18
  404. package/lib/config.d.ts +0 -7
  405. package/lib/config.d.ts.map +0 -1
  406. package/lib/config.js +0 -12
  407. package/lib/config.test.d.ts +0 -2
  408. package/lib/config.test.d.ts.map +0 -1
  409. package/lib/config.test.js +0 -12
  410. package/lib/debounce.d.ts +0 -2
  411. package/lib/debounce.d.ts.map +0 -1
  412. package/lib/debounce.js +0 -7
  413. package/lib/debounce.test.d.ts +0 -2
  414. package/lib/debounce.test.d.ts.map +0 -1
  415. package/lib/debounce.test.js +0 -40
  416. package/lib/deepmerge.d.ts +0 -2
  417. package/lib/deepmerge.d.ts.map +0 -1
  418. package/lib/deepmerge.js +0 -1
  419. package/lib/form-values.d.ts +0 -5
  420. package/lib/form-values.d.ts.map +0 -1
  421. package/lib/form-values.js +0 -17
  422. package/lib/form-values.test.d.ts +0 -2
  423. package/lib/form-values.test.d.ts.map +0 -1
  424. package/lib/form-values.test.jsx +0 -29
  425. package/lib/i18n.d.ts +0 -8
  426. package/lib/i18n.d.ts.map +0 -1
  427. package/lib/i18n.js +0 -9
  428. package/lib/i18n.test.d.ts +0 -2
  429. package/lib/i18n.test.d.ts.map +0 -1
  430. package/lib/i18n.test.jsx +0 -8
  431. package/lib/image-params-keymap.d.ts +0 -4
  432. package/lib/image-params-keymap.d.ts.map +0 -1
  433. package/lib/image-params-keymap.js +0 -19
  434. package/lib/image-params-keymap.test.d.ts +0 -2
  435. package/lib/image-params-keymap.test.d.ts.map +0 -1
  436. package/lib/image-params-keymap.test.js +0 -7
  437. package/lib/index.d.ts +0 -14
  438. package/lib/index.d.ts.map +0 -1
  439. package/lib/index.js +0 -13
  440. package/lib/initializer.d.ts +0 -78
  441. package/lib/initializer.d.ts.map +0 -1
  442. package/lib/initializer.js +0 -93
  443. package/lib/initializer.test.d.ts +0 -2
  444. package/lib/initializer.test.d.ts.map +0 -1
  445. package/lib/initializer.test.js +0 -64
  446. package/lib/render.d.ts +0 -10
  447. package/lib/render.d.ts.map +0 -1
  448. package/lib/render.jsx +0 -34
  449. package/lib/render.test.d.ts +0 -2
  450. package/lib/render.test.d.ts.map +0 -1
  451. package/lib/render.test.jsx +0 -70
  452. package/lib/resolve-image.d.ts +0 -10
  453. package/lib/resolve-image.d.ts.map +0 -1
  454. package/lib/resolve-image.js +0 -57
  455. package/lib/resolve-image.test.d.ts +0 -2
  456. package/lib/resolve-image.test.d.ts.map +0 -1
  457. package/lib/resolve-image.test.jsx +0 -146
  458. package/lib/slot.d.ts +0 -43
  459. package/lib/slot.d.ts.map +0 -1
  460. package/lib/slot.jsx +0 -184
  461. package/lib/slot.test.d.ts +0 -2
  462. package/lib/slot.test.d.ts.map +0 -1
  463. package/lib/slot.test.jsx +0 -325
  464. package/lib/tests.d.ts +0 -4
  465. package/lib/tests.d.ts.map +0 -1
  466. package/lib/tests.jsx +0 -19
  467. package/lib/tests.test.d.ts +0 -2
  468. package/lib/tests.test.d.ts.map +0 -1
  469. package/lib/tests.test.jsx +0 -13
  470. package/lib/types.d.ts +0 -9
  471. package/lib/types.d.ts.map +0 -1
  472. package/lib/types.js +0 -1
  473. package/lib/vcomponent.d.ts +0 -8
  474. package/lib/vcomponent.d.ts.map +0 -1
  475. package/lib/vcomponent.jsx +0 -27
  476. package/lib/vcomponent.test.d.ts +0 -2
  477. package/lib/vcomponent.test.d.ts.map +0 -1
  478. package/lib/vcomponent.test.jsx +0 -51
@@ -1,320 +0,0 @@
1
- import { Accordion, AccordionSection, } from '@adobe/elsie/components/Accordion';
2
- import { Price, Card, Image, CartItem } from '..';
3
- import { expect } from '@storybook/jest';
4
- import { within, userEvent } from '@storybook/testing-library';
5
- import * as Icons from '@adobe/elsie/icons';
6
- const meta = {
7
- title: 'Components/Accordion',
8
- component: Accordion,
9
- tags: ['autodocs'],
10
- parameters: {
11
- layout: 'centered', // centered | fullscreen
12
- },
13
- argTypes: {
14
- actionIconPosition: {
15
- description: 'Position of the action icon',
16
- options: ['left', 'right'],
17
- control: {
18
- type: 'select',
19
- },
20
- defaultValue: 'left',
21
- },
22
- iconOpen: {
23
- description: 'Icon for open button (svg)',
24
- options: Object.keys(Icons),
25
- mapping: Icons,
26
- control: {
27
- type: 'select',
28
- },
29
- defaultValue: 'Minus',
30
- },
31
- iconClose: {
32
- description: 'Icon for close button (svg)',
33
- options: Object.keys(Icons),
34
- mapping: Icons,
35
- control: {
36
- type: 'select',
37
- },
38
- defaultValue: 'Minus',
39
- },
40
- iconLeft: {
41
- description: 'Optional icon on left side (svg)',
42
- options: Object.keys(Icons),
43
- mapping: Icons,
44
- control: {
45
- type: 'select',
46
- },
47
- defaultValue: 'Minus',
48
- },
49
- showIconLeft: {
50
- description: 'Whether or not the display the leftIcon',
51
- type: 'boolean',
52
- defaultValue: {
53
- summary: false,
54
- },
55
- },
56
- },
57
- };
58
- export default meta;
59
- /**
60
- * ```ts
61
- * import { Accordion, AccordionSection } from '@adobe/elsie/components/Accordion';
62
- *
63
- * <Accordion>
64
- * <AccordionSection title={"Title"}><p>Short product details should be kept to 6 lines maximum.</p></AccordionSection>
65
- * </Accordion>
66
- *
67
- * ```
68
- */
69
- export const SingleSection = {
70
- args: {
71
- actionIconPosition: 'right',
72
- iconOpen: Icons.Add,
73
- iconClose: Icons.Minus,
74
- },
75
- render: ({ actionIconPosition, iconOpen, iconClose }) => (<div>
76
- <h2 style={{
77
- font: 'var(--type-body-1-strong-font)',
78
- color: 'var(--color-neutral-800)',
79
- letterSpacing: 'var(--type-body-1-strong-letter-spacing)',
80
- }}>
81
- This is the Accordion Component, this title will be longer in order to
82
- increase width of the story
83
- </h2>
84
-
85
- <Accordion actionIconPosition={actionIconPosition} iconOpen={iconOpen} iconClose={iconClose}>
86
- <AccordionSection title={'Title'}>
87
- <p>Short product details should be kept to 6 lines maximum.</p>
88
- </AccordionSection>
89
- </Accordion>
90
- </div>),
91
- play: async () => {
92
- const canvasElement = document.querySelector('#storybook-root');
93
- const canvas = within(canvasElement);
94
- const loaderIcon = document.querySelector('div[class*="dropin-accordion"]');
95
- await expect(loaderIcon).toBeVisible();
96
- const header = document.querySelector('.dropin-accordion-section__heading');
97
- await expect(header).toHaveTextContent('Title');
98
- await userEvent.click(canvas.getByRole('button'));
99
- const content = document.querySelector('.dropin-accordion-section__content-container');
100
- await expect(content).toBeVisible();
101
- },
102
- };
103
- export const SingleSectionWithLeftIcon = {
104
- args: {
105
- actionIconPosition: 'right',
106
- iconOpen: Icons.Add,
107
- iconClose: Icons.Minus,
108
- iconLeft: Icons.Card,
109
- showIconLeft: true,
110
- },
111
- render: ({ actionIconPosition, iconOpen, iconClose, iconLeft, showIconLeft, }) => (<div>
112
- <h2 style={{
113
- font: 'var(--type-body-1-strong-font)',
114
- color: 'var(--color-neutral-800)',
115
- letterSpacing: 'var(--type-body-1-strong-letter-spacing)',
116
- }}>
117
- This is the Accordion Component, this title will be longer in order to
118
- increase width of the story
119
- </h2>
120
-
121
- <Accordion actionIconPosition={actionIconPosition} iconOpen={iconOpen} iconClose={iconClose}>
122
- <AccordionSection title={'Title'} secondaryText={'Optional Text'} iconLeft={iconLeft} showIconLeft={showIconLeft}>
123
- <p>Short product details should be kept to 6 lines maximum.</p>
124
- </AccordionSection>
125
- </Accordion>
126
- </div>),
127
- play: async () => {
128
- const loaderIcon = document.querySelector('div[class*="dropin-accordion"]');
129
- await expect(loaderIcon).toBeVisible();
130
- const leftHeader = document.querySelector('.dropin-accordion-section__title-container');
131
- await expect(leftHeader).toBeVisible();
132
- await expect(leftHeader).toContainHTML('<svg');
133
- },
134
- };
135
- export const SingleSectionWithOptionalText = {
136
- args: {
137
- actionIconPosition: 'right',
138
- iconOpen: Icons.Add,
139
- iconClose: Icons.Minus,
140
- iconLeft: Icons.Card,
141
- secondaryText: 'Optional Text',
142
- },
143
- argTypes: {
144
- secondaryText: {
145
- description: 'Add text to the button.',
146
- table: {
147
- type: { summary: 'ComponentChildren' },
148
- },
149
- control: 'text',
150
- },
151
- },
152
- render: ({ actionIconPosition, iconOpen, iconClose, iconLeft, secondaryText, }) => (<div>
153
- <h2 style={{
154
- font: 'var(--type-body-1-strong-font)',
155
- color: 'var(--color-neutral-800)',
156
- letterSpacing: 'var(--type-body-1-strong-letter-spacing)',
157
- }}>
158
- This is the Accordion Component, this title will be longer in order to
159
- increase width of the story
160
- </h2>
161
-
162
- <Accordion actionIconPosition={actionIconPosition} iconOpen={iconOpen} iconClose={iconClose}>
163
- <AccordionSection title={'Title'} secondaryText={secondaryText} iconLeft={iconLeft}>
164
- <p>Short product details should be kept to 6 lines maximum.</p>
165
- </AccordionSection>
166
- </Accordion>
167
- </div>),
168
- play: async () => {
169
- const loaderIcon = document.querySelector('div[class*="dropin-accordion"]');
170
- await expect(loaderIcon).toBeVisible();
171
- const secondaryText = document.querySelector('.dropin-accordion-section__secondary-text');
172
- await expect(secondaryText).toBeVisible();
173
- await expect(secondaryText).toHaveTextContent('Optional Text');
174
- },
175
- };
176
- export const SingleSectionWithPrice = {
177
- args: {
178
- actionIconPosition: 'right',
179
- iconOpen: Icons.Add,
180
- iconClose: Icons.Minus,
181
- iconLeft: Icons.Card,
182
- },
183
- render: ({ actionIconPosition, iconOpen, iconClose, iconLeft }) => (<div>
184
- <h2 style={{
185
- font: 'var(--type-body-1-strong-font)',
186
- color: 'var(--color-neutral-800)',
187
- letterSpacing: 'var(--type-body-1-strong-letter-spacing)',
188
- }}>
189
- This is the Accordion Component, this title will be longer in order to
190
- increase width of the story
191
- </h2>
192
-
193
- <Accordion actionIconPosition={actionIconPosition} iconOpen={iconOpen} iconClose={iconClose}>
194
- <AccordionSection title={'Title'} iconLeft={iconLeft} secondaryText={<Price amount={9.99}/>}>
195
- <p>Short product details should be kept to 6 lines maximum.</p>
196
- </AccordionSection>
197
- </Accordion>
198
- </div>),
199
- play: async () => {
200
- const loaderIcon = document.querySelector('div[class*="dropin-accordion"]');
201
- await expect(loaderIcon).toBeVisible();
202
- const secondaryText = document.querySelector('.dropin-accordion-section__secondary-text');
203
- await expect(secondaryText).toBeVisible();
204
- await expect(secondaryText).toHaveTextContent('$9.99');
205
- },
206
- };
207
- export const SingleSectionWithLinkAndCartItem = {
208
- args: {
209
- actionIconPosition: 'left',
210
- iconOpen: Icons.ChevronDown,
211
- iconClose: Icons.ChevronUp,
212
- },
213
- render: ({ actionIconPosition, iconOpen, iconClose }) => (<div>
214
- <h2 style={{
215
- font: 'var(--type-body-1-strong-font)',
216
- color: 'var(--color-neutral-800)',
217
- letterSpacing: 'var(--type-body-1-strong-letter-spacing)',
218
- }}>
219
- This is the Accordion Component, this title will be longer in order to
220
- increase width of the story
221
- </h2>
222
-
223
- <Accordion actionIconPosition={actionIconPosition} iconOpen={iconOpen} iconClose={iconClose}>
224
- <AccordionSection title={'Title'} secondaryText={<a rel="noreferrer" href="/cart">
225
- Edit
226
- </a>}>
227
- <CartItem key={'uuid'} title={<div>Short Name</div>} description={<div>
228
- Secondary product information such as brand name, description,
229
- etc.
230
- </div>} sku={<div>SKU: 59YK7</div>} quantity={1} image={<Image src="https://picsum.photos/132/184" width="132" height="184" alt="Some alternative text" loading="lazy"/>} price={<Price amount={53.99} style={{ fontWeight: 'inherit', color: 'inherit' }}/>} total={<>
231
- <Price amount={59.98} variant="strikethrough"/>
232
- <Price amount={55.95} sale/>
233
- </>}/>
234
- </AccordionSection>
235
- </Accordion>
236
- </div>),
237
- play: async () => {
238
- const accordionElement = document.querySelector('.dropin-accordion');
239
- const link = accordionElement.querySelector('.dropin-accordion a');
240
- await expect(accordionElement).toBeVisible();
241
- await expect(link).toHaveTextContent('Edit');
242
- await expect(link).toHaveAttribute('href', '/cart');
243
- },
244
- };
245
- export const MultipleSection = {
246
- args: {
247
- actionIconPosition: 'right',
248
- iconOpen: Icons.ChevronDown,
249
- iconClose: Icons.ChevronUp,
250
- iconLeft: Icons.Card,
251
- showIconLeft: false,
252
- },
253
- argTypes: {
254
- showIconLeft: {
255
- table: {
256
- disable: true,
257
- },
258
- },
259
- iconLeft: {
260
- table: {
261
- disable: true,
262
- },
263
- },
264
- },
265
- render: ({ actionIconPosition, iconOpen, iconClose }) => (<div>
266
- <h2 style={{
267
- font: 'var(--type-body-1-strong-font)',
268
- color: 'var(--color-neutral-800)',
269
- letterSpacing: 'var(--type-body-1-strong-letter-spacing)',
270
- }}>
271
- This is the Accordion Component, this title will be longer in order to
272
- increase width of the story
273
- </h2>
274
-
275
- <Accordion actionIconPosition={actionIconPosition} iconOpen={iconOpen} iconClose={iconClose}>
276
- <AccordionSection title={'Cart summary'} iconLeft={Icons.Cart} showIconLeft={true} renderContentWhenClosed={false}>
277
- <Card>
278
- <h2 style={{ font: 'var(--type-headline-2-strong-font)' }}>
279
- Title
280
- </h2>
281
- <p style={{ font: 'var(--type-body-2-default-font)' }}>
282
- This is a short description of the item and should be kept to two
283
- or three lines as maximum.
284
- </p>
285
- </Card>
286
- </AccordionSection>
287
- <AccordionSection title={'Card info'} iconLeft={Icons.Card} showIconLeft={true} secondaryText={'Optional Text'} renderContentWhenClosed={false}>
288
- <p>
289
- Short product details should be kept to 6 lines maximum.
290
- <br />
291
- Short product details should be kept to 6 lines maximum.
292
- <br />
293
- Short product details should be kept to 6 lines maximum.
294
- <br />
295
- Short product details should be kept to 6 lines maximum.
296
- <br />
297
- Short product details should be kept to 6 lines maximum.
298
- <br />
299
- </p>
300
- </AccordionSection>
301
- <AccordionSection title={'Wallet'} iconLeft={Icons.Wallet} showIconLeft={true}>
302
- <p>Short product details should be kept to 6 lines maximum.</p>
303
- </AccordionSection>
304
- <AccordionSection title={'Shipping'} iconLeft={Icons.Delivery} showIconLeft={true}>
305
- <p>Short product details should be kept to 6 lines maximum.</p>
306
- </AccordionSection>
307
- <AccordionSection title={'Notes'} iconLeft={Icons.Delivery} showIconLeft={false}>
308
- <p>Short product details should be kept to 6 lines maximum.</p>
309
- </AccordionSection>
310
- </Accordion>
311
- </div>),
312
- play: async () => {
313
- const loaderIcon = document.querySelector('div[class*="dropin-accordion"]');
314
- await expect(loaderIcon).toBeVisible();
315
- const section = document.querySelector('.dropin-accordion-section');
316
- await expect(section).toBeVisible();
317
- const divider = document.querySelector('.dropin-divider');
318
- await expect(divider).toBeVisible();
319
- },
320
- };
@@ -1,3 +0,0 @@
1
- /** https://preactjs.com/guide/v10/preact-testing-library/ */
2
- export {};
3
- //# sourceMappingURL=Accordion.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Accordion.test.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/Accordion.test.tsx"],"names":[],"mappings":"AAAA,6DAA6D"}
@@ -1,79 +0,0 @@
1
- /** https://preactjs.com/guide/v10/preact-testing-library/ */
2
- import { render, fireEvent, act } from '@adobe/elsie/lib/tests';
3
- import { Accordion, AccordionSection } from '@adobe/elsie/components/Accordion';
4
- describe('Base/Components/Accordion', () => {
5
- test('renders', () => {
6
- const { container } = render(<Accordion>
7
- <AccordionSection title={'Title'}>
8
- <span>Content goes here</span>
9
- </AccordionSection>
10
- </Accordion>);
11
- const element = container.querySelector('.dropin-accordion');
12
- expect(element).toMatchSnapshot();
13
- });
14
- test('renders and open', () => {
15
- const mockOnStateChange = jest.fn();
16
- const { container } = render(<Accordion>
17
- <AccordionSection showIconLeft={true} title={'Title'} onStateChange={mockOnStateChange}>
18
- <span>Content goes here</span>
19
- </AccordionSection>
20
- <AccordionSection showIconLeft={true} title={'Title2'} secondaryText={'Optional Text'}>
21
- <span>Content goes here2</span>
22
- </AccordionSection>
23
- </Accordion>);
24
- const button = container.querySelector('.dropin-accordion-section__flex');
25
- expect(button).not.toBeNull();
26
- act(() => {
27
- fireEvent.click(button);
28
- });
29
- expect(mockOnStateChange).toHaveBeenCalledTimes(1);
30
- const element_new = container.querySelector('.dropin-accordion');
31
- expect(element_new).toMatchSnapshot();
32
- });
33
- test('renders different sections with action icon on different positions', () => {
34
- const mockOnStateChange = jest.fn();
35
- const { container } = render(<>
36
- <AccordionSection showIconLeft={true} title={'Title1'} onStateChange={mockOnStateChange} actionIconPosition={'right'}>
37
- <span>Content goes here1</span>
38
- </AccordionSection>
39
- <AccordionSection showIconLeft={true} title={'Title2'} onStateChange={mockOnStateChange} actionIconPosition={'left'}>
40
- <span>Content goes here2</span>
41
- </AccordionSection>
42
- <AccordionSection showIconLeft={true} title={'Title3'} onStateChange={mockOnStateChange}>
43
- <span>Content goes here3</span>
44
- </AccordionSection>
45
- </>);
46
- const element = container.querySelector('.dropin-accordion-section');
47
- expect(!!container).toEqual(true);
48
- expect(container).toMatchSnapshot();
49
- expect(element).not.toBeNull();
50
- const actionButton = container.querySelector('.dropin-accordion-section__open-icon');
51
- expect(actionButton).not.toBeNull();
52
- act(() => {
53
- fireEvent.click(actionButton);
54
- });
55
- expect(mockOnStateChange).toHaveBeenCalledTimes(1);
56
- });
57
- test('should render content when section is closed and renderContentWhenClosed is true', () => {
58
- const { container } = render(<Accordion>
59
- <AccordionSection title={'Title'} renderContentWhenClosed={true}>
60
- <span id="content">Content goes here</span>
61
- </AccordionSection>
62
- </Accordion>);
63
- const element = container.querySelector('.dropin-accordion');
64
- expect(element).toMatchSnapshot();
65
- const content = container.querySelector('#content');
66
- expect(content).not.toBeNull();
67
- });
68
- test('should not render content when section is closed and renderContentWhenClosed is false', () => {
69
- const { container } = render(<Accordion>
70
- <AccordionSection title={'Title'} renderContentWhenClosed={false}>
71
- <span id="content">Content goes here</span>
72
- </AccordionSection>
73
- </Accordion>);
74
- const element = container.querySelector('.dropin-accordion');
75
- expect(element).toMatchSnapshot();
76
- const content = container.querySelector('#content');
77
- expect(content).toBeNull();
78
- });
79
- });
@@ -1,3 +0,0 @@
1
- export * from '@adobe/elsie/components/Accordion/Accordion';
2
- export { Accordion as default } from '@adobe/elsie/components/Accordion/Accordion';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Accordion/index.ts"],"names":[],"mappings":"AAAA,cAAc,6CAA6C,CAAC;AAC5D,OAAO,EAAE,SAAS,IAAI,OAAO,EAAE,MAAM,6CAA6C,CAAC"}
@@ -1,2 +0,0 @@
1
- export * from '@adobe/elsie/components/Accordion/Accordion';
2
- export { Accordion as default } from '@adobe/elsie/components/Accordion/Accordion';
@@ -1,11 +0,0 @@
1
- import { ComponentChildren, FunctionComponent, VNode } from 'preact';
2
- import { HTMLAttributes } from 'preact/compat';
3
- import '@adobe/elsie/components/ActionButton/ActionButton.css';
4
- export interface ActionButtonProps extends Omit<HTMLAttributes<HTMLButtonElement>, 'icon'> {
5
- children?: ComponentChildren;
6
- icon?: VNode<HTMLAttributes<SVGSVGElement>>;
7
- active?: boolean;
8
- disabled?: boolean;
9
- }
10
- export declare const ActionButton: FunctionComponent<ActionButtonProps>;
11
- //# sourceMappingURL=ActionButton.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActionButton.d.ts","sourceRoot":"","sources":["../../../src/components/ActionButton/ActionButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,OAAO,uDAAuD,CAAC;AAE/D,MAAM,WAAW,iBACf,SAAQ,IAAI,CAAC,cAAc,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAC;IACvD,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAC7B,IAAI,CAAC,EAAE,KAAK,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC,CAAC;IAC5C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,YAAY,EAAE,iBAAiB,CAAC,iBAAiB,CA8B7D,CAAC"}
@@ -1,14 +0,0 @@
1
- import { VComponent, classes } from '@adobe/elsie/lib';
2
- import '@adobe/elsie/components/ActionButton/ActionButton.css';
3
- export const ActionButton = ({ icon, className, children, active = false, disabled = false, ...props }) => {
4
- return (<button role="button" disabled={disabled} {...props} className={classes([
5
- 'dropin-action-button',
6
- ['dropin-action-button--active', active],
7
- ['dropin-action-button--disabled', disabled],
8
- className,
9
- ])}>
10
- {icon && (<VComponent node={icon} className={classes(['dropin-action-button-icon'])}/>)}
11
- {children &&
12
- (typeof children === 'string' ? <span>{children}</span> : children)}
13
- </button>);
14
- };
@@ -1,16 +0,0 @@
1
- import type { Meta, StoryObj } from '@storybook/preact';
2
- import { ActionButtonProps } from '@adobe/elsie/components/ActionButton';
3
- /**
4
- * Use Action Buttons to let users complete actions or select items in a workflow.
5
- */
6
- declare const meta: Meta<ActionButtonProps>;
7
- export default meta;
8
- type Story = StoryObj<ActionButtonProps>;
9
- export declare const Default: Story;
10
- export declare const IconOnly: Story;
11
- export declare const WithIcon: Story;
12
- export declare const Disabled: Story;
13
- export declare const Active: Story;
14
- export declare const DisabledIcon: Story;
15
- export declare const ActiveIcon: Story;
16
- //# sourceMappingURL=ActionButton.stories.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActionButton.stories.d.ts","sourceRoot":"","sources":["../../../src/components/ActionButton/ActionButton.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AACxD,OAAO,EAEL,iBAAiB,EAClB,MAAM,sCAAsC,CAAC;AAO9C;;GAEG;AACH,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,iBAAiB,CAYjC,CAAC;AAEF,eAAe,IAAI,CAAC;AAEpB,KAAK,KAAK,GAAG,QAAQ,CAAC,iBAAiB,CAAC,CAAC;AAEzC,eAAO,MAAM,OAAO,EAAE,KAcrB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KA4BtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KA2BtB,CAAC;AAEF,eAAO,MAAM,QAAQ,EAAE,KAiBtB,CAAC;AAEF,eAAO,MAAM,MAAM,EAAE,KAMpB,CAAC;AAEF,eAAO,MAAM,YAAY,EAAE,KAiB1B,CAAC;AAEF,eAAO,MAAM,UAAU,EAAE,KAMxB,CAAC"}
@@ -1,119 +0,0 @@
1
- import { ActionButton as component, } from '@adobe/elsie/components/ActionButton';
2
- import { Add } from '@adobe/elsie/icons';
3
- import { Icon } from '@adobe/elsie/components/Icon';
4
- import { IconsList } from '@adobe/elsie/components/Icon/Icon.stories.helpers';
5
- import { within } from '@storybook/testing-library';
6
- import { expect } from '@storybook/jest';
7
- /**
8
- * Use Action Buttons to let users complete actions or select items in a workflow.
9
- */
10
- const meta = {
11
- title: 'Components/ActionButton',
12
- component,
13
- argTypes: {
14
- icon: {
15
- options: Object.keys(IconsList),
16
- mapping: IconsList,
17
- control: {
18
- type: 'select',
19
- },
20
- },
21
- },
22
- };
23
- export default meta;
24
- export const Default = {
25
- name: 'Action Button',
26
- args: {
27
- children: 'Action',
28
- active: false,
29
- disabled: false,
30
- },
31
- play: async ({ canvasElement }) => {
32
- const canvas = within(canvasElement);
33
- await expect(await canvas.findByRole('button')).toBeVisible();
34
- await expect(await canvas.findByRole('button')).toHaveClass('dropin-action-button');
35
- },
36
- };
37
- export const IconOnly = {
38
- name: 'Icon Action Button',
39
- args: {
40
- ...Default.args,
41
- children: '',
42
- 'aria-label': 'Action Button',
43
- icon: (<Icon source={Add} size="32" className="storybook_icon" stroke="1" viewBox="0 0 24 24"/>),
44
- },
45
- play: async ({ canvasElement }) => {
46
- const canvas = within(canvasElement);
47
- const buttonIcon = document.querySelector('.dropin-action-button-icon');
48
- const addIcon = document.querySelector('g[data-name="Add icon"]');
49
- await expect(await canvas.findByRole('button')).toBeVisible();
50
- await expect(await buttonIcon).toBeVisible();
51
- await expect(await addIcon).toBeVisible();
52
- },
53
- };
54
- export const WithIcon = {
55
- name: 'Action Button With Icon',
56
- args: {
57
- ...Default.args,
58
- icon: (<Icon source={Add} size="32" className="storybook_icon" stroke="1" viewBox="0 0 24 24"/>),
59
- },
60
- play: async ({ canvasElement }) => {
61
- const canvas = within(canvasElement);
62
- const buttonIcon = document.querySelector('.dropin-action-button-icon');
63
- const addIcon = document.querySelector('g[data-name="Add icon"]');
64
- await expect(await canvas.findByRole('button')).toBeVisible();
65
- await expect(await buttonIcon).toBeVisible();
66
- await expect(await addIcon).toBeVisible();
67
- await expect(await canvas.getByText('Action')).toBeVisible();
68
- },
69
- };
70
- export const Disabled = {
71
- name: 'Disabled Action Button',
72
- parameters: {
73
- a11y: {
74
- config: {
75
- rules: [{ id: 'color-contrast', enabled: false }],
76
- },
77
- },
78
- },
79
- args: {
80
- ...Default.args,
81
- disabled: true,
82
- },
83
- play: async ({ canvasElement }) => {
84
- const canvas = within(canvasElement);
85
- await expect(await canvas.findByRole('button')).toBeDisabled();
86
- },
87
- };
88
- export const Active = {
89
- name: 'Active Action Button',
90
- args: {
91
- ...Default.args,
92
- active: true,
93
- },
94
- };
95
- export const DisabledIcon = {
96
- name: 'Disabled Action Button With Icon',
97
- parameters: {
98
- a11y: {
99
- config: {
100
- rules: [{ id: 'color-contrast', enabled: false }],
101
- },
102
- },
103
- },
104
- args: {
105
- ...WithIcon.args,
106
- disabled: true,
107
- },
108
- play: async ({ canvasElement }) => {
109
- const canvas = within(canvasElement);
110
- await expect(await canvas.findByRole('button')).toBeDisabled();
111
- },
112
- };
113
- export const ActiveIcon = {
114
- name: 'Active Action Button With Icon',
115
- args: {
116
- ...WithIcon.args,
117
- active: true,
118
- },
119
- };
@@ -1,3 +0,0 @@
1
- /** https://preactjs.com/guide/v10/preact-testing-library/ */
2
- export {};
3
- //# sourceMappingURL=ActionButton.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActionButton.test.d.ts","sourceRoot":"","sources":["../../../src/components/ActionButton/ActionButton.test.tsx"],"names":[],"mappings":"AAAA,6DAA6D"}
@@ -1,47 +0,0 @@
1
- /** https://preactjs.com/guide/v10/preact-testing-library/ */
2
- import { render } from '@adobe/elsie/lib/tests';
3
- import { ActionButton } from '@adobe/elsie/components/ActionButton';
4
- describe('Base/Components/ActionButton', () => {
5
- test('renders', () => {
6
- const { container } = render(<ActionButton />);
7
- const elem = container.querySelector('.dropin-action-button');
8
- expect(!!elem).toEqual(true);
9
- });
10
- // test rendering of button with text
11
- test('renders with text', () => {
12
- const { container } = render(<ActionButton children="test"/>);
13
- const elem = container.querySelector('.dropin-action-button');
14
- expect(elem.classList.contains('dropin-action-button')).toEqual(true);
15
- });
16
- // test rendering of button with children components
17
- test('renders with children', () => {
18
- const { container } = render(<ActionButton children={<span>test</span>}/>);
19
- const elem = container.querySelector('.dropin-action-button');
20
- expect(elem.classList.contains('dropin-action-button')).toEqual(true);
21
- });
22
- // test rendering of button with icon only
23
- test('renders with icon only', () => {
24
- const { container } = render(<ActionButton icon={<div>icon</div>} children=""/>);
25
- const elem2 = container.querySelector('.dropin-action-button-icon');
26
- expect(elem2.classList.contains('dropin-action-button-icon')).toEqual(true);
27
- });
28
- // test rendering of button with text and icon
29
- test('renders with text and icon', () => {
30
- const { container } = render(<ActionButton icon={<div>icon</div>} children="test"/>);
31
- const elem = container.querySelector('.dropin-action-button-icon');
32
- expect(elem.classList.contains('dropin-action-button-icon')).toEqual(true);
33
- const elem2 = container.querySelector('.dropin-action-button');
34
- expect(elem2.classList.contains('dropin-action-button')).toEqual(true);
35
- });
36
- test('renders disabled', () => {
37
- const { container } = render(<ActionButton disabled={true}/>);
38
- const elem = container.querySelector('.dropin-action-button');
39
- expect(elem.disabled).toEqual(true);
40
- expect(elem.classList.contains('dropin-action-button--disabled')).toEqual(true);
41
- });
42
- test('renders active', () => {
43
- const { container } = render(<ActionButton active={true}/>);
44
- const elem = container.querySelector('.dropin-action-button');
45
- expect(elem.classList.contains('dropin-action-button--active')).toEqual(true);
46
- });
47
- });
@@ -1,2 +0,0 @@
1
- export * from '@adobe/elsie/components/ActionButton/ActionButton';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ActionButton/index.ts"],"names":[],"mappings":"AAAA,cAAc,mDAAmD,CAAC"}
@@ -1 +0,0 @@
1
- export * from '@adobe/elsie/components/ActionButton/ActionButton';