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

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 (1304) hide show
  1. package/accordion/accordion-item.styles.js +1 -1
  2. package/accordion/accordion-item.styles.js.map +1 -1
  3. package/accordion/{accordion-item.styles_kchcad.css → accordion-item.styles_1j4eb32.css} +2 -2
  4. package/accordion/accordion.styles.js +1 -1
  5. package/{cjs/accordion/accordion.styles_ijglff.css → accordion/accordion.styles_bzrfrs.css} +1 -1
  6. package/alert/alert.styles.js +1 -1
  7. package/alert/alert.styles.js.map +1 -1
  8. package/{cjs/alert/alert.styles_1ygel36.css → alert/alert.styles_patwo2.css} +4 -4
  9. package/badge/badge.js +1 -1
  10. package/badge/badge.js.map +1 -1
  11. package/badge/badge.styles.js +1 -1
  12. package/badge/badge.styles_1c3c6wj.css +16 -0
  13. package/badge/types.d.ts +1 -1
  14. package/box-container/box-container.styles.js +1 -1
  15. package/box-container/box-container.styles.js.map +1 -1
  16. package/box-container/{box-container.styles_5y84d5.css → box-container.styles_5t2j9k.css} +2 -2
  17. package/breadcrumb/breadcrumb.js +1 -1
  18. package/breadcrumb/breadcrumb.js.map +1 -1
  19. package/button/button.styles.js +1 -1
  20. package/button/button.styles.js.map +1 -1
  21. package/button/{button.styles_bcpkzm.css → button.styles_1pxy0co.css} +3 -3
  22. package/calendar/calendar.js +1 -1
  23. package/calendar/calendar.js.map +1 -1
  24. package/cjs/accordion/accordion-item.styles.js +1 -1
  25. package/cjs/accordion/accordion-item.styles.js.map +1 -1
  26. package/cjs/accordion/{accordion-item.styles_kchcad.css → accordion-item.styles_1j4eb32.css} +2 -2
  27. package/cjs/accordion/accordion.styles.js +1 -1
  28. package/{accordion/accordion.styles_ijglff.css → cjs/accordion/accordion.styles_bzrfrs.css} +1 -1
  29. package/cjs/alert/alert.styles.js +1 -1
  30. package/cjs/alert/alert.styles.js.map +1 -1
  31. package/{alert/alert.styles_1ygel36.css → cjs/alert/alert.styles_patwo2.css} +4 -4
  32. package/cjs/badge/badge.js +1 -1
  33. package/cjs/badge/badge.js.map +1 -1
  34. package/cjs/badge/badge.styles.js +1 -1
  35. package/cjs/badge/badge.styles_1c3c6wj.css +16 -0
  36. package/cjs/box-container/box-container.styles.js +1 -1
  37. package/cjs/box-container/box-container.styles.js.map +1 -1
  38. package/cjs/box-container/{box-container.styles_5y84d5.css → box-container.styles_5t2j9k.css} +2 -2
  39. package/cjs/breadcrumb/breadcrumb.js +1 -1
  40. package/cjs/breadcrumb/breadcrumb.js.map +1 -1
  41. package/cjs/button/button.styles.js +1 -1
  42. package/cjs/button/button.styles.js.map +1 -1
  43. package/cjs/button/{button.styles_bcpkzm.css → button.styles_1pxy0co.css} +3 -3
  44. package/cjs/calendar/calendar.js +1 -1
  45. package/cjs/calendar/calendar.js.map +1 -1
  46. package/cjs/countdown-timer/countdown-timer.styles.js +1 -1
  47. package/cjs/countdown-timer/{countdown-timer.styles_k50tkw.css → countdown-timer.styles_ipn1b0.css} +1 -1
  48. package/cjs/dashed-border/dashed-border.js +1 -1
  49. package/cjs/dashed-border/dashed-border.js.map +1 -1
  50. package/cjs/data-table/data-table.js +1 -1
  51. package/cjs/data-table/data-table.js.map +1 -1
  52. package/cjs/data-table/data-table.styles.js +1 -1
  53. package/cjs/data-table/{data-table.styles_1nj2uzq.css → data-table.styles_1iqq1g7.css} +1 -1
  54. package/cjs/date-input/date-input.js +1 -1
  55. package/cjs/date-input/date-input.js.map +1 -1
  56. package/cjs/date-navigator/date-navigator.styles.js +1 -1
  57. package/cjs/date-navigator/date-navigator.styles.js.map +1 -1
  58. package/cjs/date-navigator/date-navigator.styles_wokh56.css +4 -0
  59. package/cjs/divider/divider.js.map +1 -1
  60. package/cjs/e-signature/e-signature-canvas.js +1 -1
  61. package/cjs/e-signature/e-signature-canvas.js.map +1 -1
  62. package/cjs/e-signature/e-signature.js +1 -1
  63. package/cjs/e-signature/e-signature.js.map +1 -1
  64. package/cjs/e-signature/e-signature.styles.js +1 -168
  65. package/cjs/e-signature/e-signature.styles.js.map +1 -1
  66. package/cjs/e-signature/e-signature.styles_lukd9f.css +17 -0
  67. package/cjs/error-display/error-display-data.js +1 -1
  68. package/cjs/error-display/error-display-data.js.map +1 -1
  69. package/cjs/external/lodash/get.js +1 -1
  70. package/cjs/external/lodash/get.js.map +1 -1
  71. package/cjs/file-download/file-download.js +1 -1
  72. package/cjs/file-download/file-download.js.map +1 -1
  73. package/cjs/file-download/file-download.styles.js +1 -32
  74. package/cjs/file-download/file-download.styles.js.map +1 -1
  75. package/cjs/file-download/file-download.styles_iggk8q.css +8 -0
  76. package/cjs/file-download/file-list-card/file-list-card.js +1 -1
  77. package/cjs/file-download/file-list-card/file-list-card.js.map +1 -1
  78. package/cjs/file-download/file-list-card/file-list-card.styles.js +1 -177
  79. package/cjs/file-download/file-list-card/file-list-card.styles.js.map +1 -1
  80. package/cjs/file-download/file-list-card/file-list-card.styles_oom8ii.css +16 -0
  81. package/cjs/file-upload/file-list/file-list.js +2 -0
  82. package/cjs/file-upload/file-list/file-list.js.map +1 -0
  83. package/cjs/file-upload/file-list/file-list.styles.js +2 -0
  84. package/cjs/file-upload/file-list/file-list.styles.js.map +1 -0
  85. package/cjs/file-upload/file-list/file-list.styles_1ea12kj.css +3 -0
  86. package/cjs/file-upload/file-list-item/file-list-item-thumbnail.styles.js +1 -1
  87. package/cjs/file-upload/file-list-item/{file-list-item-thumbnail.styles_1vrh1ve.css → file-list-item-thumbnail.styles_1y4si19.css} +1 -1
  88. package/cjs/file-upload/file-upload.js +1 -1
  89. package/cjs/file-upload/file-upload.js.map +1 -1
  90. package/cjs/filter/addons/filter-item-checkbox.styles.js +1 -1
  91. package/cjs/filter/addons/filter-item-checkbox.styles.js.map +1 -1
  92. package/cjs/filter/addons/{filter-item-checkbox.styles_18l87i2.css → filter-item-checkbox.styles_7degw7.css} +1 -1
  93. package/cjs/filter/filter-badge.js +2 -0
  94. package/cjs/filter/filter-badge.js.map +1 -0
  95. package/cjs/filter/filter-item-page.js +1 -1
  96. package/cjs/filter/filter-item-page.js.map +1 -1
  97. package/cjs/filter/filter-item.styles.js +1 -1
  98. package/cjs/filter/filter-item.styles.js.map +1 -1
  99. package/{filter/filter-item.styles_1e3v6qq.css → cjs/filter/filter-item.styles_cphjnj.css} +2 -2
  100. package/cjs/filter/filter-modal.js +1 -1
  101. package/cjs/filter/filter-modal.js.map +1 -1
  102. package/cjs/filter/filter-modal.styles.js +1 -1
  103. package/cjs/filter/filter-modal.styles.js.map +1 -1
  104. package/cjs/filter/filter-modal.styles_qw3xlg.css +10 -0
  105. package/cjs/filter/filter-sidebar.js +1 -1
  106. package/cjs/filter/filter-sidebar.js.map +1 -1
  107. package/cjs/filter/filter-sidebar.styles.js +1 -1
  108. package/cjs/filter/filter-sidebar.styles.js.map +1 -1
  109. package/cjs/filter/filter-sidebar.styles_1otwpjl.css +5 -0
  110. package/cjs/filter/filter.styles.js +1 -1
  111. package/cjs/filter/filter.styles.js.map +1 -1
  112. package/cjs/filter/{filter.styles_2fmaok.css → filter.styles_1ykijwm.css} +1 -1
  113. package/cjs/form/form-label.styles.js +1 -1
  114. package/cjs/form/form-label.styles.js.map +1 -1
  115. package/cjs/form/form-label.styles_11r0652.css +6 -0
  116. package/cjs/form/form-wrapper.js +1 -1
  117. package/cjs/form/form-wrapper.js.map +1 -1
  118. package/cjs/fullscreen-image-carousel/fullscreen-image-carousel.js +1 -1
  119. package/cjs/fullscreen-image-carousel/fullscreen-image-carousel.js.map +1 -1
  120. package/cjs/image-button/image-button.styles.js +1 -1
  121. package/cjs/image-button/{image-button.styles_qtt605.css → image-button.styles_6n1qsr.css} +1 -1
  122. package/cjs/index.js +1 -1
  123. package/cjs/input-group/input-group-list-addon.js +1 -1
  124. package/cjs/input-group/input-group-list-addon.js.map +1 -1
  125. package/cjs/input-group/input-group.styles.js +1 -1
  126. package/{input-group/input-group.styles_fpy81r.css → cjs/input-group/input-group.styles_bqye6f.css} +1 -1
  127. package/cjs/input-multi-select/input-multi-select.js +1 -1
  128. package/cjs/input-multi-select/input-multi-select.js.map +1 -1
  129. package/cjs/input-nested-multi-select/input-nested-multi-select.js +1 -1
  130. package/cjs/input-nested-multi-select/input-nested-multi-select.js.map +1 -1
  131. package/cjs/input-nested-select/input-nested-select.js +1 -1
  132. package/cjs/input-nested-select/input-nested-select.js.map +1 -1
  133. package/cjs/input-range-select/input-range-select.js +1 -1
  134. package/cjs/input-range-select/input-range-select.js.map +1 -1
  135. package/cjs/input-select/input-select.js +1 -1
  136. package/cjs/input-select/input-select.js.map +1 -1
  137. package/cjs/input-textarea/textarea-counter.styles.js +1 -1
  138. package/cjs/input-textarea/textarea-counter.styles.js.map +1 -1
  139. package/cjs/input-textarea/textarea-counter.styles_1n3wsnv.css +1 -0
  140. package/cjs/input-textarea/textarea.styles.js +1 -1
  141. package/cjs/input-textarea/textarea.styles_22z4n3.css +5 -0
  142. package/cjs/language-switcher/dropdown-panel.styles.js +1 -1
  143. package/cjs/language-switcher/dropdown-panel.styles.js.map +1 -1
  144. package/cjs/language-switcher/{dropdown-panel.styles_1z0n7qq.css → dropdown-panel.styles_1qsjf8d.css} +1 -1
  145. package/cjs/language-switcher/dropdown-variant.js +1 -1
  146. package/cjs/language-switcher/dropdown-variant.js.map +1 -1
  147. package/cjs/language-switcher/dropdown-variant.styles.js +1 -1
  148. package/cjs/language-switcher/dropdown-variant.styles_1vrdfky.css +2 -0
  149. package/cjs/language-switcher/link-container-variant.styles.js +1 -1
  150. package/cjs/language-switcher/{link-container-variant.styles_1blx9qm.css → link-container-variant.styles_1iw6zux.css} +1 -1
  151. package/cjs/layout/col-div.js +1 -1
  152. package/cjs/layout/col-div.js.map +1 -1
  153. package/cjs/link-list/link-list.styles.js +1 -1
  154. package/cjs/link-list/link-list.styles.js.map +1 -1
  155. package/{link-list/link-list.styles_1g33nb4.css → cjs/link-list/link-list.styles_m57vks.css} +2 -2
  156. package/cjs/local-nav/local-nav-dropdown/local-nav-dropdown.styles.js +1 -1
  157. package/{local-nav/local-nav-dropdown/local-nav-dropdown.styles_ftv36t.css → cjs/local-nav/local-nav-dropdown/local-nav-dropdown.styles_uhd4xl.css} +1 -1
  158. package/cjs/markup/markup.js +1 -1
  159. package/cjs/markup/markup.js.map +1 -1
  160. package/cjs/markup/markup.style.js +1 -1
  161. package/cjs/markup/markup.style.js.map +1 -1
  162. package/cjs/masked-input/masked-input.styles.js +1 -1
  163. package/cjs/masked-input/masked-input.styles.js.map +1 -1
  164. package/{masked-input/masked-input.styles_4i1qsy.css → cjs/masked-input/masked-input.styles_1cm388a.css} +2 -2
  165. package/cjs/masthead/masthead.js +1 -1
  166. package/cjs/masthead/masthead.js.map +1 -1
  167. package/cjs/modal/modal-box.styles.js +1 -1
  168. package/cjs/modal/modal-box.styles.js.map +1 -1
  169. package/cjs/modal/modal-box.styles_y52cts.css +11 -0
  170. package/cjs/modal/modal.js +1 -1
  171. package/cjs/modal/modal.js.map +1 -1
  172. package/cjs/modal/modal.styles.js +1 -1
  173. package/cjs/modal/modal.styles.js.map +1 -1
  174. package/cjs/modal/{modal.styles_1sav73f.css → modal.styles_1lbblx6.css} +1 -1
  175. package/cjs/modal-v2/modal-v2.js +1 -1
  176. package/cjs/modal-v2/modal-v2.js.map +1 -1
  177. package/cjs/modal-v2/modal-v2.styles.js +1 -1
  178. package/cjs/modal-v2/modal-v2.styles.js.map +1 -1
  179. package/cjs/modal-v2/modal-v2.styles_a8gv5i.css +3 -0
  180. package/cjs/modal-v2/slots/card.js +1 -1
  181. package/cjs/modal-v2/slots/card.js.map +1 -1
  182. package/cjs/navbar/navbar-items.styles.js +1 -1
  183. package/cjs/navbar/navbar-items.styles.js.map +1 -1
  184. package/cjs/navbar/{navbar-items.styles_i9cunu.css → navbar-items.styles_1i3ltot.css} +7 -7
  185. package/cjs/navbar/navbar.js +1 -1
  186. package/cjs/navbar/navbar.js.map +1 -1
  187. package/cjs/notification-banner/notification-banner.styles.js +1 -1
  188. package/cjs/notification-banner/notification-banner.styles.js.map +1 -1
  189. package/{notification-banner/notification-banner.styles_130loac.css → cjs/notification-banner/notification-banner.styles_uxlysy.css} +2 -2
  190. package/cjs/otp-verification/contact-input-section.js +1 -1
  191. package/cjs/otp-verification/contact-input-section.js.map +1 -1
  192. package/cjs/otp-verification/contact-input-section.styles.js +2 -0
  193. package/cjs/otp-verification/contact-input-section.styles.js.map +1 -0
  194. package/cjs/otp-verification/contact-input-section.styles_odrjvt.css +14 -0
  195. package/cjs/otp-verification/otp-verification.js +1 -1
  196. package/cjs/otp-verification/otp-verification.js.map +1 -1
  197. package/cjs/otp-verification/otp-verification.styles.js +2 -0
  198. package/cjs/otp-verification/otp-verification.styles.js.map +1 -0
  199. package/cjs/otp-verification/otp-verification.styles_dg9bm8.css +1 -0
  200. package/cjs/otp-verification/thumbnail/email-thumbnail.js +1 -21
  201. package/cjs/otp-verification/thumbnail/email-thumbnail.js.map +1 -1
  202. package/cjs/otp-verification/thumbnail/phone-thumbnail.js +1 -17
  203. package/cjs/otp-verification/thumbnail/phone-thumbnail.js.map +1 -1
  204. package/cjs/otp-verification/thumbnail/thumbnail.styles.js +2 -0
  205. package/cjs/otp-verification/thumbnail/thumbnail.styles.js.map +1 -0
  206. package/cjs/otp-verification/thumbnail/thumbnail.styles_shqylh.css +3 -0
  207. package/cjs/otp-verification/verification-section.js +1 -1
  208. package/cjs/otp-verification/verification-section.js.map +1 -1
  209. package/cjs/otp-verification/verification-section.styles.js +2 -0
  210. package/cjs/otp-verification/verification-section.styles.js.map +1 -0
  211. package/cjs/otp-verification/verification-section.styles_x8jj.css +5 -0
  212. package/cjs/pagination/pagination.styles.js +1 -1
  213. package/cjs/pagination/pagination.styles.js.map +1 -1
  214. package/{pagination/pagination.styles_1u898rb.css → cjs/pagination/pagination.styles_6bcgva.css} +3 -3
  215. package/cjs/pill/pill.styles.js +1 -1
  216. package/{pill/pill.styles_1wiyl8.css → cjs/pill/pill.styles_xwrniu.css} +1 -1
  217. package/cjs/predictive-text-input/predictive-text-input.js +1 -1
  218. package/cjs/predictive-text-input/predictive-text-input.js.map +1 -1
  219. package/cjs/schedule/const.js +1 -1
  220. package/cjs/schedule/const.js.map +1 -1
  221. package/cjs/schedule/schedule-day-view/schedule-day-view.js +1 -1
  222. package/cjs/schedule/schedule-day-view/schedule-day-view.js.map +1 -1
  223. package/cjs/schedule/schedule-day-view/schedule-day-view.styles.js +1 -152
  224. package/cjs/schedule/schedule-day-view/schedule-day-view.styles.js.map +1 -1
  225. package/cjs/schedule/schedule-day-view/schedule-day-view.styles_8ti149.css +30 -0
  226. package/cjs/schedule/schedule-header/schedule-header.js +1 -1
  227. package/cjs/schedule/schedule-header/schedule-header.js.map +1 -1
  228. package/cjs/schedule/schedule-header/schedule-header.styles.js +2 -0
  229. package/cjs/schedule/schedule-header/schedule-header.styles.js.map +1 -0
  230. package/cjs/schedule/schedule-header/schedule-header.styles_1n2u5vj.css +6 -0
  231. package/cjs/schedule/schedule-slot-content/schedule-slot-content.js +2 -0
  232. package/cjs/schedule/schedule-slot-content/schedule-slot-content.js.map +1 -0
  233. package/cjs/schedule/schedule-slot-content/style-helper.js +2 -0
  234. package/cjs/schedule/schedule-slot-content/style-helper.js.map +1 -0
  235. package/cjs/schedule/schedule-week-view/schedule-week-view.js +1 -1
  236. package/cjs/schedule/schedule-week-view/schedule-week-view.js.map +1 -1
  237. package/cjs/schedule/schedule-week-view/schedule-week-view.styles.js +1 -74
  238. package/cjs/schedule/schedule-week-view/schedule-week-view.styles.js.map +1 -1
  239. package/cjs/schedule/schedule-week-view/schedule-week-view.styles_x7x50m.css +10 -0
  240. package/cjs/schedule/schedule-week-view/time-cell.js +1 -1
  241. package/cjs/schedule/schedule-week-view/time-cell.js.map +1 -1
  242. package/cjs/schedule/schedule-week-view/time-cell.styles.js +1 -34
  243. package/cjs/schedule/schedule-week-view/time-cell.styles.js.map +1 -1
  244. package/cjs/schedule/schedule-week-view/time-cell.styles_1sorjz8.css +14 -0
  245. package/cjs/schedule/schedule-week-view/week-view-utils.js +1 -1
  246. package/cjs/schedule/schedule-week-view/week-view-utils.js.map +1 -1
  247. package/cjs/schedule/schedule.js +1 -1
  248. package/cjs/schedule/schedule.js.map +1 -1
  249. package/cjs/schedule/schedule.styles.js +1 -26
  250. package/cjs/schedule/schedule.styles.js.map +1 -1
  251. package/cjs/schedule/schedule.styles_fdy5a1.css +5 -0
  252. package/cjs/schedule/shared/with-optional-popover.js +1 -5
  253. package/cjs/schedule/shared/with-optional-popover.js.map +1 -1
  254. package/cjs/schedule/shared/with-optional-popover.styles.js +2 -0
  255. package/cjs/schedule/shared/with-optional-popover.styles.js.map +1 -0
  256. package/cjs/schedule/shared/with-optional-popover.styles_7mv3p2.css +1 -0
  257. package/cjs/schedule/time-indicator/time-indicator.js +1 -1
  258. package/cjs/schedule/time-indicator/time-indicator.js.map +1 -1
  259. package/cjs/schedule/time-indicator/time-indicator.styles.js +1 -33
  260. package/cjs/schedule/time-indicator/time-indicator.styles.js.map +1 -1
  261. package/cjs/schedule/time-indicator/time-indicator.styles_1eaxyes.css +6 -0
  262. package/cjs/select-histogram/select-histogram.js +1 -1
  263. package/cjs/select-histogram/select-histogram.js.map +1 -1
  264. package/cjs/select-histogram/select-histogram.styles.js +1 -1
  265. package/cjs/select-histogram/select-histogram.styles.js.map +1 -1
  266. package/cjs/select-histogram/{select-histogram.styles_11916eo.css → select-histogram.styles_n260dy.css} +1 -1
  267. package/cjs/shared/dropdown-list/dropdown-label.js +1 -1
  268. package/cjs/shared/dropdown-list/dropdown-label.js.map +1 -1
  269. package/cjs/shared/dropdown-list/dropdown-label.styles.js +1 -1
  270. package/cjs/shared/dropdown-list/dropdown-label.styles.js.map +1 -1
  271. package/{shared/dropdown-list/dropdown-label.styles_1dwmd8f.css → cjs/shared/dropdown-list/dropdown-label.styles_mloii0.css} +4 -4
  272. package/cjs/shared/dropdown-list/dropdown-list.styles.js +1 -1
  273. package/cjs/shared/dropdown-list/dropdown-list.styles.js.map +1 -1
  274. package/{shared/dropdown-list/dropdown-list.styles_1kt4zhf.css → cjs/shared/dropdown-list/dropdown-list.styles_konwm.css} +4 -4
  275. package/cjs/shared/dropdown-list/dropdown-search.styles.js +1 -1
  276. package/cjs/shared/dropdown-list/dropdown-search.styles.js.map +1 -1
  277. package/{shared/dropdown-list/dropdown-search.styles_4r9oma.css → cjs/shared/dropdown-list/dropdown-search.styles_1hc1gkh.css} +2 -2
  278. package/cjs/shared/dropdown-list/expandable-element.js +1 -1
  279. package/cjs/shared/dropdown-list/expandable-element.js.map +1 -1
  280. package/cjs/shared/dropdown-list/expandable-element.styles.js +1 -1
  281. package/cjs/shared/dropdown-list/expandable-element.styles.js.map +1 -1
  282. package/cjs/shared/dropdown-list/expandable-element.styles_rkkvqr.css +5 -0
  283. package/cjs/shared/dropdown-wrapper/dropdown-wrapper.styles.js +1 -1
  284. package/cjs/shared/dropdown-wrapper/dropdown-wrapper.styles.js.map +1 -1
  285. package/cjs/shared/dropdown-wrapper/dropdown-wrapper.styles_15hwwoj.css +3 -0
  286. package/cjs/shared/hooks/useViewport.js +1 -1
  287. package/cjs/shared/hooks/useViewport.js.map +1 -1
  288. package/cjs/shared/input-wrapper/input-wrapper.styles.js +1 -1
  289. package/cjs/shared/input-wrapper/{input-wrapper.styles_19fpzb.css → input-wrapper.styles_je6maw.css} +2 -2
  290. package/cjs/shared/internal-calendar/calendar-manager.styles.js +1 -1
  291. package/cjs/shared/internal-calendar/{calendar-manager.styles_1q13ylk.css → calendar-manager.styles_1iuq5zw.css} +1 -1
  292. package/cjs/shared/internal-calendar/day-cell/day-cell.styles.js +1 -1
  293. package/cjs/shared/internal-calendar/day-cell/day-cell.styles.js.map +1 -1
  294. package/{shared/internal-calendar/day-cell/day-cell.styles_vazxvn.css → cjs/shared/internal-calendar/day-cell/day-cell.styles_1t5oqc1.css} +1 -1
  295. package/cjs/shared/internal-calendar/internal-calendar-month.styles.js +1 -1
  296. package/{shared/internal-calendar/internal-calendar-month.styles_1pk3ynj.css → cjs/shared/internal-calendar/internal-calendar-month.styles_14oh57f.css} +1 -1
  297. package/cjs/shared/internal-calendar/internal-calendar-year.styles.js +1 -1
  298. package/cjs/shared/internal-calendar/internal-calendar-year.styles.js.map +1 -1
  299. package/cjs/shared/internal-calendar/{internal-calendar-year.styles_1azy42u.css → internal-calendar-year.styles_therlc.css} +1 -1
  300. package/cjs/shared/internal-calendar/single/single-cell.js +1 -1
  301. package/cjs/shared/internal-calendar/single/single-cell.js.map +1 -1
  302. package/cjs/shared/internal-calendar/standard/standard-calendar-day-view.styles.js +1 -1
  303. package/{shared/internal-calendar/standard/standard-calendar-day-view.styles_1dbvup3.css → cjs/shared/internal-calendar/standard/standard-calendar-day-view.styles_1bw26au.css} +1 -1
  304. package/cjs/shared/standalone-date-input/standalone-date-input.js +1 -1
  305. package/cjs/shared/standalone-date-input/standalone-date-input.js.map +1 -1
  306. package/cjs/shared/standalone-date-input/standalone-date-input.styles.js +1 -1
  307. package/cjs/shared/standalone-date-input/standalone-date-input.styles.js.map +1 -1
  308. package/cjs/shared/standalone-date-input/standalone-date-input.styles_157qo89.css +15 -0
  309. package/cjs/shared/time-slot/time-slot.js +1 -1
  310. package/cjs/shared/time-slot/time-slot.js.map +1 -1
  311. package/cjs/shared/time-slot/time-slot.styles.js +1 -1
  312. package/cjs/shared/time-slot/time-slot.styles.js.map +1 -1
  313. package/cjs/shared/time-slot/time-slot.styles_18s0to7.css +29 -0
  314. package/cjs/sidenav/sidenav-drawer-item.styles.js +1 -1
  315. package/cjs/sidenav/sidenav-drawer-item.styles.js.map +1 -1
  316. package/cjs/sidenav/{sidenav-drawer-item.styles_yp8cga.css → sidenav-drawer-item.styles_1ljnyx2.css} +1 -1
  317. package/cjs/sidenav/sidenav-drawer-subitem.styles.js +1 -1
  318. package/cjs/sidenav/sidenav-drawer-subitem.styles.js.map +1 -1
  319. package/cjs/sidenav/sidenav-drawer-subitem.styles_2y58kf.css +1 -0
  320. package/cjs/sidenav/sidenav-item.styles.js +1 -1
  321. package/cjs/sidenav/sidenav-item.styles.js.map +1 -1
  322. package/cjs/sidenav/{sidenav-item.styles_1eew8px.css → sidenav-item.styles_lqw3kh.css} +2 -2
  323. package/cjs/smart-app-banner/smart-app-banner.styles.js +1 -1
  324. package/cjs/smart-app-banner/smart-app-banner.styles.js.map +1 -1
  325. package/cjs/smart-app-banner/{smart-app-banner.styles_m5dtgh.css → smart-app-banner.styles_15u6yv4.css} +2 -2
  326. package/cjs/tab/tab-link-chain.styles.js +1 -1
  327. package/cjs/tab/tab-link-chain.styles.js.map +1 -1
  328. package/cjs/tab/{tab-link-chain.styles_1nreqrp.css → tab-link-chain.styles_49got4.css} +2 -2
  329. package/cjs/tag/tag.style.js +1 -1
  330. package/cjs/tag/{tag.style_10tn8i.css → tag.style_d98c53.css} +2 -2
  331. package/cjs/text-list/text-list.styles.js +1 -1
  332. package/cjs/text-list/text-list.styles.js.map +1 -1
  333. package/cjs/text-list/text-list.styles_w3fvyt.css +16 -0
  334. package/cjs/theme/index.js +1 -1
  335. package/cjs/theme/theme-provider/hooks.js +1 -1
  336. package/cjs/theme/theme-provider/hooks.js.map +1 -1
  337. package/cjs/theme/tokens/colour.js +1 -1
  338. package/cjs/theme/tokens/colour.js.map +1 -1
  339. package/cjs/theme/tokens/font.js +1 -1
  340. package/cjs/theme/tokens/font.js.map +1 -1
  341. package/cjs/theme/types.js +1 -1
  342. package/cjs/theme/types.js.map +1 -1
  343. package/cjs/theme/utils/css-variable.js +1 -1
  344. package/cjs/theme/utils/css-variable.js.map +1 -1
  345. package/cjs/theme/utils/font.js +1 -1
  346. package/cjs/theme/utils/font.js.map +1 -1
  347. package/cjs/theme/utils/token-resolver.js +1 -1
  348. package/cjs/theme/utils/token-resolver.js.map +1 -1
  349. package/cjs/theme/utils/use-design-token.js +1 -1
  350. package/cjs/theme/utils/use-design-token.js.map +1 -1
  351. package/cjs/theme/utils/use-media-query.js +1 -1
  352. package/cjs/theme/utils/use-media-query.js.map +1 -1
  353. package/cjs/time-range-picker/combobox-picker/combobox-picker.js +1 -1
  354. package/cjs/time-range-picker/combobox-picker/combobox-picker.js.map +1 -1
  355. package/cjs/time-slot-bar-week/consts.js +2 -0
  356. package/cjs/time-slot-bar-week/consts.js.map +1 -0
  357. package/cjs/time-slot-bar-week/time-slot-bar-week-days.js +1 -1
  358. package/cjs/time-slot-bar-week/time-slot-bar-week-days.js.map +1 -1
  359. package/cjs/time-slot-bar-week/time-slot-bar-week-days.styles.js +2 -0
  360. package/cjs/time-slot-bar-week/time-slot-bar-week-days.styles.js.map +1 -0
  361. package/cjs/time-slot-bar-week/time-slot-bar-week-days.styles_evdvs9.css +17 -0
  362. package/cjs/time-slot-bar-week/time-slot-bar-week.js +1 -1
  363. package/cjs/time-slot-bar-week/time-slot-bar-week.js.map +1 -1
  364. package/cjs/time-slot-bar-week/time-slot-bar-week.styles.js +2 -0
  365. package/cjs/time-slot-bar-week/time-slot-bar-week.styles.js.map +1 -0
  366. package/cjs/time-slot-bar-week/time-slot-bar-week.styles_11ybf42.css +1 -0
  367. package/cjs/time-slot-bar-week/time-slot-cell.js +2 -0
  368. package/cjs/time-slot-bar-week/time-slot-cell.js.map +1 -0
  369. package/cjs/time-slot-week-view/time-slot-week-days.js +1 -1
  370. package/cjs/time-slot-week-view/time-slot-week-days.js.map +1 -1
  371. package/cjs/time-slot-week-view/time-slot-week-days.styles.js +2 -0
  372. package/cjs/time-slot-week-view/time-slot-week-days.styles.js.map +1 -0
  373. package/cjs/time-slot-week-view/time-slot-week-days.styles_1h21vyw.css +9 -0
  374. package/cjs/time-slot-week-view/time-slot-week-view.js +1 -1
  375. package/cjs/time-slot-week-view/time-slot-week-view.js.map +1 -1
  376. package/cjs/time-slot-week-view/time-slot-week-view.styles.js +1 -9
  377. package/cjs/time-slot-week-view/time-slot-week-view.styles.js.map +1 -1
  378. package/cjs/time-slot-week-view/time-slot-week-view.styles_gqgsw2.css +1 -0
  379. package/cjs/timeline/timeline.styles.js +1 -1
  380. package/{timeline/timeline.styles_1wcnzot.css → cjs/timeline/timeline.styles_1jxzik4.css} +1 -1
  381. package/cjs/timepicker/timepicker.js +1 -1
  382. package/cjs/timepicker/timepicker.js.map +1 -1
  383. package/cjs/timepicker/timepicker.styles.js +1 -1
  384. package/cjs/timepicker/timepicker.styles.js.map +1 -1
  385. package/cjs/timepicker/timepicker.styles_1jm33yw.css +1 -0
  386. package/cjs/toast/toast.styles.js +1 -1
  387. package/cjs/toast/toast.styles.js.map +1 -1
  388. package/cjs/toast/{toast.styles_ngrlup.css → toast.styles_1e0l60w.css} +1 -1
  389. package/cjs/toggle/toggle.styles.js +1 -1
  390. package/cjs/toggle/toggle.styles.js.map +1 -1
  391. package/{toggle/toggle.styles_1yzqsu.css → cjs/toggle/toggle.styles_1t5qrye.css} +5 -5
  392. package/cjs/typography/typography.js +1 -1
  393. package/cjs/typography/typography.js.map +1 -1
  394. package/cjs/typography/typography.styles.js +1 -1
  395. package/cjs/typography/typography.styles.js.map +1 -1
  396. package/cjs/typography/typography.styles_1155j4c.css +11 -0
  397. package/cjs/uneditable-section/section-item.styles.js +1 -1
  398. package/cjs/uneditable-section/section-item.styles.js.map +1 -1
  399. package/cjs/uneditable-section/{section-item.styles_1dfjzc4.css → section-item.styles_mwx8ht.css} +2 -2
  400. package/cjs/util/is-styled-components.js +2 -0
  401. package/cjs/util/is-styled-components.js.map +1 -0
  402. package/cjs/util/styling-helper.js +1 -1
  403. package/cjs/util/styling-helper.js.map +1 -1
  404. package/codemod-utils.d.ts +1 -0
  405. package/codemods/codemod-utils.ts +17 -0
  406. package/codemods/index.ts +231 -75
  407. package/codemods/migrate-popover/index.ts +267 -0
  408. package/codemods/run-codemod.js +6 -53
  409. package/codemods/run-codemod.js.map +1 -1
  410. package/codemods/run-codemod.ts +7 -54
  411. package/countdown-timer/countdown-timer.styles.js +1 -1
  412. package/countdown-timer/{countdown-timer.styles_k50tkw.css → countdown-timer.styles_ipn1b0.css} +1 -1
  413. package/dashed-border/dashed-border.js +1 -1
  414. package/dashed-border/dashed-border.js.map +1 -1
  415. package/data-table/data-table.js +1 -1
  416. package/data-table/data-table.js.map +1 -1
  417. package/data-table/data-table.styles.js +1 -1
  418. package/data-table/{data-table.styles_1nj2uzq.css → data-table.styles_1iqq1g7.css} +1 -1
  419. package/date-input/date-input.js +1 -1
  420. package/date-input/date-input.js.map +1 -1
  421. package/date-navigator/date-navigator.styles.js +1 -1
  422. package/date-navigator/date-navigator.styles.js.map +1 -1
  423. package/date-navigator/date-navigator.styles_wokh56.css +4 -0
  424. package/divider/divider.js.map +1 -1
  425. package/e-signature/e-signature-canvas.js +1 -1
  426. package/e-signature/e-signature-canvas.js.map +1 -1
  427. package/e-signature/e-signature.js +1 -1
  428. package/e-signature/e-signature.js.map +1 -1
  429. package/e-signature/e-signature.styles.d.ts +17 -45
  430. package/e-signature/e-signature.styles.js +1 -168
  431. package/e-signature/e-signature.styles.js.map +1 -1
  432. package/e-signature/e-signature.styles_lukd9f.css +17 -0
  433. package/error-display/error-display-data.js +1 -1
  434. package/error-display/error-display-data.js.map +1 -1
  435. package/external/lodash/get.js +1 -1
  436. package/external/lodash/get.js.map +1 -1
  437. package/file-download/file-download.js +1 -1
  438. package/file-download/file-download.js.map +1 -1
  439. package/file-download/file-download.styles.d.ts +8 -11
  440. package/file-download/file-download.styles.js +1 -32
  441. package/file-download/file-download.styles.js.map +1 -1
  442. package/file-download/file-download.styles_iggk8q.css +8 -0
  443. package/file-download/file-list-card/file-list-card.js +1 -1
  444. package/file-download/file-list-card/file-list-card.js.map +1 -1
  445. package/file-download/file-list-card/file-list-card.styles.d.ts +16 -64
  446. package/file-download/file-list-card/file-list-card.styles.js +1 -177
  447. package/file-download/file-list-card/file-list-card.styles.js.map +1 -1
  448. package/file-download/file-list-card/file-list-card.styles_oom8ii.css +16 -0
  449. package/file-upload/{file-list.d.ts → file-list/file-list.d.ts} +1 -1
  450. package/file-upload/file-list/file-list.js +2 -0
  451. package/file-upload/file-list/file-list.js.map +1 -0
  452. package/file-upload/file-list/file-list.styles.js +2 -0
  453. package/file-upload/file-list/file-list.styles.js.map +1 -0
  454. package/file-upload/file-list/file-list.styles_1ea12kj.css +3 -0
  455. package/file-upload/file-list/index.d.ts +1 -0
  456. package/file-upload/file-list-item/file-list-item-thumbnail.styles.js +1 -1
  457. package/file-upload/file-list-item/{file-list-item-thumbnail.styles_1vrh1ve.css → file-list-item-thumbnail.styles_1y4si19.css} +1 -1
  458. package/file-upload/file-upload.js +1 -1
  459. package/file-upload/file-upload.js.map +1 -1
  460. package/filter/addons/filter-item-checkbox.styles.js +1 -1
  461. package/filter/addons/filter-item-checkbox.styles.js.map +1 -1
  462. package/filter/addons/{filter-item-checkbox.styles_18l87i2.css → filter-item-checkbox.styles_7degw7.css} +1 -1
  463. package/filter/filter-badge.d.ts +5 -0
  464. package/filter/filter-badge.js +2 -0
  465. package/filter/filter-badge.js.map +1 -0
  466. package/filter/filter-item-page.d.ts +1 -1
  467. package/filter/filter-item-page.js +1 -1
  468. package/filter/filter-item-page.js.map +1 -1
  469. package/filter/filter-item.styles.js +1 -1
  470. package/filter/filter-item.styles.js.map +1 -1
  471. package/{cjs/filter/filter-item.styles_1e3v6qq.css → filter/filter-item.styles_cphjnj.css} +2 -2
  472. package/filter/filter-modal.d.ts +1 -1
  473. package/filter/filter-modal.js +1 -1
  474. package/filter/filter-modal.js.map +1 -1
  475. package/filter/filter-modal.styles.d.ts +2 -0
  476. package/filter/filter-modal.styles.js +1 -1
  477. package/filter/filter-modal.styles.js.map +1 -1
  478. package/filter/filter-modal.styles_qw3xlg.css +10 -0
  479. package/filter/filter-sidebar.d.ts +1 -1
  480. package/filter/filter-sidebar.js +1 -1
  481. package/filter/filter-sidebar.js.map +1 -1
  482. package/filter/filter-sidebar.styles.d.ts +1 -0
  483. package/filter/filter-sidebar.styles.js +1 -1
  484. package/filter/filter-sidebar.styles.js.map +1 -1
  485. package/filter/filter-sidebar.styles_1otwpjl.css +5 -0
  486. package/filter/filter.d.ts +3 -3
  487. package/filter/filter.styles.js +1 -1
  488. package/filter/filter.styles.js.map +1 -1
  489. package/filter/{filter.styles_2fmaok.css → filter.styles_1ykijwm.css} +1 -1
  490. package/filter/types.d.ts +2 -0
  491. package/form/form-label.styles.js +1 -1
  492. package/form/form-label.styles.js.map +1 -1
  493. package/form/form-label.styles_11r0652.css +6 -0
  494. package/form/form-wrapper.js +1 -1
  495. package/form/form-wrapper.js.map +1 -1
  496. package/fullscreen-image-carousel/fullscreen-image-carousel.js +1 -1
  497. package/fullscreen-image-carousel/fullscreen-image-carousel.js.map +1 -1
  498. package/image-button/image-button.styles.js +1 -1
  499. package/image-button/{image-button.styles_qtt605.css → image-button.styles_6n1qsr.css} +1 -1
  500. package/index.d.ts +0 -1
  501. package/index.js +1 -1
  502. package/input-group/input-group-list-addon.js +1 -1
  503. package/input-group/input-group-list-addon.js.map +1 -1
  504. package/input-group/input-group.styles.js +1 -1
  505. package/{cjs/input-group/input-group.styles_fpy81r.css → input-group/input-group.styles_bqye6f.css} +1 -1
  506. package/input-multi-select/input-multi-select.js +1 -1
  507. package/input-multi-select/input-multi-select.js.map +1 -1
  508. package/input-nested-multi-select/input-nested-multi-select.js +1 -1
  509. package/input-nested-multi-select/input-nested-multi-select.js.map +1 -1
  510. package/input-nested-select/input-nested-select.js +1 -1
  511. package/input-nested-select/input-nested-select.js.map +1 -1
  512. package/input-range-select/input-range-select.js +1 -1
  513. package/input-range-select/input-range-select.js.map +1 -1
  514. package/input-select/input-select.js +1 -1
  515. package/input-select/input-select.js.map +1 -1
  516. package/input-textarea/textarea-counter.styles.js +1 -1
  517. package/input-textarea/textarea-counter.styles.js.map +1 -1
  518. package/input-textarea/textarea-counter.styles_1n3wsnv.css +1 -0
  519. package/input-textarea/textarea.styles.js +1 -1
  520. package/input-textarea/textarea.styles_22z4n3.css +5 -0
  521. package/language-switcher/dropdown-panel.styles.js +1 -1
  522. package/language-switcher/dropdown-panel.styles.js.map +1 -1
  523. package/language-switcher/{dropdown-panel.styles_1z0n7qq.css → dropdown-panel.styles_1qsjf8d.css} +1 -1
  524. package/language-switcher/dropdown-variant.js +1 -1
  525. package/language-switcher/dropdown-variant.js.map +1 -1
  526. package/language-switcher/dropdown-variant.styles.js +1 -1
  527. package/language-switcher/dropdown-variant.styles_1vrdfky.css +2 -0
  528. package/language-switcher/link-container-variant.styles.js +1 -1
  529. package/language-switcher/{link-container-variant.styles_1blx9qm.css → link-container-variant.styles_1iw6zux.css} +1 -1
  530. package/layout/col-div.js +1 -1
  531. package/layout/col-div.js.map +1 -1
  532. package/layout/types.d.ts +8 -11
  533. package/link-list/link-list.styles.js +1 -1
  534. package/link-list/link-list.styles.js.map +1 -1
  535. package/{cjs/link-list/link-list.styles_1g33nb4.css → link-list/link-list.styles_m57vks.css} +2 -2
  536. package/local-nav/local-nav-dropdown/local-nav-dropdown.styles.js +1 -1
  537. package/{cjs/local-nav/local-nav-dropdown/local-nav-dropdown.styles_ftv36t.css → local-nav/local-nav-dropdown/local-nav-dropdown.styles_uhd4xl.css} +1 -1
  538. package/markup/markup.js +1 -1
  539. package/markup/markup.js.map +1 -1
  540. package/markup/markup.style.js +1 -1
  541. package/markup/markup.style.js.map +1 -1
  542. package/markup/types.d.ts +2 -1
  543. package/masked-input/masked-input.styles.js +1 -1
  544. package/masked-input/masked-input.styles.js.map +1 -1
  545. package/{cjs/masked-input/masked-input.styles_4i1qsy.css → masked-input/masked-input.styles_1cm388a.css} +2 -2
  546. package/masthead/masthead.js +1 -1
  547. package/masthead/masthead.js.map +1 -1
  548. package/modal/modal-box.styles.js +1 -1
  549. package/modal/modal-box.styles.js.map +1 -1
  550. package/modal/modal-box.styles_y52cts.css +11 -0
  551. package/modal/modal.js +1 -1
  552. package/modal/modal.js.map +1 -1
  553. package/modal/modal.styles.d.ts +4 -1
  554. package/modal/modal.styles.js +1 -1
  555. package/modal/modal.styles.js.map +1 -1
  556. package/modal/{modal.styles_1sav73f.css → modal.styles_1lbblx6.css} +1 -1
  557. package/modal-v2/modal-v2.js +1 -1
  558. package/modal-v2/modal-v2.js.map +1 -1
  559. package/modal-v2/modal-v2.styles.d.ts +0 -1
  560. package/modal-v2/modal-v2.styles.js +1 -1
  561. package/modal-v2/modal-v2.styles.js.map +1 -1
  562. package/modal-v2/modal-v2.styles_a8gv5i.css +3 -0
  563. package/modal-v2/slots/card.js +1 -1
  564. package/modal-v2/slots/card.js.map +1 -1
  565. package/navbar/navbar-items.styles.js +1 -1
  566. package/navbar/navbar-items.styles.js.map +1 -1
  567. package/navbar/{navbar-items.styles_i9cunu.css → navbar-items.styles_1i3ltot.css} +7 -7
  568. package/navbar/navbar.js +1 -1
  569. package/navbar/navbar.js.map +1 -1
  570. package/notification-banner/notification-banner.styles.js +1 -1
  571. package/notification-banner/notification-banner.styles.js.map +1 -1
  572. package/{cjs/notification-banner/notification-banner.styles_130loac.css → notification-banner/notification-banner.styles_uxlysy.css} +2 -2
  573. package/otp-verification/contact-input-section.js +1 -1
  574. package/otp-verification/contact-input-section.js.map +1 -1
  575. package/otp-verification/contact-input-section.styles.d.ts +14 -0
  576. package/otp-verification/contact-input-section.styles.js +2 -0
  577. package/otp-verification/contact-input-section.styles.js.map +1 -0
  578. package/otp-verification/contact-input-section.styles_odrjvt.css +14 -0
  579. package/otp-verification/otp-verification.js +1 -1
  580. package/otp-verification/otp-verification.js.map +1 -1
  581. package/otp-verification/otp-verification.styles.d.ts +1 -0
  582. package/otp-verification/otp-verification.styles.js +2 -0
  583. package/otp-verification/otp-verification.styles.js.map +1 -0
  584. package/otp-verification/otp-verification.styles_dg9bm8.css +1 -0
  585. package/otp-verification/thumbnail/email-thumbnail.d.ts +1 -3
  586. package/otp-verification/thumbnail/email-thumbnail.js +1 -21
  587. package/otp-verification/thumbnail/email-thumbnail.js.map +1 -1
  588. package/otp-verification/thumbnail/phone-thumbnail.d.ts +1 -3
  589. package/otp-verification/thumbnail/phone-thumbnail.js +1 -17
  590. package/otp-verification/thumbnail/phone-thumbnail.js.map +1 -1
  591. package/otp-verification/thumbnail/thumbnail.styles.d.ts +3 -0
  592. package/otp-verification/thumbnail/thumbnail.styles.js +2 -0
  593. package/otp-verification/thumbnail/thumbnail.styles.js.map +1 -0
  594. package/otp-verification/thumbnail/thumbnail.styles_shqylh.css +3 -0
  595. package/otp-verification/verification-section.js +1 -1
  596. package/otp-verification/verification-section.js.map +1 -1
  597. package/otp-verification/verification-section.styles.d.ts +5 -0
  598. package/otp-verification/verification-section.styles.js +2 -0
  599. package/otp-verification/verification-section.styles.js.map +1 -0
  600. package/otp-verification/verification-section.styles_x8jj.css +5 -0
  601. package/package.json +14 -9
  602. package/pagination/pagination.styles.js +1 -1
  603. package/pagination/pagination.styles.js.map +1 -1
  604. package/{cjs/pagination/pagination.styles_1u898rb.css → pagination/pagination.styles_6bcgva.css} +3 -3
  605. package/pill/pill.styles.js +1 -1
  606. package/{cjs/pill/pill.styles_1wiyl8.css → pill/pill.styles_xwrniu.css} +1 -1
  607. package/predictive-text-input/predictive-text-input.js +1 -1
  608. package/predictive-text-input/predictive-text-input.js.map +1 -1
  609. package/schedule/const.js +1 -1
  610. package/schedule/const.js.map +1 -1
  611. package/schedule/schedule-day-view/schedule-day-view.js +1 -1
  612. package/schedule/schedule-day-view/schedule-day-view.js.map +1 -1
  613. package/schedule/schedule-day-view/schedule-day-view.styles.d.ts +39 -99
  614. package/schedule/schedule-day-view/schedule-day-view.styles.js +1 -152
  615. package/schedule/schedule-day-view/schedule-day-view.styles.js.map +1 -1
  616. package/schedule/schedule-day-view/schedule-day-view.styles_8ti149.css +30 -0
  617. package/schedule/schedule-day-view/types.d.ts +2 -10
  618. package/schedule/schedule-header/schedule-header.js +1 -1
  619. package/schedule/schedule-header/schedule-header.js.map +1 -1
  620. package/schedule/schedule-header/schedule-header.styles.d.ts +7 -0
  621. package/schedule/schedule-header/schedule-header.styles.js +2 -0
  622. package/schedule/schedule-header/schedule-header.styles.js.map +1 -0
  623. package/schedule/schedule-header/schedule-header.styles_1n2u5vj.css +6 -0
  624. package/schedule/schedule-slot-content/index.d.ts +4 -0
  625. package/schedule/schedule-slot-content/schedule-slot-content.d.ts +21 -0
  626. package/schedule/schedule-slot-content/schedule-slot-content.js +2 -0
  627. package/schedule/schedule-slot-content/schedule-slot-content.js.map +1 -0
  628. package/schedule/schedule-slot-content/style-helper.d.ts +8 -0
  629. package/schedule/schedule-slot-content/style-helper.js +2 -0
  630. package/schedule/schedule-slot-content/style-helper.js.map +1 -0
  631. package/schedule/schedule-week-view/schedule-week-view.js +1 -1
  632. package/schedule/schedule-week-view/schedule-week-view.js.map +1 -1
  633. package/schedule/schedule-week-view/schedule-week-view.styles.d.ts +15 -32
  634. package/schedule/schedule-week-view/schedule-week-view.styles.js +1 -74
  635. package/schedule/schedule-week-view/schedule-week-view.styles.js.map +1 -1
  636. package/schedule/schedule-week-view/schedule-week-view.styles_x7x50m.css +10 -0
  637. package/schedule/schedule-week-view/time-cell.js +1 -1
  638. package/schedule/schedule-week-view/time-cell.js.map +1 -1
  639. package/schedule/schedule-week-view/time-cell.styles.d.ts +23 -14
  640. package/schedule/schedule-week-view/time-cell.styles.js +1 -34
  641. package/schedule/schedule-week-view/time-cell.styles.js.map +1 -1
  642. package/schedule/schedule-week-view/time-cell.styles_1sorjz8.css +14 -0
  643. package/schedule/schedule-week-view/types.d.ts +2 -15
  644. package/schedule/schedule-week-view/week-view-utils.js +1 -1
  645. package/schedule/schedule-week-view/week-view-utils.js.map +1 -1
  646. package/schedule/schedule.js +1 -1
  647. package/schedule/schedule.js.map +1 -1
  648. package/schedule/schedule.styles.d.ts +5 -8
  649. package/schedule/schedule.styles.js +1 -26
  650. package/schedule/schedule.styles.js.map +1 -1
  651. package/schedule/schedule.styles_fdy5a1.css +5 -0
  652. package/schedule/shared/with-optional-popover.d.ts +1 -1
  653. package/schedule/shared/with-optional-popover.js +1 -5
  654. package/schedule/shared/with-optional-popover.js.map +1 -1
  655. package/schedule/shared/with-optional-popover.styles.d.ts +1 -0
  656. package/schedule/shared/with-optional-popover.styles.js +2 -0
  657. package/schedule/shared/with-optional-popover.styles.js.map +1 -0
  658. package/schedule/shared/with-optional-popover.styles_7mv3p2.css +1 -0
  659. package/schedule/time-indicator/time-indicator.js +1 -1
  660. package/schedule/time-indicator/time-indicator.js.map +1 -1
  661. package/schedule/time-indicator/time-indicator.styles.d.ts +11 -28
  662. package/schedule/time-indicator/time-indicator.styles.js +1 -33
  663. package/schedule/time-indicator/time-indicator.styles.js.map +1 -1
  664. package/schedule/time-indicator/time-indicator.styles_1eaxyes.css +6 -0
  665. package/schedule/types.d.ts +10 -0
  666. package/select-histogram/select-histogram.js +1 -1
  667. package/select-histogram/select-histogram.js.map +1 -1
  668. package/select-histogram/select-histogram.styles.js +1 -1
  669. package/select-histogram/select-histogram.styles.js.map +1 -1
  670. package/select-histogram/{select-histogram.styles_11916eo.css → select-histogram.styles_n260dy.css} +1 -1
  671. package/shared/dropdown-list/dropdown-label.js +1 -1
  672. package/shared/dropdown-list/dropdown-label.js.map +1 -1
  673. package/shared/dropdown-list/dropdown-label.styles.js +1 -1
  674. package/shared/dropdown-list/dropdown-label.styles.js.map +1 -1
  675. package/{cjs/shared/dropdown-list/dropdown-label.styles_1dwmd8f.css → shared/dropdown-list/dropdown-label.styles_mloii0.css} +4 -4
  676. package/shared/dropdown-list/dropdown-list.styles.js +1 -1
  677. package/shared/dropdown-list/dropdown-list.styles.js.map +1 -1
  678. package/{cjs/shared/dropdown-list/dropdown-list.styles_1kt4zhf.css → shared/dropdown-list/dropdown-list.styles_konwm.css} +4 -4
  679. package/shared/dropdown-list/dropdown-search.styles.js +1 -1
  680. package/shared/dropdown-list/dropdown-search.styles.js.map +1 -1
  681. package/{cjs/shared/dropdown-list/dropdown-search.styles_4r9oma.css → shared/dropdown-list/dropdown-search.styles_1hc1gkh.css} +2 -2
  682. package/shared/dropdown-list/expandable-element.js +1 -1
  683. package/shared/dropdown-list/expandable-element.js.map +1 -1
  684. package/shared/dropdown-list/expandable-element.styles.d.ts +0 -1
  685. package/shared/dropdown-list/expandable-element.styles.js +1 -1
  686. package/shared/dropdown-list/expandable-element.styles.js.map +1 -1
  687. package/shared/dropdown-list/expandable-element.styles_rkkvqr.css +5 -0
  688. package/shared/dropdown-wrapper/dropdown-wrapper.styles.js +1 -1
  689. package/shared/dropdown-wrapper/dropdown-wrapper.styles.js.map +1 -1
  690. package/shared/dropdown-wrapper/dropdown-wrapper.styles_15hwwoj.css +3 -0
  691. package/shared/hooks/useViewport.d.ts +7 -2
  692. package/shared/hooks/useViewport.js +1 -1
  693. package/shared/hooks/useViewport.js.map +1 -1
  694. package/shared/input-wrapper/input-wrapper.styles.js +1 -1
  695. package/shared/input-wrapper/{input-wrapper.styles_19fpzb.css → input-wrapper.styles_je6maw.css} +2 -2
  696. package/shared/internal-calendar/calendar-manager.styles.js +1 -1
  697. package/shared/internal-calendar/{calendar-manager.styles_1q13ylk.css → calendar-manager.styles_1iuq5zw.css} +1 -1
  698. package/shared/internal-calendar/day-cell/day-cell.styles.js +1 -1
  699. package/shared/internal-calendar/day-cell/day-cell.styles.js.map +1 -1
  700. package/{cjs/shared/internal-calendar/day-cell/day-cell.styles_vazxvn.css → shared/internal-calendar/day-cell/day-cell.styles_1t5oqc1.css} +1 -1
  701. package/shared/internal-calendar/internal-calendar-month.styles.js +1 -1
  702. package/{cjs/shared/internal-calendar/internal-calendar-month.styles_1pk3ynj.css → shared/internal-calendar/internal-calendar-month.styles_14oh57f.css} +1 -1
  703. package/shared/internal-calendar/internal-calendar-year.styles.js +1 -1
  704. package/shared/internal-calendar/internal-calendar-year.styles.js.map +1 -1
  705. package/shared/internal-calendar/{internal-calendar-year.styles_1azy42u.css → internal-calendar-year.styles_therlc.css} +1 -1
  706. package/shared/internal-calendar/single/single-cell.js +1 -1
  707. package/shared/internal-calendar/single/single-cell.js.map +1 -1
  708. package/shared/internal-calendar/standard/standard-calendar-day-view.styles.js +1 -1
  709. package/{cjs/shared/internal-calendar/standard/standard-calendar-day-view.styles_1dbvup3.css → shared/internal-calendar/standard/standard-calendar-day-view.styles_1bw26au.css} +1 -1
  710. package/shared/standalone-date-input/standalone-date-input.js +1 -1
  711. package/shared/standalone-date-input/standalone-date-input.js.map +1 -1
  712. package/shared/standalone-date-input/standalone-date-input.styles.d.ts +2 -0
  713. package/shared/standalone-date-input/standalone-date-input.styles.js +1 -1
  714. package/shared/standalone-date-input/standalone-date-input.styles.js.map +1 -1
  715. package/shared/standalone-date-input/standalone-date-input.styles_157qo89.css +15 -0
  716. package/shared/time-slot/time-slot.d.ts +1 -0
  717. package/shared/time-slot/time-slot.js +1 -1
  718. package/shared/time-slot/time-slot.js.map +1 -1
  719. package/shared/time-slot/time-slot.styles.d.ts +2 -0
  720. package/shared/time-slot/time-slot.styles.js +1 -1
  721. package/shared/time-slot/time-slot.styles.js.map +1 -1
  722. package/shared/time-slot/time-slot.styles_18s0to7.css +29 -0
  723. package/sidenav/sidenav-drawer-item.styles.js +1 -1
  724. package/sidenav/sidenav-drawer-item.styles.js.map +1 -1
  725. package/sidenav/{sidenav-drawer-item.styles_yp8cga.css → sidenav-drawer-item.styles_1ljnyx2.css} +1 -1
  726. package/sidenav/sidenav-drawer-subitem.styles.js +1 -1
  727. package/sidenav/sidenav-drawer-subitem.styles.js.map +1 -1
  728. package/sidenav/sidenav-drawer-subitem.styles_2y58kf.css +1 -0
  729. package/sidenav/sidenav-item.styles.js +1 -1
  730. package/sidenav/sidenav-item.styles.js.map +1 -1
  731. package/sidenav/{sidenav-item.styles_1eew8px.css → sidenav-item.styles_lqw3kh.css} +2 -2
  732. package/smart-app-banner/smart-app-banner.styles.js +1 -1
  733. package/smart-app-banner/smart-app-banner.styles.js.map +1 -1
  734. package/smart-app-banner/{smart-app-banner.styles_m5dtgh.css → smart-app-banner.styles_15u6yv4.css} +2 -2
  735. package/tab/tab-link-chain.styles.js +1 -1
  736. package/tab/tab-link-chain.styles.js.map +1 -1
  737. package/tab/{tab-link-chain.styles_1nreqrp.css → tab-link-chain.styles_49got4.css} +2 -2
  738. package/tag/tag.style.js +1 -1
  739. package/tag/{tag.style_10tn8i.css → tag.style_d98c53.css} +2 -2
  740. package/text-list/text-list.styles.js +1 -1
  741. package/text-list/text-list.styles.js.map +1 -1
  742. package/text-list/text-list.styles_w3fvyt.css +16 -0
  743. package/theme/index.d.ts +4 -1
  744. package/theme/index.js +1 -1
  745. package/theme/styles/a11y-playground.css +30 -1
  746. package/theme/styles/bookingsg.css +30 -1
  747. package/theme/styles/careercompass.css +516 -0
  748. package/theme/styles/ccube.css +28 -0
  749. package/theme/styles/default.css +2 -1
  750. package/theme/styles/imda.css +30 -1
  751. package/theme/styles/lifesg.css +28 -0
  752. package/theme/styles/mylegacy.css +30 -1
  753. package/theme/styles/oneservice.css +28 -0
  754. package/theme/styles/pa.css +30 -1
  755. package/theme/styles/rbs.css +28 -0
  756. package/theme/styles/sgw-digital-lobby.css +32 -3
  757. package/theme/styles/smgs.css +516 -0
  758. package/theme/styles/spf.css +143 -114
  759. package/theme/styles/supportgowhere.css +30 -1
  760. package/theme/theme-provider/hooks.d.ts +2 -1
  761. package/theme/theme-provider/hooks.js +1 -1
  762. package/theme/theme-provider/hooks.js.map +1 -1
  763. package/theme/tokens/colour.d.ts +28 -0
  764. package/theme/tokens/colour.js +1 -1
  765. package/theme/tokens/colour.js.map +1 -1
  766. package/theme/tokens/font.d.ts +4 -2
  767. package/theme/tokens/font.js +1 -1
  768. package/theme/tokens/font.js.map +1 -1
  769. package/theme/types.d.ts +1 -1
  770. package/theme/types.js +1 -1
  771. package/theme/types.js.map +1 -1
  772. package/theme/utils/css-variable.d.ts +0 -5
  773. package/theme/utils/css-variable.js +1 -1
  774. package/theme/utils/css-variable.js.map +1 -1
  775. package/theme/utils/font.d.ts +2 -2
  776. package/theme/utils/font.js +1 -1
  777. package/theme/utils/font.js.map +1 -1
  778. package/theme/utils/token-resolver.js +1 -1
  779. package/theme/utils/token-resolver.js.map +1 -1
  780. package/theme/utils/use-design-token.js +1 -1
  781. package/theme/utils/use-design-token.js.map +1 -1
  782. package/theme/utils/use-media-query.d.ts +1 -2
  783. package/theme/utils/use-media-query.js +1 -1
  784. package/theme/utils/use-media-query.js.map +1 -1
  785. package/time-range-picker/combobox-picker/combobox-picker.js +1 -1
  786. package/time-range-picker/combobox-picker/combobox-picker.js.map +1 -1
  787. package/time-slot-bar-week/consts.d.ts +3 -0
  788. package/time-slot-bar-week/consts.js +2 -0
  789. package/time-slot-bar-week/consts.js.map +1 -0
  790. package/time-slot-bar-week/time-slot-bar-week-days.js +1 -1
  791. package/time-slot-bar-week/time-slot-bar-week-days.js.map +1 -1
  792. package/time-slot-bar-week/time-slot-bar-week-days.styles.d.ts +25 -0
  793. package/time-slot-bar-week/time-slot-bar-week-days.styles.js +2 -0
  794. package/time-slot-bar-week/time-slot-bar-week-days.styles.js.map +1 -0
  795. package/time-slot-bar-week/time-slot-bar-week-days.styles_evdvs9.css +17 -0
  796. package/time-slot-bar-week/time-slot-bar-week.js +1 -1
  797. package/time-slot-bar-week/time-slot-bar-week.js.map +1 -1
  798. package/time-slot-bar-week/time-slot-bar-week.styles.d.ts +1 -0
  799. package/time-slot-bar-week/time-slot-bar-week.styles.js +2 -0
  800. package/time-slot-bar-week/time-slot-bar-week.styles.js.map +1 -0
  801. package/time-slot-bar-week/time-slot-bar-week.styles_11ybf42.css +1 -0
  802. package/time-slot-bar-week/time-slot-cell.d.ts +28 -0
  803. package/time-slot-bar-week/time-slot-cell.js +2 -0
  804. package/time-slot-bar-week/time-slot-cell.js.map +1 -0
  805. package/time-slot-week-view/time-slot-week-days.js +1 -1
  806. package/time-slot-week-view/time-slot-week-days.js.map +1 -1
  807. package/time-slot-week-view/time-slot-week-days.styles.d.ts +14 -0
  808. package/time-slot-week-view/time-slot-week-days.styles.js +2 -0
  809. package/time-slot-week-view/time-slot-week-days.styles.js.map +1 -0
  810. package/time-slot-week-view/time-slot-week-days.styles_1h21vyw.css +9 -0
  811. package/time-slot-week-view/time-slot-week-view.js +1 -1
  812. package/time-slot-week-view/time-slot-week-view.js.map +1 -1
  813. package/time-slot-week-view/time-slot-week-view.styles.d.ts +1 -1
  814. package/time-slot-week-view/time-slot-week-view.styles.js +1 -9
  815. package/time-slot-week-view/time-slot-week-view.styles.js.map +1 -1
  816. package/time-slot-week-view/time-slot-week-view.styles_gqgsw2.css +1 -0
  817. package/timeline/timeline.styles.js +1 -1
  818. package/{cjs/timeline/timeline.styles_1wcnzot.css → timeline/timeline.styles_1jxzik4.css} +1 -1
  819. package/timepicker/timepicker.js +1 -1
  820. package/timepicker/timepicker.js.map +1 -1
  821. package/timepicker/timepicker.styles.js +1 -1
  822. package/timepicker/timepicker.styles.js.map +1 -1
  823. package/timepicker/timepicker.styles_1jm33yw.css +1 -0
  824. package/toast/toast.styles.js +1 -1
  825. package/toast/toast.styles.js.map +1 -1
  826. package/toast/{toast.styles_ngrlup.css → toast.styles_1e0l60w.css} +1 -1
  827. package/toggle/toggle.styles.js +1 -1
  828. package/toggle/toggle.styles.js.map +1 -1
  829. package/{cjs/toggle/toggle.styles_1yzqsu.css → toggle/toggle.styles_1t5qrye.css} +5 -5
  830. package/typography/index.js +1 -1
  831. package/typography/typography.js +1 -1
  832. package/typography/typography.js.map +1 -1
  833. package/typography/typography.styles.d.ts +2 -0
  834. package/typography/typography.styles.js +1 -1
  835. package/typography/typography.styles.js.map +1 -1
  836. package/typography/typography.styles_1155j4c.css +11 -0
  837. package/uneditable-section/section-item.styles.js +1 -1
  838. package/uneditable-section/section-item.styles.js.map +1 -1
  839. package/uneditable-section/{section-item.styles_1dfjzc4.css → section-item.styles_mwx8ht.css} +2 -2
  840. package/util/is-styled-components.d.ts +5 -0
  841. package/util/is-styled-components.js +2 -0
  842. package/util/is-styled-components.js.map +1 -0
  843. package/util/styling-helper.js +1 -1
  844. package/util/styling-helper.js.map +1 -1
  845. package/badge/badge.styles_1yrxocm.css +0 -16
  846. package/cjs/badge/badge.styles_1yrxocm.css +0 -16
  847. package/cjs/date-navigator/date-navigator.styles_1cotsgz.css +0 -4
  848. package/cjs/file-upload/file-list.js +0 -2
  849. package/cjs/file-upload/file-list.js.map +0 -1
  850. package/cjs/file-upload/file-list.styles.js +0 -2
  851. package/cjs/file-upload/file-list.styles.js.map +0 -1
  852. package/cjs/file-upload/file-list.styles_16vplxk.css +0 -3
  853. package/cjs/filter/filter-modal.styles_e0ev97.css +0 -8
  854. package/cjs/filter/filter-sidebar.styles_cwvqql.css +0 -4
  855. package/cjs/form/form-label.styles_rk98yd.css +0 -6
  856. package/cjs/input-textarea/textarea-counter.styles_adg5h1.css +0 -1
  857. package/cjs/input-textarea/textarea.styles_g0zgyq.css +0 -5
  858. package/cjs/language-switcher/dropdown-variant.styles_16c4wc1.css +0 -2
  859. package/cjs/markup/markup.utils.js +0 -2
  860. package/cjs/markup/markup.utils.js.map +0 -1
  861. package/cjs/modal/modal-box.styles_1xrlxhd.css +0 -2
  862. package/cjs/modal-v2/modal-v2.styles_1irpyi6.css +0 -3
  863. package/cjs/otp-verification/contact-input-section-styles.js +0 -115
  864. package/cjs/otp-verification/contact-input-section-styles.js.map +0 -1
  865. package/cjs/otp-verification/otp-verification-styles.js +0 -6
  866. package/cjs/otp-verification/otp-verification-styles.js.map +0 -1
  867. package/cjs/otp-verification/verification-section-styles.js +0 -27
  868. package/cjs/otp-verification/verification-section-styles.js.map +0 -1
  869. package/cjs/schedule/schedule-header/schedule-header.style.js +0 -38
  870. package/cjs/schedule/schedule-header/schedule-header.style.js.map +0 -1
  871. package/cjs/schedule/schedule-week-view/slot-content.js +0 -2
  872. package/cjs/schedule/schedule-week-view/slot-content.js.map +0 -1
  873. package/cjs/schedule/schedule-week-view/slot-content.styles.js +0 -40
  874. package/cjs/schedule/schedule-week-view/slot-content.styles.js.map +0 -1
  875. package/cjs/shared/dropdown-list/expandable-element.styles_5o9f9w.css +0 -6
  876. package/cjs/shared/dropdown-wrapper/dropdown-wrapper.styles_v10jbi.css +0 -3
  877. package/cjs/shared/standalone-date-input/standalone-date-input.styles_1m0da43.css +0 -13
  878. package/cjs/shared/styles/index.js +0 -2
  879. package/cjs/shared/styles/index.js.map +0 -1
  880. package/cjs/shared/time-slot/time-slot.styles_1r9na3f.css +0 -17
  881. package/cjs/sidenav/sidenav-drawer-subitem.styles_1ylzfn5.css +0 -1
  882. package/cjs/text-list/text-list.styles_1gohl3f.css +0 -16
  883. package/cjs/time-slot-bar-week/time-slot-bar-week-days.style.js +0 -104
  884. package/cjs/time-slot-bar-week/time-slot-bar-week-days.style.js.map +0 -1
  885. package/cjs/time-slot-bar-week/time-slot-bar-week.style.js +0 -10
  886. package/cjs/time-slot-bar-week/time-slot-bar-week.style.js.map +0 -1
  887. package/cjs/time-slot-week-view/time-slot-week-days.style.js +0 -59
  888. package/cjs/time-slot-week-view/time-slot-week-days.style.js.map +0 -1
  889. package/cjs/timepicker/timepicker.styles_zmkhl8.css +0 -1
  890. package/cjs/typography/typography.styles_1jqils.css +0 -9
  891. package/cjs/v3_theme/border/specs/default-border-set.js +0 -2
  892. package/cjs/v3_theme/border/specs/default-border-set.js.map +0 -1
  893. package/cjs/v3_theme/border/theme-helper.js +0 -2
  894. package/cjs/v3_theme/border/theme-helper.js.map +0 -1
  895. package/cjs/v3_theme/border-util/specs/default-border-util-set.js +0 -2
  896. package/cjs/v3_theme/border-util/specs/default-border-util-set.js.map +0 -1
  897. package/cjs/v3_theme/border-util/theme-helper.js +0 -2
  898. package/cjs/v3_theme/border-util/theme-helper.js.map +0 -1
  899. package/cjs/v3_theme/border-util/utils.js +0 -8
  900. package/cjs/v3_theme/border-util/utils.js.map +0 -1
  901. package/cjs/v3_theme/breakpoint/media-query-helper.js +0 -2
  902. package/cjs/v3_theme/breakpoint/media-query-helper.js.map +0 -1
  903. package/cjs/v3_theme/breakpoint/specs/default-breakpoint-set.js +0 -2
  904. package/cjs/v3_theme/breakpoint/specs/default-breakpoint-set.js.map +0 -1
  905. package/cjs/v3_theme/breakpoint/theme-helper.js +0 -2
  906. package/cjs/v3_theme/breakpoint/theme-helper.js.map +0 -1
  907. package/cjs/v3_theme/colour-primitive/specs/a11yplayground-colour-set.js +0 -2
  908. package/cjs/v3_theme/colour-primitive/specs/a11yplayground-colour-set.js.map +0 -1
  909. package/cjs/v3_theme/colour-primitive/specs/bookingsg-colour-set.js +0 -2
  910. package/cjs/v3_theme/colour-primitive/specs/bookingsg-colour-set.js.map +0 -1
  911. package/cjs/v3_theme/colour-primitive/specs/ccube-colour-set.js +0 -2
  912. package/cjs/v3_theme/colour-primitive/specs/ccube-colour-set.js.map +0 -1
  913. package/cjs/v3_theme/colour-primitive/specs/imda-colour-set.js +0 -2
  914. package/cjs/v3_theme/colour-primitive/specs/imda-colour-set.js.map +0 -1
  915. package/cjs/v3_theme/colour-primitive/specs/lifesg-colour-set.js +0 -2
  916. package/cjs/v3_theme/colour-primitive/specs/lifesg-colour-set.js.map +0 -1
  917. package/cjs/v3_theme/colour-primitive/specs/mylegacy-colour-set.js +0 -2
  918. package/cjs/v3_theme/colour-primitive/specs/mylegacy-colour-set.js.map +0 -1
  919. package/cjs/v3_theme/colour-primitive/specs/oneservice-colour-set.js +0 -2
  920. package/cjs/v3_theme/colour-primitive/specs/oneservice-colour-set.js.map +0 -1
  921. package/cjs/v3_theme/colour-primitive/specs/pa-colour-set.js +0 -2
  922. package/cjs/v3_theme/colour-primitive/specs/pa-colour-set.js.map +0 -1
  923. package/cjs/v3_theme/colour-primitive/specs/rbs-colour-set.js +0 -2
  924. package/cjs/v3_theme/colour-primitive/specs/rbs-colour-set.js.map +0 -1
  925. package/cjs/v3_theme/colour-primitive/specs/smgs-colour-set.js +0 -2
  926. package/cjs/v3_theme/colour-primitive/specs/smgs-colour-set.js.map +0 -1
  927. package/cjs/v3_theme/colour-primitive/specs/spf-colour-set.js +0 -2
  928. package/cjs/v3_theme/colour-primitive/specs/spf-colour-set.js.map +0 -1
  929. package/cjs/v3_theme/colour-primitive/specs/supportgowhere-colour-set.js +0 -2
  930. package/cjs/v3_theme/colour-primitive/specs/supportgowhere-colour-set.js.map +0 -1
  931. package/cjs/v3_theme/colour-primitive/theme-helper.js +0 -2
  932. package/cjs/v3_theme/colour-primitive/theme-helper.js.map +0 -1
  933. package/cjs/v3_theme/colour-semantic/specs/a11yplayground-semantic-tokens.js +0 -2
  934. package/cjs/v3_theme/colour-semantic/specs/a11yplayground-semantic-tokens.js.map +0 -1
  935. package/cjs/v3_theme/colour-semantic/specs/lifesg-semantic-tokens.js +0 -2
  936. package/cjs/v3_theme/colour-semantic/specs/lifesg-semantic-tokens.js.map +0 -1
  937. package/cjs/v3_theme/colour-semantic/specs/pa-semantic-tokens.js +0 -2
  938. package/cjs/v3_theme/colour-semantic/specs/pa-semantic-tokens.js.map +0 -1
  939. package/cjs/v3_theme/colour-semantic/specs/sgwdigitallobby-tokens.js +0 -2
  940. package/cjs/v3_theme/colour-semantic/specs/sgwdigitallobby-tokens.js.map +0 -1
  941. package/cjs/v3_theme/colour-semantic/theme-helper.js +0 -2
  942. package/cjs/v3_theme/colour-semantic/theme-helper.js.map +0 -1
  943. package/cjs/v3_theme/ds-theme-provider.js +0 -2
  944. package/cjs/v3_theme/ds-theme-provider.js.map +0 -1
  945. package/cjs/v3_theme/font/specs/a11yplayground-font-set.js +0 -2
  946. package/cjs/v3_theme/font/specs/a11yplayground-font-set.js.map +0 -1
  947. package/cjs/v3_theme/font/specs/bookingsg-font-set.js +0 -2
  948. package/cjs/v3_theme/font/specs/bookingsg-font-set.js.map +0 -1
  949. package/cjs/v3_theme/font/specs/default-font-set.js +0 -2
  950. package/cjs/v3_theme/font/specs/default-font-set.js.map +0 -1
  951. package/cjs/v3_theme/font/specs/imda-font-set.js +0 -2
  952. package/cjs/v3_theme/font/specs/imda-font-set.js.map +0 -1
  953. package/cjs/v3_theme/font/specs/oneservice-font-set.js +0 -2
  954. package/cjs/v3_theme/font/specs/oneservice-font-set.js.map +0 -1
  955. package/cjs/v3_theme/font/specs/pa-font-set.js +0 -2
  956. package/cjs/v3_theme/font/specs/pa-font-set.js.map +0 -1
  957. package/cjs/v3_theme/font/specs/smgs-font-set.js +0 -2
  958. package/cjs/v3_theme/font/specs/smgs-font-set.js.map +0 -1
  959. package/cjs/v3_theme/font/specs/spf-font-set.js +0 -2
  960. package/cjs/v3_theme/font/specs/spf-font-set.js.map +0 -1
  961. package/cjs/v3_theme/font/specs/supportgowhere-font-set.js +0 -2
  962. package/cjs/v3_theme/font/specs/supportgowhere-font-set.js.map +0 -1
  963. package/cjs/v3_theme/font/theme-helper.js +0 -2
  964. package/cjs/v3_theme/font/theme-helper.js.map +0 -1
  965. package/cjs/v3_theme/font/utils.js +0 -10
  966. package/cjs/v3_theme/font/utils.js.map +0 -1
  967. package/cjs/v3_theme/font-spec/specs/a11yplayground-font-spec-set.js +0 -2
  968. package/cjs/v3_theme/font-spec/specs/a11yplayground-font-spec-set.js.map +0 -1
  969. package/cjs/v3_theme/font-spec/specs/bookingsg-font-spec-set.js +0 -2
  970. package/cjs/v3_theme/font-spec/specs/bookingsg-font-spec-set.js.map +0 -1
  971. package/cjs/v3_theme/font-spec/specs/default-font-spec-set.js +0 -2
  972. package/cjs/v3_theme/font-spec/specs/default-font-spec-set.js.map +0 -1
  973. package/cjs/v3_theme/font-spec/specs/imda-font-spec-set.js +0 -2
  974. package/cjs/v3_theme/font-spec/specs/imda-font-spec-set.js.map +0 -1
  975. package/cjs/v3_theme/font-spec/specs/mylegacy-font-spec-set.js +0 -2
  976. package/cjs/v3_theme/font-spec/specs/mylegacy-font-spec-set.js.map +0 -1
  977. package/cjs/v3_theme/font-spec/specs/oneservice-font-spec-set.js +0 -2
  978. package/cjs/v3_theme/font-spec/specs/oneservice-font-spec-set.js.map +0 -1
  979. package/cjs/v3_theme/font-spec/specs/pa-font-spec-set.js +0 -2
  980. package/cjs/v3_theme/font-spec/specs/pa-font-spec-set.js.map +0 -1
  981. package/cjs/v3_theme/font-spec/specs/sgw-digital-lobby-font-spec-set.js +0 -2
  982. package/cjs/v3_theme/font-spec/specs/sgw-digital-lobby-font-spec-set.js.map +0 -1
  983. package/cjs/v3_theme/font-spec/specs/smgs-font-spec-set.js +0 -2
  984. package/cjs/v3_theme/font-spec/specs/smgs-font-spec-set.js.map +0 -1
  985. package/cjs/v3_theme/font-spec/specs/spf-font-spec-set.js +0 -2
  986. package/cjs/v3_theme/font-spec/specs/spf-font-spec-set.js.map +0 -1
  987. package/cjs/v3_theme/font-spec/specs/supportgowhere-font-spec-set.js +0 -2
  988. package/cjs/v3_theme/font-spec/specs/supportgowhere-font-spec-set.js.map +0 -1
  989. package/cjs/v3_theme/font-spec/theme-helper.js +0 -2
  990. package/cjs/v3_theme/font-spec/theme-helper.js.map +0 -1
  991. package/cjs/v3_theme/helpers.js +0 -2
  992. package/cjs/v3_theme/helpers.js.map +0 -1
  993. package/cjs/v3_theme/index.js +0 -2
  994. package/cjs/v3_theme/index.js.map +0 -1
  995. package/cjs/v3_theme/motion/specs/default-motion-set.js +0 -2
  996. package/cjs/v3_theme/motion/specs/default-motion-set.js.map +0 -1
  997. package/cjs/v3_theme/motion/theme-helper.js +0 -2
  998. package/cjs/v3_theme/motion/theme-helper.js.map +0 -1
  999. package/cjs/v3_theme/radius/specs/default-radius-set.js +0 -2
  1000. package/cjs/v3_theme/radius/specs/default-radius-set.js.map +0 -1
  1001. package/cjs/v3_theme/radius/specs/spf-radius-set.js +0 -2
  1002. package/cjs/v3_theme/radius/specs/spf-radius-set.js.map +0 -1
  1003. package/cjs/v3_theme/radius/theme-helper.js +0 -2
  1004. package/cjs/v3_theme/radius/theme-helper.js.map +0 -1
  1005. package/cjs/v3_theme/shadow/specs/default-shadow-set.js +0 -2
  1006. package/cjs/v3_theme/shadow/specs/default-shadow-set.js.map +0 -1
  1007. package/cjs/v3_theme/shadow/theme-helper.js +0 -2
  1008. package/cjs/v3_theme/shadow/theme-helper.js.map +0 -1
  1009. package/cjs/v3_theme/spacing/specs/default-spacing-set.js +0 -2
  1010. package/cjs/v3_theme/spacing/specs/default-spacing-set.js.map +0 -1
  1011. package/cjs/v3_theme/spacing/theme-helper.js +0 -2
  1012. package/cjs/v3_theme/spacing/theme-helper.js.map +0 -1
  1013. package/cjs/v3_theme/use-theme-mode.js +0 -2
  1014. package/cjs/v3_theme/use-theme-mode.js.map +0 -1
  1015. package/codemods/common.ts +0 -8
  1016. package/codemods/data.ts +0 -16
  1017. package/codemods/deprecate-v2-tokens/data.ts +0 -283
  1018. package/codemods/deprecate-v2-tokens/index.ts +0 -89
  1019. package/codemods/migrate-colour/data.ts +0 -95
  1020. package/codemods/migrate-colour/index.ts +0 -104
  1021. package/codemods/migrate-layout/data.ts +0 -5
  1022. package/codemods/migrate-layout/index.ts +0 -108
  1023. package/codemods/migrate-media-query/data.ts +0 -20
  1024. package/codemods/migrate-media-query/index.ts +0 -113
  1025. package/codemods/migrate-text/data.ts +0 -48
  1026. package/codemods/migrate-text/index.ts +0 -196
  1027. package/codemods/migrate-text-list/data.ts +0 -16
  1028. package/codemods/migrate-text-list/index.ts +0 -111
  1029. package/common.d.ts +0 -8
  1030. package/date-navigator/date-navigator.styles_1cotsgz.css +0 -4
  1031. package/deprecate-v2-tokens/data.d.ts +0 -8
  1032. package/file-upload/file-list.js +0 -2
  1033. package/file-upload/file-list.js.map +0 -1
  1034. package/file-upload/file-list.styles.js +0 -2
  1035. package/file-upload/file-list.styles.js.map +0 -1
  1036. package/file-upload/file-list.styles_16vplxk.css +0 -3
  1037. package/filter/filter-modal.styles_e0ev97.css +0 -8
  1038. package/filter/filter-sidebar.styles_cwvqql.css +0 -4
  1039. package/form/form-label.styles_rk98yd.css +0 -6
  1040. package/input-textarea/textarea-counter.styles_adg5h1.css +0 -1
  1041. package/input-textarea/textarea.styles_g0zgyq.css +0 -5
  1042. package/language-switcher/dropdown-variant.styles_16c4wc1.css +0 -2
  1043. package/markup/markup.utils.d.ts +0 -2
  1044. package/markup/markup.utils.js +0 -2
  1045. package/markup/markup.utils.js.map +0 -1
  1046. package/migrate-colour/data.d.ts +0 -270
  1047. package/migrate-colour/index.d.ts +0 -7
  1048. package/migrate-layout/data.d.ts +0 -5
  1049. package/migrate-layout/index.d.ts +0 -2
  1050. package/migrate-media-query/data.d.ts +0 -20
  1051. package/migrate-media-query/index.d.ts +0 -2
  1052. package/migrate-text/data.d.ts +0 -46
  1053. package/migrate-text/index.d.ts +0 -2
  1054. package/migrate-text-list/data.d.ts +0 -16
  1055. package/migrate-text-list/index.d.ts +0 -2
  1056. package/modal/modal-box.styles_1xrlxhd.css +0 -2
  1057. package/modal-v2/modal-v2.styles_1irpyi6.css +0 -3
  1058. package/otp-verification/contact-input-section-styles.d.ts +0 -14
  1059. package/otp-verification/contact-input-section-styles.js +0 -115
  1060. package/otp-verification/contact-input-section-styles.js.map +0 -1
  1061. package/otp-verification/otp-verification-styles.d.ts +0 -1
  1062. package/otp-verification/otp-verification-styles.js +0 -6
  1063. package/otp-verification/otp-verification-styles.js.map +0 -1
  1064. package/otp-verification/verification-section-styles.d.ts +0 -23
  1065. package/otp-verification/verification-section-styles.js +0 -27
  1066. package/otp-verification/verification-section-styles.js.map +0 -1
  1067. package/schedule/schedule-header/schedule-header.style.d.ts +0 -25
  1068. package/schedule/schedule-header/schedule-header.style.js +0 -38
  1069. package/schedule/schedule-header/schedule-header.style.js.map +0 -1
  1070. package/schedule/schedule-week-view/slot-content.d.ts +0 -8
  1071. package/schedule/schedule-week-view/slot-content.js +0 -2
  1072. package/schedule/schedule-week-view/slot-content.js.map +0 -1
  1073. package/schedule/schedule-week-view/slot-content.styles.d.ts +0 -27
  1074. package/schedule/schedule-week-view/slot-content.styles.js +0 -40
  1075. package/schedule/schedule-week-view/slot-content.styles.js.map +0 -1
  1076. package/schedule/shared/index.d.ts +0 -2
  1077. package/shared/dropdown-list/expandable-element.styles_5o9f9w.css +0 -6
  1078. package/shared/dropdown-wrapper/dropdown-wrapper.styles_v10jbi.css +0 -3
  1079. package/shared/standalone-date-input/standalone-date-input.styles_1m0da43.css +0 -13
  1080. package/shared/styles/index.js +0 -2
  1081. package/shared/styles/index.js.map +0 -1
  1082. package/shared/time-slot/time-slot.styles_1r9na3f.css +0 -17
  1083. package/sidenav/sidenav-drawer-subitem.styles_1ylzfn5.css +0 -1
  1084. package/text-list/text-list.styles_1gohl3f.css +0 -16
  1085. package/time-slot-bar-week/time-slot-bar-week-days.style.d.ts +0 -54
  1086. package/time-slot-bar-week/time-slot-bar-week-days.style.js +0 -104
  1087. package/time-slot-bar-week/time-slot-bar-week-days.style.js.map +0 -1
  1088. package/time-slot-bar-week/time-slot-bar-week.style.d.ts +0 -1
  1089. package/time-slot-bar-week/time-slot-bar-week.style.js +0 -10
  1090. package/time-slot-bar-week/time-slot-bar-week.style.js.map +0 -1
  1091. package/time-slot-week-view/time-slot-week-days.style.d.ts +0 -12
  1092. package/time-slot-week-view/time-slot-week-days.style.js +0 -59
  1093. package/time-slot-week-view/time-slot-week-days.style.js.map +0 -1
  1094. package/timepicker/timepicker.styles_zmkhl8.css +0 -1
  1095. package/typography/typography.styles_1jqils.css +0 -9
  1096. package/v3_theme/border/specs/default-border-set.d.ts +0 -2
  1097. package/v3_theme/border/specs/default-border-set.js +0 -2
  1098. package/v3_theme/border/specs/default-border-set.js.map +0 -1
  1099. package/v3_theme/border/theme-helper.d.ts +0 -10
  1100. package/v3_theme/border/theme-helper.js +0 -2
  1101. package/v3_theme/border/theme-helper.js.map +0 -1
  1102. package/v3_theme/border/types.d.ts +0 -12
  1103. package/v3_theme/border-util/specs/default-border-util-set.d.ts +0 -2
  1104. package/v3_theme/border-util/specs/default-border-util-set.js +0 -2
  1105. package/v3_theme/border-util/specs/default-border-util-set.js.map +0 -1
  1106. package/v3_theme/border-util/theme-helper.d.ts +0 -8
  1107. package/v3_theme/border-util/theme-helper.js +0 -2
  1108. package/v3_theme/border-util/theme-helper.js.map +0 -1
  1109. package/v3_theme/border-util/types.d.ts +0 -19
  1110. package/v3_theme/border-util/utils.d.ts +0 -11
  1111. package/v3_theme/border-util/utils.js +0 -8
  1112. package/v3_theme/border-util/utils.js.map +0 -1
  1113. package/v3_theme/breakpoint/media-query-helper.d.ts +0 -9
  1114. package/v3_theme/breakpoint/media-query-helper.js +0 -2
  1115. package/v3_theme/breakpoint/media-query-helper.js.map +0 -1
  1116. package/v3_theme/breakpoint/specs/default-breakpoint-set.d.ts +0 -2
  1117. package/v3_theme/breakpoint/specs/default-breakpoint-set.js +0 -2
  1118. package/v3_theme/breakpoint/specs/default-breakpoint-set.js.map +0 -1
  1119. package/v3_theme/breakpoint/theme-helper.d.ts +0 -39
  1120. package/v3_theme/breakpoint/theme-helper.js +0 -2
  1121. package/v3_theme/breakpoint/theme-helper.js.map +0 -1
  1122. package/v3_theme/breakpoint/types.d.ts +0 -41
  1123. package/v3_theme/colour-primitive/specs/a11yplayground-colour-set.d.ts +0 -2
  1124. package/v3_theme/colour-primitive/specs/a11yplayground-colour-set.js +0 -2
  1125. package/v3_theme/colour-primitive/specs/a11yplayground-colour-set.js.map +0 -1
  1126. package/v3_theme/colour-primitive/specs/bookingsg-colour-set.d.ts +0 -2
  1127. package/v3_theme/colour-primitive/specs/bookingsg-colour-set.js +0 -2
  1128. package/v3_theme/colour-primitive/specs/bookingsg-colour-set.js.map +0 -1
  1129. package/v3_theme/colour-primitive/specs/ccube-colour-set.d.ts +0 -2
  1130. package/v3_theme/colour-primitive/specs/ccube-colour-set.js +0 -2
  1131. package/v3_theme/colour-primitive/specs/ccube-colour-set.js.map +0 -1
  1132. package/v3_theme/colour-primitive/specs/imda-colour-set.d.ts +0 -2
  1133. package/v3_theme/colour-primitive/specs/imda-colour-set.js +0 -2
  1134. package/v3_theme/colour-primitive/specs/imda-colour-set.js.map +0 -1
  1135. package/v3_theme/colour-primitive/specs/lifesg-colour-set.d.ts +0 -2
  1136. package/v3_theme/colour-primitive/specs/lifesg-colour-set.js +0 -2
  1137. package/v3_theme/colour-primitive/specs/lifesg-colour-set.js.map +0 -1
  1138. package/v3_theme/colour-primitive/specs/mylegacy-colour-set.d.ts +0 -2
  1139. package/v3_theme/colour-primitive/specs/mylegacy-colour-set.js +0 -2
  1140. package/v3_theme/colour-primitive/specs/mylegacy-colour-set.js.map +0 -1
  1141. package/v3_theme/colour-primitive/specs/oneservice-colour-set.d.ts +0 -2
  1142. package/v3_theme/colour-primitive/specs/oneservice-colour-set.js +0 -2
  1143. package/v3_theme/colour-primitive/specs/oneservice-colour-set.js.map +0 -1
  1144. package/v3_theme/colour-primitive/specs/pa-colour-set.d.ts +0 -2
  1145. package/v3_theme/colour-primitive/specs/pa-colour-set.js +0 -2
  1146. package/v3_theme/colour-primitive/specs/pa-colour-set.js.map +0 -1
  1147. package/v3_theme/colour-primitive/specs/rbs-colour-set.d.ts +0 -2
  1148. package/v3_theme/colour-primitive/specs/rbs-colour-set.js +0 -2
  1149. package/v3_theme/colour-primitive/specs/rbs-colour-set.js.map +0 -1
  1150. package/v3_theme/colour-primitive/specs/smgs-colour-set.d.ts +0 -2
  1151. package/v3_theme/colour-primitive/specs/smgs-colour-set.js +0 -2
  1152. package/v3_theme/colour-primitive/specs/smgs-colour-set.js.map +0 -1
  1153. package/v3_theme/colour-primitive/specs/spf-colour-set.d.ts +0 -2
  1154. package/v3_theme/colour-primitive/specs/spf-colour-set.js +0 -2
  1155. package/v3_theme/colour-primitive/specs/spf-colour-set.js.map +0 -1
  1156. package/v3_theme/colour-primitive/specs/supportgowhere-colour-set.d.ts +0 -2
  1157. package/v3_theme/colour-primitive/specs/supportgowhere-colour-set.js +0 -2
  1158. package/v3_theme/colour-primitive/specs/supportgowhere-colour-set.js.map +0 -1
  1159. package/v3_theme/colour-primitive/theme-helper.d.ts +0 -10
  1160. package/v3_theme/colour-primitive/theme-helper.js +0 -2
  1161. package/v3_theme/colour-primitive/theme-helper.js.map +0 -1
  1162. package/v3_theme/colour-primitive/types.d.ts +0 -98
  1163. package/v3_theme/colour-semantic/specs/a11yplayground-semantic-tokens.d.ts +0 -3
  1164. package/v3_theme/colour-semantic/specs/a11yplayground-semantic-tokens.js +0 -2
  1165. package/v3_theme/colour-semantic/specs/a11yplayground-semantic-tokens.js.map +0 -1
  1166. package/v3_theme/colour-semantic/specs/lifesg-semantic-tokens.d.ts +0 -3
  1167. package/v3_theme/colour-semantic/specs/lifesg-semantic-tokens.js +0 -2
  1168. package/v3_theme/colour-semantic/specs/lifesg-semantic-tokens.js.map +0 -1
  1169. package/v3_theme/colour-semantic/specs/pa-semantic-tokens.d.ts +0 -2
  1170. package/v3_theme/colour-semantic/specs/pa-semantic-tokens.js +0 -2
  1171. package/v3_theme/colour-semantic/specs/pa-semantic-tokens.js.map +0 -1
  1172. package/v3_theme/colour-semantic/specs/sgwdigitallobby-tokens.d.ts +0 -3
  1173. package/v3_theme/colour-semantic/specs/sgwdigitallobby-tokens.js +0 -2
  1174. package/v3_theme/colour-semantic/specs/sgwdigitallobby-tokens.js.map +0 -1
  1175. package/v3_theme/colour-semantic/theme-helper.d.ts +0 -10
  1176. package/v3_theme/colour-semantic/theme-helper.js +0 -2
  1177. package/v3_theme/colour-semantic/theme-helper.js.map +0 -1
  1178. package/v3_theme/colour-semantic/types.d.ts +0 -123
  1179. package/v3_theme/components/specs/a11yplayground-component-token-set.d.ts +0 -2
  1180. package/v3_theme/components/specs/default-component-token-set.d.ts +0 -2
  1181. package/v3_theme/components/specs/lifesg-component-token-set.d.ts +0 -2
  1182. package/v3_theme/components/specs/pa-component-token-set.d.ts +0 -2
  1183. package/v3_theme/components/specs/smgs-component-token-set.d.ts +0 -2
  1184. package/v3_theme/components/specs/spf-component-token-set.d.ts +0 -2
  1185. package/v3_theme/components/theme-helper.d.ts +0 -17
  1186. package/v3_theme/components/types.d.ts +0 -44
  1187. package/v3_theme/ds-theme-provider.d.ts +0 -2
  1188. package/v3_theme/ds-theme-provider.js +0 -2
  1189. package/v3_theme/ds-theme-provider.js.map +0 -1
  1190. package/v3_theme/font/specs/a11yplayground-font-set.d.ts +0 -2
  1191. package/v3_theme/font/specs/a11yplayground-font-set.js +0 -2
  1192. package/v3_theme/font/specs/a11yplayground-font-set.js.map +0 -1
  1193. package/v3_theme/font/specs/bookingsg-font-set.d.ts +0 -2
  1194. package/v3_theme/font/specs/bookingsg-font-set.js +0 -2
  1195. package/v3_theme/font/specs/bookingsg-font-set.js.map +0 -1
  1196. package/v3_theme/font/specs/default-font-set.d.ts +0 -2
  1197. package/v3_theme/font/specs/default-font-set.js +0 -2
  1198. package/v3_theme/font/specs/default-font-set.js.map +0 -1
  1199. package/v3_theme/font/specs/imda-font-set.d.ts +0 -2
  1200. package/v3_theme/font/specs/imda-font-set.js +0 -2
  1201. package/v3_theme/font/specs/imda-font-set.js.map +0 -1
  1202. package/v3_theme/font/specs/oneservice-font-set.d.ts +0 -2
  1203. package/v3_theme/font/specs/oneservice-font-set.js +0 -2
  1204. package/v3_theme/font/specs/oneservice-font-set.js.map +0 -1
  1205. package/v3_theme/font/specs/pa-font-set.d.ts +0 -2
  1206. package/v3_theme/font/specs/pa-font-set.js +0 -2
  1207. package/v3_theme/font/specs/pa-font-set.js.map +0 -1
  1208. package/v3_theme/font/specs/smgs-font-set.d.ts +0 -2
  1209. package/v3_theme/font/specs/smgs-font-set.js +0 -2
  1210. package/v3_theme/font/specs/smgs-font-set.js.map +0 -1
  1211. package/v3_theme/font/specs/spf-font-set.d.ts +0 -2
  1212. package/v3_theme/font/specs/spf-font-set.js +0 -2
  1213. package/v3_theme/font/specs/spf-font-set.js.map +0 -1
  1214. package/v3_theme/font/specs/supportgowhere-font-set.d.ts +0 -2
  1215. package/v3_theme/font/specs/supportgowhere-font-set.js +0 -2
  1216. package/v3_theme/font/specs/supportgowhere-font-set.js.map +0 -1
  1217. package/v3_theme/font/theme-helper.d.ts +0 -7
  1218. package/v3_theme/font/theme-helper.js +0 -2
  1219. package/v3_theme/font/theme-helper.js.map +0 -1
  1220. package/v3_theme/font/types.d.ts +0 -54
  1221. package/v3_theme/font/utils.d.ts +0 -4
  1222. package/v3_theme/font/utils.js +0 -10
  1223. package/v3_theme/font/utils.js.map +0 -1
  1224. package/v3_theme/font-spec/specs/a11yplayground-font-spec-set.d.ts +0 -2
  1225. package/v3_theme/font-spec/specs/a11yplayground-font-spec-set.js +0 -2
  1226. package/v3_theme/font-spec/specs/a11yplayground-font-spec-set.js.map +0 -1
  1227. package/v3_theme/font-spec/specs/bookingsg-font-spec-set.d.ts +0 -2
  1228. package/v3_theme/font-spec/specs/bookingsg-font-spec-set.js +0 -2
  1229. package/v3_theme/font-spec/specs/bookingsg-font-spec-set.js.map +0 -1
  1230. package/v3_theme/font-spec/specs/default-font-spec-set.d.ts +0 -2
  1231. package/v3_theme/font-spec/specs/default-font-spec-set.js +0 -2
  1232. package/v3_theme/font-spec/specs/default-font-spec-set.js.map +0 -1
  1233. package/v3_theme/font-spec/specs/imda-font-spec-set.d.ts +0 -2
  1234. package/v3_theme/font-spec/specs/imda-font-spec-set.js +0 -2
  1235. package/v3_theme/font-spec/specs/imda-font-spec-set.js.map +0 -1
  1236. package/v3_theme/font-spec/specs/mylegacy-font-spec-set.d.ts +0 -2
  1237. package/v3_theme/font-spec/specs/mylegacy-font-spec-set.js +0 -2
  1238. package/v3_theme/font-spec/specs/mylegacy-font-spec-set.js.map +0 -1
  1239. package/v3_theme/font-spec/specs/oneservice-font-spec-set.d.ts +0 -2
  1240. package/v3_theme/font-spec/specs/oneservice-font-spec-set.js +0 -2
  1241. package/v3_theme/font-spec/specs/oneservice-font-spec-set.js.map +0 -1
  1242. package/v3_theme/font-spec/specs/pa-font-spec-set.d.ts +0 -2
  1243. package/v3_theme/font-spec/specs/pa-font-spec-set.js +0 -2
  1244. package/v3_theme/font-spec/specs/pa-font-spec-set.js.map +0 -1
  1245. package/v3_theme/font-spec/specs/sgw-digital-lobby-font-spec-set.d.ts +0 -2
  1246. package/v3_theme/font-spec/specs/sgw-digital-lobby-font-spec-set.js +0 -2
  1247. package/v3_theme/font-spec/specs/sgw-digital-lobby-font-spec-set.js.map +0 -1
  1248. package/v3_theme/font-spec/specs/smgs-font-spec-set.d.ts +0 -2
  1249. package/v3_theme/font-spec/specs/smgs-font-spec-set.js +0 -2
  1250. package/v3_theme/font-spec/specs/smgs-font-spec-set.js.map +0 -1
  1251. package/v3_theme/font-spec/specs/spf-font-spec-set.d.ts +0 -2
  1252. package/v3_theme/font-spec/specs/spf-font-spec-set.js +0 -2
  1253. package/v3_theme/font-spec/specs/spf-font-spec-set.js.map +0 -1
  1254. package/v3_theme/font-spec/specs/supportgowhere-font-spec-set.d.ts +0 -2
  1255. package/v3_theme/font-spec/specs/supportgowhere-font-spec-set.js +0 -2
  1256. package/v3_theme/font-spec/specs/supportgowhere-font-spec-set.js.map +0 -1
  1257. package/v3_theme/font-spec/theme-helper.d.ts +0 -6
  1258. package/v3_theme/font-spec/theme-helper.js +0 -2
  1259. package/v3_theme/font-spec/theme-helper.js.map +0 -1
  1260. package/v3_theme/font-spec/types.d.ts +0 -53
  1261. package/v3_theme/helpers.d.ts +0 -7
  1262. package/v3_theme/helpers.js +0 -2
  1263. package/v3_theme/helpers.js.map +0 -1
  1264. package/v3_theme/index.d.ts +0 -696
  1265. package/v3_theme/index.js +0 -2
  1266. package/v3_theme/index.js.map +0 -1
  1267. package/v3_theme/internal-types.d.ts +0 -4
  1268. package/v3_theme/motion/specs/default-motion-set.d.ts +0 -2
  1269. package/v3_theme/motion/specs/default-motion-set.js +0 -2
  1270. package/v3_theme/motion/specs/default-motion-set.js.map +0 -1
  1271. package/v3_theme/motion/theme-helper.d.ts +0 -6
  1272. package/v3_theme/motion/theme-helper.js +0 -2
  1273. package/v3_theme/motion/theme-helper.js.map +0 -1
  1274. package/v3_theme/motion/types.d.ts +0 -17
  1275. package/v3_theme/radius/specs/default-radius-set.d.ts +0 -2
  1276. package/v3_theme/radius/specs/default-radius-set.js +0 -2
  1277. package/v3_theme/radius/specs/default-radius-set.js.map +0 -1
  1278. package/v3_theme/radius/specs/spf-radius-set.d.ts +0 -2
  1279. package/v3_theme/radius/specs/spf-radius-set.js +0 -2
  1280. package/v3_theme/radius/specs/spf-radius-set.js.map +0 -1
  1281. package/v3_theme/radius/theme-helper.d.ts +0 -6
  1282. package/v3_theme/radius/theme-helper.js +0 -2
  1283. package/v3_theme/radius/theme-helper.js.map +0 -1
  1284. package/v3_theme/radius/types.d.ts +0 -13
  1285. package/v3_theme/shadow/specs/default-shadow-set.d.ts +0 -2
  1286. package/v3_theme/shadow/specs/default-shadow-set.js +0 -2
  1287. package/v3_theme/shadow/specs/default-shadow-set.js.map +0 -1
  1288. package/v3_theme/shadow/theme-helper.d.ts +0 -7
  1289. package/v3_theme/shadow/theme-helper.js +0 -2
  1290. package/v3_theme/shadow/theme-helper.js.map +0 -1
  1291. package/v3_theme/shadow/types.d.ts +0 -21
  1292. package/v3_theme/spacing/specs/default-spacing-set.d.ts +0 -2
  1293. package/v3_theme/spacing/specs/default-spacing-set.js +0 -2
  1294. package/v3_theme/spacing/specs/default-spacing-set.js.map +0 -1
  1295. package/v3_theme/spacing/theme-helper.d.ts +0 -6
  1296. package/v3_theme/spacing/theme-helper.js +0 -2
  1297. package/v3_theme/spacing/theme-helper.js.map +0 -1
  1298. package/v3_theme/spacing/types.d.ts +0 -26
  1299. package/v3_theme/types.d.ts +0 -78
  1300. package/v3_theme/use-theme-mode.d.ts +0 -4
  1301. package/v3_theme/use-theme-mode.js +0 -2
  1302. package/v3_theme/use-theme-mode.js.map +0 -1
  1303. /package/file-upload/{file-list.styles.d.ts → file-list/file-list.styles.d.ts} +0 -0
  1304. /package/{deprecate-v2-tokens → migrate-popover}/index.d.ts +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"data-table.js","sources":["../../../src/data-table/data-table.tsx"],"sourcesContent":["import { ArrowDownIcon, ArrowUpIcon } from \"@lifesg/react-icons\";\nimport clsx from \"clsx\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport { useInView } from \"react-intersection-observer\";\nimport { useResizeDetector } from \"react-resize-detector\";\n\nimport { LoadingDotsSpinner } from \"../animations\";\nimport { Checkbox } from \"../checkbox\";\nimport { ErrorDisplay } from \"../error-display\";\nimport { concatIds, VisuallyHidden } from \"../shared/accessibility\";\nimport { BasicButton } from \"../shared/input-wrapper\";\nimport { useApplyStyle } from \"../theme\";\nimport { Typography } from \"../typography\";\nimport { useId } from \"../util\";\nimport { useEventListener } from \"../util/use-event-listener\";\nimport * as styles from \"./data-table.styles\";\nimport type { DataTableProps, HeaderProps, RowProps } from \"./types\";\n\nexport const DataTable = ({\n id,\n headers,\n rows,\n className,\n sortIndicators,\n alternatingRows,\n loadState = \"success\",\n enableMultiSelect,\n selectedIds,\n disabledIds,\n enableActionBar,\n enableSelectAll,\n enableStickyHeader,\n emptyView,\n actionBarContent,\n renderCustomEmptyView,\n onHeaderClick,\n onSelect,\n onSelectAll,\n onClearSelectionClick,\n ...otherProps\n}: DataTableProps) => {\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const tableRef = useRef<HTMLTableElement>(null);\n const tableEndRef = useRef<HTMLDivElement | null>(null);\n const headerRef = useRef<HTMLTableSectionElement>(null);\n const actionBarRef = useRef<HTMLDivElement>(null);\n const wrapperRef = useRef<HTMLDivElement>(null);\n const internalId = useId();\n const keyColumns = headers.filter(\n (header): header is Exclude<HeaderProps, string> => {\n return typeof header !== \"string\" && !!header.keyColumn;\n }\n );\n\n const [scrollable, setScrollable] = useState(false);\n const [scrollEnd, setScrollEnd] = useState(false);\n const [isFloatingActionBar, setIsFloatingActionBar] = useState(false);\n const [showLastBorder, setShowLastBorder] = useState(false);\n\n const { ref: endRef, inView: end } = useInView();\n\n useApplyStyle(actionBarRef, {\n [styles.tokens.actionBarWrapperLeft]:\n isFloatingActionBar && tableRef.current\n ? `${tableRef.current.getBoundingClientRect().left}px`\n : undefined,\n [styles.tokens.actionBarWrapperWidth]:\n isFloatingActionBar && tableRef.current\n ? `${tableRef.current.clientWidth}px`\n : undefined,\n });\n\n // =============================================================================\n // EFFECTS, EVENT LISTENERS\n // ============================================================================\n const onResize = useCallback(() => {\n if (!wrapperRef.current || !actionBarRef.current) {\n return;\n }\n const scrollable =\n wrapperRef.current.scrollHeight > wrapperRef.current.clientHeight;\n setScrollable(scrollable);\n\n if (scrollable) {\n actionBarRef.current.style.transform = `translateY(0)`;\n } else {\n calculateStickyInViewport();\n }\n }, []);\n\n useEffect(() => {\n onResize();\n }, []);\n\n useResizeDetector({ onResize });\n\n const scrollHandler = () => {\n requestAnimationFrame(() => {\n if (scrollable) {\n calculateFixedInViewport();\n } else {\n calculateStickyInViewport();\n }\n });\n };\n\n useEventListener(\"scroll\", scrollHandler, \"window\");\n\n useEffect(() => {\n checkLastBorder();\n }, [rows]);\n\n // ===========================================================================\n // HELPER FUNCTIONS\n // ===========================================================================\n const isAllCheckboxSelected = (): boolean => {\n return selectedIds?.length === rows?.length;\n };\n\n const isIndeterminateCheckbox = (): boolean => {\n return (\n !!selectedIds &&\n selectedIds.length !== 0 &&\n !isAllCheckboxSelected()\n );\n };\n\n const isRowSelected = (rowId: string): boolean => {\n return !!selectedIds?.includes(rowId);\n };\n\n const isAlternatingRow = (index: number): boolean => {\n return !!alternatingRows && index % 2 === 1;\n };\n\n const isDisabledRow = (rowId: string): boolean => {\n return !!disabledIds?.includes(rowId);\n };\n\n const getDataTestId = (subStr: string) => {\n if (!otherProps[\"data-testid\"]) return undefined;\n return `${otherProps[\"data-testid\"]}-${subStr}`;\n };\n\n const getTotalColumns = (): number => {\n return headers.length + (enableMultiSelect ? 1 : 0);\n };\n\n const getSortDirection = (fieldKey: string) => {\n return sortIndicators?.[fieldKey];\n };\n\n const getHeaderAriaSort = (fieldKey: string) => {\n const sortDirection = getSortDirection(fieldKey);\n\n if (!sortDirection) {\n return undefined;\n }\n\n return sortDirection === \"asc\" ? \"ascending\" : \"descending\";\n };\n\n const getSortButtonAriaLabel = (fieldKey: string) => {\n const nextSortDirection =\n getSortDirection(fieldKey) === \"asc\" ? \"descending\" : \"ascending\";\n\n return ` by ${nextSortDirection} order`;\n };\n\n const getHeaderCellId = (fieldKey: string) => {\n return `${internalId}-header-${fieldKey}`;\n };\n const getCellId = (rowId: string, fieldKey: string) => {\n return `${internalId}-row-${rowId}-${fieldKey}-key-column`;\n };\n\n const getRowCheckboxAriaLabelledBy = (rowId: string) => {\n const keyColumnIds = keyColumns.map((header) =>\n getCellId(rowId, header.fieldKey)\n );\n\n return concatIds(...keyColumnIds);\n };\n\n const calculateFixedInViewport = () => {\n if (!wrapperRef.current) {\n return;\n }\n const wrapperBounds = wrapperRef.current.getBoundingClientRect();\n setIsFloatingActionBar(\n wrapperBounds.bottom > window.innerHeight + 30 &&\n wrapperBounds.top < window.innerHeight - 200\n );\n };\n\n const calculateStickyInViewport = () => {\n if (\n !tableRef.current ||\n !tableEndRef.current ||\n !wrapperRef.current ||\n !actionBarRef.current ||\n !headerRef.current\n ) {\n return;\n }\n\n const endBounds = tableEndRef.current.getBoundingClientRect();\n\n if (endBounds.top > window.innerHeight) {\n const bottomOffset = endBounds.bottom - window.innerHeight;\n const bottomToHeaderOffset =\n tableRef.current.getBoundingClientRect().height -\n headerRef.current.clientHeight -\n 32;\n const maxBottomOffset = Math.min(\n bottomOffset,\n bottomToHeaderOffset\n );\n\n actionBarRef.current.style.transform = `translateY(-${maxBottomOffset}px)`;\n } else {\n actionBarRef.current.style.transform = `translateY(0)`;\n }\n };\n\n const checkLastBorder = () => {\n if (!tableRef.current || !wrapperRef.current) {\n return;\n }\n // 56 pixels added due to the behavior of action bar\n setShowLastBorder(\n tableRef.current.clientHeight + (enableActionBar ? 56 : 0) <\n wrapperRef.current.clientHeight\n );\n };\n\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleHeaderClick = (fieldKey: string) => {\n onHeaderClick?.(fieldKey);\n };\n\n const handleHeaderButtonClick = (\n event: React.MouseEvent<HTMLButtonElement>,\n fieldKey: string\n ) => {\n event.stopPropagation();\n onHeaderClick?.(fieldKey);\n };\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n const renderHeaders = () => (\n <thead\n ref={headerRef}\n className={enableStickyHeader ? styles.stickyHeader : undefined}\n >\n <tr className={styles.headerRow}>\n {enableMultiSelect && renderHeaderCheckBox()}\n {headers.map(renderHeaderCell)}\n </tr>\n </thead>\n );\n\n const renderHeaderCell = (header: HeaderProps) => {\n const {\n fieldKey,\n label,\n clickable = false,\n style,\n } = typeof header === \"string\"\n ? {\n fieldKey: header,\n label: header,\n style: undefined,\n }\n : header;\n\n const isSortable = !!getSortDirection(fieldKey);\n const headerCellId = getHeaderCellId(fieldKey);\n return (\n <th\n data-testid={getDataTestId(`header-${fieldKey}`)}\n key={fieldKey}\n className={clsx(\n styles.headerCell,\n clickable && styles.headerCellClickable\n )}\n scope=\"col\"\n aria-sort={getHeaderAriaSort(fieldKey)}\n style={style}\n onClick={() => handleHeaderClick(fieldKey)}\n >\n <div className={styles.headerCellContent} id={headerCellId}>\n {typeof label === \"string\" ? (\n <Typography.BodyBL weight=\"bold\">\n {label}\n </Typography.BodyBL>\n ) : (\n label\n )}\n {renderSortedArrow(fieldKey)}\n </div>\n {(clickable || isSortable) && (\n <VisuallyHidden>\n <button\n onClick={(event) =>\n handleHeaderButtonClick(event, fieldKey)\n }\n >\n {isSortable && \"Sort \"}\n <span aria-labelledby={headerCellId} />\n {isSortable && getSortButtonAriaLabel(fieldKey)}\n </button>\n </VisuallyHidden>\n )}\n </th>\n );\n };\n\n const renderSortedArrow = (fieldKey: string) => {\n const isSorted = sortIndicators?.[fieldKey];\n\n if (!isSorted) {\n return <></>;\n }\n if (isSorted === \"asc\") {\n return (\n <ArrowUpIcon\n aria-hidden\n data-testid={getDataTestId(`header-${fieldKey}-arrowup`)}\n />\n );\n }\n return (\n <ArrowDownIcon\n aria-hidden\n data-testid={getDataTestId(`header-${fieldKey}-arrowdown`)}\n />\n );\n };\n\n const renderHeaderCheckBox = () => {\n return (\n <th\n data-testid={getDataTestId(\"header-selection\")}\n className={clsx(styles.headerCell, styles.headerCellCheckbox)}\n scope=\"col\"\n >\n <div className={styles.selectionCheckboxWrapper}>\n <VisuallyHidden>Row selection</VisuallyHidden>\n {enableSelectAll && (\n <Checkbox\n checked={isAllCheckboxSelected()}\n indeterminate={isIndeterminateCheckbox()}\n aria-label=\"Select all rows\"\n onClick={() => {\n if (onSelectAll) {\n onSelectAll(isAllCheckboxSelected());\n }\n }}\n />\n )}\n </div>\n </th>\n );\n };\n\n const renderRows = () => {\n return !rows || rows.length < 1 ? (\n <tr>\n <td\n className={styles.emptyStateCell}\n colSpan={getTotalColumns()}\n >\n {renderCustomEmptyView\n ? renderCustomEmptyView()\n : renderBasicEmptyView()}\n </td>\n </tr>\n ) : (\n <>\n {rows?.map((row: RowProps, index: number) => (\n <tr\n data-testid={getDataTestId(`row-${row.id.toString()}`)}\n key={row.id.toString()}\n className={clsx(\n styles.bodyRow,\n showLastBorder && styles.bodyRowWithBottomBorder,\n isAlternatingRow(index) &&\n styles.bodyRowAlternating,\n enableMultiSelect && styles.bodyRowSelectable,\n isRowSelected(row.id.toString()) &&\n styles.bodyRowSelected\n )}\n >\n {enableMultiSelect && renderRowCheckBox(row)}\n\n {headers.map((header) => renderRowCell(header, row))}\n </tr>\n ))}\n </>\n );\n };\n\n const renderRowCell = (header: HeaderProps, row: RowProps) => {\n const style = typeof header === \"string\" ? undefined : header.style;\n const fieldKey = typeof header === \"string\" ? header : header.fieldKey;\n const rowId = row.id.toString();\n const cellData = row[fieldKey];\n const cellId = `${rowId}-${fieldKey}`;\n\n let cellContent: React.ReactNode;\n if (typeof cellData === \"string\" || typeof cellData === \"number\") {\n cellContent = (\n <Typography.BodyBL className={styles.bodyCellText}>\n {cellData}\n </Typography.BodyBL>\n );\n } else if (typeof cellData === \"function\") {\n cellContent = cellData(row, { isSelected: isRowSelected(rowId) });\n } else {\n cellContent = cellData;\n }\n\n return (\n <td\n data-testid={getDataTestId(`row-${cellId}`)}\n key={cellId}\n id={getCellId(rowId, fieldKey)}\n className={styles.bodyCell}\n style={style}\n >\n {cellContent}\n </td>\n );\n };\n\n const renderRowCheckBox = (row: RowProps) => {\n const rowId = row.id.toString();\n\n return (\n <td\n data-testid={getDataTestId(`row-${rowId}-selection`)}\n className={clsx(styles.bodyCell, styles.bodyCellCheckbox)}\n >\n <div className={styles.selectionCheckboxWrapper}>\n <Checkbox\n checked={isRowSelected(rowId)}\n aria-labelledby={getRowCheckboxAriaLabelledBy(rowId)}\n onClick={() => {\n if (onSelect) {\n onSelect(rowId, !isRowSelected(rowId));\n }\n }}\n disabled={isDisabledRow(rowId)}\n focusableWhenDisabled={isDisabledRow(rowId)}\n />\n </div>\n </td>\n );\n };\n\n const renderBasicEmptyView = () => {\n let emptyTitle: JSX.Element;\n if (!emptyView?.title) {\n emptyTitle = (\n <Typography.HeadingSM\n className={styles.emptyStateTitle}\n weight=\"bold\"\n >\n {\"No <items> found\"}\n </Typography.HeadingSM>\n );\n } else if (typeof emptyView.title === \"string\") {\n emptyTitle = (\n <Typography.HeadingSM\n className={styles.emptyStateTitle}\n weight=\"bold\"\n >\n {emptyView.title}\n </Typography.HeadingSM>\n );\n } else {\n emptyTitle = emptyView.title;\n }\n\n return (\n <ErrorDisplay\n type={\"no-item-found\"}\n {...emptyView}\n title={emptyTitle}\n description={\n emptyView?.description\n ? emptyView.description\n : \"No matching rows\"\n }\n />\n );\n };\n\n const renderLoader = () => {\n return (\n <tr>\n <td colSpan={getTotalColumns()}>\n <div\n className={styles.loadingStateWrapper}\n role=\"status\"\n aria-live=\"polite\"\n aria-label=\"Loading table\"\n >\n {loadState === \"loading\" && <LoadingDotsSpinner />}\n </div>\n </td>\n </tr>\n );\n };\n\n const renderSelectionBar = () => {\n const count = selectedIds?.length ?? 0;\n const hasNotReachedScrollableEnd = scrollable && !scrollEnd;\n const hasNotReachedTableEnd = !scrollable && !end;\n const shouldUseFloatingActionBar =\n hasNotReachedScrollableEnd ||\n hasNotReachedTableEnd ||\n isFloatingActionBar;\n\n return (\n <div\n ref={actionBarRef}\n className={clsx(\n styles.actionBarWrapper,\n isFloatingActionBar && styles.actionBarWrapperFloating\n )}\n >\n <div\n className={clsx(\n styles.actionBar,\n shouldUseFloatingActionBar && styles.actionBarFloating\n )}\n >\n <Typography.BodyMD weight=\"semibold\">{`${count} item${\n count > 1 ? \"s\" : \"\"\n } selected`}</Typography.BodyMD>\n <BasicButton\n className={styles.actionBarButton}\n type=\"button\"\n aria-label={`Clear selection of ${count} item${\n count === 1 ? \"\" : \"s\"\n }`}\n onClick={onClearSelectionClick}\n >\n Clear selection\n </BasicButton>\n {actionBarContent}\n </div>\n </div>\n );\n };\n\n return (\n <div\n id={id || \"table-wrapper\"}\n data-testid={otherProps[\"data-testid\"] || \"table\"}\n className={clsx(styles.tableWrapper, className)}\n ref={wrapperRef}\n onScroll={() => {\n if (scrollable && wrapperRef.current) {\n setScrollEnd(\n wrapperRef.current.scrollTop +\n wrapperRef.current.clientHeight >=\n wrapperRef.current.scrollHeight\n );\n }\n }}\n tabIndex={0} // scrollable container must be focusable to support keyboard users\n >\n <div className={styles.tableContainer}>\n <table ref={tableRef} className={clsx(styles.table)}>\n {renderHeaders()}\n <tbody>\n {loadState === \"success\"\n ? renderRows()\n : renderLoader()}\n </tbody>\n </table>\n </div>\n {enableActionBar &&\n selectedIds &&\n selectedIds.length > 0 &&\n renderSelectionBar()}\n <div\n ref={(r) => {\n tableEndRef.current = r;\n endRef(r);\n }}\n />\n </div>\n );\n};\n"],"names":["_a","id","headers","rows","className","sortIndicators","alternatingRows","loadState","enableMultiSelect","selectedIds","disabledIds","enableActionBar","enableSelectAll","enableStickyHeader","emptyView","actionBarContent","renderCustomEmptyView","onHeaderClick","onSelect","onSelectAll","onClearSelectionClick","otherProps","__rest","tableRef","useRef","tableEndRef","headerRef","actionBarRef","wrapperRef","internalId","useId","keyColumns","filter","header","keyColumn","scrollable","setScrollable","useState","scrollEnd","setScrollEnd","isFloatingActionBar","setIsFloatingActionBar","showLastBorder","setShowLastBorder","ref","endRef","inView","end","useInView","useApplyStyle","styles.tokens","actionBarWrapperLeft","current","getBoundingClientRect","left","undefined","actionBarWrapperWidth","clientWidth","onResize","useCallback","scrollHeight","clientHeight","style","transform","calculateStickyInViewport","useEffect","useResizeDetector","useEventListener","requestAnimationFrame","calculateFixedInViewport","checkLastBorder","isAllCheckboxSelected","length","isRowSelected","rowId","includes","isAlternatingRow","index","isDisabledRow","getDataTestId","subStr","getTotalColumns","getSortDirection","fieldKey","getHeaderAriaSort","sortDirection","getSortButtonAriaLabel","getCellId","getRowCheckboxAriaLabelledBy","keyColumnIds","map","concatIds","wrapperBounds","bottom","window","innerHeight","top","endBounds","bottomOffset","bottomToHeaderOffset","height","maxBottomOffset","Math","min","renderHeaderCell","label","clickable","isSortable","headerCellId","getHeaderCellId","_jsxs","clsx","styles.headerCell","styles.headerCellClickable","scope","onClick","handleHeaderClick","children","styles.headerCellContent","_jsx","Typography","BodyBL","weight","renderSortedArrow","VisuallyHidden","event","stopPropagation","handleHeaderButtonClick","isSorted","ArrowUpIcon","ArrowDownIcon","renderHeaderCheckBox","styles.headerCellCheckbox","styles.selectionCheckboxWrapper","Checkbox","checked","indeterminate","renderRowCell","row","toString","cellData","cellId","cellContent","styles.bodyCellText","isSelected","styles.bodyCell","renderRowCheckBox","styles.bodyCellCheckbox","disabled","focusableWhenDisabled","renderBasicEmptyView","emptyTitle","title","HeadingSM","styles.emptyStateTitle","ErrorDisplay","Object","assign","type","description","styles.tableWrapper","onScroll","scrollTop","tabIndex","styles.tableContainer","styles.table","styles.stickyHeader","styles.headerRow","styles.emptyStateCell","colSpan","_Fragment","styles.bodyRow","styles.bodyRowWithBottomBorder","styles.bodyRowAlternating","styles.bodyRowSelectable","styles.bodyRowSelected","styles.loadingStateWrapper","role","LoadingDotsSpinner","count","shouldUseFloatingActionBar","styles.actionBarWrapper","styles.actionBarWrapperFloating","styles.actionBar","styles.actionBarFloating","BodyMD","BasicButton","styles.actionBarButton","renderSelectionBar","r"],"mappings":"+4CAkB0BA,QAAAC,GACtBA,EAAEC,QACFA,EAAOC,KACPA,EAAIC,UACJA,EAASC,eACTA,EAAcC,gBACdA,EAAeC,UAC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AK,SAAQ,YACH,SAAQ,aACP,gBAAe5D,SAEX,YAAd9G,GAA2BgH,EAAAA,IAAC2D,EAAAA,mBAAkB,CAAA,gBA4E1DvK,GACGF,GACAA,EAAY+D,OAAS,GAvEN,YACvB,MAAM2G,EAA2B,QAAnBnL,EAAAS,aAAW,EAAXA,EAAa+D,cAAM,IAAAxE,EAAAA,EAAI,EAG/BoL,EAF6BjJ,IAAeG,IACnBH,IAAeY,IAI1CP,EAEJ,OACI+E,EAAAA,WACI3E,IAAKjB,EACLvB,UAAW2G,EAAAA,QACPsE,EAAAA,iBACA7I,GAAuB8I,EAAAA,0BAC1BjE,SAEDP,EAAAA,KAAA,MAAA,CACI1G,UAAW2G,EAAAA,QACPwE,EAAAA,UACAH,GAA8BI,EAAAA,mBACjCnE,SAAA,CAEDE,EAAAA,IAACC,EAAAA,WAAWiE,OAAM,CAAC/D,OAAO,WAAUL,SAAE,GAAG8D,SACrCA,EAAQ,EAAI,IAAM,gBAEtB5D,EAAAA,IAACmE,EAAAA,YAAW,CACRtL,UAAWuL,EAAAA,gBACX7B,KAAK,SAAQ,aACD,sBAAsBqB,SACpB,IAAVA,EAAc,GAAK,MAEvBhE,QAAS/F,EAAqBiG,SAAA,oBAIjCtG,MAEH,EAkCF6K,GACJrE,EAAAA,IAAA,MAAA,CACI3E,IAAMiJ,IACFpK,EAAY2B,QAAUyI,EACtBhJ,GAAOgJ,EAAE,MAGf"}
