@gusto/embedded-react-sdk 0.16.0 → 0.18.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 (387) hide show
  1. package/CHANGELOG.md +54 -0
  2. package/dist/components/Base/Base.js +50 -65
  3. package/dist/components/Base/Base.js.map +1 -1
  4. package/dist/components/Base/useBase.d.ts +2 -5
  5. package/dist/components/Base/useBase.js.map +1 -1
  6. package/dist/components/Common/EmptyData/EmptyData.js +10 -10
  7. package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
  8. package/dist/components/Common/EmptyData/EmptyData.module.scss.js +5 -3
  9. package/dist/components/Common/EmptyData/EmptyData.module.scss.js.map +1 -1
  10. package/dist/components/Common/FieldDescription/FieldDescription.module.scss.js +1 -1
  11. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js +41 -33
  12. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
  13. package/dist/components/Common/HamburgerMenu/HamburgerMenu.js +1 -1
  14. package/dist/components/Common/HamburgerMenu/HamburgerMenu.js.map +1 -1
  15. package/dist/components/Common/SignatureForm/SignatureForm.js +4 -6
  16. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  17. package/dist/components/Common/SignatureForm/SignatureFormActions.js +10 -12
  18. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  19. package/dist/components/Common/SignatureForm/SignatureFormFields.js +6 -8
  20. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  21. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.d.ts +1 -1
  22. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +32 -18
  23. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js.map +1 -1
  24. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.module.scss.js +12 -12
  25. package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.d.ts +14 -0
  26. package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.js +8 -0
  27. package/dist/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.js.map +1 -0
  28. package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +8 -8
  29. package/dist/components/Common/UI/DescriptionList/DescriptionList.d.ts +2 -0
  30. package/dist/components/Common/UI/DescriptionList/DescriptionList.js +16 -0
  31. package/dist/components/Common/UI/DescriptionList/DescriptionList.js.map +1 -0
  32. package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +10 -0
  33. package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js.map +1 -0
  34. package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.d.ts +10 -0
  35. package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js +5 -0
  36. package/dist/components/Common/UI/DescriptionList/DescriptionListTypes.js.map +1 -0
  37. package/dist/components/Common/UI/DescriptionList/index.d.ts +3 -0
  38. package/dist/components/Common/UI/Dialog/Dialog.js +50 -76
  39. package/dist/components/Common/UI/Dialog/Dialog.js.map +1 -1
  40. package/dist/components/Common/UI/Dialog/Dialog.module.scss.js +8 -14
  41. package/dist/components/Common/UI/Dialog/Dialog.module.scss.js.map +1 -1
  42. package/dist/components/Common/UI/Link/LinkTypes.d.ts +7 -6
  43. package/dist/components/Common/UI/Modal/Modal.d.ts +2 -0
  44. package/dist/components/Common/UI/Modal/Modal.js +90 -0
  45. package/dist/components/Common/UI/Modal/Modal.js.map +1 -0
  46. package/dist/components/Common/UI/Modal/Modal.module.scss.js +26 -0
  47. package/dist/components/Common/UI/Modal/Modal.module.scss.js.map +1 -0
  48. package/dist/components/Common/UI/Modal/ModalTypes.d.ts +34 -0
  49. package/dist/components/Common/UI/Modal/ModalTypes.js +8 -0
  50. package/dist/components/Common/UI/Modal/ModalTypes.js.map +1 -0
  51. package/dist/components/Common/UI/Modal/index.d.ts +3 -0
  52. package/dist/components/Common/UI/Tabs/Tabs.d.ts +0 -5
  53. package/dist/components/Common/UI/Tabs/Tabs.js +45 -16
  54. package/dist/components/Common/UI/Tabs/Tabs.js.map +1 -1
  55. package/dist/components/Common/UI/Tabs/Tabs.module.scss.js +8 -4
  56. package/dist/components/Common/UI/Tabs/Tabs.module.scss.js.map +1 -1
  57. package/dist/components/Common/UI/Tabs/TabsTypes.d.ts +7 -0
  58. package/dist/components/Common/index.d.ts +0 -1
  59. package/dist/components/Company/AssignSignatory/AssignSignatory.js +6 -8
  60. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  61. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -7
  62. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  63. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -9
  64. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  65. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +2 -3
  66. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  67. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +2 -3
  68. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  69. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -6
  70. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  71. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -7
  72. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  73. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +5 -6
  74. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  75. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +9 -10
  76. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  77. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -6
  78. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  79. package/dist/components/Company/AssignSignatory/TitleSelect.js +7 -8
  80. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  81. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -8
  82. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  83. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +2 -3
  84. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  85. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +7 -8
  86. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  87. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -6
  88. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  89. package/dist/components/Company/BankAccount/BankAccountList/AccountView.js +22 -17
  90. package/dist/components/Company/BankAccount/BankAccountList/AccountView.js.map +1 -1
  91. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +6 -7
  92. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  93. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -8
  94. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  95. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -5
  96. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  97. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -6
  98. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  99. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +11 -13
  100. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  101. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -6
  102. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  103. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +6 -8
  104. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  105. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -6
  106. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  107. package/dist/components/Company/FederalTaxes/Actions.js +6 -7
  108. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  109. package/dist/components/Company/FederalTaxes/FederalTaxes.js +15 -17
  110. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  111. package/dist/components/Company/FederalTaxes/Form.js +2 -3
  112. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  113. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +9 -11
  114. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  115. package/dist/components/Company/Industry/Actions.js +5 -6
  116. package/dist/components/Company/Industry/Actions.js.map +1 -1
  117. package/dist/components/Company/Industry/Context.js +7 -9
  118. package/dist/components/Company/Industry/Context.js.map +1 -1
  119. package/dist/components/Company/Industry/Edit.js +10 -11
  120. package/dist/components/Company/Industry/Edit.js.map +1 -1
  121. package/dist/components/Company/Locations/LocationForm/Actions.js +2 -3
  122. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  123. package/dist/components/Company/Locations/LocationForm/Form.js +4 -5
  124. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  125. package/dist/components/Company/Locations/LocationForm/LocationForm.js +9 -11
  126. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  127. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -6
  128. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  129. package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
  130. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  131. package/dist/components/Company/Locations/LocationsList/List.js +2 -3
  132. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  133. package/dist/components/Company/Locations/LocationsList/LocationsList.js +12 -14
  134. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  135. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -6
  136. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  137. package/dist/components/Company/OnboardingOverview/Completed.js +5 -6
  138. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  139. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +2 -3
  140. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  141. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -4
  142. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  143. package/dist/components/Company/OnboardingOverview/context.js +4 -6
  144. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  145. package/dist/components/Company/PaySchedule/PaySchedule.js +39 -41
  146. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  147. package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -11
  148. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  149. package/dist/components/Company/PaySchedule/_parts/Edit.js +35 -37
  150. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  151. package/dist/components/Company/PaySchedule/_parts/Head.js +18 -19
  152. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  153. package/dist/components/Company/PaySchedule/_parts/List.js +5 -6
  154. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  155. package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -8
  156. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  157. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -6
  158. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  159. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -6
  160. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  161. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -7
  162. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  163. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -6
  164. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  165. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -6
  166. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  167. package/dist/components/Contractor/Address/Address.js +3 -5
  168. package/dist/components/Contractor/Address/Address.js.map +1 -1
  169. package/dist/components/Contractor/Address/Form.js +2 -3
  170. package/dist/components/Contractor/Address/Form.js.map +1 -1
  171. package/dist/components/Contractor/Address/useAddress.js +6 -8
  172. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  173. package/dist/components/Contractor/ContractorList/index.js +15 -16
  174. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  175. package/dist/components/Contractor/NewHireReport/NewHireReport.js +13 -14
  176. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  177. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +2 -3
  178. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  179. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
  180. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  181. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -3
  182. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  183. package/dist/components/Contractor/Profile/useContractorProfile.js +3 -4
  184. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  185. package/dist/components/Contractor/Submit/Submit.js +2 -3
  186. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  187. package/dist/components/Employee/Compensation/Actions.js +4 -5
  188. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  189. package/dist/components/Employee/Compensation/Edit.js +10 -9
  190. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  191. package/dist/components/Employee/Compensation/List.js +5 -6
  192. package/dist/components/Employee/Compensation/List.js.map +1 -1
  193. package/dist/components/Employee/Deductions/DeductionsComponents.js +1 -1
  194. package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -1
  195. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +6 -6
  196. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +2 -2
  197. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +2 -3
  198. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
  199. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +44 -40
  200. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  201. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +2 -3
  202. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +1 -1
  203. package/dist/components/Employee/Deductions/useDeductions.d.ts +2 -2
  204. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +4 -5
  205. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  206. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +9 -11
  207. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  208. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -3
  209. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  210. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -6
  211. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  212. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +11 -13
  213. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  214. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -6
  215. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  216. package/dist/components/Employee/EmployeeList/Actions.js +4 -5
  217. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  218. package/dist/components/Employee/EmployeeList/Head.js +2 -3
  219. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  220. package/dist/components/Employee/EmployeeList/List.js +9 -10
  221. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  222. package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -6
  223. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  224. package/dist/components/Employee/FederalTaxes/Actions.js +2 -3
  225. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  226. package/dist/components/Employee/FederalTaxes/FederalForm.js +5 -6
  227. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  228. package/dist/components/Employee/FederalTaxes/FederalTaxes.js +8 -8
  229. package/dist/components/Employee/FederalTaxes/FederalTaxes.js.map +1 -1
  230. package/dist/components/Employee/FederalTaxes/Head.js +6 -6
  231. package/dist/components/Employee/FederalTaxes/Head.js.map +1 -1
  232. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -6
  233. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  234. package/dist/components/Employee/Landing/Landing.js +6 -7
  235. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  236. package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
  237. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  238. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +4 -5
  239. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  240. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +3 -4
  241. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  242. package/dist/components/Employee/PaymentMethod/PaymentMethod.d.ts +1 -0
  243. package/dist/components/Employee/PaymentMethod/PaymentMethod.js +79 -78
  244. package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
  245. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +12 -13
  246. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  247. package/dist/components/Employee/PaymentMethod/Split.js +2 -3
  248. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  249. package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +1 -0
  250. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -8
  251. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  252. package/dist/components/Employee/Profile/Actions.js +6 -7
  253. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  254. package/dist/components/Employee/Profile/AdminPersonalDetails.js +38 -35
  255. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  256. package/dist/components/Employee/Profile/HomeAddress.d.ts +52 -0
  257. package/dist/components/Employee/Profile/HomeAddress.js +63 -44
  258. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  259. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +20 -21
  260. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  261. package/dist/components/Employee/Profile/Profile.js +150 -143
  262. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  263. package/dist/components/Employee/Profile/useProfile.d.ts +1 -0
  264. package/dist/components/Employee/Profile/useProfile.js +4 -6
  265. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  266. package/dist/components/Employee/StateTaxes/Actions.js +6 -7
  267. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  268. package/dist/components/Employee/StateTaxes/StateTaxes.js +4 -4
  269. package/dist/components/Employee/StateTaxes/StateTaxes.js.map +1 -1
  270. package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -6
  271. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  272. package/dist/components/Employee/Taxes/Actions.js +7 -8
  273. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  274. package/dist/components/Employee/Taxes/FederalForm.js +5 -6
  275. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  276. package/dist/components/Employee/Taxes/FederalHead.js +6 -6
  277. package/dist/components/Employee/Taxes/FederalHead.js.map +1 -1
  278. package/dist/components/Employee/Taxes/Taxes.js +5 -5
  279. package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
  280. package/dist/components/Employee/Taxes/useTaxes.js +4 -6
  281. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  282. package/dist/components/Flow/Flow.js +9 -10
  283. package/dist/components/Flow/Flow.js.map +1 -1
  284. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +9 -10
  285. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  286. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +101 -90
  287. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -1
  288. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +5 -1
  289. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +135 -133
  290. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -1
  291. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss.js +5 -3
  292. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.module.scss.js.map +1 -1
  293. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +127 -119
  294. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -1
  295. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +5 -6
  296. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  297. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.d.ts +3 -1
  298. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js +22 -22
  299. package/dist/components/Payroll/PayrollFlow/PayrollFlowComponents.js.map +1 -1
  300. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +40 -27
  301. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  302. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js +50 -72
  303. package/dist/components/Payroll/PayrollHistory/PayrollHistory.js.map +1 -1
  304. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +2 -3
  305. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  306. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.d.ts +1 -1
  307. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js +4 -4
  308. package/dist/components/Payroll/PayrollLanding/PayrollLandingFlowComponents.js.map +1 -1
  309. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +20 -20
  310. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
  311. package/dist/components/Payroll/PayrollList/PayrollList.js +24 -21
  312. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -1
  313. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +3 -9
  314. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +117 -128
  315. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  316. package/dist/components/Payroll/PayrollList/PayrollListPresentation.module.scss.js +6 -6
  317. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +89 -78
  318. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  319. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +195 -214
  320. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -1
  321. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.module.scss.js +8 -0
  322. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.module.scss.js.map +1 -0
  323. package/dist/components/Payroll/usePreparedPayrollData.js +8 -10
  324. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  325. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js +49 -45
  326. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  327. package/dist/contexts/ComponentAdapter/componentAdapterTypes.d.ts +2 -0
  328. package/dist/contexts/ComponentAdapter/useComponentContext.d.ts +4 -0
  329. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  330. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +5 -7
  331. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  332. package/dist/helpers/apiErrorToList.d.ts +7 -0
  333. package/dist/helpers/apiErrorToList.js +23 -0
  334. package/dist/helpers/apiErrorToList.js.map +1 -0
  335. package/dist/helpers/breadcrumbHelpers.js +30 -30
  336. package/dist/helpers/breadcrumbHelpers.js.map +1 -1
  337. package/dist/helpers/dateFormatting.d.ts +18 -6
  338. package/dist/helpers/dateFormatting.js +93 -24
  339. package/dist/helpers/dateFormatting.js.map +1 -1
  340. package/dist/helpers/formattedStrings.js +11 -12
  341. package/dist/helpers/formattedStrings.js.map +1 -1
  342. package/dist/hooks/useAsyncError.js.map +1 -0
  343. package/dist/hooks/useDateFormatter.d.ts +19 -0
  344. package/dist/hooks/useDateFormatter.js +24 -0
  345. package/dist/hooks/useDateFormatter.js.map +1 -0
  346. package/dist/hooks/useMenu.js.map +1 -0
  347. package/dist/{components/Common/hooks → hooks}/useNumberFormatter.js +1 -1
  348. package/dist/hooks/useNumberFormatter.js.map +1 -0
  349. package/dist/hooks/useOverflowDetection/index.d.ts +3 -0
  350. package/dist/hooks/useOverflowDetection/useOverflowDetection.d.ts +7 -0
  351. package/dist/hooks/useOverflowDetection/useOverflowDetection.js +28 -0
  352. package/dist/hooks/useOverflowDetection/useOverflowDetection.js.map +1 -0
  353. package/dist/i18n/en/Company.PaySchedule.json.js +9 -9
  354. package/dist/i18n/en/Employee.Compensation.json.js +15 -15
  355. package/dist/i18n/en/Employee.Deductions.json.js +131 -105
  356. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  357. package/dist/i18n/en/Employee.FederalTaxes.json.js +9 -9
  358. package/dist/i18n/en/Employee.HomeAddress.json.js +1 -1
  359. package/dist/i18n/en/Employee.PaymentMethod.json.js +70 -66
  360. package/dist/i18n/en/Employee.PaymentMethod.json.js.map +1 -1
  361. package/dist/i18n/en/Employee.Taxes.json.js +25 -27
  362. package/dist/i18n/en/Employee.Taxes.json.js.map +1 -1
  363. package/dist/i18n/en/Payroll.PayrollConfiguration.json.js +17 -17
  364. package/dist/i18n/en/Payroll.PayrollOverview.json.js +23 -23
  365. package/dist/i18n/en/common.json.d.ts +2 -1
  366. package/dist/i18n/en/common.json.js +4 -4
  367. package/dist/style.css +1 -1
  368. package/dist/types/i18next.d.ts +20 -1
  369. package/package.json +10 -10
  370. package/dist/components/Common/hooks/useAsyncError.js.map +0 -1
  371. package/dist/components/Common/hooks/useMenu.js.map +0 -1
  372. package/dist/components/Common/hooks/useNumberFormatter.js.map +0 -1
  373. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +0 -221
  374. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +0 -1
  375. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js +0 -8
  376. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js.map +0 -1
  377. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +0 -132
  378. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +0 -1
  379. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js +0 -14
  380. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js.map +0 -1
  381. package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.js +0 -98
  382. package/dist/components/Employee/Deductions/DeductionsForm/UNSTABLE_DeductionsForm.js.map +0 -1
  383. /package/dist/{components/Common/hooks → hooks}/useAsyncError.d.ts +0 -0
  384. /package/dist/{components/Common/hooks → hooks}/useAsyncError.js +0 -0
  385. /package/dist/{components/Common/hooks → hooks}/useMenu.d.ts +0 -0
  386. /package/dist/{components/Common/hooks → hooks}/useMenu.js +0 -0
  387. /package/dist/{components/Common/hooks → hooks}/useNumberFormatter.d.ts +0 -0
