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

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 (684) hide show
  1. package/accordion/accordion.js.map +1 -1
  2. package/alert/alert.js.map +1 -1
  3. package/alert/types.d.ts +2 -0
  4. package/animations/loading-dots/loading-dots.d.ts +5 -2
  5. package/animations/loading-dots/loading-dots.js.map +1 -1
  6. package/animations/loading-dots-spinner/loading-dots-spinner.d.ts +3 -0
  7. package/animations/loading-dots-spinner/loading-dots-spinner.js.map +1 -1
  8. package/animations/loading-dots-spinner/lottie-animation.d.ts +2 -2
  9. package/animations/loading-dots-spinner/lottie-animation.js.map +1 -1
  10. package/animations/loading-spinner/loading-spinner.d.ts +5 -2
  11. package/animations/loading-spinner/loading-spinner.js.map +1 -1
  12. package/animations/themed-loading-spinner/themed-loading-spinner.d.ts +5 -2
  13. package/animations/themed-loading-spinner/themed-loading-spinner.js.map +1 -1
  14. package/animations/types.d.ts +13 -6
  15. package/avatar/avatar.js.map +1 -1
  16. package/badge/badge.js.map +1 -1
  17. package/badge/types.d.ts +13 -2
  18. package/box-container/box-container.js.map +1 -1
  19. package/box-container/types.d.ts +2 -0
  20. package/breadcrumb/breadcrumb.js.map +1 -1
  21. package/breadcrumb/types.d.ts +7 -2
  22. package/button/button.js.map +1 -1
  23. package/button/types.d.ts +5 -0
  24. package/calendar/calendar.js.map +1 -1
  25. package/calendar/types.d.ts +3 -3
  26. package/card/card.js.map +1 -1
  27. package/checkbox/checkbox.js.map +1 -1
  28. package/checkbox/types.d.ts +4 -0
  29. package/cjs/accordion/accordion.js.map +1 -1
  30. package/cjs/alert/alert.js.map +1 -1
  31. package/cjs/animations/loading-dots/loading-dots.js.map +1 -1
  32. package/cjs/animations/loading-dots-spinner/loading-dots-spinner.js.map +1 -1
  33. package/cjs/animations/loading-dots-spinner/lottie-animation.js.map +1 -1
  34. package/cjs/animations/loading-spinner/loading-spinner.js.map +1 -1
  35. package/cjs/animations/themed-loading-spinner/themed-loading-spinner.js.map +1 -1
  36. package/cjs/avatar/avatar.js.map +1 -1
  37. package/cjs/badge/badge.js.map +1 -1
  38. package/cjs/box-container/box-container.js.map +1 -1
  39. package/cjs/breadcrumb/breadcrumb.js.map +1 -1
  40. package/cjs/button/button.js.map +1 -1
  41. package/cjs/calendar/calendar.js.map +1 -1
  42. package/cjs/card/card.js.map +1 -1
  43. package/cjs/checkbox/checkbox.js.map +1 -1
  44. package/cjs/countdown-timer/countdown-timer.js.map +1 -1
  45. package/cjs/dashed-border/dashed-border.js.map +1 -1
  46. package/cjs/data-table/data-table.js.map +1 -1
  47. package/cjs/date-input/date-input.js.map +1 -1
  48. package/cjs/date-navigator/date-navigator.js.map +1 -1
  49. package/cjs/date-range-input/date-range-input.js.map +1 -1
  50. package/cjs/divider/divider.js.map +1 -1
  51. package/cjs/drawer/drawer.js.map +1 -1
  52. package/cjs/e-signature/e-signature.js.map +1 -1
  53. package/cjs/error-display/error-display.js.map +1 -1
  54. package/cjs/feedback-rating/feedback-rating.js.map +1 -1
  55. package/cjs/file-download/file-download.js.map +1 -1
  56. package/cjs/file-upload/file-item-edit.js.map +1 -1
  57. package/cjs/file-upload/file-list/file-list.js.map +1 -1
  58. package/cjs/file-upload/file-list-item/file-list-item.js.map +1 -1
  59. package/cjs/file-upload/file-list-item/file-list-item.styles.js +1 -1
  60. package/cjs/file-upload/file-list-item/file-list-item.styles.js.map +1 -1
  61. package/cjs/file-upload/file-list-item/{file-list-item.styles_o8000f.css → file-list-item.styles_kgtfke.css} +1 -1
  62. package/cjs/file-upload/file-upload.js.map +1 -1
  63. package/cjs/filter/addons/filter-item-checkbox-helpers.js.map +1 -1
  64. package/cjs/filter/addons/filter-item-checkbox.js.map +1 -1
  65. package/cjs/filter/filter-item.js +1 -1
  66. package/cjs/filter/filter-item.js.map +1 -1
  67. package/cjs/filter/filter.js.map +1 -1
  68. package/cjs/footer/footer.js.map +1 -1
  69. package/cjs/form/form-custom-field/form-custom-field.js +2 -0
  70. package/cjs/form/form-custom-field/form-custom-field.js.map +1 -0
  71. package/cjs/form/form-date-input/form-date-input.js +2 -0
  72. package/cjs/form/form-date-input/form-date-input.js.map +1 -0
  73. package/cjs/form/form-date-range-input/form-date-range-input.js +2 -0
  74. package/cjs/form/form-date-range-input/form-date-range-input.js.map +1 -0
  75. package/cjs/form/form-e-signature/form-e-signature.js +2 -0
  76. package/cjs/form/form-e-signature/form-e-signature.js.map +1 -0
  77. package/cjs/form/form-histogram-slider/form-histogram-slider.js +2 -0
  78. package/cjs/form/form-histogram-slider/form-histogram-slider.js.map +1 -0
  79. package/cjs/form/form-input/form-input.js +2 -0
  80. package/cjs/form/form-input/form-input.js.map +1 -0
  81. package/cjs/form/form-input-group/form-input-group.js +2 -0
  82. package/cjs/form/form-input-group/form-input-group.js.map +1 -0
  83. package/cjs/form/form-label/form-label-addon.js +2 -0
  84. package/cjs/form/form-label/form-label-addon.js.map +1 -0
  85. package/cjs/form/form-label/form-label-addon.styles.js +2 -0
  86. package/cjs/form/form-label/form-label-addon.styles.js.map +1 -0
  87. package/cjs/form/form-label/form-label-addon.styles_aztasj.css +1 -0
  88. package/cjs/form/form-label/form-label.js +2 -0
  89. package/cjs/form/form-label/form-label.js.map +1 -0
  90. package/cjs/form/form-label/form-label.styles.js +2 -0
  91. package/cjs/form/form-label/form-label.styles.js.map +1 -0
  92. package/cjs/form/form-label/form-label.styles_180zf7j.css +6 -0
  93. package/cjs/form/form-masked-input/form-masked-input.js +2 -0
  94. package/cjs/form/form-masked-input/form-masked-input.js.map +1 -0
  95. package/cjs/form/form-multi-select/form-multi-select.js +2 -0
  96. package/cjs/form/form-multi-select/form-multi-select.js.map +1 -0
  97. package/cjs/form/form-nested-multi-select/form-nested-multi-select.js +2 -0
  98. package/cjs/form/form-nested-multi-select/form-nested-multi-select.js.map +1 -0
  99. package/cjs/form/form-nested-select/form-nested-select.js +2 -0
  100. package/cjs/form/form-nested-select/form-nested-select.js.map +1 -0
  101. package/cjs/form/form-otp-verification/form-otp-verification.js +2 -0
  102. package/cjs/form/form-otp-verification/form-otp-verification.js.map +1 -0
  103. package/cjs/form/form-phone-number-input/form-phone-number-input.js +2 -0
  104. package/cjs/form/form-phone-number-input/form-phone-number-input.js.map +1 -0
  105. package/cjs/form/form-predictive-text-input/form-predictive-text-input.js +2 -0
  106. package/cjs/form/form-predictive-text-input/form-predictive-text-input.js.map +1 -0
  107. package/cjs/form/form-range-select/form-range-select.js +2 -0
  108. package/cjs/form/form-range-select/form-range-select.js.map +1 -0
  109. package/cjs/form/form-range-slider/form-range-slider.js +2 -0
  110. package/cjs/form/form-range-slider/form-range-slider.js.map +1 -0
  111. package/cjs/form/form-select/form-select.js +2 -0
  112. package/cjs/form/form-select/form-select.js.map +1 -0
  113. package/cjs/form/form-select-histogram/form-select-histogram.js +2 -0
  114. package/cjs/form/form-select-histogram/form-select-histogram.js.map +1 -0
  115. package/cjs/form/form-slider/form-slider.js +2 -0
  116. package/cjs/form/form-slider/form-slider.js.map +1 -0
  117. package/cjs/form/form-textarea/form-textarea.js +2 -0
  118. package/cjs/form/form-textarea/form-textarea.js.map +1 -0
  119. package/cjs/form/form-textarea/form-textarea.styles.js +2 -0
  120. package/cjs/form/form-textarea/form-textarea.styles.js.map +1 -0
  121. package/cjs/form/form-textarea/form-textarea.styles_1kneyif.css +3 -0
  122. package/cjs/form/form-time-range-picker/form-time-range-picker.js +2 -0
  123. package/cjs/form/form-time-range-picker/form-time-range-picker.js.map +1 -0
  124. package/cjs/form/form-timepicker/form-timepicker.js +2 -0
  125. package/cjs/form/form-timepicker/form-timepicker.js.map +1 -0
  126. package/cjs/form/form-unit-number-input/form-unit-number-input.js +2 -0
  127. package/cjs/form/form-unit-number-input/form-unit-number-input.js.map +1 -0
  128. package/cjs/form/form-wrapper.js +1 -1
  129. package/cjs/form/form-wrapper.js.map +1 -1
  130. package/cjs/form/index.js +1 -1
  131. package/cjs/form/index.js.map +1 -1
  132. package/cjs/fullscreen-image-carousel/fullscreen-image-carousel.js.map +1 -1
  133. package/cjs/histogram-slider/histogram-slider.js.map +1 -1
  134. package/cjs/image-button/image-button.js.map +1 -1
  135. package/cjs/input/input.js.map +1 -1
  136. package/cjs/input-group/input-group.js.map +1 -1
  137. package/cjs/input-multi-select/input-multi-select.js.map +1 -1
  138. package/cjs/input-nested-multi-select/input-nested-multi-select.js.map +1 -1
  139. package/cjs/input-nested-select/input-nested-select.js.map +1 -1
  140. package/cjs/input-range-select/input-range-select.js.map +1 -1
  141. package/cjs/input-range-slider/input-range-slider.js.map +1 -1
  142. package/cjs/input-select/input-select.js.map +1 -1
  143. package/cjs/input-slider/input-slider.js.map +1 -1
  144. package/cjs/input-textarea/textarea.js.map +1 -1
  145. package/cjs/input-textarea/textarea.styles.js +1 -1
  146. package/cjs/input-textarea/textarea.styles.js.map +1 -1
  147. package/cjs/input-textarea/{textarea.styles_22z4n3.css → textarea.styles_q77m5x.css} +1 -1
  148. package/cjs/language-switcher/language-switcher.js.map +1 -1
  149. package/cjs/layout/index.js.map +1 -1
  150. package/cjs/link-list/components/common.js.map +1 -1
  151. package/cjs/link-list/components/link-list-eager.js.map +1 -1
  152. package/cjs/link-list/components/link-list-lazy.js.map +1 -1
  153. package/cjs/link-list/link-list.js.map +1 -1
  154. package/cjs/local-nav/local-nav-dropdown/local-nav-dropdown.js.map +1 -1
  155. package/cjs/local-nav/local-nav-menu/local-nav-menu.js.map +1 -1
  156. package/cjs/markup/markup.js.map +1 -1
  157. package/cjs/masked-input/masked-input.js.map +1 -1
  158. package/cjs/masthead/masthead.js.map +1 -1
  159. package/cjs/menu/menu.js.map +1 -1
  160. package/cjs/modal/index.js.map +1 -1
  161. package/cjs/modal-v2/modal-v2.js.map +1 -1
  162. package/cjs/navbar/navbar.js.map +1 -1
  163. package/cjs/notification-banner/notification-banner.js.map +1 -1
  164. package/cjs/otp-input/otp-input.js +1 -1
  165. package/cjs/otp-input/otp-input.js.map +1 -1
  166. package/cjs/otp-verification/contact-input-section.js +1 -1
  167. package/cjs/otp-verification/contact-input-section.js.map +1 -1
  168. package/cjs/otp-verification/otp-verification.js.map +1 -1
  169. package/cjs/otp-verification/verification-section.js +1 -1
  170. package/cjs/otp-verification/verification-section.js.map +1 -1
  171. package/cjs/overlay/overlay.js.map +1 -1
  172. package/cjs/pagination/pagination.js.map +1 -1
  173. package/cjs/phone-number-input/phone-number-input.js.map +1 -1
  174. package/cjs/pill/pill.js.map +1 -1
  175. package/cjs/popover/popover-inline/popover-inline.js.map +1 -1
  176. package/cjs/popover/popover.js.map +1 -1
  177. package/cjs/predictive-text-input/predictive-text-input.js +1 -1
  178. package/cjs/predictive-text-input/predictive-text-input.js.map +1 -1
  179. package/cjs/progress-indicator/progress-indicator.js.map +1 -1
  180. package/cjs/radio-button/radio-button.js.map +1 -1
  181. package/cjs/schedule/schedule.js.map +1 -1
  182. package/cjs/select-histogram/select-histogram.js.map +1 -1
  183. package/cjs/shared/dropdown-list/dropdown-list.js +1 -1
  184. package/cjs/shared/dropdown-list/dropdown-list.js.map +1 -1
  185. package/cjs/shared/dropdown-wrapper/element-with-dropdown.js +1 -1
  186. package/cjs/shared/dropdown-wrapper/element-with-dropdown.js.map +1 -1
  187. package/cjs/sidenav/sidenav.js.map +1 -1
  188. package/cjs/singpass-button/singpass-button.js.map +1 -1
  189. package/cjs/smart-app-banner/smart-app-banner.js.map +1 -1
  190. package/cjs/tab/tab.js.map +1 -1
  191. package/cjs/table/table.js.map +1 -1
  192. package/cjs/tag/tag.js.map +1 -1
  193. package/cjs/text-list/index.js.map +1 -1
  194. package/cjs/theme/theme-provider/hooks.js.map +1 -1
  195. package/cjs/theme/theme-provider/index.js.map +1 -1
  196. package/cjs/theme/tokens/border.js.map +1 -1
  197. package/cjs/theme/tokens/breakpoint.js.map +1 -1
  198. package/cjs/theme/tokens/colour.js.map +1 -1
  199. package/cjs/theme/tokens/component.js.map +1 -1
  200. package/cjs/theme/tokens/font.js.map +1 -1
  201. package/cjs/theme/tokens/media-query.js.map +1 -1
  202. package/cjs/theme/tokens/motion.js.map +1 -1
  203. package/cjs/theme/tokens/radius.js.map +1 -1
  204. package/cjs/theme/tokens/shadow.js.map +1 -1
  205. package/cjs/theme/tokens/spacing.js.map +1 -1
  206. package/cjs/theme/utils/use-apply-styles.js.map +1 -1
  207. package/cjs/theme/utils/use-design-token.js.map +1 -1
  208. package/cjs/theme/utils/use-media-query.js.map +1 -1
  209. package/cjs/time-range-picker/combobox-picker/combobox-picker.js +1 -1
  210. package/cjs/time-range-picker/combobox-picker/combobox-picker.js.map +1 -1
  211. package/cjs/time-range-picker/time-range-picker.js.map +1 -1
  212. package/cjs/time-slot-bar/time-slot-bar.js.map +1 -1
  213. package/cjs/time-slot-bar-week/time-slot-bar-week.js.map +1 -1
  214. package/cjs/time-slot-week-view/time-slot-week-view.js.map +1 -1
  215. package/cjs/timeline/timeline.js.map +1 -1
  216. package/cjs/timepicker/timepicker.js.map +1 -1
  217. package/cjs/timetable/timetable.js.map +1 -1
  218. package/cjs/toast/toast.js.map +1 -1
  219. package/cjs/toggle/toggle.js.map +1 -1
  220. package/cjs/typography/index.js.map +1 -1
  221. package/cjs/uneditable-section/index.js.map +1 -1
  222. package/cjs/uneditable-section/section-item.js +1 -1
  223. package/cjs/uneditable-section/section-item.js.map +1 -1
  224. package/cjs/unit-number/unit-number-input.js.map +1 -1
  225. package/countdown-timer/countdown-timer.js.map +1 -1
  226. package/countdown-timer/types.d.ts +3 -3
  227. package/dashed-border/dashed-border.js.map +1 -1
  228. package/data-table/data-table.js.map +1 -1
  229. package/date-input/date-input.js.map +1 -1
  230. package/date-input/types.d.ts +1 -1
  231. package/date-navigator/date-navigator.js.map +1 -1
  232. package/date-navigator/types.d.ts +1 -1
  233. package/date-range-input/date-range-input.js.map +1 -1
  234. package/date-range-input/types.d.ts +1 -1
  235. package/divider/divider.js.map +1 -1
  236. package/divider/types.d.ts +1 -1
  237. package/docs/component-catalog.json +644 -0
  238. package/drawer/drawer.js.map +1 -1
  239. package/e-signature/e-signature.js.map +1 -1
  240. package/error-display/error-display.js.map +1 -1
  241. package/feedback-rating/feedback-rating.js.map +1 -1
  242. package/file-download/file-download.js.map +1 -1
  243. package/file-download/types.d.ts +6 -1
  244. package/file-upload/file-item-edit.d.ts +1 -1
  245. package/file-upload/file-item-edit.js.map +1 -1
  246. package/file-upload/file-list/file-list.d.ts +1 -1
  247. package/file-upload/file-list/file-list.js.map +1 -1
  248. package/file-upload/file-list-item/file-list-item.d.ts +1 -1
  249. package/file-upload/file-list-item/file-list-item.js.map +1 -1
  250. package/file-upload/file-list-item/file-list-item.styles.js +1 -1
  251. package/file-upload/file-list-item/file-list-item.styles.js.map +1 -1
  252. package/file-upload/file-list-item/{file-list-item.styles_o8000f.css → file-list-item.styles_kgtfke.css} +1 -1
  253. package/file-upload/file-upload.js.map +1 -1
  254. package/file-upload/types.d.ts +6 -2
  255. package/filter/addons/filter-item-checkbox-helpers.d.ts +2 -2
  256. package/filter/addons/filter-item-checkbox-helpers.js.map +1 -1
  257. package/filter/addons/filter-item-checkbox.d.ts +1 -1
  258. package/filter/addons/filter-item-checkbox.js.map +1 -1
  259. package/filter/addons/internal-types.d.ts +12 -0
  260. package/filter/addons/types.d.ts +60 -9
  261. package/filter/filter-item.js +1 -1
  262. package/filter/filter-item.js.map +1 -1
  263. package/filter/filter.d.ts +1 -1
  264. package/filter/filter.js.map +1 -1
  265. package/filter/index.d.ts +1 -0
  266. package/filter/types.d.ts +31 -63
  267. package/footer/footer.js.map +1 -1
  268. package/form/form-custom-field/form-custom-field.js +2 -0
  269. package/form/form-custom-field/form-custom-field.js.map +1 -0
  270. package/form/form-custom-field/index.d.ts +2 -0
  271. package/form/form-custom-field/types.d.ts +7 -0
  272. package/form/form-date-input/form-date-input.js +2 -0
  273. package/form/form-date-input/form-date-input.js.map +1 -0
  274. package/form/form-date-input/index.d.ts +2 -0
  275. package/form/form-date-input/types.d.ts +8 -0
  276. package/form/form-date-range-input/form-date-range-input.js +2 -0
  277. package/form/form-date-range-input/form-date-range-input.js.map +1 -0
  278. package/form/form-date-range-input/index.d.ts +2 -0
  279. package/form/form-date-range-input/types.d.ts +8 -0
  280. package/form/form-e-signature/form-e-signature.js +2 -0
  281. package/form/form-e-signature/form-e-signature.js.map +1 -0
  282. package/form/form-e-signature/index.d.ts +2 -0
  283. package/form/form-e-signature/types.d.ts +8 -0
  284. package/form/form-histogram-slider/form-histogram-slider.js +2 -0
  285. package/form/form-histogram-slider/form-histogram-slider.js.map +1 -0
  286. package/form/form-histogram-slider/index.d.ts +2 -0
  287. package/form/form-histogram-slider/types.d.ts +8 -0
  288. package/form/form-input/form-input.js +2 -0
  289. package/form/form-input/form-input.js.map +1 -0
  290. package/form/form-input/index.d.ts +2 -0
  291. package/form/form-input/types.d.ts +8 -0
  292. package/form/form-input-group/form-input-group.js +2 -0
  293. package/form/form-input-group/form-input-group.js.map +1 -0
  294. package/form/form-input-group/index.d.ts +2 -0
  295. package/form/form-input-group/types.d.ts +10 -0
  296. package/form/form-label/form-label-addon.js +2 -0
  297. package/form/form-label/form-label-addon.js.map +1 -0
  298. package/form/form-label/form-label-addon.styles.js +2 -0
  299. package/form/form-label/form-label-addon.styles.js.map +1 -0
  300. package/form/form-label/form-label-addon.styles_aztasj.css +1 -0
  301. package/form/form-label/form-label.js +2 -0
  302. package/form/form-label/form-label.js.map +1 -0
  303. package/form/form-label/form-label.styles.js +2 -0
  304. package/form/form-label/form-label.styles.js.map +1 -0
  305. package/form/form-label/form-label.styles_180zf7j.css +6 -0
  306. package/form/form-label/index.d.ts +2 -0
  307. package/form/form-label/types.d.ts +39 -0
  308. package/form/form-masked-input/form-masked-input.js +2 -0
  309. package/form/form-masked-input/form-masked-input.js.map +1 -0
  310. package/form/form-masked-input/index.d.ts +2 -0
  311. package/form/form-masked-input/types.d.ts +8 -0
  312. package/form/form-multi-select/form-multi-select.js +2 -0
  313. package/form/form-multi-select/form-multi-select.js.map +1 -0
  314. package/form/form-multi-select/index.d.ts +2 -0
  315. package/form/form-multi-select/types.d.ts +10 -0
  316. package/form/form-nested-multi-select/form-nested-multi-select.js +2 -0
  317. package/form/form-nested-multi-select/form-nested-multi-select.js.map +1 -0
  318. package/form/form-nested-multi-select/index.d.ts +2 -0
  319. package/form/form-nested-multi-select/types.d.ts +11 -0
  320. package/form/form-nested-select/form-nested-select.js +2 -0
  321. package/form/form-nested-select/form-nested-select.js.map +1 -0
  322. package/form/form-nested-select/index.d.ts +2 -0
  323. package/form/form-nested-select/types.d.ts +11 -0
  324. package/form/{form-otp-verification.d.ts → form-otp-verification/form-otp-verification.d.ts} +1 -1
  325. package/form/form-otp-verification/form-otp-verification.js +2 -0
  326. package/form/form-otp-verification/form-otp-verification.js.map +1 -0
  327. package/form/form-otp-verification/index.d.ts +2 -0
  328. package/form/form-otp-verification/types.d.ts +1 -0
  329. package/form/form-phone-number-input/form-phone-number-input.js +2 -0
  330. package/form/form-phone-number-input/form-phone-number-input.js.map +1 -0
  331. package/form/form-phone-number-input/index.d.ts +2 -0
  332. package/form/form-phone-number-input/types.d.ts +8 -0
  333. package/form/form-predictive-text-input/form-predictive-text-input.js +2 -0
  334. package/form/form-predictive-text-input/form-predictive-text-input.js.map +1 -0
  335. package/form/form-predictive-text-input/index.d.ts +2 -0
  336. package/form/form-predictive-text-input/types.d.ts +10 -0
  337. package/form/form-range-select/form-range-select.js +2 -0
  338. package/form/form-range-select/form-range-select.js.map +1 -0
  339. package/form/form-range-select/index.d.ts +2 -0
  340. package/form/form-range-select/types.d.ts +10 -0
  341. package/form/form-range-slider/form-range-slider.js +2 -0
  342. package/form/form-range-slider/form-range-slider.js.map +1 -0
  343. package/form/form-range-slider/index.d.ts +2 -0
  344. package/form/form-range-slider/types.d.ts +8 -0
  345. package/form/form-select/form-select.js +2 -0
  346. package/form/form-select/form-select.js.map +1 -0
  347. package/form/form-select/index.d.ts +2 -0
  348. package/form/form-select/types.d.ts +10 -0
  349. package/form/form-select-histogram/form-select-histogram.js +2 -0
  350. package/form/form-select-histogram/form-select-histogram.js.map +1 -0
  351. package/form/form-select-histogram/index.d.ts +2 -0
  352. package/form/form-select-histogram/types.d.ts +8 -0
  353. package/form/form-slider/form-slider.js +2 -0
  354. package/form/form-slider/form-slider.js.map +1 -0
  355. package/form/form-slider/index.d.ts +2 -0
  356. package/form/form-slider/types.d.ts +8 -0
  357. package/form/form-textarea/form-textarea.js +2 -0
  358. package/form/form-textarea/form-textarea.js.map +1 -0
  359. package/form/form-textarea/form-textarea.styles.js +2 -0
  360. package/form/form-textarea/form-textarea.styles.js.map +1 -0
  361. package/form/form-textarea/form-textarea.styles_1kneyif.css +3 -0
  362. package/form/form-textarea/index.d.ts +2 -0
  363. package/form/form-textarea/types.d.ts +8 -0
  364. package/form/form-time-range-picker/form-time-range-picker.js +2 -0
  365. package/form/form-time-range-picker/form-time-range-picker.js.map +1 -0
  366. package/form/form-time-range-picker/index.d.ts +2 -0
  367. package/form/form-time-range-picker/types.d.ts +8 -0
  368. package/form/form-timepicker/form-timepicker.js +2 -0
  369. package/form/form-timepicker/form-timepicker.js.map +1 -0
  370. package/form/form-timepicker/index.d.ts +2 -0
  371. package/form/form-timepicker/types.d.ts +8 -0
  372. package/form/form-unit-number-input/form-unit-number-input.js +2 -0
  373. package/form/form-unit-number-input/form-unit-number-input.js.map +1 -0
  374. package/form/form-unit-number-input/index.d.ts +2 -0
  375. package/form/form-unit-number-input/types.d.ts +8 -0
  376. package/form/form-wrapper.js +1 -1
  377. package/form/form-wrapper.js.map +1 -1
  378. package/form/index.d.ts +47 -24
  379. package/form/index.js +1 -1
  380. package/form/index.js.map +1 -1
  381. package/form/types.d.ts +1 -208
  382. package/fullscreen-image-carousel/fullscreen-image-carousel.js.map +1 -1
  383. package/histogram-slider/histogram-slider.js.map +1 -1
  384. package/image-button/image-button.js.map +1 -1
  385. package/input/input.js.map +1 -1
  386. package/input-group/input-group.js.map +1 -1
  387. package/input-group/types.d.ts +1 -1
  388. package/input-multi-select/input-multi-select.js.map +1 -1
  389. package/input-multi-select/types.d.ts +1 -1
  390. package/input-nested-multi-select/input-nested-multi-select.js.map +1 -1
  391. package/input-nested-select/input-nested-select.js.map +1 -1
  392. package/input-nested-select/types.d.ts +1 -1
  393. package/input-range-select/input-range-select.js.map +1 -1
  394. package/input-range-select/types.d.ts +1 -1
  395. package/input-range-slider/input-range-slider.js.map +1 -1
  396. package/input-select/input-select.js.map +1 -1
  397. package/input-select/types.d.ts +1 -1
  398. package/input-slider/input-slider.js.map +1 -1
  399. package/input-slider/types.d.ts +1 -1
  400. package/input-textarea/textarea.js.map +1 -1
  401. package/input-textarea/textarea.styles.js +1 -1
  402. package/input-textarea/textarea.styles.js.map +1 -1
  403. package/input-textarea/{textarea.styles_22z4n3.css → textarea.styles_q77m5x.css} +1 -1
  404. package/language-switcher/language-switcher.js.map +1 -1
  405. package/layout/index.js.map +1 -1
  406. package/link-list/components/common.d.ts +1 -1
  407. package/link-list/components/common.js.map +1 -1
  408. package/link-list/components/link-list-eager.d.ts +2 -2
  409. package/link-list/components/link-list-eager.js.map +1 -1
  410. package/link-list/components/link-list-lazy.d.ts +2 -2
  411. package/link-list/components/link-list-lazy.js.map +1 -1
  412. package/link-list/link-list.js.map +1 -1
  413. package/link-list/types.d.ts +89 -3
  414. package/local-nav/local-nav-dropdown/local-nav-dropdown.js.map +1 -1
  415. package/local-nav/local-nav-menu/local-nav-menu.js.map +1 -1
  416. package/markup/markup.js.map +1 -1
  417. package/masked-input/masked-input.js.map +1 -1
  418. package/masthead/masthead.js.map +1 -1
  419. package/menu/menu.js.map +1 -1
  420. package/menu/types.d.ts +17 -1
  421. package/modal/index.js.map +1 -1
  422. package/modal/types.d.ts +3 -1
  423. package/modal-v2/modal-v2.js.map +1 -1
  424. package/modal-v2/types.d.ts +17 -0
  425. package/navbar/navbar.js.map +1 -1
  426. package/navbar/types.d.ts +1 -0
  427. package/notification-banner/notification-banner.js.map +1 -1
  428. package/otp-input/otp-input.js +1 -1
  429. package/otp-input/otp-input.js.map +1 -1
  430. package/otp-input/types.d.ts +14 -9
  431. package/otp-verification/contact-input-section.js +1 -1
  432. package/otp-verification/contact-input-section.js.map +1 -1
  433. package/otp-verification/otp-verification.js.map +1 -1
  434. package/otp-verification/verification-section.js +1 -1
  435. package/otp-verification/verification-section.js.map +1 -1
  436. package/overlay/overlay.js.map +1 -1
  437. package/package.json +1 -1
  438. package/pagination/pagination.js.map +1 -1
  439. package/phone-number-input/phone-number-input.js.map +1 -1
  440. package/pill/pill.js.map +1 -1
  441. package/popover/popover-inline/index.d.ts +1 -0
  442. package/popover/popover-inline/popover-inline.d.ts +1 -1
  443. package/popover/popover-inline/popover-inline.js.map +1 -1
  444. package/popover/popover-inline/types.d.ts +36 -0
  445. package/popover/popover.js.map +1 -1
  446. package/popover/types.d.ts +2 -35
  447. package/predictive-text-input/predictive-text-input.js +1 -1
  448. package/predictive-text-input/predictive-text-input.js.map +1 -1
  449. package/predictive-text-input/types.d.ts +1 -1
  450. package/progress-indicator/progress-indicator.js.map +1 -1
  451. package/radio-button/radio-button.js.map +1 -1
  452. package/radio-button/types.d.ts +3 -0
  453. package/schedule/schedule.js.map +1 -1
  454. package/select-histogram/select-histogram.js.map +1 -1
  455. package/select-histogram/types.d.ts +1 -1
  456. package/shared/dropdown-list/dropdown-list.js +1 -1
  457. package/shared/dropdown-list/dropdown-list.js.map +1 -1
  458. package/shared/dropdown-wrapper/element-with-dropdown.d.ts +5 -4
  459. package/shared/dropdown-wrapper/element-with-dropdown.js +1 -1
  460. package/shared/dropdown-wrapper/element-with-dropdown.js.map +1 -1
  461. package/sidenav/sidenav.js.map +1 -1
  462. package/sidenav/types.d.ts +1 -0
  463. package/singpass-button/singpass-button.js.map +1 -1
  464. package/smart-app-banner/smart-app-banner.js.map +1 -1
  465. package/smart-app-banner/types.d.ts +2 -0
  466. package/tab/tab.js.map +1 -1
  467. package/table/table.d.ts +9 -8
  468. package/table/table.js.map +1 -1
  469. package/table/types.d.ts +35 -0
  470. package/tag/tag.js.map +1 -1
  471. package/text-list/index.js.map +1 -1
  472. package/theme/theme-provider/hooks.js.map +1 -1
  473. package/theme/theme-provider/index.js.map +1 -1
  474. package/theme/tokens/border.d.ts +9 -3
  475. package/theme/tokens/border.js.map +1 -1
  476. package/theme/tokens/breakpoint.js.map +1 -1
  477. package/theme/tokens/colour.d.ts +9 -3
  478. package/theme/tokens/colour.js.map +1 -1
  479. package/theme/tokens/component.d.ts +3 -1
  480. package/theme/tokens/component.js.map +1 -1
  481. package/theme/tokens/font.d.ts +6 -2
  482. package/theme/tokens/font.js.map +1 -1
  483. package/theme/tokens/media-query.d.ts +3 -1
  484. package/theme/tokens/media-query.js.map +1 -1
  485. package/theme/tokens/motion.d.ts +3 -1
  486. package/theme/tokens/motion.js.map +1 -1
  487. package/theme/tokens/radius.d.ts +3 -1
  488. package/theme/tokens/radius.js.map +1 -1
  489. package/theme/tokens/shadow.d.ts +3 -1
  490. package/theme/tokens/shadow.js.map +1 -1
  491. package/theme/tokens/spacing.d.ts +3 -1
  492. package/theme/tokens/spacing.js.map +1 -1
  493. package/theme/utils/use-apply-styles.js.map +1 -1
  494. package/theme/utils/use-design-token.js.map +1 -1
  495. package/theme/utils/use-media-query.js.map +1 -1
  496. package/time-range-picker/combobox-picker/combobox-picker.js +1 -1
  497. package/time-range-picker/combobox-picker/combobox-picker.js.map +1 -1
  498. package/time-range-picker/time-range-picker.js.map +1 -1
  499. package/time-range-picker/types.d.ts +1 -1
  500. package/time-slot-bar/time-slot-bar.js.map +1 -1
  501. package/time-slot-bar/types.d.ts +5 -1
  502. package/time-slot-bar-week/time-slot-bar-week.js.map +1 -1
  503. package/time-slot-bar-week/types.d.ts +6 -0
  504. package/time-slot-week-view/time-slot-week-view.js.map +1 -1
  505. package/time-slot-week-view/types.d.ts +2 -0
  506. package/timeline/timeline.js.map +1 -1
  507. package/timeline/types.d.ts +1 -1
  508. package/timepicker/timepicker.js.map +1 -1
  509. package/timepicker/types.d.ts +2 -2
  510. package/timetable/timetable.js.map +1 -1
  511. package/toast/toast.js.map +1 -1
  512. package/toast/types.d.ts +2 -0
  513. package/toggle/toggle.js.map +1 -1
  514. package/tools/shared/generated-file-formatter.d.ts +6 -0
  515. package/tools/shared/jsdoc-parser.d.ts +36 -0
  516. package/tools/shared/ts-morph-project-factory.d.ts +9 -0
  517. package/tools/shared/typescript-source-provider.d.ts +9 -0
  518. package/tools/storybook-argtypes/adapters/file-system-adapter.d.ts +69 -0
  519. package/tools/storybook-argtypes/arg-types-generator.d.ts +85 -0
  520. package/tools/storybook-argtypes/config/arg-types-config.d.ts +31 -0
  521. package/tools/storybook-argtypes/index.d.ts +11 -0
  522. package/tools/storybook-argtypes/services/arg-types-row-builder.d.ts +43 -0
  523. package/tools/storybook-argtypes/services/file-path-resolver.d.ts +118 -0
  524. package/tools/storybook-argtypes/services/index.d.ts +6 -0
  525. package/tools/storybook-argtypes/services/jsdoc-metadata-extractor.d.ts +33 -0
  526. package/tools/storybook-argtypes/services/story-registry-generator.d.ts +27 -0
  527. package/tools/storybook-argtypes/services/type-dependency-resolver.d.ts +46 -0
  528. package/tools/storybook-argtypes/services/type-formatting-service.d.ts +27 -0
  529. package/tools/storybook-argtypes/types.d.ts +102 -0
  530. package/typography/index.js.map +1 -1
  531. package/uneditable-section/index.js.map +1 -1
  532. package/uneditable-section/section-item.js +1 -1
  533. package/uneditable-section/section-item.js.map +1 -1
  534. package/uneditable-section/types.d.ts +2 -2
  535. package/unit-number/unit-number-input.js.map +1 -1
  536. package/cjs/form/form-custom-field.js +0 -2
  537. package/cjs/form/form-custom-field.js.map +0 -1
  538. package/cjs/form/form-date-input.js +0 -2
  539. package/cjs/form/form-date-input.js.map +0 -1
  540. package/cjs/form/form-date-range-input.js +0 -2
  541. package/cjs/form/form-date-range-input.js.map +0 -1
  542. package/cjs/form/form-e-signature.js +0 -2
  543. package/cjs/form/form-e-signature.js.map +0 -1
  544. package/cjs/form/form-histogram.js +0 -2
  545. package/cjs/form/form-histogram.js.map +0 -1
  546. package/cjs/form/form-input-group.js +0 -2
  547. package/cjs/form/form-input-group.js.map +0 -1
  548. package/cjs/form/form-input.js +0 -2
  549. package/cjs/form/form-input.js.map +0 -1
  550. package/cjs/form/form-label-addon.js +0 -2
  551. package/cjs/form/form-label-addon.js.map +0 -1
  552. package/cjs/form/form-label-addon.styles.js +0 -2
  553. package/cjs/form/form-label-addon.styles.js.map +0 -1
  554. package/cjs/form/form-label-addon.styles_b00z8p.css +0 -1
  555. package/cjs/form/form-label.js +0 -2
  556. package/cjs/form/form-label.js.map +0 -1
  557. package/cjs/form/form-label.styles.js +0 -2
  558. package/cjs/form/form-label.styles.js.map +0 -1
  559. package/cjs/form/form-label.styles_1nbe0bm.css +0 -6
  560. package/cjs/form/form-masked-input.js +0 -2
  561. package/cjs/form/form-masked-input.js.map +0 -1
  562. package/cjs/form/form-multi-select.js +0 -2
  563. package/cjs/form/form-multi-select.js.map +0 -1
  564. package/cjs/form/form-nested-multi-select.js +0 -2
  565. package/cjs/form/form-nested-multi-select.js.map +0 -1
  566. package/cjs/form/form-nested-select.js +0 -2
  567. package/cjs/form/form-nested-select.js.map +0 -1
  568. package/cjs/form/form-otp-verification.js +0 -2
  569. package/cjs/form/form-otp-verification.js.map +0 -1
  570. package/cjs/form/form-phone-number-input.js +0 -2
  571. package/cjs/form/form-phone-number-input.js.map +0 -1
  572. package/cjs/form/form-predictive-text-input.js +0 -2
  573. package/cjs/form/form-predictive-text-input.js.map +0 -1
  574. package/cjs/form/form-range-select.js +0 -2
  575. package/cjs/form/form-range-select.js.map +0 -1
  576. package/cjs/form/form-range-slider.js +0 -2
  577. package/cjs/form/form-range-slider.js.map +0 -1
  578. package/cjs/form/form-select-histogram.js +0 -2
  579. package/cjs/form/form-select-histogram.js.map +0 -1
  580. package/cjs/form/form-select.js +0 -2
  581. package/cjs/form/form-select.js.map +0 -1
  582. package/cjs/form/form-slider.js +0 -2
  583. package/cjs/form/form-slider.js.map +0 -1
  584. package/cjs/form/form-textarea.js +0 -2
  585. package/cjs/form/form-textarea.js.map +0 -1
  586. package/cjs/form/form-textarea.styles.js +0 -2
  587. package/cjs/form/form-textarea.styles.js.map +0 -1
  588. package/cjs/form/form-textarea.styles_3p9qoy.css +0 -3
  589. package/cjs/form/form-time-range-picker.js +0 -2
  590. package/cjs/form/form-time-range-picker.js.map +0 -1
  591. package/cjs/form/form-timepicker.js +0 -2
  592. package/cjs/form/form-timepicker.js.map +0 -1
  593. package/cjs/form/form-unit-number-input.js +0 -2
  594. package/cjs/form/form-unit-number-input.js.map +0 -1
  595. package/form/form-custom-field.js +0 -2
  596. package/form/form-custom-field.js.map +0 -1
  597. package/form/form-date-input.js +0 -2
  598. package/form/form-date-input.js.map +0 -1
  599. package/form/form-date-range-input.js +0 -2
  600. package/form/form-date-range-input.js.map +0 -1
  601. package/form/form-e-signature.js +0 -2
  602. package/form/form-e-signature.js.map +0 -1
  603. package/form/form-histogram.js +0 -2
  604. package/form/form-histogram.js.map +0 -1
  605. package/form/form-input-group.js +0 -2
  606. package/form/form-input-group.js.map +0 -1
  607. package/form/form-input.js +0 -2
  608. package/form/form-input.js.map +0 -1
  609. package/form/form-label-addon.js +0 -2
  610. package/form/form-label-addon.js.map +0 -1
  611. package/form/form-label-addon.styles.js +0 -2
  612. package/form/form-label-addon.styles.js.map +0 -1
  613. package/form/form-label-addon.styles_b00z8p.css +0 -1
  614. package/form/form-label.js +0 -2
  615. package/form/form-label.js.map +0 -1
  616. package/form/form-label.styles.js +0 -2
  617. package/form/form-label.styles.js.map +0 -1
  618. package/form/form-label.styles_1nbe0bm.css +0 -6
  619. package/form/form-masked-input.js +0 -2
  620. package/form/form-masked-input.js.map +0 -1
  621. package/form/form-multi-select.js +0 -2
  622. package/form/form-multi-select.js.map +0 -1
  623. package/form/form-nested-multi-select.js +0 -2
  624. package/form/form-nested-multi-select.js.map +0 -1
  625. package/form/form-nested-select.js +0 -2
  626. package/form/form-nested-select.js.map +0 -1
  627. package/form/form-otp-verification.js +0 -2
  628. package/form/form-otp-verification.js.map +0 -1
  629. package/form/form-phone-number-input.js +0 -2
  630. package/form/form-phone-number-input.js.map +0 -1
  631. package/form/form-predictive-text-input.js +0 -2
  632. package/form/form-predictive-text-input.js.map +0 -1
  633. package/form/form-range-select.js +0 -2
  634. package/form/form-range-select.js.map +0 -1
  635. package/form/form-range-slider.js +0 -2
  636. package/form/form-range-slider.js.map +0 -1
  637. package/form/form-select-histogram.js +0 -2
  638. package/form/form-select-histogram.js.map +0 -1
  639. package/form/form-select.js +0 -2
  640. package/form/form-select.js.map +0 -1
  641. package/form/form-slider.js +0 -2
  642. package/form/form-slider.js.map +0 -1
  643. package/form/form-textarea.js +0 -2
  644. package/form/form-textarea.js.map +0 -1
  645. package/form/form-textarea.styles.js +0 -2
  646. package/form/form-textarea.styles.js.map +0 -1
  647. package/form/form-textarea.styles_3p9qoy.css +0 -3
  648. package/form/form-time-range-picker.js +0 -2
  649. package/form/form-time-range-picker.js.map +0 -1
  650. package/form/form-timepicker.js +0 -2
  651. package/form/form-timepicker.js.map +0 -1
  652. package/form/form-unit-number-input.js +0 -2
  653. package/form/form-unit-number-input.js.map +0 -1
  654. package/link-list/internal-types.d.ts +0 -85
  655. /package/{codemod-utils.d.ts → codemods/codemod-utils.d.ts} +0 -0
  656. /package/{migrate-popover → codemods/migrate-popover}/index.d.ts +0 -0
  657. /package/{run-codemod.d.ts → codemods/run-codemod.d.ts} +0 -0
  658. /package/form/{form-custom-field.d.ts → form-custom-field/form-custom-field.d.ts} +0 -0
  659. /package/form/{form-date-input.d.ts → form-date-input/form-date-input.d.ts} +0 -0
  660. /package/form/{form-date-range-input.d.ts → form-date-range-input/form-date-range-input.d.ts} +0 -0
  661. /package/form/{form-e-signature.d.ts → form-e-signature/form-e-signature.d.ts} +0 -0
  662. /package/form/{form-histogram.d.ts → form-histogram-slider/form-histogram-slider.d.ts} +0 -0
  663. /package/form/{form-input.d.ts → form-input/form-input.d.ts} +0 -0
  664. /package/form/{form-input-group.d.ts → form-input-group/form-input-group.d.ts} +0 -0
  665. /package/form/{form-label-addon.d.ts → form-label/form-label-addon.d.ts} +0 -0
  666. /package/form/{form-label-addon.styles.d.ts → form-label/form-label-addon.styles.d.ts} +0 -0
  667. /package/form/{form-label.d.ts → form-label/form-label.d.ts} +0 -0
  668. /package/form/{form-label.styles.d.ts → form-label/form-label.styles.d.ts} +0 -0
  669. /package/form/{form-masked-input.d.ts → form-masked-input/form-masked-input.d.ts} +0 -0
  670. /package/form/{form-multi-select.d.ts → form-multi-select/form-multi-select.d.ts} +0 -0
  671. /package/form/{form-nested-multi-select.d.ts → form-nested-multi-select/form-nested-multi-select.d.ts} +0 -0
  672. /package/form/{form-nested-select.d.ts → form-nested-select/form-nested-select.d.ts} +0 -0
  673. /package/form/{form-phone-number-input.d.ts → form-phone-number-input/form-phone-number-input.d.ts} +0 -0
  674. /package/form/{form-predictive-text-input.d.ts → form-predictive-text-input/form-predictive-text-input.d.ts} +0 -0
  675. /package/form/{form-range-select.d.ts → form-range-select/form-range-select.d.ts} +0 -0
  676. /package/form/{form-range-slider.d.ts → form-range-slider/form-range-slider.d.ts} +0 -0
  677. /package/form/{form-select.d.ts → form-select/form-select.d.ts} +0 -0
  678. /package/form/{form-select-histogram.d.ts → form-select-histogram/form-select-histogram.d.ts} +0 -0
  679. /package/form/{form-slider.d.ts → form-slider/form-slider.d.ts} +0 -0
  680. /package/form/{form-textarea.d.ts → form-textarea/form-textarea.d.ts} +0 -0
  681. /package/form/{form-textarea.styles.d.ts → form-textarea/form-textarea.styles.d.ts} +0 -0
  682. /package/form/{form-time-range-picker.d.ts → form-time-range-picker/form-time-range-picker.d.ts} +0 -0
  683. /package/form/{form-timepicker.d.ts → form-timepicker/form-timepicker.d.ts} +0 -0
  684. /package/form/{form-unit-number-input.d.ts → form-unit-number-input/form-unit-number-input.d.ts} +0 -0
