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

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 (1629) 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} +4 -4
  4. package/accordion/accordion.d.ts +19 -0
  5. package/accordion/accordion.js.map +1 -1
  6. package/accordion/accordion.styles.js +1 -1
  7. package/{cjs/accordion/accordion.styles_ijglff.css → accordion/accordion.styles_bzrfrs.css} +3 -3
  8. package/accordion/types.d.ts +42 -2
  9. package/alert/alert.d.ts +8 -0
  10. package/alert/alert.js.map +1 -1
  11. package/alert/alert.styles.js +1 -1
  12. package/alert/alert.styles.js.map +1 -1
  13. package/{cjs/alert/alert.styles_1ygel36.css → alert/alert.styles_patwo2.css} +6 -6
  14. package/alert/types.d.ts +26 -2
  15. package/animations/loading-dots/loading-dots.styles_1rgrrmw.css +2 -2
  16. package/animations/loading-dots/lottie-animation.styles_1m15v69.css +1 -1
  17. package/animations/loading-dots-spinner/loading-dots-spinner.styles_1hcqkhs.css +2 -2
  18. package/animations/loading-dots-spinner/lottie-animation.styles_13d1unb.css +1 -1
  19. package/animations/loading-spinner/loading-spinner.styles_n6xoft.css +2 -2
  20. package/animations/loading-spinner/lottie-animation.styles_bnn4qt.css +1 -1
  21. package/avatar/avatar.d.ts +7 -0
  22. package/avatar/avatar.js.map +1 -1
  23. package/avatar/avatar.styles_16efw4.css +2 -2
  24. package/avatar/types.d.ts +11 -0
  25. package/badge/badge.d.ts +7 -0
  26. package/badge/badge.js +1 -1
  27. package/badge/badge.js.map +1 -1
  28. package/badge/badge.styles.js +1 -1
  29. package/badge/badge.styles_1c3c6wj.css +16 -0
  30. package/badge/types.d.ts +21 -1
  31. package/box-container/box-container.d.ts +8 -0
  32. package/box-container/box-container.js.map +1 -1
  33. package/box-container/box-container.styles.js +1 -1
  34. package/box-container/box-container.styles.js.map +1 -1
  35. package/box-container/{box-container.styles_5y84d5.css → box-container.styles_5t2j9k.css} +4 -4
  36. package/box-container/types.d.ts +24 -0
  37. package/breadcrumb/breadcrumb.js +1 -1
  38. package/breadcrumb/breadcrumb.js.map +1 -1
  39. package/breadcrumb/breadcrumb.styles_1nl4aua.css +2 -2
  40. package/button/button.styles.js +1 -1
  41. package/button/button.styles.js.map +1 -1
  42. package/button/{button.styles_bcpkzm.css → button.styles_1pxy0co.css} +5 -5
  43. package/calendar/calendar.js +1 -1
  44. package/calendar/calendar.js.map +1 -1
  45. package/calendar/calendar.styles_11ho5x8.css +2 -2
  46. package/card/card.styles_1gh9gs3.css +2 -2
  47. package/checkbox/checkbox.styles_gm5bu1.css +2 -2
  48. package/cjs/accordion/accordion-item.styles.js +1 -1
  49. package/cjs/accordion/accordion-item.styles.js.map +1 -1
  50. package/cjs/accordion/{accordion-item.styles_kchcad.css → accordion-item.styles_1j4eb32.css} +4 -4
  51. package/cjs/accordion/accordion.js.map +1 -1
  52. package/cjs/accordion/accordion.styles.js +1 -1
  53. package/{accordion/accordion.styles_ijglff.css → cjs/accordion/accordion.styles_bzrfrs.css} +3 -3
  54. package/cjs/alert/alert.js.map +1 -1
  55. package/cjs/alert/alert.styles.js +1 -1
  56. package/cjs/alert/alert.styles.js.map +1 -1
  57. package/{alert/alert.styles_1ygel36.css → cjs/alert/alert.styles_patwo2.css} +6 -6
  58. package/cjs/animations/loading-dots/loading-dots.styles_1rgrrmw.css +2 -2
  59. package/cjs/animations/loading-dots/lottie-animation.styles_1m15v69.css +1 -1
  60. package/cjs/animations/loading-dots-spinner/loading-dots-spinner.styles_1hcqkhs.css +2 -2
  61. package/cjs/animations/loading-dots-spinner/lottie-animation.styles_13d1unb.css +1 -1
  62. package/cjs/animations/loading-spinner/loading-spinner.styles_n6xoft.css +2 -2
  63. package/cjs/animations/loading-spinner/lottie-animation.styles_bnn4qt.css +1 -1
  64. package/cjs/avatar/avatar.js.map +1 -1
  65. package/cjs/avatar/avatar.styles_16efw4.css +2 -2
  66. package/cjs/badge/badge.js +1 -1
  67. package/cjs/badge/badge.js.map +1 -1
  68. package/cjs/badge/badge.styles.js +1 -1
  69. package/cjs/badge/badge.styles_1c3c6wj.css +16 -0
  70. package/cjs/box-container/box-container.js.map +1 -1
  71. package/cjs/box-container/box-container.styles.js +1 -1
  72. package/cjs/box-container/box-container.styles.js.map +1 -1
  73. package/cjs/box-container/{box-container.styles_5y84d5.css → box-container.styles_5t2j9k.css} +4 -4
  74. package/cjs/breadcrumb/breadcrumb.js +1 -1
  75. package/cjs/breadcrumb/breadcrumb.js.map +1 -1
  76. package/cjs/breadcrumb/breadcrumb.styles_1nl4aua.css +2 -2
  77. package/cjs/button/button.styles.js +1 -1
  78. package/cjs/button/button.styles.js.map +1 -1
  79. package/cjs/button/{button.styles_bcpkzm.css → button.styles_1pxy0co.css} +5 -5
  80. package/cjs/calendar/calendar.js +1 -1
  81. package/cjs/calendar/calendar.js.map +1 -1
  82. package/cjs/calendar/calendar.styles_11ho5x8.css +2 -2
  83. package/cjs/card/card.styles_1gh9gs3.css +2 -2
  84. package/cjs/checkbox/checkbox.styles_gm5bu1.css +2 -2
  85. package/cjs/countdown-timer/countdown-timer.js.map +1 -1
  86. package/cjs/countdown-timer/countdown-timer.styles.js +1 -1
  87. package/cjs/countdown-timer/{countdown-timer.styles_k50tkw.css → countdown-timer.styles_ipn1b0.css} +3 -3
  88. package/cjs/dashed-border/dashed-border.js +1 -1
  89. package/cjs/dashed-border/dashed-border.js.map +1 -1
  90. package/cjs/dashed-border/dashed-border.styles_zszoox.css +2 -2
  91. package/cjs/data-table/data-table.js +1 -1
  92. package/cjs/data-table/data-table.js.map +1 -1
  93. package/cjs/data-table/data-table.styles.js +1 -1
  94. package/cjs/data-table/{data-table.styles_1nj2uzq.css → data-table.styles_1iqq1g7.css} +3 -3
  95. package/cjs/date-input/date-input.js +1 -1
  96. package/cjs/date-input/date-input.js.map +1 -1
  97. package/cjs/date-input/date-input.styles_1r5kcc7.css +1 -1
  98. package/cjs/date-navigator/date-navigator.js.map +1 -1
  99. package/cjs/date-navigator/date-navigator.styles.js +1 -1
  100. package/cjs/date-navigator/date-navigator.styles.js.map +1 -1
  101. package/cjs/date-navigator/date-navigator.styles_wokh56.css +4 -0
  102. package/cjs/date-range-input/date-range-input.js.map +1 -1
  103. package/cjs/date-range-input/date-range-input.styles_1s7ojnj.css +2 -2
  104. package/cjs/divider/divider.js.map +1 -1
  105. package/cjs/divider/divider.styles_1xpzh8p.css +2 -2
  106. package/cjs/drawer/drawer.js.map +1 -1
  107. package/cjs/drawer/drawer.styles_94hx3y.css +2 -2
  108. package/cjs/e-signature/e-signature-canvas.js +1 -1
  109. package/cjs/e-signature/e-signature-canvas.js.map +1 -1
  110. package/cjs/e-signature/e-signature.js +1 -1
  111. package/cjs/e-signature/e-signature.js.map +1 -1
  112. package/cjs/e-signature/e-signature.styles.js +1 -168
  113. package/cjs/e-signature/e-signature.styles.js.map +1 -1
  114. package/cjs/e-signature/e-signature.styles_lukd9f.css +17 -0
  115. package/cjs/error-display/error-display-data.js +1 -1
  116. package/cjs/error-display/error-display-data.js.map +1 -1
  117. package/cjs/error-display/error-display.js.map +1 -1
  118. package/cjs/error-display/error-display.styles_d3tql1.css +2 -2
  119. package/cjs/external/dompurify/dist/purify.es.js +3 -3
  120. package/cjs/external/dompurify/dist/purify.es.js.map +1 -1
  121. package/cjs/external/lodash/get.js +1 -1
  122. package/cjs/external/lodash/get.js.map +1 -1
  123. package/cjs/feedback-rating/feedback-rating-stars-container.styles_dmi8z9.css +2 -2
  124. package/cjs/feedback-rating/feedback-rating.js.map +1 -1
  125. package/cjs/feedback-rating/feedback-rating.styles_1kdklb6.css +2 -2
  126. package/cjs/file-download/file-download.js +1 -1
  127. package/cjs/file-download/file-download.js.map +1 -1
  128. package/cjs/file-download/file-download.styles.js +1 -32
  129. package/cjs/file-download/file-download.styles.js.map +1 -1
  130. package/cjs/file-download/file-download.styles_iggk8q.css +8 -0
  131. package/cjs/file-download/file-list-card/file-list-card.js +1 -1
  132. package/cjs/file-download/file-list-card/file-list-card.js.map +1 -1
  133. package/cjs/file-download/file-list-card/file-list-card.styles.js +1 -177
  134. package/cjs/file-download/file-list-card/file-list-card.styles.js.map +1 -1
  135. package/cjs/file-download/file-list-card/file-list-card.styles_18j2gut.css +16 -0
  136. package/cjs/file-upload/dropzone.styles_1pllsau.css +2 -2
  137. package/cjs/file-upload/file-item-edit.js +1 -1
  138. package/cjs/file-upload/file-item-edit.js.map +1 -1
  139. package/cjs/file-upload/file-item-edit.styles.js +1 -1
  140. package/cjs/file-upload/file-item-edit.styles.js.map +1 -1
  141. package/{file-upload/file-item-edit.styles_1qbpbxj.css → cjs/file-upload/file-item-edit.styles_19bvztn.css} +6 -5
  142. package/cjs/file-upload/file-list/file-list.js +2 -0
  143. package/cjs/file-upload/file-list/file-list.js.map +1 -0
  144. package/cjs/file-upload/file-list/file-list.styles.js +2 -0
  145. package/cjs/file-upload/file-list/file-list.styles.js.map +1 -0
  146. package/cjs/file-upload/file-list/file-list.styles_1w7so98.css +3 -0
  147. package/cjs/file-upload/file-list-item/file-list-item-thumbnail.styles.js +1 -1
  148. package/cjs/file-upload/file-list-item/file-list-item-thumbnail.styles_1y4si19.css +4 -0
  149. package/cjs/file-upload/file-list-item/file-list-item.js +1 -1
  150. package/cjs/file-upload/file-list-item/file-list-item.js.map +1 -1
  151. package/cjs/file-upload/file-list-item/file-list-item.styles.js +1 -1
  152. package/cjs/file-upload/file-list-item/file-list-item.styles.js.map +1 -1
  153. package/cjs/file-upload/file-list-item/file-list-item.styles_o8000f.css +17 -0
  154. package/cjs/file-upload/file-upload.js +1 -1
  155. package/cjs/file-upload/file-upload.js.map +1 -1
  156. package/cjs/file-upload/file-upload.styles_9ffwcd.css +2 -2
  157. package/cjs/filter/addons/filter-item-checkbox.styles.js +1 -1
  158. package/cjs/filter/addons/filter-item-checkbox.styles.js.map +1 -1
  159. package/{filter/addons/filter-item-checkbox.styles_18l87i2.css → cjs/filter/addons/filter-item-checkbox.styles_7degw7.css} +3 -3
  160. package/cjs/filter/filter-badge.js +2 -0
  161. package/cjs/filter/filter-badge.js.map +1 -0
  162. package/cjs/filter/filter-item-page.js +1 -1
  163. package/cjs/filter/filter-item-page.js.map +1 -1
  164. package/cjs/filter/filter-item-page.styles_17ewfrz.css +1 -1
  165. package/cjs/filter/filter-item.js.map +1 -1
  166. package/cjs/filter/filter-item.styles.js +1 -1
  167. package/cjs/filter/filter-item.styles.js.map +1 -1
  168. package/{filter/filter-item.styles_1e3v6qq.css → cjs/filter/filter-item.styles_cphjnj.css} +4 -4
  169. package/cjs/filter/filter-modal.js +1 -1
  170. package/cjs/filter/filter-modal.js.map +1 -1
  171. package/cjs/filter/filter-modal.styles.js +1 -1
  172. package/cjs/filter/filter-modal.styles.js.map +1 -1
  173. package/cjs/filter/filter-modal.styles_qw3xlg.css +10 -0
  174. package/cjs/filter/filter-sidebar.js +1 -1
  175. package/cjs/filter/filter-sidebar.js.map +1 -1
  176. package/cjs/filter/filter-sidebar.styles.js +1 -1
  177. package/cjs/filter/filter-sidebar.styles.js.map +1 -1
  178. package/cjs/filter/filter-sidebar.styles_1otwpjl.css +5 -0
  179. package/cjs/filter/filter.js.map +1 -1
  180. package/cjs/filter/filter.styles.js +1 -1
  181. package/cjs/filter/filter.styles.js.map +1 -1
  182. package/cjs/filter/{filter.styles_2fmaok.css → filter.styles_1ykijwm.css} +2 -2
  183. package/cjs/footer/footer-download-app.styles_1v1j2us.css +2 -2
  184. package/cjs/footer/footer-resource-addon.styles_1jepb1d.css +2 -2
  185. package/cjs/footer/footer.js +1 -1
  186. package/cjs/footer/footer.js.map +1 -1
  187. package/cjs/footer/footer.styles_1msorhc.css +2 -2
  188. package/cjs/form/form-label-addon.styles_b00z8p.css +1 -1
  189. package/cjs/form/form-label.styles.js +1 -1
  190. package/cjs/form/form-label.styles.js.map +1 -1
  191. package/cjs/form/form-label.styles_1nbe0bm.css +6 -0
  192. package/cjs/form/form-textarea.styles_3p9qoy.css +2 -2
  193. package/cjs/form/form-wrapper.js +1 -1
  194. package/cjs/form/form-wrapper.js.map +1 -1
  195. package/cjs/form/form-wrapper.styles_199rslu.css +1 -1
  196. package/cjs/fullscreen-image-carousel/fullscreen-image-carousel.js +1 -1
  197. package/cjs/fullscreen-image-carousel/fullscreen-image-carousel.js.map +1 -1
  198. package/cjs/fullscreen-image-carousel/fullscreen-image-carousel.styles_vc6y5c.css +2 -2
  199. package/cjs/fullscreen-image-carousel/stateful-image.styles_1xe8ypm.css +2 -2
  200. package/cjs/histogram-slider/histogram-slider.styles_wvd4w.css +2 -2
  201. package/cjs/image-button/image-button.styles.js +1 -1
  202. package/cjs/image-button/image-button.styles_6n1qsr.css +5 -0
  203. package/cjs/index.js +1 -1
  204. package/cjs/input/input.styles_1cblor0.css +2 -2
  205. package/cjs/input-group/input-group-list-addon.js +1 -1
  206. package/cjs/input-group/input-group-list-addon.js.map +1 -1
  207. package/cjs/input-group/input-group-list-addon.styles_17iuqtw.css +2 -2
  208. package/cjs/input-group/input-group.styles.js +1 -1
  209. package/cjs/input-group/input-group.styles_bqye6f.css +3 -0
  210. package/cjs/input-multi-select/input-multi-select.js +1 -1
  211. package/cjs/input-multi-select/input-multi-select.js.map +1 -1
  212. package/cjs/input-nested-multi-select/input-nested-multi-select.js +1 -1
  213. package/cjs/input-nested-multi-select/input-nested-multi-select.js.map +1 -1
  214. package/cjs/input-nested-select/input-nested-select.js +1 -1
  215. package/cjs/input-nested-select/input-nested-select.js.map +1 -1
  216. package/cjs/input-range-select/input-range-select.js +1 -1
  217. package/cjs/input-range-select/input-range-select.js.map +1 -1
  218. package/cjs/input-range-select/input-range-select.styles_adbrbm.css +2 -2
  219. package/cjs/input-range-slider/input-range-slider.styles_aljl2v.css +2 -2
  220. package/cjs/input-select/input-select.js +1 -1
  221. package/cjs/input-select/input-select.js.map +1 -1
  222. package/cjs/input-textarea/textarea-counter.styles.js +1 -1
  223. package/cjs/input-textarea/textarea-counter.styles.js.map +1 -1
  224. package/cjs/input-textarea/textarea-counter.styles_1n3wsnv.css +1 -0
  225. package/cjs/input-textarea/textarea.styles.js +1 -1
  226. package/cjs/input-textarea/textarea.styles_22z4n3.css +5 -0
  227. package/cjs/language-switcher/dropdown-panel.styles.js +1 -1
  228. package/cjs/language-switcher/dropdown-panel.styles.js.map +1 -1
  229. package/cjs/language-switcher/dropdown-panel.styles_1qsjf8d.css +4 -0
  230. package/cjs/language-switcher/dropdown-variant.js +1 -1
  231. package/cjs/language-switcher/dropdown-variant.js.map +1 -1
  232. package/cjs/language-switcher/dropdown-variant.styles.js +1 -1
  233. package/cjs/language-switcher/dropdown-variant.styles_1vrdfky.css +2 -0
  234. package/cjs/language-switcher/link-container-variant.styles.js +1 -1
  235. package/cjs/language-switcher/link-container-variant.styles_1iw6zux.css +5 -0
  236. package/cjs/layout/col-div.js +1 -1
  237. package/cjs/layout/col-div.js.map +1 -1
  238. package/cjs/layout/col-div.styles_16o6mwx.css +1 -1
  239. package/cjs/layout/container.styles_v70ec6.css +2 -2
  240. package/cjs/layout/section.styles_hstcaf.css +1 -1
  241. package/cjs/link-list/link-list.styles.js +1 -1
  242. package/cjs/link-list/link-list.styles.js.map +1 -1
  243. package/{link-list/link-list.styles_1g33nb4.css → cjs/link-list/link-list.styles_m57vks.css} +4 -4
  244. package/cjs/local-nav/local-nav-dropdown/local-nav-dropdown.styles.js +1 -1
  245. package/{local-nav/local-nav-dropdown/local-nav-dropdown.styles_ftv36t.css → cjs/local-nav/local-nav-dropdown/local-nav-dropdown.styles_uhd4xl.css} +3 -3
  246. package/cjs/local-nav/local-nav-menu/local-nav-menu.styles_pq19dh.css +2 -2
  247. package/cjs/markup/markup.js +1 -1
  248. package/cjs/markup/markup.js.map +1 -1
  249. package/cjs/markup/markup.style.js +1 -1
  250. package/cjs/markup/markup.style.js.map +1 -1
  251. package/cjs/markup/markup.style_1iu40x9.css +2 -2
  252. package/cjs/masked-input/masked-input.styles.js +1 -1
  253. package/cjs/masked-input/masked-input.styles.js.map +1 -1
  254. package/{masked-input/masked-input.styles_4i1qsy.css → cjs/masked-input/masked-input.styles_1cm388a.css} +4 -4
  255. package/cjs/masthead/masthead.js +1 -1
  256. package/cjs/masthead/masthead.js.map +1 -1
  257. package/cjs/masthead/masthead.styles_1huzon9.css +2 -2
  258. package/cjs/menu/menu-content.styles_p7ijll.css +2 -2
  259. package/cjs/menu/menu-item.styles_liyed8.css +2 -2
  260. package/cjs/menu/menu-link.styles_hfxoez.css +2 -2
  261. package/cjs/menu/menu-section.styles_g7my4d.css +2 -2
  262. package/cjs/modal/modal-box.styles.js +1 -1
  263. package/cjs/modal/modal-box.styles.js.map +1 -1
  264. package/cjs/modal/modal-box.styles_y52cts.css +11 -0
  265. package/cjs/modal/modal.js +1 -1
  266. package/cjs/modal/modal.js.map +1 -1
  267. package/cjs/modal/modal.styles.js +1 -1
  268. package/cjs/modal/modal.styles.js.map +1 -1
  269. package/cjs/modal/modal.styles_1lbblx6.css +11 -0
  270. package/cjs/modal-v2/modal-v2.js +1 -1
  271. package/cjs/modal-v2/modal-v2.js.map +1 -1
  272. package/cjs/modal-v2/modal-v2.styles.js +1 -1
  273. package/cjs/modal-v2/modal-v2.styles.js.map +1 -1
  274. package/cjs/modal-v2/modal-v2.styles_a8gv5i.css +3 -0
  275. package/cjs/modal-v2/slots/card.js +1 -1
  276. package/cjs/modal-v2/slots/card.js.map +1 -1
  277. package/cjs/modal-v2/slots/slot-styles_13sd376.css +2 -2
  278. package/cjs/navbar/brand.styles_zcgddp.css +1 -1
  279. package/cjs/navbar/drawer.js +1 -1
  280. package/cjs/navbar/drawer.js.map +1 -1
  281. package/cjs/navbar/drawer.styles_7hnxp5.css +2 -2
  282. package/cjs/navbar/menu.styles_gdpqc.css +2 -2
  283. package/cjs/navbar/navbar-action-buttons.styles_1vpm0nk.css +2 -2
  284. package/cjs/navbar/navbar-items.styles.js +1 -1
  285. package/cjs/navbar/navbar-items.styles.js.map +1 -1
  286. package/cjs/navbar/{navbar-items.styles_i9cunu.css → navbar-items.styles_1i3ltot.css} +8 -8
  287. package/cjs/navbar/navbar.js +1 -1
  288. package/cjs/navbar/navbar.js.map +1 -1
  289. package/cjs/navbar/navbar.styles_koy0c7.css +2 -2
  290. package/cjs/notification-banner/notification-banner.styles.js +1 -1
  291. package/cjs/notification-banner/notification-banner.styles.js.map +1 -1
  292. package/{notification-banner/notification-banner.styles_130loac.css → cjs/notification-banner/notification-banner.styles_uxlysy.css} +4 -4
  293. package/cjs/otp-input/otp-input.styles_5sbutl.css +2 -2
  294. package/cjs/otp-verification/contact-input-section.js +1 -1
  295. package/cjs/otp-verification/contact-input-section.js.map +1 -1
  296. package/cjs/otp-verification/contact-input-section.styles.js +2 -0
  297. package/cjs/otp-verification/contact-input-section.styles.js.map +1 -0
  298. package/cjs/otp-verification/contact-input-section.styles_odrjvt.css +14 -0
  299. package/cjs/otp-verification/otp-verification.js +1 -1
  300. package/cjs/otp-verification/otp-verification.js.map +1 -1
  301. package/cjs/otp-verification/otp-verification.styles.js +2 -0
  302. package/cjs/otp-verification/otp-verification.styles.js.map +1 -0
  303. package/cjs/otp-verification/otp-verification.styles_dg9bm8.css +1 -0
  304. package/cjs/otp-verification/thumbnail/email-thumbnail.js +1 -21
  305. package/cjs/otp-verification/thumbnail/email-thumbnail.js.map +1 -1
  306. package/cjs/otp-verification/thumbnail/phone-thumbnail.js +1 -17
  307. package/cjs/otp-verification/thumbnail/phone-thumbnail.js.map +1 -1
  308. package/cjs/otp-verification/thumbnail/thumbnail.styles.js +2 -0
  309. package/cjs/otp-verification/thumbnail/thumbnail.styles.js.map +1 -0
  310. package/cjs/otp-verification/thumbnail/thumbnail.styles_shqylh.css +3 -0
  311. package/cjs/otp-verification/verification-section.js +1 -1
  312. package/cjs/otp-verification/verification-section.js.map +1 -1
  313. package/cjs/otp-verification/verification-section.styles.js +2 -0
  314. package/cjs/otp-verification/verification-section.styles.js.map +1 -0
  315. package/cjs/otp-verification/verification-section.styles_x8jj.css +5 -0
  316. package/cjs/overlay/overlay.js +1 -1
  317. package/cjs/overlay/overlay.js.map +1 -1
  318. package/cjs/overlay/overlay.styles_12wym18.css +2 -2
  319. package/cjs/pagination/pagination.styles.js +1 -1
  320. package/cjs/pagination/pagination.styles.js.map +1 -1
  321. package/{pagination/pagination.styles_1u898rb.css → cjs/pagination/pagination.styles_6bcgva.css} +5 -5
  322. package/cjs/pill/pill.styles.js +1 -1
  323. package/{pill/pill.styles_1wiyl8.css → cjs/pill/pill.styles_xwrniu.css} +2 -2
  324. package/cjs/popover/popover-inline/popover-inline.styles_bkopnt.css +2 -2
  325. package/cjs/popover/popover-trigger.styles_8zokig.css +1 -1
  326. package/cjs/popover/popover.styles_ujnf0h.css +2 -2
  327. package/cjs/predictive-text-input/predictive-text-input.js +1 -1
  328. package/cjs/predictive-text-input/predictive-text-input.js.map +1 -1
  329. package/cjs/progress-indicator/progress-indicator.styles_1c038s4.css +2 -2
  330. package/cjs/radio-button/radio-button.styles_1c4v6v.css +2 -2
  331. package/cjs/schedule/const.js +1 -1
  332. package/cjs/schedule/const.js.map +1 -1
  333. package/cjs/schedule/schedule-day-view/schedule-day-view.js +1 -1
  334. package/cjs/schedule/schedule-day-view/schedule-day-view.js.map +1 -1
  335. package/cjs/schedule/schedule-day-view/schedule-day-view.styles.js +1 -152
  336. package/cjs/schedule/schedule-day-view/schedule-day-view.styles.js.map +1 -1
  337. package/cjs/schedule/schedule-day-view/schedule-day-view.styles_8ti149.css +30 -0
  338. package/cjs/schedule/schedule-header/schedule-header.js +1 -1
  339. package/cjs/schedule/schedule-header/schedule-header.js.map +1 -1
  340. package/cjs/schedule/schedule-header/schedule-header.styles.js +2 -0
  341. package/cjs/schedule/schedule-header/schedule-header.styles.js.map +1 -0
  342. package/cjs/schedule/schedule-header/schedule-header.styles_1n2u5vj.css +6 -0
  343. package/cjs/schedule/schedule-slot-content/schedule-slot-content.js +2 -0
  344. package/cjs/schedule/schedule-slot-content/schedule-slot-content.js.map +1 -0
  345. package/cjs/schedule/schedule-slot-content/style-helper.js +2 -0
  346. package/cjs/schedule/schedule-slot-content/style-helper.js.map +1 -0
  347. package/cjs/schedule/schedule-week-view/schedule-week-view.js +1 -1
  348. package/cjs/schedule/schedule-week-view/schedule-week-view.js.map +1 -1
  349. package/cjs/schedule/schedule-week-view/schedule-week-view.styles.js +1 -74
  350. package/cjs/schedule/schedule-week-view/schedule-week-view.styles.js.map +1 -1
  351. package/cjs/schedule/schedule-week-view/schedule-week-view.styles_x7x50m.css +10 -0
  352. package/cjs/schedule/schedule-week-view/time-cell.js +1 -1
  353. package/cjs/schedule/schedule-week-view/time-cell.js.map +1 -1
  354. package/cjs/schedule/schedule-week-view/time-cell.styles.js +1 -34
  355. package/cjs/schedule/schedule-week-view/time-cell.styles.js.map +1 -1
  356. package/cjs/schedule/schedule-week-view/time-cell.styles_1sorjz8.css +14 -0
  357. package/cjs/schedule/schedule-week-view/week-view-utils.js +1 -1
  358. package/cjs/schedule/schedule-week-view/week-view-utils.js.map +1 -1
  359. package/cjs/schedule/schedule.js +1 -1
  360. package/cjs/schedule/schedule.js.map +1 -1
  361. package/cjs/schedule/schedule.styles.js +1 -26
  362. package/cjs/schedule/schedule.styles.js.map +1 -1
  363. package/cjs/schedule/schedule.styles_fdy5a1.css +5 -0
  364. package/cjs/schedule/shared/with-optional-popover.js +1 -5
  365. package/cjs/schedule/shared/with-optional-popover.js.map +1 -1
  366. package/cjs/schedule/shared/with-optional-popover.styles.js +2 -0
  367. package/cjs/schedule/shared/with-optional-popover.styles.js.map +1 -0
  368. package/cjs/schedule/shared/with-optional-popover.styles_7mv3p2.css +1 -0
  369. package/cjs/schedule/time-indicator/time-indicator.js +1 -1
  370. package/cjs/schedule/time-indicator/time-indicator.js.map +1 -1
  371. package/cjs/schedule/time-indicator/time-indicator.styles.js +1 -33
  372. package/cjs/schedule/time-indicator/time-indicator.styles.js.map +1 -1
  373. package/cjs/schedule/time-indicator/time-indicator.styles_1eaxyes.css +6 -0
  374. package/cjs/select-histogram/select-histogram.js +1 -1
  375. package/cjs/select-histogram/select-histogram.js.map +1 -1
  376. package/cjs/select-histogram/select-histogram.styles.js +1 -1
  377. package/cjs/select-histogram/select-histogram.styles.js.map +1 -1
  378. package/cjs/select-histogram/select-histogram.styles_n260dy.css +5 -0
  379. package/cjs/shared/accessibility/index_13g9vp.css +1 -1
  380. package/cjs/shared/clickable-icon/clickable-icon.styles_1v2imml.css +2 -2
  381. package/cjs/shared/component-loading-spinner/component-loading-spinner.styles_15eq02i.css +2 -2
  382. package/cjs/shared/dropdown-list/dropdown-label.js +1 -1
  383. package/cjs/shared/dropdown-list/dropdown-label.js.map +1 -1
  384. package/cjs/shared/dropdown-list/dropdown-label.styles.js +1 -1
  385. package/cjs/shared/dropdown-list/dropdown-label.styles.js.map +1 -1
  386. package/{shared/dropdown-list/dropdown-label.styles_1dwmd8f.css → cjs/shared/dropdown-list/dropdown-label.styles_mloii0.css} +6 -6
  387. package/cjs/shared/dropdown-list/dropdown-list.styles.js +1 -1
  388. package/cjs/shared/dropdown-list/dropdown-list.styles.js.map +1 -1
  389. package/{shared/dropdown-list/dropdown-list.styles_1kt4zhf.css → cjs/shared/dropdown-list/dropdown-list.styles_konwm.css} +5 -5
  390. package/cjs/shared/dropdown-list/dropdown-search.styles.js +1 -1
  391. package/cjs/shared/dropdown-list/dropdown-search.styles.js.map +1 -1
  392. package/{shared/dropdown-list/dropdown-search.styles_4r9oma.css → cjs/shared/dropdown-list/dropdown-search.styles_1hc1gkh.css} +3 -3
  393. package/cjs/shared/dropdown-list/expandable-element.js +1 -1
  394. package/cjs/shared/dropdown-list/expandable-element.js.map +1 -1
  395. package/cjs/shared/dropdown-list/expandable-element.styles.js +1 -1
  396. package/cjs/shared/dropdown-list/expandable-element.styles.js.map +1 -1
  397. package/cjs/shared/dropdown-list/expandable-element.styles_rkkvqr.css +5 -0
  398. package/cjs/shared/dropdown-list/nested-dropdown-list.styles_wdhxoe.css +2 -2
  399. package/cjs/shared/dropdown-wrapper/dropdown-wrapper.styles.js +1 -1
  400. package/cjs/shared/dropdown-wrapper/dropdown-wrapper.styles.js.map +1 -1
  401. package/cjs/shared/dropdown-wrapper/dropdown-wrapper.styles_15hwwoj.css +3 -0
  402. package/cjs/shared/fade-wrapper/fade-wrapper.styles_16iug7l.css +2 -2
  403. package/cjs/shared/hooks/useViewport.js +1 -1
  404. package/cjs/shared/hooks/useViewport.js.map +1 -1
  405. package/cjs/shared/image-placeholder/image-placeholder.styles_44nwil.css +1 -1
  406. package/cjs/shared/input-wrapper/input-wrapper.styles.js +1 -1
  407. package/cjs/shared/input-wrapper/{input-wrapper.styles_19fpzb.css → input-wrapper.styles_je6maw.css} +4 -4
  408. package/cjs/shared/internal-calendar/calendar-dropdown.styles_wybjai.css +1 -1
  409. package/cjs/shared/internal-calendar/calendar-manager.js +1 -1
  410. package/cjs/shared/internal-calendar/calendar-manager.js.map +1 -1
  411. package/cjs/shared/internal-calendar/calendar-manager.styles.js +1 -1
  412. package/cjs/shared/internal-calendar/calendar-manager.styles.js.map +1 -1
  413. package/cjs/shared/internal-calendar/{calendar-manager.styles_1q13ylk.css → calendar-manager.styles_1njwkj2.css} +4 -4
  414. package/cjs/shared/internal-calendar/day-cell/day-cell.styles.js +1 -1
  415. package/cjs/shared/internal-calendar/day-cell/day-cell.styles.js.map +1 -1
  416. package/{shared/internal-calendar/day-cell/day-cell.styles_vazxvn.css → cjs/shared/internal-calendar/day-cell/day-cell.styles_1t5oqc1.css} +3 -3
  417. package/cjs/shared/internal-calendar/internal-calendar-month.styles.js +1 -1
  418. package/{shared/internal-calendar/internal-calendar-month.styles_1pk3ynj.css → cjs/shared/internal-calendar/internal-calendar-month.styles_14oh57f.css} +3 -3
  419. package/cjs/shared/internal-calendar/internal-calendar-year.styles.js +1 -1
  420. package/cjs/shared/internal-calendar/internal-calendar-year.styles.js.map +1 -1
  421. package/cjs/shared/internal-calendar/{internal-calendar-year.styles_1azy42u.css → internal-calendar-year.styles_therlc.css} +3 -3
  422. package/cjs/shared/internal-calendar/internal-calendar.styles_gnc3eq.css +1 -1
  423. package/cjs/shared/internal-calendar/single/single-cell.js +1 -1
  424. package/cjs/shared/internal-calendar/single/single-cell.js.map +1 -1
  425. package/cjs/shared/internal-calendar/standard/standard-calendar-day-view.styles.js +1 -1
  426. package/cjs/shared/internal-calendar/standard/standard-calendar-day-view.styles_1bw26au.css +3 -0
  427. package/cjs/shared/progress-bar/progress-bar.styles_125ri7a.css +1 -1
  428. package/cjs/shared/range-input-inner-container/range-input-inner-container.styles_1v61utg.css +2 -2
  429. package/cjs/shared/standalone-date-input/standalone-date-input.js +1 -1
  430. package/cjs/shared/standalone-date-input/standalone-date-input.js.map +1 -1
  431. package/cjs/shared/standalone-date-input/standalone-date-input.styles.js +1 -1
  432. package/cjs/shared/standalone-date-input/standalone-date-input.styles.js.map +1 -1
  433. package/cjs/shared/standalone-date-input/standalone-date-input.styles_157qo89.css +15 -0
  434. package/cjs/shared/time-slot/time-slot.js +1 -1
  435. package/cjs/shared/time-slot/time-slot.js.map +1 -1
  436. package/cjs/shared/time-slot/time-slot.styles.js +1 -1
  437. package/cjs/shared/time-slot/time-slot.styles.js.map +1 -1
  438. package/cjs/shared/time-slot/time-slot.styles_18s0to7.css +29 -0
  439. package/cjs/shared/timepicker-dropdown/timepicker-dropdown.styles_119l6k6.css +2 -2
  440. package/cjs/sidenav/sidenav-drawer-item.styles.js +1 -1
  441. package/cjs/sidenav/sidenav-drawer-item.styles.js.map +1 -1
  442. package/cjs/sidenav/sidenav-drawer-item.styles_1ljnyx2.css +6 -0
  443. package/cjs/sidenav/sidenav-drawer-subitem.styles.js +1 -1
  444. package/cjs/sidenav/sidenav-drawer-subitem.styles.js.map +1 -1
  445. package/cjs/sidenav/sidenav-drawer-subitem.styles_2y58kf.css +1 -0
  446. package/cjs/sidenav/sidenav-group.styles_1x604sw.css +2 -2
  447. package/cjs/sidenav/sidenav-item.styles.js +1 -1
  448. package/cjs/sidenav/sidenav-item.styles.js.map +1 -1
  449. package/cjs/sidenav/{sidenav-item.styles_1eew8px.css → sidenav-item.styles_lqw3kh.css} +4 -4
  450. package/cjs/sidenav/sidenav.styles_1vxezie.css +2 -2
  451. package/cjs/singpass-button/singpass-button.styles_1miyex3.css +2 -2
  452. package/cjs/smart-app-banner/smart-app-banner.styles.js +1 -1
  453. package/cjs/smart-app-banner/smart-app-banner.styles.js.map +1 -1
  454. package/cjs/smart-app-banner/{smart-app-banner.styles_m5dtgh.css → smart-app-banner.styles_15u6yv4.css} +4 -4
  455. package/cjs/tab/tab-link-chain.styles.js +1 -1
  456. package/cjs/tab/tab-link-chain.styles.js.map +1 -1
  457. package/cjs/tab/{tab-link-chain.styles_1nreqrp.css → tab-link-chain.styles_49got4.css} +4 -4
  458. package/cjs/tab/tab.styles_1najffw.css +1 -1
  459. package/cjs/table/table.styles_1af5ipv.css +2 -2
  460. package/cjs/tag/tag.style.js +1 -1
  461. package/cjs/tag/{tag.style_10tn8i.css → tag.style_d98c53.css} +3 -3
  462. package/cjs/text-list/text-list.styles.js +1 -1
  463. package/cjs/text-list/text-list.styles.js.map +1 -1
  464. package/cjs/text-list/text-list.styles_w3fvyt.css +16 -0
  465. package/cjs/theme/index.js +1 -1
  466. package/cjs/theme/theme-provider/hooks.js +1 -1
  467. package/cjs/theme/theme-provider/hooks.js.map +1 -1
  468. package/cjs/theme/tokens/colour.js +1 -1
  469. package/cjs/theme/tokens/colour.js.map +1 -1
  470. package/cjs/theme/tokens/font.js +1 -1
  471. package/cjs/theme/tokens/font.js.map +1 -1
  472. package/cjs/theme/types.js +1 -1
  473. package/cjs/theme/types.js.map +1 -1
  474. package/cjs/theme/utils/css-variable.js +1 -1
  475. package/cjs/theme/utils/css-variable.js.map +1 -1
  476. package/cjs/theme/utils/font.js +1 -1
  477. package/cjs/theme/utils/font.js.map +1 -1
  478. package/cjs/theme/utils/token-resolver.js +1 -1
  479. package/cjs/theme/utils/token-resolver.js.map +1 -1
  480. package/cjs/theme/utils/use-design-token-override.js +2 -0
  481. package/cjs/theme/utils/use-design-token-override.js.map +1 -0
  482. package/cjs/theme/utils/use-design-token.js +1 -1
  483. package/cjs/theme/utils/use-design-token.js.map +1 -1
  484. package/cjs/theme/utils/use-media-query.js +1 -1
  485. package/cjs/theme/utils/use-media-query.js.map +1 -1
  486. package/cjs/time-range-picker/combobox-picker/combobox-picker.js +1 -1
  487. package/cjs/time-range-picker/combobox-picker/combobox-picker.js.map +1 -1
  488. package/cjs/time-range-picker/combobox-picker/combobox-picker.styles_7i9vso.css +1 -1
  489. package/cjs/time-range-picker/common.styles_1qwp4xa.css +2 -2
  490. package/cjs/time-slot-bar/time-slot-bar.styles_wigbyd.css +2 -2
  491. package/cjs/time-slot-bar-week/consts.js +2 -0
  492. package/cjs/time-slot-bar-week/consts.js.map +1 -0
  493. package/cjs/time-slot-bar-week/time-slot-bar-week-days.js +1 -1
  494. package/cjs/time-slot-bar-week/time-slot-bar-week-days.js.map +1 -1
  495. package/cjs/time-slot-bar-week/time-slot-bar-week-days.styles.js +2 -0
  496. package/cjs/time-slot-bar-week/time-slot-bar-week-days.styles.js.map +1 -0
  497. package/cjs/time-slot-bar-week/time-slot-bar-week-days.styles_evdvs9.css +17 -0
  498. package/cjs/time-slot-bar-week/time-slot-bar-week.js +1 -1
  499. package/cjs/time-slot-bar-week/time-slot-bar-week.js.map +1 -1
  500. package/cjs/time-slot-bar-week/time-slot-bar-week.styles.js +2 -0
  501. package/cjs/time-slot-bar-week/time-slot-bar-week.styles.js.map +1 -0
  502. package/cjs/time-slot-bar-week/time-slot-bar-week.styles_11ybf42.css +1 -0
  503. package/cjs/time-slot-bar-week/time-slot-cell.js +2 -0
  504. package/cjs/time-slot-bar-week/time-slot-cell.js.map +1 -0
  505. package/cjs/time-slot-week-view/time-slot-week-days.js +1 -1
  506. package/cjs/time-slot-week-view/time-slot-week-days.js.map +1 -1
  507. package/cjs/time-slot-week-view/time-slot-week-days.styles.js +2 -0
  508. package/cjs/time-slot-week-view/time-slot-week-days.styles.js.map +1 -0
  509. package/cjs/time-slot-week-view/time-slot-week-days.styles_1h21vyw.css +9 -0
  510. package/cjs/time-slot-week-view/time-slot-week-view.js +1 -1
  511. package/cjs/time-slot-week-view/time-slot-week-view.js.map +1 -1
  512. package/cjs/time-slot-week-view/time-slot-week-view.styles.js +1 -9
  513. package/cjs/time-slot-week-view/time-slot-week-view.styles.js.map +1 -1
  514. package/cjs/time-slot-week-view/time-slot-week-view.styles_gqgsw2.css +1 -0
  515. package/cjs/timeline/timeline.styles.js +1 -1
  516. package/cjs/timeline/{timeline.styles_1wcnzot.css → timeline.styles_1jxzik4.css} +2 -2
  517. package/cjs/timepicker/timepicker.js +1 -1
  518. package/cjs/timepicker/timepicker.js.map +1 -1
  519. package/cjs/timepicker/timepicker.styles.js +1 -1
  520. package/cjs/timepicker/timepicker.styles.js.map +1 -1
  521. package/cjs/timepicker/timepicker.styles_1jm33yw.css +1 -0
  522. package/cjs/timetable/timetable-header/timetable-header.styles_11gl1h4.css +2 -2
  523. package/cjs/timetable/timetable-row/row-bar.styles_1x0vrsz.css +1 -1
  524. package/cjs/timetable/timetable-row/row-cell.styles_y1dl5j.css +2 -2
  525. package/cjs/timetable/timetable.styles_7rp8kz.css +2 -2
  526. package/cjs/toast/toast.styles.js +1 -1
  527. package/cjs/toast/toast.styles.js.map +1 -1
  528. package/cjs/toast/{toast.styles_ngrlup.css → toast.styles_1e0l60w.css} +3 -3
  529. package/cjs/toggle/toggle-icon.styles_ba71y.css +2 -2
  530. package/cjs/toggle/toggle.styles.js +1 -1
  531. package/cjs/toggle/toggle.styles.js.map +1 -1
  532. package/{toggle/toggle.styles_1yzqsu.css → cjs/toggle/toggle.styles_1t5qrye.css} +7 -7
  533. package/cjs/typography/typography-text.styles_1734x2k.css +2 -2
  534. package/cjs/typography/typography.js +1 -1
  535. package/cjs/typography/typography.js.map +1 -1
  536. package/cjs/typography/typography.styles.js +1 -1
  537. package/cjs/typography/typography.styles.js.map +1 -1
  538. package/cjs/typography/typography.styles_1wd82dn.css +11 -0
  539. package/cjs/uneditable-section/section-item.styles.js +1 -1
  540. package/cjs/uneditable-section/section-item.styles.js.map +1 -1
  541. package/cjs/uneditable-section/section-item.styles_mwx8ht.css +9 -0
  542. package/cjs/uneditable-section/uneditable-section.js +1 -1
  543. package/cjs/uneditable-section/uneditable-section.js.map +1 -1
  544. package/cjs/uneditable-section/uneditable-section.styles_aj9zun.css +2 -2
  545. package/cjs/unit-number/unit-number-input.styles_8yizj.css +2 -2
  546. package/cjs/util/is-styled-components.js +2 -0
  547. package/cjs/util/is-styled-components.js.map +1 -0
  548. package/cjs/util/styling-helper.js +1 -1
  549. package/cjs/util/styling-helper.js.map +1 -1
  550. package/codemod-utils.d.ts +1 -0
  551. package/codemods/codemod-utils.ts +17 -0
  552. package/codemods/index.ts +231 -75
  553. package/codemods/migrate-popover/index.ts +267 -0
  554. package/codemods/run-codemod.js +6 -53
  555. package/codemods/run-codemod.js.map +1 -1
  556. package/codemods/run-codemod.ts +7 -54
  557. package/countdown-timer/countdown-timer.d.ts +6 -0
  558. package/countdown-timer/countdown-timer.js.map +1 -1
  559. package/countdown-timer/countdown-timer.styles.js +1 -1
  560. package/countdown-timer/{countdown-timer.styles_k50tkw.css → countdown-timer.styles_ipn1b0.css} +3 -3
  561. package/countdown-timer/types.d.ts +55 -11
  562. package/dashed-border/dashed-border.d.ts +6 -0
  563. package/dashed-border/dashed-border.js +1 -1
  564. package/dashed-border/dashed-border.js.map +1 -1
  565. package/dashed-border/dashed-border.styles_zszoox.css +2 -2
  566. package/dashed-border/types.d.ts +27 -5
  567. package/data-table/data-table.d.ts +8 -0
  568. package/data-table/data-table.js +1 -1
  569. package/data-table/data-table.js.map +1 -1
  570. package/data-table/data-table.styles.js +1 -1
  571. package/data-table/{data-table.styles_1nj2uzq.css → data-table.styles_1iqq1g7.css} +3 -3
  572. package/data-table/types.d.ts +58 -12
  573. package/date-input/date-input.d.ts +5 -0
  574. package/date-input/date-input.js +1 -1
  575. package/date-input/date-input.js.map +1 -1
  576. package/date-input/date-input.styles_1r5kcc7.css +1 -1
  577. package/date-input/types.d.ts +32 -16
  578. package/date-navigator/date-navigator.d.ts +6 -0
  579. package/date-navigator/date-navigator.js.map +1 -1
  580. package/date-navigator/date-navigator.styles.js +1 -1
  581. package/date-navigator/date-navigator.styles.js.map +1 -1
  582. package/date-navigator/date-navigator.styles_wokh56.css +4 -0
  583. package/date-navigator/types.d.ts +44 -7
  584. package/date-range-input/date-range-input.d.ts +4 -0
  585. package/date-range-input/date-range-input.js.map +1 -1
  586. package/date-range-input/date-range-input.styles_1s7ojnj.css +2 -2
  587. package/date-range-input/types.d.ts +50 -14
  588. package/divider/divider.d.ts +6 -0
  589. package/divider/divider.js.map +1 -1
  590. package/divider/divider.styles_1xpzh8p.css +2 -2
  591. package/divider/types.d.ts +27 -4
  592. package/drawer/drawer.d.ts +7 -0
  593. package/drawer/drawer.js.map +1 -1
  594. package/drawer/drawer.styles_94hx3y.css +2 -2
  595. package/drawer/types.d.ts +16 -4
  596. package/e-signature/e-signature-canvas.js +1 -1
  597. package/e-signature/e-signature-canvas.js.map +1 -1
  598. package/e-signature/e-signature.d.ts +5 -0
  599. package/e-signature/e-signature.js +1 -1
  600. package/e-signature/e-signature.js.map +1 -1
  601. package/e-signature/e-signature.styles.d.ts +17 -45
  602. package/e-signature/e-signature.styles.js +1 -168
  603. package/e-signature/e-signature.styles.js.map +1 -1
  604. package/e-signature/e-signature.styles_lukd9f.css +17 -0
  605. package/e-signature/types.d.ts +23 -1
  606. package/error-display/error-display-data.js +1 -1
  607. package/error-display/error-display-data.js.map +1 -1
  608. package/error-display/error-display.d.ts +7 -0
  609. package/error-display/error-display.js.map +1 -1
  610. package/error-display/error-display.styles_d3tql1.css +2 -2
  611. package/error-display/types.d.ts +36 -6
  612. package/external/dompurify/dist/purify.es.js +2 -2
  613. package/external/dompurify/dist/purify.es.js.map +1 -1
  614. package/external/lodash/get.js +1 -1
  615. package/external/lodash/get.js.map +1 -1
  616. package/feedback-rating/feedback-rating-stars-container.styles_dmi8z9.css +2 -2
  617. package/feedback-rating/feedback-rating.d.ts +6 -0
  618. package/feedback-rating/feedback-rating.js.map +1 -1
  619. package/feedback-rating/feedback-rating.styles_1kdklb6.css +2 -2
  620. package/feedback-rating/types.d.ts +29 -0
  621. package/file-download/file-download.d.ts +6 -0
  622. package/file-download/file-download.js +1 -1
  623. package/file-download/file-download.js.map +1 -1
  624. package/file-download/file-download.styles.d.ts +8 -11
  625. package/file-download/file-download.styles.js +1 -32
  626. package/file-download/file-download.styles.js.map +1 -1
  627. package/file-download/file-download.styles_iggk8q.css +8 -0
  628. package/file-download/file-list-card/file-list-card.js +1 -1
  629. package/file-download/file-list-card/file-list-card.js.map +1 -1
  630. package/file-download/file-list-card/file-list-card.styles.d.ts +16 -64
  631. package/file-download/file-list-card/file-list-card.styles.js +1 -177
  632. package/file-download/file-list-card/file-list-card.styles.js.map +1 -1
  633. package/file-download/file-list-card/file-list-card.styles_18j2gut.css +16 -0
  634. package/file-download/types.d.ts +44 -11
  635. package/file-upload/dropzone.styles_1pllsau.css +2 -2
  636. package/file-upload/file-item-edit.d.ts +4 -1
  637. package/file-upload/file-item-edit.js +1 -1
  638. package/file-upload/file-item-edit.js.map +1 -1
  639. package/file-upload/file-item-edit.styles.d.ts +1 -0
  640. package/file-upload/file-item-edit.styles.js +1 -1
  641. package/file-upload/file-item-edit.styles.js.map +1 -1
  642. package/{cjs/file-upload/file-item-edit.styles_1qbpbxj.css → file-upload/file-item-edit.styles_19bvztn.css} +6 -5
  643. package/file-upload/{file-list.d.ts → file-list/file-list.d.ts} +4 -1
  644. package/file-upload/file-list/file-list.js +2 -0
  645. package/file-upload/file-list/file-list.js.map +1 -0
  646. package/file-upload/file-list/file-list.styles.js +2 -0
  647. package/file-upload/file-list/file-list.styles.js.map +1 -0
  648. package/file-upload/file-list/file-list.styles_1w7so98.css +3 -0
  649. package/file-upload/file-list/index.d.ts +1 -0
  650. package/file-upload/file-list-item/file-list-item-thumbnail.styles.js +1 -1
  651. package/file-upload/file-list-item/file-list-item-thumbnail.styles_1y4si19.css +4 -0
  652. package/file-upload/file-list-item/file-list-item.d.ts +3 -1
  653. package/file-upload/file-list-item/file-list-item.js +1 -1
  654. package/file-upload/file-list-item/file-list-item.js.map +1 -1
  655. package/file-upload/file-list-item/file-list-item.styles.d.ts +3 -0
  656. package/file-upload/file-list-item/file-list-item.styles.js +1 -1
  657. package/file-upload/file-list-item/file-list-item.styles.js.map +1 -1
  658. package/file-upload/file-list-item/file-list-item.styles_o8000f.css +17 -0
  659. package/file-upload/file-upload.d.ts +2 -1
  660. package/file-upload/file-upload.js +1 -1
  661. package/file-upload/file-upload.js.map +1 -1
  662. package/file-upload/file-upload.styles_9ffwcd.css +2 -2
  663. package/file-upload/types.d.ts +125 -20
  664. package/filter/addons/filter-item-checkbox.styles.js +1 -1
  665. package/filter/addons/filter-item-checkbox.styles.js.map +1 -1
  666. package/{cjs/filter/addons/filter-item-checkbox.styles_18l87i2.css → filter/addons/filter-item-checkbox.styles_7degw7.css} +3 -3
  667. package/filter/filter-badge.d.ts +5 -0
  668. package/filter/filter-badge.js +2 -0
  669. package/filter/filter-badge.js.map +1 -0
  670. package/filter/filter-item-page.d.ts +1 -1
  671. package/filter/filter-item-page.js +1 -1
  672. package/filter/filter-item-page.js.map +1 -1
  673. package/filter/filter-item-page.styles_17ewfrz.css +1 -1
  674. package/filter/filter-item.js.map +1 -1
  675. package/filter/filter-item.styles.js +1 -1
  676. package/filter/filter-item.styles.js.map +1 -1
  677. package/{cjs/filter/filter-item.styles_1e3v6qq.css → filter/filter-item.styles_cphjnj.css} +4 -4
  678. package/filter/filter-modal.d.ts +1 -1
  679. package/filter/filter-modal.js +1 -1
  680. package/filter/filter-modal.js.map +1 -1
  681. package/filter/filter-modal.styles.d.ts +2 -0
  682. package/filter/filter-modal.styles.js +1 -1
  683. package/filter/filter-modal.styles.js.map +1 -1
  684. package/filter/filter-modal.styles_qw3xlg.css +10 -0
  685. package/filter/filter-sidebar.d.ts +1 -1
  686. package/filter/filter-sidebar.js +1 -1
  687. package/filter/filter-sidebar.js.map +1 -1
  688. package/filter/filter-sidebar.styles.d.ts +1 -0
  689. package/filter/filter-sidebar.styles.js +1 -1
  690. package/filter/filter-sidebar.styles.js.map +1 -1
  691. package/filter/filter-sidebar.styles_1otwpjl.css +5 -0
  692. package/filter/filter.d.ts +24 -3
  693. package/filter/filter.js.map +1 -1
  694. package/filter/filter.styles.js +1 -1
  695. package/filter/filter.styles.js.map +1 -1
  696. package/filter/{filter.styles_2fmaok.css → filter.styles_1ykijwm.css} +2 -2
  697. package/filter/types.d.ts +163 -21
  698. package/footer/footer-download-app.styles_1v1j2us.css +2 -2
  699. package/footer/footer-resource-addon.styles_1jepb1d.css +2 -2
  700. package/footer/footer.d.ts +8 -1
  701. package/footer/footer.js +1 -1
  702. package/footer/footer.js.map +1 -1
  703. package/footer/footer.styles_1msorhc.css +2 -2
  704. package/footer/types.d.ts +55 -4
  705. package/form/form-label-addon.styles_b00z8p.css +1 -1
  706. package/form/form-label.styles.js +1 -1
  707. package/form/form-label.styles.js.map +1 -1
  708. package/form/form-label.styles_1nbe0bm.css +6 -0
  709. package/form/form-textarea.styles_3p9qoy.css +2 -2
  710. package/form/form-wrapper.js +1 -1
  711. package/form/form-wrapper.js.map +1 -1
  712. package/form/form-wrapper.styles_199rslu.css +1 -1
  713. package/fullscreen-image-carousel/fullscreen-image-carousel.js +1 -1
  714. package/fullscreen-image-carousel/fullscreen-image-carousel.js.map +1 -1
  715. package/fullscreen-image-carousel/fullscreen-image-carousel.styles_vc6y5c.css +2 -2
  716. package/fullscreen-image-carousel/stateful-image.styles_1xe8ypm.css +2 -2
  717. package/histogram-slider/histogram-slider.styles_wvd4w.css +2 -2
  718. package/image-button/image-button.styles.js +1 -1
  719. package/image-button/image-button.styles_6n1qsr.css +5 -0
  720. package/index.d.ts +0 -2
  721. package/index.js +1 -1
  722. package/input/input.styles_1cblor0.css +2 -2
  723. package/input-group/input-group-list-addon.js +1 -1
  724. package/input-group/input-group-list-addon.js.map +1 -1
  725. package/input-group/input-group-list-addon.styles_17iuqtw.css +2 -2
  726. package/input-group/input-group.styles.js +1 -1
  727. package/input-group/input-group.styles_bqye6f.css +3 -0
  728. package/input-multi-select/input-multi-select.js +1 -1
  729. package/input-multi-select/input-multi-select.js.map +1 -1
  730. package/input-nested-multi-select/input-nested-multi-select.js +1 -1
  731. package/input-nested-multi-select/input-nested-multi-select.js.map +1 -1
  732. package/input-nested-select/input-nested-select.js +1 -1
  733. package/input-nested-select/input-nested-select.js.map +1 -1
  734. package/input-range-select/input-range-select.js +1 -1
  735. package/input-range-select/input-range-select.js.map +1 -1
  736. package/input-range-select/input-range-select.styles_adbrbm.css +2 -2
  737. package/input-range-slider/input-range-slider.styles_aljl2v.css +2 -2
  738. package/input-select/input-select.js +1 -1
  739. package/input-select/input-select.js.map +1 -1
  740. package/input-textarea/textarea-counter.styles.js +1 -1
  741. package/input-textarea/textarea-counter.styles.js.map +1 -1
  742. package/input-textarea/textarea-counter.styles_1n3wsnv.css +1 -0
  743. package/input-textarea/textarea.styles.js +1 -1
  744. package/input-textarea/textarea.styles_22z4n3.css +5 -0
  745. package/language-switcher/dropdown-panel.styles.js +1 -1
  746. package/language-switcher/dropdown-panel.styles.js.map +1 -1
  747. package/language-switcher/dropdown-panel.styles_1qsjf8d.css +4 -0
  748. package/language-switcher/dropdown-variant.js +1 -1
  749. package/language-switcher/dropdown-variant.js.map +1 -1
  750. package/language-switcher/dropdown-variant.styles.js +1 -1
  751. package/language-switcher/dropdown-variant.styles_1vrdfky.css +2 -0
  752. package/language-switcher/link-container-variant.styles.js +1 -1
  753. package/language-switcher/link-container-variant.styles_1iw6zux.css +5 -0
  754. package/layout/col-div.js +1 -1
  755. package/layout/col-div.js.map +1 -1
  756. package/layout/col-div.styles_16o6mwx.css +1 -1
  757. package/layout/container.styles_v70ec6.css +2 -2
  758. package/layout/section.styles_hstcaf.css +1 -1
  759. package/layout/types.d.ts +8 -11
  760. package/link-list/link-list.styles.js +1 -1
  761. package/link-list/link-list.styles.js.map +1 -1
  762. package/{cjs/link-list/link-list.styles_1g33nb4.css → link-list/link-list.styles_m57vks.css} +4 -4
  763. package/local-nav/local-nav-dropdown/local-nav-dropdown.styles.js +1 -1
  764. package/{cjs/local-nav/local-nav-dropdown/local-nav-dropdown.styles_ftv36t.css → local-nav/local-nav-dropdown/local-nav-dropdown.styles_uhd4xl.css} +3 -3
  765. package/local-nav/local-nav-menu/local-nav-menu.styles_pq19dh.css +2 -2
  766. package/markup/markup.js +1 -1
  767. package/markup/markup.js.map +1 -1
  768. package/markup/markup.style.js +1 -1
  769. package/markup/markup.style.js.map +1 -1
  770. package/markup/markup.style_1iu40x9.css +2 -2
  771. package/markup/types.d.ts +2 -1
  772. package/masked-input/masked-input.styles.js +1 -1
  773. package/masked-input/masked-input.styles.js.map +1 -1
  774. package/{cjs/masked-input/masked-input.styles_4i1qsy.css → masked-input/masked-input.styles_1cm388a.css} +4 -4
  775. package/masthead/masthead.js +1 -1
  776. package/masthead/masthead.js.map +1 -1
  777. package/masthead/masthead.styles_1huzon9.css +2 -2
  778. package/menu/menu-content.styles_p7ijll.css +2 -2
  779. package/menu/menu-item.styles_liyed8.css +2 -2
  780. package/menu/menu-link.styles_hfxoez.css +2 -2
  781. package/menu/menu-section.styles_g7my4d.css +2 -2
  782. package/modal/modal-box.styles.js +1 -1
  783. package/modal/modal-box.styles.js.map +1 -1
  784. package/modal/modal-box.styles_y52cts.css +11 -0
  785. package/modal/modal.js +1 -1
  786. package/modal/modal.js.map +1 -1
  787. package/modal/modal.styles.d.ts +4 -1
  788. package/modal/modal.styles.js +1 -1
  789. package/modal/modal.styles.js.map +1 -1
  790. package/modal/modal.styles_1lbblx6.css +11 -0
  791. package/modal-v2/modal-v2.js +1 -1
  792. package/modal-v2/modal-v2.js.map +1 -1
  793. package/modal-v2/modal-v2.styles.d.ts +0 -1
  794. package/modal-v2/modal-v2.styles.js +1 -1
  795. package/modal-v2/modal-v2.styles.js.map +1 -1
  796. package/modal-v2/modal-v2.styles_a8gv5i.css +3 -0
  797. package/modal-v2/slots/card.js +1 -1
  798. package/modal-v2/slots/card.js.map +1 -1
  799. package/modal-v2/slots/slot-styles_13sd376.css +2 -2
  800. package/navbar/brand.styles_zcgddp.css +1 -1
  801. package/navbar/drawer.js +1 -1
  802. package/navbar/drawer.js.map +1 -1
  803. package/navbar/drawer.styles_7hnxp5.css +2 -2
  804. package/navbar/menu.styles_gdpqc.css +2 -2
  805. package/navbar/navbar-action-buttons.styles_1vpm0nk.css +2 -2
  806. package/navbar/navbar-items.styles.js +1 -1
  807. package/navbar/navbar-items.styles.js.map +1 -1
  808. package/navbar/{navbar-items.styles_i9cunu.css → navbar-items.styles_1i3ltot.css} +8 -8
  809. package/navbar/navbar.js +1 -1
  810. package/navbar/navbar.js.map +1 -1
  811. package/navbar/navbar.styles_koy0c7.css +2 -2
  812. package/notification-banner/notification-banner.styles.js +1 -1
  813. package/notification-banner/notification-banner.styles.js.map +1 -1
  814. package/{cjs/notification-banner/notification-banner.styles_130loac.css → notification-banner/notification-banner.styles_uxlysy.css} +4 -4
  815. package/otp-input/otp-input.styles_5sbutl.css +2 -2
  816. package/otp-verification/contact-input-section.js +1 -1
  817. package/otp-verification/contact-input-section.js.map +1 -1
  818. package/otp-verification/contact-input-section.styles.d.ts +14 -0
  819. package/otp-verification/contact-input-section.styles.js +2 -0
  820. package/otp-verification/contact-input-section.styles.js.map +1 -0
  821. package/otp-verification/contact-input-section.styles_odrjvt.css +14 -0
  822. package/otp-verification/otp-verification.js +1 -1
  823. package/otp-verification/otp-verification.js.map +1 -1
  824. package/otp-verification/otp-verification.styles.d.ts +1 -0
  825. package/otp-verification/otp-verification.styles.js +2 -0
  826. package/otp-verification/otp-verification.styles.js.map +1 -0
  827. package/otp-verification/otp-verification.styles_dg9bm8.css +1 -0
  828. package/otp-verification/thumbnail/email-thumbnail.d.ts +1 -3
  829. package/otp-verification/thumbnail/email-thumbnail.js +1 -21
  830. package/otp-verification/thumbnail/email-thumbnail.js.map +1 -1
  831. package/otp-verification/thumbnail/phone-thumbnail.d.ts +1 -3
  832. package/otp-verification/thumbnail/phone-thumbnail.js +1 -17
  833. package/otp-verification/thumbnail/phone-thumbnail.js.map +1 -1
  834. package/otp-verification/thumbnail/thumbnail.styles.d.ts +3 -0
  835. package/otp-verification/thumbnail/thumbnail.styles.js +2 -0
  836. package/otp-verification/thumbnail/thumbnail.styles.js.map +1 -0
  837. package/otp-verification/thumbnail/thumbnail.styles_shqylh.css +3 -0
  838. package/otp-verification/verification-section.js +1 -1
  839. package/otp-verification/verification-section.js.map +1 -1
  840. package/otp-verification/verification-section.styles.d.ts +5 -0
  841. package/otp-verification/verification-section.styles.js +2 -0
  842. package/otp-verification/verification-section.styles.js.map +1 -0
  843. package/otp-verification/verification-section.styles_x8jj.css +5 -0
  844. package/overlay/overlay.js +1 -1
  845. package/overlay/overlay.js.map +1 -1
  846. package/overlay/overlay.styles_12wym18.css +2 -2
  847. package/overlay/types.d.ts +0 -13
  848. package/package.json +14 -15
  849. package/pagination/pagination.styles.js +1 -1
  850. package/pagination/pagination.styles.js.map +1 -1
  851. package/{cjs/pagination/pagination.styles_1u898rb.css → pagination/pagination.styles_6bcgva.css} +5 -5
  852. package/pill/pill.styles.js +1 -1
  853. package/{cjs/pill/pill.styles_1wiyl8.css → pill/pill.styles_xwrniu.css} +2 -2
  854. package/popover/popover-inline/popover-inline.styles_bkopnt.css +2 -2
  855. package/popover/popover-trigger.styles_8zokig.css +1 -1
  856. package/popover/popover.styles_ujnf0h.css +2 -2
  857. package/predictive-text-input/predictive-text-input.js +1 -1
  858. package/predictive-text-input/predictive-text-input.js.map +1 -1
  859. package/progress-indicator/progress-indicator.styles_1c038s4.css +2 -2
  860. package/radio-button/radio-button.styles_1c4v6v.css +2 -2
  861. package/schedule/const.js +1 -1
  862. package/schedule/const.js.map +1 -1
  863. package/schedule/schedule-day-view/schedule-day-view.js +1 -1
  864. package/schedule/schedule-day-view/schedule-day-view.js.map +1 -1
  865. package/schedule/schedule-day-view/schedule-day-view.styles.d.ts +39 -99
  866. package/schedule/schedule-day-view/schedule-day-view.styles.js +1 -152
  867. package/schedule/schedule-day-view/schedule-day-view.styles.js.map +1 -1
  868. package/schedule/schedule-day-view/schedule-day-view.styles_8ti149.css +30 -0
  869. package/schedule/schedule-day-view/types.d.ts +2 -10
  870. package/schedule/schedule-header/schedule-header.js +1 -1
  871. package/schedule/schedule-header/schedule-header.js.map +1 -1
  872. package/schedule/schedule-header/schedule-header.styles.d.ts +7 -0
  873. package/schedule/schedule-header/schedule-header.styles.js +2 -0
  874. package/schedule/schedule-header/schedule-header.styles.js.map +1 -0
  875. package/schedule/schedule-header/schedule-header.styles_1n2u5vj.css +6 -0
  876. package/schedule/schedule-slot-content/index.d.ts +4 -0
  877. package/schedule/schedule-slot-content/schedule-slot-content.d.ts +21 -0
  878. package/schedule/schedule-slot-content/schedule-slot-content.js +2 -0
  879. package/schedule/schedule-slot-content/schedule-slot-content.js.map +1 -0
  880. package/schedule/schedule-slot-content/style-helper.d.ts +8 -0
  881. package/schedule/schedule-slot-content/style-helper.js +2 -0
  882. package/schedule/schedule-slot-content/style-helper.js.map +1 -0
  883. package/schedule/schedule-week-view/schedule-week-view.js +1 -1
  884. package/schedule/schedule-week-view/schedule-week-view.js.map +1 -1
  885. package/schedule/schedule-week-view/schedule-week-view.styles.d.ts +15 -32
  886. package/schedule/schedule-week-view/schedule-week-view.styles.js +1 -74
  887. package/schedule/schedule-week-view/schedule-week-view.styles.js.map +1 -1
  888. package/schedule/schedule-week-view/schedule-week-view.styles_x7x50m.css +10 -0
  889. package/schedule/schedule-week-view/time-cell.js +1 -1
  890. package/schedule/schedule-week-view/time-cell.js.map +1 -1
  891. package/schedule/schedule-week-view/time-cell.styles.d.ts +23 -14
  892. package/schedule/schedule-week-view/time-cell.styles.js +1 -34
  893. package/schedule/schedule-week-view/time-cell.styles.js.map +1 -1
  894. package/schedule/schedule-week-view/time-cell.styles_1sorjz8.css +14 -0
  895. package/schedule/schedule-week-view/types.d.ts +2 -15
  896. package/schedule/schedule-week-view/week-view-utils.js +1 -1
  897. package/schedule/schedule-week-view/week-view-utils.js.map +1 -1
  898. package/schedule/schedule.js +1 -1
  899. package/schedule/schedule.js.map +1 -1
  900. package/schedule/schedule.styles.d.ts +5 -8
  901. package/schedule/schedule.styles.js +1 -26
  902. package/schedule/schedule.styles.js.map +1 -1
  903. package/schedule/schedule.styles_fdy5a1.css +5 -0
  904. package/schedule/shared/with-optional-popover.d.ts +1 -1
  905. package/schedule/shared/with-optional-popover.js +1 -5
  906. package/schedule/shared/with-optional-popover.js.map +1 -1
  907. package/schedule/shared/with-optional-popover.styles.d.ts +1 -0
  908. package/schedule/shared/with-optional-popover.styles.js +2 -0
  909. package/schedule/shared/with-optional-popover.styles.js.map +1 -0
  910. package/schedule/shared/with-optional-popover.styles_7mv3p2.css +1 -0
  911. package/schedule/time-indicator/time-indicator.js +1 -1
  912. package/schedule/time-indicator/time-indicator.js.map +1 -1
  913. package/schedule/time-indicator/time-indicator.styles.d.ts +11 -28
  914. package/schedule/time-indicator/time-indicator.styles.js +1 -33
  915. package/schedule/time-indicator/time-indicator.styles.js.map +1 -1
  916. package/schedule/time-indicator/time-indicator.styles_1eaxyes.css +6 -0
  917. package/schedule/types.d.ts +10 -0
  918. package/select-histogram/select-histogram.js +1 -1
  919. package/select-histogram/select-histogram.js.map +1 -1
  920. package/select-histogram/select-histogram.styles.js +1 -1
  921. package/select-histogram/select-histogram.styles.js.map +1 -1
  922. package/select-histogram/select-histogram.styles_n260dy.css +5 -0
  923. package/shared/accessibility/index_13g9vp.css +1 -1
  924. package/shared/clickable-icon/clickable-icon.styles_1v2imml.css +2 -2
  925. package/shared/component-loading-spinner/component-loading-spinner.styles_15eq02i.css +2 -2
  926. package/shared/dropdown-list/dropdown-label.js +1 -1
  927. package/shared/dropdown-list/dropdown-label.js.map +1 -1
  928. package/shared/dropdown-list/dropdown-label.styles.js +1 -1
  929. package/shared/dropdown-list/dropdown-label.styles.js.map +1 -1
  930. package/{cjs/shared/dropdown-list/dropdown-label.styles_1dwmd8f.css → shared/dropdown-list/dropdown-label.styles_mloii0.css} +6 -6
  931. package/shared/dropdown-list/dropdown-list.styles.js +1 -1
  932. package/shared/dropdown-list/dropdown-list.styles.js.map +1 -1
  933. package/{cjs/shared/dropdown-list/dropdown-list.styles_1kt4zhf.css → shared/dropdown-list/dropdown-list.styles_konwm.css} +5 -5
  934. package/shared/dropdown-list/dropdown-search.styles.js +1 -1
  935. package/shared/dropdown-list/dropdown-search.styles.js.map +1 -1
  936. package/{cjs/shared/dropdown-list/dropdown-search.styles_4r9oma.css → shared/dropdown-list/dropdown-search.styles_1hc1gkh.css} +3 -3
  937. package/shared/dropdown-list/expandable-element.js +1 -1
  938. package/shared/dropdown-list/expandable-element.js.map +1 -1
  939. package/shared/dropdown-list/expandable-element.styles.d.ts +0 -1
  940. package/shared/dropdown-list/expandable-element.styles.js +1 -1
  941. package/shared/dropdown-list/expandable-element.styles.js.map +1 -1
  942. package/shared/dropdown-list/expandable-element.styles_rkkvqr.css +5 -0
  943. package/shared/dropdown-list/nested-dropdown-list.styles_wdhxoe.css +2 -2
  944. package/shared/dropdown-wrapper/dropdown-wrapper.styles.js +1 -1
  945. package/shared/dropdown-wrapper/dropdown-wrapper.styles.js.map +1 -1
  946. package/shared/dropdown-wrapper/dropdown-wrapper.styles_15hwwoj.css +3 -0
  947. package/shared/fade-wrapper/fade-wrapper.styles_16iug7l.css +2 -2
  948. package/shared/hooks/useViewport.d.ts +7 -2
  949. package/shared/hooks/useViewport.js +1 -1
  950. package/shared/hooks/useViewport.js.map +1 -1
  951. package/shared/image-placeholder/image-placeholder.styles_44nwil.css +1 -1
  952. package/shared/input-wrapper/input-wrapper.styles.js +1 -1
  953. package/shared/input-wrapper/{input-wrapper.styles_19fpzb.css → input-wrapper.styles_je6maw.css} +4 -4
  954. package/shared/internal-calendar/calendar-dropdown.styles_wybjai.css +1 -1
  955. package/shared/internal-calendar/calendar-manager.js +1 -1
  956. package/shared/internal-calendar/calendar-manager.js.map +1 -1
  957. package/shared/internal-calendar/calendar-manager.styles.js +1 -1
  958. package/shared/internal-calendar/calendar-manager.styles.js.map +1 -1
  959. package/shared/internal-calendar/{calendar-manager.styles_1q13ylk.css → calendar-manager.styles_1njwkj2.css} +4 -4
  960. package/shared/internal-calendar/day-cell/day-cell.styles.js +1 -1
  961. package/shared/internal-calendar/day-cell/day-cell.styles.js.map +1 -1
  962. package/{cjs/shared/internal-calendar/day-cell/day-cell.styles_vazxvn.css → shared/internal-calendar/day-cell/day-cell.styles_1t5oqc1.css} +3 -3
  963. package/shared/internal-calendar/internal-calendar-month.styles.js +1 -1
  964. package/{cjs/shared/internal-calendar/internal-calendar-month.styles_1pk3ynj.css → shared/internal-calendar/internal-calendar-month.styles_14oh57f.css} +3 -3
  965. package/shared/internal-calendar/internal-calendar-year.styles.js +1 -1
  966. package/shared/internal-calendar/internal-calendar-year.styles.js.map +1 -1
  967. package/shared/internal-calendar/{internal-calendar-year.styles_1azy42u.css → internal-calendar-year.styles_therlc.css} +3 -3
  968. package/shared/internal-calendar/internal-calendar.styles_gnc3eq.css +1 -1
  969. package/shared/internal-calendar/single/single-cell.js +1 -1
  970. package/shared/internal-calendar/single/single-cell.js.map +1 -1
  971. package/shared/internal-calendar/standard/standard-calendar-day-view.styles.js +1 -1
  972. package/shared/internal-calendar/standard/standard-calendar-day-view.styles_1bw26au.css +3 -0
  973. package/shared/progress-bar/progress-bar.styles_125ri7a.css +1 -1
  974. package/shared/range-input-inner-container/range-input-inner-container.styles_1v61utg.css +2 -2
  975. package/shared/standalone-date-input/standalone-date-input.js +1 -1
  976. package/shared/standalone-date-input/standalone-date-input.js.map +1 -1
  977. package/shared/standalone-date-input/standalone-date-input.styles.d.ts +2 -0
  978. package/shared/standalone-date-input/standalone-date-input.styles.js +1 -1
  979. package/shared/standalone-date-input/standalone-date-input.styles.js.map +1 -1
  980. package/shared/standalone-date-input/standalone-date-input.styles_157qo89.css +15 -0
  981. package/shared/time-slot/time-slot.d.ts +1 -0
  982. package/shared/time-slot/time-slot.js +1 -1
  983. package/shared/time-slot/time-slot.js.map +1 -1
  984. package/shared/time-slot/time-slot.styles.d.ts +2 -0
  985. package/shared/time-slot/time-slot.styles.js +1 -1
  986. package/shared/time-slot/time-slot.styles.js.map +1 -1
  987. package/shared/time-slot/time-slot.styles_18s0to7.css +29 -0
  988. package/shared/timepicker-dropdown/timepicker-dropdown.styles_119l6k6.css +2 -2
  989. package/sidenav/sidenav-drawer-item.styles.js +1 -1
  990. package/sidenav/sidenav-drawer-item.styles.js.map +1 -1
  991. package/sidenav/sidenav-drawer-item.styles_1ljnyx2.css +6 -0
  992. package/sidenav/sidenav-drawer-subitem.styles.js +1 -1
  993. package/sidenav/sidenav-drawer-subitem.styles.js.map +1 -1
  994. package/sidenav/sidenav-drawer-subitem.styles_2y58kf.css +1 -0
  995. package/sidenav/sidenav-group.styles_1x604sw.css +2 -2
  996. package/sidenav/sidenav-item.styles.js +1 -1
  997. package/sidenav/sidenav-item.styles.js.map +1 -1
  998. package/sidenav/{sidenav-item.styles_1eew8px.css → sidenav-item.styles_lqw3kh.css} +4 -4
  999. package/sidenav/sidenav.styles_1vxezie.css +2 -2
  1000. package/singpass-button/singpass-button.styles_1miyex3.css +2 -2
  1001. package/smart-app-banner/smart-app-banner.styles.js +1 -1
  1002. package/smart-app-banner/smart-app-banner.styles.js.map +1 -1
  1003. package/smart-app-banner/{smart-app-banner.styles_m5dtgh.css → smart-app-banner.styles_15u6yv4.css} +4 -4
  1004. package/tab/tab-link-chain.styles.js +1 -1
  1005. package/tab/tab-link-chain.styles.js.map +1 -1
  1006. package/tab/{tab-link-chain.styles_1nreqrp.css → tab-link-chain.styles_49got4.css} +4 -4
  1007. package/tab/tab.styles_1najffw.css +1 -1
  1008. package/table/table.styles_1af5ipv.css +2 -2
  1009. package/tag/tag.style.js +1 -1
  1010. package/tag/{tag.style_10tn8i.css → tag.style_d98c53.css} +3 -3
  1011. package/text-list/text-list.styles.js +1 -1
  1012. package/text-list/text-list.styles.js.map +1 -1
  1013. package/text-list/text-list.styles_w3fvyt.css +16 -0
  1014. package/theme/index.d.ts +4 -1
  1015. package/theme/index.js +1 -1
  1016. package/theme/styles/a11y-playground.css +33 -1
  1017. package/theme/styles/bookingsg.css +37 -5
  1018. package/theme/styles/careercompass.css +519 -0
  1019. package/theme/styles/ccube.css +31 -0
  1020. package/theme/styles/default.css +11 -6
  1021. package/theme/styles/imda.css +33 -1
  1022. package/theme/styles/lifesg.css +31 -0
  1023. package/theme/styles/mylegacy.css +37 -5
  1024. package/theme/styles/oneservice.css +80 -0
  1025. package/theme/styles/pa.css +33 -1
  1026. package/theme/styles/rbs.css +31 -0
  1027. package/theme/styles/sgw-digital-lobby.css +37 -5
  1028. package/theme/styles/smgs.css +519 -0
  1029. package/theme/styles/spf.css +146 -114
  1030. package/theme/styles/supportgowhere.css +33 -1
  1031. package/theme/theme-provider/hooks.d.ts +2 -1
  1032. package/theme/theme-provider/hooks.js +1 -1
  1033. package/theme/theme-provider/hooks.js.map +1 -1
  1034. package/theme/tokens/colour.d.ts +28 -0
  1035. package/theme/tokens/colour.js +1 -1
  1036. package/theme/tokens/colour.js.map +1 -1
  1037. package/theme/tokens/font.d.ts +4 -2
  1038. package/theme/tokens/font.js +1 -1
  1039. package/theme/tokens/font.js.map +1 -1
  1040. package/theme/types.d.ts +1 -1
  1041. package/theme/types.js +1 -1
  1042. package/theme/types.js.map +1 -1
  1043. package/theme/utils/css-variable.d.ts +0 -5
  1044. package/theme/utils/css-variable.js +1 -1
  1045. package/theme/utils/css-variable.js.map +1 -1
  1046. package/theme/utils/font.d.ts +2 -2
  1047. package/theme/utils/font.js +1 -1
  1048. package/theme/utils/font.js.map +1 -1
  1049. package/theme/utils/index.d.ts +1 -0
  1050. package/theme/utils/token-resolver.js +1 -1
  1051. package/theme/utils/token-resolver.js.map +1 -1
  1052. package/theme/utils/use-design-token-override.d.ts +11 -0
  1053. package/theme/utils/use-design-token-override.js +2 -0
  1054. package/theme/utils/use-design-token-override.js.map +1 -0
  1055. package/theme/utils/use-design-token.js +1 -1
  1056. package/theme/utils/use-design-token.js.map +1 -1
  1057. package/theme/utils/use-media-query.d.ts +1 -2
  1058. package/theme/utils/use-media-query.js +1 -1
  1059. package/theme/utils/use-media-query.js.map +1 -1
  1060. package/time-range-picker/combobox-picker/combobox-picker.js +1 -1
  1061. package/time-range-picker/combobox-picker/combobox-picker.js.map +1 -1
  1062. package/time-range-picker/combobox-picker/combobox-picker.styles_7i9vso.css +1 -1
  1063. package/time-range-picker/common.styles_1qwp4xa.css +2 -2
  1064. package/time-slot-bar/time-slot-bar.styles_wigbyd.css +2 -2
  1065. package/time-slot-bar-week/consts.d.ts +3 -0
  1066. package/time-slot-bar-week/consts.js +2 -0
  1067. package/time-slot-bar-week/consts.js.map +1 -0
  1068. package/time-slot-bar-week/time-slot-bar-week-days.js +1 -1
  1069. package/time-slot-bar-week/time-slot-bar-week-days.js.map +1 -1
  1070. package/time-slot-bar-week/time-slot-bar-week-days.styles.d.ts +25 -0
  1071. package/time-slot-bar-week/time-slot-bar-week-days.styles.js +2 -0
  1072. package/time-slot-bar-week/time-slot-bar-week-days.styles.js.map +1 -0
  1073. package/time-slot-bar-week/time-slot-bar-week-days.styles_evdvs9.css +17 -0
  1074. package/time-slot-bar-week/time-slot-bar-week.js +1 -1
  1075. package/time-slot-bar-week/time-slot-bar-week.js.map +1 -1
  1076. package/time-slot-bar-week/time-slot-bar-week.styles.d.ts +1 -0
  1077. package/time-slot-bar-week/time-slot-bar-week.styles.js +2 -0
  1078. package/time-slot-bar-week/time-slot-bar-week.styles.js.map +1 -0
  1079. package/time-slot-bar-week/time-slot-bar-week.styles_11ybf42.css +1 -0
  1080. package/time-slot-bar-week/time-slot-cell.d.ts +28 -0
  1081. package/time-slot-bar-week/time-slot-cell.js +2 -0
  1082. package/time-slot-bar-week/time-slot-cell.js.map +1 -0
  1083. package/time-slot-week-view/time-slot-week-days.js +1 -1
  1084. package/time-slot-week-view/time-slot-week-days.js.map +1 -1
  1085. package/time-slot-week-view/time-slot-week-days.styles.d.ts +14 -0
  1086. package/time-slot-week-view/time-slot-week-days.styles.js +2 -0
  1087. package/time-slot-week-view/time-slot-week-days.styles.js.map +1 -0
  1088. package/time-slot-week-view/time-slot-week-days.styles_1h21vyw.css +9 -0
  1089. package/time-slot-week-view/time-slot-week-view.js +1 -1
  1090. package/time-slot-week-view/time-slot-week-view.js.map +1 -1
  1091. package/time-slot-week-view/time-slot-week-view.styles.d.ts +1 -1
  1092. package/time-slot-week-view/time-slot-week-view.styles.js +1 -9
  1093. package/time-slot-week-view/time-slot-week-view.styles.js.map +1 -1
  1094. package/time-slot-week-view/time-slot-week-view.styles_gqgsw2.css +1 -0
  1095. package/timeline/timeline.styles.js +1 -1
  1096. package/timeline/{timeline.styles_1wcnzot.css → timeline.styles_1jxzik4.css} +2 -2
  1097. package/timepicker/timepicker.js +1 -1
  1098. package/timepicker/timepicker.js.map +1 -1
  1099. package/timepicker/timepicker.styles.js +1 -1
  1100. package/timepicker/timepicker.styles.js.map +1 -1
  1101. package/timepicker/timepicker.styles_1jm33yw.css +1 -0
  1102. package/timetable/timetable-header/timetable-header.styles_11gl1h4.css +2 -2
  1103. package/timetable/timetable-row/row-bar.styles_1x0vrsz.css +1 -1
  1104. package/timetable/timetable-row/row-cell.styles_y1dl5j.css +2 -2
  1105. package/timetable/timetable.styles_7rp8kz.css +2 -2
  1106. package/toast/toast.styles.js +1 -1
  1107. package/toast/toast.styles.js.map +1 -1
  1108. package/toast/{toast.styles_ngrlup.css → toast.styles_1e0l60w.css} +3 -3
  1109. package/toggle/toggle-icon.styles_ba71y.css +2 -2
  1110. package/toggle/toggle.styles.js +1 -1
  1111. package/toggle/toggle.styles.js.map +1 -1
  1112. package/{cjs/toggle/toggle.styles_1yzqsu.css → toggle/toggle.styles_1t5qrye.css} +7 -7
  1113. package/typography/index.js +1 -1
  1114. package/typography/typography-text.styles_1734x2k.css +2 -2
  1115. package/typography/typography.js +1 -1
  1116. package/typography/typography.js.map +1 -1
  1117. package/typography/typography.styles.d.ts +2 -0
  1118. package/typography/typography.styles.js +1 -1
  1119. package/typography/typography.styles.js.map +1 -1
  1120. package/typography/typography.styles_1wd82dn.css +11 -0
  1121. package/uneditable-section/index.d.ts +1 -1
  1122. package/uneditable-section/section-item.styles.js +1 -1
  1123. package/uneditable-section/section-item.styles.js.map +1 -1
  1124. package/uneditable-section/section-item.styles_mwx8ht.css +9 -0
  1125. package/uneditable-section/uneditable-section.d.ts +2 -1
  1126. package/uneditable-section/uneditable-section.js +1 -1
  1127. package/uneditable-section/uneditable-section.js.map +1 -1
  1128. package/uneditable-section/uneditable-section.styles_aj9zun.css +2 -2
  1129. package/unit-number/unit-number-input.styles_8yizj.css +2 -2
  1130. package/util/is-styled-components.d.ts +5 -0
  1131. package/util/is-styled-components.js +2 -0
  1132. package/util/is-styled-components.js.map +1 -0
  1133. package/util/styling-helper.js +1 -1
  1134. package/util/styling-helper.js.map +1 -1
  1135. package/badge/badge.styles_1yrxocm.css +0 -16
  1136. package/cjs/badge/badge.styles_1yrxocm.css +0 -16
  1137. package/cjs/date-navigator/date-navigator.styles_1cotsgz.css +0 -4
  1138. package/cjs/example/example.js +0 -2
  1139. package/cjs/example/example.js.map +0 -1
  1140. package/cjs/example/example_r47nvz.css +0 -1
  1141. package/cjs/example/index.js +0 -2
  1142. package/cjs/example/index.js.map +0 -1
  1143. package/cjs/file-upload/file-list-item/file-list-item-thumbnail.styles_1vrh1ve.css +0 -4
  1144. package/cjs/file-upload/file-list-item/file-list-item.styles_y7my2m.css +0 -14
  1145. package/cjs/file-upload/file-list.js +0 -2
  1146. package/cjs/file-upload/file-list.js.map +0 -1
  1147. package/cjs/file-upload/file-list.styles.js +0 -2
  1148. package/cjs/file-upload/file-list.styles.js.map +0 -1
  1149. package/cjs/file-upload/file-list.styles_16vplxk.css +0 -3
  1150. package/cjs/filter/filter-modal.styles_e0ev97.css +0 -8
  1151. package/cjs/filter/filter-sidebar.styles_cwvqql.css +0 -4
  1152. package/cjs/form/form-label.styles_rk98yd.css +0 -6
  1153. package/cjs/image-button/image-button.styles_qtt605.css +0 -5
  1154. package/cjs/input-group/input-group.styles_fpy81r.css +0 -3
  1155. package/cjs/input-textarea/textarea-counter.styles_adg5h1.css +0 -1
  1156. package/cjs/input-textarea/textarea.styles_g0zgyq.css +0 -5
  1157. package/cjs/language-switcher/dropdown-panel.styles_1z0n7qq.css +0 -4
  1158. package/cjs/language-switcher/dropdown-variant.styles_16c4wc1.css +0 -2
  1159. package/cjs/language-switcher/link-container-variant.styles_1blx9qm.css +0 -5
  1160. package/cjs/markup/markup.utils.js +0 -2
  1161. package/cjs/markup/markup.utils.js.map +0 -1
  1162. package/cjs/modal/modal-box.styles_1xrlxhd.css +0 -2
  1163. package/cjs/modal/modal.styles_1sav73f.css +0 -11
  1164. package/cjs/modal-v2/modal-v2.styles_1irpyi6.css +0 -3
  1165. package/cjs/otp-verification/contact-input-section-styles.js +0 -115
  1166. package/cjs/otp-verification/contact-input-section-styles.js.map +0 -1
  1167. package/cjs/otp-verification/otp-verification-styles.js +0 -6
  1168. package/cjs/otp-verification/otp-verification-styles.js.map +0 -1
  1169. package/cjs/otp-verification/verification-section-styles.js +0 -27
  1170. package/cjs/otp-verification/verification-section-styles.js.map +0 -1
  1171. package/cjs/schedule/schedule-header/schedule-header.style.js +0 -38
  1172. package/cjs/schedule/schedule-header/schedule-header.style.js.map +0 -1
  1173. package/cjs/schedule/schedule-week-view/slot-content.js +0 -2
  1174. package/cjs/schedule/schedule-week-view/slot-content.js.map +0 -1
  1175. package/cjs/schedule/schedule-week-view/slot-content.styles.js +0 -40
  1176. package/cjs/schedule/schedule-week-view/slot-content.styles.js.map +0 -1
  1177. package/cjs/select-histogram/select-histogram.styles_11916eo.css +0 -5
  1178. package/cjs/shared/dropdown-list/expandable-element.styles_5o9f9w.css +0 -6
  1179. package/cjs/shared/dropdown-wrapper/dropdown-wrapper.styles_v10jbi.css +0 -3
  1180. package/cjs/shared/internal-calendar/standard/standard-calendar-day-view.styles_1dbvup3.css +0 -3
  1181. package/cjs/shared/standalone-date-input/standalone-date-input.styles_1m0da43.css +0 -13
  1182. package/cjs/shared/styles/index.js +0 -2
  1183. package/cjs/shared/styles/index.js.map +0 -1
  1184. package/cjs/shared/time-slot/time-slot.styles_1r9na3f.css +0 -17
  1185. package/cjs/sidenav/sidenav-drawer-item.styles_yp8cga.css +0 -6
  1186. package/cjs/sidenav/sidenav-drawer-subitem.styles_1ylzfn5.css +0 -1
  1187. package/cjs/text-list/text-list.styles_1gohl3f.css +0 -16
  1188. package/cjs/time-slot-bar-week/time-slot-bar-week-days.style.js +0 -104
  1189. package/cjs/time-slot-bar-week/time-slot-bar-week-days.style.js.map +0 -1
  1190. package/cjs/time-slot-bar-week/time-slot-bar-week.style.js +0 -10
  1191. package/cjs/time-slot-bar-week/time-slot-bar-week.style.js.map +0 -1
  1192. package/cjs/time-slot-week-view/time-slot-week-days.style.js +0 -59
  1193. package/cjs/time-slot-week-view/time-slot-week-days.style.js.map +0 -1
  1194. package/cjs/timepicker/timepicker.styles_zmkhl8.css +0 -1
  1195. package/cjs/typography/typography.styles_1jqils.css +0 -9
  1196. package/cjs/uneditable-section/section-item.styles_1dfjzc4.css +0 -9
  1197. package/cjs/v3_theme/border/specs/default-border-set.js +0 -2
  1198. package/cjs/v3_theme/border/specs/default-border-set.js.map +0 -1
  1199. package/cjs/v3_theme/border/theme-helper.js +0 -2
  1200. package/cjs/v3_theme/border/theme-helper.js.map +0 -1
  1201. package/cjs/v3_theme/border-util/specs/default-border-util-set.js +0 -2
  1202. package/cjs/v3_theme/border-util/specs/default-border-util-set.js.map +0 -1
  1203. package/cjs/v3_theme/border-util/theme-helper.js +0 -2
  1204. package/cjs/v3_theme/border-util/theme-helper.js.map +0 -1
  1205. package/cjs/v3_theme/border-util/utils.js +0 -8
  1206. package/cjs/v3_theme/border-util/utils.js.map +0 -1
  1207. package/cjs/v3_theme/breakpoint/media-query-helper.js +0 -2
  1208. package/cjs/v3_theme/breakpoint/media-query-helper.js.map +0 -1
  1209. package/cjs/v3_theme/breakpoint/specs/default-breakpoint-set.js +0 -2
  1210. package/cjs/v3_theme/breakpoint/specs/default-breakpoint-set.js.map +0 -1
  1211. package/cjs/v3_theme/breakpoint/theme-helper.js +0 -2
  1212. package/cjs/v3_theme/breakpoint/theme-helper.js.map +0 -1
  1213. package/cjs/v3_theme/colour-primitive/specs/a11yplayground-colour-set.js +0 -2
  1214. package/cjs/v3_theme/colour-primitive/specs/a11yplayground-colour-set.js.map +0 -1
  1215. package/cjs/v3_theme/colour-primitive/specs/bookingsg-colour-set.js +0 -2
  1216. package/cjs/v3_theme/colour-primitive/specs/bookingsg-colour-set.js.map +0 -1
  1217. package/cjs/v3_theme/colour-primitive/specs/ccube-colour-set.js +0 -2
  1218. package/cjs/v3_theme/colour-primitive/specs/ccube-colour-set.js.map +0 -1
  1219. package/cjs/v3_theme/colour-primitive/specs/imda-colour-set.js +0 -2
  1220. package/cjs/v3_theme/colour-primitive/specs/imda-colour-set.js.map +0 -1
  1221. package/cjs/v3_theme/colour-primitive/specs/lifesg-colour-set.js +0 -2
  1222. package/cjs/v3_theme/colour-primitive/specs/lifesg-colour-set.js.map +0 -1
  1223. package/cjs/v3_theme/colour-primitive/specs/mylegacy-colour-set.js +0 -2
  1224. package/cjs/v3_theme/colour-primitive/specs/mylegacy-colour-set.js.map +0 -1
  1225. package/cjs/v3_theme/colour-primitive/specs/oneservice-colour-set.js +0 -2
  1226. package/cjs/v3_theme/colour-primitive/specs/oneservice-colour-set.js.map +0 -1
  1227. package/cjs/v3_theme/colour-primitive/specs/pa-colour-set.js +0 -2
  1228. package/cjs/v3_theme/colour-primitive/specs/pa-colour-set.js.map +0 -1
  1229. package/cjs/v3_theme/colour-primitive/specs/rbs-colour-set.js +0 -2
  1230. package/cjs/v3_theme/colour-primitive/specs/rbs-colour-set.js.map +0 -1
  1231. package/cjs/v3_theme/colour-primitive/specs/smgs-colour-set.js +0 -2
  1232. package/cjs/v3_theme/colour-primitive/specs/smgs-colour-set.js.map +0 -1
  1233. package/cjs/v3_theme/colour-primitive/specs/spf-colour-set.js +0 -2
  1234. package/cjs/v3_theme/colour-primitive/specs/spf-colour-set.js.map +0 -1
  1235. package/cjs/v3_theme/colour-primitive/specs/supportgowhere-colour-set.js +0 -2
  1236. package/cjs/v3_theme/colour-primitive/specs/supportgowhere-colour-set.js.map +0 -1
  1237. package/cjs/v3_theme/colour-primitive/theme-helper.js +0 -2
  1238. package/cjs/v3_theme/colour-primitive/theme-helper.js.map +0 -1
  1239. package/cjs/v3_theme/colour-semantic/specs/a11yplayground-semantic-tokens.js +0 -2
  1240. package/cjs/v3_theme/colour-semantic/specs/a11yplayground-semantic-tokens.js.map +0 -1
  1241. package/cjs/v3_theme/colour-semantic/specs/lifesg-semantic-tokens.js +0 -2
  1242. package/cjs/v3_theme/colour-semantic/specs/lifesg-semantic-tokens.js.map +0 -1
  1243. package/cjs/v3_theme/colour-semantic/specs/pa-semantic-tokens.js +0 -2
  1244. package/cjs/v3_theme/colour-semantic/specs/pa-semantic-tokens.js.map +0 -1
  1245. package/cjs/v3_theme/colour-semantic/specs/sgwdigitallobby-tokens.js +0 -2
  1246. package/cjs/v3_theme/colour-semantic/specs/sgwdigitallobby-tokens.js.map +0 -1
  1247. package/cjs/v3_theme/colour-semantic/theme-helper.js +0 -2
  1248. package/cjs/v3_theme/colour-semantic/theme-helper.js.map +0 -1
  1249. package/cjs/v3_theme/ds-theme-provider.js +0 -2
  1250. package/cjs/v3_theme/ds-theme-provider.js.map +0 -1
  1251. package/cjs/v3_theme/font/specs/a11yplayground-font-set.js +0 -2
  1252. package/cjs/v3_theme/font/specs/a11yplayground-font-set.js.map +0 -1
  1253. package/cjs/v3_theme/font/specs/bookingsg-font-set.js +0 -2
  1254. package/cjs/v3_theme/font/specs/bookingsg-font-set.js.map +0 -1
  1255. package/cjs/v3_theme/font/specs/default-font-set.js +0 -2
  1256. package/cjs/v3_theme/font/specs/default-font-set.js.map +0 -1
  1257. package/cjs/v3_theme/font/specs/imda-font-set.js +0 -2
  1258. package/cjs/v3_theme/font/specs/imda-font-set.js.map +0 -1
  1259. package/cjs/v3_theme/font/specs/oneservice-font-set.js +0 -2
  1260. package/cjs/v3_theme/font/specs/oneservice-font-set.js.map +0 -1
  1261. package/cjs/v3_theme/font/specs/pa-font-set.js +0 -2
  1262. package/cjs/v3_theme/font/specs/pa-font-set.js.map +0 -1
  1263. package/cjs/v3_theme/font/specs/smgs-font-set.js +0 -2
  1264. package/cjs/v3_theme/font/specs/smgs-font-set.js.map +0 -1
  1265. package/cjs/v3_theme/font/specs/spf-font-set.js +0 -2
  1266. package/cjs/v3_theme/font/specs/spf-font-set.js.map +0 -1
  1267. package/cjs/v3_theme/font/specs/supportgowhere-font-set.js +0 -2
  1268. package/cjs/v3_theme/font/specs/supportgowhere-font-set.js.map +0 -1
  1269. package/cjs/v3_theme/font/theme-helper.js +0 -2
  1270. package/cjs/v3_theme/font/theme-helper.js.map +0 -1
  1271. package/cjs/v3_theme/font/utils.js +0 -10
  1272. package/cjs/v3_theme/font/utils.js.map +0 -1
  1273. package/cjs/v3_theme/font-spec/specs/a11yplayground-font-spec-set.js +0 -2
  1274. package/cjs/v3_theme/font-spec/specs/a11yplayground-font-spec-set.js.map +0 -1
  1275. package/cjs/v3_theme/font-spec/specs/bookingsg-font-spec-set.js +0 -2
  1276. package/cjs/v3_theme/font-spec/specs/bookingsg-font-spec-set.js.map +0 -1
  1277. package/cjs/v3_theme/font-spec/specs/default-font-spec-set.js +0 -2
  1278. package/cjs/v3_theme/font-spec/specs/default-font-spec-set.js.map +0 -1
  1279. package/cjs/v3_theme/font-spec/specs/imda-font-spec-set.js +0 -2
  1280. package/cjs/v3_theme/font-spec/specs/imda-font-spec-set.js.map +0 -1
  1281. package/cjs/v3_theme/font-spec/specs/mylegacy-font-spec-set.js +0 -2
  1282. package/cjs/v3_theme/font-spec/specs/mylegacy-font-spec-set.js.map +0 -1
  1283. package/cjs/v3_theme/font-spec/specs/oneservice-font-spec-set.js +0 -2
  1284. package/cjs/v3_theme/font-spec/specs/oneservice-font-spec-set.js.map +0 -1
  1285. package/cjs/v3_theme/font-spec/specs/pa-font-spec-set.js +0 -2
  1286. package/cjs/v3_theme/font-spec/specs/pa-font-spec-set.js.map +0 -1
  1287. package/cjs/v3_theme/font-spec/specs/sgw-digital-lobby-font-spec-set.js +0 -2
  1288. package/cjs/v3_theme/font-spec/specs/sgw-digital-lobby-font-spec-set.js.map +0 -1
  1289. package/cjs/v3_theme/font-spec/specs/smgs-font-spec-set.js +0 -2
  1290. package/cjs/v3_theme/font-spec/specs/smgs-font-spec-set.js.map +0 -1
  1291. package/cjs/v3_theme/font-spec/specs/spf-font-spec-set.js +0 -2
  1292. package/cjs/v3_theme/font-spec/specs/spf-font-spec-set.js.map +0 -1
  1293. package/cjs/v3_theme/font-spec/specs/supportgowhere-font-spec-set.js +0 -2
  1294. package/cjs/v3_theme/font-spec/specs/supportgowhere-font-spec-set.js.map +0 -1
  1295. package/cjs/v3_theme/font-spec/theme-helper.js +0 -2
  1296. package/cjs/v3_theme/font-spec/theme-helper.js.map +0 -1
  1297. package/cjs/v3_theme/helpers.js +0 -2
  1298. package/cjs/v3_theme/helpers.js.map +0 -1
  1299. package/cjs/v3_theme/index.js +0 -2
  1300. package/cjs/v3_theme/index.js.map +0 -1
  1301. package/cjs/v3_theme/motion/specs/default-motion-set.js +0 -2
  1302. package/cjs/v3_theme/motion/specs/default-motion-set.js.map +0 -1
  1303. package/cjs/v3_theme/motion/theme-helper.js +0 -2
  1304. package/cjs/v3_theme/motion/theme-helper.js.map +0 -1
  1305. package/cjs/v3_theme/radius/specs/default-radius-set.js +0 -2
  1306. package/cjs/v3_theme/radius/specs/default-radius-set.js.map +0 -1
  1307. package/cjs/v3_theme/radius/specs/spf-radius-set.js +0 -2
  1308. package/cjs/v3_theme/radius/specs/spf-radius-set.js.map +0 -1
  1309. package/cjs/v3_theme/radius/theme-helper.js +0 -2
  1310. package/cjs/v3_theme/radius/theme-helper.js.map +0 -1
  1311. package/cjs/v3_theme/shadow/specs/default-shadow-set.js +0 -2
  1312. package/cjs/v3_theme/shadow/specs/default-shadow-set.js.map +0 -1
  1313. package/cjs/v3_theme/shadow/theme-helper.js +0 -2
  1314. package/cjs/v3_theme/shadow/theme-helper.js.map +0 -1
  1315. package/cjs/v3_theme/spacing/specs/default-spacing-set.js +0 -2
  1316. package/cjs/v3_theme/spacing/specs/default-spacing-set.js.map +0 -1
  1317. package/cjs/v3_theme/spacing/theme-helper.js +0 -2
  1318. package/cjs/v3_theme/spacing/theme-helper.js.map +0 -1
  1319. package/cjs/v3_theme/use-theme-mode.js +0 -2
  1320. package/cjs/v3_theme/use-theme-mode.js.map +0 -1
  1321. package/codemods/common.ts +0 -8
  1322. package/codemods/data.ts +0 -16
  1323. package/codemods/deprecate-v2-tokens/data.ts +0 -283
  1324. package/codemods/deprecate-v2-tokens/index.ts +0 -89
  1325. package/codemods/migrate-colour/data.ts +0 -95
  1326. package/codemods/migrate-colour/index.ts +0 -104
  1327. package/codemods/migrate-layout/data.ts +0 -5
  1328. package/codemods/migrate-layout/index.ts +0 -108
  1329. package/codemods/migrate-media-query/data.ts +0 -20
  1330. package/codemods/migrate-media-query/index.ts +0 -113
  1331. package/codemods/migrate-text/data.ts +0 -48
  1332. package/codemods/migrate-text/index.ts +0 -196
  1333. package/codemods/migrate-text-list/data.ts +0 -16
  1334. package/codemods/migrate-text-list/index.ts +0 -111
  1335. package/common.d.ts +0 -8
  1336. package/date-navigator/date-navigator.styles_1cotsgz.css +0 -4
  1337. package/deprecate-v2-tokens/data.d.ts +0 -8
  1338. package/example/example.d.ts +0 -2
  1339. package/example/example.js +0 -2
  1340. package/example/example.js.map +0 -1
  1341. package/example/example_r47nvz.css +0 -1
  1342. package/example/index.d.ts +0 -1
  1343. package/example/index.js +0 -2
  1344. package/example/index.js.map +0 -1
  1345. package/example/types.d.ts +0 -3
  1346. package/file-upload/file-list-item/file-list-item-thumbnail.styles_1vrh1ve.css +0 -4
  1347. package/file-upload/file-list-item/file-list-item.styles_y7my2m.css +0 -14
  1348. package/file-upload/file-list.js +0 -2
  1349. package/file-upload/file-list.js.map +0 -1
  1350. package/file-upload/file-list.styles.js +0 -2
  1351. package/file-upload/file-list.styles.js.map +0 -1
  1352. package/file-upload/file-list.styles_16vplxk.css +0 -3
  1353. package/filter/filter-modal.styles_e0ev97.css +0 -8
  1354. package/filter/filter-sidebar.styles_cwvqql.css +0 -4
  1355. package/form/form-label.styles_rk98yd.css +0 -6
  1356. package/image-button/image-button.styles_qtt605.css +0 -5
  1357. package/input-group/input-group.styles_fpy81r.css +0 -3
  1358. package/input-textarea/textarea-counter.styles_adg5h1.css +0 -1
  1359. package/input-textarea/textarea.styles_g0zgyq.css +0 -5
  1360. package/language-switcher/dropdown-panel.styles_1z0n7qq.css +0 -4
  1361. package/language-switcher/dropdown-variant.styles_16c4wc1.css +0 -2
  1362. package/language-switcher/link-container-variant.styles_1blx9qm.css +0 -5
  1363. package/markup/markup.utils.d.ts +0 -2
  1364. package/markup/markup.utils.js +0 -2
  1365. package/markup/markup.utils.js.map +0 -1
  1366. package/migrate-colour/data.d.ts +0 -270
  1367. package/migrate-colour/index.d.ts +0 -7
  1368. package/migrate-layout/data.d.ts +0 -5
  1369. package/migrate-layout/index.d.ts +0 -2
  1370. package/migrate-media-query/data.d.ts +0 -20
  1371. package/migrate-media-query/index.d.ts +0 -2
  1372. package/migrate-text/data.d.ts +0 -46
  1373. package/migrate-text/index.d.ts +0 -2
  1374. package/migrate-text-list/data.d.ts +0 -16
  1375. package/migrate-text-list/index.d.ts +0 -2
  1376. package/modal/modal-box.styles_1xrlxhd.css +0 -2
  1377. package/modal/modal.styles_1sav73f.css +0 -11
  1378. package/modal-v2/modal-v2.styles_1irpyi6.css +0 -3
  1379. package/otp-verification/contact-input-section-styles.d.ts +0 -14
  1380. package/otp-verification/contact-input-section-styles.js +0 -115
  1381. package/otp-verification/contact-input-section-styles.js.map +0 -1
  1382. package/otp-verification/otp-verification-styles.d.ts +0 -1
  1383. package/otp-verification/otp-verification-styles.js +0 -6
  1384. package/otp-verification/otp-verification-styles.js.map +0 -1
  1385. package/otp-verification/verification-section-styles.d.ts +0 -23
  1386. package/otp-verification/verification-section-styles.js +0 -27
  1387. package/otp-verification/verification-section-styles.js.map +0 -1
  1388. package/schedule/schedule-header/schedule-header.style.d.ts +0 -25
  1389. package/schedule/schedule-header/schedule-header.style.js +0 -38
  1390. package/schedule/schedule-header/schedule-header.style.js.map +0 -1
  1391. package/schedule/schedule-week-view/slot-content.d.ts +0 -8
  1392. package/schedule/schedule-week-view/slot-content.js +0 -2
  1393. package/schedule/schedule-week-view/slot-content.js.map +0 -1
  1394. package/schedule/schedule-week-view/slot-content.styles.d.ts +0 -27
  1395. package/schedule/schedule-week-view/slot-content.styles.js +0 -40
  1396. package/schedule/schedule-week-view/slot-content.styles.js.map +0 -1
  1397. package/schedule/shared/index.d.ts +0 -2
  1398. package/select-histogram/select-histogram.styles_11916eo.css +0 -5
  1399. package/shared/dropdown-list/expandable-element.styles_5o9f9w.css +0 -6
  1400. package/shared/dropdown-wrapper/dropdown-wrapper.styles_v10jbi.css +0 -3
  1401. package/shared/internal-calendar/standard/standard-calendar-day-view.styles_1dbvup3.css +0 -3
  1402. package/shared/standalone-date-input/standalone-date-input.styles_1m0da43.css +0 -13
  1403. package/shared/styles/index.js +0 -2
  1404. package/shared/styles/index.js.map +0 -1
  1405. package/shared/time-slot/time-slot.styles_1r9na3f.css +0 -17
  1406. package/sidenav/sidenav-drawer-item.styles_yp8cga.css +0 -6
  1407. package/sidenav/sidenav-drawer-subitem.styles_1ylzfn5.css +0 -1
  1408. package/text-list/text-list.styles_1gohl3f.css +0 -16
  1409. package/time-slot-bar-week/time-slot-bar-week-days.style.d.ts +0 -54
  1410. package/time-slot-bar-week/time-slot-bar-week-days.style.js +0 -104
  1411. package/time-slot-bar-week/time-slot-bar-week-days.style.js.map +0 -1
  1412. package/time-slot-bar-week/time-slot-bar-week.style.d.ts +0 -1
  1413. package/time-slot-bar-week/time-slot-bar-week.style.js +0 -10
  1414. package/time-slot-bar-week/time-slot-bar-week.style.js.map +0 -1
  1415. package/time-slot-week-view/time-slot-week-days.style.d.ts +0 -12
  1416. package/time-slot-week-view/time-slot-week-days.style.js +0 -59
  1417. package/time-slot-week-view/time-slot-week-days.style.js.map +0 -1
  1418. package/timepicker/timepicker.styles_zmkhl8.css +0 -1
  1419. package/typography/typography.styles_1jqils.css +0 -9
  1420. package/uneditable-section/section-item.styles_1dfjzc4.css +0 -9
  1421. package/v3_theme/border/specs/default-border-set.d.ts +0 -2
  1422. package/v3_theme/border/specs/default-border-set.js +0 -2
  1423. package/v3_theme/border/specs/default-border-set.js.map +0 -1
  1424. package/v3_theme/border/theme-helper.d.ts +0 -10
  1425. package/v3_theme/border/theme-helper.js +0 -2
  1426. package/v3_theme/border/theme-helper.js.map +0 -1
  1427. package/v3_theme/border/types.d.ts +0 -12
  1428. package/v3_theme/border-util/specs/default-border-util-set.d.ts +0 -2
  1429. package/v3_theme/border-util/specs/default-border-util-set.js +0 -2
  1430. package/v3_theme/border-util/specs/default-border-util-set.js.map +0 -1
  1431. package/v3_theme/border-util/theme-helper.d.ts +0 -8
  1432. package/v3_theme/border-util/theme-helper.js +0 -2
  1433. package/v3_theme/border-util/theme-helper.js.map +0 -1
  1434. package/v3_theme/border-util/types.d.ts +0 -19
  1435. package/v3_theme/border-util/utils.d.ts +0 -11
  1436. package/v3_theme/border-util/utils.js +0 -8
  1437. package/v3_theme/border-util/utils.js.map +0 -1
  1438. package/v3_theme/breakpoint/media-query-helper.d.ts +0 -9
  1439. package/v3_theme/breakpoint/media-query-helper.js +0 -2
  1440. package/v3_theme/breakpoint/media-query-helper.js.map +0 -1
  1441. package/v3_theme/breakpoint/specs/default-breakpoint-set.d.ts +0 -2
  1442. package/v3_theme/breakpoint/specs/default-breakpoint-set.js +0 -2
  1443. package/v3_theme/breakpoint/specs/default-breakpoint-set.js.map +0 -1
  1444. package/v3_theme/breakpoint/theme-helper.d.ts +0 -39
  1445. package/v3_theme/breakpoint/theme-helper.js +0 -2
  1446. package/v3_theme/breakpoint/theme-helper.js.map +0 -1
  1447. package/v3_theme/breakpoint/types.d.ts +0 -41
  1448. package/v3_theme/colour-primitive/specs/a11yplayground-colour-set.d.ts +0 -2
  1449. package/v3_theme/colour-primitive/specs/a11yplayground-colour-set.js +0 -2
  1450. package/v3_theme/colour-primitive/specs/a11yplayground-colour-set.js.map +0 -1
  1451. package/v3_theme/colour-primitive/specs/bookingsg-colour-set.d.ts +0 -2
  1452. package/v3_theme/colour-primitive/specs/bookingsg-colour-set.js +0 -2
  1453. package/v3_theme/colour-primitive/specs/bookingsg-colour-set.js.map +0 -1
  1454. package/v3_theme/colour-primitive/specs/ccube-colour-set.d.ts +0 -2
  1455. package/v3_theme/colour-primitive/specs/ccube-colour-set.js +0 -2
  1456. package/v3_theme/colour-primitive/specs/ccube-colour-set.js.map +0 -1
  1457. package/v3_theme/colour-primitive/specs/imda-colour-set.d.ts +0 -2
  1458. package/v3_theme/colour-primitive/specs/imda-colour-set.js +0 -2
  1459. package/v3_theme/colour-primitive/specs/imda-colour-set.js.map +0 -1
  1460. package/v3_theme/colour-primitive/specs/lifesg-colour-set.d.ts +0 -2
  1461. package/v3_theme/colour-primitive/specs/lifesg-colour-set.js +0 -2
  1462. package/v3_theme/colour-primitive/specs/lifesg-colour-set.js.map +0 -1
  1463. package/v3_theme/colour-primitive/specs/mylegacy-colour-set.d.ts +0 -2
  1464. package/v3_theme/colour-primitive/specs/mylegacy-colour-set.js +0 -2
  1465. package/v3_theme/colour-primitive/specs/mylegacy-colour-set.js.map +0 -1
  1466. package/v3_theme/colour-primitive/specs/oneservice-colour-set.d.ts +0 -2
  1467. package/v3_theme/colour-primitive/specs/oneservice-colour-set.js +0 -2
  1468. package/v3_theme/colour-primitive/specs/oneservice-colour-set.js.map +0 -1
  1469. package/v3_theme/colour-primitive/specs/pa-colour-set.d.ts +0 -2
  1470. package/v3_theme/colour-primitive/specs/pa-colour-set.js +0 -2
  1471. package/v3_theme/colour-primitive/specs/pa-colour-set.js.map +0 -1
  1472. package/v3_theme/colour-primitive/specs/rbs-colour-set.d.ts +0 -2
  1473. package/v3_theme/colour-primitive/specs/rbs-colour-set.js +0 -2
  1474. package/v3_theme/colour-primitive/specs/rbs-colour-set.js.map +0 -1
  1475. package/v3_theme/colour-primitive/specs/smgs-colour-set.d.ts +0 -2
  1476. package/v3_theme/colour-primitive/specs/smgs-colour-set.js +0 -2
  1477. package/v3_theme/colour-primitive/specs/smgs-colour-set.js.map +0 -1
  1478. package/v3_theme/colour-primitive/specs/spf-colour-set.d.ts +0 -2
  1479. package/v3_theme/colour-primitive/specs/spf-colour-set.js +0 -2
  1480. package/v3_theme/colour-primitive/specs/spf-colour-set.js.map +0 -1
  1481. package/v3_theme/colour-primitive/specs/supportgowhere-colour-set.d.ts +0 -2
  1482. package/v3_theme/colour-primitive/specs/supportgowhere-colour-set.js +0 -2
  1483. package/v3_theme/colour-primitive/specs/supportgowhere-colour-set.js.map +0 -1
  1484. package/v3_theme/colour-primitive/theme-helper.d.ts +0 -10
  1485. package/v3_theme/colour-primitive/theme-helper.js +0 -2
  1486. package/v3_theme/colour-primitive/theme-helper.js.map +0 -1
  1487. package/v3_theme/colour-primitive/types.d.ts +0 -98
  1488. package/v3_theme/colour-semantic/specs/a11yplayground-semantic-tokens.d.ts +0 -3
  1489. package/v3_theme/colour-semantic/specs/a11yplayground-semantic-tokens.js +0 -2
  1490. package/v3_theme/colour-semantic/specs/a11yplayground-semantic-tokens.js.map +0 -1
  1491. package/v3_theme/colour-semantic/specs/lifesg-semantic-tokens.d.ts +0 -3
  1492. package/v3_theme/colour-semantic/specs/lifesg-semantic-tokens.js +0 -2
  1493. package/v3_theme/colour-semantic/specs/lifesg-semantic-tokens.js.map +0 -1
  1494. package/v3_theme/colour-semantic/specs/pa-semantic-tokens.d.ts +0 -2
  1495. package/v3_theme/colour-semantic/specs/pa-semantic-tokens.js +0 -2
  1496. package/v3_theme/colour-semantic/specs/pa-semantic-tokens.js.map +0 -1
  1497. package/v3_theme/colour-semantic/specs/sgwdigitallobby-tokens.d.ts +0 -3
  1498. package/v3_theme/colour-semantic/specs/sgwdigitallobby-tokens.js +0 -2
  1499. package/v3_theme/colour-semantic/specs/sgwdigitallobby-tokens.js.map +0 -1
  1500. package/v3_theme/colour-semantic/theme-helper.d.ts +0 -10
  1501. package/v3_theme/colour-semantic/theme-helper.js +0 -2
  1502. package/v3_theme/colour-semantic/theme-helper.js.map +0 -1
  1503. package/v3_theme/colour-semantic/types.d.ts +0 -123
  1504. package/v3_theme/components/specs/a11yplayground-component-token-set.d.ts +0 -2
  1505. package/v3_theme/components/specs/default-component-token-set.d.ts +0 -2
  1506. package/v3_theme/components/specs/lifesg-component-token-set.d.ts +0 -2
  1507. package/v3_theme/components/specs/pa-component-token-set.d.ts +0 -2
  1508. package/v3_theme/components/specs/smgs-component-token-set.d.ts +0 -2
  1509. package/v3_theme/components/specs/spf-component-token-set.d.ts +0 -2
  1510. package/v3_theme/components/theme-helper.d.ts +0 -17
  1511. package/v3_theme/components/types.d.ts +0 -44
  1512. package/v3_theme/ds-theme-provider.d.ts +0 -2
  1513. package/v3_theme/ds-theme-provider.js +0 -2
  1514. package/v3_theme/ds-theme-provider.js.map +0 -1
  1515. package/v3_theme/font/specs/a11yplayground-font-set.d.ts +0 -2
  1516. package/v3_theme/font/specs/a11yplayground-font-set.js +0 -2
  1517. package/v3_theme/font/specs/a11yplayground-font-set.js.map +0 -1
  1518. package/v3_theme/font/specs/bookingsg-font-set.d.ts +0 -2
  1519. package/v3_theme/font/specs/bookingsg-font-set.js +0 -2
  1520. package/v3_theme/font/specs/bookingsg-font-set.js.map +0 -1
  1521. package/v3_theme/font/specs/default-font-set.d.ts +0 -2
  1522. package/v3_theme/font/specs/default-font-set.js +0 -2
  1523. package/v3_theme/font/specs/default-font-set.js.map +0 -1
  1524. package/v3_theme/font/specs/imda-font-set.d.ts +0 -2
  1525. package/v3_theme/font/specs/imda-font-set.js +0 -2
  1526. package/v3_theme/font/specs/imda-font-set.js.map +0 -1
  1527. package/v3_theme/font/specs/oneservice-font-set.d.ts +0 -2
  1528. package/v3_theme/font/specs/oneservice-font-set.js +0 -2
  1529. package/v3_theme/font/specs/oneservice-font-set.js.map +0 -1
  1530. package/v3_theme/font/specs/pa-font-set.d.ts +0 -2
  1531. package/v3_theme/font/specs/pa-font-set.js +0 -2
  1532. package/v3_theme/font/specs/pa-font-set.js.map +0 -1
  1533. package/v3_theme/font/specs/smgs-font-set.d.ts +0 -2
  1534. package/v3_theme/font/specs/smgs-font-set.js +0 -2
  1535. package/v3_theme/font/specs/smgs-font-set.js.map +0 -1
  1536. package/v3_theme/font/specs/spf-font-set.d.ts +0 -2
  1537. package/v3_theme/font/specs/spf-font-set.js +0 -2
  1538. package/v3_theme/font/specs/spf-font-set.js.map +0 -1
  1539. package/v3_theme/font/specs/supportgowhere-font-set.d.ts +0 -2
  1540. package/v3_theme/font/specs/supportgowhere-font-set.js +0 -2
  1541. package/v3_theme/font/specs/supportgowhere-font-set.js.map +0 -1
  1542. package/v3_theme/font/theme-helper.d.ts +0 -7
  1543. package/v3_theme/font/theme-helper.js +0 -2
  1544. package/v3_theme/font/theme-helper.js.map +0 -1
  1545. package/v3_theme/font/types.d.ts +0 -54
  1546. package/v3_theme/font/utils.d.ts +0 -4
  1547. package/v3_theme/font/utils.js +0 -10
  1548. package/v3_theme/font/utils.js.map +0 -1
  1549. package/v3_theme/font-spec/specs/a11yplayground-font-spec-set.d.ts +0 -2
  1550. package/v3_theme/font-spec/specs/a11yplayground-font-spec-set.js +0 -2
  1551. package/v3_theme/font-spec/specs/a11yplayground-font-spec-set.js.map +0 -1
  1552. package/v3_theme/font-spec/specs/bookingsg-font-spec-set.d.ts +0 -2
  1553. package/v3_theme/font-spec/specs/bookingsg-font-spec-set.js +0 -2
  1554. package/v3_theme/font-spec/specs/bookingsg-font-spec-set.js.map +0 -1
  1555. package/v3_theme/font-spec/specs/default-font-spec-set.d.ts +0 -2
  1556. package/v3_theme/font-spec/specs/default-font-spec-set.js +0 -2
  1557. package/v3_theme/font-spec/specs/default-font-spec-set.js.map +0 -1
  1558. package/v3_theme/font-spec/specs/imda-font-spec-set.d.ts +0 -2
  1559. package/v3_theme/font-spec/specs/imda-font-spec-set.js +0 -2
  1560. package/v3_theme/font-spec/specs/imda-font-spec-set.js.map +0 -1
  1561. package/v3_theme/font-spec/specs/mylegacy-font-spec-set.d.ts +0 -2
  1562. package/v3_theme/font-spec/specs/mylegacy-font-spec-set.js +0 -2
  1563. package/v3_theme/font-spec/specs/mylegacy-font-spec-set.js.map +0 -1
  1564. package/v3_theme/font-spec/specs/oneservice-font-spec-set.d.ts +0 -2
  1565. package/v3_theme/font-spec/specs/oneservice-font-spec-set.js +0 -2
  1566. package/v3_theme/font-spec/specs/oneservice-font-spec-set.js.map +0 -1
  1567. package/v3_theme/font-spec/specs/pa-font-spec-set.d.ts +0 -2
  1568. package/v3_theme/font-spec/specs/pa-font-spec-set.js +0 -2
  1569. package/v3_theme/font-spec/specs/pa-font-spec-set.js.map +0 -1
  1570. package/v3_theme/font-spec/specs/sgw-digital-lobby-font-spec-set.d.ts +0 -2
  1571. package/v3_theme/font-spec/specs/sgw-digital-lobby-font-spec-set.js +0 -2
  1572. package/v3_theme/font-spec/specs/sgw-digital-lobby-font-spec-set.js.map +0 -1
  1573. package/v3_theme/font-spec/specs/smgs-font-spec-set.d.ts +0 -2
  1574. package/v3_theme/font-spec/specs/smgs-font-spec-set.js +0 -2
  1575. package/v3_theme/font-spec/specs/smgs-font-spec-set.js.map +0 -1
  1576. package/v3_theme/font-spec/specs/spf-font-spec-set.d.ts +0 -2
  1577. package/v3_theme/font-spec/specs/spf-font-spec-set.js +0 -2
  1578. package/v3_theme/font-spec/specs/spf-font-spec-set.js.map +0 -1
  1579. package/v3_theme/font-spec/specs/supportgowhere-font-spec-set.d.ts +0 -2
  1580. package/v3_theme/font-spec/specs/supportgowhere-font-spec-set.js +0 -2
  1581. package/v3_theme/font-spec/specs/supportgowhere-font-spec-set.js.map +0 -1
  1582. package/v3_theme/font-spec/theme-helper.d.ts +0 -6
  1583. package/v3_theme/font-spec/theme-helper.js +0 -2
  1584. package/v3_theme/font-spec/theme-helper.js.map +0 -1
  1585. package/v3_theme/font-spec/types.d.ts +0 -53
  1586. package/v3_theme/helpers.d.ts +0 -7
  1587. package/v3_theme/helpers.js +0 -2
  1588. package/v3_theme/helpers.js.map +0 -1
  1589. package/v3_theme/index.d.ts +0 -696
  1590. package/v3_theme/index.js +0 -2
  1591. package/v3_theme/index.js.map +0 -1
  1592. package/v3_theme/internal-types.d.ts +0 -4
  1593. package/v3_theme/motion/specs/default-motion-set.d.ts +0 -2
  1594. package/v3_theme/motion/specs/default-motion-set.js +0 -2
  1595. package/v3_theme/motion/specs/default-motion-set.js.map +0 -1
  1596. package/v3_theme/motion/theme-helper.d.ts +0 -6
  1597. package/v3_theme/motion/theme-helper.js +0 -2
  1598. package/v3_theme/motion/theme-helper.js.map +0 -1
  1599. package/v3_theme/motion/types.d.ts +0 -17
  1600. package/v3_theme/radius/specs/default-radius-set.d.ts +0 -2
  1601. package/v3_theme/radius/specs/default-radius-set.js +0 -2
  1602. package/v3_theme/radius/specs/default-radius-set.js.map +0 -1
  1603. package/v3_theme/radius/specs/spf-radius-set.d.ts +0 -2
  1604. package/v3_theme/radius/specs/spf-radius-set.js +0 -2
  1605. package/v3_theme/radius/specs/spf-radius-set.js.map +0 -1
  1606. package/v3_theme/radius/theme-helper.d.ts +0 -6
  1607. package/v3_theme/radius/theme-helper.js +0 -2
  1608. package/v3_theme/radius/theme-helper.js.map +0 -1
  1609. package/v3_theme/radius/types.d.ts +0 -13
  1610. package/v3_theme/shadow/specs/default-shadow-set.d.ts +0 -2
  1611. package/v3_theme/shadow/specs/default-shadow-set.js +0 -2
  1612. package/v3_theme/shadow/specs/default-shadow-set.js.map +0 -1
  1613. package/v3_theme/shadow/theme-helper.d.ts +0 -7
  1614. package/v3_theme/shadow/theme-helper.js +0 -2
  1615. package/v3_theme/shadow/theme-helper.js.map +0 -1
  1616. package/v3_theme/shadow/types.d.ts +0 -21
  1617. package/v3_theme/spacing/specs/default-spacing-set.d.ts +0 -2
  1618. package/v3_theme/spacing/specs/default-spacing-set.js +0 -2
  1619. package/v3_theme/spacing/specs/default-spacing-set.js.map +0 -1
  1620. package/v3_theme/spacing/theme-helper.d.ts +0 -6
  1621. package/v3_theme/spacing/theme-helper.js +0 -2
  1622. package/v3_theme/spacing/theme-helper.js.map +0 -1
  1623. package/v3_theme/spacing/types.d.ts +0 -26
  1624. package/v3_theme/types.d.ts +0 -78
  1625. package/v3_theme/use-theme-mode.d.ts +0 -4
  1626. package/v3_theme/use-theme-mode.js +0 -2
  1627. package/v3_theme/use-theme-mode.js.map +0 -1
  1628. /package/file-upload/{file-list.styles.d.ts → file-list/file-list.styles.d.ts} +0 -0
  1629. /package/{deprecate-v2-tokens → migrate-popover}/index.d.ts +0 -0