1
+ {"version":3,"file":"data-table.js","sources":["../../../src/data-table/data-table.tsx"],"sourcesContent":["import { ArrowDownIcon, ArrowUpIcon } from \"@lifesg/react-icons\";\nimport clsx from \"clsx\";\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport { useInView } from \"react-intersection-observer\";\nimport { useResizeDetector } from \"react-resize-detector\";\n\nimport { LoadingDotsSpinner } from \"../animations\";\nimport { Checkbox } from \"../checkbox\";\nimport { ErrorDisplay } from \"../error-display\";\nimport { concatIds, VisuallyHidden } from \"../shared/accessibility\";\nimport { BasicButton } from \"../shared/input-wrapper\";\nimport { useApplyStyle } from \"../theme\";\nimport { Typography } from \"../typography\";\nimport { useId } from \"../util\";\nimport { useEventListener } from \"../util/use-event-listener\";\nimport * as styles from \"./data-table.styles\";\nimport type { DataTableProps, HeaderProps, RowProps } from \"./types\";\n\nexport const DataTable = ({\n id,\n headers,\n rows,\n className,\n sortIndicators,\n alternatingRows,\n loadState = \"success\",\n enableMultiSelect,\n selectedIds,\n disabledIds,\n enableActionBar,\n enableSelectAll,\n enableStickyHeader,\n emptyView,\n actionBarContent,\n renderCustomEmptyView,\n onHeaderClick,\n onSelect,\n onSelectAll,\n onClearSelectionClick,\n ...otherProps\n}: DataTableProps) => {\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const tableRef = useRef<HTMLTableElement>(null);\n const tableEndRef = useRef<HTMLDivElement | null>(null);\n const headerRef = useRef<HTMLTableSectionElement>(null);\n const actionBarRef = useRef<HTMLDivElement>(null);\n const wrapperRef = useRef<HTMLDivElement>(null);\n const internalId = useId();\n const keyColumns = headers.filter(\n (header): header is Exclude<HeaderProps, string> => {\n return typeof header !== \"string\" && !!header.keyColumn;\n }\n );\n\n const [scrollable, setScrollable] = useState(false);\n const [scrollEnd, setScrollEnd] = useState(false);\n const [isFloatingActionBar, setIsFloatingActionBar] = useState(false);\n const [showLastBorder, setShowLastBorder] = useState(false);\n\n const { ref: endRef, inView: end } = useInView();\n\n useApplyStyle(actionBarRef, {\n [styles.tokens.actionBarWrapperLeft]:\n isFloatingActionBar && tableRef.current\n ? `${tableRef.current.getBoundingClientRect().left}px`\n : undefined,\n [styles.tokens.actionBarWrapperWidth]:\n isFloatingActionBar && tableRef.current\n ? `${tableRef.current.clientWidth}px`\n : undefined,\n });\n\n // =============================================================================\n // EFFECTS, EVENT LISTENERS\n // ============================================================================\n const onResize = useCallback(() => {\n if (!wrapperRef.current || !actionBarRef.current) {\n return;\n }\n const scrollable =\n wrapperRef.current.scrollHeight > wrapperRef.current.clientHeight;\n setScrollable(scrollable);\n\n if (scrollable) {\n actionBarRef.current.style.transform = `translateY(0)`;\n } else {\n calculateStickyInViewport();\n }\n }, []);\n\n useEffect(() => {\n onResize();\n }, []);\n\n useResizeDetector({ onResize });\n\n const scrollHandler = () => {\n requestAnimationFrame(() => {\n if (scrollable) {\n calculateFixedInViewport();\n } else {\n calculateStickyInViewport();\n }\n });\n };\n\n useEventListener(\"scroll\", scrollHandler, \"window\");\n\n useEffect(() => {\n checkLastBorder();\n }, [rows]);\n\n // ===========================================================================\n // HELPER FUNCTIONS\n // ===========================================================================\n const isAllCheckboxSelected = (): boolean => {\n if (!rows || !rows.length || !selectedIds) {\n return false;\n }\n return selectedIds.length === rows.length;\n };\n\n const isIndeterminateCheckbox = (): boolean => {\n return (\n !!selectedIds &&\n selectedIds.length !== 0 &&\n !isAllCheckboxSelected()\n );\n };\n\n const isHeaderCheckboxDisabled = (): boolean => {\n return !rows || !rows.length || !selectedIds;\n };\n\n const isRowSelected = (rowId: string): boolean => {\n return !!selectedIds?.includes(rowId);\n };\n\n const isAlternatingRow = (index: number): boolean => {\n return !!alternatingRows && index % 2 === 1;\n };\n\n const isDisabledRow = (rowId: string): boolean => {\n return !!disabledIds?.includes(rowId);\n };\n\n const getDataTestId = (subStr: string) => {\n if (!otherProps[\"data-testid\"]) return undefined;\n return `${otherProps[\"data-testid\"]}-${subStr}`;\n };\n\n const getTotalColumns = (): number => {\n return headers.length + (enableMultiSelect ? 1 : 0);\n };\n\n const getSortDirection = (fieldKey: string) => {\n return sortIndicators?.[fieldKey];\n };\n\n const getHeaderAriaSort = (fieldKey: string) => {\n const sortDirection = getSortDirection(fieldKey);\n\n if (!sortDirection) {\n return undefined;\n }\n\n return sortDirection === \"asc\" ? \"ascending\" : \"descending\";\n };\n\n const getSortButtonAriaLabel = (fieldKey: string) => {\n const nextSortDirection =\n getSortDirection(fieldKey) === \"asc\" ? \"descending\" : \"ascending\";\n\n return ` by ${nextSortDirection} order`;\n };\n\n const getHeaderCellId = (fieldKey: string) => {\n return `${internalId}-header-${fieldKey}`;\n };\n const getCellId = (rowId: string, fieldKey: string) => {\n return `${internalId}-row-${rowId}-${fieldKey}-key-column`;\n };\n\n const getRowCheckboxAriaLabelledBy = (rowId: string) => {\n const keyColumnIds = keyColumns.map((header) =>\n getCellId(rowId, header.fieldKey)\n );\n\n return concatIds(...keyColumnIds);\n };\n\n const calculateFixedInViewport = () => {\n if (!wrapperRef.current) {\n return;\n }\n const wrapperBounds = wrapperRef.current.getBoundingClientRect();\n setIsFloatingActionBar(\n wrapperBounds.bottom > window.innerHeight + 30 &&\n wrapperBounds.top < window.innerHeight - 200\n );\n };\n\n const calculateStickyInViewport = () => {\n if (\n !tableRef.current ||\n !tableEndRef.current ||\n !wrapperRef.current ||\n !actionBarRef.current ||\n !headerRef.current\n ) {\n return;\n }\n\n const endBounds = tableEndRef.current.getBoundingClientRect();\n\n if (endBounds.top > window.innerHeight) {\n const bottomOffset = endBounds.bottom - window.innerHeight;\n const bottomToHeaderOffset =\n tableRef.current.getBoundingClientRect().height -\n headerRef.current.clientHeight -\n 32;\n const maxBottomOffset = Math.min(\n bottomOffset,\n bottomToHeaderOffset\n );\n\n actionBarRef.current.style.transform = `translateY(-${maxBottomOffset}px)`;\n } else {\n actionBarRef.current.style.transform = `translateY(0)`;\n }\n };\n\n const checkLastBorder = () => {\n if (!tableRef.current || !wrapperRef.current) {\n return;\n }\n // 56 pixels added due to the behavior of action bar\n setShowLastBorder(\n tableRef.current.clientHeight + (enableActionBar ? 56 : 0) <\n wrapperRef.current.clientHeight\n );\n };\n\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleHeaderClick = (fieldKey: string) => {\n onHeaderClick?.(fieldKey);\n };\n\n const handleHeaderButtonClick = (\n event: React.MouseEvent<HTMLButtonElement>,\n fieldKey: string\n ) => {\n event.stopPropagation();\n onHeaderClick?.(fieldKey);\n };\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n const renderHeaders = () => (\n <thead\n ref={headerRef}\n className={enableStickyHeader ? styles.stickyHeader : undefined}\n >\n <tr className={styles.headerRow}>\n {enableMultiSelect && renderHeaderCheckBox()}\n {headers.map(renderHeaderCell)}\n </tr>\n </thead>\n );\n\n const renderHeaderCell = (header: HeaderProps) => {\n const {\n fieldKey,\n label,\n clickable = false,\n style,\n } = typeof header === \"string\"\n ? {\n fieldKey: header,\n label: header,\n style: undefined,\n }\n : header;\n\n const isSortable = !!getSortDirection(fieldKey);\n const headerCellId = getHeaderCellId(fieldKey);\n return (\n <th\n data-testid={getDataTestId(`header-${fieldKey}`)}\n key={fieldKey}\n className={clsx(\n styles.headerCell,\n clickable && styles.headerCellClickable\n )}\n scope=\"col\"\n aria-sort={getHeaderAriaSort(fieldKey)}\n style={style}\n onClick={() => handleHeaderClick(fieldKey)}\n >\n <div className={styles.headerCellContent} id={headerCellId}>\n {typeof label === \"string\" ? (\n <Typography.BodyBL weight=\"bold\">\n {label}\n </Typography.BodyBL>\n ) : (\n label\n )}\n {renderSortedArrow(fieldKey)}\n </div>\n {(clickable || isSortable) && (\n <VisuallyHidden>\n <button\n onClick={(event) =>\n handleHeaderButtonClick(event, fieldKey)\n }\n >\n {isSortable && \"Sort \"}\n <span aria-labelledby={headerCellId} />\n {isSortable && getSortButtonAriaLabel(fieldKey)}\n </button>\n </VisuallyHidden>\n )}\n </th>\n );\n };\n\n const renderSortedArrow = (fieldKey: string) => {\n const isSorted = sortIndicators?.[fieldKey];\n\n if (!isSorted) {\n return <></>;\n }\n if (isSorted === \"asc\") {\n return (\n <ArrowUpIcon\n aria-hidden\n data-testid={getDataTestId(`header-${fieldKey}-arrowup`)}\n />\n );\n }\n return (\n <ArrowDownIcon\n aria-hidden\n data-testid={getDataTestId(`header-${fieldKey}-arrowdown`)}\n />\n );\n };\n\n const renderHeaderCheckBox = () => {\n return (\n <th\n data-testid={getDataTestId(\"header-selection\")}\n className={clsx(styles.headerCell, styles.headerCellCheckbox)}\n scope=\"col\"\n >\n <div className={styles.selectionCheckboxWrapper}>\n <VisuallyHidden>Row selection</VisuallyHidden>\n {enableSelectAll && (\n <Checkbox\n checked={isAllCheckboxSelected()}\n indeterminate={isIndeterminateCheckbox()}\n disabled={isHeaderCheckboxDisabled()}\n aria-label=\"Select all rows\"\n onClick={() => {\n if (onSelectAll) {\n onSelectAll(isAllCheckboxSelected());\n }\n }}\n />\n )}\n </div>\n </th>\n );\n };\n\n const renderRows = () => {\n return !rows || rows.length < 1 ? (\n <tr className={styles.bodyRow}>\n <td\n className={styles.emptyStateCell}\n colSpan={getTotalColumns()}\n >\n {renderCustomEmptyView\n ? renderCustomEmptyView()\n : renderBasicEmptyView()}\n </td>\n </tr>\n ) : (\n <>\n {rows?.map((row: RowProps, index: number) => (\n <tr\n data-testid={getDataTestId(`row-${row.id.toString()}`)}\n key={row.id.toString()}\n className={clsx(\n styles.bodyRow,\n showLastBorder && styles.bodyRowWithBottomBorder,\n isAlternatingRow(index) &&\n styles.bodyRowAlternating,\n enableMultiSelect && styles.bodyRowSelectable,\n isRowSelected(row.id.toString()) &&\n styles.bodyRowSelected\n )}\n >\n {enableMultiSelect && renderRowCheckBox(row)}\n\n {headers.map((header) => renderRowCell(header, row))}\n </tr>\n ))}\n </>\n );\n };\n\n const renderRowCell = (header: HeaderProps, row: RowProps) => {\n const style = typeof header === \"string\" ? undefined : header.style;\n const fieldKey = typeof header === \"string\" ? header : header.fieldKey;\n const rowId = row.id.toString();\n const cellData = row[fieldKey];\n const cellId = `${rowId}-${fieldKey}`;\n\n let cellContent: React.ReactNode;\n if (typeof cellData === \"string\" || typeof cellData === \"number\") {\n cellContent = (\n <Typography.BodyBL className={styles.bodyCellText}>\n {cellData}\n </Typography.BodyBL>\n );\n } else if (typeof cellData === \"function\") {\n cellContent = cellData(row, { isSelected: isRowSelected(rowId) });\n } else {\n cellContent = cellData;\n }\n\n return (\n <td\n data-testid={getDataTestId(`row-${cellId}`)}\n key={cellId}\n id={getCellId(rowId, fieldKey)}\n className={styles.bodyCell}\n style={style}\n >\n {cellContent}\n </td>\n );\n };\n\n const renderRowCheckBox = (row: RowProps) => {\n const rowId = row.id.toString();\n\n return (\n <td\n data-testid={getDataTestId(`row-${rowId}-selection`)}\n className={clsx(styles.bodyCell, styles.bodyCellCheckbox)}\n >\n <div className={styles.selectionCheckboxWrapper}>\n <Checkbox\n checked={isRowSelected(rowId)}\n aria-labelledby={getRowCheckboxAriaLabelledBy(rowId)}\n onClick={() => {\n if (onSelect) {\n onSelect(rowId, !isRowSelected(rowId));\n }\n }}\n disabled={isDisabledRow(rowId)}\n focusableWhenDisabled={isDisabledRow(rowId)}\n />\n </div>\n </td>\n );\n };\n\n const renderBasicEmptyView = () => {\n let emptyTitle: JSX.Element;\n if (!emptyView?.title) {\n emptyTitle = (\n <Typography.HeadingSM\n className={styles.emptyStateTitle}\n weight=\"bold\"\n >\n {\"No <items> found\"}\n </Typography.HeadingSM>\n );\n } else if (typeof emptyView.title === \"string\") {\n emptyTitle = (\n <Typography.HeadingSM\n className={styles.emptyStateTitle}\n weight=\"bold\"\n >\n {emptyView.title}\n </Typography.HeadingSM>\n );\n } else {\n emptyTitle = emptyView.title;\n }\n\n return (\n <ErrorDisplay\n type={\"no-item-found\"}\n {...emptyView}\n title={emptyTitle}\n description={\n emptyView?.description\n ? emptyView.description\n : \"No matching rows\"\n }\n />\n );\n };\n\n const renderLoader = () => {\n return (\n <tr className={styles.bodyRow}>\n <td colSpan={getTotalColumns()}>\n <div\n className={styles.loadingStateWrapper}\n role=\"status\"\n aria-live=\"polite\"\n aria-label=\"Loading table\"\n >\n {loadState === \"loading\" && <LoadingDotsSpinner />}\n </div>\n </td>\n </tr>\n );\n };\n\n const renderSelectionBar = () => {\n const count = selectedIds?.length ?? 0;\n const hasNotReachedScrollableEnd = scrollable && !scrollEnd;\n const hasNotReachedTableEnd = !scrollable && !end;\n const shouldUseFloatingActionBar =\n hasNotReachedScrollableEnd ||\n hasNotReachedTableEnd ||\n isFloatingActionBar;\n\n return (\n <div\n ref={actionBarRef}\n className={clsx(\n styles.actionBarWrapper,\n isFloatingActionBar && styles.actionBarWrapperFloating\n )}\n >\n <div\n className={clsx(\n styles.actionBar,\n shouldUseFloatingActionBar && styles.actionBarFloating\n )}\n >\n <Typography.BodyMD weight=\"semibold\">{`${count} item${\n count > 1 ? \"s\" : \"\"\n } selected`}</Typography.BodyMD>\n <BasicButton\n className={styles.actionBarButton}\n type=\"button\"\n aria-label={`Clear selection of ${count} item${\n count === 1 ? \"\" : \"s\"\n }`}\n onClick={onClearSelectionClick}\n >\n Clear selection\n </BasicButton>\n {actionBarContent}\n </div>\n </div>\n );\n };\n\n return (\n <div\n id={id || \"table-wrapper\"}\n data-testid={otherProps[\"data-testid\"] || \"table\"}\n className={clsx(styles.tableWrapper, className)}\n ref={wrapperRef}\n onScroll={() => {\n if (scrollable && wrapperRef.current) {\n setScrollEnd(\n wrapperRef.current.scrollTop +\n wrapperRef.current.clientHeight >=\n wrapperRef.current.scrollHeight\n );\n }\n }}\n tabIndex={0} // scrollable container must be focusable to support keyboard users\n >\n <div className={styles.tableContainer}>\n <table ref={tableRef} className={clsx(styles.table)}>\n {renderHeaders()}\n <tbody>\n {loadState === \"success\"\n ? renderRows()\n : renderLoader()}\n </tbody>\n </table>\n </div>\n {enableActionBar &&\n selectedIds &&\n selectedIds.length > 0 &&\n renderSelectionBar()}\n <div\n ref={(r) => {\n tableEndRef.current = r;\n endRef(r);\n }}\n />\n </div>\n );\n};\n"],"names":["_a","id","headers","rows","className","sortIndicators","alternatingRows","loadState","enableMultiSelect","selectedIds","disabledIds","enableActionBar","enableSelectAll","enableStickyHeader","emptyView","actionBarContent","renderCustomEmptyView","onHeaderClick","onSelect","onSelectAll","onClearSelectionClick","otherProps","__rest","tableRef","useRef","tableEndRef","headerRef","actionBarRef","wrapperRef","internalId","useId","keyColumns","filter","header","keyColumn","scrollable","setScrollable","useState","scrollEnd","setScrollEnd","isFloatingActionBar","setIsFloatingActionBar","showLastBorder","setShowLastBorder","ref","endRef","inView","end","useInView","useApplyStyle","styles.tokens","actionBarWrapperLeft","current","getBoundingClientRect","left","undefined","actionBarWrapperWidth","clientWidth","onResize","useCallback","scrollHeight","clientHeight","style","transform","calculateStickyInViewport","useEffect","useResizeDetector","useEventListener","requestAnimationFrame","calculateFixedInViewport","checkLastBorder","isAllCheckboxSelected","length","isRowSelected","rowId","includes","isAlternatingRow","index","isDisabledRow","getDataTestId","subStr","getTotalColumns","getSortDirection","fieldKey","getHeaderAriaSort","sortDirection","getSortButtonAriaLabel","getCellId","getRowCheckboxAriaLabelledBy","keyColumnIds","map","concatIds","wrapperBounds","bottom","window","innerHeight","top","endBounds","bottomOffset","bottomToHeaderOffset","height","maxBottomOffset","Math","min","renderHeaderCell","label","clickable","isSortable","headerCellId","getHeaderCellId","_jsxs","clsx","styles.headerCell","styles.headerCellClickable","scope","onClick","handleHeaderClick","children","styles.headerCellContent","_jsx","Typography","BodyBL","weight","renderSortedArrow","VisuallyHidden","event","stopPropagation","handleHeaderButtonClick","isSorted","ArrowUpIcon","ArrowDownIcon","renderHeaderCheckBox","styles.headerCellCheckbox","styles.selectionCheckboxWrapper","Checkbox","checked","indeterminate","disabled","renderRowCell","row","toString","cellData","cellId","cellContent","styles.bodyCellText","isSelected","styles.bodyCell","renderRowCheckBox","styles.bodyCellCheckbox","focusableWhenDisabled","renderBasicEmptyView","emptyTitle","title","HeadingSM","styles.emptyStateTitle","ErrorDisplay","Object","assign","type","description","styles.tableWrapper","onScroll","scrollTop","tabIndex","styles.tableContainer","styles.table","styles.stickyHeader","styles.headerRow","styles.bodyRow","styles.emptyStateCell","colSpan","_Fragment","styles.bodyRowWithBottomBorder","styles.bodyRowAlternating","styles.bodyRowSelectable","styles.bodyRowSelected","styles.loadingStateWrapper","role","LoadingDotsSpinner","count","shouldUseFloatingActionBar","styles.actionBarWrapper","styles.actionBarWrapperFloating","styles.actionBar","styles.actionBarFloating","BodyMD","BasicButton","styles.actionBarButton","renderSelectionBar","r"],"mappings":"+4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,EAAI1I,GAAG2I,gBAsHxBrB,EAAAA,IAAA,KAAA,CAAInH,UAAWoK,EAAAA,QAAcnD,SACzBE,EAAAA,IAAA,KAAA,CAAImD,QAASzF,KAAiBoC,SAC1BE,EAAAA,WACInH,UAAW4K,EAAAA,oBACXC,KAAK,SAAQ,YACH,SAAQ,aACP,yBAEI,YAAd1K,GAA2BgH,EAAAA,IAAC2D,EAAAA,mBAAkB,CAAA,gBA4E1DvK,GACGF,GACAA,EAAY+D,OAAS,GAvEN,YACvB,MAAM2G,EAA2B,QAAnBnL,EAAAS,aAAW,EAAXA,EAAa+D,cAAM,IAAAxE,EAAAA,EAAI,EAG/BoL,EAF6BjJ,IAAeG,IACnBH,IAAeY,IAI1CP,EAEJ,OACI+E,EAAAA,WACI3E,IAAKjB,EACLvB,UAAW2G,EAAAA,QACPsE,EAAAA,iBACA7I,GAAuB8I,EAAAA,0BAC1BjE,SAEDP,EAAAA,KAAA,MAAA,CACI1G,UAAW2G,EAAAA,QACPwE,EAAAA,UACAH,GAA8BI,EAAAA,mBACjCnE,SAAA,CAEDE,EAAAA,IAACC,EAAAA,WAAWiE,OAAM,CAAC/D,OAAO,WAAUL,SAAE,GAAG8D,SACrCA,EAAQ,EAAI,IAAM,gBAEtB5D,EAAAA,IAACmE,EAAAA,YAAW,CACRtL,UAAWuL,EAAAA,gBACX7B,KAAK,SAAQ,aACD,sBAAsBqB,SACpB,IAAVA,EAAc,GAAK,MAEvBhE,QAAS/F,EAAqBiG,SAAA,oBAIjCtG,MAEH,EAkCF6K,GACJrE,EAAAA,IAAA,MAAA,CACI3E,IAAMiJ,IACFpK,EAAY2B,QAAUyI,EACtBhJ,GAAOgJ,EAAE,MAGf"}
@@ -1,2 +1,2 @@
1
- "use strict";require("./data-table.styles_1nj2uzq.css");exports.actionBar="anoy5c0",exports.actionBarButton="axywpxo",exports.actionBarFloating="a1gvi5ye",exports.actionBarWrapper="aag0lf9",exports.actionBarWrapperFloating="a1euqarq",exports.bodyCell="bfa3d3x",exports.bodyCellCheckbox="bx1feaw",exports.bodyCellText="b1g3gl2s",exports.bodyRow="b6ks76c",exports.bodyRowAlternating="b1bceurq",exports.bodyRowSelectable="bjmthdi",exports.bodyRowSelected="b8t2s91",exports.bodyRowWithBottomBorder="b1tvp43a",exports.emptyStateCell="e1yxh9il",exports.emptyStateTitle="e1pcc0nq",exports.headerCell="h1744qno",exports.headerCellCheckbox="hp15x3z",exports.headerCellClickable="h1ec4wtd",exports.headerCellContent="h4ne4e9",exports.headerRow="h1nfqacf",exports.loadingStateWrapper="ldhafdm",exports.selectionCheckboxWrapper="s1w2nktt",exports.stickyHeader="s7u4vf5",exports.table="t4ucy2z",exports.tableContainer="t1j0mhj",exports.tableWrapper="t188sfx3",exports.tokens={actionBarWrapperLeft:"--fds-internal-dataTable-actionBarWrapper-left",actionBarWrapperWidth:"--fds-internal-dataTable-actionBarWrapper-width"};
1
+ "use strict";require("./data-table.styles_1iqq1g7.css");exports.actionBar="anoy5c0",exports.actionBarButton="axywpxo",exports.actionBarFloating="a1gvi5ye",exports.actionBarWrapper="aag0lf9",exports.actionBarWrapperFloating="a1euqarq",exports.bodyCell="bfa3d3x",exports.bodyCellCheckbox="bx1feaw",exports.bodyCellText="b1g3gl2s",exports.bodyRow="b6ks76c",exports.bodyRowAlternating="b1bceurq",exports.bodyRowSelectable="bjmthdi",exports.bodyRowSelected="b8t2s91",exports.bodyRowWithBottomBorder="b1tvp43a",exports.emptyStateCell="e1yxh9il",exports.emptyStateTitle="e1pcc0nq",exports.headerCell="h1744qno",exports.headerCellCheckbox="hp15x3z",exports.headerCellClickable="h1ec4wtd",exports.headerCellContent="h4ne4e9",exports.headerRow="h1nfqacf",exports.loadingStateWrapper="ldhafdm",exports.selectionCheckboxWrapper="s1w2nktt",exports.stickyHeader="s7u4vf5",exports.table="t4ucy2z",exports.tableContainer="t1j0mhj",exports.tableWrapper="t188sfx3",exports.tokens={actionBarWrapperLeft:"--fds-internal-dataTable-actionBarWrapper-left",actionBarWrapperWidth:"--fds-internal-dataTable-actionBarWrapper-width"};
2
2
  //# sourceMappingURL=data-table.styles.js.map
