@lifesg/react-design-system 4.0.0-alpha.4 → 4.0.0-alpha.6

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 (954) hide show
  1. package/accordion/accordion-item.styles_1j4eb32.css +2 -2
  2. package/accordion/accordion.d.ts +19 -0
  3. package/accordion/accordion.js.map +1 -1
  4. package/accordion/accordion.styles_bzrfrs.css +2 -2
  5. package/accordion/types.d.ts +42 -2
  6. package/alert/alert.d.ts +8 -0
  7. package/alert/alert.js.map +1 -1
  8. package/alert/alert.styles_patwo2.css +2 -2
  9. package/alert/types.d.ts +26 -2
  10. package/animations/loading-dots/loading-dots.styles_1rgrrmw.css +2 -2
  11. package/animations/loading-dots/lottie-animation.styles_1m15v69.css +1 -1
  12. package/animations/loading-dots-spinner/loading-dots-spinner.styles_1hcqkhs.css +2 -2
  13. package/animations/loading-dots-spinner/lottie-animation.styles_13d1unb.css +1 -1
  14. package/animations/loading-spinner/loading-spinner.styles_n6xoft.css +2 -2
  15. package/animations/loading-spinner/lottie-animation.styles_bnn4qt.css +1 -1
  16. package/avatar/avatar.d.ts +7 -0
  17. package/avatar/avatar.js.map +1 -1
  18. package/avatar/avatar.styles_16efw4.css +2 -2
  19. package/avatar/types.d.ts +11 -0
  20. package/badge/badge.d.ts +7 -0
  21. package/badge/badge.js.map +1 -1
  22. package/badge/badge.styles_1c3c6wj.css +2 -2
  23. package/badge/types.d.ts +20 -0
  24. package/box-container/box-container.d.ts +8 -0
  25. package/box-container/box-container.js.map +1 -1
  26. package/box-container/box-container.styles_5t2j9k.css +2 -2
  27. package/box-container/types.d.ts +24 -0
  28. package/breadcrumb/breadcrumb.d.ts +7 -0
  29. package/breadcrumb/breadcrumb.js.map +1 -1
  30. package/breadcrumb/breadcrumb.styles_1nl4aua.css +2 -2
  31. package/breadcrumb/types.d.ts +31 -0
  32. package/button/button.d.ts +1 -0
  33. package/button/button.js.map +1 -1
  34. package/button/button.styles_1pxy0co.css +2 -2
  35. package/button/types.d.ts +42 -9
  36. package/calendar/calendar.d.ts +3 -0
  37. package/calendar/calendar.js.map +1 -1
  38. package/calendar/calendar.styles_11ho5x8.css +2 -2
  39. package/calendar/types.d.ts +43 -7
  40. package/card/card.d.ts +1 -0
  41. package/card/card.js.map +1 -1
  42. package/card/card.styles_1gh9gs3.css +2 -2
  43. package/card/types.d.ts +1 -0
  44. package/checkbox/checkbox.d.ts +3 -0
  45. package/checkbox/checkbox.js.map +1 -1
  46. package/checkbox/checkbox.styles_gm5bu1.css +2 -2
  47. package/checkbox/types.d.ts +19 -3
  48. package/cjs/accordion/accordion-item.styles_1j4eb32.css +2 -2
  49. package/cjs/accordion/accordion.js.map +1 -1
  50. package/cjs/accordion/accordion.styles_bzrfrs.css +2 -2
  51. package/cjs/alert/alert.js.map +1 -1
  52. package/cjs/alert/alert.styles_patwo2.css +2 -2
  53. package/cjs/animations/loading-dots/loading-dots.styles_1rgrrmw.css +2 -2
  54. package/cjs/animations/loading-dots/lottie-animation.styles_1m15v69.css +1 -1
  55. package/cjs/animations/loading-dots-spinner/loading-dots-spinner.styles_1hcqkhs.css +2 -2
  56. package/cjs/animations/loading-dots-spinner/lottie-animation.styles_13d1unb.css +1 -1
  57. package/cjs/animations/loading-spinner/loading-spinner.styles_n6xoft.css +2 -2
  58. package/cjs/animations/loading-spinner/lottie-animation.styles_bnn4qt.css +1 -1
  59. package/cjs/avatar/avatar.js.map +1 -1
  60. package/cjs/avatar/avatar.styles_16efw4.css +2 -2
  61. package/cjs/badge/badge.js.map +1 -1
  62. package/cjs/badge/badge.styles_1c3c6wj.css +2 -2
  63. package/cjs/box-container/box-container.js.map +1 -1
  64. package/cjs/box-container/box-container.styles_5t2j9k.css +2 -2
  65. package/cjs/breadcrumb/breadcrumb.js.map +1 -1
  66. package/cjs/breadcrumb/breadcrumb.styles_1nl4aua.css +2 -2
  67. package/cjs/button/button.js.map +1 -1
  68. package/cjs/button/button.styles_1pxy0co.css +2 -2
  69. package/cjs/calendar/calendar.js.map +1 -1
  70. package/cjs/calendar/calendar.styles_11ho5x8.css +2 -2
  71. package/cjs/card/card.js.map +1 -1
  72. package/cjs/card/card.styles_1gh9gs3.css +2 -2
  73. package/cjs/checkbox/checkbox.js.map +1 -1
  74. package/cjs/checkbox/checkbox.styles_gm5bu1.css +2 -2
  75. package/cjs/countdown-timer/countdown-timer.js.map +1 -1
  76. package/cjs/countdown-timer/countdown-timer.styles_ipn1b0.css +2 -2
  77. package/cjs/dashed-border/dashed-border.js.map +1 -1
  78. package/cjs/dashed-border/dashed-border.styles_zszoox.css +2 -2
  79. package/cjs/data-table/data-table.js +1 -1
  80. package/cjs/data-table/data-table.js.map +1 -1
  81. package/cjs/data-table/data-table.styles.js +1 -1
  82. package/cjs/data-table/data-table.styles.js.map +1 -1
  83. package/cjs/data-table/data-table.styles_rxganh.css +27 -0
  84. package/cjs/date-input/date-input.js.map +1 -1
  85. package/cjs/date-input/date-input.styles_1r5kcc7.css +1 -1
  86. package/cjs/date-navigator/date-navigator.js.map +1 -1
  87. package/cjs/date-navigator/date-navigator.styles_wokh56.css +2 -2
  88. package/cjs/date-range-input/date-range-input.js.map +1 -1
  89. package/cjs/date-range-input/date-range-input.styles_1s7ojnj.css +2 -2
  90. package/cjs/divider/divider.js.map +1 -1
  91. package/cjs/divider/divider.styles_1xpzh8p.css +2 -2
  92. package/cjs/drawer/drawer.js.map +1 -1
  93. package/cjs/drawer/drawer.styles_94hx3y.css +2 -2
  94. package/cjs/e-signature/e-signature-canvas.js +1 -1
  95. package/cjs/e-signature/e-signature-canvas.js.map +1 -1
  96. package/cjs/e-signature/e-signature.js.map +1 -1
  97. package/cjs/e-signature/e-signature.styles_lukd9f.css +2 -2
  98. package/cjs/error-display/error-display.js.map +1 -1
  99. package/cjs/error-display/error-display.styles_d3tql1.css +2 -2
  100. package/cjs/external/dompurify/dist/purify.es.js +3 -3
  101. package/cjs/external/dompurify/dist/purify.es.js.map +1 -1
  102. package/cjs/external/lodash/_setCacheHas.js.map +1 -1
  103. package/cjs/external/lodash/lodash.js +1 -1
  104. package/cjs/external/lodash/lodash.js.map +1 -1
  105. package/cjs/feedback-rating/feedback-rating-stars-container.styles_dmi8z9.css +2 -2
  106. package/cjs/feedback-rating/feedback-rating.js.map +1 -1
  107. package/cjs/feedback-rating/feedback-rating.styles_1kdklb6.css +2 -2
  108. package/cjs/file-download/file-download.js.map +1 -1
  109. package/cjs/file-download/file-download.styles_iggk8q.css +2 -2
  110. package/cjs/file-download/file-list-card/file-list-card.styles.js +1 -1
  111. package/cjs/file-download/file-list-card/file-list-card.styles.js.map +1 -1
  112. package/{file-download/file-list-card/file-list-card.styles_oom8ii.css → cjs/file-download/file-list-card/file-list-card.styles_18j2gut.css} +3 -3
  113. package/cjs/file-upload/dropzone.styles_1pllsau.css +2 -2
  114. package/cjs/file-upload/file-item-edit.js +1 -1
  115. package/cjs/file-upload/file-item-edit.js.map +1 -1
  116. package/cjs/file-upload/file-item-edit.styles.js +1 -1
  117. package/cjs/file-upload/file-item-edit.styles.js.map +1 -1
  118. package/cjs/file-upload/{file-item-edit.styles_1qbpbxj.css → file-item-edit.styles_19bvztn.css} +6 -5
  119. package/cjs/file-upload/file-list/file-list.js +1 -1
  120. package/cjs/file-upload/file-list/file-list.js.map +1 -1
  121. package/cjs/file-upload/file-list/file-list.styles.js +1 -1
  122. package/cjs/file-upload/file-list/file-list.styles.js.map +1 -1
  123. package/cjs/file-upload/file-list/file-list.styles_1w7so98.css +3 -0
  124. package/cjs/file-upload/file-list-item/file-list-item-thumbnail.styles_1y4si19.css +2 -2
  125. package/cjs/file-upload/file-list-item/file-list-item.js +1 -1
  126. package/cjs/file-upload/file-list-item/file-list-item.js.map +1 -1
  127. package/cjs/file-upload/file-list-item/file-list-item.styles.js +1 -1
  128. package/cjs/file-upload/file-list-item/file-list-item.styles.js.map +1 -1
  129. package/cjs/file-upload/file-list-item/file-list-item.styles_o8000f.css +17 -0
  130. package/cjs/file-upload/file-upload.js +1 -1
  131. package/cjs/file-upload/file-upload.js.map +1 -1
  132. package/cjs/file-upload/file-upload.styles_9ffwcd.css +2 -2
  133. package/cjs/filter/addons/filter-item-checkbox.styles_7degw7.css +2 -2
  134. package/cjs/filter/filter-item-page.styles_17ewfrz.css +1 -1
  135. package/cjs/filter/filter-item.js.map +1 -1
  136. package/cjs/filter/filter-item.styles_cphjnj.css +2 -2
  137. package/cjs/filter/filter-modal.styles_qw3xlg.css +2 -2
  138. package/cjs/filter/filter-sidebar.styles_1otwpjl.css +2 -2
  139. package/cjs/filter/filter.js.map +1 -1
  140. package/cjs/filter/filter.styles_1ykijwm.css +2 -2
  141. package/cjs/footer/footer-download-app.styles_1v1j2us.css +2 -2
  142. package/cjs/footer/footer-resource-addon.styles_1jepb1d.css +2 -2
  143. package/cjs/footer/footer.js +1 -1
  144. package/cjs/footer/footer.js.map +1 -1
  145. package/cjs/footer/footer.styles_1msorhc.css +2 -2
  146. package/cjs/form/form-label-addon.js +1 -1
  147. package/cjs/form/form-label-addon.js.map +1 -1
  148. package/cjs/form/form-label-addon.styles_b00z8p.css +1 -1
  149. package/cjs/form/form-label.styles.js +1 -1
  150. package/cjs/form/form-label.styles.js.map +1 -1
  151. package/cjs/form/{form-label.styles_11r0652.css → form-label.styles_1nbe0bm.css} +2 -2
  152. package/cjs/form/form-textarea.styles_3p9qoy.css +2 -2
  153. package/cjs/form/form-wrapper.styles_199rslu.css +1 -1
  154. package/cjs/form/index.js +1 -1
  155. package/cjs/form/index.js.map +1 -1
  156. package/cjs/fullscreen-image-carousel/fullscreen-image-carousel.js +1 -1
  157. package/cjs/fullscreen-image-carousel/fullscreen-image-carousel.js.map +1 -1
  158. package/cjs/fullscreen-image-carousel/fullscreen-image-carousel.styles_vc6y5c.css +2 -2
  159. package/cjs/fullscreen-image-carousel/stateful-image.styles_1xe8ypm.css +2 -2
  160. package/cjs/histogram-slider/histogram-slider.js.map +1 -1
  161. package/cjs/histogram-slider/histogram-slider.styles_wvd4w.css +2 -2
  162. package/cjs/image-button/image-button.js.map +1 -1
  163. package/cjs/image-button/image-button.styles_6n1qsr.css +2 -2
  164. package/cjs/index.js +1 -1
  165. package/cjs/input/input.js.map +1 -1
  166. package/cjs/input/input.styles_1cblor0.css +2 -2
  167. package/cjs/input-group/input-group-list-addon.styles_17iuqtw.css +2 -2
  168. package/cjs/input-group/input-group.js.map +1 -1
  169. package/cjs/input-group/input-group.styles_bqye6f.css +2 -2
  170. package/cjs/input-multi-select/input-multi-select.js.map +1 -1
  171. package/cjs/input-nested-multi-select/input-nested-multi-select.js.map +1 -1
  172. package/cjs/input-nested-select/input-nested-select.js.map +1 -1
  173. package/cjs/input-range-select/input-range-select.js.map +1 -1
  174. package/cjs/input-range-select/input-range-select.styles_adbrbm.css +2 -2
  175. package/cjs/input-range-slider/input-range-slider.js.map +1 -1
  176. package/cjs/input-range-slider/input-range-slider.styles_aljl2v.css +2 -2
  177. package/cjs/input-select/input-select.js.map +1 -1
  178. package/cjs/input-slider/input-slider.js.map +1 -1
  179. package/cjs/input-textarea/textarea-counter.styles_1n3wsnv.css +1 -1
  180. package/cjs/input-textarea/textarea.js.map +1 -1
  181. package/cjs/input-textarea/textarea.styles_22z4n3.css +2 -2
  182. package/cjs/language-switcher/dropdown-panel.styles_1qsjf8d.css +2 -2
  183. package/cjs/language-switcher/dropdown-variant.styles_1vrdfky.css +2 -2
  184. package/cjs/language-switcher/language-switcher.js.map +1 -1
  185. package/cjs/language-switcher/link-container-variant.styles_1iw6zux.css +2 -2
  186. package/cjs/layout/col-div.styles_16o6mwx.css +1 -1
  187. package/cjs/layout/container.styles_v70ec6.css +2 -2
  188. package/cjs/layout/index.js +1 -1
  189. package/cjs/layout/index.js.map +1 -1
  190. package/cjs/layout/section.styles_hstcaf.css +1 -1
  191. package/cjs/link-list/link-list.js.map +1 -1
  192. package/cjs/link-list/link-list.styles_m57vks.css +2 -2
  193. package/cjs/local-nav/local-nav-dropdown/local-nav-dropdown.js.map +1 -1
  194. package/cjs/local-nav/local-nav-dropdown/local-nav-dropdown.styles_uhd4xl.css +2 -2
  195. package/cjs/local-nav/local-nav-menu/local-nav-menu.js.map +1 -1
  196. package/cjs/local-nav/local-nav-menu/local-nav-menu.styles_pq19dh.css +2 -2
  197. package/cjs/markup/markup.js.map +1 -1
  198. package/cjs/markup/markup.style_1iu40x9.css +2 -2
  199. package/cjs/masked-input/masked-input.js.map +1 -1
  200. package/cjs/masked-input/masked-input.styles_1cm388a.css +2 -2
  201. package/cjs/masthead/masthead.js.map +1 -1
  202. package/cjs/masthead/masthead.styles_1huzon9.css +2 -2
  203. package/cjs/menu/menu-content.styles_p7ijll.css +2 -2
  204. package/cjs/menu/menu-item.styles_liyed8.css +2 -2
  205. package/cjs/menu/menu-link.styles_hfxoez.css +2 -2
  206. package/cjs/menu/menu-section.styles_g7my4d.css +2 -2
  207. package/cjs/menu/menu.js +1 -1
  208. package/cjs/menu/menu.js.map +1 -1
  209. package/cjs/modal/index.js.map +1 -1
  210. package/cjs/modal/modal-box.js +1 -1
  211. package/cjs/modal/modal-box.js.map +1 -1
  212. package/cjs/modal/modal-box.styles_y52cts.css +2 -2
  213. package/cjs/modal/modal.styles_1lbblx6.css +2 -2
  214. package/cjs/modal-v2/index.js +1 -1
  215. package/cjs/modal-v2/index.js.map +1 -1
  216. package/cjs/modal-v2/modal-v2.js +1 -1
  217. package/cjs/modal-v2/modal-v2.js.map +1 -1
  218. package/cjs/modal-v2/modal-v2.styles_a8gv5i.css +2 -2
  219. package/cjs/modal-v2/slots/card.js +1 -1
  220. package/cjs/modal-v2/slots/card.js.map +1 -1
  221. package/cjs/modal-v2/slots/slot-styles_13sd376.css +2 -2
  222. package/cjs/navbar/brand.styles_zcgddp.css +1 -1
  223. package/cjs/navbar/drawer.js +1 -1
  224. package/cjs/navbar/drawer.js.map +1 -1
  225. package/cjs/navbar/drawer.styles_7hnxp5.css +2 -2
  226. package/cjs/navbar/menu.styles_gdpqc.css +2 -2
  227. package/cjs/navbar/navbar-action-buttons.styles_1vpm0nk.css +2 -2
  228. package/cjs/navbar/navbar-items.styles_1i3ltot.css +2 -2
  229. package/cjs/navbar/navbar.js +1 -1
  230. package/cjs/navbar/navbar.js.map +1 -1
  231. package/cjs/navbar/navbar.styles_koy0c7.css +2 -2
  232. package/cjs/notification-banner/notification-banner-hoc.js.map +1 -1
  233. package/cjs/notification-banner/notification-banner.js.map +1 -1
  234. package/cjs/notification-banner/notification-banner.styles_uxlysy.css +2 -2
  235. package/cjs/otp-input/otp-input.js.map +1 -1
  236. package/cjs/otp-input/otp-input.styles_5sbutl.css +2 -2
  237. package/cjs/otp-verification/contact-input-section.styles_odrjvt.css +2 -2
  238. package/cjs/otp-verification/otp-verification.js.map +1 -1
  239. package/cjs/otp-verification/otp-verification.styles_dg9bm8.css +1 -1
  240. package/cjs/otp-verification/thumbnail/thumbnail.styles_shqylh.css +2 -2
  241. package/cjs/otp-verification/verification-section.styles_x8jj.css +2 -2
  242. package/cjs/overlay/overlay.js +1 -1
  243. package/cjs/overlay/overlay.js.map +1 -1
  244. package/cjs/overlay/overlay.styles_12wym18.css +2 -2
  245. package/cjs/pagination/pagination.js.map +1 -1
  246. package/cjs/pagination/pagination.styles_6bcgva.css +2 -2
  247. package/cjs/phone-number-input/phone-number-input.js.map +1 -1
  248. package/cjs/pill/pill.js.map +1 -1
  249. package/cjs/pill/pill.styles_xwrniu.css +2 -2
  250. package/cjs/popover/popover-inline/popover-inline.js.map +1 -1
  251. package/cjs/popover/popover-inline/popover-inline.styles_bkopnt.css +2 -2
  252. package/cjs/popover/popover-trigger.js.map +1 -1
  253. package/cjs/popover/popover-trigger.styles_8zokig.css +1 -1
  254. package/cjs/popover/popover.js +1 -1
  255. package/cjs/popover/popover.js.map +1 -1
  256. package/cjs/popover/popover.styles_ujnf0h.css +2 -2
  257. package/cjs/predictive-text-input/predictive-text-input.js.map +1 -1
  258. package/cjs/progress-indicator/progress-indicator.js.map +1 -1
  259. package/cjs/progress-indicator/progress-indicator.styles_1c038s4.css +2 -2
  260. package/cjs/radio-button/radio-button.js.map +1 -1
  261. package/cjs/radio-button/radio-button.styles_1c4v6v.css +2 -2
  262. package/cjs/schedule/schedule-day-view/schedule-day-view.styles_8ti149.css +2 -2
  263. package/cjs/schedule/schedule-header/schedule-header.js +1 -1
  264. package/cjs/schedule/schedule-header/schedule-header.js.map +1 -1
  265. package/cjs/schedule/schedule-header/schedule-header.styles_1n2u5vj.css +2 -2
  266. package/cjs/schedule/schedule-week-view/schedule-week-view.styles_x7x50m.css +2 -2
  267. package/cjs/schedule/schedule-week-view/time-cell.styles_1sorjz8.css +2 -2
  268. package/cjs/schedule/schedule.js.map +1 -1
  269. package/cjs/schedule/schedule.styles_fdy5a1.css +2 -2
  270. package/cjs/schedule/shared/with-optional-popover.js +1 -1
  271. package/cjs/schedule/shared/with-optional-popover.js.map +1 -1
  272. package/cjs/schedule/shared/with-optional-popover.styles_7mv3p2.css +1 -1
  273. package/cjs/schedule/time-indicator/time-indicator.styles_1eaxyes.css +2 -2
  274. package/cjs/select-histogram/select-histogram.js.map +1 -1
  275. package/cjs/select-histogram/select-histogram.styles_n260dy.css +2 -2
  276. package/cjs/shared/accessibility/index_13g9vp.css +1 -1
  277. package/cjs/shared/clickable-icon/clickable-icon.styles_1v2imml.css +2 -2
  278. package/cjs/shared/component-loading-spinner/component-loading-spinner.styles_15eq02i.css +2 -2
  279. package/cjs/shared/dropdown-list/dropdown-label.styles_mloii0.css +2 -2
  280. package/cjs/shared/dropdown-list/dropdown-list.styles_konwm.css +2 -2
  281. package/cjs/shared/dropdown-list/dropdown-search.styles_1hc1gkh.css +2 -2
  282. package/cjs/shared/dropdown-list/expandable-element.styles_rkkvqr.css +2 -2
  283. package/cjs/shared/dropdown-list/nested-dropdown-list.styles_wdhxoe.css +2 -2
  284. package/cjs/shared/dropdown-wrapper/dropdown-wrapper.styles_15hwwoj.css +2 -2
  285. package/cjs/shared/fade-wrapper/fade-wrapper.styles_16iug7l.css +2 -2
  286. package/cjs/shared/image-placeholder/image-placeholder.styles_44nwil.css +1 -1
  287. package/cjs/shared/input-wrapper/input-wrapper.styles_je6maw.css +2 -2
  288. package/cjs/shared/internal-calendar/calendar-dropdown.styles_wybjai.css +1 -1
  289. package/cjs/shared/internal-calendar/calendar-manager.js +1 -1
  290. package/cjs/shared/internal-calendar/calendar-manager.js.map +1 -1
  291. package/cjs/shared/internal-calendar/calendar-manager.styles.js +1 -1
  292. package/cjs/shared/internal-calendar/calendar-manager.styles.js.map +1 -1
  293. package/cjs/shared/internal-calendar/{calendar-manager.styles_1iuq5zw.css → calendar-manager.styles_1njwkj2.css} +3 -3
  294. package/cjs/shared/internal-calendar/day-cell/day-cell.styles_1t5oqc1.css +2 -2
  295. package/cjs/shared/internal-calendar/internal-calendar-month.styles_14oh57f.css +2 -2
  296. package/cjs/shared/internal-calendar/internal-calendar-year.styles_therlc.css +2 -2
  297. package/cjs/shared/internal-calendar/internal-calendar.styles_gnc3eq.css +1 -1
  298. package/cjs/shared/internal-calendar/standard/standard-calendar-day-view.styles_1bw26au.css +2 -2
  299. package/cjs/shared/progress-bar/progress-bar.styles_125ri7a.css +1 -1
  300. package/cjs/shared/range-input-inner-container/range-input-inner-container.styles_1v61utg.css +2 -2
  301. package/cjs/shared/standalone-date-input/standalone-date-input.styles_157qo89.css +2 -2
  302. package/cjs/shared/time-slot/time-slot.styles_18s0to7.css +2 -2
  303. package/cjs/shared/timepicker-dropdown/timepicker-dropdown.styles_119l6k6.css +2 -2
  304. package/cjs/sidenav/sidenav-drawer-item.styles_1ljnyx2.css +2 -2
  305. package/cjs/sidenav/sidenav-drawer-subitem.styles_2y58kf.css +1 -1
  306. package/cjs/sidenav/sidenav-group.styles_1x604sw.css +2 -2
  307. package/cjs/sidenav/sidenav-item.styles_lqw3kh.css +2 -2
  308. package/cjs/sidenav/sidenav.js.map +1 -1
  309. package/cjs/sidenav/sidenav.styles_1vxezie.css +2 -2
  310. package/cjs/singpass-button/singpass-button.js.map +1 -1
  311. package/cjs/singpass-button/singpass-button.styles_1miyex3.css +2 -2
  312. package/cjs/smart-app-banner/smart-app-banner.js.map +1 -1
  313. package/cjs/smart-app-banner/smart-app-banner.styles_15u6yv4.css +2 -2
  314. package/cjs/tab/tab-link-chain.styles_49got4.css +2 -2
  315. package/cjs/tab/tab.js.map +1 -1
  316. package/cjs/tab/tab.styles_1najffw.css +1 -1
  317. package/cjs/table/table.js.map +1 -1
  318. package/cjs/table/table.styles.js +1 -1
  319. package/cjs/table/table.styles.js.map +1 -1
  320. package/cjs/table/{table.styles_1af5ipv.css → table.styles_1vjx31g.css} +2 -2
  321. package/cjs/tag/tag.js.map +1 -1
  322. package/cjs/tag/tag.style_d98c53.css +2 -2
  323. package/cjs/text-list/index.js.map +1 -1
  324. package/cjs/text-list/text-list.styles_w3fvyt.css +2 -2
  325. package/cjs/theme/theme-provider/breakpoint.js +1 -1
  326. package/cjs/theme/theme-provider/breakpoint.js.map +1 -1
  327. package/cjs/theme/theme-provider/hooks.js.map +1 -1
  328. package/cjs/theme/theme-provider/index.js.map +1 -1
  329. package/cjs/theme/tokens/border.js.map +1 -1
  330. package/cjs/theme/tokens/breakpoint.js.map +1 -1
  331. package/cjs/theme/tokens/colour.js.map +1 -1
  332. package/cjs/theme/tokens/component.js.map +1 -1
  333. package/cjs/theme/tokens/font.js.map +1 -1
  334. package/cjs/theme/tokens/media-query.js.map +1 -1
  335. package/cjs/theme/tokens/motion.js.map +1 -1
  336. package/cjs/theme/tokens/radius.js.map +1 -1
  337. package/cjs/theme/tokens/shadow.js.map +1 -1
  338. package/cjs/theme/tokens/spacing.js.map +1 -1
  339. package/cjs/theme/types.js +1 -1
  340. package/cjs/theme/types.js.map +1 -1
  341. package/cjs/theme/utils/css-variable.js.map +1 -1
  342. package/cjs/theme/utils/font.js.map +1 -1
  343. package/cjs/theme/utils/use-apply-styles.js +1 -1
  344. package/cjs/theme/utils/use-apply-styles.js.map +1 -1
  345. package/cjs/theme/utils/use-design-token-override.js +2 -0
  346. package/cjs/theme/utils/use-design-token-override.js.map +1 -0
  347. package/cjs/theme/utils/use-design-token.js.map +1 -1
  348. package/cjs/theme/utils/use-media-query.js.map +1 -1
  349. package/cjs/time-range-picker/combobox-picker/combobox-picker.js +1 -1
  350. package/cjs/time-range-picker/combobox-picker/combobox-picker.js.map +1 -1
  351. package/cjs/time-range-picker/combobox-picker/combobox-picker.styles_7i9vso.css +1 -1
  352. package/cjs/time-range-picker/common.styles.js +1 -1
  353. package/cjs/time-range-picker/common.styles.js.map +1 -1
  354. package/cjs/time-range-picker/{common.styles_1qwp4xa.css → common.styles_cnkkax.css} +2 -1
  355. package/cjs/time-range-picker/dial-picker/dial-picker.js +1 -1
  356. package/cjs/time-range-picker/dial-picker/dial-picker.js.map +1 -1
  357. package/cjs/time-range-picker/time-range-picker.js.map +1 -1
  358. package/cjs/time-slot-bar/time-slot-bar.js.map +1 -1
  359. package/cjs/time-slot-bar/time-slot-bar.styles_wigbyd.css +2 -2
  360. package/cjs/time-slot-bar-week/time-slot-bar-week-days.styles_evdvs9.css +2 -2
  361. package/cjs/time-slot-bar-week/time-slot-bar-week.js.map +1 -1
  362. package/cjs/time-slot-bar-week/time-slot-bar-week.styles_11ybf42.css +1 -1
  363. package/cjs/time-slot-week-view/time-slot-week-days.styles_1h21vyw.css +2 -2
  364. package/cjs/time-slot-week-view/time-slot-week-view.js.map +1 -1
  365. package/cjs/time-slot-week-view/time-slot-week-view.styles_gqgsw2.css +1 -1
  366. package/cjs/timeline/timeline.js.map +1 -1
  367. package/cjs/timeline/timeline.styles_1jxzik4.css +2 -2
  368. package/cjs/timepicker/timepicker.js +1 -1
  369. package/cjs/timepicker/timepicker.js.map +1 -1
  370. package/cjs/timepicker/timepicker.styles.js +1 -1
  371. package/cjs/timepicker/timepicker.styles.js.map +1 -1
  372. package/cjs/timepicker/timepicker.styles_lyizvq.css +2 -0
  373. package/cjs/timetable/timetable-header/timetable-header.styles_11gl1h4.css +2 -2
  374. package/cjs/timetable/timetable-row/row-bar.styles_1x0vrsz.css +1 -1
  375. package/cjs/timetable/timetable-row/row-cell.styles_y1dl5j.css +2 -2
  376. package/cjs/timetable/timetable-row/with-optional-popover.js +1 -1
  377. package/cjs/timetable/timetable-row/with-optional-popover.js.map +1 -1
  378. package/cjs/timetable/timetable.js +1 -1
  379. package/cjs/timetable/timetable.js.map +1 -1
  380. package/cjs/timetable/timetable.styles_7rp8kz.css +2 -2
  381. package/cjs/toast/toast.js.map +1 -1
  382. package/cjs/toast/toast.styles_1e0l60w.css +2 -2
  383. package/cjs/toggle/toggle-icon.styles_ba71y.css +2 -2
  384. package/cjs/toggle/toggle.js.map +1 -1
  385. package/cjs/toggle/toggle.styles_1t5qrye.css +2 -2
  386. package/cjs/typography/index.js.map +1 -1
  387. package/cjs/typography/typography-text.styles_1734x2k.css +2 -2
  388. package/cjs/typography/typography.styles.js +1 -1
  389. package/cjs/typography/typography.styles.js.map +1 -1
  390. package/cjs/typography/{typography.styles_1155j4c.css → typography.styles_1wd82dn.css} +2 -2
  391. package/cjs/uneditable-section/index.js.map +1 -1
  392. package/cjs/uneditable-section/section-item.styles_mwx8ht.css +2 -2
  393. package/cjs/uneditable-section/uneditable-section.js +1 -1
  394. package/cjs/uneditable-section/uneditable-section.js.map +1 -1
  395. package/cjs/uneditable-section/uneditable-section.styles_aj9zun.css +2 -2
  396. package/cjs/unit-number/unit-number-input.js.map +1 -1
  397. package/cjs/unit-number/unit-number-input.styles_8yizj.css +2 -2
  398. package/cjs/util/merge-refs.js.map +1 -1
  399. package/cjs/util/use-throttle.js +2 -0
  400. package/cjs/util/use-throttle.js.map +1 -0
  401. package/countdown-timer/countdown-timer.d.ts +6 -0
  402. package/countdown-timer/countdown-timer.js.map +1 -1
  403. package/countdown-timer/countdown-timer.styles_ipn1b0.css +2 -2
  404. package/countdown-timer/types.d.ts +55 -11
  405. package/dashed-border/dashed-border.d.ts +6 -0
  406. package/dashed-border/dashed-border.js.map +1 -1
  407. package/dashed-border/dashed-border.styles_zszoox.css +2 -2
  408. package/dashed-border/types.d.ts +27 -5
  409. package/data-table/data-table.d.ts +8 -0
  410. package/data-table/data-table.js +1 -1
  411. package/data-table/data-table.js.map +1 -1
  412. package/data-table/data-table.styles.d.ts +2 -1
  413. package/data-table/data-table.styles.js +1 -1
  414. package/data-table/data-table.styles.js.map +1 -1
  415. package/data-table/data-table.styles_rxganh.css +27 -0
  416. package/data-table/types.d.ts +58 -12
  417. package/date-input/date-input.d.ts +5 -0
  418. package/date-input/date-input.js.map +1 -1
  419. package/date-input/date-input.styles_1r5kcc7.css +1 -1
  420. package/date-input/types.d.ts +32 -16
  421. package/date-navigator/date-navigator.d.ts +6 -0
  422. package/date-navigator/date-navigator.js.map +1 -1
  423. package/date-navigator/date-navigator.styles_wokh56.css +2 -2
  424. package/date-navigator/types.d.ts +44 -7
  425. package/date-range-input/date-range-input.d.ts +4 -0
  426. package/date-range-input/date-range-input.js.map +1 -1
  427. package/date-range-input/date-range-input.styles_1s7ojnj.css +2 -2
  428. package/date-range-input/types.d.ts +50 -14
  429. package/divider/divider.d.ts +6 -0
  430. package/divider/divider.js.map +1 -1
  431. package/divider/divider.styles_1xpzh8p.css +2 -2
  432. package/divider/types.d.ts +27 -4
  433. package/drawer/drawer.d.ts +7 -0
  434. package/drawer/drawer.js.map +1 -1
  435. package/drawer/drawer.styles_94hx3y.css +2 -2
  436. package/drawer/types.d.ts +16 -4
  437. package/e-signature/e-signature-canvas.js +1 -1
  438. package/e-signature/e-signature-canvas.js.map +1 -1
  439. package/e-signature/e-signature.d.ts +5 -0
  440. package/e-signature/e-signature.js.map +1 -1
  441. package/e-signature/e-signature.styles_lukd9f.css +2 -2
  442. package/e-signature/types.d.ts +23 -1
  443. package/error-display/error-display.d.ts +7 -0
  444. package/error-display/error-display.js.map +1 -1
  445. package/error-display/error-display.styles_d3tql1.css +2 -2
  446. package/error-display/types.d.ts +36 -6
  447. package/external/dompurify/dist/purify.es.js +2 -2
  448. package/external/dompurify/dist/purify.es.js.map +1 -1
  449. package/external/lodash/_setCacheHas.js.map +1 -1
  450. package/external/lodash/lodash.js +1 -1
  451. package/external/lodash/lodash.js.map +1 -1
  452. package/feedback-rating/feedback-rating-stars-container.styles_dmi8z9.css +2 -2
  453. package/feedback-rating/feedback-rating.d.ts +6 -0
  454. package/feedback-rating/feedback-rating.js.map +1 -1
  455. package/feedback-rating/feedback-rating.styles_1kdklb6.css +2 -2
  456. package/feedback-rating/types.d.ts +29 -0
  457. package/file-download/file-download.d.ts +6 -0
  458. package/file-download/file-download.js.map +1 -1
  459. package/file-download/file-download.styles_iggk8q.css +2 -2
  460. package/file-download/file-list-card/file-list-card.styles.js +1 -1
  461. package/file-download/file-list-card/file-list-card.styles.js.map +1 -1
  462. package/{cjs/file-download/file-list-card/file-list-card.styles_oom8ii.css → file-download/file-list-card/file-list-card.styles_18j2gut.css} +3 -3
  463. package/file-download/types.d.ts +44 -11
  464. package/file-upload/dropzone.styles_1pllsau.css +2 -2
  465. package/file-upload/file-item-edit.d.ts +4 -1
  466. package/file-upload/file-item-edit.js +1 -1
  467. package/file-upload/file-item-edit.js.map +1 -1
  468. package/file-upload/file-item-edit.styles.d.ts +1 -0
  469. package/file-upload/file-item-edit.styles.js +1 -1
  470. package/file-upload/file-item-edit.styles.js.map +1 -1
  471. package/file-upload/{file-item-edit.styles_1qbpbxj.css → file-item-edit.styles_19bvztn.css} +6 -5
  472. package/file-upload/file-list/file-list.d.ts +3 -0
  473. package/file-upload/file-list/file-list.js +1 -1
  474. package/file-upload/file-list/file-list.js.map +1 -1
  475. package/file-upload/file-list/file-list.styles.js +1 -1
  476. package/file-upload/file-list/file-list.styles.js.map +1 -1
  477. package/file-upload/file-list/file-list.styles_1w7so98.css +3 -0
  478. package/file-upload/file-list-item/file-list-item-thumbnail.styles_1y4si19.css +2 -2
  479. package/file-upload/file-list-item/file-list-item.d.ts +3 -1
  480. package/file-upload/file-list-item/file-list-item.js +1 -1
  481. package/file-upload/file-list-item/file-list-item.js.map +1 -1
  482. package/file-upload/file-list-item/file-list-item.styles.d.ts +3 -0
  483. package/file-upload/file-list-item/file-list-item.styles.js +1 -1
  484. package/file-upload/file-list-item/file-list-item.styles.js.map +1 -1
  485. package/file-upload/file-list-item/file-list-item.styles_o8000f.css +17 -0
  486. package/file-upload/file-upload.d.ts +2 -1
  487. package/file-upload/file-upload.js +1 -1
  488. package/file-upload/file-upload.js.map +1 -1
  489. package/file-upload/file-upload.styles_9ffwcd.css +2 -2
  490. package/file-upload/types.d.ts +124 -20
  491. package/filter/addons/filter-item-checkbox.styles_7degw7.css +2 -2
  492. package/filter/filter-item-page.styles_17ewfrz.css +1 -1
  493. package/filter/filter-item.js.map +1 -1
  494. package/filter/filter-item.styles_cphjnj.css +2 -2
  495. package/filter/filter-modal.styles_qw3xlg.css +2 -2
  496. package/filter/filter-sidebar.styles_1otwpjl.css +2 -2
  497. package/filter/filter.d.ts +21 -0
  498. package/filter/filter.js.map +1 -1
  499. package/filter/filter.styles_1ykijwm.css +2 -2
  500. package/filter/types.d.ts +157 -21
  501. package/footer/footer-download-app.styles_1v1j2us.css +2 -2
  502. package/footer/footer-resource-addon.styles_1jepb1d.css +2 -2
  503. package/footer/footer.d.ts +8 -1
  504. package/footer/footer.js +1 -1
  505. package/footer/footer.js.map +1 -1
  506. package/footer/footer.styles_1msorhc.css +2 -2
  507. package/footer/types.d.ts +55 -4
  508. package/form/form-label-addon.js +1 -1
  509. package/form/form-label-addon.js.map +1 -1
  510. package/form/form-label-addon.styles_b00z8p.css +1 -1
  511. package/form/form-label.styles.js +1 -1
  512. package/form/form-label.styles.js.map +1 -1
  513. package/form/{form-label.styles_11r0652.css → form-label.styles_1nbe0bm.css} +2 -2
  514. package/form/form-textarea.styles_3p9qoy.css +2 -2
  515. package/form/form-wrapper.styles_199rslu.css +1 -1
  516. package/form/index.d.ts +65 -8
  517. package/form/index.js +1 -1
  518. package/form/index.js.map +1 -1
  519. package/form/types.d.ts +155 -6
  520. package/fullscreen-image-carousel/fullscreen-image-carousel.d.ts +7 -0
  521. package/fullscreen-image-carousel/fullscreen-image-carousel.js +1 -1
  522. package/fullscreen-image-carousel/fullscreen-image-carousel.js.map +1 -1
  523. package/fullscreen-image-carousel/fullscreen-image-carousel.styles_vc6y5c.css +2 -2
  524. package/fullscreen-image-carousel/stateful-image.styles_1xe8ypm.css +2 -2
  525. package/fullscreen-image-carousel/types.d.ts +91 -3
  526. package/histogram-slider/histogram-slider.d.ts +6 -0
  527. package/histogram-slider/histogram-slider.js.map +1 -1
  528. package/histogram-slider/histogram-slider.styles_wvd4w.css +2 -2
  529. package/histogram-slider/types.d.ts +63 -3
  530. package/image-button/image-button.d.ts +6 -0
  531. package/image-button/image-button.js.map +1 -1
  532. package/image-button/image-button.styles_6n1qsr.css +2 -2
  533. package/image-button/types.d.ts +11 -1
  534. package/index.d.ts +0 -1
  535. package/index.js +1 -1
  536. package/input/input.d.ts +6 -0
  537. package/input/input.js.map +1 -1
  538. package/input/input.styles_1cblor0.css +2 -2
  539. package/input/types.d.ts +38 -2
  540. package/input-group/input-group-list-addon.styles_17iuqtw.css +2 -2
  541. package/input-group/input-group.d.ts +7 -0
  542. package/input-group/input-group.js.map +1 -1
  543. package/input-group/input-group.styles_bqye6f.css +2 -2
  544. package/input-group/types.d.ts +84 -8
  545. package/input-multi-select/input-multi-select.d.ts +6 -0
  546. package/input-multi-select/input-multi-select.js.map +1 -1
  547. package/input-multi-select/types.d.ts +46 -5
  548. package/input-nested-multi-select/input-nested-multi-select.d.ts +8 -0
  549. package/input-nested-multi-select/input-nested-multi-select.js.map +1 -1
  550. package/input-nested-multi-select/types.d.ts +35 -5
  551. package/input-nested-select/input-nested-select.d.ts +9 -2
  552. package/input-nested-select/input-nested-select.js.map +1 -1
  553. package/input-nested-select/types.d.ts +77 -8
  554. package/input-range-select/input-range-select.d.ts +6 -0
  555. package/input-range-select/input-range-select.js.map +1 -1
  556. package/input-range-select/input-range-select.styles_adbrbm.css +2 -2
  557. package/input-range-select/types.d.ts +68 -1
  558. package/input-range-slider/input-range-slider.d.ts +7 -0
  559. package/input-range-slider/input-range-slider.js.map +1 -1
  560. package/input-range-slider/input-range-slider.styles_aljl2v.css +2 -2
  561. package/input-range-slider/types.d.ts +91 -6
  562. package/input-select/input-select.d.ts +5 -0
  563. package/input-select/input-select.js.map +1 -1
  564. package/input-select/types.d.ts +70 -14
  565. package/input-slider/input-slider.d.ts +6 -0
  566. package/input-slider/input-slider.js.map +1 -1
  567. package/input-slider/types.d.ts +21 -2
  568. package/input-textarea/textarea-counter.styles_1n3wsnv.css +1 -1
  569. package/input-textarea/textarea.d.ts +3 -0
  570. package/input-textarea/textarea.js.map +1 -1
  571. package/input-textarea/textarea.styles_22z4n3.css +2 -2
  572. package/input-textarea/types.d.ts +24 -1
  573. package/language-switcher/dropdown-panel.styles_1qsjf8d.css +2 -2
  574. package/language-switcher/dropdown-variant.styles_1vrdfky.css +2 -2
  575. package/language-switcher/language-switcher.d.ts +6 -0
  576. package/language-switcher/language-switcher.js.map +1 -1
  577. package/language-switcher/link-container-variant.styles_1iw6zux.css +2 -2
  578. package/language-switcher/types.d.ts +23 -0
  579. package/layout/col-div.styles_16o6mwx.css +1 -1
  580. package/layout/container.styles_v70ec6.css +2 -2
  581. package/layout/index.d.ts +16 -2
  582. package/layout/index.js +1 -1
  583. package/layout/index.js.map +1 -1
  584. package/layout/section.styles_hstcaf.css +1 -1
  585. package/layout/types.d.ts +61 -3
  586. package/link-list/internal-types.d.ts +57 -3
  587. package/link-list/link-list.d.ts +6 -0
  588. package/link-list/link-list.js.map +1 -1
  589. package/link-list/link-list.styles_m57vks.css +2 -2
  590. package/link-list/types.d.ts +3 -0
  591. package/local-nav/local-nav-dropdown/local-nav-dropdown.d.ts +11 -0
  592. package/local-nav/local-nav-dropdown/local-nav-dropdown.js.map +1 -1
  593. package/local-nav/local-nav-dropdown/local-nav-dropdown.styles_uhd4xl.css +2 -2
  594. package/local-nav/local-nav-menu/local-nav-menu.d.ts +6 -0
  595. package/local-nav/local-nav-menu/local-nav-menu.js.map +1 -1
  596. package/local-nav/local-nav-menu/local-nav-menu.styles_pq19dh.css +2 -2
  597. package/local-nav/types.d.ts +51 -0
  598. package/markup/markup.d.ts +6 -0
  599. package/markup/markup.js.map +1 -1
  600. package/markup/markup.style_1iu40x9.css +2 -2
  601. package/markup/types.d.ts +6 -2
  602. package/masked-input/masked-input.d.ts +6 -0
  603. package/masked-input/masked-input.js.map +1 -1
  604. package/masked-input/masked-input.styles_1cm388a.css +2 -2
  605. package/masked-input/types.d.ts +83 -8
  606. package/masthead/masthead.d.ts +6 -0
  607. package/masthead/masthead.js.map +1 -1
  608. package/masthead/masthead.styles_1huzon9.css +2 -2
  609. package/masthead/types.d.ts +9 -0
  610. package/menu/menu-content.styles_p7ijll.css +2 -2
  611. package/menu/menu-item.styles_liyed8.css +2 -2
  612. package/menu/menu-link.styles_hfxoez.css +2 -2
  613. package/menu/menu-section.styles_g7my4d.css +2 -2
  614. package/menu/menu.d.ts +27 -4
  615. package/menu/menu.js +1 -1
  616. package/menu/menu.js.map +1 -1
  617. package/menu/types.d.ts +32 -0
  618. package/modal/index.d.ts +13 -0
  619. package/modal/index.js.map +1 -1
  620. package/modal/modal-box.js +1 -1
  621. package/modal/modal-box.js.map +1 -1
  622. package/modal/modal-box.styles_y52cts.css +2 -2
  623. package/modal/modal.styles_1lbblx6.css +2 -2
  624. package/modal/types.d.ts +54 -7
  625. package/modal-v2/index.d.ts +1 -15
  626. package/modal-v2/index.js +1 -1
  627. package/modal-v2/index.js.map +1 -1
  628. package/modal-v2/modal-v2.d.ts +32 -1
  629. package/modal-v2/modal-v2.js +1 -1
  630. package/modal-v2/modal-v2.js.map +1 -1
  631. package/modal-v2/modal-v2.styles_a8gv5i.css +2 -2
  632. package/modal-v2/slots/card.js +1 -1
  633. package/modal-v2/slots/card.js.map +1 -1
  634. package/modal-v2/slots/slot-styles_13sd376.css +2 -2
  635. package/modal-v2/types.d.ts +75 -8
  636. package/navbar/brand.styles_zcgddp.css +1 -1
  637. package/navbar/drawer.js +1 -1
  638. package/navbar/drawer.js.map +1 -1
  639. package/navbar/drawer.styles_7hnxp5.css +2 -2
  640. package/navbar/menu.styles_gdpqc.css +2 -2
  641. package/navbar/navbar-action-buttons.styles_1vpm0nk.css +2 -2
  642. package/navbar/navbar-items.styles_1i3ltot.css +2 -2
  643. package/navbar/navbar.d.ts +7 -0
  644. package/navbar/navbar.js +1 -1
  645. package/navbar/navbar.js.map +1 -1
  646. package/navbar/navbar.styles_koy0c7.css +2 -2
  647. package/navbar/types.d.ts +200 -13
  648. package/notification-banner/notification-banner-hoc.d.ts +6 -0
  649. package/notification-banner/notification-banner-hoc.js.map +1 -1
  650. package/notification-banner/notification-banner.d.ts +7 -0
  651. package/notification-banner/notification-banner.js.map +1 -1
  652. package/notification-banner/notification-banner.styles_uxlysy.css +2 -2
  653. package/notification-banner/types.d.ts +57 -2
  654. package/otp-input/otp-input.d.ts +7 -0
  655. package/otp-input/otp-input.js.map +1 -1
  656. package/otp-input/otp-input.styles_5sbutl.css +2 -2
  657. package/otp-input/types.d.ts +54 -11
  658. package/otp-verification/contact-input-section.styles_odrjvt.css +2 -2
  659. package/otp-verification/internal-types.d.ts +22 -5
  660. package/otp-verification/otp-verification.d.ts +6 -0
  661. package/otp-verification/otp-verification.js.map +1 -1
  662. package/otp-verification/otp-verification.styles_dg9bm8.css +1 -1
  663. package/otp-verification/thumbnail/thumbnail.styles_shqylh.css +2 -2
  664. package/otp-verification/types.d.ts +125 -6
  665. package/otp-verification/verification-section.styles_x8jj.css +2 -2
  666. package/overlay/overlay.d.ts +7 -0
  667. package/overlay/overlay.js +1 -1
  668. package/overlay/overlay.js.map +1 -1
  669. package/overlay/overlay.styles_12wym18.css +2 -2
  670. package/overlay/types.d.ts +57 -15
  671. package/package.json +1 -7
  672. package/pagination/pagination.d.ts +5 -0
  673. package/pagination/pagination.js.map +1 -1
  674. package/pagination/pagination.styles_6bcgva.css +2 -2
  675. package/pagination/types.d.ts +48 -0
  676. package/phone-number-input/phone-number-input.d.ts +7 -0
  677. package/phone-number-input/phone-number-input.js.map +1 -1
  678. package/phone-number-input/types.d.ts +78 -13
  679. package/pill/pill.d.ts +6 -0
  680. package/pill/pill.js.map +1 -1
  681. package/pill/pill.styles_xwrniu.css +2 -2
  682. package/pill/types.d.ts +19 -0
  683. package/popover/popover-inline/popover-inline.d.ts +5 -0
  684. package/popover/popover-inline/popover-inline.js.map +1 -1
  685. package/popover/popover-inline/popover-inline.styles_bkopnt.css +2 -2
  686. package/popover/popover-trigger.d.ts +6 -0
  687. package/popover/popover-trigger.js.map +1 -1
  688. package/popover/popover-trigger.styles_8zokig.css +1 -1
  689. package/popover/popover.d.ts +6 -0
  690. package/popover/popover.js +1 -1
  691. package/popover/popover.js.map +1 -1
  692. package/popover/popover.styles_ujnf0h.css +2 -2
  693. package/popover/types.d.ts +150 -3
  694. package/predictive-text-input/predictive-text-input.d.ts +6 -0
  695. package/predictive-text-input/predictive-text-input.js.map +1 -1
  696. package/predictive-text-input/types.d.ts +65 -11
  697. package/progress-indicator/progress-indicator.d.ts +7 -0
  698. package/progress-indicator/progress-indicator.js.map +1 -1
  699. package/progress-indicator/progress-indicator.styles_1c038s4.css +2 -2
  700. package/progress-indicator/types.d.ts +18 -0
  701. package/radio-button/radio-button.d.ts +5 -0
  702. package/radio-button/radio-button.js.map +1 -1
  703. package/radio-button/radio-button.styles_1c4v6v.css +2 -2
  704. package/radio-button/types.d.ts +11 -0
  705. package/schedule/internal-types.d.ts +18 -0
  706. package/schedule/schedule-day-view/schedule-day-view.styles_8ti149.css +2 -2
  707. package/schedule/schedule-day-view/types.d.ts +2 -1
  708. package/schedule/schedule-header/schedule-header.js +1 -1
  709. package/schedule/schedule-header/schedule-header.js.map +1 -1
  710. package/schedule/schedule-header/schedule-header.styles_1n2u5vj.css +2 -2
  711. package/schedule/schedule-week-view/schedule-week-view.styles_x7x50m.css +2 -2
  712. package/schedule/schedule-week-view/time-cell.styles_1sorjz8.css +2 -2
  713. package/schedule/schedule-week-view/types.d.ts +2 -1
  714. package/schedule/schedule.d.ts +3 -0
  715. package/schedule/schedule.js.map +1 -1
  716. package/schedule/schedule.styles_fdy5a1.css +2 -2
  717. package/schedule/shared/with-optional-popover.js +1 -1
  718. package/schedule/shared/with-optional-popover.js.map +1 -1
  719. package/schedule/shared/with-optional-popover.styles_7mv3p2.css +1 -1
  720. package/schedule/time-indicator/time-indicator.styles_1eaxyes.css +2 -2
  721. package/schedule/types.d.ts +129 -10
  722. package/select-histogram/select-histogram.d.ts +5 -0
  723. package/select-histogram/select-histogram.js.map +1 -1
  724. package/select-histogram/select-histogram.styles_n260dy.css +2 -2
  725. package/select-histogram/types.d.ts +57 -4
  726. package/shared/accessibility/index_13g9vp.css +1 -1
  727. package/shared/clickable-icon/clickable-icon.styles_1v2imml.css +2 -2
  728. package/shared/component-loading-spinner/component-loading-spinner.styles_15eq02i.css +2 -2
  729. package/shared/dropdown-list/dropdown-label.styles_mloii0.css +2 -2
  730. package/shared/dropdown-list/dropdown-list.styles_konwm.css +2 -2
  731. package/shared/dropdown-list/dropdown-search.styles_1hc1gkh.css +2 -2
  732. package/shared/dropdown-list/expandable-element.styles_rkkvqr.css +2 -2
  733. package/shared/dropdown-list/nested-dropdown-list.styles_wdhxoe.css +2 -2
  734. package/shared/dropdown-list/types.d.ts +52 -19
  735. package/shared/dropdown-wrapper/dropdown-wrapper.styles_15hwwoj.css +2 -2
  736. package/shared/dropdown-wrapper/types.d.ts +6 -0
  737. package/shared/fade-wrapper/fade-wrapper.styles_16iug7l.css +2 -2
  738. package/shared/image-placeholder/image-placeholder.styles_44nwil.css +1 -1
  739. package/shared/input-wrapper/input-wrapper.styles_je6maw.css +2 -2
  740. package/shared/internal-calendar/calendar-dropdown.styles_wybjai.css +1 -1
  741. package/shared/internal-calendar/calendar-manager.js +1 -1
  742. package/shared/internal-calendar/calendar-manager.js.map +1 -1
  743. package/shared/internal-calendar/calendar-manager.styles.js +1 -1
  744. package/shared/internal-calendar/calendar-manager.styles.js.map +1 -1
  745. package/shared/internal-calendar/{calendar-manager.styles_1iuq5zw.css → calendar-manager.styles_1njwkj2.css} +3 -3
  746. package/shared/internal-calendar/day-cell/day-cell.styles_1t5oqc1.css +2 -2
  747. package/shared/internal-calendar/internal-calendar-month.styles_14oh57f.css +2 -2
  748. package/shared/internal-calendar/internal-calendar-year.styles_therlc.css +2 -2
  749. package/shared/internal-calendar/internal-calendar.styles_gnc3eq.css +1 -1
  750. package/shared/internal-calendar/standard/standard-calendar-day-view.styles_1bw26au.css +2 -2
  751. package/shared/progress-bar/progress-bar.styles_125ri7a.css +1 -1
  752. package/shared/range-input-inner-container/range-input-inner-container.styles_1v61utg.css +2 -2
  753. package/shared/standalone-date-input/standalone-date-input.styles_157qo89.css +2 -2
  754. package/shared/time-slot/time-slot.styles_18s0to7.css +2 -2
  755. package/shared/timepicker-dropdown/timepicker-dropdown.styles_119l6k6.css +2 -2
  756. package/sidenav/sidenav-drawer-item.styles_1ljnyx2.css +2 -2
  757. package/sidenav/sidenav-drawer-subitem.styles_2y58kf.css +1 -1
  758. package/sidenav/sidenav-group.styles_1x604sw.css +2 -2
  759. package/sidenav/sidenav-item.styles_lqw3kh.css +2 -2
  760. package/sidenav/sidenav.d.ts +10 -0
  761. package/sidenav/sidenav.js.map +1 -1
  762. package/sidenav/sidenav.styles_1vxezie.css +2 -2
  763. package/sidenav/types.d.ts +70 -21
  764. package/singpass-button/singpass-button.d.ts +6 -0
  765. package/singpass-button/singpass-button.js.map +1 -1
  766. package/singpass-button/singpass-button.styles_1miyex3.css +2 -2
  767. package/singpass-button/types.d.ts +29 -2
  768. package/smart-app-banner/smart-app-banner.d.ts +5 -0
  769. package/smart-app-banner/smart-app-banner.js.map +1 -1
  770. package/smart-app-banner/smart-app-banner.styles_15u6yv4.css +2 -2
  771. package/smart-app-banner/types.d.ts +54 -0
  772. package/tab/tab-link-chain.styles_49got4.css +2 -2
  773. package/tab/tab.d.ts +7 -0
  774. package/tab/tab.js.map +1 -1
  775. package/tab/tab.styles_1najffw.css +1 -1
  776. package/tab/types.d.ts +55 -6
  777. package/table/table.d.ts +21 -0
  778. package/table/table.js.map +1 -1
  779. package/table/table.styles.js +1 -1
  780. package/table/table.styles.js.map +1 -1
  781. package/table/{table.styles_1af5ipv.css → table.styles_1vjx31g.css} +2 -2
  782. package/tag/tag.d.ts +5 -0
  783. package/tag/tag.js.map +1 -1
  784. package/tag/tag.style_d98c53.css +2 -2
  785. package/tag/types.d.ts +24 -0
  786. package/text-list/index.d.ts +17 -0
  787. package/text-list/index.js.map +1 -1
  788. package/text-list/text-list.styles_w3fvyt.css +2 -2
  789. package/text-list/types.d.ts +33 -4
  790. package/theme/styles/a11y-playground.css +3 -0
  791. package/theme/styles/bookingsg.css +7 -4
  792. package/theme/styles/careercompass.css +4 -1
  793. package/theme/styles/ccube.css +3 -0
  794. package/theme/styles/default.css +9 -5
  795. package/theme/styles/imda.css +3 -0
  796. package/theme/styles/lifesg.css +3 -0
  797. package/theme/styles/mylegacy.css +7 -4
  798. package/theme/styles/oneservice.css +52 -0
  799. package/theme/styles/pa.css +3 -0
  800. package/theme/styles/rbs.css +3 -0
  801. package/theme/styles/sgw-digital-lobby.css +5 -2
  802. package/theme/styles/smgs.css +3 -0
  803. package/theme/styles/spf.css +3 -0
  804. package/theme/styles/supportgowhere.css +3 -0
  805. package/theme/theme-provider/breakpoint.d.ts +0 -1
  806. package/theme/theme-provider/breakpoint.js +1 -1
  807. package/theme/theme-provider/breakpoint.js.map +1 -1
  808. package/theme/theme-provider/hooks.d.ts +16 -0
  809. package/theme/theme-provider/hooks.js.map +1 -1
  810. package/theme/theme-provider/index.d.ts +7 -0
  811. package/theme/theme-provider/index.js.map +1 -1
  812. package/theme/theme-provider/types.d.ts +14 -0
  813. package/theme/tokens/border.d.ts +3 -0
  814. package/theme/tokens/border.js.map +1 -1
  815. package/theme/tokens/breakpoint.d.ts +3 -0
  816. package/theme/tokens/breakpoint.js.map +1 -1
  817. package/theme/tokens/colour.d.ts +3 -0
  818. package/theme/tokens/colour.js.map +1 -1
  819. package/theme/tokens/component.d.ts +1 -0
  820. package/theme/tokens/component.js.map +1 -1
  821. package/theme/tokens/font.d.ts +2 -0
  822. package/theme/tokens/font.js.map +1 -1
  823. package/theme/tokens/media-query.d.ts +1 -0
  824. package/theme/tokens/media-query.js.map +1 -1
  825. package/theme/tokens/motion.d.ts +1 -0
  826. package/theme/tokens/motion.js.map +1 -1
  827. package/theme/tokens/radius.d.ts +1 -0
  828. package/theme/tokens/radius.js.map +1 -1
  829. package/theme/tokens/shadow.d.ts +1 -0
  830. package/theme/tokens/shadow.js.map +1 -1
  831. package/theme/tokens/spacing.d.ts +1 -0
  832. package/theme/tokens/spacing.js.map +1 -1
  833. package/theme/types.d.ts +24 -4
  834. package/theme/types.js +1 -1
  835. package/theme/types.js.map +1 -1
  836. package/theme/utils/css-variable.d.ts +10 -2
  837. package/theme/utils/css-variable.js.map +1 -1
  838. package/theme/utils/font.d.ts +2 -1
  839. package/theme/utils/font.js.map +1 -1
  840. package/theme/utils/index.d.ts +1 -0
  841. package/theme/utils/use-apply-styles.d.ts +8 -2
  842. package/theme/utils/use-apply-styles.js +1 -1
  843. package/theme/utils/use-apply-styles.js.map +1 -1
  844. package/theme/utils/use-design-token-override.d.ts +19 -0
  845. package/theme/utils/use-design-token-override.js +2 -0
  846. package/theme/utils/use-design-token-override.js.map +1 -0
  847. package/theme/utils/use-design-token.d.ts +9 -0
  848. package/theme/utils/use-design-token.js.map +1 -1
  849. package/theme/utils/use-media-query.d.ts +41 -3
  850. package/theme/utils/use-media-query.js.map +1 -1
  851. package/time-range-picker/combobox-picker/combobox-picker.js +1 -1
  852. package/time-range-picker/combobox-picker/combobox-picker.js.map +1 -1
  853. package/time-range-picker/combobox-picker/combobox-picker.styles_7i9vso.css +1 -1
  854. package/time-range-picker/common.styles.d.ts +1 -0
  855. package/time-range-picker/common.styles.js +1 -1
  856. package/time-range-picker/common.styles.js.map +1 -1
  857. package/time-range-picker/{common.styles_1qwp4xa.css → common.styles_cnkkax.css} +2 -1
  858. package/time-range-picker/dial-picker/dial-picker.js +1 -1
  859. package/time-range-picker/dial-picker/dial-picker.js.map +1 -1
  860. package/time-range-picker/time-range-picker.d.ts +5 -0
  861. package/time-range-picker/time-range-picker.js.map +1 -1
  862. package/time-range-picker/types.d.ts +85 -25
  863. package/time-slot-bar/internal-types.d.ts +1 -0
  864. package/time-slot-bar/time-slot-bar.d.ts +7 -0
  865. package/time-slot-bar/time-slot-bar.js.map +1 -1
  866. package/time-slot-bar/time-slot-bar.styles_wigbyd.css +2 -2
  867. package/time-slot-bar/types.d.ts +112 -20
  868. package/time-slot-bar-week/time-slot-bar-week-days.styles_evdvs9.css +2 -2
  869. package/time-slot-bar-week/time-slot-bar-week.d.ts +8 -0
  870. package/time-slot-bar-week/time-slot-bar-week.js.map +1 -1
  871. package/time-slot-bar-week/time-slot-bar-week.styles_11ybf42.css +1 -1
  872. package/time-slot-bar-week/types.d.ts +74 -13
  873. package/time-slot-week-view/time-slot-week-days.styles_1h21vyw.css +2 -2
  874. package/time-slot-week-view/time-slot-week-view.d.ts +7 -0
  875. package/time-slot-week-view/time-slot-week-view.js.map +1 -1
  876. package/time-slot-week-view/time-slot-week-view.styles_gqgsw2.css +1 -1
  877. package/time-slot-week-view/types.d.ts +53 -10
  878. package/timeline/timeline.d.ts +6 -0
  879. package/timeline/timeline.js.map +1 -1
  880. package/timeline/timeline.styles_1jxzik4.css +2 -2
  881. package/timeline/types.d.ts +58 -4
  882. package/timepicker/timepicker.d.ts +5 -0
  883. package/timepicker/timepicker.js +1 -1
  884. package/timepicker/timepicker.js.map +1 -1
  885. package/timepicker/timepicker.styles.d.ts +1 -0
  886. package/timepicker/timepicker.styles.js +1 -1
  887. package/timepicker/timepicker.styles.js.map +1 -1
  888. package/timepicker/timepicker.styles_lyizvq.css +2 -0
  889. package/timepicker/types.d.ts +49 -14
  890. package/timetable/timetable-header/timetable-header.styles_11gl1h4.css +2 -2
  891. package/timetable/timetable-row/row-bar.styles_1x0vrsz.css +1 -1
  892. package/timetable/timetable-row/row-cell.styles_y1dl5j.css +2 -2
  893. package/timetable/timetable-row/with-optional-popover.js +1 -1
  894. package/timetable/timetable-row/with-optional-popover.js.map +1 -1
  895. package/timetable/timetable.d.ts +6 -0
  896. package/timetable/timetable.js +1 -1
  897. package/timetable/timetable.js.map +1 -1
  898. package/timetable/timetable.styles_7rp8kz.css +2 -2
  899. package/timetable/types.d.ts +175 -50
  900. package/toast/toast.d.ts +6 -0
  901. package/toast/toast.js.map +1 -1
  902. package/toast/toast.styles_1e0l60w.css +2 -2
  903. package/toast/types.d.ts +42 -8
  904. package/toggle/toggle-icon.styles_ba71y.css +2 -2
  905. package/toggle/toggle.d.ts +6 -0
  906. package/toggle/toggle.js.map +1 -1
  907. package/toggle/toggle.styles_1t5qrye.css +2 -2
  908. package/toggle/types.d.ts +95 -17
  909. package/typography/index.d.ts +29 -0
  910. package/typography/index.js.map +1 -1
  911. package/typography/types.d.ts +51 -8
  912. package/typography/typography-text.styles_1734x2k.css +2 -2
  913. package/typography/typography.styles.js +1 -1
  914. package/typography/typography.styles.js.map +1 -1
  915. package/typography/{typography.styles_1155j4c.css → typography.styles_1wd82dn.css} +2 -2
  916. package/uneditable-section/index.d.ts +16 -1
  917. package/uneditable-section/index.js.map +1 -1
  918. package/uneditable-section/section-item.styles_mwx8ht.css +2 -2
  919. package/uneditable-section/types.d.ts +66 -23
  920. package/uneditable-section/uneditable-section.d.ts +2 -1
  921. package/uneditable-section/uneditable-section.js +1 -1
  922. package/uneditable-section/uneditable-section.js.map +1 -1
  923. package/uneditable-section/uneditable-section.styles_aj9zun.css +2 -2
  924. package/unit-number/types.d.ts +30 -4
  925. package/unit-number/unit-number-input.d.ts +6 -0
  926. package/unit-number/unit-number-input.js.map +1 -1
  927. package/unit-number/unit-number-input.styles_8yizj.css +2 -2
  928. package/util/index.d.ts +1 -0
  929. package/util/merge-refs.d.ts +1 -1
  930. package/util/merge-refs.js.map +1 -1
  931. package/util/use-throttle.d.ts +1 -0
  932. package/util/use-throttle.js +2 -0
  933. package/util/use-throttle.js.map +1 -0
  934. package/cjs/data-table/data-table.styles_1iqq1g7.css +0 -26
  935. package/cjs/example/example.js +0 -2
  936. package/cjs/example/example.js.map +0 -1
  937. package/cjs/example/example_r47nvz.css +0 -1
  938. package/cjs/example/index.js +0 -2
  939. package/cjs/example/index.js.map +0 -1
  940. package/cjs/file-upload/file-list/file-list.styles_1ea12kj.css +0 -3
  941. package/cjs/file-upload/file-list-item/file-list-item.styles_y7my2m.css +0 -14
  942. package/cjs/timepicker/timepicker.styles_1jm33yw.css +0 -1
  943. package/data-table/data-table.styles_1iqq1g7.css +0 -26
  944. package/example/example.d.ts +0 -2
  945. package/example/example.js +0 -2
  946. package/example/example.js.map +0 -1
  947. package/example/example_r47nvz.css +0 -1
  948. package/example/index.d.ts +0 -1
  949. package/example/index.js +0 -2
  950. package/example/index.js.map +0 -1
  951. package/example/types.d.ts +0 -3
  952. package/file-upload/file-list/file-list.styles_1ea12kj.css +0 -3
  953. package/file-upload/file-list-item/file-list-item.styles_y7my2m.css +0 -14
  954. package/timepicker/timepicker.styles_1jm33yw.css +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"navbar.js","sources":["../../src/navbar/navbar.tsx"],"sourcesContent":["import { MenuIcon } from \"@lifesg/react-icons/menu\";\nimport clsx from \"clsx\";\nimport type React from \"react\";\nimport {\n forwardRef,\n useContext,\n useEffect,\n useImperativeHandle,\n useRef,\n useState,\n} from \"react\";\n\nimport { Layout } from \"../layout\";\nimport { Masthead } from \"../masthead/masthead\";\nimport { Overlay } from \"../overlay/overlay\";\nimport { ClickableIcon } from \"../shared/clickable-icon\";\nimport {\n Breakpoint,\n parsePxOrRemValue,\n useResolvedBreakpointToken,\n} from \"../theme\";\nimport { ThemeContext } from \"../theme/theme-provider/context\";\nimport { Brand } from \"./brand\";\nimport { Drawer } from \"./drawer\";\nimport * as styles from \"./navbar.styles\";\nimport { NavbarActionButtons } from \"./navbar-action-buttons\";\nimport { NavbarHelper } from \"./navbar-helper\";\nimport { NavbarItems } from \"./navbar-items\";\nimport { getDefaultResourceLogo } from \"./navbar-logo-data\";\nimport type {\n BrandType,\n DrawerDismissalMethod,\n NavbarActionButtonsProps,\n NavbarButtonProps,\n NavbarDrawerApi,\n NavbarDrawerHandle,\n NavbarProps,\n NavItemCommonProps,\n NavItemProps,\n} from \"./types\";\n\nconst Component = <T,>(\n {\n items,\n className,\n id,\n selectedId,\n compress = false,\n fixed = true,\n resources,\n hideNavElements = false,\n hideNavBranding = false,\n hideLinkIndicator = false,\n drawerDismissalExclusions: blockDrawerDismissalMethods = [],\n actionButtons,\n onItemClick,\n onActionButtonClick,\n onBrandClick,\n masthead = true,\n layout = \"default\",\n headerLabel = \"Main navigation menu\",\n drawerLabel,\n ...otherProps\n }: NavbarProps<T>,\n ref: React.Ref<NavbarDrawerHandle>\n) => {\n // =============================================================================\n // CONST, STATE, REFS\n // =============================================================================\n const [showDrawer, setShowDrawer] = useState<boolean>(false);\n const [showOverlay, setShowOverlay] = useState<boolean>(false);\n const mobileMenuRef = useRef<HTMLButtonElement>(null);\n const isStretch = layout === \"stretch\";\n const elementRef = useRef<HTMLDivElement>(null);\n const theme = useContext(ThemeContext);\n const defaultResource = getDefaultResourceLogo(theme?.theme);\n const tabletWidth = parsePxOrRemValue(\n useResolvedBreakpointToken(Breakpoint[\"lg-max\"])\n );\n\n const primary = resources?.primary || defaultResource.primary;\n const secondary = resources?.secondary;\n\n useImperativeHandle(\n ref,\n () =>\n Object.assign<HTMLDivElement, NavbarDrawerApi>(\n elementRef.current!,\n {\n dismissDrawer: () => {\n dismissDrawer();\n },\n }\n ),\n [showDrawer]\n );\n\n // =============================================================================\n // EFFECTS\n // =============================================================================\n useEffect(() => {\n handleResize();\n window.addEventListener(\"resize\", handleResize);\n\n return () => {\n window.removeEventListener(\"resize\", handleResize);\n };\n }, []);\n\n // =============================================================================\n // HELPER FUNCTIONS\n // =============================================================================\n const dismissDrawer = () => {\n setShowDrawer(false);\n setTimeout(() => {\n setShowOverlay(false);\n }, 550); // For drawer animation to complete + buffer\n };\n\n const shouldDismissDrawer = (dismissalMethod: DrawerDismissalMethod) => {\n return (\n showDrawer &&\n blockDrawerDismissalMethods.indexOf(dismissalMethod) === -1\n );\n };\n\n const hasCollapsibleActionButtons = (\n actionButtons: NavbarActionButtonsProps\n ) => {\n const drawerActionButtons =\n actionButtons.mobile || actionButtons.desktop;\n if (drawerActionButtons) {\n return (\n drawerActionButtons.length &&\n drawerActionButtons.some(\n (actionButton) => !actionButton.uncollapsible\n )\n );\n }\n\n return false;\n };\n\n // =============================================================================\n // EVENT HANDLER\n // =============================================================================\n const handleResize = () => {\n if (window.innerWidth <= tabletWidth && showDrawer) {\n dismissDrawer();\n }\n };\n\n const handleBrandClick = (\n _event: React.MouseEvent<HTMLAnchorElement>,\n type: BrandType\n ) => {\n if (onBrandClick) {\n onBrandClick(type);\n }\n\n if (shouldDismissDrawer(\"brand-click\")) {\n dismissDrawer();\n }\n };\n\n const handleNavItemClick = <K extends T>(\n event: React.MouseEvent<HTMLAnchorElement>,\n item: NavItemProps<K> | NavItemCommonProps<K>\n ) => {\n if (NavbarHelper.isNavItemCommon(item) && item.onClick) {\n item.onClick(event);\n } else if (onItemClick) {\n event.preventDefault();\n onItemClick(item);\n }\n\n if (\n NavbarHelper.isNavItemLink(item) &&\n !item.subMenu &&\n shouldDismissDrawer(\"item-click\")\n ) {\n dismissDrawer();\n }\n };\n\n const handleActionButtonClick = (\n event: React.MouseEvent<HTMLButtonElement> | React.MouseEvent<Element>,\n actionButton: NavbarButtonProps\n ) => {\n if (\n (actionButton.type === \"button\" ||\n actionButton.type === \"download\") &&\n actionButton.args?.onClick\n ) {\n actionButton.args.onClick(\n event as React.MouseEvent<HTMLButtonElement>\n );\n } else if (onActionButtonClick) {\n event.preventDefault();\n onActionButtonClick(actionButton);\n }\n\n if (shouldDismissDrawer(\"item-click\")) {\n dismissDrawer();\n }\n };\n\n const handleMobileMenuButtonClick = () => {\n setShowDrawer(true);\n setShowOverlay(true);\n };\n\n const handleDrawerClose = () => {\n if (shouldDismissDrawer(\"close-button-click\")) {\n dismissDrawer();\n }\n };\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n\n const renderDrawer = () => (\n <Overlay\n show={showOverlay}\n enableOverlayClick\n onOverlayClick={handleDrawerClose}\n >\n <Drawer\n show={showDrawer}\n resources={{ primary, secondary }}\n onClose={handleDrawerClose}\n onBrandClick={handleBrandClick}\n actionButtons={actionButtons}\n hideNavBranding={hideNavBranding}\n mobileMenuRef={mobileMenuRef}\n drawerLabel={drawerLabel}\n >\n <NavbarItems\n items={items.mobile || items.desktop}\n onItemClick={handleNavItemClick}\n selectedId={selectedId}\n mobile\n hideLinkIndicator={hideLinkIndicator}\n />\n <NavbarActionButtons\n actionButtons={actionButtons}\n onActionButtonClick={handleActionButtonClick}\n mobile\n />\n </Drawer>\n </Overlay>\n );\n\n const renderBrand = () => (\n <div\n className={clsx(\n styles.navBrandContainer,\n compress\n ? styles.navBrandContainerCompressed\n : styles.navBrandContainerFull,\n styles.navBrandContainerResponsive\n )}\n data-id=\"brand-container\"\n >\n {primary && (\n <Brand\n resources={primary}\n onClick={handleBrandClick}\n data-id=\"brand-primary\"\n data-testid=\"main__brand\"\n type=\"primary\"\n />\n )}\n {secondary && (\n <>\n <div\n className={clsx(\n styles.navSeparator,\n compress\n ? styles.navSeparatorCompressed\n : styles.navSeparatorFull,\n styles.navSeparatorResponsive\n )}\n />\n <Brand\n resources={secondary}\n onClick={handleBrandClick}\n data-id=\"brand-secondary\"\n data-testid=\"main__brand-secondary\"\n type=\"secondary\"\n />\n </>\n )}\n </div>\n );\n\n const renderMobileMenuButton = () => {\n const drawerItems = items.mobile || items.desktop;\n if (\n (drawerItems && drawerItems.length > 0) ||\n (actionButtons && hasCollapsibleActionButtons(actionButtons))\n ) {\n return (\n <ClickableIcon\n ref={mobileMenuRef}\n className={styles.mobileMenuButton}\n aria-label={showDrawer ? \"Close nav menu\" : \"Open nav menu\"}\n aria-expanded={showDrawer}\n data-testid=\"button__mobile-menu\"\n onClick={handleMobileMenuButtonClick}\n focusHighlight={false}\n >\n <MenuIcon className={styles.mobileMenuIcon} />\n </ClickableIcon>\n );\n }\n\n return null;\n };\n\n const renderNavbar = () => {\n return (\n <Layout.Content stretch={isStretch}>\n <nav\n className={clsx(\n styles.nav,\n compress && styles.navCompressed,\n theme?.mode === \"dark\" && styles.navDark\n )}\n aria-label={headerLabel}\n >\n {!hideNavBranding && renderBrand()}\n {!hideNavElements && (\n <div\n className={clsx(\n styles.navElementsContainer,\n !hideNavBranding &&\n styles.navElementsContainerWithBranding\n )}\n >\n <NavbarItems\n items={items.desktop}\n onItemClick={handleNavItemClick}\n selectedId={selectedId}\n hideNavBranding={hideNavBranding}\n hideLinkIndicator={hideLinkIndicator}\n />\n <NavbarActionButtons\n actionButtons={actionButtons}\n onActionButtonClick={handleActionButtonClick}\n />\n {renderMobileMenuButton()}\n </div>\n )}\n </nav>\n\n {!hideNavElements && renderDrawer()}\n </Layout.Content>\n );\n };\n\n return (\n <div\n ref={elementRef}\n className={clsx(\n styles.wrapper,\n fixed ? styles.wrapperFixed : styles.wrapperRelative,\n theme?.mode === \"dark\"\n ? styles.wrapperDark\n : styles.wrapperLight,\n className\n )}\n id={id || \"navbar-wrapper\"}\n data-testid={otherProps[\"data-testid\"] || \"navbar-wrapper\"}\n >\n {masthead && <Masthead stretch={isStretch} />}\n {renderNavbar()}\n </div>\n );\n};\n\nexport const Navbar = forwardRef(Component);\n"],"names":["Navbar","forwardRef","_a","ref","items","className","id","selectedId","compress","fixed","resources","hideNavElements","hideNavBranding","hideLinkIndicator","drawerDismissalExclusions","blockDrawerDismissalMethods","actionButtons","onItemClick","onActionButtonClick","onBrandClick","masthead","layout","headerLabel","drawerLabel","otherProps","__rest","showDrawer","setShowDrawer","useState","showOverlay","setShowOverlay","mobileMenuRef","useRef","isStretch","elementRef","theme","useContext","ThemeContext","defaultResource","getDefaultResourceLogo","tabletWidth","parsePxOrRemValue","useResolvedBreakpointToken","Breakpoint","primary","secondary","useImperativeHandle","Object","assign","current","dismissDrawer","useEffect","handleResize","window","addEventListener","removeEventListener","setTimeout","shouldDismissDrawer","dismissalMethod","indexOf","innerWidth","handleBrandClick","_event","type","handleNavItemClick","event","item","NavbarHelper","isNavItemCommon","onClick","preventDefault","isNavItemLink","subMenu","handleActionButtonClick","actionButton","args","handleMobileMenuButtonClick","handleDrawerClose","renderMobileMenuButton","drawerItems","mobile","desktop","length","drawerActionButtons","some","uncollapsible","hasCollapsibleActionButtons","_jsx","ClickableIcon","styles.mobileMenuButton","focusHighlight","children","MenuIcon","styles.mobileMenuIcon","_jsxs","clsx","styles.wrapper","styles.wrapperFixed","styles.wrapperRelative","mode","styles.wrapperDark","styles.wrapperLight","Masthead","stretch","Layout","Content","styles.nav","styles.navCompressed","styles.navDark","styles.navBrandContainer","styles.navBrandContainerCompressed","styles.navBrandContainerFull","styles.navBrandContainerResponsive","Brand","_Fragment","styles.navSeparator","styles.navSeparatorCompressed","styles.navSeparatorFull","styles.navSeparatorResponsive","styles.navElementsContainer","styles.navElementsContainerWithBranding","NavbarItems","NavbarActionButtons","Overlay","show","enableOverlayClick","onOverlayClick","Drawer","onClose"],"mappings":"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"}
