@gusto/embedded-react-sdk 0.11.3 → 0.12.1

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 (368) hide show
  1. package/CHANGELOG.md +181 -0
  2. package/dist/components/Base/Base.js +18 -19
  3. package/dist/components/Base/Base.js.map +1 -1
  4. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +1 -1
  5. package/dist/components/Common/DocumentList/DocumentList.module.scss.js +1 -1
  6. package/dist/components/Common/DocumentViewer/DocumentViewer.module.scss.js +1 -1
  7. package/dist/components/Common/EmptyData/EmptyData.module.scss.js +1 -1
  8. package/dist/components/Common/FieldErrorMessage/FieldErrorMessage.module.scss.js +1 -1
  9. package/dist/components/Common/FieldLayout/FieldLayout.module.scss.js +6 -6
  10. package/dist/components/Common/Flex/Flex.d.ts +2 -2
  11. package/dist/components/Common/Flex/Flex.js +5 -5
  12. package/dist/components/Common/Flex/Flex.js.map +1 -1
  13. package/dist/components/Common/Form/Form.module.scss.js +2 -2
  14. package/dist/components/Common/Grid/Grid.d.ts +2 -2
  15. package/dist/components/Common/Grid/Grid.js +13 -13
  16. package/dist/components/Common/Grid/Grid.js.map +1 -1
  17. package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.module.scss.js +12 -12
  18. package/dist/components/Common/InternalError/InternalError.module.scss.js +1 -1
  19. package/dist/components/Common/Loading/Loading.module.scss.js +1 -1
  20. package/dist/components/Common/PaginationControl/PaginationControl.module.scss.js +1 -1
  21. package/dist/components/Common/ReorderableList/ReorderableList.module.scss.js +15 -15
  22. package/dist/components/Common/RequirementsList/RequirementsList.module.scss.js +1 -1
  23. package/dist/components/Common/SignatureForm/SignatureForm.js +4 -6
  24. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  25. package/dist/components/Common/SignatureForm/SignatureForm.module.scss.js +6 -6
  26. package/dist/components/Common/SignatureForm/SignatureFormActions.js +10 -12
  27. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  28. package/dist/components/Common/SignatureForm/SignatureFormFields.js +6 -8
  29. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  30. package/dist/components/Common/UI/Alert/Alert.module.scss.js +1 -1
  31. package/dist/components/Common/UI/Badge/Badge.module.scss.js +1 -1
  32. package/dist/components/Common/UI/Button/Button.module.scss.js +1 -1
  33. package/dist/components/Common/UI/Button/ButtonIcon.module.scss.js +1 -1
  34. package/dist/components/Common/UI/CalendarPreview/CalendarPreview.module.scss.js +5 -5
  35. package/dist/components/Common/UI/Card/Card.module.scss.js +1 -1
  36. package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js +8 -8
  37. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.module.scss.js +1 -1
  38. package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +1 -1
  39. package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +5 -5
  40. package/dist/components/Common/UI/Input/Input.module.scss.js +7 -7
  41. package/dist/components/Common/UI/Link/Link.module.scss.js +1 -1
  42. package/dist/components/Common/UI/List/List.module.scss.js +1 -1
  43. package/dist/components/Common/UI/Menu/Menu.module.scss.js +5 -5
  44. package/dist/components/Common/UI/NumberInput/NumberInput.js +36 -38
  45. package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
  46. package/dist/components/Common/UI/ProgressBar/ProgressBar.d.ts +1 -1
  47. package/dist/components/Common/UI/ProgressBar/ProgressBar.js +19 -9
  48. package/dist/components/Common/UI/ProgressBar/ProgressBar.js.map +1 -1
  49. package/dist/components/Common/UI/ProgressBar/ProgressBar.module.scss.js +1 -1
  50. package/dist/components/Common/UI/ProgressBar/ProgressBarTypes.d.ts +4 -0
  51. package/dist/components/Common/UI/Radio/Radio.module.scss.js +1 -1
  52. package/dist/components/Common/UI/RadioGroup/RadioGroup.module.scss.js +1 -1
  53. package/dist/components/Common/UI/Select/Select.module.scss.js +1 -1
  54. package/dist/components/Common/UI/Switch/Switch.module.scss.js +4 -4
  55. package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
  56. package/dist/components/Common/UI/Text/Text.module.scss.js +14 -14
  57. package/dist/components/Company/AssignSignatory/AssignSignatory.js +2 -3
  58. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  59. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -8
  60. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  61. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -10
  62. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  63. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +11 -11
  64. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +1 -1
  65. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -8
  66. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  67. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +1 -1
  68. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +1 -1
  69. package/dist/components/Company/AssignSignatory/TitleSelect.js +7 -8
  70. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  71. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +1 -1
  72. package/dist/components/Company/BankAccount/BankAccount.js +6 -6
  73. package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
  74. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +8 -9
  75. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  76. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +7 -7
  77. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
  78. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +9 -11
  79. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  80. package/dist/components/Company/BankAccount/BankAccountForm/context.js +1 -1
  81. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +10 -12
  82. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  83. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js +3 -3
  84. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js.map +1 -1
  85. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +11 -13
  86. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  87. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +4 -6
  88. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  89. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -7
  90. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  91. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +6 -7
  92. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  93. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +1 -1
  94. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +2 -3
  95. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  96. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
  97. package/dist/components/Company/FederalTaxes/Actions.js +7 -9
  98. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  99. package/dist/components/Company/FederalTaxes/FederalTaxes.js +6 -7
  100. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  101. package/dist/components/Company/FederalTaxes/Form.js +3 -5
  102. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  103. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +1 -1
  104. package/dist/components/Company/Industry/Actions.js +5 -7
  105. package/dist/components/Company/Industry/Actions.js.map +1 -1
  106. package/dist/components/Company/Industry/Context.js +1 -1
  107. package/dist/components/Company/Industry/Edit.js +10 -12
  108. package/dist/components/Company/Industry/Edit.js.map +1 -1
  109. package/dist/components/Company/Locations/LocationForm/Actions.js +6 -8
  110. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  111. package/dist/components/Company/Locations/LocationForm/Form.js +1 -1
  112. package/dist/components/Company/Locations/LocationForm/LocationForm.js +3 -4
  113. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  114. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +1 -1
  115. package/dist/components/Company/Locations/LocationsList/Actions.js +6 -8
  116. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  117. package/dist/components/Company/Locations/LocationsList/List.js +2 -4
  118. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  119. package/dist/components/Company/Locations/LocationsList/LocationsList.js +8 -9
  120. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  121. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +1 -1
  122. package/dist/components/Company/OnboardingOverview/Completed.js +12 -14
  123. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  124. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +6 -8
  125. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  126. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +2 -3
  127. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  128. package/dist/components/Company/OnboardingOverview/context.js +1 -1
  129. package/dist/components/Company/PaySchedule/PaySchedule.js +3 -4
  130. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  131. package/dist/components/Company/PaySchedule/_parts/Actions.js +10 -12
  132. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  133. package/dist/components/Company/PaySchedule/_parts/Edit.js +14 -14
  134. package/dist/components/Company/PaySchedule/_parts/Edit.module.scss.js +1 -1
  135. package/dist/components/Company/PaySchedule/_parts/Head.js +6 -8
  136. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  137. package/dist/components/Company/PaySchedule/_parts/List.js +13 -15
  138. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  139. package/dist/components/Company/PaySchedule/usePaySchedule.js +1 -1
  140. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -7
  141. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  142. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +8 -8
  143. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
  144. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +1 -1
  145. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -8
  146. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  147. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -7
  148. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  149. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +1 -1
  150. package/dist/components/Contractor/Address/Address.js +4 -5
  151. package/dist/components/Contractor/Address/Address.js.map +1 -1
  152. package/dist/components/Contractor/Address/Form.js +1 -1
  153. package/dist/components/Contractor/Address/useAddress.js +1 -1
  154. package/dist/components/Contractor/ContractorList/index.d.ts +16 -0
  155. package/dist/components/Contractor/ContractorList/index.js +124 -0
  156. package/dist/components/Contractor/ContractorList/index.js.map +1 -0
  157. package/dist/components/Contractor/{List → ContractorList}/useContractorList.d.ts +1 -3
  158. package/dist/components/Contractor/{List → ContractorList}/useContractorList.js +9 -10
  159. package/dist/components/Contractor/ContractorList/useContractorList.js.map +1 -0
  160. package/dist/components/Contractor/NewHireReport/NewHireReport.js +16 -17
  161. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  162. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.d.ts +2 -0
  163. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js +26 -0
  164. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -0
  165. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.d.ts +27 -0
  166. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js +91 -0
  167. package/dist/components/Contractor/OnboardingFlow/OnboardingFlowComponents.js.map +1 -0
  168. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.d.ts +9 -0
  169. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js +137 -0
  170. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -0
  171. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +5 -7
  172. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  173. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +2 -3
  174. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  175. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +2 -3
  176. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  177. package/dist/components/Contractor/Profile/ContractorProfile.js +38 -17
  178. package/dist/components/Contractor/Profile/ContractorProfile.js.map +1 -1
  179. package/dist/components/Contractor/Profile/ContractorProfileForm.d.ts +3 -1
  180. package/dist/components/Contractor/Profile/ContractorProfileForm.js +73 -74
  181. package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +1 -1
  182. package/dist/components/Contractor/Profile/useContractorProfile.d.ts +29 -28
  183. package/dist/components/Contractor/Profile/useContractorProfile.js +158 -151
  184. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  185. package/dist/components/Contractor/Submit/Submit.d.ts +7 -0
  186. package/dist/components/Contractor/Submit/Submit.js +76 -0
  187. package/dist/components/Contractor/Submit/Submit.js.map +1 -0
  188. package/dist/components/Contractor/Submit/SubmitDone.js +11 -11
  189. package/dist/components/Contractor/Submit/SubmitDone.js.map +1 -1
  190. package/dist/components/Contractor/index.d.ts +3 -2
  191. package/dist/components/Contractor/index.js +10 -8
  192. package/dist/components/Contractor/index.js.map +1 -1
  193. package/dist/components/Employee/Compensation/Actions.js +5 -6
  194. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  195. package/dist/components/Employee/Compensation/Edit.js +14 -15
  196. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  197. package/dist/components/Employee/Compensation/List.js +23 -25
  198. package/dist/components/Employee/Compensation/List.js.map +1 -1
  199. package/dist/components/Employee/Deductions/Deductions.d.ts +8 -14
  200. package/dist/components/Employee/Deductions/Deductions.js +47 -140
  201. package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
  202. package/dist/components/Employee/Deductions/DeductionsComponents.d.ts +23 -0
  203. package/dist/components/Employee/Deductions/DeductionsComponents.js +31 -0
  204. package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -0
  205. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +41 -0
  206. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +134 -0
  207. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -0
  208. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.d.ts +6 -0
  209. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +98 -0
  210. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -0
  211. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.d.ts +15 -0
  212. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +48 -0
  213. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +1 -0
  214. package/dist/components/Employee/Deductions/stateMachine.d.ts +7 -0
  215. package/dist/components/Employee/Deductions/stateMachine.js +107 -0
  216. package/dist/components/Employee/Deductions/stateMachine.js.map +1 -0
  217. package/dist/components/Employee/Deductions/useDeductions.d.ts +2 -2
  218. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -8
  219. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  220. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +6 -7
  221. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  222. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +2 -4
  223. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  224. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +1 -1
  225. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +7 -8
  226. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  227. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +1 -1
  228. package/dist/components/Employee/EmployeeList/Actions.js +4 -6
  229. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  230. package/dist/components/Employee/EmployeeList/EmployeeList.js +3 -4
  231. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  232. package/dist/components/Employee/EmployeeList/Head.js +5 -7
  233. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  234. package/dist/components/Employee/EmployeeList/List.js +14 -15
  235. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  236. package/dist/components/Employee/EmployeeList/useEmployeeList.js +1 -1
  237. package/dist/components/Employee/Landing/Landing.js +12 -13
  238. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  239. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  240. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.module.scss.js +6 -6
  241. package/dist/components/Employee/PaymentMethod/Actions.js +7 -9
  242. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  243. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +5 -6
  244. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  245. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +8 -10
  246. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  247. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +2 -3
  248. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  249. package/dist/components/Employee/PaymentMethod/Split.js +10 -11
  250. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  251. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +1 -1
  252. package/dist/components/Employee/Profile/Actions.js +7 -9
  253. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  254. package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +6 -6
  255. package/dist/components/Employee/Profile/AdminPersonalDetails.js +9 -10
  256. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  257. package/dist/components/Employee/Profile/HomeAddress.js +1 -1
  258. package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +2 -2
  259. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +2 -2
  260. package/dist/components/Employee/Profile/useProfile.js +1 -1
  261. package/dist/components/Employee/Taxes/Actions.js +8 -10
  262. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  263. package/dist/components/Employee/Taxes/FederalForm.js +12 -14
  264. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  265. package/dist/components/Employee/Taxes/useTaxes.js +1 -1
  266. package/dist/components/Flow/Flow.js +15 -13
  267. package/dist/components/Flow/Flow.js.map +1 -1
  268. package/dist/components/Flow/useFlow.d.ts +1 -0
  269. package/dist/components/Flow/useFlow.js.map +1 -1
  270. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.d.ts +6 -0
  271. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js +41 -0
  272. package/dist/components/Payroll/PayrollConfiguration/PayrollConfiguration.js.map +1 -0
  273. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.d.ts +11 -0
  274. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js +78 -0
  275. package/dist/components/Payroll/PayrollConfiguration/PayrollConfigurationPresentation.js.map +1 -0
  276. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.d.ts +6 -0
  277. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js +19 -0
  278. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployee.js.map +1 -0
  279. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.d.ts +5 -0
  280. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js +21 -0
  281. package/dist/components/Payroll/PayrollEditEmployee/PayrollEditEmployeePresentation.js.map +1 -0
  282. package/dist/components/Payroll/PayrollList/PayrollList.d.ts +6 -0
  283. package/dist/components/Payroll/PayrollList/PayrollList.js +17 -0
  284. package/dist/components/Payroll/PayrollList/PayrollList.js.map +1 -0
  285. package/dist/components/Payroll/PayrollList/PayrollListPresentation.d.ts +9 -0
  286. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js +49 -0
  287. package/dist/components/Payroll/PayrollList/PayrollListPresentation.js.map +1 -0
  288. package/dist/components/Payroll/PayrollOverview/PayrollOverview.d.ts +7 -0
  289. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js +32 -0
  290. package/dist/components/Payroll/PayrollOverview/PayrollOverview.js.map +1 -0
  291. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.d.ts +6 -0
  292. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js +68 -0
  293. package/dist/components/Payroll/PayrollOverview/PayrollOverviewPresentation.js.map +1 -0
  294. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.d.ts +16 -0
  295. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js +55 -0
  296. package/dist/components/Payroll/RunPayrollFlow/RunPayroll.js.map +1 -0
  297. package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.d.ts +6 -0
  298. package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js +20 -0
  299. package/dist/components/Payroll/RunPayrollFlow/RunPayrollFlow.js.map +1 -0
  300. package/dist/components/Payroll/index.d.ts +6 -0
  301. package/dist/components/Payroll/index.js +13 -0
  302. package/dist/components/Payroll/index.js.map +1 -0
  303. package/dist/components/index.d.ts +1 -0
  304. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +3 -3
  305. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +5 -7
  306. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  307. package/dist/contexts/ThemeProvider/ThemeProvider.d.ts +1 -5
  308. package/dist/contexts/ThemeProvider/ThemeProvider.js +18 -60
  309. package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
  310. package/dist/contexts/ThemeProvider/theme.d.ts +42 -11
  311. package/dist/contexts/ThemeProvider/theme.js +31 -15
  312. package/dist/contexts/ThemeProvider/theme.js.map +1 -1
  313. package/dist/helpers/responsive.d.ts +0 -3
  314. package/dist/helpers/responsive.js +20 -34
  315. package/dist/helpers/responsive.js.map +1 -1
  316. package/dist/i18n/I18n.js +1 -1
  317. package/dist/i18n/I18n.js.map +1 -1
  318. package/dist/i18n/en/Contractor.ContractorList.json.js +16 -10
  319. package/dist/i18n/en/Contractor.ContractorList.json.js.map +1 -1
  320. package/dist/i18n/en/Contractor.Profile.json.js +1 -1
  321. package/dist/i18n/en/Contractor.Submit.json.js +22 -0
  322. package/dist/i18n/en/Contractor.Submit.json.js.map +1 -0
  323. package/dist/i18n/en/Employee.Deductions.json.js +49 -51
  324. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  325. package/dist/index.js +11 -9
  326. package/dist/index.js.map +1 -1
  327. package/dist/shared/constants.d.ts +46 -2
  328. package/dist/shared/constants.js +82 -45
  329. package/dist/shared/constants.js.map +1 -1
  330. package/dist/style.css +1 -1
  331. package/dist/types/i18next.d.ts +27 -17
  332. package/package.json +9 -8
  333. package/dist/components/Common/UI/NumberInput/NumberInput.module.scss.js +0 -8
  334. package/dist/components/Common/UI/NumberInput/NumberInput.module.scss.js.map +0 -1
  335. package/dist/components/Contractor/List/index.d.ts +0 -25
  336. package/dist/components/Contractor/List/index.js +0 -81
  337. package/dist/components/Contractor/List/index.js.map +0 -1
  338. package/dist/components/Contractor/List/useContractorList.js.map +0 -1
  339. package/dist/components/Contractor/Submit/ContractorSubmitWithApi.d.ts +0 -6
  340. package/dist/components/Contractor/Submit/ContractorSubmitWithApi.js +0 -27
  341. package/dist/components/Contractor/Submit/ContractorSubmitWithApi.js.map +0 -1
  342. package/dist/components/Contractor/Submit/index.d.ts +0 -6
  343. package/dist/components/Contractor/Submit/index.js +0 -20
  344. package/dist/components/Contractor/Submit/index.js.map +0 -1
  345. package/dist/components/Contractor/Submit/index.module.scss.js +0 -8
  346. package/dist/components/Contractor/Submit/index.module.scss.js.map +0 -1
  347. package/dist/components/Employee/Deductions/Actions.js +0 -27
  348. package/dist/components/Employee/Deductions/Actions.js.map +0 -1
  349. package/dist/components/Employee/Deductions/DeductionForm.d.ts +0 -1
  350. package/dist/components/Employee/Deductions/DeductionForm.js +0 -78
  351. package/dist/components/Employee/Deductions/DeductionForm.js.map +0 -1
  352. package/dist/components/Employee/Deductions/DeductionsList.d.ts +0 -2
  353. package/dist/components/Employee/Deductions/DeductionsList.js +0 -60
  354. package/dist/components/Employee/Deductions/DeductionsList.js.map +0 -1
  355. package/dist/components/Employee/Deductions/Head.js +0 -13
  356. package/dist/components/Employee/Deductions/Head.js.map +0 -1
  357. package/dist/components/Employee/Deductions/IncludeDeductionsForm.d.ts +0 -1
  358. package/dist/components/Employee/Deductions/IncludeDeductionsForm.js +0 -27
  359. package/dist/components/Employee/Deductions/IncludeDeductionsForm.js.map +0 -1
  360. package/dist/components/Employee/Deductions/useDeductions.js +0 -33
  361. package/dist/components/Employee/Deductions/useDeductions.js.map +0 -1
  362. package/dist/contexts/ThemeProvider/createTheme.d.ts +0 -21
  363. package/dist/contexts/ThemeProvider/createTheme.js +0 -269
  364. package/dist/contexts/ThemeProvider/createTheme.js.map +0 -1
  365. package/dist/i18n/en/Contractor.ContractorSubmit.json.js +0 -18
  366. package/dist/i18n/en/Contractor.ContractorSubmit.json.js.map +0 -1
  367. package/dist/types/GTheme.d.ts +0 -254
  368. /package/dist/contexts/ThemeProvider/{createTheme.test.d.ts → theme.test.d.ts} +0 -0