package/form/index.d.ts CHANGED
@@ -1,3 +1,26 @@
1
+ export type { FormCustomFieldProps } from "./form-custom-field/types";
2
+ export type { FormDateInputProps } from "./form-date-input/types";
3
+ export type { FormDateRangeInputProps } from "./form-date-range-input/types";
4
+ export type { FormESignatureProps } from "./form-e-signature/types";
5
+ export type { FormHistogramSliderProps } from "./form-histogram-slider/types";
6
+ export type { FormInputProps } from "./form-input/types";
7
+ export type { FormInputGroupProps } from "./form-input-group/types";
8
+ export type { FormLabelAddonProps, FormLabelAddonType, FormLabelProps, } from "./form-label/types";
9
+ export type { FormMaskedInputProps } from "./form-masked-input/types";
10
+ export type { FormMultiSelectProps } from "./form-multi-select/types";
11
+ export type { FormNestedMultiSelectProps } from "./form-nested-multi-select/types";
12
+ export type { FormNestedSelectProps } from "./form-nested-select/types";
13
+ export type { FormPhoneNumberInputProps } from "./form-phone-number-input/types";
14
+ export type { FormPredictiveTextInputProps } from "./form-predictive-text-input/types";
15
+ export type { FormInputRangeSelectProps } from "./form-range-select/types";
16
+ export type { FormRangeSliderProps } from "./form-range-slider/types";
17
+ export type { FormInputSelectProps } from "./form-select/types";
18
+ export type { FormSelectHistogramProps } from "./form-select-histogram/types";
19
+ export type { FormSliderProps } from "./form-slider/types";
20
+ export type { FormTextareaProps } from "./form-textarea/types";
21
+ export type { FormTimeRangePickerProps } from "./form-time-range-picker/types";
22
+ export type { FormTimepickerProps } from "./form-timepicker/types";
23
+ export type { FormUnitNumberInputProps } from "./form-unit-number-input/types";
1
24
  export * from "./types";