1
+ {"version":3,"file":"navbar.js","sources":["../../src/navbar/navbar.tsx"],"sourcesContent":["import { MenuIcon } from \"@lifesg/react-icons/menu\";\nimport clsx from \"clsx\";\nimport type React from \"react\";\nimport {\n forwardRef,\n useContext,\n useEffect,\n useImperativeHandle,\n useRef,\n useState,\n} from \"react\";\n\nimport { Layout } from \"../layout\";\nimport { Masthead } from \"../masthead/masthead\";\nimport { Overlay } from \"../overlay/overlay\";\nimport { ClickableIcon } from \"../shared/clickable-icon\";\nimport {\n Breakpoint,\n parsePxOrRemValue,\n useResolvedBreakpointToken,\n} from \"../theme\";\nimport { ThemeContext } from \"../theme/theme-provider/context\";\nimport { Brand } from \"./brand\";\nimport { Drawer } from \"./drawer\";\nimport * as styles from \"./navbar.styles\";\nimport { NavbarActionButtons } from \"./navbar-action-buttons\";\nimport { NavbarHelper } from \"./navbar-helper\";\nimport { NavbarItems } from \"./navbar-items\";\nimport { getDefaultResourceLogo } from \"./navbar-logo-data\";\nimport type {\n BrandType,\n DrawerDismissalMethod,\n NavbarActionButtonsProps,\n NavbarButtonProps,\n NavbarDrawerApi,\n NavbarDrawerHandle,\n NavbarProps,\n NavItemCommonProps,\n NavItemProps,\n} from \"./types\";\n\nconst Component = <T,>(\n {\n items,\n className,\n id,\n selectedId,\n compress = false,\n fixed = true,\n resources,\n hideNavElements = false,\n hideNavBranding = false,\n hideLinkIndicator = false,\n drawerDismissalExclusions: blockDrawerDismissalMethods = [],\n actionButtons,\n onItemClick,\n onActionButtonClick,\n onBrandClick,\n masthead = true,\n layout = \"default\",\n headerLabel = \"Main navigation menu\",\n drawerLabel,\n ...otherProps\n }: NavbarProps<T>,\n ref: React.Ref<NavbarDrawerHandle>\n) => {\n // =============================================================================\n // CONST, STATE, REFS\n // =============================================================================\n const [showDrawer, setShowDrawer] = useState<boolean>(false);\n const [showOverlay, setShowOverlay] = useState<boolean>(false);\n const mobileMenuRef = useRef<HTMLButtonElement>(null);\n const isStretch = layout === \"stretch\";\n const elementRef = useRef<HTMLDivElement>(null);\n const theme = useContext(ThemeContext);\n const defaultResource = getDefaultResourceLogo(theme?.theme);\n const tabletWidth = parsePxOrRemValue(\n useResolvedBreakpointToken(Breakpoint[\"lg-max\"])\n );\n\n const primary = resources?.primary || defaultResource.primary;\n const secondary = resources?.secondary;\n\n useImperativeHandle(\n ref,\n () =>\n Object.assign<HTMLDivElement, NavbarDrawerApi>(\n elementRef.current!,\n {\n dismissDrawer: () => {\n dismissDrawer();\n },\n }\n ),\n [showDrawer]\n );\n\n // =============================================================================\n // EFFECTS\n // =============================================================================\n useEffect(() => {\n handleResize();\n window.addEventListener(\"resize\", handleResize);\n\n return () => {\n window.removeEventListener(\"resize\", handleResize);\n };\n }, []);\n\n // =============================================================================\n // HELPER FUNCTIONS\n // =============================================================================\n const dismissDrawer = () => {\n setShowDrawer(false);\n setTimeout(() => {\n setShowOverlay(false);\n }, 550); // For drawer animation to complete + buffer\n };\n\n const shouldDismissDrawer = (dismissalMethod: DrawerDismissalMethod) => {\n return (\n showDrawer &&\n blockDrawerDismissalMethods.indexOf(dismissalMethod) === -1\n );\n };\n\n const hasCollapsibleActionButtons = (\n actionButtons: NavbarActionButtonsProps\n ) => {\n const drawerActionButtons =\n actionButtons.mobile || actionButtons.desktop;\n if (drawerActionButtons) {\n return (\n drawerActionButtons.length &&\n drawerActionButtons.some(\n (actionButton) => !actionButton.uncollapsible\n )\n );\n }\n\n return false;\n };\n\n // =============================================================================\n // EVENT HANDLER\n // =============================================================================\n const handleResize = () => {\n if (window.innerWidth <= tabletWidth && showDrawer) {\n dismissDrawer();\n }\n };\n\n const handleBrandClick = (\n _event: React.MouseEvent<HTMLAnchorElement>,\n type: BrandType\n ) => {\n if (onBrandClick) {\n onBrandClick(type);\n }\n\n if (shouldDismissDrawer(\"brand-click\")) {\n dismissDrawer();\n }\n };\n\n const handleNavItemClick = <K extends T>(\n event: React.MouseEvent<HTMLAnchorElement>,\n item: NavItemProps<K> | NavItemCommonProps<K>\n ) => {\n if (NavbarHelper.isNavItemCommon(item) && item.onClick) {\n item.onClick(event);\n } else if (onItemClick) {\n event.preventDefault();\n onItemClick(item);\n }\n\n if (\n NavbarHelper.isNavItemLink(item) &&\n !item.subMenu &&\n shouldDismissDrawer(\"item-click\")\n ) {\n dismissDrawer();\n }\n };\n\n const handleActionButtonClick = (\n event: React.MouseEvent<HTMLButtonElement> | React.MouseEvent<Element>,\n actionButton: NavbarButtonProps\n ) => {\n if (\n (actionButton.type === \"button\" ||\n actionButton.type === \"download\") &&\n actionButton.args?.onClick\n ) {\n actionButton.args.onClick(\n event as React.MouseEvent<HTMLButtonElement>\n );\n } else if (onActionButtonClick) {\n event.preventDefault();\n onActionButtonClick(actionButton);\n }\n\n if (shouldDismissDrawer(\"item-click\")) {\n dismissDrawer();\n }\n };\n\n const handleMobileMenuButtonClick = () => {\n setShowDrawer(true);\n setShowOverlay(true);\n };\n\n const handleDrawerClose = () => {\n if (shouldDismissDrawer(\"close-button-click\")) {\n dismissDrawer();\n }\n };\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n\n const renderDrawer = () => (\n <Overlay\n show={showOverlay}\n enableOverlayClick\n onOverlayClick={handleDrawerClose}\n >\n <Drawer\n show={showDrawer}\n resources={{ primary, secondary }}\n onClose={handleDrawerClose}\n onBrandClick={handleBrandClick}\n actionButtons={actionButtons}\n hideNavBranding={hideNavBranding}\n mobileMenuRef={mobileMenuRef}\n drawerLabel={drawerLabel}\n >\n <NavbarItems\n items={items.mobile || items.desktop}\n onItemClick={handleNavItemClick}\n selectedId={selectedId}\n mobile\n hideLinkIndicator={hideLinkIndicator}\n />\n <NavbarActionButtons\n actionButtons={actionButtons}\n onActionButtonClick={handleActionButtonClick}\n mobile\n />\n </Drawer>\n </Overlay>\n );\n\n const renderBrand = () => (\n <div\n className={clsx(\n styles.navBrandContainer,\n compress\n ? styles.navBrandContainerCompressed\n : styles.navBrandContainerFull,\n styles.navBrandContainerResponsive\n )}\n data-id=\"brand-container\"\n >\n {primary && (\n <Brand\n resources={primary}\n onClick={handleBrandClick}\n data-id=\"brand-primary\"\n data-testid=\"main__brand\"\n type=\"primary\"\n />\n )}\n {secondary && (\n <>\n <div\n className={clsx(\n styles.navSeparator,\n compress\n ? styles.navSeparatorCompressed\n : styles.navSeparatorFull,\n styles.navSeparatorResponsive\n )}\n />\n <Brand\n resources={secondary}\n onClick={handleBrandClick}\n data-id=\"brand-secondary\"\n data-testid=\"main__brand-secondary\"\n type=\"secondary\"\n />\n </>\n )}\n </div>\n );\n\n const renderMobileMenuButton = () => {\n const drawerItems = items.mobile || items.desktop;\n if (\n (drawerItems && drawerItems.length > 0) ||\n (actionButtons && hasCollapsibleActionButtons(actionButtons))\n ) {\n return (\n <ClickableIcon\n ref={mobileMenuRef}\n className={styles.mobileMenuButton}\n aria-label={showDrawer ? \"Close nav menu\" : \"Open nav menu\"}\n aria-expanded={showDrawer}\n data-testid=\"button__mobile-menu\"\n onClick={handleMobileMenuButtonClick}\n focusHighlight={true}\n >\n <MenuIcon className={styles.mobileMenuIcon} />\n </ClickableIcon>\n );\n }\n\n return null;\n };\n\n const renderNavbar = () => {\n return (\n <Layout.Content stretch={isStretch}>\n <nav\n className={clsx(\n styles.nav,\n compress && styles.navCompressed,\n theme?.mode === \"dark\" && styles.navDark\n )}\n aria-label={headerLabel}\n >\n {!hideNavBranding && renderBrand()}\n {!hideNavElements && (\n <div\n className={clsx(\n styles.navElementsContainer,\n !hideNavBranding &&\n styles.navElementsContainerWithBranding\n )}\n >\n <NavbarItems\n items={items.desktop}\n onItemClick={handleNavItemClick}\n selectedId={selectedId}\n hideNavBranding={hideNavBranding}\n hideLinkIndicator={hideLinkIndicator}\n />\n <NavbarActionButtons\n actionButtons={actionButtons}\n onActionButtonClick={handleActionButtonClick}\n />\n {renderMobileMenuButton()}\n </div>\n )}\n </nav>\n\n {!hideNavElements && renderDrawer()}\n </Layout.Content>\n );\n };\n\n return (\n <div\n ref={elementRef}\n className={clsx(\n styles.wrapper,\n fixed ? styles.wrapperFixed : styles.wrapperRelative,\n theme?.mode === \"dark\"\n ? styles.wrapperDark\n : styles.wrapperLight,\n className\n )}\n id={id || \"navbar-wrapper\"}\n data-testid={otherProps[\"data-testid\"] || \"navbar-wrapper\"}\n >\n {masthead && <Masthead stretch={isStretch} />}\n {renderNavbar()}\n </div>\n );\n};\n\n/**\n * The main site navigation bar with desktop and mobile drawer views.\n *\n * Use `Navbar` to render the primary navigation header. It displays brand\n * logos, navigation items, and action buttons in a desktop bar, and\n * automatically collapses items into a slide-in drawer for mobile viewports.\n */\nexport const Navbar = forwardRef(Component);\n"],"names":["Navbar","forwardRef","_a","ref","items","className","id","selectedId","compress","fixed","resources","hideNavElements","hideNavBranding","hideLinkIndicator","drawerDismissalExclusions","blockDrawerDismissalMethods","actionButtons","onItemClick","onActionButtonClick","onBrandClick","masthead","layout","headerLabel","drawerLabel","otherProps","__rest","showDrawer","setShowDrawer","useState","showOverlay","setShowOverlay","mobileMenuRef","useRef","isStretch","elementRef","theme","useContext","ThemeContext","defaultResource","getDefaultResourceLogo","tabletWidth","parsePxOrRemValue","useResolvedBreakpointToken","Breakpoint","primary","secondary","useImperativeHandle","Object","assign","current","dismissDrawer","useEffect","handleResize","window","addEventListener","removeEventListener","setTimeout","shouldDismissDrawer","dismissalMethod","indexOf","innerWidth","handleBrandClick","_event","type","handleNavItemClick","event","item","NavbarHelper","isNavItemCommon","onClick","preventDefault","isNavItemLink","subMenu","handleActionButtonClick","actionButton","args","handleMobileMenuButtonClick","handleDrawerClose","renderMobileMenuButton","drawerItems","mobile","desktop","length","drawerActionButtons","some","uncollapsible","hasCollapsibleActionButtons","_jsx","ClickableIcon","styles.mobileMenuButton","focusHighlight","children","MenuIcon","styles.mobileMenuIcon","_jsxs","clsx","styles.wrapper","styles.wrapperFixed","styles.wrapperRelative","mode","styles.wrapperDark","styles.wrapperLight","Masthead","stretch","Layout","Content","styles.nav","styles.navCompressed","styles.navDark","styles.navBrandContainer","styles.navBrandContainerCompressed","styles.navBrandContainerFull","styles.navBrandContainerResponsive","Brand","_Fragment","styles.navSeparator","styles.navSeparatorCompressed","styles.navSeparatorFull","styles.navSeparatorResponsive","styles.navElementsContainer","styles.navElementsContainerWithBranding","NavbarItems","NavbarActionButtons","Overlay","show","enableOverlayClick","onOverlayClick","Drawer","onClose"],"mappings":"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"}
@@ -1,4 +1,4 @@
1
- .wkxx447{background-color:var(--fds-navbar-colour-bg);z-index:30;top:0;left:0;right:0;width:100%;}
1
+ @layer fds{.wkxx447{background-color:var(--fds-navbar-colour-bg);z-index:30;top:0;left:0;right:0;width:100%;}
2
2
  .w1818o7d{position:-webkit-sticky;position:sticky;}
3
3
  .wjuvx4d{position:relative;}
4
4
  .w1f5qsn6{border-bottom:var(--fds-border-width-010) var(--fds-border-style-solid) var(--fds-colour-border);}
@@ -17,4 +17,4 @@
17
17
  .n1lsvhqc{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;background-color:var(--fds-colour-border);height:100%;width:2px;}
18
18
  .n1yd75go{margin:0 1rem;}
19
19
  .ndxbaef{margin:0 1.5rem;}
20
- :where(body.fds-breakpoint-lg-max) .n3azfgc{margin:0 1rem;}:where(body.fds-breakpoint-sm-max) .n3azfgc{margin:0 0.75rem;}
20
+ :where(body.fds-breakpoint-lg-max) .n3azfgc{margin:0 1rem;}:where(body.fds-breakpoint-sm-max) .n3azfgc{margin:0 0.75rem;}}
package/navbar/types.d.ts CHANGED
@@ -1,101 +1,288 @@
1
1
  import type { ButtonProps } from "../button";
