@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,81 +0,0 @@
1
- import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
2
-
3
- import { HelpIcon } from '../icon/index.js';
4
-
5
- import { Popover } from './popover.component.js';
6
-
7
- const popoverContent =
8
- 'Small overlays of content for housing secondary information. These are often used to provide explanatory information for complex ideas.';
9
-
10
- const meta: Meta<typeof Popover> = {
11
- title: 'Components/Popover',
12
- component: Popover,
13
- tags: ['autodocs'],
14
- decorators: [
15
- (Story: StoryFn) => (
16
- <div className="p-29">
17
- <Story />
18
- </div>
19
- ),
20
- ],
21
- args: {
22
- content: popoverContent,
23
- heading: 'Test Heading',
24
- },
25
- };
26
-
27
- export default meta;
28
- type Story = StoryObj<typeof meta>;
29
-
30
- /**
31
- * > Default usage example
32
- */
33
- export const Default: Story = {
34
- args: {
35
- children: 'Click Me',
36
- },
37
- };
38
-
39
- /**
40
- * > Using icon as trigger
41
- */
42
- export const IconTrigger: Story = {
43
- args: {
44
- icon: () => <HelpIcon color="hero" />,
45
- },
46
- };
47
-
48
- /**
49
- * > Default open
50
- */
51
- export const DefaultOpen: Story = {
52
- args: {
53
- children: 'Click Me',
54
- open: true,
55
- },
56
- };
57
-
58
- /**
59
- * > No heading
60
- */
61
- export const NoHeading: Story = {
62
- args: {
63
- children: 'Click Me',
64
- open: true,
65
- heading: undefined,
66
- },
67
- };
68
-
69
- /**
70
- * > Top and bottom popover
71
- */
72
- export const PopoverPlacement = () => (
73
- <div>
74
- <Popover className="mr-3" heading="Heading" placement="top" content={popoverContent} open>
75
- Top Popover
76
- </Popover>
77
- <Popover placement="bottom" heading="Heading" content={popoverContent} open>
78
- Bottom Popover
79
- </Popover>
80
- </div>
81
- );
@@ -1,85 +0,0 @@
1
- import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
2
- import { useCallback, useState } from 'react';
3
-
4
- import { Button } from '../button/index.js';
5
-
6
- import { ProgressBar } from './progress-bar.component.js';
7
-
8
- const meta: Meta<typeof ProgressBar> = {
9
- title: 'Components/ProgressBar',
10
- component: ProgressBar,
11
- tags: ['autodocs'],
12
- decorators: [(Story: StoryFn) => <Story />],
13
- };
14
-
15
- export default meta;
16
- type Story = StoryObj<typeof meta>;
17
-
18
- /**
19
- * > Default usage example
20
- */
21
- export const Default: Story = {
22
- args: {
23
- value: 50,
24
- look: 'default',
25
- },
26
- };
27
-
28
- /**
29
- * > Skinny example
30
- */
31
- export const Skinny: Story = {
32
- args: {
33
- value: 50,
34
- look: 'skinny',
35
- },
36
- };
37
-
38
- /**
39
- * > No label example
40
- */
41
- export const NoLabel: Story = {
42
- args: {
43
- value: 50,
44
- look: 'default',
45
- noLabel: true,
46
- },
47
- };
48
-
49
- /**
50
- * Example of Progress Bar controlled by buttons
51
- */
52
- export const Controlled = () => {
53
- const [barValue, setBarValue] = useState(0);
54
- const handleProgress = useCallback(
55
- (calc: number) => {
56
- const progress = barValue + calc;
57
- if (progress > 100) return setBarValue(100);
58
- if (progress < 0) return setBarValue(0);
59
- return setBarValue(progress);
60
- },
61
- [barValue],
62
- );
63
- return (
64
- <>
65
- <h2 className="typography-body-9 mb-1 font-bold">Default</h2>
66
- <ProgressBar value={barValue} className="mb-2" />
67
- <h2 className="typography-body-9 mb-1 font-bold">Skinny</h2>
68
- <ProgressBar look="skinny" value={barValue} className="mb-2" />
69
- <div className="flex space-x-2">
70
- <Button soft onClick={() => handleProgress(-1)}>
71
- -1%
72
- </Button>
73
- <Button soft onClick={() => handleProgress(-10)}>
74
- -10%
75
- </Button>
76
- <Button soft onClick={() => handleProgress(+1)}>
77
- +1%
78
- </Button>
79
- <Button soft onClick={() => handleProgress(+10)}>
80
- +10%
81
- </Button>
82
- </div>
83
- </>
84
- );
85
- };
@@ -1,109 +0,0 @@
1
- import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
2
- import { useCallback, useState } from 'react';
3
-
4
- import { Button } from '../index.js';
5
-
6
- import { ProgressRope } from './progress-rope.component.js';
7
- import { ProgressRopeProps } from './progress-rope.types.js';
8
-
9
- const meta: Meta<typeof ProgressRope> = {
10
- title: 'Components/ProgressRope',
11
- component: ProgressRope,
12
- tags: ['autodocs'],
13
- decorators: [(Story: StoryFn) => <Story />],
14
- };
15
-
16
- export default meta;
17
- type Story = StoryObj<typeof meta>;
18
-
19
- /**
20
- * > Default usage example
21
- */
22
- export const Default: Story = {
23
- args: {},
24
- render: () => {
25
- const [activeIndex, setActiveIndex] = useState(0);
26
- const handleClick = useCallback(
27
- (index: number) => () => {
28
- setActiveIndex(index);
29
- },
30
- [],
31
- );
32
- const PROGRESS_ROPE_DATA: ProgressRopeProps['data'] = [
33
- { text: <h3>Step 1</h3>, onClick: handleClick(0) },
34
- { text: <h3>Step 2</h3>, onClick: handleClick(1) },
35
- { text: <h3>Step 3</h3>, onClick: handleClick(2) },
36
- { text: <h3>Step 4</h3>, onClick: handleClick(3) },
37
- { text: <h3>Step 5</h3>, onClick: handleClick(4) },
38
- { text: <h3>Review and Submit</h3>, onClick: handleClick(5) },
39
- ];
40
-
41
- return (
42
- <div>
43
- <ProgressRope current={activeIndex} data={PROGRESS_ROPE_DATA} />
44
- <div>
45
- <h3>Helper Controls</h3>
46
- <h4>Current: {activeIndex}</h4>
47
- <Button onClick={() => setActiveIndex(state => --state)}>prev</Button>{' '}
48
- <Button onClick={() => setActiveIndex(state => ++state)}>next</Button>
49
- </div>
50
- </div>
51
- );
52
- },
53
- };
54
-
55
- /**
56
- * > Grouping steps story usage example
57
- */
58
- export const GroupingSteps: Story = {
59
- args: {},
60
- render: () => {
61
- const [activeIndex, setActiveIndex] = useState(0);
62
- const handleClick = useCallback(
63
- (index: number) => () => {
64
- setActiveIndex(index);
65
- },
66
- [],
67
- );
68
- const PROGRESS_ROPE_DATA: ProgressRopeProps['data'] = [
69
- {
70
- type: 'group',
71
- text: 'Group 1',
72
- steps: [
73
- { text: 'Step 1', onClick: handleClick(0) },
74
- { text: 'Step 2', onClick: handleClick(1) },
75
- ],
76
- },
77
- {
78
- type: 'group',
79
- text: 'Group 2',
80
- steps: [
81
- { text: 'Step 3', onClick: handleClick(2) },
82
- { text: 'Step 4', onClick: handleClick(3) },
83
- ],
84
- },
85
- {
86
- type: 'group',
87
- text: 'Group 3',
88
- steps: [
89
- { text: 'Step 5', onClick: handleClick(4) },
90
- { text: 'Step 6', onClick: handleClick(5) },
91
- { text: 'Step 7', onClick: handleClick(6) },
92
- ],
93
- },
94
- { text: 'Review and Submit', onClick: handleClick(7) },
95
- ];
96
-
97
- return (
98
- <div>
99
- <ProgressRope current={activeIndex} data={PROGRESS_ROPE_DATA} />
100
- <div>
101
- <h3>Helper Controls</h3>
102
- <h4>Current: {activeIndex}</h4>
103
- <Button onClick={() => setActiveIndex(state => --state)}>prev</Button>{' '}
104
- <Button onClick={() => setActiveIndex(state => ++state)}>next</Button>
105
- </div>
106
- </div>
107
- );
108
- },
109
- };
@@ -1,40 +0,0 @@
1
- import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
2
-
3
- import { Radio } from './radio.component.js';
4
-
5
- const meta: Meta<typeof Radio> = {
6
- title: 'Components/RadioGroup/Radio',
7
- component: Radio,
8
- tags: ['autodocs'],
9
- decorators: [(Story: StoryFn) => <Story />],
10
- argTypes: {
11
- isDisabled: {
12
- description: 'Controls whether individual radio options are disabled or not',
13
- type: { name: 'boolean' },
14
- },
15
- },
16
- };
17
-
18
- export default meta;
19
- type Story = StoryObj<typeof meta>;
20
-
21
- /**
22
- * > Base radio, unchecked as that is handled by RadioGroup
23
- */
24
- export const Default: Story = {
25
- args: { children: 'Option 1', value: 'Option 1' },
26
- };
27
-
28
- /**
29
- * > Radio with hint example
30
- */
31
- export const Hint: Story = {
32
- args: { children: 'Option 1', value: 'Option 1', hint: 'Test hint' },
33
- };
34
-
35
- /**
36
- * > Disabled Radio example
37
- */
38
- export const Disabled: Story = {
39
- args: { children: 'Option 1', value: 'Option 1', isDisabled: true },
40
- };
@@ -1,199 +0,0 @@
1
- import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
2
-
3
- import { RadioGroup } from './radio-group.component.js';
4
-
5
- const meta: Meta<typeof RadioGroup> = {
6
- title: 'Components/RadioGroup',
7
- component: RadioGroup,
8
- tags: ['autodocs'],
9
- decorators: [(Story: StoryFn) => <Story />],
10
- args: {
11
- label: <h2>Test</h2>,
12
- },
13
- argTypes: {
14
- orientation: {
15
- description:
16
- "Controls orientation of `Radio` components, can't be applied directly on `Radio` \n\n `'horizontal'` `'vertical'`",
17
- type: { name: 'enum', value: ['horizontal', 'vertical'] },
18
- },
19
- isDisabled: {
20
- description: 'Controls whether all radio options are disabled or not',
21
- type: { name: 'boolean' },
22
- },
23
- label: {
24
- description:
25
- 'Not part of original GEL component but added for compatability with React Aria and accessibility. Styling can be done by passing tag with className as value.',
26
- },
27
- },
28
- };
29
-
30
- export default meta;
31
- type Story = StoryObj<typeof meta>;
32
-
33
- /**
34
- * > Default usage example
35
- */
36
- export const Default: Story = {
37
- args: {
38
- children: [
39
- <RadioGroup.Radio value="Option 1">Option 1</RadioGroup.Radio>,
40
- <RadioGroup.Radio value="Option 2">Option 2</RadioGroup.Radio>,
41
- <RadioGroup.Radio value="Option 3">Option 3</RadioGroup.Radio>,
42
- ],
43
- },
44
- };
45
-
46
- /**
47
- * > Default with long content
48
- */
49
- export const LongLines: Story = {
50
- args: {
51
- children: [
52
- <RadioGroup.Radio value="Option 1">Option 1</RadioGroup.Radio>,
53
- <RadioGroup.Radio value="Option 2">Option 2</RadioGroup.Radio>,
54
- <RadioGroup.Radio value="Option 3">
55
- Lorem ipsum dolor sit amet, consectetur adipisicing elit. Et odit labore illo sint tempora magnam modi nesciunt
56
- consectetur vitae maiores itaque reiciendis sunt nisi ullam officiis, provident fugiat, esse iste adipisci
57
- repellat! Incidunt delectus, pariatur quaerat vitae aspernatur eveniet libero.
58
- </RadioGroup.Radio>,
59
- ],
60
- },
61
- };
62
-
63
- /**
64
- * > RadioGroup with default value
65
- */
66
- export const DefaultValue: Story = {
67
- args: {
68
- children: [
69
- <RadioGroup.Radio value="Option 1">Option 1</RadioGroup.Radio>,
70
- <RadioGroup.Radio value="Option 2">Option 2</RadioGroup.Radio>,
71
- <RadioGroup.Radio value="Option 3">Option 3</RadioGroup.Radio>,
72
- ],
73
- defaultValue: 'Option 1',
74
- },
75
- };
76
-
77
- /**
78
- * > RadioGroup with radios aligned horizontally
79
- */
80
- export const Inline: Story = {
81
- args: {
82
- children: [
83
- <RadioGroup.Radio value="Option 1">Option 1</RadioGroup.Radio>,
84
- <RadioGroup.Radio value="Option 2">Option 2</RadioGroup.Radio>,
85
- <RadioGroup.Radio value="Option 3">Option 3</RadioGroup.Radio>,
86
- ],
87
- orientation: 'horizontal',
88
- },
89
- };
90
-
91
- /**
92
- * > RadioGroup with radios aligned horizontally with long content
93
- */
94
- export const InlineLongLines: Story = {
95
- args: {
96
- children: [
97
- <RadioGroup.Radio value="Option 1">Option 1</RadioGroup.Radio>,
98
- <RadioGroup.Radio value="Option 2">Option 2</RadioGroup.Radio>,
99
- <RadioGroup.Radio value="Option 3">
100
- Lorem ipsum dolor sit amet, consectetur adipisicing elit. Et odit labore illo sint tempora magnam modi nesciunt
101
- consectetur vitae maiores itaque reiciendis sunt nisi ullam officiis, provident fugiat, esse iste adipisci
102
- repellat! Incidunt delectus, pariatur quaerat vitae aspernatur eveniet libero.
103
- </RadioGroup.Radio>,
104
- ],
105
- orientation: 'horizontal',
106
- },
107
- };
108
-
109
- /**
110
- * > RadioGroup that is disabled
111
- */
112
- export const Disabled: Story = {
113
- args: {
114
- children: [
115
- <RadioGroup.Radio value="Option 1">Option 1</RadioGroup.Radio>,
116
- <RadioGroup.Radio value="Option 2">Option 2</RadioGroup.Radio>,
117
- <RadioGroup.Radio value="Option 3">Option 3</RadioGroup.Radio>,
118
- ],
119
- isDisabled: true,
120
- },
121
- };
122
-
123
- /**
124
- * > RadioGroup with large radios
125
- */
126
- export const Large: Story = {
127
- args: {
128
- children: [
129
- <RadioGroup.Radio value="Option 1">Option 1</RadioGroup.Radio>,
130
- <RadioGroup.Radio value="Option 2">Option 2</RadioGroup.Radio>,
131
- <RadioGroup.Radio value="Option 3">Option 3</RadioGroup.Radio>,
132
- ],
133
- size: 'large',
134
- },
135
- };
136
-
137
- /**
138
- * > RadioGroup that has hidden radios that will be revealed on clicking on button
139
- */
140
- export const HiddenOptions: Story = {
141
- args: {
142
- children: [
143
- <RadioGroup.Radio value="Option 1">Option 1</RadioGroup.Radio>,
144
- <RadioGroup.Radio value="Option 2">Option 2</RadioGroup.Radio>,
145
- <RadioGroup.Radio value="Option 3">Option 3</RadioGroup.Radio>,
146
- ],
147
- showAmount: 1,
148
- },
149
- };
150
-
151
- /**
152
- * > Example with hint text
153
- */
154
- export const HintText: Story = {
155
- args: {
156
- children: [
157
- <RadioGroup.Radio value="Option 1" hint="This is a hint">
158
- Option 1
159
- </RadioGroup.Radio>,
160
- <RadioGroup.Radio value="Option 2" hint="This is a hint">
161
- Option 2
162
- </RadioGroup.Radio>,
163
- <RadioGroup.Radio value="Option 3" hint="This is a hint">
164
- Option 3
165
- </RadioGroup.Radio>,
166
- ],
167
- },
168
- };
169
-
170
- /**
171
- * > On change (check console log)
172
- */
173
- export const OnChange: Story = {
174
- args: {
175
- children: [
176
- <RadioGroup.Radio value="Option 1">Option 1</RadioGroup.Radio>,
177
- <RadioGroup.Radio value="Option 2">Option 2</RadioGroup.Radio>,
178
- <RadioGroup.Radio value="Option 3">Option 3</RadioGroup.Radio>,
179
- ],
180
- onChange: e => console.log(e),
181
- },
182
- };
183
-
184
- /**
185
- * Error message and label
186
- */
187
- export const ErrorMessageAndLabel: Story = {
188
- args: {
189
- label: 'Are you an existing customer?',
190
- errorMessage: 'This is an inline error message',
191
- validationState: 'invalid',
192
- hintMessage: 'Hint: choose from one of the following options',
193
- children: [
194
- <RadioGroup.Radio value="Option 1">Option 1</RadioGroup.Radio>,
195
- <RadioGroup.Radio value="Option 2">Option 2</RadioGroup.Radio>,
196
- <RadioGroup.Radio value="Option 3">Option 3</RadioGroup.Radio>,
197
- ],
198
- },
199
- };
@@ -1,40 +0,0 @@
1
- import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
2
-
3
- import { Form, Input } from '../index.js';
4
-
5
- import { Repeater } from './repeater.component.js';
6
-
7
- const meta: Meta<typeof Repeater> = {
8
- title: 'Components/Repeater',
9
- component: Repeater,
10
- tags: ['autodocs'],
11
- decorators: [(Story: StoryFn) => <Story />],
12
- args: {
13
- children: (
14
- <Form>
15
- <Form.Group>
16
- <Form.Label htmlFor={`test`}>Primary</Form.Label>
17
- <Form.Hint>Primary title text</Form.Hint>
18
- <Input name="test" onChange={e => console.log(e)} />
19
- </Form.Group>
20
- </Form>
21
- ),
22
- },
23
- };
24
-
25
- export default meta;
26
- type Story = StoryObj<typeof meta>;
27
-
28
- /**
29
- * > Default usage example
30
- */
31
- export const Default: Story = {
32
- args: {},
33
- };
34
-
35
- /**
36
- * > Example using the separator prop
37
- */
38
- export const Separator: Story = {
39
- args: { separator: true },
40
- };
@@ -1,88 +0,0 @@
1
- import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
2
-
3
- import { Field } from '../field/index.js';
4
-
5
- import { Select } from './select.component.js';
6
-
7
- const meta: Meta<typeof Select> = {
8
- title: 'Components/Select',
9
- component: Select,
10
- tags: ['autodocs'],
11
- decorators: [(Story: StoryFn) => <Story />],
12
- };
13
-
14
- export default meta;
15
- type Story = StoryObj<typeof meta>;
16
-
17
- /**
18
- * > Default usage example
19
- */
20
- export const Default: Story = {
21
- args: {
22
- children: (
23
- <>
24
- <option value="option-1">option 1</option>
25
- <option value="option-2">option 2</option>
26
- <option value="option-3">option 3</option>
27
- <option value="option-4">option 4</option>
28
- </>
29
- ),
30
- },
31
- };
32
-
33
- /**
34
- * > Invalid usage example
35
- */
36
- export const Invalid: Story = {
37
- args: {
38
- invalid: true,
39
- children: (
40
- <>
41
- <option value="option-1">option 1</option>
42
- <option value="option-2">option 2</option>
43
- <option value="option-3">option 3</option>
44
- <option value="option-4">option 4</option>
45
- </>
46
- ),
47
- },
48
- };
49
-
50
- /**
51
- * > Disabled usage example
52
- */
53
- export const Disabled: Story = {
54
- args: {
55
- disabled: true,
56
- children: (
57
- <>
58
- <option value="option-1">option 1</option>
59
- <option value="option-2">option 2</option>
60
- <option value="option-3">option 3</option>
61
- <option value="option-4">option 4</option>
62
- </>
63
- ),
64
- },
65
- };
66
-
67
- /**
68
- * > Form field example
69
- */
70
- export const FormField: Story = {
71
- args: {},
72
- render: () => {
73
- return (
74
- <Field
75
- label="Are you an existing customer?"
76
- hintMessage="Hint: choose from one of the following options"
77
- errorMessage="This is an inline error message"
78
- >
79
- <Select invalid>
80
- <option value="option-1">option 1</option>
81
- <option value="option-2">option 2</option>
82
- <option value="option-3">option 3</option>
83
- <option value="option-4">option 4</option>
84
- </Select>
85
- </Field>
86
- );
87
- },
88
- };