@gusto/embedded-react-sdk 0.11.1 → 0.11.3-rc.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 (583) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/assets/icons/alert-circle.svg.js.map +1 -1
  3. package/dist/assets/icons/caret-down.svg.js +1 -1
  4. package/dist/assets/icons/caret-down.svg.js.map +1 -1
  5. package/dist/assets/icons/caret-left.svg.js.map +1 -1
  6. package/dist/assets/icons/caret-right.svg.js.map +1 -1
  7. package/dist/assets/icons/checkbox.svg.js.map +1 -1
  8. package/dist/assets/icons/error.svg.js.map +1 -1
  9. package/dist/assets/icons/hamburger.svg.js.map +1 -1
  10. package/dist/assets/icons/info.svg.js.map +1 -1
  11. package/dist/assets/icons/list.svg.js.map +1 -1
  12. package/dist/assets/icons/magnifyingGlass.png.js.map +1 -1
  13. package/dist/assets/icons/pagination_next.svg.js.map +1 -1
  14. package/dist/assets/icons/pagination_previous.svg.js.map +1 -1
  15. package/dist/assets/icons/pencil.svg.js.map +1 -1
  16. package/dist/assets/icons/success_check.svg.js.map +1 -1
  17. package/dist/assets/icons/trashcan.svg.js.map +1 -1
  18. package/dist/assets/icons/unchecked_circular.svg.js.map +1 -1
  19. package/dist/assets/icons/verification_pending.svg.js.map +1 -1
  20. package/dist/assets/icons/warning.svg.js.map +1 -1
  21. package/dist/components/Base/Base.js +19 -18
  22. package/dist/components/Base/Base.js.map +1 -1
  23. package/dist/components/Base/createCompoundContext.js.map +1 -1
  24. package/dist/components/Base/useBase.js.map +1 -1
  25. package/dist/components/Common/ActionsLayout/ActionsLayout.js.map +1 -1
  26. package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
  27. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +1 -1
  28. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  29. package/dist/components/Common/DataView/DataView.js.map +1 -1
  30. package/dist/components/Common/DataView/useDataView.js.map +1 -1
  31. package/dist/components/Common/DocumentList/DocumentList.js.map +1 -1
  32. package/dist/components/Common/DocumentList/DocumentList.module.scss.js +1 -1
  33. package/dist/components/Common/DocumentViewer/DocumentViewer.js.map +1 -1
  34. package/dist/components/Common/DocumentViewer/DocumentViewer.module.scss.js +1 -1
  35. package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
  36. package/dist/components/Common/EmptyData/EmptyData.module.scss.js +1 -1
  37. package/dist/components/Common/FadeIn/FadeIn.js.map +1 -1
  38. package/dist/components/Common/FieldCaption/FieldCaption.js +7 -4
  39. package/dist/components/Common/FieldCaption/FieldCaption.js.map +1 -1
  40. package/dist/components/Common/FieldCaption/FieldCaption.module.scss.js +1 -1
  41. package/dist/components/Common/FieldDescription/FieldDescription.js.map +1 -1
  42. package/dist/components/Common/FieldDescription/FieldDescription.module.scss.js +1 -1
  43. package/dist/components/Common/FieldErrorMessage/FieldErrorMessage.js.map +1 -1
  44. package/dist/components/Common/FieldErrorMessage/FieldErrorMessage.module.scss.js +1 -1
  45. package/dist/components/Common/FieldLayout/FieldLayout.js.map +1 -1
  46. package/dist/components/Common/FieldLayout/FieldLayout.module.scss.js +10 -10
  47. package/dist/components/Common/Fields/CheckboxField/CheckboxField.js.map +1 -1
  48. package/dist/components/Common/Fields/CheckboxGroupField/CheckboxGroupField.js.map +1 -1
  49. package/dist/components/Common/Fields/ComboBoxField/ComboBoxField.js.map +1 -1
  50. package/dist/components/Common/Fields/DatePickerField/DatePickerField.d.ts +1 -0
  51. package/dist/components/Common/Fields/DatePickerField/DatePickerField.js +35 -20
  52. package/dist/components/Common/Fields/DatePickerField/DatePickerField.js.map +1 -1
  53. package/dist/components/Common/Fields/NumberInputField/NumberInputField.js.map +1 -1
  54. package/dist/components/Common/Fields/RadioGroupField/RadioGroupField.js.map +1 -1
  55. package/dist/components/Common/Fields/SelectField/SelectField.js.map +1 -1
  56. package/dist/components/Common/Fields/SwitchField/SwitchField.js.map +1 -1
  57. package/dist/components/Common/Fields/TextInputField/TextInputField.js.map +1 -1
  58. package/dist/components/Common/Fields/hooks/useField.js.map +1 -1
  59. package/dist/components/Common/Fields/hooks/useStringifyGenericFieldValue.js.map +1 -1
  60. package/dist/components/Common/Fieldset/Fieldset.js.map +1 -1
  61. package/dist/components/Common/Flex/Flex.d.ts +2 -2
  62. package/dist/components/Common/Flex/Flex.js +5 -5
  63. package/dist/components/Common/Flex/Flex.js.map +1 -1
  64. package/dist/components/Common/Form/Form.js.map +1 -1
  65. package/dist/components/Common/Form/Form.module.scss.js +2 -2
  66. package/dist/components/Common/Grid/Grid.d.ts +2 -2
  67. package/dist/components/Common/Grid/Grid.js +13 -13
  68. package/dist/components/Common/Grid/Grid.js.map +1 -1
  69. package/dist/components/Common/HamburgerMenu/HamburgerMenu.js.map +1 -1
  70. package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.js.map +1 -1
  71. package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.module.scss.js +12 -12
  72. package/dist/components/Common/InternalError/InternalError.js.map +1 -1
  73. package/dist/components/Common/InternalError/InternalError.module.scss.js +1 -1
  74. package/dist/components/Common/Loading/Loading.js.map +1 -1
  75. package/dist/components/Common/Loading/Loading.module.scss.js +1 -1
  76. package/dist/components/Common/OnboardingStatusBadge/index.js.map +1 -1
  77. package/dist/components/Common/PaginationControl/PaginationControl.js.map +1 -1
  78. package/dist/components/Common/PaginationControl/PaginationControl.module.scss.js +1 -1
  79. package/dist/components/Common/ReorderableList/DropZone.js.map +1 -1
  80. package/dist/components/Common/ReorderableList/ReorderableItem.js.map +1 -1
  81. package/dist/components/Common/ReorderableList/ReorderableList.js.map +1 -1
  82. package/dist/components/Common/ReorderableList/ReorderableList.module.scss.js +15 -15
  83. package/dist/components/Common/RequirementsList/RequirementsList.js.map +1 -1
  84. package/dist/components/Common/RequirementsList/RequirementsList.module.scss.js +1 -1
  85. package/dist/components/Common/SignatureForm/SignatureForm.js +6 -4
  86. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  87. package/dist/components/Common/SignatureForm/SignatureForm.module.scss.js +6 -6
  88. package/dist/components/Common/SignatureForm/SignatureFormActions.js +12 -10
  89. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +1 -1
  90. package/dist/components/Common/SignatureForm/SignatureFormFields.js +8 -6
  91. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +1 -1
  92. package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
  93. package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
  94. package/dist/components/Common/UI/Alert/Alert.module.scss.js +1 -1
  95. package/dist/components/Common/UI/Badge/Badge.js +4 -4
  96. package/dist/components/Common/UI/Badge/Badge.js.map +1 -1
  97. package/dist/components/Common/UI/Badge/Badge.module.scss.js +4 -4
  98. package/dist/components/Common/UI/Button/Button.d.ts +1 -1
  99. package/dist/components/Common/UI/Button/Button.js +22 -24
  100. package/dist/components/Common/UI/Button/Button.js.map +1 -1
  101. package/dist/components/Common/UI/Button/Button.module.scss.js +1 -1
  102. package/dist/components/Common/UI/Button/ButtonIcon.d.ts +1 -1
  103. package/dist/components/Common/UI/Button/ButtonIcon.js +7 -5
  104. package/dist/components/Common/UI/Button/ButtonIcon.js.map +1 -1
  105. package/dist/components/Common/UI/Button/ButtonIcon.module.scss.js +8 -0
  106. package/dist/components/Common/UI/Button/ButtonIcon.module.scss.js.map +1 -0
  107. package/dist/components/Common/UI/Button/ButtonTypes.d.ts +2 -6
  108. package/dist/components/Common/UI/CalendarPreview/CalendarLegend.js.map +1 -1
  109. package/dist/components/Common/UI/CalendarPreview/CalendarPreview.js.map +1 -1
  110. package/dist/components/Common/UI/CalendarPreview/CalendarPreview.module.scss.js +5 -5
  111. package/dist/components/Common/UI/Card/Card.js.map +1 -1
  112. package/dist/components/Common/UI/Card/Card.module.scss.js +1 -1
  113. package/dist/components/Common/UI/Checkbox/Checkbox.js.map +1 -1
  114. package/dist/components/Common/UI/Checkbox/Checkbox.module.scss.js +6 -6
  115. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js.map +1 -1
  116. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.module.scss.js +1 -1
  117. package/dist/components/Common/UI/ComboBox/ComboBox.js +36 -36
  118. package/dist/components/Common/UI/ComboBox/ComboBox.js.map +1 -1
  119. package/dist/components/Common/UI/ComboBox/ComboBox.module.scss.js +1 -1
  120. package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
  121. package/dist/components/Common/UI/DatePicker/DatePicker.module.scss.js +6 -6
  122. package/dist/components/Common/UI/Heading/Heading.js.map +1 -1
  123. package/dist/components/Common/UI/Heading/Heading.module.scss.js +11 -11
  124. package/dist/components/Common/UI/Input/Input.js.map +1 -1
  125. package/dist/components/Common/UI/Input/Input.module.scss.js +12 -12
  126. package/dist/components/Common/UI/Link/Link.js.map +1 -1
  127. package/dist/components/Common/UI/Link/Link.module.scss.js +1 -1
  128. package/dist/components/Common/UI/List/List.module.scss.js +1 -1
  129. package/dist/components/Common/UI/List/OrderedList.js.map +1 -1
  130. package/dist/components/Common/UI/List/UnorderedList.js.map +1 -1
  131. package/dist/components/Common/UI/Menu/Menu.js.map +1 -1
  132. package/dist/components/Common/UI/Menu/Menu.module.scss.js +5 -5
  133. package/dist/components/Common/UI/NumberInput/NumberInput.js +36 -38
  134. package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
  135. package/dist/components/Common/UI/ProgressBar/ProgressBar.js.map +1 -1
  136. package/dist/components/Common/UI/ProgressBar/ProgressBar.module.scss.js +1 -1
  137. package/dist/components/Common/UI/Radio/Radio.js.map +1 -1
  138. package/dist/components/Common/UI/Radio/Radio.module.scss.js +1 -1
  139. package/dist/components/Common/UI/RadioGroup/RadioGroup.js.map +1 -1
  140. package/dist/components/Common/UI/RadioGroup/RadioGroup.module.scss.js +1 -1
  141. package/dist/components/Common/UI/Select/Select.js +13 -13
  142. package/dist/components/Common/UI/Select/Select.js.map +1 -1
  143. package/dist/components/Common/UI/Select/Select.module.scss.js +1 -1
  144. package/dist/components/Common/UI/Switch/Switch.js.map +1 -1
  145. package/dist/components/Common/UI/Switch/Switch.module.scss.js +4 -4
  146. package/dist/components/Common/UI/Table/Table.js.map +1 -1
  147. package/dist/components/Common/UI/Table/Table.module.scss.js +1 -1
  148. package/dist/components/Common/UI/Text/Text.js.map +1 -1
  149. package/dist/components/Common/UI/Text/Text.module.scss.js +16 -20
  150. package/dist/components/Common/UI/Text/Text.module.scss.js.map +1 -1
  151. package/dist/components/Common/UI/Text/TextTypes.d.ts +1 -1
  152. package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
  153. package/dist/components/Common/UI/hooks/useFieldIds.js.map +1 -1
  154. package/dist/components/Common/VisuallyHidden/VisuallyHidden.js.map +1 -1
  155. package/dist/components/Common/hooks/useAsyncError.js.map +1 -1
  156. package/dist/components/Common/hooks/useMenu.js.map +1 -1
  157. package/dist/components/Common/hooks/useNumberFormatter.js.map +1 -1
  158. package/dist/components/Company/AssignSignatory/AssignSignatory.js +3 -2
  159. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  160. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +8 -6
  161. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  162. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +10 -8
  163. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  164. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  165. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js +11 -11
  166. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  167. package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.js.map +1 -1
  168. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +4 -3
  169. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  170. package/dist/components/Company/AssignSignatory/Head.js.map +1 -1
  171. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +8 -6
  172. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  173. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  174. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +1 -1
  175. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  176. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +4 -3
  177. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  178. package/dist/components/Company/AssignSignatory/SignatoryForm.js.map +1 -1
  179. package/dist/components/Company/AssignSignatory/TitleSelect.js +8 -7
  180. package/dist/components/Company/AssignSignatory/TitleSelect.js.map +1 -1
  181. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +6 -5
  182. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  183. package/dist/components/Company/BankAccount/BankAccount.js.map +1 -1
  184. package/dist/components/Company/BankAccount/BankAccountComponents.js.map +1 -1
  185. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +9 -8
  186. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js.map +1 -1
  187. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
  188. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +11 -9
  189. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  190. package/dist/components/Company/BankAccount/BankAccountForm/Head.js.map +1 -1
  191. package/dist/components/Company/BankAccount/BankAccountForm/context.js +4 -3
  192. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  193. package/dist/components/Company/BankAccount/BankAccountList/AccountView.js.map +1 -1
  194. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +12 -10
  195. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  196. package/dist/components/Company/BankAccount/BankAccountList/BankAccountList.js.map +1 -1
  197. package/dist/components/Company/BankAccount/BankAccountList/Head.js.map +1 -1
  198. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +13 -11
  199. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  200. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js.map +1 -1
  201. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +6 -4
  202. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  203. package/dist/components/Company/BankAccount/BankAccountVerify/Head.js.map +1 -1
  204. package/dist/components/Company/BankAccount/stateMachine.js.map +1 -1
  205. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +7 -5
  206. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  207. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +7 -6
  208. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  209. package/dist/components/Company/DocumentSigner/DocumentList/Head.js.map +1 -1
  210. package/dist/components/Company/DocumentSigner/DocumentList/List.js.map +1 -1
  211. package/dist/components/Company/DocumentSigner/DocumentList/ManageSignatories.js.map +1 -1
  212. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  213. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  214. package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -1
  215. package/dist/components/Company/DocumentSigner/SignatureForm/Actions.js.map +1 -1
  216. package/dist/components/Company/DocumentSigner/SignatureForm/Form.js.map +1 -1
  217. package/dist/components/Company/DocumentSigner/SignatureForm/Head.js.map +1 -1
  218. package/dist/components/Company/DocumentSigner/SignatureForm/Preview.js.map +1 -1
  219. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +3 -2
  220. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  221. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  222. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  223. package/dist/components/Company/DocumentSigner/assignSignatoryState.js.map +1 -1
  224. package/dist/components/Company/DocumentSigner/documentSignerStateMachine.js.map +1 -1
  225. package/dist/components/Company/DocumentSigner/stateMachine.js.map +1 -1
  226. package/dist/components/Company/FederalTaxes/Actions.js +9 -7
  227. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  228. package/dist/components/Company/FederalTaxes/FederalTaxes.js +7 -6
  229. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  230. package/dist/components/Company/FederalTaxes/Form.js +5 -3
  231. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  232. package/dist/components/Company/FederalTaxes/Head.js.map +1 -1
  233. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +6 -5
  234. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  235. package/dist/components/Company/Industry/Actions.js +7 -5
  236. package/dist/components/Company/Industry/Actions.js.map +1 -1
  237. package/dist/components/Company/Industry/Context.js +7 -6
  238. package/dist/components/Company/Industry/Context.js.map +1 -1
  239. package/dist/components/Company/Industry/Edit.js +12 -10
  240. package/dist/components/Company/Industry/Edit.js.map +1 -1
  241. package/dist/components/Company/Industry/Head.js.map +1 -1
  242. package/dist/components/Company/Industry/Industry.js.map +1 -1
  243. package/dist/components/Company/Industry/IndustrySelect.js.map +1 -1
  244. package/dist/components/Company/Locations/LocationForm/Actions.js +8 -6
  245. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  246. package/dist/components/Company/Locations/LocationForm/Form.js +1 -1
  247. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  248. package/dist/components/Company/Locations/LocationForm/Head.js.map +1 -1
  249. package/dist/components/Company/Locations/LocationForm/LocationForm.js +4 -3
  250. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  251. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +4 -3
  252. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  253. package/dist/components/Company/Locations/Locations.js.map +1 -1
  254. package/dist/components/Company/Locations/LocationsList/Actions.js +8 -6
  255. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  256. package/dist/components/Company/Locations/LocationsList/Head.js.map +1 -1
  257. package/dist/components/Company/Locations/LocationsList/List.js +4 -2
  258. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  259. package/dist/components/Company/Locations/LocationsList/LocationsList.js +9 -8
  260. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  261. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +4 -3
  262. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  263. package/dist/components/Company/Locations/locationsStateMachine.js.map +1 -1
  264. package/dist/components/Company/Locations/stateMachine.js.map +1 -1
  265. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
  266. package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  267. package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  268. package/dist/components/Company/OnboardingOverview/Completed.js +14 -12
  269. package/dist/components/Company/OnboardingOverview/Completed.js.map +1 -1
  270. package/dist/components/Company/OnboardingOverview/MissingRequirements.js +8 -6
  271. package/dist/components/Company/OnboardingOverview/MissingRequirements.js.map +1 -1
  272. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +3 -2
  273. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  274. package/dist/components/Company/OnboardingOverview/context.js +4 -3
  275. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  276. package/dist/components/Company/PaySchedule/PaySchedule.js +33 -31
  277. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  278. package/dist/components/Company/PaySchedule/_parts/Actions.js +12 -10
  279. package/dist/components/Company/PaySchedule/_parts/Actions.js.map +1 -1
  280. package/dist/components/Company/PaySchedule/_parts/Edit.js +51 -52
  281. package/dist/components/Company/PaySchedule/_parts/Edit.js.map +1 -1
  282. package/dist/components/Company/PaySchedule/_parts/Edit.module.scss.js +1 -1
  283. package/dist/components/Company/PaySchedule/_parts/Head.js +8 -6
  284. package/dist/components/Company/PaySchedule/_parts/Head.js.map +1 -1
  285. package/dist/components/Company/PaySchedule/_parts/List.js +15 -13
  286. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  287. package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +0 -3
  288. package/dist/components/Company/PaySchedule/usePaySchedule.js +8 -8
  289. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  290. package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -1
  291. package/dist/components/Company/StateTaxes/StateTaxesComponents.js.map +1 -1
  292. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +7 -5
  293. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  294. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +8 -8
  295. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
  296. package/dist/components/Company/StateTaxes/StateTaxesForm/Head.js.map +1 -1
  297. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  298. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +4 -3
  299. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  300. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +8 -6
  301. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  302. package/dist/components/Company/StateTaxes/StateTaxesList/Head.js.map +1 -1
  303. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +7 -5
  304. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  305. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
  306. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +4 -3
  307. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  308. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +1 -1
  309. package/dist/components/Contractor/Address/Actions.js.map +1 -1
  310. package/dist/components/Contractor/Address/Address.js +5 -4
  311. package/dist/components/Contractor/Address/Address.js.map +1 -1
  312. package/dist/components/Contractor/Address/Form.js +1 -1
  313. package/dist/components/Contractor/Address/Form.js.map +1 -1
  314. package/dist/components/Contractor/Address/Head.js.map +1 -1
  315. package/dist/components/Contractor/Address/useAddress.js +6 -5
  316. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  317. package/dist/components/Contractor/List/index.js.map +1 -1
  318. package/dist/components/Contractor/List/useContractorList.js.map +1 -1
  319. package/dist/components/Contractor/NewHireReport/NewHireReport.js +17 -16
  320. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  321. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +7 -5
  322. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  323. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +3 -2
  324. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  325. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +3 -2
  326. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js.map +1 -1
  327. package/dist/components/Contractor/Profile/ContractorProfile.js.map +1 -1
  328. package/dist/components/Contractor/Profile/ContractorProfileForm.js +10 -10
  329. package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +1 -1
  330. package/dist/components/Contractor/Profile/useContractorProfile.js +3 -2
  331. package/dist/components/Contractor/Profile/useContractorProfile.js.map +1 -1
  332. package/dist/components/Contractor/Submit/ContractorSubmitWithApi.js.map +1 -1
  333. package/dist/components/Contractor/Submit/SubmitDone.js.map +1 -1
  334. package/dist/components/Contractor/Submit/index.js +11 -9
  335. package/dist/components/Contractor/Submit/index.js.map +1 -1
  336. package/dist/components/Contractor/Submit/index.module.scss.js +2 -2
  337. package/dist/components/Employee/Compensation/Actions.js +6 -5
  338. package/dist/components/Employee/Compensation/Actions.js.map +1 -1
  339. package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
  340. package/dist/components/Employee/Compensation/Edit.js +15 -14
  341. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  342. package/dist/components/Employee/Compensation/Head.js.map +1 -1
  343. package/dist/components/Employee/Compensation/List.js +25 -23
  344. package/dist/components/Employee/Compensation/List.js.map +1 -1
  345. package/dist/components/Employee/Compensation/useCompensation.js.map +1 -1
  346. package/dist/components/Employee/Deductions/Deductions.d.ts +8 -14
  347. package/dist/components/Employee/Deductions/Deductions.js +47 -140
  348. package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
  349. package/dist/components/Employee/Deductions/DeductionsComponents.d.ts +23 -0
  350. package/dist/components/Employee/Deductions/DeductionsComponents.js +31 -0
  351. package/dist/components/Employee/Deductions/DeductionsComponents.js.map +1 -0
  352. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.d.ts +41 -0
  353. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +135 -0
  354. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -0
  355. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.d.ts +6 -0
  356. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js +99 -0
  357. package/dist/components/Employee/Deductions/DeductionsList/DeductionsList.js.map +1 -0
  358. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.d.ts +15 -0
  359. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js +49 -0
  360. package/dist/components/Employee/Deductions/IncludeDeductionsForm/IncludeDeductionsForm.js.map +1 -0
  361. package/dist/components/Employee/Deductions/stateMachine.d.ts +7 -0
  362. package/dist/components/Employee/Deductions/stateMachine.js +107 -0
  363. package/dist/components/Employee/Deductions/stateMachine.js.map +1 -0
  364. package/dist/components/Employee/Deductions/useDeductions.d.ts +2 -2
  365. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +8 -6
  366. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  367. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js +7 -6
  368. package/dist/components/Employee/DocumentSigner/DocumentList/DocumentList.js.map +1 -1
  369. package/dist/components/Employee/DocumentSigner/DocumentList/Head.js.map +1 -1
  370. package/dist/components/Employee/DocumentSigner/DocumentList/List.js +4 -2
  371. package/dist/components/Employee/DocumentSigner/DocumentList/List.js.map +1 -1
  372. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +4 -3
  373. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  374. package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -1
  375. package/dist/components/Employee/DocumentSigner/SignatureForm/Actions.js.map +1 -1
  376. package/dist/components/Employee/DocumentSigner/SignatureForm/Form.js.map +1 -1
  377. package/dist/components/Employee/DocumentSigner/SignatureForm/Head.js.map +1 -1
  378. package/dist/components/Employee/DocumentSigner/SignatureForm/Preview.js.map +1 -1
  379. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +8 -7
  380. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  381. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +4 -3
  382. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  383. package/dist/components/Employee/DocumentSigner/documentSignerStateMachine.js.map +1 -1
  384. package/dist/components/Employee/DocumentSigner/stateMachine.js.map +1 -1
  385. package/dist/components/Employee/EmployeeList/Actions.js +6 -4
  386. package/dist/components/Employee/EmployeeList/Actions.js.map +1 -1
  387. package/dist/components/Employee/EmployeeList/EmployeeList.js +4 -3
  388. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  389. package/dist/components/Employee/EmployeeList/Head.js +7 -5
  390. package/dist/components/Employee/EmployeeList/Head.js.map +1 -1
  391. package/dist/components/Employee/EmployeeList/List.js +15 -14
  392. package/dist/components/Employee/EmployeeList/List.js.map +1 -1
  393. package/dist/components/Employee/EmployeeList/useEmployeeList.js +4 -3
  394. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  395. package/dist/components/Employee/Landing/Landing.js +13 -12
  396. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  397. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -1
  398. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  399. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +7 -7
  400. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
  401. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.module.scss.js +6 -6
  402. package/dist/components/Employee/PaymentMethod/Actions.js +9 -7
  403. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  404. package/dist/components/Employee/PaymentMethod/BankAccount.js.map +1 -1
  405. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +6 -5
  406. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js.map +1 -1
  407. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +10 -8
  408. package/dist/components/Employee/PaymentMethod/BankAccountsList.js.map +1 -1
  409. package/dist/components/Employee/PaymentMethod/Head.js.map +1 -1
  410. package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
  411. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +3 -2
  412. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  413. package/dist/components/Employee/PaymentMethod/Split.js +11 -10
  414. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  415. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +6 -5
  416. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  417. package/dist/components/Employee/Profile/Actions.js +9 -7
  418. package/dist/components/Employee/Profile/Actions.js.map +1 -1
  419. package/dist/components/Employee/Profile/AdminPersonalDetails.js +10 -9
  420. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  421. package/dist/components/Employee/Profile/Head.js.map +1 -1
  422. package/dist/components/Employee/Profile/HomeAddress.js +1 -1
  423. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  424. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +2 -2
  425. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  426. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  427. package/dist/components/Employee/Profile/SelfPersonalDetails.js.map +1 -1
  428. package/dist/components/Employee/Profile/WorkAddress.js.map +1 -1
  429. package/dist/components/Employee/Profile/getEmployeeAddressForProfile.js.map +1 -1
  430. package/dist/components/Employee/Profile/useProfile.js +4 -3
  431. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  432. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -1
  433. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -1
  434. package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js.map +1 -1
  435. package/dist/components/Employee/Taxes/Actions.js +10 -8
  436. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  437. package/dist/components/Employee/Taxes/FederalForm.js +14 -12
  438. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  439. package/dist/components/Employee/Taxes/FederalHead.js.map +1 -1
  440. package/dist/components/Employee/Taxes/StateForm.js.map +1 -1
  441. package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
  442. package/dist/components/Employee/Taxes/useTaxes.js +4 -3
  443. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  444. package/dist/components/Flow/Flow.js.map +1 -1
  445. package/dist/components/Flow/useFlow.js.map +1 -1
  446. package/dist/contexts/ApiProvider/ApiProvider.d.ts +5 -2
  447. package/dist/contexts/ApiProvider/ApiProvider.js +34 -30
  448. package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -1
  449. package/dist/contexts/ComponentAdapter/ComponentsProvider.js.map +1 -1
  450. package/dist/contexts/ComponentAdapter/adapters/defaultComponentAdapter.js.map +1 -1
  451. package/dist/contexts/ComponentAdapter/useComponentContext.js.map +1 -1
  452. package/dist/contexts/GustoProvider/GustoProvider.js.map +1 -1
  453. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +6 -4
  454. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +16 -14
  455. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  456. package/dist/contexts/GustoProvider/SDKI18next.js.map +1 -1
  457. package/dist/contexts/GustoProvider/index.d.ts +2 -0
  458. package/dist/contexts/LoadingIndicatorProvider/LoadingIndicatorProvider.js.map +1 -1
  459. package/dist/contexts/LoadingIndicatorProvider/useLoadingIndicator.js.map +1 -1
  460. package/dist/contexts/LocaleProvider/LocaleProvider.js.map +1 -1
  461. package/dist/contexts/LocaleProvider/useLocale.js.map +1 -1
  462. package/dist/contexts/ThemeProvider/ThemeProvider.d.ts +2 -3
  463. package/dist/contexts/ThemeProvider/ThemeProvider.js +20 -24
  464. package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
  465. package/dist/contexts/ThemeProvider/theme.d.ts +90 -0
  466. package/dist/contexts/ThemeProvider/theme.js +117 -0
  467. package/dist/contexts/ThemeProvider/theme.js.map +1 -0
  468. package/dist/contexts/ThemeProvider/useTheme.js.map +1 -1
  469. package/dist/contexts/index.d.ts +4 -0
  470. package/dist/helpers/LRUCache.js.map +1 -1
  471. package/dist/helpers/dateFormatting.d.ts +10 -2
  472. package/dist/helpers/dateFormatting.js +30 -7
  473. package/dist/helpers/dateFormatting.js.map +1 -1
  474. package/dist/helpers/dateFormatting.test.d.ts +1 -0
  475. package/dist/helpers/ensureRequired.js.map +1 -1
  476. package/dist/helpers/federalEin.js.map +1 -1
  477. package/dist/helpers/formattedStrings.js.map +1 -1
  478. package/dist/helpers/getDataProps.js.map +1 -1
  479. package/dist/helpers/mask.js.map +1 -1
  480. package/dist/helpers/payRateCalculator.js.map +1 -1
  481. package/dist/helpers/rem.js +2 -3
  482. package/dist/helpers/rem.js.map +1 -1
  483. package/dist/helpers/responsive.d.ts +0 -3
  484. package/dist/helpers/responsive.js +20 -34
  485. package/dist/helpers/responsive.js.map +1 -1
  486. package/dist/helpers/ssn.js.map +1 -1
  487. package/dist/helpers/validations.js.map +1 -1
  488. package/dist/hooks/useContainerBreakpoints/useContainerBreakpoints.js.map +1 -1
  489. package/dist/hooks/useForkRef/useForkRef.js.map +1 -1
  490. package/dist/i18n/I18n.js.map +1 -1
  491. package/dist/i18n/en/Company.AddBank.json.js +12 -12
  492. package/dist/i18n/en/Company.Addresses.json.js +12 -12
  493. package/dist/i18n/en/Company.AssignSignatory.json.js +5 -54
  494. package/dist/i18n/en/Company.AssignSignatory.json.js.map +1 -1
  495. package/dist/i18n/en/Company.BankAccount.json.js +19 -40
  496. package/dist/i18n/en/Company.BankAccount.json.js.map +1 -1
  497. package/dist/i18n/en/Company.DocumentList.json.js +15 -15
  498. package/dist/i18n/en/Company.FederalTaxes.json.js +16 -32
  499. package/dist/i18n/en/Company.FederalTaxes.json.js.map +1 -1
  500. package/dist/i18n/en/Company.Locations.json.js +43 -49
  501. package/dist/i18n/en/Company.Locations.json.js.map +1 -1
  502. package/dist/i18n/en/Company.OnboardingOverview.json.js +14 -36
  503. package/dist/i18n/en/Company.OnboardingOverview.json.js.map +1 -1
  504. package/dist/i18n/en/Company.PaySchedule.json.js +1 -44
  505. package/dist/i18n/en/Company.PaySchedule.json.js.map +1 -1
  506. package/dist/i18n/en/Company.SignatureForm.json.js +9 -9
  507. package/dist/i18n/en/Company.StateTaxes.json.js +1 -25
  508. package/dist/i18n/en/Company.StateTaxes.json.js.map +1 -1
  509. package/dist/i18n/en/Contractor.Address.json.js +19 -24
  510. package/dist/i18n/en/Contractor.Address.json.js.map +1 -1
  511. package/dist/i18n/en/Contractor.ContractorList.json.js +9 -12
  512. package/dist/i18n/en/Contractor.ContractorList.json.js.map +1 -1
  513. package/dist/i18n/en/Contractor.ContractorSubmit.json.js +10 -14
  514. package/dist/i18n/en/Contractor.ContractorSubmit.json.js.map +1 -1
  515. package/dist/i18n/en/Contractor.NewHireReport.json.js +5 -7
  516. package/dist/i18n/en/Contractor.NewHireReport.json.js.map +1 -1
  517. package/dist/i18n/en/Contractor.PaymentMethod.json.js +4 -17
  518. package/dist/i18n/en/Contractor.PaymentMethod.json.js.map +1 -1
  519. package/dist/i18n/en/Contractor.Profile.json.js +1 -58
  520. package/dist/i18n/en/Contractor.Profile.json.js.map +1 -1
  521. package/dist/i18n/en/Employee.BankAccount.json.js +17 -19
  522. package/dist/i18n/en/Employee.BankAccount.json.js.map +1 -1
  523. package/dist/i18n/en/Employee.Compensation.json.js +31 -65
  524. package/dist/i18n/en/Employee.Compensation.json.js.map +1 -1
  525. package/dist/i18n/en/Employee.Deductions.json.js +64 -69
  526. package/dist/i18n/en/Employee.Deductions.json.js.map +1 -1
  527. package/dist/i18n/en/Employee.DocumentSigner.json.js +23 -23
  528. package/dist/i18n/en/Employee.EmployeeList.json.js +29 -29
  529. package/dist/i18n/en/Employee.HomeAddress.json.js +23 -28
  530. package/dist/i18n/en/Employee.HomeAddress.json.js.map +1 -1
  531. package/dist/i18n/en/Employee.Landing.json.js +11 -15
  532. package/dist/i18n/en/Employee.Landing.json.js.map +1 -1
  533. package/dist/i18n/en/Employee.OnboardingSummary.json.js +6 -28
  534. package/dist/i18n/en/Employee.OnboardingSummary.json.js.map +1 -1
  535. package/dist/i18n/en/Employee.PaySchedules.json.js +1 -5
  536. package/dist/i18n/en/Employee.PaySchedules.json.js.map +1 -1
  537. package/dist/i18n/en/Employee.PaymentMethod.json.js +29 -36
  538. package/dist/i18n/en/Employee.PaymentMethod.json.js.map +1 -1
  539. package/dist/i18n/en/Employee.Profile.json.js +16 -22
  540. package/dist/i18n/en/Employee.Profile.json.js.map +1 -1
  541. package/dist/i18n/en/Employee.SplitPaycheck.json.js +21 -25
  542. package/dist/i18n/en/Employee.SplitPaycheck.json.js.map +1 -1
  543. package/dist/i18n/en/Employee.StateTaxes.json.js +4 -4
  544. package/dist/i18n/en/Employee.Taxes.json.js +26 -29
  545. package/dist/i18n/en/Employee.Taxes.json.js.map +1 -1
  546. package/dist/i18n/en/Payroll.PayrollHistoryList.json.js +9 -9
  547. package/dist/i18n/en/common.json.d.ts +1 -1
  548. package/dist/i18n/en/common.json.js +1 -147
  549. package/dist/i18n/en/common.json.js.map +1 -1
  550. package/dist/index.d.ts +1 -0
  551. package/dist/index.js +11 -9
  552. package/dist/index.js.map +1 -1
  553. package/dist/models/NAICSValues.js.map +1 -1
  554. package/dist/models/WA_RISK_CODES.js.map +1 -1
  555. package/dist/shared/constants.d.ts +8 -0
  556. package/dist/shared/constants.js +9 -5
  557. package/dist/shared/constants.js.map +1 -1
  558. package/dist/style.css +1 -1
  559. package/dist/types/hooks.d.ts +36 -0
  560. package/dist/types/i18next.d.ts +0 -1
  561. package/package.json +5 -5
  562. package/dist/components/Common/UI/NumberInput/NumberInput.module.scss.js +0 -8
  563. package/dist/components/Common/UI/NumberInput/NumberInput.module.scss.js.map +0 -1
  564. package/dist/components/Employee/Deductions/Actions.js +0 -25
  565. package/dist/components/Employee/Deductions/Actions.js.map +0 -1
  566. package/dist/components/Employee/Deductions/DeductionForm.d.ts +0 -1
  567. package/dist/components/Employee/Deductions/DeductionForm.js +0 -76
  568. package/dist/components/Employee/Deductions/DeductionForm.js.map +0 -1
  569. package/dist/components/Employee/Deductions/DeductionsList.d.ts +0 -2
  570. package/dist/components/Employee/Deductions/DeductionsList.js +0 -58
  571. package/dist/components/Employee/Deductions/DeductionsList.js.map +0 -1
  572. package/dist/components/Employee/Deductions/Head.js +0 -13
  573. package/dist/components/Employee/Deductions/Head.js.map +0 -1
  574. package/dist/components/Employee/Deductions/IncludeDeductionsForm.d.ts +0 -1
  575. package/dist/components/Employee/Deductions/IncludeDeductionsForm.js +0 -25
  576. package/dist/components/Employee/Deductions/IncludeDeductionsForm.js.map +0 -1
  577. package/dist/components/Employee/Deductions/useDeductions.js +0 -33
  578. package/dist/components/Employee/Deductions/useDeductions.js.map +0 -1
  579. package/dist/contexts/ThemeProvider/createTheme.d.ts +0 -22
  580. package/dist/contexts/ThemeProvider/createTheme.js +0 -271
  581. package/dist/contexts/ThemeProvider/createTheme.js.map +0 -1
  582. package/dist/types/GTheme.d.ts +0 -255
  583. /package/dist/contexts/ThemeProvider/{createTheme.test.d.ts → theme.test.d.ts} +0 -0