@@ -1,2 +1,2 @@
1
- "use strict";require("./file-item-edit.styles_1qbpbxj.css");exports.actionButton="awg16zc",exports.actionButtonsSection="a18dc1yj",exports.actionButtonsSectionWithThumbnail="ajknckh",exports.contentSection="c1i0crev",exports.detailsSection="d4rbbwx",exports.fileNameText="fuau9z6",exports.item="i1432lvs",exports.nameSection="n18lt6ho";
1
+ "use strict";require("./file-item-edit.styles_19bvztn.css");exports.actionButton="aigdfjq",exports.actionButtonsSection="ajknckh",exports.actionButtonsSectionWithThumbnail="awg16zc",exports.contentSection="c1i0crev",exports.detailsSection="d4rbbwx",exports.fileNameText="fuau9z6",exports.fileSizeText="f18dc1yj",exports.item="i1432lvs",exports.nameSection="n18lt6ho";
2
2
  //# sourceMappingURL=file-item-edit.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-item-edit.styles.js","sources":["../../../src/file-upload/file-item-edit.styles.ts"],"sourcesContent":["import { css } from \"@linaria/core\";\n\nimport { Border, Colour, MediaQuery, Spacing } from \"../theme\";\n\nexport const item = css`\n display: flex;\n flex-direction: column;\n padding: ${Spacing[\"spacing-32\"]} 0;\n background: transparent;\n\n &:not(:last-child) {\n border-bottom: ${Border[\"width-010\"]} ${Border.solid} ${Colour.border};\n }\n`;\n\nexport const contentSection = css`\n display: flex;\n align-items: flex-start;\n margin-bottom: ${Spacing[\"spacing-16\"]};\n width: 100%;\n`;\n\nexport const detailsSection = css`\n display: flex;\n flex: 1;\n flex-direction: column;\n`;\n\nexport const nameSection = css`\n width: 100%;\n display: flex;\n justify-content: space-between;\n margin-bottom: ${Spacing[\"spacing-16\"]};\n\n ${MediaQuery.MaxWidth.md} {\n flex-direction: column;\n justify-content: flex-start;\n }\n`;\n\nexport const fileNameText = css`\n display: flex;\n flex: 1;\n margin-right: ${Spacing[\"spacing-16\"]};\n\n ${MediaQuery.MaxWidth.md} {\n margin-right: 0;\n margin-bottom: ${Spacing[\"spacing-8\"]};\n }\n`;\n\nexport const actionButtonsSection = css`\n display: flex;\n\n ${MediaQuery.MaxWidth.md} {\n flex-direction: column;\n }\n`;\n\nexport const actionButtonsSectionWithThumbnail = css`\n margin-left: calc(\n 96px + ${Spacing[\"spacing-32\"]}\n ); // thumbnail width + right margin\n\n ${MediaQuery.MaxWidth.md} {\n margin-left: 0;\n }\n`;\n\nexport const actionButton = css`\n width: 7.5rem;\n\n &:not(:last-of-type) {\n margin-right: ${Spacing[\"spacing-16\"]};\n }\n\n ${MediaQuery.MaxWidth.md} {\n width: 100%;\n\n &:not(:last-of-type) {\n margin-bottom: ${Spacing[\"spacing-16\"]};\n }\n }\n`;\n"],"names":[],"mappings":"4GAqEyB,uCAlBQ,qDAQa,iCA5CnB,kCAOA,+BAkBF,uBApCR,+BAwBO"}
