@flipdish/ui-library 0.49.0 → 0.51.0

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 (302) hide show
  1. package/dist/components/atoms/Button/components/ButtonIcon.cjs +17 -0
  2. package/dist/components/atoms/Button/components/ButtonIcon.cjs.map +1 -0
  3. package/dist/components/atoms/Button/components/ButtonIcon.d.ts +14 -0
  4. package/dist/components/atoms/Button/components/ButtonIcon.d.ts.map +1 -0
  5. package/dist/components/atoms/Button/components/ButtonIcon.js +15 -0
  6. package/dist/components/atoms/Button/components/ButtonIcon.js.map +1 -0
  7. package/dist/components/atoms/Button/components/ButtonSpinner.cjs +11 -0
  8. package/dist/components/atoms/Button/components/ButtonSpinner.cjs.map +1 -0
  9. package/dist/components/atoms/Button/components/ButtonSpinner.d.ts +8 -0
  10. package/dist/components/atoms/Button/components/ButtonSpinner.d.ts.map +1 -0
  11. package/dist/components/atoms/Button/components/ButtonSpinner.js +9 -0
  12. package/dist/components/atoms/Button/components/ButtonSpinner.js.map +1 -0
  13. package/dist/components/atoms/Button/index.cjs +6 -6
  14. package/dist/components/atoms/Button/index.cjs.map +1 -1
  15. package/dist/components/atoms/Button/index.d.ts +2 -0
  16. package/dist/components/atoms/Button/index.d.ts.map +1 -1
  17. package/dist/components/atoms/Button/index.js +6 -6
  18. package/dist/components/atoms/Button/index.js.map +1 -1
  19. package/dist/components/atoms/Checkbox/index.cjs +28 -2
  20. package/dist/components/atoms/Checkbox/index.cjs.map +1 -1
  21. package/dist/components/atoms/Checkbox/index.d.ts +23 -4
  22. package/dist/components/atoms/Checkbox/index.d.ts.map +1 -1
  23. package/dist/components/atoms/Checkbox/index.js +30 -5
  24. package/dist/components/atoms/Checkbox/index.js.map +1 -1
  25. package/dist/components/atoms/Input/index.cjs +0 -1
  26. package/dist/components/atoms/Input/index.cjs.map +1 -1
  27. package/dist/components/atoms/Input/index.d.ts.map +1 -1
  28. package/dist/components/atoms/Input/index.js +0 -1
  29. package/dist/components/atoms/Input/index.js.map +1 -1
  30. package/dist/components/atoms/RadioButton/index.cjs.map +1 -1
  31. package/dist/components/atoms/RadioButton/index.d.ts +1 -0
  32. package/dist/components/atoms/RadioButton/index.d.ts.map +1 -1
  33. package/dist/components/atoms/RadioButton/index.js.map +1 -1
  34. package/dist/components/atoms/Slider/index.cjs +9 -3
  35. package/dist/components/atoms/Slider/index.cjs.map +1 -1
  36. package/dist/components/atoms/Slider/index.d.ts +3 -1
  37. package/dist/components/atoms/Slider/index.d.ts.map +1 -1
  38. package/dist/components/atoms/Slider/index.js +10 -4
  39. package/dist/components/atoms/Slider/index.js.map +1 -1
  40. package/dist/components/atoms/Toggle/index.cjs +6 -2
  41. package/dist/components/atoms/Toggle/index.cjs.map +1 -1
  42. package/dist/components/atoms/Toggle/index.d.ts.map +1 -1
  43. package/dist/components/atoms/Toggle/index.js +6 -2
  44. package/dist/components/atoms/Toggle/index.js.map +1 -1
  45. package/dist/components/molecules/Alert/index.cjs +5 -25
  46. package/dist/components/molecules/Alert/index.cjs.map +1 -1
  47. package/dist/components/molecules/Alert/index.d.ts +9 -94
  48. package/dist/components/molecules/Alert/index.d.ts.map +1 -1
  49. package/dist/components/molecules/Alert/index.js +5 -25
  50. package/dist/components/molecules/Alert/index.js.map +1 -1
  51. package/dist/components/molecules/Alerts/components/Alert.cjs +39 -0
  52. package/dist/components/molecules/Alerts/components/Alert.cjs.map +1 -0
  53. package/dist/components/molecules/Alerts/components/Alert.d.ts +104 -0
  54. package/dist/components/molecules/Alerts/components/Alert.d.ts.map +1 -0
  55. package/dist/components/molecules/Alerts/components/Alert.js +36 -0
  56. package/dist/components/molecules/Alerts/components/Alert.js.map +1 -0
  57. package/dist/components/molecules/Alerts/components/SaveErrorAlert.cjs +26 -0
  58. package/dist/components/molecules/Alerts/components/SaveErrorAlert.cjs.map +1 -0
  59. package/dist/components/molecules/Alerts/components/SaveErrorAlert.d.ts +25 -0
  60. package/dist/components/molecules/Alerts/components/SaveErrorAlert.d.ts.map +1 -0
  61. package/dist/components/molecules/Alerts/components/SaveErrorAlert.js +24 -0
  62. package/dist/components/molecules/Alerts/components/SaveErrorAlert.js.map +1 -0
  63. package/dist/components/molecules/Alerts/hooks/useAlertActions.cjs +26 -0
  64. package/dist/components/molecules/Alerts/hooks/useAlertActions.cjs.map +1 -0
  65. package/dist/components/molecules/Alerts/hooks/useAlertActions.d.ts +13 -0
  66. package/dist/components/molecules/Alerts/hooks/useAlertActions.d.ts.map +1 -0
  67. package/dist/components/molecules/Alerts/hooks/useAlertActions.js +24 -0
  68. package/dist/components/molecules/Alerts/hooks/useAlertActions.js.map +1 -0
  69. package/dist/components/molecules/Alerts/index.cjs +11 -0
  70. package/dist/components/molecules/Alerts/index.cjs.map +1 -0
  71. package/dist/components/molecules/Alerts/index.d.ts +12 -0
  72. package/dist/components/molecules/Alerts/index.d.ts.map +1 -0
  73. package/dist/components/molecules/Alerts/index.js +3 -0
  74. package/dist/components/molecules/Alerts/index.js.map +1 -0
  75. package/dist/components/molecules/EmptyState/index.cjs +8 -0
  76. package/dist/components/molecules/EmptyState/index.cjs.map +1 -1
  77. package/dist/components/molecules/EmptyState/index.d.ts +19 -0
  78. package/dist/components/molecules/EmptyState/index.d.ts.map +1 -1
  79. package/dist/components/molecules/EmptyState/index.js +10 -3
  80. package/dist/components/molecules/EmptyState/index.js.map +1 -1
  81. package/dist/components/molecules/Modal/index.cjs +9 -39
  82. package/dist/components/molecules/Modal/index.cjs.map +1 -1
  83. package/dist/components/molecules/Modal/index.d.ts +13 -36
  84. package/dist/components/molecules/Modal/index.d.ts.map +1 -1
  85. package/dist/components/molecules/Modal/index.js +8 -38
  86. package/dist/components/molecules/Modal/index.js.map +1 -1
  87. package/dist/components/molecules/Modals/components/ConfirmationModal.cjs +32 -0
  88. package/dist/components/molecules/Modals/components/ConfirmationModal.cjs.map +1 -0
  89. package/dist/components/molecules/Modals/components/ConfirmationModal.d.ts +28 -0
  90. package/dist/components/molecules/Modals/components/ConfirmationModal.d.ts.map +1 -0
  91. package/dist/components/molecules/Modals/components/ConfirmationModal.js +30 -0
  92. package/dist/components/molecules/Modals/components/ConfirmationModal.js.map +1 -0
  93. package/dist/components/molecules/Modals/components/Modal.cjs +48 -0
  94. package/dist/components/molecules/Modals/components/Modal.cjs.map +1 -0
  95. package/dist/components/molecules/Modals/components/Modal.d.ts +37 -0
  96. package/dist/components/molecules/Modals/components/Modal.d.ts.map +1 -0
  97. package/dist/components/molecules/Modals/components/Modal.js +43 -0
  98. package/dist/components/molecules/Modals/components/Modal.js.map +1 -0
  99. package/dist/components/molecules/Modals/components/UnsavedChangesModal.cjs +30 -0
  100. package/dist/components/molecules/Modals/components/UnsavedChangesModal.cjs.map +1 -0
  101. package/dist/components/molecules/Modals/components/UnsavedChangesModal.d.ts +14 -0
  102. package/dist/components/molecules/Modals/components/UnsavedChangesModal.d.ts.map +1 -0
  103. package/dist/components/molecules/Modals/components/UnsavedChangesModal.js +28 -0
  104. package/dist/components/molecules/Modals/components/UnsavedChangesModal.js.map +1 -0
  105. package/dist/components/molecules/Modals/index.cjs +15 -0
  106. package/dist/components/molecules/Modals/index.cjs.map +1 -0
  107. package/dist/components/molecules/Modals/index.d.ts +14 -0
  108. package/dist/components/molecules/Modals/index.d.ts.map +1 -0
  109. package/dist/components/molecules/Modals/index.js +4 -0
  110. package/dist/components/molecules/Modals/index.js.map +1 -0
  111. package/dist/components/molecules/RadioGroup/components/RadioGroupAvatar.cjs +7 -1
  112. package/dist/components/molecules/RadioGroup/components/RadioGroupAvatar.cjs.map +1 -1
  113. package/dist/components/molecules/RadioGroup/components/RadioGroupAvatar.d.ts.map +1 -1
  114. package/dist/components/molecules/RadioGroup/components/RadioGroupAvatar.js +8 -2
  115. package/dist/components/molecules/RadioGroup/components/RadioGroupAvatar.js.map +1 -1
  116. package/dist/components/molecules/RadioGroup/components/RadioGroupCheckbox.cjs +7 -1
  117. package/dist/components/molecules/RadioGroup/components/RadioGroupCheckbox.cjs.map +1 -1
  118. package/dist/components/molecules/RadioGroup/components/RadioGroupCheckbox.d.ts.map +1 -1
  119. package/dist/components/molecules/RadioGroup/components/RadioGroupCheckbox.js +8 -2
  120. package/dist/components/molecules/RadioGroup/components/RadioGroupCheckbox.js.map +1 -1
  121. package/dist/components/molecules/RadioGroup/components/RadioGroupIconCard.cjs +13 -1
  122. package/dist/components/molecules/RadioGroup/components/RadioGroupIconCard.cjs.map +1 -1
  123. package/dist/components/molecules/RadioGroup/components/RadioGroupIconCard.d.ts.map +1 -1
  124. package/dist/components/molecules/RadioGroup/components/RadioGroupIconCard.js +13 -1
  125. package/dist/components/molecules/RadioGroup/components/RadioGroupIconCard.js.map +1 -1
  126. package/dist/components/molecules/RadioGroup/components/RadioGroupIconSimple.cjs +7 -1
  127. package/dist/components/molecules/RadioGroup/components/RadioGroupIconSimple.cjs.map +1 -1
  128. package/dist/components/molecules/RadioGroup/components/RadioGroupIconSimple.d.ts.map +1 -1
  129. package/dist/components/molecules/RadioGroup/components/RadioGroupIconSimple.js +8 -2
  130. package/dist/components/molecules/RadioGroup/components/RadioGroupIconSimple.js.map +1 -1
  131. package/dist/components/molecules/RadioGroup/components/RadioGroupPaymentIcon.cjs +6 -1
  132. package/dist/components/molecules/RadioGroup/components/RadioGroupPaymentIcon.cjs.map +1 -1
  133. package/dist/components/molecules/RadioGroup/components/RadioGroupPaymentIcon.d.ts.map +1 -1
  134. package/dist/components/molecules/RadioGroup/components/RadioGroupPaymentIcon.js +7 -2
  135. package/dist/components/molecules/RadioGroup/components/RadioGroupPaymentIcon.js.map +1 -1
  136. package/dist/components/molecules/RadioGroup/components/RadioGroupRadioButton.cjs +10 -3
  137. package/dist/components/molecules/RadioGroup/components/RadioGroupRadioButton.cjs.map +1 -1
  138. package/dist/components/molecules/RadioGroup/components/RadioGroupRadioButton.d.ts +6 -4
  139. package/dist/components/molecules/RadioGroup/components/RadioGroupRadioButton.d.ts.map +1 -1
  140. package/dist/components/molecules/RadioGroup/components/RadioGroupRadioButton.js +11 -4
  141. package/dist/components/molecules/RadioGroup/components/RadioGroupRadioButton.js.map +1 -1
  142. package/dist/components/molecules/RadioGroup/hooks/useOptionIds.cjs +24 -0
  143. package/dist/components/molecules/RadioGroup/hooks/useOptionIds.cjs.map +1 -0
  144. package/dist/components/molecules/RadioGroup/hooks/useOptionIds.d.ts +10 -0
  145. package/dist/components/molecules/RadioGroup/hooks/useOptionIds.d.ts.map +1 -0
  146. package/dist/components/molecules/RadioGroup/hooks/useOptionIds.js +22 -0
  147. package/dist/components/molecules/RadioGroup/hooks/useOptionIds.js.map +1 -0
  148. package/dist/components/molecules/RadioGroup/index.d.ts +1 -1
  149. package/dist/components/molecules/RadioGroup/index.d.ts.map +1 -1
  150. package/dist/components/molecules/RadioGroup/radioGroup.types.d.ts +14 -0
  151. package/dist/components/molecules/RadioGroup/radioGroup.types.d.ts.map +1 -1
  152. package/dist/components/molecules/Select/components/Combobox.cjs +2 -1
  153. package/dist/components/molecules/Select/components/Combobox.cjs.map +1 -1
  154. package/dist/components/molecules/Select/components/Combobox.d.ts +2 -1
  155. package/dist/components/molecules/Select/components/Combobox.d.ts.map +1 -1
  156. package/dist/components/molecules/Select/components/Combobox.js +2 -1
  157. package/dist/components/molecules/Select/components/Combobox.js.map +1 -1
  158. package/dist/components/molecules/Select/components/MultiSelect.cjs +3 -2
  159. package/dist/components/molecules/Select/components/MultiSelect.cjs.map +1 -1
  160. package/dist/components/molecules/Select/components/MultiSelect.d.ts +3 -3
  161. package/dist/components/molecules/Select/components/MultiSelect.d.ts.map +1 -1
  162. package/dist/components/molecules/Select/components/MultiSelect.js +5 -4
  163. package/dist/components/molecules/Select/components/MultiSelect.js.map +1 -1
  164. package/dist/components/molecules/Select/components/SelectItem.cjs +8 -0
  165. package/dist/components/molecules/Select/components/SelectItem.cjs.map +1 -1
  166. package/dist/components/molecules/Select/components/SelectItem.d.ts +7 -0
  167. package/dist/components/molecules/Select/components/SelectItem.d.ts.map +1 -1
  168. package/dist/components/molecules/Select/components/SelectItem.js +8 -1
  169. package/dist/components/molecules/Select/components/SelectItem.js.map +1 -1
  170. package/dist/components/molecules/Select/index.cjs +1 -1
  171. package/dist/components/molecules/Select/index.cjs.map +1 -1
  172. package/dist/components/molecules/Select/index.d.ts +3 -3
  173. package/dist/components/molecules/Select/index.d.ts.map +1 -1
  174. package/dist/components/molecules/Select/index.js +2 -2
  175. package/dist/components/molecules/Select/index.js.map +1 -1
  176. package/dist/components/organisms/ColorPicker/colorPicker.utils.cjs +26 -0
  177. package/dist/components/organisms/ColorPicker/colorPicker.utils.cjs.map +1 -1
  178. package/dist/components/organisms/ColorPicker/colorPicker.utils.d.ts +15 -0
  179. package/dist/components/organisms/ColorPicker/colorPicker.utils.d.ts.map +1 -1
  180. package/dist/components/organisms/ColorPicker/colorPicker.utils.js +25 -1
  181. package/dist/components/organisms/ColorPicker/colorPicker.utils.js.map +1 -1
  182. package/dist/components/organisms/ColorPicker/components/ColorPickerDialog.cjs +15 -0
  183. package/dist/components/organisms/ColorPicker/components/ColorPickerDialog.cjs.map +1 -0
  184. package/dist/components/organisms/ColorPicker/components/ColorPickerDialog.d.ts +12 -0
  185. package/dist/components/organisms/ColorPicker/components/ColorPickerDialog.d.ts.map +1 -0
  186. package/dist/components/organisms/ColorPicker/components/ColorPickerDialog.js +13 -0
  187. package/dist/components/organisms/ColorPicker/components/ColorPickerDialog.js.map +1 -0
  188. package/dist/components/organisms/ColorPicker/components/ColorPickerField.cjs +51 -0
  189. package/dist/components/organisms/ColorPicker/components/ColorPickerField.cjs.map +1 -0
  190. package/dist/components/organisms/ColorPicker/components/ColorPickerField.d.ts +48 -0
  191. package/dist/components/organisms/ColorPicker/components/ColorPickerField.d.ts.map +1 -0
  192. package/dist/components/organisms/ColorPicker/components/ColorPickerField.js +49 -0
  193. package/dist/components/organisms/ColorPicker/components/ColorPickerField.js.map +1 -0
  194. package/dist/components/organisms/ColorPicker/hooks/useColorFieldEdit.cjs +69 -0
  195. package/dist/components/organisms/ColorPicker/hooks/useColorFieldEdit.cjs.map +1 -0
  196. package/dist/components/organisms/ColorPicker/hooks/useColorFieldEdit.d.ts +29 -0
  197. package/dist/components/organisms/ColorPicker/hooks/useColorFieldEdit.d.ts.map +1 -0
  198. package/dist/components/organisms/ColorPicker/hooks/useColorFieldEdit.js +67 -0
  199. package/dist/components/organisms/ColorPicker/hooks/useColorFieldEdit.js.map +1 -0
  200. package/dist/components/organisms/ColorPicker/index.cjs +6 -7
  201. package/dist/components/organisms/ColorPicker/index.cjs.map +1 -1
  202. package/dist/components/organisms/ColorPicker/index.d.ts +4 -6
  203. package/dist/components/organisms/ColorPicker/index.d.ts.map +1 -1
  204. package/dist/components/organisms/ColorPicker/index.js +6 -7
  205. package/dist/components/organisms/ColorPicker/index.js.map +1 -1
  206. package/dist/components/organisms/DatePicker/components/CalendarOverlay.cjs +2 -2
  207. package/dist/components/organisms/DatePicker/components/CalendarOverlay.cjs.map +1 -1
  208. package/dist/components/organisms/DatePicker/components/CalendarOverlay.js +1 -1
  209. package/dist/components/organisms/DatePicker/components/DateRangePicker.cjs +20 -13
  210. package/dist/components/organisms/DatePicker/components/DateRangePicker.cjs.map +1 -1
  211. package/dist/components/organisms/DatePicker/components/DateRangePicker.d.ts +8 -1
  212. package/dist/components/organisms/DatePicker/components/DateRangePicker.d.ts.map +1 -1
  213. package/dist/components/organisms/DatePicker/components/DateRangePicker.js +21 -14
  214. package/dist/components/organisms/DatePicker/components/DateRangePicker.js.map +1 -1
  215. package/dist/components/organisms/DatePicker/index.cjs +14 -10
  216. package/dist/components/organisms/DatePicker/index.cjs.map +1 -1
  217. package/dist/components/organisms/DatePicker/index.d.ts +8 -1
  218. package/dist/components/organisms/DatePicker/index.d.ts.map +1 -1
  219. package/dist/components/organisms/DatePicker/index.js +14 -10
  220. package/dist/components/organisms/DatePicker/index.js.map +1 -1
  221. package/dist/hooks/__internal__/useReturnFocus/useReturnFocus.cjs +48 -0
  222. package/dist/hooks/__internal__/useReturnFocus/useReturnFocus.cjs.map +1 -0
  223. package/dist/hooks/__internal__/useReturnFocus/useReturnFocus.d.ts +23 -0
  224. package/dist/hooks/__internal__/useReturnFocus/useReturnFocus.d.ts.map +1 -0
  225. package/dist/hooks/__internal__/useReturnFocus/useReturnFocus.js +45 -0
  226. package/dist/hooks/__internal__/useReturnFocus/useReturnFocus.js.map +1 -0
  227. package/dist/hooks/useFocusAfterRetry/index.cjs +31 -0
  228. package/dist/hooks/useFocusAfterRetry/index.cjs.map +1 -0
  229. package/dist/hooks/useFocusAfterRetry/index.d.ts +13 -0
  230. package/dist/hooks/useFocusAfterRetry/index.d.ts.map +1 -0
  231. package/dist/hooks/useFocusAfterRetry/index.js +29 -0
  232. package/dist/hooks/useFocusAfterRetry/index.js.map +1 -0
  233. package/dist/hooks/useUnsavedChangesGuard/index.cjs +28 -0
  234. package/dist/hooks/useUnsavedChangesGuard/index.cjs.map +1 -0
  235. package/dist/hooks/useUnsavedChangesGuard/index.d.ts +18 -0
  236. package/dist/hooks/useUnsavedChangesGuard/index.d.ts.map +1 -0
  237. package/dist/hooks/useUnsavedChangesGuard/index.js +26 -0
  238. package/dist/hooks/useUnsavedChangesGuard/index.js.map +1 -0
  239. package/dist/hooks/useUnsavedChangesGuard/providers/UnsavedChangesGuard.context.cjs +8 -0
  240. package/dist/hooks/useUnsavedChangesGuard/providers/UnsavedChangesGuard.context.cjs.map +1 -0
  241. package/dist/hooks/useUnsavedChangesGuard/providers/UnsavedChangesGuard.context.d.ts +13 -0
  242. package/dist/hooks/useUnsavedChangesGuard/providers/UnsavedChangesGuard.context.d.ts.map +1 -0
  243. package/dist/hooks/useUnsavedChangesGuard/providers/UnsavedChangesGuard.context.js +6 -0
  244. package/dist/hooks/useUnsavedChangesGuard/providers/UnsavedChangesGuard.context.js.map +1 -0
  245. package/dist/native/components/atoms/Button/index.d.ts +2 -0
  246. package/dist/native/components/atoms/Button/index.d.ts.map +1 -1
  247. package/dist/native/components/atoms/Button/index.js +5 -3
  248. package/dist/native/components/atoms/Button/index.js.map +1 -1
  249. package/dist/native/components/atoms/Checkbox/index.d.ts +35 -3
  250. package/dist/native/components/atoms/Checkbox/index.d.ts.map +1 -1
  251. package/dist/native/components/atoms/Checkbox/index.js +47 -10
  252. package/dist/native/components/atoms/Checkbox/index.js.map +1 -1
  253. package/dist/native/components/molecules/Alerts/index.d.ts +12 -0
  254. package/dist/native/components/molecules/Modals/index.d.ts +12 -0
  255. package/dist/native/hooks/useFocusAfterRetry/index.d.ts +12 -0
  256. package/dist/native/hooks/useUnsavedChangesGuard/index.d.ts +12 -0
  257. package/dist/native/providers/UnsavedChangesGuardProvider/index.d.ts +12 -0
  258. package/dist/providers/UIProvider/hooks/useBrowserRouter.cjs +70 -0
  259. package/dist/providers/UIProvider/hooks/useBrowserRouter.cjs.map +1 -0
  260. package/dist/providers/UIProvider/hooks/useBrowserRouter.d.ts +12 -0
  261. package/dist/providers/UIProvider/hooks/useBrowserRouter.d.ts.map +1 -0
  262. package/dist/providers/UIProvider/hooks/useBrowserRouter.js +68 -0
  263. package/dist/providers/UIProvider/hooks/useBrowserRouter.js.map +1 -0
  264. package/dist/providers/UIProvider/index.cjs +19 -6
  265. package/dist/providers/UIProvider/index.cjs.map +1 -1
  266. package/dist/providers/UIProvider/index.d.ts +2 -2
  267. package/dist/providers/UIProvider/index.d.ts.map +1 -1
  268. package/dist/providers/UIProvider/index.js +20 -7
  269. package/dist/providers/UIProvider/index.js.map +1 -1
  270. package/dist/providers/UnsavedChangesGuardProvider/index.cjs +191 -0
  271. package/dist/providers/UnsavedChangesGuardProvider/index.cjs.map +1 -0
  272. package/dist/providers/UnsavedChangesGuardProvider/index.d.ts +10 -0
  273. package/dist/providers/UnsavedChangesGuardProvider/index.d.ts.map +1 -0
  274. package/dist/providers/UnsavedChangesGuardProvider/index.js +189 -0
  275. package/dist/providers/UnsavedChangesGuardProvider/index.js.map +1 -0
  276. package/dist/providers/UnsavedChangesGuardProvider/unsavedChangesGuard.constants.cjs +7 -0
  277. package/dist/providers/UnsavedChangesGuardProvider/unsavedChangesGuard.constants.cjs.map +1 -0
  278. package/dist/providers/UnsavedChangesGuardProvider/unsavedChangesGuard.constants.d.ts +3 -0
  279. package/dist/providers/UnsavedChangesGuardProvider/unsavedChangesGuard.constants.d.ts.map +1 -0
  280. package/dist/providers/UnsavedChangesGuardProvider/unsavedChangesGuard.constants.js +5 -0
  281. package/dist/providers/UnsavedChangesGuardProvider/unsavedChangesGuard.constants.js.map +1 -0
  282. package/dist/providers/UnsavedChangesGuardProvider/unsavedChangesGuard.types.d.ts +21 -0
  283. package/dist/providers/UnsavedChangesGuardProvider/unsavedChangesGuard.types.d.ts.map +1 -0
  284. package/dist/providers/UnsavedChangesGuardProvider/unsavedChangesGuard.utils.cjs +97 -0
  285. package/dist/providers/UnsavedChangesGuardProvider/unsavedChangesGuard.utils.cjs.map +1 -0
  286. package/dist/providers/UnsavedChangesGuardProvider/unsavedChangesGuard.utils.d.ts +62 -0
  287. package/dist/providers/UnsavedChangesGuardProvider/unsavedChangesGuard.utils.d.ts.map +1 -0
  288. package/dist/providers/UnsavedChangesGuardProvider/unsavedChangesGuard.utils.js +88 -0
  289. package/dist/providers/UnsavedChangesGuardProvider/unsavedChangesGuard.utils.js.map +1 -0
  290. package/dist/utilities/__internal__/ariaIdsUtils/ariaIds.utils.cjs +12 -0
  291. package/dist/utilities/__internal__/ariaIdsUtils/ariaIds.utils.cjs.map +1 -0
  292. package/dist/utilities/__internal__/ariaIdsUtils/ariaIds.utils.d.ts +8 -0
  293. package/dist/utilities/__internal__/ariaIdsUtils/ariaIds.utils.d.ts.map +1 -0
  294. package/dist/utilities/__internal__/ariaIdsUtils/ariaIds.utils.js +10 -0
  295. package/dist/utilities/__internal__/ariaIdsUtils/ariaIds.utils.js.map +1 -0
  296. package/dist/utilities/__internal__/refUtils/ref.utils.cjs +22 -0
  297. package/dist/utilities/__internal__/refUtils/ref.utils.cjs.map +1 -0
  298. package/dist/utilities/__internal__/refUtils/ref.utils.d.ts +15 -0
  299. package/dist/utilities/__internal__/refUtils/ref.utils.d.ts.map +1 -0
  300. package/dist/utilities/__internal__/refUtils/ref.utils.js +20 -0
  301. package/dist/utilities/__internal__/refUtils/ref.utils.js.map +1 -0
  302. package/package.json +2 -2
