@gusto/embedded-react-sdk 0.26.0 → 0.28.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 (379) hide show
  1. package/CHANGELOG.md +103 -0
  2. package/dist/assets/icons/plus-circle.svg.js +5 -5
  3. package/dist/assets/icons/plus-circle.svg.js.map +1 -1
  4. package/dist/components/Base/Base.js +13 -12
  5. package/dist/components/Base/Base.js.map +1 -1
  6. package/dist/components/Common/DataView/DataCards/DataCards.d.ts +4 -2
  7. package/dist/components/Common/DataView/DataCards/DataCards.js +52 -32
  8. package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
  9. package/dist/components/Common/DataView/DataTable/DataTable.d.ts +3 -2
  10. package/dist/components/Common/DataView/DataTable/DataTable.js +68 -53
  11. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  12. package/dist/components/Common/DataView/DataView.d.ts +4 -2
  13. package/dist/components/Common/DataView/DataView.js +28 -18
  14. package/dist/components/Common/DataView/DataView.js.map +1 -1
  15. package/dist/components/Common/DataView/useDataView.d.ts +6 -1
  16. package/dist/components/Common/DataView/useDataView.js +34 -19
  17. package/dist/components/Common/DataView/useDataView.js.map +1 -1
  18. package/dist/components/Common/DocumentList/DocumentList.js +23 -23
  19. package/dist/components/Common/DocumentList/DocumentList.js.map +1 -1
  20. package/dist/components/Common/DocumentList/DocumentList.module.scss.js +6 -10
  21. package/dist/components/Common/DocumentList/DocumentList.module.scss.js.map +1 -1
  22. package/dist/components/Common/DocumentViewer/DocumentViewer.module.scss.js +12 -12
  23. package/dist/components/Common/InlineSpinner/InlineSpinner.module.scss.js +1 -1
  24. package/dist/components/Common/InternalError/InternalError.module.scss.js +4 -4
  25. package/dist/components/Common/ReorderableList/ReorderableList.module.scss.js +8 -8
  26. package/dist/components/Common/RequirementsList/RequirementsList.module.scss.js +1 -1
  27. package/dist/components/Common/SignatureForm/SignatureForm.js +12 -10
  28. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  29. package/dist/components/Common/SignatureForm/SignatureFormActions.js +3 -2
  30. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  31. package/dist/components/Common/SignatureForm/SignatureFormFields.js +7 -6
  32. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  33. package/dist/components/Common/UI/Alert/Alert.module.scss.js +9 -9
  34. package/dist/components/Common/UI/Banner/Banner.module.scss.js +1 -1
  35. package/dist/components/Common/UI/Breadcrumbs/Breadcrumbs.js +1 -1
  36. package/dist/components/Common/UI/Button/Button.module.scss.js +1 -1
  37. package/dist/components/Common/UI/CalendarPreview/CalendarPreview.module.scss.js +4 -4
  38. package/dist/components/Common/UI/Card/Card.d.ts +1 -1
  39. package/dist/components/Common/UI/Card/Card.js +10 -20
  40. package/dist/components/Common/UI/Card/Card.js.map +1 -1
  41. package/dist/components/Common/UI/Card/Card.module.scss.js +1 -1
  42. package/dist/components/Common/UI/Card/CardTypes.d.ts +4 -4
  43. package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js +1 -1
  44. package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +3 -3
  45. package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +4 -4
  46. package/dist/components/Common/UI/DescriptionList/DescriptionList.module.scss.js +1 -1
  47. package/dist/components/Common/UI/Dialog/Dialog.module.scss.js +2 -2
  48. package/dist/components/Common/UI/FileInput/FileInput.js +1 -1
  49. package/dist/components/Common/UI/FileInput/FileInput.module.scss.js +26 -26
  50. package/dist/components/Common/UI/Input/Input.module.scss.js +8 -8
  51. package/dist/components/Common/UI/Modal/Modal.module.scss.js +12 -12
  52. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +4 -4
  53. package/dist/components/Common/UI/Radio/Radio.module.scss.js +6 -6
  54. package/dist/components/Common/UI/Select/Select.module.scss.js +4 -4
  55. package/dist/components/Common/UI/Table/Table.js +1 -1
  56. package/dist/components/Common/UI/Table/Table.js.map +1 -1
  57. package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
  58. package/dist/components/Common/UI/Tabs/Tabs.module.scss.js +1 -1
  59. package/dist/components/Common/UI/Text/Text.module.scss.js +17 -15
  60. package/dist/components/Common/UI/Text/Text.module.scss.js.map +1 -1
  61. package/dist/components/Common/UI/TextArea/TextArea.module.scss.js +4 -4
  62. package/dist/components/Company/AssignSignatory/AssignSignatory.js +3 -2
  63. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  64. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +4 -3
  65. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  66. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +3 -2
  67. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  68. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +1 -1
  69. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +12 -12
  70. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
  71. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  72. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +3 -2
  73. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  74. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +1 -1
  75. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +1 -1
  76. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
  77. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  78. package/dist/components/Company/AssignSignatory/TitleSelect.js +4 -3
  79. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  80. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
  81. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  82. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -8
  83. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  84. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +7 -5
  85. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  86. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
  87. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  88. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +3 -2
  89. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  90. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -6
  91. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  92. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +7 -5
  93. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  94. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +3 -2
  95. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  96. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +9 -8
  97. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  98. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  99. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  100. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +4 -3
  101. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  102. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  103. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  104. package/dist/components/Company/FederalTaxes/Actions.js +7 -6
  105. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  106. package/dist/components/Company/FederalTaxes/FederalTaxes.js +4 -3
  107. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  108. package/dist/components/Company/FederalTaxes/Form.js +5 -3
  109. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  110. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +6 -5
  111. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  112. package/dist/components/Company/Industry/Actions.js +8 -7
  113. package/dist/components/Company/Industry/Actions.js.map +1 -1
  114. package/dist/components/Company/Industry/Context.js +7 -6
  115. package/dist/components/Company/Industry/Context.js.map +1 -1
  116. package/dist/components/Company/Industry/Edit.js +3 -2
  117. package/dist/components/Company/Industry/Edit.js.map +1 -1
  118. package/dist/components/Company/Locations/LocationForm/Actions.js +7 -6
  119. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  120. package/dist/components/Company/Locations/LocationForm/Form.js +1 -1
  121. package/dist/components/Company/Locations/LocationForm/LocationForm.js +4 -3
  122. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  123. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
  124. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  125. package/dist/components/Company/Locations/LocationsList/Actions.js +3 -2
  126. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  127. package/dist/components/Company/Locations/LocationsList/List.js +7 -6
  128. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  129. package/dist/components/Company/Locations/LocationsList/LocationsList.js +8 -7
  130. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  131. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
  132. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  133. package/dist/components/Company/OnboardingOverview/Completed.js +12 -10
  134. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  135. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +8 -6
  136. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  137. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +8 -7
  138. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  139. package/dist/components/Company/OnboardingOverview/context.js +4 -3
  140. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  141. package/dist/components/Company/PaySchedule/PaySchedule.js +4 -3
  142. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  143. package/dist/components/Company/PaySchedule/_parts/Actions.js +3 -2
  144. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  145. package/dist/components/Company/PaySchedule/_parts/Edit.js +15 -15
  146. package/dist/components/Company/PaySchedule/_parts/Head.js +13 -11
  147. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  148. package/dist/components/Company/PaySchedule/_parts/List.js +15 -13
  149. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  150. package/dist/components/Company/PaySchedule/usePaySchedule.js +6 -5
  151. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  152. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +3 -2
  153. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  154. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
  155. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  156. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +3 -2
  157. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  158. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +3 -2
  159. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  160. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
  161. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  162. package/dist/components/Contractor/Address/Address.js +5 -4
  163. package/dist/components/Contractor/Address/Address.js.map +1 -1
  164. package/dist/components/Contractor/Address/Form.js +1 -1
  165. package/dist/components/Contractor/Address/useAddress.js +6 -5
  166. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  167. package/dist/components/Contractor/ContractorList/index.js +32 -31
  168. package/dist/components/Contractor/ContractorList/index.js.map +1 -1
  169. package/dist/components/Contractor/NewHireReport/NewHireReport.js +14 -13
  170. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  171. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +12 -11
  172. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  173. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +3 -2
  174. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  175. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +4 -3
  176. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  177. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js +4 -2
  178. package/dist/components/Contractor/Payments/CreatePayment/CreatePaymentPresentation.js.map +1 -1
  179. package/dist/components/Contractor/Payments/CreatePayment/EditContractorPaymentPresentation.js +10 -10
  180. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js +9 -7
  181. package/dist/components/Contractor/Payments/CreatePayment/FastAchSubmissionBlockerBanner.js.map +1 -1
  182. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js +9 -8
  183. package/dist/components/Contractor/Payments/CreatePayment/PreviewPresentation.js.map +1 -1
  184. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js +11 -9
  185. package/dist/components/Contractor/Payments/PaymentHistory/PaymentHistoryPresentation.js.map +1 -1
  186. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js +8 -6
  187. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.js.map +1 -1
  188. package/dist/components/Contractor/Payments/PaymentStatement/PaymentStatementPresentation.module.scss.js +14 -14
  189. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js +4 -2
  190. package/dist/components/Contractor/Payments/PaymentSummary/PaymentSummaryPresentation.js.map +1 -1
  191. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js +4 -2
  192. package/dist/components/Contractor/Payments/PaymentsList/PaymentsListPresentation.js.map +1 -1
  193. package/dist/components/Contractor/Profile/ContractorProfileForm.js +15 -15
  194. package/dist/components/Contractor/Profile/ContractorProfileForm.module.scss.js +1 -1
  195. package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
  196. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  197. package/dist/components/Contractor/Submit/Submit.js +21 -20
  198. package/dist/components/Contractor/Submit/Submit.js.map +1 -1
  199. package/dist/components/Employee/Compensation/Actions.js +13 -12
  200. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  201. package/dist/components/Employee/Compensation/Edit.js +17 -16
  202. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  203. package/dist/components/Employee/Compensation/List.js +23 -22
  204. package/dist/components/Employee/Compensation/List.js.map +1 -1
  205. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.d.ts +3 -1
  206. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js +145 -137
  207. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.js.map +1 -1
  208. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.d.ts +2 -1
  209. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js +106 -101
  210. package/dist/components/Employee/Deductions/DeductionsForm/CustomDeductionForm.js.map +1 -1
  211. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +90 -87
  212. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
  213. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.d.ts +2 -1
  214. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js +110 -104
  215. package/dist/components/Employee/Deductions/DeductionsForm/GarnishmentForm.js.map +1 -1
  216. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +51 -45
  217. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -1
  218. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js +31 -30
  219. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.js.map +1 -1
  220. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js +4 -8
  221. package/dist/components/Employee/Deductions/IncludeDeductions/IncludeDeductions.module.scss.js.map +1 -1
  222. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +3 -2
  223. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  224. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +3 -2
  225. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  226. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +4 -2
  227. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  228. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  229. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  230. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +3 -2
  231. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  232. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  233. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  234. package/dist/components/Employee/EmployeeList/Actions.js +7 -6
  235. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  236. package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -3
  237. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  238. package/dist/components/Employee/EmployeeList/Head.js +7 -5
  239. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  240. package/dist/components/Employee/EmployeeList/List.js +3 -2
  241. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  242. package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
  243. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  244. package/dist/components/Employee/FederalTaxes/Actions.js +6 -5
  245. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  246. package/dist/components/Employee/FederalTaxes/FederalForm.js +12 -11
  247. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  248. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js +4 -3
  249. package/dist/components/Employee/FederalTaxes/useFederalTaxes.js.map +1 -1
  250. package/dist/components/Employee/Landing/Landing.js +11 -10
  251. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  252. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  253. package/dist/components/Employee/PaymentMethod/Actions.js +6 -5
  254. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  255. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -4
  256. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  257. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +3 -2
  258. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  259. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +7 -6
  260. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  261. package/dist/components/Employee/PaymentMethod/Split.js +11 -10
  262. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  263. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
  264. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  265. package/dist/components/Employee/Profile/Actions.js +6 -5
  266. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  267. package/dist/components/Employee/Profile/AdminPersonalDetails.js +6 -5
  268. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  269. package/dist/components/Employee/Profile/AdminPersonalDetails.module.scss.js +1 -1
  270. package/dist/components/Employee/Profile/HomeAddress.js +1 -1
  271. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +2 -2
  272. package/dist/components/Employee/Profile/useProfile.js +4 -3
  273. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  274. package/dist/components/Employee/StateTaxes/Actions.js +6 -5
  275. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  276. package/dist/components/Employee/StateTaxes/useStateTaxes.js +4 -3
  277. package/dist/components/Employee/StateTaxes/useStateTaxes.js.map +1 -1
  278. package/dist/components/Employee/Taxes/Actions.js +7 -6
  279. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  280. package/dist/components/Employee/Taxes/FederalForm.js +14 -13
  281. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  282. package/dist/components/Employee/Taxes/useTaxes.js +4 -3
  283. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  284. package/dist/components/Flow/Flow.js +9 -7
  285. package/dist/components/Flow/Flow.js.map +1 -1
  286. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js +17 -16
  287. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.js.map +1 -1
  288. package/dist/components/InformationRequests/InformationRequestForm/InformationRequestForm.module.scss.js +4 -4
  289. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js +41 -39
  290. package/dist/components/InformationRequests/InformationRequestList/InformationRequestList.js.map +1 -1
  291. package/dist/components/InformationRequests/InformationRequests.d.ts +7 -2
  292. package/dist/components/InformationRequests/InformationRequests.js +78 -45
  293. package/dist/components/InformationRequests/InformationRequests.js.map +1 -1
  294. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js +10 -9
  295. package/dist/components/Payroll/ConfirmWireDetails/ConfirmWireDetailsForm/ConfirmWireDetailsForm.js.map +1 -1
  296. package/dist/components/Payroll/ConfirmWireDetails/WireInstructions/WireInstructions.module.scss.js +10 -10
  297. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.d.ts +2 -0
  298. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js +33 -0
  299. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelection.js.map +1 -0
  300. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.d.ts +7 -0
  301. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +39 -0
  302. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -0
  303. package/dist/components/Payroll/OffCycleReasonSelection/index.d.ts +5 -0
  304. package/dist/components/Payroll/OffCycleReasonSelection/types.d.ts +15 -0
  305. package/dist/components/Payroll/OffCycleReasonSelection/types.js +14 -0
  306. package/dist/components/Payroll/OffCycleReasonSelection/types.js.map +1 -0
  307. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateForm.d.ts +2 -0
  308. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateForm.js +35 -0
  309. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateForm.js.map +1 -0
  310. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.d.ts +2 -0
  311. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.js +65 -0
  312. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.js.map +1 -0
  313. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.module.scss.js +18 -0
  314. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormPresentation.module.scss.js.map +1 -0
  315. package/dist/components/Payroll/PayPeriodDateForm/PayPeriodDateFormTypes.d.ts +53 -0
  316. package/dist/components/Payroll/PayPeriodDateForm/index.d.ts +3 -0
  317. package/dist/components/Payroll/PayPeriodDateForm/usePayPeriodDateValidation.d.ts +5 -0
  318. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js +4 -2
  319. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerAlerts.js.map +1 -1
  320. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js +19 -18
  321. package/dist/components/Payroll/PayrollBlocker/components/PayrollBlockerList.js.map +1 -1
  322. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +36 -36
  323. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.module.scss.js +5 -5
  324. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js +21 -19
  325. package/dist/components/Payroll/PayrollEditEmployee/TimeOffField.js.map +1 -1
  326. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js +17 -15
  327. package/dist/components/Payroll/PayrollHistory/PayrollHistoryPresentation.js.map +1 -1
  328. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +26 -24
  329. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -1
  330. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +30 -29
  331. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -1
  332. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js +4 -2
  333. package/dist/components/Payroll/PayrollOverview/SubmissionBlockers/FastAchSubmissionBlockerBanner.js.map +1 -1
  334. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js +3 -2
  335. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.js.map +1 -1
  336. package/dist/components/Payroll/PayrollReceipts/PayrollReceiptsPresentation.module.scss.js +18 -18
  337. package/dist/components/Payroll/RecoveryCases/RecoveryCases.d.ts +4 -1
  338. package/dist/components/Payroll/RecoveryCases/RecoveryCases.js +34 -28
  339. package/dist/components/Payroll/RecoveryCases/RecoveryCases.js.map +1 -1
  340. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +29 -29
  341. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  342. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js +12 -11
  343. package/dist/components/Payroll/RecoveryCases/RecoveryCasesResubmit/RecoveryCasesResubmit.js.map +1 -1
  344. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js +4 -2
  345. package/dist/components/Payroll/RecoveryCases/useRecoveryCaseErrorCode.js.map +1 -1
  346. package/dist/components/Payroll/index.d.ts +4 -0
  347. package/dist/components/Payroll/index.js +12 -8
  348. package/dist/components/Payroll/index.js.map +1 -1
  349. package/dist/components/Payroll/usePreparedPayrollData.js +3 -2
  350. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  351. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +3 -2
  352. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  353. package/dist/contexts/ThemeProvider/theme.d.ts +8 -3
  354. package/dist/contexts/ThemeProvider/theme.js +29 -24
  355. package/dist/contexts/ThemeProvider/theme.js.map +1 -1
  356. package/dist/helpers/dateFormatting.d.ts +3 -0
  357. package/dist/helpers/dateFormatting.js.map +1 -1
  358. package/dist/i18n/I18n.js +1 -1
  359. package/dist/i18n/I18n.js.map +1 -1
  360. package/dist/i18n/en/Employee.Deductions.json.js +157 -161
  361. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  362. package/dist/i18n/en/InformationRequests.InformationRequestList.json.js +18 -14
  363. package/dist/i18n/en/InformationRequests.InformationRequestList.json.js.map +1 -1
  364. package/dist/i18n/en/InformationRequests.json.js +8 -0
  365. package/dist/i18n/en/InformationRequests.json.js.map +1 -0
  366. package/dist/i18n/en/Payroll.OffCycleReasonSelection.json.js +12 -0
  367. package/dist/i18n/en/Payroll.OffCycleReasonSelection.json.js.map +1 -0
  368. package/dist/i18n/en/Payroll.PayPeriodDateForm.json.js +32 -0
  369. package/dist/i18n/en/Payroll.PayPeriodDateForm.json.js.map +1 -0
  370. package/dist/shared/constants.d.ts +4 -0
  371. package/dist/shared/constants.js +10 -8
  372. package/dist/shared/constants.js.map +1 -1
  373. package/dist/style.css +1 -1
  374. package/dist/types/i18next.d.ts +52 -3
  375. package/package.json +11 -11
  376. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js +0 -8
  377. package/dist/components/Employee/Deductions/DeductionsForm/ChildSupportForm.module.scss.js.map +0 -1
  378. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js +0 -14
  379. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.module.scss.js.map +0 -1