1
+ {"version":3,"file":"file-item-edit.styles.js","sources":["../../../src/file-upload/file-item-edit.styles.ts"],"sourcesContent":["import { css } from \"@linaria/core\";\n\nimport { Border, Colour, MediaQuery, Radius, Spacing } from \"../theme\";\n\nexport const item = css`\n display: flex;\n flex-direction: column;\n padding: ${Spacing[\"spacing-32\"]};\n background: ${Colour[\"bg-primary-subtlest\"]};\n border: ${Border[\"width-010\"]} ${Border.solid} ${Colour.border};\n border-radius: ${Radius[\"sm\"]};\n\n &:not(:last-child) {\n margin-bottom: ${Spacing[\"spacing-16\"]};\n }\n`;\n\nexport const contentSection = css`\n display: flex;\n align-items: flex-start;\n margin-bottom: ${Spacing[\"spacing-16\"]};\n width: 100%;\n`;\n\nexport const detailsSection = css`\n display: flex;\n flex: 1;\n flex-direction: column;\n`;\n\nexport const nameSection = css`\n width: 100%;\n display: flex;\n justify-content: space-between;\n margin-bottom: ${Spacing[\"spacing-16\"]};\n\n ${MediaQuery.MaxWidth.md} {\n flex-direction: column;\n justify-content: flex-start;\n }\n`;\n\nexport const fileNameText = css`\n display: flex;\n flex: 1;\n margin-right: ${Spacing[\"spacing-16\"]};\n\n ${MediaQuery.MaxWidth.md} {\n margin-right: 0;\n margin-bottom: ${Spacing[\"spacing-8\"]};\n }\n`;\n\nexport const fileSizeText = css`\n color: ${Colour[\"text-subtler\"]};\n`;\n\nexport const actionButtonsSection = css`\n display: flex;\n justify-content: flex-end;\n\n ${MediaQuery.MaxWidth.md} {\n flex-direction: column;\n }\n`;\n\nexport const actionButtonsSectionWithThumbnail = css`\n margin-left: calc(\n 96px + ${Spacing[\"spacing-32\"]}\n ); // thumbnail width + right margin\n\n ${MediaQuery.MaxWidth.md} {\n margin-left: 0;\n }\n`;\n\nexport const actionButton = css`\n width: 7.5rem;\n\n &:not(:last-of-type) {\n margin-right: ${Spacing[\"spacing-16\"]};\n }\n\n ${MediaQuery.MaxWidth.md} {\n width: 100%;\n\n &:not(:last-of-type) {\n margin-bottom: ${Spacing[\"spacing-16\"]};\n }\n }\n`;\n"],"names":[],"mappings":"4GA4EyB,uCAnBQ,oDASa,iCAjDnB,kCAOA,+BAkBF,+BAWA,wBAjDR,+BA0BO"}
@@ -1,10 +1,11 @@
1
- .i1432lvs{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:var(--fds-spacing-32) 0;background:transparent;}.i1432lvs:not(:last-child){border-bottom:var(--fds-border-width-010) var(--fds-border-style-solid) var(--fds-colour-border);}
1
+ @layer fds{.i1432lvs{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;padding:var(--fds-spacing-32);background:var(--fds-colour-bg-primary-subtlest);border:var(--fds-border-width-010) var(--fds-border-style-solid) var(--fds-colour-border);border-radius:var(--fds-radius-sm);}.i1432lvs:not(:last-child){margin-bottom:var(--fds-spacing-16);}
2
2
  .c1i0crev{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;margin-bottom:var(--fds-spacing-16);width:100%;}
3
3
  .d4rbbwx{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}
4
4
  .n18lt6ho{width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:space-between;-webkit-justify-content:space-between;justify-content:space-between;margin-bottom:var(--fds-spacing-16);}:where(body.fds-breakpoint-md-max) .n18lt6ho{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;}
5
5
  .fuau9z6{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;margin-right:var(--fds-spacing-16);}:where(body.fds-breakpoint-md-max) .fuau9z6{margin-right:0;margin-bottom:var(--fds-spacing-8);}
6
- .a18dc1yj{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;}:where(body.fds-breakpoint-md-max) .a18dc1yj{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}
7
- .ajknckh{margin-left:calc(
6
+ .f18dc1yj{color:var(--fds-colour-text-subtler);}
7
+ .ajknckh{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;}:where(body.fds-breakpoint-md-max) .ajknckh{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}
8
+ .awg16zc{margin-left:calc(
8
9
  96px + var(--fds-spacing-32)
9
- );}:where(body.fds-breakpoint-md-max) .ajknckh{margin-left:0;}
10
- .awg16zc{width:7.5rem;}.awg16zc:not(:last-of-type){margin-right:var(--fds-spacing-16);}:where(body.fds-breakpoint-md-max) .awg16zc{width:100%;}:where(body.fds-breakpoint-md-max) .awg16zc:not(:last-of-type){margin-bottom:var(--fds-spacing-16);}
10
+ );}:where(body.fds-breakpoint-md-max) .awg16zc{margin-left:0;}
11
+ .aigdfjq{width:7.5rem;}.aigdfjq:not(:last-of-type){margin-right:var(--fds-spacing-16);}:where(body.fds-breakpoint-md-max) .aigdfjq{width:100%;}:where(body.fds-breakpoint-md-max) .aigdfjq:not(:last-of-type){margin-bottom:var(--fds-spacing-16);}}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("../../external/@dnd-kit/core/dist/core.esm.js"),t=require("../../external/@dnd-kit/sortable/dist/sortable.esm.js"),s=require("clsx"),i=require("react"),n=require("../../external/react-resize-detector/build/index.esm.js"),o=require("../../shared/accessibility/index.js"),l=require("../context.js"),a=require("../custom-sensors.js"),d=require("../file-item-edit.js"),c=require("../file-list-item/file-list-item.js"),u=require("../helper.js"),p=require("./file-list.styles.js");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var g=f(s);const m=i.forwardRef((function({fileItems:s=[],editableFileItems:f,fileDescriptionMaxLength:m,descriptionRequired:h,descriptionLabel:b,sortable:j,disabled:y,readOnly:v,onItemUpdate:x,onItemDelete:S,onSort:q},I){const[$,M]=i.useState({}),{setActiveId:O}=i.useContext(l.FileUploadContext),[C,D]=i.useState(""),F=i.useRef({});i.useImperativeHandle(I,(()=>({focus:()=>{var e;null===(e=R.current)||void 0===e||e.focus()}})));const{width:L=0,ref:R}=n.useResizeDetector(),E=i.useRef({}),w=r.useSensors(r.useSensor(a.MouseSensor,{activationConstraint:{distance:8}}),r.useSensor(r.TouchSensor,{activationConstraint:{delay:150,tolerance:5}}),r.useSensor(r.KeyboardSensor,{coordinateGetter:t.sortableKeyboardCoordinates})),k=e=>{delete E.current[e]};i.useEffect((()=>{const e=G(s);((e,r)=>{const t=Object.keys(e),s=Object.keys(r);if(t.length!==s.length)return!1;for(const t of s)if(e[t]!==r[t])return!1;return!0})($,e)||M(e)}),[s,f,v]),i.useEffect((()=>{var e;if(!s||0===s.length)return void D("");const r=Date.now(),t=[];for(const i of s){const s=F.current[i.id];if(i.errorMessage)"error"!==(null==s?void 0:s.status)&&(t.push("string"==typeof i.errorMessage?`Error uploading ${i.name}: ${i.errorMessage}`:`Error uploading ${i.name}`),F.current[i.id]={progress:null!==(e=i.progress)&&void 0!==e?e:1,timestamp:r,status:"error"});else if(void 0!==i.progress)if(i.progress>=1)"complete"!==(null==s?void 0:s.status)&&(t.push(`${i.name} upload is complete`),F.current[i.id]={progress:1,timestamp:r,status:"complete"});else if("number"==typeof i.progress&&i.progress<1){(!s||"in-progress"!==s.status)&&(t.push(`Starting upload of ${i.name}`),F.current[i.id]={progress:i.progress,timestamp:r,status:"in-progress"})}}t.length>0&&D(t.join(", "))}),[s]);const A=e=>r=>{V(e.id,"display"),k(e.id);const t=Object.assign(Object.assign({},e),{description:r});x(t)},W=e=>r=>{E.current[e.id]=r},H=e=>()=>{e.description&&0!==e.description.length?V(e.id,"display"):S(e),k(e.id)},N=e=>()=>{V(e.id,"edit")},U=e=>()=>{S(e),R.current&&R.current.focus()},z=e=>{if(q&&s){const{active:r,over:i}=e;if(i&&r.id!==i.id){const e=s.findIndex((e=>e.id===r.id)),n=s.findIndex((e=>e.id===i.id)),o=t.arrayMove(s,e,n);q(o)}}O(void 0)},B=e=>{const{active:r}=e;O(r.id)},K=e=>f&&u.FileUploadHelper.isSupportedImageType(e.type),T=e=>!e.errorMessage&&!v&&!("number"==typeof e.progress&&e.progress<1)&&K(e)&&!e.description,G=e=>{if(!e||0===e.length)return{};const r={};for(const t of e)t.errorMessage?r[t.id]="error":$[t.id]?r[t.id]=$[t.id]:r[t.id]=T(t)?"edit":"display";return r},V=(e,r)=>{M((t=>Object.assign(Object.assign({},t),{[e]:r})))},J=()=>s&&s.length>1&&j&&Object.values($).every((e=>"display"===e)),P=()=>{if(0===s.length)return"No files uploaded";const e=s.filter((e=>!(null==e?void 0:e.errorMessage)&&(1===e.progress||void 0===e.progress))).length,r=s.filter((e=>"number"==typeof e.progress&&e.progress<1)).length,t=s.filter((e=>e.errorMessage)).length;if(0===e&&0===r&&0===t)return"File list";const i=[e>0?`${e} completed files`:"",r>0?`${r} file in progress`:"",t>0?`${t} ${t>1?"files":"file"} with error`:""].filter(Boolean);return`${v?"Read-only file list":"File list"}. ${i.join(", ")}`},Q=()=>{const r=((e,r)=>{if(!e||0===e.length)return[];const t=[];for(const s of e)if("edit"===r[s.id]){const e=t[t.length-1];Array.isArray(e)?e.push(s):t.push([s])}else t.push(s);return t})(s,$);return 0===r.length?null:r.map(((r,t)=>Array.isArray(r)?((r,t)=>{const s=r.map((r=>{const t=Object.assign({},r);return void 0!==E.current[r.id]&&(t.description=E.current[r.id]),e.jsx(d.FileItemEdit,{fileItem:t,wrapperWidth:L,fileDescriptionMaxLength:m,descriptionRequired:h,descriptionLabel:b,onSave:A(r),onCancel:H(r),onBlur:W(r)},r.id)}));return e.jsx("li",{className:p.editableItemsContainer,children:e.jsx("ul",{children:s})},`editable-${t}`)})(r,t):e.jsx(c.FileListItem,{fileItem:r,editable:K(r),wrapperWidth:L,sortable:J(),disabled:y,readOnly:v,descriptionLabel:b,onDelete:U(r),onEditClick:N(r)},r.id)))},X=()=>e.jsxs(e.Fragment,{children:[e.jsx(o.VisuallyHidden,{"aria-live":"polite","aria-atomic":"true",children:C}),e.jsx("ul",{tabIndex:-1,className:g.default(p.listWrapper,v&&p.listWrapperReadOnly),ref:R,"aria-label":P(),children:Q()})]});return y||v||!J()?X():e.jsx(r.DndContext,{sensors:w,onDragEnd:z,onDragStart:B,children:e.jsx(t.SortableContext,{items:s,strategy:t.verticalListSortingStrategy,children:X()})})}));exports.FileList=m;
2
+ //# sourceMappingURL=file-list.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-list.js","sources":["../../../../src/file-upload/file-list/file-list.tsx"],"sourcesContent":["import type { DragEndEvent, DragStartEvent } from \"@dnd-kit/core\";\nimport {\n DndContext,\n KeyboardSensor,\n TouchSensor,\n useSensor,\n useSensors,\n} from \"@dnd-kit/core\";\nimport {\n arrayMove,\n SortableContext,\n sortableKeyboardCoordinates,\n verticalListSortingStrategy,\n} from \"@dnd-kit/sortable\";\nimport clsx from \"clsx\";\nimport type React from \"react\";\nimport {\n forwardRef,\n useContext,\n useEffect,\n useImperativeHandle,\n useRef,\n useState,\n} from \"react\";\nimport { useResizeDetector } from \"react-resize-detector\";\n\nimport type { FormLabelProps } from \"../../form/types\";\nimport { VisuallyHidden } from \"../../shared/accessibility\";\nimport { FileUploadContext } from \"../context\";\nimport { MouseSensor } from \"../custom-sensors\";\nimport { FileItemEdit } from \"../file-item-edit\";\nimport { FileListItem } from \"../file-list-item\";\nimport { FileUploadHelper } from \"../helper\";\nimport type { FileItemProps } from \"../types\";\nimport * as styles from \"./file-list.styles\";\n\n// =============================================================================\n// INTERFACES\n// =============================================================================\ntype RenderMode = \"edit\" | \"display\" | \"error\";\n\ntype FileItemRenderModes = Record<string, RenderMode>;\ntype FileEditedDescriptions = Record<string, string>;\n\ntype RenderItem = FileItemProps | FileItemProps[];\n\ninterface Props {\n fileItems: FileItemProps[] | undefined;\n editableFileItems: boolean;\n fileDescriptionMaxLength?: number | undefined;\n descriptionRequired?: boolean | undefined;\n descriptionLabel?: FormLabelProps | undefined;\n sortable?: boolean | undefined;\n disabled?: boolean | undefined;\n readOnly?: boolean | undefined;\n onItemUpdate: (item: FileItemProps) => void;\n onItemDelete: (item: FileItemProps) => void;\n onSort?: ((reorderedFileItems: FileItemProps[]) => void) | undefined;\n}\n\ntype AnnouncementProgress = Record<\n string,\n {\n progress: number;\n timestamp: number;\n status: \"in-progress\" | \"complete\" | \"error\";\n }\n>;\n\nexport interface FileListRef {\n focus: () => void;\n}\n\n// =============================================================================\n// COMPONENT\n// =============================================================================\n\nfunction Component(\n {\n fileItems = [],\n editableFileItems,\n fileDescriptionMaxLength,\n descriptionRequired,\n descriptionLabel,\n sortable,\n disabled,\n readOnly,\n onItemUpdate,\n onItemDelete,\n onSort,\n }: Props,\n ref: React.Ref<FileListRef>\n) {\n // =========================================================================\n // CONST, STATE, REFS\n // =========================================================================\n const [renderModes, setRenderModes] = useState<FileItemRenderModes>({});\n const { setActiveId } = useContext(FileUploadContext);\n\n // Progress announcement state (for aria-live) - announces start and completion only\n const [progressAnnouncement, setProgressAnnouncement] = useState(\"\");\n const lastAnnouncedRef = useRef<AnnouncementProgress>({});\n\n useImperativeHandle(ref, () => ({\n focus: () => {\n wrapperRef.current?.focus();\n },\n }));\n const { width: wrapperWidth = 0, ref: wrapperRef } = useResizeDetector();\n\n // Keep track of edited description without re-rendering\n const descriptionsValueRef = useRef<FileEditedDescriptions>({});\n\n /**\n * As the default drag sensors interfere with click events\n * on the file items, we'll need to configure the sensor to\n * only activate the drag if the mouse moves a certain distance\n */\n const sensors = useSensors(\n useSensor(MouseSensor, {\n activationConstraint: {\n distance: 8, // mouse drag of 8px then activate the drag event\n },\n }),\n useSensor(TouchSensor, {\n activationConstraint: {\n delay: 150,\n tolerance: 5,\n },\n }),\n useSensor(KeyboardSensor, {\n coordinateGetter: sortableKeyboardCoordinates,\n })\n );\n\n // =========================================================================\n // REF METHODS\n // =========================================================================\n const removeDescription = (itemId: string) => {\n delete descriptionsValueRef.current[itemId];\n };\n\n const shallowCompareRenderModes = (\n prev: FileItemRenderModes,\n next: FileItemRenderModes\n ) => {\n const prevKeys = Object.keys(prev);\n const nextKeys = Object.keys(next);\n if (prevKeys.length !== nextKeys.length) {\n return false;\n }\n for (const k of nextKeys) {\n if (prev[k] !== next[k]) {\n return false;\n }\n }\n return true;\n };\n\n // =========================================================================\n // EFFECTS\n // =========================================================================\n useEffect(() => {\n const nextModes = getItemsRenderMode(fileItems);\n const prevModes = renderModes;\n // We perform shallowCompare to avoid infinite re-render loop\n if (shallowCompareRenderModes(prevModes, nextModes)) {\n return;\n }\n setRenderModes(nextModes);\n }, [fileItems, editableFileItems, readOnly]);\n\n // Progress announcements only at start and completion\n useEffect(() => {\n if (!fileItems || fileItems.length === 0) {\n setProgressAnnouncement(\"\");\n return;\n }\n const now = Date.now();\n const messages: string[] = [];\n\n for (const item of fileItems) {\n const fileStatus = lastAnnouncedRef.current[item.id];\n\n if (item.errorMessage) {\n if (fileStatus?.status !== \"error\") {\n messages.push(\n typeof item.errorMessage === \"string\"\n ? `Error uploading ${item.name}: ${item.errorMessage}`\n : `Error uploading ${item.name}`\n );\n lastAnnouncedRef.current[item.id] = {\n progress: item.progress ?? 1,\n timestamp: now,\n status: \"error\",\n };\n }\n continue;\n }\n\n if (item.progress === undefined) {\n continue;\n }\n\n if (item.progress >= 1) {\n if (fileStatus?.status !== \"complete\") {\n messages.push(`${item.name} upload is complete`);\n lastAnnouncedRef.current[item.id] = {\n progress: 1,\n timestamp: now,\n status: \"complete\",\n };\n }\n continue;\n }\n\n // In progress - only announce start, not progress updates\n if (typeof item.progress === \"number\" && item.progress < 1) {\n // Only announce when starting upload (no previous status or status was not in-progress)\n const shouldAnnounce =\n !fileStatus || fileStatus.status !== \"in-progress\";\n\n if (shouldAnnounce) {\n messages.push(`Starting upload of ${item.name}`);\n lastAnnouncedRef.current[item.id] = {\n progress: item.progress,\n timestamp: now,\n status: \"in-progress\",\n };\n }\n }\n }\n\n if (messages.length > 0) {\n // Update aria-live region once with aggregated message\n setProgressAnnouncement(messages.join(\", \"));\n }\n }, [fileItems]);\n\n // =========================================================================\n // EVENT HANDLERS\n // =========================================================================\n const handleSaveEdit = (item: FileItemProps) => (description: string) => {\n updateRenderModes(item.id, \"display\");\n removeDescription(item.id);\n\n const updatedItem = { ...item, description };\n onItemUpdate(updatedItem);\n };\n\n const handleBlurEdit = (item: FileItemProps) => (value: string) => {\n descriptionsValueRef.current[item.id] = value;\n };\n\n const handleCancel = (item: FileItemProps) => () => {\n if (!item.description || item.description.length === 0) {\n // New addition\n onItemDelete(item);\n } else {\n updateRenderModes(item.id, \"display\");\n }\n removeDescription(item.id);\n };\n\n const handleInitiateEdit = (item: FileItemProps) => () => {\n updateRenderModes(item.id, \"edit\");\n };\n\n const handleDelete = (item: FileItemProps) => () => {\n onItemDelete(item);\n if (wrapperRef.current) {\n wrapperRef.current.focus();\n }\n };\n\n const handleDragEnd = (event: DragEndEvent) => {\n if (onSort && fileItems) {\n const { active, over } = event;\n\n if (over && active.id !== over.id) {\n const oldIndex = fileItems.findIndex(\n (item) => item.id === active.id\n );\n const newIndex = fileItems.findIndex(\n (item) => item.id === over.id\n );\n\n const updatedFileItems = arrayMove(\n fileItems,\n oldIndex,\n newIndex\n );\n\n onSort(updatedFileItems);\n }\n }\n\n setActiveId(undefined);\n };\n\n const handleDragStart = (event: DragStartEvent) => {\n const { active } = event;\n setActiveId(active.id as string);\n };\n\n // =========================================================================\n // HELPER FUNCTIONS\n // =========================================================================\n const checkEditable = (item: FileItemProps) => {\n return (\n editableFileItems &&\n FileUploadHelper.isSupportedImageType(item.type)\n );\n };\n\n const shouldRenderEditMode = (item: FileItemProps) => {\n return (\n !item.errorMessage &&\n !readOnly &&\n !(typeof item.progress === \"number\" && item.progress < 1) &&\n checkEditable(item) &&\n !item.description\n );\n };\n\n const getItemsRenderMode = (\n fileItems: FileItemProps[] | undefined\n ): FileItemRenderModes => {\n if (!fileItems || fileItems.length === 0) return {};\n\n const newRenderModes: FileItemRenderModes = {};\n\n for (const item of fileItems) {\n if (item.errorMessage) {\n newRenderModes[item.id] = \"error\";\n } else if (!renderModes[item.id]) {\n newRenderModes[item.id] = shouldRenderEditMode(item)\n ? \"edit\"\n : \"display\";\n } else {\n newRenderModes[item.id] = renderModes[item.id];\n }\n }\n\n return newRenderModes;\n };\n\n const updateRenderModes = (itemId: string, mode: RenderMode) => {\n setRenderModes((prevRenderModes) => {\n return {\n ...prevRenderModes,\n [itemId]: mode,\n };\n });\n };\n\n /**\n * Due to a UI requirement, we will render the items\n * with edit modes as a group\n */\n const getArrangedItems = (\n fileItems: FileItemProps[] | undefined,\n renderModes: FileItemRenderModes\n ) => {\n if (!fileItems || fileItems.length === 0) return [];\n\n const arrangedItems: RenderItem[] = [];\n\n for (const fileItem of fileItems) {\n if (renderModes[fileItem.id] === \"edit\") {\n const previousElement = arrangedItems[arrangedItems.length - 1];\n if (Array.isArray(previousElement)) {\n previousElement.push(fileItem);\n } else {\n arrangedItems.push([fileItem]);\n }\n } else {\n arrangedItems.push(fileItem);\n }\n }\n\n return arrangedItems;\n };\n\n const areAllItemsInDisplayViews = () => {\n return Object.values(renderModes).every((mode) => mode === \"display\");\n };\n\n const shouldEnableSort = () => {\n return (\n fileItems &&\n fileItems.length > 1 &&\n sortable &&\n areAllItemsInDisplayViews()\n );\n };\n\n /**\n * If there are no files, return \"No files uploaded\".\n * If readOnly is true, return \"Read-only file list\".\n * If there are files, return a summary of the file statuses.\n * For example, \"File list. 2 completed files, 1 file in progress, 1 file with error\".\n *\n * @returns aria label\n */\n const getWrapperAriaLabel = () => {\n if (fileItems.length === 0) {\n return \"No files uploaded\";\n }\n const completedCount = fileItems.filter(\n (item) =>\n !item?.errorMessage &&\n (item.progress === 1 || item.progress === undefined)\n ).length;\n const inProgressCount = fileItems.filter(\n (item) => typeof item.progress === \"number\" && item.progress < 1\n ).length;\n const errorCount = fileItems.filter((item) => item.errorMessage).length;\n if (completedCount === 0 && inProgressCount === 0 && errorCount === 0) {\n return `File list`;\n }\n const completedText =\n completedCount > 0 ? `${completedCount} completed files` : \"\";\n const inProgressText =\n inProgressCount > 0 ? `${inProgressCount} file in progress` : \"\";\n const errorText =\n errorCount > 0\n ? `${errorCount} ${\n errorCount > 1 ? \"files\" : \"file\"\n } with error`\n : \"\";\n const parts = [completedText, inProgressText, errorText].filter(\n Boolean\n );\n const prefix = readOnly ? \"Read-only file list\" : \"File list\";\n return `${prefix}. ${parts.join(\", \")}`;\n };\n\n // =========================================================================\n // RENDER FUNCTIONS\n // =========================================================================\n const renderItemsInEditMode = (\n fileItems: FileItemProps[],\n keyToUse: number\n ) => {\n const itemsToRender = fileItems.map((item) => {\n const updatedFileItem = { ...item };\n if (descriptionsValueRef.current[item.id] !== undefined) {\n updatedFileItem.description =\n descriptionsValueRef.current[item.id];\n }\n\n return (\n <FileItemEdit\n key={item.id}\n fileItem={updatedFileItem}\n wrapperWidth={wrapperWidth}\n fileDescriptionMaxLength={fileDescriptionMaxLength}\n descriptionRequired={descriptionRequired}\n descriptionLabel={descriptionLabel}\n onSave={handleSaveEdit(item)}\n onCancel={handleCancel(item)}\n onBlur={handleBlurEdit(item)}\n />\n );\n });\n\n return (\n <li\n key={`editable-${keyToUse}`}\n className={styles.editableItemsContainer}\n >\n <ul>{itemsToRender}</ul>\n </li>\n );\n };\n\n const renderItems = () => {\n const arrangedItems = getArrangedItems(fileItems, renderModes);\n\n if (arrangedItems.length === 0) return null;\n\n return arrangedItems.map((item, index) => {\n if (Array.isArray(item)) {\n return renderItemsInEditMode(item, index);\n } else {\n return (\n <FileListItem\n key={item.id}\n fileItem={item}\n editable={checkEditable(item)}\n wrapperWidth={wrapperWidth}\n sortable={shouldEnableSort()}\n disabled={disabled}\n readOnly={readOnly}\n descriptionLabel={descriptionLabel}\n onDelete={handleDelete(item)}\n onEditClick={handleInitiateEdit(item)}\n />\n );\n }\n });\n };\n\n /**\n * Renders the progress status of each file upload.\n * In progress: 25% complete for uploading filename.pdf\n * Complete: filename.pdf upload is complete\n * Error: Error uploading filename.pdf: error message\n *\n * @returns A visually hidden element announcing the progress status.\n */\n const renderProgressStatus = () => (\n <VisuallyHidden aria-live=\"polite\" aria-atomic=\"true\">\n {progressAnnouncement}\n </VisuallyHidden>\n );\n\n const renderItemsWithWrapper = () => {\n return (\n <>\n {renderProgressStatus()}\n <ul\n tabIndex={-1}\n className={clsx(\n styles.listWrapper,\n readOnly && styles.listWrapperReadOnly\n )}\n ref={wrapperRef}\n aria-label={getWrapperAriaLabel()}\n >\n {renderItems()}\n </ul>\n </>\n );\n };\n\n if (disabled || readOnly || !shouldEnableSort()) {\n return renderItemsWithWrapper();\n } else {\n return (\n <DndContext\n sensors={sensors}\n onDragEnd={handleDragEnd}\n onDragStart={handleDragStart}\n >\n <SortableContext\n items={fileItems}\n strategy={verticalListSortingStrategy}\n >\n {renderItemsWithWrapper()}\n </SortableContext>\n </DndContext>\n );\n }\n}\n\nexport const FileList = forwardRef<FileListRef, Props>(Component);\n"],"names":["FileList","forwardRef","fileItems","editableFileItems","fileDescriptionMaxLength","descriptionRequired","descriptionLabel","sortable","disabled","readOnly","onItemUpdate","onItemDelete","onSort","ref","renderModes","setRenderModes","useState","setActiveId","useContext","FileUploadContext","progressAnnouncement","setProgressAnnouncement","lastAnnouncedRef","useRef","useImperativeHandle","focus","_a","wrapperRef","current","width","wrapperWidth","useResizeDetector","descriptionsValueRef","sensors","useSensors","useSensor","MouseSensor","activationConstraint","distance","TouchSensor","delay","tolerance","KeyboardSensor","coordinateGetter","sortableKeyboardCoordinates","removeDescription","itemId","useEffect","nextModes","getItemsRenderMode","prev","next","prevKeys","Object","keys","nextKeys","length","k","shallowCompareRenderModes","now","Date","messages","item","fileStatus","id","errorMessage","status","push","name","progress","timestamp","undefined","join","handleSaveEdit","description","updateRenderModes","updatedItem","assign","handleBlurEdit","value","handleCancel","handleInitiateEdit","handleDelete","handleDragEnd","event","active","over","oldIndex","findIndex","newIndex","updatedFileItems","arrayMove","handleDragStart","checkEditable","FileUploadHelper","isSupportedImageType","type","shouldRenderEditMode","newRenderModes","mode","prevRenderModes","shouldEnableSort","values","every","getWrapperAriaLabel","completedCount","filter","inProgressCount","errorCount","parts","Boolean","renderItems","arrangedItems","fileItem","previousElement","Array","isArray","getArrangedItems","map","index","keyToUse","itemsToRender","updatedFileItem","_jsx","FileItemEdit","onSave","onCancel","onBlur","className","styles.editableItemsContainer","children","renderItemsInEditMode","FileListItem","editable","onDelete","onEditClick","renderItemsWithWrapper","_jsxs","_Fragment","VisuallyHidden","tabIndex","clsx","styles.listWrapper","styles.listWrapperReadOnly","DndContext","onDragEnd","onDragStart","SortableContext","items","strategy","verticalListSortingStrategy"],"mappings":"+mBA6iBaA,EAAWC,EAAAA,YAhexB,UACIC,UACIA,EAAY,GAAEC,kBACdA,EAAiBC,yBACjBA,EAAwBC,oBACxBA,EAAmBC,iBACnBA,EAAgBC,SAChBA,EAAQC,SACRA,EAAQC,SACRA,EAAQC,aACRA,EAAYC,aACZA,EAAYC,OACZA,GAEJC,GAKA,MAAOC,EAAaC,GAAkBC,EAAAA,SAA8B,CAAA,IAC9DC,YAAEA,GAAgBC,EAAAA,WAAWC,sBAG5BC,EAAsBC,GAA2BL,EAAAA,SAAS,IAC3DM,EAAmBC,EAAAA,OAA6B,IAEtDC,EAAAA,oBAAoBX,GAAK,KAAA,CACrBY,MAAO,WACe,QAAlBC,EAAAC,EAAWC,eAAO,IAAAF,GAAAA,EAAED,OAAO,MAGnC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AAKE,GASZ,IAIV,OACI2D,EAAAA,IAAA,KAAA,CAEIK,UAAWC,EAAAA,uBAA6BC,SAExCP,MAAA,KAAA,CAAAO,SAAKT,KAHA,YAAYD,IAIhB,EAWMW,CAAsBrE,EAAMyD,GAG/BI,EAAAA,IAACS,EAAAA,aAAY,CAETnB,SAAUnD,EACVuE,SAAUxC,EAAc/B,GACxBhC,aAAcA,EACdvB,SAAU8F,IACV7F,SAAUA,EACVC,SAAUA,EACVH,iBAAkBA,EAClBgI,SAAUpD,EAAapB,GACvByE,YAAatD,EAAmBnB,IAT3BA,EAAKE,KAaxB,EAiBAwE,EAAyB,IAEvBC,OAAAC,EAAAA,SAAA,CAAAR,SAAA,CAPJP,MAACgB,EAAAA,eAAc,CAAA,YAAW,uBAAqB,OAAMT,SAChD9G,IAQGuG,EAAAA,UACIiB,UAAU,EACVZ,UAAWa,EAAAA,QACPC,EAAAA,YACArI,GAAYsI,EAAAA,qBAEhBlI,IAAKc,EAAU,aACH6E,IAAqB0B,SAEhCnB,SAMjB,OAAIvG,GAAYC,IAAa4F,IAClBmC,IAGHb,EAAAA,IAACqB,aAAU,CACP/G,QAASA,EACTgH,UAAW9D,EACX+D,YAAatD,EAAesC,SAE5BP,EAAAA,IAACwB,kBAAe,CACZC,MAAOlJ,EACPmJ,SAAUC,EAAAA,4BAA2BpB,SAEpCM,OAKrB"}
@@ -0,0 +1,2 @@
1
+ "use strict";require("./file-list.styles_1w7so98.css");exports.editableItemsContainer="e1y5148f",exports.listWrapper="l14goqmf",exports.listWrapperReadOnly="l1spcgo1";
2
+ //# sourceMappingURL=file-list.styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-list.styles.js","sources":["../../../../src/file-upload/file-list/file-list.styles.ts"],"sourcesContent":["import { css } from \"@linaria/core\";\n\nimport { Spacing } from \"../../theme\";\n\nexport const listWrapper = css`\n list-style-type: none;\n margin-bottom: ${Spacing[\"spacing-32\"]};\n`;\n\nexport const listWrapperReadOnly = css`\n margin-bottom: 0;\n`;\n\nexport const editableItemsContainer = css`\n &:not(:last-child) {\n margin-bottom: ${Spacing[\"spacing-16\"]};\n }\n\n ul {\n list-style-type: none;\n }\n`;\n"],"names":[],"mappings":"2HAamC,+BATX,uCAKQ"}
@@ -0,0 +1,3 @@
1
+ @layer fds{.l14goqmf{list-style-type:none;margin-bottom:var(--fds-spacing-32);}
2
+ .l1spcgo1{margin-bottom:0;}
3
+ .e1y5148f:not(:last-child){margin-bottom:var(--fds-spacing-16);}.e1y5148f ul{list-style-type:none;}}
@@ -1,2 +1,2 @@
1
- "use strict";require("./file-list-item-thumbnail.styles_1vrh1ve.css");exports.container="c1hu6y7h",exports.replaceButton="r5e5ep6",exports.thumbnail="t18h6q7y",exports.thumbnailPdf="t1w2z01d";
1
+ "use strict";require("./file-list-item-thumbnail.styles_1y4si19.css");exports.container="c1hu6y7h",exports.replaceButton="r5e5ep6",exports.thumbnail="t18h6q7y",exports.thumbnailPdf="t1w2z01d";
2
2
  //# sourceMappingURL=file-list-item-thumbnail.styles.js.map
