@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,97 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Reads the bridge a host such as Portal puts on the window for the apps it mounts.
5
+ *
6
+ * @returns The host's guard, or `undefined` when the app runs on its own.
7
+ */
8
+ const hostGuard = () => window.fdNavigationGuard;
9
+ /**
10
+ * Reads the index react-router stores on the current history entry.
11
+ *
12
+ * @returns The index; missing or `NaN` on and after an entry a host pushed itself.
13
+ */
14
+ const historyIndex = () => window.history.state?.idx;
15
+ /**
16
+ * Reads the browser's own count for the current history entry.
17
+ *
18
+ * @returns The entry's index in the Navigation API, or `undefined` where the browser has none.
19
+ */
20
+ const historyPosition = () => window.navigation?.currentEntry?.index;
21
+ /**
22
+ * Reports the browser's own count for the entry each navigation leaves, where the browser has the Navigation API.
23
+ *
24
+ * @param onLeave Called on every push, replace and back or forward move with the count of the entry left, before any `popstate` listener runs.
25
+ * @returns The function that stops it.
26
+ */
27
+ const watchLeftPosition = (onLeave) => {
28
+ const { navigation } = window;
29
+ if (!navigation)
30
+ return () => { };
31
+ // A polyfill or a test double may call the listener with no event: the entry left is then unknown, not an error.
32
+ const note = (event) => onLeave(event?.from?.index);
33
+ navigation.addEventListener('currententrychange', note);
34
+ return () => navigation.removeEventListener('currententrychange', note);
35
+ };
36
+ /**
37
+ * Whether the entry the user has just left is the one this router last saw them on. Another router on the page pushes
38
+ * entries this one never hears of; its own count is then stale, and a rewind by it would land on the wrong entry.
39
+ *
40
+ * @param place Where this router last saw the user.
41
+ * @param leftPosition The browser's count for the entry the move left, or `undefined` where the browser gives none.
42
+ * @returns `false` only when the browser's count shows the user had moved on from `place`.
43
+ */
44
+ const hasLeftFrom = (place, leftPosition) => place.position === undefined || leftPosition === undefined || place.position === leftPosition;
45
+ /**
46
+ * Whether react-router can put the user back after a back or forward move it holds. It rewinds by the difference of the
47
+ * two entries' indexes, so a difference that is missing or zero reloads the page, and a wrong one lands on another entry.
48
+ *
49
+ * @param from The entry the user was on.
50
+ * @param to The entry the move has landed on.
51
+ * @returns `true` when the indexes give a distance, and the browser's own count, where it has one, agrees with it.
52
+ */
53
+ const canRewind = (from, to) => {
54
+ const distance = typeof from.idx === 'number' && typeof to.idx === 'number' ? to.idx - from.idx : Number.NaN;
55
+ if (!Number.isFinite(distance) || distance === 0)
56
+ return false;
57
+ // Two routers on one page can number the entries differently; the browser's count is the real distance.
58
+ if (from.position === undefined || to.position === undefined)
59
+ return true;
60
+ return to.position - from.position === distance;
61
+ };
62
+ /**
63
+ * The browser history entry a back or forward move has landed on, when the router is a browser router.
64
+ *
65
+ * @param nextKey The key of the location the router is moving to.
66
+ * @returns The entry's index, or `undefined` under a memory router, which keeps nothing in `window.history`.
67
+ */
68
+ const browserEntry = (nextKey) => {
69
+ const state = window.history.state;
70
+ if (typeof state !== 'object' || state === null || !('idx' in state))
71
+ return undefined;
72
+ // A browser router's entry carries the location's key, or none when the router did not push it, whose key is `'default'`.
73
+ const key = 'key' in state ? state.key : 'default';
74
+ return key === nextKey ? { idx: state.idx } : undefined;
75
+ };
76
+ /**
77
+ * Whether a path is the app's base path or beneath it. Case does not matter, as it does not to react-router when it matches the base path.
78
+ *
79
+ * @param pathname The path to test, such as `window.location.pathname`.
80
+ * @param basePath The app's router base path; trailing slashes are ignored.
81
+ * @returns `true` when the path is inside the app.
82
+ */
83
+ const isInside = (pathname, basePath) => {
84
+ const base = basePath.replace(/\/+$/, '').toLowerCase();
85
+ const path = pathname.toLowerCase();
86
+ return path === base || path.startsWith(`${base}/`);
87
+ };
88
+
89
+ exports.browserEntry = browserEntry;
90
+ exports.canRewind = canRewind;
91
+ exports.hasLeftFrom = hasLeftFrom;
92
+ exports.historyIndex = historyIndex;
93
+ exports.historyPosition = historyPosition;
94
+ exports.hostGuard = hostGuard;
95
+ exports.isInside = isInside;
96
+ exports.watchLeftPosition = watchLeftPosition;
97
+ //# sourceMappingURL=unsavedChangesGuard.utils.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unsavedChangesGuard.utils.cjs","sources":["../../../src/providers/UnsavedChangesGuardProvider/unsavedChangesGuard.utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAEA;;;;AAIG;AACI,MAAM,SAAS,GAAG,MAAsC,MAA6D,CAAC;AAE7H;;;;AAIG;AACI,MAAM,YAAY,GAAG,MAAgB,MAAM,CAAC,OAAO,CAAC,KAAkC,EAAE;AAE/F;;;;AAIG;AACI,MAAM,eAAe,GAAG,MAA2B,MAAkD,CAAC,UAAU,EAAE,YAAY,EAAE;AASvI;;;;;AAKG;AACI,MAAM,iBAAiB,GAAG,CAAC,OAA+C,KAAkB;AACjG,IAAA,MAAM,EAAE,UAAU,EAAE,GAAG,MAAiD;AACxE,IAAA,IAAI,CAAC,UAAU;AAAE,QAAA,OAAO,MAAK,EAAE,CAAC;;AAEhC,IAAA,MAAM,IAAI,GAAG,CAAC,KAA2C,KAAK,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC;AACzF,IAAA,UAAU,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,IAAI,CAAC;IACvD,OAAO,MAAM,UAAU,CAAC,mBAAmB,CAAC,oBAAoB,EAAE,IAAI,CAAC;AACzE;AAEA;;;;;;;AAOG;AACI,MAAM,WAAW,GAAG,CAAC,KAAmB,EAAE,YAAgC,KAC/E,KAAK,CAAC,QAAQ,KAAK,SAAS,IAAI,YAAY,KAAK,SAAS,IAAI,KAAK,CAAC,QAAQ,KAAK;AAEnF;;;;;;;AAOG;MACU,SAAS,GAAG,CAAC,IAAkB,EAAE,EAAgB,KAAI;AAChE,IAAA,MAAM,QAAQ,GAAG,OAAO,IAAI,CAAC,GAAG,KAAK,QAAQ,IAAI,OAAO,EAAE,CAAC,GAAG,KAAK,QAAQ,GAAG,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG;IAC5G,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,QAAQ,KAAK,CAAC;AAAE,QAAA,OAAO,KAAK;;IAE9D,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAI,EAAE,CAAC,QAAQ,KAAK,SAAS;AAAE,QAAA,OAAO,IAAI;IACzE,OAAO,EAAE,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,KAAK,QAAQ;AACjD;AAEA;;;;;AAKG;AACI,MAAM,YAAY,GAAG,CAAC,OAAe,KAAkC;AAC5E,IAAA,MAAM,KAAK,GAAY,MAAM,CAAC,OAAO,CAAC,KAAK;AAC3C,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,EAAE,KAAK,IAAI,KAAK,CAAC;AAAE,QAAA,OAAO,SAAS;;AAEtF,IAAA,MAAM,GAAG,GAAG,KAAK,IAAI,KAAK,GAAG,KAAK,CAAC,GAAG,GAAG,SAAS;AAClD,IAAA,OAAO,GAAG,KAAK,OAAO,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,GAAG,SAAS;AACzD;AAEA;;;;;;AAMG;MACU,QAAQ,GAAG,CAAC,QAAgB,EAAE,QAAgB,KAAI;AAC7D,IAAA,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE;AACvD,IAAA,MAAM,IAAI,GAAG,QAAQ,CAAC,WAAW,EAAE;AACnC,IAAA,OAAO,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,CAAA,EAAG,IAAI,CAAA,CAAA,CAAG,CAAC;AACrD;;;;;;;;;"}
@@ -0,0 +1,62 @@
1
+ import type { FdNavigationGuard, HistoryPlace } from './unsavedChangesGuard.types';
2
+ /**
3
+ * Reads the bridge a host such as Portal puts on the window for the apps it mounts.
4
+ *
5
+ * @returns The host's guard, or `undefined` when the app runs on its own.
6
+ */
7
+ export declare const hostGuard: () => FdNavigationGuard | undefined;
8
+ /**
9
+ * Reads the index react-router stores on the current history entry.
10
+ *
11
+ * @returns The index; missing or `NaN` on and after an entry a host pushed itself.
12
+ */
13
+ export declare const historyIndex: () => unknown;
14
+ /**
15
+ * Reads the browser's own count for the current history entry.
16
+ *
17
+ * @returns The entry's index in the Navigation API, or `undefined` where the browser has none.
18
+ */
19
+ export declare const historyPosition: () => number | undefined;
20
+ /**
21
+ * Reports the browser's own count for the entry each navigation leaves, where the browser has the Navigation API.
22
+ *
23
+ * @param onLeave Called on every push, replace and back or forward move with the count of the entry left, before any `popstate` listener runs.
24
+ * @returns The function that stops it.
25
+ */
26
+ export declare const watchLeftPosition: (onLeave: (position: number | undefined) => void) => (() => void);
27
+ /**
28
+ * Whether the entry the user has just left is the one this router last saw them on. Another router on the page pushes
29
+ * entries this one never hears of; its own count is then stale, and a rewind by it would land on the wrong entry.
30
+ *
31
+ * @param place Where this router last saw the user.
32
+ * @param leftPosition The browser's count for the entry the move left, or `undefined` where the browser gives none.
33
+ * @returns `false` only when the browser's count shows the user had moved on from `place`.
34
+ */
35
+ export declare const hasLeftFrom: (place: HistoryPlace, leftPosition: number | undefined) => boolean;
36
+ /**
37
+ * Whether react-router can put the user back after a back or forward move it holds. It rewinds by the difference of the
38
+ * two entries' indexes, so a difference that is missing or zero reloads the page, and a wrong one lands on another entry.
39
+ *
40
+ * @param from The entry the user was on.
41
+ * @param to The entry the move has landed on.
42
+ * @returns `true` when the indexes give a distance, and the browser's own count, where it has one, agrees with it.
43
+ */
44
+ export declare const canRewind: (from: HistoryPlace, to: HistoryPlace) => boolean;
45
+ /**
46
+ * The browser history entry a back or forward move has landed on, when the router is a browser router.
47
+ *
48
+ * @param nextKey The key of the location the router is moving to.
49
+ * @returns The entry's index, or `undefined` under a memory router, which keeps nothing in `window.history`.
50
+ */
51
+ export declare const browserEntry: (nextKey: string) => {
52
+ idx: unknown;
53
+ } | undefined;
54
+ /**
55
+ * Whether a path is the app's base path or beneath it. Case does not matter, as it does not to react-router when it matches the base path.
56
+ *
57
+ * @param pathname The path to test, such as `window.location.pathname`.
58
+ * @param basePath The app's router base path; trailing slashes are ignored.
59
+ * @returns `true` when the path is inside the app.
60
+ */
61
+ export declare const isInside: (pathname: string, basePath: string) => boolean;
62
+ //# sourceMappingURL=unsavedChangesGuard.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unsavedChangesGuard.utils.d.ts","sourceRoot":"","sources":["../../../src/providers/UnsavedChangesGuardProvider/unsavedChangesGuard.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEnF;;;;GAIG;AACH,eAAO,MAAM,SAAS,QAAO,iBAAiB,GAAG,SAA6F,CAAC;AAE/I;;;;GAIG;AACH,eAAO,MAAM,YAAY,QAAO,OAAkE,CAAC;AAEnG;;;;GAIG;AACH,eAAO,MAAM,eAAe,QAAO,MAAM,GAAG,SAAgG,CAAC;AAS7I;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,KAAG,CAAC,MAAM,IAAI,CAO9F,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,YAAY,EAAE,cAAc,MAAM,GAAG,SAAS,YACc,CAAC;AAEhG;;;;;;;GAOG;AACH,eAAO,MAAM,SAAS,GAAI,MAAM,YAAY,EAAE,IAAI,YAAY,YAM7D,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,YAAY,GAAI,SAAS,MAAM,KAAG;IAAE,GAAG,EAAE,OAAO,CAAA;CAAE,GAAG,SAMjE,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,QAAQ,GAAI,UAAU,MAAM,EAAE,UAAU,MAAM,YAI1D,CAAC"}
@@ -0,0 +1,88 @@
1
+ /**
2
+ * Reads the bridge a host such as Portal puts on the window for the apps it mounts.
3
+ *
4
+ * @returns The host's guard, or `undefined` when the app runs on its own.
5
+ */
6
+ const hostGuard = () => window.fdNavigationGuard;
7
+ /**
8
+ * Reads the index react-router stores on the current history entry.
9
+ *
10
+ * @returns The index; missing or `NaN` on and after an entry a host pushed itself.
11
+ */
12
+ const historyIndex = () => window.history.state?.idx;
13
+ /**
14
+ * Reads the browser's own count for the current history entry.
15
+ *
16
+ * @returns The entry's index in the Navigation API, or `undefined` where the browser has none.
17
+ */
18
+ const historyPosition = () => window.navigation?.currentEntry?.index;
19
+ /**
20
+ * Reports the browser's own count for the entry each navigation leaves, where the browser has the Navigation API.
21
+ *
22
+ * @param onLeave Called on every push, replace and back or forward move with the count of the entry left, before any `popstate` listener runs.
23
+ * @returns The function that stops it.
24
+ */
25
+ const watchLeftPosition = (onLeave) => {
26
+ const { navigation } = window;
27
+ if (!navigation)
28
+ return () => { };
29
+ // A polyfill or a test double may call the listener with no event: the entry left is then unknown, not an error.
30
+ const note = (event) => onLeave(event?.from?.index);
31
+ navigation.addEventListener('currententrychange', note);
32
+ return () => navigation.removeEventListener('currententrychange', note);
33
+ };
34
+ /**
35
+ * Whether the entry the user has just left is the one this router last saw them on. Another router on the page pushes
36
+ * entries this one never hears of; its own count is then stale, and a rewind by it would land on the wrong entry.
37
+ *
38
+ * @param place Where this router last saw the user.
39
+ * @param leftPosition The browser's count for the entry the move left, or `undefined` where the browser gives none.
40
+ * @returns `false` only when the browser's count shows the user had moved on from `place`.
41
+ */
42
+ const hasLeftFrom = (place, leftPosition) => place.position === undefined || leftPosition === undefined || place.position === leftPosition;
43
+ /**
44
+ * Whether react-router can put the user back after a back or forward move it holds. It rewinds by the difference of the
45
+ * two entries' indexes, so a difference that is missing or zero reloads the page, and a wrong one lands on another entry.
46
+ *
47
+ * @param from The entry the user was on.
48
+ * @param to The entry the move has landed on.
49
+ * @returns `true` when the indexes give a distance, and the browser's own count, where it has one, agrees with it.
50
+ */
51
+ const canRewind = (from, to) => {
52
+ const distance = typeof from.idx === 'number' && typeof to.idx === 'number' ? to.idx - from.idx : Number.NaN;
53
+ if (!Number.isFinite(distance) || distance === 0)
54
+ return false;
55
+ // Two routers on one page can number the entries differently; the browser's count is the real distance.
56
+ if (from.position === undefined || to.position === undefined)
57
+ return true;
58
+ return to.position - from.position === distance;
59
+ };
60
+ /**
61
+ * The browser history entry a back or forward move has landed on, when the router is a browser router.
62
+ *
63
+ * @param nextKey The key of the location the router is moving to.
64
+ * @returns The entry's index, or `undefined` under a memory router, which keeps nothing in `window.history`.
65
+ */
66
+ const browserEntry = (nextKey) => {
67
+ const state = window.history.state;
68
+ if (typeof state !== 'object' || state === null || !('idx' in state))
69
+ return undefined;
70
+ // A browser router's entry carries the location's key, or none when the router did not push it, whose key is `'default'`.
71
+ const key = 'key' in state ? state.key : 'default';
72
+ return key === nextKey ? { idx: state.idx } : undefined;
73
+ };
74
+ /**
75
+ * Whether a path is the app's base path or beneath it. Case does not matter, as it does not to react-router when it matches the base path.
76
+ *
77
+ * @param pathname The path to test, such as `window.location.pathname`.
78
+ * @param basePath The app's router base path; trailing slashes are ignored.
79
+ * @returns `true` when the path is inside the app.
80
+ */
81
+ const isInside = (pathname, basePath) => {
82
+ const base = basePath.replace(/\/+$/, '').toLowerCase();
83
+ const path = pathname.toLowerCase();
84
+ return path === base || path.startsWith(`${base}/`);
85
+ };
86
+
87
+ export { browserEntry, canRewind, hasLeftFrom, historyIndex, historyPosition, hostGuard, isInside, watchLeftPosition };
88
+ //# sourceMappingURL=unsavedChangesGuard.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unsavedChangesGuard.utils.js","sources":["../../../src/providers/UnsavedChangesGuardProvider/unsavedChangesGuard.utils.ts"],"sourcesContent":[null],"names":[],"mappings":"AAEA;;;;AAIG;AACI,MAAM,SAAS,GAAG,MAAsC,MAA6D,CAAC;AAE7H;;;;AAIG;AACI,MAAM,YAAY,GAAG,MAAgB,MAAM,CAAC,OAAO,CAAC,KAAkC,EAAE;AAE/F;;;;AAIG;AACI,MAAM,eAAe,GAAG,MAA2B,MAAkD,CAAC,UAAU,EAAE,YAAY,EAAE;AASvI;;;;;AAKG;AACI,MAAM,iBAAiB,GAAG,CAAC,OAA+C,KAAkB;AACjG,IAAA,MAAM,EAAE,UAAU,EAAE,GAAG,MAAiD;AACxE,IAAA,IAAI,CAAC,UAAU;AAAE,QAAA,OAAO,MAAK,EAAE,CAAC;;AAEhC,IAAA,MAAM,IAAI,GAAG,CAAC,KAA2C,KAAK,OAAO,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC;AACzF,IAAA,UAAU,CAAC,gBAAgB,CAAC,oBAAoB,EAAE,IAAI,CAAC;IACvD,OAAO,MAAM,UAAU,CAAC,mBAAmB,CAAC,oBAAoB,EAAE,IAAI,CAAC;AACzE;AAEA;;;;;;;AAOG;AACI,MAAM,WAAW,GAAG,CAAC,KAAmB,EAAE,YAAgC,KAC/E,KAAK,CAAC,QAAQ,KAAK,SAAS,IAAI,YAAY,KAAK,SAAS,IAAI,KAAK,CAAC,QAAQ,KAAK;AAEnF;;;;;;;AAOG;MACU,SAAS,GAAG,CAAC,IAAkB,EAAE,EAAgB,KAAI;AAChE,IAAA,MAAM,QAAQ,GAAG,OAAO,IAAI,CAAC,GAAG,KAAK,QAAQ,IAAI,OAAO,EAAE,CAAC,GAAG,KAAK,QAAQ,GAAG,EAAE,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,GAAG,MAAM,CAAC,GAAG;IAC5G,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,QAAQ,KAAK,CAAC;AAAE,QAAA,OAAO,KAAK;;IAE9D,IAAI,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAI,EAAE,CAAC,QAAQ,KAAK,SAAS;AAAE,QAAA,OAAO,IAAI;IACzE,OAAO,EAAE,CAAC,QAAQ,GAAG,IAAI,CAAC,QAAQ,KAAK,QAAQ;AACjD;AAEA;;;;;AAKG;AACI,MAAM,YAAY,GAAG,CAAC,OAAe,KAAkC;AAC5E,IAAA,MAAM,KAAK,GAAY,MAAM,CAAC,OAAO,CAAC,KAAK;AAC3C,IAAA,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,EAAE,KAAK,IAAI,KAAK,CAAC;AAAE,QAAA,OAAO,SAAS;;AAEtF,IAAA,MAAM,GAAG,GAAG,KAAK,IAAI,KAAK,GAAG,KAAK,CAAC,GAAG,GAAG,SAAS;AAClD,IAAA,OAAO,GAAG,KAAK,OAAO,GAAG,EAAE,GAAG,EAAE,KAAK,CAAC,GAAG,EAAE,GAAG,SAAS;AACzD;AAEA;;;;;;AAMG;MACU,QAAQ,GAAG,CAAC,QAAgB,EAAE,QAAgB,KAAI;AAC7D,IAAA,MAAM,IAAI,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE;AACvD,IAAA,MAAM,IAAI,GAAG,QAAQ,CAAC,WAAW,EAAE;AACnC,IAAA,OAAO,IAAI,KAAK,IAAI,IAAI,IAAI,CAAC,UAAU,CAAC,CAAA,EAAG,IAAI,CAAA,CAAA,CAAG,CAAC;AACrD;;"}
@@ -0,0 +1,12 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Joins the ids that are present into one `aria-labelledby` or `aria-describedby` value.
5
+ *
6
+ * @param ids The ids of the elements that name or describe a control, in reading order; an absent part is `undefined` or `false`.
7
+ * @returns The ids separated by spaces, or `undefined` when none is present, so the attribute is left off.
8
+ */
9
+ const joinIds = (...ids) => ids.filter(Boolean).join(' ') || undefined;
10
+
11
+ exports.joinIds = joinIds;
12
+ //# sourceMappingURL=ariaIds.utils.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ariaIds.utils.cjs","sources":["../../../../src/utilities/__internal__/ariaIdsUtils/ariaIds.utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAAA;;;;;AAKG;MACU,OAAO,GAAG,CAAC,GAAG,GAAmC,KAAK,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI;;"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Joins the ids that are present into one `aria-labelledby` or `aria-describedby` value.
3
+ *
4
+ * @param ids The ids of the elements that name or describe a control, in reading order; an absent part is `undefined` or `false`.
5
+ * @returns The ids separated by spaces, or `undefined` when none is present, so the attribute is left off.
6
+ */
7
+ export declare const joinIds: (...ids: (string | false | undefined)[]) => string | undefined;
8
+ //# sourceMappingURL=ariaIds.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ariaIds.utils.d.ts","sourceRoot":"","sources":["../../../../src/utilities/__internal__/ariaIdsUtils/ariaIds.utils.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,OAAO,GAAI,GAAG,KAAK,CAAC,MAAM,GAAG,KAAK,GAAG,SAAS,CAAC,EAAE,uBAA+C,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Joins the ids that are present into one `aria-labelledby` or `aria-describedby` value.
3
+ *
4
+ * @param ids The ids of the elements that name or describe a control, in reading order; an absent part is `undefined` or `false`.
5
+ * @returns The ids separated by spaces, or `undefined` when none is present, so the attribute is left off.
6
+ */
7
+ const joinIds = (...ids) => ids.filter(Boolean).join(' ') || undefined;
8
+
9
+ export { joinIds };
10
+ //# sourceMappingURL=ariaIds.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ariaIds.utils.js","sources":["../../../../src/utilities/__internal__/ariaIdsUtils/ariaIds.utils.ts"],"sourcesContent":[null],"names":[],"mappings":"AAAA;;;;;AAKG;MACU,OAAO,GAAG,CAAC,GAAG,GAAmC,KAAK,GAAG,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI;;"}
@@ -0,0 +1,22 @@
1
+ 'use strict';
2
+
3
+ /**
4
+ * Hands an element to a ref of either kind, as React itself would.
5
+ *
6
+ * @param ref The ref to fill: an object, a callback, or none.
7
+ * @param element The element being attached, or `null` when it is being detached.
8
+ * @returns The cleanup a callback ref returned, which React runs in place of calling that ref with `null`; `undefined`
9
+ * for a ref object, or a callback that returned nothing.
10
+ */
11
+ const setRef = (ref, element) => {
12
+ if (typeof ref !== 'function') {
13
+ if (ref)
14
+ ref.current = element;
15
+ return undefined;
16
+ }
17
+ const cleanup = ref(element);
18
+ return typeof cleanup === 'function' ? cleanup : undefined;
19
+ };
20
+
21
+ exports.setRef = setRef;
22
+ //# sourceMappingURL=ref.utils.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ref.utils.cjs","sources":["../../../../src/utilities/__internal__/refUtils/ref.utils.ts"],"sourcesContent":[null],"names":[],"mappings":";;AAMA;;;;;;;AAOG;MACU,MAAM,GAAG,CAAW,GAA8B,EAAE,OAAwB,KAA8B;AACrH,IAAA,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;AAC7B,QAAA,IAAI,GAAG;AAAE,YAAA,GAAG,CAAC,OAAO,GAAG,OAAO;AAC9B,QAAA,OAAO,SAAS;IAClB;AACA,IAAA,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;AAC5B,IAAA,OAAO,OAAO,OAAO,KAAK,UAAU,GAAG,OAAO,GAAG,SAAS;AAC5D;;"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Ref helpers shared by components that keep their own ref to an element and pass a consumer's ref on to it.
3
+ * INTERNAL: import as `#internal/utilities/refUtils/ref.utils`.
4
+ */
5
+ import type { Ref } from 'react';
6
+ /**
7
+ * Hands an element to a ref of either kind, as React itself would.
8
+ *
9
+ * @param ref The ref to fill: an object, a callback, or none.
10
+ * @param element The element being attached, or `null` when it is being detached.
11
+ * @returns The cleanup a callback ref returned, which React runs in place of calling that ref with `null`; `undefined`
12
+ * for a ref object, or a callback that returned nothing.
13
+ */
14
+ export declare const setRef: <TElement>(ref: Ref<TElement> | undefined, element: TElement | null) => (() => void) | undefined;
15
+ //# sourceMappingURL=ref.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ref.utils.d.ts","sourceRoot":"","sources":["../../../../src/utilities/__internal__/refUtils/ref.utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAEjC;;;;;;;GAOG;AACH,eAAO,MAAM,MAAM,GAAI,QAAQ,EAAE,KAAK,GAAG,CAAC,QAAQ,CAAC,GAAG,SAAS,EAAE,SAAS,QAAQ,GAAG,IAAI,KAAG,CAAC,MAAM,IAAI,CAAC,GAAG,SAO1G,CAAC"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Hands an element to a ref of either kind, as React itself would.
3
+ *
4
+ * @param ref The ref to fill: an object, a callback, or none.
5
+ * @param element The element being attached, or `null` when it is being detached.
6
+ * @returns The cleanup a callback ref returned, which React runs in place of calling that ref with `null`; `undefined`
7
+ * for a ref object, or a callback that returned nothing.
8
+ */
9
+ const setRef = (ref, element) => {
10
+ if (typeof ref !== 'function') {
11
+ if (ref)
12
+ ref.current = element;
13
+ return undefined;
14
+ }
15
+ const cleanup = ref(element);
16
+ return typeof cleanup === 'function' ? cleanup : undefined;
17
+ };
18
+
19
+ export { setRef };
20
+ //# sourceMappingURL=ref.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ref.utils.js","sources":["../../../../src/utilities/__internal__/refUtils/ref.utils.ts"],"sourcesContent":[null],"names":[],"mappings":"AAMA;;;;;;;AAOG;MACU,MAAM,GAAG,CAAW,GAA8B,EAAE,OAAwB,KAA8B;AACrH,IAAA,IAAI,OAAO,GAAG,KAAK,UAAU,EAAE;AAC7B,QAAA,IAAI,GAAG;AAAE,YAAA,GAAG,CAAC,OAAO,GAAG,OAAO;AAC9B,QAAA,OAAO,SAAS;IAClB;AACA,IAAA,MAAM,OAAO,GAAG,GAAG,CAAC,OAAO,CAAC;AAC5B,IAAA,OAAO,OAAO,OAAO,KAAK,UAAU,GAAG,OAAO,GAAG,SAAS;AAC5D;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flipdish/ui-library",
3
- "version": "0.49.0",
3
+ "version": "0.51.0",
4
4
  "description": "Flipdish Design System — atomic-design component library (Tailwind v4 + UntitledUI + React Aria).",
5
5
  "type": "module",
6
6
  "imports": {
@@ -230,7 +230,7 @@
230
230
  "@storybook/addon-a11y": "^10.5.8",
231
231
  "@storybook/addon-docs": "^10.5.8",
232
232
  "@storybook/addon-mcp": "^0.7.0",
233
- "@storybook/addon-vitest": "10.6.5",
233
+ "@storybook/addon-vitest": "10.6.6",
234
234
  "@storybook/react-vite": "^10.5.8",
235
235
  "@tailwindcss/vite": "^4.3.1",
236
236
  "@tanstack/react-query": "^5.104.3",