@designcrowd/fe-shared-lib 1.0.10 → 1.0.11

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 (514) hide show
  1. package/.eslintrc.js +35 -35
  2. package/.prettierrc.js +7 -7
  3. package/.storybook/main.ts +39 -39
  4. package/.storybook/preview-head-master.html +4 -4
  5. package/.storybook/preview-head-publish-master.html +4 -4
  6. package/.storybook/preview-head-publish.html +9 -9
  7. package/.storybook/preview-head.html +9 -9
  8. package/.storybook/preview.js +14 -14
  9. package/Dockerfile +41 -41
  10. package/README.md +103 -103
  11. package/buildspec.yml +46 -46
  12. package/index.cjs +16 -16
  13. package/index.js +54 -54
  14. package/package.json +109 -109
  15. package/postcss.config.js +5 -5
  16. package/src/atoms/components/Button/Button.vue +323 -323
  17. package/src/atoms/components/Button/ButtonVariant.mixin.vue +126 -126
  18. package/src/atoms/components/Button/Buttons.stories.js +778 -778
  19. package/src/atoms/components/Button/ButtonsCrazyDomains.stories.js +117 -117
  20. package/src/atoms/components/Button/variants/ButtonDarkModePill.vue +52 -52
  21. package/src/atoms/components/Button/variants/ButtonFlat.vue +65 -65
  22. package/src/atoms/components/Button/variants/ButtonGray.vue +64 -64
  23. package/src/atoms/components/Button/variants/ButtonInfo.vue +51 -51
  24. package/src/atoms/components/Button/variants/ButtonInfoFilled.vue +63 -63
  25. package/src/atoms/components/Button/variants/ButtonNoBorder.vue +65 -65
  26. package/src/atoms/components/Button/variants/ButtonOutline.vue +62 -62
  27. package/src/atoms/components/Button/variants/ButtonOutlineNoHover.vue +62 -62
  28. package/src/atoms/components/Button/variants/ButtonOutlineSuccess.vue +54 -54
  29. package/src/atoms/components/Button/variants/ButtonPill.vue +52 -52
  30. package/src/atoms/components/Button/variants/ButtonPrimary.vue +69 -69
  31. package/src/atoms/components/Button/variants/ButtonPrimaryWithIcon.vue +68 -68
  32. package/src/atoms/components/Button/variants/ButtonSecondary.vue +51 -51
  33. package/src/atoms/components/Button/variants/ButtonSuccess.vue +55 -55
  34. package/src/atoms/components/Button/variants/ButtonWarning.vue +65 -65
  35. package/src/atoms/components/Button/variants/crazy-domains/ButtonCrazyDomainsOutline.vue +58 -58
  36. package/src/atoms/components/Button/variants/crazy-domains/ButtonCrazyDomainsPrimary.vue +38 -38
  37. package/src/atoms/components/ButtonGroup/ButtonGroup.stories.js +562 -562
  38. package/src/atoms/components/ButtonGroup/ButtonGroup.vue +188 -188
  39. package/src/atoms/components/Carousel/Carousel.fixtures.js +35 -35
  40. package/src/atoms/components/Carousel/Carousel.vue +352 -352
  41. package/src/atoms/components/Carousel/carousel.stories.js +261 -261
  42. package/src/atoms/components/Checkbox/Checkbox.mixin.js +57 -57
  43. package/src/atoms/components/Checkbox/Checkbox.stories.js +206 -206
  44. package/src/atoms/components/Checkbox/Checkbox.vue +89 -89
  45. package/src/atoms/components/Checktile/Checktile.stories.js +79 -79
  46. package/src/atoms/components/Checktile/Checktile.vue +73 -73
  47. package/src/atoms/components/CollapsiblePanel/CollapsiblePanel.mixin.js +34 -34
  48. package/src/atoms/components/CollapsiblePanel/CollapsiblePanel.stories.js +40 -40
  49. package/src/atoms/components/CollapsiblePanel/CollapsiblePanel.vue +30 -30
  50. package/src/atoms/components/ColorPicker/ColorPicker.stories.js +89 -89
  51. package/src/atoms/components/ColorPicker/ColorPicker.vue +95 -95
  52. package/src/atoms/components/CopyToClipboardText/CopyToClipboardText.stories.js +41 -41
  53. package/src/atoms/components/CopyToClipboardText/CopyToClipboardText.vue +71 -71
  54. package/src/atoms/components/Dropdown/Dropdown.stories.js +140 -140
  55. package/src/atoms/components/Dropdown/Dropdown.vue +108 -108
  56. package/src/atoms/components/Dropdown/DropdownItem.vue +21 -21
  57. package/src/atoms/components/FormControl/FormControl.mixin.js +127 -127
  58. package/src/atoms/components/HelloBar/HelloBar.stories.js +195 -195
  59. package/src/atoms/components/HelloBar/HelloBar.vue +156 -156
  60. package/src/atoms/components/Icon/Icon.stories.js +385 -385
  61. package/src/atoms/components/Icon/Icon.vue +809 -802
  62. package/src/atoms/components/Icon/icons/add-page.vue +6 -6
  63. package/src/atoms/components/Icon/icons/ai.vue +6 -6
  64. package/src/atoms/components/Icon/icons/arrow-down.vue +6 -6
  65. package/src/atoms/components/Icon/icons/arrow-left.vue +7 -7
  66. package/src/atoms/components/Icon/icons/arrow-right.vue +7 -7
  67. package/src/atoms/components/Icon/icons/arrow-top-right.vue +6 -6
  68. package/src/atoms/components/Icon/icons/arrow-up-underline.vue +7 -7
  69. package/src/atoms/components/Icon/icons/arrow-up.vue +7 -7
  70. package/src/atoms/components/Icon/icons/attach.vue +6 -6
  71. package/src/atoms/components/Icon/icons/auth-facebook-white.vue +17 -17
  72. package/src/atoms/components/Icon/icons/auth-facebook.vue +24 -24
  73. package/src/atoms/components/Icon/icons/auth-google.vue +32 -32
  74. package/src/atoms/components/Icon/icons/background.vue +7 -7
  75. package/src/atoms/components/Icon/icons/banner-centered.vue +6 -6
  76. package/src/atoms/components/Icon/icons/banner-left.vue +6 -6
  77. package/src/atoms/components/Icon/icons/banner.vue +7 -7
  78. package/src/atoms/components/Icon/icons/bc-mast.vue +7 -7
  79. package/src/atoms/components/Icon/icons/brush.vue +6 -6
  80. package/src/atoms/components/Icon/icons/business-card-filled.vue +5 -5
  81. package/src/atoms/components/Icon/icons/business.vue +6 -6
  82. package/src/atoms/components/Icon/icons/calendar.vue +5 -5
  83. package/src/atoms/components/Icon/icons/callout-error.vue +6 -6
  84. package/src/atoms/components/Icon/icons/callout-info.vue +6 -6
  85. package/src/atoms/components/Icon/icons/callout-success.vue +8 -8
  86. package/src/atoms/components/Icon/icons/callout-warning.vue +6 -6
  87. package/src/atoms/components/Icon/icons/card.vue +9 -9
  88. package/src/atoms/components/Icon/icons/cart-empty.vue +9 -9
  89. package/src/atoms/components/Icon/icons/check-thin.vue +7 -7
  90. package/src/atoms/components/Icon/icons/check.vue +3 -3
  91. package/src/atoms/components/Icon/icons/chevron-down.vue +7 -7
  92. package/src/atoms/components/Icon/icons/chevron-left.vue +7 -7
  93. package/src/atoms/components/Icon/icons/chevron-right-wide.vue +3 -3
  94. package/src/atoms/components/Icon/icons/chevron-right.vue +3 -3
  95. package/src/atoms/components/Icon/icons/chevron-up.vue +7 -7
  96. package/src/atoms/components/Icon/icons/close.vue +6 -6
  97. package/src/atoms/components/Icon/icons/community.vue +5 -5
  98. package/src/atoms/components/Icon/icons/contact-message.vue +10 -10
  99. package/src/atoms/components/Icon/icons/content.vue +7 -7
  100. package/src/atoms/components/Icon/icons/copy.vue +10 -10
  101. package/src/atoms/components/Icon/icons/crazy-domains/filter.vue +6 -6
  102. package/src/atoms/components/Icon/icons/crazy-domains/globe.vue +6 -6
  103. package/src/atoms/components/Icon/icons/crazy-domains/home.vue +6 -6
  104. package/src/atoms/components/Icon/icons/crazy-domains/social-facebook.vue +6 -6
  105. package/src/atoms/components/Icon/icons/crazy-domains/social-google.vue +6 -6
  106. package/src/atoms/components/Icon/icons/crazy-domains/social-instagram.vue +6 -6
  107. package/src/atoms/components/Icon/icons/crazy-domains/social-twitter.vue +6 -6
  108. package/src/atoms/components/Icon/icons/crazy-domains/social-youtube.vue +6 -6
  109. package/src/atoms/components/Icon/icons/crop.vue +6 -6
  110. package/src/atoms/components/Icon/icons/delete.vue +8 -8
  111. package/src/atoms/components/Icon/icons/designs.vue +6 -6
  112. package/src/atoms/components/Icon/icons/desktop.vue +7 -7
  113. package/src/atoms/components/Icon/icons/donate.vue +6 -6
  114. package/src/atoms/components/Icon/icons/download.vue +5 -5
  115. package/src/atoms/components/Icon/icons/duplicate.vue +6 -6
  116. package/src/atoms/components/Icon/icons/edit-line.vue +10 -10
  117. package/src/atoms/components/Icon/icons/edit.vue +6 -6
  118. package/src/atoms/components/Icon/icons/ellipsis.vue +6 -6
  119. package/src/atoms/components/Icon/icons/envelope-email.vue +9 -9
  120. package/src/atoms/components/Icon/icons/error.vue +8 -8
  121. package/src/atoms/components/Icon/icons/eye-crossed.vue +7 -7
  122. package/src/atoms/components/Icon/icons/fees.vue +6 -6
  123. package/src/atoms/components/Icon/icons/filter.vue +7 -7
  124. package/src/atoms/components/Icon/icons/filters.vue +6 -6
  125. package/src/atoms/components/Icon/icons/flag.vue +6 -6
  126. package/src/atoms/components/Icon/icons/flip-horizontal.vue +7 -7
  127. package/src/atoms/components/Icon/icons/flip-vertical.vue +7 -7
  128. package/src/atoms/components/Icon/icons/folder.vue +6 -6
  129. package/src/atoms/components/Icon/icons/footer-centered.vue +7 -7
  130. package/src/atoms/components/Icon/icons/footer-left.vue +7 -7
  131. package/src/atoms/components/Icon/icons/form-message.vue +6 -6
  132. package/src/atoms/components/Icon/icons/form.vue +5 -5
  133. package/src/atoms/components/Icon/icons/fullscreen-exit.vue +5 -5
  134. package/src/atoms/components/Icon/icons/fullscreen.vue +5 -5
  135. package/src/atoms/components/Icon/icons/globe.vue +6 -6
  136. package/src/atoms/components/Icon/icons/godaddy/logo.vue +5 -5
  137. package/src/atoms/components/Icon/icons/hamburger.vue +7 -7
  138. package/src/atoms/components/Icon/icons/home.vue +7 -7
  139. package/src/atoms/components/Icon/icons/icon-style-circle-bg.vue +22 -22
  140. package/src/atoms/components/Icon/icons/icon-style-no-bg.vue +16 -16
  141. package/src/atoms/components/Icon/icons/icon-style-square-bg.vue +22 -22
  142. package/src/atoms/components/Icon/icons/image-gallery-carousel.vue +7 -7
  143. package/src/atoms/components/Icon/icons/image-gallery-grid.vue +7 -7
  144. package/src/atoms/components/Icon/icons/image-gallery-masonry.vue +6 -6
  145. package/src/atoms/components/Icon/icons/images-gallery.vue +5 -5
  146. package/src/atoms/components/Icon/icons/images.vue +7 -7
  147. package/src/atoms/components/Icon/icons/info.vue +9 -9
  148. package/src/atoms/components/Icon/icons/jobs.vue +8 -8
  149. package/src/atoms/components/Icon/icons/layer-bring-front.vue +6 -6
  150. package/src/atoms/components/Icon/icons/layer-send-back.vue +6 -6
  151. package/src/atoms/components/Icon/icons/layer.vue +6 -6
  152. package/src/atoms/components/Icon/icons/layout/display-style-about-1.vue +20 -20
  153. package/src/atoms/components/Icon/icons/layout/display-style-about-2.vue +20 -20
  154. package/src/atoms/components/Icon/icons/layout/display-style-about-3.vue +20 -20
  155. package/src/atoms/components/Icon/icons/layout/display-style-about-4.vue +32 -32
  156. package/src/atoms/components/Icon/icons/layout/display-style-about-5.vue +27 -27
  157. package/src/atoms/components/Icon/icons/layout/display-style-about-6.vue +27 -27
  158. package/src/atoms/components/Icon/icons/layout/display-style-banner-1.vue +20 -20
  159. package/src/atoms/components/Icon/icons/layout/display-style-banner-2.vue +20 -20
  160. package/src/atoms/components/Icon/icons/layout/display-style-banner-3.vue +20 -20
  161. package/src/atoms/components/Icon/icons/layout/display-style-banner-4.vue +20 -20
  162. package/src/atoms/components/Icon/icons/layout/display-style-banner-5.vue +20 -20
  163. package/src/atoms/components/Icon/icons/layout/display-style-banner-6.vue +27 -27
  164. package/src/atoms/components/Icon/icons/layout/display-style-banner-7.vue +27 -27
  165. package/src/atoms/components/Icon/icons/layout/display-style-banner-8.vue +20 -20
  166. package/src/atoms/components/Icon/icons/layout/display-style-banner-9.vue +20 -20
  167. package/src/atoms/components/Icon/icons/layout/display-style-contact-1.vue +24 -24
  168. package/src/atoms/components/Icon/icons/layout/display-style-contact-2.vue +24 -24
  169. package/src/atoms/components/Icon/icons/layout/display-style-contact-4.vue +24 -24
  170. package/src/atoms/components/Icon/icons/layout/display-style-contact-5.vue +39 -39
  171. package/src/atoms/components/Icon/icons/layout/display-style-contact-6.vue +39 -39
  172. package/src/atoms/components/Icon/icons/layout/footer/display-style-1.vue +7 -7
  173. package/src/atoms/components/Icon/icons/layout/footer/display-style-2.vue +16 -16
  174. package/src/atoms/components/Icon/icons/layout/header/desktop-hamburger-display-style-1.vue +17 -17
  175. package/src/atoms/components/Icon/icons/layout/header/desktop-hamburger-display-style-2.vue +17 -17
  176. package/src/atoms/components/Icon/icons/layout/header/desktop-tab-display-style-1.vue +17 -17
  177. package/src/atoms/components/Icon/icons/layout/header/desktop-tab-display-style-2.vue +17 -17
  178. package/src/atoms/components/Icon/icons/layout/header/desktop-tab-display-style-3.vue +13 -13
  179. package/src/atoms/components/Icon/icons/layout/header/desktop-tab-display-style-4.vue +13 -13
  180. package/src/atoms/components/Icon/icons/layout/header/desktop-tab-display-style-5.vue +17 -17
  181. package/src/atoms/components/Icon/icons/layout/header/desktop-tab-display-style-6.vue +17 -17
  182. package/src/atoms/components/Icon/icons/layout/header/hamburger-display-style-no-logo-1.vue +16 -16
  183. package/src/atoms/components/Icon/icons/layout/header/hamburger-display-style-no-logo-2.vue +16 -16
  184. package/src/atoms/components/Icon/icons/layout/header/hamburger-display-style-no-logo-3.vue +16 -16
  185. package/src/atoms/components/Icon/icons/layout/header/mobile-hamburger-display-style-1.vue +17 -17
  186. package/src/atoms/components/Icon/icons/layout/header/mobile-hamburger-display-style-2.vue +17 -17
  187. package/src/atoms/components/Icon/icons/layout/header/mobile-hamburger-display-style-3.vue +17 -17
  188. package/src/atoms/components/Icon/icons/layout/header/mobile-hamburger-display-style-4.vue +21 -21
  189. package/src/atoms/components/Icon/icons/layout/header/mobile-tab-display-style-1.vue +17 -17
  190. package/src/atoms/components/Icon/icons/layout/header/mobile-tab-display-style-2.vue +17 -17
  191. package/src/atoms/components/Icon/icons/layout/header/tab-display-style-no-logo-1.vue +16 -16
  192. package/src/atoms/components/Icon/icons/layout/header/tab-display-style-no-logo-2.vue +16 -16
  193. package/src/atoms/components/Icon/icons/layout/header/tab-display-style-no-logo-3.vue +16 -16
  194. package/src/atoms/components/Icon/icons/layout/layout-icon-bottom-normal-text-center-normal.vue +7 -7
  195. package/src/atoms/components/Icon/icons/layout/layout-icon-bottom-normal-text-center-small.vue +7 -7
  196. package/src/atoms/components/Icon/icons/layout/layout-icon-bottom-small-text-center-normal.vue +7 -7
  197. package/src/atoms/components/Icon/icons/layout/layout-icon-center-normal-curved-text-bottom.vue +11 -11
  198. package/src/atoms/components/Icon/icons/layout/layout-icon-center-normal-curved-text-circle.vue +10 -10
  199. package/src/atoms/components/Icon/icons/layout/layout-icon-center-normal-curved-text-top.vue +11 -11
  200. package/src/atoms/components/Icon/icons/layout/layout-icon-left-normal-text-center-normal.vue +7 -7
  201. package/src/atoms/components/Icon/icons/layout/layout-icon-left-normal-text-justify-normal.vue +7 -7
  202. package/src/atoms/components/Icon/icons/layout/layout-icon-left-normal-text-left-normal.vue +7 -7
  203. package/src/atoms/components/Icon/icons/layout/layout-icon-left-small-text-left-normal.vue +7 -7
  204. package/src/atoms/components/Icon/icons/layout/layout-icon-right-normal-text-center-normal.vue +7 -7
  205. package/src/atoms/components/Icon/icons/layout/layout-icon-right-normal-text-justify-normal.vue +7 -7
  206. package/src/atoms/components/Icon/icons/layout/layout-icon-right-normal-text-right-normal.vue +7 -7
  207. package/src/atoms/components/Icon/icons/layout/layout-icon-right-small-text-right-normal.vue +7 -7
  208. package/src/atoms/components/Icon/icons/layout/layout-icon-top-normal-text-center-normal.vue +7 -7
  209. package/src/atoms/components/Icon/icons/layout/layout-icon-top-normal-text-center-small.vue +7 -7
  210. package/src/atoms/components/Icon/icons/layout/layout-icon-top-normal-text-justify-normal.vue +7 -7
  211. package/src/atoms/components/Icon/icons/layout/layout-icon-top-small-text-center-normal.vue +7 -7
  212. package/src/atoms/components/Icon/icons/layout/nav/hamburger/display-style-1.vue +16 -16
  213. package/src/atoms/components/Icon/icons/layout/nav/hamburger/display-style-2.vue +10 -10
  214. package/src/atoms/components/Icon/icons/layout/nav/hamburger/display-style-3.vue +10 -10
  215. package/src/atoms/components/Icon/icons/layout/nav/hamburger/display-style-4.vue +23 -23
  216. package/src/atoms/components/Icon/icons/layout/nav/tab/display-style-1.vue +16 -16
  217. package/src/atoms/components/Icon/icons/layout/nav/tab/display-style-2.vue +7 -7
  218. package/src/atoms/components/Icon/icons/letterhead-filled.vue +5 -5
  219. package/src/atoms/components/Icon/icons/link.vue +6 -6
  220. package/src/atoms/components/Icon/icons/location.vue +6 -6
  221. package/src/atoms/components/Icon/icons/lock.vue +6 -6
  222. package/src/atoms/components/Icon/icons/mac-command.vue +7 -7
  223. package/src/atoms/components/Icon/icons/maker/align-center.vue +7 -7
  224. package/src/atoms/components/Icon/icons/maker/align-justify.vue +7 -7
  225. package/src/atoms/components/Icon/icons/maker/align-left.vue +7 -7
  226. package/src/atoms/components/Icon/icons/maker/align-right.vue +7 -7
  227. package/src/atoms/components/Icon/icons/maker/animate.vue +7 -7
  228. package/src/atoms/components/Icon/icons/maker/bold.vue +7 -7
  229. package/src/atoms/components/Icon/icons/maker/custom-landscape.vue +5 -5
  230. package/src/atoms/components/Icon/icons/maker/email-symbol.vue +5 -5
  231. package/src/atoms/components/Icon/icons/maker/email.vue +5 -5
  232. package/src/atoms/components/Icon/icons/maker/eraser.vue +5 -5
  233. package/src/atoms/components/Icon/icons/maker/etsy.vue +5 -5
  234. package/src/atoms/components/Icon/icons/maker/facebook.vue +5 -5
  235. package/src/atoms/components/Icon/icons/maker/favicon.vue +7 -7
  236. package/src/atoms/components/Icon/icons/maker/flyer.vue +7 -7
  237. package/src/atoms/components/Icon/icons/maker/gift-certificate.vue +5 -5
  238. package/src/atoms/components/Icon/icons/maker/globe.vue +5 -5
  239. package/src/atoms/components/Icon/icons/maker/image.vue +7 -7
  240. package/src/atoms/components/Icon/icons/maker/instagram.vue +7 -7
  241. package/src/atoms/components/Icon/icons/maker/invitation.vue +5 -5
  242. package/src/atoms/components/Icon/icons/maker/invoice.vue +5 -5
  243. package/src/atoms/components/Icon/icons/maker/italic.vue +7 -7
  244. package/src/atoms/components/Icon/icons/maker/link.vue +7 -7
  245. package/src/atoms/components/Icon/icons/maker/linkedin.vue +7 -7
  246. package/src/atoms/components/Icon/icons/maker/menu.vue +5 -5
  247. package/src/atoms/components/Icon/icons/maker/pause.vue +5 -5
  248. package/src/atoms/components/Icon/icons/maker/phone.vue +5 -5
  249. package/src/atoms/components/Icon/icons/maker/pinterest.vue +5 -5
  250. package/src/atoms/components/Icon/icons/maker/play.vue +5 -5
  251. package/src/atoms/components/Icon/icons/maker/postcard.vue +5 -5
  252. package/src/atoms/components/Icon/icons/maker/poster.vue +7 -7
  253. package/src/atoms/components/Icon/icons/maker/profile.vue +5 -5
  254. package/src/atoms/components/Icon/icons/maker/qrcode.vue +5 -5
  255. package/src/atoms/components/Icon/icons/maker/snapchat.vue +5 -5
  256. package/src/atoms/components/Icon/icons/maker/soundcloud.vue +7 -7
  257. package/src/atoms/components/Icon/icons/maker/strikethrough.vue +7 -7
  258. package/src/atoms/components/Icon/icons/maker/text.vue +7 -7
  259. package/src/atoms/components/Icon/icons/maker/thankyou-card.vue +5 -5
  260. package/src/atoms/components/Icon/icons/maker/tiktok.vue +5 -5
  261. package/src/atoms/components/Icon/icons/maker/tumblr.vue +5 -5
  262. package/src/atoms/components/Icon/icons/maker/twitch.vue +7 -7
  263. package/src/atoms/components/Icon/icons/maker/twitter.vue +5 -5
  264. package/src/atoms/components/Icon/icons/maker/underline.vue +7 -7
  265. package/src/atoms/components/Icon/icons/maker/uppercase.vue +14 -14
  266. package/src/atoms/components/Icon/icons/maker/video.vue +5 -5
  267. package/src/atoms/components/Icon/icons/maker/whatsapp.vue +7 -7
  268. package/src/atoms/components/Icon/icons/maker/youtube.vue +5 -5
  269. package/src/atoms/components/Icon/icons/maker/zoom.vue +5 -5
  270. package/src/atoms/components/Icon/icons/map.vue +6 -6
  271. package/src/atoms/components/Icon/icons/message.vue +6 -6
  272. package/src/atoms/components/Icon/icons/minus-circle-light.vue +7 -7
  273. package/src/atoms/components/Icon/icons/minus.vue +3 -3
  274. package/src/atoms/components/Icon/icons/mobile.vue +5 -5
  275. package/src/atoms/components/Icon/icons/opacity.vue +6 -6
  276. package/src/atoms/components/Icon/icons/other.vue +7 -7
  277. package/src/atoms/components/Icon/icons/page-buttons.vue +8 -8
  278. package/src/atoms/components/Icon/icons/page-hamburger.vue +9 -9
  279. package/src/atoms/components/Icon/icons/page-tabs.vue +9 -9
  280. package/src/atoms/components/Icon/icons/pages.vue +6 -6
  281. package/src/atoms/components/Icon/icons/palette.vue +6 -6
  282. package/src/atoms/components/Icon/icons/pause.vue +5 -5
  283. package/src/atoms/components/Icon/icons/payment.vue +8 -8
  284. package/src/atoms/components/Icon/icons/payments-featured.vue +6 -6
  285. package/src/atoms/components/Icon/icons/payments-textonly.vue +8 -8
  286. package/src/atoms/components/Icon/icons/payments-thumbnail.vue +9 -9
  287. package/src/atoms/components/Icon/icons/phone.vue +6 -6
  288. package/src/atoms/components/Icon/icons/plus-circle-light.vue +8 -8
  289. package/src/atoms/components/Icon/icons/plus-circle.vue +7 -7
  290. package/src/atoms/components/Icon/icons/plus.vue +3 -3
  291. package/src/atoms/components/Icon/icons/poll.vue +3 -3
  292. package/src/atoms/components/Icon/icons/portfolio.vue +10 -10
  293. package/src/atoms/components/Icon/icons/preview.vue +6 -6
  294. package/src/atoms/components/Icon/icons/printing.vue +6 -6
  295. package/src/atoms/components/Icon/icons/processing.vue +5 -5
  296. package/src/atoms/components/Icon/icons/question.vue +11 -11
  297. package/src/atoms/components/Icon/icons/ratio-1-1.vue +3 -3
  298. package/src/atoms/components/Icon/icons/ratio-16-9.vue +1 -1
  299. package/src/atoms/components/Icon/icons/ratio-2-3.vue +3 -3
  300. package/src/atoms/components/Icon/icons/ratio-3-2.vue +3 -3
  301. package/src/atoms/components/Icon/icons/ratio-3-4.vue +3 -3
  302. package/src/atoms/components/Icon/icons/ratio-4-3.vue +3 -3
  303. package/src/atoms/components/Icon/icons/ratio-9-16.vue +3 -3
  304. package/src/atoms/components/Icon/icons/ratio-circle.vue +8 -8
  305. package/src/atoms/components/Icon/icons/ratio-original.vue +11 -11
  306. package/src/atoms/components/Icon/icons/redo.vue +6 -6
  307. package/src/atoms/components/Icon/icons/reload.vue +6 -6
  308. package/src/atoms/components/Icon/icons/reorderable.vue +5 -5
  309. package/src/atoms/components/Icon/icons/request-payment.vue +6 -6
  310. package/src/atoms/components/Icon/icons/reset.vue +6 -6
  311. package/src/atoms/components/Icon/icons/search.vue +11 -11
  312. package/src/atoms/components/Icon/icons/secure.vue +7 -7
  313. package/src/atoms/components/Icon/icons/services.vue +7 -7
  314. package/src/atoms/components/Icon/icons/settings.vue +7 -7
  315. package/src/atoms/components/Icon/icons/shape.vue +5 -5
  316. package/src/atoms/components/Icon/icons/share.vue +8 -8
  317. package/src/atoms/components/Icon/icons/shop.vue +5 -5
  318. package/src/atoms/components/Icon/icons/sms.vue +5 -5
  319. package/src/atoms/components/Icon/icons/social-facebook-color.vue +9 -9
  320. package/src/atoms/components/Icon/icons/social-facebook.vue +5 -5
  321. package/src/atoms/components/Icon/icons/social-google.vue +5 -5
  322. package/src/atoms/components/Icon/icons/social-instagram-color.vue +24 -24
  323. package/src/atoms/components/Icon/icons/social-linkedin-color.vue +9 -9
  324. package/src/atoms/components/Icon/icons/social-share.vue +7 -7
  325. package/src/atoms/components/Icon/icons/social-twitter-color.vue +9 -9
  326. package/src/atoms/components/Icon/icons/star-filled.vue +6 -6
  327. package/src/atoms/components/Icon/icons/star-hollow.vue +6 -6
  328. package/src/atoms/components/Icon/icons/styles.vue +5 -5
  329. package/src/atoms/components/Icon/icons/submit.vue +5 -5
  330. package/src/atoms/components/Icon/icons/templates.vue +7 -7
  331. package/src/atoms/components/Icon/icons/text-image-center.vue +6 -6
  332. package/src/atoms/components/Icon/icons/text-image-justified.vue +7 -7
  333. package/src/atoms/components/Icon/icons/text-image-left.vue +9 -9
  334. package/src/atoms/components/Icon/icons/text-image-only.vue +5 -5
  335. package/src/atoms/components/Icon/icons/text-image-right.vue +9 -9
  336. package/src/atoms/components/Icon/icons/text-image.vue +13 -13
  337. package/src/atoms/components/Icon/icons/time.vue +8 -8
  338. package/src/atoms/components/Icon/icons/tooltip-bottom.vue +5 -5
  339. package/src/atoms/components/Icon/icons/tooltip-left.vue +5 -5
  340. package/src/atoms/components/Icon/icons/tooltip-right.vue +5 -5
  341. package/src/atoms/components/Icon/icons/tooltip-top.vue +5 -5
  342. package/src/atoms/components/Icon/icons/undo.vue +6 -6
  343. package/src/atoms/components/Icon/icons/upgrade-alt.vue +7 -7
  344. package/src/atoms/components/Icon/icons/upgrade.vue +9 -9
  345. package/src/atoms/components/Icon/icons/upload-arrow.vue +5 -5
  346. package/src/atoms/components/Icon/icons/upload.vue +5 -5
  347. package/src/atoms/components/Icon/icons/user-accounts.vue +5 -5
  348. package/src/atoms/components/Icon/icons/volume-muted.vue +5 -5
  349. package/src/atoms/components/Icon/icons/volume.vue +5 -5
  350. package/src/atoms/components/Icon/icons/watchlist-filled.vue +14 -14
  351. package/src/atoms/components/Icon/icons/watchlist-hollow-alt.vue +14 -14
  352. package/src/atoms/components/Icon/icons/watchlist-hollow.vue +6 -6
  353. package/src/atoms/components/Icon/icons/website-filled.vue +5 -5
  354. package/src/atoms/components/Icon/icons/website.vue +6 -6
  355. package/src/atoms/components/Icon/icons/wholesale.vue +6 -6
  356. package/src/atoms/components/Icon/icons/zoom-in.vue +5 -5
  357. package/src/atoms/components/Icon/icons/zoom-out.vue +5 -5
  358. package/src/atoms/components/Icon/icons/zoom.vue +11 -11
  359. package/src/atoms/components/Loader/Loader.vue +15 -15
  360. package/src/atoms/components/Masonry/Masonry.stories.js +48 -48
  361. package/src/atoms/components/Masonry/Masonry.vue +48 -48
  362. package/src/atoms/components/Masonry/fixtures.js +589 -589
  363. package/src/atoms/components/Modal/HashRouteModal.stories.js +68 -68
  364. package/src/atoms/components/Modal/HashRouteModal.vue +120 -120
  365. package/src/atoms/components/Modal/Modal.stories.js +303 -303
  366. package/src/atoms/components/Modal/Modal.vue +246 -246
  367. package/src/atoms/components/Notice/Notice.stories.js +174 -174
  368. package/src/atoms/components/Notice/Notice.vue +71 -71
  369. package/src/atoms/components/NumberStepper/NumberStepper.stories.js +51 -51
  370. package/src/atoms/components/NumberStepper/NumberStepper.vue +298 -298
  371. package/src/atoms/components/Picture/Picture.stories.js +90 -90
  372. package/src/atoms/components/Picture/Picture.vue +84 -84
  373. package/src/atoms/components/Picture/picture.fixtures.js +35 -35
  374. package/src/atoms/components/Pill/Pill.stories.js +20 -20
  375. package/src/atoms/components/Pill/Pill.vue +8 -8
  376. package/src/atoms/components/PillBar/PillBar.fixtures.js +941 -941
  377. package/src/atoms/components/PillBar/PillBar.stories.js +39 -39
  378. package/src/atoms/components/PillBar/PillBar.vue +62 -62
  379. package/src/atoms/components/Price/Price.fixtures.js +25 -25
  380. package/src/atoms/components/Price/Price.stories.js +173 -173
  381. package/src/atoms/components/Price/Price.vue +106 -106
  382. package/src/atoms/components/SearchBar/SearchBar.stories.js +21 -21
  383. package/src/atoms/components/SearchBar/SearchBar.vue +51 -51
  384. package/src/atoms/components/Select/Select.stories.js +142 -142
  385. package/src/atoms/components/Select/Select.vue +594 -594
  386. package/src/atoms/components/Select/pointerMixin.js +99 -99
  387. package/src/atoms/components/Select/selectMixin.js +340 -340
  388. package/src/atoms/components/StarRating/StarRating.stories.js +50 -50
  389. package/src/atoms/components/StarRating/StarRating.vue +84 -84
  390. package/src/atoms/components/TabMenu/TabMenu.stories.js +54 -54
  391. package/src/atoms/components/TabMenu/TabMenu.vue +44 -44
  392. package/src/atoms/components/TextCopyField/TextCopyField.stories.js +68 -68
  393. package/src/atoms/components/TextCopyField/TextCopyField.vue +75 -75
  394. package/src/atoms/components/TextInput/TextInput.stories.js +232 -232
  395. package/src/atoms/components/TextInput/TextInput.vue +156 -156
  396. package/src/atoms/components/Textarea/Textarea.stories.js +209 -209
  397. package/src/atoms/components/Textarea/Textarea.vue +109 -109
  398. package/src/atoms/components/Toggle/Toggle.stories.js +176 -176
  399. package/src/atoms/components/Toggle/Toggle.vue +69 -69
  400. package/src/atoms/components/Tooltip/Tooltip.stories.js +493 -493
  401. package/src/atoms/components/Tooltip/Tooltip.vue +196 -196
  402. package/src/atoms/components/design-com/Icon/Icon.stories.js +82 -82
  403. package/src/atoms/components/design-com/Icon/Icon.vue +157 -150
  404. package/src/atoms/components/design-com/Icon/icons/award.vue +7 -7
  405. package/src/atoms/components/design-com/Icon/icons/bulb.vue +7 -7
  406. package/src/atoms/components/design-com/Icon/icons/card.vue +7 -7
  407. package/src/atoms/components/design-com/Icon/icons/check-circle-light.vue +7 -7
  408. package/src/atoms/components/design-com/Icon/icons/chevron-down.vue +7 -7
  409. package/src/atoms/components/design-com/Icon/icons/chevron-left.vue +7 -7
  410. package/src/atoms/components/design-com/Icon/icons/chevron-right.vue +3 -3
  411. package/src/atoms/components/design-com/Icon/icons/chevron-up.vue +7 -7
  412. package/src/atoms/components/design-com/Icon/icons/diamond.vue +7 -7
  413. package/src/atoms/components/design-com/Icon/icons/download.vue +7 -7
  414. package/src/atoms/components/design-com/Icon/icons/file-empty.vue +7 -7
  415. package/src/atoms/components/design-com/Icon/icons/file.vue +7 -7
  416. package/src/atoms/components/design-com/Icon/icons/filter.vue +7 -7
  417. package/src/atoms/components/design-com/Icon/icons/font.vue +7 -7
  418. package/src/atoms/components/design-com/Icon/icons/headphones.vue +7 -7
  419. package/src/atoms/components/design-com/Icon/icons/heart.vue +7 -7
  420. package/src/atoms/components/design-com/Icon/icons/image.vue +7 -7
  421. package/src/atoms/components/design-com/Icon/icons/logo.vue +7 -7
  422. package/src/atoms/components/design-com/Icon/icons/minus-circle-light.vue +7 -7
  423. package/src/atoms/components/design-com/Icon/icons/plus-circle-light.vue +8 -8
  424. package/src/atoms/components/design-com/Icon/icons/question-circle-filled.vue +7 -7
  425. package/src/atoms/components/design-com/Icon/icons/search.vue +7 -7
  426. package/src/atoms/components/design-com/Icon/icons/star-filled.vue +6 -6
  427. package/src/atoms/components/design-com/Icon/icons/star-hollow.vue +6 -6
  428. package/src/atoms/components/design-com/Icon/icons/users.vue +7 -7
  429. package/src/atoms/constants/constants.ts +6 -6
  430. package/src/atoms/mixin/hash-router-mixin.js +68 -68
  431. package/src/atoms/thirdparty-components/VueMasonryWall/VueMasonryWall.vue +280 -280
  432. package/src/atoms/thirdparty-components/VueMasonryWall/maxBy.js +50 -50
  433. package/src/css/tailwind.css +3 -3
  434. package/src/experiences/clients/brand-crowd-api.client.js +104 -104
  435. package/src/experiences/clients/brand-page-api.client.js +30 -30
  436. package/src/experiences/components/AuthFlow/Auth.fixtures.js +4 -4
  437. package/src/experiences/components/AuthFlow/Auth.stories.js +345 -345
  438. package/src/experiences/components/AuthFlow/AuthCrazyDomains.stories.js +60 -60
  439. package/src/experiences/components/AuthFlow/AuthLegal.vue +108 -108
  440. package/src/experiences/components/AuthFlow/AuthModal.vue +39 -39
  441. package/src/experiences/components/AuthFlow/ForgotPassword.vue +210 -210
  442. package/src/experiences/components/AuthFlow/ForgotPasswordModal.vue +68 -68
  443. package/src/experiences/components/AuthFlow/ResetPassword.vue +150 -150
  444. package/src/experiences/components/AuthFlow/ResetPasswordModal.vue +64 -64
  445. package/src/experiences/components/AuthFlow/ResetPasswordSuccessModal.vue +56 -56
  446. package/src/experiences/components/AuthFlow/SignIn.vue +442 -442
  447. package/src/experiences/components/AuthFlow/SignUp.vue +272 -272
  448. package/src/experiences/components/AuthFlow/SignUpModal.vue +90 -90
  449. package/src/experiences/components/AuthFlow/SocialSignIn.vue +177 -177
  450. package/src/experiences/components/AuthFlow/SocialSignInButton.vue +74 -74
  451. package/src/experiences/components/AuthFlow/SubmissionButton.vue +56 -56
  452. package/src/experiences/components/PaymentConfigList/PaymentConfig.mixin.js +91 -91
  453. package/src/experiences/components/PaymentConfigList/PaymentConfigDropdown.vue +121 -121
  454. package/src/experiences/components/PaymentConfigList/PaymentConfigList.stories.js +189 -189
  455. package/src/experiences/components/PaymentConfigList/PaymentConfigList.vue +45 -45
  456. package/src/experiences/components/PublishBrandPageModal/PublishBrandPageCard.vue +115 -115
  457. package/src/experiences/components/PublishBrandPageModal/PublishBrandPageModal.stories.js +203 -203
  458. package/src/experiences/components/PublishBrandPageModal/__fixtures__/data.js +25 -25
  459. package/src/experiences/components/SellDomainNameList/SellDomainNameList.fixtures.js +32 -32
  460. package/src/experiences/components/SellDomainNameList/SellDomainNameList.vue +145 -145
  461. package/src/experiences/components/SellDomainNameListModal/SellDomainNameListModal.stories.js +74 -74
  462. package/src/experiences/components/SellDomainNameListModal/SellDomainNameListModal.vue +124 -124
  463. package/src/experiences/components/SellDomainNameModalApplication/SellDomainNameModalApplication.vue +163 -163
  464. package/src/experiences/components/SellDomainNameSearchResult/SellDomainNameListSearchResult.vue +153 -153
  465. package/src/experiences/components/SellDomainNameSearchWithResults/SellDomainNameSearchWithResults.stories.js +38 -38
  466. package/src/experiences/components/SellDomainNameSearchWithResults/SellDomainNameSearchWithResults.vue +184 -184
  467. package/src/experiences/components/SellDomainNameWidget/SellDomainNameWidget.stories.js +40 -40
  468. package/src/experiences/components/SellDomainNameWidget/SellDomainNameWidget.vue +152 -152
  469. package/src/experiences/components/UploadYourLogoApplication/UploadYourLogoApplication.stories.js +205 -205
  470. package/src/experiences/components/UploadYourLogoApplication/UploadYourLogoApplication.vue +127 -127
  471. package/src/experiences/components/UploadYourLogoDropzone/UploadYourLogoDropzone.stories.js +40 -40
  472. package/src/experiences/components/UploadYourLogoDropzone/UploadYourLogoDropzone.vue +266 -266
  473. package/src/experiences/components/UploadYourLogoOnBoarding/LogoBusinessBrandColours.stories.js +37 -37
  474. package/src/experiences/components/UploadYourLogoOnBoarding/LogoBusinessBrandColours.vue +328 -328
  475. package/src/experiences/components/UploadYourLogoOnBoarding/LogoBusinessText.vue +140 -140
  476. package/src/experiences/components/UploadYourLogoOnBoarding/LogoCropper.vue +467 -467
  477. package/src/experiences/components/UploadYourLogoOnBoarding/LogoPreview.vue +97 -97
  478. package/src/experiences/components/UploadYourLogoOnBoarding/LogoUploadError.vue +69 -69
  479. package/src/experiences/components/UploadYourLogoOnBoarding/LogoUploadExitConfirmation.vue +49 -49
  480. package/src/experiences/components/UploadYourLogoOnBoarding/LogoUploadModal.vue +38 -38
  481. package/src/experiences/components/UploadYourLogoOnBoarding/LogoUploader.vue +91 -91
  482. package/src/experiences/components/UploadYourLogoOnBoarding/LogoUploadingLoader.vue +22 -22
  483. package/src/experiences/components/UploadYourLogoOnBoarding/UploadYourLogoOnBoarding.vue +290 -290
  484. package/src/experiences/components/UploadedLogoSearchResultCard/UploadedLogoSearchResultCard.stories.js +82 -82
  485. package/src/experiences/components/UploadedLogoSearchResultCard/UploadedLogoSearchResultCard.vue +201 -201
  486. package/src/experiences/constants/api.js +8 -8
  487. package/src/experiences/constants/error-constants.js +5 -5
  488. package/src/experiences/constants/event-constants.js +18 -18
  489. package/src/experiences/constants/partner-dictionary-constants.js +27 -27
  490. package/src/experiences/constants/rego-source-constants.js +3 -3
  491. package/src/experiences/constants/sell-domain-name-constants.js +4 -4
  492. package/src/experiences/helpers/email-validator.js +5 -5
  493. package/src/experiences/helpers/hex-diff.js +116 -116
  494. package/src/experiences/helpers/tracking.js +5 -5
  495. package/src/experiences/mixins/mediaQueryMixin.js +31 -31
  496. package/src/experiences/mixins/themeMixin.js +22 -22
  497. package/src/themes/base.js +20 -20
  498. package/src/themes/bc.js +95 -95
  499. package/src/themes/bp.js +21 -21
  500. package/src/themes/cd.js +94 -94
  501. package/src/themes/dc.js +84 -84
  502. package/src/themes/dcom.js +106 -106
  503. package/src/themes/themes.js +16 -16
  504. package/src/viewports.js +51 -51
  505. package/stylelint.config.js +19 -19
  506. package/tailwind.build.js +83 -83
  507. package/tailwind.config.js +37 -37
  508. package/tailwind.themes.js +59 -59
  509. package/vite.config.ts +37 -37
  510. package/public/css/tailwind-brandCrowd.css +0 -2368
  511. package/public/css/tailwind-brandPage.css +0 -2056
  512. package/public/css/tailwind-crazyDomains.css +0 -2368
  513. package/public/css/tailwind-designCom.css +0 -2368
  514. package/public/css/tailwind-designCrowd.css +0 -2368