@@ -0,0 +1,4 @@
1
+ @layer fds{.c1hu6y7h{width:auto;margin-right:var(--fds-spacing-32);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-box-pack:center;-ms-flex-pack:center;-webkit-justify-content:center;justify-content:center;}
2
+ .t18h6q7y{width:96px;height:96px;aspect-ratio:1;border-radius:var(--fds-radius-sm);border:var(--fds-border-width-010) var(--fds-border-style-solid) var(--fds-colour-border);object-fit:cover;}:where(body.fds-breakpoint-md-max) .t18h6q7y{width:64px;height:64px;}
3
+ .t1w2z01d{border:none;}
4
+ .r5e5ep6{width:100%;height:1.625rem;margin-top:var(--fds-spacing-8);border:none;background:transparent;cursor:pointer;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);color:var(--fds-colour-text-primary);}.r5e5ep6:hover{color:var(--fds-colour-text-hover);}}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),i=require("../../external/@dnd-kit/sortable/dist/sortable.esm.js"),t=require("../../external/@dnd-kit/utilities/dist/utilities.esm.js"),a=require("@lifesg/react-icons/bin"),s=require("@lifesg/react-icons/drag-handle"),r=require("@lifesg/react-icons/exclamation-circle-fill"),l=require("@lifesg/react-icons/pencil"),n=require("react"),d=require("../../button/button.js"),o=require("../../shared/progress-bar/progress-bar.js"),c=require("../../typography/index.js");require("../../util/calendar-helper.js"),require("../../external/dayjs/dayjs.min.js"),require("../../util/simple-id-generator.js");var m=require("../../util/string-helper.js");require("@react-aria/live-announcer");var u=require("../context.js"),h=require("../helper.js"),x=require("./file-list-item.styles.js"),p=require("./file-list-item-thumbnail.js");const b=n.memo((({fileItem:b,editable:j,sortable:g,wrapperWidth:y,disabled:f,readOnly:N,onDelete:v,onEditClick:S})=>{const{id:T,name:q,size:B,description:I,progress:D=1,errorMessage:F,thumbnailImageDataUrl:C,truncateText:M=!0}=b,[z,$]=n.useState(),{activeId:k}=n.useContext(u.FileUploadContext),{attributes:E,listeners:w,setNodeRef:H,transform:O,transition:P}=i.useSortable({id:T}),U=n.useRef(null),L={transform:t.CSS.Translate.toString(O),transition:P},R=Object.assign(Object.assign({style:L},E),w),K=D<1,_=h.FileUploadHelper.formatFileSizeDisplay(B),W=k?k===T?"self":"others":"none",Y=n.useCallback((e=>{if(!M)return e;const i=U&&U.current?U.current.getBoundingClientRect().width:0;return m.StringHelper.truncateOneLine(e,i,i/2,i/2/8,16)}),[M]);n.useEffect((()=>{$(Y(q))}),[y,Y,q]);const A=()=>{v()},G=()=>{S&&S()},J=e=>{g&&e.stopPropagation()},Q=()=>f||!!k,V=()=>!!g&&!N,X=()=>e.jsxs(e.Fragment,{children:[e.jsx(c.Typography.BodyMD,{weight:I?"semibold":"regular",children:z}),I&&e.jsx(c.Typography.BodyMD,{className:x.itemDescriptionText,children:I})]});return e.jsxs("li",Object.assign({id:T,ref:H,className:x.item,"data-item-state":Q()&&"none"===W?"disabled":V()&&"self"===W?"sortable-active":V()?"sortable":void 0,"data-testid":`${T}-item`},V()?R:{},{children:[V()&&e.jsx(s.DragHandleIcon,{"data-testid":`${T}-drag-handle`,className:x.dragHandleIcon,"data-drag-handle-state":"self"===W?"active":Q()?"disabled":void 0}),e.jsxs("div",{className:x.box,"data-box-state":"self"===W?"focused":Q()?"disabled":F?"error":void 0,"data-stack-mobile":!F&&(K||j),children:[(()=>{let i;const t=!!C||b.type===h.FileUploadHelper.PDF_MIME_TYPE;return i=F?e.jsxs(e.Fragment,{children:[e.jsxs("div",{ref:U,className:x.nameSection,children:[X(),F&&e.jsxs(c.Typography.BodySM,{className:x.desktopErrorMessage,weight:"semibold",children:[e.jsx(r.ExclamationCircleFillIcon,{className:x.errorIcon,"aria-hidden":!0}),F]})]}),e.jsx("div",{className:x.fileSizeSection,"data-mobile-visibility":K?"hidden":"expand",children:e.jsx(c.Typography.BodyMD,{className:x.fileSizeText,children:_})}),F&&e.jsxs(c.Typography.BodySM,{className:x.mobileErrorMessage,weight:"semibold",children:[e.jsx(r.ExclamationCircleFillIcon,{className:x.errorIcon,"aria-hidden":!0}),F]})]}):t?(i=>e.jsxs(e.Fragment,{children:[e.jsx(p.FileListItemThumbnail,{thumbnailImageDataUrl:i,fileType:b.type,"data-testid":`${T}-thumbnail`}),e.jsxs("div",{className:x.extendedNameSection,children:[e.jsx("div",{ref:U,className:x.nameSection,children:X()}),e.jsx("div",{className:x.fileSizeSection,"data-mobile-visibility":K?"hidden":"expand",children:e.jsx(c.Typography.BodyMD,{className:x.fileSizeText,children:_})})]})]}))(C||""):e.jsxs(e.Fragment,{children:[e.jsx("div",{ref:U,className:x.nameSection,children:X()}),e.jsx("div",{className:x.fileSizeSection,"data-mobile-visibility":K?"hidden":"expand",children:e.jsx(c.Typography.BodyMD,{className:x.fileSizeText,children:_})})]}),e.jsx("div",{className:x.contentSection,"data-has-thumbnail":t,children:i})})(),!N&&(()=>{let i;return i=F?e.jsx(d.Button,{"data-testid":`${T}-error-delete-button`,"data-no-dnd":"true",type:"button",styleType:"light",sizeType:"small","aria-label":`delete ${q}, error: ${F}`,onClick:A,className:x.iconButton,icon:e.jsx(a.BinIcon,{"aria-hidden":!0})}):K?e.jsx(o.ProgressBar,{progress:D,"data-testid":`${T}-progress-bar`}):e.jsxs(e.Fragment,{children:[j&&e.jsx(d.Button,{"data-testid":`${T}-edit-button`,"data-no-dnd":"true",type:"button",styleType:"light",sizeType:"small","aria-label":`edit ${q}`,disabled:Q(),onClick:G,onKeyDown:J,icon:e.jsx(l.PencilIcon,{"aria-hidden":!0}),className:x.iconButton},"edit"),e.jsx(d.Button,{"data-testid":`${T}-delete-button`,"data-no-dnd":"true",type:"button",styleType:"light",sizeType:"small","aria-label":`delete ${q}`,disabled:Q(),onClick:A,onKeyDown:J,icon:e.jsx(a.BinIcon,{"aria-hidden":!0}),className:x.iconButton},"delete")]}),e.jsx("div",{className:x.actionContainer,"data-mobile-layout":!F&&K?"loading":!F&&j?"editable":void 0,children:i})})()]})]}))}));exports.FileListItem=b;
1
+ "use strict";var e=require("react/jsx-runtime"),i=require("../../external/@dnd-kit/sortable/dist/sortable.esm.js"),t=require("../../external/@dnd-kit/utilities/dist/utilities.esm.js"),a=require("@lifesg/react-icons/bin"),s=require("@lifesg/react-icons/drag-handle"),r=require("@lifesg/react-icons/exclamation-circle-fill"),n=require("@lifesg/react-icons/pencil"),l=require("react"),d=require("../../button/button.js"),o=require("../../shared/progress-bar/progress-bar.js"),c=require("../../typography/index.js");require("../../util/calendar-helper.js"),require("../../external/dayjs/dayjs.min.js"),require("../../util/simple-id-generator.js");var u=require("../../util/string-helper.js");require("@react-aria/live-announcer");var m=require("../context.js"),p=require("../helper.js"),h=require("./file-list-item.styles.js"),y=require("./file-list-item-thumbnail.js");const x=l.memo((({fileItem:x,editable:b,sortable:j,wrapperWidth:g,disabled:T,readOnly:f,descriptionLabel:N,onDelete:v,onEditClick:B})=>{const{id:D,name:q,size:F,description:I,progress:M=1,errorMessage:S,thumbnailImageDataUrl:C,truncateText:$=!0}=x,[k,z]=l.useState(),{activeId:w}=l.useContext(m.FileUploadContext),{attributes:E,listeners:P,setNodeRef:H,transform:L,transition:U}=i.useSortable({id:D}),O=l.useRef(null),K={transform:t.CSS.Translate.toString(L),transition:U},_=Object.assign(Object.assign({style:K},E),P),R=M<1,Y=p.FileUploadHelper.formatFileSizeDisplay(F),A=!!I&&!!b,W=w?w===D?"self":"others":"none",G=l.useCallback((e=>{if(!$)return e;const i=O&&O.current?O.current.getBoundingClientRect().width:0;return u.StringHelper.truncateOneLine(e,i,i/2,i/2/8,16)}),[$]);l.useEffect((()=>{z(G(q))}),[g,G,q]);const J=()=>{v()},Q=()=>{B&&B()},V=e=>{j&&e.stopPropagation()},X=()=>T||!!w,Z=()=>!!j&&!f,ee=()=>{var i;return e.jsxs(e.Fragment,{children:[e.jsx(c.Typography.BodyMD,{weight:I?"semibold":"regular",children:k}),I&&e.jsxs(e.Fragment,{children:[e.jsx(c.Typography.BodyMD,{className:h.itemDescriptionLabel,children:null!==(i=null==N?void 0:N.children)&&void 0!==i?i:"Photo description"}),e.jsx(c.Typography.BodyMD,{className:h.itemDescriptionText,children:I})]})]})};return e.jsxs("li",Object.assign({id:D,ref:H,className:h.item,"data-item-state":X()&&"none"===W?"disabled":Z()&&"self"===W?"sortable-active":Z()?"sortable":void 0,"data-testid":`${D}-item`},Z()?_:{},{children:[Z()&&e.jsx(s.DragHandleIcon,{"data-testid":`${D}-drag-handle`,className:h.dragHandleIcon,"data-drag-handle-state":"self"===W?"active":X()?"disabled":void 0}),e.jsxs("div",{className:h.box,"data-box-state":"self"===W?"focused":X()?"disabled":S?"error":void 0,"data-stack-mobile":!S&&(R||b),children:[(()=>{const i=!!C||x.type===p.FileUploadHelper.PDF_MIME_TYPE,t=S?e.jsxs(e.Fragment,{children:[e.jsxs("div",{ref:O,className:h.nameSection,children:[ee(),S&&e.jsxs(c.Typography.BodySM,{className:h.desktopErrorMessage,weight:"semibold",children:[e.jsx(r.ExclamationCircleFillIcon,{className:h.errorIcon,"aria-hidden":!0}),S]})]}),e.jsx("div",{className:h.fileSizeSection,"data-mobile-visibility":R?"hidden":"expand",children:e.jsx(c.Typography.BodyMD,{className:h.fileSizeText,children:Y})}),S&&e.jsxs(c.Typography.BodySM,{className:h.mobileErrorMessage,weight:"semibold",children:[e.jsx(r.ExclamationCircleFillIcon,{className:h.errorIcon,"aria-hidden":!0}),S]})]}):(i=>{const t=i||x.type===p.FileUploadHelper.PDF_MIME_TYPE?e.jsx(y.FileListItemThumbnail,{thumbnailImageDataUrl:i||"",fileType:x.type,"data-testid":`${D}-thumbnail`}):null;return A?e.jsxs(e.Fragment,{children:[t,e.jsxs("div",{ref:O,className:h.extendedNameSection,children:[e.jsx(c.Typography.BodyMD,{weight:"semibold",children:k}),e.jsx(c.Typography.BodyMD,{className:h.itemDescriptionLabel,children:null!==(s=null==N?void 0:N.children)&&void 0!==s?s:"Photo description"}),e.jsx(c.Typography.BodyMD,{className:h.itemDescriptionText,children:I}),e.jsx(c.Typography.BodyMD,{className:h.descriptionFileSizeText,children:Y}),!f&&A&&e.jsxs("div",{className:h.inlineActionContainer,children:[e.jsx(d.Button,{"data-testid":`${D}-edit-button`,"data-no-dnd":"true",type:"button",styleType:"light",sizeType:"small","aria-label":`edit ${q}`,disabled:X(),onClick:Q,onKeyDown:V,icon:e.jsx(n.PencilIcon,{"aria-hidden":!0}),className:h.iconButton},"edit"),e.jsx(d.Button,{"data-testid":`${D}-delete-button`,"data-no-dnd":"true",type:"button",styleType:"light",sizeType:"small","aria-label":`delete ${q}`,disabled:X(),onClick:J,onKeyDown:V,icon:e.jsx(a.BinIcon,{"aria-hidden":!0}),className:h.iconButton},"delete")]})]})]}):e.jsxs(e.Fragment,{children:[t,e.jsxs("div",{ref:O,className:h.nameSection,children:[ee(),!R&&e.jsx(c.Typography.BodyMD,{className:h.descriptionFileSizeText,children:Y})]})]});var s})(C);return e.jsx("div",{className:h.contentSection,"data-has-thumbnail":i,children:t})})(),!f&&!A&&(()=>{let i;return i=S?e.jsx(d.Button,{"data-testid":`${D}-error-delete-button`,"data-no-dnd":"true",type:"button",styleType:"light",sizeType:"small","aria-label":`delete ${q}, error: ${S}`,onClick:J,className:h.iconButton,icon:e.jsx(a.BinIcon,{"aria-hidden":!0})}):R?e.jsx(o.ProgressBar,{progress:M,"data-testid":`${D}-progress-bar`}):e.jsxs(e.Fragment,{children:[b&&e.jsx(d.Button,{"data-testid":`${D}-edit-button`,"data-no-dnd":"true",type:"button",styleType:"light",sizeType:"small","aria-label":`edit ${q}`,disabled:X(),onClick:Q,onKeyDown:V,icon:e.jsx(n.PencilIcon,{"aria-hidden":!0}),className:h.iconButton},"edit"),e.jsx(d.Button,{"data-testid":`${D}-delete-button`,"data-no-dnd":"true",type:"button",styleType:"light",sizeType:"small","aria-label":`delete ${q}`,disabled:X(),onClick:J,onKeyDown:V,icon:e.jsx(a.BinIcon,{"aria-hidden":!0}),className:h.iconButton},"delete")]}),e.jsx("div",{className:h.actionContainer,"data-mobile-layout":!S&&R?"loading":!S&&b?"editable":void 0,children:i})})()]})]}))}));exports.FileListItem=x;
2
2
  //# sourceMappingURL=file-list-item.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-list-item.js","sources":["../../../../src/file-upload/file-list-item/file-list-item.tsx"],"sourcesContent":["import { useSortable } from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport { BinIcon } from \"@lifesg/react-icons/bin\";\nimport { DragHandleIcon as DSDragHandleIcon } from \"@lifesg/react-icons/drag-handle\";\nimport { ExclamationCircleFillIcon } from \"@lifesg/react-icons/exclamation-circle-fill\";\nimport { PencilIcon } from \"@lifesg/react-icons/pencil\";\nimport {\n memo,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport { Button } from \"../../button\";\nimport { ProgressBar } from \"../../shared/progress-bar\";\nimport { Typography } from \"../../typography\";\nimport { StringHelper } from \"../../util\";\nimport { FileUploadContext } from \"../context\";\nimport { FileUploadHelper } from \"../helper\";\nimport type { ItemFocusType } from \"./file-list-item.styles\";\nimport * as styles from \"./file-list-item.styles\";\nimport { FileListItemThumbnail } from \"./file-list-item-thumbnail\";\nimport type { FileListItemProps } from \"./types\";\n\ninterface Props extends FileListItemProps {\n readOnly?: boolean | undefined;\n}\n\nconst Component = ({\n fileItem,\n editable,\n sortable,\n wrapperWidth,\n disabled,\n readOnly,\n onDelete,\n onEditClick,\n}: Props) => {\n // =========================================================================\n // CONST, STATE, REFS\n // =========================================================================\n const {\n id,\n name,\n size,\n description,\n progress = 1,\n errorMessage,\n thumbnailImageDataUrl,\n truncateText = true,\n } = fileItem;\n const [formattedName, setFormattedName] = useState<string>();\n const { activeId } = useContext(FileUploadContext);\n\n // Sortable mechanism\n const { attributes, listeners, setNodeRef, transform, transition } =\n useSortable({ id });\n const detailSectionRef = useRef<HTMLDivElement>(null);\n const style = {\n transform: CSS.Translate.toString(transform),\n transition,\n };\n\n const sortableProps = {\n style,\n ...attributes,\n ...listeners,\n };\n\n // Local variables\n const isLoading = progress < 1;\n const fileSize = FileUploadHelper.formatFileSizeDisplay(size);\n const focusType: ItemFocusType = activeId\n ? activeId === id\n ? \"self\"\n : \"others\"\n : \"none\";\n\n // =========================================================================\n // HELPER FUNCTIONS\n // =========================================================================\n const getTruncatedText = useCallback(\n (value: string) => {\n if (!truncateText) return value;\n\n const widthOfElement =\n detailSectionRef && detailSectionRef.current\n ? detailSectionRef.current.getBoundingClientRect().width\n : 0;\n\n return StringHelper.truncateOneLine(\n value,\n widthOfElement,\n widthOfElement / 2,\n widthOfElement / 2 / 8, // Arbitrary\n 16 // Font size\n );\n },\n [truncateText]\n );\n\n // =========================================================================\n // EFFECTS\n // =========================================================================\n useEffect(() => {\n setFormattedName(getTruncatedText(name));\n }, [wrapperWidth, getTruncatedText, name]);\n\n // =========================================================================\n // EVENT HANDLERS\n // =========================================================================\n const handleDelete = () => {\n onDelete();\n };\n\n const handleEdit = () => {\n if (onEditClick) {\n onEditClick();\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n /**\n * Circumvent issue of keydown action activating the sort mechanism\n * rather than the actual action\n */\n if (sortable) {\n event.stopPropagation();\n }\n };\n\n const shouldDisable = () => disabled || !!activeId;\n\n const shouldEnableSort = () => !!sortable && !readOnly;\n\n const getItemState = () => {\n if (shouldDisable() && focusType === \"none\") {\n return \"disabled\";\n }\n\n if (shouldEnableSort() && focusType === \"self\") {\n return \"sortable-active\";\n }\n\n if (shouldEnableSort()) {\n return \"sortable\";\n }\n\n return undefined;\n };\n\n const getDragHandleState = () => {\n if (focusType === \"self\") {\n return \"active\";\n }\n\n if (shouldDisable()) {\n return \"disabled\";\n }\n\n return undefined;\n };\n\n const getBoxState = () => {\n if (focusType === \"self\") {\n return \"focused\";\n }\n\n if (shouldDisable()) {\n return \"disabled\";\n }\n\n if (errorMessage) {\n return \"error\";\n }\n\n return undefined;\n };\n\n const getActionContainerLayout = () => {\n if (!errorMessage && isLoading) {\n return \"loading\";\n }\n\n if (!errorMessage && editable) {\n return \"editable\";\n }\n\n return undefined;\n };\n\n // =========================================================================\n // RENDER FUNCTIONS\n // =========================================================================\n const renderNameDescription = () => (\n <>\n <Typography.BodyMD weight={description ? \"semibold\" : \"regular\"}>\n {formattedName}\n </Typography.BodyMD>\n {description && (\n <Typography.BodyMD className={styles.itemDescriptionText}>\n {description}\n </Typography.BodyMD>\n )}\n </>\n );\n\n const renderErrorState = () => (\n <>\n <div ref={detailSectionRef} className={styles.nameSection}>\n {renderNameDescription()}\n {errorMessage && (\n <Typography.BodySM\n className={styles.desktopErrorMessage}\n weight=\"semibold\"\n >\n <ExclamationCircleFillIcon\n className={styles.errorIcon}\n aria-hidden\n />\n {errorMessage}\n </Typography.BodySM>\n )}\n </div>\n <div\n className={styles.fileSizeSection}\n data-mobile-visibility={isLoading ? \"hidden\" : \"expand\"}\n >\n <Typography.BodyMD className={styles.fileSizeText}>\n {fileSize}\n </Typography.BodyMD>\n </div>\n {errorMessage && (\n <Typography.BodySM\n className={styles.mobileErrorMessage}\n weight=\"semibold\"\n >\n <ExclamationCircleFillIcon\n className={styles.errorIcon}\n aria-hidden\n />\n {errorMessage}\n </Typography.BodySM>\n )}\n </>\n );\n\n const renderWithThumbnail = (thumbnailImageDataUrl: string) => (\n <>\n <FileListItemThumbnail\n thumbnailImageDataUrl={thumbnailImageDataUrl}\n fileType={fileItem.type}\n data-testid={`${id}-thumbnail`}\n />\n <div className={styles.extendedNameSection}>\n <div ref={detailSectionRef} className={styles.nameSection}>\n {renderNameDescription()}\n </div>\n <div\n className={styles.fileSizeSection}\n data-mobile-visibility={isLoading ? \"hidden\" : \"expand\"}\n >\n <Typography.BodyMD className={styles.fileSizeText}>\n {fileSize}\n </Typography.BodyMD>\n </div>\n </div>\n </>\n );\n\n const renderDefault = () => (\n <>\n <div ref={detailSectionRef} className={styles.nameSection}>\n {renderNameDescription()}\n </div>\n <div\n className={styles.fileSizeSection}\n data-mobile-visibility={isLoading ? \"hidden\" : \"expand\"}\n >\n <Typography.BodyMD className={styles.fileSizeText}>\n {fileSize}\n </Typography.BodyMD>\n </div>\n </>\n );\n\n const renderContents = () => {\n let content: JSX.Element;\n const shouldShowThumbnail =\n !!thumbnailImageDataUrl ||\n fileItem.type === FileUploadHelper.PDF_MIME_TYPE;\n\n if (errorMessage) {\n content = renderErrorState();\n } else if (shouldShowThumbnail) {\n content = renderWithThumbnail(thumbnailImageDataUrl || \"\");\n } else {\n content = renderDefault();\n }\n\n return (\n <div\n className={styles.contentSection}\n data-has-thumbnail={shouldShowThumbnail}\n >\n {content}\n </div>\n );\n };\n\n const renderActions = () => {\n let content: JSX.Element;\n\n if (errorMessage) {\n content = (\n <Button\n data-testid={`${id}-error-delete-button`}\n data-no-dnd=\"true\"\n type=\"button\"\n styleType=\"light\"\n sizeType=\"small\"\n aria-label={`delete ${name}, error: ${errorMessage}`}\n onClick={handleDelete}\n className={styles.iconButton}\n icon={<BinIcon aria-hidden />}\n />\n );\n } else if (isLoading) {\n content = (\n <ProgressBar\n progress={progress}\n data-testid={`${id}-progress-bar`}\n />\n );\n } else {\n content = (\n <>\n {editable && (\n <Button\n key=\"edit\"\n data-testid={`${id}-edit-button`}\n data-no-dnd=\"true\"\n type=\"button\"\n styleType=\"light\"\n sizeType=\"small\"\n aria-label={`edit ${name}`}\n disabled={shouldDisable()}\n onClick={handleEdit}\n onKeyDown={handleKeyDown}\n icon={<PencilIcon aria-hidden />}\n className={styles.iconButton}\n />\n )}\n <Button\n key=\"delete\"\n data-testid={`${id}-delete-button`}\n data-no-dnd=\"true\"\n type=\"button\"\n styleType=\"light\"\n sizeType=\"small\"\n aria-label={`delete ${name}`}\n disabled={shouldDisable()}\n onClick={handleDelete}\n onKeyDown={handleKeyDown}\n icon={<BinIcon aria-hidden />}\n className={styles.iconButton}\n />\n </>\n );\n }\n\n return (\n <div\n className={styles.actionContainer}\n data-mobile-layout={getActionContainerLayout()}\n >\n {content}\n </div>\n );\n };\n\n return (\n <li\n id={id}\n ref={setNodeRef}\n className={styles.item}\n data-item-state={getItemState()}\n data-testid={`${id}-item`}\n {...(shouldEnableSort() ? sortableProps : {})}\n >\n {shouldEnableSort() && (\n <DSDragHandleIcon\n data-testid={`${id}-drag-handle`}\n className={styles.dragHandleIcon}\n data-drag-handle-state={getDragHandleState()}\n />\n )}\n <div\n className={styles.box}\n data-box-state={getBoxState()}\n data-stack-mobile={!errorMessage && (isLoading || editable)}\n >\n {renderContents()}\n {!readOnly && renderActions()}\n </div>\n </li>\n );\n};\n\nexport const FileListItem = memo(Component);\n"],"names":["FileListItem","memo","fileItem","editable","sortable","wrapperWidth","disabled","readOnly","onDelete","onEditClick","id","name","size","description","progress","errorMessage","thumbnailImageDataUrl","truncateText","formattedName","setFormattedName","useState","activeId","useContext","FileUploadContext","attributes","listeners","setNodeRef","transform","transition","useSortable","detailSectionRef","useRef","style","CSS","Translate","toString","sortableProps","isLoading","fileSize","FileUploadHelper","formatFileSizeDisplay","focusType","getTruncatedText","useCallback","value","widthOfElement","current","getBoundingClientRect","width","StringHelper","truncateOneLine","useEffect","handleDelete","handleEdit","handleKeyDown","event","stopPropagation","shouldDisable","shouldEnableSort","renderNameDescription","_jsxs","_Fragment","children","_jsx","Typography","BodyMD","weight","className","styles.itemDescriptionText","Object","assign","ref","styles.item","DSDragHandleIcon","styles.dragHandleIcon","styles.box","content","shouldShowThumbnail","type","PDF_MIME_TYPE","styles.nameSection","BodySM","styles.desktopErrorMessage","ExclamationCircleFillIcon","styles.errorIcon","styles.fileSizeSection","styles.fileSizeText","styles.mobileErrorMessage","FileListItemThumbnail","fileType","styles.extendedNameSection","renderWithThumbnail","styles.contentSection","renderContents","Button","styleType","sizeType","onClick","styles.iconButton","icon","BinIcon","ProgressBar","onKeyDown","PencilIcon","styles.actionContainer","renderActions"],"mappings":"k2BA8BA,MA6XaA,EAAeC,EAAAA,MA7XV,EACdC,WACAC,WACAC,WACAC,eACAC,WACAC,WACAC,WACAC,kBAKA,MAAMC,GACFA,EAAEC,KACFA,EAAIC,KACJA,EAAIC,YACJA,EAAWC,SACXA,EAAW,EAACC,aACZA,EAAYC,sBACZA,EAAqBC,aACrBA,GAAe,GACff,GACGgB,EAAeC,GAAoBC,cACpCC,SAAEA,GAAaC,EAAAA,WAAWC,sBAG1BC,WAAEA,EAAUC,UAAEA,EAASC,WAAEA,EAAUC,UAAEA,EAASC,WAAEA,GAClDC,EAAAA,YAAY,CAAEnB,OACZoB,EAAmBC,EAAAA,OAAuB,MAC1CC,EAAQ,CACVL,UAAWM,EAAAA,IAAIC,UAAUC,SAASR,GAClCC,cAGEQ,+BACFJ,SACGR,GACAC,GAIDY,EAAYvB,EAAW,EACvBwB,EAAWC,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6C,KAAMpC,EAAAA,IAACqC,EAAAA,QAAO,CAAA,eAAA,IACdjC,UAAW+B,EAAAA,YAXP,aAkBhBnC,EAAAA,IAAA,MAAA,CACII,UAAWqC,EAAAA,gBAAsB,sBAjMpCzF,GAAgBsB,EACV,WAGNtB,GAAgBZ,EACV,gBADX,EA8LsD2D,SAE7Cc,GACC,EA0BY6B,SAEjB"}
