@westpac/ui 0.7.1 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (412) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/assets/icons/filled/exit-filled.svg +3 -3
  3. package/assets/icons/outlined/exit-outlined.svg +3 -3
  4. package/dist/component-type.json +1 -1
  5. package/dist/components/accordion/components/accordion-item/accordion-item.styles.d.ts +2 -0
  6. package/dist/components/accordion/components/accordion-item/accordion-item.styles.js +2 -1
  7. package/dist/components/alert/alert.styles.js +4 -4
  8. package/dist/components/badge/badge.styles.js +1 -1
  9. package/dist/components/breadcrumb/components/breadcrumb-item/breadcrumb-item.component.js +1 -1
  10. package/dist/components/button/button.styles.js +3 -3
  11. package/dist/components/button-dropdown/components/panel/panel.styles.js +1 -1
  12. package/dist/components/compacta/compacta.styles.js +4 -4
  13. package/dist/components/error-message/error-message.styles.js +2 -2
  14. package/dist/components/form/components/form-group/form-group.styles.d.ts +1 -1
  15. package/dist/components/form/components/form-group/form-group.styles.js +1 -1
  16. package/dist/components/form/form.component.d.ts +1 -1
  17. package/dist/components/form/form.component.js +1 -2
  18. package/dist/components/form/form.stories.d.ts +2 -2
  19. package/dist/components/form/form.types.d.ts +0 -4
  20. package/dist/components/form-hint/form-hint.styles.d.ts +1 -1
  21. package/dist/components/form-hint/form-hint.styles.js +1 -1
  22. package/dist/components/form-label/form-label.styles.d.ts +1 -1
  23. package/dist/components/form-label/form-label.styles.js +1 -1
  24. package/dist/components/icon/components/exit-icon.js +2 -2
  25. package/dist/components/input-field/components/add-ons/components/icon-add-on/icon-add-on.styles.js +6 -6
  26. package/dist/components/input-field/components/add-ons/components/text-add-on/text-add-on.styles.js +5 -5
  27. package/dist/components/list/components/item/item.styles.js +4 -4
  28. package/dist/components/modal/components/dialog/dialog.styles.js +1 -1
  29. package/dist/components/pagination/components/pagination-item/pagination-item.styles.d.ts +1 -1
  30. package/dist/components/pagination/components/pagination-item/pagination-item.styles.js +1 -1
  31. package/dist/components/panel/panel.styles.js +1 -1
  32. package/dist/components/pictogram/components/decorative/wbc-bank-card-pictogram.js +1 -0
  33. package/dist/components/pictogram/components/informative/accessibility-pictogram.js +1 -0
  34. package/dist/components/pictogram/components/informative/accounts-pictogram.js +1 -0
  35. package/dist/components/pictogram/components/informative/aeroplane-pictogram.js +1 -0
  36. package/dist/components/pictogram/components/informative/arrow-down-pictogram.js +1 -0
  37. package/dist/components/pictogram/components/informative/arrow-left-pictogram.js +1 -0
  38. package/dist/components/pictogram/components/informative/arrow-right-pictogram.js +1 -0
  39. package/dist/components/pictogram/components/informative/arrow-up-pictogram.js +1 -0
  40. package/dist/components/pictogram/components/informative/arrows-passing-pictogram.js +1 -0
  41. package/dist/components/pictogram/components/informative/atm-pictogram.js +1 -0
  42. package/dist/components/pictogram/components/informative/australia-pictogram.js +1 -0
  43. package/dist/components/pictogram/components/informative/bank-card-locked-pictogram.js +1 -0
  44. package/dist/components/pictogram/components/informative/bank-card-pictogram.js +1 -0
  45. package/dist/components/pictogram/components/informative/bank-pictogram.js +1 -0
  46. package/dist/components/pictogram/components/informative/birth-certificate-pictogram.js +1 -0
  47. package/dist/components/pictogram/components/informative/building-pictogram.js +1 -0
  48. package/dist/components/pictogram/components/informative/buoy-pictogram.js +1 -0
  49. package/dist/components/pictogram/components/informative/bus-pictogram.js +1 -0
  50. package/dist/components/pictogram/components/informative/business-person-pictogram.js +1 -0
  51. package/dist/components/pictogram/components/informative/calculator-pictogram.js +1 -0
  52. package/dist/components/pictogram/components/informative/calendar-pictogram.js +1 -0
  53. package/dist/components/pictogram/components/informative/car-pictogram.js +1 -0
  54. package/dist/components/pictogram/components/informative/cash-pictogram.js +1 -0
  55. package/dist/components/pictogram/components/informative/celebration-pictogram.js +1 -0
  56. package/dist/components/pictogram/components/informative/chat-pictogram.js +1 -0
  57. package/dist/components/pictogram/components/informative/clock-pictogram.js +1 -0
  58. package/dist/components/pictogram/components/informative/coffee-pictogram.js +1 -0
  59. package/dist/components/pictogram/components/informative/coins-pictogram.js +1 -0
  60. package/dist/components/pictogram/components/informative/compass-pictogram.js +1 -0
  61. package/dist/components/pictogram/components/informative/customer-profile-pictogram.js +1 -0
  62. package/dist/components/pictogram/components/informative/desktop-computer-pictogram.js +1 -0
  63. package/dist/components/pictogram/components/informative/document-and-pen-pictogram.js +1 -0
  64. package/dist/components/pictogram/components/informative/dollar-sign-pictogram.js +1 -0
  65. package/dist/components/pictogram/components/informative/drivers-licence-pictogram.js +1 -0
  66. package/dist/components/pictogram/components/informative/education-pictogram.js +1 -0
  67. package/dist/components/pictogram/components/informative/eftpos-pictogram.js +1 -0
  68. package/dist/components/pictogram/components/informative/envelope-email-pictogram.js +1 -0
  69. package/dist/components/pictogram/components/informative/envelope-printed-pictogram.js +1 -0
  70. package/dist/components/pictogram/components/informative/face-happy-pictogram.js +1 -0
  71. package/dist/components/pictogram/components/informative/face-unhappy-pictogram.js +1 -0
  72. package/dist/components/pictogram/components/informative/face-unsure-pictogram.js +1 -0
  73. package/dist/components/pictogram/components/informative/finger-motion-pictogram.js +1 -0
  74. package/dist/components/pictogram/components/informative/fingerprint-pictogram.js +1 -0
  75. package/dist/components/pictogram/components/informative/football-pictogram.js +1 -0
  76. package/dist/components/pictogram/components/informative/fork-knife-pictogram.js +1 -0
  77. package/dist/components/pictogram/components/informative/generic-document-pictogram.js +1 -0
  78. package/dist/components/pictogram/components/informative/gift-pictogram.js +1 -0
  79. package/dist/components/pictogram/components/informative/globe-australia-pictogram.js +1 -0
  80. package/dist/components/pictogram/components/informative/globe-pictogram.js +1 -0
  81. package/dist/components/pictogram/components/informative/graph-decreasing-pictogram.js +1 -0
  82. package/dist/components/pictogram/components/informative/graph-increasing-pictogram.js +1 -0
  83. package/dist/components/pictogram/components/informative/gym-pictogram.js +1 -0
  84. package/dist/components/pictogram/components/informative/headset-pictogram.js +1 -0
  85. package/dist/components/pictogram/components/informative/heart-pictogram.js +1 -0
  86. package/dist/components/pictogram/components/informative/house-pictogram.js +1 -0
  87. package/dist/components/pictogram/components/informative/light-bulb-pictogram.js +1 -0
  88. package/dist/components/pictogram/components/informative/loop-pictogram.js +1 -0
  89. package/dist/components/pictogram/components/informative/medicare-card-pictogram.js +1 -0
  90. package/dist/components/pictogram/components/informative/mobile-device-pictogram.js +1 -0
  91. package/dist/components/pictogram/components/informative/money-in-pictogram.js +1 -0
  92. package/dist/components/pictogram/components/informative/money-out-pictogram.js +1 -0
  93. package/dist/components/pictogram/components/informative/movie-tickets-pictogram.js +1 -0
  94. package/dist/components/pictogram/components/informative/nest-egg-pictogram.js +1 -0
  95. package/dist/components/pictogram/components/informative/noodles-pictogram.js +1 -0
  96. package/dist/components/pictogram/components/informative/number-1-pictogram.js +1 -0
  97. package/dist/components/pictogram/components/informative/number-2-pictogram.js +1 -0
  98. package/dist/components/pictogram/components/informative/number-3-pictogram.js +1 -0
  99. package/dist/components/pictogram/components/informative/number-4-pictogram.js +1 -0
  100. package/dist/components/pictogram/components/informative/number-5-pictogram.js +1 -0
  101. package/dist/components/pictogram/components/informative/padlock-locked-pictogram.js +1 -0
  102. package/dist/components/pictogram/components/informative/padlock-unlocked-pictogram.js +1 -0
  103. package/dist/components/pictogram/components/informative/passport-pictogram.js +1 -0
  104. package/dist/components/pictogram/components/informative/percent-sign-pictogram.js +1 -0
  105. package/dist/components/pictogram/components/informative/person-pictogram.js +1 -0
  106. package/dist/components/pictogram/components/informative/piggy-bank-pictogram.js +1 -0
  107. package/dist/components/pictogram/components/informative/pizza-pictogram.js +1 -0
  108. package/dist/components/pictogram/components/informative/plant-pictogram.js +1 -0
  109. package/dist/components/pictogram/components/informative/search-pictogram.js +1 -0
  110. package/dist/components/pictogram/components/informative/secure-pictogram.js +1 -0
  111. package/dist/components/pictogram/components/informative/shop-pictogram.js +1 -0
  112. package/dist/components/pictogram/components/informative/shopping-pictogram.js +1 -0
  113. package/dist/components/pictogram/components/informative/star-pictogram.js +1 -0
  114. package/dist/components/pictogram/components/informative/stopwatch-pictogram.js +1 -0
  115. package/dist/components/pictogram/components/informative/tax-document-pictogram.js +1 -0
  116. package/dist/components/pictogram/components/informative/telephone-call-pictogram.js +1 -0
  117. package/dist/components/pictogram/components/informative/thumbs-up-pictogram.js +1 -0
  118. package/dist/components/pictogram/components/informative/tick-pictogram.js +1 -0
  119. package/dist/components/pictogram/components/informative/tools-pictogram.js +1 -0
  120. package/dist/components/pictogram/components/informative/tractor-pictogram.js +1 -0
  121. package/dist/components/pictogram/components/informative/truck-pictogram.js +1 -0
  122. package/dist/components/pictogram/components/informative/umbrella-pictogram.js +1 -0
  123. package/dist/components/pictogram/components/informative/unsecure-pictogram.js +1 -0
  124. package/dist/components/pictogram/components/informative/wallet-pictogram.js +1 -0
  125. package/dist/components/pictogram/components/informative/wearables-pictogram.js +1 -0
  126. package/dist/components/pictogram/pictogram.component.js +1 -0
  127. package/dist/components/popover/components/panel/panel.component.d.ts +1 -1
  128. package/dist/components/popover/components/panel/panel.component.js +39 -5
  129. package/dist/components/popover/components/panel/panel.styles.js +5 -5
  130. package/dist/components/popover/components/panel/panel.types.d.ts +12 -2
  131. package/dist/components/popover/popover.component.d.ts +4 -0
  132. package/dist/components/popover/popover.component.js +12 -6
  133. package/dist/components/popover/popover.hooks.d.ts +3 -0
  134. package/dist/components/popover/popover.hooks.js +37 -0
  135. package/dist/components/popover/popover.stories.d.ts +9 -5
  136. package/dist/components/popover/popover.types.d.ts +1 -1
  137. package/dist/components/progress-bar/progress-bar.styles.js +2 -2
  138. package/dist/components/repeater/repeater.styles.d.ts +6 -0
  139. package/dist/components/repeater/repeater.styles.js +10 -7
  140. package/dist/components/switch/switch.styles.js +1 -1
  141. package/dist/components/table/components/row/row.styles.js +1 -1
  142. package/dist/components/tabs/components/tab/tab.styles.d.ts +1 -1
  143. package/dist/components/tabs/components/tab/tab.styles.js +4 -4
  144. package/dist/css/westpac-ui.css +551 -373
  145. package/dist/css/westpac-ui.min.css +551 -373
  146. package/dist/stories/foundation/spacing.stories.d.ts +15 -0
  147. package/dist/stories/foundation/typography.stories.d.ts +8 -0
  148. package/dist/tailwind/__mocks__/utils.constants.d.ts +73 -36
  149. package/dist/tailwind/__mocks__/utils.constants.js +73 -36
  150. package/dist/tailwind/constants/spacing.d.ts +2 -36
  151. package/dist/tailwind/constants/spacing.js +2 -1
  152. package/dist/tailwind/constants/typography.d.ts +4 -0
  153. package/dist/tailwind/constants/typography.js +4 -0
  154. package/dist/tailwind/tailwind-plugin.js +9 -1
  155. package/dist/tailwind/types/index.d.ts +0 -1
  156. package/dist/tailwind/types/index.js +0 -1
  157. package/dist/tailwind/utils/create-spacing.d.ts +2 -3
  158. package/dist/tailwind/utils/create-spacing.js +7 -7
  159. package/package.json +4 -2
  160. package/src/components/accordion/components/accordion-item/accordion-item.styles.ts +1 -0
  161. package/src/components/alert/alert.styles.ts +4 -4
  162. package/src/components/badge/badge.styles.ts +1 -1
  163. package/src/components/breadcrumb/components/breadcrumb-item/breadcrumb-item.component.tsx +1 -1
  164. package/src/components/button/button.styles.ts +3 -3
  165. package/src/components/button-dropdown/components/panel/panel.styles.ts +1 -2
  166. package/src/components/compacta/compacta.styles.ts +4 -4
  167. package/src/components/error-message/error-message.component.tsx +1 -7
  168. package/src/components/error-message/error-message.styles.ts +3 -2
  169. package/src/components/form/components/form-group/form-group.styles.ts +1 -1
  170. package/src/components/form/form.component.tsx +2 -2
  171. package/src/components/form/form.types.ts +0 -4
  172. package/src/components/form-hint/form-hint.styles.ts +1 -1
  173. package/src/components/form-label/form-label.styles.ts +1 -1
  174. package/src/components/icon/components/exit-icon.tsx +2 -2
  175. package/src/components/icon/index.ts +1 -0
  176. package/src/components/input-field/components/add-ons/components/icon-add-on/icon-add-on.styles.ts +16 -16
  177. package/src/components/input-field/components/add-ons/components/text-add-on/text-add-on.styles.ts +5 -5
  178. package/src/components/list/components/item/item.styles.ts +4 -4
  179. package/src/components/modal/components/dialog/dialog.styles.ts +1 -1
  180. package/src/components/pagination/components/pagination-item/pagination-item.styles.ts +1 -1
  181. package/src/components/panel/panel.styles.ts +1 -1
  182. package/src/components/pictogram/components/decorative/wbc-bank-card-pictogram.tsx +2 -0
  183. package/src/components/pictogram/components/informative/accessibility-pictogram.tsx +2 -0
  184. package/src/components/pictogram/components/informative/accounts-pictogram.tsx +2 -0
  185. package/src/components/pictogram/components/informative/aeroplane-pictogram.tsx +2 -0
  186. package/src/components/pictogram/components/informative/arrow-down-pictogram.tsx +2 -0
  187. package/src/components/pictogram/components/informative/arrow-left-pictogram.tsx +2 -0
  188. package/src/components/pictogram/components/informative/arrow-right-pictogram.tsx +2 -0
  189. package/src/components/pictogram/components/informative/arrow-up-pictogram.tsx +2 -0
  190. package/src/components/pictogram/components/informative/arrows-passing-pictogram.tsx +2 -0
  191. package/src/components/pictogram/components/informative/atm-pictogram.tsx +2 -0
  192. package/src/components/pictogram/components/informative/australia-pictogram.tsx +2 -0
  193. package/src/components/pictogram/components/informative/bank-card-locked-pictogram.tsx +2 -0
  194. package/src/components/pictogram/components/informative/bank-card-pictogram.tsx +2 -0
  195. package/src/components/pictogram/components/informative/bank-pictogram.tsx +2 -0
  196. package/src/components/pictogram/components/informative/birth-certificate-pictogram.tsx +2 -0
  197. package/src/components/pictogram/components/informative/building-pictogram.tsx +2 -0
  198. package/src/components/pictogram/components/informative/buoy-pictogram.tsx +2 -0
  199. package/src/components/pictogram/components/informative/bus-pictogram.tsx +2 -0
  200. package/src/components/pictogram/components/informative/business-person-pictogram.tsx +2 -0
  201. package/src/components/pictogram/components/informative/calculator-pictogram.tsx +2 -0
  202. package/src/components/pictogram/components/informative/calendar-pictogram.tsx +2 -0
  203. package/src/components/pictogram/components/informative/car-pictogram.tsx +2 -0
  204. package/src/components/pictogram/components/informative/cash-pictogram.tsx +2 -0
  205. package/src/components/pictogram/components/informative/celebration-pictogram.tsx +2 -0
  206. package/src/components/pictogram/components/informative/chat-pictogram.tsx +2 -0
  207. package/src/components/pictogram/components/informative/clock-pictogram.tsx +2 -0
  208. package/src/components/pictogram/components/informative/coffee-pictogram.tsx +2 -0
  209. package/src/components/pictogram/components/informative/coins-pictogram.tsx +2 -0
  210. package/src/components/pictogram/components/informative/compass-pictogram.tsx +2 -0
  211. package/src/components/pictogram/components/informative/customer-profile-pictogram.tsx +2 -0
  212. package/src/components/pictogram/components/informative/desktop-computer-pictogram.tsx +2 -0
  213. package/src/components/pictogram/components/informative/document-and-pen-pictogram.tsx +2 -0
  214. package/src/components/pictogram/components/informative/dollar-sign-pictogram.tsx +2 -0
  215. package/src/components/pictogram/components/informative/drivers-licence-pictogram.tsx +2 -0
  216. package/src/components/pictogram/components/informative/education-pictogram.tsx +2 -0
  217. package/src/components/pictogram/components/informative/eftpos-pictogram.tsx +2 -0
  218. package/src/components/pictogram/components/informative/envelope-email-pictogram.tsx +2 -0
  219. package/src/components/pictogram/components/informative/envelope-printed-pictogram.tsx +2 -0
  220. package/src/components/pictogram/components/informative/face-happy-pictogram.tsx +2 -0
  221. package/src/components/pictogram/components/informative/face-unhappy-pictogram.tsx +2 -0
  222. package/src/components/pictogram/components/informative/face-unsure-pictogram.tsx +2 -0
  223. package/src/components/pictogram/components/informative/finger-motion-pictogram.tsx +2 -0
  224. package/src/components/pictogram/components/informative/fingerprint-pictogram.tsx +2 -0
  225. package/src/components/pictogram/components/informative/football-pictogram.tsx +2 -0
  226. package/src/components/pictogram/components/informative/fork-knife-pictogram.tsx +2 -0
  227. package/src/components/pictogram/components/informative/generic-document-pictogram.tsx +2 -0
  228. package/src/components/pictogram/components/informative/gift-pictogram.tsx +2 -0
  229. package/src/components/pictogram/components/informative/globe-australia-pictogram.tsx +2 -0
  230. package/src/components/pictogram/components/informative/globe-pictogram.tsx +2 -0
  231. package/src/components/pictogram/components/informative/graph-decreasing-pictogram.tsx +2 -0
  232. package/src/components/pictogram/components/informative/graph-increasing-pictogram.tsx +2 -0
  233. package/src/components/pictogram/components/informative/gym-pictogram.tsx +2 -0
  234. package/src/components/pictogram/components/informative/headset-pictogram.tsx +2 -0
  235. package/src/components/pictogram/components/informative/heart-pictogram.tsx +2 -0
  236. package/src/components/pictogram/components/informative/house-pictogram.tsx +2 -0
  237. package/src/components/pictogram/components/informative/light-bulb-pictogram.tsx +2 -0
  238. package/src/components/pictogram/components/informative/loop-pictogram.tsx +2 -0
  239. package/src/components/pictogram/components/informative/medicare-card-pictogram.tsx +2 -0
  240. package/src/components/pictogram/components/informative/mobile-device-pictogram.tsx +2 -0
  241. package/src/components/pictogram/components/informative/money-in-pictogram.tsx +2 -0
  242. package/src/components/pictogram/components/informative/money-out-pictogram.tsx +2 -0
  243. package/src/components/pictogram/components/informative/movie-tickets-pictogram.tsx +2 -0
  244. package/src/components/pictogram/components/informative/nest-egg-pictogram.tsx +2 -0
  245. package/src/components/pictogram/components/informative/noodles-pictogram.tsx +2 -0
  246. package/src/components/pictogram/components/informative/number-1-pictogram.tsx +2 -0
  247. package/src/components/pictogram/components/informative/number-2-pictogram.tsx +2 -0
  248. package/src/components/pictogram/components/informative/number-3-pictogram.tsx +2 -0
  249. package/src/components/pictogram/components/informative/number-4-pictogram.tsx +2 -0
  250. package/src/components/pictogram/components/informative/number-5-pictogram.tsx +2 -0
  251. package/src/components/pictogram/components/informative/padlock-locked-pictogram.tsx +2 -0
  252. package/src/components/pictogram/components/informative/padlock-unlocked-pictogram.tsx +2 -0
  253. package/src/components/pictogram/components/informative/passport-pictogram.tsx +2 -0
  254. package/src/components/pictogram/components/informative/percent-sign-pictogram.tsx +2 -0
  255. package/src/components/pictogram/components/informative/person-pictogram.tsx +2 -0
  256. package/src/components/pictogram/components/informative/piggy-bank-pictogram.tsx +2 -0
  257. package/src/components/pictogram/components/informative/pizza-pictogram.tsx +2 -0
  258. package/src/components/pictogram/components/informative/plant-pictogram.tsx +2 -0
  259. package/src/components/pictogram/components/informative/search-pictogram.tsx +2 -0
  260. package/src/components/pictogram/components/informative/secure-pictogram.tsx +2 -0
  261. package/src/components/pictogram/components/informative/shop-pictogram.tsx +2 -0
  262. package/src/components/pictogram/components/informative/shopping-pictogram.tsx +2 -0
  263. package/src/components/pictogram/components/informative/star-pictogram.tsx +2 -0
  264. package/src/components/pictogram/components/informative/stopwatch-pictogram.tsx +2 -0
  265. package/src/components/pictogram/components/informative/tax-document-pictogram.tsx +2 -0
  266. package/src/components/pictogram/components/informative/telephone-call-pictogram.tsx +2 -0
  267. package/src/components/pictogram/components/informative/thumbs-up-pictogram.tsx +2 -0
  268. package/src/components/pictogram/components/informative/tick-pictogram.tsx +2 -0
  269. package/src/components/pictogram/components/informative/tools-pictogram.tsx +2 -0
  270. package/src/components/pictogram/components/informative/tractor-pictogram.tsx +2 -0
  271. package/src/components/pictogram/components/informative/truck-pictogram.tsx +2 -0
  272. package/src/components/pictogram/components/informative/umbrella-pictogram.tsx +2 -0
  273. package/src/components/pictogram/components/informative/unsecure-pictogram.tsx +2 -0
  274. package/src/components/pictogram/components/informative/wallet-pictogram.tsx +2 -0
  275. package/src/components/pictogram/components/informative/wearables-pictogram.tsx +2 -0
  276. package/src/components/pictogram/pictogram.component.tsx +2 -0
  277. package/src/components/popover/components/panel/panel.component.tsx +36 -6
  278. package/src/components/popover/components/panel/panel.styles.ts +5 -5
  279. package/src/components/popover/components/panel/panel.types.ts +13 -2
  280. package/src/components/popover/popover.component.tsx +13 -2
  281. package/src/components/popover/popover.hooks.tsx +56 -0
  282. package/src/components/popover/popover.types.ts +1 -1
  283. package/src/components/progress-bar/progress-bar.styles.ts +2 -2
  284. package/src/components/repeater/repeater.styles.ts +10 -7
  285. package/src/components/switch/switch.styles.ts +1 -1
  286. package/src/components/table/components/row/row.styles.ts +1 -1
  287. package/src/components/tabs/components/tab/tab.styles.ts +4 -4
  288. package/src/css/global.css +4 -2
  289. package/src/tailwind/__mocks__/utils.constants.ts +73 -36
  290. package/src/tailwind/constants/spacing.ts +2 -1
  291. package/src/tailwind/constants/typography.ts +4 -0
  292. package/src/tailwind/tailwind-plugin.ts +9 -0
  293. package/src/tailwind/types/index.ts +0 -1
  294. package/src/tailwind/utils/create-spacing.ts +9 -13
  295. package/.storybook/global.css +0 -108
  296. package/.storybook/main.ts +0 -33
  297. package/.storybook/manager.ts +0 -6
  298. package/.storybook/preview.tsx +0 -91
  299. package/.storybook/theme.ts +0 -9
  300. package/dist/components/accordion/accordion.stories.js +0 -139
  301. package/dist/components/alert/alert.stories.js +0 -144
  302. package/dist/components/autocomplete/autocomplete.stories.js +0 -219
  303. package/dist/components/badge/badge.stories.js +0 -118
  304. package/dist/components/breadcrumb/breadcrumb.stories.js +0 -30
  305. package/dist/components/breadcrumb/components/breadcrumb-item/breadcrumb-item.stories.js +0 -24
  306. package/dist/components/button/button.stories.js +0 -221
  307. package/dist/components/button-dropdown/button-dropdown.stories.js +0 -134
  308. package/dist/components/button-group/button-group.stories.js +0 -153
  309. package/dist/components/checkbox-group/checkbox-group.stories.js +0 -225
  310. package/dist/components/checkbox-group/components/checkbox/checkbox.stories.js +0 -42
  311. package/dist/components/circle/circle.stories.js +0 -17
  312. package/dist/components/collapsible/collapsible.stories.js +0 -43
  313. package/dist/components/compacta/compacta.stories.js +0 -52
  314. package/dist/components/date-picker/date-picker.stories.js +0 -112
  315. package/dist/components/field/field.stories.js +0 -37
  316. package/dist/components/flexi-cell/flexi-cell.stories.js +0 -759
  317. package/dist/components/form/form.stories.js +0 -103
  318. package/dist/components/grid/grid.stories.js +0 -82
  319. package/dist/components/icon/icon.stories.js +0 -147
  320. package/dist/components/input/input.stories.js +0 -56
  321. package/dist/components/input-field/input-field.scenarios.stories.js +0 -149
  322. package/dist/components/input-field/input-field.sizes.stories.js +0 -91
  323. package/dist/components/input-field/input-field.state.stories.js +0 -127
  324. package/dist/components/input-field/input-field.stories.js +0 -71
  325. package/dist/components/input-field/input-field.type.stories.js +0 -186
  326. package/dist/components/link/link.stories.js +0 -93
  327. package/dist/components/list/list.stories.js +0 -86
  328. package/dist/components/modal/modal.stories.js +0 -129
  329. package/dist/components/pagination/pagination.stories.js +0 -199
  330. package/dist/components/panel/panel.stories.js +0 -53
  331. package/dist/components/pictogram/pictogram.stories.js +0 -60
  332. package/dist/components/popover/popover.stories.js +0 -57
  333. package/dist/components/progress-bar/progress-bar.stories.js +0 -70
  334. package/dist/components/progress-rope/progress-rope.stories.js +0 -126
  335. package/dist/components/radio-group/components/radio/radio.stories.js +0 -40
  336. package/dist/components/radio-group/radio-group.stories.js +0 -215
  337. package/dist/components/repeater/repeater.stories.js +0 -29
  338. package/dist/components/select/select.stories.js +0 -74
  339. package/dist/components/selector/selector.stories.js +0 -512
  340. package/dist/components/skip-link/skip-link.stories.js +0 -29
  341. package/dist/components/switch/switch.stories.js +0 -67
  342. package/dist/components/symbol/symbol.stories.js +0 -113
  343. package/dist/components/table/table.stories.js +0 -66
  344. package/dist/components/tabs/tabs.stories.js +0 -95
  345. package/dist/components/textarea/textarea.stories.js +0 -44
  346. package/dist/components/visually-hidden/visually-hidden.stories.js +0 -17
  347. package/dist/components/well/well.stories.js +0 -44
  348. package/dist/stories/foundation/breakpoints.stories.js +0 -12
  349. package/dist/stories/foundation/colours.stories.js +0 -386
  350. package/dist/stories/foundation/theme.stories.js +0 -16
  351. package/dist/stories/foundation/typography.stories.js +0 -109
  352. package/dist/tailwind/types/theme.types.d.ts +0 -1
  353. package/dist/tailwind/types/theme.types.js +0 -1
  354. package/scaffold/component/scaffold.component.hbs +0 -12
  355. package/scaffold/component/scaffold.index.hbs +0 -2
  356. package/scaffold/component/scaffold.spec.hbs +0 -16
  357. package/scaffold/component/scaffold.stories.hbs +0 -23
  358. package/scaffold/component/scaffold.styles.hbs +0 -9
  359. package/scaffold/component/scaffold.types.hbs +0 -12
  360. package/src/components/accordion/accordion.stories.tsx +0 -144
  361. package/src/components/alert/alert.stories.tsx +0 -142
  362. package/src/components/autocomplete/autocomplete.stories.tsx +0 -184
  363. package/src/components/badge/badge.stories.tsx +0 -134
  364. package/src/components/breadcrumb/breadcrumb.stories.tsx +0 -32
  365. package/src/components/breadcrumb/components/breadcrumb-item/breadcrumb-item.stories.tsx +0 -33
  366. package/src/components/button/button.stories.tsx +0 -269
  367. package/src/components/button-dropdown/button-dropdown.stories.tsx +0 -220
  368. package/src/components/button-group/button-group.stories.tsx +0 -141
  369. package/src/components/checkbox-group/checkbox-group.stories.tsx +0 -212
  370. package/src/components/checkbox-group/components/checkbox/checkbox.stories.tsx +0 -46
  371. package/src/components/circle/circle.stories.tsx +0 -22
  372. package/src/components/collapsible/collapsible.stories.tsx +0 -94
  373. package/src/components/compacta/compacta.stories.tsx +0 -71
  374. package/src/components/date-picker/date-picker.stories.tsx +0 -139
  375. package/src/components/field/field.stories.tsx +0 -57
  376. package/src/components/flexi-cell/flexi-cell.stories.tsx +0 -792
  377. package/src/components/form/form.stories.tsx +0 -158
  378. package/src/components/grid/grid.stories.tsx +0 -106
  379. package/src/components/icon/icon.stories.tsx +0 -142
  380. package/src/components/input/input.stories.tsx +0 -70
  381. package/src/components/input-field/input-field.scenarios.stories.tsx +0 -174
  382. package/src/components/input-field/input-field.sizes.stories.tsx +0 -102
  383. package/src/components/input-field/input-field.state.stories.tsx +0 -148
  384. package/src/components/input-field/input-field.stories.tsx +0 -104
  385. package/src/components/input-field/input-field.type.stories.tsx +0 -236
  386. package/src/components/link/link.stories.tsx +0 -113
  387. package/src/components/list/list.stories.tsx +0 -121
  388. package/src/components/modal/modal.stories.tsx +0 -140
  389. package/src/components/pagination/pagination.stories.tsx +0 -174
  390. package/src/components/panel/panel.stories.tsx +0 -147
  391. package/src/components/pictogram/pictogram.stories.tsx +0 -50
  392. package/src/components/popover/popover.stories.tsx +0 -81
  393. package/src/components/progress-bar/progress-bar.stories.tsx +0 -85
  394. package/src/components/progress-rope/progress-rope.stories.tsx +0 -109
  395. package/src/components/radio-group/components/radio/radio.stories.tsx +0 -40
  396. package/src/components/radio-group/radio-group.stories.tsx +0 -199
  397. package/src/components/repeater/repeater.stories.tsx +0 -40
  398. package/src/components/select/select.stories.tsx +0 -88
  399. package/src/components/selector/selector.stories.tsx +0 -618
  400. package/src/components/skip-link/skip-link.stories.tsx +0 -55
  401. package/src/components/switch/switch.stories.tsx +0 -90
  402. package/src/components/symbol/symbol.stories.tsx +0 -131
  403. package/src/components/table/table.stories.tsx +0 -244
  404. package/src/components/tabs/tabs.stories.tsx +0 -111
  405. package/src/components/textarea/textarea.stories.tsx +0 -70
  406. package/src/components/visually-hidden/visually-hidden.stories.tsx +0 -25
  407. package/src/components/well/well.stories.tsx +0 -71
  408. package/src/stories/foundation/breakpoints.stories.tsx +0 -55
  409. package/src/stories/foundation/colours.stories.tsx +0 -380
  410. package/src/stories/foundation/theme.stories.tsx +0 -29
  411. package/src/stories/foundation/typography.stories.tsx +0 -93
  412. package/src/tailwind/types/theme.types.ts +0 -37