2
25
  /**
3
26
  * A collection of form field components that each combine a label, input
@@ -34,51 +57,51 @@ export * from "./types";
34
57
  */
35
58
  export declare const Form: {
36
59
  /** Layout shell that wraps any custom input element with label, subtitle, and error message. */
37
- CustomField: ({ id, "data-error-testid": errorTestId, "data-testid": testId, children, ...otherProps }: import("./types").FormCustomFieldProps) => JSX.Element;
60
+ CustomField: ({ id, "data-error-testid": errorTestId, "data-testid": testId, children, ...otherProps }: import("./form-custom-field").FormCustomFieldProps) => JSX.Element;
38
61
  /** Single date picker with form layout. */
39
- DateInput: ({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./types").FormDateInputProps) => JSX.Element;
62
+ DateInput: ({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./form-date-input").FormDateInputProps) => JSX.Element;
40
63
  /** Date range picker with form layout. */
41
- DateRangeInput: ({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./types").FormDateRangeInputProps) => JSX.Element;
64
+ DateRangeInput: ({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./form-date-range-input").FormDateRangeInputProps) => JSX.Element;
42
65
  /** E-signature capture field with form layout. */
43
- ESignature: (props: import("./types").FormESignatureProps) => import("react/jsx-runtime").JSX.Element;
66
+ ESignature: (props: import("./form-e-signature").FormESignatureProps) => import("react/jsx-runtime").JSX.Element;
44
67
  /** Range slider with histogram overlay and form layout. */
45
- HistogramSlider: ({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./types").FormHistogramSliderProps) => JSX.Element;
68
+ HistogramSlider: ({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./form-histogram-slider").FormHistogramSliderProps) => JSX.Element;
46
69
  /** Single-line text input field with form layout. */
47
- Input: (props: import("./types").FormInputProps & import("react").RefAttributes<HTMLInputElement>) => React.ReactElement | null;
70
+ Input: (props: import("./form-input").FormInputProps & import("react").RefAttributes<HTMLInputElement>) => React.ReactElement | null;
48
71
  /** Grouped inputs with shared label, error state, and form layout. */
49
- InputGroup: <T, V>(props: import("./types").FormInputGroupProps<T, V> & import("react").RefAttributes<HTMLInputElement>) => React.ReactElement | null;
72
+ InputGroup: <T, V>(props: import("./form-input-group").FormInputGroupProps<T, V> & import("react").RefAttributes<HTMLInputElement>) => React.ReactElement | null;
50
73
  /** Standalone label element for use outside a `Form.*` field with optional subtitle and addon icon. */
51
- Label: ({ id, children, addon, subtitle, "data-testid": testId, className, style, ...otherProps }: import("./types").FormLabelProps) => JSX.Element;
74
+ Label: ({ id, children, addon, subtitle, "data-testid": testId, className, style, ...otherProps }: import("./form-label").FormLabelProps) => JSX.Element;
52
75
  /** Text input with a character-level input mask and form layout. */
53
- MaskedInput: (props: import("./types").FormMaskedInputProps & import("react").RefAttributes<HTMLInputElement>) => React.ReactElement | null;
76
+ MaskedInput: (props: import("./form-masked-input").FormMaskedInputProps & import("react").RefAttributes<HTMLInputElement>) => React.ReactElement | null;
54
77
  /** Multi-value dropdown select with form layout. */
55
- MultiSelect: <T, V>({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, enableSearch, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, variant, ...otherProps }: import("./types").FormMultiSelectProps<T, V>) => JSX.Element;
78
+ MultiSelect: <T, V>({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, enableSearch, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, variant, ...otherProps }: import("./form-multi-select").FormMultiSelectProps<T, V>) => JSX.Element;
56
79
  /** Hierarchical multi-value select with form layout. */
57
- NestedMultiSelect: <V1, V2, V3>({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./types").FormNestedMultiSelectProps<V1, V2, V3>) => JSX.Element;
80
+ NestedMultiSelect: <V1, V2, V3>({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./form-nested-multi-select").FormNestedMultiSelectProps<V1, V2, V3>) => JSX.Element;
58
81
  /** Hierarchical single-value select with form layout. */
59
- NestedSelect: <V1, V2, V3>({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./types").FormNestedSelectProps<V1, V2, V3>) => JSX.Element;
82
+ NestedSelect: <V1, V2, V3>({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./form-nested-select").FormNestedSelectProps<V1, V2, V3>) => JSX.Element;
60
83
  /** OTP send-and-verify flow with form layout. */
61
- OtpVerification: ({ label, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("../otp-verification").FormOtpVerificationProps) => JSX.Element;
84
+ OtpVerification: ({ label, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./form-otp-verification").FormOtpVerificationProps) => JSX.Element;
62
85
  /** Phone number input with country code selection and form layout. */
63
- PhoneNumberInput: ({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./types").FormPhoneNumberInputProps) => JSX.Element;
86
+ PhoneNumberInput: ({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./form-phone-number-input").FormPhoneNumberInputProps) => JSX.Element;
64
87
  /** Text input with predictive suggestions and form layout. */
65
- PredictiveTextInput: <T, V>({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./types").FormPredictiveTextInputProps<T, V>) => JSX.Element;
88
+ PredictiveTextInput: <T, V>({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./form-predictive-text-input").FormPredictiveTextInputProps<T, V>) => JSX.Element;
66
89
  /** Dual-value range dropdown select with form layout. */
67
- RangeSelect: <T, V>({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, enableSearch, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./types").FormInputRangeSelectProps<T, V>) => JSX.Element;
90
+ RangeSelect: <T, V>({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, enableSearch, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./form-range-select").FormInputRangeSelectProps<T, V>) => JSX.Element;
68
91
  /** Dual-handle range slider with form layout. */
69
- RangeSlider: ({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./types").FormRangeSliderProps) => JSX.Element;
92
+ RangeSlider: ({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./form-range-slider").FormRangeSliderProps) => JSX.Element;
70
93
  /** Single-value dropdown select with form layout. */
71
- Select: <T, V>({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, enableSearch, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, variant, ...otherProps }: import("./types").FormInputSelectProps<T, V>) => JSX.Element;
94
+ Select: <T, V>({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, enableSearch, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, variant, ...otherProps }: import("./form-select").FormInputSelectProps<T, V>) => JSX.Element;
72
95
  /** Select control with histogram and form layout. */
73
- SelectHistogram: ({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, histogramSlider, ...otherProps }: import("./types").FormSelectHistogramProps) => JSX.Element;
96
+ SelectHistogram: ({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, histogramSlider, ...otherProps }: import("./form-select-histogram").FormSelectHistogramProps) => JSX.Element;
74
97
  /** Single-value range slider with form layout. */
75
- Slider: ({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./types").FormSliderProps) => JSX.Element;
98
+ Slider: ({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./form-slider").FormSliderProps) => JSX.Element;
76
99
  /** Multi-line text area with form layout. */
77
- Textarea: (props: import("./types").FormTextareaProps & import("react").RefAttributes<HTMLTextAreaElement>) => React.ReactElement | null;
100
+ Textarea: (props: import("./form-textarea").FormTextareaProps & import("react").RefAttributes<HTMLTextAreaElement>) => React.ReactElement | null;
78
101
  /** Time picker with form layout. */
79
- Timepicker: ({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./types").FormTimepickerProps) => JSX.Element;
102
+ Timepicker: ({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./form-timepicker").FormTimepickerProps) => JSX.Element;
80
103
  /** Time range picker with form layout. */
81
- TimeRangePicker: ({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./types").FormTimeRangePickerProps) => JSX.Element;
104
+ TimeRangePicker: ({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./form-time-range-picker").FormTimeRangePickerProps) => JSX.Element;
82
105
  /** Structured unit number input with form layout. */
83
- UnitNumberInput: ({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./types").FormUnitNumberInputProps) => JSX.Element;
106
+ UnitNumberInput: ({ label, errorMessage, id, "data-error-testid": errorTestId, "data-testid": testId, layoutType, xxsCols, xsCols, smCols, mdCols, lgCols, xlCols, xxlCols, ...otherProps }: import("./form-unit-number-input").FormUnitNumberInputProps) => JSX.Element;
84
107
  };
package/form/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import{FormCustomField as r}from"./form-custom-field.js";import{FormDateInput as t}from"./form-date-input.js";import{FormDateRangeInput as m}from"./form-date-range-input.js";import{FormESignature as o}from"./form-e-signature.js";import{FormHistogramSlider as e}from"./form-histogram.js";import{FormInput as i}from"./form-input.js";import{FormInputGroup as f}from"./form-input-group.js";import{FormLabel as p}from"./form-label.js";import{FormMaskedInput as s}from"./form-masked-input.js";import{FormMultiSelect as n}from"./form-multi-select.js";import{FormNestedMultiSelect as u}from"./form-nested-multi-select.js";import{FormNestedSelect as a}from"./form-nested-select.js";import{FormOtpVerification as l}from"./form-otp-verification.js";import{FormPhoneNumberInput as j}from"./form-phone-number-input.js";import{FormPredictiveTextInput as c}from"./form-predictive-text-input.js";import{FormRangeSelect as d}from"./form-range-select.js";import{FormRangeSlider as g}from"./form-range-slider.js";import{FormSelect as S}from"./form-select.js";import{FormSelectHistogram as I}from"./form-select-histogram.js";import{FormSlider as b}from"./form-slider.js";import{FormTextarea as k}from"./form-textarea.js";import{FormTimeRangePicker as x}from"./form-time-range-picker.js";import{FormTimepicker as h}from"./form-timepicker.js";import{FormUnitNumberInput as N}from"./form-unit-number-input.js";const R={CustomField:r,DateInput:t,DateRangeInput:m,ESignature:o,HistogramSlider:e,Input:i,InputGroup:f,Label:p,MaskedInput:s,MultiSelect:n,NestedMultiSelect:u,NestedSelect:a,OtpVerification:l,PhoneNumberInput:j,PredictiveTextInput:c,RangeSelect:d,RangeSlider:g,Select:S,SelectHistogram:I,Slider:b,Textarea:k,Timepicker:h,TimeRangePicker:x,UnitNumberInput:N};export{R as Form};
1
+ import{FormCustomField as r}from"./form-custom-field/form-custom-field.js";import{FormDateInput as e}from"./form-date-input/form-date-input.js";import{FormDateRangeInput as t}from"./form-date-range-input/form-date-range-input.js";import{FormESignature as m}from"./form-e-signature/form-e-signature.js";import{FormHistogramSlider as o}from"./form-histogram-slider/form-histogram-slider.js";import{FormInput as i}from"./form-input/form-input.js";import{FormInputGroup as f}from"./form-input-group/form-input-group.js";import{FormLabel as p}from"./form-label/form-label.js";import{FormMaskedInput as s}from"./form-masked-input/form-masked-input.js";import{FormMultiSelect as n}from"./form-multi-select/form-multi-select.js";import{FormNestedMultiSelect as u}from"./form-nested-multi-select/form-nested-multi-select.js";import{FormNestedSelect as a}from"./form-nested-select/form-nested-select.js";import{FormOtpVerification as l}from"./form-otp-verification/form-otp-verification.js";import{FormPhoneNumberInput as c}from"./form-phone-number-input/form-phone-number-input.js";import{FormPredictiveTextInput as d}from"./form-predictive-text-input/form-predictive-text-input.js";import{FormRangeSelect as j}from"./form-range-select/form-range-select.js";import{FormRangeSlider as g}from"./form-range-slider/form-range-slider.js";import{FormSelect as S}from"./form-select/form-select.js";import{FormSelectHistogram as b}from"./form-select-histogram/form-select-histogram.js";import{FormSlider as k}from"./form-slider/form-slider.js";import{FormTextarea as I}from"./form-textarea/form-textarea.js";import{FormTimeRangePicker as h}from"./form-time-range-picker/form-time-range-picker.js";import{FormTimepicker as x}from"./form-timepicker/form-timepicker.js";import{FormUnitNumberInput as v}from"./form-unit-number-input/form-unit-number-input.js";const N={CustomField:r,DateInput:e,DateRangeInput:t,ESignature:m,HistogramSlider:o,Input:i,InputGroup:f,Label:p,MaskedInput:s,MultiSelect:n,NestedMultiSelect:u,NestedSelect:a,OtpVerification:l,PhoneNumberInput:c,PredictiveTextInput:d,RangeSelect:j,RangeSlider:g,Select:S,SelectHistogram:b,Slider:k,Textarea:I,Timepicker:x,TimeRangePicker:h,UnitNumberInput:v};export{N as Form};
2
2
  //# sourceMappingURL=index.js.map
package/form/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/form/index.ts"],"sourcesContent":["import { FormCustomField } from \"./form-custom-field\";\nimport { FormDateInput } from \"./form-date-input\";\nimport { FormDateRangeInput } from \"./form-date-range-input\";\nimport { FormESignature } from \"./form-e-signature\";\nimport { FormHistogramSlider } from \"./form-histogram\";\nimport { FormInput } from \"./form-input\";\nimport { FormInputGroup } from \"./form-input-group\";\nimport { FormLabel } from \"./form-label\";\nimport { FormMaskedInput } from \"./form-masked-input\";\nimport { FormMultiSelect } from \"./form-multi-select\";\nimport { FormNestedMultiSelect } from \"./form-nested-multi-select\";\nimport { FormNestedSelect } from \"./form-nested-select\";\nimport { FormOtpVerification } from \"./form-otp-verification\";\nimport { FormPhoneNumberInput } from \"./form-phone-number-input\";\nimport { FormPredictiveTextInput } from \"./form-predictive-text-input\";\nimport { FormRangeSelect } from \"./form-range-select\";\nimport { FormRangeSlider } from \"./form-range-slider\";\nimport { FormSelect } from \"./form-select\";\nimport { FormSelectHistogram } from \"./form-select-histogram\";\nimport { FormSlider } from \"./form-slider\";\nimport { FormTextarea } from \"./form-textarea\";\nimport { FormTimeRangePicker } from \"./form-time-range-picker\";\nimport { FormTimepicker } from \"./form-timepicker\";\nimport { FormUnitNumberInput } from \"./form-unit-number-input\";\n\nexport * from \"./types\";\n\n/**\n * A collection of form field components that each combine a label, input\n * control, and inline error message with consistent ARIA wiring.\n *\n * Use `Form.*` sub-components to build accessible forms. Use `Form.CustomField` to wrap any\n * bespoke input element in the same layout.\n *\n * Sub-components:\n * - `Form.CustomField` — layout shell for wrapping custom input elements.\n * - `Form.DateInput` — single date picker.\n * - `Form.DateRangeInput` — date range picker.\n * - `Form.ESignature` — e-signature capture field.\n * - `Form.HistogramSlider` — range slider with histogram overlay.\n * - `Form.Input` — single-line text input field.\n * - `Form.InputGroup` — grouped inputs with shared label and error state.\n * - `Form.Label` — standalone label for use outside a `Form.*` field.\n * - `Form.MaskedInput` — text input with a character-level input mask.\n * - `Form.MultiSelect` — multi-value dropdown select.\n * - `Form.NestedMultiSelect` — hierarchical multi-value select.\n * - `Form.NestedSelect` — hierarchical single-value select.\n * - `Form.OtpVerification` — OTP send-and-verify flow.\n * - `Form.PhoneNumberInput` — phone number input with country code selection.\n * - `Form.PredictiveTextInput` — text input with predictive suggestions.\n * - `Form.RangeSelect` — dual-value range dropdown select.\n * - `Form.RangeSlider` — dual-handle range slider.\n * - `Form.Select` — single-value dropdown select.\n * - `Form.SelectHistogram` — select control with histogram.\n * - `Form.Slider` — single-value range slider.\n * - `Form.Textarea` — multi-line text area.\n * - `Form.Timepicker` — time picker.\n * - `Form.TimeRangePicker` — time range picker.\n * - `Form.UnitNumberInput` — structured unit number input.\n */\nexport const Form = {\n /** Layout shell that wraps any custom input element with label, subtitle, and error message. */\n CustomField: FormCustomField,\n\n /** Single date picker with form layout. */\n DateInput: FormDateInput,\n\n /** Date range picker with form layout. */\n DateRangeInput: FormDateRangeInput,\n\n /** E-signature capture field with form layout. */\n ESignature: FormESignature,\n\n /** Range slider with histogram overlay and form layout. */\n HistogramSlider: FormHistogramSlider,\n\n /** Single-line text input field with form layout. */\n Input: FormInput,\n\n /** Grouped inputs with shared label, error state, and form layout. */\n InputGroup: FormInputGroup,\n\n /** Standalone label element for use outside a `Form.*` field with optional subtitle and addon icon. */\n Label: FormLabel,\n\n /** Text input with a character-level input mask and form layout. */\n MaskedInput: FormMaskedInput,\n\n /** Multi-value dropdown select with form layout. */\n MultiSelect: FormMultiSelect,\n\n /** Hierarchical multi-value select with form layout. */\n NestedMultiSelect: FormNestedMultiSelect,\n\n /** Hierarchical single-value select with form layout. */\n NestedSelect: FormNestedSelect,\n\n /** OTP send-and-verify flow with form layout. */\n OtpVerification: FormOtpVerification,\n\n /** Phone number input with country code selection and form layout. */\n PhoneNumberInput: FormPhoneNumberInput,\n\n /** Text input with predictive suggestions and form layout. */\n PredictiveTextInput: FormPredictiveTextInput,\n\n /** Dual-value range dropdown select with form layout. */\n RangeSelect: FormRangeSelect,\n\n /** Dual-handle range slider with form layout. */\n RangeSlider: FormRangeSlider,\n\n /** Single-value dropdown select with form layout. */\n Select: FormSelect,\n\n /** Select control with histogram and form layout. */\n SelectHistogram: FormSelectHistogram,\n\n /** Single-value range slider with form layout. */\n Slider: FormSlider,\n\n /** Multi-line text area with form layout. */\n Textarea: FormTextarea,\n\n /** Time picker with form layout. */\n Timepicker: FormTimepicker,\n\n /** Time range picker with form layout. */\n TimeRangePicker: FormTimeRangePicker,\n\n /** Structured unit number input with form layout. */\n UnitNumberInput: FormUnitNumberInput,\n};\n"],"names":["Form","CustomField","FormCustomField","DateInput","FormDateInput","DateRangeInput","FormDateRangeInput","ESignature","FormESignature","HistogramSlider","FormHistogramSlider","Input","FormInput","InputGroup","FormInputGroup","Label","FormLabel","MaskedInput","FormMaskedInput","MultiSelect","FormMultiSelect","NestedMultiSelect","FormNestedMultiSelect","NestedSelect","FormNestedSelect","OtpVerification","FormOtpVerification","PhoneNumberInput","FormPhoneNumberInput","PredictiveTextInput","FormPredictiveTextInput","RangeSelect","FormRangeSelect","RangeSlider","FormRangeSlider","Select","FormSelect","SelectHistogram","FormSelectHistogram","Slider","FormSlider","Textarea","FormTextarea","Timepicker","FormTimepicker","TimeRangePicker","FormTimeRangePicker","UnitNumberInput","FormUnitNumberInput"],"mappings":"22CA4DO,MAAMA,EAAO,CAEhBC,YAAaC,EAGbC,UAAWC,EAGXC,eAAgBC,EAGhBC,WAAYC,EAGZC,gBAAiBC,EAGjBC,MAAOC,EAGPC,WAAYC,EAGZC,MAAOC,EAGPC,YAAaC,EAGbC,YAAaC,EAGbC,kBAAmBC,EAGnBC,aAAcC,EAGdC,gBAAiBC,EAGjBC,iBAAkBC,EAGlBC,oBAAqBC,EAGrBC,YAAaC,EAGbC,YAAaC,EAGbC,OAAQC,EAGRC,gBAAiBC,EAGjBC,OAAQC,EAGRC,SAAUC,EAGVC,WAAYC,EAGZC,gBAAiBC,EAGjBC,gBAAiBC"}
1
+ {"version":3,"file":"index.js","sources":["../../src/form/index.ts"],"sourcesContent":["import { FormCustomField } from \"./form-custom-field\";\nimport { FormDateInput } from \"./form-date-input\";\nimport { FormDateRangeInput } from \"./form-date-range-input\";\nimport { FormESignature } from \"./form-e-signature\";\nimport { FormHistogramSlider } from \"./form-histogram-slider\";\nimport { FormInput } from \"./form-input\";\nimport { FormInputGroup } from \"./form-input-group\";\nimport { FormLabel } from \"./form-label\";\nimport { FormMaskedInput } from \"./form-masked-input\";\nimport { FormMultiSelect } from \"./form-multi-select\";\nimport { FormNestedMultiSelect } from \"./form-nested-multi-select\";\nimport { FormNestedSelect } from \"./form-nested-select\";\nimport { FormOtpVerification } from \"./form-otp-verification\";\nimport { FormPhoneNumberInput } from \"./form-phone-number-input\";\nimport { FormPredictiveTextInput } from \"./form-predictive-text-input\";\nimport { FormRangeSelect } from \"./form-range-select\";\nimport { FormRangeSlider } from \"./form-range-slider\";\nimport { FormSelect } from \"./form-select\";\nimport { FormSelectHistogram } from \"./form-select-histogram\";\nimport { FormSlider } from \"./form-slider\";\nimport { FormTextarea } from \"./form-textarea\";\nimport { FormTimeRangePicker } from \"./form-time-range-picker\";\nimport { FormTimepicker } from \"./form-timepicker\";\nimport { FormUnitNumberInput } from \"./form-unit-number-input\";\n\nexport type { FormCustomFieldProps } from \"./form-custom-field/types\";\nexport type { FormDateInputProps } from \"./form-date-input/types\";\nexport type { FormDateRangeInputProps } from \"./form-date-range-input/types\";\nexport type { FormESignatureProps } from \"./form-e-signature/types\";\nexport type { FormHistogramSliderProps } from \"./form-histogram-slider/types\";\nexport type { FormInputProps } from \"./form-input/types\";\nexport type { FormInputGroupProps } from \"./form-input-group/types\";\nexport type {\n FormLabelAddonProps,\n FormLabelAddonType,\n FormLabelProps,\n} from \"./form-label/types\";\nexport type { FormMaskedInputProps } from \"./form-masked-input/types\";\nexport type { FormMultiSelectProps } from \"./form-multi-select/types\";\nexport type { FormNestedMultiSelectProps } from \"./form-nested-multi-select/types\";\nexport type { FormNestedSelectProps } from \"./form-nested-select/types\";\nexport type { FormPhoneNumberInputProps } from \"./form-phone-number-input/types\";\nexport type { FormPredictiveTextInputProps } from \"./form-predictive-text-input/types\";\nexport type { FormInputRangeSelectProps } from \"./form-range-select/types\";\nexport type { FormRangeSliderProps } from \"./form-range-slider/types\";\nexport type { FormInputSelectProps } from \"./form-select/types\";\nexport type { FormSelectHistogramProps } from \"./form-select-histogram/types\";\nexport type { FormSliderProps } from \"./form-slider/types\";\nexport type { FormTextareaProps } from \"./form-textarea/types\";\nexport type { FormTimeRangePickerProps } from \"./form-time-range-picker/types\";\nexport type { FormTimepickerProps } from \"./form-timepicker/types\";\nexport type { FormUnitNumberInputProps } from \"./form-unit-number-input/types\";\nexport * from \"./types\";\n\n// @catalog\n/**\n * A collection of form field components that each combine a label, input\n * control, and inline error message with consistent ARIA wiring.\n *\n * Use `Form.*` sub-components to build accessible forms. Use `Form.CustomField` to wrap any\n * bespoke input element in the same layout.\n *\n * Sub-components:\n * - `Form.CustomField` — layout shell for wrapping custom input elements.\n * - `Form.DateInput` — single date picker.\n * - `Form.DateRangeInput` — date range picker.\n * - `Form.ESignature` — e-signature capture field.\n * - `Form.HistogramSlider` — range slider with histogram overlay.\n * - `Form.Input` — single-line text input field.\n * - `Form.InputGroup` — grouped inputs with shared label and error state.\n * - `Form.Label` — standalone label for use outside a `Form.*` field.\n * - `Form.MaskedInput` — text input with a character-level input mask.\n * - `Form.MultiSelect` — multi-value dropdown select.\n * - `Form.NestedMultiSelect` — hierarchical multi-value select.\n * - `Form.NestedSelect` — hierarchical single-value select.\n * - `Form.OtpVerification` — OTP send-and-verify flow.\n * - `Form.PhoneNumberInput` — phone number input with country code selection.\n * - `Form.PredictiveTextInput` — text input with predictive suggestions.\n * - `Form.RangeSelect` — dual-value range dropdown select.\n * - `Form.RangeSlider` — dual-handle range slider.\n * - `Form.Select` — single-value dropdown select.\n * - `Form.SelectHistogram` — select control with histogram.\n * - `Form.Slider` — single-value range slider.\n * - `Form.Textarea` — multi-line text area.\n * - `Form.Timepicker` — time picker.\n * - `Form.TimeRangePicker` — time range picker.\n * - `Form.UnitNumberInput` — structured unit number input.\n */\nexport const Form = {\n /** Layout shell that wraps any custom input element with label, subtitle, and error message. */\n CustomField: FormCustomField,\n\n /** Single date picker with form layout. */\n DateInput: FormDateInput,\n\n /** Date range picker with form layout. */\n DateRangeInput: FormDateRangeInput,\n\n /** E-signature capture field with form layout. */\n ESignature: FormESignature,\n\n /** Range slider with histogram overlay and form layout. */\n HistogramSlider: FormHistogramSlider,\n\n /** Single-line text input field with form layout. */\n Input: FormInput,\n\n /** Grouped inputs with shared label, error state, and form layout. */\n InputGroup: FormInputGroup,\n\n /** Standalone label element for use outside a `Form.*` field with optional subtitle and addon icon. */\n Label: FormLabel,\n\n /** Text input with a character-level input mask and form layout. */\n MaskedInput: FormMaskedInput,\n\n /** Multi-value dropdown select with form layout. */\n MultiSelect: FormMultiSelect,\n\n /** Hierarchical multi-value select with form layout. */\n NestedMultiSelect: FormNestedMultiSelect,\n\n /** Hierarchical single-value select with form layout. */\n NestedSelect: FormNestedSelect,\n\n /** OTP send-and-verify flow with form layout. */\n OtpVerification: FormOtpVerification,\n\n /** Phone number input with country code selection and form layout. */\n PhoneNumberInput: FormPhoneNumberInput,\n\n /** Text input with predictive suggestions and form layout. */\n PredictiveTextInput: FormPredictiveTextInput,\n\n /** Dual-value range dropdown select with form layout. */\n RangeSelect: FormRangeSelect,\n\n /** Dual-handle range slider with form layout. */\n RangeSlider: FormRangeSlider,\n\n /** Single-value dropdown select with form layout. */\n Select: FormSelect,\n\n /** Select control with histogram and form layout. */\n SelectHistogram: FormSelectHistogram,\n\n /** Single-value range slider with form layout. */\n Slider: FormSlider,\n\n /** Multi-line text area with form layout. */\n Textarea: FormTextarea,\n\n /** Time picker with form layout. */\n Timepicker: FormTimepicker,\n\n /** Time range picker with form layout. */\n TimeRangePicker: FormTimeRangePicker,\n\n /** Structured unit number input with form layout. */\n UnitNumberInput: FormUnitNumberInput,\n};\n"],"names":["Form","CustomField","FormCustomField","DateInput","FormDateInput","DateRangeInput","FormDateRangeInput","ESignature","FormESignature","HistogramSlider","FormHistogramSlider","Input","FormInput","InputGroup","FormInputGroup","Label","FormLabel","MaskedInput","FormMaskedInput","MultiSelect","FormMultiSelect","NestedMultiSelect","FormNestedMultiSelect","NestedSelect","FormNestedSelect","OtpVerification","FormOtpVerification","PhoneNumberInput","FormPhoneNumberInput","PredictiveTextInput","FormPredictiveTextInput","RangeSelect","FormRangeSelect","RangeSlider","FormRangeSlider","Select","FormSelect","SelectHistogram","FormSelectHistogram","Slider","FormSlider","Textarea","FormTextarea","Timepicker","FormTimepicker","TimeRangePicker","FormTimeRangePicker","UnitNumberInput","FormUnitNumberInput"],"mappings":"+yDAwFO,MAAMA,EAAO,CAEhBC,YAAaC,EAGbC,UAAWC,EAGXC,eAAgBC,EAGhBC,WAAYC,EAGZC,gBAAiBC,EAGjBC,MAAOC,EAGPC,WAAYC,EAGZC,MAAOC,EAGPC,YAAaC,EAGbC,YAAaC,EAGbC,kBAAmBC,EAGnBC,aAAcC,EAGdC,gBAAiBC,EAGjBC,iBAAkBC,EAGlBC,oBAAqBC,EAGrBC,YAAaC,EAGbC,YAAaC,EAGbC,OAAQC,EAGRC,gBAAiBC,EAGjBC,OAAQC,EAGRC,SAAUC,EAGVC,WAAYC,EAGZC,gBAAiBC,EAGjBC,gBAAiBC"}
package/form/types.d.ts CHANGED
@@ -1,64 +1,5 @@
1
- import type { DateInputProps } from "../date-input/types";
2
- import type { DateRangeInputProps } from "../date-range-input/types";
3
- import type { EsignatureProps } from "../e-signature/types";
4
- import type { HistogramSliderProps } from "../histogram-slider";
5
- import type { InputPartialProps } from "../input/types";
6
- import type { InputGroupPartialProps } from "../input-group/types";
7
- import type { InputMultiSelectPartialProps } from "../input-multi-select/types";
8
- import type { InputNestedMultiSelectPartialProps } from "../input-nested-multi-select";
9
- import type { InputNestedSelectPartialProps } from "../input-nested-select";
10
- import type { InputRangeSelectPartialProps } from "../input-range-select/types";
11
- import type { InputRangeSliderProps } from "../input-range-slider/types";
12
- import type { InputSelectPartialProps } from "../input-select/types";
13
- import type { InputSliderProps } from "../input-slider";
14
- import type { TextareaPartialProps } from "../input-textarea/types";
15
1
  import type { ColProps } from "../layout/types";
16
- import type { MaskedInputPartialProps } from "../masked-input/types";
17
- import type { PhoneNumberInputProps } from "../phone-number-input/types";
18
- import type { PredictiveTextInputProps } from "../predictive-text-input/types";
19
- import type { SelectHistogramProps } from "../select-histogram";
20
- import type { TimeRangePickerProps } from "../time-range-picker/types";
21
- import type { TimepickerProps } from "../timepicker/types";
22
- import type { UnitNumberInputProps } from "../unit-number/types";
23
- /**
24
- * Display mechanism for the form label addon.
25
- *
26
- * - `"popover"` renders an icon that triggers a popover.
27
- * - `"tooltip"` is currently unsupported.
28
- */
29
- export type FormLabelAddonType = "tooltip" | "popover";
30
- /**
31
- * Configuration for an informational icon rendered inline with a form label.
32
- */
33
- export interface FormLabelAddonProps {
34
- /** Text or element displayed inside the popover overlay. */
35
- content: string | JSX.Element;
36
- /**
37
- * Display mechanism for the addon.
38
- * Omit to render no addon icon.
39
- */
40
- type?: FormLabelAddonType | undefined;
41
- /**
42
- * Custom icon element.
43
- *
44
- * @default <ICircleFillIcon />
45
- */
46
- icon?: JSX.Element | undefined;
47
- id?: string | undefined;
48
- /** Stacking order of the popover overlay. */
49
- zIndex?: number | undefined;
50
- "data-testid"?: string | undefined;
51
- }
52
- /**
53
- * Props for a form field label or `Form.Label` component.
54
- */
55
- export interface FormLabelProps extends React.LabelHTMLAttributes<HTMLLabelElement> {
56
- /** Informational icon and popover rendered inline with the label text. */
57
- addon?: FormLabelAddonProps | undefined;
58
- /** Supporting description rendered below the label. */
59
- subtitle?: string | JSX.Element | undefined;
60
- "data-testid"?: string | undefined;
61
- }
2
+ import type { FormLabelProps } from "./form-label/types";
62
3
  /**
63
4
  * Controls how a form field's outer container is rendered.
64
5
  *
@@ -97,151 +38,3 @@ export interface FormWrapperProps extends BaseFormElementProps {
97
38
  */
98
39
  id?: string | undefined;
99
40
  }
100
- /**
101
- * Props for `Form.Input`, combining text input props with the shared form
102
- * field layout.
103
- */
104
- export interface FormInputProps extends InputPartialProps, BaseFormElementProps {
105
- }
106
- /**
107
- * Props for `Form.InputGroup`, combining input group props with the shared
108
- * form field layout.
109
- *
110
- * `T` is the option item type. `V` is the selected value type.
111
- */
112
- export interface FormInputGroupProps<T, V> extends InputGroupPartialProps<T, V>, BaseFormElementProps {
113
- }
114
- /**
115
- * Props for `Form.MaskedInput`, combining masked input props with the shared
116
- * form field layout.
117
- */
118
- export interface FormMaskedInputProps extends MaskedInputPartialProps, BaseFormElementProps {
119
- }
120
- /**
121
- * Props for `Form.Textarea`, combining textarea props with the shared form
122
- * field layout.
123
- */
124
- export interface FormTextareaProps extends TextareaPartialProps, BaseFormElementProps {
125
- }
126
- /**
127
- * Props for `Form.CustomField`, which wraps any custom input element with a
128
- * shared label, subtitle, and inline error message layout.
129
- */
130
- export interface FormCustomFieldProps extends FormWrapperProps, BaseFormElementProps {
131
- }
132
- /**
133
- * Props for `Form.Select`, combining single-select input props with the shared
134
- * form field layout.
135
- *
136
- * `T` is the option item type. `V` is the selected value type.
137
- */
138
- export interface FormInputSelectProps<T, V> extends InputSelectPartialProps<T, V>, BaseFormElementProps {
139
- }
140
- /**
141
- * Props for `Form.RangeSelect`, combining range-select input props with the
142
- * shared form field layout.
143
- *
144
- * `T` is the option item type. `V` is the selected value type.
145
- */
146
- export interface FormInputRangeSelectProps<T, V> extends InputRangeSelectPartialProps<T, V>, BaseFormElementProps {
147
- }
148
- /**
149
- * Props for `Form.MultiSelect`, combining multi-select input props with the
150
- * shared form field layout.
151
- *
152
- * `T` is the option item type. `V` is the selected value type.
153
- */
154
- export interface FormMultiSelectProps<T, V> extends InputMultiSelectPartialProps<T, V>, BaseFormElementProps {
155
- }
156
- /**
157
- * Props for `Form.NestedSelect`, combining nested single-select input props
158
- * with the shared form field layout.
159
- *
160
- * `V1`, `V2`, and `V3` are the value types for the first, second, and third
161
- * nesting levels respectively.
162
- */
163
- export interface FormNestedSelectProps<V1, V2, V3> extends InputNestedSelectPartialProps<V1, V2, V3>, BaseFormElementProps {
164
- }
165
- /**
166
- * Props for `Form.NestedMultiSelect`, combining nested multi-select input
167
- * props with the shared form field layout.
168
- *
169
- * `V1`, `V2`, and `V3` are the value types for the first, second, and third
170
- * nesting levels respectively.
171
- */
172
- export interface FormNestedMultiSelectProps<V1, V2, V3> extends InputNestedMultiSelectPartialProps<V1, V2, V3>, BaseFormElementProps {
173
- }
174
- /**
175
- * Props for `Form.DateInput`, combining date input props with the shared form
176
- * field layout.
177
- */
178
- export interface FormDateInputProps extends DateInputProps, BaseFormElementProps {
179
- }
180
- /**
181
- * Props for `Form.DateRangeInput`, combining date-range input props with the
182
- * shared form field layout.
183
- */
184
- export interface FormDateRangeInputProps extends DateRangeInputProps, BaseFormElementProps {
185
- }
186
- /**
187
- * Props for `Form.Timepicker`, combining time picker props with the shared
188
- * form field layout.
189
- */
190
- export interface FormTimepickerProps extends TimepickerProps, BaseFormElementProps {
191
- }
192
- /**
193
- * Props for `Form.UnitNumberInput`, combining unit-number input props with the
194
- * shared form field layout.
195
- */
196
- export interface FormUnitNumberInputProps extends UnitNumberInputProps, BaseFormElementProps {
197
- }
198
- /**
199
- * Props for `Form.PhoneNumberInput`, combining phone-number input props with
200
- * the shared form field layout.
201
- */
202
- export interface FormPhoneNumberInputProps extends PhoneNumberInputProps, BaseFormElementProps {
203
- }
204
- /**
205
- * Props for `Form.TimeRangePicker`, combining time-range picker props with the
206
- * shared form field layout.
207
- */
208
- export interface FormTimeRangePickerProps extends TimeRangePickerProps, BaseFormElementProps {
209
- }
210
- /**
211
- * Props for `Form.PredictiveTextInput`, combining predictive text input props
212
- * with the shared form field layout.
213
- *
214
- * `T` is the suggestion item type. `V` is the selected value type.
215
- */
216
- export interface FormPredictiveTextInputProps<T, V> extends PredictiveTextInputProps<T, V>, BaseFormElementProps {
217
- }
218
- /**
219
- * Props for `Form.Slider`, combining single-value slider props with the shared
220
- * form field layout.
221
- */
222
- export interface FormSliderProps extends InputSliderProps, BaseFormElementProps {
223
- }
224
- /**
225
- * Props for `Form.RangeSlider`, combining range slider props with the shared
226
- * form field layout.
227
- */
228
- export interface FormRangeSliderProps extends InputRangeSliderProps, BaseFormElementProps {
229
- }
230
- /**
231
- * Props for `Form.HistogramSlider`, combining histogram slider props with the
232
- * shared form field layout.
233
- */
234
- export interface FormHistogramSliderProps extends HistogramSliderProps, BaseFormElementProps {
235
- }
236
- /**
237
- * Props for `Form.ESignature`, combining e-signature props with the shared
238
- * form field layout.
239
- */
240
- export interface FormESignatureProps extends EsignatureProps, BaseFormElementProps {
241
- }
242
- /**
243
- * Props for `Form.SelectHistogram`, combining select-histogram props with the
244
- * shared form field layout.
245
- */
246
- export interface FormSelectHistogramProps extends SelectHistogramProps, BaseFormElementProps {
247
- }
@@ -1 +1 @@
1
- {"version":3,"file":"fullscreen-image-carousel.js","sources":["../../src/fullscreen-image-carousel/fullscreen-image-carousel.tsx"],"sourcesContent":["import {\n ChevronLeftIcon,\n ChevronRightIcon,\n CrossIcon,\n MagnifierMinusIcon,\n MagnifierPlusIcon,\n} from \"@lifesg/react-icons\";\nimport { BinIcon } from \"@lifesg/react-icons/bin\";\nimport { announce, clearAnnouncer } from \"@react-aria/live-announcer\";\nimport clsx from \"clsx\";\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport type {\n ReactZoomPanPinchContentRef,\n ReactZoomPanPinchRef,\n} from \"react-zoom-pan-pinch\";\nimport { TransformComponent, TransformWrapper } from \"react-zoom-pan-pinch\";\n\nimport { ModalV2 } from \"../modal-v2\";\nimport { ClickableIcon } from \"../shared/clickable-icon\";\nimport { useStateCallback } from \"../shared/hooks\";\nimport { ImagePlaceholder } from \"../shared/image-placeholder\";\nimport { formatUnitValue, useApplyStyle } from \"../theme\";\nimport { Typography } from \"../typography\";\nimport { useEventListener } from \"../util\";\nimport * as styles from \"./fullscreen-image-carousel.styles\";\nimport { StatefulImage } from \"./stateful-image\";\nimport type {\n FullscreenImageCarouselCustomItemProps,\n FullscreenImageCarouselItemProps,\n FullscreenImageCarouselProps,\n FullscreenImageCarouselRef,\n ImageDimension,\n} from \"./types\";\n\nconst isCustomItem = (\n item: FullscreenImageCarouselItemProps | undefined\n): item is FullscreenImageCarouselCustomItemProps =>\n !!item && item.type === \"custom\";\n\nexport const Component = (\n {\n items,\n initialActiveItemIndex,\n hideThumbnail = false,\n hideNavigation = false,\n hideCounter = false,\n hideMagnifier = false,\n onDelete,\n onClose,\n insets,\n show,\n ...otherProps\n }: FullscreenImageCarouselProps,\n ref: React.Ref<FullscreenImageCarouselRef>\n) => {\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const [currentSlide, setCurrentSlide] = useStateCallback(\n initialActiveItemIndex ?? 0\n );\n const [imagesDimension, setImageDimension] = useState<\n Record<string, ImageDimension>\n >({});\n const [zoom, setZoom] = useState(1);\n const [startX, setStartX] = useState<number | undefined>();\n const [endX, setEndX] = useState<number | undefined>();\n const containerRef = useRef<HTMLDivElement>(null);\n const thumbnailRefs = useRef<(HTMLDivElement | null)[]>([]);\n const zoomRefs = useRef<(ReactZoomPanPinchContentRef | null)[]>([]);\n const imageRef = useRef<HTMLDivElement>(null);\n const topActionButtonsRef = useRef<HTMLDivElement>(null);\n const prevArrowButtonRef = useRef<HTMLButtonElement>(null);\n const nextArrowButtonRef = useRef<HTMLButtonElement>(null);\n const thumbnailContainerRef = useRef<HTMLDivElement>(null);\n const diff = startX && endX ? startX - endX : 0;\n const currentItem = items[currentSlide];\n const hasAnyItemLabel = items.some(\n (item) => isCustomItem(item) && !!item.itemLabel?.trim()\n );\n const carouselItemNoun = hasAnyItemLabel ? \"item\" : \"image\";\n const hasFileInfo = useMemo(\n () =>\n items.some(\n (item) => item.fileName?.trim() || item.fileSize?.trim()\n ),\n [items]\n );\n\n useApplyStyle(topActionButtonsRef, {\n [styles.tokens.topActionButtons.insetTop]: formatUnitValue(\n insets?.top,\n \"px\"\n ),\n [styles.tokens.topActionButtons.insetLeft]: formatUnitValue(\n insets?.left,\n \"px\"\n ),\n [styles.tokens.topActionButtons.insetRight]: formatUnitValue(\n insets?.right,\n \"px\"\n ),\n });\n\n useApplyStyle(prevArrowButtonRef, {\n [styles.tokens.arrowButton.insetLeft]: formatUnitValue(\n insets?.left,\n \"px\"\n ),\n });\n\n useApplyStyle(nextArrowButtonRef, {\n [styles.tokens.arrowButton.insetRight]: formatUnitValue(\n insets?.right,\n \"px\"\n ),\n });\n\n useApplyStyle(thumbnailContainerRef, {\n [styles.tokens.thumbnailContainer.insetBottom]: formatUnitValue(\n insets?.bottom,\n \"px\"\n ),\n });\n\n const getItemAriaLabel = useCallback(\n (index: number) => {\n const item = items[index];\n const itemTypeLabel = hasAnyItemLabel ? \"Item\" : \"Image\";\n const prefix = isCustomItem(item)\n ? item.itemLabel?.trim() || \"\"\n : item.alt?.trim() || \"\";\n const positionLabel = `${itemTypeLabel} ${index + 1} of ${\n items.length\n }.`;\n\n return prefix ? `${prefix}. ${positionLabel}` : positionLabel;\n },\n [items, hasAnyItemLabel]\n );\n\n useImperativeHandle<FullscreenImageCarouselRef, FullscreenImageCarouselRef>(\n ref,\n () => ({\n currentItemIndex: currentSlide,\n setCurrentItem: goToSlide,\n goToPrevItem: goToPrevSlide,\n goToNextItem: goToNextSlide,\n })\n );\n\n // =============================================================================\n // EFFECTS\n // =============================================================================\n useEventListener(\"keydown\", handleKeyDown, \"document\");\n\n useEffect(() => {\n if (show) {\n imageRef.current?.focus();\n }\n }, [show]);\n\n useEffect(() => {\n if (items.length === 0) {\n setCurrentSlide(0);\n return;\n }\n\n if (currentSlide > items.length - 1) {\n setCurrentSlide(items.length - 1);\n }\n }, [currentSlide, items.length, setCurrentSlide]);\n\n useEffect(() => {\n thumbnailRefs.current?.[currentSlide]?.scrollIntoView({\n behavior: \"smooth\",\n inline: \"center\",\n });\n setZoom(1);\n }, [currentSlide]);\n\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleTouchStart = (e: React.TouchEvent) => {\n if (zoom <= 1) setStartX(e.touches[0].clientX);\n };\n\n const handleTouchMove = (e: React.TouchEvent) => {\n if (!startX || zoom > 1) return;\n setEndX(e.touches[0].clientX);\n };\n\n const handleTouchEnd = () => {\n if (!containerRef.current) return;\n if (Math.abs(diff) > containerRef.current.offsetWidth / 3) {\n if (diff > 0) {\n goToNextSlide();\n } else {\n goToPrevSlide();\n }\n }\n setStartX(undefined);\n setEndX(undefined);\n };\n\n const handleZoom = (e: ReactZoomPanPinchRef) => {\n setZoom(e.state.scale);\n };\n\n const handleDelete = () => {\n if (currentItem && onDelete) {\n onDelete(currentItem, currentSlide);\n }\n };\n\n function handleKeyDown(e: KeyboardEvent) {\n if (e.key === \"ArrowRight\") {\n goToNextSlide();\n } else if (e.key === \"ArrowLeft\") {\n goToPrevSlide();\n } else if (e.key === \"Escape\") {\n onClose?.();\n }\n }\n\n const handleMagnifier = () => {\n if (zoom === 1) {\n const zoomRatio = getZoomRatio();\n zoomRefs.current?.[currentSlide]?.centerView(zoomRatio);\n setZoom(zoomRatio ?? 1);\n } else {\n setZoom(1);\n zoomRefs.current?.[currentSlide]?.resetTransform();\n }\n };\n\n const setDimension = ({\n src,\n height,\n width,\n }: {\n src: string;\n height: number;\n width: number;\n }) => {\n setImageDimension((oldState) => {\n return { ...oldState, [src]: { height, width } };\n });\n };\n\n const getZoomRatio = () => {\n if (!currentItem || isCustomItem(currentItem)) {\n return;\n }\n\n const imageDimension = imagesDimension[currentItem.src];\n\n if (containerRef.current && !!imageDimension) {\n const { clientHeight, clientWidth } = containerRef.current;\n const { width, height } = imageDimension;\n const isSmallImg = width < clientWidth && height < clientHeight;\n\n const isImgLandscapeRelativeToDevice =\n height / width < clientHeight / clientWidth;\n\n if (isSmallImg) {\n return isImgLandscapeRelativeToDevice\n ? clientWidth / width\n : clientHeight / height;\n }\n\n return isImgLandscapeRelativeToDevice\n ? clientHeight / (height / (width / clientWidth))\n : clientWidth / (width / (height / clientHeight));\n }\n };\n\n // =============================================================================\n // HELPER FUNCTIONS\n // =============================================================================\n const goToPrevSlide = () => {\n zoomRefs.current?.[currentSlide]?.resetTransform();\n setCurrentSlide(\n (prev) => (prev === 0 ? items.length - 1 : prev - 1),\n (slide) => {\n clearAnnouncer(\"polite\");\n announce(getItemAriaLabel(slide), \"polite\");\n }\n );\n };\n\n const goToNextSlide = () => {\n zoomRefs.current?.[currentSlide]?.resetTransform();\n setCurrentSlide(\n (prev) => (prev === items.length - 1 ? 0 : prev + 1),\n (slide) => {\n clearAnnouncer(\"polite\");\n announce(getItemAriaLabel(slide), \"polite\");\n }\n );\n };\n\n const goToSlide = (index: number) => {\n zoomRefs.current?.[currentSlide]?.resetTransform();\n setCurrentSlide(index);\n };\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n const renderSlides = () => {\n return (\n <div\n className={styles.imageGallerySlides}\n style={{\n transform: `translateX(calc(${\n -currentSlide * 100\n }% - ${diff}px))`,\n }}\n >\n {items.map((item, index) => {\n const isActive = index === currentSlide;\n const isActiveOrAdjacent =\n Math.abs(index - currentSlide) <= 1 ||\n (currentSlide === 0 && index === items.length - 1) ||\n (currentSlide === items.length - 1 && index === 0);\n\n return (\n <div\n className={styles.imageGallerySlide}\n key={index}\n data-testid=\"slide-item\"\n >\n <div\n className={styles.focusableImageRegion}\n ref={isActive ? imageRef : null}\n tabIndex={isActive ? 0 : -1}\n >\n {isCustomItem(item) ? (\n isActiveOrAdjacent ? (\n item.renderContent()\n ) : (\n <ImagePlaceholder\n className={\n styles.slidePlaceholderImage\n }\n />\n )\n ) : (\n <TransformWrapper\n ref={(el) =>\n (zoomRefs.current[index] = el)\n }\n panning={{\n disabled: zoom <= 1,\n }}\n initialScale={1}\n onZoom={handleZoom}\n onZoomStop={handleZoom}\n onWheel={handleZoom}\n >\n <TransformComponent>\n <StatefulImage\n className={styles.slideImage}\n src={item.src}\n alt={getItemAriaLabel(index)}\n placeholder={\n <ImagePlaceholder\n className={\n styles.slidePlaceholderImage\n }\n />\n }\n fit=\"scale-down\"\n retrieveImageDimension\n setDimension={setDimension}\n />\n </TransformComponent>\n </TransformWrapper>\n )}\n </div>\n </div>\n );\n })}\n </div>\n );\n };\n\n const renderFileInfo = () => {\n const { fileName, fileSize } = currentItem ?? {};\n const trimmedName = fileName?.trim();\n const trimmedSize = fileSize?.trim();\n\n return (\n <div\n className={clsx(\n styles.fileInfoTextWrapper,\n !trimmedSize && styles.fileInfoTextWrapperCentered\n )}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n data-testid=\"file-info-bar\"\n >\n {trimmedName && (\n <Typography.BodyBL\n className={styles.fileInfoFileName}\n weight=\"semibold\"\n data-testid=\"file-info-name\"\n >\n {trimmedName}\n </Typography.BodyBL>\n )}\n {trimmedSize && (\n <Typography.BodyMD\n className={styles.fileInfoFileSize}\n data-testid=\"file-info-size\"\n >\n {trimmedSize}\n </Typography.BodyMD>\n )}\n </div>\n );\n };\n\n const renderThumbnails = () => {\n return (\n <div\n className={styles.thumbnailContainer}\n ref={thumbnailContainerRef}\n aria-hidden=\"true\"\n data-testid=\"thumbnail-container\"\n >\n <div className={styles.thumbnailWrapper}>\n {items.map((item, index) => {\n const src = isCustomItem(item)\n ? item.thumbnailSrc\n : item.thumbnailSrc ?? item.src;\n return (\n <div\n className={styles.thumbnailItemContainer}\n key={index}\n >\n <div\n className={styles.thumbnailItem}\n data-active={index === currentSlide}\n data-testid=\"thumbnail-item\"\n onClick={() => goToSlide(index)}\n ref={(el) =>\n (thumbnailRefs.current[index] = el)\n }\n >\n {src ? (\n <StatefulImage\n className={styles.thumbnailImage}\n src={src}\n alt={`Thumbnail ${index + 1}`}\n fit=\"cover\"\n />\n ) : (\n <ImagePlaceholder\n className={\n styles.slidePlaceholderImage\n }\n />\n )}\n </div>\n </div>\n );\n })}\n </div>\n </div>\n );\n };\n\n return (\n <ModalV2\n {...otherProps}\n data-testid=\"image-carousel-modal\"\n aria-label={hasAnyItemLabel ? \"Carousel\" : \"Image carousel\"}\n show={show}\n disableInitialFocus\n >\n <div className={styles.carouselModalContent}>\n <div className={styles.imageGalleryContainer}>\n <div className={styles.imageGalleryWrapper}>\n <div\n className={styles.imageGallerySwipe}\n ref={containerRef}\n onTouchStart={handleTouchStart}\n onTouchMove={handleTouchMove}\n onTouchEnd={handleTouchEnd}\n >\n {renderSlides()}\n </div>\n\n {!hideNavigation && (\n <>\n <ClickableIcon\n className={clsx(\n styles.iconButton,\n styles.arrowButton,\n styles.arrowButtonLeft\n )}\n ref={prevArrowButtonRef}\n aria-label={`Previous ${carouselItemNoun}`}\n data-testid=\"prev-btn\"\n onClick={goToPrevSlide}\n >\n <ChevronLeftIcon aria-hidden />\n </ClickableIcon>\n <ClickableIcon\n className={clsx(\n styles.iconButton,\n styles.arrowButton,\n styles.arrowButtonRight\n )}\n ref={nextArrowButtonRef}\n aria-label={`Next ${carouselItemNoun}`}\n data-testid=\"forward-btn\"\n onClick={goToNextSlide}\n >\n <ChevronRightIcon aria-hidden />\n </ClickableIcon>\n </>\n )}\n\n {!hideCounter && (\n <div className={styles.boxChip} aria-hidden=\"true\">\n <Typography.BodyXS\n className={styles.chip}\n weight=\"semibold\"\n data-testid=\"carousel-counter\"\n >{`${currentSlide + 1}/${\n items.length\n }`}</Typography.BodyXS>\n </div>\n )}\n </div>\n\n {!hideThumbnail && renderThumbnails()}\n </div>\n <div\n className={styles.topActionButtons}\n ref={topActionButtonsRef}\n data-has-file-info={hasFileInfo}\n >\n {hasFileInfo && renderFileInfo()}\n {!hideMagnifier && !isCustomItem(currentItem) && (\n <ClickableIcon\n className={styles.iconButton}\n aria-label={zoom === 1 ? \"Zoom in\" : \"Zoom out\"}\n onClick={handleMagnifier}\n >\n {zoom === 1 ? (\n <MagnifierPlusIcon aria-hidden />\n ) : (\n <MagnifierMinusIcon aria-hidden />\n )}\n </ClickableIcon>\n )}\n\n {onDelete && (\n <ClickableIcon\n className={clsx(\n styles.iconButton,\n styles.iconButtonError\n )}\n aria-label={`Delete ${\n (isCustomItem(currentItem) &&\n currentItem.itemLabel?.trim()) ||\n \"image\"\n }`}\n data-testid=\"delete-btn\"\n onClick={handleDelete}\n >\n <BinIcon aria-hidden />\n </ClickableIcon>\n )}\n\n <ClickableIcon\n className={styles.iconButton}\n aria-label={\n hasAnyItemLabel\n ? \"Close carousel\"\n : \"Close image carousel\"\n }\n onClick={onClose}\n >\n <CrossIcon aria-hidden />\n </ClickableIcon>\n </div>\n </div>\n </ModalV2>\n );\n};\n\n/**\n * A fullscreen modal carousel for browsing images and custom media items.\n *\n * Use to present a collection of images or custom content in an overlay with\n * navigation controls, zoom support, and an optional thumbnail strip.\n * The top info bar is rendered only when at least one item provides some file metadata.\n */\nexport const FullscreenImageCarousel = forwardRef<\n FullscreenImageCarouselRef,\n FullscreenImageCarouselProps\n>(Component);\n"],"names":["isCustomItem","item","type","Component","_a","ref","items","initialActiveItemIndex","hideThumbnail","hideNavigation","hideCounter","hideMagnifier","onDelete","onClose","insets","show","otherProps","__rest","currentSlide","setCurrentSlide","useStateCallback","imagesDimension","setImageDimension","useState","zoom","setZoom","startX","setStartX","endX","setEndX","containerRef","useRef","thumbnailRefs","zoomRefs","imageRef","topActionButtonsRef","prevArrowButtonRef","nextArrowButtonRef","thumbnailContainerRef","diff","currentItem","hasAnyItemLabel","some","itemLabel","trim","carouselItemNoun","hasFileInfo","useMemo","fileName","fileSize","_b","useApplyStyle","styles.tokens","topActionButtons","insetTop","formatUnitValue","top","insetLeft","left","insetRight","right","arrowButton","thumbnailContainer","insetBottom","bottom","getItemAriaLabel","useCallback","index","itemTypeLabel","prefix","alt","positionLabel","length","useImperativeHandle","currentItemIndex","setCurrentItem","goToSlide","goToPrevItem","goToPrevSlide","goToNextItem","goToNextSlide","useEventListener","e","key","useEffect","current","focus","scrollIntoView","behavior","inline","handleZoom","state","scale","setDimension","src","height","width","oldState","Object","assign","getZoomRatio","imageDimension","clientHeight","clientWidth","isImgLandscapeRelativeToDevice","resetTransform","prev","slide","clearAnnouncer","announce","_jsx","ModalV2","disableInitialFocus","_jsxs","className","styles.carouselModalContent","children","styles.imageGalleryContainer","styles.imageGalleryWrapper","styles.imageGallerySwipe","onTouchStart","touches","clientX","onTouchMove","onTouchEnd","Math","abs","offsetWidth","undefined","styles.imageGallerySlides","style","transform","map","isActive","isActiveOrAdjacent","styles.imageGallerySlide","styles.focusableImageRegion","tabIndex","renderContent","ImagePlaceholder","styles.slidePlaceholderImage","TransformWrapper","el","panning","disabled","initialScale","onZoom","onZoomStop","onWheel","TransformComponent","StatefulImage","styles.slideImage","placeholder","fit","retrieveImageDimension","_Fragment","ClickableIcon","clsx","styles.iconButton","styles.arrowButton","styles.arrowButtonLeft","onClick","ChevronLeftIcon","styles.arrowButtonRight","ChevronRightIcon","styles.boxChip","Typography","BodyXS","styles.chip","weight","styles.thumbnailContainer","styles.thumbnailWrapper","thumbnailSrc","styles.thumbnailItemContainer","styles.thumbnailItem","styles.thumbnailImage","styles.topActionButtons","trimmedName","trimmedSize","styles.fileInfoTextWrapper","styles.fileInfoTextWrapperCentered","BodyBL","styles.fileInfoFileName","BodyMD","styles.fileInfoFileSize","renderFileInfo","zoomRatio","centerView","_d","_c","MagnifierPlusIcon","MagnifierMinusIcon","styles.iconButtonError","BinIcon","CrossIcon","FullscreenImageCarousel","forwardRef"],"mappings":"+rEA0CA,MAAMA,GACFC,KAEEA,GAAsB,WAAdA,EAAKC,KAENC,GAAY,CACrBC,EAaAC,cAbAC,MACIA,GAAKC,uBACLA,GAAsBC,cACtBA,IAAgB,EAAKC,eACrBA,IAAiB,EAAKC,YACtBA,IAAc,EAAKC,cACnBA,IAAgB,EAAKC,SACrBA,GAAQC,QACRA,GAAOC,OACPA,GAAMC,KACNA,IAAIX,EACDY,GAAUC,EAAAb,EAXjB,wIAkBA,MAAOc,GAAcC,IAAmBC,EACpCb,SAAAA,GAA0B,IAEvBc,GAAiBC,IAAqBC,EAE3C,CAAA,IACKC,GAAMC,IAAWF,EAAS,IAC1BG,GAAQC,IAAaJ,KACrBK,GAAMC,IAAWN,IAClBO,GAAeC,EAAuB,MACtCC,GAAgBD,EAAkC,IAClDE,GAAWF,EAA+C,IAC1DG,GAAWH,EAAuB,MAClCI,GAAsBJ,EAAuB,MAC7CK,GAAqBL,EAA0B,MAC/CM,GAAqBN,EAA0B,MAC/CO,GAAwBP,EAAuB,MAC/CQ,GAAOb,IAAUE,GAAOF,GAASE,GAAO,EACxCY,GAAclC,GAAMY,IACpBuB,GAAkBnC,GAAMoC,MACzBzC,IAAQ,IAAAG,EAAC,OAAAJ,GAAaC,OAAyB,QAAdG,EAAAH,EAAK0C,iBAAS,IAAAvC,OAAA,EAAAA,EAAEwC,OAAM,IAEtDC,GAAmBJ,GAAkB,OAAS,QAC9CK,GAAcC,GAChB,IACIzC,GAAMoC,MACDzC,YAAS,OAAa,UAAbA,EAAK+C,gBAAQ,IAAA5C,OAAA,EAAAA,EAAEwC,UAAuB,UAAb3C,EAAKgD,gBAAQ,IAAAC,OAAA,EAAAA,EAAEN,OAAM,KAEhE,CAACtC,KAGL6C,EAAchB,GAAqB,CAC/B,CAACiB,EAAcC,iB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,IAAAjF,OAAA,EAAAA,EAAGc,WAAa,IAAAgC,GAAAA,EAAEyI,WAAWD,GAC7CjK,GAAQiK,QAAAA,EAAa,EACzB,MACIjK,GAAQ,GACwB,QAAhCmK,EAAgB,QAAhBC,EAAA5J,GAASoD,eAAO,IAAAwG,OAAA,EAAAA,EAAG3K,WAAa,IAAA0K,GAAAA,EAAEnF,gBACtC,EA8T4CW,SAGpBN,EADM,IAATtF,GACIsK,EAEAC,EAFiB,CAAA,eAAA,MAO7BnL,IACGkG,EAAC8C,EAAa,CACV1C,UAAW2C,EACPC,EACAkC,gBAEQ,UACPhM,GAAawC,cACVU,GAAAV,GAAYG,kCAAWC,SAC3B,wBAEQ,aACZqH,QA5WH,KACbzH,IAAe5B,IACfA,GAAS4B,GAAatB,GAC1B,EAyWyCkG,SAErBN,EAACmF,EAAO,CAAA,eAAA,MAIhBnF,EAAC8C,EAAa,CACV1C,UAAW4C,EAAiB,aAExBrH,GACM,iBACA,uBAEVwH,QAASpJ,GAAOuG,SAEhBN,EAACoF,gCAIP,EAWLC,GAA0BC,EAGrCjM"}
1
+ {"version":3,"file":"fullscreen-image-carousel.js","sources":["../../src/fullscreen-image-carousel/fullscreen-image-carousel.tsx"],"sourcesContent":["import {\n ChevronLeftIcon,\n ChevronRightIcon,\n CrossIcon,\n MagnifierMinusIcon,\n MagnifierPlusIcon,\n} from \"@lifesg/react-icons\";\nimport { BinIcon } from \"@lifesg/react-icons/bin\";\nimport { announce, clearAnnouncer } from \"@react-aria/live-announcer\";\nimport clsx from \"clsx\";\nimport {\n forwardRef,\n useCallback,\n useEffect,\n useImperativeHandle,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport type {\n ReactZoomPanPinchContentRef,\n ReactZoomPanPinchRef,\n} from \"react-zoom-pan-pinch\";\nimport { TransformComponent, TransformWrapper } from \"react-zoom-pan-pinch\";\n\nimport { ModalV2 } from \"../modal-v2\";\nimport { ClickableIcon } from \"../shared/clickable-icon\";\nimport { useStateCallback } from \"../shared/hooks\";\nimport { ImagePlaceholder } from \"../shared/image-placeholder\";\nimport { formatUnitValue, useApplyStyle } from \"../theme\";\nimport { Typography } from \"../typography\";\nimport { useEventListener } from \"../util\";\nimport * as styles from \"./fullscreen-image-carousel.styles\";\nimport { StatefulImage } from \"./stateful-image\";\nimport type {\n FullscreenImageCarouselCustomItemProps,\n FullscreenImageCarouselItemProps,\n FullscreenImageCarouselProps,\n FullscreenImageCarouselRef,\n ImageDimension,\n} from \"./types\";\n\nconst isCustomItem = (\n item: FullscreenImageCarouselItemProps | undefined\n): item is FullscreenImageCarouselCustomItemProps =>\n !!item && item.type === \"custom\";\n\nexport const Component = (\n {\n items,\n initialActiveItemIndex,\n hideThumbnail = false,\n hideNavigation = false,\n hideCounter = false,\n hideMagnifier = false,\n onDelete,\n onClose,\n insets,\n show,\n ...otherProps\n }: FullscreenImageCarouselProps,\n ref: React.Ref<FullscreenImageCarouselRef>\n) => {\n // =============================================================================\n // CONST, STATE, REF\n // =============================================================================\n const [currentSlide, setCurrentSlide] = useStateCallback(\n initialActiveItemIndex ?? 0\n );\n const [imagesDimension, setImageDimension] = useState<\n Record<string, ImageDimension>\n >({});\n const [zoom, setZoom] = useState(1);\n const [startX, setStartX] = useState<number | undefined>();\n const [endX, setEndX] = useState<number | undefined>();\n const containerRef = useRef<HTMLDivElement>(null);\n const thumbnailRefs = useRef<(HTMLDivElement | null)[]>([]);\n const zoomRefs = useRef<(ReactZoomPanPinchContentRef | null)[]>([]);\n const imageRef = useRef<HTMLDivElement>(null);\n const topActionButtonsRef = useRef<HTMLDivElement>(null);\n const prevArrowButtonRef = useRef<HTMLButtonElement>(null);\n const nextArrowButtonRef = useRef<HTMLButtonElement>(null);\n const thumbnailContainerRef = useRef<HTMLDivElement>(null);\n const diff = startX && endX ? startX - endX : 0;\n const currentItem = items[currentSlide];\n const hasAnyItemLabel = items.some(\n (item) => isCustomItem(item) && !!item.itemLabel?.trim()\n );\n const carouselItemNoun = hasAnyItemLabel ? \"item\" : \"image\";\n const hasFileInfo = useMemo(\n () =>\n items.some(\n (item) => item.fileName?.trim() || item.fileSize?.trim()\n ),\n [items]\n );\n\n useApplyStyle(topActionButtonsRef, {\n [styles.tokens.topActionButtons.insetTop]: formatUnitValue(\n insets?.top,\n \"px\"\n ),\n [styles.tokens.topActionButtons.insetLeft]: formatUnitValue(\n insets?.left,\n \"px\"\n ),\n [styles.tokens.topActionButtons.insetRight]: formatUnitValue(\n insets?.right,\n \"px\"\n ),\n });\n\n useApplyStyle(prevArrowButtonRef, {\n [styles.tokens.arrowButton.insetLeft]: formatUnitValue(\n insets?.left,\n \"px\"\n ),\n });\n\n useApplyStyle(nextArrowButtonRef, {\n [styles.tokens.arrowButton.insetRight]: formatUnitValue(\n insets?.right,\n \"px\"\n ),\n });\n\n useApplyStyle(thumbnailContainerRef, {\n [styles.tokens.thumbnailContainer.insetBottom]: formatUnitValue(\n insets?.bottom,\n \"px\"\n ),\n });\n\n const getItemAriaLabel = useCallback(\n (index: number) => {\n const item = items[index];\n const itemTypeLabel = hasAnyItemLabel ? \"Item\" : \"Image\";\n const prefix = isCustomItem(item)\n ? item.itemLabel?.trim() || \"\"\n : item.alt?.trim() || \"\";\n const positionLabel = `${itemTypeLabel} ${index + 1} of ${\n items.length\n }.`;\n\n return prefix ? `${prefix}. ${positionLabel}` : positionLabel;\n },\n [items, hasAnyItemLabel]\n );\n\n useImperativeHandle<FullscreenImageCarouselRef, FullscreenImageCarouselRef>(\n ref,\n () => ({\n currentItemIndex: currentSlide,\n setCurrentItem: goToSlide,\n goToPrevItem: goToPrevSlide,\n goToNextItem: goToNextSlide,\n })\n );\n\n // =============================================================================\n // EFFECTS\n // =============================================================================\n useEventListener(\"keydown\", handleKeyDown, \"document\");\n\n useEffect(() => {\n if (show) {\n imageRef.current?.focus();\n }\n }, [show]);\n\n useEffect(() => {\n if (items.length === 0) {\n setCurrentSlide(0);\n return;\n }\n\n if (currentSlide > items.length - 1) {\n setCurrentSlide(items.length - 1);\n }\n }, [currentSlide, items.length, setCurrentSlide]);\n\n useEffect(() => {\n thumbnailRefs.current?.[currentSlide]?.scrollIntoView({\n behavior: \"smooth\",\n inline: \"center\",\n });\n setZoom(1);\n }, [currentSlide]);\n\n // =============================================================================\n // EVENT HANDLERS\n // =============================================================================\n const handleTouchStart = (e: React.TouchEvent) => {\n if (zoom <= 1) setStartX(e.touches[0].clientX);\n };\n\n const handleTouchMove = (e: React.TouchEvent) => {\n if (!startX || zoom > 1) return;\n setEndX(e.touches[0].clientX);\n };\n\n const handleTouchEnd = () => {\n if (!containerRef.current) return;\n if (Math.abs(diff) > containerRef.current.offsetWidth / 3) {\n if (diff > 0) {\n goToNextSlide();\n } else {\n goToPrevSlide();\n }\n }\n setStartX(undefined);\n setEndX(undefined);\n };\n\n const handleZoom = (e: ReactZoomPanPinchRef) => {\n setZoom(e.state.scale);\n };\n\n const handleDelete = () => {\n if (currentItem && onDelete) {\n onDelete(currentItem, currentSlide);\n }\n };\n\n function handleKeyDown(e: KeyboardEvent) {\n if (e.key === \"ArrowRight\") {\n goToNextSlide();\n } else if (e.key === \"ArrowLeft\") {\n goToPrevSlide();\n } else if (e.key === \"Escape\") {\n onClose?.();\n }\n }\n\n const handleMagnifier = () => {\n if (zoom === 1) {\n const zoomRatio = getZoomRatio();\n zoomRefs.current?.[currentSlide]?.centerView(zoomRatio);\n setZoom(zoomRatio ?? 1);\n } else {\n setZoom(1);\n zoomRefs.current?.[currentSlide]?.resetTransform();\n }\n };\n\n const setDimension = ({\n src,\n height,\n width,\n }: {\n src: string;\n height: number;\n width: number;\n }) => {\n setImageDimension((oldState) => {\n return { ...oldState, [src]: { height, width } };\n });\n };\n\n const getZoomRatio = () => {\n if (!currentItem || isCustomItem(currentItem)) {\n return;\n }\n\n const imageDimension = imagesDimension[currentItem.src];\n\n if (containerRef.current && !!imageDimension) {\n const { clientHeight, clientWidth } = containerRef.current;\n const { width, height } = imageDimension;\n const isSmallImg = width < clientWidth && height < clientHeight;\n\n const isImgLandscapeRelativeToDevice =\n height / width < clientHeight / clientWidth;\n\n if (isSmallImg) {\n return isImgLandscapeRelativeToDevice\n ? clientWidth / width\n : clientHeight / height;\n }\n\n return isImgLandscapeRelativeToDevice\n ? clientHeight / (height / (width / clientWidth))\n : clientWidth / (width / (height / clientHeight));\n }\n };\n\n // =============================================================================\n // HELPER FUNCTIONS\n // =============================================================================\n const goToPrevSlide = () => {\n zoomRefs.current?.[currentSlide]?.resetTransform();\n setCurrentSlide(\n (prev) => (prev === 0 ? items.length - 1 : prev - 1),\n (slide) => {\n clearAnnouncer(\"polite\");\n announce(getItemAriaLabel(slide), \"polite\");\n }\n );\n };\n\n const goToNextSlide = () => {\n zoomRefs.current?.[currentSlide]?.resetTransform();\n setCurrentSlide(\n (prev) => (prev === items.length - 1 ? 0 : prev + 1),\n (slide) => {\n clearAnnouncer(\"polite\");\n announce(getItemAriaLabel(slide), \"polite\");\n }\n );\n };\n\n const goToSlide = (index: number) => {\n zoomRefs.current?.[currentSlide]?.resetTransform();\n setCurrentSlide(index);\n };\n\n // =============================================================================\n // RENDER FUNCTIONS\n // =============================================================================\n const renderSlides = () => {\n return (\n <div\n className={styles.imageGallerySlides}\n style={{\n transform: `translateX(calc(${\n -currentSlide * 100\n }% - ${diff}px))`,\n }}\n >\n {items.map((item, index) => {\n const isActive = index === currentSlide;\n const isActiveOrAdjacent =\n Math.abs(index - currentSlide) <= 1 ||\n (currentSlide === 0 && index === items.length - 1) ||\n (currentSlide === items.length - 1 && index === 0);\n\n return (\n <div\n className={styles.imageGallerySlide}\n key={index}\n data-testid=\"slide-item\"\n >\n <div\n className={styles.focusableImageRegion}\n ref={isActive ? imageRef : null}\n tabIndex={isActive ? 0 : -1}\n >\n {isCustomItem(item) ? (\n isActiveOrAdjacent ? (\n item.renderContent()\n ) : (\n <ImagePlaceholder\n className={\n styles.slidePlaceholderImage\n }\n />\n )\n ) : (\n <TransformWrapper\n ref={(el) =>\n (zoomRefs.current[index] = el)\n }\n panning={{\n disabled: zoom <= 1,\n }}\n initialScale={1}\n onZoom={handleZoom}\n onZoomStop={handleZoom}\n onWheel={handleZoom}\n >\n <TransformComponent>\n <StatefulImage\n className={styles.slideImage}\n src={item.src}\n alt={getItemAriaLabel(index)}\n placeholder={\n <ImagePlaceholder\n className={\n styles.slidePlaceholderImage\n }\n />\n }\n fit=\"scale-down\"\n retrieveImageDimension\n setDimension={setDimension}\n />\n </TransformComponent>\n </TransformWrapper>\n )}\n </div>\n </div>\n );\n })}\n </div>\n );\n };\n\n const renderFileInfo = () => {\n const { fileName, fileSize } = currentItem ?? {};\n const trimmedName = fileName?.trim();\n const trimmedSize = fileSize?.trim();\n\n return (\n <div\n className={clsx(\n styles.fileInfoTextWrapper,\n !trimmedSize && styles.fileInfoTextWrapperCentered\n )}\n aria-live=\"polite\"\n aria-atomic=\"true\"\n data-testid=\"file-info-bar\"\n >\n {trimmedName && (\n <Typography.BodyBL\n className={styles.fileInfoFileName}\n weight=\"semibold\"\n data-testid=\"file-info-name\"\n >\n {trimmedName}\n </Typography.BodyBL>\n )}\n {trimmedSize && (\n <Typography.BodyMD\n className={styles.fileInfoFileSize}\n data-testid=\"file-info-size\"\n >\n {trimmedSize}\n </Typography.BodyMD>\n )}\n </div>\n );\n };\n\n const renderThumbnails = () => {\n return (\n <div\n className={styles.thumbnailContainer}\n ref={thumbnailContainerRef}\n aria-hidden=\"true\"\n data-testid=\"thumbnail-container\"\n >\n <div className={styles.thumbnailWrapper}>\n {items.map((item, index) => {\n const src = isCustomItem(item)\n ? item.thumbnailSrc\n : item.thumbnailSrc ?? item.src;\n return (\n <div\n className={styles.thumbnailItemContainer}\n key={index}\n >\n <div\n className={styles.thumbnailItem}\n data-active={index === currentSlide}\n data-testid=\"thumbnail-item\"\n onClick={() => goToSlide(index)}\n ref={(el) =>\n (thumbnailRefs.current[index] = el)\n }\n >\n {src ? (\n <StatefulImage\n className={styles.thumbnailImage}\n src={src}\n alt={`Thumbnail ${index + 1}`}\n fit=\"cover\"\n />\n ) : (\n <ImagePlaceholder\n className={\n styles.slidePlaceholderImage\n }\n />\n )}\n </div>\n </div>\n );\n })}\n </div>\n </div>\n );\n };\n\n return (\n <ModalV2\n {...otherProps}\n data-testid=\"image-carousel-modal\"\n aria-label={hasAnyItemLabel ? \"Carousel\" : \"Image carousel\"}\n show={show}\n disableInitialFocus\n >\n <div className={styles.carouselModalContent}>\n <div className={styles.imageGalleryContainer}>\n <div className={styles.imageGalleryWrapper}>\n <div\n className={styles.imageGallerySwipe}\n ref={containerRef}\n onTouchStart={handleTouchStart}\n onTouchMove={handleTouchMove}\n onTouchEnd={handleTouchEnd}\n >\n {renderSlides()}\n </div>\n\n {!hideNavigation && (\n <>\n <ClickableIcon\n className={clsx(\n styles.iconButton,\n styles.arrowButton,\n styles.arrowButtonLeft\n )}\n ref={prevArrowButtonRef}\n aria-label={`Previous ${carouselItemNoun}`}\n data-testid=\"prev-btn\"\n onClick={goToPrevSlide}\n >\n <ChevronLeftIcon aria-hidden />\n </ClickableIcon>\n <ClickableIcon\n className={clsx(\n styles.iconButton,\n styles.arrowButton,\n styles.arrowButtonRight\n )}\n ref={nextArrowButtonRef}\n aria-label={`Next ${carouselItemNoun}`}\n data-testid=\"forward-btn\"\n onClick={goToNextSlide}\n >\n <ChevronRightIcon aria-hidden />\n </ClickableIcon>\n </>\n )}\n\n {!hideCounter && (\n <div className={styles.boxChip} aria-hidden=\"true\">\n <Typography.BodyXS\n className={styles.chip}\n weight=\"semibold\"\n data-testid=\"carousel-counter\"\n >{`${currentSlide + 1}/${\n items.length\n }`}</Typography.BodyXS>\n </div>\n )}\n </div>\n\n {!hideThumbnail && renderThumbnails()}\n </div>\n <div\n className={styles.topActionButtons}\n ref={topActionButtonsRef}\n data-has-file-info={hasFileInfo}\n >\n {hasFileInfo && renderFileInfo()}\n {!hideMagnifier && !isCustomItem(currentItem) && (\n <ClickableIcon\n className={styles.iconButton}\n aria-label={zoom === 1 ? \"Zoom in\" : \"Zoom out\"}\n onClick={handleMagnifier}\n >\n {zoom === 1 ? (\n <MagnifierPlusIcon aria-hidden />\n ) : (\n <MagnifierMinusIcon aria-hidden />\n )}\n </ClickableIcon>\n )}\n\n {onDelete && (\n <ClickableIcon\n className={clsx(\n styles.iconButton,\n styles.iconButtonError\n )}\n aria-label={`Delete ${\n (isCustomItem(currentItem) &&\n currentItem.itemLabel?.trim()) ||\n \"image\"\n }`}\n data-testid=\"delete-btn\"\n onClick={handleDelete}\n >\n <BinIcon aria-hidden />\n </ClickableIcon>\n )}\n\n <ClickableIcon\n className={styles.iconButton}\n aria-label={\n hasAnyItemLabel\n ? \"Close carousel\"\n : \"Close image carousel\"\n }\n onClick={onClose}\n >\n <CrossIcon aria-hidden />\n </ClickableIcon>\n </div>\n </div>\n </ModalV2>\n );\n};\n\n// @catalog\n/**\n * A fullscreen modal carousel for browsing images and custom media items.\n *\n * Use to present a collection of images or custom content in an overlay with\n * navigation controls, zoom support, and an optional thumbnail strip.\n * The top info bar is rendered only when at least one item provides some file metadata.\n */\nexport const FullscreenImageCarousel = forwardRef<\n FullscreenImageCarouselRef,\n FullscreenImageCarouselProps\n>(Component);\n"],"names":["isCustomItem","item","type","Component","_a","ref","items","initialActiveItemIndex","hideThumbnail","hideNavigation","hideCounter","hideMagnifier","onDelete","onClose","insets","show","otherProps","__rest","currentSlide","setCurrentSlide","useStateCallback","imagesDimension","setImageDimension","useState","zoom","setZoom","startX","setStartX","endX","setEndX","containerRef","useRef","thumbnailRefs","zoomRefs","imageRef","topActionButtonsRef","prevArrowButtonRef","nextArrowButtonRef","thumbnailContainerRef","diff","currentItem","hasAnyItemLabel","some","itemLabel","trim","carouselItemNoun","hasFileInfo","useMemo","fileName","fileSize","_b","useApplyStyle","styles.tokens","topActionButtons","insetTop","formatUnitValue","top","insetLeft","left","insetRight","right","arrowButton","thumbnailContainer","insetBottom","bottom","getItemAriaLabel","useCallback","index","itemTypeLabel","prefix","alt","positionLabel","length","useImperativeHandle","currentItemIndex","setCurrentItem","goToSlide","goToPrevItem","goToPrevSlide","goToNextItem","goToNextSlide","useEventListener","e","key","useEffect","current","focus","scrollIntoView","behavior","inline","handleZoom","state","scale","setDimension","src","height","width","oldState","Object","assign","getZoomRatio","imageDimension","clientHeight","clientWidth","isImgLandscapeRelativeToDevice","resetTransform","prev","slide","clearAnnouncer","announce","_jsx","ModalV2","disableInitialFocus","_jsxs","className","styles.carouselModalContent","children","styles.imageGalleryContainer","styles.imageGalleryWrapper","styles.imageGallerySwipe","onTouchStart","touches","clientX","onTouchMove","onTouchEnd","Math","abs","offsetWidth","undefined","styles.imageGallerySlides","style","transform","map","isActive","isActiveOrAdjacent","styles.imageGallerySlide","styles.focusableImageRegion","tabIndex","renderContent","ImagePlaceholder","styles.slidePlaceholderImage","TransformWrapper","el","panning","disabled","initialScale","onZoom","onZoomStop","onWheel","TransformComponent","StatefulImage","styles.slideImage","placeholder","fit","retrieveImageDimension","_Fragment","ClickableIcon","clsx","styles.iconButton","styles.arrowButton","styles.arrowButtonLeft","onClick","ChevronLeftIcon","styles.arrowButtonRight","ChevronRightIcon","styles.boxChip","Typography","BodyXS","styles.chip","weight","styles.thumbnailContainer","styles.thumbnailWrapper","thumbnailSrc","styles.thumbnailItemContainer","styles.thumbnailItem","styles.thumbnailImage","styles.topActionButtons","trimmedName","trimmedSize","styles.fileInfoTextWrapper","styles.fileInfoTextWrapperCentered","BodyBL","styles.fileInfoFileName","BodyMD","styles.fileInfoFileSize","renderFileInfo","zoomRatio","centerView","_d","_c","MagnifierPlusIcon","MagnifierMinusIcon","styles.iconButtonError","BinIcon","CrossIcon","FullscreenImageCarousel","forwardRef"],"mappings":"+rEA0CA,MAAMA,GACFC,KAEEA,GAAsB,WAAdA,EAAKC,KAENC,GAAY,CACrBC,EAaAC,cAbAC,MACIA,GAAKC,uBACLA,GAAsBC,cACtBA,IAAgB,EAAKC,eACrBA,IAAiB,EAAKC,YACtBA,IAAc,EAAKC,cACnBA,IAAgB,EAAKC,SACrBA,GAAQC,QACRA,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