@@ -0,0 +1,117 @@
1
+ import { toRem as n, getRootFontSize as a } from "../../helpers/rem.js";
2
+ const o = {
3
+ neutral: {
4
+ 100: "#FFFFFF",
5
+ 300: "#F4F4F3",
6
+ 400: "#EAEAEA",
7
+ 500: "#DCDCDC",
8
+ 800: "#6C6C72",
9
+ 900: "#525257",
10
+ 1e3: "#1C1C1C"
11
+ },
12
+ error: {
13
+ 100: "#FEF3F2",
14
+ 500: "#C5271C",
15
+ 800: "#D92D20"
16
+ },
17
+ warning: {
18
+ 100: "#FFFAF2",
19
+ 500: "#E9B550",
20
+ 800: "#B88023"
21
+ },
22
+ success: {
23
+ 100: "#F3FAFB",
24
+ 500: "#0A8080",
25
+ 800: "#005961"
26
+ },
27
+ info: {
28
+ 100: "#F4F4F3",
29
+ 500: "#DCDCDC",
30
+ 800: "#1C1C1C"
31
+ }
32
+ }, i = {
33
+ colorBody: o.neutral[100],
34
+ colorBodyAccent: o.neutral[300],
35
+ colorBodyContent: o.neutral[1e3],
36
+ colorBodySubContent: o.neutral[800],
37
+ colorPrimary: o.neutral[1e3],
38
+ colorPrimaryAccent: o.neutral[900],
39
+ colorPrimaryContent: o.neutral[100],
40
+ colorSecondary: o.neutral[100],
41
+ colorSecondaryAccent: o.neutral[400],
42
+ colorSecondaryContent: o.neutral[1e3],
43
+ colorInfo: o.info[100],
44
+ colorInfoAccent: o.info[500],
45
+ colorInfoContent: o.info[800],
46
+ colorWarning: o.warning[100],
47
+ colorWarningAccent: o.warning[500],
48
+ colorWarningContent: o.warning[800],
49
+ colorError: o.error[100],
50
+ colorErrorAccent: o.error[500],
51
+ colorErrorContent: o.error[800],
52
+ colorSuccess: o.success[100],
53
+ colorSuccessAccent: o.success[500],
54
+ colorSuccessContent: o.success[800],
55
+ colorBorder: o.neutral[400]
56
+ }, u = (r = {}) => ({
57
+ // Colors
58
+ ...i,
59
+ ...r,
60
+ // Input Colors
61
+ inputBackgroundColor: r.colorBody,
62
+ inputBorderColor: o.neutral[500],
63
+ inputContentColor: r.colorBodyContent,
64
+ inputBorderWidth: "1px",
65
+ inputPlaceholderColor: r.colorBodySubContent,
66
+ inputAdornmentColor: r.colorBodySubContent,
67
+ inputDisabledBackgroundColor: r.colorBodyAccent,
68
+ // Field Colors
69
+ inputLabelColor: r.colorBodyContent,
70
+ inputLabelFontSize: n(16),
71
+ inputLabelFontWeight: "500",
72
+ inputDescriptionColor: r.colorBodySubContent,
73
+ inputErrorColor: r.colorErrorAccent,
74
+ // Radius
75
+ inputRadius: n(8),
76
+ buttonRadius: n(8),
77
+ badgeRadius: n(16),
78
+ // Font
79
+ fontSizeRoot: a(),
80
+ fontFamily: "Geist",
81
+ fontLineHeight: n(24),
82
+ fontSizeSmall: n(14),
83
+ fontSizeRegular: n(16),
84
+ fontSizeLarge: n(18),
85
+ fontSizeHeading1: n(32),
86
+ fontSizeHeading2: n(24),
87
+ fontSizeHeading3: n(20),
88
+ fontSizeHeading4: n(18),
89
+ fontSizeHeading5: n(16),
90
+ fontSizeHeading6: n(14),
91
+ fontWeightRegular: "400",
92
+ fontWeightMedium: "500",
93
+ fontWeightSemibold: "600",
94
+ fontWeightBold: "700",
95
+ // Transitions
96
+ transitionDuration: "200ms",
97
+ // Shadows
98
+ shadowResting: "0px 1px 2px 0px rgba(10, 13, 18, 0.05)",
99
+ shadowTopmost: "0px 4px 6px 0px rgba(28, 28, 28, 0.05), 0px 10px 15px 0px rgba(28, 28, 28, 0.10)",
100
+ // Focus
101
+ focusRingColor: r.colorPrimary,
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
+ };
112
+ };
113
+ export {
114
+ u as createTheme,
115
+ s as mergePartnerTheme
116
+ };
117
+ //# sourceMappingURL=theme.js.map
@@ -0,0 +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: '#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":";AAIA,MAAMA,IAAa;AAAA,EACjB,SAAS;AAAA,IACP,KAAK;AAAA,IAEL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IAGL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAM;AAAA,EAAA;AAAA,EAER,OAAO;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,EAAA;AAAA,EAEP,SAAS;AAAA,IACP,KAAK;AAAA,IACL,KAAK;AAAA,IAEL,KAAK;AAAA,EAAA;AAAA,EAEP,SAAS;AAAA,IACP,KAAK;AAAA,IAEL,KAAK;AAAA,IACL,KAAK;AAAA,EAAA;AAAA,EAEP,MAAM;AAAA,IACJ,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AAAA,EAAA;AAET,GAEMC,IAAqB;AAAA,EACzB,WAAWD,EAAW,QAAQ,GAAG;AAAA,EACjC,iBAAiBA,EAAW,QAAQ,GAAG;AAAA,EACvC,kBAAkBA,EAAW,QAAQ,GAAI;AAAA,EACzC,qBAAqBA,EAAW,QAAQ,GAAG;AAAA,EAC3C,cAAcA,EAAW,QAAQ,GAAI;AAAA,EACrC,oBAAoBA,EAAW,QAAQ,GAAG;AAAA,EAC1C,qBAAqBA,EAAW,QAAQ,GAAG;AAAA,EAC3C,gBAAgBA,EAAW,QAAQ,GAAG;AAAA,EACtC,sBAAsBA,EAAW,QAAQ,GAAG;AAAA,EAC5C,uBAAuBA,EAAW,QAAQ,GAAI;AAAA,EAC9C,WAAWA,EAAW,KAAK,GAAG;AAAA,EAC9B,iBAAiBA,EAAW,KAAK,GAAG;AAAA,EACpC,kBAAkBA,EAAW,KAAK,GAAG;AAAA,EACrC,cAAcA,EAAW,QAAQ,GAAG;AAAA,EACpC,oBAAoBA,EAAW,QAAQ,GAAG;AAAA,EAC1C,qBAAqBA,EAAW,QAAQ,GAAG;AAAA,EAC3C,YAAYA,EAAW,MAAM,GAAG;AAAA,EAChC,kBAAkBA,EAAW,MAAM,GAAG;AAAA,EACtC,mBAAmBA,EAAW,MAAM,GAAG;AAAA,EACvC,cAAcA,EAAW,QAAQ,GAAG;AAAA,EACpC,oBAAoBA,EAAW,QAAQ,GAAG;AAAA,EAC1C,qBAAqBA,EAAW,QAAQ,GAAG;AAAA,EAC3C,aAAaA,EAAW,QAAQ,GAAG;AACrC,GAIaE,IAAc,CAACC,IAA8B,QACjD;AAAA;AAAA,EAEL,GAAGF;AAAA,EACH,GAAGE;AAAA;AAAA,EAEH,sBAAsBA,EAAO;AAAA,EAC7B,kBAAkBH,EAAW,QAAQ,GAAG;AAAA,EACxC,mBAAmBG,EAAO;AAAA,EAC1B,kBAAkB;AAAA,EAClB,uBAAuBA,EAAO;AAAA,EAC9B,qBAAqBA,EAAO;AAAA,EAC5B,8BAA8BA,EAAO;AAAA;AAAA,EAErC,iBAAiBA,EAAO;AAAA,EACxB,oBAAoBC,EAAM,EAAE;AAAA,EAC5B,sBAAsB;AAAA,EACtB,uBAAuBD,EAAO;AAAA,EAC9B,iBAAiBA,EAAO;AAAA;AAAA,EAExB,aAAaC,EAAM,CAAC;AAAA,EACpB,cAAcA,EAAM,CAAC;AAAA,EACrB,aAAaA,EAAM,EAAE;AAAA;AAAA,EAErB,cAAcC,EAAA;AAAA,EACd,YAAY;AAAA,EACZ,gBAAgBD,EAAM,EAAE;AAAA,EACxB,eAAeA,EAAM,EAAE;AAAA,EACvB,iBAAiBA,EAAM,EAAE;AAAA,EACzB,eAAeA,EAAM,EAAE;AAAA,EACvB,kBAAkBA,EAAM,EAAE;AAAA,EAC1B,kBAAkBA,EAAM,EAAE;AAAA,EAC1B,kBAAkBA,EAAM,EAAE;AAAA,EAC1B,kBAAkBA,EAAM,EAAE;AAAA,EAC1B,kBAAkBA,EAAM,EAAE;AAAA,EAC1B,kBAAkBA,EAAM,EAAE;AAAA,EAC1B,mBAAmB;AAAA,EACnB,kBAAkB;AAAA,EAClB,oBAAoB;AAAA,EACpB,gBAAgB;AAAA;AAAA,EAEhB,oBAAoB;AAAA;AAAA,EAEpB,eAAe;AAAA,EACf,eACE;AAAA;AAAA,EAEF,gBAAgBD,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 +1 @@
1
- {"version":3,"file":"useTheme.js","sources":["../../../src/contexts/ThemeProvider/useTheme.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\n\nexport interface ThemeContextProps {\n container: React.RefObject<HTMLElement>\n}\nexport const ThemeContext = createContext<ThemeContextProps>({} as ThemeContextProps)\n\nexport const useTheme = () => useContext(ThemeContext)\n"],"names":["ThemeContext","createContext","useTheme","useContext"],"mappings":";AAKa,MAAAA,IAAeC,EAAiC,CAAuB,CAAA,GAEvEC,IAAW,MAAMC,EAAWH,CAAY;"}
1
+ {"version":3,"file":"useTheme.js","sources":["../../../src/contexts/ThemeProvider/useTheme.ts"],"sourcesContent":["import { createContext, useContext } from 'react'\n\nexport interface ThemeContextProps {\n container: React.RefObject<HTMLElement>\n}\nexport const ThemeContext = createContext<ThemeContextProps>({} as ThemeContextProps)\n\nexport const useTheme = () => useContext(ThemeContext)\n"],"names":["ThemeContext","createContext","useTheme","useContext"],"mappings":";AAKO,MAAMA,IAAeC,EAAiC,CAAA,CAAuB,GAEvEC,IAAW,MAAMC,EAAWH,CAAY;"}
@@ -1,5 +1,9 @@
1
1
  import "./types/i18next.d.ts"