@@ -1,75 +1,33 @@
1
- import { jsx as y } from "react/jsx-runtime";
2
- import { useRef as K, useEffect as w } from "react";
3
- import { useTranslation as x } from "react-i18next";
4
- import { createTheme as E } from "./createTheme.js";
5
- import { ThemeContext as N } from "./useTheme.js";
6
- import { gustoSDKTheme as O } from "./theme.js";
1
+ import { jsx as s } from "react/jsx-runtime";
2
+ import { useRef as c, useEffect as u } from "react";
3
+ import { useTranslation as a } from "react-i18next";
4
+ import { ThemeContext as d } from "./useTheme.js";
5
+ import { mergePartnerTheme as l } from "./theme.js";
7
6
  /* empty css */
8
- const B = ({
7
+ const D = ({
9
8
  theme: n = {},
10
9
  children: t
11
10
  }) => {
12
- const e = K(null), { t: r } = x(), o = K(null);
13
- return w(() => {
14
- const {
15
- colors: c,
16
- spacing: s,
17
- typography: a,
18
- radius: i,
19
- transitionDuration: m,
20
- rootFS: u,
21
- focus: d,
22
- shadow: l,
23
- input: h,
24
- button: p,
25
- radio: f,
26
- checkbox: T,
27
- table: S,
28
- calendarPreview: g,
29
- card: b,
30
- link: D,
31
- badge: v,
32
- ...G
33
- } = n, j = {
34
- ...c ? { colors: c } : {},
35
- ...s ? { spacing: s } : {},
36
- ...a ? { typography: a } : {},
37
- ...i ? { radius: i } : {},
38
- ...m ? { transitionDuration: m } : {},
39
- ...u ? { rootFS: u } : {},
40
- ...d ? { focus: d } : {},
41
- ...l ? { shadow: l } : {},
42
- ...h ? { input: h } : {},
43
- ...p ? { button: p } : {},
44
- ...f ? { radio: f } : {},
45
- ...T ? { checkbox: T } : {},
46
- ...S ? { table: S } : {},
47
- ...g ? { calendarPreview: g } : {},
48
- ...b ? { card: b } : {},
49
- ...D ? { link: D } : {},
50
- ...v ? { badge: v } : {}
51
- }, C = E(j), k = {
52
- ...O,
53
- ...G
54
- }, $ = {
55
- ...C,
56
- ...k
57
- };
11
+ const e = c(null), { t: r } = a(), o = c(null);
12
+ return u(() => {
13
+ const i = l(n);
58
14
  e.current && e.current.remove(), e.current = document.createElement("style"), e.current.setAttribute("data-testid", "GSDK"), e.current.appendChild(
59
- document.createTextNode(`.GSDK{
60
- ${P($).join(`
15
+ document.createTextNode(
16
+ `.GSDK{
17
+ ${m(i).join(`
61
18
  `)}
62
- }`)
19
+ }`
20
+ )
63
21
  ), document.head.appendChild(e.current);
64
22
  }, [n, r]), // @ts-expect-error HACK fix mismatch where containerRef allows null
65
- /* @__PURE__ */ y(N.Provider, { value: { container: o }, children: /* @__PURE__ */ y("article", { className: "GSDK", "data-testid": "GSDK", ref: o, children: t }) });
66
- }, P = (n, t) => {
23
+ /* @__PURE__ */ s(d.Provider, { value: { container: o }, children: /* @__PURE__ */ s("article", { className: "GSDK", "data-testid": "GSDK", ref: o, children: t }) });
24
+ }, m = (n, t) => {
67
25
  const e = [];
68
26
  for (const [r, o] of Object.entries(n))
69
- typeof o == "object" ? e.push(...P(o, t ? t + "-" + r : r)) : e.push(`--g-${t ? t + "-" + r : r}: ${String(o)};`);
27
+ typeof o == "object" ? e.push(...m(o, t ? t + "-" + r : r)) : e.push(`--g-${t ? t + "-" + r : r}: ${String(o)};`);
70
28
  return e;
71
29
  };
72
30
  export {
73
- B as ThemeProvider
31
+ D as ThemeProvider
74
32
  };
75
33
  //# sourceMappingURL=ThemeProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ThemeProvider.js","sources":["../../../src/contexts/ThemeProvider/ThemeProvider.tsx"],"sourcesContent":["import type React from 'react'\nimport { useEffect, useRef } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { createTheme } from './createTheme'\nimport { ThemeContext } from './useTheme'\nimport { gustoSDKTheme, type GustoSDKTheme } from './theme'\nimport type { GTheme } from '@/types/GTheme'\nimport '@/styles/sdk.scss'\nimport type { DeepPartial } from '@/types/Helpers'\n\n// Create a union type that allows both the existing GTheme structure and the new flat structure\ntype EnhancedTheme = DeepPartial<GTheme> & Partial<GustoSDKTheme>\n\nexport interface ThemeProviderProps {\n theme?: EnhancedTheme\n children?: React.ReactNode\n}\n\nexport const ThemeProvider: React.FC<ThemeProviderProps> = ({\n theme: partnerTheme = {},\n children,\n}) => {\n const GThemeVariables = useRef<HTMLStyleElement | null>(null)\n const { t } = useTranslation()\n const containerRef = useRef<HTMLElement>(null)\n\n useEffect(() => {\n // Temporarily supports the legacy theme while we migrate to the new theme. Pulls out the\n // legacy theme entries and merges them with the partner overrides. Once the theming migration\n // is complete, we can remove the legacy theme entries and only support the new theme.\n const {\n colors,\n spacing,\n typography,\n radius,\n transitionDuration,\n rootFS,\n focus,\n shadow,\n input,\n button,\n radio,\n checkbox,\n table,\n calendarPreview,\n card,\n link,\n badge,\n ...gustoSDKPartnerTheme\n } = partnerTheme\n\n const legacyPartnerTheme = {\n ...(colors ? { colors } : {}),\n ...(spacing ? { spacing } : {}),\n ...(typography ? { typography } : {}),\n ...(radius ? { radius } : {}),\n ...(transitionDuration ? { transitionDuration } : {}),\n ...(rootFS ? { rootFS } : {}),\n ...(focus ? { focus } : {}),\n ...(shadow ? { shadow } : {}),\n ...(input ? { input } : {}),\n ...(button ? { button } : {}),\n ...(radio ? { radio } : {}),\n ...(checkbox ? { checkbox } : {}),\n ...(table ? { table } : {}),\n ...(calendarPreview ? { calendarPreview } : {}),\n ...(card ? { card } : {}),\n ...(link ? { link } : {}),\n ...(badge ? { badge } : {}),\n }\n\n const legacyTheme = createTheme(legacyPartnerTheme)\n\n const gustoSDKThemeWithOverrides = {\n ...gustoSDKTheme,\n ...gustoSDKPartnerTheme,\n }\n\n const theme = {\n ...legacyTheme,\n ...gustoSDKThemeWithOverrides,\n }\n\n if (GThemeVariables.current) {\n GThemeVariables.current.remove()\n }\n GThemeVariables.current = document.createElement('style')\n GThemeVariables.current.setAttribute('data-testid', 'GSDK')\n GThemeVariables.current.appendChild(\n document.createTextNode(`.GSDK{\\n${parseThemeToCSS(theme).join('\\n')}\\n}`),\n )\n document.head.appendChild(GThemeVariables.current)\n }, [partnerTheme, t])\n\n return (\n // @ts-expect-error HACK fix mismatch where containerRef allows null\n <ThemeContext.Provider value={{ container: containerRef }}>\n <article className=\"GSDK\" data-testid=\"GSDK\" ref={containerRef}>\n {children}\n </article>\n </ThemeContext.Provider>\n )\n}\n\n/**\n * Recursive flattening of the theme object into css variable format\n */\nconst parseThemeToCSS = (theme: GTheme, prefix?: string): string[] => {\n const cssProps: string[] = []\n for (const [key, value] of Object.entries(theme)) {\n if (typeof value === 'object') {\n cssProps.push(...parseThemeToCSS(value, prefix ? prefix + '-' + key : key))\n } else {\n cssProps.push(`--g-${prefix ? prefix + '-' + key : key}: ${String(value)};`)\n }\n }\n return cssProps\n}\n"],"names":["ThemeProvider","partnerTheme","children","GThemeVariables","useRef","t","useTranslation","containerRef","useEffect","colors","spacing","typography","radius","transitionDuration","rootFS","focus","shadow","input","button","radio","checkbox","table","calendarPreview","card","link","badge","gustoSDKPartnerTheme","legacyPartnerTheme","legacyTheme","createTheme","gustoSDKThemeWithOverrides","gustoSDKTheme","theme","parseThemeToCSS","ThemeContext","jsx","prefix","cssProps","key","value"],"mappings":"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"}
1
+ {"version":3,"file":"ThemeProvider.js","sources":["../../../src/contexts/ThemeProvider/ThemeProvider.tsx"],"sourcesContent":["import type React from 'react'\nimport { useEffect, useRef } from 'react'\nimport { useTranslation } from 'react-i18next'\nimport { ThemeContext } from './useTheme'\nimport { mergePartnerTheme, type GustoSDKTheme } from './theme'\nimport '@/styles/sdk.scss'\n\nexport interface ThemeProviderProps {\n theme?: GustoSDKTheme\n children?: React.ReactNode\n}\n\nexport const ThemeProvider: React.FC<ThemeProviderProps> = ({\n theme: partnerThemeOverrides = {},\n children,\n}) => {\n const GThemeVariables = useRef<HTMLStyleElement | null>(null)\n const { t } = useTranslation()\n const containerRef = useRef<HTMLElement>(null)\n\n useEffect(() => {\n const gustoSDKThemeWithOverrides = mergePartnerTheme(partnerThemeOverrides)\n\n if (GThemeVariables.current) {\n GThemeVariables.current.remove()\n }\n GThemeVariables.current = document.createElement('style')\n GThemeVariables.current.setAttribute('data-testid', 'GSDK')\n GThemeVariables.current.appendChild(\n document.createTextNode(\n `.GSDK{\\n${parseThemeToCSS(gustoSDKThemeWithOverrides).join('\\n')}\\n}`,\n ),\n )\n document.head.appendChild(GThemeVariables.current)\n }, [partnerThemeOverrides, t])\n\n return (\n // @ts-expect-error HACK fix mismatch where containerRef allows null\n <ThemeContext.Provider value={{ container: containerRef }}>\n <article className=\"GSDK\" data-testid=\"GSDK\" ref={containerRef}>\n {children}\n </article>\n </ThemeContext.Provider>\n )\n}\n\n/**\n * Recursive flattening of the theme object into css variable format\n */\nconst parseThemeToCSS = (theme: GustoSDKTheme, prefix?: string): string[] => {\n const cssProps: string[] = []\n for (const [key, value] of Object.entries(theme)) {\n if (typeof value === 'object') {\n cssProps.push(...parseThemeToCSS(value, prefix ? prefix + '-' + key : key))\n } else {\n cssProps.push(`--g-${prefix ? prefix + '-' + key : key}: ${String(value)};`)\n }\n }\n return cssProps\n}\n"],"names":["ThemeProvider","partnerThemeOverrides","children","GThemeVariables","useRef","t","useTranslation","containerRef","useEffect","gustoSDKThemeWithOverrides","mergePartnerTheme","parseThemeToCSS","ThemeContext","jsx","theme","prefix","cssProps","key","value"],"mappings":";;;;;;AAYO,MAAMA,IAA8C,CAAC;AAAA,EAC1D,OAAOC,IAAwB,CAAA;AAAA,EAC/B,UAAAC;AACF,MAAM;AACJ,QAAMC,IAAkBC,EAAgC,IAAI,GACtD,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACRC,IAAeH,EAAoB,IAAI;AAE7C,SAAAI,EAAU,MAAM;AACd,UAAMC,IAA6BC,EAAkBT,CAAqB;AAE1E,IAAIE,EAAgB,WAClBA,EAAgB,QAAQ,OAAA,GAE1BA,EAAgB,UAAU,SAAS,cAAc,OAAO,GACxDA,EAAgB,QAAQ,aAAa,eAAe,MAAM,GAC1DA,EAAgB,QAAQ;AAAA,MACtB,SAAS;AAAA,QACP;AAAA,EAAWQ,EAAgBF,CAA0B,EAAE,KAAK;AAAA,CAAI,CAAC;AAAA;AAAA,MAAA;AAAA,IACnE,GAEF,SAAS,KAAK,YAAYN,EAAgB,OAAO;AAAA,EACnD,GAAG,CAACF,GAAuBI,CAAC,CAAC;AAAA,oBAI1BO,EAAa,UAAb,EAAsB,OAAO,EAAE,WAAWL,EAAA,GACzC,UAAA,gBAAAM,EAAC,WAAA,EAAQ,WAAU,QAAO,eAAY,QAAO,KAAKN,GAC/C,UAAAL,GACH,EAAA,CACF;AAEJ,GAKMS,IAAkB,CAACG,GAAsBC,MAA8B;AAC3E,QAAMC,IAAqB,CAAA;AAC3B,aAAW,CAACC,GAAKC,CAAK,KAAK,OAAO,QAAQJ,CAAK;AAC7C,IAAI,OAAOI,KAAU,WACnBF,EAAS,KAAK,GAAGL,EAAgBO,GAAOH,IAASA,IAAS,MAAME,IAAMA,CAAG,CAAC,IAE1ED,EAAS,KAAK,OAAOD,IAASA,IAAS,MAAME,IAAMA,CAAG,KAAK,OAAOC,CAAK,CAAC,GAAG;AAG/E,SAAOF;AACT;"}
@@ -1,6 +1,8 @@
1
- export declare const gustoSDKTheme: {
1
+ declare const defaultThemeColors: {
2
2
  colorBody: string;
3
+ colorBodyAccent: string;
3
4
  colorBodyContent: string;
5
+ colorBodySubContent: string;
4
6
  colorPrimary: string;
5
7
  colorPrimaryAccent: string;
6
8
  colorPrimaryContent: string;
@@ -19,18 +21,22 @@ export declare const gustoSDKTheme: {
19
21
  colorSuccess: string;
20
22
  colorSuccessAccent: string;
21
23
  colorSuccessContent: string;
22
- inputBackgroundColor: string;
24
+ colorBorder: string;
25
+ };
26
+ export type GustoSDKThemeColors = Partial<typeof defaultThemeColors>;
27
+ export declare const createTheme: (colors?: GustoSDKThemeColors) => {
28
+ inputBackgroundColor: string | undefined;
23
29
  inputBorderColor: string;
24
- inputContentColor: string;
30
+ inputContentColor: string | undefined;
25
31
  inputBorderWidth: string;
26
- inputPlaceholderColor: string;
27
- inputAdornmentColor: string;
28
- inputDisabledBackgroundColor: string;
29
- inputLabelColor: string;
32
+ inputPlaceholderColor: string | undefined;
33
+ inputAdornmentColor: string | undefined;
34
+ inputDisabledBackgroundColor: string | undefined;
35
+ inputLabelColor: string | undefined;
30
36
  inputLabelFontSize: string;
31
37
  inputLabelFontWeight: string;
32
- inputDescriptionColor: string;
33
- inputErrorColor: string;
38
+ inputDescriptionColor: string | undefined;
39
+ inputErrorColor: string | undefined;
34
40
  inputRadius: string;
35
41
  buttonRadius: string;
36
42
  badgeRadius: string;
@@ -53,7 +59,32 @@ export declare const gustoSDKTheme: {
53
59
  transitionDuration: string;
54
60
  shadowResting: string;
55
61
  shadowTopmost: string;
56
- focusRingColor: string;
62
+ focusRingColor: string | undefined;
57
63
  focusRingWidth: string;
64
+ colorBody: string;
65
+ colorBodyAccent: string;
66
+ colorBodyContent: string;
67
+ colorBodySubContent: string;
68
+ colorPrimary: string;
69
+ colorPrimaryAccent: string;
70
+ colorPrimaryContent: string;
71
+ colorSecondary: string;
72
+ colorSecondaryAccent: string;
73
+ colorSecondaryContent: string;
74
+ colorInfo: string;
75
+ colorInfoAccent: string;
76
+ colorInfoContent: string;
77
+ colorWarning: string;
78
+ colorWarningAccent: string;
79
+ colorWarningContent: string;
80
+ colorError: string;
81
+ colorErrorAccent: string;
82
+ colorErrorContent: string;
83
+ colorSuccess: string;
84
+ colorSuccessAccent: string;
85
+ colorSuccessContent: string;
86
+ colorBorder: string;
58
87
  };
59
- export type GustoSDKTheme = typeof gustoSDKTheme;
88
+ export type GustoSDKTheme = Partial<ReturnType<typeof createTheme>>;
89
+ export declare const mergePartnerTheme: (partnerTheme: GustoSDKTheme) => GustoSDKTheme;
90
+ export {};
@@ -1,9 +1,9 @@
1
- /* empty css */
2
- import { toRem as n, getRootFontSize as r } from "../../helpers/rem.js";
1
+ import { toRem as n, getRootFontSize as a } from "../../helpers/rem.js";
3
2
  const o = {
4
3
  neutral: {
5
4
  100: "#FFFFFF",
6
5
  300: "#F4F4F3",
6
+ 400: "#EAEAEA",
7
7
  500: "#DCDCDC",
8
8
  800: "#6C6C72",
9
9
  900: "#525257",
@@ -30,14 +30,15 @@ const o = {
30
30
  800: "#1C1C1C"
31
31
  }
32
32
  }, i = {
33
- // Colors
34
33
  colorBody: o.neutral[100],
34
+ colorBodyAccent: o.neutral[300],
35
35
  colorBodyContent: o.neutral[1e3],
36
+ colorBodySubContent: o.neutral[800],
36
37
  colorPrimary: o.neutral[1e3],
37
38
  colorPrimaryAccent: o.neutral[900],
38
39
  colorPrimaryContent: o.neutral[100],
39
40
  colorSecondary: o.neutral[100],
40
- colorSecondaryAccent: o.neutral[300],
41
+ colorSecondaryAccent: o.neutral[400],
41
42
  colorSecondaryContent: o.neutral[1e3],
42
43
  colorInfo: o.info[100],
43
44
  colorInfoAccent: o.info[500],
@@ -51,26 +52,31 @@ const o = {
51
52
  colorSuccess: o.success[100],
52
53
  colorSuccessAccent: o.success[500],
53
54
  colorSuccessContent: o.success[800],
55
+ colorBorder: o.neutral[400]
56
+ }, u = (r = {}) => ({
57
+ // Colors
58
+ ...i,
59
+ ...r,
54
60
  // Input Colors
55
- inputBackgroundColor: o.neutral[100],
61
+ inputBackgroundColor: r.colorBody,
56
62
  inputBorderColor: o.neutral[500],
57
- inputContentColor: o.neutral[1e3],
63
+ inputContentColor: r.colorBodyContent,
58
64
  inputBorderWidth: "1px",
59
- inputPlaceholderColor: o.neutral[800],
60
- inputAdornmentColor: o.neutral[800],
61
- inputDisabledBackgroundColor: o.neutral[300],
65
+ inputPlaceholderColor: r.colorBodySubContent,
66
+ inputAdornmentColor: r.colorBodySubContent,
67
+ inputDisabledBackgroundColor: r.colorBodyAccent,
62
68
  // Field Colors
63
- inputLabelColor: o.neutral[1e3],
69
+ inputLabelColor: r.colorBodyContent,
64
70
  inputLabelFontSize: n(16),
65
71
  inputLabelFontWeight: "500",
66
- inputDescriptionColor: o.neutral[900],
67
- inputErrorColor: o.error[500],
72
+ inputDescriptionColor: r.colorBodySubContent,
73
+ inputErrorColor: r.colorErrorAccent,
68
74
  // Radius
69
75
  inputRadius: n(8),
70
76
  buttonRadius: n(8),
71
77
  badgeRadius: n(16),
72
78
  // Font
73
- fontSizeRoot: r(),
79
+ fontSizeRoot: a(),
74
80
  fontFamily: "Geist",
75
81
  fontLineHeight: n(24),
76
82
  fontSizeSmall: n(14),
@@ -92,10 +98,20 @@ const o = {
92
98
  shadowResting: "0px 1px 2px 0px rgba(10, 13, 18, 0.05)",
93
99
  shadowTopmost: "0px 4px 6px 0px rgba(28, 28, 28, 0.05), 0px 10px 15px 0px rgba(28, 28, 28, 0.10)",
94
100
  // Focus
95
- focusRingColor: o.neutral[1e3],
101
+ focusRingColor: r.colorPrimary,
96
102
  focusRingWidth: "2px"
103
+ }), s = (r) => {
104
+ const c = Object.entries(i).reduce(
105
+ (e, [t, l]) => (e[t] = r[t] || l, e),
106
+ {}
107
+ );
108
+ return {
109
+ ...u(c),
110
+ ...r
111
+ };
97
112
  };
98
113
  export {
99
- i as gustoSDKTheme
114
+ u as createTheme,
115
+ s as mergePartnerTheme
100
116
  };
101
117
  //# sourceMappingURL=theme.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"theme.js","sources":["../../../src/contexts/ThemeProvider/theme.ts"],"sourcesContent":["import '@/styles/sdk.scss'\nimport { 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 colors = {\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: '#6C6C72',\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 gustoSDKTheme = {\n // Colors\n colorBody: colors.neutral[100],\n colorBodyContent: colors.neutral[1000],\n colorPrimary: colors.neutral[1000],\n colorPrimaryAccent: colors.neutral[900],\n colorPrimaryContent: colors.neutral[100],\n colorSecondary: colors.neutral[100],\n colorSecondaryAccent: colors.neutral[300],\n colorSecondaryContent: colors.neutral[1000],\n colorInfo: colors.info[100],\n colorInfoAccent: colors.info[500],\n colorInfoContent: colors.info[800],\n colorWarning: colors.warning[100],\n colorWarningAccent: colors.warning[500],\n colorWarningContent: colors.warning[800],\n colorError: colors.error[100],\n colorErrorAccent: colors.error[500],\n colorErrorContent: colors.error[800],\n colorSuccess: colors.success[100],\n colorSuccessAccent: colors.success[500],\n colorSuccessContent: colors.success[800],\n // Input Colors\n inputBackgroundColor: colors.neutral[100],\n inputBorderColor: colors.neutral[500],\n inputContentColor: colors.neutral[1000],\n inputBorderWidth: '1px',\n inputPlaceholderColor: colors.neutral[800],\n inputAdornmentColor: colors.neutral[800],\n inputDisabledBackgroundColor: colors.neutral[300],\n // Field Colors\n inputLabelColor: colors.neutral[1000],\n inputLabelFontSize: toRem(16),\n inputLabelFontWeight: '500',\n inputDescriptionColor: colors.neutral[900],\n inputErrorColor: colors.error[500],\n // Radius\n inputRadius: toRem(8),\n buttonRadius: toRem(8),\n badgeRadius: toRem(16),\n // Font\n fontSizeRoot: getRootFontSize(),\n fontFamily: 'Geist',\n fontLineHeight: toRem(24),\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: '200ms',\n // Shadows\n shadowResting: '0px 1px 2px 0px rgba(10, 13, 18, 0.05)',\n shadowTopmost: '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.neutral[1000],\n focusRingWidth: '2px',\n}\n\nexport type GustoSDKTheme = typeof gustoSDKTheme\n"],"names":["colors","gustoSDKTheme","toRem","getRootFontSize"],"mappings":"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"}
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: '#6C6C72',\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\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 badgeRadius: toRem(16),\n // Font\n fontSizeRoot: getRootFontSize(),\n fontFamily: 'Geist',\n fontLineHeight: toRem(24),\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: '200ms',\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","defaultThemeColors","createTheme","colors","toRem","getRootFontSize","mergePartnerTheme","partnerTheme","acc","key","value"],"mappings":"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"}
@@ -1,14 +1,11 @@
1
1
  import { BREAKPOINTS } from '../shared/constants';
2
- import { GThemeSpacing } from '../types/GTheme';
3
2
  type BreakpointKey = (typeof BREAKPOINTS)[keyof typeof BREAKPOINTS];
4
3
  export type Responsive<T> = T | Partial<{
5
4
  [K in BreakpointKey]: T;
6
5
  }>;
7
6
  export type CustomPropertyValue = string | number;
8
- export type ResponsiveSpacing = Responsive<keyof GThemeSpacing | 0>;
9
7
  export declare function isResponsiveValue(value: Responsive<CustomPropertyValue | CustomPropertyValue[]>): boolean;
10
8
  export declare function transformResponsiveValue(value: Responsive<CustomPropertyValue | CustomPropertyValue[]>, transformValue: (value: CustomPropertyValue | CustomPropertyValue[]) => string): Record<string, string>;
11
- export declare function transformResponsiveSpacingValue(responsiveValue: ResponsiveSpacing): Record<string, string>;
12
9
  export declare const toRemIfNumeric: (value: string | number) => string;
13
10
  export declare function createResponsiveCustomProperties(property: string, value?: Responsive<CustomPropertyValue | CustomPropertyValue[]>): Record<string, string>;
14
11
  export declare function setResponsiveCustomProperties(properties?: Record<string, Responsive<CustomPropertyValue | CustomPropertyValue[]> | undefined>): Record<string, string>;
@@ -1,43 +1,29 @@
1
- import { toRem as p } from "./rem.js";
2
- import { BREAKPOINTS as a } from "../shared/constants.js";
3
- function c(e) {
4
- return Object.values(a).some(
5
- (r) => typeof e == "object" && r in e
1
+ import { toRem as f } from "./rem.js";
2
+ import { BREAKPOINTS as p } from "../shared/constants.js";
3
+ function m(e) {
4
+ return Object.values(p).some(
5
+ (t) => typeof e == "object" && t in e
6
6
  );
7
7
  }
8
- function m(e, r) {
9
- const s = c(e) ? e : { base: e }, n = {};
10
- return Object.entries(s).forEach(([o, t]) => {
11
- n[o] = r(t);
12
- }), n;
8
+ const n = (e) => typeof e == "number" ? f(e) : e;
9
+ function u(e, t) {
10
+ if (!t) return {};
11
+ const o = m(t) ? t : { base: t }, r = {};
12
+ return Object.entries(o).forEach(([i, s]) => {
13
+ const c = Array.isArray(s) ? s.map(n).join(" ") : n(s);
14
+ r[`--g-${e}-${i}`] = c;
15
+ }), r;
13
16
  }
14
17
  function j(e) {
15
- return m(
16
- e,
17
- (r) => r === 0 ? "0" : `var(--g-spacing-${r})`
18
- );
19
- }
20
- const i = (e) => typeof e == "number" ? p(e) : e;
21
- function u(e, r) {
22
- if (!r) return {};
23
- const s = c(r) ? r : { base: r }, n = {};
24
- return Object.entries(s).forEach(([o, t]) => {
25
- const f = Array.isArray(t) ? t.map(i).join(" ") : i(t);
26
- n[`--g-${e}-${o}`] = f;
27
- }), n;
28
- }
29
- function O(e) {
30
- const r = {};
31
- return e && Object.entries(e).forEach(([s, n]) => {
32
- Object.assign(r, u(s, n));
33
- }), r;
18
+ const t = {};
19
+ return e && Object.entries(e).forEach(([o, r]) => {
20
+ Object.assign(t, u(o, r));
21
+ }), t;
34
22
  }
35
23
  export {
36
24
  u as createResponsiveCustomProperties,
37
- c as isResponsiveValue,
38
- O as setResponsiveCustomProperties,
39
- i as toRemIfNumeric,
40
- j as transformResponsiveSpacingValue,
41
- m as transformResponsiveValue
25
+ m as isResponsiveValue,
26
+ j as setResponsiveCustomProperties,
27
+ n as toRemIfNumeric
42
28
  };
43
29
  //# sourceMappingURL=responsive.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"responsive.js","sources":["../../src/helpers/responsive.ts"],"sourcesContent":["import { toRem } from '@/helpers/rem'\nimport { BREAKPOINTS } from '@/shared/constants'\nimport type { GThemeSpacing } from '@/types/GTheme'\n\ntype BreakpointKey = (typeof BREAKPOINTS)[keyof typeof BREAKPOINTS]\n\nexport type Responsive<T> =\n | T\n | Partial<{\n [K in BreakpointKey]: T\n }>\n\nexport type CustomPropertyValue = string | number\n\nexport type ResponsiveSpacing = Responsive<keyof GThemeSpacing | 0>\n\nexport function isResponsiveValue(value: Responsive<CustomPropertyValue | CustomPropertyValue[]>) {\n return Object.values(BREAKPOINTS).some(\n breakpoint => typeof value === 'object' && breakpoint in value,\n )\n}\n\nexport function transformResponsiveValue(\n value: Responsive<CustomPropertyValue | CustomPropertyValue[]>,\n transformValue: (value: CustomPropertyValue | CustomPropertyValue[]) => string,\n) {\n const responsiveValue = isResponsiveValue(value) ? value : { base: value }\n\n const transformedResponsiveValue: Record<string, string> = {}\n\n Object.entries(responsiveValue).forEach(([key, value]) => {\n transformedResponsiveValue[key] = transformValue(value)\n })\n\n return transformedResponsiveValue\n}\n\nexport function transformResponsiveSpacingValue(responsiveValue: ResponsiveSpacing) {\n return transformResponsiveValue(responsiveValue, value =>\n value === 0 ? '0' : `var(--g-spacing-${value})`,\n )\n}\n\nexport const toRemIfNumeric = (value: string | number) => {\n return typeof value === 'number' ? toRem(value) : value\n}\n\nexport function createResponsiveCustomProperties(\n property: string,\n value?: Responsive<CustomPropertyValue | CustomPropertyValue[]>,\n) {\n if (!value) return {}\n\n const responsiveValues = isResponsiveValue(value) ? value : { base: value }\n const properties: Record<string, string> = {}\n\n Object.entries(responsiveValues).forEach(([key, customPropertyValue]) => {\n const customPropertyValueResult = Array.isArray(customPropertyValue)\n ? customPropertyValue.map(toRemIfNumeric).join(' ')\n : toRemIfNumeric(customPropertyValue)\n\n properties[`--g-${property}-${key}`] = customPropertyValueResult\n })\n\n return properties\n}\n\nexport function setResponsiveCustomProperties(\n properties?: Record<string, Responsive<CustomPropertyValue | CustomPropertyValue[]> | undefined>,\n) {\n const allProperties: Record<string, string> = {}\n\n if (!properties) return allProperties\n\n Object.entries(properties).forEach(([property, value]) => {\n Object.assign(allProperties, createResponsiveCustomProperties(property, value))\n })\n\n return allProperties\n}\n"],"names":["isResponsiveValue","value","BREAKPOINTS","breakpoint","transformResponsiveValue","transformValue","responsiveValue","transformedResponsiveValue","key","transformResponsiveSpacingValue","toRemIfNumeric","toRem","createResponsiveCustomProperties","property","responsiveValues","properties","customPropertyValue","customPropertyValueResult","setResponsiveCustomProperties","allProperties"],"mappings":";;AAgBO,SAASA,EAAkBC,GAAgE;AAChG,SAAO,OAAO,OAAOC,CAAW,EAAE;AAAA,IAChC,CAAAC,MAAc,OAAOF,KAAU,YAAYE,KAAcF;AAAA,EAAA;AAE7D;AAEO,SAASG,EACdH,GACAI,GACA;AACA,QAAMC,IAAkBN,EAAkBC,CAAK,IAAIA,IAAQ,EAAE,MAAMA,EAAA,GAE7DM,IAAqD,CAAA;AAE3D,gBAAO,QAAQD,CAAe,EAAE,QAAQ,CAAC,CAACE,GAAKP,CAAK,MAAM;AACxD,IAAAM,EAA2BC,CAAG,IAAIH,EAAeJ,CAAK;AAAA,EACxD,CAAC,GAEMM;AACT;AAEO,SAASE,EAAgCH,GAAoC;AAClF,SAAOF;AAAA,IAAyBE;AAAA,IAAiB,CAAAL,MAC/CA,MAAU,IAAI,MAAM,mBAAmBA,CAAK;AAAA,EAAA;AAEhD;AAEO,MAAMS,IAAiB,CAACT,MACtB,OAAOA,KAAU,WAAWU,EAAMV,CAAK,IAAIA;AAG7C,SAASW,EACdC,GACAZ,GACA;AACA,MAAI,CAACA,EAAO,QAAO,CAAA;AAEnB,QAAMa,IAAmBd,EAAkBC,CAAK,IAAIA,IAAQ,EAAE,MAAMA,EAAA,GAC9Dc,IAAqC,CAAA;AAE3C,gBAAO,QAAQD,CAAgB,EAAE,QAAQ,CAAC,CAACN,GAAKQ,CAAmB,MAAM;AACvE,UAAMC,IAA4B,MAAM,QAAQD,CAAmB,IAC/DA,EAAoB,IAAIN,CAAc,EAAE,KAAK,GAAG,IAChDA,EAAeM,CAAmB;AAEtC,IAAAD,EAAW,OAAOF,CAAQ,IAAIL,CAAG,EAAE,IAAIS;AAAA,EACzC,CAAC,GAEMF;AACT;AAEO,SAASG,EACdH,GACA;AACA,QAAMI,IAAwC,CAAA;AAE9C,SAAKJ,KAEL,OAAO,QAAQA,CAAU,EAAE,QAAQ,CAAC,CAACF,GAAUZ,CAAK,MAAM;AACxD,WAAO,OAAOkB,GAAeP,EAAiCC,GAAUZ,CAAK,CAAC;AAAA,EAChF,CAAC,GAEMkB;AACT;"}
1
+ {"version":3,"file":"responsive.js","sources":["../../src/helpers/responsive.ts"],"sourcesContent":["import { toRem } from '@/helpers/rem'\nimport { BREAKPOINTS } from '@/shared/constants'\n\ntype BreakpointKey = (typeof BREAKPOINTS)[keyof typeof BREAKPOINTS]\n\nexport type Responsive<T> =\n | T\n | Partial<{\n [K in BreakpointKey]: T\n }>\n\nexport type CustomPropertyValue = string | number\n\nexport function isResponsiveValue(value: Responsive<CustomPropertyValue | CustomPropertyValue[]>) {\n return Object.values(BREAKPOINTS).some(\n breakpoint => typeof value === 'object' && breakpoint in value,\n )\n}\n\nexport function transformResponsiveValue(\n value: Responsive<CustomPropertyValue | CustomPropertyValue[]>,\n transformValue: (value: CustomPropertyValue | CustomPropertyValue[]) => string,\n) {\n const responsiveValue = isResponsiveValue(value) ? value : { base: value }\n\n const transformedResponsiveValue: Record<string, string> = {}\n\n Object.entries(responsiveValue).forEach(([key, value]) => {\n transformedResponsiveValue[key] = transformValue(value)\n })\n\n return transformedResponsiveValue\n}\n\nexport const toRemIfNumeric = (value: string | number) => {\n return typeof value === 'number' ? toRem(value) : value\n}\n\nexport function createResponsiveCustomProperties(\n property: string,\n value?: Responsive<CustomPropertyValue | CustomPropertyValue[]>,\n) {\n if (!value) return {}\n\n const responsiveValues = isResponsiveValue(value) ? value : { base: value }\n const properties: Record<string, string> = {}\n\n Object.entries(responsiveValues).forEach(([key, customPropertyValue]) => {\n const customPropertyValueResult = Array.isArray(customPropertyValue)\n ? customPropertyValue.map(toRemIfNumeric).join(' ')\n : toRemIfNumeric(customPropertyValue)\n\n properties[`--g-${property}-${key}`] = customPropertyValueResult\n })\n\n return properties\n}\n\nexport function setResponsiveCustomProperties(\n properties?: Record<string, Responsive<CustomPropertyValue | CustomPropertyValue[]> | undefined>,\n) {\n const allProperties: Record<string, string> = {}\n\n if (!properties) return allProperties\n\n Object.entries(properties).forEach(([property, value]) => {\n Object.assign(allProperties, createResponsiveCustomProperties(property, value))\n })\n\n return allProperties\n}\n"],"names":["isResponsiveValue","value","BREAKPOINTS","breakpoint","toRemIfNumeric","toRem","createResponsiveCustomProperties","property","responsiveValues","properties","key","customPropertyValue","customPropertyValueResult","setResponsiveCustomProperties","allProperties"],"mappings":";;AAaO,SAASA,EAAkBC,GAAgE;AAChG,SAAO,OAAO,OAAOC,CAAW,EAAE;AAAA,IAChC,CAAAC,MAAc,OAAOF,KAAU,YAAYE,KAAcF;AAAA,EAAA;AAE7D;AAiBO,MAAMG,IAAiB,CAACH,MACtB,OAAOA,KAAU,WAAWI,EAAMJ,CAAK,IAAIA;AAG7C,SAASK,EACdC,GACAN,GACA;AACA,MAAI,CAACA,EAAO,QAAO,CAAA;AAEnB,QAAMO,IAAmBR,EAAkBC,CAAK,IAAIA,IAAQ,EAAE,MAAMA,EAAA,GAC9DQ,IAAqC,CAAA;AAE3C,gBAAO,QAAQD,CAAgB,EAAE,QAAQ,CAAC,CAACE,GAAKC,CAAmB,MAAM;AACvE,UAAMC,IAA4B,MAAM,QAAQD,CAAmB,IAC/DA,EAAoB,IAAIP,CAAc,EAAE,KAAK,GAAG,IAChDA,EAAeO,CAAmB;AAEtC,IAAAF,EAAW,OAAOF,CAAQ,IAAIG,CAAG,EAAE,IAAIE;AAAA,EACzC,CAAC,GAEMH;AACT;AAEO,SAASI,EACdJ,GACA;AACA,QAAMK,IAAwC,CAAA;AAE9C,SAAKL,KAEL,OAAO,QAAQA,CAAU,EAAE,QAAQ,CAAC,CAACF,GAAUN,CAAK,MAAM;AACxD,WAAO,OAAOa,GAAeR,EAAiCC,GAAUN,CAAK,CAAC;AAAA,EAChF,CAAC,GAEMa;AACT;"}
package/dist/i18n/I18n.js CHANGED
@@ -5,7 +5,7 @@ const C = "common", s = new l(50), c = ({ lng: n = "en", ns: o }) => {
5
5
  let e = !0, t = !1, r;
6
6
  const i = (async () => {
7
7
  try {
8
- r = (await p(/* @__PURE__ */ Object.assign({ "./en/Company.AddBank.json": () => import("./en/Company.AddBank.json.js"), "./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.ContractorSubmit.json": () => import("./en/Contractor.ContractorSubmit.json.js"), "./en/Contractor.NewHireReport.json": () => import("./en/Contractor.NewHireReport.json.js"), "./en/Contractor.PaymentMethod.json": () => import("./en/Contractor.PaymentMethod.json.js"), "./en/Contractor.Profile.json": () => import("./en/Contractor.Profile.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.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/Payroll.PayrollHistoryList.json": () => import("./en/Payroll.PayrollHistoryList.json.js"), "./en/Payroll.PayrollSchedule.json": () => import("./en/Payroll.PayrollSchedule.json.js"), "./en/common.json": () => import("./en/common.json.js") }), `./${n}/${o}.json`, 3)).default, e = !1;
8
+ r = (await p(/* @__PURE__ */ Object.assign({ "./en/Company.AddBank.json": () => import("./en/Company.AddBank.json.js"), "./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.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.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/Payroll.PayrollHistoryList.json": () => import("./en/Payroll.PayrollHistoryList.json.js"), "./en/Payroll.PayrollSchedule.json": () => import("./en/Payroll.PayrollSchedule.json.js"), "./en/common.json": () => import("./en/common.json.js") }), `./${n}/${o}.json`, 3)).default, e = !1;
9
9
  } catch {
10
10
  t = !0, e = !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 = (ns: keyof CustomTypeOptions['resources'] | null) => {\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 (!ns) return\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(i18nInstance.resolvedLanguage ?? 'en', ns, resource, true, false) //Last argument is set to false to prevent override of keys provided by partners on GustoApiProvider level through dictionary prop\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","i18nInstance","useTranslation","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,w8FAAA,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,CAACN,MAAoD;AAE1E,QAAM,EAAE,MAAMO,EAAA,IAAiBC,EAAA;AAE/B,MAAI,CAACR,EAAI;AACT,QAAMS,IAAM,GAAGF,EAAa,gBAAgB,IAAIP,CAAE;AAElD,EAAIJ,EAAc,IAAIa,CAAG,MAAM,QAE7Bb,EAAc,IAAIa,GAAKX,EAAa,EAAE,KAAKS,EAAa,kBAAkB,IAAAP,EAAA,CAAQ,CAAC;AAGrF,QAAMU,IAAiBd,EAAc,IAAIa,CAAG;AAC5C,MAAIC,GAAgB;AAClB,UAAMP,IAAWO,EAAA;AACjB,IAAAH,EAAa,kBAAkBA,EAAa,oBAAoB,MAAMP,GAAIG,GAAU,IAAM,EAAK;AAAA,EACjG;AACF,GAGaQ,IAAyB,CACpCX,GACAG,MACG;AACH,QAAM,EAAE,MAAMI,EAAA,IAAiBC,EAAA;AAC/B,MAAIL;AACF,eAAWS,KAAQT;AACjB,MAAAI,EAAa,kBAAkBK,GAAMZ,GAAIG,EAASS,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 = (ns: keyof CustomTypeOptions['resources'] | null) => {\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 (!ns) return\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(i18nInstance.resolvedLanguage ?? 'en', ns, resource, true, false) //Last argument is set to false to prevent override of keys provided by partners on GustoApiProvider level through dictionary prop\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","i18nInstance","useTranslation","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,o7FAAA,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,CAACN,MAAoD;AAE1E,QAAM,EAAE,MAAMO,EAAA,IAAiBC,EAAA;AAE/B,MAAI,CAACR,EAAI;AACT,QAAMS,IAAM,GAAGF,EAAa,gBAAgB,IAAIP,CAAE;AAElD,EAAIJ,EAAc,IAAIa,CAAG,MAAM,QAE7Bb,EAAc,IAAIa,GAAKX,EAAa,EAAE,KAAKS,EAAa,kBAAkB,IAAAP,EAAA,CAAQ,CAAC;AAGrF,QAAMU,IAAiBd,EAAc,IAAIa,CAAG;AAC5C,MAAIC,GAAgB;AAClB,UAAMP,IAAWO,EAAA;AACjB,IAAAH,EAAa,kBAAkBA,EAAa,oBAAoB,MAAMP,GAAIG,GAAU,IAAM,EAAK;AAAA,EACjG;AACF,GAGaQ,IAAyB,CACpCX,GACAG,MACG;AACH,QAAM,EAAE,MAAMI,EAAA,IAAiBC,EAAA;AAC/B,MAAIL;AACF,eAAWS,KAAQT;AACjB,MAAAI,EAAa,kBAAkBK,GAAMZ,GAAIG,EAASS,CAAI,GAAG,IAAM,EAAI;AAGzE;"}
@@ -1,22 +1,28 @@
1
- const t = "Add a contractor", o = "+ Add another contractor", a = "A list of contractors", r = "Edit contractor", c = "Add contractors to get them setup for payroll.", n = "You haven't added any contractors yet", s = { name: "Name", status: "Status" }, e = "Contractors", d = {
1
+ const t = "Add a contractor", o = "+ Add another contractor", a = "A list of contractors", c = "Edit", n = "Delete", e = "Add contractors to get them setup for payroll.", r = "You haven't added any contractors yet", s = { name: "Name", status: "Status" }, d = "Contractors", i = "Continue", l = "Back to contractors", C = {
2
2
  addContractorCTA: t,
3
3
  addAnotherCTA: o,
4
4
  contractorListLabel: a,
5
- editCTA: r,
6
- emptyTableDescription: c,
7
- emptyTableTitle: n,
5
+ editCTA: c,
6
+ deleteCTA: n,
7
+ emptyTableDescription: e,
8
+ emptyTableTitle: r,
8
9
  listHeaders: s,
9
- title: e
10
+ title: d,
11
+ continueCta: i,
12
+ progressBarCta: l
10
13
  };
11
14
  export {
12
15
  o as addAnotherCTA,
13
16
  t as addContractorCTA,
17
+ i as continueCta,
14
18
  a as contractorListLabel,
15
- d as default,
16
- r as editCTA,
17
- c as emptyTableDescription,
18
- n as emptyTableTitle,
19
+ C as default,
20
+ n as deleteCTA,
21
+ c as editCTA,
22
+ e as emptyTableDescription,
23
+ r as emptyTableTitle,
19
24
  s as listHeaders,
20
- e as title
25
+ l as progressBarCta,
26
+ d as title
21
27
  };
22
28
  //# sourceMappingURL=Contractor.ContractorList.json.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Contractor.ContractorList.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}
1
+ {"version":3,"file":"Contractor.ContractorList.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- const e = "Contractor profile", t = "This information will be used for payments and on tax documents, so double-check that it's accurate.", a = { inviteContractor: { label: "Invite this contractor to enter some of their own details online", description: "Your contractor will be invited to enter their information on their own time." }, email: { label: "Contractor's email address" }, contractorType: { label: "Type" }, firstName: { label: "First Name" }, lastName: { label: "Last Name" }, middleInitial: { label: "Middle Initial" }, ssn: { label: "Social Security Number", placeholder: "XXX-XX-XXXX" }, businessName: { label: "Business Name" }, startDate: { label: "Start Date", description: "Your contractor's first day of work at your company" }, wageType: { label: "Wage Type" }, hourlyRate: { label: "Hourly Rate" }, ein: { label: "EIN", placeholder: "XX-XXXXXXX" } }, r = { email: "Email is required when inviting contractor", firstName: "First name is required for individual contractors", lastName: "Last name is required for individual contractors", ssn: "SSN is required for individual contractors", ssnFormat: "SSN must be valid format", businessName: "Business name is required for business contractors", ein: "EIN is required for business contractors", einFormat: "EIN must be valid format (XX-XXXXXXX)", hourlyRate: "Hourly rate is required for hourly contractors" }, i = { cancel: "Cancel", create: "Create Contractor", update: "Update Contractor", creating: "Creating...", updating: "Updating..." }, o = {
1
+ const e = "Contractor profile", t = "This information will be used for payments and on tax documents, so double-check that it's accurate.", a = { selfOnboarding: { label: "Invite this contractor to enter some of their own details online", description: "Your contractor will be invited to enter their information on their own time." }, email: { label: "Contractor's email address" }, contractorType: { label: "Type" }, firstName: { label: "First Name" }, lastName: { label: "Last Name" }, middleInitial: { label: "Middle Initial" }, ssn: { label: "Social Security Number" }, businessName: { label: "Business Name" }, startDate: { label: "Start Date", description: "Your contractor's first day of work at your company" }, wageType: { label: "Wage Type" }, hourlyRate: { label: "Hourly Rate" }, ein: { label: "EIN" } }, r = { email: "Email is required when inviting contractor", firstName: "First name is required for individual contractors", lastName: "Last name is required for individual contractors", ssn: "SSN is required for individual contractors", ssnFormat: "SSN must be valid format", businessName: "Business name is required for business contractors", ein: "EIN is required for business contractors", einFormat: "EIN must be valid format (XX-XXXXXXX)", hourlyRate: "Hourly rate is required for hourly contractors" }, i = { cancel: "Cancel", create: "Create Contractor", update: "Update Contractor", creating: "Creating...", updating: "Updating..." }, o = {
2
2
  title: e,
3
3
  subtitle: t,
4
4
  fields: a,
@@ -0,0 +1,22 @@
1
+ const t = "Contractor Onboarded", e = "This contractor has been successfully onboarded.", o = "Done", n = "Submit and complete onboarding", a = "Please note that after submitting", s = ["The contractor type cannot be changed.", "The new hire report cannot be modified.", "This contractor has unsigned documents and will need to manually complete and submit those documents to you separately."], c = { title: "Review before sending invitation", description: "You are inviting a contractor to complete the onboarding flow. Please double-check that you've entered this contractor's details correctly.", startDateLabel: "Start date", inviteCta: "Send invitation", successMessage: "Contractor has been saved & invited to self-onboard!" }, i = { successMessage: "Contractor has been onboarded!" }, r = {
2
+ doneTitle: t,
3
+ doneText: e,
4
+ doneCTA: o,
5
+ submitCTA: n,
6
+ title: a,
7
+ warningItems: s,
8
+ inviteContractor: c,
9
+ submitDone: i
10
+ };
11
+ export {
12
+ r as default,
13
+ o as doneCTA,
14
+ e as doneText,
15
+ t as doneTitle,
16
+ c as inviteContractor,
17
+ n as submitCTA,
18
+ i as submitDone,
19
+ a as title,
20
+ s as warningItems
21
+ };
22
+ //# sourceMappingURL=Contractor.Submit.json.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Contractor.Submit.json.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;"}