@@ -0,0 +1,26 @@
1
+ import { useContext, useId, useLayoutEffect, useCallback } from 'react';
2
+ import { UnsavedChangesGuardContext } from './providers/UnsavedChangesGuard.context.js';
3
+
4
+ /**
5
+ * Stops unsaved changes being lost to navigation: it holds router navigation and the back button, makes the browser
6
+ * prompt on refresh or tab close, and has a host such as Portal ask before it navigates away. Render a confirm dialog
7
+ * from the result, or use `UnsavedChangesModal`, which does that for you; needs `UIProvider` above it.
8
+ *
9
+ * @param options What to guard: `hasUnsavedChanges` says whether there is anything to lose.
10
+ * @returns `isPromptOpen` while a navigation is waiting on the user, with `stay` to cancel it and `discard` to let it go.
11
+ */
12
+ const useUnsavedChangesGuard = ({ hasUnsavedChanges }) => {
13
+ const guard = useContext(UnsavedChangesGuardContext);
14
+ if (!guard)
15
+ throw new Error('useUnsavedChangesGuard needs UIProvider above it, or UnsavedChangesGuardProvider inside your own data router.');
16
+ const { register, promptOwner, isPromptOpen, answer } = guard;
17
+ const id = useId();
18
+ // A layout effect, so the provider counts the changes before the browser paints the edit that made them.
19
+ useLayoutEffect(() => (hasUnsavedChanges ? register(id) : undefined), [hasUnsavedChanges, register, id]);
20
+ const stay = useCallback(() => answer(false), [answer]);
21
+ const discard = useCallback(() => answer(true), [answer]);
22
+ return { isPromptOpen: isPromptOpen && promptOwner === id, stay, discard };
23
+ };
24
+
25
+ export { useUnsavedChangesGuard };
26
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../src/hooks/useUnsavedChangesGuard/index.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAUA;;;;;;;AAOG;MACU,sBAAsB,GAAG,CAAC,EAAE,iBAAiB,EAAiC,KAAI;AAC7F,IAAA,MAAM,KAAK,GAAG,UAAU,CAAC,0BAA0B,CAAC;AACpD,IAAA,IAAI,CAAC,KAAK;AAAE,QAAA,MAAM,IAAI,KAAK,CAAC,+GAA+G,CAAC;IAC5I,MAAM,EAAE,QAAQ,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,EAAE,GAAG,KAAK;AAC7D,IAAA,MAAM,EAAE,GAAG,KAAK,EAAE;;IAGlB,eAAe,CAAC,OAAO,iBAAiB,GAAG,QAAQ,CAAC,EAAE,CAAC,GAAG,SAAS,CAAC,EAAE,CAAC,iBAAiB,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC;AAExG,IAAA,MAAM,IAAI,GAAG,WAAW,CAAC,MAAM,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;AACvD,IAAA,MAAM,OAAO,GAAG,WAAW,CAAC,MAAM,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;AAEzD,IAAA,OAAO,EAAE,YAAY,EAAE,YAAY,IAAI,WAAW,KAAK,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE;AAC5E;;"}
@@ -0,0 +1,8 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+
5
+ const UnsavedChangesGuardContext = React.createContext(null);
6
+
7
+ exports.UnsavedChangesGuardContext = UnsavedChangesGuardContext;
8
+ //# sourceMappingURL=UnsavedChangesGuard.context.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnsavedChangesGuard.context.cjs","sources":["../../../../src/hooks/useUnsavedChangesGuard/providers/UnsavedChangesGuard.context.ts"],"sourcesContent":[null],"names":["createContext"],"mappings":";;;;MAca,0BAA0B,GAAGA,mBAAa,CAAyC,IAAI;;"}
@@ -0,0 +1,13 @@
1
+ /** What `UnsavedChangesGuardProvider` shares with every `useUnsavedChangesGuard` beneath it. */
2
+ export interface UnsavedChangesGuardContextValue {
3
+ /** Marks one guard as having unsaved changes; returns the function that clears it. */
4
+ register: (id: string) => () => void;
5
+ /** The guard that shows the prompt, so two forms with unsaved changes still ask once. */
6
+ promptOwner: string | undefined;
7
+ /** Whether a navigation is waiting on the user's decision. */
8
+ isPromptOpen: boolean;
9
+ /** Settles the waiting navigation: `true` lets it go, `false` cancels it. */
10
+ answer: (leave: boolean) => void;
11
+ }
12
+ export declare const UnsavedChangesGuardContext: import("react").Context<UnsavedChangesGuardContextValue | null>;
13
+ //# sourceMappingURL=UnsavedChangesGuard.context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnsavedChangesGuard.context.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useUnsavedChangesGuard/providers/UnsavedChangesGuard.context.ts"],"names":[],"mappings":"AAEA,gGAAgG;AAChG,MAAM,WAAW,+BAA+B;IAC9C,sFAAsF;IACtF,QAAQ,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,MAAM,IAAI,CAAC;IACrC,yFAAyF;IACzF,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,8DAA8D;IAC9D,YAAY,EAAE,OAAO,CAAC;IACtB,6EAA6E;IAC7E,MAAM,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CAClC;AAED,eAAO,MAAM,0BAA0B,iEAA8D,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { createContext } from 'react';
2
+
3
+ const UnsavedChangesGuardContext = createContext(null);
4
+
5
+ export { UnsavedChangesGuardContext };
6
+ //# sourceMappingURL=UnsavedChangesGuard.context.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnsavedChangesGuard.context.js","sources":["../../../../src/hooks/useUnsavedChangesGuard/providers/UnsavedChangesGuard.context.ts"],"sourcesContent":[null],"names":[],"mappings":";;MAca,0BAA0B,GAAG,aAAa,CAAyC,IAAI;;"}
@@ -13,6 +13,8 @@ interface CommonProps {
13
13
  isDisabled?: boolean;
14
14
  /** Shows a loading spinner and disables the button */
15
15
  isLoading?: boolean;
16
+ /** Shows a check in place of the button's icons, to confirm the action finished; `isLoading` takes precedence. */
17
+ isSuccess?: boolean;
16
18
  /** The size variant of the button */
17
19
  size?: ButtonSize;
18
20
  /** The color variant of the button */
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Button/index.native.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,EAAkB,KAAK,YAAY,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAC7F,OAAO,EAAyC,KAAK,cAAc,EAAc,MAAM,cAAc,CAAC;AAEtG,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,KAAK,QAAQ,GAAG,EAAE,CAAC;IAAE,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,CAAC;AAEtF,MAAM,MAAM,UAAU,GAAG,MAAM,OAAO,MAAM,CAAC,KAAK,CAAC;AACnD,MAAM,MAAM,WAAW,GAAG,MAAM,OAAO,MAAM,CAAC,MAAM,CAAC;AAErD,UAAU,WAAW;IACnB,qDAAqD;IACrD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sDAAsD;IACtD,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,qCAAqC;IACrC,IAAI,CAAC,EAAE,UAAU,CAAC;IAClB,sCAAsC;IACtC,KAAK,CAAC,EAAE,WAAW,CAAC;IACpB,wDAAwD;IACxD,WAAW,CAAC,EAAE,QAAQ,CAAC;IACvB,uDAAuD;IACvD,YAAY,CAAC,EAAE,QAAQ,CAAC;IACxB,uDAAuD;IACvD,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,6DAA6D;IAC7D,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,kEAAkE;IAClE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,YAAY,CAAC,EAAE,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x } from '../../../utilities/cx/index.js';
3
4
  import { useResolvedTestId } from '../../../utilities/testIdUtils/index.js';