2
2
  export { GustoApiProvider } from './GustoApiProvider';
3
3
  export { GustoProvider, GustoProviderCustomUIAdapter } from './GustoProvider';
4
+ export type { GustoProviderProps, GustoProviderCustomUIAdapterProps, APIConfig, } from './GustoProvider/GustoProviderCustomUIAdapter';
5
+ export type { GustoApiProps } from './GustoProvider';
6
+ export { ApiProvider } from './ApiProvider/ApiProvider';
7
+ export type { ApiProviderProps } from './ApiProvider/ApiProvider';
4
8
  export type { ComponentsContextType } from './ComponentAdapter/useComponentContext';
5
9
  export * from './ComponentAdapter/componentAdapterTypes';
@@ -1 +1 @@
1
- {"version":3,"file":"LRUCache.js","sources":["../../src/helpers/LRUCache.ts"],"sourcesContent":["export class LRUCache {\n capacity: number\n map: Map<string, () => Record<string, string>>\n\n constructor(capacity: number) {\n this.capacity = capacity\n this.map = new Map()\n }\n\n get(key: string): (() => Record<string, string>) | null {\n const value = this.map.get(key)\n if (value === undefined) return null\n\n // Small hack to re-order keys: we remove the requested key and place it at the end\n this.map.delete(key)\n this.map.set(key, value)\n\n return value\n }\n\n put(key: string, value: () => Record<string, string>): void {\n // remove last element to avoid overflow, only if it does not have\n // the inserted key is a new key\n if (this.map.size >= this.capacity && !this.map.has(key)) {\n const firstKey = this.map.keys().next().value as string\n this.map.delete(firstKey)\n }\n\n // Small hack to re-order keys: we remove the requested key and place it at the end\n this.map.delete(key)\n this.map.set(key, value)\n }\n}\n"],"names":["LRUCache","capacity","key","value","firstKey"],"mappings":"AAAO,MAAMA,EAAS;AAAA,EACpB;AAAA,EACA;AAAA,EAEA,YAAYC,GAAkB;AAC5B,SAAK,WAAWA,GACX,KAAA,0BAAU,IAAI;AAAA,EAAA;AAAA,EAGrB,IAAIC,GAAoD;AACtD,UAAMC,IAAQ,KAAK,IAAI,IAAID,CAAG;AAC1B,WAAAC,MAAU,SAAkB,QAG3B,KAAA,IAAI,OAAOD,CAAG,GACd,KAAA,IAAI,IAAIA,GAAKC,CAAK,GAEhBA;AAAA,EAAA;AAAA,EAGT,IAAID,GAAaC,GAA2C;AAGtD,QAAA,KAAK,IAAI,QAAQ,KAAK,YAAY,CAAC,KAAK,IAAI,IAAID,CAAG,GAAG;AACxD,YAAME,IAAW,KAAK,IAAI,KAAK,EAAE,OAAO;AACnC,WAAA,IAAI,OAAOA,CAAQ;AAAA,IAAA;AAIrB,SAAA,IAAI,OAAOF,CAAG,GACd,KAAA,IAAI,IAAIA,GAAKC,CAAK;AAAA,EAAA;AAE3B;"}
1
+ {"version":3,"file":"LRUCache.js","sources":["../../src/helpers/LRUCache.ts"],"sourcesContent":["export class LRUCache {\n capacity: number\n map: Map<string, () => Record<string, string>>\n\n constructor(capacity: number) {\n this.capacity = capacity\n this.map = new Map()\n }\n\n get(key: string): (() => Record<string, string>) | null {\n const value = this.map.get(key)\n if (value === undefined) return null\n\n // Small hack to re-order keys: we remove the requested key and place it at the end\n this.map.delete(key)\n this.map.set(key, value)\n\n return value\n }\n\n put(key: string, value: () => Record<string, string>): void {\n // remove last element to avoid overflow, only if it does not have\n // the inserted key is a new key\n if (this.map.size >= this.capacity && !this.map.has(key)) {\n const firstKey = this.map.keys().next().value as string\n this.map.delete(firstKey)\n }\n\n // Small hack to re-order keys: we remove the requested key and place it at the end\n this.map.delete(key)\n this.map.set(key, value)\n }\n}\n"],"names":["LRUCache","capacity","key","value","firstKey"],"mappings":"AAAO,MAAMA,EAAS;AAAA,EACpB;AAAA,EACA;AAAA,EAEA,YAAYC,GAAkB;AAC5B,SAAK,WAAWA,GAChB,KAAK,0BAAU,IAAA;AAAA,EACjB;AAAA,EAEA,IAAIC,GAAoD;AACtD,UAAMC,IAAQ,KAAK,IAAI,IAAID,CAAG;AAC9B,WAAIC,MAAU,SAAkB,QAGhC,KAAK,IAAI,OAAOD,CAAG,GACnB,KAAK,IAAI,IAAIA,GAAKC,CAAK,GAEhBA;AAAA,EACT;AAAA,EAEA,IAAID,GAAaC,GAA2C;AAG1D,QAAI,KAAK,IAAI,QAAQ,KAAK,YAAY,CAAC,KAAK,IAAI,IAAID,CAAG,GAAG;AACxD,YAAME,IAAW,KAAK,IAAI,KAAA,EAAO,OAAO;AACxC,WAAK,IAAI,OAAOA,CAAQ;AAAA,IAC1B;AAGA,SAAK,IAAI,OAAOF,CAAG,GACnB,KAAK,IAAI,IAAIA,GAAKC,CAAK;AAAA,EACzB;AACF;"}
@@ -1,2 +1,10 @@
1
- export declare const formatDateNamedWeekdayShortPlusDate: (date?: string) => string;
2
- export declare const formatDateToStringDate: (date: Date) => string | undefined;
1
+ export declare const formatDateNamedWeekdayShortPlusDate: (date?: string, locale?: string) => string;
2
+ export declare const formatDateToStringDate: (date: Date) => string | null | undefined;
3
+ /**
4
+ * Parses YYYY-MM-DD string to local Date, avoiding timezone issues from `new Date(dateString)`.
5
+ */
6
+ export declare const parseDateStringToLocal: (dateString: string) => Date | null;
7
+ /**
8
+ * Normalizes Date to local midnight, handling timezone issues from any adapter.
9
+ */
10
+ export declare const normalizeDateToLocal: (date: Date | null) => Date | null;
@@ -1,10 +1,33 @@
1
- const e = (t) => t ? new Date(t).toLocaleDateString("en-US", {
2
- weekday: "short",
3
- month: "short",
4
- day: "numeric"
5
- }) : "", r = (t) => t.toISOString().split("T")[0];
1
+ const l = (t, o) => {
2
+ if (!t) return "";
3
+ const n = u(t);
4
+ return n ? n.toLocaleDateString(o, {
5
+ weekday: "short",
6
+ month: "short",
7
+ day: "numeric"
8
+ }) : "";
9
+ }, c = (t) => isNaN(t.getTime()) ? null : t.toISOString().split("T")[0], u = (t) => {
10
+ if (!t || !/^\d{4}-\d{2}-\d{2}$/.test(t))
11
+ return null;
12
+ const o = t.split("-");
13
+ if (o.length !== 3)
14
+ return null;
15
+ const n = o.map(Number), s = n[0], r = n[1], e = n[2];
16
+ return s === void 0 || r === void 0 || e === void 0 || isNaN(s) || isNaN(r) || isNaN(e) || r < 1 || r > 12 || e < 1 || e > 31 ? null : new Date(s, r - 1, e);
17
+ }, N = (t) => {
18
+ if (!t || isNaN(t.getTime()))
19
+ return null;
20
+ const o = t.toISOString(), [n] = o.split("T");
21
+ if (!n) return null;
22
+ const s = n.split("-");
23
+ if (s.length !== 3) return null;
24
+ const r = s.map(Number), e = r[0], i = r[1], a = r[2];
25
+ return isNaN(e) || isNaN(i) || isNaN(a) || i < 1 || i > 12 || a < 1 || a > 31 ? null : new Date(e, i - 1, a);
26
+ };
6
27
  export {
7
- e as formatDateNamedWeekdayShortPlusDate,
8
- r as formatDateToStringDate
28
+ l as formatDateNamedWeekdayShortPlusDate,
29
+ c as formatDateToStringDate,
30
+ N as normalizeDateToLocal,
31
+ u as parseDateStringToLocal
9
32
  };
