@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
@@ -1,45 +1,15 @@
1
1
  'use strict';
2
2
 
3
- var jsxRuntime = require('react/jsx-runtime');
4
- var cx = require('@flipdish/ui-library/utilities/cx');
5
- var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
6
- var reactAriaComponents = require('react-aria-components');
3
+ var Modals = require('@flipdish/ui-library/components/molecules/Modals');
7
4
 
8
- /** Opens the modal when its child button is pressed; a plain alias of react-aria-components' `DialogTrigger`. */
9
- const DialogTrigger = reactAriaComponents.DialogTrigger;
10
- /**
11
- * Backdrop and positioning layer for a `Modal` dialog that interrupts the page for input or
12
- * confirmation. Wrap `Modal` and `Dialog` in it; focus trapping, scroll lock and Escape are
13
- * handled.
14
- *
15
- * @summary overlay dialog for focused input or confirmation
16
- */
17
- const ModalOverlay = ({ 'data-testid': dataTestId, ...props }) => {
18
- const rootTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'modal', rootName: 'modal' });
19
- return (jsxRuntime.jsx(testIdUtils.TestIdProvider, { value: rootTestId, children: jsxRuntime.jsx(reactAriaComponents.ModalOverlay, { ...props, "data-testid": rootTestId, className: (state) => cx.cx('fixed inset-0 z-50 flex min-h-dvh w-full items-end justify-center bg-overlay/70 px-4 outline-hidden backdrop-blur-[6px] sm:items-center sm:justify-center sm:px-8',
20
- // Vertical padding
21
- 'pt-(--modal-pt) pb-(--modal-pb) [--modal-pb:clamp(16px,8vh,64px)] [--modal-pt:16px] sm:[--modal-pb:32px] sm:[--modal-pt:32px]',
22
- // Animations
23
- state.isEntering && 'duration-300 ease-out animate-in fade-in', state.isExiting && 'duration-200 ease-in animate-out fade-out', typeof props.className === 'function' ? props.className(state) : props.className) }) }));
24
- };
25
- /**
26
- * Accessible overlay dialog built on react-aria primitives. Compose with `ModalOverlay`,
27
- * `Dialog`, and optionally `DialogTrigger` to display focused content or actions in an overlay
28
- * that blocks the rest of the page.
29
- *
30
- * @summary accessible overlay dialog for focused content or actions
31
- */
32
- const Modal = (props) => (jsxRuntime.jsx(reactAriaComponents.Modal, { ...props, className: (state) => cx.cx('rounded-xl bg-primary align-middle shadow-xl outline-hidden max-sm:overflow-y-auto sm:rounded-2xl',
33
- // Max height based on parent's vertical padding
34
- 'max-h-[calc(var(--visual-viewport-height)-var(--modal-pt)-var(--modal-pb))]',
35
- // Animations
36
- state.isEntering && 'duration-300 ease-out animate-in zoom-in-95', state.isExiting && 'duration-200 ease-in animate-out zoom-out-95', typeof props.className === 'function' ? props.className(state) : props.className) }));
37
- /** Scrollable, focus-managed content container that sits inside `Modal` and holds the dialog's content. */
38
- const Dialog = ({ 'data-testid': dataTestId, ...props }) => {
39
- const prefix = testIdUtils.useTestIdPrefix();
40
- const dialogTestId = dataTestId ?? (prefix ? testIdUtils.joinTestId(prefix, 'dialog') : undefined);
41
- return (jsxRuntime.jsx(reactAriaComponents.Dialog, { ...props, "data-testid": dialogTestId, className: cx.cx('relative max-h-[inherit] w-full overflow-y-auto outline-hidden', props.className) }));
42
- };
5
+ /** @deprecated Import from `@flipdish/ui-library/components/molecules/Modals`. Removed in the next major. */
6
+ const DialogTrigger = Modals.DialogTrigger;
7
+ /** @deprecated Import from `@flipdish/ui-library/components/molecules/Modals`. Removed in the next major. */
8
+ const ModalOverlay = Modals.ModalOverlay;
9
+ /** @deprecated Import from `@flipdish/ui-library/components/molecules/Modals`. Removed in the next major. */
10
+ const Modal = Modals.Modal;
11
+ /** @deprecated Import from `@flipdish/ui-library/components/molecules/Modals`. Removed in the next major. */
12
+ const Dialog = Modals.Dialog;
43
13
 
44
14
  exports.Dialog = Dialog;