@@ -1,16 +1,14 @@
1
- import { jsxs as n, Fragment as s, jsx as e } from "react/jsx-runtime";
2
- import "react-i18next";
3
- import "classnames";
1
+ import { jsxs as s, Fragment as m, jsx as e } from "react/jsx-runtime";
4
2
  import { TextInputField as a } from "../Fields/TextInputField/TextInputField.js";
5
3
  import { CheckboxField as u } from "../Fields/CheckboxField/CheckboxField.js";
6
- function f({
4
+ function p({
7
5
  signatureLabel: r,
8
6
  signatureDescription: i = "",
9
7
  signatureError: t = "",
10
8
  confirmationLabel: o,
11
- confirmationError: m = ""
9
+ confirmationError: n = ""
12
10
  }) {
13
- return /* @__PURE__ */ n(s, { children: [
11
+ return /* @__PURE__ */ s(m, { children: [
14
12
  /* @__PURE__ */ e(
15
13
  a,
16
14
  {
@@ -27,12 +25,12 @@ function f({
27
25
  name: "confirmSignature",
28
26
  isRequired: !0,
29
27
  label: o,
30
- errorMessage: m
28
+ errorMessage: n
31
29
  }
32
30
  )
33
31
  ] });
34
32
  }
35
33
  export {
36
- f as SignatureFormFields
34
+ p as SignatureFormFields
37
35
  };
38
36
  //# sourceMappingURL=SignatureFormFields.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"SignatureFormFields.js","sources":["../../../../src/components/Common/SignatureForm/SignatureFormFields.tsx"],"sourcesContent":["import { TextInputField, CheckboxField } from '@/components/Common'\n\ninterface SignatureFormFieldsProps {\n signatureLabel: string\n signatureDescription?: string\n signatureError?: string\n confirmationLabel: string\n confirmationError?: string\n}\n\nexport function SignatureFormFields({\n signatureLabel,\n signatureDescription = '',\n signatureError = '',\n confirmationLabel,\n confirmationError = '',\n}: SignatureFormFieldsProps) {\n return (\n <>\n <TextInputField\n name=\"signature\"\n label={signatureLabel}\n description={signatureDescription}\n errorMessage={signatureError}\n isRequired\n />\n <CheckboxField\n name=\"confirmSignature\"\n isRequired\n label={confirmationLabel}\n errorMessage={confirmationError}\n />\n </>\n )\n}\n"],"names":["SignatureFormFields","signatureLabel","signatureDescription","signatureError","confirmationLabel","confirmationError","jsxs","Fragment","jsx","TextInputField","CheckboxField"],"mappings":";;;;;AAUO,SAASA,EAAoB;AAAA,EAClC,gBAAAC;AAAA,EACA,sBAAAC,IAAuB;AAAA,EACvB,gBAAAC,IAAiB;AAAA,EACjB,mBAAAC;AAAA,EACA,mBAAAC,IAAoB;AACtB,GAA6B;AAC3B,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOR;AAAA,QACP,aAAaC;AAAA,QACb,cAAcC;AAAA,QACd,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAK;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAON;AAAA,QACP,cAAcC;AAAA,MAAA;AAAA,IAAA;AAAA,EAChB,GACF;AAEJ;"}
1
+ {"version":3,"file":"SignatureFormFields.js","sources":["../../../../src/components/Common/SignatureForm/SignatureFormFields.tsx"],"sourcesContent":["import { TextInputField, CheckboxField } from '@/components/Common'\n\ninterface SignatureFormFieldsProps {\n signatureLabel: string\n signatureDescription?: string\n signatureError?: string\n confirmationLabel: string\n confirmationError?: string\n}\n\nexport function SignatureFormFields({\n signatureLabel,\n signatureDescription = '',\n signatureError = '',\n confirmationLabel,\n confirmationError = '',\n}: SignatureFormFieldsProps) {\n return (\n <>\n <TextInputField\n name=\"signature\"\n label={signatureLabel}\n description={signatureDescription}\n errorMessage={signatureError}\n isRequired\n />\n <CheckboxField\n name=\"confirmSignature\"\n isRequired\n label={confirmationLabel}\n errorMessage={confirmationError}\n />\n </>\n )\n}\n"],"names":["SignatureFormFields","signatureLabel","signatureDescription","signatureError","confirmationLabel","confirmationError","jsxs","Fragment","jsx","TextInputField","CheckboxField"],"mappings":";;;AAUO,SAASA,EAAoB;AAAA,EAClC,gBAAAC;AAAA,EACA,sBAAAC,IAAuB;AAAA,EACvB,gBAAAC,IAAiB;AAAA,EACjB,mBAAAC;AAAA,EACA,mBAAAC,IAAoB;AACtB,GAA6B;AAC3B,SACE,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,OAAOR;AAAA,QACP,aAAaC;AAAA,QACb,cAAcC;AAAA,QACd,YAAU;AAAA,MAAA;AAAA,IAAA;AAAA,IAEZ,gBAAAK;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,YAAU;AAAA,QACV,OAAON;AAAA,QACP,cAAcC;AAAA,MAAA;AAAA,IAAA;AAAA,EAChB,GACF;AAEJ;"}
@@ -1,2 +1,2 @@
1
1
  import { BreadcrumbsProps } from './BreadcrumbsTypes';
2
- export declare function Breadcrumbs({ className, breadcrumbs, currentBreadcrumbId, 'aria-label': ariaLabel, onClick, }: BreadcrumbsProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function Breadcrumbs(rawProps: BreadcrumbsProps): import("react/jsx-runtime").JSX.Element;
@@ -1,28 +1,42 @@
1
1
  import { jsx as l } from "react/jsx-runtime";
2
- import t from "classnames";
3
- import i from "./Breadcrumbs.module.scss.js";
4
- import { Flex as p } from "../../Flex/Flex.js";
5
- function N({
6
- className: n,
7
- breadcrumbs: c,
8
- currentBreadcrumbId: o,
9
- "aria-label": m = "Breadcrumbs",
10
- onClick: r
11
- }) {
12
- return /* @__PURE__ */ l(p, { flexDirection: "column", children: /* @__PURE__ */ l("nav", { "aria-label": m, className: t(i.root, n), children: /* @__PURE__ */ l("ol", { className: i.list, children: c.map((e) => {
13
- const a = e.id === o, s = !a && r;
2
+ import h from "classnames";
3
+ import { BreadcrumbsDefaults as k } from "./BreadcrumbsTypes.js";
4
+ import r from "./Breadcrumbs.module.scss.js";
5
+ import { applyMissingDefaults as x } from "../../../../helpers/applyMissingDefaults.js";
6
+ import { Flex as u } from "../../Flex/Flex.js";
7
+ function I(p) {
8
+ const f = x(p, k), {
9
+ className: s,
10
+ breadcrumbs: n,
11
+ currentBreadcrumbId: t,
12
+ "aria-label": c,
13
+ onClick: i,
14
+ isSmallContainer: b
15
+ } = f, o = n.findIndex((e) => e.id === t), a = o > 0 ? n[o - 1] : null;
16
+ return b && a && i ? /* @__PURE__ */ l(u, { flexDirection: "column", children: /* @__PURE__ */ l("nav", { "aria-label": c, className: s, children: /* @__PURE__ */ l(
17
+ "button",
18
+ {
19
+ type: "button",
20
+ className: r.smallBack,
21
+ onClick: () => {
22
+ i(a.id);
23
+ },
24
+ children: a.label
25
+ }
26
+ ) }) }) : /* @__PURE__ */ l(u, { flexDirection: "column", children: /* @__PURE__ */ l("nav", { "aria-label": c, className: s, children: /* @__PURE__ */ l("ol", { className: r.list, children: n.map((e) => {
27
+ const m = e.id === t, d = !m && i;
14
28
  return /* @__PURE__ */ l(
15
29
  "li",
16
30
  {
17
- className: t(i.item, s && i.clickable),
18
- "aria-current": a ? "step" : !1,
19
- children: s ? /* @__PURE__ */ l(
31
+ className: h(r.item, d && r.clickable),
32
+ "aria-current": m ? "step" : !1,
33
+ children: d ? /* @__PURE__ */ l(
20
34
  "button",
21
35
  {
22
36
  type: "button",
23
- className: i.link,
37
+ className: r.link,
24
38
  onClick: () => {
25
- r(e.id);
39
+ i(e.id);
26
40
  },
27
41
  children: e.label
28
42
  }
@@ -33,6 +47,6 @@ function N({
33
47
  }) }) }) });
34
48
  }
35
49
  export {
36
- N as Breadcrumbs
50
+ I as Breadcrumbs
37
51
  };
38
52
  //# sourceMappingURL=Breadcrumbs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Breadcrumbs.js","sources":["../../../../../src/components/Common/UI/Breadcrumbs/Breadcrumbs.tsx"],"sourcesContent":["import classnames from 'classnames'\nimport { Flex } from '../../Flex'\nimport type { BreadcrumbsProps } from './BreadcrumbsTypes'\nimport styles from './Breadcrumbs.module.scss'\n\nexport function Breadcrumbs({\n className,\n breadcrumbs,\n currentBreadcrumbId,\n 'aria-label': ariaLabel = 'Breadcrumbs',\n onClick,\n}: BreadcrumbsProps) {\n return (\n <Flex flexDirection=\"column\">\n <nav aria-label={ariaLabel} className={classnames(styles.root, className)}>\n <ol className={styles.list}>\n {breadcrumbs.map(breadcrumb => {\n const isCurrentbreadcrumb = breadcrumb.id === currentBreadcrumbId\n const isClickable = !isCurrentbreadcrumb && onClick\n\n return (\n <li\n key={breadcrumb.id}\n className={classnames(styles.item, isClickable && styles.clickable)}\n aria-current={isCurrentbreadcrumb ? 'step' : false}\n >\n {isClickable ? (\n <button\n type=\"button\"\n className={styles.link}\n onClick={() => {\n onClick(breadcrumb.id)\n }}\n >\n {breadcrumb.label}\n </button>\n ) : (\n <span>{breadcrumb.label}</span>\n )}\n </li>\n )\n })}\n </ol>\n </nav>\n </Flex>\n )\n}\n"],"names":["Breadcrumbs","className","breadcrumbs","currentBreadcrumbId","ariaLabel","onClick","jsx","Flex","classnames","styles","breadcrumb","isCurrentbreadcrumb","isClickable"],"mappings":";;;;AAKO,SAASA,EAAY;AAAA,EAC1B,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,cAAcC,IAAY;AAAA,EAC1B,SAAAC;AACF,GAAqB;AACnB,SACE,gBAAAC,EAACC,KAAK,eAAc,UAClB,4BAAC,OAAA,EAAI,cAAYH,GAAW,WAAWI,EAAWC,EAAO,MAAMR,CAAS,GACtE,UAAA,gBAAAK,EAAC,MAAA,EAAG,WAAWG,EAAO,MACnB,UAAAP,EAAY,IAAI,CAAAQ,MAAc;AAC7B,UAAMC,IAAsBD,EAAW,OAAOP,GACxCS,IAAc,CAACD,KAAuBN;AAE5C,WACE,gBAAAC;AAAA,MAAC;AAAA,MAAA;AAAA,QAEC,WAAWE,EAAWC,EAAO,MAAMG,KAAeH,EAAO,SAAS;AAAA,QAClE,gBAAcE,IAAsB,SAAS;AAAA,QAE5C,UAAAC,IACC,gBAAAN;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,WAAWG,EAAO;AAAA,YAClB,SAAS,MAAM;AACb,cAAAJ,EAAQK,EAAW,EAAE;AAAA,YACvB;AAAA,YAEC,UAAAA,EAAW;AAAA,UAAA;AAAA,QAAA,IAGd,gBAAAJ,EAAC,QAAA,EAAM,UAAAI,EAAW,MAAA,CAAM;AAAA,MAAA;AAAA,MAfrBA,EAAW;AAAA,IAAA;AAAA,EAmBtB,CAAC,EAAA,CACH,EAAA,CACF,GACF;AAEJ;"}
1
+ {"version":3,"file":"Breadcrumbs.js","sources":["../../../../../src/components/Common/UI/Breadcrumbs/Breadcrumbs.tsx"],"sourcesContent":["import classnames from 'classnames'\nimport { Flex } from '../../Flex'\nimport { type BreadcrumbsProps, BreadcrumbsDefaults } from './BreadcrumbsTypes'\nimport styles from './Breadcrumbs.module.scss'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\n\nexport function Breadcrumbs(rawProps: BreadcrumbsProps) {\n const resolvedProps = applyMissingDefaults(rawProps, BreadcrumbsDefaults)\n const {\n className,\n breadcrumbs,\n currentBreadcrumbId,\n 'aria-label': ariaLabel,\n onClick,\n isSmallContainer,\n } = resolvedProps\n\n const currentIndex = breadcrumbs.findIndex(b => b.id === currentBreadcrumbId)\n const previousBreadcrumb = currentIndex > 0 ? breadcrumbs[currentIndex - 1] : null\n\n if (isSmallContainer && previousBreadcrumb && onClick) {\n return (\n <Flex flexDirection=\"column\">\n <nav aria-label={ariaLabel} className={className}>\n <button\n type=\"button\"\n className={styles.smallBack}\n onClick={() => {\n onClick(previousBreadcrumb.id)\n }}\n >\n {previousBreadcrumb.label}\n </button>\n </nav>\n </Flex>\n )\n }\n\n return (\n <Flex flexDirection=\"column\">\n <nav aria-label={ariaLabel} className={className}>\n <ol className={styles.list}>\n {breadcrumbs.map(breadcrumb => {\n const isCurrentbreadcrumb = breadcrumb.id === currentBreadcrumbId\n const isClickable = !isCurrentbreadcrumb && onClick\n\n return (\n <li\n key={breadcrumb.id}\n className={classnames(styles.item, isClickable && styles.clickable)}\n aria-current={isCurrentbreadcrumb ? 'step' : false}\n >\n {isClickable ? (\n <button\n type=\"button\"\n className={styles.link}\n onClick={() => {\n onClick(breadcrumb.id)\n }}\n >\n {breadcrumb.label}\n </button>\n ) : (\n <span>{breadcrumb.label}</span>\n )}\n </li>\n )\n })}\n </ol>\n </nav>\n </Flex>\n )\n}\n"],"names":["Breadcrumbs","rawProps","resolvedProps","applyMissingDefaults","BreadcrumbsDefaults","className","breadcrumbs","currentBreadcrumbId","ariaLabel","onClick","isSmallContainer","currentIndex","b","previousBreadcrumb","jsx","Flex","styles","breadcrumb","isCurrentbreadcrumb","isClickable","classnames"],"mappings":";;;;;;AAMO,SAASA,EAAYC,GAA4B;AACtD,QAAMC,IAAgBC,EAAqBF,GAAUG,CAAmB,GAClE;AAAA,IACJ,WAAAC;AAAA,IACA,aAAAC;AAAA,IACA,qBAAAC;AAAA,IACA,cAAcC;AAAA,IACd,SAAAC;AAAA,IACA,kBAAAC;AAAA,EAAA,IACER,GAEES,IAAeL,EAAY,UAAU,CAAAM,MAAKA,EAAE,OAAOL,CAAmB,GACtEM,IAAqBF,IAAe,IAAIL,EAAYK,IAAe,CAAC,IAAI;AAE9E,SAAID,KAAoBG,KAAsBJ,IAE1C,gBAAAK,EAACC,KAAK,eAAc,UAClB,4BAAC,OAAA,EAAI,cAAYP,GAAW,WAAAH,GAC1B,UAAA,gBAAAS;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,WAAWE,EAAO;AAAA,MAClB,SAAS,MAAM;AACb,QAAAP,EAAQI,EAAmB,EAAE;AAAA,MAC/B;AAAA,MAEC,UAAAA,EAAmB;AAAA,IAAA;AAAA,EAAA,GAExB,EAAA,CACF,sBAKDE,GAAA,EAAK,eAAc,UAClB,UAAA,gBAAAD,EAAC,SAAI,cAAYN,GAAW,WAAAH,GAC1B,UAAA,gBAAAS,EAAC,QAAG,WAAWE,EAAO,MACnB,UAAAV,EAAY,IAAI,CAAAW,MAAc;AAC7B,UAAMC,IAAsBD,EAAW,OAAOV,GACxCY,IAAc,CAACD,KAAuBT;AAE5C,WACE,gBAAAK;AAAA,MAAC;AAAA,MAAA;AAAA,QAEC,WAAWM,EAAWJ,EAAO,MAAMG,KAAeH,EAAO,SAAS;AAAA,QAClE,gBAAcE,IAAsB,SAAS;AAAA,QAE5C,UAAAC,IACC,gBAAAL;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,WAAWE,EAAO;AAAA,YAClB,SAAS,MAAM;AACb,cAAAP,EAAQQ,EAAW,EAAE;AAAA,YACvB;AAAA,YAEC,UAAAA,EAAW;AAAA,UAAA;AAAA,QAAA,IAGd,gBAAAH,EAAC,QAAA,EAAM,UAAAG,EAAW,MAAA,CAAM;AAAA,MAAA;AAAA,MAfrBA,EAAW;AAAA,IAAA;AAAA,EAmBtB,CAAC,EAAA,CACH,EAAA,CACF,GACF;AAEJ;"}
@@ -1,16 +1,16 @@
1
- const t = "_root_czg77_2", c = "_list_czg77_5", _ = "_item_czg77_13", l = "_link_czg77_31", o = "_clickable_czg77_45", i = {
2
- root: t,
3
- list: c,
4
- item: _,
5
- link: l,
6
- clickable: o
1
+ const l = "_list_140kz_2", c = "_item_140kz_10", s = "_clickable_140kz_28", t = "_link_140kz_31", _ = "_smallBack_140kz_45", k = {
2
+ list: l,
3
+ item: c,
4
+ clickable: s,
5
+ link: t,
6
+ smallBack: _
7
7
  };
8
8
  export {
9
- o as clickable,
10
- i as default,
11
- _ as item,
12
- l as link,
13
- c as list,
14
- t as root
9
+ s as clickable,
10
+ k as default,
11
+ c as item,
12
+ t as link,
13
+ l as list,
14
+ _ as smallBack
15
15
  };
16
16
  //# sourceMappingURL=Breadcrumbs.module.scss.js.map
@@ -24,4 +24,18 @@ export interface BreadcrumbsProps {
24
24
  * Event handler for breadcrumb navigation
25
25
  */
26
26
  onClick?: (id: string) => void;
27
+ /**
28
+ * Passed to the breadcrumbs when the container size is small (640px and below)
29
+ * At this size, the breadcrumb typically does not have sufficient size to render
30
+ * completely. In our implementation, we switch to a condensed mobile version of
31
+ * the breadcrumbs
32
+ */
33
+ isSmallContainer?: boolean;
27
34
  }
35
+ /**
36
+ * Default prop values for Breadcrumbs component.
37
+ */
38
+ export declare const BreadcrumbsDefaults: {
39
+ readonly isSmallContainer: false;
40
+ readonly 'aria-label': "Breadcrumbs";
41
+ };
@@ -0,0 +1,8 @@
1
+ const a = {
2
+ isSmallContainer: !1,
3
+ "aria-label": "Breadcrumbs"
4
+ };
5
+ export {
6
+ a as BreadcrumbsDefaults
7
+ };
8
+ //# sourceMappingURL=BreadcrumbsTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BreadcrumbsTypes.js","sources":["../../../../../src/components/Common/UI/Breadcrumbs/BreadcrumbsTypes.ts"],"sourcesContent":["import type { ReactNode } from 'react'\n\nexport interface Breadcrumb {\n id: string\n label: ReactNode\n}\nexport interface BreadcrumbsProps {\n /**\n * Array of breadcrumbs\n */\n breadcrumbs: Breadcrumb[]\n /**\n * Current breadcrumb id\n */\n currentBreadcrumbId?: string\n /**\n * Accessibility label for the breadcrumbs\n */\n 'aria-label'?: string\n /**\n * Additional CSS class name for the breadcrumbs container\n */\n className?: string\n /**\n * Event handler for breadcrumb navigation\n */\n onClick?: (id: string) => void\n /**\n * Passed to the breadcrumbs when the container size is small (640px and below)\n * At this size, the breadcrumb typically does not have sufficient size to render\n * completely. In our implementation, we switch to a condensed mobile version of\n * the breadcrumbs\n */\n isSmallContainer?: boolean\n}\n\n/**\n * Default prop values for Breadcrumbs component.\n */\nexport const BreadcrumbsDefaults = {\n isSmallContainer: false,\n 'aria-label': 'Breadcrumbs',\n} as const satisfies Partial<BreadcrumbsProps>\n"],"names":["BreadcrumbsDefaults"],"mappings":"AAuCO,MAAMA,IAAsB;AAAA,EACjC,kBAAkB;AAAA,EAClB,cAAc;AAChB;"}
@@ -1,14 +1,14 @@
1
- const o = "_container_1l0mw_1", n = "_root_1l0mw_5", t = "_popover_1l0mw_99", _ = "_icons_1l0mw_231", c = {
1
+ const o = "_container_1s6dq_1", s = "_root_1s6dq_5", n = "_popover_1s6dq_99", t = "_icons_1s6dq_231", _ = {
2
2
  container: o,
3
- root: n,
4
- popover: t,
5
- icons: _
3
+ root: s,
4
+ popover: n,
5
+ icons: t
6
6
  };
7
7
  export {
8
8
  o as container,
9
- c as default,
10
- _ as icons,
11
- t as popover,
12
- n as root
9
+ _ as default,
10
+ t as icons,
11
+ n as popover,
12
+ s as root
13
13
  };
14
14
  //# sourceMappingURL=DatePicker.module.scss.js.map
@@ -0,0 +1,2 @@
1
+ import { DescriptionListProps } from './DescriptionListTypes';
2
+ export declare function DescriptionList(rawProps: DescriptionListProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,16 @@
1
+ import { jsx as i, jsxs as d } from "react/jsx-runtime";
2
+ import f from "classnames";
3
+ import { DescriptionListDefaults as u } from "./DescriptionListTypes.js";
4
+ import o from "./DescriptionList.module.scss.js";
5
+ import { applyMissingDefaults as y } from "../../../../helpers/applyMissingDefaults.js";
6
+ function j(n) {
7
+ const m = y(n, u), { items: c, className: a } = m, p = (r) => (Array.isArray(r) ? r : [r]).map((t, e) => /* @__PURE__ */ i("dt", { children: t }, e)), l = (r) => (Array.isArray(r) ? r : [r]).map((t, e) => /* @__PURE__ */ i("dd", { children: t }, e));
8
+ return /* @__PURE__ */ i("dl", { className: f(o.root, a), children: c.map((r, s) => /* @__PURE__ */ d("div", { className: o.item, children: [
9
+ p(r.term),
10
+ l(r.description)
11
+ ] }, s)) });
12
+ }
13
+ export {
14
+ j as DescriptionList
15
+ };
16
+ //# sourceMappingURL=DescriptionList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DescriptionList.js","sources":["../../../../../src/components/Common/UI/DescriptionList/DescriptionList.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport type { ReactNode } from 'react'\nimport { type DescriptionListProps, DescriptionListDefaults } from './DescriptionListTypes'\nimport styles from './DescriptionList.module.scss'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\n\nexport function DescriptionList(rawProps: DescriptionListProps) {\n const resolvedProps = applyMissingDefaults(rawProps, DescriptionListDefaults)\n const { items, className } = resolvedProps\n\n const renderTerms = (term: ReactNode | ReactNode[]) => {\n const terms = Array.isArray(term) ? term : [term]\n return terms.map((t, i) => <dt key={i}>{t}</dt>)\n }\n\n const renderDescriptions = (description: ReactNode | ReactNode[]) => {\n const descriptions = Array.isArray(description) ? description : [description]\n return descriptions.map((d, i) => <dd key={i}>{d}</dd>)\n }\n\n return (\n <dl className={classNames(styles.root, className)}>\n {items.map((item, index) => (\n <div key={index} className={styles.item}>\n {renderTerms(item.term)}\n {renderDescriptions(item.description)}\n </div>\n ))}\n </dl>\n )\n}\n"],"names":["DescriptionList","rawProps","resolvedProps","applyMissingDefaults","DescriptionListDefaults","items","className","renderTerms","term","i","jsx","renderDescriptions","description","d","classNames","styles","item","index"],"mappings":";;;;;AAMO,SAASA,EAAgBC,GAAgC;AAC9D,QAAMC,IAAgBC,EAAqBF,GAAUG,CAAuB,GACtE,EAAE,OAAAC,GAAO,WAAAC,EAAA,IAAcJ,GAEvBK,IAAc,CAACC,OACL,MAAM,QAAQA,CAAI,IAAIA,IAAO,CAACA,CAAI,GACnC,IAAI,CAAC,GAAGC,MAAM,gBAAAC,EAAC,MAAA,EAAY,UAAA,EAAA,GAAJD,CAAM,CAAK,GAG3CE,IAAqB,CAACC,OACL,MAAM,QAAQA,CAAW,IAAIA,IAAc,CAACA,CAAW,GACxD,IAAI,CAACC,GAAGJ,MAAM,gBAAAC,EAAC,MAAA,EAAY,UAAAG,EAAA,GAAJJ,CAAM,CAAK;AAGxD,2BACG,MAAA,EAAG,WAAWK,EAAWC,EAAO,MAAMT,CAAS,GAC7C,UAAAD,EAAM,IAAI,CAACW,GAAMC,wBACf,OAAA,EAAgB,WAAWF,EAAO,MAChC,UAAA;AAAA,IAAAR,EAAYS,EAAK,IAAI;AAAA,IACrBL,EAAmBK,EAAK,WAAW;AAAA,EAAA,KAF5BC,CAGV,CACD,GACH;AAEJ;"}
@@ -0,0 +1,10 @@
1
+ const t = "_root_n7k5c_1", o = "_item_n7k5c_4", e = {
2
+ root: t,
3
+ item: o
4
+ };
5
+ export {
6
+ e as default,
7
+ o as item,
8
+ t as root
9
+ };
10
+ //# sourceMappingURL=DescriptionList.module.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DescriptionList.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -0,0 +1,10 @@
1
+ import { ReactNode } from 'react';
2
+ export interface DescriptionListItem {
3
+ term: ReactNode | ReactNode[];
4
+ description: ReactNode | ReactNode[];
5
+ }
6
+ export interface DescriptionListProps {
7
+ items: DescriptionListItem[];
8
+ className?: string;
9
+ }
10
+ export declare const DescriptionListDefaults: {};
@@ -0,0 +1,5 @@
1
+ const t = {};
2
+ export {
3
+ t as DescriptionListDefaults
4
+ };
5
+ //# sourceMappingURL=DescriptionListTypes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DescriptionListTypes.js","sources":["../../../../../src/components/Common/UI/DescriptionList/DescriptionListTypes.ts"],"sourcesContent":["import type { ReactNode } from 'react'\n\nexport interface DescriptionListItem {\n term: ReactNode | ReactNode[]\n description: ReactNode | ReactNode[]\n}\n\nexport interface DescriptionListProps {\n items: DescriptionListItem[]\n className?: string\n}\n\nexport const DescriptionListDefaults = {} as const satisfies Partial<DescriptionListProps>\n"],"names":["DescriptionListDefaults"],"mappings":"AAYO,MAAMA,IAA0B,CAAA;"}
@@ -0,0 +1,3 @@
1
+ import "./types/i18next.d.ts"
2
+ export { DescriptionList } from './DescriptionList';
3
+ export type { DescriptionListProps, DescriptionListItem } from './DescriptionListTypes';
@@ -1,84 +1,58 @@
1
- import { jsx as o, jsxs as p } from "react/jsx-runtime";
2
- import { useRef as s, useState as B, useLayoutEffect as E } from "react";
3
- import { Button as g } from "../Button/Button.js";
4
- import { Grid as P } from "../../Grid/Grid.js";
5
- import { DialogDefaults as R } from "./DialogTypes.js";
6
- import r from "./Dialog.module.scss.js";
7
- import { applyMissingDefaults as j } from "../../../../helpers/applyMissingDefaults.js";
8
- import { useContainerBreakpoints as K } from "../../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
9
- import { transitionDuration as M } from "../../../../contexts/ThemeProvider/theme.js";
10
- function Q(h) {
11
- const k = j(h, R), {
12
- isOpen: n,
13
- onClose: t,
14
- onPrimaryActionClick: a,
15
- isDestructive: y,
16
- isPrimaryActionLoading: C,
17
- primaryActionLabel: v,
18
- closeActionLabel: b,
19
- title: l,
20
- children: c,
21
- shouldCloseOnBackdropClick: A
22
- } = k, m = s(null), d = s(null), D = K({
23
- ref: d
24
- }), [x, u] = B(!1), i = s(null), N = D.includes("small") ? ["1fr", "1fr"] : "1fr";
25
- E(() => {
26
- const e = m.current;
27
- if (e)
28
- return i.current && clearTimeout(i.current), n && !e.open ? (e.showModal(), requestAnimationFrame(() => {
29
- e.setAttribute("data-show", "true");
30
- })) : !n && e.open && (u(!0), i.current = setTimeout(() => {
31
- e.close(), e.removeAttribute("data-show"), u(!1);
32
- }, M)), () => {
33
- i.current && clearTimeout(i.current);
34
- };
35
- }, [n]);
36
- const T = (e) => {
37
- e.target === e.currentTarget && A && t?.();
38
- }, w = (e) => {
39
- e.key === "Escape" && t?.();
40
- }, f = () => {
41
- t && t();
42
- }, L = () => {
43
- a && a();
44
- };
1
+ import { jsx as o, jsxs as l, Fragment as D } from "react/jsx-runtime";
2
+ import { useRef as x } from "react";
3
+ import { Button as a } from "../Button/Button.js";
4
+ import { Grid as L } from "../../Grid/Grid.js";
5
+ import { DialogDefaults as P } from "./DialogTypes.js";
6
+ import i from "./Dialog.module.scss.js";
7
+ import { applyMissingDefaults as B } from "../../../../helpers/applyMissingDefaults.js";
8
+ import { useContainerBreakpoints as N } from "../../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
9
+ import { useComponentContext as R } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
10
+ function H(c) {
11
+ const m = B(c, P), {
12
+ isOpen: d,
13
+ onClose: r,
14
+ onPrimaryActionClick: n,
15
+ isDestructive: p,
16
+ isPrimaryActionLoading: f,
17
+ primaryActionLabel: C,
18
+ closeActionLabel: u,
19
+ title: t,
20
+ children: e,
21
+ shouldCloseOnBackdropClick: g
22
+ } = m, h = R(), s = x(null), y = N({
23
+ ref: s
24
+ }).includes("small") ? ["1fr", "1fr"] : "1fr", k = () => {
25
+ r && r();
26
+ }, v = () => {
27
+ n && n();
28
+ }, b = /* @__PURE__ */ l(D, { children: [
29
+ t && /* @__PURE__ */ o("div", { className: i.title, children: t }),
30
+ e && /* @__PURE__ */ o("div", { className: i.body, children: e })
31
+ ] }), A = /* @__PURE__ */ l(L, { gridTemplateColumns: y, gap: 12, className: i.actions, children: [
32
+ /* @__PURE__ */ o(a, { variant: "secondary", onClick: k, children: u }),
33
+ /* @__PURE__ */ o(
34
+ a,
35
+ {
36
+ variant: p ? "error" : "primary",
37
+ onClick: v,
38
+ isLoading: f,
39
+ children: C
40
+ }
41
+ )
42
+ ] });
45
43
  return /* @__PURE__ */ o(
46
- "dialog",
44
+ h.Modal,
47
45
  {
48
- ref: m,
49
- className: r.dialog,
50
- onClose: f,
51
- "data-exiting": x || void 0,
52
- children: /* @__PURE__ */ o(
53
- "div",
54
- {
55
- ref: d,
56
- className: r.backdrop,
57
- onClick: T,
58
- onKeyDown: w,
59
- role: "presentation",
60
- children: /* @__PURE__ */ p("div", { className: r.content, children: [
61
- l && /* @__PURE__ */ o("div", { className: r.title, children: l }),
62
- c && /* @__PURE__ */ o("div", { className: r.body, children: c }),
63
- /* @__PURE__ */ p(P, { gridTemplateColumns: N, gap: 12, className: r.actions, children: [
64
- /* @__PURE__ */ o(g, { variant: "secondary", onClick: f, children: b }),
65
- /* @__PURE__ */ o(
66
- g,
67
- {
68
- variant: y ? "error" : "primary",
69
- onClick: L,
70
- isLoading: C,
71
- children: v
72
- }
73
- )
74
- ] })
75
- ] })
76
- }
77
- )
46
+ isOpen: d,
47
+ onClose: r,
48
+ shouldCloseOnBackdropClick: g,
49
+ containerRef: s,
50
+ footer: A,
51
+ children: b
78
52
  }
79
53
  );
80
54
  }
81
55
  export {
82
- Q as Dialog
56
+ H as Dialog
83
57
  };
84
58
  //# sourceMappingURL=Dialog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.js","sources":["../../../../../src/components/Common/UI/Dialog/Dialog.tsx"],"sourcesContent":["import { useLayoutEffect, useRef, useState } from 'react'\nimport { Button } from '../Button/Button'\nimport { Grid } from '../../Grid/Grid'\nimport { type DialogProps, DialogDefaults } from './DialogTypes'\nimport styles from './Dialog.module.scss'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\nimport { useContainerBreakpoints } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport { transitionDuration } from '@/contexts/ThemeProvider/theme'\n\nexport function Dialog(rawProps: DialogProps) {\n const resolvedProps = applyMissingDefaults(rawProps, DialogDefaults)\n const {\n isOpen,\n onClose,\n onPrimaryActionClick,\n isDestructive,\n isPrimaryActionLoading,\n primaryActionLabel,\n closeActionLabel,\n title,\n children,\n shouldCloseOnBackdropClick,\n } = resolvedProps\n\n const dialogRef = useRef<HTMLDialogElement>(null)\n const backdropRef = useRef<HTMLDivElement>(null)\n const breakpoints = useContainerBreakpoints({\n ref: backdropRef,\n })\n\n const [isExiting, setIsExiting] = useState(false)\n const transitionTimeoutRef = useRef<NodeJS.Timeout | null>(null)\n const gridColumns = breakpoints.includes('small') ? ['1fr', '1fr'] : '1fr'\n\n useLayoutEffect(() => {\n const dialog = dialogRef.current\n if (!dialog) return\n\n if (transitionTimeoutRef.current) {\n clearTimeout(transitionTimeoutRef.current)\n }\n\n if (isOpen && !dialog.open) {\n dialog.showModal()\n requestAnimationFrame(() => {\n dialog.setAttribute('data-show', 'true')\n })\n } else if (!isOpen && dialog.open) {\n setIsExiting(true)\n transitionTimeoutRef.current = setTimeout(() => {\n dialog.close()\n dialog.removeAttribute('data-show')\n setIsExiting(false)\n }, transitionDuration)\n }\n\n return () => {\n if (transitionTimeoutRef.current) {\n clearTimeout(transitionTimeoutRef.current)\n }\n }\n }, [isOpen])\n\n const handleBackdropClick = (event: React.MouseEvent<HTMLDivElement>) => {\n if (event.target === event.currentTarget && shouldCloseOnBackdropClick) {\n onClose?.()\n }\n }\n\n const handleKeyDown = (event: React.KeyboardEvent<HTMLDivElement>) => {\n if (event.key === 'Escape') {\n onClose?.()\n }\n }\n\n const handleClose = () => {\n if (onClose) {\n onClose()\n }\n }\n\n const handlePrimaryAction = () => {\n if (onPrimaryActionClick) {\n onPrimaryActionClick()\n }\n }\n\n return (\n <dialog\n ref={dialogRef}\n className={styles.dialog}\n onClose={handleClose}\n data-exiting={isExiting || undefined}\n >\n <div\n ref={backdropRef}\n className={styles.backdrop}\n onClick={handleBackdropClick}\n onKeyDown={handleKeyDown}\n role=\"presentation\"\n >\n <div className={styles.content}>\n {title && <div className={styles.title}>{title}</div>}\n {children && <div className={styles.body}>{children}</div>}\n <Grid gridTemplateColumns={gridColumns} gap={12} className={styles.actions}>\n <Button variant=\"secondary\" onClick={handleClose}>\n {closeActionLabel}\n </Button>\n <Button\n variant={isDestructive ? 'error' : 'primary'}\n onClick={handlePrimaryAction}\n isLoading={isPrimaryActionLoading}\n >\n {primaryActionLabel}\n </Button>\n </Grid>\n </div>\n </div>\n </dialog>\n )\n}\n"],"names":["Dialog","rawProps","resolvedProps","applyMissingDefaults","DialogDefaults","isOpen","onClose","onPrimaryActionClick","isDestructive","isPrimaryActionLoading","primaryActionLabel","closeActionLabel","title","children","shouldCloseOnBackdropClick","dialogRef","useRef","backdropRef","breakpoints","useContainerBreakpoints","isExiting","setIsExiting","useState","transitionTimeoutRef","gridColumns","useLayoutEffect","dialog","transitionDuration","handleBackdropClick","event","handleKeyDown","handleClose","handlePrimaryAction","jsx","styles","jsxs","Grid","Button"],"mappings":";;;;;;;;;AASO,SAASA,EAAOC,GAAuB;AAC5C,QAAMC,IAAgBC,EAAqBF,GAAUG,CAAc,GAC7D;AAAA,IACJ,QAAAC;AAAA,IACA,SAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,wBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,4BAAAC;AAAA,EAAA,IACEZ,GAEEa,IAAYC,EAA0B,IAAI,GAC1CC,IAAcD,EAAuB,IAAI,GACzCE,IAAcC,EAAwB;AAAA,IAC1C,KAAKF;AAAA,EAAA,CACN,GAEK,CAACG,GAAWC,CAAY,IAAIC,EAAS,EAAK,GAC1CC,IAAuBP,EAA8B,IAAI,GACzDQ,IAAcN,EAAY,SAAS,OAAO,IAAI,CAAC,OAAO,KAAK,IAAI;AAErE,EAAAO,EAAgB,MAAM;AACpB,UAAMC,IAASX,EAAU;AACzB,QAAKW;AAEL,aAAIH,EAAqB,WACvB,aAAaA,EAAqB,OAAO,GAGvClB,KAAU,CAACqB,EAAO,QACpBA,EAAO,UAAA,GACP,sBAAsB,MAAM;AAC1B,QAAAA,EAAO,aAAa,aAAa,MAAM;AAAA,MACzC,CAAC,KACQ,CAACrB,KAAUqB,EAAO,SAC3BL,EAAa,EAAI,GACjBE,EAAqB,UAAU,WAAW,MAAM;AAC9C,QAAAG,EAAO,MAAA,GACPA,EAAO,gBAAgB,WAAW,GAClCL,EAAa,EAAK;AAAA,MACpB,GAAGM,CAAkB,IAGhB,MAAM;AACX,QAAIJ,EAAqB,WACvB,aAAaA,EAAqB,OAAO;AAAA,MAE7C;AAAA,EACF,GAAG,CAAClB,CAAM,CAAC;AAEX,QAAMuB,IAAsB,CAACC,MAA4C;AACvE,IAAIA,EAAM,WAAWA,EAAM,iBAAiBf,KAC1CR,IAAA;AAAA,EAEJ,GAEMwB,IAAgB,CAACD,MAA+C;AACpE,IAAIA,EAAM,QAAQ,YAChBvB,IAAA;AAAA,EAEJ,GAEMyB,IAAc,MAAM;AACxB,IAAIzB,KACFA,EAAA;AAAA,EAEJ,GAEM0B,IAAsB,MAAM;AAChC,IAAIzB,KACFA,EAAA;AAAA,EAEJ;AAEA,SACE,gBAAA0B;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAKlB;AAAA,MACL,WAAWmB,EAAO;AAAA,MAClB,SAASH;AAAA,MACT,gBAAcX,KAAa;AAAA,MAE3B,UAAA,gBAAAa;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,KAAKhB;AAAA,UACL,WAAWiB,EAAO;AAAA,UAClB,SAASN;AAAA,UACT,WAAWE;AAAA,UACX,MAAK;AAAA,UAEL,UAAA,gBAAAK,EAAC,OAAA,EAAI,WAAWD,EAAO,SACpB,UAAA;AAAA,YAAAtB,KAAS,gBAAAqB,EAAC,OAAA,EAAI,WAAWC,EAAO,OAAQ,UAAAtB,GAAM;AAAA,YAC9CC,KAAY,gBAAAoB,EAAC,OAAA,EAAI,WAAWC,EAAO,MAAO,UAAArB,GAAS;AAAA,YACpD,gBAAAsB,EAACC,KAAK,qBAAqBZ,GAAa,KAAK,IAAI,WAAWU,EAAO,SACjE,UAAA;AAAA,cAAA,gBAAAD,EAACI,GAAA,EAAO,SAAQ,aAAY,SAASN,GAClC,UAAApB,GACH;AAAA,cACA,gBAAAsB;AAAA,gBAACI;AAAA,gBAAA;AAAA,kBACC,SAAS7B,IAAgB,UAAU;AAAA,kBACnC,SAASwB;AAAA,kBACT,WAAWvB;AAAA,kBAEV,UAAAC;AAAA,gBAAA;AAAA,cAAA;AAAA,YACH,EAAA,CACF;AAAA,UAAA,EAAA,CACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"Dialog.js","sources":["../../../../../src/components/Common/UI/Dialog/Dialog.tsx"],"sourcesContent":["import { useRef } from 'react'\nimport { Button } from '../Button/Button'\nimport { Grid } from '../../Grid/Grid'\nimport { type DialogProps, DialogDefaults } from './DialogTypes'\nimport styles from './Dialog.module.scss'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\nimport { useContainerBreakpoints } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport function Dialog(rawProps: DialogProps) {\n const resolvedProps = applyMissingDefaults(rawProps, DialogDefaults)\n const {\n isOpen,\n onClose,\n onPrimaryActionClick,\n isDestructive,\n isPrimaryActionLoading,\n primaryActionLabel,\n closeActionLabel,\n title,\n children,\n shouldCloseOnBackdropClick,\n } = resolvedProps\n\n const Components = useComponentContext()\n\n const modalContainerRef = useRef<HTMLDivElement>(null)\n const breakpoints = useContainerBreakpoints({\n ref: modalContainerRef,\n })\n\n const gridColumns = breakpoints.includes('small') ? ['1fr', '1fr'] : '1fr'\n\n const handleClose = () => {\n if (onClose) {\n onClose()\n }\n }\n\n const handlePrimaryAction = () => {\n if (onPrimaryActionClick) {\n onPrimaryActionClick()\n }\n }\n\n const dialogContent = (\n <>\n {title && <div className={styles.title}>{title}</div>}\n {children && <div className={styles.body}>{children}</div>}\n </>\n )\n\n const dialogFooter = (\n <Grid gridTemplateColumns={gridColumns} gap={12} className={styles.actions}>\n <Button variant=\"secondary\" onClick={handleClose}>\n {closeActionLabel}\n </Button>\n <Button\n variant={isDestructive ? 'error' : 'primary'}\n onClick={handlePrimaryAction}\n isLoading={isPrimaryActionLoading}\n >\n {primaryActionLabel}\n </Button>\n </Grid>\n )\n\n return (\n <Components.Modal\n isOpen={isOpen}\n onClose={onClose}\n shouldCloseOnBackdropClick={shouldCloseOnBackdropClick}\n containerRef={modalContainerRef}\n footer={dialogFooter}\n >\n {dialogContent}\n </Components.Modal>\n )\n}\n"],"names":["Dialog","rawProps","resolvedProps","applyMissingDefaults","DialogDefaults","isOpen","onClose","onPrimaryActionClick","isDestructive","isPrimaryActionLoading","primaryActionLabel","closeActionLabel","title","children","shouldCloseOnBackdropClick","Components","useComponentContext","modalContainerRef","useRef","gridColumns","useContainerBreakpoints","handleClose","handlePrimaryAction","dialogContent","jsxs","Fragment","jsx","styles","dialogFooter","Grid","Button"],"mappings":";;;;;;;;;AASO,SAASA,EAAOC,GAAuB;AAC5C,QAAMC,IAAgBC,EAAqBF,GAAUG,CAAc,GAC7D;AAAA,IACJ,QAAAC;AAAA,IACA,SAAAC;AAAA,IACA,sBAAAC;AAAA,IACA,eAAAC;AAAA,IACA,wBAAAC;AAAA,IACA,oBAAAC;AAAA,IACA,kBAAAC;AAAA,IACA,OAAAC;AAAA,IACA,UAAAC;AAAA,IACA,4BAAAC;AAAA,EAAA,IACEZ,GAEEa,IAAaC,EAAA,GAEbC,IAAoBC,EAAuB,IAAI,GAK/CC,IAJcC,EAAwB;AAAA,IAC1C,KAAKH;AAAA,EAAA,CACN,EAE+B,SAAS,OAAO,IAAI,CAAC,OAAO,KAAK,IAAI,OAE/DI,IAAc,MAAM;AACxB,IAAIf,KACFA,EAAA;AAAA,EAEJ,GAEMgB,IAAsB,MAAM;AAChC,IAAIf,KACFA,EAAA;AAAA,EAEJ,GAEMgB,IACJ,gBAAAC,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAb,KAAS,gBAAAc,EAAC,OAAA,EAAI,WAAWC,EAAO,OAAQ,UAAAf,GAAM;AAAA,IAC9CC,KAAY,gBAAAa,EAAC,OAAA,EAAI,WAAWC,EAAO,MAAO,UAAAd,EAAA,CAAS;AAAA,EAAA,GACtD,GAGIe,sBACHC,GAAA,EAAK,qBAAqBV,GAAa,KAAK,IAAI,WAAWQ,EAAO,SACjE,UAAA;AAAA,IAAA,gBAAAD,EAACI,GAAA,EAAO,SAAQ,aAAY,SAAST,GAClC,UAAAV,GACH;AAAA,IACA,gBAAAe;AAAA,MAACI;AAAA,MAAA;AAAA,QACC,SAAStB,IAAgB,UAAU;AAAA,QACnC,SAASc;AAAA,QACT,WAAWb;AAAA,QAEV,UAAAC;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GACF;AAGF,SACE,gBAAAgB;AAAA,IAACX,EAAW;AAAA,IAAX;AAAA,MACC,QAAAV;AAAA,MACA,SAAAC;AAAA,MACA,4BAAAQ;AAAA,MACA,cAAcG;AAAA,MACd,QAAQW;AAAA,MAEP,UAAAL;AAAA,IAAA;AAAA,EAAA;AAGP;"}
@@ -1,18 +1,12 @@
1
- const t = "_dialog_kvl1b_1", o = "_backdrop_kvl1b_21", _ = "_content_kvl1b_31", c = "_title_kvl1b_57", n = "_body_kvl1b_65", l = "_actions_kvl1b_71", s = {
2
- dialog: t,
3
- backdrop: o,
4
- content: _,
5
- title: c,
6
- body: n,
7
- actions: l
1
+ const t = "_title_1geio_1", o = "_body_1geio_10", s = "_actions_1geio_16", e = {
2
+ title: t,
3
+ body: o,
4
+ actions: s
8
5
  };
9
6
  export {
10
- l as actions,
11
- o as backdrop,
12
- n as body,
13
- _ as content,
14
- s as default,
15
- t as dialog,
16
- c as title
7
+ s as actions,
8
+ o as body,
9
+ e as default,
10
+ t as title
17
11
  };
18
12
  //# sourceMappingURL=Dialog.module.scss.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;"}
1
+ {"version":3,"file":"Dialog.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
@@ -1,4 +1,4 @@
1
- import { AnchorHTMLAttributes } from 'react';
1
+ import { AnchorHTMLAttributes, ReactNode } from 'react';
2
2
  export type LinkProps = Pick<AnchorHTMLAttributes<HTMLAnchorElement>,
3
3
  /**
4
4
  * URL that the link points to
@@ -16,10 +16,6 @@ export type LinkProps = Pick<AnchorHTMLAttributes<HTMLAnchorElement>,
16
16
  * Indicates that the link is for downloading a resource
17
17
  */
18
18
  | 'download'
19
- /**
20
- * Content to be displayed inside the link
21
- */
22
- | 'children'
23
19
  /**
24
20
  * Additional CSS class name
25
21
  */
@@ -51,4 +47,9 @@ export type LinkProps = Pick<AnchorHTMLAttributes<HTMLAnchorElement>,
51
47
  /**
52
48
  * Title text shown on hover
53
49
  */
54
- | 'title'>;
50
+ | 'title'> & {
51
+ /**
52
+ * Content to be displayed inside the link
53
+ */
54
+ children?: ReactNode;
55
+ };
@@ -0,0 +1,2 @@
1
+ import { ModalProps } from './ModalTypes';
2
+ export declare function Modal(rawProps: ModalProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,90 @@
1
+ import { jsx as n, jsxs as N } from "react/jsx-runtime";
2
+ import { useRef as s, useState as O, useLayoutEffect as S } from "react";
3
+ import i from "classnames";
4
+ import { ModalDefaults as T } from "./ModalTypes.js";
5
+ import o from "./Modal.module.scss.js";
6
+ import { applyMissingDefaults as B } from "../../../../helpers/applyMissingDefaults.js";
7
+ import { useContainerBreakpoints as E } from "../../../../hooks/useContainerBreakpoints/useContainerBreakpoints.js";
8
+ import { useOverflowDetection as M } from "../../../../hooks/useOverflowDetection/useOverflowDetection.js";
9
+ import { useForkRef as A } from "../../../../hooks/useForkRef/useForkRef.js";
10
+ import { transitionDuration as F } from "../../../../contexts/ThemeProvider/theme.js";
11
+ function Q(g) {
12
+ const h = B(g, T), { isOpen: l, onClose: t, shouldCloseOnBackdropClick: v, children: c, footer: f, containerRef: C } = h, m = s(null), d = s(null), u = s(null), b = A(d, C), w = E({
13
+ ref: d
14
+ }), a = M({
15
+ ref: u
16
+ }), [R, p] = O(!1), r = s(null), k = w.includes("small");
17
+ S(() => {
18
+ const e = m.current;
19
+ if (e)
20
+ return r.current && clearTimeout(r.current), l && !e.open ? (e.showModal(), requestAnimationFrame(() => {
21
+ e.setAttribute("data-show", "true");
22
+ })) : !l && e.open && (p(!0), r.current = setTimeout(() => {
23
+ e.close(), e.removeAttribute("data-show"), p(!1);
24
+ }, F)), () => {
25
+ r.current && clearTimeout(r.current);
26
+ };
27
+ }, [l]);
28
+ const x = (e) => {
29
+ e.target === e.currentTarget && v && t?.();
30
+ }, y = (e) => {
31
+ e.key === "Escape" && t?.();
32
+ }, D = () => {
33
+ t && t();
34
+ };
35
+ return /* @__PURE__ */ n(
36
+ "dialog",
37
+ {
38
+ ref: m,
39
+ className: o.dialog,
40
+ onClose: D,
41
+ "data-exiting": R || void 0,
42
+ children: /* @__PURE__ */ n(
43
+ "div",
44
+ {
45
+ ref: b,
46
+ className: i(o.backdrop, {
47
+ [o.backdropSmall]: k
48
+ }),
49
+ onClick: x,
50
+ onKeyDown: y,
51
+ role: "presentation",
52
+ children: /* @__PURE__ */ N(
53
+ "div",
54
+ {
55
+ ref: u,
56
+ className: i(o.modal, {
57
+ [o.modalSmall]: k,
58
+ [o.modalOverflowing]: a
59
+ }),
60
+ children: [
61
+ c && /* @__PURE__ */ n(
62
+ "div",
63
+ {
64
+ className: i(o.content, {
65
+ [o.contentScrollable]: a
66
+ }),
67
+ children: c
68
+ }
69
+ ),
70
+ f && /* @__PURE__ */ n(
71
+ "div",
72
+ {
73
+ className: i(o.footer, {
74
+ [o.footerFixed]: a
75
+ }),
76
+ children: f
77
+ }
78
+ )
79
+ ]
80
+ }
81
+ )
82
+ }
83
+ )
84
+ }
85
+ );
86
+ }
87
+ export {
88
+ Q as Modal
89
+ };
90
+ //# sourceMappingURL=Modal.js.map