@@ -17,7 +17,7 @@
17
17
  .b1g3gl2s{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;text-overflow:ellipsis;}
18
18
  .e1yxh9il{padding:4rem 0;}.e1yxh9il:first-child{padding-left:1.5rem;}.e1yxh9il:last-child{padding-right:1.5rem;}
19
19
  .s1w2nktt{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;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}
20
- .axywpxo{font-family:var(--fds-font-family);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;color:var(--fds-colour-text-primary);-webkit-transition:var(--fds-motion-duration-150) var(--fds-motion-timing-ease-default);transition:var(--fds-motion-duration-150) var(--fds-motion-timing-ease-default);padding:0.75rem;margin:-0.75rem 0;}.axywpxo:hover{color:var(--fds-colour-text-hover);}
20
+ .axywpxo{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;color:var(--fds-colour-text-primary);-webkit-transition:var(--fds-motion-duration-150) var(--fds-motion-timing-ease-default);transition:var(--fds-motion-duration-150) var(--fds-motion-timing-ease-default);padding:0.75rem;margin:-0.75rem 0;}.axywpxo:hover{color:var(--fds-colour-text-hover);}
21
21
  .anoy5c0{overflow:hidden;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;height:3.5rem;padding:var(--fds-spacing-16) var(--fds-spacing-24);border-top:var(--fds-border-width-010) var(--fds-border-style-solid) var(--fds-colour-border);background-color:var(--fds-colour-bg-selected);-webkit-transition:all 300ms ease;transition:all 300ms ease;border-radius:var(--fds-radius-none) var(--fds-radius-none) var(--fds-radius-sm) var(--fds-radius-sm);}