45
15
  exports.DialogTrigger = DialogTrigger;
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":["../../../../src/components/molecules/Modal/index.tsx"],"sourcesContent":[null],"names":["AriaDialogTrigger","useResolvedTestId","_jsx","TestIdProvider","AriaModalOverlay","cx","AriaModal","useTestIdPrefix","joinTestId","AriaDialog"],"mappings":";;;;;;;AAYA;AACO,MAAM,aAAa,GAAGA;AAU7B;;;;;;AAMG;AACI,MAAM,YAAY,GAAG,CAAC,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAqB,KAAI;AACzF,IAAA,MAAM,UAAU,GAAGC,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;IAEjG,QACEC,cAAA,CAACC,0BAAc,EAAA,EAAC,KAAK,EAAE,UAAU,EAAA,QAAA,EAC/BD,cAAA,CAACE,gCAAgB,EAAA,EAAA,GACX,KAAK,iBACI,UAAU,EACvB,SAAS,EAAE,CAAC,KAAK,KACfC,KAAE,CACA,mKAAmK;;YAEnK,+HAA+H;;AAE/H,YAAA,KAAK,CAAC,UAAU,IAAI,0CAA0C,EAC9D,KAAK,CAAC,SAAS,IAAI,2CAA2C,EAC9D,OAAO,KAAK,CAAC,SAAS,KAAK,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,SAAS,CACjF,EAAA,CAEH,EAAA,CACa;AAErB;AAEA;;;;;;AAMG;AACI,MAAM,KAAK,GAAG,CAAC,KAA4B,MAChDH,cAAA,CAACI,yBAAS,OACJ,KAAK,EACT,SAAS,EAAE,CAAC,KAAK,KACfD,KAAE,CACA,mGAAmG;;IAEnG,6EAA6E;;AAE7E,IAAA,KAAK,CAAC,UAAU,IAAI,6CAA6C,EACjE,KAAK,CAAC,SAAS,IAAI,8CAA8C,EACjE,OAAO,KAAK,CAAC,SAAS,KAAK,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,SAAS,CACjF,EAAA,CAEH;AAWJ;AACO,MAAM,MAAM,GAAG,CAAC,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAe,KAAI;AAC7E,IAAA,MAAM,MAAM,GAAGE,2BAAe,EAAE;IAChC,MAAM,YAAY,GAAG,UAAU,KAAK,MAAM,GAAGC,sBAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,SAAS,CAAC;IAEtF,QACEN,eAACO,0BAAU,EAAA,EAAA,GACL,KAAK,EAAA,aAAA,EACI,YAAY,EACzB,SAAS,EAAEJ,KAAE,CAAC,gEAAgE,EAAE,KAAK,CAAC,SAAS,CAAC,EAAA,CAChG;AAEN;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":["../../../../src/components/molecules/Modal/index.tsx"],"sourcesContent":[null],"names":["DialogTriggerNext","ModalOverlayNext","ModalNext","DialogNext"],"mappings":";;;;AAaA;AACO,MAAM,aAAa,GAAGA;AAC7B;AACO,MAAM,YAAY,GAAGC;AAC5B;AACO,MAAM,KAAK,GAAGC;AACrB;AACO,MAAM,MAAM,GAAGC;;;;;"}
@@ -1,37 +1,14 @@
1
- import type { DialogProps as AriaDialogProps, ModalOverlayProps as AriaModalOverlayProps } from 'react-aria-components';
2
- import { DialogTrigger as AriaDialogTrigger } from 'react-aria-components';
3
- /** Opens the modal when its child button is pressed; a plain alias of react-aria-components' `DialogTrigger`. */
4
- export declare const DialogTrigger: typeof AriaDialogTrigger;
5
- export interface ModalOverlayProps extends AriaModalOverlayProps {
6
- /**
7
- * Overrides the derived root `data-testid` (defaults to `fd-modal`). `Dialog`
8
- * derives its id from this prefix (`<root>--dialog`).
9
- */
10
- 'data-testid'?: string;
11
- }
12
- /**
13
- * Backdrop and positioning layer for a `Modal` dialog that interrupts the page for input or
14
- * confirmation. Wrap `Modal` and `Dialog` in it; focus trapping, scroll lock and Escape are
15
- * handled.
16
- *
17
- * @summary overlay dialog for focused input or confirmation
18
- */
19
- export declare const ModalOverlay: ({ "data-testid": dataTestId, ...props }: ModalOverlayProps) => import("react").JSX.Element;
20
- /**
21
- * Accessible overlay dialog built on react-aria primitives. Compose with `ModalOverlay`,
22
- * `Dialog`, and optionally `DialogTrigger` to display focused content or actions in an overlay
23
- * that blocks the rest of the page.
24
- *
25
- * @summary accessible overlay dialog for focused content or actions
26
- */
27
- export declare const Modal: (props: AriaModalOverlayProps) => import("react").JSX.Element;
28
- export interface DialogProps extends AriaDialogProps {
29
- /**
30
- * Overrides the derived `data-testid` for the dialog (defaults to `<root>--dialog`,
31
- * e.g. `fd-modal--dialog`, when nested under `ModalOverlay`).
32
- */
33
- 'data-testid'?: string;
34
- }
35
- /** Scrollable, focus-managed content container that sits inside `Modal` and holds the dialog's content. */
36
- export declare const Dialog: ({ "data-testid": dataTestId, ...props }: DialogProps) => import("react").JSX.Element;
1
+ import { type DialogProps as DialogPropsNext, type ModalOverlayProps as ModalOverlayPropsNext } from '@flipdish/ui-library/components/molecules/Modals';
2
+ /** @deprecated Import from `@flipdish/ui-library/components/molecules/Modals`. Removed in the next major. */
3
+ export declare const DialogTrigger: typeof import("react-aria-components").DialogTrigger;
4
+ /** @deprecated Import from `@flipdish/ui-library/components/molecules/Modals`. Removed in the next major. */
5
+ export declare const ModalOverlay: ({ "data-testid": dataTestId, ...props }: ModalOverlayPropsNext) => import("react").JSX.Element;
6
+ /** @deprecated Import from `@flipdish/ui-library/components/molecules/Modals`. Removed in the next major. */
7
+ export declare const Modal: (props: import("react-aria-components").ModalOverlayProps) => import("react").JSX.Element;
8
+ /** @deprecated Import from `@flipdish/ui-library/components/molecules/Modals`. Removed in the next major. */
9
+ export declare const Dialog: ({ "data-testid": dataTestId, ...props }: DialogPropsNext) => import("react").JSX.Element;
10
+ /** @deprecated Import from `@flipdish/ui-library/components/molecules/Modals`. Removed in the next major. */
11
+ export type ModalOverlayProps = ModalOverlayPropsNext;
12
+ /** @deprecated Import from `@flipdish/ui-library/components/molecules/Modals`. Removed in the next major. */
13
+ export type DialogProps = DialogPropsNext;
37
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Modal/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACxH,OAAO,EAEL,aAAa,IAAI,iBAAiB,EAGnC,MAAM,uBAAuB,CAAC;AAE/B,iHAAiH;AACjH,eAAO,MAAM,aAAa,0BAAoB,CAAC;AAE/C,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GAAI,yCAAyC,iBAAiB,gCAsBtF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,GAAI,OAAO,qBAAqB,gCAejD,CAAC;AAEF,MAAM,WAAW,WAAY,SAAQ,eAAe;IAClD;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,2GAA2G;AAC3G,eAAO,MAAM,MAAM,GAAI,yCAAyC,WAAW,gCAW1E,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Modal/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAEL,KAAK,WAAW,IAAI,eAAe,EAInC,KAAK,iBAAiB,IAAI,qBAAqB,EAChD,MAAM,kDAAkD,CAAC;AAE1D,6GAA6G;AAC7G,eAAO,MAAM,aAAa,sDAAoB,CAAC;AAC/C,6GAA6G;AAC7G,eAAO,MAAM,YAAY,iGAAmB,CAAC;AAC7C,6GAA6G;AAC7G,eAAO,MAAM,KAAK,2FAAY,CAAC;AAC/B,6GAA6G;AAC7G,eAAO,MAAM,MAAM,2FAAa,CAAC;AACjC,6GAA6G;AAC7G,MAAM,MAAM,iBAAiB,GAAG,qBAAqB,CAAC;AACtD,6GAA6G;AAC7G,MAAM,MAAM,WAAW,GAAG,eAAe,CAAC"}
@@ -1,43 +1,13 @@
1
- import { jsx } from 'react/jsx-runtime';
2
- import { cx } from '@flipdish/ui-library/utilities/cx';
3
- import { useTestIdPrefix, joinTestId, useResolvedTestId, TestIdProvider } from '@flipdish/ui-library/utilities/testIdUtils';
4
- import { DialogTrigger as DialogTrigger$1, Dialog as Dialog$1, Modal as Modal$1, ModalOverlay as ModalOverlay$1 } from 'react-aria-components';
1
+ import { Dialog as Dialog$1, DialogTrigger as DialogTrigger$1, Modal as Modal$1, ModalOverlay as ModalOverlay$1 } from '@flipdish/ui-library/components/molecules/Modals';
5
2
 
6
- /** Opens the modal when its child button is pressed; a plain alias of react-aria-components' `DialogTrigger`. */
3
+ /** @deprecated Import from `@flipdish/ui-library/components/molecules/Modals`. Removed in the next major. */
7
4
  const DialogTrigger = DialogTrigger$1;