4
5
  import { useState, isValidElement } from 'react';
@@ -102,7 +103,7 @@ const renderIcon = (icon, size, color, className) => {
102
103
  *
103
104
  * @summary action trigger or URL control (React Native)
104
105
  */
105
- const Button = ({ size = 'sm', color = 'primary', children, className, noTextPadding: noTextPaddingProp, iconLeading: IconLeading, iconTrailing: IconTrailing, isDisabled, isLoading, showTextWhileLoading, 'data-testid': dataTestId, 'aria-label': ariaLabel, onPress, hitSlop, accessibilityLabel, accessibilityHint, ...props }) => {
106
+ const Button = ({ size = 'sm', color = 'primary', children, className, noTextPadding: noTextPaddingProp, iconLeading: IconLeading, iconTrailing: IconTrailing, isDisabled, isLoading, isSuccess, showTextWhileLoading, 'data-testid': dataTestId, 'aria-label': ariaLabel, onPress, hitSlop, accessibilityLabel, accessibilityHint, ...props }) => {
106
107
  const href = 'href' in props ? props.href : undefined;
107
108
  const resolvedAccessibilityLabel = accessibilityLabel ?? ariaLabel;
108
109
  const buttonTestId = useResolvedTestId({ testId: dataTestId, segment: 'button', rootName: 'button' });
@@ -128,8 +129,9 @@ const Button = ({ size = 'sm', color = 'primary', children, className, noTextPad
128
129
  Linking.openURL(href).catch(() => { });
129
130
  }
130
131
  };
131
- const leadingIcon = !omitIconsWhileLoading ? renderIcon(IconLeading, size, iconColor, styles.common.icon) : null;
132
- const trailingIcon = !omitIconsWhileLoading ? renderIcon(IconTrailing, size, iconColor, styles.common.icon) : null;
132
+ const showSuccess = Boolean(isSuccess && !isLoading);
133
+ const leadingIcon = !omitIconsWhileLoading ? renderIcon(showSuccess ? Check : IconLeading, size, iconColor, styles.common.icon) : null;
134
+ const trailingIcon = !omitIconsWhileLoading && !showSuccess ? renderIcon(IconTrailing, size, iconColor, styles.common.icon) : null;
133
135
  return (jsxs(Pressable, { testID: buttonTestId, disabled: disabled, onPress: handlePress, onPressIn: () => setPressed(true), onPressOut: () => setPressed(false), hitSlop: hitSlop, accessibilityRole: href ? 'link' : 'button', accessibilityLabel: resolvedAccessibilityLabel, accessibilityHint: accessibilityHint, accessibilityState: { disabled, busy: Boolean(isLoading) }, className: cx(styles.common.root, isLinkType ? styles.sizes[size].linkRoot : styles.sizes[size].root,
134
136
  // Merged (not swapped) so icon-only keeps `rounded-lg`/`gap-*` from `root` —
135
137
  // `cx` (tailwind-merge) resolves the padding conflict, keeping this override.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../src/components/atoms/Button/index.native.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;AAkDA,MAAM,WAAW,GAAkB,CAAC,WAAW,EAAE,YAAY,EAAE,kBAAkB,CAAC;AAElF;;;AAGG;AACH,MAAM,eAAe,GAA+B;AAClD,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;CACP;AAED;;;;;;AAMG;AACH,MAAM,eAAe,GAAiE;IACpF,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;IACpC,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;IACpC,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;IACpC,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;IACpC,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;CACrC;AAED;;;;AAIG;AACH,MAAM,gBAAgB,GAAgC;AACpD,IAAA,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,SAAS;IACpB,QAAQ,EAAE,SAAS;IACnB,YAAY,EAAE,SAAS;IACvB,WAAW,EAAE,SAAS;AACtB,IAAA,qBA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EAAE,kBAAkB,EAAE,WAAoB,EAAE,GAAG,IAAI,CAAC;AACrE,oBAAA,IAAI,CAAC,aAAa,GAAG,EAAE,iBAAiB,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC;AACtD,iBAAA,EAAA,QAAA,EAEA,QAAQ,EAAA,CACJ,CACR,EAEA,YAAY,GAAGA,GAAA,CAAC,IAAI,EAAA,EAAC,KAAK,EAAE,aAAa,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,SAAS,EAAA,QAAA,EAAG,YAAY,EAAA,CAAQ,GAAG,IAAI,CAAA,EAAA,CAC3F;AAEhB;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../../../src/components/atoms/Button/index.native.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":";;;;;;;;;AAqDA,MAAM,WAAW,GAAkB,CAAC,WAAW,EAAE,YAAY,EAAE,kBAAkB,CAAC;AAElF;;;AAGG;AACH,MAAM,eAAe,GAA+B;AAClD,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;AACN,IAAA,EAAE,EAAE,EAAE;CACP;AAED;;;;;;AAMG;AACH,MAAM,eAAe,GAAiE;IACpF,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;IACpC,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;IACpC,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;IACpC,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;IACpC,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,UAAU,EAAE,EAAE,EAAE;CACrC;AAED;;;;AAIG;AACH,MAAM,gBAAgB,GAAgC;AACpD,IAAA,OAAO,E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VA,GAAA,CAAC,IAAI,EAAA,EACH,KAAK,EAAE;AACL,oBAAA,KAAK,EAAE,UAAU;AACjB,oBAAA,UAAU,EAAE,KAAK;oBACjB,GAAG,eAAe,CAAC,IAAI,CAAC;AACxB,oBAAA,IAAI,aAAa,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC;AAC1C,oBAAA,IAAI,UAAU,GAAG,EAAE,kBAAkB,EAAE,WAAoB,EAAE,GAAG,IAAI,CAAC;AACrE,oBAAA,IAAI,CAAC,aAAa,GAAG,EAAE,iBAAiB,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC;AACtD,iBAAA,EAAA,QAAA,EAEA,QAAQ,EAAA,CACJ,CACR,EAEA,YAAY,GAAGA,GAAA,CAAC,IAAI,EAAA,EAAC,KAAK,EAAE,aAAa,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE,GAAG,SAAS,EAAA,QAAA,EAAG,YAAY,EAAA,CAAQ,GAAG,IAAI,CAAA,EAAA,CAC3F;AAEhB;;"}
@@ -1,6 +1,8 @@
1
1
  import { type ReactNode } from 'react';
2
2
  export interface CheckboxProps {
3
- /** Sets the box size and the label and hint text size. */
3
+ /** Identifies this option within a `CheckboxGroup`: the group's `value` list holds it while the box is ticked. */
4
+ value?: string;
5
+ /** Sets the box size and the label and hint text size; a parent `CheckboxGroup`'s `size` overrides it. */
4
6
  size?: 'sm' | 'md';
5
7
  /** Text shown beside the box; pressing it toggles the checkbox. */
6
8
  label?: ReactNode;
@@ -20,7 +22,7 @@ export interface CheckboxProps {
20
22
  className?: string;
21
23
  /** Web-style accessible name, used as `accessibilityLabel` so shared call sites work on both platforms. */
22
24
  'aria-label'?: string;
23
- /** Overrides the generated `testID` (defaults to `fd-checkbox`). */
25
+ /** Overrides the derived `testID` (defaults to `<group>--option-<value>` in a `CheckboxGroup`, or `fd-checkbox`). */
24
26
  'data-testid'?: string;
25
27
  }
26
28
  /**
@@ -30,5 +32,35 @@ export interface CheckboxProps {
30
32
  *
31
33
  * @summary checkbox for selecting one or more options (React Native)
32
34
  */
33
- export declare const Checkbox: ({ label, hint, size, className, isSelected: isSelectedProp, defaultSelected, isIndeterminate, isDisabled, onChange, "aria-label": ariaLabel, "data-testid": dataTestId, }: CheckboxProps) => import("react").JSX.Element;
35
+ export declare const Checkbox: ({ value, label, hint, size: sizeProp, className, isSelected: isSelectedProp, defaultSelected, isIndeterminate, isDisabled: isDisabledProp, onChange, "aria-label": ariaLabel, "data-testid": dataTestId, }: CheckboxProps) => import("react").JSX.Element;
36
+ export interface CheckboxGroupProps {
37
+ /** The `Checkbox` options; each one's `value` is what the group's `value` list holds while it is ticked. */
38
+ children: ReactNode;
39
+ /** Visible name of the group, shown above the boxes. When omitted, pass `aria-label`. */
40
+ label?: ReactNode;
41
+ /** Supporting text beneath the boxes, announced with every box; shown as the group's error while `isInvalid`. */
42
+ hint?: ReactNode;
43
+ /** Sets the size of every checkbox in the group. */
44
+ size?: 'sm' | 'md';
45
+ /** Controlled list of ticked values. */
46
+ value?: string[];
47
+ /** Initial ticked values for uncontrolled usage. */
48
+ defaultValue?: string[];
49
+ /** Called with the whole list of ticked values whenever a box is toggled. */
50
+ onChange?: (value: string[]) => void;
51
+ /** Disables every option in the group. */
52
+ isDisabled?: boolean;
53
+ /** Shows `hint` in the error colour. */
54
+ isInvalid?: boolean;
55
+ /** Marks the group as required: an asterisk after its label, and "required" after its name for screen readers. */
56
+ isRequired?: boolean;
57
+ /** Extra classes merged onto the root `View`. */
58
+ className?: string;
59
+ /** Web-style accessible name for the group; native has no `aria-labelledby`, so set this when `label` is not plain text. */
60
+ 'aria-label'?: string;
61
+ /** Overrides the `testID` (defaults to `fd-checkbox-group`); each option derives `<group>--option-<value>` from it. */
62
+ 'data-testid'?: string;
63
+ }
64
+ /** React Native `CheckboxGroup` that names a set of `Checkbox` children, owns which are ticked as a list, and shows one hint or error for the set. */
65
+ export declare const CheckboxGroup: ({ children, label, hint, className, size, value, defaultValue, onChange, isDisabled, isInvalid, isRequired, "aria-label": ariaLabel, "data-testid": dataTestId, }: CheckboxGroupProps) => import("react").JSX.Element;
34
66
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Checkbox/index.native.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,SAAS,EAAY,MAAM,OAAO,CAAC;AAMjD,MAAM,WAAW,aAAa;IAC5B,0DAA0D;IAC1D,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,mEAAmE;IACnE,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,6CAA6C;IAC7C,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,oEAAoE;IACpE,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,oDAAoD;IACpD,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,uFAAuF;IACvF,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,8DAA8D;IAC9D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,sEAAsE;IACtE,QAAQ,CAAC,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;IACzC,sDAAsD;IACtD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,2GAA2G;IAC3G,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,oEAAoE;IACpE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AASD;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,GAAI,2KAYtB,aAAa,gCAyCf,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/components/atoms/Checkbox/index.native.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAiB,KAAK,SAAS,EAAwB,MAAM,OAAO,CAAC;AAoB5E,MAAM,WAAW,aAAa;IAC5B,kHAAkH;IAClH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,0GAA0G;IAC1G,IAAI,CA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AAE,OAAO,CAAC;IACrB,iDAAiD;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,4HAA4H;IAC5H,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uHAAuH;IACvH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,sJAAsJ;AACtJ,eAAO,MAAM,aAAa,GAAI,mKAc3B,kBAAkB,gCAkCpB,CAAC"}
@@ -1,13 +1,14 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { Minus, Check } from '@flipdish/ui-icons';
3
3
  import { cx } from '../../../utilities/cx/index.js';
4
- import { useResolvedTestId } from '../../../utilities/testIdUtils/index.js';
5
- import { useState } from 'react';
6
- import { Pressable, View } from 'react-native';
4
+ import { useResolvedTestId, joinTestId, slugifyTestId } from '../../../utilities/testIdUtils/index.js';
5
+ import { createContext, useContext, useState } from 'react';
6
+ import { Pressable, View, Text } from 'react-native';
7
7
  import { SelectionControlText } from '../../__internal__/selectionControl/SelectionControlText.js';
8
8
  import { selectionControlSizes } from '../../__internal__/selectionControl/selectionControl.styles.js';
9
- import { SELECTION_CONTROL_HIT_SLOP, getAccessibleHint, getAccessibleName } from '../../__internal__/selectionControl/selectionControl.utils.js';
9
+ import { getAccessibleHint, SELECTION_CONTROL_HIT_SLOP, getAccessibleName } from '../../__internal__/selectionControl/selectionControl.utils.js';
10
10
 
11
+ const CheckboxGroupContext = createContext(null);
11
12
  // Web draws both glyphs in a 14px viewBox with a 2px stroke; the ported 24px icons need 24/7 for the same weight.
12
13
  const GLYPH_STROKE = 24 / 7;
13
14
  const CHECK_SIZE = { sm: 12, md: 14 };
@@ -21,19 +22,55 @@ const GLYPH_COLOR = '#ffffff';
21
22
  *
22
23
  * @summary checkbox for selecting one or more options (React Native)
23
24
  */
24
- const Checkbox = ({ label, hint, size = 'sm', className, isSelected: isSelectedProp, defaultSelected = false, isIndeterminate, isDisabled, onChange, 'aria-label': ariaLabel, 'data-testid': dataTestId, }) => {
25
- const checkboxTestId = useResolvedTestId({ testId: dataTestId, segment: 'checkbox', rootName: 'checkbox' });
25
+ const Checkbox = ({ value, label, hint, size: sizeProp = 'sm', className, isSelected: isSelectedProp, defaultSelected = false, isIndeterminate, isDisabled: isDisabledProp, onChange, 'aria-label': ariaLabel, 'data-testid': dataTestId, }) => {
26
+ const group = useContext(CheckboxGroupContext);
27
+ // A box with no `value` is not one of the group's options, so it keeps its own state.
28
+ const option = group && value !== undefined ? { group, value } : null;
29
+ const size = group?.size ?? sizeProp;
30
+ const isDisabled = Boolean(isDisabledProp || group?.isDisabled);
31
+ const fallbackTestId = useResolvedTestId({ testId: dataTestId, segment: 'checkbox', rootName: 'checkbox' });
32
+ const checkboxTestId = !dataTestId && option ? joinTestId(option.group.testIdPrefix, `option-${slugifyTestId(option.value)}`) : fallbackTestId;
26
33
  const [uncontrolledSelected, setUncontrolledSelected] = useState(defaultSelected);
27
- const isSelected = isSelectedProp ?? uncontrolledSelected;
34
+ const isSelected = option ? option.group.values.includes(option.value) : (isSelectedProp ?? uncontrolledSelected);
28
35
  const isFilled = isSelected || isIndeterminate;
36
+ const accessibilityHint = [getAccessibleHint(hint), group?.description].filter(Boolean).join(' ') || undefined;
37
+ const ownName = getAccessibleName(ariaLabel, label);
38
+ const accessibleName = ownName && option?.group.name ? `${ownName}, ${option.group.name}` : ownName;
29
39
  const handlePress = () => {
30
40
  const next = !isSelected;
31
- if (isSelectedProp === undefined)
41
+ if (option)
42
+ option.group.toggle(option.value);
43
+ else if (isSelectedProp === undefined)
32
44
  setUncontrolledSelected(next);
33
45
  onChange?.(next);
34
46
  };
35
- return (jsxs(Pressable, { testID: checkboxTestId, disabled: isDisabled, onPress: handlePress, accessibilityRole: "checkbox", hitSlop: SELECTION_CONTROL_HIT_SLOP, accessibilityLabel: getAccessibleName(ariaLabel, label), accessibilityHint: getAccessibleHint(hint), accessibilityState: { checked: isIndeterminate ? 'mixed' : isSelected, disabled: Boolean(isDisabled) }, className: cx('relative flex flex-row items-start self-start', selectionControlSizes[size].root, className), children: [jsxs(View, { className: cx('size-4 shrink-0 items-center justify-center rounded border border-primary bg-primary', size === 'md' && 'size-5 rounded-md', isFilled && 'border-brand-solid bg-brand-solid', isDisabled && 'opacity-50', isDisabled && !isFilled && 'bg-tertiary', (label || hint) && 'mt-0.5'), children: [isIndeterminate && jsx(Minus, { size: DASH_SIZE[size], color: GLYPH_COLOR, strokeWidth: GLYPH_STROKE }), !isIndeterminate && isSelected && jsx(Check, { size: CHECK_SIZE[size], color: GLYPH_COLOR, strokeWidth: GLYPH_STROKE })] }), jsx(SelectionControlText, { size: size, label: label, hint: hint })] }));
47
+ return (jsxs(Pressable, { testID: checkboxTestId, disabled: isDisabled, onPress: handlePress, accessibilityRole: "checkbox", hitSlop: SELECTION_CONTROL_HIT_SLOP, accessibilityLabel: accessibleName, accessibilityHint: accessibilityHint, accessibilityState: { checked: isIndeterminate ? 'mixed' : isSelected, disabled: isDisabled }, className: cx('relative flex flex-row items-start self-start', selectionControlSizes[size].root, className), children: [jsxs(View, { className: cx('size-4 shrink-0 items-center justify-center rounded border border-primary bg-primary', size === 'md' && 'size-5 rounded-md', isFilled && 'border-brand-solid bg-brand-solid', isDisabled && 'opacity-50', isDisabled && !isFilled && 'bg-tertiary', (label || hint) && 'mt-0.5'), children: [isIndeterminate && jsx(Minus, { size: DASH_SIZE[size], color: GLYPH_COLOR, strokeWidth: GLYPH_STROKE }), !isIndeterminate && isSelected && jsx(Check, { size: CHECK_SIZE[size], color: GLYPH_COLOR, strokeWidth: GLYPH_STROKE })] }), jsx(SelectionControlText, { size: size, label: label, hint: hint })] }));
48
+ };
49
+ // `Text` className is ignored by the current `react-native-css` preview (see Avatar), so the group's text goes through `style`.
50
+ const GROUP_TEXT = { fontSize: 14, lineHeight: 20 };
51
+ // Light-mode hex of `text-secondary` (neutral-700), `text-tertiary` (neutral-600), `text-error-primary` (red-600) and `text-brand-tertiary` (brand-600).
52
+ const GROUP_LABEL_COLOR = '#404040';
53
+ const GROUP_HINT_COLOR = '#525252';
54
+ const GROUP_ERROR_COLOR = '#dc2626';
55
+ const GROUP_REQUIRED_COLOR = '#0b75d7';
56
+ /** React Native `CheckboxGroup` that names a set of `Checkbox` children, owns which are ticked as a list, and shows one hint or error for the set. */
57
+ const CheckboxGroup = ({ children, label, hint, className, size = 'sm', value, defaultValue = [], onChange, isDisabled = false, isInvalid = false, isRequired = false, 'aria-label': ariaLabel, 'data-testid': dataTestId, }) => {
58
+ const rootTestId = useResolvedTestId({ testId: dataTestId, segment: 'checkbox-group', rootName: 'checkbox-group' });
59
+ const [uncontrolledValues, setUncontrolledValues] = useState(defaultValue);
60
+ const values = value ?? uncontrolledValues;
61
+ const toggle = (option) => {
62
+ const next = values.includes(option) ? values.filter((ticked) => ticked !== option) : [...values, option];
63
+ if (value === undefined)
64
+ setUncontrolledValues(next);
65
+ onChange?.(next);
66
+ };
67
+ const groupName = getAccessibleName(ariaLabel, label);
68
+ // React Native has no required state for a set of boxes, so the group's name says it in words.
69
+ const announcedName = groupName && isRequired ? `${groupName}, required` : groupName;
70
+ // A plain `View` is not a screen-reader stop, so with no visible label each box carries the group's name.
71
+ const optionGroupName = label ? undefined : announcedName;
72
+ return (jsx(CheckboxGroupContext.Provider, { value: { size, testIdPrefix: rootTestId, values, isDisabled, description: getAccessibleHint(hint), name: optionGroupName, toggle }, children: jsxs(View, { testID: rootTestId, accessibilityLabel: groupName, className: cx('flex flex-col gap-3', className), children: [label ? (jsxs(Text, { accessibilityLabel: isRequired ? announcedName : undefined, style: { ...GROUP_TEXT, fontWeight: '500', color: GROUP_LABEL_COLOR }, children: [label, isRequired ? jsx(Text, { style: { color: isInvalid ? GROUP_ERROR_COLOR : GROUP_REQUIRED_COLOR }, children: " *" }) : null] })) : null, children, hint ? jsx(Text, { style: { ...GROUP_TEXT, color: isInvalid ? GROUP_ERROR_COLOR : GROUP_HINT_COLOR }, children: hint }) : null] }) }));
36
73
  };
37
74
 
38
- export { Checkbox };
75
+ export { Checkbox, CheckboxGroup };
39
76
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../../../src/components/atoms/Checkbox/index.native.tsx"],"sourcesContent":[null],"names":["_jsxs","_jsx"],"mappings":";;;;;;;;;;AAkCA;AACA,MAAM,YAAY,GAAG,EAAE,GAAG,CAAC;AAC3B,MAAM,UAAU,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAW;AAC9C,MAAM,SAAS,GAAG,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE,EAAW;AAC7C;AACA,MAAM,WAAW,GAAG,SAAS;AAE7B;;;;;;AAMG;AACI,MAAM,QAAQ,GAAG,CAAC,EACvB,KAAK,EACL,IAAI,EACJ,IAAI,GAAG,IAAI,EACX,SAAS,EACT,UAAU,EAAE,cAAc,EAC1B,eAAe,GAAG,KAAK,EACvB,eAAe,EACf,UAAU,EACV,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,aAAa,EAAE,UAAU,GACX,KAAI;AAClB,IAAA,MAAM,cAAc,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,UAAU,EAAE,CAAC;IAC3G,MAAM,CAAC,oBAAoB,EAAE,uBAAuB,CAAC,GAAG,QAAQ,CAAC,eAAe,CAAC;AACjF,IAAA,MAAM,UAAU,GAAG,cAAc,IAAI,oBAAoB;AACzD,IAAA,MAAM,QAAQ,GAAG,UAAU,IAAI,eAAe;IAE9C,MAAM,WAAW,GAAG,MAAK;AACvB,QAAA,MAAM,IAAI,GAAG,CAAC,UAAU;QACxB,IAAI,cAAc,KAAK,SAAS;YAAE,uBAAuB,CAAC,IAAI,CAAC;AAC/D,QAAA,QAAQ,GAAG,IAAI,CAAC;AAClB,IAAA,CAAC;AAED,IAAA,QACEA,IAAA,CAAC,SAAS,IACR,MAAM,EAAE,cAAc,EACtB,QAAQ,EAA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AAU,EAAE,kBAAkB,EAAE,SAAS,EAAE,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,CACrG,KAAK,IACJA,IAAA,CAAC,IAAI,EAAA,EAAC,kBAAkB,EAAE,UAAU,GAAG,aAAa,GAAG,SAAS,EAAE,KAAK,EAAE,EAAE,GAAG,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,iBAAiB,EAAE,aACpI,KAAK,EACL,UAAU,GAAGC,GAAA,CAAC,IAAI,EAAA,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,SAAS,GAAG,iBAAiB,GAAG,oBAAoB,EAAE,mBAAW,GAAG,IAAI,CAAA,EAAA,CACvG,IACL,IAAI,EACP,QAAQ,EACR,IAAI,GAAGA,GAAA,CAAC,IAAI,EAAA,EAAC,KAAK,EAAE,EAAE,GAAG,UAAU,EAAE,KAAK,EAAE,SAAS,GAAG,iBAAiB,GAAG,gBAAgB,EAAE,EAAA,QAAA,EAAG,IAAI,EAAA,CAAQ,GAAG,IAAI,CAAA,EAAA,CAChH,EAAA,CACuB;AAEpC;;"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * `Alerts` has no React Native implementation.
3
+ *
4
+ * This is a generated types-only stub (scripts/emit-native-stubs.mjs). It exists so
5
+ * that importing `@flipdish/ui-library/components/molecules/Alerts` from React Native fails at
6
+ * compile time rather than resolving to the web build's types. There is no
7
+ * matching `index.js`, so Metro cannot bundle this module either.
8
+ *
9
+ * To make `Alerts` available on React Native, add an `index.native.tsx` beside
10
+ * its `index.tsx` — the build picks it up automatically and this stub disappears.
11
+ */
12
+ export declare const __NO_REACT_NATIVE_IMPLEMENTATION__: never;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * `Modals` has no React Native implementation.
3
+ *
4
+ * This is a generated types-only stub (scripts/emit-native-stubs.mjs). It exists so
5
+ * that importing `@flipdish/ui-library/components/molecules/Modals` from React Native fails at
6
+ * compile time rather than resolving to the web build's types. There is no
7
+ * matching `index.js`, so Metro cannot bundle this module either.
8
+ *
9
+ * To make `Modals` available on React Native, add an `index.native.tsx` beside
10
+ * its `index.tsx` — the build picks it up automatically and this stub disappears.
11
+ */
12
+ export declare const __NO_REACT_NATIVE_IMPLEMENTATION__: never;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * `useFocusAfterRetry` has no React Native implementation.
3
+ *
4
+ * This is a generated types-only stub (scripts/emit-native-stubs.mjs). It exists so
5
+ * that importing `@flipdish/ui-library/hooks/useFocusAfterRetry` from React Native fails at
6
+ * compile time rather than resolving to the web build's types. There is no
7
+ * matching `index.js`, so Metro cannot bundle this module either.
8
+ *
9
+ * To make `useFocusAfterRetry` available on React Native, add an `index.native.tsx` beside
10
+ * its `index.tsx` — the build picks it up automatically and this stub disappears.
11
+ */
12
+ export declare const __NO_REACT_NATIVE_IMPLEMENTATION__: never;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * `useUnsavedChangesGuard` has no React Native implementation.
3
+ *
4
+ * This is a generated types-only stub (scripts/emit-native-stubs.mjs). It exists so
5
+ * that importing `@flipdish/ui-library/hooks/useUnsavedChangesGuard` from React Native fails at
6
+ * compile time rather than resolving to the web build's types. There is no
7
+ * matching `index.js`, so Metro cannot bundle this module either.
8
+ *
9
+ * To make `useUnsavedChangesGuard` available on React Native, add an `index.native.tsx` beside
10
+ * its `index.tsx` — the build picks it up automatically and this stub disappears.
11
+ */
12
+ export declare const __NO_REACT_NATIVE_IMPLEMENTATION__: never;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * `UnsavedChangesGuardProvider` has no React Native implementation.
3
+ *
4
+ * This is a generated types-only stub (scripts/emit-native-stubs.mjs). It exists so
5
+ * that importing `@flipdish/ui-library/providers/UnsavedChangesGuardProvider` from React Native fails at
6
+ * compile time rather than resolving to the web build's types. There is no
7
+ * matching `index.js`, so Metro cannot bundle this module either.
8
+ *
9
+ * To make `UnsavedChangesGuardProvider` available on React Native, add an `index.native.tsx` beside
10
+ * its `index.tsx` — the build picks it up automatically and this stub disappears.
11
+ */
12
+ export declare const __NO_REACT_NATIVE_IMPLEMENTATION__: never;
@@ -0,0 +1,70 @@
1
+ 'use strict';
2
+
3
+ var React = require('react');
4
+ var reactRouter = require('react-router');
5
+
6
+ /**
7
+ * Gives every history entry the app lands on the index react-router expects there. A host such as Portal pushes entries
8
+ * without one, and react-router then cannot tell how far a back or forward move went, so it could not hold one.
9
+ *
10
+ * @returns The function that stops it.
11
+ */
12
+ const keepHistoryIndex = () => {
13
+ const { navigation } = window;
14
+ if (!navigation)
15
+ return () => { };
16
+ // The last entry seen with an index, and where the browser says it sits: the next one is numbered from it.
17
+ let known;
18
+ const number = () => {
19
+ const position = navigation.currentEntry?.index ?? -1;
20
+ const state = window.history.state;
21
+ // Only a plain object can take one more field and stay what it was; anything else is the host's own to keep.
22
+ const isPlainObject = typeof state === 'object' && state !== null && Object.getPrototypeOf(state) === Object.prototype;
23
+ if (position < 0 || !(state === null || isPlainObject))
24
+ return;
25
+ const idx = state?.idx;
26
+ // An index already there is never changed: another router on the page may count from it, and a `NaN`, which
27
+ // react-router writes after an entry it could not count from, marks a move it cannot rewind.
28
+ if (idx !== undefined && idx !== null) {
29
+ if (typeof idx === 'number' && Number.isFinite(idx))
30
+ known = { idx, position };
31
+ return;
32
+ }
33
+ const next = known ? known.idx + position - known.position : position;
34
+ known = { idx: next, position };
35
+ window.history.replaceState({ ...state, idx: next }, '');
36
+ };
37
+ // Fires for every push, replace and back or forward move, before any `popstate` listener reads the entry.
38
+ navigation.addEventListener('currententrychange', number);
39
+ number();
40
+ return () => navigation.removeEventListener('currententrychange', number);
41
+ };
42
+ /**
43
+ * Owns a react-router data router for the lifetime of the component: created on mount and whenever `basename` changes,
44
+ * disposed on unmount so a StrictMode or host re-mount never leaves a `popstate` listener behind. A new `basename` is a
45
+ * new router, so the tree beneath it mounts again.
46
+ *
47
+ * @param routes The route table; pass a module-level constant, since the router reads it once when it is created.
48
+ * @param basename The path the app is mounted under, such as a micro-frontend's Portal base URL.
49
+ * @returns The router, or `null` until the layout effect has built the one for this `basename`, which is still before the paint.
50
+ */
51
+ const useBrowserRouter = (routes, basename) => {
52
+ const [current, setCurrent] = React.useState(null);
53
+ // biome-ignore lint/correctness/useExhaustiveDependencies: the route table is read once per router, so a new array must not rebuild it
54
+ React.useLayoutEffect(() => {
55
+ // Started first, so the router reads an index on the entry it mounts on.
56
+ const stopKeepingIndex = keepHistoryIndex();
57
+ const created = reactRouter.createBrowserRouter(routes, { basename });
58
+ setCurrent({ router: created, basename });
59
+ return () => {
60
+ created.dispose();
61
+ stopKeepingIndex();
62
+ };
63
+ }, [basename]);
64
+ // `RouterProvider` keeps the state of the first router it is given, so a router built for another basename is never
65
+ // handed over: the provider unmounts for that render and mounts again with the new router's own state.
66
+ return current && current.basename === basename ? current.router : null;
67
+ };
68
+
69
+ exports.useBrowserRouter = useBrowserRouter;
70
+ //# sourceMappingURL=useBrowserRouter.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBrowserRouter.cjs","sources":["../../../../src/providers/UIProvider/hooks/useBrowserRouter.ts"],"sourcesContent":[null],"names":["useState","useLayoutEffect","createBrowserRouter"],"mappings":";;;;;AAYA;;;;;AAKG;AACH,MAAM,gBAAgB,GAAG,MAAmB;AAC1C,IAAA,MAAM,EAAE,UAAU,EAAE,GAAG,MAAiD;AACxE,IAAA,IAAI,CAAC,UAAU;AAAE,QAAA,OAAO,MAAK,EAAE,CAAC;;AAEhC,IAAA,IAAI,KAAoD;IAExD,MAAM,MAAM,GAAG,MAAK;QAClB,MAAM,QAAQ,GAAG,UAAU,CAAC,YAAY,EAAE,KAAK,IAAI,EAAE;AACrD,QAAA,MAAM,KAAK,GAAY,MAAM,CAAC,OAAO,CAAC,KAAK;;QAE3C,MAAM,aAAa,GAAG,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,MAAM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MAAK;YACV,OAAO,CAAC,OAAO,EAAE;AACjB,YAAA,gBAAgB,EAAE;AACpB,QAAA,CAAC;AACH,IAAA,CAAC,EAAE,CAAC,QAAQ,CAAC,CAAC;;;AAId,IAAA,OAAO,OAAO,IAAI,OAAO,CAAC,QAAQ,KAAK,QAAQ,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI;AACzE;;"}
@@ -0,0 +1,12 @@
1
+ import { type DataRouter, type RouteObject } from 'react-router';
2
+ /**
3
+ * Owns a react-router data router for the lifetime of the component: created on mount and whenever `basename` changes,
4
+ * disposed on unmount so a StrictMode or host re-mount never leaves a `popstate` listener behind. A new `basename` is a
5
+ * new router, so the tree beneath it mounts again.
6
+ *
7
+ * @param routes The route table; pass a module-level constant, since the router reads it once when it is created.
8
+ * @param basename The path the app is mounted under, such as a micro-frontend's Portal base URL.
9
+ * @returns The router, or `null` until the layout effect has built the one for this `basename`, which is still before the paint.
10
+ */
11
+ export declare const useBrowserRouter: (routes: RouteObject[], basename?: string) => DataRouter | null;
12
+ //# sourceMappingURL=useBrowserRouter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBrowserRouter.d.ts","sourceRoot":"","sources":["../../../../src/providers/UIProvider/hooks/useBrowserRouter.ts"],"names":[],"mappings":"AAGA,OAAO,EAAuB,KAAK,UAAU,EAAE,KAAK,WAAW,EAAE,MAAM,cAAc,CAAC;AA6CtF;;;;;;;;GAQG;AACH,eAAO,MAAM,gBAAgB,GAAI,QAAQ,WAAW,EAAE,EAAE,WAAW,MAAM,KAAG,UAAU,GAAG,IAkBxF,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { useState, useLayoutEffect } from 'react';
2
+ import { createBrowserRouter } from 'react-router';
3
+
4
+ /**
5
+ * Gives every history entry the app lands on the index react-router expects there. A host such as Portal pushes entries
6
+ * without one, and react-router then cannot tell how far a back or forward move went, so it could not hold one.
7
+ *
8
+ * @returns The function that stops it.
9
+ */
10
+ const keepHistoryIndex = () => {
11
+ const { navigation } = window;
12
+ if (!navigation)
13
+ return () => { };
14
+ // The last entry seen with an index, and where the browser says it sits: the next one is numbered from it.
15
+ let known;
16
+ const number = () => {
17
+ const position = navigation.currentEntry?.index ?? -1;
18
+ const state = window.history.state;
19
+ // Only a plain object can take one more field and stay what it was; anything else is the host's own to keep.
20
+ const isPlainObject = typeof state === 'object' && state !== null && Object.getPrototypeOf(state) === Object.prototype;
21
+ if (position < 0 || !(state === null || isPlainObject))
22
+ return;
23
+ const idx = state?.idx;
24
+ // An index already there is never changed: another router on the page may count from it, and a `NaN`, which
25
+ // react-router writes after an entry it could not count from, marks a move it cannot rewind.
26
+ if (idx !== undefined && idx !== null) {
27
+ if (typeof idx === 'number' && Number.isFinite(idx))
28
+ known = { idx, position };
29
+ return;
30
+ }
31
+ const next = known ? known.idx + position - known.position : position;
32
+ known = { idx: next, position };
33
+ window.history.replaceState({ ...state, idx: next }, '');
34
+ };
35
+ // Fires for every push, replace and back or forward move, before any `popstate` listener reads the entry.
36
+ navigation.addEventListener('currententrychange', number);
37
+ number();
38
+ return () => navigation.removeEventListener('currententrychange', number);
39
+ };
40
+ /**
41
+ * Owns a react-router data router for the lifetime of the component: created on mount and whenever `basename` changes,
42
+ * disposed on unmount so a StrictMode or host re-mount never leaves a `popstate` listener behind. A new `basename` is a
43
+ * new router, so the tree beneath it mounts again.
44
+ *
45
+ * @param routes The route table; pass a module-level constant, since the router reads it once when it is created.
46
+ * @param basename The path the app is mounted under, such as a micro-frontend's Portal base URL.
47
+ * @returns The router, or `null` until the layout effect has built the one for this `basename`, which is still before the paint.
48
+ */
49
+ const useBrowserRouter = (routes, basename) => {
50
+ const [current, setCurrent] = useState(null);
51
+ // biome-ignore lint/correctness/useExhaustiveDependencies: the route table is read once per router, so a new array must not rebuild it
52
+ useLayoutEffect(() => {
53
+ // Started first, so the router reads an index on the entry it mounts on.
54
+ const stopKeepingIndex = keepHistoryIndex();
55
+ const created = createBrowserRouter(routes, { basename });
56
+ setCurrent({ router: created, basename });
57
+ return () => {
58
+ created.dispose();
59
+ stopKeepingIndex();
60
+ };
61
+ }, [basename]);
62
+ // `RouterProvider` keeps the state of the first router it is given, so a router built for another basename is never
63
+ // handed over: the provider unmounts for that render and mounts again with the new router's own state.
64
+ return current && current.basename === basename ? current.router : null;
65
+ };
66
+
67
+ export { useBrowserRouter };
68
+ //# sourceMappingURL=useBrowserRouter.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBrowserRouter.js","sources":["../../../../src/providers/UIProvider/hooks/useBrowserRouter.ts"],"sourcesContent":[null],"names":[],"mappings":";;;AAYA;;;;;AAKG;AACH,MAAM,gBAAgB,GAAG,MAAmB;AAC1C,IAAA,MAAM,EAAE,UAAU,EAAE,GAAG,MAAiD;AACxE,IAAA,IAAI,CAAC,UAAU;AAAE,QAAA,OAAO,MAAK,EAAE,CAAC;;AAEhC,IAAA,IAAI,KAAoD;IAExD,MAAM,MAAM,GAAG,MAAK;QAClB,MAAM,QAAQ,GAAG,UAAU,CAAC,YAAY,EAAE,KAAK,IAAI,EAAE;AACrD,QAAA,MAAM,KAAK,GAAY,MAAM,CAAC,OAAO,CAAC,KAAK;;QAE3C,MAAM,aAAa,GAAG,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,KAAK,MAAM,CAAC,SAAS;QACtH,IAAI,QAAQ,GAAG,CAAC,IAAI,EAAE,KAAK,KAAK,IAAI,IAAI,aAAa,CAAC;YAAE;AACxD,QAAA,MAAM,GAAG,GAAI,KAAkC,EAAE,GAAG;;;QAGpD,IAAI,GAAG,KAAK,SAAS,IAAI,GAAG,KAAK,IAAI,EAAE;YACrC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,MAAM,CAAC,QAAQ,CAAC,GAAG,CAAC;AAAE,gBAAA,KAAK,GAAG,EAAE,GAAG,EAAE,QAAQ,EAAE;YAC9E;QACF;AACA,QAAA,MAAM,IAAI,G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