10
33
  //# sourceMappingURL=dateFormatting.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"dateFormatting.js","sources":["../../src/helpers/dateFormatting.ts"],"sourcesContent":["export const formatDateNamedWeekdayShortPlusDate = (date?: string) => {\n if (!date) return ''\n return new Date(date).toLocaleDateString('en-US', {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n })\n}\n\nexport const formatDateToStringDate = (date: Date) => {\n return date.toISOString().split('T')[0]\n}\n"],"names":["formatDateNamedWeekdayShortPlusDate","date","formatDateToStringDate"],"mappings":"AAAa,MAAAA,IAAsC,CAACC,MAC7CA,IACE,IAAI,KAAKA,CAAI,EAAE,mBAAmB,SAAS;AAAA,EAChD,SAAS;AAAA,EACT,OAAO;AAAA,EACP,KAAK;AAAA,CACN,IALiB,IAQPC,IAAyB,CAACD,MAC9BA,EAAK,YAAY,EAAE,MAAM,GAAG,EAAE,CAAC;"}
1
+ {"version":3,"file":"dateFormatting.js","sources":["../../src/helpers/dateFormatting.ts"],"sourcesContent":["export const formatDateNamedWeekdayShortPlusDate = (date?: string, locale?: string) => {\n if (!date) return ''\n const parsedDate = parseDateStringToLocal(date)\n if (!parsedDate) return ''\n return parsedDate.toLocaleDateString(locale, {\n weekday: 'short',\n month: 'short',\n day: 'numeric',\n })\n}\n\nexport const formatDateToStringDate = (date: Date) => {\n // Handle invalid dates gracefully\n if (isNaN(date.getTime())) {\n return null\n }\n return date.toISOString().split('T')[0]\n}\n\n/**\n * Parses YYYY-MM-DD string to local Date, avoiding timezone issues from `new Date(dateString)`.\n */\nexport const parseDateStringToLocal = (dateString: string): Date | null => {\n if (!dateString || !/^\\d{4}-\\d{2}-\\d{2}$/.test(dateString)) {\n return null\n }\n\n const parts = dateString.split('-')\n if (parts.length !== 3) {\n return null\n }\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 // Validate date components\n if (isNaN(year) || isNaN(month) || isNaN(day) || month < 1 || month > 12 || day < 1 || day > 31) {\n return null\n }\n\n // Create Date in local timezone (month is 0-indexed)\n return new Date(year, month - 1, day)\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 // Use ISO string to get the intended date, then parse components\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"],"names":["formatDateNamedWeekdayShortPlusDate","date","locale","parsedDate","parseDateStringToLocal","formatDateToStringDate","dateString","parts","numbers","year","month","day","normalizeDateToLocal","isoString","datePart"],"mappings":"AAAO,MAAMA,IAAsC,CAACC,GAAeC,MAAoB;AACrF,MAAI,CAACD,EAAM,QAAO;AAClB,QAAME,IAAaC,EAAuBH,CAAI;AAC9C,SAAKE,IACEA,EAAW,mBAAmBD,GAAQ;AAAA,IAC3C,SAAS;AAAA,IACT,OAAO;AAAA,IACP,KAAK;AAAA,EAAA,CACN,IALuB;AAM1B,GAEaG,IAAyB,CAACJ,MAEjC,MAAMA,EAAK,QAAA,CAAS,IACf,OAEFA,EAAK,YAAA,EAAc,MAAM,GAAG,EAAE,CAAC,GAM3BG,IAAyB,CAACE,MAAoC;AACzE,MAAI,CAACA,KAAc,CAAC,sBAAsB,KAAKA,CAAU;AACvD,WAAO;AAGT,QAAMC,IAAQD,EAAW,MAAM,GAAG;AAClC,MAAIC,EAAM,WAAW;AACnB,WAAO;AAGT,QAAMC,IAAUD,EAAM,IAAI,MAAM,GAC1BE,IAAOD,EAAQ,CAAC,GAChBE,IAAQF,EAAQ,CAAC,GACjBG,IAAMH,EAAQ,CAAC;AAMrB,SALIC,MAAS,UAAaC,MAAU,UAAaC,MAAQ,UAKrD,MAAMF,CAAI,KAAK,MAAMC,CAAK,KAAK,MAAMC,CAAG,KAAKD,IAAQ,KAAKA,IAAQ,MAAMC,IAAM,KAAKA,IAAM,KACpF,OAIF,IAAI,KAAKF,GAAMC,IAAQ,GAAGC,CAAG;AACtC,GAKaC,IAAuB,CAACX,MAAmC;AACtE,MAAI,CAACA,KAAQ,MAAMA,EAAK,QAAA,CAAS;AAC/B,WAAO;AAIT,QAAMY,IAAYZ,EAAK,YAAA,GACjB,CAACa,CAAQ,IAAID,EAAU,MAAM,GAAG;AACtC,MAAI,CAACC,EAAU,QAAO;AAEtB,QAAMP,IAAQO,EAAS,MAAM,GAAG;AAChC,MAAIP,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;"}
@@ -0,0 +1 @@
1
+ export {};
@@ -1 +1 @@
1
- {"version":3,"file":"ensureRequired.js","sources":["../../src/helpers/ensureRequired.ts"],"sourcesContent":["import { t } from 'i18next'\n\nexport function ensureRequired<T>(prop: T | undefined): T {\n if (prop === undefined) {\n throw new Error(t('errors.ensureRequired'))\n }\n return prop\n}\n"],"names":["ensureRequired","prop","t"],"mappings":";AAEO,SAASA,EAAkBC,GAAwB;AACxD,MAAIA,MAAS;AACX,UAAM,IAAI,MAAMC,EAAE,uBAAuB,CAAC;AAErC,SAAAD;AACT;"}
1
+ {"version":3,"file":"ensureRequired.js","sources":["../../src/helpers/ensureRequired.ts"],"sourcesContent":["import { t } from 'i18next'\n\nexport function ensureRequired<T>(prop: T | undefined): T {\n if (prop === undefined) {\n throw new Error(t('errors.ensureRequired'))\n }\n return prop\n}\n"],"names":["ensureRequired","prop","t"],"mappings":";AAEO,SAASA,EAAkBC,GAAwB;AACxD,MAAIA,MAAS;AACX,UAAM,IAAI,MAAMC,EAAE,uBAAuB,CAAC;AAE5C,SAAOD;AACT;"}
@@ -1 +1 @@
1
- {"version":3,"file":"federalEin.js","sources":["../../src/helpers/federalEin.ts"],"sourcesContent":["import { useTranslation } from 'react-i18next'\n\n/**\n * Normalizes string input to a 9 digit EIN format with two leading digits, a dash, and 7 trailing digits removing any non-numeric characters.\n * @param value - Raw string value to be formatted as a federal EIN\n * @returns String in the federal EIN format with all invalid characters removed\n */\nexport const normalizeEin = (value: string) =>\n value\n .match(/\\d*/g)\n ?.join('')\n .match(/(\\d{0,2})(\\d{0,7})/)\n ?.slice(1)\n .filter(match => match !== '')\n .join('-')\n .substring(0, 10) || ''\n\nexport const createPlaceholderEin = (hasEin?: boolean, placeholderEin?: string) =>\n hasEin ? placeholderEin : ''\n\nexport const usePlaceholderEin = (hasEin?: boolean) => {\n const { t } = useTranslation('common')\n return createPlaceholderEin(hasEin, t('inputs.ein.placeholder'))\n}\n"],"names":["normalizeEin","value","match","createPlaceholderEin","hasEin","placeholderEin","usePlaceholderEin","t","useTranslation"],"mappings":";AAOa,MAAAA,IAAe,CAACC,MAC3BA,EACG,MAAM,MAAM,GACX,KAAK,EAAE,EACR,MAAM,oBAAoB,GACzB,MAAM,CAAC,EACR,OAAO,CAASC,MAAAA,MAAU,EAAE,EAC5B,KAAK,GAAG,EACR,UAAU,GAAG,EAAE,KAAK,IAEZC,IAAuB,CAACC,GAAkBC,MACrDD,IAASC,IAAiB,IAEfC,IAAoB,CAACF,MAAqB;AACrD,QAAM,EAAE,GAAAG,EAAA,IAAMC,EAAe,QAAQ;AACrC,SAAOL,EAAqBC,GAAQG,EAAE,wBAAwB,CAAC;AACjE;"}
1
+ {"version":3,"file":"federalEin.js","sources":["../../src/helpers/federalEin.ts"],"sourcesContent":["import { useTranslation } from 'react-i18next'\n\n/**\n * Normalizes string input to a 9 digit EIN format with two leading digits, a dash, and 7 trailing digits removing any non-numeric characters.\n * @param value - Raw string value to be formatted as a federal EIN\n * @returns String in the federal EIN format with all invalid characters removed\n */\nexport const normalizeEin = (value: string) =>\n value\n .match(/\\d*/g)\n ?.join('')\n .match(/(\\d{0,2})(\\d{0,7})/)\n ?.slice(1)\n .filter(match => match !== '')\n .join('-')\n .substring(0, 10) || ''\n\nexport const createPlaceholderEin = (hasEin?: boolean, placeholderEin?: string) =>\n hasEin ? placeholderEin : ''\n\nexport const usePlaceholderEin = (hasEin?: boolean) => {\n const { t } = useTranslation('common')\n return createPlaceholderEin(hasEin, t('inputs.ein.placeholder'))\n}\n"],"names":["normalizeEin","value","match","createPlaceholderEin","hasEin","placeholderEin","usePlaceholderEin","t","useTranslation"],"mappings":";AAOO,MAAMA,IAAe,CAACC,MAC3BA,EACG,MAAM,MAAM,GACX,KAAK,EAAE,EACR,MAAM,oBAAoB,GACzB,MAAM,CAAC,EACR,OAAO,CAAAC,MAASA,MAAU,EAAE,EAC5B,KAAK,GAAG,EACR,UAAU,GAAG,EAAE,KAAK,IAEZC,IAAuB,CAACC,GAAkBC,MACrDD,IAASC,IAAiB,IAEfC,IAAoB,CAACF,MAAqB;AACrD,QAAM,EAAE,GAAAG,EAAA,IAAMC,EAAe,QAAQ;AACrC,SAAOL,EAAqBC,GAAQG,EAAE,wBAAwB,CAAC;AACjE;"}
@@ -1 +1 @@
1
- {"version":3,"file":"formattedStrings.js","sources":["../../src/helpers/formattedStrings.ts"],"sourcesContent":["import DOMPurify from 'dompurify'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { type EmployeeAddress } from '@gusto/embedded-api/models/components/employeeaddress'\n\nconst capitalize = (word: string) => word.charAt(0).toLocaleUpperCase() + word.slice(1)\n\nexport const firstLastName = ({\n first_name,\n last_name,\n}: {\n first_name?: string | null\n last_name?: string | null\n}) =>\n `${first_name ? capitalize(first_name) : ''}${last_name ? maybeString(capitalize(last_name)) : ''}`\n\nconst maybeString = (str: string | null | undefined) => {\n return str ? ` ${str}` : ''\n}\n\nexport const getStreet = (address: EmployeeAddress | Location) => {\n const street1 = maybeString(address.street1)\n const street2 = maybeString(address.street2)\n\n return `${street1},${street2}`\n}\n\nexport const getCityStateZip = (address: EmployeeAddress | Location) =>\n `${maybeString(address.city)}, ${maybeString(address.state)} ${maybeString(address.zip)}`\n\nexport const addressInline = (address: EmployeeAddress | Location) =>\n `${getStreet(address)} ${getCityStateZip(address)}`\n\nexport const currentDateString = () => {\n const d = new Date()\n const dateString = `${String(d.getFullYear())}-${('0' + String(d.getMonth() + 1)).slice(-2)}-${('0' + String(d.getDate())).slice(-2)}`\n return dateString\n}\n\nexport function isNumberKey({ which, keyCode }: KeyboardEvent) {\n const charCode = which ? which : keyCode\n if (charCode > 31 && charCode != 46 && (charCode < 48 || charCode > 57)) return false\n return true\n}\n\nexport const booleanToString = (value: boolean) => (value ? 'true' : 'false')\n\nexport const amountStr = (amount: string, isPercentage: boolean) =>\n isPercentage ? `${amount}%` : `$${amount}`\n\nconst dompurifyConfig = { ALLOWED_TAGS: ['a', 'b', 'strong'], ALLOWED_ATTR: ['href', 'target'] }\nexport function createMarkup(dirty: string) {\n if (!dirty) return { __html: '' }\n return { __html: DOMPurify.sanitize(dirty, dompurifyConfig) }\n}\n\nexport const removeNonDigits = (value: string): string => {\n return value.replace(/\\D/g, '')\n}\n\nexport const snakeCaseToCamelCase = (s: string) => {\n return s.replace(/_([a-z])/g, (_: string, char: string) => char.toUpperCase())\n}\n\nexport const camelCaseToSnakeCase = (s: string) => {\n return s\n .replace(\n /([a-z0-9])([A-Z])/g,\n (_: string, group1: string, group2: string) => `${group1}_${group2.toLowerCase()}`,\n )\n .replace(\n /([A-Z])([A-Z])(?=[a-z])/g,\n (_: string, group1: string, group2: string) =>\n `${group1.toLowerCase()}_${group2.toLowerCase()}`,\n )\n .toLowerCase()\n}\n"],"names":["capitalize","word","firstLastName","first_name","last_name","maybeString","str","getStreet","address","street1","street2","getCityStateZip","addressInline","dompurifyConfig","createMarkup","dirty","DOMPurify","removeNonDigits","value","snakeCaseToCamelCase","s","_","char"],"mappings":";AAIA,MAAMA,IAAa,CAACC,MAAiBA,EAAK,OAAO,CAAC,EAAE,sBAAsBA,EAAK,MAAM,CAAC,GAEzEC,IAAgB,CAAC;AAAA,EAC5B,YAAAC;AAAA,EACA,WAAAC;AACF,MAIE,GAAGD,IAAaH,EAAWG,CAAU,IAAI,EAAE,GAAGC,IAAYC,EAAYL,EAAWI,CAAS,CAAC,IAAI,EAAE,IAE7FC,IAAc,CAACC,MACZA,IAAM,IAAIA,CAAG,KAAK,IAGdC,IAAY,CAACC,MAAwC;AAC1D,QAAAC,IAAUJ,EAAYG,EAAQ,OAAO,GACrCE,IAAUL,EAAYG,EAAQ,OAAO;AAEpC,SAAA,GAAGC,CAAO,IAAIC,CAAO;AAC9B,GAEaC,IAAkB,CAACH,MAC9B,GAAGH,EAAYG,EAAQ,IAAI,CAAC,KAAKH,EAAYG,EAAQ,KAAK,CAAC,IAAIH,EAAYG,EAAQ,GAAG,CAAC,IAE5EI,IAAgB,CAACJ,MAC5B,GAAGD,EAAUC,CAAO,CAAC,IAAIG,EAAgBH,CAAO,CAAC,IAmB7CK,IAAkB,EAAE,cAAc,CAAC,KAAK,KAAK,QAAQ,GAAG,cAAc,CAAC,QAAQ,QAAQ,EAAE;AACxF,SAASC,EAAaC,GAAe;AAC1C,SAAKA,IACE,EAAE,QAAQC,EAAU,SAASD,GAAOF,CAAe,EAAE,IADzC,EAAE,QAAQ,GAAG;AAElC;AAEa,MAAAI,IAAkB,CAACC,MACvBA,EAAM,QAAQ,OAAO,EAAE,GAGnBC,IAAuB,CAACC,MAC5BA,EAAE,QAAQ,aAAa,CAACC,GAAWC,MAAiBA,EAAK,aAAa;"}
1
+ {"version":3,"file":"formattedStrings.js","sources":["../../src/helpers/formattedStrings.ts"],"sourcesContent":["import DOMPurify from 'dompurify'\nimport { type Location } from '@gusto/embedded-api/models/components/location'\nimport { type EmployeeAddress } from '@gusto/embedded-api/models/components/employeeaddress'\n\nconst capitalize = (word: string) => word.charAt(0).toLocaleUpperCase() + word.slice(1)\n\nexport const firstLastName = ({\n first_name,\n last_name,\n}: {\n first_name?: string | null\n last_name?: string | null\n}) =>\n `${first_name ? capitalize(first_name) : ''}${last_name ? maybeString(capitalize(last_name)) : ''}`\n\nconst maybeString = (str: string | null | undefined) => {\n return str ? ` ${str}` : ''\n}\n\nexport const getStreet = (address: EmployeeAddress | Location) => {\n const street1 = maybeString(address.street1)\n const street2 = maybeString(address.street2)\n\n return `${street1},${street2}`\n}\n\nexport const getCityStateZip = (address: EmployeeAddress | Location) =>\n `${maybeString(address.city)}, ${maybeString(address.state)} ${maybeString(address.zip)}`\n\nexport const addressInline = (address: EmployeeAddress | Location) =>\n `${getStreet(address)} ${getCityStateZip(address)}`\n\nexport const currentDateString = () => {\n const d = new Date()\n const dateString = `${String(d.getFullYear())}-${('0' + String(d.getMonth() + 1)).slice(-2)}-${('0' + String(d.getDate())).slice(-2)}`\n return dateString\n}\n\nexport function isNumberKey({ which, keyCode }: KeyboardEvent) {\n const charCode = which ? which : keyCode\n if (charCode > 31 && charCode != 46 && (charCode < 48 || charCode > 57)) return false\n return true\n}\n\nexport const booleanToString = (value: boolean) => (value ? 'true' : 'false')\n\nexport const amountStr = (amount: string, isPercentage: boolean) =>\n isPercentage ? `${amount}%` : `$${amount}`\n\nconst dompurifyConfig = { ALLOWED_TAGS: ['a', 'b', 'strong'], ALLOWED_ATTR: ['href', 'target'] }\nexport function createMarkup(dirty: string) {\n if (!dirty) return { __html: '' }\n return { __html: DOMPurify.sanitize(dirty, dompurifyConfig) }\n}\n\nexport const removeNonDigits = (value: string): string => {\n return value.replace(/\\D/g, '')\n}\n\nexport const snakeCaseToCamelCase = (s: string) => {\n return s.replace(/_([a-z])/g, (_: string, char: string) => char.toUpperCase())\n}\n\nexport const camelCaseToSnakeCase = (s: string) => {\n return s\n .replace(\n /([a-z0-9])([A-Z])/g,\n (_: string, group1: string, group2: string) => `${group1}_${group2.toLowerCase()}`,\n )\n .replace(\n /([A-Z])([A-Z])(?=[a-z])/g,\n (_: string, group1: string, group2: string) =>\n `${group1.toLowerCase()}_${group2.toLowerCase()}`,\n )\n .toLowerCase()\n}\n"],"names":["capitalize","word","firstLastName","first_name","last_name","maybeString","str","getStreet","address","street1","street2","getCityStateZip","addressInline","dompurifyConfig","createMarkup","dirty","DOMPurify","removeNonDigits","value","snakeCaseToCamelCase","s","_","char"],"mappings":";AAIA,MAAMA,IAAa,CAACC,MAAiBA,EAAK,OAAO,CAAC,EAAE,sBAAsBA,EAAK,MAAM,CAAC,GAEzEC,IAAgB,CAAC;AAAA,EAC5B,YAAAC;AAAA,EACA,WAAAC;AACF,MAIE,GAAGD,IAAaH,EAAWG,CAAU,IAAI,EAAE,GAAGC,IAAYC,EAAYL,EAAWI,CAAS,CAAC,IAAI,EAAE,IAE7FC,IAAc,CAACC,MACZA,IAAM,IAAIA,CAAG,KAAK,IAGdC,IAAY,CAACC,MAAwC;AAChE,QAAMC,IAAUJ,EAAYG,EAAQ,OAAO,GACrCE,IAAUL,EAAYG,EAAQ,OAAO;AAE3C,SAAO,GAAGC,CAAO,IAAIC,CAAO;AAC9B,GAEaC,IAAkB,CAACH,MAC9B,GAAGH,EAAYG,EAAQ,IAAI,CAAC,KAAKH,EAAYG,EAAQ,KAAK,CAAC,IAAIH,EAAYG,EAAQ,GAAG,CAAC,IAE5EI,IAAgB,CAACJ,MAC5B,GAAGD,EAAUC,CAAO,CAAC,IAAIG,EAAgBH,CAAO,CAAC,IAmB7CK,IAAkB,EAAE,cAAc,CAAC,KAAK,KAAK,QAAQ,GAAG,cAAc,CAAC,QAAQ,QAAQ,EAAA;AACtF,SAASC,EAAaC,GAAe;AAC1C,SAAKA,IACE,EAAE,QAAQC,EAAU,SAASD,GAAOF,CAAe,EAAA,IADvC,EAAE,QAAQ,GAAA;AAE/B;AAEO,MAAMI,IAAkB,CAACC,MACvBA,EAAM,QAAQ,OAAO,EAAE,GAGnBC,IAAuB,CAACC,MAC5BA,EAAE,QAAQ,aAAa,CAACC,GAAWC,MAAiBA,EAAK,aAAa;"}
@@ -1 +1 @@
1
- {"version":3,"file":"getDataProps.js","sources":["../../src/helpers/getDataProps.ts"],"sourcesContent":["import type { DataAttributes } from '@/types/Helpers'\n\ntype DataAttributeEntry = [key: keyof DataAttributes, value: DataAttributes[keyof DataAttributes]]\n\nconst isDataProp = (entry: [string, unknown]): entry is DataAttributeEntry => {\n const [key, value] = entry\n return (\n key.startsWith('data-') &&\n (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean')\n )\n}\n\nexport function getDataProps(props: Record<string, unknown>): DataAttributes {\n const result: DataAttributes = {}\n\n Object.entries(props).forEach(entry => {\n if (isDataProp(entry)) {\n const [key, value] = entry\n result[key] = value\n }\n })\n\n return result\n}\n"],"names":["isDataProp","entry","key","value","getDataProps","props","result"],"mappings":"AAIA,MAAMA,IAAa,CAACC,MAA0D;AACtE,QAAA,CAACC,GAAKC,CAAK,IAAIF;AAEnB,SAAAC,EAAI,WAAW,OAAO,MACrB,OAAOC,KAAU,YAAY,OAAOA,KAAU,YAAY,OAAOA,KAAU;AAEhF;AAEO,SAASC,EAAaC,GAAgD;AAC3E,QAAMC,IAAyB,CAAC;AAEhC,gBAAO,QAAQD,CAAK,EAAE,QAAQ,CAASJ,MAAA;AACjC,QAAAD,EAAWC,CAAK,GAAG;AACf,YAAA,CAACC,GAAKC,CAAK,IAAIF;AACrB,MAAAK,EAAOJ,CAAG,IAAIC;AAAA,IAAA;AAAA,EAChB,CACD,GAEMG;AACT;"}
1
+ {"version":3,"file":"getDataProps.js","sources":["../../src/helpers/getDataProps.ts"],"sourcesContent":["import type { DataAttributes } from '@/types/Helpers'\n\ntype DataAttributeEntry = [key: keyof DataAttributes, value: DataAttributes[keyof DataAttributes]]\n\nconst isDataProp = (entry: [string, unknown]): entry is DataAttributeEntry => {\n const [key, value] = entry\n return (\n key.startsWith('data-') &&\n (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean')\n )\n}\n\nexport function getDataProps(props: Record<string, unknown>): DataAttributes {\n const result: DataAttributes = {}\n\n Object.entries(props).forEach(entry => {\n if (isDataProp(entry)) {\n const [key, value] = entry\n result[key] = value\n }\n })\n\n return result\n}\n"],"names":["isDataProp","entry","key","value","getDataProps","props","result"],"mappings":"AAIA,MAAMA,IAAa,CAACC,MAA0D;AAC5E,QAAM,CAACC,GAAKC,CAAK,IAAIF;AACrB,SACEC,EAAI,WAAW,OAAO,MACrB,OAAOC,KAAU,YAAY,OAAOA,KAAU,YAAY,OAAOA,KAAU;AAEhF;AAEO,SAASC,EAAaC,GAAgD;AAC3E,QAAMC,IAAyB,CAAA;AAE/B,gBAAO,QAAQD,CAAK,EAAE,QAAQ,CAAAJ,MAAS;AACrC,QAAID,EAAWC,CAAK,GAAG;AACrB,YAAM,CAACC,GAAKC,CAAK,IAAIF;AACrB,MAAAK,EAAOJ,CAAG,IAAIC;AAAA,IAChB;AAAA,EACF,CAAC,GAEMG;AACT;"}
@@ -1 +1 @@
1
- {"version":3,"file":"mask.js","sources":["../../src/helpers/mask.ts"],"sourcesContent":["import type { Transform } from '@/components/Common/Fields/hooks/useField'\n\n/**\n * Formats a string according to a specified mask pattern.\n * @param value - The input string to format\n * @param mask - The mask pattern where:\n * # represents a digit (\\d)\n * @ represents a letter ([a-zA-Z])\n * ^ represents an uppercase letter ([A-Z])\n * % represents a digit or uppercase letter ([0-9A-Z])\n * any other character represents the literal character\n * @returns The formatted string according to the mask\n * @example\n * formatWithMask('123456789', '###-##-####') // returns '123-45-6789'\n * formatWithMask('ABC123', '@@@-###') // returns 'ABC-123'\n * formatWithMask('123456', '(###) ###-####') // returns '(123) 456'\n * formatWithMask('ABC123', '^^^-###') // returns 'ABC-123'\n * formatWithMask('A1B2C3', '%%%-%%%') // returns 'A1B-2C3'\n */\nexport const formatWithMask = (value: string, mask: string | null): string => {\n if (!value || !mask) return value\n\n // Remove all non-alphanumeric characters from the input\n const sanitizedValue = value.replace(/[^a-zA-Z0-9]/g, '')\n if (!sanitizedValue) return ''\n\n let result = ''\n let valueIndex = 0\n let maskIndex = 0\n\n while (maskIndex < mask.length) {\n const maskChar = mask.charAt(maskIndex)\n const valueChar = sanitizedValue.charAt(valueIndex)\n\n // If we've processed all input characters, stop\n if (valueIndex >= sanitizedValue.length) {\n break\n }\n\n switch (maskChar) {\n case '#':\n if (/\\d/.test(valueChar)) {\n result += valueChar\n valueIndex++\n } else {\n valueIndex++\n maskIndex--\n }\n break\n case '@':\n if (/[a-zA-Z]/.test(valueChar)) {\n result += valueChar\n valueIndex++\n } else {\n valueIndex++\n maskIndex--\n }\n break\n case '^':\n if (/[A-Z]/.test(valueChar)) {\n result += valueChar\n valueIndex++\n } else {\n valueIndex++\n maskIndex--\n }\n break\n case '%':\n if (/[0-9A-Z]/.test(valueChar)) {\n result += valueChar\n valueIndex++\n } else {\n valueIndex++\n maskIndex--\n }\n break\n default:\n // Always add literal characters from the mask\n result += maskChar\n // Increment valueIndex only if the current input character matches the literal mask character.\n if (maskChar === valueChar) {\n valueIndex++\n }\n }\n maskIndex++\n }\n\n return result.trim()\n}\n\nexport const useMaskedTransform = (mask: string | null): Transform<string> => {\n return (value: string) => formatWithMask(value, mask)\n}\n\nexport const commonMasks = {\n phoneMask: '(###) ###-####',\n}\n"],"names":["formatWithMask","value","mask","sanitizedValue","result","valueIndex","maskIndex","maskChar","valueChar","useMaskedTransform","commonMasks"],"mappings":"AAmBa,MAAAA,IAAiB,CAACC,GAAeC,MAAgC;AAC5E,MAAI,CAACD,KAAS,CAACC,EAAa,QAAAD;AAG5B,QAAME,IAAiBF,EAAM,QAAQ,iBAAiB,EAAE;AACpD,MAAA,CAACE,EAAuB,QAAA;AAE5B,MAAIC,IAAS,IACTC,IAAa,GACbC,IAAY;AAET,SAAAA,IAAYJ,EAAK,UAAQ;AACxB,UAAAK,IAAWL,EAAK,OAAOI,CAAS,GAChCE,IAAYL,EAAe,OAAOE,CAAU;AAG9C,QAAAA,KAAcF,EAAe;AAC/B;AAGF,YAAQI,GAAU;AAAA,MAChB,KAAK;AACC,QAAA,KAAK,KAAKC,CAAS,KACXJ,KAAAI,GACVH,QAEAA,KACAC;AAEF;AAAA,MACF,KAAK;AACC,QAAA,WAAW,KAAKE,CAAS,KACjBJ,KAAAI,GACVH,QAEAA,KACAC;AAEF;AAAA,MACF,KAAK;AACC,QAAA,QAAQ,KAAKE,CAAS,KACdJ,KAAAI,GACVH,QAEAA,KACAC;AAEF;AAAA,MACF,KAAK;AACC,QAAA,WAAW,KAAKE,CAAS,KACjBJ,KAAAI,GACVH,QAEAA,KACAC;AAEF;AAAA,MACF;AAEY,QAAAF,KAAAG,GAENA,MAAaC,KACfH;AAAA,IACF;AAEJ,IAAAC;AAAA,EAAA;AAGF,SAAOF,EAAO,KAAK;AACrB,GAEaK,IAAqB,CAACP,MAC1B,CAACD,MAAkBD,EAAeC,GAAOC,CAAI,GAGzCQ,IAAc;AAAA,EACzB,WAAW;AACb;"}
1
+ {"version":3,"file":"mask.js","sources":["../../src/helpers/mask.ts"],"sourcesContent":["import type { Transform } from '@/components/Common/Fields/hooks/useField'\n\n/**\n * Formats a string according to a specified mask pattern.\n * @param value - The input string to format\n * @param mask - The mask pattern where:\n * # represents a digit (\\d)\n * @ represents a letter ([a-zA-Z])\n * ^ represents an uppercase letter ([A-Z])\n * % represents a digit or uppercase letter ([0-9A-Z])\n * any other character represents the literal character\n * @returns The formatted string according to the mask\n * @example\n * formatWithMask('123456789', '###-##-####') // returns '123-45-6789'\n * formatWithMask('ABC123', '@@@-###') // returns 'ABC-123'\n * formatWithMask('123456', '(###) ###-####') // returns '(123) 456'\n * formatWithMask('ABC123', '^^^-###') // returns 'ABC-123'\n * formatWithMask('A1B2C3', '%%%-%%%') // returns 'A1B-2C3'\n */\nexport const formatWithMask = (value: string, mask: string | null): string => {\n if (!value || !mask) return value\n\n // Remove all non-alphanumeric characters from the input\n const sanitizedValue = value.replace(/[^a-zA-Z0-9]/g, '')\n if (!sanitizedValue) return ''\n\n let result = ''\n let valueIndex = 0\n let maskIndex = 0\n\n while (maskIndex < mask.length) {\n const maskChar = mask.charAt(maskIndex)\n const valueChar = sanitizedValue.charAt(valueIndex)\n\n // If we've processed all input characters, stop\n if (valueIndex >= sanitizedValue.length) {\n break\n }\n\n switch (maskChar) {\n case '#':\n if (/\\d/.test(valueChar)) {\n result += valueChar\n valueIndex++\n } else {\n valueIndex++\n maskIndex--\n }\n break\n case '@':\n if (/[a-zA-Z]/.test(valueChar)) {\n result += valueChar\n valueIndex++\n } else {\n valueIndex++\n maskIndex--\n }\n break\n case '^':\n if (/[A-Z]/.test(valueChar)) {\n result += valueChar\n valueIndex++\n } else {\n valueIndex++\n maskIndex--\n }\n break\n case '%':\n if (/[0-9A-Z]/.test(valueChar)) {\n result += valueChar\n valueIndex++\n } else {\n valueIndex++\n maskIndex--\n }\n break\n default:\n // Always add literal characters from the mask\n result += maskChar\n // Increment valueIndex only if the current input character matches the literal mask character.\n if (maskChar === valueChar) {\n valueIndex++\n }\n }\n maskIndex++\n }\n\n return result.trim()\n}\n\nexport const useMaskedTransform = (mask: string | null): Transform<string> => {\n return (value: string) => formatWithMask(value, mask)\n}\n\nexport const commonMasks = {\n phoneMask: '(###) ###-####',\n}\n"],"names":["formatWithMask","value","mask","sanitizedValue","result","valueIndex","maskIndex","maskChar","valueChar","useMaskedTransform","commonMasks"],"mappings":"AAmBO,MAAMA,IAAiB,CAACC,GAAeC,MAAgC;AAC5E,MAAI,CAACD,KAAS,CAACC,EAAM,QAAOD;AAG5B,QAAME,IAAiBF,EAAM,QAAQ,iBAAiB,EAAE;AACxD,MAAI,CAACE,EAAgB,QAAO;AAE5B,MAAIC,IAAS,IACTC,IAAa,GACbC,IAAY;AAEhB,SAAOA,IAAYJ,EAAK,UAAQ;AAC9B,UAAMK,IAAWL,EAAK,OAAOI,CAAS,GAChCE,IAAYL,EAAe,OAAOE,CAAU;AAGlD,QAAIA,KAAcF,EAAe;AAC/B;AAGF,YAAQI,GAAA;AAAA,MACN,KAAK;AACH,QAAI,KAAK,KAAKC,CAAS,KACrBJ,KAAUI,GACVH,QAEAA,KACAC;AAEF;AAAA,MACF,KAAK;AACH,QAAI,WAAW,KAAKE,CAAS,KAC3BJ,KAAUI,GACVH,QAEAA,KACAC;AAEF;AAAA,MACF,KAAK;AACH,QAAI,QAAQ,KAAKE,CAAS,KACxBJ,KAAUI,GACVH,QAEAA,KACAC;AAEF;AAAA,MACF,KAAK;AACH,QAAI,WAAW,KAAKE,CAAS,KAC3BJ,KAAUI,GACVH,QAEAA,KACAC;AAEF;AAAA,MACF;AAEE,QAAAF,KAAUG,GAENA,MAAaC,KACfH;AAAA,IACF;AAEJ,IAAAC;AAAA,EACF;AAEA,SAAOF,EAAO,KAAA;AAChB,GAEaK,IAAqB,CAACP,MAC1B,CAACD,MAAkBD,EAAeC,GAAOC,CAAI,GAGzCQ,IAAc;AAAA,EACzB,WAAW;AACb;"}
@@ -1 +1 @@
1
- {"version":3,"file":"payRateCalculator.js","sources":["../../src/helpers/payRateCalculator.ts"],"sourcesContent":["import {\n HOURS_PER_PAY_PERIOD_ANNUALLY,\n HOURS_PER_PAY_PERIOD_MONTHLY,\n HOURS_PER_PAY_PERIOD_WEEKLY,\n} from '@/shared/constants'\n\nexport const hourlyRate = (\n amount: number,\n paymentUnit: 'Hour' | 'Week' | 'Month' | 'Year' | 'Paycheck',\n) => {\n switch (paymentUnit) {\n case 'Hour':\n return amount\n case 'Week':\n return amount / HOURS_PER_PAY_PERIOD_WEEKLY\n case 'Month':\n return amount / HOURS_PER_PAY_PERIOD_MONTHLY\n case 'Year':\n return amount / HOURS_PER_PAY_PERIOD_ANNUALLY\n default:\n return 0\n }\n}\nexport const yearlyRate = (\n amount: number,\n paymentUnit: 'Hour' | 'Week' | 'Month' | 'Year' | 'Paycheck',\n) => {\n return hourlyRate(amount, paymentUnit) * HOURS_PER_PAY_PERIOD_ANNUALLY\n}\n"],"names":["hourlyRate","amount","paymentUnit","HOURS_PER_PAY_PERIOD_WEEKLY","HOURS_PER_PAY_PERIOD_MONTHLY","HOURS_PER_PAY_PERIOD_ANNUALLY","yearlyRate"],"mappings":";AAMa,MAAAA,IAAa,CACxBC,GACAC,MACG;AACH,UAAQA,GAAa;AAAA,IACnB,KAAK;AACI,aAAAD;AAAA,IACT,KAAK;AACH,aAAOA,IAASE;AAAA,IAClB,KAAK;AACH,aAAOF,IAASG;AAAA,IAClB,KAAK;AACH,aAAOH,IAASI;AAAA,IAClB;AACS,aAAA;AAAA,EAAA;AAEb,GACaC,IAAa,CACxBL,GACAC,MAEOF,EAAWC,GAAQC,CAAW,IAAIG;"}
1
+ {"version":3,"file":"payRateCalculator.js","sources":["../../src/helpers/payRateCalculator.ts"],"sourcesContent":["import {\n HOURS_PER_PAY_PERIOD_ANNUALLY,\n HOURS_PER_PAY_PERIOD_MONTHLY,\n HOURS_PER_PAY_PERIOD_WEEKLY,\n} from '@/shared/constants'\n\nexport const hourlyRate = (\n amount: number,\n paymentUnit: 'Hour' | 'Week' | 'Month' | 'Year' | 'Paycheck',\n) => {\n switch (paymentUnit) {\n case 'Hour':\n return amount\n case 'Week':\n return amount / HOURS_PER_PAY_PERIOD_WEEKLY\n case 'Month':\n return amount / HOURS_PER_PAY_PERIOD_MONTHLY\n case 'Year':\n return amount / HOURS_PER_PAY_PERIOD_ANNUALLY\n default:\n return 0\n }\n}\nexport const yearlyRate = (\n amount: number,\n paymentUnit: 'Hour' | 'Week' | 'Month' | 'Year' | 'Paycheck',\n) => {\n return hourlyRate(amount, paymentUnit) * HOURS_PER_PAY_PERIOD_ANNUALLY\n}\n"],"names":["hourlyRate","amount","paymentUnit","HOURS_PER_PAY_PERIOD_WEEKLY","HOURS_PER_PAY_PERIOD_MONTHLY","HOURS_PER_PAY_PERIOD_ANNUALLY","yearlyRate"],"mappings":";AAMO,MAAMA,IAAa,CACxBC,GACAC,MACG;AACH,UAAQA,GAAA;AAAA,IACN,KAAK;AACH,aAAOD;AAAA,IACT,KAAK;AACH,aAAOA,IAASE;AAAA,IAClB,KAAK;AACH,aAAOF,IAASG;AAAA,IAClB,KAAK;AACH,aAAOH,IAASI;AAAA,IAClB;AACE,aAAO;AAAA,EAAA;AAEb,GACaC,IAAa,CACxBL,GACAC,MAEOF,EAAWC,GAAQC,CAAW,IAAIG;"}
@@ -1,9 +1,8 @@
1
1
  function t() {
2
- const e = "16";
3
2
  if (typeof window > "u")
4
- return e;
3
+ return "16";
5
4
  const n = window.getComputedStyle(document.documentElement).getPropertyValue("font-size").match(/\d+/);
6
- return typeof n == "string" ? n : e;
5
+ return typeof n == "string" ? n : "16";
7
6
  }