2
2
  import type { TypographyLinkProps } from "../typography";
3
+ /**
4
+ * Props for a standard navigation link item.
5
+ */
3
6
  export interface NavItemLinkProps<T> extends NavItemCommonProps<T> {
4
7
  itemType?: "link";
5
8
  subMenu?: NavItemCommonProps<T>[] | undefined;
6
9
  }
10
+ /**
11
+ * Props for a custom component slot navigation item.
12
+ */
7
13
  export interface NavItemComponentProps {
8
14
  itemType: "component";
9
15
  children: JSX.Element;
10
16
  }
17
+ /**
18
+ * A single navigation item rendered by the navbar.
19
+ */
11
20
  export type NavItemProps<T> = NavItemLinkProps<T> | NavItemComponentProps;
21
+ /**
22
+ * Shared props for link-type navigation items.
23
+ *
24
+ * `T` is the type of the arbitrary `options` payload.
25
+ */
12
26
  export interface NavItemCommonProps<T> extends TypographyLinkProps {
13
27
  id: string;
14
28
  "data-testid"?: string | undefined;
29
+ /**
30
+ * Arbitrary data passed through to callback arguments such as `onItemClick`.
31
+ */
15
32
  options?: T | undefined;
16
33
  }
34
+ /**
35
+ * Desktop and mobile navigation item lists for the navbar.
36
+ *
37
+ * `T` is the type of the arbitrary `options` payload on each item.
38
+ */
17
39
  export interface NavItemsProps<T> {
40
+ /**
41
+ * Items rendered in the desktop navbar.
42
+ */
18
43
  desktop: NavItemProps<T>[];
44
+ /**
45
+ * Items rendered in the mobile drawer. Falls back to `desktop` when omitted.
46
+ */
19
47
  mobile?: NavItemProps<T>[] | undefined;
20
48
  }