@@ -1,792 +0,0 @@
1
- import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
2
-
3
- import { ArrowRightIcon, InfoIcon, TickCircleIcon } from '../icon/index.js';
4
- import { Badge, Button, Circle } from '../index.js';
5
- import { GiftPictogram } from '../pictogram/index.js';
6
-
7
- import { FlexiCell } from './flexi-cell.component.js';
8
-
9
- const meta: Meta<typeof FlexiCell> = {
10
- title: 'Components/FlexiCell',
11
- component: FlexiCell,
12
- tags: ['autodocs'],
13
- decorators: [(Story: StoryFn) => <Story />],
14
- argTypes: {
15
- after: {
16
- description: 'Renders an element on the right',
17
- type: { name: 'string' },
18
- },
19
- badge: {
20
- description: 'Renders an element on the top right corner',
21
- type: { name: 'string' },
22
- },
23
- badgeZIndex: {
24
- description: 'zIndex for badge',
25
- type: { name: 'number' },
26
- },
27
- before: {
28
- description: 'Renders an element on the left',
29
- type: { name: 'string' },
30
- },
31
- body: {
32
- description: 'Injects the FlexiCell.Body inside of the children',
33
- type: { name: 'boolean' },
34
- },
35
- children: {
36
- description: 'The middle content of FlexiCell',
37
- type: { name: 'string' },
38
- },
39
- href: {
40
- description: 'href in case it is an "a" tag',
41
- type: { name: 'string' },
42
- },
43
- /**
44
- * The native tag that flexicell will be rendered
45
- */
46
- // tag?: keyof JSX.IntrinsicElements;
47
- withArrow: {
48
- description: 'Adds an arrow on top right',
49
- type: { name: 'boolean' },
50
- },
51
- withBorder: {
52
- description: 'Adds a border radius and a border',
53
- type: { name: 'boolean' },
54
- },
55
- },
56
- };
57
-
58
- export default meta;
59
- type Story = StoryObj<unknown>;
60
-
61
- /**
62
- * > Default usage example
63
- */
64
- export const Default: Story = {
65
- args: {
66
- tag: 'a',
67
- href: '#',
68
- withBorder: true,
69
- body: true,
70
- after: 'after',
71
- before: 'before',
72
- children: (
73
- <>
74
- <FlexiCell.Label tag="h3">Label</FlexiCell.Label>
75
- <FlexiCell.Hint>Hint</FlexiCell.Hint>
76
- </>
77
- ),
78
- },
79
- };
80
-
81
- export const CreditCard: Story = {
82
- args: {
83
- tag: 'a',
84
- href: '#',
85
- withBorder: true,
86
- body: true,
87
- after: (
88
- <FlexiCell.Adornment align="top">
89
- <FlexiCell.Label tag="h3">$9,999.99</FlexiCell.Label>
90
- <FlexiCell.Hint>avail $9,999.99</FlexiCell.Hint>
91
- </FlexiCell.Adornment>
92
- ),
93
- children: (
94
- <>
95
- <FlexiCell.Label tag="h3">Credit card</FlexiCell.Label>
96
- <FlexiCell.Hint>Card ending in 1234</FlexiCell.Hint>
97
- </>
98
- ),
99
- },
100
- };
101
-
102
- export const Account: Story = {
103
- args: {
104
- tag: 'a',
105
- href: '#',
106
- withBorder: true,
107
- body: true,
108
- after: (
109
- <FlexiCell.Adornment align="top">
110
- <FlexiCell.Label tag="h3">$9,999.99</FlexiCell.Label>
111
- </FlexiCell.Adornment>
112
- ),
113
- children: (
114
- <>
115
- <FlexiCell.Label tag="h3">Account</FlexiCell.Label>
116
- <FlexiCell.Hint>032-123 12345678</FlexiCell.Hint>
117
- </>
118
- ),
119
- },
120
- };
121
-
122
- export const Payee: Story = {
123
- args: {
124
- tag: 'a',
125
- href: '#',
126
- withBorder: true,
127
- body: true,
128
- before: (
129
- <Circle className="bg-primary text-white" aria-label="Bruce">
130
- B
131
- </Circle>
132
- ),
133
- after: (
134
- <FlexiCell.Adornment align="center">
135
- <FlexiCell.Hint className="text-muted">Fri 5 Aug</FlexiCell.Hint>
136
- </FlexiCell.Adornment>
137
- ),
138
- children: (
139
- <>
140
- <h3 className="typography-body-8 font-normal">Payee</h3>
141
- <small className="text-muted">Payee details</small>
142
- </>
143
- ),
144
- },
145
- };
146
-
147
- export const PayeeWithInfo: Story = {
148
- args: {
149
- withBorder: true,
150
- body: true,
151
- before: (
152
- <Circle className="bg-muted text-white" aria-label="Walter White">
153
- WW
154
- </Circle>
155
- ),
156
- after: (
157
- <FlexiCell.Adornment align="center">
158
- <Button look="link" href="/somewhere" iconBefore={InfoIcon} aria-label="more info" />
159
- </FlexiCell.Adornment>
160
- ),
161
- children: (
162
- <a href="#" className="group text-[inherit] decoration-[inherit] focus:focus-outline">
163
- <h3 className="typography-body-8 font-normal">Payee</h3>
164
- <small className="text-muted">Payee details</small>
165
- </a>
166
- ),
167
- },
168
- };
169
-
170
- export const FlagPayee: Story = {
171
- args: {
172
- withBorder: true,
173
- body: true,
174
- before: <div>Flag</div>,
175
- after: (
176
- <FlexiCell.Adornment align="center">
177
- <Button look="link" href="/somewhere" iconBefore={InfoIcon} aria-label="more info" />
178
- </FlexiCell.Adornment>
179
- ),
180
- children: (
181
- <a href="#" className="group text-[inherit] decoration-[inherit] focus:focus-outline">
182
- <h3 className="typography-body-8 font-normal">Payee</h3>
183
- <small className="text-muted">Payee details</small>
184
- </a>
185
- ),
186
- },
187
- };
188
-
189
- export const ListItemWithFlag: Story = {
190
- args: {
191
- tag: 'a',
192
- href: '#',
193
- withBorder: true,
194
- body: true,
195
- before: <div>Flag</div>,
196
- children: <h3 className="typography-body-8 font-normal">List item</h3>,
197
- },
198
- };
199
-
200
- export const ListItem: Story = {
201
- args: {
202
- tag: 'a',
203
- href: '#',
204
- withBorder: true,
205
- body: true,
206
- children: <h3 className="typography-body-8 font-normal">List item</h3>,
207
- },
208
- };
209
-
210
- export const WestpacSpecialProduct: Story = {
211
- args: {
212
- tag: 'a',
213
- href: '#',
214
- withBorder: true,
215
- body: true,
216
- after: (
217
- <FlexiCell.Adornment align="top">
218
- <ArrowRightIcon color="link" aria-hidden="true" />
219
- </FlexiCell.Adornment>
220
- ),
221
- children: (
222
- <>
223
- <GiftPictogram mode="duo" className="h-[50px] w-[50px]" aria-hidden="true" />
224
- <h3 className="typography-body-8 font-normal">Westpac specials and product offers</h3>
225
- <FlexiCell.Hint>Discounts and cashback from select merchants & product offers from Westpac</FlexiCell.Hint>
226
- </>
227
- ),
228
- },
229
- };
230
-
231
- export const FlexiCellWithImage: Story = {
232
- args: {
233
- tag: 'a',
234
- href: '#',
235
- withBorder: true,
236
- body: true,
237
- children: (
238
- <>
239
- <img
240
- src="https://images.unsplash.com/photo-1657299170950-87e5b0eaf77c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1740&q=80"
241
- alt=""
242
- className="mb-2 block w-full"
243
- />
244
- <FlexiCell.Label className="mb-[0.5rem]">MYER</FlexiCell.Label>
245
- <h3 className="typography-body-8 font-normal">Westpac specials and product offers</h3>
246
- </>
247
- ),
248
- },
249
- };
250
-
251
- export const StickyFooterExample: Story = {
252
- args: {},
253
- render: () => {
254
- return (
255
- <div className="flex flex-col gap-2 lg:flex-row">
256
- {[
257
- 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem quae possimus, nam nobis cumque ullam et harum, magni quam distinctio, corporis sunt saepe maxime quod. Sapiente voluptatibus sint dicta tenetur.',
258
- 'Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem quae possimus, nam nobis cumque ullam et harum, magni quam distinctio, corporis sunt saepe.',
259
- 'Lorem ipsum dolor sit amet',
260
- ].map(title => (
261
- <FlexiCell
262
- withBorder
263
- key={title}
264
- badge={
265
- <Badge className="block" color="primary">
266
- Badge
267
- </Badge>
268
- }
269
- >
270
- <FlexiCell.Body>
271
- <img
272
- src="https://images.unsplash.com/photo-1657299170950-87e5b0eaf77c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1740&q=80"
273
- alt=""
274
- className="mb-2 block w-full"
275
- />
276
- <FlexiCell.Label className="mb-[0.5rem]">MYER</FlexiCell.Label>
277
- <h3 className="typography-body-8 font-normal">{title}</h3>
278
- </FlexiCell.Body>
279
- <FlexiCell.Footer>
280
- <Button size="small" soft>
281
- Share
282
- </Button>
283
- </FlexiCell.Footer>
284
- </FlexiCell>
285
- ))}
286
- </div>
287
- );
288
- },
289
- };
290
-
291
- const MOCK_ACCOUNTS = [
292
- {
293
- title: 'Cash',
294
- id: 'cash',
295
- accounts: [
296
- {
297
- name: 'Westpac Choice',
298
- amount: '$1,234.99',
299
- number: '732-123 746587',
300
- },
301
- {
302
- name: 'Offset account for loan',
303
- amount: '$20,000.00',
304
- number: '732-123 123456',
305
- },
306
- ],
307
- },
308
- {
309
- title: 'Foreign currency',
310
- id: 'foreign-currency',
311
- accounts: [
312
- {
313
- name: 'US Dollar Currency Account',
314
- amount: '$3,957.57',
315
- number: '123-456 1234567',
316
- },
317
- {
318
- name: 'British pound Currency Account',
319
- amount: '$9,999,999,999.99',
320
- number: '123-456 1234567',
321
- },
322
- ],
323
- },
324
- {
325
- title: 'Credit cards',
326
- id: 'credit-cards',
327
- accounts: [
328
- {
329
- name: 'Altitude Black World Mastercard',
330
- amount: '-$3,957.57',
331
- number: 'Card ending in 1234',
332
- },
333
- ],
334
- },
335
- ];
336
- // WIP
337
- export const AccountList: Story = {
338
- args: {},
339
- render: () => {
340
- return (
341
- <div className="flex flex-col gap-2">
342
- {MOCK_ACCOUNTS.map(({ title, id, accounts }) => (
343
- <div key={id} className="flex flex-col gap-3">
344
- <h3 className="m-0 font-normal">{title}</h3>
345
- <div className="flex flex-col gap-2">
346
- {accounts.map(({ name, amount, number }) => (
347
- <FlexiCell
348
- tag="a"
349
- href="#"
350
- body
351
- withBorder
352
- key={name}
353
- after={
354
- <FlexiCell.Adornment align="top">
355
- <FlexiCell.Label className="font-semibold" tag="h4">
356
- {amount}
357
- </FlexiCell.Label>
358
- <FlexiCell.Hint>available</FlexiCell.Hint>
359
- </FlexiCell.Adornment>
360
- }
361
- >
362
- <FlexiCell.Label className="font-normal" tag="h4">
363
- {name}
364
- </FlexiCell.Label>
365
- <FlexiCell.Hint>{number}</FlexiCell.Hint>
366
- </FlexiCell>
367
- ))}
368
- </div>
369
- </div>
370
- ))}
371
- </div>
372
- );
373
- },
374
- };
375
-
376
- const MOCK_PAYEES = [
377
- {
378
- title: 'Recently Paid',
379
- id: 'recently-paid',
380
- payees: [
381
- {
382
- initials: 'AJ',
383
- name: 'Andrew Jones',
384
- paidAt: 'Fri 5 Aug',
385
- number: '123-986 463846',
386
- },
387
- {
388
- initials: 'JW',
389
- name: 'Joss Wight',
390
- paidAt: 'Mon 1 Aug',
391
- number: '098-567 465352',
392
- },
393
- ],
394
- },
395
- {
396
- title: 'A',
397
- id: 'a',
398
- payees: [
399
- {
400
- initials: 'AO',
401
- name: 'Active OOSH',
402
- number: '857-434 856383',
403
- paidAt: undefined,
404
- },
405
- {
406
- initials: 'AC',
407
- name: 'Alice Cartwright',
408
- number: '950-456 345363',
409
- paidAt: undefined,
410
- },
411
- ],
412
- },
413
- {
414
- title: 'B',
415
- id: 'b',
416
- payees: [
417
- {
418
- initials: 'BN',
419
- name: 'Benjamin North',
420
- number: '098-123 745362',
421
- paidAt: undefined,
422
- },
423
- ],
424
- },
425
- ];
426
-
427
- export const PayeeList: Story = {
428
- args: {},
429
- render: () => {
430
- return (
431
- <div className="flex flex-col gap-2">
432
- {MOCK_PAYEES.map(({ title, id, payees }) => (
433
- <div key={id} className="flex flex-col gap-3">
434
- <h3 className="m-0 border-b border-border pb-1 font-normal">{title}</h3>
435
- <div className="flex flex-col gap-3">
436
- {payees.map(({ name, initials, paidAt, number }) => {
437
- return (
438
- <FlexiCell
439
- {...(paidAt ? { href: '#', tag: 'a' } : { tag: 'div' })}
440
- key={name}
441
- className="group"
442
- body
443
- before={
444
- <FlexiCell.Adornment align="top">
445
- <FlexiCell.Circle className="bg-muted text-white" aria-hidden="true">
446
- {initials}
447
- </FlexiCell.Circle>
448
- </FlexiCell.Adornment>
449
- }
450
- after={
451
- <FlexiCell.Adornment align="center">
452
- {paidAt ? (
453
- <FlexiCell.Hint tag="h4">{paidAt}</FlexiCell.Hint>
454
- ) : (
455
- <FlexiCell.Button tag="a" href="/somewhere" iconBefore={InfoIcon} aria-label="more info" />
456
- )}
457
- </FlexiCell.Adornment>
458
- }
459
- >
460
- {paidAt ? (
461
- <>
462
- <FlexiCell.Label className="font-medium" tag="h4">
463
- {name}
464
- </FlexiCell.Label>
465
- <FlexiCell.Hint>{number}</FlexiCell.Hint>
466
- </>
467
- ) : (
468
- <a href="#" className="text-[inherit] decoration-[inherit] focus:focus-outline">
469
- <FlexiCell.Label className="font-medium" tag="h4">
470
- {name}
471
- </FlexiCell.Label>
472
- <FlexiCell.Hint>{number}</FlexiCell.Hint>
473
- </a>
474
- )}
475
- </FlexiCell>
476
- );
477
- })}
478
- </div>
479
- </div>
480
- ))}
481
- </div>
482
- );
483
- },
484
- };
485
-
486
- const MOCK_COUNTRIES = [
487
- {
488
- title: 'Popular',
489
- id: 'popular',
490
- payees: [
491
- {
492
- code: 'IN',
493
- name: 'India',
494
- },
495
- {
496
- code: 'UK',
497
- name: 'United Kingdom',
498
- },
499
- {
500
- code: 'USA',
501
- name: 'United States',
502
- },
503
- ],
504
- },
505
- {
506
- title: 'A',
507
- id: 'a',
508
- payees: [
509
- {
510
- code: 'AI',
511
- name: 'Ascension Islands',
512
- },
513
- {
514
- code: 'AN',
515
- name: 'Andorra',
516
- },
517
- {
518
- code: 'UA',
519
- name: 'United Arab Emirates',
520
- },
521
- {
522
- code: 'AF',
523
- name: 'Afghanistan',
524
- },
525
- ],
526
- },
527
- ];
528
-
529
- export const CountryList: Story = {
530
- args: {},
531
- render: () => {
532
- return (
533
- <div className="flex flex-col gap-2">
534
- {MOCK_COUNTRIES.map(({ title, id, payees }) => (
535
- <div key={id} className="flex flex-col gap-3">
536
- <h3 className="m-0 border-b border-b-border pb-1 font-normal">{title}</h3>
537
- <div className="flex flex-col gap-3">
538
- {payees.map(({ name }) => {
539
- return (
540
- <FlexiCell
541
- tag="a"
542
- href="#"
543
- withBorder
544
- body
545
- key={name}
546
- before={
547
- <FlexiCell.Adornment align="top">
548
- <svg
549
- width="30"
550
- height="24"
551
- viewBox="0 0 640 480"
552
- fill="none"
553
- xmlns="http://www.w3.org/2000/svg"
554
- aria-hidden="true"
555
- >
556
- <path d="M0 0H640V480H0V0Z" fill="white" />
557
- <path d="M0 0H213.3V480H0V0Z" fill="#002654" />
558
- <path d="M426.7 0H640V480H426.7V0Z" fill="#CE1126" />
559
- </svg>
560
- </FlexiCell.Adornment>
561
- }
562
- >
563
- <FlexiCell.Label className="font-medium" tag="span">
564
- {name}
565
- </FlexiCell.Label>
566
- </FlexiCell>
567
- );
568
- })}
569
- </div>
570
- </div>
571
- ))}
572
- </div>
573
- );
574
- },
575
- };
576
-
577
- export const ForeignCurrencyList: Story = {
578
- args: {},
579
- render: () => {
580
- return (
581
- <div className="flex flex-col gap-2">
582
- {MOCK_PAYEES.map(({ title, id, payees }) => (
583
- <div key={id} className="flex flex-col gap-3">
584
- <h3 className="m-0 border-b border-b-border pb-1 font-normal">{title}</h3>
585
- <div className="flex flex-col gap-3">
586
- {payees.map(({ name, paidAt, number }) => {
587
- return (
588
- <FlexiCell
589
- {...(paidAt ? { href: '#', tag: 'a' } : { tag: 'div' })}
590
- body
591
- className="group"
592
- key={name}
593
- before={
594
- <FlexiCell.Adornment align="top">
595
- <svg
596
- width="30"
597
- height="24"
598
- viewBox="0 0 640 480"
599
- fill="none"
600
- xmlns="http://www.w3.org/2000/svg"
601
- aria-label="French flag"
602
- >
603
- <path d="M0 0H640V480H0V0Z" fill="white" />
604
- <path d="M0 0H213.3V480H0V0Z" fill="#002654" />
605
- <path d="M426.7 0H640V480H426.7V0Z" fill="#CE1126" />
606
- </svg>
607
- </FlexiCell.Adornment>
608
- }
609
- after={
610
- <FlexiCell.Adornment align="center">
611
- {paidAt ? (
612
- <FlexiCell.Hint tag="h4">{paidAt}</FlexiCell.Hint>
613
- ) : (
614
- <FlexiCell.Button href="/somewhere" iconBefore={InfoIcon} aria-label="more info" />
615
- )}
616
- </FlexiCell.Adornment>
617
- }
618
- >
619
- {paidAt ? (
620
- <>
621
- <FlexiCell.Label className="font-medium" tag="h4">
622
- {name}
623
- </FlexiCell.Label>
624
- <FlexiCell.Hint>{number}</FlexiCell.Hint>
625
- </>
626
- ) : (
627
- <a href="#" className="text-[inherit] decoration-[inherit] focus:focus-outline">
628
- <FlexiCell.Label className="font-medium" tag="h4">
629
- {name}
630
- </FlexiCell.Label>
631
- <FlexiCell.Hint>{number}</FlexiCell.Hint>
632
- </a>
633
- )}
634
- </FlexiCell>
635
- );
636
- })}
637
- </div>
638
- </div>
639
- ))}
640
- </div>
641
- );
642
- },
643
- };
644
-
645
- const MOCK_PROMOS = [
646
- {
647
- title: 'Get 50% Off on All Products',
648
- subtitle: 'Limited time offer! Save big on our entire range of products.',
649
- stars: true,
650
- },
651
- {
652
- title: 'Exclusive Membership Benefits',
653
- subtitle: 'Unlock premium features and discounts with our membership program.',
654
- stars: false,
655
- },
656
- {
657
- title: 'New Arrival Alert!',
658
- subtitle: 'Discover the latest arrivals and stay ahead of the trend.',
659
- stars: false,
660
- },
661
- {
662
- title: 'Weekend Special Sale',
663
- subtitle: "Don't miss out on our weekend sale with massive discounts!",
664
- stars: false,
665
- },
666
- ];
667
-
668
- export const PromotilesHorizontalList: Story = {
669
- args: {},
670
- render: () => {
671
- return (
672
- <div className="flex flex-col gap-2">
673
- {MOCK_PROMOS.map(({ title, subtitle, stars }) => {
674
- return (
675
- <FlexiCell
676
- tag="a"
677
- href="#"
678
- key={title}
679
- withBorder
680
- body
681
- before={
682
- <FlexiCell.Adornment align="center">
683
- <Circle className="h-[70px] w-[70px]">Target</Circle>
684
- </FlexiCell.Adornment>
685
- }
686
- badge={
687
- <Badge className="block" color="hero" aria-hidden={stars ?? 'true'}>
688
- {stars ? '✭' : 'Corner flag'}
689
- </Badge>
690
- }
691
- >
692
- <small>MYER</small>
693
- <FlexiCell.Label className="font-medium" tag="h4">
694
- {title}
695
- </FlexiCell.Label>
696
- <FlexiCell.Hint>{subtitle}</FlexiCell.Hint>
697
- <div className="mt-2 flex gap-2">
698
- <Badge color="primary">Badge1</Badge>
699
- <Badge color="primary">Badge2</Badge>
700
- </div>
701
- </FlexiCell>
702
- );
703
- })}
704
- </div>
705
- );
706
- },
707
- };
708
-
709
- export const PromotilesVerticalList: Story = {
710
- args: {},
711
- render: () => {
712
- return (
713
- <div className="flex flex-col gap-2">
714
- <div className="flex gap-3">
715
- {MOCK_PROMOS.map(({ title, subtitle }) => (
716
- <FlexiCell
717
- withBorder
718
- key={title}
719
- className="group"
720
- badge={
721
- <Badge className="block" color="hero">
722
- Badge
723
- </Badge>
724
- }
725
- >
726
- <FlexiCell.Body tag="a" href="#" className="text-[inherit] decoration-[inherit] focus:focus-outline">
727
- <img
728
- src="https://images.unsplash.com/photo-1657299170950-87e5b0eaf77c?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1740&q=80"
729
- alt=""
730
- className="block h-[63px] w-full object-cover"
731
- />
732
- <small>MYER</small>
733
- <FlexiCell.Label className="font-medium" tag="h4">
734
- {title}
735
- </FlexiCell.Label>
736
- <FlexiCell.Hint>{subtitle}</FlexiCell.Hint>
737
- </FlexiCell.Body>
738
- <FlexiCell.Footer>
739
- <div className="mt-2 flex gap-2">
740
- <a href="#" className="focus:focus-outline">
741
- <Badge color="primary">Badge1</Badge>
742
- </a>
743
- <a href="#" className="focus:focus-outline">
744
- <Badge color="primary">Badge2</Badge>
745
- </a>
746
- </div>
747
- </FlexiCell.Footer>
748
- </FlexiCell>
749
- ))}
750
- </div>
751
- </div>
752
- );
753
- },
754
- };
755
-
756
- const MOCK_PRODUCTS = [
757
- {
758
- title: 'This is talking about the bonus.',
759
- subtitle: 'This is more about the bonus and all the other exciting things about this.',
760
- },
761
- {
762
- title: 'This is a longer heading talking all about the bonus this one wraps.',
763
- subtitle: 'This is more about the bonus',
764
- },
765
- {
766
- title: 'This is talking about the bonus.',
767
- subtitle: 'This is more about the bonus and all the other exciting things about this.',
768
- },
769
- ];
770
-
771
- export const ProductTiles: Story = {
772
- args: {},
773
- render: () => {
774
- return (
775
- <div className="flex flex-col gap-2">
776
- {MOCK_PRODUCTS.map(({ title, subtitle }) => (
777
- <FlexiCell tag="a" href="#" withBorder withArrow body key={title} after={<TickCircleIcon color="success" />}>
778
- <div className="flex flex-col gap-2 md:flex-row">
779
- <GiftPictogram mode="duo" className="h-[24px] w-[24px]" aria-hidden="true" />
780
- <div className="flex flex-col gap-1">
781
- <FlexiCell.Label className="font-medium" tag="h4">
782
- {title}
783
- </FlexiCell.Label>
784
- <FlexiCell.Hint>{subtitle}</FlexiCell.Hint>
785
- </div>
786
- </div>
787
- </FlexiCell>
788
- ))}
789
- </div>
790
- );
791
- },
792
- };