1
+ {"version":3,"file":"file-list-item.js","sources":["../../../../src/file-upload/file-list-item/file-list-item.tsx"],"sourcesContent":["import { useSortable } from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport { BinIcon } from \"@lifesg/react-icons/bin\";\nimport { DragHandleIcon as DSDragHandleIcon } from \"@lifesg/react-icons/drag-handle\";\nimport { ExclamationCircleFillIcon } from \"@lifesg/react-icons/exclamation-circle-fill\";\nimport { PencilIcon } from \"@lifesg/react-icons/pencil\";\nimport {\n memo,\n useCallback,\n useContext,\n useEffect,\n useRef,\n useState,\n} from \"react\";\n\nimport { Button } from \"../../button\";\nimport type { FormLabelProps } from \"../../form/types\";\nimport { ProgressBar } from \"../../shared/progress-bar\";\nimport { Typography } from \"../../typography\";\nimport { StringHelper } from \"../../util\";\nimport { FileUploadContext } from \"../context\";\nimport { FileUploadHelper } from \"../helper\";\nimport type { ItemFocusType } from \"./file-list-item.styles\";\nimport * as styles from \"./file-list-item.styles\";\nimport { FileListItemThumbnail } from \"./file-list-item-thumbnail\";\nimport type { FileListItemProps } from \"./types\";\n\ninterface Props extends FileListItemProps {\n readOnly?: boolean | undefined;\n descriptionLabel?: FormLabelProps | undefined;\n}\n\nconst Component = ({\n fileItem,\n editable,\n sortable,\n wrapperWidth,\n disabled,\n readOnly,\n descriptionLabel,\n onDelete,\n onEditClick,\n}: Props) => {\n // =========================================================================\n // CONST, STATE, REFS\n // =========================================================================\n const {\n id,\n name,\n size,\n description,\n progress = 1,\n errorMessage,\n thumbnailImageDataUrl,\n truncateText = true,\n } = fileItem;\n const [formattedName, setFormattedName] = useState<string>();\n const { activeId } = useContext(FileUploadContext);\n\n // Sortable mechanism\n const { attributes, listeners, setNodeRef, transform, transition } =\n useSortable({ id });\n const detailSectionRef = useRef<HTMLDivElement>(null);\n const style = {\n transform: CSS.Translate.toString(transform),\n transition,\n };\n\n const sortableProps = {\n style,\n ...attributes,\n ...listeners,\n };\n\n // Local variables\n const isLoading = progress < 1;\n const fileSize = FileUploadHelper.formatFileSizeDisplay(size);\n const hasInlineActions = !!description && !!editable;\n const focusType: ItemFocusType = activeId\n ? activeId === id\n ? \"self\"\n : \"others\"\n : \"none\";\n\n // =========================================================================\n // HELPER FUNCTIONS\n // =========================================================================\n const getTruncatedText = useCallback(\n (value: string) => {\n if (!truncateText) return value;\n\n const widthOfElement =\n detailSectionRef && detailSectionRef.current\n ? detailSectionRef.current.getBoundingClientRect().width\n : 0;\n\n return StringHelper.truncateOneLine(\n value,\n widthOfElement,\n widthOfElement / 2,\n widthOfElement / 2 / 8, // Arbitrary\n 16 // Font size\n );\n },\n [truncateText]\n );\n\n // =========================================================================\n // EFFECTS\n // =========================================================================\n useEffect(() => {\n setFormattedName(getTruncatedText(name));\n }, [wrapperWidth, getTruncatedText, name]);\n\n // =========================================================================\n // EVENT HANDLERS\n // =========================================================================\n const handleDelete = () => {\n onDelete();\n };\n\n const handleEdit = () => {\n if (onEditClick) {\n onEditClick();\n }\n };\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLButtonElement>) => {\n /**\n * Circumvent issue of keydown action activating the sort mechanism\n * rather than the actual action\n */\n if (sortable) {\n event.stopPropagation();\n }\n };\n\n const shouldDisable = () => disabled || !!activeId;\n\n const shouldEnableSort = () => !!sortable && !readOnly;\n\n const getItemState = () => {\n if (shouldDisable() && focusType === \"none\") {\n return \"disabled\";\n }\n\n if (shouldEnableSort() && focusType === \"self\") {\n return \"sortable-active\";\n }\n\n if (shouldEnableSort()) {\n return \"sortable\";\n }\n\n return undefined;\n };\n\n const getDragHandleState = () => {\n if (focusType === \"self\") {\n return \"active\";\n }\n\n if (shouldDisable()) {\n return \"disabled\";\n }\n\n return undefined;\n };\n\n const getBoxState = () => {\n if (focusType === \"self\") {\n return \"focused\";\n }\n\n if (shouldDisable()) {\n return \"disabled\";\n }\n\n if (errorMessage) {\n return \"error\";\n }\n\n return undefined;\n };\n\n const getActionContainerLayout = () => {\n if (!errorMessage && isLoading) {\n return \"loading\";\n }\n\n if (!errorMessage && editable) {\n return \"editable\";\n }\n\n return undefined;\n };\n\n // =========================================================================\n // RENDER FUNCTIONS\n // =========================================================================\n const renderNameDescription = () => (\n <>\n <Typography.BodyMD weight={description ? \"semibold\" : \"regular\"}>\n {formattedName}\n </Typography.BodyMD>\n {description && (\n <>\n <Typography.BodyMD className={styles.itemDescriptionLabel}>\n {descriptionLabel?.children ?? \"Photo description\"}\n </Typography.BodyMD>\n <Typography.BodyMD className={styles.itemDescriptionText}>\n {description}\n </Typography.BodyMD>\n </>\n )}\n </>\n );\n\n const renderErrorState = () => (\n <>\n <div ref={detailSectionRef} className={styles.nameSection}>\n {renderNameDescription()}\n {errorMessage && (\n <Typography.BodySM\n className={styles.desktopErrorMessage}\n weight=\"semibold\"\n >\n <ExclamationCircleFillIcon\n className={styles.errorIcon}\n aria-hidden\n />\n {errorMessage}\n </Typography.BodySM>\n )}\n </div>\n <div\n className={styles.fileSizeSection}\n data-mobile-visibility={isLoading ? \"hidden\" : \"expand\"}\n >\n <Typography.BodyMD className={styles.fileSizeText}>\n {fileSize}\n </Typography.BodyMD>\n </div>\n {errorMessage && (\n <Typography.BodySM\n className={styles.mobileErrorMessage}\n weight=\"semibold\"\n >\n <ExclamationCircleFillIcon\n className={styles.errorIcon}\n aria-hidden\n />\n {errorMessage}\n </Typography.BodySM>\n )}\n </>\n );\n\n const renderInlineActions = () => (\n <div className={styles.inlineActionContainer}>\n <Button\n key=\"edit\"\n data-testid={`${id}-edit-button`}\n data-no-dnd=\"true\"\n type=\"button\"\n styleType=\"light\"\n sizeType=\"small\"\n aria-label={`edit ${name}`}\n disabled={shouldDisable()}\n onClick={handleEdit}\n onKeyDown={handleKeyDown}\n icon={<PencilIcon aria-hidden />}\n className={styles.iconButton}\n />\n <Button\n key=\"delete\"\n data-testid={`${id}-delete-button`}\n data-no-dnd=\"true\"\n type=\"button\"\n styleType=\"light\"\n sizeType=\"small\"\n aria-label={`delete ${name}`}\n disabled={shouldDisable()}\n onClick={handleDelete}\n onKeyDown={handleKeyDown}\n icon={<BinIcon aria-hidden />}\n className={styles.iconButton}\n />\n </div>\n );\n\n const renderDescriptionContent = () => (\n <div ref={detailSectionRef} className={styles.extendedNameSection}>\n <Typography.BodyMD weight=\"semibold\">\n {formattedName}\n </Typography.BodyMD>\n <Typography.BodyMD className={styles.itemDescriptionLabel}>\n {descriptionLabel?.children ?? \"Photo description\"}\n </Typography.BodyMD>\n <Typography.BodyMD className={styles.itemDescriptionText}>\n {description}\n </Typography.BodyMD>\n <Typography.BodyMD className={styles.descriptionFileSizeText}>\n {fileSize}\n </Typography.BodyMD>\n {!readOnly && hasInlineActions && renderInlineActions()}\n </div>\n );\n\n const renderFileContent = (thumbnailImageDataUrl?: string) => {\n const shouldShowThumbnail =\n !!thumbnailImageDataUrl ||\n fileItem.type === FileUploadHelper.PDF_MIME_TYPE;\n\n const thumbnail = shouldShowThumbnail ? (\n <FileListItemThumbnail\n thumbnailImageDataUrl={thumbnailImageDataUrl || \"\"}\n fileType={fileItem.type}\n data-testid={`${id}-thumbnail`}\n />\n ) : null;\n\n if (hasInlineActions) {\n return (\n <>\n {thumbnail}\n {renderDescriptionContent()}\n </>\n );\n }\n\n return (\n <>\n {thumbnail}\n <div ref={detailSectionRef} className={styles.nameSection}>\n {renderNameDescription()}\n {!isLoading && (\n <Typography.BodyMD\n className={styles.descriptionFileSizeText}\n >\n {fileSize}\n </Typography.BodyMD>\n )}\n </div>\n </>\n );\n };\n\n const renderContents = () => {\n const shouldShowThumbnail =\n !!thumbnailImageDataUrl ||\n fileItem.type === FileUploadHelper.PDF_MIME_TYPE;\n\n const content = errorMessage\n ? renderErrorState()\n : renderFileContent(thumbnailImageDataUrl);\n\n return (\n <div\n className={styles.contentSection}\n data-has-thumbnail={shouldShowThumbnail}\n >\n {content}\n </div>\n );\n };\n\n const renderActions = () => {\n let content: JSX.Element;\n\n if (errorMessage) {\n content = (\n <Button\n data-testid={`${id}-error-delete-button`}\n data-no-dnd=\"true\"\n type=\"button\"\n styleType=\"light\"\n sizeType=\"small\"\n aria-label={`delete ${name}, error: ${errorMessage}`}\n onClick={handleDelete}\n className={styles.iconButton}\n icon={<BinIcon aria-hidden />}\n />\n );\n } else if (isLoading) {\n content = (\n <ProgressBar\n progress={progress}\n data-testid={`${id}-progress-bar`}\n />\n );\n } else {\n content = (\n <>\n {editable && (\n <Button\n key=\"edit\"\n data-testid={`${id}-edit-button`}\n data-no-dnd=\"true\"\n type=\"button\"\n styleType=\"light\"\n sizeType=\"small\"\n aria-label={`edit ${name}`}\n disabled={shouldDisable()}\n onClick={handleEdit}\n onKeyDown={handleKeyDown}\n icon={<PencilIcon aria-hidden />}\n className={styles.iconButton}\n />\n )}\n <Button\n key=\"delete\"\n data-testid={`${id}-delete-button`}\n data-no-dnd=\"true\"\n type=\"button\"\n styleType=\"light\"\n sizeType=\"small\"\n aria-label={`delete ${name}`}\n disabled={shouldDisable()}\n onClick={handleDelete}\n onKeyDown={handleKeyDown}\n icon={<BinIcon aria-hidden />}\n className={styles.iconButton}\n />\n </>\n );\n }\n\n return (\n <div\n className={styles.actionContainer}\n data-mobile-layout={getActionContainerLayout()}\n >\n {content}\n </div>\n );\n };\n\n return (\n <li\n id={id}\n ref={setNodeRef}\n className={styles.item}\n data-item-state={getItemState()}\n data-testid={`${id}-item`}\n {...(shouldEnableSort() ? sortableProps : {})}\n >\n {shouldEnableSort() && (\n <DSDragHandleIcon\n data-testid={`${id}-drag-handle`}\n className={styles.dragHandleIcon}\n data-drag-handle-state={getDragHandleState()}\n />\n )}\n <div\n className={styles.box}\n data-box-state={getBoxState()}\n data-stack-mobile={!errorMessage && (isLoading || editable)}\n >\n {renderContents()}\n {!readOnly && !hasInlineActions && renderActions()}\n </div>\n </li>\n );\n};\n\nexport const FileListItem = memo(Component);\n"],"names":["FileListItem","memo","fileItem","editable","sortable","wrapperWidth","disabled","readOnly","descriptionLabel","onDelete","onEditClick","id","name","size","description","progress","errorMessage","thumbnailImageDataUrl","truncateText","formattedName","setFormattedName","useState","activeId","useContext","FileUploadContext","attributes","listeners","setNodeRef","transform","transition","useSortable","detailSectionRef","useRef","style","CSS","Translate","toString","sortableProps","isLoading","fileSize","FileUploadHelper","formatFileSizeDisplay","hasInlineActions","focusType","getTruncatedText","useCallback","value","widthOfElement","current","getBoundingClientRect","width","StringHelper","truncateOneLine","useEffect","handleDelete","handleEdit","handleKeyDown","event","stopPropagation","shouldDisable","shouldEnableSort","renderNameDescription","_jsxs","_Fragment","children","_jsx","Typography","BodyMD","weight","className","styles.itemDescriptionLabel","_a","styles.itemDescriptionText","Object","assign","ref","styles.item","DSDragHandleIcon","styles.dragHandleIcon","styles.box","shouldShowThumbnail","type","PDF_MIME_TYPE","content","styles.nameSection","BodySM","styles.desktopErrorMessage","ExclamationCircleFillIcon","styles.errorIcon","styles.fileSizeSection","styles.fileSizeText","styles.mobileErrorMessage","thumbnail","FileListItemThumbnail","fileType","styles.extendedNameSection","styles.descriptionFileSizeText","styles.inlineActionContainer","Button","styleType","sizeType","onClick","onKeyDown","icon","PencilIcon","styles.iconButton","BinIcon","renderFileContent","styles.contentSection","renderContents","ProgressBar","styles.actionContainer","renderActions"],"mappings":"k2BAgCA,MAkbaA,EAAeC,EAAAA,MAlbV,EACdC,WACAC,WACAC,WACAC,eACAC,WACAC,WACAC,mBACAC,WACAC,kBAKA,MAAMC,GACFA,EAAEC,KACFA,EAAIC,KACJA,EAAIC,YACJA,EAAWC,SACXA,EAAW,EAACC,aACZA,EAAYC,sBACZA,EAAqBC,aACrBA,GAAe,GACfhB,GACGiB,EAAeC,GAAoBC,cACpCC,S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B,UAAU,QACVC,SAAS,QAAO,aACJ,UAAUxF,IACtBN,SAAUqD,IACV0C,QAAS/C,EACTgD,UAAW9C,EACX+C,KAAMtC,EAAAA,IAACyC,EAAAA,QAAO,CAAA,eAAA,IACdrC,UAAWoC,EAAAA,YAXP,aAkBhBxC,EAAAA,IAAA,MAAA,CACII,UAAW0C,EAAAA,gBAAsB,sBApPpC/F,GAAgBsB,EACV,WAGNtB,GAAgBb,EACV,gBADX,EAiPsD6D,SAE7CmB,GACC,EA0BiC6B,SAEtC"}
@@ -1,2 +1,2 @@
1
- "use strict";require("./file-list-item.styles_y7my2m.css");exports.actionContainer="a1gk2zsk",exports.box="bddx9rr",exports.contentSection="c1dhzflv",exports.desktopErrorMessage="d1vgco4e",exports.dragHandleIcon="dqb8x5u",exports.errorIcon="e1jm950n",exports.extendedNameSection="elwke9e",exports.fileSizeSection="f14h64yt",exports.fileSizeText="f1wv8fjl",exports.iconButton="i1wh4bod",exports.item="i18pxk0j",exports.itemDescriptionText="iivlkvo",exports.mobileErrorMessage="map0p9n",exports.nameSection="nk38w4a";
1
+ "use strict";require("./file-list-item.styles_o8000f.css");exports.actionContainer="a3rvfgv",exports.box="bddx9rr",exports.contentSection="c1dhzflv",exports.descriptionFileSizeText="divlkvo",exports.desktopErrorMessage="d1gk2zsk",exports.dragHandleIcon="dqb8x5u",exports.errorIcon="eap0p9n",exports.extendedNameSection="elwke9e",exports.fileSizeSection="f14h64yt",exports.fileSizeText="f1wv8fjl",exports.iconButton="ilou5qo",exports.inlineActionContainer="i5ozu70",exports.item="i18pxk0j",exports.itemDescriptionLabel="i1jm950n",exports.itemDescriptionText="i1vgco4e",exports.mobileErrorMessage="m1wh4bod",exports.nameSection="nk38w4a";
2
2
  //# sourceMappingURL=file-list-item.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-list-item.styles.js","sources":["../../../../src/file-upload/file-list-item/file-list-item.styles.ts"],"sourcesContent":["import { css } from \"@linaria/core\";\n\nimport {\n Border,\n Colour,\n MediaQuery,\n Radius,\n Shadow,\n Spacing,\n} from \"../../theme\";\n\nexport type ItemFocusType = \"self\" | \"others\" | \"none\";\n\nexport const item = css`\n display: flex;\n align-items: center;\n width: 100%;\n border: none;\n\n &:not(:last-child) {\n margin-bottom: ${Spacing[\"spacing-16\"]};\n }\n &[data-item-state=\"disabled\"] {\n cursor: not-allowed;\n }\n\n &[data-item-state=\"sortable\"] {\n &:hover {\n cursor: grab;\n }\n\n // Following recommendation by the library for touch events\n // https://docs.dndkit.com/api-documentation/sensors/touch#recommendations\n touch-action: manipulation;\n }\n\n &[data-item-state=\"sortable-active\"] {\n cursor: grabbing;\n\n // Following recommendation by the library for touch events\n // https://docs.dndkit.com/api-documentation/sensors/touch#recommendations\n touch-action: manipulation;\n }\n`;\n\nexport const dragHandleIcon = css`\n margin-right: ${Spacing[\"spacing-16\"]};\n height: 1.5rem;\n width: 1.5rem;\n color: ${Colour[\"icon\"]};\n\n &[data-drag-handle-state=\"active\"] {\n color: ${Colour[\"icon-primary\"]};\n }\n\n &[data-drag-handle-state=\"disabled\"] {\n color: ${Colour[\"icon-disabled\"]};\n }\n`;\n\nexport const box = css`\n background: ${Colour[\"bg-primary-subtlest\"]};\n border: ${Border[\"width-010\"]} ${Border[\"solid\"]} ${Colour[\"border\"]};\n border-radius: ${Radius[\"sm\"]};\n padding: ${Spacing[\"spacing-16\"]} ${Spacing[\"spacing-32\"]};\n display: flex;\n align-items: center;\n width: 100%;\n\n ${MediaQuery.MaxWidth.md} {\n padding: ${Spacing[\"spacing-16\"]};\n }\n\n &[data-box-state=\"focused\"] {\n border-color: ${Colour[\"border-focus\"]};\n box-shadow: ${Shadow[\"xs-focus-strong\"]};\n }\n\n &[data-box-state=\"disabled\"] {\n border-color: ${Colour[\"border-disabled\"]};\n }\n\n &[data-box-state=\"error\"] {\n background: ${Colour[\"bg-error\"]};\n border-color: ${Colour[\"border-error\"]};\n }\n\n &[data-stack-mobile=\"true\"] {\n ${MediaQuery.MaxWidth.md} {\n flex-direction: column;\n align-items: flex-start;\n }\n }\n`;\n\nexport const contentSection = css`\n display: flex;\n flex: 1;\n align-items: center;\n\n ${MediaQuery.MaxWidth.md} {\n flex-direction: column;\n width: 100%;\n align-items: flex-start;\n }\n\n &[data-has-thumbnail=\"true\"] {\n ${MediaQuery.MaxWidth.md} {\n flex-direction: row;\n align-items: center;\n }\n }\n`;\n\nexport const nameSection = css`\n display: flex;\n flex: 1;\n flex-direction: column;\n width: 100%;\n`;\n\nexport const extendedNameSection = css`\n display: flex;\n flex: 1;\n align-items: center;\n\n ${MediaQuery.MaxWidth.md} {\n flex-direction: column;\n align-items: flex-start;\n width: 100%;\n }\n`;\n\nexport const fileSizeSection = css`\n display: flex;\n width: 5rem;\n margin-left: ${Spacing[\"spacing-8\"]};\n justify-content: flex-end;\n\n &[data-mobile-visibility=\"hidden\"] {\n ${MediaQuery.MaxWidth.md} {\n display: none;\n visibility: hidden;\n }\n }\n\n &[data-mobile-visibility=\"expand\"] {\n ${MediaQuery.MaxWidth.md} {\n width: 100%;\n margin-left: 0;\n margin-top: ${Spacing[\"spacing-8\"]};\n justify-content: flex-start;\n }\n }\n`;\n\nexport const fileSizeText = css`\n color: ${Colour[\"text-subtler\"]};\n`;\n\nexport const itemDescriptionText = css`\n margin-top: ${Spacing[\"spacing-4\"]};\n`;\n\nexport const errorIcon = css`\n height: 1lh;\n width: 1em;\n flex-shrink: 0;\n color: ${Colour[\"icon-error-strong\"]};\n`;\n\nexport const desktopErrorMessage = css`\n color: ${Colour[\"text-error\"]};\n margin-top: ${Spacing[\"spacing-4\"]};\n display: flex;\n gap: ${Spacing[\"spacing-4\"]};\n\n ${MediaQuery.MaxWidth.md} {\n display: none;\n visibility: hidden;\n }\n`;\n\nexport const mobileErrorMessage = css`\n color: ${Colour[\"text-error\"]};\n display: none;\n visibility: hidden;\n\n ${MediaQuery.MaxWidth.md} {\n display: flex;\n gap: ${Spacing[\"spacing-4\"]};\n visibility: visible;\n margin-top: ${Spacing[\"spacing-8\"]};\n }\n`;\n\nexport const actionContainer = css`\n width: 6rem;\n margin-left: ${Spacing[\"spacing-32\"]};\n display: flex;\n justify-content: flex-end;\n align-items: center;\n\n ${MediaQuery.MaxWidth.md} {\n width: fit-content;\n }\n\n &[data-mobile-layout=\"loading\"] {\n ${MediaQuery.MaxWidth.md} {\n margin-left: 0;\n margin-top: ${Spacing[\"spacing-16\"]};\n width: 100%;\n }\n }\n\n &[data-mobile-layout=\"editable\"] {\n ${MediaQuery.MaxWidth.md} {\n margin-left: 0;\n margin-top: ${Spacing[\"spacing-16\"]};\n align-self: flex-end;\n }\n }\n`;\n\nexport const iconButton = css`\n min-width: unset;\n\n &:not(:last-child) {\n margin-right: ${Spacing[\"spacing-16\"]};\n }\n`;\n"],"names":[],"mappings":"6HAoM4B,uBAxIZ,iCAmCW,uCA4EK,kCA9HL,4BAuHL,uCA3CU,kCAYJ,gCAuBH,8BAoEF,wBAnNN,uCAmJe,qCAuBD,8BArEP"}