@@ -22,7 +22,8 @@ declare const defaultThemeColors: {
22
22
  colorSuccess: string;
23
23
  colorSuccessAccent: string;
24
24
  colorSuccessContent: string;
25
- colorBorder: string;
25
+ colorBorderPrimary: string;
26
+ colorBorderSecondary: string;
26
27
  };
27
28
  export type GustoSDKThemeColors = Partial<typeof defaultThemeColors>;
28
29
  export declare const createTheme: (colors?: GustoSDKThemeColors) => {
@@ -45,7 +46,10 @@ export declare const createTheme: (colors?: GustoSDKThemeColors) => {
45
46
  bannerRadius: string;
46
47
  fontSizeRoot: string;
47
48
  fontFamily: string;
48
- fontLineHeight: string;
49
+ fontLineHeightLarge: string;
50
+ fontLineHeightRegular: string;
51
+ fontLineHeightSmall: string;
52
+ fontLineHeightExtraSmall: string;
49
53
  fontSizeExtraSmall: string;
50
54
  fontSizeSmall: string;
51
55
  fontSizeRegular: string;
@@ -87,7 +91,8 @@ export declare const createTheme: (colors?: GustoSDKThemeColors) => {
87
91
  colorSuccess: string;
88
92
  colorSuccessAccent: string;
89
93
  colorSuccessContent: string;
90
- colorBorder: string;
94
+ colorBorderPrimary: string;
95
+ colorBorderSecondary: string;
91
96
  };
92
97
  export type GustoSDKTheme = Partial<ReturnType<typeof createTheme>>;
93
98
  export declare const mergePartnerTheme: (partnerTheme: GustoSDKTheme) => GustoSDKTheme;
@@ -1,13 +1,14 @@
1
1
  import { toRem as n, getRootFontSize as l } from "../../helpers/rem.js";
2
2
  const o = {
3
3
  neutral: {
4
- 100: "#FFFFFF",
5
- 300: "#F4F4F3",
6
- 400: "#EAEAEA",
7
- 500: "#DCDCDC",
8
- 800: "#414651",
9
- 900: "#525257",
10
- 1e3: "#1C1C1C"
4
+ 25: "#FFFFFF",
5
+ 100: "#F5F5F5",
6
+ 200: "#E9EAEB",
7
+ 300: "#D5D7DA",
8
+ 600: "#535862",
9
+ 700: "#414651",
10
+ 900: "#181D27",
11
+ 1e3: "#0A0D12"
11
12
  },
12
13
  error: {
13
14
  100: "#FEF3F2",
@@ -30,16 +31,16 @@ const o = {
30
31
  800: "#1C1C1C"
31
32
  }
32
33
  }, u = 200, i = {
33
- colorBody: o.neutral[100],
34
- colorBodyAccent: o.neutral[300],
34
+ colorBody: o.neutral[25],
35
+ colorBodyAccent: o.neutral[100],
35
36
  colorBodyContent: o.neutral[1e3],
36
- colorBodySubContent: o.neutral[800],
37
+ colorBodySubContent: o.neutral[700],
37
38
  colorPrimary: o.neutral[1e3],
38
39
  colorPrimaryAccent: o.neutral[900],
39
40
  colorPrimaryContent: o.neutral[100],
40
- colorSecondary: o.neutral[100],
41
- colorSecondaryAccent: o.neutral[400],
42
- colorSecondaryContent: o.neutral[1e3],
41
+ colorSecondary: o.neutral[25],
42
+ colorSecondaryAccent: o.neutral[100],
43
+ colorSecondaryContent: o.neutral[600],
43
44
  colorInfo: o.info[100],
44
45
  colorInfoAccent: o.info[500],
45
46
  colorInfoContent: o.info[800],
@@ -52,14 +53,15 @@ const o = {
52
53
  colorSuccess: o.success[100],
53
54
  colorSuccessAccent: o.success[500],
54
55
  colorSuccessContent: o.success[800],
55
- colorBorder: o.neutral[400]
56
- }, s = (r = {}) => ({
56
+ colorBorderPrimary: o.neutral[300],
57
+ colorBorderSecondary: o.neutral[200]
58
+ }, d = (r = {}) => ({
57
59
  // Colors
58
60
  ...i,
59
61
  ...r,
60
62
  // Input Colors
61
63
  inputBackgroundColor: r.colorBody,
62
- inputBorderColor: o.neutral[500],
64
+ inputBorderColor: o.neutral[300],
63
65
  inputContentColor: r.colorBodyContent,
64
66
  inputBorderWidth: "1px",
65
67
  inputPlaceholderColor: r.colorBodySubContent,
@@ -75,12 +77,15 @@ const o = {
75
77
  inputRadius: n(8),
76
78
  buttonRadius: n(8),
77
79
  cardRadius: n(8),
78
- badgeRadius: n(8),
80
+ badgeRadius: n(6),
79
81
  bannerRadius: n(8),
80
82
  // Font
81
83
  fontSizeRoot: l(),
82
84
  fontFamily: 'system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
83
- fontLineHeight: n(24),
85
+ fontLineHeightLarge: n(28),
86
+ fontLineHeightRegular: n(24),
87
+ fontLineHeightSmall: n(20),
88
+ fontLineHeightExtraSmall: n(18),
84
89
  fontSizeExtraSmall: n(12),
85
90
  fontSizeSmall: n(14),
86
91
  fontSizeRegular: n(16),
@@ -103,19 +108,19 @@ const o = {
103
108
  // Focus
104
109
  focusRingColor: r.colorPrimary,
105
110
  focusRingWidth: "2px"
106
- }), g = (r) => {
107
- const c = Object.entries(i).reduce(
108
- (t, [e, a]) => (t[e] = r[e] || a, t),
111
+ }), C = (r) => {
112
+ const a = Object.entries(i).reduce(
113
+ (e, [t, c]) => (e[t] = r[t] || c, e),
109
114
  {}
110
115
  );
111
116
  return {
112
- ...s(c),
117
+ ...d(a),
113
118
  ...r
114
119
  };
115
120
  };
116
121
  export {
117
- s as createTheme,
118
- g as mergePartnerTheme,
122
+ d as createTheme,
123
+ C as mergePartnerTheme,
119
124
  u as transitionDuration
120
125
  };
121
126
  //# sourceMappingURL=theme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme.js","sources":["../../../src/contexts/ThemeProvider/theme.ts"],"sourcesContent":["import { getRootFontSize, toRem } from '@/helpers/rem'\n\n// Colors are for internal use in our theme currently\n// We don't export them for partner use or overrides\nconst baseColors = {\n neutral: {\n 100: '#FFFFFF',\n 200: '#FBFAFA',\n 300: '#F4F4F3',\n 400: '#EAEAEA',\n 500: '#DCDCDC',\n 600: '#BABABC',\n 700: '#919197',\n 800: '#414651',\n 900: '#525257',\n 1000: '#1C1C1C',\n },\n error: {\n 100: '#FEF3F2',\n 500: '#C5271C',\n 800: '#D92D20',\n },\n warning: {\n 100: '#FFFAF2',\n 500: '#E9B550',\n 700: '#B88023',\n 800: '#B88023',\n },\n success: {\n 100: '#F3FAFB',\n 400: '#2BABAD',\n 500: '#0A8080',\n 800: '#005961',\n },\n info: {\n 100: '#F4F4F3',\n 500: '#DCDCDC',\n 800: '#1C1C1C',\n },\n}\n\nexport const transitionDuration = 200\n\nconst defaultThemeColors = {\n colorBody: baseColors.neutral[100],\n colorBodyAccent: baseColors.neutral[300],\n colorBodyContent: baseColors.neutral[1000],\n colorBodySubContent: baseColors.neutral[800],\n colorPrimary: baseColors.neutral[1000],\n colorPrimaryAccent: baseColors.neutral[900],\n colorPrimaryContent: baseColors.neutral[100],\n colorSecondary: baseColors.neutral[100],\n colorSecondaryAccent: baseColors.neutral[400],\n colorSecondaryContent: baseColors.neutral[1000],\n colorInfo: baseColors.info[100],\n colorInfoAccent: baseColors.info[500],\n colorInfoContent: baseColors.info[800],\n colorWarning: baseColors.warning[100],\n colorWarningAccent: baseColors.warning[500],\n colorWarningContent: baseColors.warning[800],\n colorError: baseColors.error[100],\n colorErrorAccent: baseColors.error[500],\n colorErrorContent: baseColors.error[800],\n colorSuccess: baseColors.success[100],\n colorSuccessAccent: baseColors.success[500],\n colorSuccessContent: baseColors.success[800],\n colorBorder: baseColors.neutral[400],\n}\n\nexport type GustoSDKThemeColors = Partial<typeof defaultThemeColors>\n\nexport const createTheme = (colors: GustoSDKThemeColors = {}) => {\n return {\n // Colors\n ...defaultThemeColors,\n ...colors,\n // Input Colors\n inputBackgroundColor: colors.colorBody,\n inputBorderColor: baseColors.neutral[500],\n inputContentColor: colors.colorBodyContent,\n inputBorderWidth: '1px',\n inputPlaceholderColor: colors.colorBodySubContent,\n inputAdornmentColor: colors.colorBodySubContent,\n inputDisabledBackgroundColor: colors.colorBodyAccent,\n // Field Colors\n inputLabelColor: colors.colorBodyContent,\n inputLabelFontSize: toRem(16),\n inputLabelFontWeight: '500',\n inputDescriptionColor: colors.colorBodySubContent,\n inputErrorColor: colors.colorErrorAccent,\n // Radius\n inputRadius: toRem(8),\n buttonRadius: toRem(8),\n cardRadius: toRem(8),\n badgeRadius: toRem(8),\n bannerRadius: toRem(8),\n // Font\n fontSizeRoot: getRootFontSize(),\n fontFamily: 'system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n fontLineHeight: toRem(24),\n fontSizeExtraSmall: toRem(12),\n fontSizeSmall: toRem(14),\n fontSizeRegular: toRem(16),\n fontSizeLarge: toRem(18),\n fontSizeHeading1: toRem(32),\n fontSizeHeading2: toRem(24),\n fontSizeHeading3: toRem(20),\n fontSizeHeading4: toRem(18),\n fontSizeHeading5: toRem(16),\n fontSizeHeading6: toRem(14),\n fontWeightRegular: '400',\n fontWeightMedium: '500',\n fontWeightSemibold: '600',\n fontWeightBold: '700',\n // Transitions\n transitionDuration: `${transitionDuration}ms`,\n // Shadows\n shadowResting: '0px 1px 2px 0px rgba(10, 13, 18, 0.05)',\n shadowTopmost:\n '0px 4px 6px 0px rgba(28, 28, 28, 0.05), 0px 10px 15px 0px rgba(28, 28, 28, 0.10)',\n // Focus\n focusRingColor: colors.colorPrimary,\n focusRingWidth: '2px',\n }\n}\n\nexport type GustoSDKTheme = Partial<ReturnType<typeof createTheme>>\n\nexport const mergePartnerTheme = (partnerTheme: GustoSDKTheme): GustoSDKTheme => {\n const colors = Object.entries(defaultThemeColors).reduce(\n (acc: GustoSDKThemeColors, [key, value]) => {\n acc[key as keyof typeof defaultThemeColors] =\n partnerTheme[key as keyof typeof defaultThemeColors] || value\n return acc\n },\n {},\n )\n\n const theme = createTheme(colors)\n\n return {\n ...theme,\n ...partnerTheme,\n }\n}\n"],"names":["baseColors","transitionDuration","defaultThemeColors","createTheme","colors","toRem","getRootFontSize","mergePartnerTheme","partnerTheme","acc","key","value"],"mapp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BAAkBA,EAAM,EAAE;AAAA,EAC1B,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,gBAAgB;AAAA;AAAA,EAEhB,oBAAoB,GAAGJ,CAAkB;AAAA;AAAA,EAEzC,eAAe;AAAA,EACf,eACE;AAAA;AAAA,EAEF,gBAAgBG,EAAO;AAAA,EACvB,gBAAgB;AAAA,IAMPG,IAAoB,CAACC,MAA+C;AAC/E,QAAMJ,IAAS,OAAO,QAAQF,CAAkB,EAAE;AAAA,IAChD,CAACO,GAA0B,CAACC,GAAKC,CAAK,OACpCF,EAAIC,CAAsC,IACxCF,EAAaE,CAAsC,KAAKC,GACnDF;AAAA,IAET,CAAA;AAAA,EAAC;AAKH,SAAO;AAAA,IACL,GAHYN,EAAYC,CAAM;AAAA,IAI9B,GAAGI;AAAA,EAAA;AAEP;"}
1
+ {"version":3,"file":"theme.js","sources":["../../../src/contexts/ThemeProvider/theme.ts"],"sourcesContent":["import { getRootFontSize, toRem } from '@/helpers/rem'\n\n// Colors are for internal use in our theme currently\n// We don't export them for partner use or overrides\nconst baseColors = {\n neutral: {\n 25: '#FFFFFF',\n 50: '#FAFAFA',\n 100: '#F5F5F5',\n 200: '#E9EAEB',\n 300: '#D5D7DA',\n 400: '#A4A7AE',\n 500: '#717680',\n 600: '#535862',\n 700: '#414651',\n 800: '#252B37',\n 900: '#181D27',\n 1000: '#0A0D12',\n },\n error: {\n 100: '#FEF3F2',\n 500: '#C5271C',\n 800: '#D92D20',\n },\n warning: {\n 100: '#FFFAF2',\n 500: '#E9B550',\n 700: '#B88023',\n 800: '#B88023',\n },\n success: {\n 100: '#F3FAFB',\n 400: '#2BABAD',\n 500: '#0A8080',\n 800: '#005961',\n },\n info: {\n 100: '#F4F4F3',\n 500: '#DCDCDC',\n 800: '#1C1C1C',\n },\n}\n\nexport const transitionDuration = 200\n\nconst defaultThemeColors = {\n colorBody: baseColors.neutral[25],\n colorBodyAccent: baseColors.neutral[100],\n colorBodyContent: baseColors.neutral[1000],\n colorBodySubContent: baseColors.neutral[700],\n colorPrimary: baseColors.neutral[1000],\n colorPrimaryAccent: baseColors.neutral[900],\n colorPrimaryContent: baseColors.neutral[100],\n colorSecondary: baseColors.neutral[25],\n colorSecondaryAccent: baseColors.neutral[100],\n colorSecondaryContent: baseColors.neutral[600],\n colorInfo: baseColors.info[100],\n colorInfoAccent: baseColors.info[500],\n colorInfoContent: baseColors.info[800],\n colorWarning: baseColors.warning[100],\n colorWarningAccent: baseColors.warning[500],\n colorWarningContent: baseColors.warning[800],\n colorError: baseColors.error[100],\n colorErrorAccent: baseColors.error[500],\n colorErrorContent: baseColors.error[800],\n colorSuccess: baseColors.success[100],\n colorSuccessAccent: baseColors.success[500],\n colorSuccessContent: baseColors.success[800],\n colorBorderPrimary: baseColors.neutral[300],\n colorBorderSecondary: baseColors.neutral[200],\n}\n\nexport type GustoSDKThemeColors = Partial<typeof defaultThemeColors>\n\nexport const createTheme = (colors: GustoSDKThemeColors = {}) => {\n return {\n // Colors\n ...defaultThemeColors,\n ...colors,\n // Input Colors\n inputBackgroundColor: colors.colorBody,\n inputBorderColor: baseColors.neutral[300],\n inputContentColor: colors.colorBodyContent,\n inputBorderWidth: '1px',\n inputPlaceholderColor: colors.colorBodySubContent,\n inputAdornmentColor: colors.colorBodySubContent,\n inputDisabledBackgroundColor: colors.colorBodyAccent,\n // Field Colors\n inputLabelColor: colors.colorBodyContent,\n inputLabelFontSize: toRem(16),\n inputLabelFontWeight: '500',\n inputDescriptionColor: colors.colorBodySubContent,\n inputErrorColor: colors.colorErrorAccent,\n // Radius\n inputRadius: toRem(8),\n buttonRadius: toRem(8),\n cardRadius: toRem(8),\n badgeRadius: toRem(6),\n bannerRadius: toRem(8),\n // Font\n fontSizeRoot: getRootFontSize(),\n fontFamily: 'system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif',\n fontLineHeightLarge: toRem(28),\n fontLineHeightRegular: toRem(24),\n fontLineHeightSmall: toRem(20),\n fontLineHeightExtraSmall: toRem(18),\n fontSizeExtraSmall: toRem(12),\n fontSizeSmall: toRem(14),\n fontSizeRegular: toRem(16),\n fontSizeLarge: toRem(18),\n fontSizeHeading1: toRem(32),\n fontSizeHeading2: toRem(24),\n fontSizeHeading3: toRem(20),\n fontSizeHeading4: toRem(18),\n fontSizeHeading5: toRem(16),\n fontSizeHeading6: toRem(14),\n fontWeightRegular: '400',\n fontWeightMedium: '500',\n fontWeightSemibold: '600',\n fontWeightBold: '700',\n // Transitions\n transitionDuration: `${transitionDuration}ms`,\n // Shadows\n shadowResting: '0px 1px 2px 0px rgba(10, 13, 18, 0.05)',\n shadowTopmost:\n '0px 4px 6px 0px rgba(28, 28, 28, 0.05), 0px 10px 15px 0px rgba(28, 28, 28, 0.10)',\n // Focus\n focusRingColor: colors.colorPrimary,\n focusRingWidth: '2px',\n }\n}\n\nexport type GustoSDKTheme = Partial<ReturnType<typeof createTheme>>\n\nexport const mergePartnerTheme = (partnerTheme: GustoSDKTheme): GustoSDKTheme => {\n const colors = Object.entries(defaultThemeColors).reduce(\n (acc: GustoSDKThemeColors, [key, value]) => {\n acc[key as keyof typeof defaultThemeColors] =\n partnerTheme[key as keyof typeof defaultThemeColors] || value\n return acc\n },\n {},\n )\n\n const theme = createTheme(colors)\n\n return {\n ...theme,\n ...partnerTheme,\n }\n}\n"],"names":["baseColors","transitionDuration","defaultThemeColors","createTheme","colors","toRem","getRootFontSize","mergePartnerTheme","partnerTheme","acc","key","value"],"mappings":";AAIA,MAAMA,IAAa;AAAA,EACjB,SAAS;AAAA,IACP,IAAI;AAAA,IAEJ,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IAGL,KAAK;AAAA,IACL,KAAK;AAAA,IAEL,KAAK;AAAA,IACL,KAAM;AAAA,EAAA;AAAA,EAER,OAAO;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,EAAA;AAAA,EAEP,SAAS;AAA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BAAoB,GAAGJ,CAAkB;AAAA;AAAA,EAEzC,eAAe;AAAA,EACf,eACE;AAAA;AAAA,EAEF,gBAAgBG,EAAO;AAAA,EACvB,gBAAgB;AAAA,IAMPG,IAAoB,CAACC,MAA+C;AAC/E,QAAMJ,IAAS,OAAO,QAAQF,CAAkB,EAAE;AAAA,IAChD,CAACO,GAA0B,CAACC,GAAKC,CAAK,OACpCF,EAAIC,CAAsC,IACxCF,EAAaE,CAAsC,KAAKC,GACnDF;AAAA,IAET,CAAA;AAAA,EAAC;AAKH,SAAO;AAAA,IACL,GAHYN,EAAYC,CAAM;AAAA,IAI9B,GAAGI;AAAA,EAAA;AAEP;"}
@@ -30,3 +30,6 @@ export declare const normalizeDateToLocal: (date: Date | null) => Date | null;
30
30
  export declare const MS_PER_HOUR: number;
31
31
  export declare const getHoursUntil: (deadline?: Date | string | null) => number | null;
32
32
  export declare const getDaysUntil: (deadline?: Date | string | null) => number | null;
33
+ export declare const isWeekend: (date: Date) => boolean;
34
+ export declare const addDays: (date: Date, days: number) => Date;
35
+ export declare const addBusinessDays: (startDate: Date, businessDays: number) => Date;
@@ -1 +1 @@
1
- {"version":3,"file":"dateFormatting.js","sources":["../../src/helpers/dateFormatting.ts"],"sourcesContent":["/**\n * Normalizes any date input (string, Date, or undefined) to a Date object.\n * Handles YYYY-MM-DD strings by parsing them in local timezone to avoid timezone issues.\n * Also handles ISO timestamp strings for compatibility.\n * Returns null for invalid inputs.\n */\nexport const normalizeToDate = (dateInput?: string | Date | null): Date | null => {\n if (!dateInput) return null\n\n if (typeof dateInput === 'string') {\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(dateInput)) {\n const parts = dateInput.split('-')\n if (parts.length !== 3) return null\n\n const numbers = parts.map(Number)\n const year = numbers[0]\n const month = numbers[1]\n const day = numbers[2]\n if (year === undefined || month === undefined || day === undefined) {\n return null\n }\n\n if (\n isNaN(year) ||\n isNaN(month) ||\n isNaN(day) ||\n month < 1 ||\n month > 12 ||\n day < 1 ||\n day > 31\n ) {\n return null\n }\n\n return new Date(year, month - 1, day)\n }\n\n const parsedDate = new Date(dateInput)\n return isNaN(parsedDate.getTime()) ? null : parsedDate\n }\n\n if (dateInput instanceof Date) {\n return isNaN(dateInput.getTime()) ? null : dateInput\n }\n\n return null\n}\n\n/**\n * Creates a date formatter function that handles both string and Date inputs.\n */\nconst createDateFormatter =\n (options: Intl.DateTimeFormatOptions) =>\n (dateInput?: string | Date | null, locale?: string): string => {\n const date = normalizeToDate(dateInput)\n if (!date) return ''\n return date.toLocaleDateString(locale, options)\n }\n\nexport const formatDateShortWithWeekday = createDateFormatter({\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n})\n\nexport const formatDateShortWithWeekdayAndYear = createDateFormatter({\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n})\n\nexport const formatDateShort = createDateFormatter({\n month: 'short',\n day: 'numeric',\n})\n\nexport const formatDateShortWithYear = createDateFormatter({\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n})\n\nexport const formatDateLong = createDateFormatter({\n month: 'long',\n day: 'numeric',\n})\n\nexport const formatDateLongWithYear = createDateFormatter({\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n})\n\nexport const formatDateWithTime = (\n dateInput?: string | Date | null,\n locale?: string,\n): { time: string; date: string } => {\n const date = normalizeToDate(dateInput)\n if (!date) return { time: '', date: '' }\n\n const time = date.toLocaleTimeString(locale, {\n hour: 'numeric',\n minute: '2-digit',\n hour12: true,\n timeZoneName: 'short',\n })\n\n const dateString = date.toLocaleDateString(locale, {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n })\n\n return { time, date: dateString }\n}\n\nexport const formatPayPeriod = (\n startDateInput?: string | Date | null,\n endDateInput?: string | Date | null,\n locale?: string,\n): { startDate: string; endDate: string } => {\n const startDate = normalizeToDate(startDateInput)\n const endDate = normalizeToDate(endDateInput)\n\n if (!startDate || !endDate) {\n return { startDate: '', endDate: '' }\n }\n\n const startFormatted = startDate.toLocaleDateString(locale, {\n month: 'long',\n day: 'numeric',\n })\n\n const endFormatted = endDate.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n })\n\n return { startDate: startFormatted, endDate: endFormatted }\n}\n\nexport const formatPayPeriodRange = (\n startDateInput?: string | Date | null,\n endDateInput?: string | Date | null,\n locale?: string,\n options?: { useShortMonth?: boolean },\n): string => {\n const startDate = normalizeToDate(startDateInput)\n const endDate = normalizeToDate(endDateInput)\n\n if (!startDate || !endDate) return ''\n\n const monthFormat = options?.useShortMonth ? 'short' : 'long'\n\n const startFormatted = startDate.toLocaleDateString(locale, {\n month: monthFormat,\n day: 'numeric',\n })\n\n const endFormatted = endDate.toLocaleDateString(locale, {\n month: monthFormat,\n day: 'numeric',\n year: 'numeric',\n })\n\n return `${startFormatted}–${endFormatted}`\n}\n\nexport const formatDateToStringDate = (date: Date): string | null => {\n if (isNaN(date.getTime())) {\n return null\n }\n return date.toISOString().split('T')[0] || null\n}\n\n/**\n * Normalizes Date to local midnight, handling timezone issues from any adapter.\n */\nexport const normalizeDateToLocal = (date: Date | null): Date | null => {\n if (!date || isNaN(date.getTime())) {\n return null\n }\n\n const isoString = date.toISOString()\n const [datePart] = isoString.split('T')\n if (!datePart) return null\n\n const parts = datePart.split('-')\n if (parts.length !== 3) return null\n const numbers = parts.map(Number)\n const year = numbers[0]!\n const month = numbers[1]!\n const day = numbers[2]!\n if (isNaN(year) || isNaN(month) || isNaN(day) || month < 1 || month > 12 || day < 1 || day > 31) {\n return null\n }\n\n return new Date(year, month - 1, day)\n}\n\nexport const MS_PER_HOUR = 1000 * 60 * 60\nconst MS_PER_DAY = MS_PER_HOUR * 24\n\nexport const getHoursUntil = (deadline?: Date | string | null): number | null => {\n const deadlineDate = normalizeToDate(deadline)\n if (!deadlineDate) return null\n\n const now = new Date()\n const timeDiffMs = deadlineDate.getTime() - now.getTime()\n return timeDiffMs / MS_PER_HOUR\n}\n\nexport const getDaysUntil = (deadline?: Date | string | null): number | null => {\n const deadlineDate = normalizeToDate(deadline)\n if (!deadlineDate) return null\n\n const now = new Date()\n const timeDiffMs = deadlineDate.getTime() - now.getTime()\n return timeDiffMs / MS_PER_DAY\n}\n"],"names":["normalizeToDate","dateInput","parts","numbers","year","month","day","parsedDate","createDateFormatter","options","locale","date","formatDateShortWithWeekday","formatDateShortWithWeekdayAndYear","formatDateShort","formatDateShortWithYear","formatDateLong","formatDateLongWithYear","formatDateWithTime","time","dateString","formatPayPeriod","startDateInput","endDateInput","startDate","endDate","startFormatted","endFormatted","formatPayPeriodRange","monthFormat","formatDateToStringDate","normalizeDateToLocal","isoString","datePart","MS_PER_HOUR","MS_PER_DAY","getHoursUntil","deadline","deadlineDate","now","getDaysUntil"],"mappings":"AAMO,MAAMA,IAAkB,CAACC,MAAkD;AAChF,MAAI,CAACA,EAAW,QAAO;AAEvB,MAAI,OAAOA,KAAc,UAAU;AACjC,QAAI,sBAAsB,KAAKA,CAAS,GAAG;AACzC,YAAMC,IAAQD,EAAU,MAAM,GAAG;AACjC,UAAIC,EAAM,WAAW,EAAG,QAAO;AAE/B,YAAMC,IAAUD,EAAM,IAAI,MAAM,GAC1BE,IAAOD,EAAQ,CAAC,GAChBE,IAAQF,EAAQ,CAAC,GACjBG,IAAMH,EAAQ,CAAC;AAKrB,aAJIC,MAAS,UAAaC,MAAU,UAAaC,MAAQ,UAKvD,MAAMF,CAAI,KACV,MAAMC,CAAK,KACX,MAAMC,CAAG,KACTD,IAAQ,KACRA,IAAQ,MACRC,IAAM,KACNA,IAAM,KAEC,OAGF,IAAI,KAAKF,GAAMC,IAAQ,GAAGC,CAAG;AAAA,IACtC;AAEA,UAAMC,IAAa,IAAI,KAAKN,CAAS;AACrC,WAAO,MAAMM,EAAW,QAAA,CAAS,IAAI,OAAOA;AAAA,EAC9C;AAEA,SAAIN,aAAqB,OAChB,MAAMA,EAAU,QAAA,CAAS,IAAI,OAAOA,IAGtC;AACT,GAKMO,IACJ,CAACC,MACD,CAACR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C,CAAI,KAAK,MAAMC,CAAK,KAAK,MAAMC,CAAG,KAAKD,IAAQ,KAAKA,IAAQ,MAAMC,IAAM,KAAKA,IAAM,KACpF,OAGF,IAAI,KAAKF,GAAMC,IAAQ,GAAGC,CAAG;AACtC,GAEa4B,IAAc,MAAO,KAAK,IACjCC,IAAaD,IAAc,IAEpBE,IAAgB,CAACC,MAAmD;AAC/E,QAAMC,IAAetC,EAAgBqC,CAAQ;AAC7C,MAAI,CAACC,EAAc,QAAO;AAE1B,QAAMC,wBAAU,KAAA;AAEhB,UADmBD,EAAa,QAAA,IAAYC,EAAI,QAAA,KAC5BL;AACtB,GAEaM,IAAe,CAACH,MAAmD;AAC9E,QAAMC,IAAetC,EAAgBqC,CAAQ;AAC7C,MAAI,CAACC,EAAc,QAAO;AAE1B,QAAMC,wBAAU,KAAA;AAEhB,UADmBD,EAAa,QAAA,IAAYC,EAAI,QAAA,KAC5BJ;AACtB;"}
1
+ {"version":3,"file":"dateFormatting.js","sources":["../../src/helpers/dateFormatting.ts"],"sourcesContent":["/**\n * Normalizes any date input (string, Date, or undefined) to a Date object.\n * Handles YYYY-MM-DD strings by parsing them in local timezone to avoid timezone issues.\n * Also handles ISO timestamp strings for compatibility.\n * Returns null for invalid inputs.\n */\nexport const normalizeToDate = (dateInput?: string | Date | null): Date | null => {\n if (!dateInput) return null\n\n if (typeof dateInput === 'string') {\n if (/^\\d{4}-\\d{2}-\\d{2}$/.test(dateInput)) {\n const parts = dateInput.split('-')\n if (parts.length !== 3) return null\n\n const numbers = parts.map(Number)\n const year = numbers[0]\n const month = numbers[1]\n const day = numbers[2]\n if (year === undefined || month === undefined || day === undefined) {\n return null\n }\n\n if (\n isNaN(year) ||\n isNaN(month) ||\n isNaN(day) ||\n month < 1 ||\n month > 12 ||\n day < 1 ||\n day > 31\n ) {\n return null\n }\n\n return new Date(year, month - 1, day)\n }\n\n const parsedDate = new Date(dateInput)\n return isNaN(parsedDate.getTime()) ? null : parsedDate\n }\n\n if (dateInput instanceof Date) {\n return isNaN(dateInput.getTime()) ? null : dateInput\n }\n\n return null\n}\n\n/**\n * Creates a date formatter function that handles both string and Date inputs.\n */\nconst createDateFormatter =\n (options: Intl.DateTimeFormatOptions) =>\n (dateInput?: string | Date | null, locale?: string): string => {\n const date = normalizeToDate(dateInput)\n if (!date) return ''\n return date.toLocaleDateString(locale, options)\n }\n\nexport const formatDateShortWithWeekday = createDateFormatter({\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n})\n\nexport const formatDateShortWithWeekdayAndYear = createDateFormatter({\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n})\n\nexport const formatDateShort = createDateFormatter({\n month: 'short',\n day: 'numeric',\n})\n\nexport const formatDateShortWithYear = createDateFormatter({\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n})\n\nexport const formatDateLong = createDateFormatter({\n month: 'long',\n day: 'numeric',\n})\n\nexport const formatDateLongWithYear = createDateFormatter({\n month: 'long',\n day: 'numeric',\n year: 'numeric',\n})\n\nexport const formatDateWithTime = (\n dateInput?: string | Date | null,\n locale?: string,\n): { time: string; date: string } => {\n const date = normalizeToDate(dateInput)\n if (!date) return { time: '', date: '' }\n\n const time = date.toLocaleTimeString(locale, {\n hour: 'numeric',\n minute: '2-digit',\n hour12: true,\n timeZoneName: 'short',\n })\n\n const dateString = date.toLocaleDateString(locale, {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n })\n\n return { time, date: dateString }\n}\n\nexport const formatPayPeriod = (\n startDateInput?: string | Date | null,\n endDateInput?: string | Date | null,\n locale?: string,\n): { startDate: string; endDate: string } => {\n const startDate = normalizeToDate(startDateInput)\n const endDate = normalizeToDate(endDateInput)\n\n if (!startDate || !endDate) {\n return { startDate: '', endDate: '' }\n }\n\n const startFormatted = startDate.toLocaleDateString(locale, {\n month: 'long',\n day: 'numeric',\n })\n\n const endFormatted = endDate.toLocaleDateString(locale, {\n month: 'short',\n day: 'numeric',\n year: 'numeric',\n })\n\n return { startDate: startFormatted, endDate: endFormatted }\n}\n\nexport const formatPayPeriodRange = (\n startDateInput?: string | Date | null,\n endDateInput?: string | Date | null,\n locale?: string,\n options?: { useShortMonth?: boolean },\n): string => {\n const startDate = normalizeToDate(startDateInput)\n const endDate = normalizeToDate(endDateInput)\n\n if (!startDate || !endDate) return ''\n\n const monthFormat = options?.useShortMonth ? 'short' : 'long'\n\n const startFormatted = startDate.toLocaleDateString(locale, {\n month: monthFormat,\n day: 'numeric',\n })\n\n const endFormatted = endDate.toLocaleDateString(locale, {\n month: monthFormat,\n day: 'numeric',\n year: 'numeric',\n })\n\n return `${startFormatted}–${endFormatted}`\n}\n\nexport const formatDateToStringDate = (date: Date): string | null => {\n if (isNaN(date.getTime())) {\n return null\n }\n return date.toISOString().split('T')[0] || null\n}\n\n/**\n * Normalizes Date to local midnight, handling timezone issues from any adapter.\n */\nexport const normalizeDateToLocal = (date: Date | null): Date | null => {\n if (!date || isNaN(date.getTime())) {\n return null\n }\n\n const isoString = date.toISOString()\n const [datePart] = isoString.split('T')\n if (!datePart) return null\n\n const parts = datePart.split('-')\n if (parts.length !== 3) return null\n const numbers = parts.map(Number)\n const year = numbers[0]!\n const month = numbers[1]!\n const day = numbers[2]!\n if (isNaN(year) || isNaN(month) || isNaN(day) || month < 1 || month > 12 || day < 1 || day > 31) {\n return null\n }\n\n return new Date(year, month - 1, day)\n}\n\nexport const MS_PER_HOUR = 1000 * 60 * 60\nconst MS_PER_DAY = MS_PER_HOUR * 24\n\nexport const getHoursUntil = (deadline?: Date | string | null): number | null => {\n const deadlineDate = normalizeToDate(deadline)\n if (!deadlineDate) return null\n\n const now = new Date()\n const timeDiffMs = deadlineDate.getTime() - now.getTime()\n return timeDiffMs / MS_PER_HOUR\n}\n\nexport const getDaysUntil = (deadline?: Date | string | null): number | null => {\n const deadlineDate = normalizeToDate(deadline)\n if (!deadlineDate) return null\n\n const now = new Date()\n const timeDiffMs = deadlineDate.getTime() - now.getTime()\n return timeDiffMs / MS_PER_DAY\n}\n\nexport const isWeekend = (date: Date): boolean => {\n const day = date.getDay()\n return day === 0 || day === 6\n}\n\nexport const addDays = (date: Date, days: number): Date => {\n const result = new Date(date)\n result.setDate(result.getDate() + days)\n return result\n}\n\nexport const addBusinessDays = (startDate: Date, businessDays: number): Date => {\n let currentDate = new Date(startDate)\n currentDate.setHours(0, 0, 0, 0)\n let daysAdded = 0\n\n while (daysAdded < businessDays) {\n currentDate = addDays(currentDate, 1)\n if (!isWeekend(currentDate)) {\n daysAdded++\n }\n }\n\n return currentDate\n}\n"],"names":["normalizeToDate","dateInput","parts","numbers","year","month","day","parsedDate","createDateFormatter","options","locale","date","formatDateShortWithWeekday","formatDateShortWithWeekdayAndYear","formatDateShort","formatDateShortWithYear","formatDateLong","formatDateLongWithYear","formatDateWithTime","time","dateString","formatPayPeriod","startDateInput","endDateInput","startDate","endDate","startFormatted","endFormatted","formatPayPeriodRange","monthFormat","formatDateToStringDate","normalizeDateToLocal","isoString","datePart","MS_PER_HOUR","MS_PER_DAY","getHoursUntil","deadline","deadlineDate","now","getDaysUntil"],"mappings":"AAMO,MAAMA,IAAkB,CAACC,MAAkD;AAChF,MAAI,CAACA,EAAW,QAAO;AAEvB,MAAI,OAAOA,KAAc,UAAU;AACjC,QAAI,sBAAsB,KAAKA,CAAS,GAAG;AACzC,YAAMC,IAAQD,EAAU,MAAM,GAAG;AACjC,UAAIC,EAAM,WAAW,EAAG,QAAO;AAE/B,YAAMC,IAAUD,EAAM,IAAI,MAAM,GAC1BE,IAAOD,EAAQ,CAAC,GAChBE,IAAQF,EAAQ,CAAC,GACjBG,IAAMH,EAAQ,CAAC;AAKrB,aAJIC,MAAS,UAAaC,MAAU,UAAaC,MAAQ,UAKvD,MAAMF,CAAI,KACV,MAAMC,CAAK,KACX,MAAMC,CAAG,KACTD,IAAQ,KACRA,IAAQ,MACRC,IAAM,KACNA,IAAM,KAEC,OAGF,IAAI,KAAKF,GAAMC,IAAQ,GAAGC,CAAG;AAAA,IACtC;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,IAAQ+B,EAAS,MAAM,GAAG;AAChC,MAAI/B,EAAM,WAAW,EAAG,QAAO;AAC/B,QAAMC,IAAUD,EAAM,IAAI,MAAM,GAC1BE,IAAOD,EAAQ,CAAC,GAChBE,IAAQF,EAAQ,CAAC,GACjBG,IAAMH,EAAQ,CAAC;AACrB,SAAI,MAAMC,CAAI,KAAK,MAAMC,CAAK,KAAK,MAAMC,CAAG,KAAKD,IAAQ,KAAKA,IAAQ,MAAMC,IAAM,KAAKA,IAAM,KACpF,OAGF,IAAI,KAAKF,GAAMC,IAAQ,GAAGC,CAAG;AACtC,GAEa4B,IAAc,MAAO,KAAK,IACjCC,IAAaD,IAAc,IAEpBE,IAAgB,CAACC,MAAmD;AAC/E,QAAMC,IAAetC,EAAgBqC,CAAQ;AAC7C,MAAI,CAACC,EAAc,QAAO;AAE1B,QAAMC,wBAAU,KAAA;AAEhB,UADmBD,EAAa,QAAA,IAAYC,EAAI,QAAA,KAC5BL;AACtB,GAEaM,IAAe,CAACH,MAAmD;AAC9E,QAAMC,IAAetC,EAAgBqC,CAAQ;AAC7C,MAAI,CAACC,EAAc,QAAO;AAE1B,QAAMC,wBAAU,KAAA;AAEhB,UADmBD,EAAa,QAAA,IAAYC,EAAI,QAAA,KAC5BJ;AACtB;"}
package/dist/i18n/I18n.js CHANGED
@@ -5,7 +5,7 @@ const d = "common", i = new y(50), c = ({ lng: e = "en", ns: o }) => {
5
5
  let r = !0, n = !1, t;
6
6
  const m = (async () => {
7
7
  try {
8
- t = (await p(/* @__PURE__ */ Object.assign({ "./en/Company.Addresses.json": () => import("./en/Company.Addresses.json.js"), "./en/Company.AssignSignatory.json": () => import("./en/Company.AssignSignatory.json.js"), "./en/Company.BankAccount.json": () => import("./en/Company.BankAccount.json.js"), "./en/Company.DocumentList.json": () => import("./en/Company.DocumentList.json.js"), "./en/Company.FederalTaxes.json": () => import("./en/Company.FederalTaxes.json.js"), "./en/Company.Industry.json": () => import("./en/Company.Industry.json.js"), "./en/Company.Locations.json": () => import("./en/Company.Locations.json.js"), "./en/Company.OnboardingOverview.json": () => import("./en/Company.OnboardingOverview.json.js"), "./en/Company.PaySchedule.json": () => import("./en/Company.PaySchedule.json.js"), "./en/Company.SignatureForm.json": () => import("./en/Company.SignatureForm.json.js"), "./en/Company.StateTaxes.json": () => import("./en/Company.StateTaxes.json.js"), "./en/Contractor.Address.json": () => import("./en/Contractor.Address.json.js"), "./en/Contractor.ContractorList.json": () => import("./en/Contractor.ContractorList.json.js"), "./en/Contractor.NewHireReport.json": () => import("./en/Contractor.NewHireReport.json.js"), "./en/Contractor.PaymentMethod.json": () => import("./en/Contractor.PaymentMethod.json.js"), "./en/Contractor.Payments.CreatePayment.json": () => import("./en/Contractor.Payments.CreatePayment.json.js"), "./en/Contractor.Payments.PaymentHistory.json": () => import("./en/Contractor.Payments.PaymentHistory.json.js"), "./en/Contractor.Payments.PaymentStatement.json": () => import("./en/Contractor.Payments.PaymentStatement.json.js"), "./en/Contractor.Payments.PaymentSummary.json": () => import("./en/Contractor.Payments.PaymentSummary.json.js"), "./en/Contractor.Payments.PaymentsList.json": () => import("./en/Contractor.Payments.PaymentsList.json.js"), "./en/Contractor.Profile.json": () => import("./en/Contractor.Profile.json.js"), "./en/Contractor.Submit.json": () => import("./en/Contractor.Submit.json.js"), "./en/Employee.BankAccount.json": () => import("./en/Employee.BankAccount.json.js"), "./en/Employee.Compensation.json": () => import("./en/Employee.Compensation.json.js"), "./en/Employee.Deductions.json": () => import("./en/Employee.Deductions.json.js"), "./en/Employee.DocumentSigner.json": () => import("./en/Employee.DocumentSigner.json.js"), "./en/Employee.EmployeeList.json": () => import("./en/Employee.EmployeeList.json.js"), "./en/Employee.EmploymentEligibility.json": () => import("./en/Employee.EmploymentEligibility.json.js"), "./en/Employee.FederalTaxes.json": () => import("./en/Employee.FederalTaxes.json.js"), "./en/Employee.HomeAddress.json": () => import("./en/Employee.HomeAddress.json.js"), "./en/Employee.Landing.json": () => import("./en/Employee.Landing.json.js"), "./en/Employee.OnboardingSummary.json": () => import("./en/Employee.OnboardingSummary.json.js"), "./en/Employee.PaySchedules.json": () => import("./en/Employee.PaySchedules.json.js"), "./en/Employee.PaymentMethod.json": () => import("./en/Employee.PaymentMethod.json.js"), "./en/Employee.Profile.json": () => import("./en/Employee.Profile.json.js"), "./en/Employee.SplitPaycheck.json": () => import("./en/Employee.SplitPaycheck.json.js"), "./en/Employee.StateTaxes.json": () => import("./en/Employee.StateTaxes.json.js"), "./en/Employee.Taxes.json": () => import("./en/Employee.Taxes.json.js"), "./en/InformationRequests.InformationRequestForm.json": () => import("./en/InformationRequests.InformationRequestForm.json.js"), "./en/InformationRequests.InformationRequestList.json": () => import("./en/InformationRequests.InformationRequestList.json.js"), "./en/Payroll.Common.json": () => import("./en/Payroll.Common.json.js"), "./en/Payroll.ConfirmWireDetailsBanner.json": () => import("./en/Payroll.ConfirmWireDetailsBanner.json.js"), "./en/Payroll.ConfirmWireDetailsForm.json": () => import("./en/Payroll.ConfirmWireDetailsForm.json.js"), "./en/Payroll.PayrollBlocker.json": () => import("./en/Payroll.PayrollBlocker.json.js"), "./en/Payroll.PayrollConfiguration.json": () => import("./en/Payroll.PayrollConfiguration.json.js"), "./en/Payroll.PayrollEditEmployee.json": () => import("./en/Payroll.PayrollEditEmployee.json.js"), "./en/Payroll.PayrollFlow.json": () => import("./en/Payroll.PayrollFlow.json.js"), "./en/Payroll.PayrollHistory.json": () => import("./en/Payroll.PayrollHistory.json.js"), "./en/Payroll.PayrollLanding.json": () => import("./en/Payroll.PayrollLanding.json.js"), "./en/Payroll.PayrollList.json": () => import("./en/Payroll.PayrollList.json.js"), "./en/Payroll.PayrollOverview.json": () => import("./en/Payroll.PayrollOverview.json.js"), "./en/Payroll.PayrollReceipts.json": () => import("./en/Payroll.PayrollReceipts.json.js"), "./en/Payroll.RecoveryCasesList.json": () => import("./en/Payroll.RecoveryCasesList.json.js"), "./en/Payroll.RecoveryCasesResubmit.json": () => import("./en/Payroll.RecoveryCasesResubmit.json.js"), "./en/Payroll.WireInstructions.json": () => import("./en/Payroll.WireInstructions.json.js"), "./en/common.json": () => import("./en/common.json.js") }), `./${e}/${o}.json`, 3)).default, r = !1;
8
+ t = (await p(/* @__PURE__ */ Object.assign({ "./en/Company.Addresses.json": () => import("./en/Company.Addresses.json.js"), "./en/Company.AssignSignatory.json": () => import("./en/Company.AssignSignatory.json.js"), "./en/Company.BankAccount.json": () => import("./en/Company.BankAccount.json.js"), "./en/Company.DocumentList.json": () => import("./en/Company.DocumentList.json.js"), "./en/Company.FederalTaxes.json": () => import("./en/Company.FederalTaxes.json.js"), "./en/Company.Industry.json": () => import("./en/Company.Industry.json.js"), "./en/Company.Locations.json": () => import("./en/Company.Locations.json.js"), "./en/Company.OnboardingOverview.json": () => import("./en/Company.OnboardingOverview.json.js"), "./en/Company.PaySchedule.json": () => import("./en/Company.PaySchedule.json.js"), "./en/Company.SignatureForm.json": () => import("./en/Company.SignatureForm.json.js"), "./en/Company.StateTaxes.json": () => import("./en/Company.StateTaxes.json.js"), "./en/Contractor.Address.json": () => import("./en/Contractor.Address.json.js"), "./en/Contractor.ContractorList.json": () => import("./en/Contractor.ContractorList.json.js"), "./en/Contractor.NewHireReport.json": () => import("./en/Contractor.NewHireReport.json.js"), "./en/Contractor.PaymentMethod.json": () => import("./en/Contractor.PaymentMethod.json.js"), "./en/Contractor.Payments.CreatePayment.json": () => import("./en/Contractor.Payments.CreatePayment.json.js"), "./en/Contractor.Payments.PaymentHistory.json": () => import("./en/Contractor.Payments.PaymentHistory.json.js"), "./en/Contractor.Payments.PaymentStatement.json": () => import("./en/Contractor.Payments.PaymentStatement.json.js"), "./en/Contractor.Payments.PaymentSummary.json": () => import("./en/Contractor.Payments.PaymentSummary.json.js"), "./en/Contractor.Payments.PaymentsList.json": () => import("./en/Contractor.Payments.PaymentsList.json.js"), "./en/Contractor.Profile.json": () => import("./en/Contractor.Profile.json.js"), "./en/Contractor.Submit.json": () => import("./en/Contractor.Submit.json.js"), "./en/Employee.BankAccount.json": () => import("./en/Employee.BankAccount.json.js"), "./en/Employee.Compensation.json": () => import("./en/Employee.Compensation.json.js"), "./en/Employee.Deductions.json": () => import("./en/Employee.Deductions.json.js"), "./en/Employee.DocumentSigner.json": () => import("./en/Employee.DocumentSigner.json.js"), "./en/Employee.EmployeeList.json": () => import("./en/Employee.EmployeeList.json.js"), "./en/Employee.EmploymentEligibility.json": () => import("./en/Employee.EmploymentEligibility.json.js"), "./en/Employee.FederalTaxes.json": () => import("./en/Employee.FederalTaxes.json.js"), "./en/Employee.HomeAddress.json": () => import("./en/Employee.HomeAddress.json.js"), "./en/Employee.Landing.json": () => import("./en/Employee.Landing.json.js"), "./en/Employee.OnboardingSummary.json": () => import("./en/Employee.OnboardingSummary.json.js"), "./en/Employee.PaySchedules.json": () => import("./en/Employee.PaySchedules.json.js"), "./en/Employee.PaymentMethod.json": () => import("./en/Employee.PaymentMethod.json.js"), "./en/Employee.Profile.json": () => import("./en/Employee.Profile.json.js"), "./en/Employee.SplitPaycheck.json": () => import("./en/Employee.SplitPaycheck.json.js"), "./en/Employee.StateTaxes.json": () => import("./en/Employee.StateTaxes.json.js"), "./en/Employee.Taxes.json": () => import("./en/Employee.Taxes.json.js"), "./en/InformationRequests.InformationRequestForm.json": () => import("./en/InformationRequests.InformationRequestForm.json.js"), "./en/InformationRequests.InformationRequestList.json": () => import("./en/InformationRequests.InformationRequestList.json.js"), "./en/InformationRequests.json": () => import("./en/InformationRequests.json.js"), "./en/Payroll.Common.json": () => import("./en/Payroll.Common.json.js"), "./en/Payroll.ConfirmWireDetailsBanner.json": () => import("./en/Payroll.ConfirmWireDetailsBanner.json.js"), "./en/Payroll.ConfirmWireDetailsForm.json": () => import("./en/Payroll.ConfirmWireDetailsForm.json.js"), "./en/Payroll.OffCycleReasonSelection.json": () => import("./en/Payroll.OffCycleReasonSelection.json.js"), "./en/Payroll.PayPeriodDateForm.json": () => import("./en/Payroll.PayPeriodDateForm.json.js"), "./en/Payroll.PayrollBlocker.json": () => import("./en/Payroll.PayrollBlocker.json.js"), "./en/Payroll.PayrollConfiguration.json": () => import("./en/Payroll.PayrollConfiguration.json.js"), "./en/Payroll.PayrollEditEmployee.json": () => import("./en/Payroll.PayrollEditEmployee.json.js"), "./en/Payroll.PayrollFlow.json": () => import("./en/Payroll.PayrollFlow.json.js"), "./en/Payroll.PayrollHistory.json": () => import("./en/Payroll.PayrollHistory.json.js"), "./en/Payroll.PayrollLanding.json": () => import("./en/Payroll.PayrollLanding.json.js"), "./en/Payroll.PayrollList.json": () => import("./en/Payroll.PayrollList.json.js"), "./en/Payroll.PayrollOverview.json": () => import("./en/Payroll.PayrollOverview.json.js"), "./en/Payroll.PayrollReceipts.json": () => import("./en/Payroll.PayrollReceipts.json.js"), "./en/Payroll.RecoveryCasesList.json": () => import("./en/Payroll.RecoveryCasesList.json.js"), "./en/Payroll.RecoveryCasesResubmit.json": () => import("./en/Payroll.RecoveryCasesResubmit.json.js"), "./en/Payroll.WireInstructions.json": () => import("./en/Payroll.WireInstructions.json.js"), "./en/common.json": () => import("./en/common.json.js") }), `./${e}/${o}.json`, 3)).default, r = !1;
9
9
  } catch {
10
10
  n = !0, r = !1;
11
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"I18n.js","sources":["../../src/i18n/I18n.ts"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { CustomTypeOptions } from 'i18next'\nimport { LRUCache } from '@/helpers/LRUCache'\nimport type { ResourceDictionary, Resources } from '@/types/Helpers'\n\nexport const defaultNS = 'common'\n\n//LRU cache holding requested resources\nconst resourceCache = new LRUCache(50)\n/**\n * Dynamic loading of translation resources - works with Suspence to prevent early access to loadable strings\n * @param lng(string): resource language\n * @param ns(string): Namespace/name of the component/resource\n * @returns Promise<Translation resource>\n */\nconst loadResource = ({ lng = 'en', ns }: { ns: string; lng?: string }) => {\n let isLoading = true\n let isError = false\n let resource: Record<string, string>\n\n const importResources = async () => {\n try {\n const module = await import(`@/i18n/${lng}/${ns}.json`)\n\n resource = module.default\n isLoading = false\n } catch (err) {\n isError = true\n isLoading = false\n }\n }\n const promise = importResources()\n return () => {\n if (isLoading) {\n // eslint-disable-next-line @typescript-eslint/only-throw-error\n throw promise // Throw the promise to indicate Suspense should suspend.\n } else if (isError) {\n throw new Error(`Error loading translation for component: ${ns}`) // Handle error\n } else {\n return resource // Return the resource when loading is complete\n }\n }\n}\n\n/**\n * Hook that allows component to load custom dictionary\n * @param @private {string} ns - Namespace - should match component name exactly - not exposed to consumers\n */\nexport const useI18n = (\n namespaces:\n | keyof CustomTypeOptions['resources']\n | Array<keyof CustomTypeOptions['resources']>\n | null,\n) => {\n //Getting our instance of i18n -> supplied by the provider set in GustoApiProvider\n const { i18n: i18nInstance } = useTranslation()\n //Abort when namespace is not provided\n if (!namespaces) return\n const nsMap = Array.isArray(namespaces) ? namespaces : [namespaces]\n for (const ns of nsMap) {\n const key = `${i18nInstance.resolvedLanguage}:${ns}`\n //Skip loading default resource if it is already in cache\n if (resourceCache.get(key) === null) {\n //If resource not in cache, initiate loading and add getter to cache\n resourceCache.put(key, loadResource({ lng: i18nInstance.resolvedLanguage, ns: ns }))\n }\n //Get resourceGetter from cache\n const resourceGetter = resourceCache.get(key)\n if (resourceGetter) {\n const resource = resourceGetter()\n i18nInstance.addResourceBundle(\n i18nInstance.resolvedLanguage ?? 'en',\n ns,\n resource,\n true,\n false,\n ) //Last argument is set to false to prevent override of keys provided by partners on GustoApiProvider level through dictionary prop\n }\n }\n}\n\n//Used by individual components to override their dictionaries with partner provided resources\nexport const useComponentDictionary = <K extends keyof Resources>(\n ns: keyof CustomTypeOptions['resources'],\n resource?: ResourceDictionary<K> | null,\n) => {\n const { i18n: i18nInstance } = useTranslation()\n if (resource) {\n for (const lang in resource) {\n i18nInstance.addResourceBundle(lang, ns, resource[lang], true, true)\n }\n }\n}\n"],"names":["defaultNS","resourceCache","LRUCache","loadResource","lng","ns","isLoading","isError","resource","promise","__variableDynamicImportRuntimeHelper","useI18n","namespaces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;AACF,eAAWW,KAAQX;AACjB,MAAAK,EAAa,kBAAkBM,GAAMd,GAAIG,EAASW,CAAI,GAAG,IAAM,EAAI;AAGzE;"}
1
+ {"version":3,"file":"I18n.js","sources":["../../src/i18n/I18n.ts"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport type { CustomTypeOptions } from 'i18next'\nimport { LRUCache } from '@/helpers/LRUCache'\nimport type { ResourceDictionary, Resources } from '@/types/Helpers'\n\nexport const defaultNS = 'common'\n\n//LRU cache holding requested resources\nconst resourceCache = new LRUCache(50)\n/**\n * Dynamic loading of translation resources - works with Suspence to prevent early access to loadable strings\n * @param lng(string): resource language\n * @param ns(string): Namespace/name of the component/resource\n * @returns Promise<Translation resource>\n */\nconst loadResource = ({ lng = 'en', ns }: { ns: string; lng?: string }) => {\n let isLoading = true\n let isError = false\n let resource: Record<string, string>\n\n const importResources = async () => {\n try {\n const module = await import(`@/i18n/${lng}/${ns}.json`)\n\n resource = module.default\n isLoading = false\n } catch (err) {\n isError = true\n isLoading = false\n }\n }\n const promise = importResources()\n return () => {\n if (isLoading) {\n // eslint-disable-next-line @typescript-eslint/only-throw-error\n throw promise // Throw the promise to indicate Suspense should suspend.\n } else if (isError) {\n throw new Error(`Error loading translation for component: ${ns}`) // Handle error\n } else {\n return resource // Return the resource when loading is complete\n }\n }\n}\n\n/**\n * Hook that allows component to load custom dictionary\n * @param @private {string} ns - Namespace - should match component name exactly - not exposed to consumers\n */\nexport const useI18n = (\n namespaces:\n | keyof CustomTypeOptions['resources']\n | Array<keyof CustomTypeOptions['resources']>\n | null,\n) => {\n //Getting our instance of i18n -> supplied by the provider set in GustoApiProvider\n const { i18n: i18nInstance } = useTranslation()\n //Abort when namespace is not provided\n if (!namespaces) return\n const nsMap = Array.isArray(namespaces) ? namespaces : [namespaces]\n for (const ns of nsMap) {\n const key = `${i18nInstance.resolvedLanguage}:${ns}`\n //Skip loading default resource if it is already in cache\n if (resourceCache.get(key) === null) {\n //If resource not in cache, initiate loading and add getter to cache\n resourceCache.put(key, loadResource({ lng: i18nInstance.resolvedLanguage, ns: ns }))\n }\n //Get resourceGetter from cache\n const resourceGetter = resourceCache.get(key)\n if (resourceGetter) {\n const resource = resourceGetter()\n i18nInstance.addResourceBundle(\n i18nInstance.resolvedLanguage ?? 'en',\n ns,\n resource,\n true,\n false,\n ) //Last argument is set to false to prevent override of keys provided by partners on GustoApiProvider level through dictionary prop\n }\n }\n}\n\n//Used by individual components to override their dictionaries with partner provided resources\nexport const useComponentDictionary = <K extends keyof Resources>(\n ns: keyof CustomTypeOptions['resources'],\n resource?: ResourceDictionary<K> | null,\n) => {\n const { i18n: i18nInstance } = useTranslation()\n if (resource) {\n for (const lang in resource) {\n i18nInstance.addResourceBundle(lang, ns, resource[lang], true, true)\n }\n }\n}\n"],"names":["defaultNS","resourceCache","LRUCache","loadResource","lng","ns","isLoading","isError","resource","promise","__variableDynamicImportRuntimeHelper","useI18n","namespaces","i18nInstance","useTranslation","nsMap","key","resourceGetter","useComponentDictionary","lang"],"mappings":";;;AAKO,MAAMA,IAAY,UAGnBC,IAAgB,IAAIC,EAAS,EAAE,GAO/BC,IAAe,CAAC,EAAE,KAAAC,IAAM,MAAM,IAAAC,QAAuC;AACzE,MAAIC,IAAY,IACZC,IAAU,IACVC;AAaJ,QAAMC,KAXkB,YAAY;AAClC,QAAI;AAGF,MAAAD,KAFe,MAAME,gzKAAA,KAAAN,CAAA,IAAAC,CAAA,SAAA,CAAA,GAEH,SAClBC,IAAY;AAAA,IACd,QAAc;AACZ,MAAAC,IAAU,IACVD,IAAY;AAAA,IACd;AAAA,EACF,GACgB;AAChB,SAAO,MAAM;AACX,QAAIA;AAEF,YAAMG;QACGF;AACT,YAAM,IAAI,MAAM,4CAA4CF,CAAE,EAAE;AAEhE,WAAOG;AAAA,EAEX;AACF,GAMaG,IAAU,CACrBC,MAIG;AAEH,QAAM,EAAE,MAAMC,EAAA,IAAiBC,EAAA;AAE/B,MAAI,CAACF,EAAY;AACjB,QAA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