@gusto/embedded-react-sdk 0.8.0 → 0.8.2

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 (498) hide show
  1. package/CHANGELOG.md +20 -3
  2. package/dist/components/Base/Base.d.ts +6 -5
  3. package/dist/components/Base/Base.js +40 -39
  4. package/dist/components/Base/Base.js.map +1 -1
  5. package/dist/components/Base/index.d.ts +1 -0
  6. package/dist/components/Common/ActionsLayout/index.d.ts +1 -0
  7. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +5 -3
  8. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js.map +1 -1
  9. package/dist/components/Common/DataView/DataCards/index.d.ts +1 -0
  10. package/dist/components/Common/DataView/index.d.ts +1 -0
  11. package/dist/components/Common/DocumentList/index.d.ts +1 -0
  12. package/dist/components/Common/DocumentViewer/index.d.ts +1 -0
  13. package/dist/components/Common/FadeIn/FadeIn.module.scss.js +4 -4
  14. package/dist/components/Common/{UI/FieldCaption → FieldCaption}/FieldCaption.js +1 -1
  15. package/dist/components/Common/FieldCaption/FieldCaption.js.map +1 -0
  16. package/dist/components/Common/{UI/FieldCaption → FieldCaption}/index.d.ts +1 -0
  17. package/dist/components/Common/{UI/FieldDescription → FieldDescription}/FieldDescription.js +1 -1
  18. package/dist/components/Common/FieldDescription/FieldDescription.js.map +1 -0
  19. package/dist/components/Common/{UI/FieldDescription → FieldDescription}/index.d.ts +1 -0
  20. package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/FieldErrorMessage.js +1 -1
  21. package/dist/components/Common/FieldErrorMessage/FieldErrorMessage.js.map +1 -0
  22. package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/index.d.ts +1 -0
  23. package/dist/components/Common/{UI/FieldLayout → FieldLayout}/FieldLayout.js +1 -1
  24. package/dist/components/Common/FieldLayout/FieldLayout.js.map +1 -0
  25. package/dist/components/Common/FieldLayout/FieldLayoutTypes.d.ts +52 -0
  26. package/dist/components/Common/{UI/FieldLayout → FieldLayout}/index.d.ts +1 -0
  27. package/dist/components/Common/Fields/CheckboxField/index.d.ts +1 -0
  28. package/dist/components/Common/Fields/CheckboxGroupField/index.d.ts +1 -0
  29. package/dist/components/Common/Fields/ComboBoxField/index.d.ts +1 -0
  30. package/dist/components/Common/Fields/DatePickerField/index.d.ts +1 -0
  31. package/dist/components/Common/Fields/NumberInputField/index.d.ts +1 -0
  32. package/dist/components/Common/Fields/RadioGroupField/index.d.ts +1 -0
  33. package/dist/components/Common/Fields/SelectField/index.d.ts +1 -0
  34. package/dist/components/Common/Fields/SwitchField/index.d.ts +1 -0
  35. package/dist/components/Common/Fields/TextInputField/index.d.ts +1 -0
  36. package/dist/components/Common/{UI/Fieldset → Fieldset}/Fieldset.js +1 -1
  37. package/dist/components/Common/Fieldset/Fieldset.js.map +1 -0
  38. package/dist/components/Common/{UI/Fieldset → Fieldset}/index.d.ts +1 -0
  39. package/dist/components/Common/Flex/index.d.ts +1 -0
  40. package/dist/components/Common/Form/index.d.ts +1 -0
  41. package/dist/components/Common/HamburgerMenu/index.d.ts +1 -0
  42. package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayout.js +2 -2
  43. package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.js.map +1 -0
  44. package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/index.d.ts +1 -0
  45. package/dist/components/Common/PaginationControl/index.d.ts +1 -0
  46. package/dist/components/Common/ReorderableList/index.d.ts +1 -0
  47. package/dist/components/Common/SignatureForm/SignatureForm.d.ts +12 -6
  48. package/dist/components/Common/SignatureForm/SignatureForm.js +10 -10
  49. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  50. package/dist/components/Common/SignatureForm/index.d.ts +1 -0
  51. package/dist/components/Common/TaxInputs/index.d.ts +1 -0
  52. package/dist/components/Common/UI/Alert/Alert.d.ts +1 -1
  53. package/dist/components/Common/UI/Alert/Alert.js +13 -12
  54. package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
  55. package/dist/components/Common/UI/Alert/AlertTypes.d.ts +16 -4
  56. package/dist/components/Common/UI/Alert/index.d.ts +1 -0
  57. package/dist/components/Common/UI/Badge/BadgeTypes.d.ts +6 -0
  58. package/dist/components/Common/UI/Button/Button.js +28 -27
  59. package/dist/components/Common/UI/Button/Button.js.map +1 -1
  60. package/dist/components/Common/UI/Button/Button.module.scss.js +1 -1
  61. package/dist/components/Common/UI/Button/ButtonTypes.d.ts +29 -4
  62. package/dist/components/Common/UI/Button/index.d.ts +1 -0
  63. package/dist/components/Common/UI/CalendarPreview/CalendarPreviewTypes.d.ts +24 -0
  64. package/dist/components/Common/UI/CalendarPreview/index.d.ts +1 -0
  65. package/dist/components/Common/UI/Card/Card.module.scss.js +1 -1
  66. package/dist/components/Common/UI/Card/CardTypes.d.ts +12 -4
  67. package/dist/components/Common/UI/Checkbox/Checkbox.js +4 -4
  68. package/dist/components/Common/UI/Checkbox/Checkbox.js.map +1 -1
  69. package/dist/components/Common/UI/Checkbox/CheckboxTypes.d.ts +16 -1
  70. package/dist/components/Common/UI/Checkbox/index.d.ts +1 -0
  71. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js +4 -4
  72. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js.map +1 -1
  73. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.d.ts +33 -3
  74. package/dist/components/Common/UI/CheckboxGroup/index.d.ts +1 -0
  75. package/dist/components/Common/UI/ComboBox/ComboBox.js +8 -8
  76. package/dist/components/Common/UI/ComboBox/ComboBox.js.map +1 -1
  77. package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +31 -1
  78. package/dist/components/Common/UI/DatePicker/DatePicker.js +13 -13
  79. package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
  80. package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +25 -1
  81. package/dist/components/Common/UI/DatePicker/index.d.ts +1 -0
  82. package/dist/components/Common/UI/Heading/HeadingTypes.d.ts +12 -0
  83. package/dist/components/Common/UI/Heading/index.d.ts +1 -0
  84. package/dist/components/Common/UI/Input/index.d.ts +1 -0
  85. package/dist/components/Common/UI/Link/LinkTypes.d.ts +53 -1
  86. package/dist/components/Common/UI/Link/index.d.ts +1 -0
  87. package/dist/components/Common/UI/List/ListTypes.d.ts +3 -5
  88. package/dist/components/Common/UI/List/index.d.ts +1 -0
  89. package/dist/components/Common/UI/Menu/MenuTypes.d.ts +30 -0
  90. package/dist/components/Common/UI/Menu/index.d.ts +1 -0
  91. package/dist/components/Common/UI/NumberInput/NumberInput.js +4 -4
  92. package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
  93. package/dist/components/Common/UI/NumberInput/NumberInputTypes.d.ts +34 -1
  94. package/dist/components/Common/UI/NumberInput/index.d.ts +1 -0
  95. package/dist/components/Common/UI/ProgressBar/ProgressBarTypes.d.ts +12 -0
  96. package/dist/components/Common/UI/ProgressBar/index.d.ts +1 -0
  97. package/dist/components/Common/UI/Radio/Radio.js +1 -1
  98. package/dist/components/Common/UI/Radio/Radio.js.map +1 -1
  99. package/dist/components/Common/UI/Radio/RadioTypes.d.ts +16 -1
  100. package/dist/components/Common/UI/Radio/index.d.ts +1 -0
  101. package/dist/components/Common/UI/RadioGroup/RadioGroup.js +4 -4
  102. package/dist/components/Common/UI/RadioGroup/RadioGroup.js.map +1 -1
  103. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +33 -3
  104. package/dist/components/Common/UI/RadioGroup/index.d.ts +1 -0
  105. package/dist/components/Common/UI/Select/Select.js +8 -8
  106. package/dist/components/Common/UI/Select/Select.js.map +1 -1
  107. package/dist/components/Common/UI/Select/SelectTypes.d.ts +34 -1
  108. package/dist/components/Common/UI/Select/index.d.ts +1 -0
  109. package/dist/components/Common/UI/Switch/Switch.js +1 -1
  110. package/dist/components/Common/UI/Switch/Switch.js.map +1 -1
  111. package/dist/components/Common/UI/Switch/SwitchTypes.d.ts +25 -1
  112. package/dist/components/Common/UI/Switch/index.d.ts +1 -0
  113. package/dist/components/Common/UI/Table/TableTypes.d.ts +21 -0
  114. package/dist/components/Common/UI/Table/index.d.ts +1 -0
  115. package/dist/components/Common/UI/Text/TextTypes.d.ts +18 -0
  116. package/dist/components/Common/UI/Text/index.d.ts +1 -0
  117. package/dist/components/Common/UI/TextInput/TextInput.js +1 -1
  118. package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
  119. package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +22 -1
  120. package/dist/components/Common/UI/TextInput/index.d.ts +1 -0
  121. package/dist/components/Common/VisuallyHidden/index.d.ts +1 -0
  122. package/dist/components/Common/index.d.ts +1 -0
  123. package/dist/components/Company/AssignSignatory/AssignSignatory.d.ts +3 -3
  124. package/dist/components/Company/AssignSignatory/AssignSignatory.js +26 -25
  125. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  126. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +7 -7
  127. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  128. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.d.ts +2 -2
  129. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  130. package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.d.ts +41 -15
  131. package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.js +17 -20
  132. package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.js.map +1 -1
  133. package/dist/components/Company/AssignSignatory/CreateSignatory/index.d.ts +1 -0
  134. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -4
  135. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  136. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +10 -10
  137. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  138. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.d.ts +17 -11
  139. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +42 -45
  140. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  141. package/dist/components/Company/AssignSignatory/InviteSignatory/index.d.ts +1 -0
  142. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -4
  143. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  144. package/dist/components/Company/AssignSignatory/index.d.ts +1 -0
  145. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -6
  146. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  147. package/dist/components/Company/BankAccount/BankAccount.d.ts +10 -0
  148. package/dist/components/Company/BankAccount/BankAccount.js +32 -0
  149. package/dist/components/Company/BankAccount/BankAccount.js.map +1 -0
  150. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +6 -6
  151. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
  152. package/dist/components/Company/BankAccount/BankAccountForm/Form.d.ts +12 -6
  153. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +2 -2
  154. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  155. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -4
  156. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  157. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js +10 -10
  158. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js.map +1 -1
  159. package/dist/components/Company/BankAccount/BankAccountVerify/Form.d.ts +12 -6
  160. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +17 -17
  161. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  162. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -0
  163. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.d.ts +13 -0
  164. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js +63 -0
  165. package/dist/components/Company/DocumentSigner/DocumentList/DocumentList.js.map +1 -0
  166. package/dist/components/Company/DocumentSigner/DocumentList/Head.js.map +1 -0
  167. package/dist/components/Company/DocumentSigner/DocumentList/List.js.map +1 -0
  168. package/dist/components/Company/DocumentSigner/DocumentList/ManageSignatories.js.map +1 -0
  169. package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/index.d.ts +1 -0
  170. package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/useDocumentList.js +3 -4
  171. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -0
  172. package/dist/components/Company/DocumentSigner/DocumentSigner.d.ts +12 -0
  173. package/dist/components/Company/DocumentSigner/DocumentSigner.js +41 -0
  174. package/dist/components/Company/DocumentSigner/DocumentSigner.js.map +1 -0
  175. package/dist/components/Company/DocumentSigner/SignatureForm/Actions.js.map +1 -0
  176. package/dist/components/Company/DocumentSigner/SignatureForm/Form.js.map +1 -0
  177. package/dist/components/Company/DocumentSigner/SignatureForm/Head.js.map +1 -0
  178. package/dist/components/Company/DocumentSigner/SignatureForm/Preview.js.map +1 -0
  179. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.d.ts +14 -0
  180. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +72 -0
  181. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -0
  182. package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/index.d.ts +1 -0
  183. package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/useSignatureForm.js +3 -4
  184. package/dist/components/Company/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -0
  185. package/dist/components/Company/DocumentSigner/assignSignatoryState.js.map +1 -0
  186. package/dist/components/Company/DocumentSigner/documentSignerStateMachine.js.map +1 -0
  187. package/dist/components/Company/DocumentSigner/index.d.ts +2 -0
  188. package/dist/components/Company/DocumentSigner/stateMachine.js.map +1 -0
  189. package/dist/components/Company/FederalTaxes/FederalTaxes.d.ts +1 -4
  190. package/dist/components/Company/FederalTaxes/FederalTaxes.js +31 -31
  191. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  192. package/dist/components/Company/FederalTaxes/index.d.ts +1 -0
  193. package/dist/components/Company/FederalTaxes/useFederalTaxes.d.ts +18 -8
  194. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +10 -15
  195. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  196. package/dist/components/Company/Industry/Context.js +6 -7
  197. package/dist/components/Company/Industry/Context.js.map +1 -1
  198. package/dist/components/Company/Industry/Industry.d.ts +1 -1
  199. package/dist/components/Company/Industry/Industry.js +29 -28
  200. package/dist/components/Company/Industry/Industry.js.map +1 -1
  201. package/dist/components/Company/Industry/index.d.ts +1 -0
  202. package/dist/components/Company/Locations/LocationForm/Form.d.ts +27 -11
  203. package/dist/components/Company/Locations/LocationForm/Form.js +24 -24
  204. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  205. package/dist/components/Company/Locations/LocationForm/LocationForm.js +24 -24
  206. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  207. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -4
  208. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  209. package/dist/components/Company/Locations/Locations.d.ts +9 -0
  210. package/dist/components/Company/Locations/Locations.js +27 -0
  211. package/dist/components/Company/Locations/Locations.js.map +1 -0
  212. package/dist/components/Company/Locations/LocationsList/LocationsList.d.ts +3 -3
  213. package/dist/components/Company/Locations/LocationsList/LocationsList.js +27 -32
  214. package/dist/components/Company/Locations/LocationsList/LocationsList.js.map +1 -1
  215. package/dist/components/Company/Locations/LocationsList/index.d.ts +1 -0
  216. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -4
  217. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  218. package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.d.ts +2 -2
  219. package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js +13 -13
  220. package/dist/components/Company/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  221. package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js +3 -3
  222. package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  223. package/dist/components/Company/OnboardingOverview/OnboardingOverview.d.ts +1 -1
  224. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js +15 -15
  225. package/dist/components/Company/OnboardingOverview/OnboardingOverview.js.map +1 -1
  226. package/dist/components/Company/OnboardingOverview/context.js +3 -4
  227. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  228. package/dist/components/Company/PaySchedule/PaySchedule.d.ts +2 -2
  229. package/dist/components/Company/PaySchedule/PaySchedule.js +68 -67
  230. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  231. package/dist/components/Company/PaySchedule/_parts/List.js +28 -31
  232. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  233. package/dist/components/Company/PaySchedule/_parts/List.module.scss.js +8 -0
  234. package/dist/components/Company/PaySchedule/_parts/List.module.scss.js.map +1 -0
  235. package/dist/components/Company/PaySchedule/_parts/index.d.ts +1 -0
  236. package/dist/components/Company/PaySchedule/index.d.ts +1 -0
  237. package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +31 -13
  238. package/dist/components/Company/PaySchedule/usePaySchedule.js +13 -19
  239. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  240. package/dist/components/Company/StateTaxes/StateTaxes.d.ts +9 -0
  241. package/dist/components/Company/StateTaxes/StateTaxes.js +27 -0
  242. package/dist/components/Company/StateTaxes/StateTaxes.js.map +1 -0
  243. package/dist/components/Company/StateTaxes/{StateTaxesFlowComponents.js → StateTaxesComponents.js} +1 -1
  244. package/dist/components/Company/StateTaxes/StateTaxesComponents.js.map +1 -0
  245. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.d.ts +3 -3
  246. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +3 -3
  247. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
  248. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +66 -77
  249. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  250. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -4
  251. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  252. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.d.ts +3 -3
  253. package/dist/components/Company/StateTaxes/StateTaxesList/StateTaxesList.js.map +1 -1
  254. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -4
  255. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  256. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js +1 -1
  257. package/dist/components/Company/StateTaxes/stateTaxesStateMachine.js.map +1 -1
  258. package/dist/components/Company/index.d.ts +7 -6
  259. package/dist/components/Company/index.js +18 -18
  260. package/dist/components/Employee/Compensation/Compensation.d.ts +1 -1
  261. package/dist/components/Employee/Compensation/Compensation.js +48 -47
  262. package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
  263. package/dist/components/Employee/Compensation/Edit.js +17 -16
  264. package/dist/components/Employee/Compensation/Edit.js.map +1 -1
  265. package/dist/components/Employee/Compensation/List.js +10 -10
  266. package/dist/components/Employee/Compensation/List.js.map +1 -1
  267. package/dist/components/Employee/Compensation/index.d.ts +1 -0
  268. package/dist/components/Employee/Compensation/useCompensation.d.ts +53 -45
  269. package/dist/components/Employee/Compensation/useCompensation.js +59 -68
  270. package/dist/components/Employee/Compensation/useCompensation.js.map +1 -1
  271. package/dist/components/Employee/Deductions/Deductions.d.ts +11 -7
  272. package/dist/components/Employee/Deductions/Deductions.js +76 -74
  273. package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
  274. package/dist/components/Employee/Deductions/index.d.ts +1 -0
  275. package/dist/components/Employee/Deductions/useDeductions.d.ts +34 -14
  276. package/dist/components/Employee/Deductions/useDeductions.js +10 -29
  277. package/dist/components/Employee/Deductions/useDeductions.js.map +1 -1
  278. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js +3 -4
  279. package/dist/components/Employee/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  280. package/dist/components/Employee/DocumentSigner/DocumentSigner.d.ts +11 -0
  281. package/dist/components/Employee/DocumentSigner/DocumentSigner.js +27 -0
  282. package/dist/components/Employee/DocumentSigner/DocumentSigner.js.map +1 -0
  283. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +1 -1
  284. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  285. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +3 -4
  286. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +1 -1
  287. package/dist/components/Employee/DocumentSigner/index.d.ts +2 -1
  288. package/dist/components/Employee/EmployeeList/EmployeeList.d.ts +1 -1
  289. package/dist/components/Employee/EmployeeList/EmployeeList.js +38 -38
  290. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  291. package/dist/components/Employee/EmployeeList/useEmployeeList.js +3 -4
  292. package/dist/components/Employee/EmployeeList/useEmployeeList.js.map +1 -1
  293. package/dist/components/Employee/Landing/Landing.d.ts +1 -1
  294. package/dist/components/Employee/Landing/Landing.js +5 -5
  295. package/dist/components/Employee/Landing/Landing.js.map +1 -1
  296. package/dist/components/Employee/Landing/index.d.ts +1 -0
  297. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.d.ts +27 -0
  298. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js +29 -0
  299. package/dist/components/Employee/OnboardingFlow/OnboardingFlow.js.map +1 -0
  300. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js +107 -0
  301. package/dist/components/Employee/OnboardingFlow/onboardingStateMachine.js.map +1 -0
  302. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.d.ts +1 -1
  303. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +30 -30
  304. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js.map +1 -1
  305. package/dist/components/Employee/OnboardingSummary/index.d.ts +1 -0
  306. package/dist/components/Employee/PaymentMethod/BankAccount.d.ts +22 -10
  307. package/dist/components/Employee/PaymentMethod/BankAccount.js +9 -9
  308. package/dist/components/Employee/PaymentMethod/BankAccount.js.map +1 -1
  309. package/dist/components/Employee/PaymentMethod/PaymentMethod.d.ts +1 -1
  310. package/dist/components/Employee/PaymentMethod/PaymentMethod.js +74 -74
  311. package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
  312. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.d.ts +10 -6
  313. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +8 -8
  314. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  315. package/dist/components/Employee/PaymentMethod/index.d.ts +1 -0
  316. package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +92 -37
  317. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +31 -39
  318. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  319. package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +68 -31
  320. package/dist/components/Employee/Profile/AdminPersonalDetails.js +33 -46
  321. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  322. package/dist/components/Employee/Profile/HomeAddress.d.ts +33 -13
  323. package/dist/components/Employee/Profile/HomeAddress.js +39 -38
  324. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  325. package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +81 -32
  326. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +60 -74
  327. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  328. package/dist/components/Employee/Profile/Profile.d.ts +1 -1
  329. package/dist/components/Employee/Profile/Profile.js +69 -72
  330. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  331. package/dist/components/Employee/Profile/SelfPersonalDetails.d.ts +44 -15
  332. package/dist/components/Employee/Profile/SelfPersonalDetails.js +18 -21
  333. package/dist/components/Employee/Profile/SelfPersonalDetails.js.map +1 -1
  334. package/dist/components/Employee/Profile/index.d.ts +1 -0
  335. package/dist/components/Employee/Profile/useProfile.js +3 -4
  336. package/dist/components/Employee/Profile/useProfile.js.map +1 -1
  337. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.d.ts +17 -0
  338. package/dist/components/{Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingComponents.js → Employee/SelfOnboardingFlow/SelfOnboardingComponents.js} +7 -7
  339. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingComponents.js.map +1 -0
  340. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.d.ts +2 -0
  341. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js +22 -0
  342. package/dist/components/Employee/SelfOnboardingFlow/SelfOnboardingFlow.js.map +1 -0
  343. package/dist/components/{Flow/StateMachines/employeeSelfOnboarding.js → Employee/SelfOnboardingFlow/selfOnboardingMachine.js} +4 -4
  344. package/dist/components/Employee/SelfOnboardingFlow/selfOnboardingMachine.js.map +1 -0
  345. package/dist/components/Employee/Taxes/FederalForm.d.ts +28 -12
  346. package/dist/components/Employee/Taxes/FederalForm.js +28 -28
  347. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  348. package/dist/components/Employee/Taxes/StateForm.d.ts +9 -5
  349. package/dist/components/Employee/Taxes/StateForm.js +6 -6
  350. package/dist/components/Employee/Taxes/StateForm.js.map +1 -1
  351. package/dist/components/Employee/Taxes/Taxes.d.ts +1 -1
  352. package/dist/components/Employee/Taxes/Taxes.js +78 -77
  353. package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
  354. package/dist/components/Employee/Taxes/index.d.ts +1 -0
  355. package/dist/components/Employee/Taxes/useTaxes.js +3 -4
  356. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  357. package/dist/components/Employee/index.d.ts +4 -1
  358. package/dist/components/Employee/index.js +20 -16
  359. package/dist/components/Employee/index.js.map +1 -1
  360. package/dist/components/Flow/useFlow.d.ts +2 -1
  361. package/dist/components/Flow/useFlow.js.map +1 -1
  362. package/dist/components/index.d.ts +1 -1
  363. package/dist/contexts/ApiProvider/ApiProvider.d.ts +5 -0
  364. package/dist/contexts/ApiProvider/ApiProvider.js +34 -0
  365. package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -0
  366. package/dist/contexts/GustoApiProvider/index.d.ts +1 -0
  367. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +2 -7
  368. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +26 -24
  369. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  370. package/dist/contexts/GustoProvider/index.d.ts +2 -1
  371. package/dist/contexts/LocaleProvider/index.d.ts +1 -0
  372. package/dist/contexts/ThemeProvider/index.d.ts +1 -0
  373. package/dist/contexts/index.d.ts +1 -0
  374. package/dist/helpers/validations.d.ts +6 -5
  375. package/dist/helpers/validations.js +10 -17
  376. package/dist/helpers/validations.js.map +1 -1
  377. package/dist/hooks/useForkRef/index.d.ts +1 -0
  378. package/dist/i18n/I18n.d.ts +2 -0
  379. package/dist/i18n/I18n.js +27 -21
  380. package/dist/i18n/I18n.js.map +1 -1
  381. package/dist/i18n/index.d.ts +1 -0
  382. package/dist/index.d.ts +1 -2
  383. package/dist/index.js +7 -13
  384. package/dist/index.js.map +1 -1
  385. package/dist/shared/constants.d.ts +1 -1
  386. package/dist/shared/constants.js +1 -1
  387. package/dist/shared/constants.js.map +1 -1
  388. package/dist/style.css +1 -1
  389. package/dist/types/Helpers.d.ts +14 -0
  390. package/dist/types/i18next.d.ts +60 -61
  391. package/package.json +7 -4
  392. package/dist/components/Common/UI/FieldCaption/FieldCaption.js.map +0 -1
  393. package/dist/components/Common/UI/FieldDescription/FieldDescription.js.map +0 -1
  394. package/dist/components/Common/UI/FieldErrorMessage/FieldErrorMessage.js.map +0 -1
  395. package/dist/components/Common/UI/FieldLayout/FieldLayout.js.map +0 -1
  396. package/dist/components/Common/UI/FieldLayout/FieldLayoutTypes.d.ts +0 -19
  397. package/dist/components/Common/UI/Fieldset/Fieldset.js.map +0 -1
  398. package/dist/components/Common/UI/HorizontalFieldLayout/HorizontalFieldLayout.js.map +0 -1
  399. package/dist/components/Company/BankAccount/BankAccountFlow.d.ts +0 -5
  400. package/dist/components/Company/BankAccount/BankAccountFlow.js +0 -24
  401. package/dist/components/Company/BankAccount/BankAccountFlow.js.map +0 -1
  402. package/dist/components/Company/DocumentSignerFlow/DocumentList/Actions.js.map +0 -1
  403. package/dist/components/Company/DocumentSignerFlow/DocumentList/DocumentList.d.ts +0 -13
  404. package/dist/components/Company/DocumentSignerFlow/DocumentList/DocumentList.js +0 -69
  405. package/dist/components/Company/DocumentSignerFlow/DocumentList/DocumentList.js.map +0 -1
  406. package/dist/components/Company/DocumentSignerFlow/DocumentList/Head.js.map +0 -1
  407. package/dist/components/Company/DocumentSignerFlow/DocumentList/List.js.map +0 -1
  408. package/dist/components/Company/DocumentSignerFlow/DocumentList/ManageSignatories.js.map +0 -1
  409. package/dist/components/Company/DocumentSignerFlow/DocumentList/useDocumentList.js.map +0 -1
  410. package/dist/components/Company/DocumentSignerFlow/DocumentSignerFlow.d.ts +0 -6
  411. package/dist/components/Company/DocumentSignerFlow/DocumentSignerFlow.js +0 -35
  412. package/dist/components/Company/DocumentSignerFlow/DocumentSignerFlow.js.map +0 -1
  413. package/dist/components/Company/DocumentSignerFlow/SignatureForm/Actions.js.map +0 -1
  414. package/dist/components/Company/DocumentSignerFlow/SignatureForm/Form.js.map +0 -1
  415. package/dist/components/Company/DocumentSignerFlow/SignatureForm/Head.js.map +0 -1
  416. package/dist/components/Company/DocumentSignerFlow/SignatureForm/Preview.js.map +0 -1
  417. package/dist/components/Company/DocumentSignerFlow/SignatureForm/SignatureForm.d.ts +0 -17
  418. package/dist/components/Company/DocumentSignerFlow/SignatureForm/SignatureForm.js +0 -78
  419. package/dist/components/Company/DocumentSignerFlow/SignatureForm/SignatureForm.js.map +0 -1
  420. package/dist/components/Company/DocumentSignerFlow/SignatureForm/useSignatureForm.js.map +0 -1
  421. package/dist/components/Company/DocumentSignerFlow/assignSignatoryState.js.map +0 -1
  422. package/dist/components/Company/DocumentSignerFlow/documentSignerStateMachine.js.map +0 -1
  423. package/dist/components/Company/DocumentSignerFlow/index.d.ts +0 -1
  424. package/dist/components/Company/DocumentSignerFlow/stateMachine.js.map +0 -1
  425. package/dist/components/Company/Locations/LocationsFlow.d.ts +0 -5
  426. package/dist/components/Company/Locations/LocationsFlow.js +0 -21
  427. package/dist/components/Company/Locations/LocationsFlow.js.map +0 -1
  428. package/dist/components/Company/StateTaxes/StateTaxesFlow.d.ts +0 -5
  429. package/dist/components/Company/StateTaxes/StateTaxesFlow.js +0 -21
  430. package/dist/components/Company/StateTaxes/StateTaxesFlow.js.map +0 -1
  431. package/dist/components/Company/StateTaxes/StateTaxesFlowComponents.js.map +0 -1
  432. package/dist/components/Employee/DocumentSigner/DocumentSignerFlow.d.ts +0 -5
  433. package/dist/components/Employee/DocumentSigner/DocumentSignerFlow.js +0 -21
  434. package/dist/components/Employee/DocumentSigner/DocumentSignerFlow.js.map +0 -1
  435. package/dist/components/Flow/EmployeeOnboardingFlow.d.ts +0 -27
  436. package/dist/components/Flow/EmployeeOnboardingFlow.js +0 -29
  437. package/dist/components/Flow/EmployeeOnboardingFlow.js.map +0 -1
  438. package/dist/components/Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingComponents.d.ts +0 -5
  439. package/dist/components/Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingComponents.js.map +0 -1
  440. package/dist/components/Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingFlow.d.ts +0 -13
  441. package/dist/components/Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingFlow.js +0 -26
  442. package/dist/components/Flow/EmployeeSelfOnboardingFlow/EmployeeSelfOnboardingFlow.js.map +0 -1
  443. package/dist/components/Flow/StateMachines/employeeOnboarding.js +0 -136
  444. package/dist/components/Flow/StateMachines/employeeOnboarding.js.map +0 -1
  445. package/dist/components/Flow/StateMachines/employeeSelfOnboarding.js.map +0 -1
  446. package/dist/components/Flow/StateMachines/index.d.ts +0 -2
  447. package/dist/components/Flow/index.d.ts +0 -2
  448. package/dist/components/Flow/index.js +0 -7
  449. package/dist/components/Flow/index.js.map +0 -1
  450. /package/dist/components/Common/{UI/FieldCaption → FieldCaption}/FieldCaption.d.ts +0 -0
  451. /package/dist/components/Common/{UI/FieldCaption → FieldCaption}/FieldCaption.module.scss.js +0 -0
  452. /package/dist/components/Common/{UI/FieldCaption → FieldCaption}/FieldCaption.module.scss.js.map +0 -0
  453. /package/dist/components/Common/{UI/FieldDescription → FieldDescription}/FieldDescription.d.ts +0 -0
  454. /package/dist/components/Common/{UI/FieldDescription → FieldDescription}/FieldDescription.module.scss.js +0 -0
  455. /package/dist/components/Common/{UI/FieldDescription → FieldDescription}/FieldDescription.module.scss.js.map +0 -0
  456. /package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/FieldErrorMessage.d.ts +0 -0
  457. /package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/FieldErrorMessage.module.scss.js +0 -0
  458. /package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/FieldErrorMessage.module.scss.js.map +0 -0
  459. /package/dist/components/Common/{UI/FieldLayout → FieldLayout}/FieldLayout.d.ts +0 -0
  460. /package/dist/components/Common/{UI/FieldLayout → FieldLayout}/FieldLayout.module.scss.js +0 -0
  461. /package/dist/components/Common/{UI/FieldLayout → FieldLayout}/FieldLayout.module.scss.js.map +0 -0
  462. /package/dist/components/Common/{UI/Fieldset → Fieldset}/Fieldset.d.ts +0 -0
  463. /package/dist/components/Common/{UI/Fieldset → Fieldset}/Fieldset.module.scss.js +0 -0
  464. /package/dist/components/Common/{UI/Fieldset → Fieldset}/Fieldset.module.scss.js.map +0 -0
  465. /package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayout.d.ts +0 -0
  466. /package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayout.module.scss.js +0 -0
  467. /package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayout.module.scss.js.map +0 -0
  468. /package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayoutTypes.d.ts +0 -0
  469. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/Actions.d.ts +0 -0
  470. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/Actions.js +0 -0
  471. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/Head.d.ts +0 -0
  472. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/Head.js +0 -0
  473. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/List.d.ts +0 -0
  474. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/List.js +0 -0
  475. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/ManageSignatories.d.ts +0 -0
  476. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/ManageSignatories.js +0 -0
  477. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/ManageSignatories.module.scss.js +0 -0
  478. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/ManageSignatories.module.scss.js.map +0 -0
  479. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/DocumentList/useDocumentList.d.ts +0 -0
  480. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Actions.d.ts +0 -0
  481. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Actions.js +0 -0
  482. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Form.d.ts +0 -0
  483. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Form.js +0 -0
  484. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Head.d.ts +0 -0
  485. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Head.js +0 -0
  486. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Preview.d.ts +0 -0
  487. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/Preview.js +0 -0
  488. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/SignatureForm/useSignatureForm.d.ts +0 -0
  489. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/assignSignatoryState.d.ts +0 -0
  490. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/assignSignatoryState.js +0 -0
  491. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/documentSignerStateMachine.d.ts +0 -0
  492. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/documentSignerStateMachine.js +0 -0
  493. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/stateMachine.d.ts +0 -0
  494. /package/dist/components/Company/{DocumentSignerFlow → DocumentSigner}/stateMachine.js +0 -0
  495. /package/dist/components/Company/{DocumentSignerFlow/useDocumentSignerFlow.d.ts → DocumentSigner/useDocumentSigner.d.ts} +0 -0
  496. /package/dist/components/Company/StateTaxes/{StateTaxesFlowComponents.d.ts → StateTaxesComponents.d.ts} +0 -0
  497. /package/dist/components/{Flow/StateMachines/employeeOnboarding.d.ts → Employee/OnboardingFlow/onboardingStateMachine.d.ts} +0 -0
  498. /package/dist/components/{Flow/StateMachines/employeeSelfOnboarding.d.ts → Employee/SelfOnboardingFlow/selfOnboardingMachine.d.ts} +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.2