1
+ {"version":3,"file":"file-list-item.styles.js","sources":["../../../../src/file-upload/file-list-item/file-list-item.styles.ts"],"sourcesContent":["import { css } from \"@linaria/core\";\n\nimport {\n Border,\n Colour,\n Font,\n MediaQuery,\n Radius,\n Shadow,\n Spacing,\n} from \"../../theme\";\n\nexport type ItemFocusType = \"self\" | \"others\" | \"none\";\n\nexport const item = css`\n display: flex;\n align-items: center;\n width: 100%;\n border: none;\n\n &:not(:last-child) {\n margin-bottom: ${Spacing[\"spacing-16\"]};\n }\n &[data-item-state=\"disabled\"] {\n cursor: not-allowed;\n }\n\n &[data-item-state=\"sortable\"] {\n &:hover {\n cursor: grab;\n }\n\n // Following recommendation by the library for touch events\n // https://docs.dndkit.com/api-documentation/sensors/touch#recommendations\n touch-action: manipulation;\n }\n\n &[data-item-state=\"sortable-active\"] {\n cursor: grabbing;\n\n // Following recommendation by the library for touch events\n // https://docs.dndkit.com/api-documentation/sensors/touch#recommendations\n touch-action: manipulation;\n }\n`;\n\nexport const dragHandleIcon = css`\n margin-right: ${Spacing[\"spacing-16\"]};\n height: 1.5rem;\n width: 1.5rem;\n color: ${Colour[\"icon\"]};\n\n &[data-drag-handle-state=\"active\"] {\n color: ${Colour[\"icon-primary\"]};\n }\n\n &[data-drag-handle-state=\"disabled\"] {\n color: ${Colour[\"icon-disabled\"]};\n }\n`;\n\nexport const box = css`\n background: ${Colour[\"bg-primary-subtlest\"]};\n border: ${Border[\"width-010\"]} ${Border[\"solid\"]} ${Colour[\"border\"]};\n border-radius: ${Radius[\"sm\"]};\n padding: ${Spacing[\"spacing-16\"]} ${Spacing[\"spacing-32\"]};\n display: flex;\n align-items: center;\n width: 100%;\n\n ${MediaQuery.MaxWidth.md} {\n padding: ${Spacing[\"spacing-16\"]};\n }\n\n &[data-box-state=\"focused\"] {\n border-color: ${Colour[\"border-focus\"]};\n box-shadow: ${Shadow[\"xs-focus-strong\"]};\n }\n\n &[data-box-state=\"disabled\"] {\n border-color: ${Colour[\"border-disabled\"]};\n }\n\n &[data-box-state=\"error\"] {\n background: ${Colour[\"bg-error\"]};\n border-color: ${Colour[\"border-error\"]};\n }\n\n &[data-stack-mobile=\"true\"] {\n ${MediaQuery.MaxWidth.md} {\n flex-direction: column;\n align-items: flex-start;\n }\n }\n`;\n\nexport const contentSection = css`\n display: flex;\n flex: 1;\n align-items: center;\n\n ${MediaQuery.MaxWidth.md} {\n flex-direction: column;\n width: 100%;\n align-items: flex-start;\n }\n\n &[data-has-thumbnail=\"true\"] {\n ${MediaQuery.MaxWidth.md} {\n flex-direction: row;\n align-items: center;\n }\n }\n`;\n\nexport const nameSection = css`\n display: flex;\n flex: 1;\n flex-direction: column;\n width: 100%;\n`;\n\nexport const extendedNameSection = css`\n display: flex;\n flex: 1;\n flex-direction: column;\n align-items: flex-start;\n\n ${MediaQuery.MaxWidth.md} {\n width: 100%;\n }\n`;\n\nexport const fileSizeSection = css`\n display: flex;\n width: 5rem;\n margin-left: ${Spacing[\"spacing-8\"]};\n justify-content: flex-end;\n\n &[data-mobile-visibility=\"hidden\"] {\n ${MediaQuery.MaxWidth.md} {\n display: none;\n visibility: hidden;\n }\n }\n\n &[data-mobile-visibility=\"expand\"] {\n ${MediaQuery.MaxWidth.md} {\n width: 100%;\n margin-left: 0;\n margin-top: ${Spacing[\"spacing-8\"]};\n justify-content: flex-start;\n }\n }\n`;\n\nexport const fileSizeText = css`\n color: ${Colour[\"text-subtler\"]};\n`;\n\nexport const descriptionFileSizeText = css`\n color: ${Colour[\"text-subtler\"]};\n margin-top: ${Spacing[\"spacing-16\"]};\n`;\n\nexport const itemDescriptionLabel = css`\n ${Font[\"form-label\"]}\n font-weight: ${Font.Spec[\"weight-semibold\"]};\n color: ${Colour[\"text-subtle\"]};\n margin-top: ${Spacing[\"spacing-16\"]};\n`;\n\nexport const itemDescriptionText = css`\n margin-top: ${Spacing[\"spacing-4\"]};\n`;\n\nexport const errorIcon = css`\n height: 1lh;\n width: 1em;\n flex-shrink: 0;\n color: ${Colour[\"icon-error-strong\"]};\n`;\n\nexport const desktopErrorMessage = css`\n color: ${Colour[\"text-error\"]};\n margin-top: ${Spacing[\"spacing-4\"]};\n display: flex;\n gap: ${Spacing[\"spacing-4\"]};\n\n ${MediaQuery.MaxWidth.md} {\n display: none;\n visibility: hidden;\n }\n`;\n\nexport const mobileErrorMessage = css`\n color: ${Colour[\"text-error\"]};\n display: none;\n visibility: hidden;\n\n ${MediaQuery.MaxWidth.md} {\n display: flex;\n gap: ${Spacing[\"spacing-4\"]};\n visibility: visible;\n margin-top: ${Spacing[\"spacing-8\"]};\n }\n`;\n\nexport const actionContainer = css`\n width: 6rem;\n margin-left: ${Spacing[\"spacing-32\"]};\n display: flex;\n justify-content: flex-end;\n align-items: center;\n\n ${MediaQuery.MaxWidth.md} {\n width: fit-content;\n }\n\n &[data-mobile-layout=\"loading\"] {\n ${MediaQuery.MaxWidth.md} {\n margin-left: 0;\n margin-top: ${Spacing[\"spacing-16\"]};\n width: 100%;\n }\n }\n\n &[data-mobile-layout=\"editable\"] {\n ${MediaQuery.MaxWidth.md} {\n margin-left: 0;\n margin-top: ${Spacing[\"spacing-16\"]};\n align-self: flex-end;\n }\n }\n`;\n\nexport const inlineActionContainer = css`\n width: 100%;\n margin-top: ${Spacing[\"spacing-16\"]};\n display: flex;\n justify-content: flex-end;\n align-items: center;\n`;\n\nexport const iconButton = css`\n min-width: unset;\n\n &:not(:last-child) {\n margin-right: ${Spacing[\"spacing-8\"]};\n }\n`;\n"],"names":[],"mappings":"6HAgN4B,sBAnJZ,iCAmCW,2CAgES,sCAuBJ,kCAzIL,4BAkIL,sCAtDU,kCAWJ,gCAuBH,8BAwFF,wCARW,uBA9NjB,wCAuJgB,uCAOD,sCAuBD,+BAhFP"}
@@ -0,0 +1,17 @@
1
+ @layer fds{.i18pxk0j{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;width:100%;border:none;}.i18pxk0j:not(:last-child){margin-bottom:var(--fds-spacing-16);}.i18pxk0j[data-item-state="disabled"]{cursor:not-allowed;}.i18pxk0j[data-item-state="sortable"]{touch-action:manipulation;}.i18pxk0j[data-item-state="sortable"]:hover{cursor:-webkit-grab;cursor:grab;}.i18pxk0j[data-item-state="sortable-active"]{cursor:-webkit-grabbing;cursor:grabbing;touch-action:manipulation;}
2
+ .dqb8x5u{margin-right:var(--fds-spacing-16);height:1.5rem;width:1.5rem;color:var(--fds-colour-icon);}.dqb8x5u[data-drag-handle-state="active"]{color:var(--fds-colour-icon-primary);}.dqb8x5u[data-drag-handle-state="disabled"]{color:var(--fds-colour-icon-disabled);}
3
+ .bddx9rr{background:var(--fds-colour-bg-primary-subtlest);border:var(--fds-border-width-010) var(--fds-border-style-solid) var(--fds-colour-border);border-radius:var(--fds-radius-sm);padding:var(--fds-spacing-16) var(--fds-spacing-32);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;width:100%;}:where(body.fds-breakpoint-md-max) .bddx9rr{padding:var(--fds-spacing-16);}.bddx9rr[data-box-state="focused"]{border-color:var(--fds-colour-border-focus);box-shadow:var(--fds-shadow-xs-focus-strong);}.bddx9rr[data-box-state="disabled"]{border-color:var(--fds-colour-border-disabled);}.bddx9rr[data-box-state="error"]{background:var(--fds-colour-bg-error);border-color:var(--fds-colour-border-error);}:where(body.fds-breakpoint-md-max) .bddx9rr[data-stack-mobile="true"]{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;}
4
+ .c1dhzflv{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}:where(body.fds-breakpoint-md-max) .c1dhzflv{-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;width:100%;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;}:where(body.fds-breakpoint-md-max) .c1dhzflv[data-has-thumbnail="true"]{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
5
+ .nk38w4a{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;width:100%;}
6
+ .elwke9e{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex:1;-ms-flex:1;flex:1;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;}:where(body.fds-breakpoint-md-max) .elwke9e{width:100%;}
7
+ .f14h64yt{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;width:5rem;margin-left:var(--fds-spacing-8);-webkit-box-pack:end;-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;}:where(body.fds-breakpoint-md-max) .f14h64yt[data-mobile-visibility="hidden"]{display:none;visibility:hidden;}:where(body.fds-breakpoint-md-max) .f14h64yt[data-mobile-visibility="expand"]{width:100%;margin-left:0;margin-top:var(--fds-spacing-8);-webkit-box-pack:start;-ms-flex-pack:start;-webkit-justify-content:flex-start;justify-content:flex-start;}
8
+ .f1wv8fjl{color:var(--fds-colour-text-subtler);}
9
+ .divlkvo{color:var(--fds-colour-text-subtler);margin-top:var(--fds-spacing-16);}
10
+ .i1jm950n{font-family:var(--fds-font-family-body);font-variant:var(--fds-font-variant);font-size:var(--fds-font-form-label-size);font-weight:var(--fds-font-weight-semibold);line-height:var(--fds-font-form-label-lh);letter-spacing:var(--fds-font-form-label-ls);font-weight:var(--fds-font-weight-semibold);color:var(--fds-colour-text-subtle);margin-top:var(--fds-spacing-16);}
11
+ .i1vgco4e{margin-top:var(--fds-spacing-4);}
12
+ .eap0p9n{height:1lh;width:1em;-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;color:var(--fds-colour-icon-error-strong);}
13
+ .d1gk2zsk{color:var(--fds-colour-text-error);margin-top:var(--fds-spacing-4);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--fds-spacing-4);}:where(body.fds-breakpoint-md-max) .d1gk2zsk{display:none;visibility:hidden;}
14
+ .m1wh4bod{color:var(--fds-colour-text-error);display:none;visibility:hidden;}:where(body.fds-breakpoint-md-max) .m1wh4bod{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;gap:var(--fds-spacing-4);visibility:visible;margin-top:var(--fds-spacing-8);}
15
+ .a3rvfgv{width:6rem;margin-left:var(--fds-spacing-32);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}:where(body.fds-breakpoint-md-max) .a3rvfgv{width:-webkit-fit-content;width:-moz-fit-content;width:fit-content;}:where(body.fds-breakpoint-md-max) .a3rvfgv[data-mobile-layout="loading"]{margin-left:0;margin-top:var(--fds-spacing-16);width:100%;}:where(body.fds-breakpoint-md-max) .a3rvfgv[data-mobile-layout="editable"]{margin-left:0;margin-top:var(--fds-spacing-16);-webkit-align-self:flex-end;-ms-flex-item-align:end;align-self:flex-end;}
16
+ .i5ozu70{width:100%;margin-top:var(--fds-spacing-16);display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-box-pack:end;-ms-flex-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;}
17
+ .ilou5qo{min-width:unset;}.ilou5qo:not(:last-child){margin-right:var(--fds-spacing-8);}}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("../alert/alert.js"),l=require("../button/button.js"),a=require("../markup/markup.js"),s=require("../typography/index.js"),i=require("./context.js"),n=require("./dropzone.js"),o=require("./file-list.js"),d=require("./file-upload.styles.js");exports.FileUpload=({styleType:u="bordered",fileItems:c,title:p,description:m,maxFiles:h,warning:y,className:x,name:b,id:j,"data-testid":g,accept:f,capture:v,multiple:B,disabled:N,sortable:q=!1,fileDescriptionMaxLength:D,editableFileItems:T=!1,errorMessage:C,readOnly:F,customLabels:I,onChange:M,onDelete:k,onEdit:z,onSort:L})=>{const A={uploadButton:(null==I?void 0:I.uploadButtonLabel)||"Upload files"},S=r.useRef(null),U=r.useRef(null),[w,O]=r.useState(),R=e=>{var r;if(void 0===h)return e;const t=null!==(r=null==c?void 0:c.length)&&void 0!==r?r:0,l=Math.max(h-t,0);return e.slice(0,l)},E=()=>!(!h||!c)&&c.length>=h;return e.jsx(i.FileUploadContext.Provider,{value:{activeId:w,setActiveId:O},children:e.jsxs(n.FileUploadDropzone,{ref:S,onChange:e=>{var r;const t=R(e);!N&&M&&t.length>0&&(M(t),null===(r=U.current)||void 0===r||r.focus())},id:j?`${j}-dropzone`:"dropzone",accept:f,capture:v,border:"bordered"===u,className:x,"data-testid":g,name:b,multiple:B,disabled:N||E()||F,children:[!(!p&&!m)&&e.jsxs("div",{className:d.textContainer,children:[p?"string"==typeof p?e.jsx(s.Typography.BodyBL,{children:p}):e.jsx(a.Markup,{className:d.markupContainer,baseTextSize:"body-baseline",children:p}):null,m?"string"==typeof m?e.jsx(s.Typography.BodyMD,{className:d.description,children:m}):e.jsx(a.Markup,{className:d.markupContainer,baseTextSize:"body-md",children:m}):null]}),!!y&&e.jsx(t.Alert,{className:d.warningAlert,type:"warning",children:y}),e.jsx(o.FileList,{ref:U,fileItems:c,editableFileItems:T,fileDescriptionMaxLength:D,sortable:q,disabled:N,readOnly:F,onItemDelete:e=>{var r;k&&(k(e),null===(r=U.current)||void 0===r||r.focus())},onItemUpdate:e=>{z&&z(e)},onSort:e=>{L&&L(e)}}),C&&e.jsx(t.Alert,{className:d.errorAlert,type:"error",children:C}),!F&&e.jsxs("div",{className:d.uploadButtonContainer,children:[e.jsx(l.Button,{type:"button",sizeType:"small",styleType:"secondary",disabled:!!w||N||E(),onClick:e=>{N||(e.preventDefault(),S.current&&S.current.openFileDialog())},className:d.uploadButton,children:A.uploadButton}),e.jsx(s.Typography.BodyMD,{className:d.uploadButtonText,weight:"semibold",children:"or drop them here"})]})]})})};
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("react"),t=require("../alert/alert.js"),l=require("../button/button.js"),i=require("../markup/markup.js"),s=require("../typography/index.js"),a=require("./context.js"),n=require("./dropzone.js"),o=require("./file-list/file-list.js"),d=require("./file-upload.styles.js");exports.FileUpload=({styleType:u="bordered",fileItems:c,title:p,description:m,maxFiles:h,warning:y,className:x,name:b,id:j,"data-testid":g,accept:f,capture:v,multiple:q,disabled:B,sortable:N=!1,fileDescriptionMaxLength:D,editableFileItems:T=!1,descriptionRequired:C=!0,descriptionLabel:F,errorMessage:I,readOnly:L,customLabels:M,onChange:k,onDelete:z,onEdit:A,onSort:S})=>{const U={uploadButton:(null==M?void 0:M.uploadButtonLabel)||"Upload files"},w=r.useRef(null),R=r.useRef(null),[O,E]=r.useState(),P=e=>{var r;if(void 0===h)return e;const t=null!==(r=null==c?void 0:c.length)&&void 0!==r?r:0,l=Math.max(h-t,0);return e.slice(0,l)},$=()=>!(!h||!c)&&c.length>=h;return e.jsx(a.FileUploadContext.Provider,{value:{activeId:O,setActiveId:E},children:e.jsxs(n.FileUploadDropzone,{ref:w,onChange:e=>{var r;const t=P(e);!B&&k&&t.length>0&&(k(t),null===(r=R.current)||void 0===r||r.focus())},id:j?`${j}-dropzone`:"dropzone",accept:f,capture:v,border:"bordered"===u,className:x,"data-testid":g,name:b,multiple:q,disabled:B||$()||L,children:[!(!p&&!m)&&e.jsxs("div",{className:d.textContainer,children:[p?"string"==typeof p?e.jsx(s.Typography.BodyBL,{children:p}):e.jsx(i.Markup,{className:d.markupContainer,baseTextSize:"body-baseline",children:p}):null,m?"string"==typeof m?e.jsx(s.Typography.BodyMD,{className:d.description,children:m}):e.jsx(i.Markup,{className:d.markupContainer,baseTextSize:"body-md",children:m}):null]}),!!y&&e.jsx(t.Alert,{className:d.warningAlert,type:"warning",children:y}),e.jsx(o.FileList,{ref:R,fileItems:c,editableFileItems:T,descriptionRequired:C,descriptionLabel:F,fileDescriptionMaxLength:D,sortable:N,disabled:B,readOnly:L,onItemDelete:e=>{var r;z&&(z(e),null===(r=R.current)||void 0===r||r.focus())},onItemUpdate:e=>{A&&A(e)},onSort:e=>{S&&S(e)}}),I&&e.jsx(t.Alert,{className:d.errorAlert,type:"error",children:I}),!L&&e.jsxs("div",{className:d.uploadButtonContainer,children:[e.jsx(l.Button,{type:"button",sizeType:"small",styleType:"secondary",disabled:!!O||B||$(),onClick:e=>{B||(e.preventDefault(),w.current&&w.current.openFileDialog())},className:d.uploadButton,children:U.uploadButton}),e.jsx(s.Typography.BodyMD,{className:d.uploadButtonText,weight:"semibold",children:"or drop them here"})]})]})})};
2
2
  //# sourceMappingURL=file-upload.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"file-upload.js","sources":["../../../src/file-upload/file-upload.tsx"],"sourcesContent":["import { useRef, useState } from \"react\";\n\nimport { Alert } from \"../alert\";\nimport { Button } from \"../button\";\nimport { Markup } from \"../markup\";\nimport { Typography } from \"../typography\";\nimport { FileUploadContext } from \"./context\";\nimport type { DropzoneElement } from \"./dropzone\";\nimport { FileUploadDropzone } from \"./dropzone\";\nimport type { FileListRef } from \"./file-list\";\nimport { FileList } from \"./file-list\";\nimport * as styles from \"./file-upload.styles\";\nimport type { FileItemProps, FileUploadProps } from \"./types\";\n\nexport const FileUpload = ({\n styleType = \"bordered\",\n fileItems,\n title,\n description,\n maxFiles,\n warning,\n className,\n name,\n id,\n \"data-testid\": testId,\n accept,\n capture,\n multiple,\n disabled,\n sortable = false,\n fileDescriptionMaxLength,\n editableFileItems = false,\n errorMessage,\n readOnly,\n customLabels,\n onChange,\n onDelete,\n onEdit,\n onSort,\n}: FileUploadProps) => {\n const labels = {\n uploadButton: customLabels?.uploadButtonLabel || \"Upload files\",\n };\n // =========================================================================\n // CONST, STATE, REFS\n // =========================================================================\n const dropzoneRef = useRef<DropzoneElement>(null);\n const fileListRef = useRef<FileListRef>(null);\n const [activeId, setActiveId] = useState<string>();\n\n // =========================================================================\n // EVENT HANDLERS\n // =========================================================================\n const handleChange = (files: File[]) => {\n const filesToProcess = limitIncomingFiles(files);\n\n if (!disabled && onChange && filesToProcess.length > 0) {\n onChange(filesToProcess);\n fileListRef.current?.focus();\n }\n };\n\n const handleItemDelete = (item: FileItemProps) => {\n if (onDelete) {\n onDelete(item);\n fileListRef.current?.focus();\n }\n };\n\n const handleUploadButtonClick = (\n event: React.MouseEvent<HTMLButtonElement>\n ) => {\n if (!disabled) {\n event.preventDefault();\n if (dropzoneRef.current) {\n dropzoneRef.current.openFileDialog();\n }\n }\n };\n\n const handleItemUpdate = (updatedItem: FileItemProps) => {\n if (onEdit) {\n onEdit(updatedItem);\n }\n };\n\n const handleSort = (updatedItems: FileItemProps[]) => {\n if (onSort) {\n onSort(updatedItems);\n }\n };\n\n // =========================================================================\n // HELPER FUNCTIONS\n // =========================================================================\n const limitIncomingFiles = (files: File[]) => {\n if (maxFiles === undefined) {\n return files;\n }\n\n const existingItemsCount = fileItems?.length ?? 0;\n const remainingSlots = Math.max(maxFiles - existingItemsCount, 0);\n\n return files.slice(0, remainingSlots);\n };\n\n const reachedMaxFiles = () => {\n return maxFiles && fileItems ? fileItems.length >= maxFiles : false;\n };\n\n // =========================================================================\n // RENDER FUNCTIONS\n // =========================================================================\n const renderTitle = () => {\n if (!title) {\n return null;\n }\n\n if (typeof title === \"string\") {\n return <Typography.BodyBL>{title}</Typography.BodyBL>;\n }\n\n return (\n <Markup\n className={styles.markupContainer}\n baseTextSize=\"body-baseline\"\n >\n {title}\n </Markup>\n );\n };\n\n const renderDescription = () => {\n if (!description) {\n return null;\n }\n\n if (typeof description === \"string\") {\n return (\n <Typography.BodyMD className={styles.description}>\n {description}\n </Typography.BodyMD>\n );\n }\n\n return (\n <Markup className={styles.markupContainer} baseTextSize=\"body-md\">\n {description}\n </Markup>\n );\n };\n\n return (\n <FileUploadContext.Provider value={{ activeId, setActiveId }}>\n <FileUploadDropzone\n ref={dropzoneRef}\n onChange={handleChange}\n id={id ? `${id}-dropzone` : \"dropzone\"}\n accept={accept}\n capture={capture}\n border={styleType === \"bordered\"}\n className={className}\n data-testid={testId}\n name={name}\n multiple={multiple}\n disabled={disabled || reachedMaxFiles() || readOnly}\n >\n {!!(title || description) && (\n <div className={styles.textContainer}>\n {renderTitle()}\n {renderDescription()}\n </div>\n )}\n {!!warning && (\n <Alert className={styles.warningAlert} type=\"warning\">\n {warning}\n </Alert>\n )}\n <FileList\n ref={fileListRef}\n fileItems={fileItems}\n editableFileItems={editableFileItems}\n fileDescriptionMaxLength={fileDescriptionMaxLength}\n sortable={sortable}\n disabled={disabled}\n readOnly={readOnly}\n onItemDelete={handleItemDelete}\n onItemUpdate={handleItemUpdate}\n onSort={handleSort}\n />\n {errorMessage && (\n <Alert className={styles.errorAlert} type=\"error\">\n {errorMessage}\n </Alert>\n )}\n {!readOnly && (\n <div className={styles.uploadButtonContainer}>\n <Button\n type=\"button\"\n sizeType=\"small\"\n styleType=\"secondary\"\n disabled={\n !!activeId || disabled || reachedMaxFiles()\n }\n onClick={handleUploadButtonClick}\n className={styles.uploadButton}\n >\n {labels.uploadButton}\n </Button>\n <Typography.BodyMD\n className={styles.uploadButtonText}\n weight=\"semibold\"\n >\n or drop them here\n </Typography.BodyMD>\n </div>\n )}\n </FileUploadDropzone>\n </FileUploadContext.Provider>\n );\n};\n"],"names":["styleType","fileItems","title","description","maxFiles","warning","className","name","id","testId","accept","capture","multiple","disabled","sortable","fileDescriptionMaxLength","editableFileItems","errorMessage","readOnly","customLabels","onChange","onDelete","onEdit","onSort","labels","uploadButton","uploadButtonLabel","dropzoneRef","useRef","fileListRef","activeId","setActiveId","useState","limitIncomingFiles","files","undefined","existingItemsCount","_a","length","remainingSlots","Math","max","slice","reachedMaxFiles","_jsx","FileUploadContext","Provider","value","children","_jsxs","FileUploadDropzone","ref","filesToProcess","current","focus","border","styles.textContainer","Typography","BodyBL","Markup","styles.markupContainer","baseTextSize","BodyMD","styles.description","Alert","styles.warningAlert","type","FileList","onItemDelete","item","onItemUpdate","updatedItem","updatedItems","styles.errorAlert","styles.uploadButtonContainer","Button","sizeType","onClick","event","preventDefault","openFileDialog","styles.uploadButton","styles.uploadButtonText","weight"],"mappings":"iVAc0B,EACtBA,YAAY,WACZC,YACAC,QACAC,cACAC,WACAC,UACAC,YACAC,OACAC,KACA,cAAeC,EACfC,SACAC,UACAC,WACAC,WACAC,YAAW,EACXC,2BACAC,qBAAoB,EACpBC,eACAC,WACAC,eACAC,WACAC,WACAC,SACAC,aAEA,MAA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Bf,SAC3C7C,IAMTyC,EAAAA,IAACe,SAAM,CAACrD,UAAWsD,EAAAA,gBAAwBC,aAAa,mBACnD1D,IAbE,UAuCAE,GACCuC,EAAAA,IAACoB,EAAAA,MAAK,CAAC1D,UAAW2D,EAAAA,aAAqBC,KAAK,UAASlB,SAChD3C,IAGTuC,MAACuB,EAAAA,SAAQ,CACLhB,IAAKtB,EACL5B,UAAWA,EACXe,kBAAmBA,EACnBD,yBAA0BA,EAC1BD,SAAUA,EACVD,SAAUA,EACVK,SAAUA,EACVkD,aA5HUC,UAClBhD,IACAA,EAASgD,GACU,QAAnBhC,EAAAR,EAAYwB,eAAO,IAAAhB,GAAAA,EAAEiB,QACzB,EAyHYgB,aA3GUC,IAClBjD,GACAA,EAAOiD,EACX,EAyGYhD,OAtGIiD,IACZjD,GACAA,EAAOiD,EACX,IAqGSvD,GACG2B,EAAAA,IAACoB,QAAK,CAAC1D,UAAWmE,aAAmBP,KAAK,QAAOlB,SAC5C/B,KAGPC,GACE+B,EAAAA,KAAA,MAAA,CAAK3C,UAAWoE,EAAAA,sBAA4B1B,SAAA,CACxCJ,EAAAA,IAAC+B,EAAAA,OAAM,CACHT,KAAK,SACLU,SAAS,QACT5E,UAAU,YACVa,WACMiB,GAAYjB,GAAY8B,IAE9BkC,QAtIpBC,IAEKjE,IACDiE,EAAMC,iBACFpD,EAAY0B,SACZ1B,EAAY0B,QAAQ2B,iBAE5B,EAgIoB1E,UAAW2E,EAAAA,aAAmBjC,SAE7BxB,EAAOC,eAEZmB,EAAAA,IAACa,EAAAA,WAAWK,OAAM,CACdxD,UAAW4E,EAAAA,iBACXC,OAAO,WAAUnC,SAAA,6BAOR"}