22
22
  .a1gvi5ye{-webkit-transform:translateX(0.5rem) translateY(-2rem);-moz-transform:translateX(0.5rem) translateY(-2rem);-ms-transform:translateX(0.5rem) translateY(-2rem);transform:translateX(0.5rem) translateY(-2rem);border-radius:var(--fds-radius-sm);box-shadow:var(--fds-shadow-xs-subtle);width:calc(100% - var(--fds-spacing-16));border:var(--fds-border-width-010) var(--fds-border-style-solid) var(--fds-colour-border);}
23
23
  .aag0lf9{bottom:0;position:-webkit-sticky;position:sticky;left:0;}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("../_virtual/_tslib.js"),a=require("react/jsx-runtime"),r=require("clsx"),t=require("../external/dayjs/dayjs.min.js"),n=require("react"),i=require("../shared/dropdown-wrapper/element-with-dropdown.js"),l=require("../shared/input-wrapper/input-wrapper.js"),s=require("../shared/internal-calendar/calendar-dropdown.js");require("../shared/internal-calendar/internal-calendar.js");var d=require("../shared/standalone-date-input/standalone-date-input.js");require("../util/calendar-helper.js");var o=require("../util/date-input-helper.js");require("../util/simple-id-generator.js"),require("../util/string-helper.js"),require("@react-aria/live-announcer");var u=require("./date-input.styles.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=c(r);exports.DateInput=r=>{var{minDate:c,maxDate:v,disabled:D,disabledDates:h,error:f,hideInputKeyboard:m,value:b,onChange:j,onFocus:w,onBlur:I,onYearMonthDisplayChange:q,withButton:x=!0,readOnly:y,id:g,allowDisabledSelection:S,zIndex:C,dropdownRootNode:Y,className:R}=r,B=e.__rest(r,["minDate","maxDate","disabled","disabledDates","error","hideInputKeyboard","value","onChange","onFocus","onBlur","onYearMonthDisplayChange","withButton","readOnly","id","allowDisabledSelection","zIndex","dropdownRootNode","className"]);const[N,O]=n.useState(o.DateInputHelper.sanitizeInput(b)),[z,H]=n.useState(o.DateInputHelper.sanitizeInput(b)),[M,F]=n.useState(void 0),[_,E]=n.useState(!1),[K,W]=n.useState(!1),V=n.useRef(null),k=n.useRef(null),T=n.useRef(null);n.useEffect((()=>{const e=o.DateInputHelper.sanitizeInput(b);O(e),H(e)}),[b]);const Z=e=>{!S&&o.DateInputHelper.isDateDisabled(e,{disabledDates:h,minDate:c,maxDate:v})||(H(e),x||(Q(e),O(e),e&&E(!1)))},A=e=>{var a;H(e),x||(Q(e),O(e),e&&(null===(a=k.current)||void 0===a||a.focusYearRef(),E(!1)),F(void 0))},G=()=>{y||D||(E(!0),K||(W(!0),w&&w()))},J=e=>{var a,r,t;const n=e.relatedTarget,i=T.current&&T.current.contains(n),l=V.current&&V.current.contains(n),s=(null===(a=null==n?void 0:n.matches)||void 0===a?void 0:a.call(n,"[data-floating-ui-focusable]"))||(null===(r=null==n?void 0:n.matches)||void 0===r?void 0:r.call(n,"[data-floating-ui-focus-guard]"));(K&&!_&&!l&&!s||_&&!l&&!i&&!s)&&(null===(t=k.current)||void 0===t||t.resetInput(),H(N),W(!1),E(!1),U())},L=e=>{F(e)},P=e=>{var a,r;switch(e){case"reset":H(N);break;case"confirmed":O(z),Q(z)}t.default(z,"YYYY-MM-DD",!0).isValid()?null===(a=k.current)||void 0===a||a.focusYearRef():null===(r=V.current)||void 0===r||r.focus(),E(!1)},Q=e=>{j&&j(e)},U=()=>{I&&I()};return a.jsx(i.ElementWithDropdown,{enabled:!y&&!D,isOpen:_,renderElement:()=>a.jsx(l.InputWrapper,Object.assign({role:"group",tabIndex:0,ref:V,onBlur:J,onFocus:G,disabled:D,readOnly:y,focused:K,error:f,id:g,"data-testid":B["data-testid"],"aria-disabled":D,className:p.default(u.container,R)},B,{children:a.jsx(d.StandaloneDateInput,{ref:k,disabled:D,onChange:Z,readOnly:y,focused:_,names:["start-day","start-month","start-year"],value:z,hoverValue:M,hideInputKeyboard:m})})),renderDropdown:({elementWidth:e})=>a.jsx(s.CalendarDropdown,{variant:"single",ref:T,initialCalendarDate:z,withButton:x,value:z,disabledDates:h,minDate:c,maxDate:v,allowDisabledSelection:S,onHover:L,onSelect:A,onDismiss:P,onYearMonthDisplayChange:q,width:e,isFocusable:!y&&!D}),onClose:()=>{var e;null===(e=k.current)||void 0===e||e.resetInput(),H(N),E(!1),W(!1),U(),F(void 0)},onDismiss:()=>{var e,a;null===(e=k.current)||void 0===e||e.resetInput(),null===(a=V.current)||void 0===a||a.focus(),H(N),E(!1)},customZIndex:C,offset:16,rootNode:Y})};
1
+ "use strict";var e=require("../_virtual/_tslib.js"),a=require("react/jsx-runtime"),r=require("clsx"),t=require("../external/dayjs/dayjs.min.js"),n=require("react"),i=require("../shared/dropdown-wrapper/element-with-dropdown.js"),l=require("../shared/input-wrapper/input-wrapper.js"),s=require("../shared/internal-calendar/calendar-dropdown.js");require("../shared/internal-calendar/internal-calendar.js");var d=require("../shared/standalone-date-input/standalone-date-input.js");require("../util/calendar-helper.js");var o=require("../util/date-input-helper.js");require("../util/simple-id-generator.js"),require("../util/string-helper.js"),require("@react-aria/live-announcer");var u=require("./date-input.styles.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=c(r);exports.DateInput=r=>{var{minDate:c,maxDate:v,disabled:D,disabledDates:h,error:f,hideInputKeyboard:m,value:b,onChange:j,onFocus:w,onBlur:I,onYearMonthDisplayChange:q,withButton:x=!0,readOnly:y,id:g,allowDisabledSelection:S,zIndex:C,dropdownRootNode:Y,className:R}=r,B=e.__rest(r,["minDate","maxDate","disabled","disabledDates","error","hideInputKeyboard","value","onChange","onFocus","onBlur","onYearMonthDisplayChange","withButton","readOnly","id","allowDisabledSelection","zIndex","dropdownRootNode","className"]);const[N,O]=n.useState(o.DateInputHelper.sanitizeInput(b)),[z,H]=n.useState(o.DateInputHelper.sanitizeInput(b)),[M,F]=n.useState(void 0),[_,E]=n.useState(!1),[K,W]=n.useState(!1),V=n.useRef(null),k=n.useRef(null),T=n.useRef(null);n.useEffect((()=>{const e=o.DateInputHelper.sanitizeInput(b);O(e),H(e)}),[b]);const Z=e=>{!S&&o.DateInputHelper.isDateDisabled(e,{disabledDates:h,minDate:c,maxDate:v})||(H(e),x||(Q(e),O(e),e&&E(!1)))},A=e=>{var a;H(e),x||(Q(e),O(e),e&&(null===(a=k.current)||void 0===a||a.focusYearRef(),E(!1)),F(void 0))},G=()=>{y||D||(E(!0),K||(W(!0),w&&w()))},J=e=>{var a,r,t;const n=e.relatedTarget,i=T.current&&T.current.contains(n),l=V.current&&V.current.contains(n),s=(null===(a=null==n?void 0:n.matches)||void 0===a?void 0:a.call(n,"[data-floating-ui-focusable]"))||(null===(r=null==n?void 0:n.matches)||void 0===r?void 0:r.call(n,"[data-floating-ui-focus-guard]"));(K&&!_&&!l&&!s||_&&!l&&!i&&!s)&&(null===(t=k.current)||void 0===t||t.resetInput(),H(N),W(!1),E(!1),U())},L=e=>{_&&F(e)},P=e=>{var a,r;switch(e){case"reset":H(N);break;case"confirmed":O(z),Q(z)}t.default(z,"YYYY-MM-DD",!0).isValid()?null===(a=k.current)||void 0===a||a.focusYearRef():null===(r=V.current)||void 0===r||r.focus(),E(!1)},Q=e=>{j&&j(e)},U=()=>{I&&I()};return a.jsx(i.ElementWithDropdown,{enabled:!y&&!D,isOpen:_,renderElement:()=>a.jsx(l.InputWrapper,Object.assign({role:"group",tabIndex:0,ref:V,onBlur:J,onFocus:G,disabled:D,readOnly:y,focused:K,error:f,id:g,"data-testid":B["data-testid"],"aria-disabled":D,className:p.default(u.container,R)},B,{children:a.jsx(d.StandaloneDateInput,{ref:k,disabled:D,onChange:Z,readOnly:y,focused:_,names:["start-day","start-month","start-year"],value:z,hoverValue:M,hideInputKeyboard:m})})),renderDropdown:({elementWidth:e})=>a.jsx(s.CalendarDropdown,{variant:"single",ref:T,initialCalendarDate:z,withButton:x,value:z,disabledDates:h,minDate:c,maxDate:v,allowDisabledSelection:S,onHover:L,onSelect:A,onDismiss:P,onYearMonthDisplayChange:q,width:e,isFocusable:!y&&!D}),onClose:()=>{var e;null===(e=k.current)||void 0===e||e.resetInput(),H(N),E(!1),W(!1),U(),F(void 0)},onDismiss:()=>{var e,a;null===(e=k.current)||void 0===e||e.resetInput(),null===(a=V.current)||void 0===a||a.focus(),H(N),E(!1)},customZIndex:C,offset:16,rootNode:Y})};
2
2
  //# sourceMappingURL=date-input.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-input.js","sources":["../../../src/date-input/date-input.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport dayjs from \"dayjs\";\nimport { useEffect, useRef, useState } from \"react\";\n\nimport type { DropdownRenderProps } from \"../shared/dropdown-wrapper\";\nimport { ElementWithDropdown } from \"../shared/dropdown-wrapper\";\nimport { InputWrapper } from \"../shared/input-wrapper\";\nimport type {\n CalendarAction,\n InternalCalendarRef,\n} from \"../shared/internal-calendar\";\nimport { CalendarDropdown } from \"../shared/internal-calendar\";\nimport type { StandaloneDateInputRef } from \"../shared/standalone-date-input/standalone-date-input\";\nimport { StandaloneDateInput } from \"../shared/standalone-date-input/standalone-date-input\";\nimport { DateInputHelper } from \"../util\";\nimport * as styles from \"./date-input.styles\";\nimport type { DateInputProps } from \"./types\";\n\nexport const DateInput = ({\n minDate,\n maxDate,\n disabled,\n disabledDates,\n error,\n hideInputKeyboard,\n value,\n onChange,\n onFocus,\n onBlur,\n onYearMonthDisplayChange,\n withButton = true,\n readOnly,\n id,\n allowDisabledSelection,\n zIndex,\n dropdownRootNode,\n className,\n ...otherProps\n}: DateInputProps) => {\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const [initialDate, setInitialDate] = useState<string>(\n DateInputHelper.sanitizeInput(value)\n );\n const [selectedDate, setSelectedDate] = useState<string>(\n DateInputHelper.sanitizeInput(value)\n );\n const [hoveredDate, setHoveredDate] = useState<string | undefined>(\n undefined\n );\n const [calendarOpen, setCalendarOpen] = useState<boolean>(false);\n const [focused, setFocused] = useState<boolean>(false);\n\n const nodeRef = useRef<HTMLDivElement>(null);\n const inputRef = useRef<StandaloneDateInputRef>(null);\n const calendarRef = useRef<InternalCalendarRef>(null);\n\n // =============================================================================\n // EFFECTS\n // =============================================================================\n useEffect(() => {\n const newValue = DateInputHelper.sanitizeInput(value);\n setInitialDate(newValue);\n setSelectedDate(newValue);\n }, [value]);\n\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleClose = () => {\n inputRef.current?.resetInput();\n setSelectedDate(initialDate);\n setCalendarOpen(false);\n setFocused(false);\n\n performOnBlurHandler();\n\n // clear hover value for mobile scrolling\n setHoveredDate(undefined);\n };\n\n const handleDismiss = () => {\n inputRef.current?.resetInput();\n nodeRef.current?.focus();\n setSelectedDate(initialDate);\n setCalendarOpen(false);\n };\n\n const handleChange = (val: string) => {\n if (\n !allowDisabledSelection &&\n DateInputHelper.isDateDisabled(val, {\n disabledDates,\n minDate,\n maxDate,\n })\n ) {\n return;\n }\n\n setSelectedDate(val);\n\n if (!withButton) {\n performOnChangeHandler(val);\n setInitialDate(val);\n if (val) {\n setCalendarOpen(false);\n }\n }\n };\n\n const handleSelect = (val: string) => {\n setSelectedDate(val);\n\n if (!withButton) {\n performOnChangeHandler(val);\n setInitialDate(val);\n if (val) {\n inputRef.current?.focusYearRef();\n setCalendarOpen(false);\n }\n\n // clear hover value for mobile when onMouseLeave={handleMouseLeaveCell} is not triggered due to touch input\n setHoveredDate(undefined);\n }\n };\n\n const handleFocus = () => {\n if (readOnly || disabled) return;\n\n setCalendarOpen(true);\n\n if (focused) return;\n\n setFocused(true);\n\n if (onFocus) {\n onFocus();\n }\n };\n\n const handleBlur = (e: React.FocusEvent) => {\n const target = e.relatedTarget as HTMLElement;\n\n const isInsideCalendar =\n calendarRef.current && calendarRef.current.contains(target);\n const isInsideNode =\n nodeRef.current && nodeRef.current.contains(target);\n const isFloatingElement =\n target?.matches?.(\"[data-floating-ui-focusable]\") ||\n target?.matches?.(\"[data-floating-ui-focus-guard]\");\n\n // Condition when the calendar is closed and focus moved outside the component\n const shouldBlurWhenClosed =\n focused && !calendarOpen && !isInsideNode && !isFloatingElement;\n\n // Condition when the calendar is open, and focus went outside both input and calendar\n const shouldBlurWhenOpenOutside =\n calendarOpen &&\n !isInsideNode &&\n !isInsideCalendar &&\n !isFloatingElement;\n\n if (shouldBlurWhenClosed || shouldBlurWhenOpenOutside) {\n inputRef.current?.resetInput();\n setSelectedDate(initialDate);\n setFocused(false);\n setCalendarOpen(false);\n performOnBlurHandler();\n }\n };\n\n const handleHoverDayCell = (value: string) => {\n setHoveredDate(value);\n };\n\n const handleCalendarAction = (buttonAction: CalendarAction) => {\n // handle button in day calendar view\n switch (buttonAction) {\n case \"reset\":\n setSelectedDate(initialDate);\n break;\n case \"confirmed\":\n setInitialDate(selectedDate);\n performOnChangeHandler(selectedDate);\n break;\n }\n\n const isValid = dayjs(selectedDate, \"YYYY-MM-DD\", true).isValid();\n\n // Focus on year input if the selected date is valid to avoid restarting entire tab order\n if (isValid) {\n inputRef.current?.focusYearRef();\n } else {\n nodeRef.current?.focus();\n }\n setCalendarOpen(false);\n };\n\n // =============================================================================\n // HELPER FUNCTIONS\n // =============================================================================\n const performOnChangeHandler = (changeValue: string) => {\n if (onChange) {\n onChange(changeValue);\n }\n };\n\n const performOnBlurHandler = () => {\n if (onBlur) {\n onBlur();\n }\n };\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n const renderInput = () => {\n return (\n <InputWrapper\n role=\"group\"\n tabIndex={0}\n ref={nodeRef}\n onBlur={handleBlur}\n onFocus={handleFocus}\n disabled={disabled}\n readOnly={readOnly}\n focused={focused}\n error={error}\n id={id}\n data-testid={otherProps[\"data-testid\"]}\n aria-disabled={disabled}\n className={clsx(styles.container, className)}\n {...otherProps}\n >\n <StandaloneDateInput\n ref={inputRef}\n disabled={disabled}\n onChange={handleChange}\n readOnly={readOnly}\n focused={calendarOpen}\n names={[\"start-day\", \"start-month\", \"start-year\"]}\n value={selectedDate}\n hoverValue={hoveredDate}\n hideInputKeyboard={hideInputKeyboard}\n />\n </InputWrapper>\n );\n };\n\n const renderCalendar = ({ elementWidth }: DropdownRenderProps) => {\n return (\n <CalendarDropdown\n variant=\"single\"\n ref={calendarRef}\n initialCalendarDate={selectedDate}\n withButton={withButton}\n value={selectedDate}\n disabledDates={disabledDates}\n minDate={minDate}\n maxDate={maxDate}\n allowDisabledSelection={allowDisabledSelection}\n onHover={handleHoverDayCell}\n onSelect={handleSelect}\n onDismiss={handleCalendarAction}\n onYearMonthDisplayChange={onYearMonthDisplayChange}\n width={elementWidth}\n isFocusable={!readOnly && !disabled}\n />\n );\n };\n\n return (\n <ElementWithDropdown\n enabled={!readOnly && !disabled}\n isOpen={calendarOpen}\n renderElement={renderInput}\n renderDropdown={renderCalendar}\n onClose={handleClose}\n onDismiss={handleDismiss}\n customZIndex={zIndex}\n offset={16}\n rootNode={dropdownRootNode}\n />\n );\n};\n"],"names":["_a","minDate","maxDate","disabled","disabledDates","error","hideInputKeyboard","value","onChange","onFocus","onBlur","onYearMonthDisplayChange","withButton","readOnly","id","allowDisabledSelection","zIndex","dropdownRootNode","className","otherProps","__rest","initialDate","setInitialDate","useState","DateInputHelper","sanitizeInput","selectedDate","setSelectedDate","hoveredDate","setHoveredDate","undefined","calendarOpen","setCalendarOpen","focused","setFocused","nodeRef","useRef","inputRef","calendarRef","useEffect","newValue","handleChange","val","isDateDisabled","performOnChangeHandler","handleSelect","current","focusYearRef","handleFocus","handleBlur","e","target","relatedTarget","isInsideCalendar","contains","isInsideNode","isFloatingElement","matches","call","_b","_c","resetInput","performOnBlurHandler","handleHoverDayCell","handleCalendarAction","buttonAction","dayjs","isValid","focus","changeValue","_jsx","ElementWithDropdown","enabled","isOpen","renderElement","InputWrapper","Object","assign","role","tabIndex","ref","clsx","styles.container","children","StandaloneDateInput","names","hoverValue","renderDropdown","elementWidth","CalendarDropdown","variant","initialCalendarDate","onHover","onSelect","onDismiss","width","isFocusable","onClose","customZIndex","off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QAAKC,EAAAA,UAAkBhE,IAC9BC,EAAU,CAAAgE,SAEdb,EAAAA,IAACc,EAAAA,oBAAmB,CAChBJ,IAAK3C,EACLlC,SAAUA,EACVK,SAAUiC,EACV5B,SAAUA,EACVoB,QAASF,EACTsD,MAAO,CAAC,YAAa,cAAe,cACpC9E,MAAOmB,EACP4D,WAAY1D,EACZtB,kBAAmBA,OAiC3BiF,eA3Be,EAAGC,kBAElBlB,EAAAA,IAACmB,EAAAA,iBAAgB,CACbC,QAAQ,SACRV,IAAK1C,EACLqD,oBAAqBjE,EACrBd,WAAYA,EACZL,MAAOmB,EACPtB,cAAeA,EACfH,QAASA,EACTC,QAASA,EACTa,uBAAwBA,EACxB6E,QAAS7B,EACT8B,SAAUhD,EACViD,UAAW9B,EACXrD,yBAA0BA,EAC1BoF,MAAOP,EACPQ,aAAcnF,IAAaV,IAW/B8F,QAjNY,WACA,QAAhBjG,EAAAqC,EAASS,eAAO,IAAA9C,GAAAA,EAAE6D,aAClBlC,EAAgBN,GAChBW,GAAgB,GAChBE,GAAW,GAEX4B,IAGAjC,OAAeC,EAAU,EAyMrBgE,UAtMc,aACF,QAAhB9F,EAAAqC,EAASS,eAAO,IAAA9C,GAAAA,EAAE6D,aACH,QAAfF,EAAAxB,EAAQW,eAAO,IAAAa,GAAAA,EAAES,QACjBzC,EAAgBN,GAChBW,GAAgB,EAAM,EAmMlBkE,aAAclF,EACdmF,OAAQ,GACRC,SAAUnF,GACZ"}
1
+ {"version":3,"file":"date-input.js","sources":["../../../src/date-input/date-input.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport dayjs from \"dayjs\";\nimport { useEffect, useRef, useState } from \"react\";\n\nimport type { DropdownRenderProps } from \"../shared/dropdown-wrapper\";\nimport { ElementWithDropdown } from \"../shared/dropdown-wrapper\";\nimport { InputWrapper } from \"../shared/input-wrapper\";\nimport type {\n CalendarAction,\n InternalCalendarRef,\n} from \"../shared/internal-calendar\";\nimport { CalendarDropdown } from \"../shared/internal-calendar\";\nimport type { StandaloneDateInputRef } from \"../shared/standalone-date-input/standalone-date-input\";\nimport { StandaloneDateInput } from \"../shared/standalone-date-input/standalone-date-input\";\nimport { DateInputHelper } from \"../util\";\nimport * as styles from \"./date-input.styles\";\nimport type { DateInputProps } from \"./types\";\n\nexport const DateInput = ({\n minDate,\n maxDate,\n disabled,\n disabledDates,\n error,\n hideInputKeyboard,\n value,\n onChange,\n onFocus,\n onBlur,\n onYearMonthDisplayChange,\n withButton = true,\n readOnly,\n id,\n allowDisabledSelection,\n zIndex,\n dropdownRootNode,\n className,\n ...otherProps\n}: DateInputProps) => {\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const [initialDate, setInitialDate] = useState<string>(\n DateInputHelper.sanitizeInput(value)\n );\n const [selectedDate, setSelectedDate] = useState<string>(\n DateInputHelper.sanitizeInput(value)\n );\n const [hoveredDate, setHoveredDate] = useState<string | undefined>(\n undefined\n );\n const [calendarOpen, setCalendarOpen] = useState<boolean>(false);\n const [focused, setFocused] = useState<boolean>(false);\n\n const nodeRef = useRef<HTMLDivElement>(null);\n const inputRef = useRef<StandaloneDateInputRef>(null);\n const calendarRef = useRef<InternalCalendarRef>(null);\n\n // =============================================================================\n // EFFECTS\n // =============================================================================\n useEffect(() => {\n const newValue = DateInputHelper.sanitizeInput(value);\n setInitialDate(newValue);\n setSelectedDate(newValue);\n }, [value]);\n\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleClose = () => {\n inputRef.current?.resetInput();\n setSelectedDate(initialDate);\n setCalendarOpen(false);\n setFocused(false);\n\n performOnBlurHandler();\n\n // clear hover value for mobile scrolling\n setHoveredDate(undefined);\n };\n\n const handleDismiss = () => {\n inputRef.current?.resetInput();\n nodeRef.current?.focus();\n setSelectedDate(initialDate);\n setCalendarOpen(false);\n };\n\n const handleChange = (val: string) => {\n if (\n !allowDisabledSelection &&\n DateInputHelper.isDateDisabled(val, {\n disabledDates,\n minDate,\n maxDate,\n })\n ) {\n return;\n }\n\n setSelectedDate(val);\n\n if (!withButton) {\n performOnChangeHandler(val);\n setInitialDate(val);\n if (val) {\n setCalendarOpen(false);\n }\n }\n };\n\n const handleSelect = (val: string) => {\n setSelectedDate(val);\n\n if (!withButton) {\n performOnChangeHandler(val);\n setInitialDate(val);\n if (val) {\n inputRef.current?.focusYearRef();\n setCalendarOpen(false);\n }\n\n // clear hover value for mobile when onMouseLeave={handleMouseLeaveCell} is not triggered due to touch input\n setHoveredDate(undefined);\n }\n };\n\n const handleFocus = () => {\n if (readOnly || disabled) return;\n\n setCalendarOpen(true);\n\n if (focused) return;\n\n setFocused(true);\n\n if (onFocus) {\n onFocus();\n }\n };\n\n const handleBlur = (e: React.FocusEvent) => {\n const target = e.relatedTarget as HTMLElement;\n\n const isInsideCalendar =\n calendarRef.current && calendarRef.current.contains(target);\n const isInsideNode =\n nodeRef.current && nodeRef.current.contains(target);\n const isFloatingElement =\n target?.matches?.(\"[data-floating-ui-focusable]\") ||\n target?.matches?.(\"[data-floating-ui-focus-guard]\");\n\n // Condition when the calendar is closed and focus moved outside the component\n const shouldBlurWhenClosed =\n focused && !calendarOpen && !isInsideNode && !isFloatingElement;\n\n // Condition when the calendar is open, and focus went outside both input and calendar\n const shouldBlurWhenOpenOutside =\n calendarOpen &&\n !isInsideNode &&\n !isInsideCalendar &&\n !isFloatingElement;\n\n if (shouldBlurWhenClosed || shouldBlurWhenOpenOutside) {\n inputRef.current?.resetInput();\n setSelectedDate(initialDate);\n setFocused(false);\n setCalendarOpen(false);\n performOnBlurHandler();\n }\n };\n\n const handleHoverDayCell = (value: string) => {\n if (!calendarOpen) return;\n setHoveredDate(value);\n };\n\n const handleCalendarAction = (buttonAction: CalendarAction) => {\n // handle button in day calendar view\n switch (buttonAction) {\n case \"reset\":\n setSelectedDate(initialDate);\n break;\n case \"confirmed\":\n setInitialDate(selectedDate);\n performOnChangeHandler(selectedDate);\n break;\n }\n\n const isValid = dayjs(selectedDate, \"YYYY-MM-DD\", true).isValid();\n\n // Focus on year input if the selected date is valid to avoid restarting entire tab order\n if (isValid) {\n inputRef.current?.focusYearRef();\n } else {\n nodeRef.current?.focus();\n }\n setCalendarOpen(false);\n };\n\n // =============================================================================\n // HELPER FUNCTIONS\n // =============================================================================\n const performOnChangeHandler = (changeValue: string) => {\n if (onChange) {\n onChange(changeValue);\n }\n };\n\n const performOnBlurHandler = () => {\n if (onBlur) {\n onBlur();\n }\n };\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n const renderInput = () => {\n return (\n <InputWrapper\n role=\"group\"\n tabIndex={0}\n ref={nodeRef}\n onBlur={handleBlur}\n onFocus={handleFocus}\n disabled={disabled}\n readOnly={readOnly}\n focused={focused}\n error={error}\n id={id}\n data-testid={otherProps[\"data-testid\"]}\n aria-disabled={disabled}\n className={clsx(styles.container, className)}\n {...otherProps}\n >\n <StandaloneDateInput\n ref={inputRef}\n disabled={disabled}\n onChange={handleChange}\n readOnly={readOnly}\n focused={calendarOpen}\n names={[\"start-day\", \"start-month\", \"start-year\"]}\n value={selectedDate}\n hoverValue={hoveredDate}\n hideInputKeyboard={hideInputKeyboard}\n />\n </InputWrapper>\n );\n };\n\n const renderCalendar = ({ elementWidth }: DropdownRenderProps) => {\n return (\n <CalendarDropdown\n variant=\"single\"\n ref={calendarRef}\n initialCalendarDate={selectedDate}\n withButton={withButton}\n value={selectedDate}\n disabledDates={disabledDates}\n minDate={minDate}\n maxDate={maxDate}\n allowDisabledSelection={allowDisabledSelection}\n onHover={handleHoverDayCell}\n onSelect={handleSelect}\n onDismiss={handleCalendarAction}\n onYearMonthDisplayChange={onYearMonthDisplayChange}\n width={elementWidth}\n isFocusable={!readOnly && !disabled}\n />\n );\n };\n\n return (\n <ElementWithDropdown\n enabled={!readOnly && !disabled}\n isOpen={calendarOpen}\n renderElement={renderInput}\n renderDropdown={renderCalendar}\n onClose={handleClose}\n onDismiss={handleDismiss}\n customZIndex={zIndex}\n offset={16}\n rootNode={dropdownRootNode}\n />\n );\n};\n"],"names":["_a","minDate","maxDate","disabled","disabledDates","error","hideInputKeyboard","value","onChange","onFocus","onBlur","onYearMonthDisplayChange","withButton","readOnly","id","allowDisabledSelection","zIndex","dropdownRootNode","className","otherProps","__rest","initialDate","setInitialDate","useState","DateInputHelper","sanitizeInput","selectedDate","setSelectedDate","hoveredDate","setHoveredDate","undefined","calendarOpen","setCalendarOpen","focused","setFocused","nodeRef","useRef","inputRef","calendarRef","useEffect","newValue","handleChange","val","isDateDisabled","performOnChangeHandler","handleSelect","current","focusYearRef","handleFocus","handleBlur","e","target","relatedTarget","isInsideCalendar","contains","isInsideNode","isFloatingElement","matches","call","_b","_c","resetInput","performOnBlurHandler","handleHoverDayCell","handleCalendarAction","buttonAction","dayjs","isValid","focus","changeValue","_jsx","ElementWithDropdown","enabled","isOpen","renderElement","InputWrapper","Object","assign","role","tabIndex","ref","clsx","styles.container","children","StandaloneDateInput","names","hoverValue","renderDropdown","elementWidth","CalendarDropdown","variant","initialCalendarDate","onHover","onSelect","onDismiss","width","isFocusable","onClose","customZIndex","offset","rootNode"],"mappings":"ozBAkB0BA,IAAA,IAAAC,QACtBA,EAAOC,QACPA,EAAOC,SACPA,EAAQC,cACRA,EAAaC,MACbA,EAAKC,kBACLA,EAAiBC,MACjBA,EAAKC,SACLA,EAAQC,QACRA,EAAOC,OACPA,EAAMC,yBACNA,EAAwBC,WACxBA,GAAa,EAAIC,SACjBA,EAAQC,GACRA,EAAEC,uBACFA,EAAsBC,OACtBA,EAAMC,iBACNA,EAAgBC,UAChBA,GAASlB,EACNmB,EAAUC,SAAApB,EAnBS,6OAwBtB,MAAOqB,EAAaC,GAAkBC,EAAAA,SAClCC,kBAAgBC,cAAclB,KAE3BmB,EAAcC,GAAmBJ,EAAAA,SACpCC,kBAAgBC,cAAclB,KAE3BqB,EAAaC,GAAkBN,EAAAA,cAClCO,IAEGC,EAAcC,GAAmBT,EAAAA,UAAkB,IACnDU,EAASC,GAAcX,EAAAA,UAAkB,GAE1CY,EAAUC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AASS,eAAO,IAAA9C,GAAAA,EAAE6D,aAClBlC,EAAgBN,GAChBW,GAAgB,GAChBE,GAAW,GAEX4B,IAGAjC,OAAeC,EAAU,EA0MrBgE,UAvMc,aACF,QAAhB9F,EAAAqC,EAASS,eAAO,IAAA9C,GAAAA,EAAE6D,aACH,QAAfF,EAAAxB,EAAQW,eAAO,IAAAa,GAAAA,EAAES,QACjBzC,EAAgBN,GAChBW,GAAgB,EAAM,EAoMlBkE,aAAclF,EACdmF,OAAQ,GACRC,SAAUnF,GACZ"}
@@ -1,2 +1,2 @@
1
- "use strict";require("./date-navigator.styles_1cotsgz.css");exports.container="c1mdg68z",exports.dateTextButton="d1pl361j",exports.headerArrowButton="h1w7ufcd",exports.headerArrowButtonIcon="h7gg62z";
1
+ "use strict";require("./date-navigator.styles_wokh56.css");exports.container="c1mdg68z",exports.dateTextButton="d1pl361j",exports.headerArrowButton="h1w7ufcd",exports.headerArrowButtonIcon="h7gg62z";
2
2
  //# sourceMappingURL=date-navigator.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"date-navigator.styles.js","sources":["../../../src/date-navigator/date-navigator.styles.ts"],"sourcesContent":["import { css } from \"@linaria/core\";\n\nimport { Colour, Font, Radius, Spacing } from \"../theme\";\n\nexport const container = css`\n display: flex;\n position: relative;\n align-items: center;\n justify-content: space-between;\n background-color: ${Colour[\"bg-strong\"]};\n border-radius: ${Radius[\"sm\"]};\n`;\n\nexport const headerArrowButton = css`\n margin: ${Spacing[\"spacing-8\"]};\n`;\n\nexport const headerArrowButtonIcon = css`\n color: ${Colour[\"icon\"]};\n`;\n\nexport const dateTextButton = css`\n ${Font[\"body-baseline-semibold\"]}\n color: ${Colour[\"text\"]};\n cursor: default;\n\n &:not(:disabled) {\n color: ${Colour[\"text-primary\"]};\n }\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n outline: none;\n cursor: pointer;\n text-decoration: underline;\n text-underline-position: under;\n }\n`;\n"],"names":[],"mappings":"4GAIsB,kCAiBK,qCARG,yCAII"}
1
+ {"version":3,"file":"date-navigator.styles.js","sources":["../../../src/date-navigator/date-navigator.styles.ts"],"sourcesContent":["import { css } from \"@linaria/core\";\n\nimport { Colour, Font, Radius, Spacing } from \"../theme\";\n\nexport const container = css`\n display: flex;\n position: relative;\n align-items: center;\n justify-content: space-between;\n background-color: ${Colour[\"bg-strong\"]};\n border-radius: ${Radius[\"sm\"]};\n`;\n\nexport const headerArrowButton = css`\n margin: ${Spacing[\"spacing-8\"]};\n`;\n\nexport const headerArrowButtonIcon = css`\n color: ${Colour[\"icon\"]};\n`;\n\nexport const dateTextButton = css`\n ${Font[\"body-baseline-semibold\"]}\n color: ${Colour[\"text\"]};\n cursor: default;\n\n &:not(:disabled) {\n color: ${Colour[\"text-primary\"]};\n }\n\n &:not(:disabled):hover,\n &:not(:disabled):focus {\n outline: none;\n cursor: pointer;\n text-decoration: underline;\n text-underline-position: under;\n }\n`;\n"],"names":[],"mappings":"2GAIsB,kCAiBK,qCARG,yCAII"}
@@ -0,0 +1,4 @@
1
+ .c1mdg68z{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;position:relative;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:space-between;-webkit-justify-content:space-between;justify-content:space-between;background-color:var(--fds-colour-bg-strong);border-radius:var(--fds-radius-sm);}
2
+ .h1w7ufcd{margin:var(--fds-spacing-8);}
3
+ .h7gg62z{color:var(--fds-colour-icon);}
4
+ .d1pl361j{font-family:var(--fds-font-family-body);font-variant:var(--fds-font-variant);font-size:var(--fds-font-body-size-baseline);font-weight:var(--fds-font-weight-semibold);line-height:var(--fds-font-body-lh-baseline);letter-spacing:var(--fds-font-body-ls-baseline);color:var(--fds-colour-text);cursor:default;}.d1pl361j:not(:disabled){color:var(--fds-colour-text-primary);}.d1pl361j:not(:disabled):hover,.d1pl361j:not(:disabled):focus{outline:none;cursor:pointer;-webkit-text-decoration:underline;text-decoration:underline;text-underline-position:under;}
@@ -1 +1 @@
1
- {"version":3,"file":"divider.js","sources":["../../../src/divider/divider.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { useRef } from \"react\";\n\nimport { ColDiv } from \"../layout/col-div\";\nimport { Colour, useApplyStyle, useResolvedTokenValue } from \"../theme\";\nimport { isColourToken } from \"../util/styling-helper\";\nimport * as styles from \"./divider.styles\";\nimport type { DividerLineStyleType, DividerProps } from \"./types\";\n\nconst lineStyleMap: Record<DividerLineStyleType, string> = {\n solid: styles.solidLine,\n dashed: styles.dashedLine,\n};\n\nexport const Divider = ({\n thickness = 1,\n lineStyle = \"solid\",\n layoutType = \"flex\",\n color,\n className,\n xxsCols,\n xsCols,\n smCols,\n mdCols,\n lgCols,\n xlCols,\n xxlCols,\n ...otherProps\n}: DividerProps) => {\n const ref = useRef<HTMLHRElement>(null);\n\n const effectiveColor = useResolvedTokenValue({\n value: color,\n fallback: Colour[\"border\"],\n isToken: isColourToken,\n normalizeCustom: String,\n });\n\n const encodedColor = encodeURIComponent(effectiveColor);\n const strokeWidth = thickness + 1; // best fit\n\n useApplyStyle(ref, {\n [styles.tokens.thickness]: `${thickness}px`,\n [styles.tokens.color]: color,\n [styles.tokens.backgroundImage]: `\n url('data:image/svg+xml,<svg width=\"8\" height=\"${thickness}\" viewBox=\"0 0 8 1\" xmlns=\"http://www.w3.org/2000/svg\"><line x1=\"2\" y1=\"1\" x2=\"6\" y2=\"1\" stroke=\"${encodedColor}\" stroke-width=\"${strokeWidth}\" stroke-dasharray=\"4 4\" /></svg>')`,\n });\n\n const getColumnProps = () => {\n const xxsColsProp = xxsCols || [1, -1];\n const xsColsProp = xsCols || xxsColsProp;\n const smColsProp = smCols || xsColsProp;\n const mdColsProp = mdCols || smColsProp;\n const lgColsProp = lgCols || mdColsProp;\n const xlColsProp = xlCols || lgColsProp;\n const xxlColsProp = xxlCols || xlColsProp;\n\n return {\n xxlCols: xxlColsProp,\n xlCols: xlColsProp,\n lgCols: lgColsProp,\n mdCols: mdColsProp,\n smCols: smColsProp,\n xsCols: xsColsProp,\n xxsCols: xxsColsProp,\n };\n };\n\n const lineClass = clsx(styles.lineBase, lineStyleMap[lineStyle]);\n\n switch (layoutType) {\n case \"flex\":\n return (\n <hr\n ref={ref}\n className={clsx(lineClass, className)}\n {...otherProps}\n />\n );\n case \"grid\":\n return (\n <ColDiv\n className={className}\n {...getColumnProps()}\n {...otherProps}\n >\n <hr ref={ref} className={lineClass} />\n </ColDiv>\n );\n }\n};\n"],"names":["lineStyleMap","solid","styles.solidLine","dashed","styles.dashedLine","_a","thickness","lineStyle","layoutType","color","className","xxsCols","xsCols","smCols","mdCols","lgCols","xlCols","xxlCols","otherProps","__rest","ref","useRef","effectiveColor","useResolvedTokenValue","value","fallback","Colour","isToken","isColourToken","normalizeCustom","String","encodedColor","encodeURIComponent","strokeWidth","useApplyStyle","styles.tokens","backgroundImage","lineClass","clsx","styles.lineBase","_jsx","Object","assign","ColDiv","xxsColsProp","xsColsProp","smColsProp","mdColsProp","lgColsProp","xlColsProp","getColumnProps"],"mappings":"isBASA,MAAMA,EAAqD,CACvDC,MAAOC,EAAAA,UACPC,OAAQC,EAAAA,4BAGYC,IAAA,IAAAC,UACpBA,EAAY,EAACC,UACbA,EAAY,QAAOC,WACnBA,EAAa,OAAMC,MACnBA,EAAKC,UACLA,EAASC,QACTA,EAAOC,OACPA,EAAMC,OACNA,EAAMC,OACNA,EAAMC,OACNA,EAAMC,OACNA,EAAMC,QACNA,GAAOZ,EACJa,EAAUC,EAAAA,OAAAd,EAbO,6HAepB,MAAMe,EAAMC,EAAAA,OAAsB,MAE5BC,EAAiBC,EAAAA,sBAAsB,CACzCC,MAAOf,EACPgB,SAAUC,EAAAA,OAAe,OACzBC,QAASC,EAAAA,cACTC,gBAAiBC,SAGfC,EAAeC,mBAAmBV,GAClCW,EAAc3B,EAAY,EAEhC4B,EAAAA,cAAcd,EAAK,CACf,CAACe,EAAAA,OAAc7B,WAAY,GAAGA,MAC9B,CAAC6B,EAAAA,OAAc1B,OAAQA,EACvB,CAAC0B,EAAAA,OAAcC,iBAAkB,gEACoB9B,qGAA6GyB,oBAA+BE,yCAGrM,MAoBMI,EAAYC,EAAAA,QAAKC,EAAAA,SAAiBvC,EAAaO,IAErD,OAAQC,GACJ,IAAK,OACD,OACIgC,EAAAA,IAAA,KAAAC,OAAAC,OAAA,CACItB,IAAKA,EACLV,UAAW4B,EAAAA,QAAKD,EAAW3B,IACvBQ,IAGhB,IAAK,OACD,OACIsB,EAAAA,IAACG,EAAAA,OAAMF,OAAAC,OAAA,CACHhC,UAAWA,GAlCJ,MACnB,MAAMkC,EAAcjC,GAAW,CAAC,GAAG,GAC7BkC,EAAajC,GAAUgC,EACvBE,EAAajC,GAAUgC,EACvBE,EAAajC,GAAUgC,EACvBE,EAAajC,GAAUgC,EACvBE,EAAajC,GAAUgC,EAG7B,MAAO,CACH/B,QAHgBA,GAAWgC,EAI3BjC,OAAQiC,EACRlC,OAAQiC,EACRlC,OAAQiC,EACRlC,OAAQiC,EACRlC,OAAQiC,EACRlC,QAASiC,EACZ,EAkBeM,GACAhC,YAEJsB,EAAAA,IAAA,KAAA,CAAIpB,IAAKA,EAAKV,UAAW2B"}
1
+ {"version":3,"file":"divider.js","sources":["../../../src/divider/divider.tsx"],"sourcesContent":["import clsx from \"clsx\";\nimport { useRef } from \"react\";\n\nimport { ColDiv } from \"../layout/col-div\";\nimport { Colour, useApplyStyle } from \"../theme\";\nimport { useResolvedTokenValue } from \"../theme/utils\";\nimport { isColourToken } from \"../util/styling-helper\";\nimport * as styles from \"./divider.styles\";\nimport type { DividerLineStyleType, DividerProps } from \"./types\";\n\nconst lineStyleMap: Record<DividerLineStyleType, string> = {\n solid: styles.solidLine,\n dashed: styles.dashedLine,\n};\n\nexport const Divider = ({\n thickness = 1,\n lineStyle = \"solid\",\n layoutType = \"flex\",\n color,\n className,\n xxsCols,\n xsCols,\n smCols,\n mdCols,\n lgCols,\n xlCols,\n xxlCols,\n ...otherProps\n}: DividerProps) => {\n const ref = useRef<HTMLHRElement>(null);\n\n const effectiveColor = useResolvedTokenValue({\n value: color,\n fallback: Colour[\"border\"],\n isToken: isColourToken,\n normalizeCustom: String,\n });\n\n const encodedColor = encodeURIComponent(effectiveColor);\n const strokeWidth = thickness + 1; // best fit\n\n useApplyStyle(ref, {\n [styles.tokens.thickness]: `${thickness}px`,\n [styles.tokens.color]: color,\n [styles.tokens.backgroundImage]: `\n url('data:image/svg+xml,<svg width=\"8\" height=\"${thickness}\" viewBox=\"0 0 8 1\" xmlns=\"http://www.w3.org/2000/svg\"><line x1=\"2\" y1=\"1\" x2=\"6\" y2=\"1\" stroke=\"${encodedColor}\" stroke-width=\"${strokeWidth}\" stroke-dasharray=\"4 4\" /></svg>')`,\n });\n\n const getColumnProps = () => {\n const xxsColsProp = xxsCols || [1, -1];\n const xsColsProp = xsCols || xxsColsProp;\n const smColsProp = smCols || xsColsProp;\n const mdColsProp = mdCols || smColsProp;\n const lgColsProp = lgCols || mdColsProp;\n const xlColsProp = xlCols || lgColsProp;\n const xxlColsProp = xxlCols || xlColsProp;\n\n return {\n xxlCols: xxlColsProp,\n xlCols: xlColsProp,\n lgCols: lgColsProp,\n mdCols: mdColsProp,\n smCols: smColsProp,\n xsCols: xsColsProp,\n xxsCols: xxsColsProp,\n };\n };\n\n const lineClass = clsx(styles.lineBase, lineStyleMap[lineStyle]);\n\n switch (layoutType) {\n case \"flex\":\n return (\n <hr\n ref={ref}\n className={clsx(lineClass, className)}\n {...otherProps}\n />\n );\n case \"grid\":\n return (\n <ColDiv\n className={className}\n {...getColumnProps()}\n {...otherProps}\n >\n <hr ref={ref} className={lineClass} />\n </ColDiv>\n );\n }\n};\n"],"names":["lineStyleMap","solid","styles.solidLine","dashed","styles.dashedLine","_a","thickness","lineStyle","layoutType","color","className","xxsCols","xsCols","smCols","mdCols","lgCols","xlCols","xxlCols","otherProps","__rest","ref","useRef","effectiveColor","useResolvedTokenValue","value","fallback","Colour","isToken","isColourToken","normalizeCustom","String","encodedColor","encodeURIComponent","strokeWidth","useApplyStyle","styles.tokens","backgroundImage","lineClass","clsx","styles.lineBase","_jsx","Object","assign","ColDiv","xxsColsProp","xsColsProp","smColsProp","mdColsProp","lgColsProp","xlColsProp","getColumnProps"],"mappings":"isBAUA,MAAMA,EAAqD,CACvDC,MAAOC,EAAAA,UACPC,OAAQC,EAAAA,4BAGYC,IAAA,IAAAC,UACpBA,EAAY,EAACC,UACbA,EAAY,QAAOC,WACnBA,EAAa,OAAMC,MACnBA,EAAKC,UACLA,EAASC,QACTA,EAAOC,OACPA,EAAMC,OACNA,EAAMC,OACNA,EAAMC,OACNA,EAAMC,OACNA,EAAMC,QACNA,GAAOZ,EACJa,EAAUC,EAAAA,OAAAd,EAbO,6HAepB,MAAMe,EAAMC,EAAAA,OAAsB,MAE5BC,EAAiBC,EAAAA,sBAAsB,CACzCC,MAAOf,EACPgB,SAAUC,EAAAA,OAAe,OACzBC,QAASC,EAAAA,cACTC,gBAAiBC,SAGfC,EAAeC,mBAAmBV,GAClCW,EAAc3B,EAAY,EAEhC4B,EAAAA,cAAcd,EAAK,CACf,CAACe,EAAAA,OAAc7B,WAAY,GAAGA,MAC9B,CAAC6B,EAAAA,OAAc1B,OAAQA,EACvB,CAAC0B,EAAAA,OAAcC,iBAAkB,gEACoB9B,qGAA6GyB,oBAA+BE,yCAGrM,MAoBMI,EAAYC,EAAAA,QAAKC,EAAAA,SAAiBvC,EAAaO,IAErD,OAAQC,GACJ,IAAK,OACD,OACIgC,EAAAA,IAAA,KAAAC,OAAAC,OAAA,CACItB,IAAKA,EACLV,UAAW4B,EAAAA,QAAKD,EAAW3B,IACvBQ,IAGhB,IAAK,OACD,OACIsB,EAAAA,IAACG,EAAAA,OAAMF,OAAAC,OAAA,CACHhC,UAAWA,GAlCJ,MACnB,MAAMkC,EAAcjC,GAAW,CAAC,GAAG,GAC7BkC,EAAajC,GAAUgC,EACvBE,EAAajC,GAAUgC,EACvBE,EAAajC,GAAUgC,EACvBE,EAAajC,GAAUgC,EACvBE,EAAajC,GAAUgC,EAG7B,MAAO,CACH/B,QAHgBA,GAAWgC,EAI3BjC,OAAQiC,EACRlC,OAAQiC,EACRlC,OAAQiC,EACRlC,OAAQiC,EACRlC,OAAQiC,EACRlC,QAASiC,EACZ,EAkBeM,GACAhC,YAEJsB,EAAAA,IAAA,KAAA,CAAIpB,IAAKA,EAAKV,UAAW2B"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("../_virtual/_tslib.js"),r=require("react/jsx-runtime"),t=require("fabric"),n=require("react"),i=require("styled-components"),u=require("../v3_theme/index.js"),c=require("./e-signature.styles.js");const a=n.forwardRef(((a,s)=>{const{baseImageDataURL:o}=a,l=n.useRef(null),d=n.useRef(null),v=n.useRef(),f=n.useRef(),h=n.useContext(i.ThemeContext);n.useImperativeHandle(s,(()=>({clear:()=>{var e;return null===(e=v.current)||void 0===e?void 0:e.clear()},export:()=>w()})));const w=()=>{if(!v.current)return null;if(!v.current.getObjects().length)return null;return v.current.toDataURL({multiplier:1,format:"png",quality:1,enableRetinaScaling:!0})},g=n.useCallback((()=>e.__awaiter(void 0,void 0,void 0,(function*(){if(yield new Promise((e=>setTimeout(e))),l.current&&d.current&&v.current){const e=l.current.clientWidth,r=l.current.clientHeight;d.current.width=e,d.current.height=r,v.current.setDimensions({width:e,height:r}),v.current.forEachObject((e=>{v.current&&v.current.centerObject(e)}))}}))),[]);return n.useEffect((()=>{if(l.current&&d.current)return v.current=new t.Canvas("eSignatureCanvas"),v.current.selection=!1,v.current.isDrawingMode=!0,f.current=new t.PencilBrush(v.current),f.current.color=u.V3_Colour.text({theme:h}),f.current.width=3,v.current.freeDrawingBrush=f.current,()=>{var e;null===(e=v.current)||void 0===e||e.dispose()}}),[]),n.useEffect((()=>{var e;if(window)return window.addEventListener("resize",g),null===(e=screen.orientation)||void 0===e||e.addEventListener("change",g),g(),()=>{var e;window.removeEventListener("resize",g),null===(e=screen.orientation)||void 0===e||e.removeEventListener("change",g)}}),[g]),n.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){if(o){const e=yield t.FabricImage.fromURL(o);v.current&&(v.current.clear(),e.selectable=!1,e.hoverCursor="default",v.current.width&&e.width&&e.scale(v.current.width/e.width),v.current.add(e),v.current.centerObject(e))}}))}),[o]),r.jsx(c.SignatureCanvasContainer,{ref:l,children:r.jsx(c.SignatureCanvas,{id:"eSignatureCanvas",ref:d})})}));exports.ESignatureCanvas=a;
1
+ "use strict";var e=require("../_virtual/_tslib.js"),r=require("react/jsx-runtime"),t=require("fabric"),n=require("react");require("../theme/theme-provider/index.js"),require("../theme/theme-provider/context.js"),require("../theme/tokens/border.js");var i=require("../theme/tokens/colour.js");require("../theme/tokens/font.js"),require("../theme/tokens/media-query.js"),require("../util/calendar-helper.js"),require("../external/dayjs/dayjs.min.js"),require("../util/simple-id-generator.js"),require("../util/string-helper.js"),require("@react-aria/live-announcer");var u=require("../theme/utils/use-design-token.js");require("../theme/utils/use-media-query.js");var s=require("./e-signature.styles.js");const a=n.forwardRef(((a,c)=>{const{baseImageDataURL:o}=a,l=n.useRef(null),d=n.useRef(null),v=n.useRef(),h=n.useRef(),f=u.useDesignToken(i.Colour.text);n.useImperativeHandle(c,(()=>({clear:()=>{var e;return null===(e=v.current)||void 0===e?void 0:e.clear()},export:()=>m()})));const m=()=>{if(!v.current)return null;if(!v.current.getObjects().length)return null;return v.current.toDataURL({multiplier:1,format:"png",quality:1,enableRetinaScaling:!0})},g=n.useCallback((()=>e.__awaiter(void 0,void 0,void 0,(function*(){if(yield new Promise((e=>setTimeout(e))),l.current&&d.current&&v.current){const e=l.current.clientWidth,r=l.current.clientHeight;d.current.width=e,d.current.height=r,v.current.setDimensions({width:e,height:r}),v.current.forEachObject((e=>{v.current&&v.current.centerObject(e)}))}}))),[]);return n.useEffect((()=>{if(l.current&&d.current)return v.current=new t.Canvas("eSignatureCanvas"),v.current.selection=!1,v.current.isDrawingMode=!0,h.current=new t.PencilBrush(v.current),h.current.color=f||"#000000",h.current.width=3,v.current.freeDrawingBrush=h.current,()=>{var e;null===(e=v.current)||void 0===e||e.dispose()}}),[]),n.useEffect((()=>{var e;if(window)return window.addEventListener("resize",g),null===(e=screen.orientation)||void 0===e||e.addEventListener("change",g),g(),()=>{var e;window.removeEventListener("resize",g),null===(e=screen.orientation)||void 0===e||e.removeEventListener("change",g)}}),[g]),n.useEffect((()=>{e.__awaiter(void 0,void 0,void 0,(function*(){if(o){const e=yield t.FabricImage.fromURL(o);v.current&&(v.current.clear(),e.selectable=!1,e.hoverCursor="default",v.current.width&&e.width&&e.scale(v.current.width/e.width),v.current.add(e),v.current.centerObject(e))}}))}),[o]),r.jsx("div",{className:s.signatureCanvasContainer,ref:l,children:r.jsx("canvas",{className:s.signatureCanvas,id:"eSignatureCanvas",ref:d})})}));exports.ESignatureCanvas=a;
2
2
  //# sourceMappingURL=e-signature-canvas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"e-signature-canvas.js","sources":["../../../src/e-signature/e-signature-canvas.tsx"],"sourcesContent":["import { Canvas as FabricCanvas, FabricImage, PencilBrush } from \"fabric\";\nimport type { Ref } from \"react\";\nimport {\n forwardRef,\n useCallback,\n useContext,\n useEffect,\n useImperativeHandle,\n useRef,\n} from \"react\";\nimport { ThemeContext } from \"styled-components\";\n\nimport { V3_Colour } from \"../v3_theme\";\nimport {\n SignatureCanvas,\n SignatureCanvasContainer,\n} from \"./e-signature.styles\";\n\ninterface ESignatureCanvasProps {\n baseImageDataURL?: string | null | undefined;\n forwardedRef?: Ref<ESignatureCanvasRef> | undefined;\n}\n\nexport interface ESignatureCanvasRef {\n clear: VoidFunction;\n export: () => string | null;\n}\n\nconst Component = (\n props: ESignatureCanvasProps,\n ref: Ref<ESignatureCanvasRef>\n) => {\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const { baseImageDataURL } = props;\n const containerRef = useRef<HTMLDivElement>(null);\n const canvasRef = useRef<HTMLCanvasElement>(null);\n const fabricCanvas = useRef<FabricCanvas>();\n const pencilBrush = useRef<PencilBrush>();\n const theme = useContext(ThemeContext);\n\n // =============================================================================\n // HOOKS\n // =============================================================================\n useImperativeHandle(ref, () => ({\n clear: () => fabricCanvas.current?.clear(),\n export: () => exportAsImage(),\n }));\n\n // =============================================================================\n // HELPER FUNCTIONS\n // =============================================================================\n const exportAsImage = () => {\n if (!fabricCanvas.current) return null;\n if (!fabricCanvas.current.getObjects().length) return null;\n const dataURL = fabricCanvas.current.toDataURL({\n multiplier: 1,\n format: \"png\",\n quality: 1,\n enableRetinaScaling: true,\n });\n return dataURL;\n };\n\n const handleResize = useCallback(async () => {\n // slight delay for fabricjs to update on orientation change\n await new Promise((resolve) => setTimeout(resolve));\n if (containerRef.current && canvasRef.current && fabricCanvas.current) {\n const canvasWidth = containerRef.current.clientWidth;\n const canvasHeight = containerRef.current.clientHeight;\n canvasRef.current.width = canvasWidth;\n canvasRef.current.height = canvasHeight;\n fabricCanvas.current.setDimensions({\n width: canvasWidth,\n height: canvasHeight,\n });\n\n fabricCanvas.current.forEachObject((obj) => {\n if (fabricCanvas.current) {\n fabricCanvas.current.centerObject(obj);\n }\n });\n }\n }, []);\n\n // =============================================================================\n // EFFECTS\n // =============================================================================\n // initialise fabric and brushes\n useEffect(() => {\n if (containerRef.current && canvasRef.current) {\n fabricCanvas.current = new FabricCanvas(\"eSignatureCanvas\");\n fabricCanvas.current.selection = false;\n fabricCanvas.current.isDrawingMode = true;\n\n pencilBrush.current = new PencilBrush(fabricCanvas.current);\n pencilBrush.current.color = V3_Colour[\"text\"]({ theme });\n pencilBrush.current.width = 3;\n\n fabricCanvas.current.freeDrawingBrush = pencilBrush.current;\n\n return () => {\n fabricCanvas.current?.dispose();\n };\n }\n }, []);\n\n // resize\n useEffect(() => {\n if (window) {\n window.addEventListener(\"resize\", handleResize);\n screen.orientation?.addEventListener(\"change\", handleResize);\n handleResize();\n return () => {\n window.removeEventListener(\"resize\", handleResize);\n screen.orientation?.removeEventListener(\"change\", handleResize);\n };\n }\n }, [handleResize]);\n\n // update base image\n useEffect(() => {\n const updateImage = async () => {\n if (baseImageDataURL) {\n const img = await FabricImage.fromURL(baseImageDataURL);\n if (fabricCanvas.current) {\n fabricCanvas.current.clear();\n img.selectable = false;\n img.hoverCursor = \"default\";\n\n if (fabricCanvas.current.width && img.width) {\n img.scale(fabricCanvas.current.width / img.width);\n }\n fabricCanvas.current.add(img);\n fabricCanvas.current.centerObject(img);\n }\n }\n };\n\n updateImage();\n }, [baseImageDataURL]);\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n return (\n <SignatureCanvasContainer ref={containerRef}>\n <SignatureCanvas id=\"eSignatureCanvas\" ref={canvasRef} />\n </SignatureCanvasContainer>\n );\n};\n\nexport const ESignatureCanvas = forwardRef<\n ESignatureCanvasRef,\n ESignatureCanvasProps\n>(Component);\n"],"names":["ESignatureCanvas","forwardRef","props","ref","baseImageDataURL","containerRef","useRef","canvasRef","fabricCanvas","pencilBrush","theme","useContext","ThemeContext","useImperativeHandle","clear","_a","current","export","exportAsImage","getObjects","length","toDataURL","multiplier","format","quality","enableRetinaScaling","handleResize","useCallback","__awaiter","Promise","resolve","setTimeout","canvasWidth","clientWidth","canvasHeight","clientHeight","width","height","setDimensions","forEachObject","obj","centerObject","useEffect","FabricCanvas","selection","isDrawingMode","PencilBrush","color","V3_Colour","freeDrawingBrush","dispose","window","addEventListener","screen","orientation","removeEventListener","img","FabricImage","fromURL","selectable","hoverCursor","scale","add","_jsx","SignatureCanvasContainer","SignatureCanvas","id"],"mappings":"gOA4BA,MA6HaA,EAAmBC,EAAAA,YA7Hd,CACdC,EACAC,KAKA,MAAMC,iBAAEA,GAAqBF,EACvBG,EAAeC,EAAAA,OAAuB,MACtCC,EAAYD,EAAAA,OAA0B,MACtCE,EAAeF,EAAAA,SACfG,EAAcH,EAAAA,SACdI,EAAQC,EAAAA,WAAWC,gBAKzBC,EAAAA,oBAAoBV,GAAK,KAAA,CACrBW,MAAO,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,WAAU,WACN,GAAIS,OAIA,OAHAA,OAAOC,iBAAiB,SAAU1B,GAChB,QAAlBX,EAAAsC,OAAOC,mBAAW,IAAAvC,GAAAA,EAAEqC,iBAAiB,SAAU1B,GAC/CA,IACO,WACHyB,OAAOI,oBAAoB,SAAU7B,GACnB,QAAlBX,EAAAsC,OAAOC,mBAAW,IAAAvC,GAAAA,EAAEwC,oBAAoB,SAAU7B,EAAa,CAEvE,GACD,CAACA,IAGJgB,EAAAA,WAAU,KACyBd,EAAAA,eAAA,OAAA,OAAA,GAAA,YAC3B,GAAIxB,EAAkB,CAClB,MAAMoD,QAAYC,cAAYC,QAAQtD,GAClCI,EAAaQ,UACbR,EAAaQ,QAAQF,QACrB0C,EAAIG,YAAa,EACjBH,EAAII,YAAc,UAEdpD,EAAaQ,QAAQoB,OAASoB,EAAIpB,OAClCoB,EAAIK,MAAMrD,EAAaQ,QAAQoB,MAAQoB,EAAIpB,OAE/C5B,EAAaQ,QAAQ8C,IAAIN,GACzBhD,EAAaQ,QAAQyB,aAAae,GAE1C,CACJ,GAEa,GACd,CAACpD,IAMA2D,EAAAA,IAACC,EAAAA,yBAAwB,CAAC7D,IAAKE,WAC3B0D,EAAAA,IAACE,EAAAA,iBAAgBC,GAAG,mBAAmB/D,IAAKI,KACrB"}