4
+
5
+ - Refactored employee flow components structure and improved organization within Employee namespace
6
+ - Added component-level dictionary override functionality for improved internationalization
7
+ - Updated state taxes component to support API-based validation messages
8
+ - Fixed commission Zod schema validation issues
9
+ - Fixed issue with headers not being passed properly through our API client
10
+
11
+ ## 0.8.1
12
+
13
+ - Replaced Valibot with Zod for bundle size reduction. Also included zod as a dependency
14
+ - Updated package.json to fix an issue with types being unavailable for consumers
15
+ - Misc style corrections and consistency fixes
16
+ - Updated component adapter documentation to include generated props
17
+ - bug: GWS-4966 headers not being set properly for requests when configured in GustoProvider
18
+ - moved APIProvider into `embedded-react-sdk` from `embedded-api` package
19
+
3
20
  ## 0.8.0
4
21
 
5
22
  - Company Onboarding flow improvements and fixes:
@@ -7,7 +24,7 @@
7
24
  - Introduced Company.OnboardingOverview component for tracking onboarding progress
8
25
  - Improved state management and context handling for onboarding components
9
26
  - Enhanced documentation for company onboarding workflow
10
- - Added Company.StateTaxesFlow component for managing state tax requirements
27
+ - Added Company.StateTaxes component for managing state tax requirements
11
28
  - Support for state-specific tax forms and requirements