1
+ {"version":3,"file":"file-upload.js","sources":["../../../src/file-upload/file-upload.tsx"],"sourcesContent":["import { useRef, useState } from \"react\";\n\nimport { Alert } from \"../alert\";\nimport { Button } from \"../button\";\nimport { Markup } from \"../markup\";\nimport { Typography } from \"../typography\";\nimport { FileUploadContext } from \"./context\";\nimport type { DropzoneElement } from \"./dropzone\";\nimport { FileUploadDropzone } from \"./dropzone\";\nimport type { FileListRef } from \"./file-list\";\nimport { FileList } from \"./file-list\";\nimport * as styles from \"./file-upload.styles\";\nimport type { FileItemProps, FileUploadProps } from \"./types\";\n\n/** Allows user to upload images via drag-and-drop or a native file dialog. */\nexport const FileUpload = ({\n styleType = \"bordered\",\n fileItems,\n title,\n description,\n maxFiles,\n warning,\n className,\n name,\n id,\n \"data-testid\": testId,\n accept,\n capture,\n multiple,\n disabled,\n sortable = false,\n fileDescriptionMaxLength,\n editableFileItems = false,\n descriptionRequired = true,\n descriptionLabel,\n errorMessage,\n readOnly,\n customLabels,\n onChange,\n onDelete,\n onEdit,\n onSort,\n}: FileUploadProps) => {\n const labels = {\n uploadButton: customLabels?.uploadButtonLabel || \"Upload files\",\n };\n // =========================================================================\n // CONST, STATE, REFS\n // =========================================================================\n const dropzoneRef = useRef<DropzoneElement>(null);\n const fileListRef = useRef<FileListRef>(null);\n const [activeId, setActiveId] = useState<string>();\n\n // =========================================================================\n // EVENT HANDLERS\n // =========================================================================\n const handleChange = (files: File[]) => {\n const filesToProcess = limitIncomingFiles(files);\n\n if (!disabled && onChange && filesToProcess.length > 0) {\n onChange(filesToProcess);\n fileListRef.current?.focus();\n }\n };\n\n const handleItemDelete = (item: FileItemProps) => {\n if (onDelete) {\n onDelete(item);\n fileListRef.current?.focus();\n }\n };\n\n const handleUploadButtonClick = (\n event: React.MouseEvent<HTMLButtonElement>\n ) => {\n if (!disabled) {\n event.preventDefault();\n if (dropzoneRef.current) {\n dropzoneRef.current.openFileDialog();\n }\n }\n };\n\n const handleItemUpdate = (updatedItem: FileItemProps) => {\n if (onEdit) {\n onEdit(updatedItem);\n }\n };\n\n const handleSort = (updatedItems: FileItemProps[]) => {\n if (onSort) {\n onSort(updatedItems);\n }\n };\n\n // =========================================================================\n // HELPER FUNCTIONS\n // =========================================================================\n const limitIncomingFiles = (files: File[]) => {\n if (maxFiles === undefined) {\n return files;\n }\n\n const existingItemsCount = fileItems?.length ?? 0;\n const remainingSlots = Math.max(maxFiles - existingItemsCount, 0);\n\n return files.slice(0, remainingSlots);\n };\n\n const reachedMaxFiles = () => {\n return maxFiles && fileItems ? fileItems.length >= maxFiles : false;\n };\n\n // =========================================================================\n // RENDER FUNCTIONS\n // =========================================================================\n const renderTitle = () => {\n if (!title) {\n return null;\n }\n\n if (typeof title === \"string\") {\n return <Typography.BodyBL>{title}</Typography.BodyBL>;\n }\n\n return (\n <Markup\n className={styles.markupContainer}\n baseTextSize=\"body-baseline\"\n >\n {title}\n </Markup>\n );\n };\n\n const renderDescription = () => {\n if (!description) {\n return null;\n }\n\n if (typeof description === \"string\") {\n return (\n <Typography.BodyMD className={styles.description}>\n {description}\n </Typography.BodyMD>\n );\n }\n\n return (\n <Markup className={styles.markupContainer} baseTextSize=\"body-md\">\n {description}\n </Markup>\n );\n };\n\n return (\n <FileUploadContext.Provider value={{ activeId, setActiveId }}>\n <FileUploadDropzone\n ref={dropzoneRef}\n onChange={handleChange}\n id={id ? `${id}-dropzone` : \"dropzone\"}\n accept={accept}\n capture={capture}\n border={styleType === \"bordered\"}\n className={className}\n data-testid={testId}\n name={name}\n multiple={multiple}\n disabled={disabled || reachedMaxFiles() || readOnly}\n >\n {!!(title || description) && (\n <div className={styles.textContainer}>\n {renderTitle()}\n {renderDescription()}\n </div>\n )}\n {!!warning && (\n <Alert className={styles.warningAlert} type=\"warning\">\n {warning}\n </Alert>\n )}\n <FileList\n ref={fileListRef}\n fileItems={fileItems}\n editableFileItems={editableFileItems}\n descriptionRequired={descriptionRequired}\n descriptionLabel={descriptionLabel}\n fileDescriptionMaxLength={fileDescriptionMaxLength}\n sortable={sortable}\n disabled={disabled}\n readOnly={readOnly}\n onItemDelete={handleItemDelete}\n onItemUpdate={handleItemUpdate}\n onSort={handleSort}\n />\n {errorMessage && (\n <Alert className={styles.errorAlert} type=\"error\">\n {errorMessage}\n </Alert>\n )}\n {!readOnly && (\n <div className={styles.uploadButtonContainer}>\n <Button\n type=\"button\"\n sizeType=\"small\"\n styleType=\"secondary\"\n disabled={\n !!activeId || disabled || reachedMaxFiles()\n }\n onClick={handleUploadButtonClick}\n className={styles.uploadButton}\n >\n {labels.uploadButton}\n </Button>\n <Typography.BodyMD\n className={styles.uploadButtonText}\n weight=\"semibold\"\n >\n or drop them here\n </Typography.BodyMD>\n </div>\n )}\n </FileUploadDropzone>\n </FileUploadContext.Provider>\n );\n};\n"],"names":["styleType","fileItems","title","description","maxFiles","warning","className","name","id","testId","accept","capture","multiple","disabled","sortable","fileDescriptionMaxLength","editableFileItems","descriptionRequired","descriptionLabel","errorMessage","readOnly","customLabels","onChange","onDelete","onEdit","onSort","labels","uploadButton","uploadButtonLabel","dropzoneRef","useRef","fileListRef","activeId","setActiveId","useState","limitIncomingFiles","files","undefined","existingItemsCount","_a","length","remainingSlots","Math","max","slice","reachedMaxFiles","_jsx","FileUploadContext","Provider","value","children","_jsxs","FileUploadDropzone","ref","filesToProcess","current","focus","border","styles.textContainer","Typography","BodyBL","Markup","styles.markupContainer","baseTextSize","BodyMD","styles.description","Alert","styles.warningAlert","type","FileList","onItemDelete","item","onItemUpdate","updatedItem","updatedItems","styles.errorAlert","styles.uploadButtonContainer","Button","sizeType","onClick","event","preventDefault","openFileDialog","styles.uploadButton","styles.uploadButtonText","weight"],"mappings":"2VAe0B,EACtBA,YAAY,WACZC,YACAC,QACAC,cACAC,WACAC,UACAC,YACAC,OACAC,KACA,cAAeC,EACfC,SACAC,UACAC,WACAC,WACAC,YAAW,EACXC,2BACAC,qBAAoB,EACpBC,uBAAsB,EACtBC,mBACAC,eACAC,WACAC,eACAC,WACAC,WACAC,SACAC,aAEA,MAAMC,EAAS,CACXC,cAAcN,eAAAA,EAAcO,oBAAqB,gBAK/CC,EAAcC,EAAAA,OAAwB,MACtCC,EAAcD,EAAAA,OAAoB,OACjCE,EAAUC,GAAeC,aA+C1BC,EAAsBC,UACxB,QAAiBC,IAAbjC,EACA,OAAOg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AASlB,SAChD7C,IAGTyC,EAAAA,IAACuB,EAAAA,SAAQ,CACLhB,IAAKtB,EACL9B,UAAWA,EACXe,kBAAmBA,EACnBC,oBAAqBA,EACrBC,iBAAkBA,EAClBH,yBAA0BA,EAC1BD,SAAUA,EACVD,SAAUA,EACVO,SAAUA,EACVkD,aA9HUC,UAClBhD,IACAA,EAASgD,GACU,QAAnBhC,EAAAR,EAAYwB,eAAO,IAAAhB,GAAAA,EAAEiB,QACzB,EA2HYgB,aA7GUC,IAClBjD,GACAA,EAAOiD,EACX,EA2GYhD,OAxGIiD,IACZjD,GACAA,EAAOiD,EACX,IAuGSvD,GACG2B,EAAAA,IAACoB,EAAAA,MAAK,CAAC5D,UAAWqE,EAAAA,WAAmBP,KAAK,QAAOlB,SAC5C/B,KAGPC,GACE+B,EAAAA,KAAA,MAAA,CAAK7C,UAAWsE,EAAAA,sBAA4B1B,SAAA,CACxCJ,EAAAA,IAAC+B,EAAAA,OAAM,CACHT,KAAK,SACLU,SAAS,QACT9E,UAAU,YACVa,WACMmB,GAAYnB,GAAYgC,IAE9BkC,QAxIpBC,IAEKnE,IACDmE,EAAMC,iBACFpD,EAAY0B,SACZ1B,EAAY0B,QAAQ2B,iBAE5B,EAkIoB5E,UAAW6E,EAAAA,aAAmBjC,SAE7BxB,EAAOC,eAEZmB,EAAAA,IAACa,aAAWK,OAAM,CACd1D,UAAW8E,EAAAA,iBACXC,OAAO,WAAUnC,SAAA,6BAOR"}
@@ -1,8 +1,8 @@
1
- .t9vodht{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;margin-bottom:var(--fds-spacing-32);gap:var(--fds-spacing-8);}
1
+ @layer fds{.t9vodht{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;margin-bottom:var(--fds-spacing-32);gap:var(--fds-spacing-8);}
2
2
  .m7vp3hf{color:var(--fds-colour-text);}
3
3
  .dhybrj2{color:var(--fds-colour-text-subtler);}
4
4
  .wq1el8u{margin-bottom:var(--fds-spacing-32);}
5
5
  .u723luu{width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;-webkit-align-items:flex-end;-webkit-box-align:flex-end;-ms-flex-align:flex-end;align-items:flex-end;}:where(body.fds-breakpoint-md-max) .u723luu{-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;}
6
6
  .u7dp799{width:10rem;}:where(body.fds-breakpoint-md-max) .u7dp799{width:100%;}
7
7
  .u1rz06ff{color:var(--fds-colour-text-subtler);margin-top:var(--fds-spacing-8);width:10rem;text-align:center;}:where(body.fds-breakpoint-md-max) .u1rz06ff{display:none;visibility:hidden;}
8
- .emjmrml{margin-bottom:var(--fds-spacing-32);}
8
+ .emjmrml{margin-bottom:var(--fds-spacing-32);}}
@@ -1,2 +1,2 @@
1
- "use strict";require("./filter-item-checkbox.styles_18l87i2.css");exports.checkbox="c13wglju",exports.filterItem="f1m3a5f4",exports.group="g11488am",exports.groupMobileToggleMode="g1nnu0tt",exports.item="i4hhc1a",exports.itemHidden="i7vabkq",exports.itemSelected="i4eh8j6",exports.selectAllButton="sbvftpe",exports.toggle="twhh8xx",exports.toggleHidden="tb2fwos",exports.tokens={item:{level:"--fds-internal-filterItemCheckbox-item-level"}};
1
+ "use strict";require("./filter-item-checkbox.styles_7degw7.css");exports.checkbox="c13wglju",exports.filterItem="f1m3a5f4",exports.group="g11488am",exports.groupMobileToggleMode="g1nnu0tt",exports.item="i4hhc1a",exports.itemHidden="i7vabkq",exports.itemSelected="i4eh8j6",exports.selectAllButton="sbvftpe",exports.toggle="twhh8xx",exports.toggleHidden="tb2fwos",exports.tokens={item:{level:"--fds-internal-filterItemCheckbox-item-level"}};
2
2
  //# sourceMappingURL=filter-item-checkbox.styles.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"filter-item-checkbox.styles.js","sources":["../../../../src/filter/addons/filter-item-checkbox.styles.ts"],"sourcesContent":["import { css } from \"@linaria/core\";\n\nimport { Colour, Font, MediaQuery, Spacing } from \"../../theme\";\n\nexport const tokens = {\n item: {\n level: \"--fds-internal-filterItemCheckbox-item-level\",\n },\n} as const;\n\nexport const filterItem = css`\n padding: 0 0 ${Spacing[\"spacing-16\"]};\n\n [data-id=\"content-container\"] {\n position: relative; // to get the item position relative to this parent\n padding: ${Spacing[\"spacing-8\"]} ${Spacing[\"spacing-8\"]} 0;\n\n ${MediaQuery.MaxWidth.lg} {\n padding: ${Spacing[\"spacing-16\"]} ${Spacing[\"spacing-20\"]}\n ${Spacing[\"spacing-8\"]};\n }\n }\n\n [data-id=\"minimise-button\"] {\n margin: ${Spacing[\"spacing-8\"]} ${Spacing[\"spacing-20\"]} 0;\n }\n`;\n\nexport const group = css`\n display: flex;\n flex-direction: column;\n\n ${MediaQuery.MaxWidth.lg} {\n flex-direction: row;\n flex-wrap: wrap;\n gap: 0;\n }\n`;\n\nexport const groupMobileToggleMode = css`\n ${MediaQuery.MaxWidth.lg} {\n gap: ${Spacing[\"spacing-16\"]};\n }\n`;\n\nexport const item = css`\n ${tokens.item.level}: 0;\n\n display: flex;\n align-items: flex-start;\n\n position: relative;\n width: 100%;\n min-height: 1.5rem;\n padding: ${Spacing[\"spacing-8\"]} ${Spacing[\"spacing-12\"]};\n padding-left: calc(\n ${Spacing[\"spacing-12\"]} + var(${tokens.item.level}) *\n ${Spacing[\"spacing-32\"]}\n );\n\n cursor: pointer;\n ${Font[\"body-md-regular\"]}\n color: ${Colour[\"text\"]};\n\n ${MediaQuery.MaxWidth.lg} {\n padding: ${Spacing[\"spacing-8\"]};\n padding-left: calc(\n ${Spacing[\"spacing-8\"]} + var(${tokens.item.level}) *\n ${Spacing[\"spacing-32\"]}\n );\n }\n`;\n\nexport const itemHidden = css`\n display: none;\n`;\n\nexport const itemSelected = css`\n color: ${Colour[\"text-selected\"]};\n`;\n\nexport const checkbox = css`\n flex-shrink: 0;\n margin-right: ${Spacing[\"spacing-8\"]};\n`;\n\nexport const toggle = css`\n min-width: 5rem;\n`;\n\nexport const toggleHidden = css`\n visibility: hidden;\n`;\n\nexport const selectAllButton = css`\n height: fit-content;\n padding: 0;\n margin: ${Spacing[\"spacing-16\"]} 0 ${Spacing[\"spacing-8\"]}\n ${Spacing[\"spacing-12\"]};\n\n ${MediaQuery.MaxWidth.lg} {\n margin: 0 0 ${Spacing[\"spacing-16\"]} 0;\n }\n`;\n"],"names":["item","level"],"mappings":"gHAiFqB,8BAvEE,yBAkBL,yCAWgB,wBAMjB,6BA4BM,+BAIE,kCAiBG,yBART,+BAIM,yBAtFH,CAClBA,KAAM,CACFC,MAAO"}