1
+ {"version":3,"file":"e-signature-canvas.js","sources":["../../../src/e-signature/e-signature-canvas.tsx"],"sourcesContent":["import { Canvas as FabricCanvas, FabricImage, PencilBrush } from \"fabric\";\nimport type { Ref } from \"react\";\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useRef,\n} from \"react\";\n\nimport { Colour, useDesignToken } from \"../theme\";\nimport * as styles from \"./e-signature.styles\";\n\ninterface ESignatureCanvasProps {\n baseImageDataURL?: string | null | undefined;\n forwardedRef?: Ref<ESignatureCanvasRef> | undefined;\n}\n\nexport interface ESignatureCanvasRef {\n clear: VoidFunction;\n export: () => string | null;\n}\n\nconst Component = (\n props: ESignatureCanvasProps,\n ref: Ref<ESignatureCanvasRef>\n) => {\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const { baseImageDataURL } = props;\n const containerRef = useRef<HTMLDivElement>(null);\n const canvasRef = useRef<HTMLCanvasElement>(null);\n const fabricCanvas = useRef<FabricCanvas>();\n const pencilBrush = useRef<PencilBrush>();\n const resolvedColor = useDesignToken(Colour[\"text\"]);\n\n // =============================================================================\n // HOOKS\n // =============================================================================\n useImperativeHandle(ref, () => ({\n clear: () => fabricCanvas.current?.clear(),\n export: () => exportAsImage(),\n }));\n\n // =============================================================================\n // HELPER FUNCTIONS\n // =============================================================================\n const exportAsImage = () => {\n if (!fabricCanvas.current) return null;\n if (!fabricCanvas.current.getObjects().length) return null;\n const dataURL = fabricCanvas.current.toDataURL({\n multiplier: 1,\n format: \"png\",\n quality: 1,\n enableRetinaScaling: true,\n });\n return dataURL;\n };\n\n const handleResize = useCallback(async () => {\n // slight delay for fabricjs to update on orientation change\n await new Promise((resolve) => setTimeout(resolve));\n if (containerRef.current && canvasRef.current && fabricCanvas.current) {\n const canvasWidth = containerRef.current.clientWidth;\n const canvasHeight = containerRef.current.clientHeight;\n canvasRef.current.width = canvasWidth;\n canvasRef.current.height = canvasHeight;\n fabricCanvas.current.setDimensions({\n width: canvasWidth,\n height: canvasHeight,\n });\n\n fabricCanvas.current.forEachObject((obj) => {\n if (fabricCanvas.current) {\n fabricCanvas.current.centerObject(obj);\n }\n });\n }\n }, []);\n\n // =============================================================================\n // EFFECTS\n // =============================================================================\n // initialise fabric and brushes\n useEffect(() => {\n if (containerRef.current && canvasRef.current) {\n fabricCanvas.current = new FabricCanvas(\"eSignatureCanvas\");\n fabricCanvas.current.selection = false;\n fabricCanvas.current.isDrawingMode = true;\n\n pencilBrush.current = new PencilBrush(fabricCanvas.current);\n pencilBrush.current.color = resolvedColor || \"#000000\";\n pencilBrush.current.width = 3;\n\n fabricCanvas.current.freeDrawingBrush = pencilBrush.current;\n\n return () => {\n fabricCanvas.current?.dispose();\n };\n }\n }, []);\n\n // resize\n useEffect(() => {\n if (window) {\n window.addEventListener(\"resize\", handleResize);\n screen.orientation?.addEventListener(\"change\", handleResize);\n handleResize();\n return () => {\n window.removeEventListener(\"resize\", handleResize);\n screen.orientation?.removeEventListener(\"change\", handleResize);\n };\n }\n }, [handleResize]);\n\n // update base image\n useEffect(() => {\n const updateImage = async () => {\n if (baseImageDataURL) {\n const img = await FabricImage.fromURL(baseImageDataURL);\n if (fabricCanvas.current) {\n fabricCanvas.current.clear();\n img.selectable = false;\n img.hoverCursor = \"default\";\n\n if (fabricCanvas.current.width && img.width) {\n img.scale(fabricCanvas.current.width / img.width);\n }\n fabricCanvas.current.add(img);\n fabricCanvas.current.centerObject(img);\n }\n }\n };\n\n updateImage();\n }, [baseImageDataURL]);\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n return (\n <div className={styles.signatureCanvasContainer} ref={containerRef}>\n <canvas\n className={styles.signatureCanvas}\n id=\"eSignatureCanvas\"\n ref={canvasRef}\n />\n </div>\n );\n};\n\nexport const ESignatureCanvas = forwardRef<\n ESignatureCanvasRef,\n ESignatureCanvasProps\n>(Component);\n"],"names":["ESignatureCanvas","forwardRef","props","ref","baseImageDataURL","containerRef","useRef","canvasRef","fabricCanvas","pencilBrush","resolvedColor","useDesignToken","Colour","useImperativeHandle","clear","_a","current","export","exportAsImage","getObjects","length","toDataURL","multiplier","format","quality","enableRetinaScaling","handleResize","useCallback","__awaiter","Promise","resolve","setTimeout","canvasWidth","clientWidth","canvasHeight","clientHeight","width","height","setDimensions","forEachObject","obj","centerObject","useEffect","FabricCanvas","selection","isDrawingMode","PencilBrush","color","freeDrawingBrush","dispose","window","addEventListener","screen","orientation","removeEventListener","img","FabricImage","fromURL","selectable","hoverCursor","scale","add","_jsx","className","styles.signatureCanvasContainer","children","styles.signatureCanvas","id"],"mappings":"+rBAuBA,MAiIaA,EAAmBC,EAAAA,YAjId,CACdC,EACAC,KAKA,MAAMC,iBAAEA,GAA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AAiB,UAC7CD,EAAYO,QAAQoB,MAAQ,EAE5B5B,EAAaQ,QAAQgC,iBAAmBvC,EAAYO,QAE7C,WACiB,QAApBD,EAAAP,EAAaQ,eAAO,IAAAD,GAAAA,EAAEkC,SAAS,CAEvC,GACD,IAGHP,EAAAA,WAAU,WACN,GAAIQ,OAIA,OAHAA,OAAOC,iBAAiB,SAAUzB,GAChB,QAAlBX,EAAAqC,OAAOC,mBAAW,IAAAtC,GAAAA,EAAEoC,iBAAiB,SAAUzB,GAC/CA,IACO,WACHwB,OAAOI,oBAAoB,SAAU5B,GACnB,QAAlBX,EAAAqC,OAAOC,mBAAW,IAAAtC,GAAAA,EAAEuC,oBAAoB,SAAU5B,EAAa,CAEvE,GACD,CAACA,IAGJgB,EAAAA,WAAU,KACyBd,EAAAA,eAAA,OAAA,OAAA,GAAA,YAC3B,GAAIxB,EAAkB,CAClB,MAAMmD,QAAYC,cAAYC,QAAQrD,GAClCI,EAAaQ,UACbR,EAAaQ,QAAQF,QACrByC,EAAIG,YAAa,EACjBH,EAAII,YAAc,UAEdnD,EAAaQ,QAAQoB,OAASmB,EAAInB,OAClCmB,EAAIK,MAAMpD,EAAaQ,QAAQoB,MAAQmB,EAAInB,OAE/C5B,EAAaQ,QAAQ6C,IAAIN,GACzB/C,EAAaQ,QAAQyB,aAAac,GAE1C,CACJ,GAEa,GACd,CAACnD,IAMA0D,EAAAA,IAAA,MAAA,CAAKC,UAAWC,EAAAA,yBAAiC7D,IAAKE,EAAY4D,SAC9DH,EAAAA,IAAA,SAAA,CACIC,UAAWG,EAAAA,gBACXC,GAAG,mBACHhE,IAAKI,KAEP"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("../_virtual/_tslib.js"),r=require("react/jsx-runtime"),i=require("@lifesg/react-icons"),s=require("react"),t=require("../shared/progress-bar/progress-bar.js");require("../theme/theme-provider/index.js"),require("../theme/theme-provider/context.js"),require("../theme/tokens/border.js");var a=require("../theme/tokens/breakpoint.js");require("../theme/tokens/colour.js"),require("../theme/tokens/font.js"),require("../theme/tokens/media-query.js"),require("../util/calendar-helper.js"),require("../external/dayjs/dayjs.min.js"),require("../util/simple-id-generator.js"),require("../util/string-helper.js"),require("@react-aria/live-announcer");var n=require("../theme/utils/use-media-query.js"),l=require("../typography/index.js"),u=require("./e-signature.styles.js");const o=s.lazy((()=>e.__awaiter(void 0,void 0,void 0,(function*(){return{default:(yield Promise.resolve().then((function(){return require("./e-signature-canvas.js")}))).ESignatureCanvas}})))),{AddSignatureButton:d,EditSignatureButton:c,ESignatureContainer:g,ESignatureDrawable:j,GrowContainer:h,Instructions:x,ModalActionButton:p,ModalBox:m,ModalButtons:y,ModalTitle:b,ProgressBox:v,ScrollableModal:q,SignatureArea:f,SignatureLine:S,SignaturePreviewImage:k}=u;exports.ESignature=u=>{const{description:B,id:C,loadingProgress:E,loadingLabel:M="Uploading...",onChange:T,value:_,disabled:A}=u,I=e.__rest(u,["description","id","loadingProgress","loadingLabel","onChange","value","disabled"]),[P,w]=s.useState(!1),L=s.useRef(null),[D,R]=s.useState(_),z=n.useMaxWidthMediaQuery("sm"),O=n.useResolvedBreakpointToken(a.Breakpoint["sm-max"],n.DEFAULT_MOBILE_MAX_WIDTH_BREAKPOINT),U=n.useMediaQuery({clauses:[{feature:"orientation",value:"landscape"},{feature:"max-height",value:O}]}),F=()=>{var e;null===(e=L.current)||void 0===e||e.clear()},Q=()=>{if(L.current){const e=L.current.export();R(e),w(!1),null==T||T(e)}};s.useEffect((()=>{R(_)}),[_]);return r.jsxs("div",Object.assign({},I,{children:[r.jsx(f,{$disabled:A,children:"number"==typeof E?r.jsxs(v,{children:[M&&r.jsx(l.Typography.BodyMD,{children:M}),r.jsx(t.ProgressBar,{progress:null!=E?E:0,"data-testid":`${C||"e-signature"}-progress-bar`})]}):D?r.jsxs(r.Fragment,{children:[r.jsx(k,{src:D,alt:"Signature preview"}),r.jsx(c,{styleType:"light",onClick:()=>w(!0),id:C,icon:r.jsx(i.PencilIcon,{}),"aria-label":"Edit signature",disabled:A})]}):r.jsx(d,{type:"button",styleType:"secondary","aria-label":"Add signature",id:C,onClick:()=>w(!0),disabled:A,children:"Add signature"})}),r.jsx(q,{"data-testid":"signature-modal",show:P,children:r.jsx(h,{children:r.jsxs(m,{onClose:()=>w(!1),children:[r.jsx(b,{children:"Signature"}),r.jsx(g,{children:r.jsxs(j,{children:[r.jsx(S,{}),r.jsx(s.Suspense,{fallback:null,children:P&&r.jsx(o,{ref:L,baseImageDataURL:D})})]})}),r.jsxs(y,{children:[r.jsx(p,{sizeType:U?"small":"default",type:"button",styleType:z&&!U?"light":"link",icon:r.jsx(i.EraserIcon,{}),onClick:F,children:"Clear"}),r.jsx(p,{sizeType:U?"small":"default",type:"button",onClick:Q,children:"Save"})]})]})})}),B?r.jsx(x,{children:B}):null]}))};
1
+ "use strict";var e=require("../_virtual/_tslib.js"),a=require("react/jsx-runtime"),r=require("@lifesg/react-icons"),s=require("react"),i=require("../button/button.js"),t=require("../dashed-border/dashed-border.js"),l=require("../modal/index.js"),n=require("../shared/progress-bar/progress-bar.js");require("../theme/theme-provider/index.js"),require("../theme/theme-provider/context.js");var o=require("../theme/tokens/border.js"),d=require("../theme/tokens/breakpoint.js"),u=require("../theme/tokens/colour.js");require("../theme/tokens/font.js"),require("../theme/tokens/media-query.js");var c=require("../theme/tokens/radius.js");require("../util/calendar-helper.js"),require("../external/dayjs/dayjs.min.js"),require("../util/simple-id-generator.js"),require("../util/string-helper.js"),require("@react-aria/live-announcer");var m=require("../theme/utils/use-media-query.js"),g=require("../typography/index.js"),h=require("./e-signature.styles.js");const j=s.lazy((()=>e.__awaiter(void 0,void 0,void 0,(function*(){return{default:(yield Promise.resolve().then((function(){return require("./e-signature-canvas.js")}))).ESignatureCanvas}}))));exports.ESignature=p=>{const{description:b,id:x,loadingProgress:v,loadingLabel:y="Uploading...",onChange:q,value:B,disabled:k}=p,f=e.__rest(p,["description","id","loadingProgress","loadingLabel","onChange","value","disabled"]),[C,N]=s.useState(!1),S=s.useRef(null),[T,M]=s.useState(B),w=m.useMaxWidthMediaQuery("sm"),P=m.useResolvedBreakpointToken(d.Breakpoint["sm-max"]),_=m.useMediaQuery({clauses:[{feature:"orientation",value:"landscape"},{feature:"max-height",value:P}]}),A=()=>{var e;null===(e=S.current)||void 0===e||e.clear()},E=()=>{if(S.current){const e=S.current.export();M(e),N(!1),null==q||q(e)}};s.useEffect((()=>{M(B)}),[B]);return a.jsxs("div",Object.assign({},f,{children:[a.jsx(t.DashedBorder,{className:h.signatureArea,thickness:o.Border["width-040"],radius:c.Radius.sm,colour:k?u.Colour["border-disabled"]:u.Colour.border,backgroundColor:k?u.Colour["bg-disabled"]:u.Colour.bg,children:"number"==typeof v?a.jsxs("div",{className:h.progressBox,children:[y&&a.jsx(g.Typography.BodyMD,{children:y}),a.jsx(n.ProgressBar,{progress:null!=v?v:0,"data-testid":`${x||"e-signature"}-progress-bar`})]}):T?a.jsxs(a.Fragment,{children:[a.jsx("img",{className:h.signaturePreviewImage,src:T,alt:"Signature preview"}),a.jsx(i.Button,{className:h.editSignatureButton,styleType:"light",onClick:()=>N(!0),id:x,icon:a.jsx(r.PencilIcon,{}),"aria-label":"Edit signature",disabled:k})]}):a.jsx(i.Button,{className:h.addSignatureButton,type:"button",styleType:"secondary","aria-label":"Add signature",id:x,onClick:()=>N(!0),disabled:k,children:"Add signature"})}),a.jsx(l.Modal,{className:h.scrollableModal,"data-testid":"signature-modal",show:C,children:a.jsx("div",{className:h.growContainer,"data-mobile-landscape":_,children:a.jsxs(l.Modal.Box,{className:h.modalBox,"data-mobile-landscape":_,onClose:()=>N(!1),children:[a.jsx("h2",{className:h.modalTitle,"data-mobile-landscape":_,children:"Signature"}),a.jsx("div",{className:h.eSignatureContainer,"data-mobile-landscape":_,children:a.jsxs("div",{className:h.eSignatureDrawable,"data-mobile-landscape":_,children:[a.jsx("div",{className:h.signatureLine,"data-mobile-landscape":_}),a.jsx(s.Suspense,{fallback:null,children:C&&a.jsx(j,{ref:S,baseImageDataURL:T})})]})}),a.jsxs("div",{className:h.modalButtons,"data-mobile-landscape":_,children:[a.jsx(i.Button,{className:h.modalActionButton,"data-mobile-landscape":_,sizeType:_?"small":"default",type:"button",styleType:w&&!_?"light":"link",icon:a.jsx(r.EraserIcon,{}),onClick:A,children:"Clear"}),a.jsx(i.Button,{className:h.modalActionButton,"data-mobile-landscape":_,sizeType:_?"small":"default",type:"button",onClick:E,children:"Save"})]})]})})}),b?a.jsx(g.Typography.BodySM,{className:h.instructions,children:b}):null]}))};
2
2
  //# sourceMappingURL=e-signature.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"e-signature.js","sources":["../../../src/e-signature/e-signature.tsx"],"sourcesContent":["import { EraserIcon, PencilIcon } from \"@lifesg/react-icons\";\nimport { lazy, Suspense, useEffect, useRef, useState } from \"react\";\n\nimport { ProgressBar } from \"../shared/progress-bar\";\nimport {\n Breakpoint,\n DEFAULT_MOBILE_MAX_WIDTH_BREAKPOINT,\n useMaxWidthMediaQuery,\n useMediaQuery,\n useResolvedBreakpointToken,\n} from \"../theme\";\nimport { Typography } from \"../typography\";\nimport * as styles from \"./e-signature.styles\";\nimport type { ESignatureCanvasRef } from \"./e-signature-canvas\";\nimport type { EsignatureProps } from \"./types\";\n\n// lazy load to fix next.js SSR errors\nconst ESignatureCanvas = lazy(async () => ({\n default: (await import(\"./e-signature-canvas\")).ESignatureCanvas,\n}));\n\nconst {\n AddSignatureButton,\n EditSignatureButton,\n ESignatureContainer,\n ESignatureDrawable,\n GrowContainer,\n Instructions,\n ModalActionButton,\n ModalBox,\n ModalButtons,\n ModalTitle,\n ProgressBox,\n ScrollableModal,\n SignatureArea,\n SignatureLine,\n SignaturePreviewImage,\n} = styles;\n\nexport const ESignature = (props: EsignatureProps) => {\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const {\n description,\n id,\n loadingProgress,\n loadingLabel = \"Uploading...\",\n onChange,\n value,\n disabled,\n ...otherProps\n } = props;\n const [showModal, setShowModal] = useState(false);\n const eSignatureCanvasRef = useRef<ESignatureCanvasRef>(null);\n const [dataURL, setDataURL] = useState<string | null | undefined>(value);\n const isMobile = useMaxWidthMediaQuery(\"sm\");\n const mobileBreakpoint = useResolvedBreakpointToken(\n Breakpoint[\"sm-max\"],\n DEFAULT_MOBILE_MAX_WIDTH_BREAKPOINT\n );\n const isMobileLandscape = useMediaQuery({\n clauses: [\n {\n feature: \"orientation\",\n value: \"landscape\",\n },\n {\n feature: \"max-height\",\n value: mobileBreakpoint,\n },\n ],\n });\n\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleClearDrawing = () => {\n eSignatureCanvasRef.current?.clear();\n };\n\n const handleClickSave = () => {\n if (eSignatureCanvasRef.current) {\n const dataURL = eSignatureCanvasRef.current.export();\n setDataURL(dataURL);\n setShowModal(false);\n onChange?.(dataURL);\n }\n };\n\n // =============================================================================\n // EFFECTS\n // =============================================================================\n useEffect(() => {\n setDataURL(value);\n }, [value]);\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n const renderSignatureArea = () => {\n if (!dataURL) {\n return (\n <AddSignatureButton\n type=\"button\"\n styleType=\"secondary\"\n aria-label=\"Add signature\"\n id={id}\n onClick={() => setShowModal(true)}\n disabled={disabled}\n >\n Add signature\n </AddSignatureButton>\n );\n }\n\n return (\n <>\n <SignaturePreviewImage src={dataURL} alt=\"Signature preview\" />\n <EditSignatureButton\n styleType=\"light\"\n onClick={() => setShowModal(true)}\n id={id}\n icon={<PencilIcon />}\n aria-label=\"Edit signature\"\n disabled={disabled}\n />\n </>\n );\n };\n\n const renderLoadingIndicator = () => {\n return (\n <ProgressBox>\n {loadingLabel && (\n <Typography.BodyMD>{loadingLabel}</Typography.BodyMD>\n )}\n <ProgressBar\n progress={loadingProgress ?? 0}\n data-testid={`${id || \"e-signature\"}-progress-bar`}\n />\n </ProgressBox>\n );\n };\n\n const renderModal = () => {\n return (\n <ScrollableModal data-testid=\"signature-modal\" show={showModal}>\n <GrowContainer>\n <ModalBox onClose={() => setShowModal(false)}>\n <ModalTitle>Signature</ModalTitle>\n <ESignatureContainer>\n <ESignatureDrawable>\n <SignatureLine />\n <Suspense fallback={null}>\n {showModal && (\n <ESignatureCanvas\n ref={eSignatureCanvasRef}\n baseImageDataURL={dataURL}\n />\n )}\n </Suspense>\n </ESignatureDrawable>\n </ESignatureContainer>\n <ModalButtons>\n <ModalActionButton\n sizeType={\n isMobileLandscape ? \"small\" : \"default\"\n }\n type=\"button\"\n styleType={\n isMobile && !isMobileLandscape\n ? \"light\"\n : \"link\"\n }\n icon={<EraserIcon />}\n onClick={handleClearDrawing}\n >\n Clear\n </ModalActionButton>\n <ModalActionButton\n sizeType={\n isMobileLandscape ? \"small\" : \"default\"\n }\n type=\"button\"\n onClick={handleClickSave}\n >\n Save\n </ModalActionButton>\n </ModalButtons>\n </ModalBox>\n </GrowContainer>\n </ScrollableModal>\n );\n };\n\n const renderDescription = () => {\n if (!description) return null;\n return <Instructions>{description}</Instructions>;\n };\n\n return (\n <div {...otherProps}>\n <SignatureArea $disabled={disabled}>\n {typeof loadingProgress === \"number\"\n ? renderLoadingIndicator()\n : renderSignatureArea()}\n </SignatureArea>\n {renderModal()}\n {renderDescription()}\n </div>\n );\n};\n"],"names":["ESignatureCanvas","lazy","__awaiter","default","Promise","AddSignatureButton","EditSignatureButton","ESignatureContainer","ESignatureDrawable","GrowContainer","Instructions","ModalActionButton","ModalBox","ModalButtons","ModalTitle","ProgressBox","ScrollableModal","SignatureArea","SignatureLine","SignaturePreviewImage","styles","props","description","id","loadingProgress","loadingLabel","onChange","value","disabled","otherProps","__rest","showModal","setShowModal","useState","eSignatureCanvasRef","useRef","dataURL","setDataURL","isMobile","useMaxWidthMediaQuery","mobileBreakpoint","useResolvedBreakpointToken","Breakpoint","DEFAULT_MOBILE_MAX_WIDTH_BREAKPOINT","isMobileLandscape","useMediaQuery","clauses","feature","handleClearDrawing","_a","current","clear","handleClickSave","export","useEffect","_jsxs","Object","assign","children","_jsx","$disabled","Typography","BodyMD","ProgressBar","progress","src","alt","styleType","onClick","icon","PencilIcon","type","show","onClose","Suspense","fallback","ref","baseImageDataURL","sizeType","EraserIcon"],"mappings":"2xBAiBA,MAAMA,EAAmBC,EAAAA,MAAK,IAAWC,EAAAA,eAAA,OAAA,OAAA,GAAA,YAAC,MAAA,CACtCC,eAAgBC,kDAAO,0BAAsB,KAAGJ,iBAClD,OAEIK,mBACFA,EAAkBC,oBAClBA,EAAmBC,oBACnBA,EAAmBC,mBACnBA,EAAkBC,cAClBA,EAAaC,aACbA,EAAYC,kBACZA,EAAiBC,SACjBA,EAAQC,aACRA,EAAYC,WACZA,EAAUC,YACVA,EAAWC,gBACXA,EAAeC,cACfA,EAAaC,cACbA,EAAaC,sBACbA,GACAC,qBAEuBC,IAIvB,MAAMC,YACFA,EAAWC,GACXA,EAAEC,gBACFA,EAAeC,aACfA,EAAe,eAAcC,SAC7BA,EAAQC,MACRA,EAAKC,SACLA,GAEAP,EADGQ,EAAUC,SACbT,EATE,CAAA,cAAA,KAAA,kBAAA,eAAA,WAAA,QAAA,cAUCU,EAAWC,GAAgBC,EAAAA,UAAS,GACrCC,EAAsBC,EAAAA,OAA4B,OACjDC,EAASC,GAAcJ,EAAAA,SAAoCN,GAC5DW,EAAWC,EAAAA,sBAAsB,MACjCC,EAAmBC,EAAAA,2BACrBC,EAAAA,WAAW,UACXC,EAAAA,qCAEEC,EAAoBC,EAAAA,cAAc,CACpCC,QAAS,CACL,CACIC,QAAS,cACTpB,MAAO,aAEX,CACIoB,QAAS,aACTpB,MAAOa,MAQbQ,EAAqB,WACI,QAA3BC,EAAAf,EAAoBgB,eAAO,IAAAD,GAAAA,EAAEE,OAAO,EAGlCC,EAAkB,KACpB,GAAIlB,EAAoBgB,QAAS,CAC7B,MAAMd,EAAUF,EAAoBgB,QAAQG,SAC5ChB,EAAWD,GACXJ,GAAa,GACbN,SAAAA,EAAWU,EACf,GAMJkB,EAAAA,WAAU,KACNjB,EAAWV,EA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,EAAiB,CACdmE,SACIlC,EAAoB,QAAU,UAElC2B,KAAK,SACLJ,UACI7B,IAAaM,EACP,QACA,OAEVyB,KAAMV,EAAAA,IAACoB,EAAAA,WAAU,CAAA,GACjBX,QAASpB,qBAIbW,EAAAA,IAAChD,EAAiB,CACdmE,SACIlC,EAAoB,QAAU,UAElC2B,KAAK,SACLH,QAAShB,EAAeM,SAAA,mBAY3CpC,EACEqC,EAAAA,IAACjD,EAAY,CAAAgD,SAAEpC,IADG,QAanB"}
1
+ {"version":3,"file":"e-signature.js","sources":["../../../src/e-signature/e-signature.tsx"],"sourcesContent":["import { EraserIcon, PencilIcon } from \"@lifesg/react-icons\";\nimport { lazy, Suspense, useEffect, useRef, useState } from \"react\";\n\nimport { Button } from \"../button\";\nimport { DashedBorder } from \"../dashed-border\";\nimport { Modal } from \"../modal\";\nimport { ProgressBar } from \"../shared/progress-bar\";\nimport {\n Border,\n Breakpoint,\n Colour,\n Radius,\n useMaxWidthMediaQuery,\n useMediaQuery,\n useResolvedBreakpointToken,\n} from \"../theme\";\nimport { Typography } from \"../typography\";\nimport * as styles from \"./e-signature.styles\";\nimport type { ESignatureCanvasRef } from \"./e-signature-canvas\";\nimport type { EsignatureProps } from \"./types\";\n\n// lazy load to fix next.js SSR errors\nconst ESignatureCanvas = lazy(async () => ({\n default: (await import(\"./e-signature-canvas\")).ESignatureCanvas,\n}));\n\nexport const ESignature = (props: EsignatureProps) => {\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const {\n description,\n id,\n loadingProgress,\n loadingLabel = \"Uploading...\",\n onChange,\n value,\n disabled,\n ...otherProps\n } = props;\n const [showModal, setShowModal] = useState(false);\n const eSignatureCanvasRef = useRef<ESignatureCanvasRef>(null);\n const [dataURL, setDataURL] = useState<string | null | undefined>(value);\n const isMobile = useMaxWidthMediaQuery(\"sm\");\n const mobileBreakpoint = useResolvedBreakpointToken(Breakpoint[\"sm-max\"]);\n const isMobileLandscape = useMediaQuery({\n clauses: [\n {\n feature: \"orientation\",\n value: \"landscape\",\n },\n {\n feature: \"max-height\",\n value: mobileBreakpoint,\n },\n ],\n });\n\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleClearDrawing = () => {\n eSignatureCanvasRef.current?.clear();\n };\n\n const handleClickSave = () => {\n if (eSignatureCanvasRef.current) {\n const dataURL = eSignatureCanvasRef.current.export();\n setDataURL(dataURL);\n setShowModal(false);\n onChange?.(dataURL);\n }\n };\n\n // =============================================================================\n // EFFECTS\n // =============================================================================\n useEffect(() => {\n setDataURL(value);\n }, [value]);\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n const renderSignatureArea = () => {\n if (!dataURL) {\n return (\n <Button\n className={styles.addSignatureButton}\n type=\"button\"\n styleType=\"secondary\"\n aria-label=\"Add signature\"\n id={id}\n onClick={() => setShowModal(true)}\n disabled={disabled}\n >\n Add signature\n </Button>\n );\n }\n\n return (\n <>\n <img\n className={styles.signaturePreviewImage}\n src={dataURL}\n alt=\"Signature preview\"\n />\n <Button\n className={styles.editSignatureButton}\n styleType=\"light\"\n onClick={() => setShowModal(true)}\n id={id}\n icon={<PencilIcon />}\n aria-label=\"Edit signature\"\n disabled={disabled}\n />\n </>\n );\n };\n\n const renderLoadingIndicator = () => {\n return (\n <div className={styles.progressBox}>\n {loadingLabel && (\n <Typography.BodyMD>{loadingLabel}</Typography.BodyMD>\n )}\n <ProgressBar\n progress={loadingProgress ?? 0}\n data-testid={`${id || \"e-signature\"}-progress-bar`}\n />\n </div>\n );\n };\n\n const renderModal = () => {\n return (\n <Modal\n className={styles.scrollableModal}\n data-testid=\"signature-modal\"\n show={showModal}\n >\n <div\n className={styles.growContainer}\n data-mobile-landscape={isMobileLandscape}\n >\n <Modal.Box\n className={styles.modalBox}\n data-mobile-landscape={isMobileLandscape}\n onClose={() => setShowModal(false)}\n >\n <h2\n className={styles.modalTitle}\n data-mobile-landscape={isMobileLandscape}\n >\n Signature\n </h2>\n <div\n className={styles.eSignatureContainer}\n data-mobile-landscape={isMobileLandscape}\n >\n <div\n className={styles.eSignatureDrawable}\n data-mobile-landscape={isMobileLandscape}\n >\n <div\n className={styles.signatureLine}\n data-mobile-landscape={isMobileLandscape}\n />\n <Suspense fallback={null}>\n {showModal && (\n <ESignatureCanvas\n ref={eSignatureCanvasRef}\n baseImageDataURL={dataURL}\n />\n )}\n </Suspense>\n </div>\n </div>\n <div\n className={styles.modalButtons}\n data-mobile-landscape={isMobileLandscape}\n >\n <Button\n className={styles.modalActionButton}\n data-mobile-landscape={isMobileLandscape}\n sizeType={\n isMobileLandscape ? \"small\" : \"default\"\n }\n type=\"button\"\n styleType={\n isMobile && !isMobileLandscape\n ? \"light\"\n : \"link\"\n }\n icon={<EraserIcon />}\n onClick={handleClearDrawing}\n >\n Clear\n </Button>\n <Button\n className={styles.modalActionButton}\n data-mobile-landscape={isMobileLandscape}\n sizeType={\n isMobileLandscape ? \"small\" : \"default\"\n }\n type=\"button\"\n onClick={handleClickSave}\n >\n Save\n </Button>\n </div>\n </Modal.Box>\n </div>\n </Modal>\n );\n };\n\n const renderDescription = () => {\n if (!description) return null;\n return (\n <Typography.BodySM className={styles.instructions}>\n {description}\n </Typography.BodySM>\n );\n };\n\n return (\n <div {...otherProps}>\n <DashedBorder\n className={styles.signatureArea}\n thickness={Border[\"width-040\"]}\n radius={Radius[\"sm\"]}\n colour={disabled ? Colour[\"border-disabled\"] : Colour[\"border\"]}\n backgroundColor={\n disabled ? Colour[\"bg-disabled\"] : Colour[\"bg\"]\n }\n >\n {typeof loadingProgress === \"number\"\n ? renderLoadingIndicator()\n : renderSignatureArea()}\n </DashedBorder>\n {renderModal()}\n {renderDescription()}\n </div>\n );\n};\n"],"names":["ESignatureCanvas","lazy","__awaiter","default","Promise","props","description","id","loadingProgress","loadingLabel","onChange","value","disabled","otherProps","__rest","showModal","setShowModal","useState","eSignatureCanvasRef","useRef","dataURL","setDataURL","isMobile","useMaxWidthMediaQuery","mobileBreakpoint","useResolvedBreakpointToken","Breakpoint","isMobileLandscape","useMediaQuery","clauses","feature","handleClearDrawing","_a","current","clear","handleClickSave","export","useEffect","_jsxs","Object","assign","children","_jsx","DashedBorder","className","styles.signatureArea","thickness","Border","radius","Radius","colour","Colour","backgroundColor","styles.progressBox","Typography","BodyMD","ProgressBar","progress","_Fragment","styles.signaturePreviewImage","src","alt","Button","styles.editSignatureButton","styleType","onClick","icon","PencilIcon","styles.addSignatureButton","type","Modal","styles.scrollableModal","show","styles.growContainer","Box","styles.modalBox","onClose","styles.modalTitle","styles.eSignatureContainer","styles.eSignatureDrawable","styles.signatureLine","Suspense","fallback","ref","baseImageDataURL","styles.modalButtons","styles.modalActionButton","sizeType","EraserIcon","BodySM","styles.instructions"],"mappings":"y7BAsBA,MAAMA,EAAmBC,EAAAA,MAAK,IAAWC,EAAAA,eAAA,OAAA,OAAA,GAAA,YAAC,MAAA,CACtCC,eAAgBC,kDAAO,0BAAsB,KAAGJ,iBAClD,yBAEyBK,IAIvB,MAAMC,YACFA,EAAWC,GACXA,EAAEC,gBACFA,EAAeC,aACfA,EAAe,eAAcC,SAC7BA,EAAQC,MACRA,EAAKC,SACLA,GAEAP,EADGQ,EAAUC,SACbT,EATE,CAAA,cAAA,KAAA,kBAAA,eAAA,WAAA,QAAA,cAUCU,EAAWC,GAAgBC,EAAAA,UAAS,GACrCC,EAAsBC,EAAAA,OAA4B,OACjDC,EAASC,GAAcJ,EAAAA,SAAoCN,GAC5DW,EAAWC,EAAAA,sBAAsB,MACjCC,EAAmBC,EAAAA,2BAA2BC,EAAAA,WAAW,WACzDC,EAAoBC,EAAAA,cAAc,CACpCC,QAAS,CACL,CACIC,QAAS,cACTnB,MAAO,aAEX,CACImB,QAAS,aACTnB,MAAOa,MAQbO,EAAqB,WACI,QAA3BC,EAAAd,EAAoBe,eAAO,IAAAD,GAAAA,EAAEE,OAAO,EAGlCC,EAAkB,KACpB,GAAIjB,EAAoBe,QAAS,CAC7B,MAAMb,EAAUF,EAAoBe,QAAQG,SAC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