8
- /**
9
- * Backdrop and positioning layer for a `Modal` dialog that interrupts the page for input or
10
- * confirmation. Wrap `Modal` and `Dialog` in it; focus trapping, scroll lock and Escape are
11
- * handled.
12
- *
13
- * @summary overlay dialog for focused input or confirmation
14
- */
15
- const ModalOverlay = ({ 'data-testid': dataTestId, ...props }) => {
16
- const rootTestId = useResolvedTestId({ testId: dataTestId, segment: 'modal', rootName: 'modal' });
17
- return (jsx(TestIdProvider, { value: rootTestId, children: jsx(ModalOverlay$1, { ...props, "data-testid": rootTestId, className: (state) => cx('fixed inset-0 z-50 flex min-h-dvh w-full items-end justify-center bg-overlay/70 px-4 outline-hidden backdrop-blur-[6px] sm:items-center sm:justify-center sm:px-8',
18
- // Vertical padding
19
- 'pt-(--modal-pt) pb-(--modal-pb) [--modal-pb:clamp(16px,8vh,64px)] [--modal-pt:16px] sm:[--modal-pb:32px] sm:[--modal-pt:32px]',
20
- // Animations
21
- state.isEntering && 'duration-300 ease-out animate-in fade-in', state.isExiting && 'duration-200 ease-in animate-out fade-out', typeof props.className === 'function' ? props.className(state) : props.className) }) }));
22
- };
23
- /**
24
- * Accessible overlay dialog built on react-aria primitives. Compose with `ModalOverlay`,
25
- * `Dialog`, and optionally `DialogTrigger` to display focused content or actions in an overlay
26
- * that blocks the rest of the page.
27
- *
28
- * @summary accessible overlay dialog for focused content or actions
29
- */
30
- const Modal = (props) => (jsx(Modal$1, { ...props, className: (state) => cx('rounded-xl bg-primary align-middle shadow-xl outline-hidden max-sm:overflow-y-auto sm:rounded-2xl',
31
- // Max height based on parent's vertical padding
32
- 'max-h-[calc(var(--visual-viewport-height)-var(--modal-pt)-var(--modal-pb))]',
33
- // Animations
34
- state.isEntering && 'duration-300 ease-out animate-in zoom-in-95', state.isExiting && 'duration-200 ease-in animate-out zoom-out-95', typeof props.className === 'function' ? props.className(state) : props.className) }));
35
- /** Scrollable, focus-managed content container that sits inside `Modal` and holds the dialog's content. */
36
- const Dialog = ({ 'data-testid': dataTestId, ...props }) => {
37
- const prefix = useTestIdPrefix();
38
- const dialogTestId = dataTestId ?? (prefix ? joinTestId(prefix, 'dialog') : undefined);
39
- return (jsx(Dialog$1, { ...props, "data-testid": dialogTestId, className: cx('relative max-h-[inherit] w-full overflow-y-auto outline-hidden', props.className) }));
40
- };
5
+ /** @deprecated Import from `@flipdish/ui-library/components/molecules/Modals`. Removed in the next major. */
6
+ const ModalOverlay = ModalOverlay$1;
7
+ /** @deprecated Import from `@flipdish/ui-library/components/molecules/Modals`. Removed in the next major. */
8
+ const Modal = Modal$1;
9
+ /** @deprecated Import from `@flipdish/ui-library/components/molecules/Modals`. Removed in the next major. */
10
+ const Dialog = Dialog$1;
41
11
 
42
12
  export { Dialog, DialogTrigger, Modal, ModalOverlay };