1
+ {"version":3,"file":"filter-item-checkbox.styles.js","sources":["../../../../src/filter/addons/filter-item-checkbox.styles.ts"],"sourcesContent":["import { css } from \"@linaria/core\";\n\nimport { Colour, Font, MediaQuery, Spacing } from \"../../theme\";\n\nexport const tokens = {\n item: {\n level: \"--fds-internal-filterItemCheckbox-item-level\",\n },\n} as const;\n\nexport const filterItem = css`\n padding: 0 0 ${Spacing[\"spacing-16\"]};\n\n [data-id=\"content-container\"] {\n position: relative; // to get the item position relative to this parent\n padding: ${Spacing[\"spacing-8\"]} ${Spacing[\"spacing-8\"]} 0;\n\n ${MediaQuery.MaxWidth.lg} {\n padding: ${Spacing[\"spacing-16\"]} ${Spacing[\"spacing-20\"]}\n ${Spacing[\"spacing-8\"]};\n }\n }\n\n [data-id=\"minimise-button\"] {\n margin: ${Spacing[\"spacing-8\"]} ${Spacing[\"spacing-20\"]} 0;\n }\n`;\n\nexport const group = css`\n display: flex;\n flex-direction: column;\n\n ${MediaQuery.MaxWidth.lg} {\n flex-direction: row;\n flex-wrap: wrap;\n gap: 0;\n }\n`;\n\nexport const groupMobileToggleMode = css`\n ${MediaQuery.MaxWidth.lg} {\n gap: ${Spacing[\"spacing-16\"]};\n }\n`;\n\nexport const item = css`\n ${tokens.item.level}: 0;\n\n display: flex;\n align-items: flex-start;\n\n position: relative;\n width: 100%;\n min-height: 1.5rem;\n padding: ${Spacing[\"spacing-8\"]} ${Spacing[\"spacing-12\"]};\n padding-left: calc(\n ${Spacing[\"spacing-12\"]} + var(${tokens.item.level}) *\n ${Spacing[\"spacing-32\"]}\n );\n\n cursor: pointer;\n ${Font[\"body-md-regular\"]}\n color: ${Colour[\"text\"]};\n\n ${MediaQuery.MaxWidth.lg} {\n padding: ${Spacing[\"spacing-8\"]};\n padding-left: calc(\n ${Spacing[\"spacing-8\"]} + var(${tokens.item.level}) *\n ${Spacing[\"spacing-32\"]}\n );\n }\n`;\n\nexport const itemHidden = css`\n display: none;\n`;\n\nexport const itemSelected = css`\n color: ${Colour[\"text-selected\"]};\n`;\n\nexport const checkbox = css`\n flex-shrink: 0;\n margin-right: ${Spacing[\"spacing-8\"]};\n`;\n\nexport const toggle = css`\n min-width: 5rem;\n`;\n\nexport const toggleHidden = css`\n visibility: hidden;\n`;\n\nexport const selectAllButton = css`\n height: fit-content;\n padding: 0;\n margin: ${Spacing[\"spacing-16\"]} 0 ${Spacing[\"spacing-8\"]}\n ${Spacing[\"spacing-12\"]};\n\n ${MediaQuery.MaxWidth.lg} {\n margin: 0 0 ${Spacing[\"spacing-16\"]} 0;\n }\n`;\n"],"names":["item","level"],"mappings":"+GAiFqB,8BAvEE,yBAkBL,yCAWgB,wBAMjB,6BA4BM,+BAIE,kCAiBG,yBART,+BAIM,yBAtFH,CAClBA,KAAM,CACFC,MAAO"}
@@ -1,10 +1,10 @@
1
- .f1m3a5f4{padding:0 0 var(--fds-spacing-16);}.f1m3a5f4 [data-id="content-container"]{position:relative;padding:var(--fds-spacing-8) var(--fds-spacing-8) 0;}:where(body.fds-breakpoint-lg-max) .f1m3a5f4 [data-id="content-container"]{padding:var(--fds-spacing-16) var(--fds-spacing-20) var(--fds-spacing-8);}.f1m3a5f4 [data-id="minimise-button"]{margin:var(--fds-spacing-8) var(--fds-spacing-20) 0;}
1
+ @layer fds{.f1m3a5f4{padding:0 0 var(--fds-spacing-16);}.f1m3a5f4 [data-id="content-container"]{position:relative;padding:var(--fds-spacing-8) var(--fds-spacing-8) 0;}:where(body.fds-breakpoint-lg-max) .f1m3a5f4 [data-id="content-container"]{padding:var(--fds-spacing-16) var(--fds-spacing-20) var(--fds-spacing-8);}.f1m3a5f4 [data-id="minimise-button"]{margin:var(--fds-spacing-8) var(--fds-spacing-20) 0;}
2
2
  .g11488am{display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}:where(body.fds-breakpoint-lg-max) .g11488am{-webkit-flex-direction:row;-ms-flex-direction:row;flex-direction:row;-webkit-box-flex-wrap:wrap;-webkit-flex-wrap:wrap;-ms-flex-wrap:wrap;flex-wrap:wrap;gap:0;}
3
3
  :where(body.fds-breakpoint-lg-max) .g1nnu0tt{gap:var(--fds-spacing-16);}
4
4
  .i4hhc1a{--fds-internal-filterItemCheckbox-item-level:0;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:flex-start;-webkit-box-align:flex-start;-ms-flex-align:flex-start;align-items:flex-start;position:relative;width:100%;min-height:1.5rem;padding:var(--fds-spacing-8) var(--fds-spacing-12);padding-left:calc(
5
5
  var(--fds-spacing-12) + var(--fds-internal-filterItemCheckbox-item-level) *
6
6
  var(--fds-spacing-32)
7
- );cursor:pointer;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-regular);line-height:var(--fds-font-body-lh-md);letter-spacing:var(--fds-font-body-ls-md);color:var(--fds-colour-text);}:where(body.fds-breakpoint-lg-max) .i4hhc1a{padding:var(--fds-spacing-8);padding-left:calc(
7
+ );cursor:pointer;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-regular);line-height:var(--fds-font-body-lh-md);letter-spacing:var(--fds-font-body-ls-md);color:var(--fds-colour-text);}:where(body.fds-breakpoint-lg-max) .i4hhc1a{padding:var(--fds-spacing-8);padding-left:calc(
8
8
  var(--fds-spacing-8) + var(--fds-internal-filterItemCheckbox-item-level) *
9
9
  var(--fds-spacing-32)
10
10
  );}
@@ -13,4 +13,4 @@
13
13
  .c13wglju{-webkit-flex-shrink:0;-ms-flex-negative:0;flex-shrink:0;margin-right:var(--fds-spacing-8);}
14
14
  .twhh8xx{min-width:5rem;}
15
15
  .tb2fwos{visibility:hidden;}
16
- .sbvftpe{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;padding:0;margin:var(--fds-spacing-16) 0 var(--fds-spacing-8) var(--fds-spacing-12);}:where(body.fds-breakpoint-lg-max) .sbvftpe{margin:0 0 var(--fds-spacing-16) 0;}
16
+ .sbvftpe{height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;padding:0;margin:var(--fds-spacing-16) 0 var(--fds-spacing-8) var(--fds-spacing-12);}:where(body.fds-breakpoint-lg-max) .sbvftpe{margin:0 0 var(--fds-spacing-16) 0;}}
@@ -0,0 +1,2 @@
1
+ "use strict";var e=require("react/jsx-runtime"),r=require("../badge/badge.js");exports.FilterBadge=({count:a})=>void 0!==a&&a>0?e.jsx(r.Badge,{count:a,variant:"square-number","aria-label":`${a} selected`}):null;
2
+ //# sourceMappingURL=filter-badge.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-badge.js","sources":["../../../src/filter/filter-badge.tsx"],"sourcesContent":["import { Badge } from \"../badge\";\n\ninterface FilterBadgeProps {\n count?: number;\n}\n\nexport const FilterBadge = ({ count }: FilterBadgeProps) =>\n count !== undefined && count > 0 ? (\n <Badge\n count={count}\n variant=\"square-number\"\n aria-label={`${count} selected`}\n />\n ) : null;\n"],"names":["count","undefined","_jsx","Badge","variant"],"mappings":"mGAM2B,EAAGA,gBAChBC,IAAVD,GAAuBA,EAAQ,EAC3BE,EAAAA,IAACC,EAAAA,MAAK,CACFH,MAAOA,EACPI,QAAQ,6BACI,GAAGJ,eAEnB"}
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("react/jsx-runtime"),i=require("@lifesg/react-icons/chevron-left"),s=require("../button/button.js"),r=require("../shared/clickable-icon/clickable-icon.js"),t=require("./filter.styles.js"),l=require("./filter-item-page.styles.js");const n=({onDismiss:n,onDone:c,children:o})=>e.jsxs("div",{className:l.filterItemPageContainer,children:[e.jsx(r.ClickableIcon,{className:t.filterHeaderButton,onClick:n,focusOutline:"browser",focusHighlight:!1,"aria-label":"Dismiss",children:e.jsx(i.ChevronLeftIcon,{})}),e.jsx("div",{className:t.filterBody,children:o}),e.jsx("div",{className:t.filterFooter,children:e.jsx(s.Button,{className:t.filterDoneButton,onClick:c,type:"button",children:"Done"})})]});n.displayName="Filter.Page",exports.FilterItemPage=n;
1
+ "use strict";var e=require("react/jsx-runtime"),i=require("@lifesg/react-icons/chevron-left"),t=require("../button/button.js"),s=require("../shared/clickable-icon/clickable-icon.js"),r=require("./filter.styles.js"),l=require("./filter-item-page.styles.js");const a=({onDismiss:a,onDone:n,children:c,"data-testid":o})=>e.jsxs("div",{className:l.filterItemPageContainer,"data-testid":o,children:[e.jsx(s.ClickableIcon,{className:r.filterHeaderButton,onClick:a,focusOutline:"browser",focusHighlight:!1,"aria-label":"Dismiss",children:e.jsx(i.ChevronLeftIcon,{})}),e.jsx("div",{className:r.filterBody,children:c}),e.jsx("div",{className:r.filterFooter,children:e.jsx(t.Button,{className:r.filterDoneButton,onClick:n,type:"button",children:"Done"})})]});a.displayName="Filter.Page",exports.FilterItemPage=a;
2
2
  //# sourceMappingURL=filter-item-page.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"filter-item-page.js","sources":["../../../src/filter/filter-item-page.tsx"],"sourcesContent":["import { ChevronLeftIcon } from \"@lifesg/react-icons/chevron-left\";\n\nimport { Button } from \"../button\";\nimport { ClickableIcon } from \"../shared/clickable-icon\";\nimport * as filterStyles from \"./filter.styles\";\nimport * as styles from \"./filter-item-page.styles\";\nimport type { FilterPageProps } from \"./types\";\n\nexport const FilterItemPage = ({\n onDismiss,\n onDone,\n children,\n}: FilterPageProps) => {\n return (\n <div className={styles.filterItemPageContainer}>\n <ClickableIcon\n className={filterStyles.filterHeaderButton}\n onClick={onDismiss}\n focusOutline=\"browser\"\n focusHighlight={false}\n aria-label=\"Dismiss\"\n >\n <ChevronLeftIcon />\n </ClickableIcon>\n <div className={filterStyles.filterBody}>{children}</div>\n <div className={filterStyles.filterFooter}>\n <Button\n className={filterStyles.filterDoneButton}\n onClick={onDone}\n type=\"button\"\n >\n Done\n </Button>\n </div>\n </div>\n );\n};\n\nFilterItemPage.displayName = \"Filter.Page\";\n"],"names":["FilterItemPage","onDismiss","onDone","children","_jsxs","className","styles.filterItemPageContainer","_jsx","ClickableIcon","filterStyles.filterHeaderButton","onClick","focusOutline","focusHighlight","ChevronLeftIcon","filterStyles.filterBody","filterStyles.filterFooter","Button","filterStyles.filterDoneButton","type","displayName"],"mappings":"iQAQO,MAAMA,EAAiB,EAC1BC,YACAC,SACAC,cAGIC,OAAA,MAAA,CAAKC,UAAWC,EAAAA,wBAA8BH,SAAA,CAC1CI,EAAAA,IAACC,EAAAA,cAAa,CACVH,UAAWI,EAAAA,mBACXC,QAAST,EACTU,aAAa,UACbC,gBAAgB,eACL,UAAST,SAEpBI,MAACM,EAAAA,sBAELN,EAAAA,IAAA,MAAA,CAAKF,UAAWS,sBAA0BX,IAC1CI,EAAAA,IAAA,MAAA,CAAKF,UAAWU,EAAAA,sBACZR,EAAAA,IAACS,EAAAA,OAAM,CACHX,UAAWY,mBACXP,QAASR,EACTgB,KAAK,SAAQf,SAAA,cASjCH,EAAemB,YAAc"}
1
+ {"version":3,"file":"filter-item-page.js","sources":["../../../src/filter/filter-item-page.tsx"],"sourcesContent":["import { ChevronLeftIcon } from \"@lifesg/react-icons/chevron-left\";\n\nimport { Button } from \"../button\";\nimport { ClickableIcon } from \"../shared/clickable-icon\";\nimport * as filterStyles from \"./filter.styles\";\nimport * as styles from \"./filter-item-page.styles\";\nimport type { FilterPageProps } from \"./types\";\n\nexport const FilterItemPage = ({\n onDismiss,\n onDone,\n children,\n \"data-testid\": dataTestId,\n}: FilterPageProps) => {\n return (\n <div\n className={styles.filterItemPageContainer}\n data-testid={dataTestId}\n >\n <ClickableIcon\n className={filterStyles.filterHeaderButton}\n onClick={onDismiss}\n focusOutline=\"browser\"\n focusHighlight={false}\n aria-label=\"Dismiss\"\n >\n <ChevronLeftIcon />\n </ClickableIcon>\n <div className={filterStyles.filterBody}>{children}</div>\n <div className={filterStyles.filterFooter}>\n <Button\n className={filterStyles.filterDoneButton}\n onClick={onDone}\n type=\"button\"\n >\n Done\n </Button>\n </div>\n </div>\n );\n};\n\nFilterItemPage.displayName = \"Filter.Page\";\n"],"names":["FilterItemPage","onDismiss","onDone","children","dataTestId","_jsxs","className","styles.filterItemPageContainer","_jsx","ClickableIcon","filterStyles.filterHeaderButton","onClick","focusOutline","focusHighlight","ChevronLeftIcon","filterStyles.filterBody","filterStyles.filterFooter","Button","filterStyles.filterDoneButton","type","displayName"],"mappings":"iQAQO,MAAMA,EAAiB,EAC1BC,YACAC,SACAC,WACA,cAAeC,KAGXC,OAAA,MAAA,CACIC,UAAWC,EAAAA,wBAA8B,cAC5BH,YAEbI,EAAAA,IAACC,EAAAA,cAAa,CACVH,UAAWI,EAAAA,mBACXC,QAASV,EACTW,aAAa,UACbC,gBAAgB,EAAK,aACV,UAASV,SAEpBK,EAAAA,IAACM,EAAAA,gBAAe,CAAA,KAEpBN,EAAAA,IAAA,MAAA,CAAKF,UAAWS,EAAAA,oBAA0BZ,IAC1CK,EAAAA,IAAA,MAAA,CAAKF,UAAWU,EAAAA,sBACZR,MAACS,EAAAA,OAAM,CACHX,UAAWY,mBACXP,QAAST,EACTiB,KAAK,SAAQhB,SAAA,cASjCH,EAAeoB,YAAc"}
@@ -1 +1 @@
1
- .f94l7xt{background-color:var(--fds-colour-bg);height:100%;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}
1
+ @layer fds{.f94l7xt{background-color:var(--fds-colour-bg);height:100%;width:100%;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}}