@lifesg/react-design-system 4.0.0-alpha.12 → 4.0.0-alpha.14

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 (323) hide show
  1. package/breadcrumb/breadcrumb.js +1 -1
  2. package/breadcrumb/breadcrumb.js.map +1 -1
  3. package/breadcrumb/breadcrumb.styles.d.ts +0 -8
  4. package/breadcrumb/breadcrumb.styles.js +1 -1
  5. package/breadcrumb/breadcrumb.styles.js.map +1 -1
  6. package/breadcrumb/breadcrumb.styles_1blzn8n.css +7 -0
  7. package/breadcrumb/types.d.ts +2 -13
  8. package/cjs/breadcrumb/breadcrumb.js +1 -1
  9. package/cjs/breadcrumb/breadcrumb.js.map +1 -1
  10. package/cjs/breadcrumb/breadcrumb.styles.js +1 -1
  11. package/cjs/breadcrumb/breadcrumb.styles.js.map +1 -1
  12. package/cjs/breadcrumb/breadcrumb.styles_1blzn8n.css +7 -0
  13. package/cjs/drawer/drawer.js +1 -1
  14. package/cjs/drawer/drawer.js.map +1 -1
  15. package/cjs/drawer/drawer.styles.js +1 -1
  16. package/cjs/drawer/drawer.styles.js.map +1 -1
  17. package/{drawer/drawer.styles_94hx3y.css → cjs/drawer/drawer.styles_a4bwe0.css} +6 -3
  18. package/cjs/external/dompurify/dist/purify.es.js +4 -2
  19. package/cjs/external/dompurify/dist/purify.es.js.map +1 -1
  20. package/cjs/file-upload/file-list/file-list.js +1 -1
  21. package/cjs/file-upload/file-list/file-list.js.map +1 -1
  22. package/cjs/file-upload/file-list/file-list.styles.js +1 -1
  23. package/cjs/file-upload/file-list/file-list.styles.js.map +1 -1
  24. package/cjs/file-upload/file-list/file-list.styles_1xbypnh.css +2 -0
  25. package/cjs/file-upload/file-list-item/file-item-actions.js +2 -0
  26. package/cjs/file-upload/file-list-item/file-item-actions.js.map +1 -0
  27. package/cjs/file-upload/file-list-item/file-item-actions.styles.js +2 -0
  28. package/cjs/file-upload/file-list-item/file-item-actions.styles.js.map +1 -0
  29. package/cjs/file-upload/file-list-item/file-item-actions.styles_1quulgy.css +8 -0
  30. package/cjs/file-upload/file-list-item/file-item-details.js +2 -0
  31. package/cjs/file-upload/file-list-item/file-item-details.js.map +1 -0
  32. package/cjs/file-upload/file-list-item/file-item-details.styles.js +2 -0
  33. package/cjs/file-upload/file-list-item/file-item-details.styles.js.map +1 -0
  34. package/cjs/file-upload/file-list-item/file-item-details.styles_1ce9akx.css +7 -0
  35. package/cjs/file-upload/file-list-item/file-list-item.js +1 -1
  36. package/cjs/file-upload/file-list-item/file-list-item.js.map +1 -1
  37. package/cjs/file-upload/file-list-item/file-list-item.styles.js +1 -1
  38. package/cjs/file-upload/file-list-item/file-list-item.styles.js.map +1 -1
  39. package/cjs/file-upload/file-list-item/file-list-item.styles_x3a500.css +10 -0
  40. package/cjs/file-upload/file-list-item/use-truncated-name.js +2 -0
  41. package/cjs/file-upload/file-list-item/use-truncated-name.js.map +1 -0
  42. package/cjs/local-nav/local-nav-dropdown/local-nav-dropdown.js +1 -1
  43. package/cjs/local-nav/local-nav-dropdown/local-nav-dropdown.js.map +1 -1
  44. package/cjs/local-nav/local-nav-dropdown/local-nav-dropdown.styles.js +1 -1
  45. package/cjs/local-nav/local-nav-dropdown/local-nav-dropdown.styles.js.map +1 -1
  46. package/{local-nav/local-nav-dropdown/local-nav-dropdown.styles_uhd4xl.css → cjs/local-nav/local-nav-dropdown/local-nav-dropdown.styles_kpel1m.css} +9 -6
  47. package/cjs/local-nav/local-nav-menu/local-nav-menu.js +1 -1
  48. package/cjs/local-nav/local-nav-menu/local-nav-menu.js.map +1 -1
  49. package/cjs/local-nav/local-nav-menu/local-nav-menu.styles.js +1 -1
  50. package/cjs/local-nav/local-nav-menu/local-nav-menu.styles.js.map +1 -1
  51. package/cjs/local-nav/local-nav-menu/local-nav-menu.styles_67fcyc.css +8 -0
  52. package/cjs/menu/menu-content.js +1 -1
  53. package/cjs/menu/menu-content.js.map +1 -1
  54. package/cjs/menu/menu-content.styles.js +1 -1
  55. package/cjs/menu/menu-content.styles.js.map +1 -1
  56. package/cjs/menu/menu-content.styles_1r8oxtk.css +5 -0
  57. package/cjs/menu/menu-item.styles.js +1 -1
  58. package/cjs/menu/menu-item.styles.js.map +1 -1
  59. package/cjs/menu/{menu-item.styles_liyed8.css → menu-item.styles_eut2j9.css} +1 -1
  60. package/cjs/menu/menu-link.styles.js +1 -1
  61. package/cjs/menu/menu-link.styles.js.map +1 -1
  62. package/cjs/menu/menu-link.styles_rng7n7.css +2 -0
  63. package/cjs/menu/menu-section.js +1 -1
  64. package/cjs/menu/menu-section.js.map +1 -1
  65. package/cjs/menu/menu-section.styles.js +1 -1
  66. package/cjs/menu/menu-section.styles.js.map +1 -1
  67. package/cjs/menu/menu-section.styles_1n0ppxl.css +5 -0
  68. package/cjs/modal-v2/slots/slot-styles.js +1 -1
  69. package/cjs/modal-v2/slots/slot-styles.js.map +1 -1
  70. package/cjs/modal-v2/slots/{slot-styles_ayb9il.css → slot-styles_ygu6zc.css} +1 -1
  71. package/cjs/navbar/navbar-items.js +1 -1
  72. package/cjs/navbar/navbar-items.js.map +1 -1
  73. package/cjs/notification-banner/notification-banner-hoc.js +1 -1
  74. package/cjs/notification-banner/notification-banner-hoc.js.map +1 -1
  75. package/cjs/pagination/pagination.js +1 -1
  76. package/cjs/pagination/pagination.js.map +1 -1
  77. package/cjs/shared/dropdown-list/dropdown-label.js +1 -1
  78. package/cjs/shared/dropdown-list/dropdown-label.js.map +1 -1
  79. package/cjs/shared/fade-wrapper/fade-wrapper.js +1 -1
  80. package/cjs/shared/fade-wrapper/fade-wrapper.js.map +1 -1
  81. package/cjs/theme/tokens/colour.js +1 -1
  82. package/cjs/theme/tokens/colour.js.map +1 -1
  83. package/cjs/theme/tokens/radius.js +1 -1
  84. package/cjs/theme/tokens/radius.js.map +1 -1
  85. package/codemods/run-codemod.js +8 -2
  86. package/codemods/run-codemod.js.map +1 -1
  87. package/codemods/run-codemod.ts +13 -4
  88. package/drawer/drawer.d.ts +1 -1
  89. package/drawer/drawer.js +1 -1
  90. package/drawer/drawer.js.map +1 -1
  91. package/drawer/drawer.styles.d.ts +3 -0
  92. package/drawer/drawer.styles.js +1 -1
  93. package/drawer/drawer.styles.js.map +1 -1
  94. package/{cjs/drawer/drawer.styles_94hx3y.css → drawer/drawer.styles_a4bwe0.css} +6 -3
  95. package/drawer/types.d.ts +7 -0
  96. package/external/dompurify/dist/purify.es.js +4 -2
  97. package/external/dompurify/dist/purify.es.js.map +1 -1
  98. package/file-upload/file-list/file-list.js +1 -1
  99. package/file-upload/file-list/file-list.js.map +1 -1
  100. package/file-upload/file-list/file-list.styles.d.ts +0 -1
  101. package/file-upload/file-list/file-list.styles.js +1 -1
  102. package/file-upload/file-list/file-list.styles.js.map +1 -1
  103. package/file-upload/file-list/file-list.styles_1xbypnh.css +2 -0
  104. package/file-upload/file-list-item/file-item-actions.d.ts +30 -0
  105. package/file-upload/file-list-item/file-item-actions.js +2 -0
  106. package/file-upload/file-list-item/file-item-actions.js.map +1 -0
  107. package/file-upload/file-list-item/file-item-actions.styles.d.ts +6 -0
  108. package/file-upload/file-list-item/file-item-actions.styles.js +2 -0
  109. package/file-upload/file-list-item/file-item-actions.styles.js.map +1 -0
  110. package/file-upload/file-list-item/file-item-actions.styles_1quulgy.css +8 -0
  111. package/file-upload/file-list-item/file-item-details.d.ts +15 -0
  112. package/file-upload/file-list-item/file-item-details.js +2 -0
  113. package/file-upload/file-list-item/file-item-details.js.map +1 -0
  114. package/file-upload/file-list-item/file-item-details.styles.d.ts +7 -0
  115. package/file-upload/file-list-item/file-item-details.styles.js +2 -0
  116. package/file-upload/file-list-item/file-item-details.styles.js.map +1 -0
  117. package/file-upload/file-list-item/file-item-details.styles_1ce9akx.css +7 -0
  118. package/file-upload/file-list-item/file-list-item.d.ts +1 -7
  119. package/file-upload/file-list-item/file-list-item.js +1 -1
  120. package/file-upload/file-list-item/file-list-item.js.map +1 -1
  121. package/file-upload/file-list-item/file-list-item.styles.d.ts +6 -13
  122. package/file-upload/file-list-item/file-list-item.styles.js +1 -1
  123. package/file-upload/file-list-item/file-list-item.styles.js.map +1 -1
  124. package/file-upload/file-list-item/file-list-item.styles_x3a500.css +10 -0
  125. package/file-upload/file-list-item/types.d.ts +10 -3
  126. package/file-upload/file-list-item/use-truncated-name.d.ts +1 -0
  127. package/file-upload/file-list-item/use-truncated-name.js +2 -0
  128. package/file-upload/file-list-item/use-truncated-name.js.map +1 -0
  129. package/input-group/types.d.ts +4 -1
  130. package/input-select/types.d.ts +1 -0
  131. package/local-nav/local-nav-dropdown/local-nav-dropdown.js +1 -1
  132. package/local-nav/local-nav-dropdown/local-nav-dropdown.js.map +1 -1
  133. package/local-nav/local-nav-dropdown/local-nav-dropdown.styles.d.ts +3 -0
  134. package/local-nav/local-nav-dropdown/local-nav-dropdown.styles.js +1 -1
  135. package/local-nav/local-nav-dropdown/local-nav-dropdown.styles.js.map +1 -1
  136. package/{cjs/local-nav/local-nav-dropdown/local-nav-dropdown.styles_uhd4xl.css → local-nav/local-nav-dropdown/local-nav-dropdown.styles_kpel1m.css} +9 -6
  137. package/local-nav/local-nav-menu/local-nav-menu.js +1 -1
  138. package/local-nav/local-nav-menu/local-nav-menu.js.map +1 -1
  139. package/local-nav/local-nav-menu/local-nav-menu.styles.d.ts +3 -0
  140. package/local-nav/local-nav-menu/local-nav-menu.styles.js +1 -1
  141. package/local-nav/local-nav-menu/local-nav-menu.styles.js.map +1 -1
  142. package/local-nav/local-nav-menu/local-nav-menu.styles_67fcyc.css +8 -0
  143. package/local-nav/types.d.ts +17 -0
  144. package/masked-input/types.d.ts +1 -2
  145. package/menu/menu-content.js +1 -1
  146. package/menu/menu-content.js.map +1 -1
  147. package/menu/menu-content.styles.d.ts +1 -0
  148. package/menu/menu-content.styles.js +1 -1
  149. package/menu/menu-content.styles.js.map +1 -1
  150. package/menu/menu-content.styles_1r8oxtk.css +5 -0
  151. package/menu/menu-item.styles.js +1 -1
  152. package/menu/menu-item.styles.js.map +1 -1
  153. package/menu/{menu-item.styles_liyed8.css → menu-item.styles_eut2j9.css} +1 -1
  154. package/menu/menu-link.styles.js +1 -1
  155. package/menu/menu-link.styles.js.map +1 -1
  156. package/menu/menu-link.styles_rng7n7.css +2 -0
  157. package/menu/menu-section.d.ts +1 -1
  158. package/menu/menu-section.js +1 -1
  159. package/menu/menu-section.js.map +1 -1
  160. package/menu/menu-section.styles.d.ts +7 -0
  161. package/menu/menu-section.styles.js +1 -1
  162. package/menu/menu-section.styles.js.map +1 -1
  163. package/menu/menu-section.styles_1n0ppxl.css +5 -0
  164. package/menu/menu.d.ts +1 -1
  165. package/menu/types.d.ts +10 -2
  166. package/modal-v2/slots/slot-styles.js +1 -1
  167. package/modal-v2/slots/slot-styles.js.map +1 -1
  168. package/modal-v2/slots/{slot-styles_ayb9il.css → slot-styles_ygu6zc.css} +1 -1
  169. package/navbar/navbar-items.js +1 -1
  170. package/navbar/navbar-items.js.map +1 -1
  171. package/navbar/types.d.ts +9 -0
  172. package/notification-banner/notification-banner-hoc.js +1 -1
  173. package/notification-banner/notification-banner-hoc.js.map +1 -1
  174. package/package.json +3 -4
  175. package/pagination/pagination.js +1 -1
  176. package/pagination/pagination.js.map +1 -1
  177. package/pagination/types.d.ts +8 -1
  178. package/scripts/cli.js +18 -0
  179. package/select-histogram/types.d.ts +1 -0
  180. package/shared/dropdown-list/dropdown-label.d.ts +2 -2
  181. package/shared/dropdown-list/dropdown-label.js +1 -1
  182. package/shared/dropdown-list/dropdown-label.js.map +1 -1
  183. package/shared/dropdown-list/types.d.ts +6 -2
  184. package/shared/fade-wrapper/fade-wrapper.js +1 -1
  185. package/shared/fade-wrapper/fade-wrapper.js.map +1 -1
  186. package/shared/fade-wrapper/types.d.ts +1 -0
  187. package/shared/styles/index.d.ts +5 -0
  188. package/skills/fds-build/SKILL.md +167 -0
  189. package/skills/fds-build/catalogue.md +181 -0
  190. package/skills/fds-build/evals/evals.json +519 -0
  191. package/skills/fds-build/resources/components/accordion.md +128 -0
  192. package/skills/fds-build/resources/components/alert.md +54 -0
  193. package/skills/fds-build/resources/components/animation.md +18 -0
  194. package/skills/fds-build/resources/components/avatar.md +10 -0
  195. package/skills/fds-build/resources/components/badge.md +18 -0
  196. package/skills/fds-build/resources/components/box-container.md +61 -0
  197. package/skills/fds-build/resources/components/breadcrumb.md +60 -0
  198. package/skills/fds-build/resources/components/button.md +74 -0
  199. package/skills/fds-build/resources/components/calendar.md +113 -0
  200. package/skills/fds-build/resources/components/card.md +43 -0
  201. package/skills/fds-build/resources/components/checkbox.md +53 -0
  202. package/skills/fds-build/resources/components/countdown-timer.md +20 -0
  203. package/skills/fds-build/resources/components/data-table.md +142 -0
  204. package/skills/fds-build/resources/components/date-navigator.md +25 -0
  205. package/skills/fds-build/resources/components/divider.md +23 -0
  206. package/skills/fds-build/resources/components/drawer.md +78 -0
  207. package/skills/fds-build/resources/components/error-display.md +137 -0
  208. package/skills/fds-build/resources/components/feedback-rating.md +61 -0
  209. package/skills/fds-build/resources/components/file-download.md +54 -0
  210. package/skills/fds-build/resources/components/file-upload.md +105 -0
  211. package/skills/fds-build/resources/components/filter.md +228 -0
  212. package/skills/fds-build/resources/components/footer.md +94 -0
  213. package/skills/fds-build/resources/components/form-date-input.md +85 -0
  214. package/skills/fds-build/resources/components/form-date-range-input.md +146 -0
  215. package/skills/fds-build/resources/components/form-e-signature.md +55 -0
  216. package/skills/fds-build/resources/components/form-input.md +65 -0
  217. package/skills/fds-build/resources/components/form-masked-input.md +69 -0
  218. package/skills/fds-build/resources/components/form-multi-select.md +100 -0
  219. package/skills/fds-build/resources/components/form-nested-multi-select.md +159 -0
  220. package/skills/fds-build/resources/components/form-nested-select.md +151 -0
  221. package/skills/fds-build/resources/components/form-otp-verification.md +175 -0
  222. package/skills/fds-build/resources/components/form-phone-number-input.md +87 -0
  223. package/skills/fds-build/resources/components/form-predictive-text-input.md +108 -0
  224. package/skills/fds-build/resources/components/form-select.md +103 -0
  225. package/skills/fds-build/resources/components/form-slider.md +116 -0
  226. package/skills/fds-build/resources/components/form-textarea.md +116 -0
  227. package/skills/fds-build/resources/components/form-time-range-picker.md +98 -0
  228. package/skills/fds-build/resources/components/form-timepicker.md +77 -0
  229. package/skills/fds-build/resources/components/form-unit-number-input.md +138 -0
  230. package/skills/fds-build/resources/components/fullscreen-image-carousel.md +159 -0
  231. package/skills/fds-build/resources/components/histogram-slider.md +41 -0
  232. package/skills/fds-build/resources/components/icon.md +167 -0
  233. package/skills/fds-build/resources/components/image-button.md +12 -0
  234. package/skills/fds-build/resources/components/input.md +51 -0
  235. package/skills/fds-build/resources/components/language-switcher.md +15 -0
  236. package/skills/fds-build/resources/components/layout.md +156 -0
  237. package/skills/fds-build/resources/components/link-list.md +120 -0
  238. package/skills/fds-build/resources/components/local-nav.md +119 -0
  239. package/skills/fds-build/resources/components/masthead.md +14 -0
  240. package/skills/fds-build/resources/components/menu.md +109 -0
  241. package/skills/fds-build/resources/components/modal.md +150 -0
  242. package/skills/fds-build/resources/components/navbar.md +270 -0
  243. package/skills/fds-build/resources/components/notification-banner.md +106 -0
  244. package/skills/fds-build/resources/components/pagination.md +104 -0
  245. package/skills/fds-build/resources/components/pill.md +55 -0
  246. package/skills/fds-build/resources/components/popover.md +80 -0
  247. package/skills/fds-build/resources/components/progress-indicator.md +47 -0
  248. package/skills/fds-build/resources/components/radio-button.md +66 -0
  249. package/skills/fds-build/resources/components/schedule.md +78 -0
  250. package/skills/fds-build/resources/components/sidenav.md +183 -0
  251. package/skills/fds-build/resources/components/singpass-button.md +14 -0
  252. package/skills/fds-build/resources/components/smart-app-banner.md +28 -0
  253. package/skills/fds-build/resources/components/tab.md +107 -0
  254. package/skills/fds-build/resources/components/table.md +65 -0
  255. package/skills/fds-build/resources/components/tag.md +68 -0
  256. package/skills/fds-build/resources/components/text-list.md +44 -0
  257. package/skills/fds-build/resources/components/time-slot-bar-week.md +66 -0
  258. package/skills/fds-build/resources/components/time-slot-bar.md +57 -0
  259. package/skills/fds-build/resources/components/time-slot-week-view.md +70 -0
  260. package/skills/fds-build/resources/components/timeline.md +69 -0
  261. package/skills/fds-build/resources/components/timetable.md +123 -0
  262. package/skills/fds-build/resources/components/toast.md +72 -0
  263. package/skills/fds-build/resources/components/toggle.md +119 -0
  264. package/skills/fds-build/resources/components/typography.md +86 -0
  265. package/skills/fds-build/resources/components/uneditable-section.md +84 -0
  266. package/skills/fds-build/resources/foundations/layout-composition-patterns.md +53 -0
  267. package/skills/fds-build/resources/foundations/tokens.md +547 -0
  268. package/skills/fds-build/resources/patterns/states.md +300 -0
  269. package/skills/fds-build/resources/setup/setup.md +202 -0
  270. package/skills/fds-build/resources/templates/form.md +427 -0
  271. package/skills/fds-build/resources/templates/listing.md +435 -0
  272. package/theme/styles/a11y-playground.css +52 -40
  273. package/theme/styles/bookingsg.css +52 -40
  274. package/theme/styles/careercompass.css +52 -40
  275. package/theme/styles/ccube.css +52 -40
  276. package/theme/styles/imda.css +52 -40
  277. package/theme/styles/lifesg.css +52 -40
  278. package/theme/styles/mylegacy.css +52 -40
  279. package/theme/styles/oneservice.css +52 -40
  280. package/theme/styles/pa.css +28 -22
  281. package/theme/styles/rbs.css +52 -40
  282. package/theme/styles/sgw-digital-lobby.css +52 -40
  283. package/theme/styles/smgs.css +52 -40
  284. package/theme/styles/spf.css +28 -27
  285. package/theme/styles/sportsg-orange.css +52 -40
  286. package/theme/styles/supportgowhere.css +52 -40
  287. package/theme/styles/tote-board.css +52 -40
  288. package/theme/styles/vica.css +52 -40
  289. package/theme/styles/websg.css +52 -40
  290. package/theme/styles/wise.css +52 -40
  291. package/theme/styles/wogaa.css +52 -40
  292. package/theme/tokens/colour.d.ts +6 -0
  293. package/theme/tokens/colour.js +1 -1
  294. package/theme/tokens/colour.js.map +1 -1
  295. package/theme/tokens/radius.d.ts +3 -0
  296. package/theme/tokens/radius.js +1 -1
  297. package/theme/tokens/radius.js.map +1 -1
  298. package/breadcrumb/breadcrumb.styles_1nl4aua.css +0 -18
  299. package/cjs/breadcrumb/breadcrumb.styles_1nl4aua.css +0 -18
  300. package/cjs/file-upload/file-item-edit.js +0 -2
  301. package/cjs/file-upload/file-item-edit.js.map +0 -1
  302. package/cjs/file-upload/file-item-edit.styles.js +0 -2
  303. package/cjs/file-upload/file-item-edit.styles.js.map +0 -1
  304. package/cjs/file-upload/file-item-edit.styles_19bvztn.css +0 -11
  305. package/cjs/file-upload/file-list/file-list.styles_1w7so98.css +0 -3
  306. package/cjs/file-upload/file-list-item/file-list-item.styles_kgtfke.css +0 -17
  307. package/cjs/local-nav/local-nav-menu/local-nav-menu.styles_pq19dh.css +0 -5
  308. package/cjs/menu/menu-content.styles_p7ijll.css +0 -2
  309. package/cjs/menu/menu-link.styles_hfxoez.css +0 -2
  310. package/cjs/menu/menu-section.styles_g7my4d.css +0 -3
  311. package/file-upload/file-item-edit.d.ts +0 -14
  312. package/file-upload/file-item-edit.js +0 -2
  313. package/file-upload/file-item-edit.js.map +0 -1
  314. package/file-upload/file-item-edit.styles.d.ts +0 -9
  315. package/file-upload/file-item-edit.styles.js +0 -2
  316. package/file-upload/file-item-edit.styles.js.map +0 -1
  317. package/file-upload/file-item-edit.styles_19bvztn.css +0 -11
  318. package/file-upload/file-list/file-list.styles_1w7so98.css +0 -3
  319. package/file-upload/file-list-item/file-list-item.styles_kgtfke.css +0 -17
  320. package/local-nav/local-nav-menu/local-nav-menu.styles_pq19dh.css +0 -5
  321. package/menu/menu-content.styles_p7ijll.css +0 -2
  322. package/menu/menu-link.styles_hfxoez.css +0 -2
  323. package/menu/menu-section.styles_g7my4d.css +0 -3