@@ -1,778 +1,778 @@
1
- /* eslint-disable vue/one-component-per-file */
2
- /* eslint-disable vue/no-reserved-component-names */
3
- import { defineComponent } from 'vue';
4
- import Button from './Button.vue';
5
-
6
- export default {
7
- title: 'Components/Buttons',
8
- component: Button,
9
- };
10
-
11
- const generateSampleButtonVariants = (buttonVariant) => {
12
- const buttonSizes = ['Large', undefined, 'Medium', 'Small', 'Small-Wide', 'Small-Medium'];
13
-
14
- let variants = buttonSizes
15
- .map((buttonSize) => [
16
- {
17
- label: `Regular Button${buttonSize ? ` (${buttonSize})` : ''}`,
18
- size: buttonSize?.toLocaleLowerCase(),
19
- variant: buttonVariant,
20
- },
21
- {
22
- label: `Button Anchor Link${buttonSize ? ` (${buttonSize})` : ''}`,
23
- size: buttonSize?.toLocaleLowerCase(),
24
- // eslint-disable-next-line no-script-url
25
- url: 'javascript:',
26
- variant: buttonVariant,
27
- },
28
- ])
29
- .flat();
30
-
31
- variants = [
32
- ...variants,
33
- {
34
- icon: 'other',
35
- variant: buttonVariant,
36
- },
37
- {
38
- label: 'Icon Top',
39
- iconTop: 'download',
40
- iconTopSize: 'md',
41
- variant: buttonVariant,
42
- },
43
- {
44
- label: 'Icon Left',
45
- iconLeft: 'download',
46
- variant: buttonVariant,
47
- attrs: { 'data-testing-attr': true },
48
- },
49
- {
50
- label: 'Icon Right',
51
- iconRight: 'download',
52
- variant: buttonVariant,
53
- },
54
- {
55
- label: 'Icon Left And Right',
56
- iconLeft: 'download',
57
- iconRight: 'lock',
58
- variant: buttonVariant,
59
- // eslint-disable-next-line no-script-url
60
- },
61
- {
62
- label: 'All Icons',
63
- iconTop: 'download',
64
- iconLeft: 'download',
65
- iconRight: 'lock',
66
- variant: buttonVariant,
67
- },
68
- {
69
- label: 'Icon Left Link',
70
- iconLeft: 'download',
71
- variant: buttonVariant,
72
- // eslint-disable-next-line no-script-url
73
- url: 'javascript:',
74
- },
75
- {
76
- label: 'Icon Right Link',
77
- iconRight: 'download',
78
- variant: buttonVariant,
79
- // eslint-disable-next-line no-script-url
80
- url: 'javascript:',
81
- },
82
- {
83
- label: 'Rigid Corners Button',
84
- rounded: false,
85
- variant: buttonVariant,
86
- },
87
- {
88
- label: 'Rigid Left Corners Button',
89
- rounded: false,
90
- roundedRight: true,
91
- variant: buttonVariant,
92
- },
93
- {
94
- label: 'Rigid Right Corners Button',
95
- rounded: false,
96
- roundedLeft: true,
97
- variant: buttonVariant,
98
- },
99
- {
100
- label: 'Open In New Tab Button',
101
- variant: buttonVariant,
102
- target: '_blank',
103
- url: 'https://www.google.com',
104
- },
105
- {
106
- label: 'IsBusy Button',
107
- variant: buttonVariant,
108
- isBusy: true,
109
- disabled: true,
110
- },
111
- {
112
- label: 'IsBusy Button with text',
113
- variant: buttonVariant,
114
- isBusy: true,
115
- isBusyLabel: 'IsBusy Button with text',
116
- disabled: true,
117
- },
118
- {
119
- label: 'Disabled',
120
- variant: buttonVariant,
121
- disabled: true,
122
- },
123
- ];
124
-
125
- variants = variants.map((v) => {
126
- return {
127
- ...v,
128
- attrs: { 'data-test-tag': `test-${v.variant.toLowerCase()}` },
129
- };
130
- });
131
-
132
- return variants;
133
- };
134
-
135
- const generateSampleButtonActiveVariants = (variant) => {
136
- const variants = generateSampleButtonVariants(variant);
137
- // eslint-disable-next-line no-param-reassign,no-return-assign
138
- variants.forEach((v) => (v.active = true));
139
- return variants;
140
- };
141
-
142
- const generateSampleButtonWhiteVariants = (variant) => {
143
- const variants = generateSampleButtonVariants(variant);
144
- // eslint-disable-next-line no-param-reassign,no-return-assign
145
- variants.forEach((v) => (v.white = true));
146
- return variants;
147
- };
148
-
149
- const StorybookButtonComponent = defineComponent({
150
- components: {
151
- Button,
152
- },
153
- props: {
154
- disabled: {
155
- type: Boolean,
156
- required: true,
157
- },
158
- fullWidth: {
159
- type: Boolean,
160
- required: true,
161
- },
162
- greyOutLeft: {
163
- type: Boolean,
164
- required: true,
165
- },
166
- justify: {
167
- type: String,
168
- required: true,
169
- },
170
- variants: {
171
- type: Array,
172
- required: true,
173
- },
174
- },
175
- template: `
176
- <table class="tw-w-full">
177
- <thead>
178
- <tr>
179
- <th class="tw-text-left tw-p-4 tw-bg-grayscale-400 tw-font-sans">Button</th>
180
- <th class="tw-text-left tw-p-4 tw-bg-grayscale-400 tw-font-sans">Code</th>
181
- </tr>
182
- </thead>
183
- <tbody>
184
- <tr v-for="variant in variants" class="tw-bg-grayscale-200">
185
- <td class="tw-p-4">
186
- <Button
187
- :full-width="fullWidth"
188
- :greyOutLeft="greyOutLeft"
189
- :justify="justify"
190
- :label="variant.label"
191
- :variant="variant.variant"
192
- :size="variant.size"
193
- :url="variant.url"
194
- :icon="variant.icon"
195
- :icon-left="variant.iconLeft"
196
- :icon-right="variant.iconRight"
197
- :icon-top="variant.iconTop"
198
- :icon-top-size="variant.iconTopSize"
199
- :rounded="variant.rounded"
200
- :rounded-left="variant.roundedLeft"
201
- :rounded-right="variant.roundedRight"
202
- :disabled="variant.disabled"
203
- :active="variant.active"
204
- :white="variant.white"
205
- :target="variant.target"
206
- :attrs="variant.attrs"
207
- :is-busy="variant.isBusy"
208
- :is-busy-label="variant.isBusyLabel"
209
- />
210
- </td>
211
- <td class="tw-p-4">
212
- <code
213
- class="tw-bg-info-100 tw-p-2 tw-rounded tw-bg-gray-400 tw-border tw-border-solid tw-border-info-300 tw-text-info-900">
214
- &lt;Button
215
- label="{{ variant.label }}"
216
- variant="{{ variant.variant }}"
217
- {{ (variant.size ? 'size="' + variant.size + '"' : '') }}
218
- {{ (variant.url ? 'url="' + variant.url + '"' : '') }}
219
- {{ (variant.icon ? 'icon="' + variant.icon + '"' : '') }}
220
- {{ (variant.iconLeft ? 'icon-left="' + variant.iconLeft + '"' : '') }}
221
- {{ (variant.iconRight ? 'icon-right="' + variant.iconRight + '"' : '') }}
222
- {{ (variant.iconTop ? 'icon-top="' + variant.iconTop + '"' : '') }}
223
- {{ (variant.iconTopSize ? 'icon-top-size="' + variant.iconTopSize + '"' : '') }}
224
- {{ (typeof variant.rounded !== 'undefined' ? ':rounded="' + variant.rounded + '"' : '') }}
225
- {{ (typeof variant.roundedLeft !== 'undefined' ? ':rounded-left="' + variant.roundedLeft + '"' : '') }}
226
- {{ (typeof variant.roundedRight !== 'undefined' ? ':rounded-right="' + variant.roundedRight + '"' : '') }}
227
- {{ (variant.disabled ? ':disabled="true"' : '') }}
228
- {{ (variant.target ? ':target="' + variant.target + '"' : '') }}
229
- {{ (justify === 'center' ? '' : 'justify="' + justify + '"') }}
230
- {{ (fullWidth ? ':fullwidth="true"' : '') }}
231
- {{ (greyOutLeft ? ':grey-out-left="true"' : '') }}
232
- {{ (variant.isBusy ? ':is-busy="true"' : '') }}
233
- {{ (variant.isBusyLabel ? 'is-busy-label="' + variant.isBusyLabel + '"' : '') }}
234
- /&gt;
235
- </code>
236
- </td>
237
- </tr>
238
- </tbody>
239
- </table>
240
- `,
241
- });
242
-
243
- const controlArgs = {
244
- disabled: false,
245
- fullWidth: false,
246
- greyOutLeft: false,
247
- justify: 'center',
248
- };
249
-
250
- const controlArgTypes = {
251
- justify: {
252
- control: { type: 'radio' },
253
- options: ['center', 'between'],
254
- },
255
- };
256
-
257
- export const PrimarySamples = (args, { argTypes }) => {
258
- return {
259
- components: {
260
- StorybookButtonComponent,
261
- },
262
- props: Object.keys(argTypes),
263
- data() {
264
- return {
265
- variants: generateSampleButtonVariants('primary'),
266
- };
267
- },
268
- template: `
269
- <StorybookButtonComponent
270
- :disabled="disabled"
271
- :full-width="fullWidth"
272
- :grey-out-left="greyOutLeft"
273
- :justify="justify"
274
- :variants="variants"/>
275
- `,
276
- };
277
- };
278
- PrimarySamples.args = controlArgs;
279
- PrimarySamples.argTypes = controlArgTypes;
280
-
281
- export const SecondarySamples = (args, { argTypes }) => {
282
- return {
283
- components: {
284
- StorybookButtonComponent,
285
- },
286
- props: Object.keys(argTypes),
287
- data() {
288
- return {
289
- variants: generateSampleButtonVariants('secondary'),
290
- };
291
- },
292
- template: `
293
- <StorybookButtonComponent
294
- :disabled="disabled"
295
- :full-width="fullWidth"
296
- :grey-out-left="greyOutLeft"
297
- :justify="justify"
298
- :variants="variants"/>
299
- `,
300
- };
301
- };
302
- SecondarySamples.args = controlArgs;
303
- SecondarySamples.argTypes = controlArgTypes;
304
-
305
- export const WarningSamples = (args, { argTypes }) => {
306
- return {
307
- components: {
308
- StorybookButtonComponent,
309
- },
310
- props: Object.keys(argTypes),
311
- data() {
312
- return {
313
- variants: generateSampleButtonVariants('warning'),
314
- };
315
- },
316
- template: `
317
- <StorybookButtonComponent
318
- :disabled="disabled"
319
- :full-width="fullWidth"
320
- :grey-out-left="greyOutLeft"
321
- :justify="justify"
322
- :variants="variants"/>
323
- `,
324
- };
325
- };
326
- WarningSamples.args = controlArgs;
327
- WarningSamples.argTypes = controlArgTypes;
328
-
329
- export const SuccessSamples = (args, { argTypes }) => {
330
- return {
331
- components: {
332
- StorybookButtonComponent,
333
- },
334
- props: Object.keys(argTypes),
335
- data() {
336
- return {
337
- variants: generateSampleButtonVariants('success'),
338
- };
339
- },
340
- template: `
341
- <StorybookButtonComponent
342
- :disabled="disabled"
343
- :full-width="fullWidth"
344
- :grey-out-left="greyOutLeft"
345
- :justify="justify"
346
- :variants="variants"/>
347
- `,
348
- };
349
- };
350
- SuccessSamples.args = controlArgs;
351
- SuccessSamples.argTypes = controlArgTypes;
352
-
353
- export const OutlineSuccessSamples = (args, { argTypes }) => {
354
- return {
355
- components: {
356
- StorybookButtonComponent,
357
- },
358
- props: Object.keys(argTypes),
359
- data() {
360
- return {
361
- variants: generateSampleButtonVariants('outline-success'),
362
- };
363
- },
364
- template: `
365
- <StorybookButtonComponent
366
- :disabled="disabled"
367
- :full-width="fullWidth"
368
- :grey-out-left="greyOutLeft"
369
- :justify="justify"
370
- :variants="variants"/>
371
- `,
372
- };
373
- };
374
- OutlineSuccessSamples.args = controlArgs;
375
- OutlineSuccessSamples.argTypes = controlArgTypes;
376
-
377
- export const OutlineNoHover = (args, { argTypes }) => {
378
- return {
379
- components: {
380
- StorybookButtonComponent,
381
- },
382
- props: Object.keys(argTypes),
383
- data() {
384
- return {
385
- variants: generateSampleButtonVariants('outline-no-hover'),
386
- };
387
- },
388
- template: `
389
- <StorybookButtonComponent
390
- :disabled="disabled"
391
- :full-width="fullWidth"
392
- :grey-out-left="greyOutLeft"
393
- :justify="justify"
394
- :variants="variants"/>
395
- `,
396
- };
397
- };
398
- OutlineNoHover.args = controlArgs;
399
- OutlineNoHover.argTypes = controlArgTypes;
400
-
401
- export const InfoFilledSamples = (args, { argTypes }) => {
402
- return {
403
- components: {
404
- StorybookButtonComponent,
405
- },
406
- props: Object.keys(argTypes),
407
- data() {
408
- return {
409
- variants: generateSampleButtonVariants('info-filled'),
410
- };
411
- },
412
- template: `
413
- <StorybookButtonComponent
414
- :disabled="disabled"
415
- :full-width="fullWidth"
416
- :grey-out-left="greyOutLeft"
417
- :justify="justify"
418
- :variants="variants"/>
419
- `,
420
- };
421
- };
422
- InfoFilledSamples.args = controlArgs;
423
- InfoFilledSamples.argTypes = controlArgTypes;
424
-
425
- export const GraySamples = () => {
426
- return {
427
- components: {
428
- StorybookButtonComponent,
429
- },
430
- data() {
431
- return {
432
- variants: generateSampleButtonVariants('gray'),
433
- };
434
- },
435
- template: `
436
- <StorybookButtonComponent :variants="variants"/>
437
- `,
438
- };
439
- };
440
-
441
- export const PrimaryWithIconSamples = () => {
442
- return {
443
- components: {
444
- Button,
445
- },
446
- methods: {
447
- test() {
448
- // eslint-disable-next-line no-alert
449
- alert('on click');
450
- },
451
- },
452
- template: `
453
- <table class="tw-w-full">
454
- <thead>
455
- <tr>
456
- <th class="tw-text-left tw-p-4 tw-bg-grayscale-400 tw-font-sans">Button</th>
457
- <th class="tw-text-left tw-p-4 tw-bg-grayscale-400 tw-font-sans">Code</th>
458
- </tr>
459
- </thead>
460
- <tbody>
461
- <tr class="tw-bg-grayscale-200">
462
- <td class="tw-p-4">
463
- <Button
464
- label="Regular Button"
465
- variant="primary-with-icon"
466
- icon="chevron-right-wide"
467
- iconViewBox="0 0 24 24"
468
- @on-click="test"
469
- />
470
- </td>
471
- <td class="tw-p-4">
472
- <code
473
- class="tw-bg-info-100 tw-p-2 tw-rounded tw-bg-gray-400 tw-border tw-border-solid tw-border-info-300 tw-text-info-900">
474
- &lt;Button
475
- label="Regular Button"
476
- variant="primary-with-icon"
477
- icon="chevron-right-wide"
478
- iconViewBox="0 0 24 24"
479
- /&gt;
480
- </code>
481
- </td>
482
- </tr>
483
- <tr>
484
- <td class="tw-p-4">
485
- <Button
486
- label="Button Anchor Link"
487
- variant="primary-with-icon"
488
- icon="chevron-right-wide"
489
- iconViewBox="0 0 24 24"
490
- url="http://www.google.com"
491
- />
492
- </td>
493
- <td class="tw-p-4">
494
- <code
495
- class="tw-bg-info-100 tw-p-2 tw-rounded tw-bg-gray-400 tw-border tw-border-solid tw-border-info-300 tw-text-info-900">
496
- &lt;Button
497
- label="Button Anchor Link"
498
- variant="primary-with-icon"
499
- icon="chevron-right-wide"
500
- iconViewBox="0 0 24 24"
501
- url="http://www.google.com"
502
- /&gt;
503
- </code>
504
- </td>
505
- </tr>
506
- <tr class="tw-bg-grayscale-200">
507
- <td class="tw-p-4">
508
- <Button
509
- label="Disabled Button"
510
- variant="primary-with-icon"
511
- icon="chevron-right-wide"
512
- iconViewBox="0 0 24 24"
513
- :disabled="true"
514
- @on-click="test"
515
- />
516
- </td>
517
- <td class="tw-p-4">
518
- <code
519
- class="tw-bg-info-100 tw-p-2 tw-rounded tw-bg-gray-400 tw-border tw-border-solid tw-border-info-300 tw-text-info-900">
520
- &lt;Button
521
- label="Regular Button"
522
- variant="primary-with-icon"
523
- icon="chevron-right-wide"
524
- iconViewBox="0 0 24 24"
525
- :disabled="true"
526
- /&gt;
527
- </code>
528
- </td>
529
- </tr>
530
- </tbody>
531
- </table>
532
- `,
533
- };
534
- };
535
-
536
- export const OutlineSamples = (args, { argTypes }) => {
537
- return {
538
- components: {
539
- StorybookButtonComponent,
540
- },
541
- props: Object.keys(argTypes),
542
- data() {
543
- return {
544
- variants: generateSampleButtonVariants('outline'),
545
- };
546
- },
547
- template: `
548
- <StorybookButtonComponent
549
- :disabled="disabled"
550
- :full-width="fullWidth"
551
- :grey-out-left="greyOutLeft"
552
- :justify="justify"
553
- :variants="variants"/>
554
- `,
555
- };
556
- };
557
- OutlineSamples.args = controlArgs;
558
- OutlineSamples.argTypes = controlArgTypes;
559
-
560
- export const InfoSamples = (args, { argTypes }) => {
561
- return {
562
- components: {
563
- StorybookButtonComponent,
564
- },
565
- props: Object.keys(argTypes),
566
- data() {
567
- return {
568
- variants: generateSampleButtonVariants('info'),
569
- };
570
- },
571
- template: `
572
- <StorybookButtonComponent
573
- :disabled="disabled"
574
- :full-width="fullWidth"
575
- :grey-out-left="greyOutLeft"
576
- :justify="justify"
577
- :variants="variants"/>
578
- `,
579
- };
580
- };
581
- InfoSamples.args = controlArgs;
582
- InfoSamples.argTypes = controlArgTypes;
583
-
584
- export const NoBorderSamples = (args, { argTypes }) => {
585
- return {
586
- components: {
587
- StorybookButtonComponent,
588
- },
589
- props: Object.keys(argTypes),
590
- data() {
591
- return {
592
- variants: generateSampleButtonVariants('no-border'),
593
- };
594
- },
595
- template: `
596
- <StorybookButtonComponent
597
- :disabled="disabled"
598
- :full-width="fullWidth"
599
- :grey-out-left="greyOutLeft"
600
- :justify="justify"
601
- :variants="variants"/>
602
- `,
603
- };
604
- };
605
- NoBorderSamples.args = controlArgs;
606
- NoBorderSamples.argTypes = controlArgTypes;
607
-
608
- export const FlatSamples = (args, { argTypes }) => {
609
- return {
610
- components: {
611
- StorybookButtonComponent,
612
- },
613
- props: Object.keys(argTypes),
614
- data() {
615
- return {
616
- variants: generateSampleButtonVariants('flat'),
617
- };
618
- },
619
- template: `
620
- <StorybookButtonComponent
621
- :disabled="disabled"
622
- :full-width="fullWidth"
623
- :grey-out-left="greyOutLeft"
624
- :justify="justify"
625
- :variants="variants"/>
626
- `,
627
- };
628
- };
629
- FlatSamples.args = controlArgs;
630
- FlatSamples.argTypes = controlArgTypes;
631
-
632
- export const PillSamples = (args, { argTypes }) => {
633
- return {
634
- components: {
635
- StorybookButtonComponent,
636
- },
637
- props: Object.keys(argTypes),
638
- data() {
639
- return {
640
- variants: generateSampleButtonVariants('pill'),
641
- activeVariants: generateSampleButtonActiveVariants('pill'),
642
- };
643
- },
644
- template: `
645
- <div>
646
- <StorybookButtonComponent
647
- :disabled="disabled"
648
- :full-width="fullWidth"
649
- :grey-out-left="greyOutLeft"
650
- :justify="justify"
651
- :variants="variants"/>
652
- <StorybookButtonComponent
653
- :disabled="disabled"
654
- :full-width="fullWidth"
655
- :grey-out-left="greyOutLeft"
656
- :justify="justify"
657
- :variants="activeVariants"/>
658
- </div>
659
- `,
660
- };
661
- };
662
- PillSamples.args = controlArgs;
663
- PillSamples.argTypes = controlArgTypes;
664
-
665
- export const DarkModePill = (args, { argTypes }) => {
666
- return {
667
- components: {
668
- StorybookButtonComponent,
669
- },
670
- props: Object.keys(argTypes),
671
- data() {
672
- return {
673
- variants: generateSampleButtonVariants('dark-mode-pill'),
674
- activeVariants: generateSampleButtonActiveVariants('dark-mode-pill'),
675
- };
676
- },
677
- template: `
678
- <div>
679
- <StorybookButtonComponent
680
- :disabled="disabled"
681
- :full-width="fullWidth"
682
- :grey-out-left="greyOutLeft"
683
- :justify="justify"
684
- :variants="variants"/>
685
- <StorybookButtonComponent
686
- :disabled="disabled"
687
- :full-width="fullWidth"
688
- :grey-out-left="greyOutLeft"
689
- :justify="justify"
690
- :variants="activeVariants"/>
691
- </div>
692
- `,
693
- };
694
- };
695
- DarkModePill.args = controlArgs;
696
- DarkModePill.argTypes = controlArgTypes;
697
-
698
- export const OutlineWhite = (args, { argTypes }) => {
699
- return {
700
- components: {
701
- StorybookButtonComponent,
702
- },
703
- props: Object.keys(argTypes),
704
- data() {
705
- return {
706
- variants: generateSampleButtonWhiteVariants('outline'),
707
- };
708
- },
709
- template: `
710
- <div>
711
- <StorybookButtonComponent
712
- :disabled="disabled"
713
- :full-width="fullWidth"
714
- :grey-out-left="greyOutLeft"
715
- :justify="justify"
716
- :variants="variants"/>
717
- </div>
718
- `,
719
- };
720
- };
721
- OutlineWhite.args = controlArgs;
722
- OutlineWhite.argTypes = controlArgTypes;
723
-
724
- PrimarySamples.story = {
725
- name: 'Primary',
726
- };
727
-
728
- SecondarySamples.story = {
729
- name: 'Secondary',
730
- };
731
-
732
- WarningSamples.story = {
733
- name: 'Warning',
734
- };
735
-
736
- SuccessSamples.story = {
737
- name: 'Success',
738
- };
739
-
740
- OutlineSuccessSamples.story = {
741
- name: 'Outline Success',
742
- };
743
-
744
- OutlineNoHover.story = {
745
- name: 'Outline no hover',
746
- };
747
-
748
- InfoFilledSamples.story = {
749
- name: 'Info Filled',
750
- };
751
-
752
- GraySamples.story = {
753
- name: 'Gray',
754
- };
755
-
756
- PrimaryWithIconSamples.story = {
757
- name: 'Primary With Icon',
758
- };
759
-
760
- OutlineSamples.story = {
761
- name: 'Outline',
762
- };
763
-
764
- InfoSamples.story = {
765
- name: 'Info',
766
- };
767
-
768
- NoBorderSamples.story = {
769
- name: 'No Border',
770
- };
771
-
772
- FlatSamples.story = {
773
- name: 'Flat',
774
- };
775
-
776
- PillSamples.story = {
777
- name: 'Pill',
778
- };
1
+ /* eslint-disable vue/one-component-per-file */
2
+ /* eslint-disable vue/no-reserved-component-names */
3
+ import { defineComponent } from 'vue';
4
+ import Button from './Button.vue';
5
+
6
+ export default {
7
+ title: 'Components/Buttons',
8
+ component: Button,
9
+ };
10
+
11
+ const generateSampleButtonVariants = (buttonVariant) => {
12
+ const buttonSizes = ['Large', undefined, 'Medium', 'Small', 'Small-Wide', 'Small-Medium'];
13
+
14
+ let variants = buttonSizes
15
+ .map((buttonSize) => [
16
+ {
17
+ label: `Regular Button${buttonSize ? ` (${buttonSize})` : ''}`,
18
+ size: buttonSize?.toLocaleLowerCase(),
19
+ variant: buttonVariant,
20
+ },
21
+ {
22
+ label: `Button Anchor Link${buttonSize ? ` (${buttonSize})` : ''}`,
23
+ size: buttonSize?.toLocaleLowerCase(),
24
+ // eslint-disable-next-line no-script-url
25
+ url: 'javascript:',
26
+ variant: buttonVariant,
27
+ },
28
+ ])
29
+ .flat();
30
+
31
+ variants = [
32
+ ...variants,
33
+ {
34
+ icon: 'other',
35
+ variant: buttonVariant,
36
+ },
37
+ {
38
+ label: 'Icon Top',
39
+ iconTop: 'download',
40
+ iconTopSize: 'md',
41
+ variant: buttonVariant,
42
+ },
43
+ {
44
+ label: 'Icon Left',
45
+ iconLeft: 'download',
46
+ variant: buttonVariant,
47
+ attrs: { 'data-testing-attr': true },
48
+ },
49
+ {
50
+ label: 'Icon Right',
51
+ iconRight: 'download',
52
+ variant: buttonVariant,
53
+ },
54
+ {
55
+ label: 'Icon Left And Right',
56
+ iconLeft: 'download',
57
+ iconRight: 'lock',
58
+ variant: buttonVariant,
59
+ // eslint-disable-next-line no-script-url
60
+ },
61
+ {
62
+ label: 'All Icons',
63
+ iconTop: 'download',
64
+ iconLeft: 'download',
65
+ iconRight: 'lock',
66
+ variant: buttonVariant,
67
+ },
68
+ {
69
+ label: 'Icon Left Link',
70
+ iconLeft: 'download',
71
+ variant: buttonVariant,
72
+ // eslint-disable-next-line no-script-url
73
+ url: 'javascript:',
74
+ },
75
+ {
76
+ label: 'Icon Right Link',
77
+ iconRight: 'download',
78
+ variant: buttonVariant,
79
+ // eslint-disable-next-line no-script-url
80
+ url: 'javascript:',
81
+ },
82
+ {
83
+ label: 'Rigid Corners Button',
84
+ rounded: false,
85
+ variant: buttonVariant,
86
+ },
87
+ {
88
+ label: 'Rigid Left Corners Button',
89
+ rounded: false,
90
+ roundedRight: true,
91
+ variant: buttonVariant,
92
+ },
93
+ {
94
+ label: 'Rigid Right Corners Button',
95
+ rounded: false,
96
+ roundedLeft: true,
97
+ variant: buttonVariant,
98
+ },
99
+ {
100
+ label: 'Open In New Tab Button',
101
+ variant: buttonVariant,
102
+ target: '_blank',
103
+ url: 'https://www.google.com',
104
+ },
105
+ {
106
+ label: 'IsBusy Button',
107
+ variant: buttonVariant,
108
+ isBusy: true,
109
+ disabled: true,
110
+ },
111
+ {
112
+ label: 'IsBusy Button with text',
113
+ variant: buttonVariant,
114
+ isBusy: true,
115
+ isBusyLabel: 'IsBusy Button with text',
116
+ disabled: true,
117
+ },
118
+ {
119
+ label: 'Disabled',
120
+ variant: buttonVariant,
121
+ disabled: true,
122
+ },
123
+ ];
124
+
125
+ variants = variants.map((v) => {
126
+ return {
127
+ ...v,
128
+ attrs: { 'data-test-tag': `test-${v.variant.toLowerCase()}` },
129
+ };
130
+ });
131
+
132
+ return variants;
133
+ };
134
+
135
+ const generateSampleButtonActiveVariants = (variant) => {
136
+ const variants = generateSampleButtonVariants(variant);
137
+ // eslint-disable-next-line no-param-reassign,no-return-assign
138
+ variants.forEach((v) => (v.active = true));
139
+ return variants;
140
+ };
141
+
142
+ const generateSampleButtonWhiteVariants = (variant) => {
143
+ const variants = generateSampleButtonVariants(variant);
144
+ // eslint-disable-next-line no-param-reassign,no-return-assign
145
+ variants.forEach((v) => (v.white = true));
146
+ return variants;
147
+ };
148
+
149
+ const StorybookButtonComponent = defineComponent({
150
+ components: {
151
+ Button,
152
+ },
153
+ props: {
154
+ disabled: {
155
+ type: Boolean,
156
+ required: true,
157
+ },
158
+ fullWidth: {
159
+ type: Boolean,
160
+ required: true,
161
+ },
162
+ greyOutLeft: {
163
+ type: Boolean,
164
+ required: true,
165
+ },
166
+ justify: {
167
+ type: String,
168
+ required: true,
169
+ },
170
+ variants: {
171
+ type: Array,
172
+ required: true,
173
+ },
174
+ },
175
+ template: `
176
+ <table class="tw-w-full">
177
+ <thead>
178
+ <tr>
179
+ <th class="tw-text-left tw-p-4 tw-bg-grayscale-400 tw-font-sans">Button</th>
180
+ <th class="tw-text-left tw-p-4 tw-bg-grayscale-400 tw-font-sans">Code</th>
181
+ </tr>
182
+ </thead>
183
+ <tbody>
184
+ <tr v-for="variant in variants" class="tw-bg-grayscale-200">
185
+ <td class="tw-p-4">
186
+ <Button
187
+ :full-width="fullWidth"
188
+ :greyOutLeft="greyOutLeft"
189
+ :justify="justify"
190
+ :label="variant.label"
191
+ :variant="variant.variant"
192
+ :size="variant.size"
193
+ :url="variant.url"
194
+ :icon="variant.icon"
195
+ :icon-left="variant.iconLeft"
196
+ :icon-right="variant.iconRight"
197
+ :icon-top="variant.iconTop"
198
+ :icon-top-size="variant.iconTopSize"
199
+ :rounded="variant.rounded"
200
+ :rounded-left="variant.roundedLeft"
201
+ :rounded-right="variant.roundedRight"
202
+ :disabled="variant.disabled"
203
+ :active="variant.active"
204
+ :white="variant.white"
205
+ :target="variant.target"
206
+ :attrs="variant.attrs"
207
+ :is-busy="variant.isBusy"
208
+ :is-busy-label="variant.isBusyLabel"
209
+ />
210
+ </td>
211
+ <td class="tw-p-4">
212
+ <code
213
+ class="tw-bg-info-100 tw-p-2 tw-rounded tw-bg-gray-400 tw-border tw-border-solid tw-border-info-300 tw-text-info-900">
214
+ &lt;Button
215
+ label="{{ variant.label }}"
216
+ variant="{{ variant.variant }}"
217
+ {{ (variant.size ? 'size="' + variant.size + '"' : '') }}
218
+ {{ (variant.url ? 'url="' + variant.url + '"' : '') }}
219
+ {{ (variant.icon ? 'icon="' + variant.icon + '"' : '') }}
220
+ {{ (variant.iconLeft ? 'icon-left="' + variant.iconLeft + '"' : '') }}
221
+ {{ (variant.iconRight ? 'icon-right="' + variant.iconRight + '"' : '') }}
222
+ {{ (variant.iconTop ? 'icon-top="' + variant.iconTop + '"' : '') }}
223
+ {{ (variant.iconTopSize ? 'icon-top-size="' + variant.iconTopSize + '"' : '') }}
224
+ {{ (typeof variant.rounded !== 'undefined' ? ':rounded="' + variant.rounded + '"' : '') }}
225
+ {{ (typeof variant.roundedLeft !== 'undefined' ? ':rounded-left="' + variant.roundedLeft + '"' : '') }}
226
+ {{ (typeof variant.roundedRight !== 'undefined' ? ':rounded-right="' + variant.roundedRight + '"' : '') }}
227
+ {{ (variant.disabled ? ':disabled="true"' : '') }}
228
+ {{ (variant.target ? ':target="' + variant.target + '"' : '') }}
229
+ {{ (justify === 'center' ? '' : 'justify="' + justify + '"') }}
230
+ {{ (fullWidth ? ':fullwidth="true"' : '') }}
231
+ {{ (greyOutLeft ? ':grey-out-left="true"' : '') }}
232
+ {{ (variant.isBusy ? ':is-busy="true"' : '') }}
233
+ {{ (variant.isBusyLabel ? 'is-busy-label="' + variant.isBusyLabel + '"' : '') }}
234
+ /&gt;
235
+ </code>
236
+ </td>
237
+ </tr>
238
+ </tbody>
239
+ </table>
240
+ `,
241
+ });
242
+
243
+ const controlArgs = {
244
+ disabled: false,
245
+ fullWidth: false,
246
+ greyOutLeft: false,
247
+ justify: 'center',
248
+ };
249
+
250
+ const controlArgTypes = {
251
+ justify: {
252
+ control: { type: 'radio' },
253
+ options: ['center', 'between'],
254
+ },
255
+ };
256
+
257
+ export const PrimarySamples = (args, { argTypes }) => {
258
+ return {
259
+ components: {
260
+ StorybookButtonComponent,
261
+ },
262
+ props: Object.keys(argTypes),
263
+ data() {
264
+ return {
265
+ variants: generateSampleButtonVariants('primary'),
266
+ };
267
+ },
268
+ template: `
269
+ <StorybookButtonComponent
270
+ :disabled="disabled"
271
+ :full-width="fullWidth"
272
+ :grey-out-left="greyOutLeft"
273
+ :justify="justify"
274
+ :variants="variants"/>
275
+ `,
276
+ };
277
+ };
278
+ PrimarySamples.args = controlArgs;
279
+ PrimarySamples.argTypes = controlArgTypes;
280
+
281
+ export const SecondarySamples = (args, { argTypes }) => {
282
+ return {
283
+ components: {
284
+ StorybookButtonComponent,
285
+ },
286
+ props: Object.keys(argTypes),
287
+ data() {
288
+ return {
289
+ variants: generateSampleButtonVariants('secondary'),
290
+ };
291
+ },
292
+ template: `
293
+ <StorybookButtonComponent
294
+ :disabled="disabled"
295
+ :full-width="fullWidth"
296
+ :grey-out-left="greyOutLeft"
297
+ :justify="justify"
298
+ :variants="variants"/>
299
+ `,
300
+ };
301
+ };
302
+ SecondarySamples.args = controlArgs;
303
+ SecondarySamples.argTypes = controlArgTypes;
304
+
305
+ export const WarningSamples = (args, { argTypes }) => {
306
+ return {
307
+ components: {
308
+ StorybookButtonComponent,
309
+ },
310
+ props: Object.keys(argTypes),
311
+ data() {
312
+ return {
313
+ variants: generateSampleButtonVariants('warning'),
314
+ };
315
+ },
316
+ template: `
317
+ <StorybookButtonComponent
318
+ :disabled="disabled"
319
+ :full-width="fullWidth"
320
+ :grey-out-left="greyOutLeft"
321
+ :justify="justify"
322
+ :variants="variants"/>
323
+ `,
324
+ };
325
+ };
326
+ WarningSamples.args = controlArgs;
327
+ WarningSamples.argTypes = controlArgTypes;
328
+
329
+ export const SuccessSamples = (args, { argTypes }) => {
330
+ return {
331
+ components: {
332
+ StorybookButtonComponent,
333
+ },
334
+ props: Object.keys(argTypes),
335
+ data() {
336
+ return {
337
+ variants: generateSampleButtonVariants('success'),
338
+ };
339
+ },
340
+ template: `
341
+ <StorybookButtonComponent
342
+ :disabled="disabled"
343
+ :full-width="fullWidth"
344
+ :grey-out-left="greyOutLeft"
345
+ :justify="justify"
346
+ :variants="variants"/>
347
+ `,
348
+ };
349
+ };
350
+ SuccessSamples.args = controlArgs;
351
+ SuccessSamples.argTypes = controlArgTypes;
352
+
353
+ export const OutlineSuccessSamples = (args, { argTypes }) => {
354
+ return {
355
+ components: {
356
+ StorybookButtonComponent,
357
+ },
358
+ props: Object.keys(argTypes),
359
+ data() {
360
+ return {
361
+ variants: generateSampleButtonVariants('outline-success'),
362
+ };
363
+ },
364
+ template: `
365
+ <StorybookButtonComponent
366
+ :disabled="disabled"
367
+ :full-width="fullWidth"
368
+ :grey-out-left="greyOutLeft"
369
+ :justify="justify"
370
+ :variants="variants"/>
371
+ `,
372
+ };
373
+ };
374
+ OutlineSuccessSamples.args = controlArgs;
375
+ OutlineSuccessSamples.argTypes = controlArgTypes;
376
+
377
+ export const OutlineNoHover = (args, { argTypes }) => {
378
+ return {
379
+ components: {
380
+ StorybookButtonComponent,
381
+ },
382
+ props: Object.keys(argTypes),
383
+ data() {
384
+ return {
385
+ variants: generateSampleButtonVariants('outline-no-hover'),
386
+ };
387
+ },
388
+ template: `
389
+ <StorybookButtonComponent
390
+ :disabled="disabled"
391
+ :full-width="fullWidth"
392
+ :grey-out-left="greyOutLeft"
393
+ :justify="justify"
394
+ :variants="variants"/>
395
+ `,
396
+ };
397
+ };
398
+ OutlineNoHover.args = controlArgs;
399
+ OutlineNoHover.argTypes = controlArgTypes;
400
+
401
+ export const InfoFilledSamples = (args, { argTypes }) => {
402
+ return {
403
+ components: {
404
+ StorybookButtonComponent,
405
+ },
406
+ props: Object.keys(argTypes),
407
+ data() {
408
+ return {
409
+ variants: generateSampleButtonVariants('info-filled'),
410
+ };
411
+ },
412
+ template: `
413
+ <StorybookButtonComponent
414
+ :disabled="disabled"
415
+ :full-width="fullWidth"
416
+ :grey-out-left="greyOutLeft"
417
+ :justify="justify"
418
+ :variants="variants"/>
419
+ `,
420
+ };
421
+ };
422
+ InfoFilledSamples.args = controlArgs;
423
+ InfoFilledSamples.argTypes = controlArgTypes;
424
+
425
+ export const GraySamples = () => {
426
+ return {
427
+ components: {
428
+ StorybookButtonComponent,
429
+ },
430
+ data() {
431
+ return {
432
+ variants: generateSampleButtonVariants('gray'),
433
+ };
434
+ },
435
+ template: `
436
+ <StorybookButtonComponent :variants="variants"/>
437
+ `,
438
+ };
439
+ };
440
+
441
+ export const PrimaryWithIconSamples = () => {
442
+ return {
443
+ components: {
444
+ Button,
445
+ },
446
+ methods: {
447
+ test() {
448
+ // eslint-disable-next-line no-alert
449
+ alert('on click');
450
+ },
451
+ },
452
+ template: `
453
+ <table class="tw-w-full">
454
+ <thead>
455
+ <tr>
456
+ <th class="tw-text-left tw-p-4 tw-bg-grayscale-400 tw-font-sans">Button</th>
457
+ <th class="tw-text-left tw-p-4 tw-bg-grayscale-400 tw-font-sans">Code</th>
458
+ </tr>
459
+ </thead>
460
+ <tbody>
461
+ <tr class="tw-bg-grayscale-200">
462
+ <td class="tw-p-4">
463
+ <Button
464
+ label="Regular Button"
465
+ variant="primary-with-icon"
466
+ icon="chevron-right-wide"
467
+ iconViewBox="0 0 24 24"
468
+ @on-click="test"
469
+ />
470
+ </td>
471
+ <td class="tw-p-4">
472
+ <code
473
+ class="tw-bg-info-100 tw-p-2 tw-rounded tw-bg-gray-400 tw-border tw-border-solid tw-border-info-300 tw-text-info-900">
474
+ &lt;Button
475
+ label="Regular Button"
476
+ variant="primary-with-icon"
477
+ icon="chevron-right-wide"
478
+ iconViewBox="0 0 24 24"
479
+ /&gt;
480
+ </code>
481
+ </td>
482
+ </tr>
483
+ <tr>
484
+ <td class="tw-p-4">
485
+ <Button
486
+ label="Button Anchor Link"
487
+ variant="primary-with-icon"
488
+ icon="chevron-right-wide"
489
+ iconViewBox="0 0 24 24"
490
+ url="http://www.google.com"
491
+ />
492
+ </td>
493
+ <td class="tw-p-4">
494
+ <code
495
+ class="tw-bg-info-100 tw-p-2 tw-rounded tw-bg-gray-400 tw-border tw-border-solid tw-border-info-300 tw-text-info-900">
496
+ &lt;Button
497
+ label="Button Anchor Link"
498
+ variant="primary-with-icon"
499
+ icon="chevron-right-wide"
500
+ iconViewBox="0 0 24 24"
501
+ url="http://www.google.com"
502
+ /&gt;
503
+ </code>
504
+ </td>
505
+ </tr>
506
+ <tr class="tw-bg-grayscale-200">
507
+ <td class="tw-p-4">
508
+ <Button
509
+ label="Disabled Button"
510
+ variant="primary-with-icon"
511
+ icon="chevron-right-wide"
512
+ iconViewBox="0 0 24 24"
513
+ :disabled="true"
514
+ @on-click="test"
515
+ />
516
+ </td>
517
+ <td class="tw-p-4">
518
+ <code
519
+ class="tw-bg-info-100 tw-p-2 tw-rounded tw-bg-gray-400 tw-border tw-border-solid tw-border-info-300 tw-text-info-900">
520
+ &lt;Button
521
+ label="Regular Button"
522
+ variant="primary-with-icon"
523
+ icon="chevron-right-wide"
524
+ iconViewBox="0 0 24 24"
525
+ :disabled="true"
526
+ /&gt;
527
+ </code>
528
+ </td>
529
+ </tr>
530
+ </tbody>
531
+ </table>
532
+ `,
533
+ };
534
+ };
535
+
536
+ export const OutlineSamples = (args, { argTypes }) => {
537
+ return {
538
+ components: {
539
+ StorybookButtonComponent,
540
+ },
541
+ props: Object.keys(argTypes),
542
+ data() {
543
+ return {
544
+ variants: generateSampleButtonVariants('outline'),
545
+ };
546
+ },
547
+ template: `
548
+ <StorybookButtonComponent
549
+ :disabled="disabled"
550
+ :full-width="fullWidth"
551
+ :grey-out-left="greyOutLeft"
552
+ :justify="justify"
553
+ :variants="variants"/>
554
+ `,
555
+ };
556
+ };
557
+ OutlineSamples.args = controlArgs;
558
+ OutlineSamples.argTypes = controlArgTypes;
559
+
560
+ export const InfoSamples = (args, { argTypes }) => {
561
+ return {
562
+ components: {
563
+ StorybookButtonComponent,
564
+ },
565
+ props: Object.keys(argTypes),
566
+ data() {
567
+ return {
568
+ variants: generateSampleButtonVariants('info'),
569
+ };
570
+ },
571
+ template: `
572
+ <StorybookButtonComponent
573
+ :disabled="disabled"
574
+ :full-width="fullWidth"
575
+ :grey-out-left="greyOutLeft"
576
+ :justify="justify"
577
+ :variants="variants"/>
578
+ `,
579
+ };
580
+ };
581
+ InfoSamples.args = controlArgs;
582
+ InfoSamples.argTypes = controlArgTypes;
583
+
584
+ export const NoBorderSamples = (args, { argTypes }) => {
585
+ return {
586
+ components: {
587
+ StorybookButtonComponent,
588
+ },
589
+ props: Object.keys(argTypes),
590
+ data() {
591
+ return {
592
+ variants: generateSampleButtonVariants('no-border'),
593
+ };
594
+ },
595
+ template: `
596
+ <StorybookButtonComponent
597
+ :disabled="disabled"
598
+ :full-width="fullWidth"
599
+ :grey-out-left="greyOutLeft"
600
+ :justify="justify"
601
+ :variants="variants"/>
602
+ `,
603
+ };
604
+ };
605
+ NoBorderSamples.args = controlArgs;
606
+ NoBorderSamples.argTypes = controlArgTypes;
607
+
608
+ export const FlatSamples = (args, { argTypes }) => {
609
+ return {
610
+ components: {
611
+ StorybookButtonComponent,
612
+ },
613
+ props: Object.keys(argTypes),
614
+ data() {
615
+ return {
616
+ variants: generateSampleButtonVariants('flat'),
617
+ };
618
+ },
619
+ template: `
620
+ <StorybookButtonComponent
621
+ :disabled="disabled"
622
+ :full-width="fullWidth"
623
+ :grey-out-left="greyOutLeft"
624
+ :justify="justify"
625
+ :variants="variants"/>
626
+ `,
627
+ };
628
+ };
629
+ FlatSamples.args = controlArgs;
630
+ FlatSamples.argTypes = controlArgTypes;
631
+
632
+ export const PillSamples = (args, { argTypes }) => {
633
+ return {
634
+ components: {
635
+ StorybookButtonComponent,
636
+ },
637
+ props: Object.keys(argTypes),
638
+ data() {
639
+ return {
640
+ variants: generateSampleButtonVariants('pill'),
641
+ activeVariants: generateSampleButtonActiveVariants('pill'),
642
+ };
643
+ },
644
+ template: `
645
+ <div>
646
+ <StorybookButtonComponent
647
+ :disabled="disabled"
648
+ :full-width="fullWidth"
649
+ :grey-out-left="greyOutLeft"
650
+ :justify="justify"
651
+ :variants="variants"/>
652
+ <StorybookButtonComponent
653
+ :disabled="disabled"
654
+ :full-width="fullWidth"
655
+ :grey-out-left="greyOutLeft"
656
+ :justify="justify"
657
+ :variants="activeVariants"/>
658
+ </div>
659
+ `,
660
+ };
661
+ };
662
+ PillSamples.args = controlArgs;
663
+ PillSamples.argTypes = controlArgTypes;
664
+
665
+ export const DarkModePill = (args, { argTypes }) => {
666
+ return {
667
+ components: {
668
+ StorybookButtonComponent,
669
+ },
670
+ props: Object.keys(argTypes),
671
+ data() {
672
+ return {
673
+ variants: generateSampleButtonVariants('dark-mode-pill'),
674
+ activeVariants: generateSampleButtonActiveVariants('dark-mode-pill'),
675
+ };
676
+ },
677
+ template: `
678
+ <div>
679
+ <StorybookButtonComponent
680
+ :disabled="disabled"
681
+ :full-width="fullWidth"
682
+ :grey-out-left="greyOutLeft"
683
+ :justify="justify"
684
+ :variants="variants"/>
685
+ <StorybookButtonComponent
686
+ :disabled="disabled"
687
+ :full-width="fullWidth"
688
+ :grey-out-left="greyOutLeft"
689
+ :justify="justify"
690
+ :variants="activeVariants"/>
691
+ </div>
692
+ `,
693
+ };
694
+ };
695
+ DarkModePill.args = controlArgs;
696
+ DarkModePill.argTypes = controlArgTypes;
697
+
698
+ export const OutlineWhite = (args, { argTypes }) => {
699
+ return {
700
+ components: {
701
+ StorybookButtonComponent,
702
+ },
703
+ props: Object.keys(argTypes),
704
+ data() {
705
+ return {
706
+ variants: generateSampleButtonWhiteVariants('outline'),
707
+ };
708
+ },
709
+ template: `
710
+ <div>
711
+ <StorybookButtonComponent
712
+ :disabled="disabled"
713
+ :full-width="fullWidth"
714
+ :grey-out-left="greyOutLeft"
715
+ :justify="justify"
716
+ :variants="variants"/>
717
+ </div>
718
+ `,
719
+ };
720
+ };
721
+ OutlineWhite.args = controlArgs;
722
+ OutlineWhite.argTypes = controlArgTypes;
723
+
724
+ PrimarySamples.story = {
725
+ name: 'Primary',
726
+ };
727
+
728
+ SecondarySamples.story = {
729
+ name: 'Secondary',
730
+ };
731
+
732
+ WarningSamples.story = {
733
+ name: 'Warning',
734
+ };
735
+
736
+ SuccessSamples.story = {
737
+ name: 'Success',
738
+ };
739
+
740
+ OutlineSuccessSamples.story = {
741
+ name: 'Outline Success',
742
+ };
743
+
744
+ OutlineNoHover.story = {
745
+ name: 'Outline no hover',
746
+ };
747
+
748
+ InfoFilledSamples.story = {
749
+ name: 'Info Filled',
750
+ };
751
+
752
+ GraySamples.story = {
753
+ name: 'Gray',
754
+ };
755
+
756
+ PrimaryWithIconSamples.story = {
757
+ name: 'Primary With Icon',
758
+ };
759
+
760
+ OutlineSamples.story = {
761
+ name: 'Outline',
762
+ };
763
+
764
+ InfoSamples.story = {
765
+ name: 'Info',
766
+ };
767
+
768
+ NoBorderSamples.story = {
769
+ name: 'No Border',
770
+ };
771
+
772
+ FlatSamples.story = {
773
+ name: 'Flat',
774
+ };
775
+
776
+ PillSamples.story = {
777
+ name: 'Pill',
778
+ };