@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,90 +0,0 @@
1
- import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
2
-
3
- import { Switch } from './switch.component.js';
4
-
5
- const meta: Meta<typeof Switch> = {
6
- title: 'Components/Switch',
7
- component: Switch,
8
- tags: ['autodocs'],
9
- decorators: [(Story: StoryFn) => <Story />],
10
- };
11
-
12
- export default meta;
13
- type Story = StoryObj<typeof meta>;
14
-
15
- const SIZES = ['small', 'medium', 'large', 'xlarge'] as const;
16
-
17
- /**
18
- * > Default usage example
19
- */
20
- export const Default: Story = {
21
- args: {
22
- size: 'medium',
23
- label: 'eStatements',
24
- },
25
- };
26
-
27
- /**
28
- * > Selected switch example
29
- */
30
- export const Selected: Story = {
31
- args: {
32
- label: 'eStatements',
33
- checked: true,
34
- },
35
- };
36
-
37
- /**
38
- * > Switch size example
39
- */
40
- export const Sizes = () => (
41
- <div>
42
- {SIZES.map(size => (
43
- <div key={size}>
44
- <h3 className="font-bold">{size}</h3>
45
- <div className="mb-2">
46
- <Switch size={size} label="eStatements" />
47
- </div>
48
- </div>
49
- ))}
50
- </div>
51
- );
52
-
53
- /**
54
- * > Disabled switch example
55
- */
56
- export const Disabled: Story = {
57
- args: {
58
- label: 'eStatements',
59
- isDisabled: true,
60
- },
61
- };
62
-
63
- /**
64
- * > Block switch example
65
- */
66
- export const Block = () => (
67
- <div>
68
- <>
69
- <div className="mb-2">
70
- <Switch
71
- block
72
- label="Lorem ipsum dolor sit amet, consectetur adipisicing elit. Aspernatur corporis sint, facere sequi provident eius similique ab velit, beatae aut architecto porro quidem neque necessitatibus, quis nulla itaque labore harum, in nesciunt! Molestiae, voluptatum, voluptas. Quo pariatur, voluptate ducimus nemo?"
73
- />
74
- </div>
75
- <div className="mb-2">
76
- <Switch block label="eStatements" />
77
- </div>
78
- </>
79
- </div>
80
- );
81
-
82
- /**
83
- * > Responsive switch example
84
- */
85
- export const ResponsiveSize: Story = {
86
- args: {
87
- label: 'eStatements',
88
- size: { initial: 'small', md: 'large', lg: 'xlarge' },
89
- },
90
- };
@@ -1,131 +0,0 @@
1
- import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
2
- import React from 'react';
3
-
4
- import { Symbol } from './symbol.component.js';
5
- import { type Align } from './symbol.types.js';
6
-
7
- import { SymbolProps, WBCLogo, WBCMultibrandSmallLogo } from './index.js';
8
- import * as symbols from './index.js';
9
-
10
- const meta: Meta<typeof Symbol> = {
11
- title: 'Foundation/Symbols',
12
- component: WBCLogo,
13
- tags: ['autodocs'],
14
- decorators: [(Story: StoryFn) => <Story />],
15
- };
16
-
17
- export default meta;
18
- type Story = StoryObj<typeof meta>;
19
-
20
- /**
21
- * > Default usage example
22
- */
23
- export const Default: Story = {
24
- args: {},
25
- };
26
-
27
- export const Offset = () => (
28
- <div>
29
- <p>Left</p>
30
- <WBCMultibrandSmallLogo className="border border-dashed" />
31
- <br />
32
- <br />
33
- <p>Center</p>
34
- <WBCMultibrandSmallLogo align="center" className="border border-dashed" />
35
- <br />
36
- <br />
37
- <p>Right</p>
38
- <WBCMultibrandSmallLogo align="right" className="border border-dashed" />
39
- </div>
40
- );
41
-
42
- export const AllSymbols = () => {
43
- const allSymbols = Object.entries(symbols).reduce(
44
- (curr, [key, symbol]) => (key.includes('Symbol') ? { ...curr, [key]: symbol } : curr),
45
- {} as { [index: string]: React.FC<SymbolProps> },
46
- );
47
-
48
- return (
49
- <div className="grid grid-cols-4 gap-5">
50
- {Object.entries(allSymbols).map(([key, Symbol]) => (
51
- <div key={key} className=" flex flex-col items-center justify-end">
52
- <Symbol />
53
- <p className="mt-2">{key}</p>
54
- </div>
55
- ))}
56
- </div>
57
- );
58
- };
59
-
60
- export const AllLogos = () => {
61
- const allLogos = Object.entries(symbols).reduce(
62
- (curr, [key, symbol]) => (key.includes('Logo') ? { ...curr, [key]: symbol } : curr),
63
- {} as { [index: string]: React.FC<SymbolProps> },
64
- );
65
-
66
- const logos = Object.entries(allLogos).reduce(
67
- (curr, [key, symbol]) => (!key.includes('Multibrand') ? { ...curr, [key]: symbol } : curr),
68
- {} as { [index: string]: React.FC<SymbolProps> },
69
- );
70
-
71
- const multibrandLargeLogos = Object.entries(allLogos).reduce(
72
- (curr, [key, symbol]) => (key.includes('MultibrandLarge') ? { ...curr, [key]: symbol } : curr),
73
- {} as { [index: string]: React.FC<SymbolProps> },
74
- );
75
-
76
- const multibrandSmallLogos = Object.entries(allLogos).reduce(
77
- (curr, [key, symbol]) => (key.includes('MultibrandSmall') ? { ...curr, [key]: symbol } : curr),
78
- {} as { [index: string]: React.FC<SymbolProps> },
79
- );
80
-
81
- const align: Align[] = ['left', 'center', 'right'];
82
-
83
- return (
84
- <>
85
- <h3 className="typography-body-7 mb-4 font-bold">Logos</h3>
86
- <div className="grid grid-cols-4 gap-5">
87
- {Object.entries(logos).map(([key, Logo]) => (
88
- <div key={key} className=" flex flex-col items-center justify-end">
89
- <Logo />
90
- <p className="mt-2">{`<${key} />`}</p>
91
- </div>
92
- ))}
93
- </div>
94
- <h3 className="typography-body-7 mb-2 mt-6 font-bold">Multi-brand logos</h3>
95
- <h4 className="typography-body-8 mb-4 font-bold">Large</h4>
96
- <div className="grid grid-cols-4 gap-5">
97
- {Object.entries(multibrandLargeLogos).map(([key, Logo]) => (
98
- <>
99
- <div key={`${key}-${align}`} className=" flex flex-col items-center justify-end">
100
- <Logo className="border border-dashed border-border" />
101
- <p className="mt-2">{`<${key} />`}</p>
102
- </div>
103
- {align.map(align => (
104
- <div key={`${key}-${align}`} className=" flex flex-col items-center justify-end">
105
- <Logo align={align} className="border border-dashed border-border" />
106
- <p className="mt-2">{`<${key} align=${align} />`}</p>
107
- </div>
108
- ))}
109
- </>
110
- ))}
111
- </div>
112
- <h4 className="typography-body-8 my-4 font-bold">Small</h4>
113
- <div className="grid grid-cols-4 gap-5">
114
- {Object.entries(multibrandSmallLogos).map(([key, Logo]) => (
115
- <>
116
- <div key={`${key}-${align}`} className=" flex flex-col items-center justify-end">
117
- <Logo className="border border-dashed border-border" />
118
- <p className="mt-2">{`<${key} />`}</p>
119
- </div>
120
- {align.map(align => (
121
- <div key={`${key}-${align}`} className=" flex flex-col items-center justify-end">
122
- <Logo align={align} className="border border-dashed border-border" />
123
- <p className="mt-2">{`<${key} align=${align} />`}</p>
124
- </div>
125
- ))}
126
- </>
127
- ))}
128
- </div>
129
- </>
130
- );
131
- };
@@ -1,244 +0,0 @@
1
- import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
2
-
3
- import { Table } from './table.component.js';
4
-
5
- const meta: Meta<typeof Table> = {
6
- title: 'Components/Table',
7
- component: Table,
8
- tags: ['autodocs'],
9
- decorators: [(Story: StoryFn) => <Story />],
10
- };
11
-
12
- export default meta;
13
- type Story = StoryObj<typeof meta>;
14
-
15
- /**
16
- * > Default usage example
17
- */
18
- export const Default: Story = {
19
- args: {
20
- children: (
21
- <>
22
- <Table.Caption>
23
- Caption this table width is: <em>(100%)</em>
24
- </Table.Caption>
25
- <Table.Header>
26
- <Table.HeaderRow>
27
- <Table.HeaderCell>Name</Table.HeaderCell>
28
- <Table.HeaderCell>Type</Table.HeaderCell>
29
- <Table.HeaderCell>Date Modified</Table.HeaderCell>
30
- </Table.HeaderRow>
31
- </Table.Header>
32
- <Table.Body>
33
- <Table.Row>
34
- <Table.Cell>Games</Table.Cell>
35
- <Table.Cell>File folder</Table.Cell>
36
- <Table.Cell>6/7/2020</Table.Cell>
37
- </Table.Row>
38
- <Table.Row>
39
- <Table.Cell>Program Files</Table.Cell>
40
- <Table.Cell>File folder</Table.Cell>
41
- <Table.Cell>4/7/2021</Table.Cell>
42
- </Table.Row>
43
- <Table.Row>
44
- <Table.Cell>bootmgr</Table.Cell>
45
- <Table.Cell>System file</Table.Cell>
46
- <Table.Cell>11/20/2010</Table.Cell>
47
- </Table.Row>
48
- <Table.Row>
49
- <Table.Cell>log.txt</Table.Cell>
50
- <Table.Cell>Text Document</Table.Cell>
51
- <Table.Cell>1/18/2016</Table.Cell>
52
- </Table.Row>
53
- </Table.Body>
54
- <Table.Footer colspan={3}>Footer goes here and should colSpan all columns</Table.Footer>
55
- </>
56
- ),
57
- },
58
- };
59
-
60
- /**
61
- * > Striped example
62
- */
63
- export const Striped: Story = {
64
- args: {
65
- striped: true,
66
- children: (
67
- <>
68
- <Table.Caption>
69
- Caption this table width is: <em>(100%)</em>
70
- </Table.Caption>
71
- <Table.Header>
72
- <Table.HeaderRow>
73
- <Table.HeaderCell>Name</Table.HeaderCell>
74
- <Table.HeaderCell>Type</Table.HeaderCell>
75
- <Table.HeaderCell>Date Modified</Table.HeaderCell>
76
- </Table.HeaderRow>
77
- </Table.Header>
78
- <Table.Body>
79
- <Table.Row>
80
- <Table.Cell>Games</Table.Cell>
81
- <Table.Cell>File folder</Table.Cell>
82
- <Table.Cell>6/7/2020</Table.Cell>
83
- </Table.Row>
84
- <Table.Row>
85
- <Table.Cell>Program Files</Table.Cell>
86
- <Table.Cell>File folder</Table.Cell>
87
- <Table.Cell>4/7/2021</Table.Cell>
88
- </Table.Row>
89
- <Table.Row>
90
- <Table.Cell>bootmgr</Table.Cell>
91
- <Table.Cell>System file</Table.Cell>
92
- <Table.Cell>11/20/2010</Table.Cell>
93
- </Table.Row>
94
- <Table.Row>
95
- <Table.Cell>log.txt</Table.Cell>
96
- <Table.Cell>Text Document</Table.Cell>
97
- <Table.Cell>1/18/2016</Table.Cell>
98
- </Table.Row>
99
- </Table.Body>
100
- <Table.Footer colspan={3}>Footer goes here and should colSpan all columns</Table.Footer>
101
- </>
102
- ),
103
- },
104
- };
105
-
106
- /**
107
- * > Bordered example
108
- */
109
- export const Bordered: Story = {
110
- args: {
111
- bordered: true,
112
- children: (
113
- <>
114
- <Table.Caption>
115
- Caption this table width is: <em>(100%)</em>
116
- </Table.Caption>
117
- <Table.Header>
118
- <Table.HeaderRow>
119
- <Table.HeaderCell>Name</Table.HeaderCell>
120
- <Table.HeaderCell>Type</Table.HeaderCell>
121
- <Table.HeaderCell>Date Modified</Table.HeaderCell>
122
- </Table.HeaderRow>
123
- </Table.Header>
124
- <Table.Body>
125
- <Table.Row>
126
- <Table.Cell>Games</Table.Cell>
127
- <Table.Cell>File folder</Table.Cell>
128
- <Table.Cell>6/7/2020</Table.Cell>
129
- </Table.Row>
130
- <Table.Row>
131
- <Table.Cell>Program Files</Table.Cell>
132
- <Table.Cell>File folder</Table.Cell>
133
- <Table.Cell>4/7/2021</Table.Cell>
134
- </Table.Row>
135
- <Table.Row>
136
- <Table.Cell>bootmgr</Table.Cell>
137
- <Table.Cell>System file</Table.Cell>
138
- <Table.Cell>11/20/2010</Table.Cell>
139
- </Table.Row>
140
- <Table.Row>
141
- <Table.Cell>log.txt</Table.Cell>
142
- <Table.Cell>Text Document</Table.Cell>
143
- <Table.Cell>1/18/2016</Table.Cell>
144
- </Table.Row>
145
- </Table.Body>
146
- <Table.Footer colspan={3}>Footer goes here and should colSpan all columns</Table.Footer>
147
- </>
148
- ),
149
- },
150
- };
151
-
152
- /**
153
- * > Bordered & Striped example
154
- */
155
- export const BorderedAndStriped: Story = {
156
- args: {
157
- bordered: true,
158
- striped: true,
159
- children: (
160
- <>
161
- <Table.Caption>
162
- Caption this table width is: <em>(100%)</em>
163
- </Table.Caption>
164
- <Table.Header>
165
- <Table.HeaderRow>
166
- <Table.HeaderCell>Name</Table.HeaderCell>
167
- <Table.HeaderCell>Type</Table.HeaderCell>
168
- <Table.HeaderCell>Date Modified</Table.HeaderCell>
169
- </Table.HeaderRow>
170
- </Table.Header>
171
- <Table.Body>
172
- <Table.Row>
173
- <Table.Cell>Games</Table.Cell>
174
- <Table.Cell>File folder</Table.Cell>
175
- <Table.Cell>6/7/2020</Table.Cell>
176
- </Table.Row>
177
- <Table.Row>
178
- <Table.Cell>Program Files</Table.Cell>
179
- <Table.Cell>File folder</Table.Cell>
180
- <Table.Cell>4/7/2021</Table.Cell>
181
- </Table.Row>
182
- <Table.Row>
183
- <Table.Cell>bootmgr</Table.Cell>
184
- <Table.Cell>System file</Table.Cell>
185
- <Table.Cell>11/20/2010</Table.Cell>
186
- </Table.Row>
187
- <Table.Row>
188
- <Table.Cell>log.txt</Table.Cell>
189
- <Table.Cell>Text Document</Table.Cell>
190
- <Table.Cell>1/18/2016</Table.Cell>
191
- </Table.Row>
192
- </Table.Body>
193
- <Table.Footer colspan={3}>Footer goes here and should colSpan all columns</Table.Footer>
194
- </>
195
- ),
196
- },
197
- };
198
-
199
- /**
200
- * > Example of table with highlighted rows or cells
201
- */
202
- export const HighlightedRowCell: Story = {
203
- args: {
204
- children: (
205
- <>
206
- <Table.Caption>
207
- Caption this table width is: <em>(100%)</em>
208
- </Table.Caption>
209
- <Table.Header>
210
- <Table.HeaderRow>
211
- <Table.HeaderCell>Name</Table.HeaderCell>
212
- <Table.HeaderCell>Type</Table.HeaderCell>
213
- <Table.HeaderCell>Date Modified</Table.HeaderCell>
214
- </Table.HeaderRow>
215
- </Table.Header>
216
- <Table.Body>
217
- <Table.Row highlighted>
218
- <Table.Cell>Games</Table.Cell>
219
- <Table.Cell>File folder</Table.Cell>
220
- <Table.Cell>6/7/2020</Table.Cell>
221
- </Table.Row>
222
- <Table.Row highlighted={[0, 2]}>
223
- <Table.Cell>Program Files</Table.Cell>
224
- <Table.Cell>File folder</Table.Cell>
225
- <Table.Cell>4/7/2021</Table.Cell>
226
- </Table.Row>
227
- <Table.Row highlighted={[1, 2]}>
228
- <Table.Cell>bootmgr</Table.Cell>
229
- <Table.Cell>System file</Table.Cell>
230
- <Table.Cell>11/20/2010</Table.Cell>
231
- </Table.Row>
232
- <Table.Row>
233
- <Table.Cell highlightStart highlighted>
234
- log.txt
235
- </Table.Cell>
236
- <Table.Cell>Text Document</Table.Cell>
237
- <Table.Cell>1/18/2016</Table.Cell>
238
- </Table.Row>
239
- </Table.Body>
240
- <Table.Footer colspan={3}>Footer goes here and should colSpan all columns</Table.Footer>
241
- </>
242
- ),
243
- },
244
- };
@@ -1,111 +0,0 @@
1
- import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
2
-
3
- import { Tabs } from './tabs.component.js';
4
-
5
- const meta: Meta<typeof Tabs> = {
6
- title: 'Components/Tabs',
7
- component: Tabs,
8
- tags: ['autodocs'],
9
- decorators: [
10
- (Story: StoryFn) => {
11
- /**
12
- * NOTE:
13
- * Needed to change displayName here so subcomponent shows correct name in code view
14
- * Could not change it on the component as Item from react-stately is used in three components
15
- * and one displayName would overwrite the others
16
- */
17
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
18
- // @ts-ignore
19
- Tabs.Panel.displayName = 'Tabs.Panel';
20
-
21
- return <Story />;
22
- },
23
- ],
24
- };
25
-
26
- export default meta;
27
- type Story = StoryObj<typeof meta>;
28
-
29
- /**
30
- * > Default usage example
31
- */
32
- export const Default: Story = {
33
- args: {
34
- look: 'default',
35
- color: undefined,
36
- orientation: 'horizontal',
37
- 'aria-label': 'History of Ancient Rome',
38
- children: [
39
- <Tabs.Panel key="FoR" title="Founding of Rome">
40
- Arma virumque cano, Troiae qui primus ab oris.
41
- </Tabs.Panel>,
42
- <Tabs.Panel key="MaR" title="Monarchy and Republic">
43
- Senatus Populusque Romanus.
44
- </Tabs.Panel>,
45
- <Tabs.Panel key="Emp" title="Empire">
46
- Alea jacta est.
47
- </Tabs.Panel>,
48
- ],
49
- },
50
- };
51
-
52
- /**
53
- * > Default usage example
54
- */
55
- export const Justify: Story = {
56
- args: {
57
- justify: true,
58
- children: [
59
- <Tabs.Panel key="FoR" title="Founding of Rome">
60
- Arma virumque cano, Troiae qui primus ab oris.
61
- </Tabs.Panel>,
62
- <Tabs.Panel key="MaR" title="Monarchy and Republic">
63
- Senatus Populusque Romanus.
64
- </Tabs.Panel>,
65
- <Tabs.Panel key="Emp" title="Empire">
66
- Alea jacta est.
67
- </Tabs.Panel>,
68
- ],
69
- },
70
- };
71
-
72
- /**
73
- * > Default usage example
74
- */
75
- export const Color: Story = {
76
- args: {
77
- justify: true,
78
- color: 'hero',
79
- children: [
80
- <Tabs.Panel key="FoR" title="Founding of Rome">
81
- Arma virumque cano, Troiae qui primus ab oris.
82
- </Tabs.Panel>,
83
- <Tabs.Panel key="MaR" title="Monarchy and Republic">
84
- Senatus Populusque Romanus.
85
- </Tabs.Panel>,
86
- <Tabs.Panel key="Emp" title="Empire">
87
- Alea jacta est.
88
- </Tabs.Panel>,
89
- ],
90
- },
91
- };
92
-
93
- /**
94
- * > Vertical story usage example
95
- */
96
- export const Vertical: Story = {
97
- args: {
98
- orientation: 'vertical',
99
- children: [
100
- <Tabs.Panel key="FoR" title="Founding of Rome">
101
- Arma virumque cano, Troiae qui primus ab oris.
102
- </Tabs.Panel>,
103
- <Tabs.Panel key="MaR" title="Monarchy and Republic">
104
- Senatus Populusque Romanus.
105
- </Tabs.Panel>,
106
- <Tabs.Panel key="Emp" title="Empire">
107
- Alea jacta est.
108
- </Tabs.Panel>,
109
- ],
110
- },
111
- };
@@ -1,70 +0,0 @@
1
- import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
2
-
3
- import { Field } from '../field/index.js';
4
-
5
- import { Textarea } from './textarea.component.js';
6
-
7
- const meta: Meta<typeof Textarea> = {
8
- title: 'Components/Textarea',
9
- component: Textarea,
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
- placeholder: 'placeholder',
23
- size: 'medium',
24
- },
25
- };
26
-
27
- /**
28
- * > Invalid usage example
29
- */
30
- export const Invalid: Story = {
31
- args: {
32
- invalid: true,
33
- },
34
- };
35
-
36
- /**
37
- * > Disabled usage example
38
- */
39
- export const Disabled: Story = {
40
- args: {
41
- disabled: true,
42
- },
43
- };
44
-
45
- /**
46
- * > ReadOnly usage example
47
- */
48
- export const ReadOnly: Story = {
49
- args: {
50
- readOnly: true,
51
- },
52
- };
53
-
54
- /**
55
- * > Form field example
56
- */
57
- export const FormField: Story = {
58
- args: {},
59
- render: () => {
60
- return (
61
- <Field
62
- label="Are you an existing customer?"
63
- hintMessage="Hint: choose from one of the following options"
64
- errorMessage="This is an inline error message"
65
- >
66
- <Textarea />
67
- </Field>
68
- );
69
- },
70
- };
@@ -1,25 +0,0 @@
1
- import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
2
-
3
- import { VisuallyHidden } from './visually-hidden.component.js';
4
-
5
- const meta: Meta<typeof VisuallyHidden> = {
6
- title: 'Components/VisuallyHidden',
7
- component: VisuallyHidden,
8
- tags: ['autodocs'],
9
- decorators: [(Story: StoryFn) => <Story />],
10
- };
11
-
12
- export default meta;
13
- type Story = StoryObj<typeof meta>;
14
-
15
- /**
16
- * > Default usage example
17
- *
18
- * Note: The examples below the following headings are visibility hidden.
19
- * Best you inspect what is being rendered using your browser’s DevTools.
20
- */
21
- export const Default: Story = {
22
- args: {
23
- children: 'Only screen reader can read this',
24
- },
25
- };