8
7
  function o(e) {
9
8
  return String(e / Number(t())) + "rem";
@@ -1 +1 @@
1
- {"version":3,"file":"rem.js","sources":["../../src/helpers/rem.ts"],"sourcesContent":["/**\n * Detects font-size on the document root element with fallback to 16px wich is the default browser setting\n * @returns number\n */\nexport function getRootFontSize() {\n const defaultFontSize = '16'\n\n if (typeof window === 'undefined') {\n return defaultFontSize\n }\n\n const match = window\n .getComputedStyle(document.documentElement)\n .getPropertyValue('font-size')\n .match(/\\d+/)\n return typeof match === 'string' ? match : defaultFontSize\n}\n\nexport function toRem(pxValue: number) {\n return String(pxValue / Number(getRootFontSize())) + 'rem'\n}\n\nexport const remToPx = (rem: string | number) =>\n typeof rem === 'number'\n ? Number(getRootFontSize()) * rem\n : Number(getRootFontSize()) * Number(rem.replace('rem', ''))\n"],"names":["getRootFontSize","defaultFontSize","match","toRem","pxValue","remToPx","rem"],"mappings":"AAIO,SAASA,IAAkB;AAChC,QAAMC,IAAkB;AAEpB,MAAA,OAAO,SAAW;AACb,WAAAA;AAGH,QAAAC,IAAQ,OACX,iBAAiB,SAAS,eAAe,EACzC,iBAAiB,WAAW,EAC5B,MAAM,KAAK;AACP,SAAA,OAAOA,KAAU,WAAWA,IAAQD;AAC7C;AAEO,SAASE,EAAMC,GAAiB;AACrC,SAAO,OAAOA,IAAU,OAAOJ,EAAiB,CAAA,CAAC,IAAI;AACvD;AAEa,MAAAK,IAAU,CAACC,MACtB,OAAOA,KAAQ,WACX,OAAON,GAAiB,IAAIM,IAC5B,OAAON,EAAA,CAAiB,IAAI,OAAOM,EAAI,QAAQ,OAAO,EAAE,CAAC;"}
1
+ {"version":3,"file":"rem.js","sources":["../../src/helpers/rem.ts"],"sourcesContent":["/**\n * Detects font-size on the document root element with fallback to 16px wich is the default browser setting\n * @returns number\n */\nexport function getRootFontSize() {\n const defaultFontSize = '16'\n\n if (typeof window === 'undefined') {\n return defaultFontSize\n }\n\n const match = window\n .getComputedStyle(document.documentElement)\n .getPropertyValue('font-size')\n .match(/\\d+/)\n return typeof match === 'string' ? match : defaultFontSize\n}\n\nexport function toRem(pxValue: number) {\n return String(pxValue / Number(getRootFontSize())) + 'rem'\n}\n\nexport const remToPx = (rem: string | number) =>\n typeof rem === 'number'\n ? Number(getRootFontSize()) * rem\n : Number(getRootFontSize()) * Number(rem.replace('rem', ''))\n"],"names":["getRootFontSize","match","toRem","pxValue","remToPx","rem"],"mappings":"AAIO,SAASA,IAAkB;AAGhC,MAAI,OAAO,SAAW;AACpB,WAAO;AAGT,QAAMC,IAAQ,OACX,iBAAiB,SAAS,eAAe,EACzC,iBAAiB,WAAW,EAC5B,MAAM,KAAK;AACd,SAAO,OAAOA,KAAU,WAAWA,IAAQ;AAC7C;AAEO,SAASC,EAAMC,GAAiB;AACrC,SAAO,OAAOA,IAAU,OAAOH,EAAA,CAAiB,CAAC,IAAI;AACvD;AAEO,MAAMI,IAAU,CAACC,MACtB,OAAOA,KAAQ,WACX,OAAOL,GAAiB,IAAIK,IAC5B,OAAOL,EAAA,CAAiB,IAAI,OAAOK,EAAI,QAAQ,OAAO,EAAE,CAAC;"}
@@ -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;AACzF,SAAA,OAAO,OAAOC,CAAW,EAAE;AAAA,IAChC,CAAcC,MAAA,OAAOF,KAAU,YAAYE,KAAcF;AAAA,EAC3D;AACF;AAEgB,SAAAG,EACdH,GACAI,GACA;AACA,QAAMC,IAAkBN,EAAkBC,CAAK,IAAIA,IAAQ,EAAE,MAAMA,EAAM,GAEnEM,IAAqD,CAAC;AAErD,gBAAA,QAAQD,CAAe,EAAE,QAAQ,CAAC,CAACE,GAAKP,CAAK,MAAM;AAC7B,IAAAM,EAAAC,CAAG,IAAIH,EAAeJ,CAAK;AAAA,EAAA,CACvD,GAEMM;AACT;AAEO,SAASE,EAAgCH,GAAoC;AAC3E,SAAAF;AAAA,IAAyBE;AAAA,IAAiB,CAC/CL,MAAAA,MAAU,IAAI,MAAM,mBAAmBA,CAAK;AAAA,EAC9C;AACF;AAEa,MAAAS,IAAiB,CAACT,MACtB,OAAOA,KAAU,WAAWU,EAAMV,CAAK,IAAIA;AAGpC,SAAAW,EACdC,GACAZ,GACA;AACI,MAAA,CAACA,EAAO,QAAO,CAAC;AAEpB,QAAMa,IAAmBd,EAAkBC,CAAK,IAAIA,IAAQ,EAAE,MAAMA,EAAM,GACpEc,IAAqC,CAAC;AAErC,gBAAA,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,EAAA,CACxC,GAEMF;AACT;AAEO,SAASG,EACdH,GACA;AACA,QAAMI,IAAwC,CAAC;AAE3C,SAACJ,KAEE,OAAA,QAAQA,CAAU,EAAE,QAAQ,CAAC,CAACF,GAAUZ,CAAK,MAAM;AACxD,WAAO,OAAOkB,GAAeP,EAAiCC,GAAUZ,CAAK,CAAC;AAAA,EAAA,CAC/E,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;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ssn.js","sources":["../../src/helpers/ssn.ts"],"sourcesContent":["import { useTranslation } from 'react-i18next'\n\nexport const normalizeSSN = (value: string) =>\n value\n .match(/\\d*/g)\n ?.join('')\n .match(/(\\d{0,3})(\\d{0,2})(\\d{0,4})/)\n ?.slice(1)\n .filter(match => match !== '')\n .join('-')\n .substring(0, 12) || ''\n\nexport const createPlaceholderSSN = (hasSSN?: boolean, placeholderSSN?: string) =>\n hasSSN ? placeholderSSN : ''\n\nexport const usePlaceholderSSN = (hasSSN?: boolean) => {\n const { t } = useTranslation('common')\n return createPlaceholderSSN(hasSSN, t('inputs.ssn.placeholder'))\n}\n"],"names":["normalizeSSN","value","match","createPlaceholderSSN","hasSSN","placeholderSSN","usePlaceholderSSN","t","useTranslation"],"mappings":";AAEa,MAAAA,IAAe,CAACC,MAC3BA,EACG,MAAM,MAAM,GACX,KAAK,EAAE,EACR,MAAM,6BAA6B,GAClC,MAAM,CAAC,EACR,OAAO,CAASC,MAAAA,MAAU,EAAE,EAC5B,KAAK,GAAG,EACR,UAAU,GAAG,EAAE,KAAK,IAEZC,IAAuB,CAACC,GAAkBC,MACrDD,IAASC,IAAiB,IAEfC,IAAoB,CAACF,MAAqB;AACrD,QAAM,EAAE,GAAAG,EAAA,IAAMC,EAAe,QAAQ;AACrC,SAAOL,EAAqBC,GAAQG,EAAE,wBAAwB,CAAC;AACjE;"}
1
+ {"version":3,"file":"ssn.js","sources":["../../src/helpers/ssn.ts"],"sourcesContent":["import { useTranslation } from 'react-i18next'\n\nexport const normalizeSSN = (value: string) =>\n value\n .match(/\\d*/g)\n ?.join('')\n .match(/(\\d{0,3})(\\d{0,2})(\\d{0,4})/)\n ?.slice(1)\n .filter(match => match !== '')\n .join('-')\n .substring(0, 12) || ''\n\nexport const createPlaceholderSSN = (hasSSN?: boolean, placeholderSSN?: string) =>\n hasSSN ? placeholderSSN : ''\n\nexport const usePlaceholderSSN = (hasSSN?: boolean) => {\n const { t } = useTranslation('common')\n return createPlaceholderSSN(hasSSN, t('inputs.ssn.placeholder'))\n}\n"],"names":["normalizeSSN","value","match","createPlaceholderSSN","hasSSN","placeholderSSN","usePlaceholderSSN","t","useTranslation"],"mappings":";AAEO,MAAMA,IAAe,CAACC,MAC3BA,EACG,MAAM,MAAM,GACX,KAAK,EAAE,EACR,MAAM,6BAA6B,GAClC,MAAM,CAAC,EACR,OAAO,CAAAC,MAASA,MAAU,EAAE,EAC5B,KAAK,GAAG,EACR,UAAU,GAAG,EAAE,KAAK,IAEZC,IAAuB,CAACC,GAAkBC,MACrDD,IAASC,IAAiB,IAEfC,IAAoB,CAACF,MAAqB;AACrD,QAAM,EAAE,GAAAG,EAAA,IAAMC,EAAe,QAAQ;AACrC,SAAOL,EAAqBC,GAAQG,EAAE,wBAAwB,CAAC;AACjE;"}
@@ -1 +1 @@
1
- {"version":3,"file":"validations.js","sources":["../../src/helpers/validations.ts"],"sourcesContent":["import { z } from 'zod'\nimport { commonMasks, formatWithMask } from './mask'\nimport { removeNonDigits } from '@/helpers/formattedStrings'\n\nexport const NAME_REGEX = /^([a-zA-Z\\xC0-\\uFFFF]+([ \\-']{0,1}[a-zA-Z\\xC0-\\uFFFF]+)*[.]{0,1}){1,2}$/\n\nexport const nameValidation = z.string().min(1).regex(NAME_REGEX)\n\nexport const zipValidation = z.string().refine(zip => /(^\\d{5}$)|(^\\d{5}-\\d{4}$)/.test(zip))\n\nexport const SSN_REGEX = /^(?!(000|666|9))\\d{3}(?!00)\\d{2}(?!0000)\\d{4}$/\n\nexport const phoneValidation = z\n .string()\n .transform(value => formatWithMask(value, commonMasks.phoneMask))\n .refine(phone => {\n const digits = removeNonDigits(phone)\n return digits.length === 10\n })\n\nexport const routingNumberValidation = z.string().regex(/^[0-9]{9}$/)\nexport const accountNumberValidation = z.string().regex(/^[0-9]{9,18}$/)\n"],"names":["NAME_REGEX","nameValidation","z","zipValidation","zip","SSN_REGEX","phoneValidation","value","formatWithMask","commonMasks","phone","removeNonDigits","routingNumberValidation","accountNumberValidation"],"mappings":";;;AAIO,MAAMA,IAAa,2EAEbC,IAAiBC,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,MAAMF,CAAU,GAEnDG,IAAgBD,EAAE,SAAS,OAAO,CAAOE,MAAA,4BAA4B,KAAKA,CAAG,CAAC,GAE9EC,IAAY,kDAEZC,IAAkBJ,EAC5B,OAAO,EACP,UAAU,CAAAK,MAASC,EAAeD,GAAOE,EAAY,SAAS,CAAC,EAC/D,OAAO,CAASC,MACAC,EAAgBD,CAAK,EACtB,WAAW,EAC1B,GAEUE,IAA0BV,EAAE,OAAO,EAAE,MAAM,YAAY,GACvDW,IAA0BX,EAAE,OAAO,EAAE,MAAM,eAAe;"}
1
+ {"version":3,"file":"validations.js","sources":["../../src/helpers/validations.ts"],"sourcesContent":["import { z } from 'zod'\nimport { commonMasks, formatWithMask } from './mask'\nimport { removeNonDigits } from '@/helpers/formattedStrings'\n\nexport const NAME_REGEX = /^([a-zA-Z\\xC0-\\uFFFF]+([ \\-']{0,1}[a-zA-Z\\xC0-\\uFFFF]+)*[.]{0,1}){1,2}$/\n\nexport const nameValidation = z.string().min(1).regex(NAME_REGEX)\n\nexport const zipValidation = z.string().refine(zip => /(^\\d{5}$)|(^\\d{5}-\\d{4}$)/.test(zip))\n\nexport const SSN_REGEX = /^(?!(000|666|9))\\d{3}(?!00)\\d{2}(?!0000)\\d{4}$/\n\nexport const phoneValidation = z\n .string()\n .transform(value => formatWithMask(value, commonMasks.phoneMask))\n .refine(phone => {\n const digits = removeNonDigits(phone)\n return digits.length === 10\n })\n\nexport const routingNumberValidation = z.string().regex(/^[0-9]{9}$/)\nexport const accountNumberValidation = z.string().regex(/^[0-9]{9,18}$/)\n"],"names":["NAME_REGEX","nameValidation","z","zipValidation","zip","SSN_REGEX","phoneValidation","value","formatWithMask","commonMasks","phone","removeNonDigits","routingNumberValidation","accountNumberValidation"],"mappings":";;;AAIO,MAAMA,IAAa,2EAEbC,IAAiBC,EAAE,OAAA,EAAS,IAAI,CAAC,EAAE,MAAMF,CAAU,GAEnDG,IAAgBD,EAAE,SAAS,OAAO,CAAAE,MAAO,4BAA4B,KAAKA,CAAG,CAAC,GAE9EC,IAAY,kDAEZC,IAAkBJ,EAC5B,OAAA,EACA,UAAU,CAAAK,MAASC,EAAeD,GAAOE,EAAY,SAAS,CAAC,EAC/D,OAAO,CAAAC,MACSC,EAAgBD,CAAK,EACtB,WAAW,EAC1B,GAEUE,IAA0BV,EAAE,OAAA,EAAS,MAAM,YAAY,GACvDW,IAA0BX,EAAE,OAAA,EAAS,MAAM,eAAe;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useContainerBreakpoints.js","sources":["../../../src/hooks/useContainerBreakpoints/useContainerBreakpoints.ts"],"sourcesContent":["import { useState, useEffect, useRef } from 'react'\nimport type React from 'react'\nimport type { BREAKPOINTS } from '@/shared/constants'\nimport { BREAKPOINTS_VALUES } from '@/shared/constants'\nimport { remToPx } from '@/helpers/rem'\n\nexport type BreakpointKey = (typeof BREAKPOINTS)[keyof typeof BREAKPOINTS]\n\nexport type useContainerBreakpointsProps = {\n ref: React.RefObject<HTMLElement | null>\n breakpoints?: Partial<{ [K in BreakpointKey]: number | string }>\n debounceTimeout?: number\n}\n\nconst DEBOUNCE_TIMEOUT = 10\n\nexport const useContainerBreakpoints = ({\n ref,\n breakpoints = BREAKPOINTS_VALUES,\n debounceTimeout = DEBOUNCE_TIMEOUT,\n}: useContainerBreakpointsProps) => {\n const [activeBreakpoints, setActiveBreakpoint] = useState<Array<keyof typeof breakpoints>>([])\n const timeoutRef = useRef<NodeJS.Timeout | null>(null)\n\n const calculateBreakpoints = (width: number) => {\n const returnBreakpoints: Array<keyof typeof breakpoints> = []\n\n for (const [key, value] of Object.entries(breakpoints)) {\n if (width >= remToPx(value)) {\n returnBreakpoints.push(key as keyof typeof breakpoints)\n }\n }\n\n return returnBreakpoints\n }\n\n useEffect(() => {\n const debouncedHandleResize = (entries: ResizeObserverEntry[]) => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current)\n }\n timeoutRef.current = setTimeout(() => {\n if (entries.length >= 1) {\n const width = entries[0]?.contentRect.width ?? 0\n const newBreakpoints = calculateBreakpoints(width)\n setActiveBreakpoint(newBreakpoints)\n }\n }, debounceTimeout)\n }\n\n const observer = new ResizeObserver(debouncedHandleResize)\n\n if (ref.current) {\n // Do initial calculation\n const width = ref.current.offsetWidth\n if (width > 0) {\n const initialBreakpoints = calculateBreakpoints(width)\n setActiveBreakpoint(initialBreakpoints)\n }\n\n observer.observe(ref.current)\n }\n\n return () => {\n observer.disconnect()\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current)\n }\n }\n }, [debounceTimeout])\n\n return activeBreakpoints\n}\n\nexport default useContainerBreakpoints\n"],"names":["DEBOUNCE_TIMEOUT","useContainerBreakpoints","ref","breakpoints","BREAKPOINTS_VALUES","debounceTimeout","activeBreakpoints","setActiveBreakpoint","useState","timeoutRef","useRef","calculateBreakpoints","width","returnBreakpoints","key","value","remToPx","useEffect","debouncedHandleResize","entries","newBreakpoints","observer","initialBreakpoints"],"mappings":";;;AAcA,MAAMA,IAAmB,IAEZC,IAA0B,CAAC;AAAA,EACtC,KAAAC;AAAA,EACA,aAAAC,IAAcC;AAAA,EACd,iBAAAC,IAAkBL;AACpB,MAAoC;AAClC,QAAM,CAACM,GAAmBC,CAAmB,IAAIC,EAA0C,CAAA,CAAE,GACvFC,IAAaC,EAA8B,IAAI,GAE/CC,IAAuB,CAACC,MAAkB;AAC9C,UAAMC,IAAqD,CAAC;AAE5D,eAAW,CAACC,GAAKC,CAAK,KAAK,OAAO,QAAQZ,CAAW;AAC/C,MAAAS,KAASI,EAAQD,CAAK,KACxBF,EAAkB,KAAKC,CAA+B;AAInD,WAAAD;AAAA,EACT;AAEA,SAAAI,EAAU,MAAM;AACR,UAAAC,IAAwB,CAACC,MAAmC;AAChE,MAAIV,EAAW,WACb,aAAaA,EAAW,OAAO,GAEtBA,EAAA,UAAU,WAAW,MAAM;AAChC,YAAAU,EAAQ,UAAU,GAAG;AACvB,gBAAMP,IAAQO,EAAQ,CAAC,GAAG,YAAY,SAAS,GACzCC,IAAiBT,EAAqBC,CAAK;AACjD,UAAAL,EAAoBa,CAAc;AAAA,QAAA;AAAA,SAEnCf,CAAe;AAAA,IACpB,GAEMgB,IAAW,IAAI,eAAeH,CAAqB;AAEzD,QAAIhB,EAAI,SAAS;AAET,YAAAU,IAAQV,EAAI,QAAQ;AAC1B,UAAIU,IAAQ,GAAG;AACP,cAAAU,IAAqBX,EAAqBC,CAAK;AACrD,QAAAL,EAAoBe,CAAkB;AAAA,MAAA;AAG/B,MAAAD,EAAA,QAAQnB,EAAI,OAAO;AAAA,IAAA;AAG9B,WAAO,MAAM;AACX,MAAAmB,EAAS,WAAW,GAChBZ,EAAW,WACb,aAAaA,EAAW,OAAO;AAAA,IAEnC;AAAA,EAAA,GACC,CAACJ,CAAe,CAAC,GAEbC;AACT;"}
1
+ {"version":3,"file":"useContainerBreakpoints.js","sources":["../../../src/hooks/useContainerBreakpoints/useContainerBreakpoints.ts"],"sourcesContent":["import { useState, useEffect, useRef } from 'react'\nimport type React from 'react'\nimport type { BREAKPOINTS } from '@/shared/constants'\nimport { BREAKPOINTS_VALUES } from '@/shared/constants'\nimport { remToPx } from '@/helpers/rem'\n\nexport type BreakpointKey = (typeof BREAKPOINTS)[keyof typeof BREAKPOINTS]\n\nexport type useContainerBreakpointsProps = {\n ref: React.RefObject<HTMLElement | null>\n breakpoints?: Partial<{ [K in BreakpointKey]: number | string }>\n debounceTimeout?: number\n}\n\nconst DEBOUNCE_TIMEOUT = 10\n\nexport const useContainerBreakpoints = ({\n ref,\n breakpoints = BREAKPOINTS_VALUES,\n debounceTimeout = DEBOUNCE_TIMEOUT,\n}: useContainerBreakpointsProps) => {\n const [activeBreakpoints, setActiveBreakpoint] = useState<Array<keyof typeof breakpoints>>([])\n const timeoutRef = useRef<NodeJS.Timeout | null>(null)\n\n const calculateBreakpoints = (width: number) => {\n const returnBreakpoints: Array<keyof typeof breakpoints> = []\n\n for (const [key, value] of Object.entries(breakpoints)) {\n if (width >= remToPx(value)) {\n returnBreakpoints.push(key as keyof typeof breakpoints)\n }\n }\n\n return returnBreakpoints\n }\n\n useEffect(() => {\n const debouncedHandleResize = (entries: ResizeObserverEntry[]) => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current)\n }\n timeoutRef.current = setTimeout(() => {\n if (entries.length >= 1) {\n const width = entries[0]?.contentRect.width ?? 0\n const newBreakpoints = calculateBreakpoints(width)\n setActiveBreakpoint(newBreakpoints)\n }\n }, debounceTimeout)\n }\n\n const observer = new ResizeObserver(debouncedHandleResize)\n\n if (ref.current) {\n // Do initial calculation\n const width = ref.current.offsetWidth\n if (width > 0) {\n const initialBreakpoints = calculateBreakpoints(width)\n setActiveBreakpoint(initialBreakpoints)\n }\n\n observer.observe(ref.current)\n }\n\n return () => {\n observer.disconnect()\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current)\n }\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [debounceTimeout])\n\n return activeBreakpoints\n}\n\nexport default useContainerBreakpoints\n"],"names":["DEBOUNCE_TIMEOUT","useContainerBreakpoints","ref","breakpoints","BREAKPOINTS_VALUES","debounceTimeout","activeBreakpoints","setActiveBreakpoint","useState","timeoutRef","useRef","calculateBreakpoints","width","returnBreakpoints","key","value","remToPx","useEffect","debouncedHandleResize","entries","newBreakpoints","observer","initialBreakpoints"],"mappings":";;;AAcA,MAAMA,IAAmB,IAEZC,IAA0B,CAAC;AAAA,EACtC,KAAAC;AAAA,EACA,aAAAC,IAAcC;AAAA,EACd,iBAAAC,IAAkBL;AACpB,MAAoC;AAClC,QAAM,CAACM,GAAmBC,CAAmB,IAAIC,EAA0C,CAAA,CAAE,GACvFC,IAAaC,EAA8B,IAAI,GAE/CC,IAAuB,CAACC,MAAkB;AAC9C,UAAMC,IAAqD,CAAA;AAE3D,eAAW,CAACC,GAAKC,CAAK,KAAK,OAAO,QAAQZ,CAAW;AACnD,MAAIS,KAASI,EAAQD,CAAK,KACxBF,EAAkB,KAAKC,CAA+B;AAI1D,WAAOD;AAAA,EACT;AAEA,SAAAI,EAAU,MAAM;AACd,UAAMC,IAAwB,CAACC,MAAmC;AAChE,MAAIV,EAAW,WACb,aAAaA,EAAW,OAAO,GAEjCA,EAAW,UAAU,WAAW,MAAM;AACpC,YAAIU,EAAQ,UAAU,GAAG;AACvB,gBAAMP,IAAQO,EAAQ,CAAC,GAAG,YAAY,SAAS,GACzCC,IAAiBT,EAAqBC,CAAK;AACjD,UAAAL,EAAoBa,CAAc;AAAA,QACpC;AAAA,MACF,GAAGf,CAAe;AAAA,IACpB,GAEMgB,IAAW,IAAI,eAAeH,CAAqB;AAEzD,QAAIhB,EAAI,SAAS;AAEf,YAAMU,IAAQV,EAAI,QAAQ;AAC1B,UAAIU,IAAQ,GAAG;AACb,cAAMU,IAAqBX,EAAqBC,CAAK;AACrD,QAAAL,EAAoBe,CAAkB;AAAA,MACxC;AAEA,MAAAD,EAAS,QAAQnB,EAAI,OAAO;AAAA,IAC9B;AAEA,WAAO,MAAM;AACX,MAAAmB,EAAS,WAAA,GACLZ,EAAW,WACb,aAAaA,EAAW,OAAO;AAAA,IAEnC;AAAA,EAEF,GAAG,CAACJ,CAAe,CAAC,GAEbC;AACT;"}
@@ -1 +1 @@
1
- {"version":3,"file":"useForkRef.js","sources":["../../../src/hooks/useForkRef/useForkRef.ts"],"sourcesContent":["import { type Ref, type RefCallback, type RefObject, useMemo } from 'react'\n\nconst setRef = <T>(\n ref: RefObject<T | null> | ((instance: T | null) => void) | null | undefined,\n value: T | null,\n) => {\n if (typeof ref === 'function') ref(value)\n else if (ref) ref.current = value\n}\n\n/**\n * Sets multiple refs with a single handler.\n * @param refs - The refs to set.\n * @returns A single ref handler that sets all the provided refs which can be passed to the `ref` prop of a component.\n */\nexport const useForkRef = <Instance>(\n ...refs: Array<Ref<Instance> | undefined>\n): RefCallback<Instance> | null => {\n return useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null\n }\n\n return instance => {\n refs.forEach(ref => {\n setRef(ref, instance)\n })\n }\n }, [refs])\n}\n"],"names":["setRef","ref","value","useForkRef","refs","useMemo","instance"],"mappings":";AAEA,MAAMA,IAAS,CACbC,GACAC,MACG;AACH,EAAI,OAAOD,KAAQ,aAAYA,EAAIC,CAAK,IAC/BD,QAAS,UAAUC;AAC9B,GAOaC,IAAa,IACrBC,MAEIC,EAAQ,MACTD,EAAK,MAAM,CAAOH,MAAAA,KAAO,IAAI,IACxB,OAGF,CAAYK,MAAA;AACjB,EAAAF,EAAK,QAAQ,CAAOH,MAAA;AAClB,IAAAD,EAAOC,GAAKK,CAAQ;AAAA,EAAA,CACrB;AACH,GACC,CAACF,CAAI,CAAC;"}
1
+ {"version":3,"file":"useForkRef.js","sources":["../../../src/hooks/useForkRef/useForkRef.ts"],"sourcesContent":["import { type Ref, type RefCallback, type RefObject, useMemo } from 'react'\n\nconst setRef = <T>(\n ref: RefObject<T | null> | ((instance: T | null) => void) | null | undefined,\n value: T | null,\n) => {\n if (typeof ref === 'function') ref(value)\n else if (ref) ref.current = value\n}\n\n/**\n * Sets multiple refs with a single handler.\n * @param refs - The refs to set.\n * @returns A single ref handler that sets all the provided refs which can be passed to the `ref` prop of a component.\n */\nexport const useForkRef = <Instance>(\n ...refs: Array<Ref<Instance> | undefined>\n): RefCallback<Instance> | null => {\n return useMemo(() => {\n if (refs.every(ref => ref == null)) {\n return null\n }\n\n return instance => {\n refs.forEach(ref => {\n setRef(ref, instance)\n })\n }\n }, [refs])\n}\n"],"names":["setRef","ref","value","useForkRef","refs","useMemo","instance"],"mappings":";AAEA,MAAMA,IAAS,CACbC,GACAC,MACG;AACH,EAAI,OAAOD,KAAQ,aAAYA,EAAIC,CAAK,IAC/BD,QAAS,UAAUC;AAC9B,GAOaC,IAAa,IACrBC,MAEIC,EAAQ,MACTD,EAAK,MAAM,CAAAH,MAAOA,KAAO,IAAI,IACxB,OAGF,CAAAK,MAAY;AACjB,EAAAF,EAAK,QAAQ,CAAAH,MAAO;AAClB,IAAAD,EAAOC,GAAKK,CAAQ;AAAA,EACtB,CAAC;AACH,GACC,CAACF,CAAI,CAAC;"}
@@ -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;AAC9B,QAAA;AAGF,MAAAD,KAFe,MAAME,g+FAEH,SACNJ,IAAA;AAAA,YACA;AACF,MAAAC,IAAA,IACED,IAAA;AAAA,IAAA;AAAA,EAEhB,GACgC;AAChC,SAAO,MAAM;AACX,QAAIA;AAEI,YAAAG;QACGF;AACT,YAAM,IAAI,MAAM,4CAA4CF,CAAE,EAAE;AAEzD,WAAAG;AAAA,EAEX;AACF,GAMaG,IAAU,CAACN,MAAoD;AAE1E,QAAM,EAAE,MAAMO,EAAa,IAAIC,EAAe;AAE9C,MAAI,CAACR,EAAI;AACT,QAAMS,IAAM,GAAGF,EAAa,gBAAgB,IAAIP,CAAE;AAElD,EAAIJ,EAAc,IAAIa,CAAG,MAAM,QAEfb,EAAA,IAAIa,GAAKX,EAAa,EAAE,KAAKS,EAAa,kBAAkB,IAAAP,EAAO,CAAC,CAAC;AAG/E,QAAAU,IAAiBd,EAAc,IAAIa,CAAG;AAC5C,MAAIC,GAAgB;AAClB,UAAMP,IAAWO,EAAe;AAChC,IAAAH,EAAa,kBAAkBA,EAAa,oBAAoB,MAAMP,GAAIG,GAAU,IAAM,EAAK;AAAA,EAAA;AAEnG,GAGaQ,IAAyB,CACpCX,GACAG,MACG;AACH,QAAM,EAAE,MAAMI,EAAa,IAAIC,EAAe;AAC9C,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,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,27 +1,27 @@
1
- const n = "Company Bank Account", t = "We'll use your checking account info to debit for wages and taxes. Your account must be linked to a checking bank account. Credit payments, credit cards, and savings accounts are not accepted.", c = "How would you like to enter your bank account information?", e = "Enter bank account information manually", o = "Verify bank account with Plaid", a = "Routing number (9 digits)", u = "Account number", i = "What type of account is this?", s = "Checking", r = "Savings", l = "Save and continue", _ = {
1
+ const n = "Company Bank Account", t = "We'll use your checking account info to debit for wages and taxes. Your account must be linked to a checking bank account. Credit payments, credit cards, and savings accounts are not accepted.", c = "How would you like to enter your bank account information?", o = "Enter bank account information manually", a = "Verify bank account with Plaid", e = "Routing number (9 digits)", i = "Account number", u = "What type of account is this?", s = "Checking", r = "Savings", l = "Save and continue", d = {
2
2
  title: n,
3
3
  intro: t,
4
4
  entry_selection_question: c,
5
- manual_entry: e,
6
- plaid_entry: o,
7
- routing_number_label: a,
8
- account_number_label: u,
9
- account_type_label: i,
5
+ manual_entry: o,
6
+ plaid_entry: a,
7
+ routing_number_label: e,
8
+ account_number_label: i,
9
+ account_type_label: u,
10
10
  account_type_checking: s,
11
11
  account_type_savings: r,
12
12
  submit: l
13
13
  };
14
14
  export {
15
- u as account_number_label,
15
+ i as account_number_label,
16
16
  s as account_type_checking,
17
- i as account_type_label,
17
+ u as account_type_label,
18
18
  r as account_type_savings,
19
- _ as default,
19
+ d as default,
20
20
  c as entry_selection_question,
21
21
  t as intro,
22
- e as manual_entry,
23
- o as plaid_entry,
24
- a as routing_number_label,
22
+ o as manual_entry,
23
+ a as plaid_entry,
24
+ e as routing_number_label,
25
25
  l as submit,
26
26
  n as title
27
27
  };