@@ -0,0 +1,28 @@
1
+ # SmartAppBanner
2
+
3
+ Import: `import { SmartAppBanner } from "@lifesg/react-design-system/smart-app-banner"`
4
+
5
+ ## Props — `SmartAppBannerProps`
6
+
7
+ | Prop | Type | Default | Description |
8
+ | -------------- | ---------------------------- | -------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
9
+ | `show` \* | `boolean` | — | Controls whether the banner is visible. |
10
+ | `href` \* | `string` | — | Destination URL opened in a new tab when the banner or CTA button is clicked. |
11
+ | `content` \* | `SmartAppBannerContentProps` | — | Text, labels, and rating content rendered inside the banner. |
12
+ | `offset` | `number` | 0 | Top offset in pixels applied to the banner's position. |
13
+ | `icon` | `string` | "https://assets.life.gov.sg/react-design-system/img/app-icon/app-icon.png" | URL of the app icon image displayed in the banner. |
14
+ | `animated` | `boolean` | false | Applies a slide-in entrance animation to the banner. |
15
+ | `className` | `string` | — | — |
16
+ | `onDismiss` \* | `() => void` | — | Called when the user clicks the dismiss button. |
17
+ | `onClick` | `(() => void)` | — | Called when the user clicks on the banner or the CTA button. |
18
+
19
+ ## Props — `SmartAppBannerContentProps`
20
+
21
+ | Prop | Type | Default | Description |
22
+ | ------------------ | -------- | ------- | ------------------------------------------------------------------------------ |
23
+ | `title` \* | `string` | — | Primary heading text, typically the app name. |
24
+ | `buttonLabel` \* | `string` | — | Label text for the CTA button. |
25
+ | `iconAriaLabel` | `string` | "" | Alt text for the app icon image. |
26
+ | `buttonAriaLabel` | `string` | — | Accessible label for the CTA button. Falls back to `buttonLabel` when omitted. |
27
+ | `message` | `string` | — | Secondary description text displayed beneath the title. |
28
+ | `numberOfStars` \* | `number` | — | App store rating rendered as up to 5 star icons. |
@@ -0,0 +1,107 @@
1
+ # Tab
2
+
3
+ Import: `import { Tab } from "@lifesg/react-design-system/tab"`
4
+
5
+ ## When to use
6
+
7
+ Use to switch between related views within the same context — not for navigating between pages.
8
+
9
+ ## Sub-components
10
+
11
+ ```
12
+ Tab ← tab strip container, manages active state
13
+ ├── Tab.Item ← individual tab (title + panel content)
14
+ ├── Tab.Item
15
+ └── Tab.Item
16
+ ```
17
+
18
+ All direct children of `Tab` must be `Tab.Item`. `Tab.Item` renders both the tab label and its associated panel content.
19
+
20
+ ## Variants
21
+
22
+ | Mode | When to use |
23
+ | ---------------------------- | ------------------------------------------ |
24
+ | Uncontrolled (default) | Tab manages its own active state |
25
+ | Controlled (`currentActive`) | Parent needs to control which tab is shown |
26
+
27
+ ## Props — `TabProps`
28
+
29
+ | Prop | Type | Default | Description |
30
+ | ------------------------ | ------------------------------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
31
+ | `children` \* | `JSX.Element \| JSX.Element[]` | — | — |
32
+ | `initialActive` | `number` | 0 | Zero-based index of the tab panel displayed on first render. Ignored when `currentActive` is provided. |
33
+ | `currentActive` | `number` | — | Zero-based index of the currently active tab panel. When provided, the component operates in controlled mode — the caller is responsible for updating this value in response to `onTabClick` to reflect tab changes. |
34
+ | `className` | `string` | — | — |
35
+ | `id` | `string` | — | — |
36
+ | `onTabClick` | `((title: string, index: number) => void)` | — | Called when the user clicks a tab link. |
37
+ | `fullWidthIndicatorLine` | `boolean` | false | Extends all tab indicator lines to the full width of the tab bar instead of matching only the tab link width. |
38
+ | `fadeColor` | `string[] \| FadeColorSet` | — | Background color(s) used for the fade overlays at the edges of the scrollable tab link bar. Pass a `string[]` to apply the same gradient stop colors on both edges, or a `FadeColorSet` to specify left and right edges independently. |
39
+
40
+ ## Props — `TabItemProps`
41
+
42
+ | Prop | Type | Default | Description |
43
+ | ------------- | ------------------------------ | ------- | ----------------------------------------------------------------------------------- |
44
+ | `title` \* | `string` | — | Text label rendered in the tab link bar for this panel. |
45
+ | `children` \* | `JSX.Element \| JSX.Element[]` | — | — |
46
+ | `titleAddon` | `TitleAddonProps` | — | Optional addon element rendered alongside the tab title in the link bar. |
47
+ | `className` | `string` | — | — |
48
+ | `id` | `string` | — | — |
49
+ | `width` | `string` | — | Explicit width for this tab link in the tab bar. Accepts any valid CSS width value. |
50
+
51
+ ## Props — `TitleAddonProps`
52
+
53
+ | Prop | Type | Default | Description |
54
+ | ------------ | ------------------- | ------- | ------------------------------------------------- |
55
+ | `content` \* | `JSX.Element` | — | The element rendered as the addon. |
56
+ | `position` | `"left" \| "right"` | "right" | Which side of the tab title the addon appears on. |
57
+
58
+ ## Props — `TabContextProps`
59
+
60
+ | Prop | Type | Default | Description |
61
+ | --------------- | ------------------------------------------ | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
62
+ | `children` \* | `React.ReactNode` | — | — |
63
+ | `initialActive` | `number` | 0 | Zero-based index of the tab panel displayed on first render. Ignored when `currentActive` is provided. |
64
+ | `currentActive` | `number` | — | Zero-based index of the currently active tab panel. When provided, the component operates in controlled mode — the caller is responsible for updating this value in response to `onTabClick` to reflect tab changes. |
65
+ | `onTabClick` | `((title: string, index: number) => void)` | — | Called when the user clicks a tab link. |
66
+
67
+ ## Props — `TabListProps`
68
+
69
+ | Prop | Type | Default | Description |
70
+ | ------------------------ | -------------------------- | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
71
+ | `children` \* | `React.ReactNode` | — | — |
72
+ | `fullWidthIndicatorLine` | `boolean` | false | Extends all tab indicator lines to the full width of the tab bar instead of matching only the tab link width. |
73
+ | `fadeColor` | `string[] \| FadeColorSet` | — | Background color(s) used for the fade overlays at the edges of the scrollable tab link bar. Pass a `string[]` to apply the same gradient stop colors on both edges, or a `FadeColorSet` to specify left and right edges independently. |
74
+
75
+ ## Props — `TabListItemProps`
76
+
77
+ | Prop | Type | Default | Description |
78
+ | ------------ | ----------------- | ------- | ----------------------------------------------------------------------------------- |
79
+ | `title` \* | `string` | — | Text label rendered in the tab link bar for this item. |
80
+ | `titleAddon` | `TitleAddonProps` | — | Optional addon element rendered alongside the tab title in the link bar. |
81
+ | `width` | `string` | — | Explicit width for this tab link in the tab bar. Accepts any valid CSS width value. |
82
+
83
+ ## Props — `TabPanelProps`
84
+
85
+ | Prop | Type | Default | Description |
86
+ | ------------- | ----------------- | ------- | ------------------------------------------------------------------------ |
87
+ | `index` \* | `number` | — | Zero-based index identifying which active tab this panel corresponds to. |
88
+ | `children` \* | `React.ReactNode` | — | — |
89
+ | `className` | `string` | — | — |
90
+ | `id` | `string` | — | — |
91
+
92
+ ## Rules
93
+
94
+ - When `currentActive` is set, the component is in controlled mode — you must update it via `onTabClick`.
95
+ - Tab order is determined by the order of `Tab.Item` children.
96
+ - Keep tab labels short — labels truncate beyond 20 characters on tablet and mobile.
97
+ - Use controlled mode (`currentActive` + `onTabClick`) only when the parent needs to sync tab state with external logic (e.g. URL params, deep links).
98
+ - Use `titleAddon` with a `Badge` to show counts or status indicators on tab labels.
99
+ - Set `headingLevel` to match the component's position in the page heading hierarchy.
100
+ - Set `fadeColor` to match the page background so the horizontal scroll fade blends correctly on mobile.
101
+
102
+ ## Anti-patterns
103
+
104
+ - Do not use tabs for page-level navigation — use Navbar or LocalNav instead.
105
+ - Do not use more than 5–6 tabs — consider a different navigation pattern for many sections.
106
+ - Do not use long labels — they truncate on mobile and tablet.
107
+ - Do not set `currentActive` without also providing `onTabClick` — the tab state will be stuck.
@@ -0,0 +1,65 @@
1
+ # Table
2
+
3
+ Import: `import { Table } from "@lifesg/react-design-system/table"`
4
+
5
+ ## When to use
6
+
7
+ - Displaying read-only structured data with no sorting, selection, or pagination needed.
8
+ - Use `DataTable` instead when you need sortable columns, row selection, or pagination controls.
9
+
10
+ ## Composition
11
+
12
+ `Table` is a thin styled wrapper over semantic HTML table elements:
13
+
14
+ | Sub-component | Renders as |
15
+ | ------------------ | ---------------------- |
16
+ | `Table.Container` | `<div>` scroll wrapper |
17
+ | `Table` | `<table>` |
18
+ | `Table.Head` | `<thead>` |
19
+ | `Table.Body` | `<tbody>` |
20
+ | `Table.Row` | `<tr>` |
21
+ | `Table.HeaderCell` | `<th>` |
22
+ | `Table.Cell` | `<td>` |
23
+
24
+ Always wrap with `Table.Container` so the table scrolls horizontally on narrow viewports.
25
+
26
+ ## Usage
27
+
28
+ ```tsx
29
+ import { Table } from "@lifesg/react-design-system/table";
30
+ import { Typography } from "@lifesg/react-design-system/typography";
31
+
32
+ const ServiceTable = () => (
33
+ <Table.Container>
34
+ <Table>
35
+ <Table.Head>
36
+ <Table.Row>
37
+ <Table.HeaderCell>Service</Table.HeaderCell>
38
+ <Table.HeaderCell>Status</Table.HeaderCell>
39
+ <Table.HeaderCell>Last updated</Table.HeaderCell>
40
+ </Table.Row>
41
+ </Table.Head>
42
+ <Table.Body>
43
+ <Table.Row>
44
+ <Table.Cell>MyService</Table.Cell>
45
+ <Table.Cell>Active</Table.Cell>
46
+ <Table.Cell>1 Jan 2024</Table.Cell>
47
+ </Table.Row>
48
+ </Table.Body>
49
+ </Table>
50
+ </Table.Container>
51
+ );
52
+ ```
53
+
54
+ ## Rules
55
+
56
+ - Always wrap in `Table.Container` — it provides horizontal scroll on small viewports.
57
+ - Use `Table.HeaderCell` (`<th>`) for column headers, not `Table.Cell`.
58
+ - Use `DataTable` for sortable, selectable, or paginated tables — `Table` is read-only only.
59
+ - All props pass through to the underlying HTML element — use `style` or `className` for custom layout only when DS tokens don't cover the need.
60
+
61
+ ## Anti-patterns
62
+
63
+ - Do not use `Table` when rows need to be selected or sorted — use `DataTable`.
64
+ - Do not nest tables.
65
+ - Do not omit `Table.Container` — the table will overflow on mobile without it.
@@ -0,0 +1,68 @@
1
+ # Tag
2
+
3
+ Import: `import { Tag } from "@lifesg/react-design-system/tag"`
4
+
5
+ ## When to use
6
+
7
+ Use to label categories, apply filters, or tag items. Can be static or interactive — set `interactive` to render as a button for toggleable filters or selectable categories. For status labels, use Pill instead.
8
+
9
+ ## Variants
10
+
11
+ | `type` | Usage |
12
+ | ----------- | ----------------------------------------------------- |
13
+ | `"outline"` | Subtle, secondary label — default for most uses |
14
+ | `"solid"` | Higher emphasis — use when the tag needs to stand out |
15
+
16
+ | `colorType` | Semantic use |
17
+ | ----------- | ----------------------------- |
18
+ | `"green"` | Success, active, approved |
19
+ | `"red"` | Error, rejected, danger |
20
+ | `"yellow"` | Warning, pending, in progress |
21
+ | `"blue"` | Informational |
22
+ | `"grey"` | Neutral, inactive, draft |
23
+ | `"primary"` | Theme primary color |
24
+ | `"black"` | Default, no semantic meaning |
25
+
26
+ ## Usage
27
+
28
+ ```tsx
29
+ import { Tag } from "@lifesg/react-design-system/tag";
30
+
31
+ {
32
+ /* Static category tag */
33
+ }
34
+ <Tag type="outline" colorType="blue">
35
+ Health
36
+ </Tag>;
37
+
38
+ {
39
+ /* Interactive filter tag */
40
+ }
41
+ <Tag type="solid" colorType="primary" interactive onClick={() => {}}>
42
+ Finance
43
+ </Tag>;
44
+ ```
45
+
46
+ ## Props — `TagProps`
47
+
48
+ | Prop | Type | Default | Description |
49
+ | -------------- | ------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
50
+ | `type` \* | `TagType` | — | Visual style variant. |
51
+ | `colorType` | `TagColorType` | "black" | Color theme applied to the tag. |
52
+ | `icon` | `JSX.Element` | — | Optional icon rendered alongside the label. The position is controlled by `iconPosition`. |
53
+ | `iconPosition` | `"left" \| "right"` | "left" | Position of the icon relative to the label text. |
54
+ | `interactive` | `boolean` | false | When `true`, renders the tag as a `<button>` element to support click and keyboard interactions. When `false`, renders as a non-interactive `<div>`. |
55
+
56
+ ## Rules
57
+
58
+ - When `interactive` is `true`, the component renders as a `<button>` with an extended touch target on mobile.
59
+ - Always pair `interactive` with `onClick` — interactive tags are larger on mobile to extend the touch target.
60
+ - Use color semantically — do not use `"red"` for non-error states.
61
+ - Keep label text short — text does not wrap inside a tag.
62
+ - Use Tag for categories, filters, and tagging — use Pill for statuses.
63
+
64
+ ## Anti-patterns
65
+
66
+ - Using Tag for status labels — use Pill instead.
67
+ - Setting `interactive` without providing an `onClick` handler.
68
+ - Using `"red"` for non-error states.
@@ -0,0 +1,44 @@
1
+ # TextList
2
+
3
+ Import: `import { TextList } from "@lifesg/react-design-system/text-list"`
4
+
5
+ ## When to use
6
+
7
+ Use for semantic list content. For navigation links, use `LinkList` instead.
8
+
9
+ ## Sub-components
10
+
11
+ | Sub-component | Renders | When to use |
12
+ | ------------- | ------- | -------------------------------------------- |
13
+ | `TextList.Ul` | `<ul>` | Unordered list — items without a sequence |
14
+ | `TextList.Ol` | `<ol>` | Ordered list — numbered or lettered sequence |
15
+
16
+ ## Props — `OrderedListProps`
17
+
18
+ | Prop | Type | Default | Description |
19
+ | ------------------ | ------------------------------ | --------- | ----------------------------------------------------------------------- |
20
+ | `counterType` | `CounterType` | "decimal" | Counter style applied to each list item. |
21
+ | `counterSeparator` | `string` | ")" | Character or string rendered after each counter value. |
22
+ | `reversed` | `boolean` | — | The counter is decremented from the start value instead of incremented. |
23
+ | `start` | `number` | — | The value to start the list count from. |
24
+ | `children` \* | `JSX.Element \| JSX.Element[]` | — | — |
25
+ | `bottomMargin` | `number` | — | Bottom margin in pixels applied to each list item except the last. |
26
+ | `size` | `TextListSize` | — | Text size applied to the list content. |
27
+ | `id` | `string` | — | — |
28
+ | `className` | `string` | — | — |
29
+
30
+ ## Props — `UnorderedListProps`
31
+
32
+ | Prop | Type | Default | Description |
33
+ | -------------- | -------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- |
34
+ | `bulletType` | `BulletType \| CustomBulletIcon` | "disc" | Marker style for list items. Pass a `BulletType` token for a predefined marker, or any React node to render a custom decorative icon before each item's content. |
35
+ | `children` \* | `JSX.Element \| JSX.Element[]` | — | — |
36
+ | `bottomMargin` | `number` | — | Bottom margin in pixels applied to each list item except the last. |
37
+ | `size` | `TextListSize` | — | Text size applied to the list content. |
38
+ | `id` | `string` | — | — |
39
+ | `className` | `string` | — | — |
40
+
41
+ ## Rules
42
+
43
+ - Children must be `<li>` elements.
44
+ - Use `bulletType` as a `ReactNode` to render a custom icon bullet — the icon is automatically marked `aria-hidden`.
@@ -0,0 +1,66 @@
1
+ # TimeSlotBarWeek
2
+
3
+ Import: `import { TimeSlotBarWeek } from "@lifesg/react-design-system/time-slot-bar-week"`
4
+
5
+ ## Sub-components
6
+
7
+ - `YearMonthWeekDisplay` — returned by `onWeekDisplayChange`
8
+ - `TimeSlot` — shape of each slot in the `slots` map
9
+ - `TimeSlotBarStyleAttributes` — visual styling for a slot
10
+
11
+ ## YearMonthWeekDisplay
12
+
13
+ | Prop | Type | Description |
14
+ | ------- | --------------------------------------------------- | ------------------------------------------------------ |
15
+ | `week` | `{ firstDayOfWeek: string; lastDayOfWeek: string }` | First and last days of the visible week (`YYYY-MM-DD`) |
16
+ | `year` | `number` | Visible year |
17
+ | `month` | `number` | Visible month (1–12) |
18
+
19
+ ## TimeSlot
20
+
21
+ | Prop | Type | Description |
22
+ | ----------------- | ---------------------------- | ---------------------------------- |
23
+ | `id` \* | `string` | Unique identifier of the slot |
24
+ | `startTime` \* | `string` | Start time (`HH:mm`) |
25
+ | `endTime` \* | `string` | End time (`HH:mm`) |
26
+ | `styleAttributes` | `TimeSlotBarStyleAttributes` | Visual styling |
27
+ | `label` | `string` | Text content within the slot cell |
28
+ | `clickable` | `boolean` | Whether the slot cell is clickable |
29
+
30
+ ## TimeSlotBarStyleAttributes
31
+
32
+ | Prop | Type | Default | Description |
33
+ | -------------------- | ------------------------ | ----------- | ------------------------------------------------- |
34
+ | `backgroundColor` \* | `string` | — | The color of the slot |
35
+ | `styleType` | `"default" \| "stripes"` | `"default"` | The style type of the slot |
36
+ | `backgroundColor2` | `string` | — | Secondary color; used with `styleType: "stripes"` |
37
+
38
+ ## Props — `TimeSlotBarWeekProps`
39
+
40
+ | Prop | Type | Default | Description |
41
+ | ------------------------- | ---------------------------------------------- | ---------- | ----------------------------------------------------------------------------------------------------- |
42
+ | `className` | `string` | — | — |
43
+ | `id` | `string` | — | — |
44
+ | `slots` \* | `{ [date: string]: TimeSlot[] }` | — | Map of date strings (YYYY-MM-DD) to the time slot arrays to render for that date. |
45
+ | `startTime` | `string` | — | The start boundary of the visible time range, in HH:mm format. |
46
+ | `endTime` | `string` | — | The end boundary of the visible time range, in HH:mm format. |
47
+ | `value` | `string` | — | The currently selected date in YYYY-MM-DD format. Controls the highlighted day column. |
48
+ | `interval` | `number` | 30 | Duration in minutes that each time slot cell represents. |
49
+ | `variant` | `TimeSlotCellsVariant` | "flexible" | Controls how time slot cells are sized within each day column. |
50
+ | `maxVisibleCellHeight` | `number` | — | Maximum height in pixels for the time slot area before it becomes truncated. |
51
+ | `showNavigationHeader` | `boolean` | true | Whether to show the month/year pickers and the prev/next week navigation arrows above the week grid. |
52
+ | `enableSelection` | `boolean` | true | When `true`, the user can click a day column to select that date, triggering `onChange`. |
53
+ | `currentCalendarDate` | `string` | — | The date used to determine which week is shown on first render, in YYYY-MM-DD format. |
54
+ | `onSlotClick` | `((date: string, timeSlot: TimeSlot) => void)` | — | Called when the user clicks a time slot cell. |
55
+ | `onChange` | `((value: string) => void)` | — | Called when the user selects a date. Requires `enableSelection` to be `true`. |
56
+ | `onWeekDisplayChange` | `((value: YearMonthWeekDisplay) => void)` | — | Called when the visible week changes due to navigation. |
57
+ | `minDate` | `string` | — | The minimum date that can be selected (inclusive) in 'YYYY-MM-DD' format. |
58
+ | `maxDate` | `string` | — | The maximum date that can be selected (inclusive) in 'YYYY-MM-DD' format. |
59
+ | `disabledDates` | `string[]` | — | Dates to disable in `YYYY-MM-DD` format. Example: `["2023-04-30"]` |
60
+ | `allowDisabledSelection` | `boolean` | — | Specifies if dates normally disabled by `minDate`, `maxDate` and `disabledDates` are still selectable |
61
+ | `showActiveMonthDaysOnly` | `boolean` | — | Specifies if the calendar should display only dates for the selected month |
62
+
63
+ ## Rules
64
+
65
+ - `slots` is mandatory.
66
+ - `startTime`/`endTime` on the component must be full hours (e.g. `"08:00"`, `"13:00"`).
@@ -0,0 +1,57 @@
1
+ # TimeSlotBar
2
+
3
+ Import: `import { TimeSlotBar } from "@lifesg/react-design-system/time-slot-bar"`
4
+
5
+ ## TimeSlot
6
+
7
+ | Prop | Type | Default | Description |
8
+ | ----------------- | ---------------------------- | ------- | ------------------------------------------ |
9
+ | `id` \* | `string` | — | Unique identifier of the slot |
10
+ | `startTime` \* | `string` | — | Slot start time in `HH:mm` (15-min blocks) |
11
+ | `endTime` \* | `string` | — | Slot end time in `HH:mm` (15-min blocks) |
12
+ | `styleAttributes` | `TimeSlotBarStyleAttributes` | — | Styling for this slot |
13
+ | `label` | `string` | — | Text content within the slot cell |
14
+ | `clickable` | `boolean` | — | Whether the slot cell is clickable |
15
+
16
+ ## TimeSlotBarStyleAttributes
17
+
18
+ | Prop | Type | Default | Description |
19
+ | ----------------------- | ------------------------ | ----------- | ---------------------------------------------------------------------- |
20
+ | `backgroundColor` \* | `string` | — | Slot color |
21
+ | `styleType` | `"default" \| "stripes"` | `"default"` | Style type of the slot |
22
+ | `backgroundColor2` | `string` | — | Secondary color; used with `styleType="stripes"` |
23
+ | `hoverBackgroundColor` | `string` | — | Background on hover; only when `clickable` |
24
+ | `hoverBackgroundColor2` | `string` | — | Secondary hover color for `styleType="stripes"`; only when `clickable` |
25
+
26
+ ## Props — `TimeSlotBarRef`
27
+
28
+ | Prop | Type | Default | Description |
29
+ | ---------------- | ------------ | ------- | ----------------------------------------------------------------------------------------------- |
30
+ | `resetScroll` \* | `() => void` | — | Scrolls the bar back to `initialScrollTime`, or to the start if `initialScrollTime` is not set. |
31
+
32
+ ## Props — `TimeSlotBarProps`
33
+
34
+ | Prop | Type | Default | Description |
35
+ | ------------------------ | ------------------------------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
36
+ | `className` | `string` | — | — |
37
+ | `variant` | `TimeSlotBarVariant` | "default" | Visual density of the bar. |
38
+ | `startTime` \* | `string` | — | Start of the visible time range in `HH:mm` format. |
39
+ | `endTime` \* | `string` | — | End of the visible time range in `HH:mm` format. |
40
+ | `initialScrollTime` | `string` | — | Time position the bar scrolls to on mount, in `HH:mm` format. When `roundInitialScrollTime` is `true`, the value is rounded down to the nearest 30-minute interval before scrolling. |
41
+ | `slots` \* | `TimeSlot[]` | — | The individual time slots shown within the configured time range. |
42
+ | `onSlotClick` \* | `(timeSlot: TimeSlot) => void` | — | Called when the user clicks a slot cell. |
43
+ | `onClick` | `() => void` | — | Called when the user clicks an empty slot. |
44
+ | `styleAttributes` | `TimeSlotBarStyleAttributes` | — | Styling applied to the bar background region not covered by any slot. Required to make the background region visible or interactive. |
45
+ | `roundInitialScrollTime` | `boolean` | true | When `true`, `initialScrollTime` is rounded down to the nearest 30-minute interval before the bar scrolls to it. |
46
+
47
+ ## Props — `TimeSlot`
48
+
49
+ | Prop | Type | Default | Description |
50
+ | -------------------- | ---------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------- |
51
+ | `id` \* | `string` | — | Unique identifier for this slot. |
52
+ | `startTime` \* | `string` | — | Start boundary of the slot in `HH:mm` format. |
53
+ | `endTime` \* | `string` | — | End boundary of the slot in `HH:mm` format. |
54
+ | `label` | `string` | — | Text rendered inside the slot cell. Replaced with `"..."` when the cell is too narrow to display the full label. |
55
+ | `clickable` | `boolean` | true | Whether the slot responds to clicks. |
56
+ | `styleAttributes` \* | `TimeSlotBarStyleAttributes` | — | Visual styling for the slot. |
57
+ | `ariaLabel` | `string` | — | Accessible label for this slot. |
@@ -0,0 +1,70 @@
1
+ # TimeSlotWeekView
2
+
3
+ Import: `import { TimeSlotWeekView } from "@lifesg/react-design-system/time-slot-week-view"`
4
+
5
+ ## Sub-components
6
+
7
+ - `YearMonthWeekDisplay` — returned by `onWeekDisplayChange`
8
+ - `TimeSlot` — shape of each slot in the `slots` map
9
+ - `TimeSlotBarStyleAttributes` — visual styling for a slot
10
+
11
+ ## YearMonthWeekDisplay
12
+
13
+ | Prop | Type | Description |
14
+ | ------- | --------------------------------------------------- | ------------------------------------------------------ |
15
+ | `week` | `{ firstDayOfWeek: string; lastDayOfWeek: string }` | First and last days of the visible week (`YYYY-MM-DD`) |
16
+ | `year` | `number` | Visible year |
17
+ | `month` | `number` | Visible month (1–12) |
18
+
19
+ ## TimeSlot
20
+
21
+ | Prop | Type | Description |
22
+ | ----------------- | ---------------------------- | ----------------------------------------------------------------- |
23
+ | `id` \* | `string` | Unique identifier of the slot |
24
+ | `startTime` \* | `string` | Start time (`HH:mm`; minutes in 15-minute blocks: 00, 15, 30, 45) |
25
+ | `endTime` \* | `string` | End time (`HH:mm`; minutes in 15-minute blocks: 00, 15, 30, 45) |
26
+ | `styleAttributes` | `TimeSlotBarStyleAttributes` | Visual styling |
27
+ | `label` | `string` | Text content within the slot cell |
28
+ | `clickable` | `boolean` | Whether the slot cell is clickable |
29
+
30
+ ## TimeSlotBarStyleAttributes
31
+
32
+ | Prop | Type | Default | Description |
33
+ | ---------------- | ------------------------ | ----------- | ------------------------------------------------- |
34
+ | `color` \* | `string` | — | The color of the slot |
35
+ | `styleType` | `"default" \| "stripes"` | `"default"` | The style type of the slot |
36
+ | `secondaryColor` | `string` | — | Secondary color; used with `styleType: "stripes"` |
37
+
38
+ ## Props — `TimeSlotWeekViewProps`
39
+
40
+ | Prop | Type | Default | Description |
41
+ | ------------------------- | ---------------------------------------------- | ------- | ----------------------------------------------------------------------------------------------------- |
42
+ | `className` | `string` | — | — |
43
+ | `id` | `string` | — | — |
44
+ | `value` | `string` | — | The currently selected date in `YYYY-MM-DD` format. Controls the highlighted day in the week view. |
45
+ | `slots` | `{ [date: string]: TimeSlot[] }` | — | Map of date strings (YYYY-MM-DD) to an array of `TimeSlot` entries displayed in that day's column. |
46
+ | `showNavigationHeader` | `boolean` | true | Whether to show the month/year picker and the prev/next week navigation arrows above the week grid. |
47
+ | `enableSelection` | `boolean` | true | When `true`, the user can click a day column to select that date, triggering `onChange` |
48
+ | `currentCalendarDate` | `string` | — | The date used to determine which week is shown on first render, in YYYY-MM-DD format. |
49
+ | `onSlotClick` | `((date: string, timeSlot: TimeSlot) => void)` | — | Called when the user clicks a time slot cell. |
50
+ | `onChange` | `((value: string) => void)` | — | Called when the user selects a date. Requires `enableSelection` to be `true`. |
51
+ | `onWeekDisplayChange` | `((value: YearMonthWeekDisplay) => void)` | — | Called when the visible week changes due to navigation. |
52
+ | `minDate` | `string` | — | The minimum date that can be selected (inclusive) in 'YYYY-MM-DD' format. |
53
+ | `maxDate` | `string` | — | The maximum date that can be selected (inclusive) in 'YYYY-MM-DD' format. |
54
+ | `disabledDates` | `string[]` | — | Dates to disable in `YYYY-MM-DD` format. Example: `["2023-04-30"]` |
55
+ | `allowDisabledSelection` | `boolean` | — | Specifies if dates normally disabled by `minDate`, `maxDate` and `disabledDates` are still selectable |
56
+ | `showActiveMonthDaysOnly` | `boolean` | — | Specifies if the calendar should display only dates for the selected month |
57
+
58
+ ## Props — `YearMonthWeekDisplay`
59
+
60
+ | Prop | Type | Default | Description |
61
+ | ---------- | --------------------------------------------------- | ------- | ------------------------------------------------------------------------- |
62
+ | `week` \* | `{ firstDayOfWeek: string; lastDayOfWeek: string }` | — | The first and last days of the newly displayed week in YYYY-MM-DD format. |
63
+ | `year` \* | `number` | — | — |
64
+ | `month` \* | `number` | — | `month` is 1-indexed |
65
+
66
+ ## Rules
67
+
68
+ - `slots` is mandatory.
69
+ - `TimeSlot` minutes must be in 15-minute blocks (00, 15, 30, 45).
70
+ - `TimeSlotBarStyleAttributes` uses `color`/`secondaryColor` — not `backgroundColor`/`backgroundColor2` as in `TimeSlotBarWeek`.
@@ -0,0 +1,69 @@
1
+ # Timeline
2
+
3
+ Import: `import { Timeline } from "@lifesg/react-design-system/timeline"`
4
+
5
+ ## When to use
6
+
7
+ Use to communicate a process, application history, or sequence of steps. Use the `numeric` variant for numbered step-by-step instructions.
8
+
9
+ ## Sub-components
10
+
11
+ ### TimelineItemProps
12
+
13
+ | Prop | Type | Default | Description |
14
+ | ---------- | ------------------------------------------------------------------------------------------------------------ | ------- | ------------------------------------------------------ |
15
+ | `title` | `string` | — | Item title — required |
16
+ | `content` | `JSX.Element` | — | Item content — required |
17
+ | `variant` | `"completed" \| "current" \| "upcoming-active" \| "upcoming-inactive" \| "numeric" \| "error" \| "disabled"` | — | Visual state of the item indicator |
18
+ | `statuses` | `PillProps[]` | — | Status pills shown alongside the item (max 2 rendered) |
19
+
20
+ ## Variants
21
+
22
+ | `variant` | Usage |
23
+ | --------------------- | ------------------------------------ |
24
+ | `"completed"` | Step or event is done |
25
+ | `"current"` | Step currently in progress |
26
+ | `"upcoming-active"` | Next actionable step |
27
+ | `"upcoming-inactive"` | Future step, not yet actionable |
28
+ | `"error"` | Step has an error |
29
+ | `"disabled"` | Step is not available |
30
+ | `"numeric"` | Numbered step — use for instructions |
31
+
32
+ ## Props — `TimelineItemProps`
33
+
34
+ | Prop | Type | Default | Description |
35
+ | ------------ | ----------------------- | ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ |
36
+ | `title` \* | `string \| JSX.Element` | — | Title of the step. |
37
+ | `content` \* | `string \| JSX.Element` | — | Body content of the step. |
38
+ | `statuses` | `PillProps[]` | — | Up to two status `Pill` descriptors rendered below the title. Only the first two entries are displayed when more are provided. |
39
+ | `variant` | `Variant` | "current" for the first item and "upcoming-active" for all subsequent items. | Visual state of this step. |
40
+
41
+ ## Props — `TimelineProps`
42
+
43
+ | Prop | Type | Default | Description |
44
+ | ---------------------------- | --------------------- | ------- | --------------------------------------------------------------------------------------------------- |
45
+ | `items` \* | `TimelineItemProps[]` | — | Ordered list of steps to render. |
46
+ | `title` | `string` | — | Heading text displayed above the step list. |
47
+ | `startCol` | `number` | — | CSS grid column the timeline wrapper starts on. Useful if component is wrapped in a css grid div. |
48
+ | `colSpan` | `number` | — | Number of grid columns the timeline wrapper spans. Useful if component is wrapped in a css grid div |
49
+ | `headingLevel` | `number` | 2 | Heading level assigned to the `title` element. Item titles are rendered at `headingLevel + 1`. |
50
+ | `counterOffset` | `number` | 0 | Value added to each step's displayed counter when `variant` is `"numeric"`. |
51
+ | `className` | `string` | — | — |
52
+ | `id` | `string` | — | — |
53
+ | `data-base-indicator-testid` | `string` | — | — |
54
+
55
+ ## Rules
56
+
57
+ - The first item defaults to `variant="current"` and subsequent items default to `variant="upcoming-active"` when `variant` is not specified.
58
+ - Only a maximum of 2 `statuses` pills will render per item regardless of how many are provided.
59
+ - `counterOffset` shifts the numeric counter: if `offset=2`, the first item shows `3`.
60
+ - Always set `headingLevel` when `title` is provided — ensures correct heading hierarchy.
61
+ - Use `counterOffset` when showing a partial sequence (e.g. steps 3–5 of a larger flow).
62
+ - Use `statuses` with `PillProps` — follow Pill color semantics (see `pill.md`).
63
+ - Use `"numeric"` variant consistently across all items in an instruction list — do not mix with status variants.
64
+
65
+ ## Anti-patterns
66
+
67
+ - Mixing `"numeric"` and status variants in the same timeline — choose one paradigm per use case.
68
+ - Providing more than 2 status pills per item — only 2 will render.
69
+ - Using Timeline for non-sequential content — use a list or table instead.