49
+ /** Props for a `"download"` type action button in the navbar. */
21
50
  export interface NavbarActionButtonDownloadProps {
22
51
  type: "download";
23
52
  args?: ButtonProps | undefined;
53
+ /**
54
+ * When `true`, the button remains visible outside the mobile drawer rather
55
+ * than being collapsed into it.
56
+ *
57
+ * @default false
58
+ */
24
59
  uncollapsible?: boolean | undefined;
25
60
  }
61
+ /** Props for a `"button"` type action button in the navbar. */
26
62
  export interface NavbarActionButtonCtaProps {
27
63
  type: "button";
28
64
  args: ButtonProps;
65
+ /**
66
+ * When `true`, the button remains visible outside the mobile drawer rather
67
+ * than being collapsed into it.
68
+ *
69
+ * @default false
70
+ */
29
71
  uncollapsible?: boolean | undefined;
30
72
  }
31
- export interface NavbarButtonComponentProps {
73
+ /** Props for the internal `"component"` type action button wrapper. */
74
+ interface NavbarButtonComponentProps {
32
75
  render: JSX.Element;
33
76
  }
77
+ /** Props for a `"component"` type action button in the navbar. */
34
78
  export interface NavbarActionButtonComponentProps {
35
79
  type: "component";
36
80
  args?: NavbarButtonComponentProps | undefined;
81
+ /**
82
+ * When `true`, the button remains visible outside the mobile drawer rather
83
+ * than being collapsed into it.
84
+ *
85
+ * @default false
86
+ */
37
87
  uncollapsible?: boolean | undefined;
38
88
  }
89
+ /**
90
+ * Props for a single action button in the navbar.
91
+ *
92
+ * `type` discriminates between `"button"`, `"download"`, and `"component"`.
93
+ */
39
94
  export type NavbarButtonProps = NavbarActionButtonDownloadProps | NavbarActionButtonCtaProps | NavbarActionButtonComponentProps;
95
+ /** Props for the desktop and mobile action button lists in the navbar. */
40
96
  export interface NavbarActionButtonsProps {
97
+ /**
98
+ * Action buttons rendered in the desktop navbar.
99
+ */
41
100
  desktop: NavbarButtonProps[];
42
- /** Navbar action buttons for mobile drawer. Takes desktop if not specified */
101
+ /**
102
+ * Action buttons rendered in the mobile drawer. Falls back to `desktop`
103
+ * when omitted.
104
+ */
43
105
  mobile?: NavbarButtonProps[] | undefined;
44
106
  }
107
+ /**
108
+ * Branding identity for a primary or secondary brand slot in the navbar.
109
+ */
45
110
  export interface NavbarBrandingProps {
111
+ /** The name of the brand, used for accessibility and alt text. */
46
112
  brandName: string;
113
+ /** The source URL for the brand logo image. */
47
114
  logoSrc: string;
48
115
  }
116
+ /**
117
+ * Logo resources for the primary and secondary brand slots in the navbar.
118
+ *
119
+ */
49
120
  export interface NavbarResourcesProps {
121
+ /**
122
+ * When omitted, a default logo derived from the active theme is used.
123
+ */
50
124
  primary?: NavbarBrandingProps | undefined;
125
+ /**
126
+ * When omitted, the secondary brand slot is hidden.
127
+ */
51
128
  secondary?: NavbarBrandingProps | undefined;
52
129
  }
130
+ /**
131
+ * Props shared between `NavbarProps` and `NavbarDrawerProps`.
132
+ */
53
133
  export interface NavbarSharedProps {
134
+ /**
135
+ * Branding and logo resources for the navbar.
136
+ */
54
137
  resources?: NavbarResourcesProps | undefined;
138
+ /** Action buttons rendered in the navbar and mobile drawer. */
55
139
  actionButtons?: NavbarActionButtonsProps | undefined;
56
- /** Specifies if brand logos are visible */
140
+ /**
141
+ * Hides all brand logos from the navbar and drawer.
142
+ *
143
+ * @default false
144
+ */
57
145
  hideNavBranding?: boolean | undefined;
58
- /** Hide the selected link indicator across the navbar */
146
+ /**
147
+ * Hides the active-item underline indicator across desktop and drawer views.
148
+ *
149
+ * @default false
150
+ */
59
151
  hideLinkIndicator?: boolean | undefined;
60
152
  }
153
+ /**
154
+ * Identifies the user action that can dismiss the mobile navigation drawer.
155
+ *
156
+ * Pass one or more values to `drawerDismissalExclusions` on `NavbarProps` to
157
+ * prevent those actions from closing the drawer.
158
+ *
159
+ * - `"close-button-click"` — the drawer's close button or overlay click
160
+ * - `"item-click"` — clicking a nav item or action button
161
+ * - `"brand-click"` — clicking a brand logo
162
+ */
61
163
  export type DrawerDismissalMethod = "close-button-click" | "item-click" | "brand-click";
164
+ /**
165
+ * Props for the internal mobile navigation drawer panel.
166
+ */
62
167
  export interface NavbarDrawerProps extends NavbarSharedProps {
168
+ /**
169
+ * Controls whether the drawer is visible.
170
+ */
63
171
  show: boolean;
64
172
  children: JSX.Element | JSX.Element[];
173
+ /**
174
+ * Called when the drawer requests to be closed via the close button or
175
+ * overlay click.
176
+ */
65
177
  onClose?: (() => void) | undefined;
66
- /** Triggered when the brand icon is being clicked */
178
+ /**
179
+ * Called when a brand logo inside the drawer is clicked.
180
+ */
67
181
  onBrandClick?: ((event: React.MouseEvent<HTMLAnchorElement>, type: BrandType) => void) | undefined;
68
- /** Custom aria-label for the mobile navigation drawer */
182
+ /**
183
+ * Accessible label announced for the mobile navigation drawer.
184
+ */
69
185
  drawerLabel?: string | undefined;
70
- /** Ref to the mobile menu button for focus management */
186
+ /**
187
+ * Ref to the mobile menu button used to return focus when the drawer closes.
188
+ */
71
189
  mobileMenuRef?: React.RefObject<HTMLButtonElement> | undefined;
72
190
  }
191
+ /**
192
+ * Identifies which brand slot was interacted with in brand-related callbacks.
193
+ */
73
194
  export type BrandType = "primary" | "secondary";
195
+ /**
196
+ * Imperative methods exposed by the `Navbar` component via `ref`.
197
+ */
74
198
  export type NavbarDrawerApi = {
199
+ /**
200
+ * Programmatically closes the mobile navigation drawer with its exit
201
+ * animation.
202
+ */
75
203
  dismissDrawer: () => void;
76
204
  };
205
+ /**
206
+ * Imperative handle returned by `Navbar` via `ref`.
207
+ *
208
+ * Extends `HTMLDivElement` with `NavbarDrawerApi`. Use the ref to dismiss the
209
+ * mobile drawer programmatically without needing to manage drawer state
210
+ * externally.
211
+ */
77
212
  export type NavbarDrawerHandle = HTMLDivElement & NavbarDrawerApi;
213
+ /**
214
+ * Props for the `Navbar` component.
215
+ */
78
216
  export interface NavbarProps<T = void> extends NavbarSharedProps {
79
217
  items: NavItemsProps<T>;
80
218
  className?: string | undefined;
81
219
  id?: string | undefined;
82
220
  "data-testid"?: string | undefined;
221
+ /**
222
+ * The currently selected navigation item identifier.
223
+ * Must match the `id` of one of the rendered items.
224
+ */
83
225
  selectedId?: string | undefined;
84
- /** Specifies if the Navbar should be compressed */
226
+ /**
227
+ * Reduces the height and logo size of the navbar.
228
+ *
229
+ * @default false
230
+ */
85
231
  compress?: boolean | undefined;
86
- /** Specifies if Navbar should be fixed to top */
232
+ /**
233
+ * Pins the navbar to the top of the viewport while the page scrolls.
234
+ *
235
+ * @default true
236
+ */
87
237
  fixed?: boolean | undefined;
88
- /** Specifies which methods will not dismiss the drawer */
238
+ /**
239
+ * Drawer dismissal methods that should be suppressed. The drawer will not
240
+ * close when the user performs any of the listed actions.
241
+ */
89
242
  drawerDismissalExclusions?: DrawerDismissalMethod[] | undefined;
243
+ /**
244
+ * Hides nav items and action buttons, leaving only the brand area visible.
245
+ *
246
+ * @default false
247
+ */
90
248
  hideNavElements?: boolean | undefined;
249
+ /**
250
+ * Called when a brand logo is clicked. `type` identifies which brand slot
251
+ * was activated.
252
+ */
91
253
  onBrandClick?: ((type: BrandType) => void) | undefined;
254
+ /**
255
+ * Called when a navigation item is activated from the desktop bar or the
256
+ * mobile drawer. The item's full props object is passed as the argument.
257
+ */
92
258
  onItemClick?: ((item: NavItemProps<T> | NavItemCommonProps<T>) => void) | undefined;
259
+ /**
260
+ * Called when an action button without its own `onClick` handler is
261
+ * activated. The button's full props object is passed as the argument.
262
+ */
93
263
  onActionButtonClick?: ((actionButton: NavbarButtonProps) => void) | undefined;
94
- /** Specifies if masthead should be rendered */
264
+ /**
265
+ * Renders the `Masthead` (SGDS official government banner) above the navbar.
266
+ *
267
+ * @default true
268
+ */
95
269
  masthead?: boolean | undefined;
270
+ /**
271
+ * Controls how the navbar content fills its container. `"stretch"` expands
272
+ * to the full container width; `"default"` uses the standard content width.
273
+ *
274
+ * @default "default"
275
+ */
96
276
  layout?: "default" | "stretch" | undefined;
97
- /** Custom aria-label for the main navigation header */
277
+ /**
278
+ * Accessible label announced for the main navigation header.
279
+ *
280
+ * @default "Main navigation menu"
281
+ */
98
282
  headerLabel?: string | undefined;
99
- /** Custom aria-label for the mobile navigation drawer */
283
+ /**
284
+ * Accessible label announced for the mobile navigation drawer.
285
+ */
100
286
  drawerLabel?: string | undefined;
101
287
  }
288
+ export {};
@@ -1,3 +1,9 @@
1
1
  import React from "react";
2
2
  import type { NotificationBannerWithForwardedRefProps, NotificationContentAttributes } from "./types";
3
+ /**
4
+ * Higher-order component that wraps `NotificationBanner` and renders its
5
+ * content from a structured data array.
6
+ * *
7
+ * @param data Content items to render inside the banner.
8
+ */
3
9
  export declare const withNotificationBanner: (data: NotificationContentAttributes[]) => (props: NotificationBannerWithForwardedRefProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null;
@@ -1 +1 @@
1
- {"version":3,"file":"notification-banner-hoc.js","sources":["../../src/notification-banner/notification-banner-hoc.tsx"],"sourcesContent":["import DOMPurify from \"dompurify\";\nimport React from \"react\";\n\nimport { NBComponent, NotificationBanner } from \"./notification-banner\";\nimport type {\n ContentLinkAttributes,\n ContentTextAttributes,\n NotificationBannerWithForwardedRefProps,\n NotificationContentAttributes,\n} from \"./types\";\n\nexport const withNotificationBanner = (\n data: NotificationContentAttributes[]\n) => {\n const ComponentToReturn = (\n props: NotificationBannerWithForwardedRefProps,\n ref: React.Ref<HTMLDivElement>\n ) => {\n const renderContent = () => {\n if (data.length > 0) {\n return data.map((attribute, index) => {\n if (attribute.type === \"text\") {\n const otherAttributes =\n attribute.otherAttributes as ContentTextAttributes;\n\n const sanitizedContent = DOMPurify.sanitize(\n attribute.content\n );\n return (\n <p\n key={index}\n {...otherAttributes}\n dangerouslySetInnerHTML={{\n __html: sanitizedContent,\n }}\n />\n );\n } else {\n const otherAttributes =\n attribute.otherAttributes as ContentLinkAttributes;\n return (\n <NotificationBanner.Link\n key={index}\n {...otherAttributes}\n >\n {attribute.content}\n </NotificationBanner.Link>\n );\n }\n });\n }\n\n console.error(\"[NotificationBannerHOC] Empty data passed\");\n return null;\n };\n\n return (\n <NBComponent forwardedRef={ref} {...props}>\n {renderContent()}\n </NBComponent>\n );\n };\n\n return React.forwardRef(ComponentToReturn);\n};\n"],"names":["withNotificationBanner","data","React","forwardRef","props","ref","_jsx","NBComponent","Object","assign","forwardedRef","children","length","map","attribute","index","type","otherAttributes","sanitizedContent","DOMPurify","sanitize","content","dangerouslySetInnerHTML","__html","NotificationBanner","Link","console","error"],"mappings":"mMAWO,MAAMA,EACTC,GAmDOC,EAAMC,YAjDa,CACtBC,EACAC,IAyCIC,EAACC,EAAWC,OAAAC,OAAA,CAACC,aAAcL,GAASD,EAAK,CAAAO,SAtCrCV,EAAKW,OAAS,EACPX,EAAKY,KAAI,CAACC,EAAWC,KACxB,GAAuB,SAAnBD,EAAUE,KAAiB,CAC3B,MAAMC,EACFH,EAAUG,gBAERC,EAAmBC,EAAUC,SAC/BN,EAAUO,SAEd,OACIf,EAAA,IAAAE,OAAAC,OAAA,GAEQQ,EAAe,CACnBK,wBAAyB,CACrBC,OAAQL,KAHPH,EAOjB,CAAO,CACH,MAAME,EACFH,EAAUG,gBACd,OACIX,EAACkB,EAAmBC,KAAIjB,OAAAC,OAAA,CAAA,EAEhBQ,EAAe,CAAAN,SAElBG,EAAUO,UAHNN,EAMjB,MAIRW,QAAQC,MAAM,6CACP"}
1
+ {"version":3,"file":"notification-banner-hoc.js","sources":["../../src/notification-banner/notification-banner-hoc.tsx"],"sourcesContent":["import DOMPurify from \"dompurify\";\nimport React from \"react\";\n\nimport { NBComponent, NotificationBanner } from \"./notification-banner\";\nimport type {\n ContentLinkAttributes,\n ContentTextAttributes,\n NotificationBannerWithForwardedRefProps,\n NotificationContentAttributes,\n} from \"./types\";\n\n/**\n * Higher-order component that wraps `NotificationBanner` and renders its\n * content from a structured data array.\n * *\n * @param data Content items to render inside the banner.\n */\nexport const withNotificationBanner = (\n data: NotificationContentAttributes[]\n) => {\n const ComponentToReturn = (\n props: NotificationBannerWithForwardedRefProps,\n ref: React.Ref<HTMLDivElement>\n ) => {\n const renderContent = () => {\n if (data.length > 0) {\n return data.map((attribute, index) => {\n if (attribute.type === \"text\") {\n const otherAttributes =\n attribute.otherAttributes as ContentTextAttributes;\n\n const sanitizedContent = DOMPurify.sanitize(\n attribute.content\n );\n return (\n <p\n key={index}\n {...otherAttributes}\n dangerouslySetInnerHTML={{\n __html: sanitizedContent,\n }}\n />\n );\n } else {\n const otherAttributes =\n attribute.otherAttributes as ContentLinkAttributes;\n return (\n <NotificationBanner.Link\n key={index}\n {...otherAttributes}\n >\n {attribute.content}\n </NotificationBanner.Link>\n );\n }\n });\n }\n\n console.error(\"[NotificationBannerHOC] Empty data passed\");\n return null;\n };\n\n return (\n <NBComponent forwardedRef={ref} {...props}>\n {renderContent()}\n </NBComponent>\n );\n };\n\n return React.forwardRef(ComponentToReturn);\n};\n"],"names":["withNotificationBanner","data","React","forwardRef","props","ref","_jsx","NBComponent","Object","assign","forwardedRef","children","length","map","attribute","index","type","otherAttributes","sanitizedContent","DOMPurify","sanitize","content","dangerouslySetInnerHTML","__html","NotificationBanner","Link","console","error"],"mappings":"mMAiBO,MAAMA,EACTC,GAmDOC,EAAMC,YAjDa,CACtBC,EACAC,IAyCIC,EAACC,EAAWC,OAAAC,OAAA,CAACC,aAAcL,GAASD,EAAK,CAAAO,SAtCrCV,EAAKW,OAAS,EACPX,EAAKY,KAAI,CAACC,EAAWC,KACxB,GAAuB,SAAnBD,EAAUE,KAAiB,CAC3B,MAAMC,EACFH,EAAUG,gBAERC,EAAmBC,EAAUC,SAC/BN,EAAUO,SAEd,OACIf,EAAA,IAAAE,OAAAC,OAAA,GAEQQ,EAAe,CACnBK,wBAAyB,CACrBC,OAAQL,KAHPH,EAOjB,CAAO,CACH,MAAME,EACFH,EAAUG,gBACd,OACIX,EAACkB,EAAmBC,KAAIjB,OAAAC,OAAA,CAAA,EAEhBQ,EAAe,CAAAN,SAElBG,EAAUO,UAHNN,EAMjB,MAIRW,QAAQC,MAAM,6CACP"}
@@ -1,6 +1,13 @@
1
1
  import React from "react";
2
2
  import type { NotificationBannerProps, NotificationBannerWithForwardedRefProps } from "./types";
3
3
  export declare const NBComponent: ({ children, visible, dismissible, sticky, onDismiss, id, forwardedRef, maxCollapsedHeight, onClick, actionButton, icon, className, ...otherProps }: NotificationBannerWithForwardedRefProps) => import("react/jsx-runtime").JSX.Element | null;
4
+ /**
5
+ * A full-width informational banner that sits at the top of the page.
6
+ *
7
+ * Use `NotificationBanner` to surface important or persistent messages that
8
+ * should remain visible until the user dismisses them.
9
+ */
4
10
  export declare const NotificationBanner: ((props: NotificationBannerProps & React.RefAttributes<HTMLDivElement>) => React.ReactElement | null) & {
11
+ /** Renders an inline link styled for use inside a `NotificationBanner`. */
5
12
  Link: (props: import("..").TypographyLinkProps & React.RefAttributes<HTMLAnchorElement>) => React.ReactElement | null;
6
13
  };
@@ -1 +1 @@
1
- {"version":3,"file":"notification-banner.js","sources":["../../src/notification-banner/notification-banner.tsx"],"sourcesContent":["import { CrossIcon } from \"@lifesg/react-icons\";\nimport clsx from \"clsx\";\nimport type { NamedExoticComponent } from \"react\";\nimport React, { useEffect, useRef, useState } from \"react\";\nimport { useResizeDetector } from \"react-resize-detector\";\n\nimport { Layout } from \"../layout\";\nimport { VisuallyHidden } from \"../shared/accessibility\";\nimport { ClickableIcon } from \"../shared/clickable-icon\";\nimport { formatUnitValue, useApplyStyle } from \"../theme\";\nimport { Typography } from \"../typography\";\nimport * as styles from \"./notification-banner.styles\";\nimport type {\n NotificationBannerProps,\n NotificationBannerWithForwardedRefProps,\n} from \"./types\";\n\nexport const NBComponent = ({\n children,\n visible = true,\n dismissible = true,\n sticky = true,\n onDismiss,\n id,\n forwardedRef,\n maxCollapsedHeight,\n onClick,\n actionButton,\n icon,\n className,\n ...otherProps\n}: NotificationBannerWithForwardedRefProps) => {\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const testId = otherProps[\"data-testid\"];\n\n const [isVisible, setVisible] = useState<boolean>(visible);\n const { height: contentHeight = 0, ref: contentRef } = useResizeDetector();\n const contentTextRef = useRef<HTMLDivElement>(null);\n\n const isCollapsed =\n maxCollapsedHeight && contentHeight > maxCollapsedHeight;\n\n useApplyStyle(contentTextRef, {\n [styles.tokens.contentText.maxCollapsedHeight]: isCollapsed\n ? formatUnitValue(maxCollapsedHeight, \"px\")\n : undefined,\n });\n\n // =============================================================================\n // EFFECTS\n // =============================================================================\n useEffect(() => {\n setVisible(visible);\n }, [visible]);\n\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleDismiss = (event: React.MouseEvent<HTMLButtonElement>) => {\n event.stopPropagation();\n setVisible(false);\n\n if (dismissible && onDismiss) onDismiss();\n };\n\n const handleActionButtonOnClick = (\n event: React.MouseEvent<HTMLButtonElement>\n ) => {\n if (!actionButton?.onClick) {\n // let it bubble\n return;\n }\n event.stopPropagation();\n actionButton.onClick(event);\n };\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n if (!isVisible) return null;\n\n const renderDismissButton = () => (\n <ClickableIcon\n className={styles.dismissButton}\n tabIndex={0}\n onClick={handleDismiss}\n id={formatId(\"dismiss-button\", id)}\n data-testid={formatId(\"dismiss-button\", testId)}\n focusOutline=\"browser\"\n focusHighlight={false}\n type=\"button\"\n aria-label=\"close\"\n >\n <CrossIcon aria-hidden />\n </ClickableIcon>\n );\n\n const renderActionButton = () => {\n if (!actionButton) return null;\n\n return (\n <button\n className={styles.actionButton}\n id={formatId(\"action-button\", id)}\n data-testid={formatId(\"action-button\", testId)}\n type=\"button\"\n {...actionButton}\n onClick={handleActionButtonOnClick}\n >\n {actionButton.children}\n </button>\n );\n };\n\n const renderContent = () => (\n <div\n className={styles.content}\n data-testid={formatId(\"text-content\", testId)}\n >\n <div className={styles.contentWrapper}>\n <div\n ref={contentTextRef}\n className={clsx(\n styles.contentText,\n isCollapsed && styles.contentTextCollapsed\n )}\n >\n <div ref={contentRef}>{children}</div>\n </div>\n {renderActionButton()}\n </div>\n </div>\n );\n\n const renderAccessibleBannerButton = () => (\n <VisuallyHidden>\n <button aria-label={\"Clickable banner\"} type=\"button\" />\n </VisuallyHidden>\n );\n\n return (\n <div\n ref={forwardedRef}\n className={clsx(\n styles.wrapper,\n sticky && styles.wrapperSticky,\n !!onClick && styles.wrapperClickable,\n className\n )}\n onClick={onClick}\n role=\"region\"\n {...otherProps}\n >\n <Layout.Content id={formatId(\"container\", id)}>\n {icon && (\n <div className={styles.iconContainer} aria-hidden>\n {icon}\n </div>\n )}\n <div className={styles.contentContainer}>{renderContent()}</div>\n {dismissible && renderDismissButton()}\n </Layout.Content>\n {onClick && renderAccessibleBannerButton()}\n </div>\n );\n};\n\n/**\n * Intermediate component to handle passing the ref as a prop\n */\nconst NBWithRef = (\n props: NotificationBannerProps,\n ref: React.Ref<HTMLDivElement>\n) => {\n return <NBComponent {...props} forwardedRef={ref} />;\n};\n\nconst NBLink = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentProps<typeof Typography.LinkBL>\n>(function NotificationBannerLink(props, ref) {\n return (\n <Typography.LinkBL\n ref={ref}\n className={clsx(styles.contentLink, props.className)}\n {...props}\n />\n );\n});\n(NBLink as NamedExoticComponent).displayName = \"NotificationBanner.Link\";\n\n// =============================================================================\n// HELPER FUNCTIONS\n// =============================================================================\nconst formatId = (componentName: string, id = \"wrapper\"): string => {\n return `${id}-${componentName}`;\n};\n\n// =============================================================================\n// EXPORTABLE\n// =============================================================================\nconst Base = React.forwardRef(NBWithRef);\n(Base as NamedExoticComponent).displayName = \"NotificationBanner\";\nexport const NotificationBanner = Object.assign(Base, {\n Link: NBLink,\n});\n"],"names":["NBComponent","_a","children","visible","dismissible","sticky","onDismiss","id","forwardedRef","maxCollapsedHeight","onClick","actionButton","icon","className","otherProps","__rest","testId","isVisible","setVisible","useState","height","contentHeight","ref","contentRef","useResizeDetector","contentTextRef","useRef","isCollapsed","useApplyStyle","styles.tokens","contentText","formatUnitValue","undefined","useEffect","handleDismiss","event","stopPropagation","handleActionButtonOnClick","_jsxs","clsx","styles.wrapper","styles.wrapperSticky","styles.wrapperClickable","role","Layout","Content","formatId","_jsx","styles.iconContainer","styles.contentContainer","styles.content","styles.contentWrapper","styles.contentText","styles.contentTextCollapsed","Object","assign","styles.actionButton","type","ClickableIcon","styles.dismissButton","tabIndex","focusOutline","focusHighlight","CrossIcon","VisuallyHidden","NBLink","React","forwardRef","props","Typography","LinkBL","styles.contentLink","displayName","componentName","Base","NotificationBanner","Link"],"mappings":"itCAiBO,MAAMA,EAAeC,IAAA,IAAAC,SACxBA,EAAQC,QACRA,GAAU,EAAIC,YACdA,GAAc,EAAIC,OAClBA,GAAS,EAAIC,UACbA,EAASC,GACTA,EAAEC,aACFA,EAAYC,mBACZA,EAAkBC,QAClBA,EAAOC,aACPA,EAAYC,KACZA,EAAIC,UACJA,GAASZ,EACNa,EAAUC,EAAAd,EAbW,gJAkBxB,MAAMe,EAASF,EAAW,gBAEnBG,EAAWC,GAAcC,EAAkBhB,IAC1CiB,OAAQC,EAAgB,EAAGC,IAAKC,GAAeC,IACjDC,EAAiBC,EAAuB,MAExCC,EACFlB,GAAsBY,EAAgBZ,EAE1CmB,EAAcH,EAAgB,CAC1B,CAACI,EAAcC,YAAYrB,oBAAqBkB,EAC1CI,EAAgBtB,EAAoB,WACpCuB,IAMVC,GAAU,KACNf,EAAWf,EAAQ,GACpB,CAACA,IAKJ,MAAM+B,EAAiBC,IACnBA,EAAMC,kBACNlB,GAAW,GAEPd,GAAeE,GAAWA,GAAW,EAGvC+B,EACFF,KAEKxB,aAAY,EAAZA,EAAcD,WAInByB,EAAMC,kBACNzB,EAAaD,QAAQyB,GAAM,EAM/B,IAAKlB,EAAW,OAAO,KA6DvB,OACIqB,uBACIhB,IAAKd,EACLK,UAAW0B,EACPC,EACAnC,GAAUoC,IACR/B,GAAWgC,EACb7B,GAEJH,QAASA,EACTiC,KAAK,UACD7B,aAEJwB,EAACM,EAAOC,QAAO,CAACtC,GAAIuC,EAAS,YAAavC,GAAGL,SAAA,CACxCU,GACGmC,SAAKlC,UAAWmC,4BACXpC,IAGTmC,EAAA,MAAA,CAAKlC,UAAWoC,EAAuB/C,SA5C/C6C,EAAA,MAAA,CACIlC,UAAWqC,EAAc,cACZJ,EAAS,eAAgB9B,GAAOd,SAE7CoC,EAAA,MAAA,CAAKzB,UAAWsC,EAAqBjD,SAAA,CACjC6C,EAAA,MAAA,CACIzB,IAAKG,EACLZ,UAAW0B,EACPa,EACAzB,GAAe0B,GAClBnD,SAED6C,EAAA,MAAA,CAAKzB,IAAKC,EAAUrB,SAAGA,MA7B9BS,EAGDoC,EAAA,SAAAO,OAAAC,OAAA,CACI1C,UAAW2C,EACXjD,GAAIuC,EAAS,gBAAiBvC,iBACjBuC,EAAS,gBAAiB9B,GACvCyC,KAAK,UACD9C,EAAY,CAChBD,QAAS2B,EAAyBnC,SAEjCS,EAAaT,YAXI,YA8DjBE,GA9ET2C,EAACW,EAAa,CACV7C,UAAW8C,EACXC,SAAU,EACVlD,QAASwB,EACT3B,GAAIuC,EAAS,iBAAkBvC,GAAG,cACrBuC,EAAS,iBAAkB9B,GACxC6C,aAAa,UACbC,gBAAgB,EAChBL,KAAK,SAAQ,aACF,QAAOvD,SAElB6C,EAACgB,EAAS,CAAA,eAAA,SAqETrD,GA3BLqC,EAACiB,EAAc,CAAA9D,SACX6C,EAAA,SAAA,CAAA,aAAoB,mBAAoBU,KAAK,gBA2B3C,EAcRQ,EAASC,EAAMC,YAGnB,SAAgCC,EAAO9C,GACrC,OACIyB,EAACsB,EAAWC,OAAMhB,OAAAC,OAAA,CACdjC,IAAKA,EACLT,UAAW0B,EAAKgC,EAAoBH,EAAMvD,YACtCuD,GAGhB,IACCH,EAAgCO,YAAc,0BAK/C,MAAM1B,EAAW,CAAC2B,EAAuBlE,EAAK,YACnC,GAAGA,KAAMkE,IAMdC,EAAOR,EAAMC,YA/BD,CACdC,EACA9C,IAEOyB,EAAC/C,EAAWsD,OAAAC,OAAA,GAAKa,GAAO5D,aAAcc,OA4BhDoD,EAA8BF,YAAc,2BAChCG,EAAqBrB,OAAOC,OAAOmB,EAAM,CAClDE,KAAMX"}
1
+ {"version":3,"file":"notification-banner.js","sources":["../../src/notification-banner/notification-banner.tsx"],"sourcesContent":["import { CrossIcon } from \"@lifesg/react-icons\";\nimport clsx from \"clsx\";\nimport type { NamedExoticComponent } from \"react\";\nimport React, { useEffect, useRef, useState } from \"react\";\nimport { useResizeDetector } from \"react-resize-detector\";\n\nimport { Layout } from \"../layout\";\nimport { VisuallyHidden } from \"../shared/accessibility\";\nimport { ClickableIcon } from \"../shared/clickable-icon\";\nimport { formatUnitValue, useApplyStyle } from \"../theme\";\nimport { Typography } from \"../typography\";\nimport * as styles from \"./notification-banner.styles\";\nimport type {\n NotificationBannerProps,\n NotificationBannerWithForwardedRefProps,\n} from \"./types\";\n\nexport const NBComponent = ({\n children,\n visible = true,\n dismissible = true,\n sticky = true,\n onDismiss,\n id,\n forwardedRef,\n maxCollapsedHeight,\n onClick,\n actionButton,\n icon,\n className,\n ...otherProps\n}: NotificationBannerWithForwardedRefProps) => {\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const testId = otherProps[\"data-testid\"];\n\n const [isVisible, setVisible] = useState<boolean>(visible);\n const { height: contentHeight = 0, ref: contentRef } = useResizeDetector();\n const contentTextRef = useRef<HTMLDivElement>(null);\n\n const isCollapsed =\n maxCollapsedHeight && contentHeight > maxCollapsedHeight;\n\n useApplyStyle(contentTextRef, {\n [styles.tokens.contentText.maxCollapsedHeight]: isCollapsed\n ? formatUnitValue(maxCollapsedHeight, \"px\")\n : undefined,\n });\n\n // =============================================================================\n // EFFECTS\n // =============================================================================\n useEffect(() => {\n setVisible(visible);\n }, [visible]);\n\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleDismiss = (event: React.MouseEvent<HTMLButtonElement>) => {\n event.stopPropagation();\n setVisible(false);\n\n if (dismissible && onDismiss) onDismiss();\n };\n\n const handleActionButtonOnClick = (\n event: React.MouseEvent<HTMLButtonElement>\n ) => {\n if (!actionButton?.onClick) {\n // let it bubble\n return;\n }\n event.stopPropagation();\n actionButton.onClick(event);\n };\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n if (!isVisible) return null;\n\n const renderDismissButton = () => (\n <ClickableIcon\n className={styles.dismissButton}\n tabIndex={0}\n onClick={handleDismiss}\n id={formatId(\"dismiss-button\", id)}\n data-testid={formatId(\"dismiss-button\", testId)}\n focusOutline=\"browser\"\n focusHighlight={false}\n type=\"button\"\n aria-label=\"close\"\n >\n <CrossIcon aria-hidden />\n </ClickableIcon>\n );\n\n const renderActionButton = () => {\n if (!actionButton) return null;\n\n return (\n <button\n className={styles.actionButton}\n id={formatId(\"action-button\", id)}\n data-testid={formatId(\"action-button\", testId)}\n type=\"button\"\n {...actionButton}\n onClick={handleActionButtonOnClick}\n >\n {actionButton.children}\n </button>\n );\n };\n\n const renderContent = () => (\n <div\n className={styles.content}\n data-testid={formatId(\"text-content\", testId)}\n >\n <div className={styles.contentWrapper}>\n <div\n ref={contentTextRef}\n className={clsx(\n styles.contentText,\n isCollapsed && styles.contentTextCollapsed\n )}\n >\n <div ref={contentRef}>{children}</div>\n </div>\n {renderActionButton()}\n </div>\n </div>\n );\n\n const renderAccessibleBannerButton = () => (\n <VisuallyHidden>\n <button aria-label={\"Clickable banner\"} type=\"button\" />\n </VisuallyHidden>\n );\n\n return (\n <div\n ref={forwardedRef}\n className={clsx(\n styles.wrapper,\n sticky && styles.wrapperSticky,\n !!onClick && styles.wrapperClickable,\n className\n )}\n onClick={onClick}\n role=\"region\"\n {...otherProps}\n >\n <Layout.Content id={formatId(\"container\", id)}>\n {icon && (\n <div className={styles.iconContainer} aria-hidden>\n {icon}\n </div>\n )}\n <div className={styles.contentContainer}>{renderContent()}</div>\n {dismissible && renderDismissButton()}\n </Layout.Content>\n {onClick && renderAccessibleBannerButton()}\n </div>\n );\n};\n\n/**\n * Intermediate component to handle passing the ref as a prop\n */\nconst NBWithRef = (\n props: NotificationBannerProps,\n ref: React.Ref<HTMLDivElement>\n) => {\n return <NBComponent {...props} forwardedRef={ref} />;\n};\n\nconst NBLink = React.forwardRef<\n HTMLAnchorElement,\n React.ComponentProps<typeof Typography.LinkBL>\n>(function NotificationBannerLink(props, ref) {\n return (\n <Typography.LinkBL\n ref={ref}\n className={clsx(styles.contentLink, props.className)}\n {...props}\n />\n );\n});\n(NBLink as NamedExoticComponent).displayName = \"NotificationBanner.Link\";\n\n// =============================================================================\n// HELPER FUNCTIONS\n// =============================================================================\nconst formatId = (componentName: string, id = \"wrapper\"): string => {\n return `${id}-${componentName}`;\n};\n\n// =============================================================================\n// EXPORTABLE\n// =============================================================================\nconst Base = React.forwardRef(NBWithRef);\n(Base as NamedExoticComponent).displayName = \"NotificationBanner\";\n\n/**\n * A full-width informational banner that sits at the top of the page.\n *\n * Use `NotificationBanner` to surface important or persistent messages that\n * should remain visible until the user dismisses them.\n */\nexport const NotificationBanner = Object.assign(Base, {\n /** Renders an inline link styled for use inside a `NotificationBanner`. */\n Link: NBLink,\n});\n"],"names":["NBComponent","_a","children","visible","dismissible","sticky","onDismiss","id","forwardedRef","maxCollapsedHeight","onClick","actionButton","icon","className","otherProps","__rest","testId","isVisible","setVisible","useState","height","contentHeight","ref","contentRef","useResizeDetector","contentTextRef","useRef","isCollapsed","useApplyStyle","styles.tokens","contentText","formatUnitValue","undefined","useEffect","handleDismiss","event","stopPropagation","handleActionButtonOnClick","_jsxs","clsx","styles.wrapper","styles.wrapperSticky","styles.wrapperClickable","role","Layout","Content","formatId","_jsx","styles.iconContainer","styles.contentContainer","styles.content","styles.contentWrapper","styles.contentText","styles.contentTextCollapsed","Object","assign","styles.actionButton","type","ClickableIcon","styles.dismissButton","tabIndex","focusOutline","focusHighlight","CrossIcon","VisuallyHidden","NBLink","React","forwardRef","props","Typography","LinkBL","styles.contentLink","displayName","componentName","Base","NotificationBanner","Link"],"mappings":"itCAiBO,MAAMA,EAAeC,IAAA,IAAAC,SACxBA,EAAQC,QACRA,GAAU,EAAIC,YACdA,GAAc,EAAIC,OAClBA,GAAS,EAAIC,UACbA,EAASC,GACTA,EAAEC,aACFA,EAAYC,mBACZA,EAAkBC,QAClBA,EAAOC,aACPA,EAAYC,KACZA,EAAIC,UACJA,GAASZ,EACNa,EAAUC,EAAAd,EAbW,gJAkBxB,MAAMe,EAASF,EAAW,gBAEnBG,EAAWC,GAAcC,EAAkBhB,IAC1CiB,OAAQC,EAAgB,EAAGC,IAAKC,GAAeC,IACjDC,EAAiBC,EAAuB,MAExCC,EACFlB,GAAsBY,EAAgBZ,EAE1CmB,EAAcH,EAAgB,CAC1B,CAACI,EAAcC,YAAYrB,oBAAqBkB,EAC1CI,EAAgBtB,EAAoB,WACpCuB,IAMVC,GAAU,KACNf,EAAWf,EAAQ,GACpB,CAACA,IAKJ,MAAM+B,EAAiBC,IACnBA,EAAMC,kBACNlB,GAAW,GAEPd,GAAeE,GAAWA,GAAW,EAGvC+B,EACFF,KAEKxB,aAAY,EAAZA,EAAcD,WAInByB,EAAMC,kBACNzB,EAAaD,QAAQyB,GAAM,EAM/B,IAAKlB,EAAW,OAAO,KA6DvB,OACIqB,uBACIhB,IAAKd,EACLK,UAAW0B,EACPC,EACAnC,GAAUoC,IACR/B,GAAWgC,EACb7B,GAEJH,QAASA,EACTiC,KAAK,UACD7B,aAEJwB,EAACM,EAAOC,QAAO,CAACtC,GAAIuC,EAAS,YAAavC,GAAGL,SAAA,CACxCU,GACGmC,SAAKlC,UAAWmC,4BACXpC,IAGTmC,EAAA,MAAA,CAAKlC,UAAWoC,EAAuB/C,SA5C/C6C,EAAA,MAAA,CACIlC,UAAWqC,EAAc,cACZJ,EAAS,eAAgB9B,GAAOd,SAE7CoC,EAAA,MAAA,CAAKzB,UAAWsC,EAAqBjD,SAAA,CACjC6C,EAAA,MAAA,CACIzB,IAAKG,EACLZ,UAAW0B,EACPa,EACAzB,GAAe0B,GAClBnD,SAED6C,EAAA,MAAA,CAAKzB,IAAKC,EAAUrB,SAAGA,MA7B9BS,EAGDoC,EAAA,SAAAO,OAAAC,OAAA,CACI1C,UAAW2C,EACXjD,GAAIuC,EAAS,gBAAiBvC,iBACjBuC,EAAS,gBAAiB9B,GACvCyC,KAAK,UACD9C,EAAY,CAChBD,QAAS2B,EAAyBnC,SAEjCS,EAAaT,YAXI,YA8DjBE,GA9ET2C,EAACW,EAAa,CACV7C,UAAW8C,EACXC,SAAU,EACVlD,QAASwB,EACT3B,GAAIuC,EAAS,iBAAkBvC,GAAG,cACrBuC,EAAS,iBAAkB9B,GACxC6C,aAAa,UACbC,gBAAgB,EAChBL,KAAK,SAAQ,aACF,QAAOvD,SAElB6C,EAACgB,EAAS,CAAA,eAAA,SAqETrD,GA3BLqC,EAACiB,EAAc,CAAA9D,SACX6C,EAAA,SAAA,CAAA,aAAoB,mBAAoBU,KAAK,gBA2B3C,EAcRQ,EAASC,EAAMC,YAGnB,SAAgCC,EAAO9C,GACrC,OACIyB,EAACsB,EAAWC,OAAMhB,OAAAC,OAAA,CACdjC,IAAKA,EACLT,UAAW0B,EAAKgC,EAAoBH,EAAMvD,YACtCuD,GAGhB,IACCH,EAAgCO,YAAc,0BAK/C,MAAM1B,EAAW,CAAC2B,EAAuBlE,EAAK,YACnC,GAAGA,KAAMkE,IAMdC,EAAOR,EAAMC,YA/BD,CACdC,EACA9C,IAEOyB,EAAC/C,EAAWsD,OAAAC,OAAA,GAAKa,GAAO5D,aAAcc,OA4BhDoD,EAA8BF,YAAc,2BAQhCG,EAAqBrB,OAAOC,OAAOmB,EAAM,CAElDE,KAAMX"}
@@ -1,4 +1,4 @@
1
- .w17suq18{position:relative;left:0;top:0;width:100%;-webkit-transition:all var(--fds-motion-duration-800) var(--fds-motion-timing-ease-default);transition:all var(--fds-motion-duration-800) var(--fds-motion-timing-ease-default);background:var(--fds-colour-bg-inverse-subtle);border-radius:var(--fds-radius-none);z-index:25;cursor:default;}
1
+ @layer fds{.w17suq18{position:relative;left:0;top:0;width:100%;-webkit-transition:all var(--fds-motion-duration-800) var(--fds-motion-timing-ease-default);transition:all var(--fds-motion-duration-800) var(--fds-motion-timing-ease-default);background:var(--fds-colour-bg-inverse-subtle);border-radius:var(--fds-radius-none);z-index:25;cursor:default;}
2
2
  .w1ixs8gf{position:-webkit-sticky;position:sticky;}
3
3
  .w1trwg7u{cursor:pointer;}
4
4
  .cmwsx4o{-webkit-flex:1;-ms-flex:1;flex:1;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;padding:var(--fds-spacing-24) 0;}
@@ -9,4 +9,4 @@
9
9
  .c12st863{position:relative;color:var(--fds-colour-hyperlink-inverse);}.c12st863 svg{color:var(--fds-colour-icon-primary-inverse);}.c12st863:hover,.c12st863:active,.c12st863:visited,.c12st863:focus{color:var(--fds-colour-hyperlink-inverse);}.c12st863:hover svg,.c12st863:active svg,.c12st863:visited svg,.c12st863:focus svg{color:var(--fds-colour-icon-primary-inverse);}
10
10
  .d1hjtr0v{margin-right:calc(var(--fds-spacing-24) * -1);padding-left:var(--fds-spacing-16);height:-webkit-max-content;height:-moz-max-content;height:max-content;}.d1hjtr0v svg{height:1.5rem;width:1.5rem;color:var(--fds-colour-icon-inverse);}
11
11
  .azqyi5b{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--fds-spacing-4);-webkit-align-self:flex-start;-ms-flex-item-align:start;align-self:flex-start;margin-top:var(--fds-spacing-8);border:none;background:transparent;color:var(--fds-colour-hyperlink-inverse);font-family:var(--fds-font-family-body);font-variant:var(--fds-font-variant);font-size:var(--fds-font-body-size-md);font-weight:var(--fds-font-weight-semibold);line-height:var(--fds-font-body-lh-md);letter-spacing:var(--fds-font-body-ls-md);cursor:pointer;}
12
- .i6bp33n{height:1.5rem;width:1.5rem;margin:var(--fds-spacing-24) var(--fds-spacing-24) 0 0;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}.i6bp33n svg{height:100%;width:100%;color:var(--fds-colour-hyperlink-inverse);}
12
+ .i6bp33n{height:1.5rem;width:1.5rem;margin:var(--fds-spacing-24) var(--fds-spacing-24) 0 0;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;}.i6bp33n svg{height:100%;width:100%;color:var(--fds-colour-hyperlink-inverse);}}
@@ -1,27 +1,82 @@
1
1
  import type { TypographyLinkProps, TypographyProps } from "../typography";
2
+ /**
3
+ * Props for the `NotificationBanner` component.
4
+ *
5
+ * When `onClick` is provided, the entire banner becomes interactive and a
6
+ * visually hidden accessible button is rendered for keyboard and screen-reader
7
+ * users.
8
+ */
2
9
  export interface NotificationBannerProps extends React.HTMLAttributes<HTMLDivElement> {
3
10
  children?: React.ReactNode | undefined;
11
+ /**
12
+ * Whether the dismiss button is rendered. The caller is responsible
13
+ * for dismissing the banner in the callback.
14
+ *
15
+ * @default true
16
+ */
4
17
  dismissible?: boolean | undefined;
18
+ /**
19
+ * Controls the visibility of the banner.
20
+ *
21
+ * @default true
22
+ */
5
23
  visible?: boolean | undefined;
24
+ /**
25
+ * Whether the banner sticks to the top of the viewport while the page
26
+ * scrolls.
27
+ *
28
+ * @default true
29
+ */
6
30
  sticky?: boolean | undefined;
31
+ /**
32
+ * An optional icon element rendered at the leading edge of the banner.
33
+ */
7
34
  icon?: JSX.Element | undefined;
35
+ /**
36
+ * Called when the user activates the dismiss button and `dismissible` is `true`.
37
+ */
8
38
  onDismiss?: (() => void) | undefined;
9
39
  "data-testid"?: string | undefined;
10
- /** Specifies the maximum height of content, after which it is collapsed */
40
+ /**
41
+ * Maximum height in pixels for the content area. When the rendered content
42
+ * exceeds this value, the overflow is clipped.
43
+ */
11
44
  maxCollapsedHeight?: number | undefined;
12
- /** Action button that will be displayed */
45
+ /**
46
+ * An action button rendered inside the content area. When
47
+ * `actionButton.onClick` is provided it stops propagation to the banner's
48
+ * own `onClick` handler.
49
+ */
13
50
  actionButton?: React.ButtonHTMLAttributes<HTMLButtonElement> | undefined;
14
51
  }
52
+ /**
53
+ * Props for the `withNotificationBanner` HOC wrapper,
54
+ * extending `NotificationBannerProps` with a forwarded ref.
55
+ */
15
56
  export interface NotificationBannerWithForwardedRefProps extends NotificationBannerProps {
16
57
  forwardedRef?: React.Ref<HTMLDivElement> | undefined;
17
58
  }
59
+ /**
60
+ * Discriminant for `NotificationContentAttributes` content items.
61
+ *
62
+ * - `"text"` items are sanitized and injected as HTML paragraphs.
63
+ * - `"link"` items are rendered as `NotificationBanner.Link` elements.
64
+ */
18
65
  export type ContentType = "text" | "link";
66
+ /** Props for a `"link"` content item inside a notification banner. */
19
67
  export interface ContentLinkAttributes extends TypographyLinkProps {
20
68
  }
69
+ /** Props for a `"text"` content item inside a notification banner. */
21
70
  export interface ContentTextAttributes extends TypographyProps {
22
71
  }
72
+ /**
73
+ * A single content item for use with `withNotificationBanner`.
74
+ */
23
75
  export interface NotificationContentAttributes {
76
+ /** Determines how `content` is rendered inside the banner. */
24
77
  type: ContentType;
78
+ /** The text string or link label to display. */
25
79
  content: string;
80
+ /** Additional props forwarded to the rendered text or link element. */
26
81
  otherAttributes?: TypographyLinkProps | TypographyProps | undefined;
27
82
  }
@@ -1,3 +1,10 @@
1
1
  import type React from "react";
2
2
  import type { OtpInputProps, OtpInputRef } from "./types";
3
+ /**
4
+ * A field composed of individual inputs for a numeric one-time password
5
+ * with an in-built countdown mechanism.
6
+ *
7
+ * Use `OtpInput` when users must enter the one-time password (OTP)
8
+ * for multi-factored authentication methods.
9
+ */
3
10
  export declare const OtpInput: (props: OtpInputProps & React.RefAttributes<OtpInputRef>) => React.ReactElement | null;