12
29
  - Ability to update state tax settings with validation
13
30
  - Component Adapter initial implementation available with most components (Docs coming soon)
@@ -99,7 +116,7 @@ You would do the following instead::
99
116
  >
100
117
  ```
101
118
 
102
- #### DocumentSigner has been renamed to DocumentSignerFlow
119
+ #### DocumentSigner has been renamed to DocumentSigner
103
120
 
104
121
  Where you would previously do
105
122
 
@@ -110,7 +127,7 @@ Where you would previously do
110
127
  You should update the naming as follows:
111
128
 
112
129
  ```tsx
113
- <Employee.DocumentSignerFlow employeeId="some-id" onEvent={() => {}} />
130
+ <Employee.DocumentSigner employeeId="some-id" onEvent={() => {}} />
114
131
  ```
115
132
 
116
133
  ## 0.6.0
@@ -1,16 +1,17 @@
1
- import { ReactNode, FC, JSX } from 'react';
1
+ import { ReactNode, JSX } from 'react';
2
2
  import { FallbackProps } from 'react-error-boundary';
3
3
  import { OnEventType } from './useBase';
4
4
  import { EventType } from '../../shared/constants';
5
- export interface CommonComponentInterface {
5
+ import { ResourceDictionary, Resources } from '../../types/Helpers';
6
+ export interface CommonComponentInterface<TResourceKey extends keyof Resources = keyof Resources> {
6
7
  children?: ReactNode;
7
8
  className?: string;
8
9
  defaultValues?: unknown;
10
+ dictionary?: ResourceDictionary<TResourceKey>;
9
11
  }
10
- export interface BaseComponentInterface {
12
+ export interface BaseComponentInterface<TResourceKey extends keyof Resources = keyof Resources> extends CommonComponentInterface<TResourceKey> {
11
13
  FallbackComponent?: (props: FallbackProps) => JSX.Element;
12
14
  LoaderComponent?: () => JSX.Element;
13
15
  onEvent: OnEventType<EventType, unknown>;
14
- children?: ReactNode;
15
16
  }
16
- export declare const BaseComponent: FC<BaseComponentInterface>;
17
+ export declare const BaseComponent: <TResourceKey extends keyof Resources = keyof Resources>({ children, FallbackComponent, LoaderComponent, onEvent, dictionary, }: BaseComponentInterface<TResourceKey>) => import("react/jsx-runtime").JSX.Element;
@@ -1,71 +1,72 @@
1
- import { jsx as a, jsxs as b } from "react/jsx-runtime";
2
- import { useState as u, useCallback as h, Suspense as x } from "react";
3
- import { ErrorBoundary as v } from "react-error-boundary";
4
- import { useTranslation as A } from "react-i18next";
5
- import { APIError as S } from "@gusto/embedded-api/models/errors/apierror";
6
- import { SDKValidationError as _ } from "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
- import { UnprocessableEntityErrorObject as d } from "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
- import { FadeIn as j } from "../Common/FadeIn/FadeIn.js";
9
- import { BaseContext as B } from "./useBase.js";
10
- import { componentEvents as I } from "../../shared/constants.js";
11
- import { useAsyncError as K } from "../Common/hooks/useAsyncError.js";
12
- import { Loading as P } from "../Common/Loading/Loading.js";
13
- import { InternalError as R } from "../Common/InternalError/InternalError.js";
14
- import { snakeCaseToCamelCase as w } from "../../helpers/formattedStrings.js";
15
- import { useComponentContext as M } from "../../contexts/ComponentAdapter/useComponentContext.js";
16
- const O = (t) => t.map((e) => e.message ? /* @__PURE__ */ a("li", { children: e.message }, e.key) : null), y = (t, e) => {
17
- const n = e ? e + "." : "";
1
+ import { jsx as a, jsxs as h } from "react/jsx-runtime";
2
+ import { useState as p, useCallback as x, Suspense as v } from "react";
3
+ import { ErrorBoundary as A } from "react-error-boundary";
4
+ import { useTranslation as S } from "react-i18next";
5
+ import { APIError as _ } from "@gusto/embedded-api/models/errors/apierror";
6
+ import { SDKValidationError as j } from "@gusto/embedded-api/models/errors/sdkvalidationerror";
7
+ import { UnprocessableEntityErrorObject as u } from "@gusto/embedded-api/models/errors/unprocessableentityerrorobject";
8
+ import { FadeIn as B } from "../Common/FadeIn/FadeIn.js";
9
+ import { BaseContext as I } from "./useBase.js";
10
+ import { componentEvents as K } from "../../shared/constants.js";
11
+ import { useAsyncError as P } from "../Common/hooks/useAsyncError.js";
12
+ import { Loading as R } from "../Common/Loading/Loading.js";
13
+ import { InternalError as w } from "../Common/InternalError/InternalError.js";
14
+ import { snakeCaseToCamelCase as M } from "../../helpers/formattedStrings.js";
15
+ import { useComponentContext as O } from "../../contexts/ComponentAdapter/useComponentContext.js";
16
+ const T = (t) => t.map((e) => e.message ? /* @__PURE__ */ a("li", { children: e.message }, e.key) : null), y = (t, e) => {
17
+ const s = e ? e + "." : "";
18
18
  if (t.category === "invalid_attribute_value" || t.category === "invalid_operation")
19
19
  return [
20
20
  {
21
- key: w(n + t.errorKey),
21
+ key: M(s + t.errorKey),
22
22
  message: t.message ?? ""
23
23
  }
24
24
  ];
25
25
  if (t.category === "nested_errors" && t.errors !== void 0) {
26
26
  let o = "";
27
- return t.metadata?.key && typeof t.metadata.key == "string" ? o = t.metadata.key : t.metadata?.state && typeof t.metadata.state == "string" ? o = t.metadata.state : t.errorKey && (o = t.errorKey), t.errors.flatMap((l) => y(l, n + o));
27
+ return t.metadata?.key && typeof t.metadata.key == "string" ? o = t.metadata.key : t.metadata?.state && typeof t.metadata.state == "string" ? o = t.metadata.state : t.errorKey && (o = t.errorKey), t.errors.flatMap((f) => y(f, s + o));
28
28
  }
29
29
  return [];
30
- }, Y = ({
30
+ }, Z = ({
31
31
  children: t,
32
- FallbackComponent: e = R,
33
- LoaderComponent: n = P,
34
- onEvent: o
32
+ FallbackComponent: e = w,
33
+ LoaderComponent: s = R,
34
+ onEvent: o,
35
+ dictionary: f
35
36
  }) => {
36
- const [l, i] = u(null), [m, p] = u(null), f = K(), { t: E } = A(), g = M(), k = (r) => {
37
- i(r), r instanceof d && Array.isArray(r.errors) && p(r.errors.flatMap((c) => y(c)));
38
- }, C = h(
37
+ const [E, i] = p(null), [m, d] = p(null), l = P(), { t: g } = S(), k = O(), C = (r) => {
38
+ i(r), r instanceof u && Array.isArray(r.errors) && d(r.errors.flatMap((c) => y(c)));
39
+ }, b = x(
39
40
  async (r, c) => {
40
- i(null), p(null);
41
+ i(null), d(null);
41
42
  try {
42
43
  await c(r);
43
- } catch (s) {
44
- s instanceof S || s instanceof _ || s instanceof d ? k(s) : f(s);
44
+ } catch (n) {
45
+ n instanceof _ || n instanceof j || n instanceof u ? C(n) : l(n);
45
46
  }
46
47
  },
47
- [i, f]
48
+ [i, l]
48
49
  );
49
50
  return /* @__PURE__ */ a(
50
- B.Provider,
51
+ I.Provider,
51
52
  {
52
53
  value: {
53
54
  fieldErrors: m,
54
55
  setError: i,
55
56
  onEvent: o,
56
- throwError: f,
57
- baseSubmitHandler: C
57
+ throwError: l,
58
+ baseSubmitHandler: b
58
59
  },
59
- children: /* @__PURE__ */ b(
60
- v,
60
+ children: /* @__PURE__ */ h(
61
+ A,
61
62
  {
62
63
  FallbackComponent: e,
63
64
  onError: (r) => {
64
- o(I.ERROR, r);
65
+ o(K.ERROR, r);
65
66
  },
66
67
  children: [
67
- (l || m) && /* @__PURE__ */ a(g.Alert, { label: E("status.errorEncountered"), status: "error", children: m && /* @__PURE__ */ a("ul", { children: O(m) }) }),
68
- /* @__PURE__ */ a(x, { fallback: /* @__PURE__ */ a(n, {}), children: /* @__PURE__ */ a(j, { children: t }) })
68
+ (E || m) && /* @__PURE__ */ a(k.Alert, { label: g("status.errorEncountered"), status: "error", children: m && /* @__PURE__ */ a("ul", { children: T(m) }) }),
69
+ /* @__PURE__ */ a(v, { fallback: /* @__PURE__ */ a(s, {}), children: /* @__PURE__ */ a(B, { children: t }) })
69
70
  ]
70
71
  }
71
72
  )
@@ -73,6 +74,6 @@ const O = (t) => t.map((e) => e.message ? /* @__PURE__ */ a("li", { children: e.
73
74
  );
74
75
  };
75
76
  export {
76
- Y as BaseComponent
77
+ Z as BaseComponent
77
78
  };
78
79
  //# sourceMappingURL=Base.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Base.js","sources":["../../../src/components/Base/Base.tsx"],"sourcesContent":["import type { ReactNode, FC, JSX } from 'react'\nimport { Suspense, useState, useCallback } from 'react'\nimport type { FallbackProps } from 'react-error-boundary'\nimport { ErrorBoundary } from 'react-error-boundary'\nimport { useTranslation } from 'react-i18next'\nimport { APIError } from '@gusto/embedded-api/models/errors/apierror'\nimport { SDKValidationError } from '@gusto/embedded-api/models/errors/sdkvalidationerror'\nimport { UnprocessableEntityErrorObject } from '@gusto/embedded-api/models/errors/unprocessableentityerrorobject'\nimport type { EntityErrorObject } from '@gusto/embedded-api/models/components/entityerrorobject'\nimport { FadeIn } from '../Common/FadeIn/FadeIn'\nimport { BaseContext, type FieldError, type KnownErrors, type OnEventType } from './useBase'\nimport { componentEvents, type EventType } from '@/shared/constants'\nimport { InternalError, Loading, useAsyncError } from '@/components/Common'\nimport { snakeCaseToCamelCase } from '@/helpers/formattedStrings'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport interface CommonComponentInterface {\n children?: ReactNode\n className?: string\n defaultValues?: unknown\n}\n\n// Base component wrapper with error and suspense handling\nexport interface BaseComponentInterface {\n FallbackComponent?: (props: FallbackProps) => JSX.Element\n LoaderComponent?: () => JSX.Element\n onEvent: OnEventType<EventType, unknown>\n children?: ReactNode\n}\n\n/**Traverses errorList and finds items with message properties */\nconst renderErrorList = (errorList: FieldError[]): React.ReactNode => {\n return errorList.map(errorFromList => {\n if (errorFromList.message) {\n return <li key={errorFromList.key}>{errorFromList.message}</li>\n }\n return null\n })\n}\n/**Recuresively parses error list and constructs an array of objects containing attribute value error messages associated with form fields. Nested errors construct '.' separated keys\n * metadata.state is a special case for state taxes validation errors\n */\nconst getFieldErrors = (\n error: EntityErrorObject,\n parentKey?: string,\n): { key: string; message: string }[] => {\n const keyPrefix = parentKey ? parentKey + '.' : ''\n if (error.category === 'invalid_attribute_value' || error.category === 'invalid_operation') {\n return [\n {\n key: snakeCaseToCamelCase(keyPrefix + error.errorKey),\n message: error.message ?? '',\n },\n ]\n }\n if (error.category === 'nested_errors' && error.errors !== undefined) {\n //TODO: clean this up once Metadata type is fixed in openapi spec\n let keySuffix = ''\n //@ts-expect-error: Metadata in speakeasy is incorrectly typed\n if (error.metadata?.key && typeof error.metadata.key === 'string') {\n //@ts-expect-error: Metadata in speakeasy is incorrectly typed\n keySuffix = error.metadata.key as string\n //@ts-expect-error: Metadata in speakeasy is incorrectly typed\n } else if (error.metadata?.state && typeof error.metadata.state === 'string') {\n //@ts-expect-error: Metadata in speakeasy is incorrectly typed\n keySuffix = error.metadata.state as string\n } else if (error.errorKey) {\n keySuffix = error.errorKey\n }\n return error.errors.flatMap(err => getFieldErrors(err, keyPrefix + keySuffix))\n }\n return []\n}\n\ntype SubmitHandler<T> = (data: T) => Promise<void>\n\nexport const BaseComponent: FC<BaseComponentInterface> = ({\n children,\n FallbackComponent = InternalError,\n LoaderComponent = Loading,\n onEvent,\n}) => {\n const [error, setError] = useState<KnownErrors | null>(null)\n const [fieldErrors, setFieldErrors] = useState<FieldError[] | null>(null)\n const throwError = useAsyncError()\n const { t } = useTranslation()\n const Components = useComponentContext()\n\n const processError = (error: KnownErrors) => {\n setError(error)\n //422\tapplication/json - content relaited error\n if (error instanceof UnprocessableEntityErrorObject && Array.isArray(error.errors)) {\n setFieldErrors(error.errors.flatMap(err => getFieldErrors(err)))\n }\n }\n\n const baseSubmitHandler = useCallback(\n async <T,>(data: T, componentHandler: SubmitHandler<T>) => {\n setError(null)\n setFieldErrors(null)\n try {\n await componentHandler(data)\n } catch (err) {\n if (\n err instanceof APIError ||\n err instanceof SDKValidationError ||\n err instanceof UnprocessableEntityErrorObject\n ) {\n processError(err)\n } else throwError(err)\n }\n },\n [setError, throwError],\n )\n\n return (\n <BaseContext.Provider\n value={{\n fieldErrors,\n setError,\n onEvent,\n throwError,\n baseSubmitHandler,\n }}\n >\n <ErrorBoundary\n FallbackComponent={FallbackComponent}\n onError={err => {\n onEvent(componentEvents.ERROR, err)\n }}\n >\n {(error || fieldErrors) && (\n <Components.Alert label={t('status.errorEncountered')} status=\"error\">\n {fieldErrors && <ul>{renderErrorList(fieldErrors)}</ul>}\n </Components.Alert>\n )}\n <Suspense fallback={<LoaderComponent />}>\n <FadeIn>{children}</FadeIn>\n </Suspense>\n </ErrorBoundary>\n </BaseContext.Provider>\n )\n}\n"],"names":["renderErrorList","errorList","errorFromList","jsx","getFieldErrors","error","parentKey","keyPrefix","snakeCaseToCamelCase","keySuffix","err","BaseComponent","children","FallbackComponent","InternalError","LoaderComponent","Loading","onEvent","setError","useState","fieldErrors","setFieldErrors","throwError","useAsyncError","t","useTranslation","Components","useComponentContext","processError","UnprocessableEntityErrorObject","baseSubmitHandler","useCallback","data","componentHandler","APIError","SDKValidationError","BaseContext","jsxs","ErrorBoundary","componentEvents","Suspense","FadeIn"],"mappings":";;;;;;;;;;;;;;;AA+BA,MAAMA,IAAkB,CAACC,MAChBA,EAAU,IAAI,CAAiBC,MAChCA,EAAc,UACR,gBAAAC,EAAA,MAAA,EAA4B,UAAcD,EAAA,QAAA,GAAlCA,EAAc,GAA4B,IAErD,IACR,GAKGE,IAAiB,CACrBC,GACAC,MACuC;AACjC,QAAAC,IAAYD,IAAYA,IAAY,MAAM;AAChD,MAAID,EAAM,aAAa,6BAA6BA,EAAM,aAAa;AAC9D,WAAA;AAAA,MACL;AAAA,QACE,KAAKG,EAAqBD,IAAYF,EAAM,QAAQ;AAAA,QACpD,SAASA,EAAM,WAAW;AAAA,MAAA;AAAA,IAE9B;AAEF,MAAIA,EAAM,aAAa,mBAAmBA,EAAM,WAAW,QAAW;AAEpE,QAAII,IAAY;AAEhB,WAAIJ,EAAM,UAAU,OAAO,OAAOA,EAAM,SAAS,OAAQ,WAEvDI,IAAYJ,EAAM,SAAS,MAElBA,EAAM,UAAU,SAAS,OAAOA,EAAM,SAAS,SAAU,WAElEI,IAAYJ,EAAM,SAAS,QAClBA,EAAM,aACfI,IAAYJ,EAAM,WAEbA,EAAM,OAAO,QAAQ,CAAAK,MAAON,EAAeM,GAAKH,IAAYE,CAAS,CAAC;AAAA,EAAA;AAE/E,SAAO,CAAC;AACV,GAIaE,IAA4C,CAAC;AAAA,EACxD,UAAAC;AAAA,EACA,mBAAAC,IAAoBC;AAAA,EACpB,iBAAAC,IAAkBC;AAAA,EAClB,SAAAC;AACF,MAAM;AACJ,QAAM,CAACZ,GAAOa,CAAQ,IAAIC,EAA6B,IAAI,GACrD,CAACC,GAAaC,CAAc,IAAIF,EAA8B,IAAI,GAClEG,IAAaC,EAAc,GAC3B,EAAE,GAAAC,EAAE,IAAIC,EAAe,GACvBC,IAAaC,EAAoB,GAEjCC,IAAe,CAACvB,MAAuB;AAC3C,IAAAa,EAASb,CAAK,GAEVA,aAAiBwB,KAAkC,MAAM,QAAQxB,EAAM,MAAM,KAC/EgB,EAAehB,EAAM,OAAO,QAAQ,OAAOD,EAAeM,CAAG,CAAC,CAAC;AAAA,EAEnE,GAEMoB,IAAoBC;AAAA,IACxB,OAAWC,GAASC,MAAuC;AACzD,MAAAf,EAAS,IAAI,GACbG,EAAe,IAAI;AACf,UAAA;AACF,cAAMY,EAAiBD,CAAI;AAAA,eACpBtB,GAAK;AACZ,QACEA,aAAewB,KACfxB,aAAeyB,KACfzB,aAAemB,IAEfD,EAAalB,CAAG,MACAA,CAAG;AAAA,MAAA;AAAA,IAEzB;AAAA,IACA,CAACQ,GAAUI,CAAU;AAAA,EACvB;AAGE,SAAA,gBAAAnB;AAAA,IAACiC,EAAY;AAAA,IAAZ;AAAA,MACC,OAAO;AAAA,QACL,aAAAhB;AAAA,QACA,UAAAF;AAAA,QACA,SAAAD;AAAA,QACA,YAAAK;AAAA,QACA,mBAAAQ;AAAA,MACF;AAAA,MAEA,UAAA,gBAAAO;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,mBAAAzB;AAAA,UACA,SAAS,CAAOH,MAAA;AACN,YAAAO,EAAAsB,EAAgB,OAAO7B,CAAG;AAAA,UACpC;AAAA,UAEE,UAAA;AAAA,aAAAL,KAASe,MACR,gBAAAjB,EAAAuB,EAAW,OAAX,EAAiB,OAAOF,EAAE,yBAAyB,GAAG,QAAO,SAC3D,UAAeJ,KAAA,gBAAAjB,EAAC,QAAI,UAAgBH,EAAAoB,CAAW,EAAE,CAAA,GACpD;AAAA,YAEF,gBAAAjB,EAACqC,KAAS,UAAU,gBAAArC,EAACY,KAAgB,GACnC,UAAA,gBAAAZ,EAACsC,GAAQ,EAAA,UAAA7B,EAAS,CAAA,EACpB,CAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EACF;AAEJ;"}
1
+ {"version":3,"file":"Base.js","sources":["../../../src/components/Base/Base.tsx"],"sourcesContent":["import type { ReactNode, JSX } from 'react'\nimport { Suspense, useState, useCallback } from 'react'\nimport type { FallbackProps } from 'react-error-boundary'\nimport { ErrorBoundary } from 'react-error-boundary'\nimport { useTranslation } from 'react-i18next'\nimport { APIError } from '@gusto/embedded-api/models/errors/apierror'\nimport { SDKValidationError } from '@gusto/embedded-api/models/errors/sdkvalidationerror'\nimport { UnprocessableEntityErrorObject } from '@gusto/embedded-api/models/errors/unprocessableentityerrorobject'\nimport type { EntityErrorObject } from '@gusto/embedded-api/models/components/entityerrorobject'\nimport { FadeIn } from '../Common/FadeIn/FadeIn'\nimport { BaseContext, type FieldError, type KnownErrors, type OnEventType } from './useBase'\nimport { componentEvents, type EventType } from '@/shared/constants'\nimport { InternalError, Loading, useAsyncError } from '@/components/Common'\nimport { snakeCaseToCamelCase } from '@/helpers/formattedStrings'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport type { ResourceDictionary, Resources } from '@/types/Helpers'\n\nexport interface CommonComponentInterface<TResourceKey extends keyof Resources = keyof Resources> {\n children?: ReactNode\n className?: string\n defaultValues?: unknown\n dictionary?: ResourceDictionary<TResourceKey>\n}\n\n// Base component wrapper with error and suspense handling\nexport interface BaseComponentInterface<TResourceKey extends keyof Resources = keyof Resources>\n extends CommonComponentInterface<TResourceKey> {\n FallbackComponent?: (props: FallbackProps) => JSX.Element\n LoaderComponent?: () => JSX.Element\n onEvent: OnEventType<EventType, unknown>\n}\n\n/**Traverses errorList and finds items with message properties */\nconst renderErrorList = (errorList: FieldError[]): React.ReactNode => {\n return errorList.map(errorFromList => {\n if (errorFromList.message) {\n return <li key={errorFromList.key}>{errorFromList.message}</li>\n }\n return null\n })\n}\n/**Recuresively parses error list and constructs an array of objects containing attribute value error messages associated with form fields. Nested errors construct '.' separated keys\n * metadata.state is a special case for state taxes validation errors\n */\nconst getFieldErrors = (\n error: EntityErrorObject,\n parentKey?: string,\n): { key: string; message: string }[] => {\n const keyPrefix = parentKey ? parentKey + '.' : ''\n if (error.category === 'invalid_attribute_value' || error.category === 'invalid_operation') {\n return [\n {\n key: snakeCaseToCamelCase(keyPrefix + error.errorKey),\n message: error.message ?? '',\n },\n ]\n }\n if (error.category === 'nested_errors' && error.errors !== undefined) {\n //TODO: clean this up once Metadata type is fixed in openapi spec\n let keySuffix = ''\n //@ts-expect-error: Metadata in speakeasy is incorrectly typed\n if (error.metadata?.key && typeof error.metadata.key === 'string') {\n //@ts-expect-error: Metadata in speakeasy is incorrectly typed\n keySuffix = error.metadata.key as string\n //@ts-expect-error: Metadata in speakeasy is incorrectly typed\n } else if (error.metadata?.state && typeof error.metadata.state === 'string') {\n //@ts-expect-error: Metadata in speakeasy is incorrectly typed\n keySuffix = error.metadata.state as string\n } else if (error.errorKey) {\n keySuffix = error.errorKey\n }\n return error.errors.flatMap(err => getFieldErrors(err, keyPrefix + keySuffix))\n }\n return []\n}\n\ntype SubmitHandler<T> = (data: T) => Promise<void>\n\nexport const BaseComponent = <TResourceKey extends keyof Resources = keyof Resources>({\n children,\n FallbackComponent = InternalError,\n LoaderComponent = Loading,\n onEvent,\n dictionary,\n}: BaseComponentInterface<TResourceKey>) => {\n const [error, setError] = useState<KnownErrors | null>(null)\n const [fieldErrors, setFieldErrors] = useState<FieldError[] | null>(null)\n const throwError = useAsyncError()\n const { t } = useTranslation()\n const Components = useComponentContext()\n\n const processError = (error: KnownErrors) => {\n setError(error)\n //422\tapplication/json - content relaited error\n if (error instanceof UnprocessableEntityErrorObject && Array.isArray(error.errors)) {\n setFieldErrors(error.errors.flatMap(err => getFieldErrors(err)))\n }\n }\n\n const baseSubmitHandler = useCallback(\n async <T,>(data: T, componentHandler: SubmitHandler<T>) => {\n setError(null)\n setFieldErrors(null)\n try {\n await componentHandler(data)\n } catch (err) {\n if (\n err instanceof APIError ||\n err instanceof SDKValidationError ||\n err instanceof UnprocessableEntityErrorObject\n ) {\n processError(err)\n } else throwError(err)\n }\n },\n [setError, throwError],\n )\n\n return (\n <BaseContext.Provider\n value={{\n fieldErrors,\n setError,\n onEvent,\n throwError,\n baseSubmitHandler,\n }}\n >\n <ErrorBoundary\n FallbackComponent={FallbackComponent}\n onError={err => {\n onEvent(componentEvents.ERROR, err)\n }}\n >\n {(error || fieldErrors) && (\n <Components.Alert label={t('status.errorEncountered')} status=\"error\">\n {fieldErrors && <ul>{renderErrorList(fieldErrors)}</ul>}\n </Components.Alert>\n )}\n <Suspense fallback={<LoaderComponent />}>\n <FadeIn>{children}</FadeIn>\n </Suspense>\n </ErrorBoundary>\n </BaseContext.Provider>\n )\n}\n"],"names":["renderErrorList","errorList","errorFromList","jsx","getFieldErrors","error","parentKey","keyPrefix","snakeCaseToCamelCase","keySuffix","err","BaseComponent","children","FallbackComponent","InternalError","LoaderComponent","Loading","onEvent","dictionary","setError","useState","fieldErrors","setFieldErrors","throwError","useAsyncError","t","useTranslation","Components","useComponentContext","processError","UnprocessableEntityErrorObject","baseSubmitHandler","useCallback","data","componentHandler","APIError","SDKValidationError","BaseContext","jsxs","ErrorBoundary","componentEvents","Suspense","FadeIn"],"mappings":";;;;;;;;;;;;;;;AAiCA,MAAMA,IAAkB,CAACC,MAChBA,EAAU,IAAI,CAAiBC,MAChCA,EAAc,UACR,gBAAAC,EAAA,MAAA,EAA4B,UAAcD,EAAA,QAAA,GAAlCA,EAAc,GAA4B,IAErD,IACR,GAKGE,IAAiB,CACrBC,GACAC,MACuC;AACjC,QAAAC,IAAYD,IAAYA,IAAY,MAAM;AAChD,MAAID,EAAM,aAAa,6BAA6BA,EAAM,aAAa;AAC9D,WAAA;AAAA,MACL;AAAA,QACE,KAAKG,EAAqBD,IAAYF,EAAM,QAAQ;AAAA,QACpD,SAASA,EAAM,WAAW;AAAA,MAAA;AAAA,IAE9B;AAEF,MAAIA,EAAM,aAAa,mBAAmBA,EAAM,WAAW,QAAW;AAEpE,QAAII,IAAY;AAEhB,WAAIJ,EAAM,UAAU,OAAO,OAAOA,EAAM,SAAS,OAAQ,WAEvDI,IAAYJ,EAAM,SAAS,MAElBA,EAAM,UAAU,SAAS,OAAOA,EAAM,SAAS,SAAU,WAElEI,IAAYJ,EAAM,SAAS,QAClBA,EAAM,aACfI,IAAYJ,EAAM,WAEbA,EAAM,OAAO,QAAQ,CAAAK,MAAON,EAAeM,GAAKH,IAAYE,CAAS,CAAC;AAAA,EAAA;AAE/E,SAAO,CAAC;AACV,GAIaE,IAAgB,CAAyD;AAAA,EACpF,UAAAC;AAAA,EACA,mBAAAC,IAAoBC;AAAA,EACpB,iBAAAC,IAAkBC;AAAA,EAClB,SAAAC;AAAA,EACA,YAAAC;AACF,MAA4C;AAC1C,QAAM,CAACb,GAAOc,CAAQ,IAAIC,EAA6B,IAAI,GACrD,CAACC,GAAaC,CAAc,IAAIF,EAA8B,IAAI,GAClEG,IAAaC,EAAc,GAC3B,EAAE,GAAAC,EAAE,IAAIC,EAAe,GACvBC,IAAaC,EAAoB,GAEjCC,IAAe,CAACxB,MAAuB;AAC3C,IAAAc,EAASd,CAAK,GAEVA,aAAiByB,KAAkC,MAAM,QAAQzB,EAAM,MAAM,KAC/EiB,EAAejB,EAAM,OAAO,QAAQ,OAAOD,EAAeM,CAAG,CAAC,CAAC;AAAA,EAEnE,GAEMqB,IAAoBC;AAAA,IACxB,OAAWC,GAASC,MAAuC;AACzD,MAAAf,EAAS,IAAI,GACbG,EAAe,IAAI;AACf,UAAA;AACF,cAAMY,EAAiBD,CAAI;AAAA,eACpBvB,GAAK;AACZ,QACEA,aAAeyB,KACfzB,aAAe0B,KACf1B,aAAeoB,IAEfD,EAAanB,CAAG,MACAA,CAAG;AAAA,MAAA;AAAA,IAEzB;AAAA,IACA,CAACS,GAAUI,CAAU;AAAA,EACvB;AAGE,SAAA,gBAAApB;AAAA,IAACkC,EAAY;AAAA,IAAZ;AAAA,MACC,OAAO;AAAA,QACL,aAAAhB;AAAA,QACA,UAAAF;AAAA,QACA,SAAAF;AAAA,QACA,YAAAM;AAAA,QACA,mBAAAQ;AAAA,MACF;AAAA,MAEA,UAAA,gBAAAO;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,mBAAA1B;AAAA,UACA,SAAS,CAAOH,MAAA;AACN,YAAAO,EAAAuB,EAAgB,OAAO9B,CAAG;AAAA,UACpC;AAAA,UAEE,UAAA;AAAA,aAAAL,KAASgB,MACR,gBAAAlB,EAAAwB,EAAW,OAAX,EAAiB,OAAOF,EAAE,yBAAyB,GAAG,QAAO,SAC3D,UAAeJ,KAAA,gBAAAlB,EAAC,QAAI,UAAgBH,EAAAqB,CAAW,EAAE,CAAA,GACpD;AAAA,YAEF,gBAAAlB,EAACsC,KAAS,UAAU,gBAAAtC,EAACY,KAAgB,GACnC,UAAA,gBAAAZ,EAACuC,GAAQ,EAAA,UAAA9B,EAAS,CAAA,EACpB,CAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EACF;AAEJ;"}
@@ -1,3 +1,4 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { BaseComponent, type BaseComponentInterface, type CommonComponentInterface } from './Base';
2
3
  export { createCompoundContext } from './createCompoundContext';
3
4
  export { useBase } from './useBase';
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export * from './ActionsLayout';
@@ -1,8 +1,10 @@
1
- const t = "_columnTitle_1t032_1", l = {
2
- columnTitle: t
1
+ const t = "_columnTitle_1djp5_1", l = "_columnData_1djp5_8", o = {
2
+ columnTitle: t,
3
+ columnData: l
3
4
  };
4
5
  export {
6
+ l as columnData,
5
7
  t as columnTitle,
6
- l as default
8
+ o as default
7
9
  };
8
10
  //# sourceMappingURL=DataCards.module.scss.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataCards.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
1
+ {"version":3,"file":"DataCards.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export * from './DataCards';
@@ -1,3 +1,4 @@
1
+ import "./types/i18next.d.ts"
1
2
  export * from './DataView';
2
3
  export * from './DataCards/';
3
4
  export * from './DataTable/DataTable';
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { DocumentList, type FormData } from './DocumentList';
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export * from './DocumentViewer';
@@ -1,10 +1,10 @@
1
- const e = "_fade_4tpvm_1", a = "_fadeIn_4tpvm_7", t = {
1
+ const e = "_fade_6tfn1_1", f = "_fadeIn_6tfn1_8", a = {
2
2
  fade: e,
3
- fadeIn: a
3
+ fadeIn: f
4
4
  };
5
5
  export {
6
- t as default,
6
+ a as default,
7
7
  e as fade,
8
- a as fadeIn
8
+ f as fadeIn
9
9
  };
10
10
  //# sourceMappingURL=FadeIn.module.scss.js.map
@@ -2,7 +2,7 @@ import { jsxs as c, jsx as l } from "react/jsx-runtime";
2
2
  import { useTranslation as p } from "react-i18next";
3
3
  import d from "classnames";
4
4
  import n from "./FieldCaption.module.scss.js";
5
- import { VisuallyHidden as f } from "../../VisuallyHidden/VisuallyHidden.js";
5
+ import { VisuallyHidden as f } from "../VisuallyHidden/VisuallyHidden.js";
6
6
  const j = ({
7
7
  children: e,
8
8
  as: o = "label",
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldCaption.js","sources":["../../../../src/components/Common/FieldCaption/FieldCaption.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport classNames from 'classnames'\nimport { VisuallyHidden } from '../VisuallyHidden'\nimport styles from './FieldCaption.module.scss'\n\nexport interface FieldCaptionProps {\n children: React.ReactNode\n as?: 'label' | 'legend'\n htmlFor?: string\n isRequired?: boolean\n isVisuallyHidden?: boolean\n className?: string\n}\n\nexport const FieldCaption: React.FC<FieldCaptionProps> = ({\n children,\n as = 'label',\n htmlFor,\n isRequired = false,\n isVisuallyHidden = false,\n className,\n}: FieldCaptionProps) => {\n const { t } = useTranslation('common')\n const Component = as\n\n const content = (\n <Component\n className={classNames(styles.root, className)}\n htmlFor={as === 'label' ? htmlFor : undefined}\n >\n {children}\n {!isRequired && <span className={styles.optionalLabel}>{t('optionalLabel')}</span>}\n </Component>\n )\n\n return isVisuallyHidden ? <VisuallyHidden>{content}</VisuallyHidden> : content\n}\n"],"names":["FieldCaption","children","as","htmlFor","isRequired","isVisuallyHidden","className","t","useTranslation","content","jsxs","classNames","styles","jsx","VisuallyHidden"],"mappings":";;;;;AAcO,MAAMA,IAA4C,CAAC;AAAA,EACxD,UAAAC;AAAA,EACA,IAAAC,IAAK;AAAA,EACL,SAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,kBAAAC,IAAmB;AAAA,EACnB,WAAAC;AACF,MAAyB;AACvB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,QAAQ,GAG/BC,IACJ,gBAAAC;AAAA,IAHgBR;AAAA,IAGf;AAAA,MACC,WAAWS,EAAWC,EAAO,MAAMN,CAAS;AAAA,MAC5C,SAASJ,MAAO,UAAUC,IAAU;AAAA,MAEnC,UAAA;AAAA,QAAAF;AAAA,QACA,CAACG,KAAe,gBAAAS,EAAA,QAAA,EAAK,WAAWD,EAAO,eAAgB,UAAEL,EAAA,eAAe,EAAE,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAC7E;AAGF,SAAOF,IAAmB,gBAAAQ,EAACC,GAAgB,EAAA,UAAAL,EAAQ,CAAA,IAAoBA;AACzE;"}
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { FieldCaption } from './FieldCaption';
@@ -1,7 +1,7 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import e from "classnames";
3
3
  import p from "./FieldDescription.module.scss.js";
4
- import { createMarkup as a } from "../../../../helpers/formattedStrings.js";
4
+ import { createMarkup as a } from "../../../helpers/formattedStrings.js";
5
5
  const u = ({
6
6
  children: o,
7
7
  className: s,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldDescription.js","sources":["../../../../src/components/Common/FieldDescription/FieldDescription.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport styles from './FieldDescription.module.scss'\nimport { createMarkup } from '@/helpers/formattedStrings'\n\ninterface FieldDescriptionProps {\n children: React.ReactNode\n className?: string\n id?: string\n}\n\nexport const FieldDescription: React.FC<FieldDescriptionProps> = ({\n children,\n className,\n id,\n}: FieldDescriptionProps) => {\n const commonProps = {\n className: classNames(styles.root, className),\n id,\n }\n\n return (\n children &&\n (typeof children === 'string' ? (\n <div {...commonProps} dangerouslySetInnerHTML={createMarkup(children)} />\n ) : (\n <div {...commonProps}>{children}</div>\n ))\n )\n}\n"],"names":["FieldDescription","children","className","id","commonProps","classNames","styles","jsx","createMarkup"],"mappings":";;;;AAUO,MAAMA,IAAoD,CAAC;AAAA,EAChE,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,IAAAC;AACF,MAA6B;AAC3B,QAAMC,IAAc;AAAA,IAClB,WAAWC,EAAWC,EAAO,MAAMJ,CAAS;AAAA,IAC5C,IAAAC;AAAA,EACF;AAEA,SACEF,MACC,OAAOA,KAAa,WACnB,gBAAAM,EAAC,SAAK,GAAGH,GAAa,yBAAyBI,EAAaP,CAAQ,EAAG,CAAA,sBAEtE,OAAK,EAAA,GAAGG,GAAc,UAAAH,EAAS,CAAA;AAGtC;"}
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { FieldDescription } from './FieldDescription';
@@ -1,7 +1,7 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import p from "classnames";
3
3
  import r from "./FieldErrorMessage.module.scss.js";
4
- import { useComponentContext as a } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
4
+ import { useComponentContext as a } from "../../../contexts/ComponentAdapter/useComponentContext.js";
5
5
  function l({
6
6
  children: o,
7
7
  id: t,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldErrorMessage.js","sources":["../../../../src/components/Common/FieldErrorMessage/FieldErrorMessage.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react'\nimport classNames from 'classnames'\nimport styles from './FieldErrorMessage.module.scss'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface FieldErrorMessageProps extends HTMLAttributes<HTMLParagraphElement> {\n withErrorIcon?: boolean\n}\n\nexport function FieldErrorMessage({\n children,\n id,\n className,\n withErrorIcon = true,\n ...props\n}: FieldErrorMessageProps) {\n const { Text } = useComponentContext()\n\n return (\n children && (\n <Text\n id={id}\n className={classNames(styles.root, className, {\n [styles.withErrorIcon as string]: withErrorIcon,\n })}\n {...props}\n >\n {children}\n </Text>\n )\n )\n}\n"],"names":["FieldErrorMessage","children","id","className","withErrorIcon","props","Text","useComponentContext","jsx","classNames","styles"],"mappings":";;;;AASO,SAASA,EAAkB;AAAA,EAChC,UAAAC;AAAA,EACA,IAAAC;AAAA,EACA,WAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,GAAGC;AACL,GAA2B;AACnB,QAAA,EAAE,MAAAC,EAAK,IAAIC,EAAoB;AAErC,SACEN,KACE,gBAAAO;AAAA,IAACF;AAAA,IAAA;AAAA,MACC,IAAAJ;AAAA,MACA,WAAWO,EAAWC,EAAO,MAAMP,GAAW;AAAA,QAC5C,CAACO,EAAO,aAAuB,GAAGN;AAAA,MAAA,CACnC;AAAA,MACA,GAAGC;AAAA,MAEH,UAAAJ;AAAA,IAAA;AAAA,EACH;AAGN;"}
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { FieldErrorMessage } from './FieldErrorMessage';
@@ -2,7 +2,7 @@ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
2
  import t from "classnames";
3
3
  import { FieldCaption as F } from "../FieldCaption/FieldCaption.js";
4
4
  import r from "./FieldLayout.module.scss.js";
5
- import { getDataProps as N } from "../../../../helpers/getDataProps.js";
5
+ import { getDataProps as N } from "../../../helpers/getDataProps.js";
6
6
  import { FieldDescription as g } from "../FieldDescription/FieldDescription.js";
7
7
  import { FieldErrorMessage as x } from "../FieldErrorMessage/FieldErrorMessage.js";
8
8
  const A = ({
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldLayout.js","sources":["../../../../src/components/Common/FieldLayout/FieldLayout.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { FieldDescription } from '../FieldDescription'\nimport { FieldErrorMessage } from '../FieldErrorMessage'\nimport { FieldCaption } from '../FieldCaption/FieldCaption'\nimport styles from './FieldLayout.module.scss'\nimport type { FieldLayoutProps } from './FieldLayoutTypes'\nimport { getDataProps } from '@/helpers/getDataProps'\n\nexport const FieldLayout: React.FC<FieldLayoutProps> = ({\n label,\n description,\n descriptionId,\n errorMessage,\n errorMessageId,\n children,\n isRequired = false,\n htmlFor,\n shouldVisuallyHideLabel = false,\n className,\n withErrorIcon = true,\n ...props\n}: FieldLayoutProps) => {\n return (\n <div className={classNames(styles.root, className)} {...getDataProps(props)}>\n <div\n className={classNames(styles.labelAndDescription, {\n [styles.withVisibleLabel as string]: !shouldVisuallyHideLabel,\n [styles.withDescription as string]: Boolean(description),\n })}\n >\n <FieldCaption\n htmlFor={htmlFor}\n isRequired={isRequired}\n isVisuallyHidden={shouldVisuallyHideLabel}\n >\n {label}\n </FieldCaption>\n <FieldDescription id={descriptionId}>{description}</FieldDescription>\n </div>\n {children}\n <FieldErrorMessage\n id={errorMessageId}\n className={styles.errorMessage}\n withErrorIcon={withErrorIcon}\n >\n {errorMessage}\n </FieldErrorMessage>\n </div>\n )\n}\n"],"names":["FieldLayout","label","description","descriptionId","errorMessage","errorMessageId","children","isRequired","htmlFor","shouldVisuallyHideLabel","className","withErrorIcon","props","jsxs","classNames","styles","getDataProps","jsx","FieldCaption","FieldDescription","FieldErrorMessage"],"mappings":";;;;;;;AAQO,MAAMA,IAA0C,CAAC;AAAA,EACtD,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,SAAAC;AAAA,EACA,yBAAAC,IAA0B;AAAA,EAC1B,WAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,GAAGC;AACL,MAEI,gBAAAC,EAAC,OAAI,EAAA,WAAWC,EAAWC,EAAO,MAAML,CAAS,GAAI,GAAGM,EAAaJ,CAAK,GACxE,UAAA;AAAA,EAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAWC,EAAO,qBAAqB;AAAA,QAChD,CAACA,EAAO,gBAA0B,GAAG,CAACN;AAAA,QACtC,CAACM,EAAO,eAAyB,GAAG,EAAQb;AAAA,MAAW,CACxD;AAAA,MAED,UAAA;AAAA,QAAA,gBAAAe;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,SAAAV;AAAA,YACA,YAAAD;AAAA,YACA,kBAAkBE;AAAA,YAEjB,UAAAR;AAAA,UAAA;AAAA,QACH;AAAA,QACC,gBAAAgB,EAAAE,GAAA,EAAiB,IAAIhB,GAAgB,UAAYD,EAAA,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACpD;AAAA,EACCI;AAAA,EACD,gBAAAW;AAAA,IAACG;AAAA,IAAA;AAAA,MACC,IAAIf;AAAA,MACJ,WAAWU,EAAO;AAAA,MAClB,eAAAJ;AAAA,MAEC,UAAAP;AAAA,IAAA;AAAA,EAAA;AACH,GACF;"}
@@ -0,0 +1,52 @@
1
+ import { ReactNode } from 'react';
2
+ import { DataAttributes } from '../../../types/Helpers';
3
+ export interface SharedFieldLayoutProps extends DataAttributes {
4
+ /**
5
+ * Optional description text for the field
6
+ */
7
+ description?: ReactNode;
8
+ /**
9
+ * Error message to display when the field is invalid
10
+ */
11
+ errorMessage?: string;
12
+ /**
13
+ * Indicates if the field is required
14
+ */
15
+ isRequired?: boolean;
16
+ /**
17
+ * Label text for the field
18
+ */
19
+ label: ReactNode;
20
+ /**
21
+ * Hides the label visually while keeping it accessible to screen readers
22
+ */
23
+ shouldVisuallyHideLabel?: boolean;
24
+ }
25
+ export interface InternalFieldLayoutProps {
26
+ /**
27
+ * Content to be rendered inside the field layout
28
+ */
29
+ children: React.ReactNode;
30
+ /**
31
+ * ID of the form control that this label is associated with
32
+ */
33
+ htmlFor: string;
34
+ /**
35
+ * ID of the error message element
36
+ */
37
+ errorMessageId: string;
38
+ /**
39
+ * ID of the description element
40
+ */
41
+ descriptionId: string;
42
+ /**
43
+ * Additional CSS class name
44
+ */
45
+ className?: string;
46
+ /**
47
+ * Whether to show the error icon
48
+ */
49
+ withErrorIcon?: boolean;
50
+ }
51
+ export interface FieldLayoutProps extends SharedFieldLayoutProps, InternalFieldLayoutProps {
52
+ }
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { FieldLayout } from './FieldLayout';
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { CheckboxField, type CheckboxFieldProps } from './CheckboxField';
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { CheckboxGroupField, type CheckboxGroupFieldProps } from './CheckboxGroupField';
@@ -1,2 +1,3 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { ComboBoxField } from './ComboBoxField';
2
3
  export type { ComboBoxFieldProps } from './ComboBoxField';
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export * from './DatePickerField';
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { NumberInputField, type NumberInputFieldProps } from './NumberInputField';
@@ -1,2 +1,3 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { RadioGroupField } from './RadioGroupField';
2
3
  export type { RadioGroupFieldProps } from './RadioGroupField';
@@ -1,2 +1,3 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { SelectField } from './SelectField';
2
3
  export type { SelectFieldProps } from './SelectField';
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export * from './SwitchField';
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { TextInputField, type TextInputFieldProps } from './TextInputField';
@@ -2,7 +2,7 @@ import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
2
  import { useId as f } from "react";
3
3
  import l from "classnames";
4
4
  import e from "./Fieldset.module.scss.js";
5
- import { getDataProps as g } from "../../../../helpers/getDataProps.js";
5
+ import { getDataProps as g } from "../../../helpers/getDataProps.js";
6
6
  import { FieldCaption as h } from "../FieldCaption/FieldCaption.js";
7
7
  import { FieldDescription as D } from "../FieldDescription/FieldDescription.js";
8
8
  import { FieldErrorMessage as F } from "../FieldErrorMessage/FieldErrorMessage.js";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Fieldset.js","sources":["../../../../src/components/Common/Fieldset/Fieldset.tsx"],"sourcesContent":["import { useId } from 'react'\nimport classNames from 'classnames'\nimport { FieldDescription } from '../FieldDescription'\nimport { FieldErrorMessage } from '../FieldErrorMessage'\nimport { FieldCaption } from '../FieldCaption'\nimport type { SharedFieldLayoutProps } from '../FieldLayout/FieldLayoutTypes'\nimport styles from './Fieldset.module.scss'\nimport { getDataProps } from '@/helpers/getDataProps'\n\nexport interface FieldsetProps\n extends Omit<SharedFieldLayoutProps, 'label' | 'shouldVisuallyHideLabel'> {\n children: React.ReactNode\n description?: React.ReactNode\n errorMessage?: string\n isRequired?: boolean\n legend: React.ReactNode\n shouldVisuallyHideLegend?: boolean\n className?: string\n}\n\nexport const Fieldset: React.FC<FieldsetProps> = ({\n children,\n description,\n errorMessage,\n isRequired = false,\n legend,\n shouldVisuallyHideLegend = false,\n className,\n ...props\n}: FieldsetProps) => {\n const generatedErrorMessageId = useId()\n const errorMessageId = `error-message-${generatedErrorMessageId}`\n\n return (\n <fieldset\n className={classNames(styles.root, className)}\n aria-describedby={errorMessage ? errorMessageId : undefined}\n {...getDataProps(props)}\n >\n <div\n className={classNames(styles.legendAndDescription, {\n [styles.withVisibleLegend as string]: !shouldVisuallyHideLegend,\n [styles.withDescription as string]: Boolean(description),\n })}\n >\n <FieldCaption\n as=\"legend\"\n isRequired={isRequired}\n isVisuallyHidden={shouldVisuallyHideLegend}\n >\n {legend}\n </FieldCaption>\n <FieldDescription>{description}</FieldDescription>\n </div>\n {children}\n <FieldErrorMessage\n id={errorMessageId}\n className={styles.errorMessage}\n aria-live=\"polite\"\n role=\"alert\"\n >\n {errorMessage}\n </FieldErrorMessage>\n </fieldset>\n )\n}\n"],"names":["Fieldset","children","description","errorMessage","isRequired","legend","shouldVisuallyHideLegend","className","props","errorMessageId","useId","jsxs","classNames","styles","getDataProps","jsx","FieldCaption","FieldDescription","FieldErrorMessage"],"mappings":";;;;;;;;AAoBO,MAAMA,IAAoC,CAAC;AAAA,EAChD,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,QAAAC;AAAA,EACA,0BAAAC,IAA2B;AAAA,EAC3B,WAAAC;AAAA,EACA,GAAGC;AACL,MAAqB;AAEb,QAAAC,IAAiB,iBADSC,EAAM,CACyB;AAG7D,SAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAWC,EAAO,MAAMN,CAAS;AAAA,MAC5C,oBAAkBJ,IAAeM,IAAiB;AAAA,MACjD,GAAGK,EAAaN,CAAK;AAAA,MAEtB,UAAA;AAAA,QAAA,gBAAAG;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWC,EAAWC,EAAO,sBAAsB;AAAA,cACjD,CAACA,EAAO,iBAA2B,GAAG,CAACP;AAAA,cACvC,CAACO,EAAO,eAAyB,GAAG,EAAQX;AAAA,YAAW,CACxD;AAAA,YAED,UAAA;AAAA,cAAA,gBAAAa;AAAA,gBAACC;AAAA,gBAAA;AAAA,kBACC,IAAG;AAAA,kBACH,YAAAZ;AAAA,kBACA,kBAAkBE;AAAA,kBAEjB,UAAAD;AAAA,gBAAA;AAAA,cACH;AAAA,cACA,gBAAAU,EAACE,KAAkB,UAAYf,EAAA,CAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QACjC;AAAA,QACCD;AAAA,QACD,gBAAAc;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,IAAIT;AAAA,YACJ,WAAWI,EAAO;AAAA,YAClB,aAAU;AAAA,YACV,MAAK;AAAA,YAEJ,UAAAV;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EACF;AAEJ;"}
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { Fieldset, type FieldsetProps } from './Fieldset';
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { Flex } from './Flex';
@@ -1,2 +1,3 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { Form } from './Form';
2
3
  export type { FormProps } from './Form';
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { HamburgerMenu } from './HamburgerMenu';
@@ -1,8 +1,8 @@
1
1
  import { jsxs as f, jsx as e } from "react/jsx-runtime";
2
2
  import N from "classnames";
3
3
  import r from "./HorizontalFieldLayout.module.scss.js";
4
- import { getDataProps as b } from "../../../../helpers/getDataProps.js";
5
- import { VisuallyHidden as g } from "../../VisuallyHidden/VisuallyHidden.js";
4
+ import { getDataProps as b } from "../../../helpers/getDataProps.js";
5
+ import { VisuallyHidden as g } from "../VisuallyHidden/VisuallyHidden.js";
6
6
  import { FieldDescription as w } from "../FieldDescription/FieldDescription.js";
7
7
  import { FieldErrorMessage as x } from "../FieldErrorMessage/FieldErrorMessage.js";
8
8
  const M = ({
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HorizontalFieldLayout.js","sources":["../../../../src/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { VisuallyHidden } from '../VisuallyHidden'\nimport { FieldErrorMessage } from '../FieldErrorMessage'\nimport { FieldDescription } from '../FieldDescription'\nimport styles from './HorizontalFieldLayout.module.scss'\nimport type { HorizontalFieldLayoutProps } from './HorizontalFieldLayoutTypes'\nimport { getDataProps } from '@/helpers/getDataProps'\n\nexport const HorizontalFieldLayout: React.FC<HorizontalFieldLayoutProps> = ({\n label,\n description,\n descriptionId,\n errorMessage,\n errorMessageId,\n children,\n htmlFor,\n className,\n shouldVisuallyHideLabel,\n ...props\n}: HorizontalFieldLayoutProps) => {\n const labelContent = (\n <label className={styles.label} htmlFor={htmlFor}>\n {label}\n </label>\n )\n\n const withDescriptionOrErrorMessage = description || errorMessage\n\n return (\n <div\n className={classNames(\n styles.root,\n {\n [styles.withoutVisibleLabel as string]:\n shouldVisuallyHideLabel && withDescriptionOrErrorMessage,\n [styles.withOnlyChildren as string]:\n shouldVisuallyHideLabel && !withDescriptionOrErrorMessage,\n },\n className,\n )}\n {...getDataProps(props)}\n >\n <div className={styles.children}>{children}</div>\n {shouldVisuallyHideLabel ? <VisuallyHidden>{labelContent}</VisuallyHidden> : labelContent}\n <FieldDescription id={descriptionId} className={styles.description}>\n {description}\n </FieldDescription>\n <FieldErrorMessage id={errorMessageId} className={styles.errorMessage}>\n {errorMessage}\n </FieldErrorMessage>\n </div>\n )\n}\n"],"names":["HorizontalFieldLayout","label","description","descriptionId","errorMessage","errorMessageId","children","htmlFor","className","shouldVisuallyHideLabel","props","labelContent","jsx","styles","withDescriptionOrErrorMessage","jsxs","classNames","getDataProps","VisuallyHidden","FieldDescription","FieldErrorMessage"],"mappings":";;;;;;;AAQO,MAAMA,IAA8D,CAAC;AAAA,EAC1E,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,GAAGC;AACL,MAAkC;AAChC,QAAMC,IACH,gBAAAC,EAAA,SAAA,EAAM,WAAWC,EAAO,OAAO,SAAAN,GAC7B,UACHN,GAAA,GAGIa,IAAgCZ,KAAeE;AAGnD,SAAA,gBAAAW;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACTH,EAAO;AAAA,QACP;AAAA,UACE,CAACA,EAAO,mBAA6B,GACnCJ,KAA2BK;AAAA,UAC7B,CAACD,EAAO,gBAA0B,GAChCJ,KAA2B,CAACK;AAAA,QAChC;AAAA,QACAN;AAAA,MACF;AAAA,MACC,GAAGS,EAAaP,CAAK;AAAA,MAEtB,UAAA;AAAA,QAAA,gBAAAE,EAAC,OAAI,EAAA,WAAWC,EAAO,UAAW,UAAAP,GAAS;AAAA,QAC1CG,IAA0B,gBAAAG,EAACM,GAAgB,EAAA,UAAAP,EAAa,CAAA,IAAoBA;AAAA,0BAC5EQ,GAAiB,EAAA,IAAIhB,GAAe,WAAWU,EAAO,aACpD,UACHX,GAAA;AAAA,0BACCkB,GAAkB,EAAA,IAAIf,GAAgB,WAAWQ,EAAO,cACtD,UACHT,EAAA,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
@@ -1 +1,2 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { HorizontalFieldLayout } from './HorizontalFieldLayout';
@@ -1,2 +1,3 @@
1
+ import "./types/i18next.d.ts"
1
2
  export { PaginationControl } from './PaginationControl';
2
3
  export type { PaginationControlProps } from './PaginationControlTypes';
@@ -1,2 +1,3 @@
1
+ import "./types/i18next.d.ts"
1
2
  export * from './ReorderableList';
2
3
  export * from './ReorderableListTypes';
@@ -1,10 +1,16 @@
1
+ import { z } from 'zod';
1
2
  import { UseFormProps } from 'react-hook-form';
2
- import * as v from 'valibot';
3
- export declare const SignatureFormSchema: v.ObjectSchema<{
4
- readonly signature: v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>]>;
5
- readonly confirmSignature: v.LiteralSchema<true, undefined>;
6
- }, undefined>;
7
- export type SignatureFormInputs = v.InferInput<typeof SignatureFormSchema>;
3
+ export declare const SignatureFormSchema: z.ZodObject<{
4
+ signature: z.ZodString;
5
+ confirmSignature: z.ZodLiteral<true>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ signature: string;
8
+ confirmSignature: true;
9
+ }, {
10
+ signature: string;
11
+ confirmSignature: true;
12
+ }>;
13
+ export type SignatureFormInputs = z.infer<typeof SignatureFormSchema>;
8
14
  interface SignatureFormProps {
9
15
  onSubmit: (data: SignatureFormInputs) => void | Promise<void>;
10
16
  children?: React.ReactNode;