43
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/molecules/Modal/index.tsx"],"sourcesContent":[null],"names":["AriaDialogTrigger","_jsx","AriaModalOverlay","AriaModal","AriaDialog"],"mappings":";;;;;AAYA;AACO,MAAM,aAAa,GAAGA;AAU7B;;;;;;AAMG;AACI,MAAM,YAAY,GAAG,CAAC,EAAE,aA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QACEF,IAACG,QAAU,EAAA,EAAA,GACL,KAAK,EAAA,aAAA,EACI,YAAY,EACzB,SAAS,EAAE,EAAE,CAAC,gEAAgE,EAAE,KAAK,CAAC,SAAS,CAAC,EAAA,CAChG;AAEN;;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/molecules/Modal/index.tsx"],"sourcesContent":[null],"names":["DialogTriggerNext","ModalOverlayNext","ModalNext","DialogNext"],"mappings":";;AAaA;AACO,MAAM,aAAa,GAAGA;AAC7B;AACO,MAAM,YAAY,GAAGC;AAC5B;AACO,MAAM,KAAK,GAAGC;AACrB;AACO,MAAM,MAAM,GAAGC;;"}
@@ -0,0 +1,32 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var Button = require('@flipdish/ui-library/components/atoms/Button');
5
+ var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
6
+ var React = require('react');
7
+ var Modal = require('./Modal.cjs');
8
+
9
+ /**
10
+ * Asks the user to confirm one action before it runs, with a button that backs out and a button that goes ahead.
11
+ * Use it before an action that removes something or cannot be undone from the page.
12
+ *
13
+ * @summary confirm dialog asked before a destructive or final action
14
+ */
15
+ const ConfirmationModal = ({ isOpen, onOpenChange, title, description, confirmLabel, onConfirm, isDestructive = false, isConfirming = false, 'data-testid': dataTestId, }) => {
16
+ const rootTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'confirmation-modal', rootName: 'confirmation-modal' });
17
+ const titleId = React.useId();
18
+ const descriptionId = React.useId();
19
+ const cancel = () => onOpenChange(false);
20
+ // The buttons stay on screen while the dialog animates out, so a second press must not run the action again.
21
+ const confirm = () => {
22
+ if (isOpen)
23
+ onConfirm();
24
+ };
25
+ return (jsxRuntime.jsx(Modal.ModalOverlay, { isOpen: isOpen, onOpenChange: onOpenChange,
26
+ // Not dismissable by a press outside: the dialog asks a question, and a stray click must not answer it.
27
+ // Closing mid-action would hide whether it landed, so Escape waits until it settles too.
28
+ isKeyboardDismissDisabled: isConfirming, "data-testid": rootTestId, children: jsxRuntime.jsx(Modal.Modal, { className: "w-full sm:max-w-100", children: jsxRuntime.jsx(Modal.Dialog, { role: "alertdialog", "aria-labelledby": titleId, "aria-describedby": descriptionId, children: jsxRuntime.jsxs("div", { className: "p-6", children: [jsxRuntime.jsx("h2", { id: titleId, className: "text-lg font-semibold text-primary", children: title }), jsxRuntime.jsx("p", { id: descriptionId, className: "mt-2 text-sm text-secondary", children: description }), jsxRuntime.jsxs("div", { className: "mt-6 flex flex-col-reverse gap-3 sm:flex-row sm:justify-end", children: [jsxRuntime.jsx(Button.Button, { color: "secondary", size: "md", isDisabled: isConfirming, onPress: cancel, "data-testid": testIdUtils.joinTestId(rootTestId, 'cancel'), children: "Cancel" }), jsxRuntime.jsx(Button.Button, { color: isDestructive ? 'primary-destructive' : 'primary', size: "md", isLoading: isConfirming, showTextWhileLoading: true, onPress: confirm, "data-testid": testIdUtils.joinTestId(rootTestId, 'confirm'), children: confirmLabel })] })] }) }) }) }));
29
+ };
30
+
31
+ exports.ConfirmationModal = ConfirmationModal;
32
+ //# sourceMappingURL=ConfirmationModal.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfirmationModal.cjs","sources":["../../../../../src/components/molecules/Modals/components/ConfirmationModal.tsx"],"sourcesContent":[null],"names":["useResolvedTestId","useId","_jsx","ModalOverlay","Modal","Dialog","_jsxs","Button","joinTestId"],"mappings":";;;;;;;;AA4BA;;;;;AAKG;AACI,MAAM,iBAAiB,GAAG,CAAC,EAChC,MAAM,EACN,YAAY,EACZ,KAAK,EACL,WAAW,EACX,YAAY,EACZ,SAAS,EACT,aAAa,GAAG,KAAK,EACrB,YAAY,GAAG,KAAK,EACpB,aAAa,EAAE,UAAU,GACF,KAAI;AAC3B,IAAA,MAAM,UAAU,GAAGA,6BAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,oBAAoB,EAAE,CAAC;A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BAAqB,GAAG,SAAS,EACxD,IAAI,EAAC,IAAI,EACT,SAAS,EAAE,YAAY,EACvB,oBAAoB,EAAA,IAAA,EACpB,OAAO,EAAE,OAAO,EAAA,aAAA,EACHC,sBAAU,CAAC,UAAU,EAAE,SAAS,CAAC,EAAA,QAAA,EAE7C,YAAY,EAAA,CACN,CAAA,EAAA,CACL,CAAA,EAAA,CACF,EAAA,CACC,EAAA,CACH,EAAA,CACK;AAEnB;;"}
@@ -0,0 +1,28 @@
1
+ export interface ConfirmationModalProps {
2
+ /** Shows the dialog. */
3
+ isOpen: boolean;
4
+ /** Called with `false` when Cancel or Escape asks the dialog to close; set `isOpen` from it. A press outside does nothing. */
5
+ onOpenChange: (isOpen: boolean) => void;
6
+ /** The question being asked, such as "Remove this property?"; it names the dialog. */
7
+ title: string;
8
+ /** What confirming will do, beneath the title; it describes the dialog. */
9
+ description: string;
10
+ /** Text of the confirming button, naming the action, such as "Remove property". */
11
+ confirmLabel: string;
12
+ /** Runs the action. The dialog stays open until `isOpen` turns `false`, so close it here or once the action lands. */
13
+ onConfirm: () => void;
14
+ /** Colours the confirming button as destructive, for an action that removes something or cannot be undone. */
15
+ isDestructive?: boolean;
16
+ /** Shows the confirming button's loading state and stops the dialog being dismissed while the action is in flight. */
17
+ isConfirming?: boolean;
18
+ /** Overrides the root `data-testid` (defaults to `fd-confirmation-modal`); the dialog and buttons derive theirs from it. */
19
+ 'data-testid'?: string;
20
+ }
21
+ /**
22
+ * Asks the user to confirm one action before it runs, with a button that backs out and a button that goes ahead.
23
+ * Use it before an action that removes something or cannot be undone from the page.
24
+ *
25
+ * @summary confirm dialog asked before a destructive or final action
26
+ */
27
+ export declare const ConfirmationModal: ({ isOpen, onOpenChange, title, description, confirmLabel, onConfirm, isDestructive, isConfirming, "data-testid": dataTestId, }: ConfirmationModalProps) => import("react").JSX.Element;
28
+ //# sourceMappingURL=ConfirmationModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfirmationModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Modals/components/ConfirmationModal.tsx"],"names":[],"mappings":"AAOA,MAAM,WAAW,sBAAsB;IACrC,wBAAwB;IACxB,MAAM,EAAE,OAAO,CAAC;IAChB,8HAA8H;IAC9H,YAAY,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;IACxC,sFAAsF;IACtF,KAAK,EAAE,MAAM,CAAC;IACd,2EAA2E;IAC3E,WAAW,EAAE,MAAM,CAAC;IACpB,mFAAmF;IACnF,YAAY,EAAE,MAAM,CAAC;IACrB,sHAAsH;IACtH,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,8GAA8G;IAC9G,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,sHAAsH;IACtH,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,4HAA4H;IAC5H,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,iBAAiB,GAAI,gIAU/B,sBAAsB,gCAgDxB,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { Button } from '@flipdish/ui-library/components/atoms/Button';
3
+ import { useResolvedTestId, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
4
+ import { useId } from 'react';
5
+ import { ModalOverlay, Modal, Dialog } from './Modal.js';
6
+
7
+ /**
8
+ * Asks the user to confirm one action before it runs, with a button that backs out and a button that goes ahead.
9
+ * Use it before an action that removes something or cannot be undone from the page.
10
+ *
11
+ * @summary confirm dialog asked before a destructive or final action
12
+ */
13
+ const ConfirmationModal = ({ isOpen, onOpenChange, title, description, confirmLabel, onConfirm, isDestructive = false, isConfirming = false, 'data-testid': dataTestId, }) => {
14
+ const rootTestId = useResolvedTestId({ testId: dataTestId, segment: 'confirmation-modal', rootName: 'confirmation-modal' });
15
+ const titleId = useId();
16
+ const descriptionId = useId();
17
+ const cancel = () => onOpenChange(false);
18
+ // The buttons stay on screen while the dialog animates out, so a second press must not run the action again.
19
+ const confirm = () => {
20
+ if (isOpen)
21
+ onConfirm();
22
+ };
23
+ return (jsx(ModalOverlay, { isOpen: isOpen, onOpenChange: onOpenChange,
24
+ // Not dismissable by a press outside: the dialog asks a question, and a stray click must not answer it.
25
+ // Closing mid-action would hide whether it landed, so Escape waits until it settles too.
26
+ isKeyboardDismissDisabled: isConfirming, "data-testid": rootTestId, children: jsx(Modal, { className: "w-full sm:max-w-100", children: jsx(Dialog, { role: "alertdialog", "aria-labelledby": titleId, "aria-describedby": descriptionId, children: jsxs("div", { className: "p-6", children: [jsx("h2", { id: titleId, className: "text-lg font-semibold text-primary", children: title }), jsx("p", { id: descriptionId, className: "mt-2 text-sm text-secondary", children: description }), jsxs("div", { className: "mt-6 flex flex-col-reverse gap-3 sm:flex-row sm:justify-end", children: [jsx(Button, { color: "secondary", size: "md", isDisabled: isConfirming, onPress: cancel, "data-testid": joinTestId(rootTestId, 'cancel'), children: "Cancel" }), jsx(Button, { color: isDestructive ? 'primary-destructive' : 'primary', size: "md", isLoading: isConfirming, showTextWhileLoading: true, onPress: confirm, "data-testid": joinTestId(rootTestId, 'confirm'), children: confirmLabel })] })] }) }) }) }));
27
+ };
28
+
29
+ export { ConfirmationModal };
30
+ //# sourceMappingURL=ConfirmationModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfirmationModal.js","sources":["../../../../../src/components/molecules/Modals/components/ConfirmationModal.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":";;;;;;AA4BA;;;;;AAKG;AACI,MAAM,iBAAiB,GAAG,CAAC,EAChC,MAAM,EACN,YAAY,EACZ,KAAK,EACL,WAAW,EACX,YAAY,EACZ,SAAS,EACT,aAAa,GAAG,KAAK,EACrB,YAAY,GAAG,KAAK,EACpB,aAAa,EAAE,UAAU,GACF,KAAI;AAC3B,IAAA,MAAM,UAAU,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EA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,MAAM,EAAA,EACL,KAAK,EAAE,aAAa,GAAG,qBAAqB,GAAG,SAAS,EACxD,IAAI,EAAC,IAAI,EACT,SAAS,EAAE,YAAY,EACvB,oBAAoB,EAAA,IAAA,EACpB,OAAO,EAAE,OAAO,EAAA,aAAA,EACH,UAAU,CAAC,UAAU,EAAE,SAAS,CAAC,EAAA,QAAA,EAE7C,YAAY,EAAA,CACN,CAAA,EAAA,CACL,CAAA,EAAA,CACF,EAAA,CACC,EAAA,CACH,EAAA,CACK;AAEnB;;"}
@@ -0,0 +1,48 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var cx = require('@flipdish/ui-library/utilities/cx');
5
+ var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
6
+ var reactAriaComponents = require('react-aria-components');
7
+
8
+ /** Opens the modal when its child button is pressed; a plain alias of react-aria-components' `DialogTrigger`. */
9
+ const DialogTrigger = reactAriaComponents.DialogTrigger;
10
+ /**
11
+ * Backdrop and positioning layer for a `Modal` dialog that interrupts the page for input or
12
+ * confirmation. Wrap `Modal` and `Dialog` in it; focus trapping, scroll lock and Escape are
13
+ * handled.
14
+ *
15
+ * @summary overlay dialog for focused input or confirmation
16
+ */
17
+ const ModalOverlay = ({ 'data-testid': dataTestId, ...props }) => {
18
+ const rootTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'modal', rootName: 'modal' });
19
+ return (jsxRuntime.jsx(testIdUtils.TestIdProvider, { value: rootTestId, children: jsxRuntime.jsx(reactAriaComponents.ModalOverlay, { ...props, "data-testid": rootTestId, className: (state) => cx.cx('fixed inset-0 z-50 flex min-h-dvh w-full items-end justify-center bg-overlay/70 px-4 outline-hidden backdrop-blur-[6px] sm:items-center sm:justify-center sm:px-8',
20
+ // Vertical padding
21
+ 'pt-(--modal-pt) pb-(--modal-pb) [--modal-pb:clamp(16px,8vh,64px)] [--modal-pt:16px] sm:[--modal-pb:32px] sm:[--modal-pt:32px]',
22
+ // Animations
23
+ state.isEntering && 'duration-300 ease-out animate-in fade-in', state.isExiting && 'duration-200 ease-in animate-out fade-out', typeof props.className === 'function' ? props.className(state) : props.className) }) }));
24
+ };
25
+ /**
26
+ * Accessible overlay dialog built on react-aria primitives. Compose with `ModalOverlay`,
27
+ * `Dialog`, and optionally `DialogTrigger` to display focused content or actions in an overlay
28
+ * that blocks the rest of the page.
29
+ *
30
+ * @summary accessible overlay dialog for focused content or actions
31
+ */
32
+ const Modal = (props) => (jsxRuntime.jsx(reactAriaComponents.Modal, { ...props, className: (state) => cx.cx('rounded-xl bg-primary align-middle shadow-xl outline-hidden max-sm:overflow-y-auto sm:rounded-2xl',
33
+ // Max height based on parent's vertical padding
34
+ 'max-h-[calc(var(--visual-viewport-height)-var(--modal-pt)-var(--modal-pb))]',
35
+ // Animations
36
+ state.isEntering && 'duration-300 ease-out animate-in zoom-in-95', state.isExiting && 'duration-200 ease-in animate-out zoom-out-95', typeof props.className === 'function' ? props.className(state) : props.className) }));
37
+ /** Scrollable, focus-managed content container that sits inside `Modal` and holds the dialog's content. */
38
+ const Dialog = ({ 'data-testid': dataTestId, ...props }) => {
39
+ const prefix = testIdUtils.useTestIdPrefix();
40
+ const dialogTestId = dataTestId ?? (prefix ? testIdUtils.joinTestId(prefix, 'dialog') : undefined);
41
+ return (jsxRuntime.jsx(reactAriaComponents.Dialog, { ...props, "data-testid": dialogTestId, className: cx.cx('relative max-h-[inherit] w-full overflow-y-auto outline-hidden', props.className) }));
42
+ };
43
+
44
+ exports.Dialog = Dialog;
45
+ exports.DialogTrigger = DialogTrigger;
46
+ exports.Modal = Modal;
47
+ exports.ModalOverlay = ModalOverlay;
48
+ //# sourceMappingURL=Modal.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Modal.cjs","sources":["../../../../../src/components/molecules/Modals/components/Modal.tsx"],"sourcesContent":[null],"names":["AriaDialogTrigger","useResolvedTestId","_jsx","TestIdProvider","AriaModalOverlay","cx","AriaModal","useTestIdPrefix","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GE,2BAAe,EAAE;IAChC,MAAM,YAAY,GAAG,UAAU,KAAK,MAAM,GAAGC,sBAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,SAAS,CAAC;IAEtF,QACEN,eAACO,0BAAU,EAAA,EAAA,GACL,KAAK,EAAA,aAAA,EACI,YAAY,EACzB,SAAS,EAAEJ,KAAE,CAAC,gEAAgE,EAAE,KAAK,CAAC,SAAS,CAAC,EAAA,CAChG;AAEN;;;;;"}
@@ -0,0 +1,37 @@
1
+ import type { DialogProps as AriaDialogProps, ModalOverlayProps as AriaModalOverlayProps } from 'react-aria-components';
2
+ import { DialogTrigger as AriaDialogTrigger } from 'react-aria-components';
3
+ /** Opens the modal when its child button is pressed; a plain alias of react-aria-components' `DialogTrigger`. */
4
+ export declare const DialogTrigger: typeof AriaDialogTrigger;
5
+ export interface ModalOverlayProps extends AriaModalOverlayProps {
6
+ /**
7
+ * Overrides the derived root `data-testid` (defaults to `fd-modal`). `Dialog`
8
+ * derives its id from this prefix (`<root>--dialog`).
9
+ */
10
+ 'data-testid'?: string;
11
+ }
12
+ /**
13
+ * Backdrop and positioning layer for a `Modal` dialog that interrupts the page for input or
14
+ * confirmation. Wrap `Modal` and `Dialog` in it; focus trapping, scroll lock and Escape are
15
+ * handled.
16
+ *
17
+ * @summary overlay dialog for focused input or confirmation
18
+ */
19
+ export declare const ModalOverlay: ({ "data-testid": dataTestId, ...props }: ModalOverlayProps) => import("react").JSX.Element;
20
+ /**
21
+ * Accessible overlay dialog built on react-aria primitives. Compose with `ModalOverlay`,
22
+ * `Dialog`, and optionally `DialogTrigger` to display focused content or actions in an overlay
23
+ * that blocks the rest of the page.
24
+ *
25
+ * @summary accessible overlay dialog for focused content or actions
26
+ */
27
+ export declare const Modal: (props: AriaModalOverlayProps) => import("react").JSX.Element;
28
+ export interface DialogProps extends AriaDialogProps {
29
+ /**
30
+ * Overrides the derived `data-testid` for the dialog (defaults to `<root>--dialog`,
31
+ * e.g. `fd-modal--dialog`, when nested under `ModalOverlay`).
32
+ */
33
+ 'data-testid'?: string;
34
+ }
35
+ /** Scrollable, focus-managed content container that sits inside `Modal` and holds the dialog's content. */
36
+ export declare const Dialog: ({ "data-testid": dataTestId, ...props }: DialogProps) => import("react").JSX.Element;
37
+ //# sourceMappingURL=Modal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Modals/components/Modal.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,IAAI,eAAe,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AACxH,OAAO,EAEL,aAAa,IAAI,iBAAiB,EAGnC,MAAM,uBAAuB,CAAC;AAE/B,iHAAiH;AACjH,eAAO,MAAM,aAAa,0BAAoB,CAAC;AAE/C,MAAM,WAAW,iBAAkB,SAAQ,qBAAqB;IAC9D;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GAAI,yCAAyC,iBAAiB,gCAsBtF,CAAC;AAEF;;;;;;GAMG;AACH,eAAO,MAAM,KAAK,GAAI,OAAO,qBAAqB,gCAejD,CAAC;AAEF,MAAM,WAAW,WAAY,SAAQ,eAAe;IAClD;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,2GAA2G;AAC3G,eAAO,MAAM,MAAM,GAAI,yCAAyC,WAAW,gCAW1E,CAAC"}
@@ -0,0 +1,43 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { cx } from '@flipdish/ui-library/utilities/cx';
3
+ import { useTestIdPrefix, joinTestId, useResolvedTestId, TestIdProvider } from '@flipdish/ui-library/utilities/testIdUtils';
4
+ import { DialogTrigger as DialogTrigger$1, Dialog as Dialog$1, Modal as Modal$1, ModalOverlay as ModalOverlay$1 } from 'react-aria-components';
5
+
6
+ /** Opens the modal when its child button is pressed; a plain alias of react-aria-components' `DialogTrigger`. */
7
+ const DialogTrigger = DialogTrigger$1;
8
+ /**
9
+ * Backdrop and positioning layer for a `Modal` dialog that interrupts the page for input or
10
+ * confirmation. Wrap `Modal` and `Dialog` in it; focus trapping, scroll lock and Escape are
11
+ * handled.
12
+ *
13
+ * @summary overlay dialog for focused input or confirmation
14
+ */
15
+ const ModalOverlay = ({ 'data-testid': dataTestId, ...props }) => {
16
+ const rootTestId = useResolvedTestId({ testId: dataTestId, segment: 'modal', rootName: 'modal' });
17
+ return (jsx(TestIdProvider, { value: rootTestId, children: jsx(ModalOverlay$1, { ...props, "data-testid": rootTestId, className: (state) => cx('fixed inset-0 z-50 flex min-h-dvh w-full items-end justify-center bg-overlay/70 px-4 outline-hidden backdrop-blur-[6px] sm:items-center sm:justify-center sm:px-8',
18
+ // Vertical padding
19
+ 'pt-(--modal-pt) pb-(--modal-pb) [--modal-pb:clamp(16px,8vh,64px)] [--modal-pt:16px] sm:[--modal-pb:32px] sm:[--modal-pt:32px]',
20
+ // Animations
21
+ state.isEntering && 'duration-300 ease-out animate-in fade-in', state.isExiting && 'duration-200 ease-in animate-out fade-out', typeof props.className === 'function' ? props.className(state) : props.className) }) }));
22
+ };
23
+ /**
24
+ * Accessible overlay dialog built on react-aria primitives. Compose with `ModalOverlay`,
25
+ * `Dialog`, and optionally `DialogTrigger` to display focused content or actions in an overlay
26
+ * that blocks the rest of the page.
27
+ *
28
+ * @summary accessible overlay dialog for focused content or actions
29
+ */
30
+ const Modal = (props) => (jsx(Modal$1, { ...props, className: (state) => cx('rounded-xl bg-primary align-middle shadow-xl outline-hidden max-sm:overflow-y-auto sm:rounded-2xl',
31
+ // Max height based on parent's vertical padding
32
+ 'max-h-[calc(var(--visual-viewport-height)-var(--modal-pt)-var(--modal-pb))]',
33
+ // Animations
34
+ state.isEntering && 'duration-300 ease-out animate-in zoom-in-95', state.isExiting && 'duration-200 ease-in animate-out zoom-out-95', typeof props.className === 'function' ? props.className(state) : props.className) }));
35
+ /** Scrollable, focus-managed content container that sits inside `Modal` and holds the dialog's content. */
36
+ const Dialog = ({ 'data-testid': dataTestId, ...props }) => {
37
+ const prefix = useTestIdPrefix();
38
+ const dialogTestId = dataTestId ?? (prefix ? joinTestId(prefix, 'dialog') : undefined);
39
+ return (jsx(Dialog$1, { ...props, "data-testid": dialogTestId, className: cx('relative max-h-[inherit] w-full overflow-y-auto outline-hidden', props.className) }));
40
+ };
41
+
42
+ export { Dialog, DialogTrigger, Modal, ModalOverlay };
43
+ //# sourceMappingURL=Modal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Modal.js","sources":["../../../../../src/components/molecules/Modals/components/Modal.tsx"],"sourcesContent":[null],"names":["AriaDialogTrigger","_jsx","AriaModalOverlay","AriaModal","AriaDialog"],"mappings":";;;;;AAYA;AACO,MAAM,aAAa,GAAGA;AAU7B;;;;;;AAMG;AACI,MAAM,YAAY,GAAG,CAAC,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAqB,KAAI;AACzF,IAAA,MAAM,UAAU,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;IAEjG,QACEC,GAAA,CAAC,cAAc,EAAA,EAAC,KAAK,EAAE,UAAU,EAAA,QAAA,EAC/BA,GAAA,CAACC,cAAgB,EAAA,EAAA,GACX,KAAK,iBACI,UAAU,EACvB,SAAS,EAAE,CAAC,KAAK,KACf,EAAE,CACA,mKAAmK;;YAEnK,+HAA+H;;AAE/H,YAAA,KAAK,CAAC,UAAU,IAAI,0CAA0C,EAC9D,KAAK,CAAC,SAAS,IAAI,2CAA2C,EAC9D,OAAO,KAAK,CAAC,SAAS,KAAK,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,SAAS,CACjF,EAAA,CAEH,EAAA,CACa;AAErB;AAEA;;;;;;AAMG;AACI,MAAM,KAAK,GAAG,CAAC,KAA4B,MAChDD,GAAA,CAACE,OAAS,OACJ,KAAK,EACT,SAAS,EAAE,CAAC,KAAK,KACf,EAAE,CACA,mGAAmG;;IAEnG,6EAA6E;;AAE7E,IAAA,KAAK,CAAC,UAAU,IAAI,6CAA6C,EACjE,KAAK,CAAC,SAAS,IAAI,8CAA8C,EACjE,OAAO,KAAK,CAAC,SAAS,KAAK,UAAU,GAAG,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,KAAK,CAAC,SAAS,CACjF,EAAA,CAEH;AAWJ;AACO,MAAM,MAAM,GAAG,CAAC,EAAE,aAAa,EAAE,UAAU,EAAE,GAAG,KAAK,EAAe,KAAI;AAC7E,IAAA,MAAM,MAAM,GAAG,eAAe,EAAE;IAChC,MAAM,YAAY,GAAG,UAAU,KAAK,MAAM,GAAG,UAAU,CAAC,MAAM,EAAE,QAAQ,CAAC,GAAG,SAAS,CAAC;IAEtF,QACEF,IAACG,QAAU,EAAA,EAAA,GACL,KAAK,EAAA,aAAA,EACI,YAAY,EACzB,SAAS,EAAE,EAAE,CAAC,gEAAgE,EAAE,KAAK,CAAC,SAAS,CAAC,EAAA,CAChG;AAEN;;"}
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+
3
+ var jsxRuntime = require('react/jsx-runtime');
4
+ var Button = require('@flipdish/ui-library/components/atoms/Button');
5
+ var useUnsavedChangesGuard = require('@flipdish/ui-library/hooks/useUnsavedChangesGuard');
6
+ var testIdUtils = require('@flipdish/ui-library/utilities/testIdUtils');
7
+ var React = require('react');
8
+ var Modal = require('./Modal.cjs');
9
+
10
+ /**
11
+ * Asks before unsaved changes are lost: a confirm dialog on navigation and the back button, and the browser's own
12
+ * prompt on refresh or tab close. Render one beside any form that waits on a Save button, and pass its dirty flag.
13
+ *
14
+ * @summary confirm dialog that stops navigation losing unsaved changes
15
+ */
16
+ const UnsavedChangesModal = ({ hasUnsavedChanges, 'data-testid': dataTestId }) => {
17
+ const { isPromptOpen, stay, discard } = useUnsavedChangesGuard.useUnsavedChangesGuard({ hasUnsavedChanges });
18
+ const rootTestId = testIdUtils.useResolvedTestId({ testId: dataTestId, segment: 'unsaved-changes-modal', rootName: 'unsaved-changes-modal' });
19
+ const titleId = React.useId();
20
+ const descriptionId = React.useId();
21
+ // Escape closes the dialog, which must cancel the navigation and never let it through.
22
+ const stayOnClose = (isOpen) => {
23
+ if (!isOpen)
24
+ stay();
25
+ };
26
+ return (jsxRuntime.jsx(Modal.ModalOverlay, { isOpen: isPromptOpen, onOpenChange: stayOnClose, "data-testid": rootTestId, children: jsxRuntime.jsx(Modal.Modal, { className: "w-full sm:max-w-100", children: jsxRuntime.jsx(Modal.Dialog, { role: "alertdialog", "aria-labelledby": titleId, "aria-describedby": descriptionId, children: jsxRuntime.jsxs("div", { className: "p-6", children: [jsxRuntime.jsx("h2", { id: titleId, className: "text-lg font-semibold text-primary", children: "Unsaved changes" }), jsxRuntime.jsx("p", { id: descriptionId, className: "mt-2 text-sm text-secondary", children: "You have changes that have not been saved. If you leave now, they will be lost." }), jsxRuntime.jsxs("div", { className: "mt-6 flex flex-col-reverse gap-3 sm:flex-row sm:justify-end", children: [jsxRuntime.jsx(Button.Button, { color: "secondary", onPress: stay, "data-testid": testIdUtils.joinTestId(rootTestId, 'stay'), children: "Stay" }), jsxRuntime.jsx(Button.Button, { color: "primary-destructive", onPress: discard, "data-testid": testIdUtils.joinTestId(rootTestId, 'discard'), children: "Discard changes" })] })] }) }) }) }));
27
+ };
28
+
29
+ exports.UnsavedChangesModal = UnsavedChangesModal;
30
+ //# sourceMappingURL=UnsavedChangesModal.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnsavedChangesModal.cjs","sources":["../../../../../src/components/molecules/Modals/components/UnsavedChangesModal.tsx"],"sourcesContent":[null],"names":["useUnsavedChangesGuard","useResolvedTestId","useId","_jsx","ModalOverlay","Modal","Dialog","_jsxs","Button","joinTestId"],"mappings":";;;;;;;;;AAeA;;;;;AAKG;AACI,MAA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AU,CAAC,UAAU,EAAE,MAAM,CAAC,qBAE3E,EACTN,cAAA,CAACK,aAAM,EAAA,EAAC,KAAK,EAAC,qBAAqB,EAAC,OAAO,EAAE,OAAO,EAAA,aAAA,EAAeC,sBAAU,CAAC,UAAU,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,iBAAA,EAAA,CAE3F,CAAA,EAAA,CACL,IACF,EAAA,CACC,EAAA,CACH,EAAA,CACK;AAEnB;;"}
@@ -0,0 +1,14 @@
1
+ export interface UnsavedChangesModalProps {
2
+ /** Whether there are unsaved changes to protect, such as a form's dirty flag. */
3
+ hasUnsavedChanges: boolean;
4
+ /** Overrides the root `data-testid` (defaults to `fd-unsaved-changes-modal`); the buttons derive theirs from it. */
5
+ 'data-testid'?: string;
6
+ }
7
+ /**
8
+ * Asks before unsaved changes are lost: a confirm dialog on navigation and the back button, and the browser's own
9
+ * prompt on refresh or tab close. Render one beside any form that waits on a Save button, and pass its dirty flag.
10
+ *
11
+ * @summary confirm dialog that stops navigation losing unsaved changes
12
+ */
13
+ export declare const UnsavedChangesModal: ({ hasUnsavedChanges, "data-testid": dataTestId }: UnsavedChangesModalProps) => import("react").JSX.Element;
14
+ //# sourceMappingURL=UnsavedChangesModal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnsavedChangesModal.d.ts","sourceRoot":"","sources":["../../../../../src/components/molecules/Modals/components/UnsavedChangesModal.tsx"],"names":[],"mappings":"AAQA,MAAM,WAAW,wBAAwB;IACvC,iFAAiF;IACjF,iBAAiB,EAAE,OAAO,CAAC;IAC3B,oHAAoH;IACpH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,GAAI,kDAAkD,wBAAwB,gCAkC7G,CAAC"}
@@ -0,0 +1,28 @@
1
+ import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { Button } from '@flipdish/ui-library/components/atoms/Button';
3
+ import { useUnsavedChangesGuard } from '@flipdish/ui-library/hooks/useUnsavedChangesGuard';
4
+ import { useResolvedTestId, joinTestId } from '@flipdish/ui-library/utilities/testIdUtils';
5
+ import { useId } from 'react';
6
+ import { ModalOverlay, Modal, Dialog } from './Modal.js';
7
+
8
+ /**
9
+ * Asks before unsaved changes are lost: a confirm dialog on navigation and the back button, and the browser's own
10
+ * prompt on refresh or tab close. Render one beside any form that waits on a Save button, and pass its dirty flag.
11
+ *
12
+ * @summary confirm dialog that stops navigation losing unsaved changes
13
+ */
14
+ const UnsavedChangesModal = ({ hasUnsavedChanges, 'data-testid': dataTestId }) => {
15
+ const { isPromptOpen, stay, discard } = useUnsavedChangesGuard({ hasUnsavedChanges });
16
+ const rootTestId = useResolvedTestId({ testId: dataTestId, segment: 'unsaved-changes-modal', rootName: 'unsaved-changes-modal' });
17
+ const titleId = useId();
18
+ const descriptionId = useId();
19
+ // Escape closes the dialog, which must cancel the navigation and never let it through.
20
+ const stayOnClose = (isOpen) => {
21
+ if (!isOpen)
22
+ stay();
23
+ };
24
+ return (jsx(ModalOverlay, { isOpen: isPromptOpen, onOpenChange: stayOnClose, "data-testid": rootTestId, children: jsx(Modal, { className: "w-full sm:max-w-100", children: jsx(Dialog, { role: "alertdialog", "aria-labelledby": titleId, "aria-describedby": descriptionId, children: jsxs("div", { className: "p-6", children: [jsx("h2", { id: titleId, className: "text-lg font-semibold text-primary", children: "Unsaved changes" }), jsx("p", { id: descriptionId, className: "mt-2 text-sm text-secondary", children: "You have changes that have not been saved. If you leave now, they will be lost." }), jsxs("div", { className: "mt-6 flex flex-col-reverse gap-3 sm:flex-row sm:justify-end", children: [jsx(Button, { color: "secondary", onPress: stay, "data-testid": joinTestId(rootTestId, 'stay'), children: "Stay" }), jsx(Button, { color: "primary-destructive", onPress: discard, "data-testid": joinTestId(rootTestId, 'discard'), children: "Discard changes" })] })] }) }) }) }));
25
+ };
26
+
27
+ export { UnsavedChangesModal };
28
+ //# sourceMappingURL=UnsavedChangesModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UnsavedChangesModal.js","sources":["../../../../../src/components/molecules/Modals/components/UnsavedChangesModal.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":";;;;;;;AAeA;;;;;AAKG;AACI,MAAM,mBAAmB,GAAG,CAAC,EAAE,iBAAiB,EAAE,aAAa,EAAE,UAAU,EAA4B,KAAI;AAChH,IAAA,MAAM,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,GAAG,sBAAsB,CAAC,EAAE,iBAAiB,EAAE,CAAC;AACrF,IAAA,MAAM,UAAU,GAAG,iBAAiB,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,uBAAuB,EAAE,QAAQ,EAAE,uBAAuB,EAAE,CAAC;AACjI,IAAA,MAAM,OAAO,GAAG,KAAK,EAAE;AACvB,IAAA,MAAM,aAAa,GAAG,KAAK,EAAE;;AAE7B,IAAA,MAAM,WAAW,GAAG,CAAC,MAAe,KAAI;AACtC,QAAA,IAAI,CAAC,MAAM;AAAE,YAAA,IAAI,EAAE;AACrB,IAAA,CAAC;IAED,QACEA,IAAC,YAAY,EAAA,EAAC,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,WAAW,iBAAe,UAAU,EAAA,QAAA,EACpFA,GAAA,CAAC,KAAK,EAAA,EAAC,SAAS,EAAC,qBAAqB,EAAA,QAAA,EACpCA,GAAA,CAAC,MAAM,EAAA,EAAC,IAAI,EAAC,aAAa,EAAA,iBAAA,EAAkB,OAAO,EAAA,kBAAA,EAAoB,aAAa,YAClFC,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,KAAK,EAAA,QAAA,EAAA,CAClBD,GAAA,CAAA,IAAA,EAAA,EAAI,EAAE,EAAE,OAAO,EAAE,SAAS,EAAC,oCAAoC,gCAE1D,EACLA,GAAA,CAAA,GAAA,EAAA,EAAG,EAAE,EAAE,aAAa,EAAE,SAAS,EAAC,6BAA6B,gGAEzD,EACJC,IAAA,CAAA,KAAA,EAAA,EAAK,SAAS,EAAC,6DAA6D,EAAA,QAAA,EAAA,CAC1ED,GAAA,CAAC,MAAM,EAAA,EAAC,KAAK,EAAC,WAAW,EAAC,OAAO,EAAE,IAAI,iBAAe,UAAU,CAAC,UAAU,EAAE,MAAM,CAAC,qBAE3E,EACTA,GAAA,CAAC,MAAM,EAAA,EAAC,KAAK,EAAC,qBAAqB,EAAC,OAAO,EAAE,OAAO,EAAA,aAAA,EAAe,UAAU,CAAC,UAAU,EAAE,SAAS,CAAC,EAAA,QAAA,EAAA,iBAAA,EAAA,CAE3F,CAAA,EAAA,CACL,IACF,EAAA,CACC,EAAA,CACH,EAAA,CACK;AAEnB;;"}
@@ -0,0 +1,15 @@
1
+ 'use strict';
2
+
3
+ var ConfirmationModal = require('./components/ConfirmationModal.cjs');
4
+ var Modal = require('./components/Modal.cjs');
5
+ var UnsavedChangesModal = require('./components/UnsavedChangesModal.cjs');
6
+
7
+
8
+
9
+ exports.ConfirmationModal = ConfirmationModal.ConfirmationModal;
10
+ exports.Dialog = Modal.Dialog;
11
+ exports.DialogTrigger = Modal.DialogTrigger;
12
+ exports.Modal = Modal.Modal;
13
+ exports.ModalOverlay = Modal.ModalOverlay;
14
+ exports.UnsavedChangesModal = UnsavedChangesModal.UnsavedChangesModal;
15
+ //# sourceMappingURL=index.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The modal dialog and its ready-made forms: `Modal` and its parts for a dialog you compose yourself, and the modals
3
+ * built on it for one job each, such as asking before unsaved changes are lost.
4
+ *
5
+ * Explicit named re-exports on purpose: `export *` would publish every symbol of every private sub-component file
6
+ * (import paths are the public API here), so this list is the single source of truth for what Modals exposes.
7
+ */
8
+ export type { ConfirmationModalProps } from './components/ConfirmationModal';
9
+ export { ConfirmationModal } from './components/ConfirmationModal';
10
+ export type { DialogProps, ModalOverlayProps } from './components/Modal';
11
+ export { Dialog, DialogTrigger, Modal, ModalOverlay } from './components/Modal';
12
+ export type { UnsavedChangesModalProps } from './components/UnsavedChangesModal';
13
+ export { UnsavedChangesModal } from './components/UnsavedChangesModal';
14
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/molecules/Modals/index.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,YAAY,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AACnE,YAAY,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACzE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAChF,YAAY,EAAE,wBAAwB,EAAE,MAAM,kCAAkC,CAAC;AACjF,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export { ConfirmationModal } from './components/ConfirmationModal.js';
2
+ export { Dialog, DialogTrigger, Modal, ModalOverlay } from './components/Modal.js';
3
+ export { UnsavedChangesModal } from './components/UnsavedChangesModal.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}