@gusto/embedded-react-sdk 0.41.0 → 0.43.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (427) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/dist/assets/icons/house.svg.js +10 -0
  3. package/dist/assets/icons/house.svg.js.map +1 -0
  4. package/dist/assets/icons/search-lg.svg.js +10 -0
  5. package/dist/assets/icons/search-lg.svg.js.map +1 -0
  6. package/dist/components/Common/DataView/DataCards/DataCards.d.ts +3 -1
  7. package/dist/components/Common/DataView/DataCards/DataCards.js +55 -45
  8. package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
  9. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +16 -10
  10. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js.map +1 -1
  11. package/dist/components/Common/DateRangeFilter/DateRangeFilter.js +1 -1
  12. package/dist/components/Common/DateRangeFilter/DateRangeFilter.js.map +1 -1
  13. package/dist/components/Common/EmptyData/EmptyData.d.ts +3 -0
  14. package/dist/components/Common/EmptyData/EmptyData.js +11 -11
  15. package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
  16. package/dist/components/Common/EmptyData/EmptyData.module.scss.js +8 -6
  17. package/dist/components/Common/EmptyData/EmptyData.module.scss.js.map +1 -1
  18. package/dist/components/Common/UI/Box/Box.module.scss.js +4 -4
  19. package/dist/components/Common/UI/ComboBox/ComboBox.d.ts +1 -1
  20. package/dist/components/Common/UI/ComboBox/ComboBox.js +26 -25
  21. package/dist/components/Common/UI/ComboBox/ComboBox.js.map +1 -1
  22. package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +5 -0
  23. package/dist/components/Common/UI/DatePicker/DatePicker.js +4 -4
  24. package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
  25. package/dist/components/Common/UI/Input/InputTypes.d.ts +1 -1
  26. package/dist/components/Common/UI/Input/InputTypes.js.map +1 -1
  27. package/dist/components/Common/UI/Menu/Menu.js +18 -17
  28. package/dist/components/Common/UI/Menu/Menu.js.map +1 -1
  29. package/dist/components/Common/UI/Menu/MenuTypes.d.ts +5 -0
  30. package/dist/components/Common/UI/Menu/MenuTypes.js.map +1 -1
  31. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js +1 -1
  32. package/dist/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.js.map +1 -1
  33. package/dist/components/Common/UI/Select/Select.js +9 -9
  34. package/dist/components/Common/UI/Select/Select.js.map +1 -1
  35. package/dist/components/Common/UI/TextInput/TextInput.js +37 -35
  36. package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
  37. package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +1 -1
  38. package/dist/components/Common/UI/TextInput/TextInputTypes.js.map +1 -1
  39. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +2 -3
  40. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  41. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +2 -3
  42. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  43. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +2 -3
  44. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  45. package/dist/components/Company/AssignSignatory/TitleSelect.js +1 -1
  46. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +6 -6
  47. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +8 -9
  48. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  49. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -8
  50. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  51. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +2 -3
  52. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  53. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.d.ts +0 -1
  54. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js +7 -8
  55. package/dist/components/Company/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  56. package/dist/components/Company/FederalTaxes/Actions.js +5 -6
  57. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  58. package/dist/components/Company/Industry/Actions.js +2 -3
  59. package/dist/components/Company/Industry/Actions.js.map +1 -1
  60. package/dist/components/Company/Industry/Edit.js +4 -5
  61. package/dist/components/Company/Industry/Edit.js.map +1 -1
  62. package/dist/components/Company/Locations/LocationForm/Actions.js +6 -7
  63. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  64. package/dist/components/Company/Locations/LocationForm/Form.d.ts +6 -1
  65. package/dist/components/Company/Locations/LocationForm/Form.js +29 -27
  66. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  67. package/dist/components/Company/Locations/LocationForm/LocationForm.js +59 -55
  68. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  69. package/dist/components/Company/Locations/LocationsList/Actions.js +6 -7
  70. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  71. package/dist/components/Company/Locations/LocationsList/List.js +33 -33
  72. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  73. package/dist/components/Company/Locations/LocationsList/List.module.scss.js +8 -0
  74. package/dist/components/Company/Locations/LocationsList/List.module.scss.js.map +1 -0
  75. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js +11 -15
  76. package/dist/components/Company/OnboardingFlow/OnboardingFlow.js.map +1 -1
  77. package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js +37 -35
  78. package/dist/components/Company/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  79. package/dist/components/Company/PaySchedule/PayScheduleForm.js +87 -99
  80. package/dist/components/Company/PaySchedule/PayScheduleForm.js.map +1 -1
  81. package/dist/components/Company/PaySchedule/PayScheduleForm.module.scss.js +8 -10
  82. package/dist/components/Company/PaySchedule/PayScheduleForm.module.scss.js.map +1 -1
  83. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.d.ts +11 -1
  84. package/dist/components/Company/PaySchedule/shared/usePayScheduleForm/usePayScheduleForm.js.map +1 -1
  85. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +2 -3
  86. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  87. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +2 -3
  88. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  89. package/dist/components/Company/StateTaxes/StateTaxesList/List.js +5 -6
  90. package/dist/components/Company/StateTaxes/StateTaxesList/List.js.map +1 -1
  91. package/dist/components/Contractor/Address/Address.js +6 -6
  92. package/dist/components/Contractor/Address/Address.js.map +1 -1
  93. package/dist/components/Contractor/Address/Form.js +4 -4
  94. package/dist/components/Contractor/Address/Head.js +10 -8
  95. package/dist/components/Contractor/Address/Head.js.map +1 -1
  96. package/dist/components/Contractor/NewHireReport/NewHireReport.js +39 -39
  97. package/dist/components/Contractor/NewHireReport/NewHireReport.js.map +1 -1
  98. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js +13 -16
  99. package/dist/components/Contractor/OnboardingFlow/OnboardingFlow.js.map +1 -1
  100. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js +61 -63
  101. package/dist/components/Contractor/OnboardingFlow/onboardingStateMachine.js.map +1 -1
  102. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js +9 -9
  103. package/dist/components/Contractor/PaymentMethod/BankAccountForm.js.map +1 -1
  104. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js +14 -15
  105. package/dist/components/Contractor/PaymentMethod/PaymentMethod.js.map +1 -1
  106. package/dist/components/Contractor/PaymentMethod/PaymentTypeForm.js +1 -1
  107. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js +11 -11
  108. package/dist/components/Contractor/Payments/PaymentFlow/PaymentFlow.js.map +1 -1
  109. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js +88 -111
  110. package/dist/components/Contractor/Payments/PaymentFlow/paymentStateMachine.js.map +1 -1
  111. package/dist/components/Contractor/Profile/ContractorProfileForm.js +48 -49
  112. package/dist/components/Contractor/Profile/ContractorProfileForm.js.map +1 -1
  113. package/dist/components/Contractor/Submit/SubmitDone.js +14 -12
  114. package/dist/components/Contractor/Submit/SubmitDone.js.map +1 -1
  115. package/dist/components/Employee/Compensation/Actions.js +1 -1
  116. package/dist/components/Employee/Compensation/List.js +22 -23
  117. package/dist/components/Employee/Compensation/List.js.map +1 -1
  118. package/dist/components/Employee/Dashboard/DashboardComponents.d.ts +2 -0
  119. package/dist/components/Employee/Dashboard/DashboardComponents.js +18 -6
  120. package/dist/components/Employee/Dashboard/DashboardComponents.js.map +1 -1
  121. package/dist/components/Employee/Dashboard/dashboardStateMachine.d.ts +2 -0
  122. package/dist/components/Employee/Dashboard/dashboardStateMachine.js +55 -4
  123. package/dist/components/Employee/Dashboard/dashboardStateMachine.js.map +1 -1
  124. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js +26 -26
  125. package/dist/components/Employee/Deductions/DeductionsForm/DeductionsForm.js.map +1 -1
  126. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js +6 -7
  127. package/dist/components/Employee/DocumentSigner/DocumentList/Actions.js.map +1 -1
  128. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.d.ts +0 -33
  129. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js +129 -212
  130. package/dist/components/Employee/DocumentSigner/I9SignatureForm/I9SignatureForm.js.map +1 -1
  131. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +79 -57
  132. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  133. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.d.ts +3 -4
  134. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/fields.js.map +1 -1
  135. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/index.d.ts +2 -2
  136. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.d.ts +0 -1
  137. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.js +33 -49
  138. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/signEmployeeFormSchema.js.map +1 -1
  139. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.d.ts +12 -3
  140. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js +98 -98
  141. package/dist/components/Employee/DocumentSigner/shared/useSignEmployeeForm/useSignEmployeeForm.js.map +1 -1
  142. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeList.js.map +1 -0
  143. package/dist/components/Employee/EmployeeList/management/ManagementEmployeeListView.js.map +1 -0
  144. package/dist/components/Employee/EmployeeList/onboarding/EmployeeList.js.map +1 -0
  145. package/dist/components/Employee/EmployeeList/onboarding/EmployeeListView.js.map +1 -0
  146. package/dist/components/Employee/EmployeeList/shared/useEmployeeList.js.map +1 -0
  147. package/dist/components/Employee/FederalTaxes/Actions.js +6 -7
  148. package/dist/components/Employee/FederalTaxes/Actions.js.map +1 -1
  149. package/dist/components/Employee/FederalTaxes/FederalForm.js +4 -5
  150. package/dist/components/Employee/FederalTaxes/FederalForm.js.map +1 -1
  151. package/dist/components/Employee/HomeAddress/management/HomeAddress.d.ts +6 -0
  152. package/dist/components/Employee/HomeAddress/management/HomeAddress.js +48 -0
  153. package/dist/components/Employee/HomeAddress/management/HomeAddress.js.map +1 -0
  154. package/dist/components/Employee/HomeAddress/management/HomeAddressView.d.ts +18 -0
  155. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js +477 -0
  156. package/dist/components/Employee/HomeAddress/management/HomeAddressView.js.map +1 -0
  157. package/dist/components/Employee/HomeAddress/management/getPendingFutureHomeAddress.d.ts +8 -0
  158. package/dist/components/Employee/HomeAddress/management/getPendingFutureHomeAddress.js +36 -0
  159. package/dist/components/Employee/HomeAddress/management/getPendingFutureHomeAddress.js.map +1 -0
  160. package/dist/components/Employee/HomeAddress/management/getPendingFutureHomeAddress.test.d.ts +1 -0
  161. package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.d.ts +45 -0
  162. package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js +112 -0
  163. package/dist/components/Employee/HomeAddress/management/useHomeAddressManagement.js.map +1 -0
  164. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js +1 -1
  165. package/dist/components/Employee/OnboardingFlow/OnboardingFlowComponents.js.map +1 -1
  166. package/dist/components/Employee/PaymentMethod/Actions.js +5 -6
  167. package/dist/components/Employee/PaymentMethod/Actions.js.map +1 -1
  168. package/dist/components/Employee/PaymentMethod/BankAccountEdit.js +1 -1
  169. package/dist/components/Employee/PaymentMethod/BankAccountsList.js +4 -4
  170. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +1 -1
  171. package/dist/components/Employee/PaymentMethod/Split.js +23 -22
  172. package/dist/components/Employee/PaymentMethod/Split.js.map +1 -1
  173. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +1 -1
  174. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  175. package/dist/components/Employee/Profile/AdminProfile.js +94 -100
  176. package/dist/components/Employee/Profile/AdminProfile.js.map +1 -1
  177. package/dist/components/Employee/Profile/EmployeeProfile.js +63 -65
  178. package/dist/components/Employee/Profile/EmployeeProfile.js.map +1 -1
  179. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js +37 -36
  180. package/dist/components/Employee/Profile/shared/useEmployeeDetailsForm/useEmployeeDetailsForm.js.map +1 -1
  181. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.d.ts +1 -1
  182. package/dist/components/Employee/Profile/shared/useHomeAddressForm/fields.js.map +1 -1
  183. package/dist/components/Employee/Profile/shared/useHomeAddressForm/index.d.ts +2 -0
  184. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useCurrentHomeAddressForm.d.ts +3 -0
  185. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useCurrentHomeAddressForm.js +24 -0
  186. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useCurrentHomeAddressForm.js.map +1 -0
  187. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.d.ts +9 -3
  188. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js +105 -105
  189. package/dist/components/Employee/Profile/shared/useHomeAddressForm/useHomeAddressForm.js.map +1 -1
  190. package/dist/components/Employee/Profile/shared/useWorkAddressForm/index.d.ts +2 -0
  191. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useCurrentWorkAddressForm.d.ts +3 -0
  192. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useCurrentWorkAddressForm.js +24 -0
  193. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useCurrentWorkAddressForm.js.map +1 -0
  194. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.d.ts +10 -4
  195. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js +95 -84
  196. package/dist/components/Employee/Profile/shared/useWorkAddressForm/useWorkAddressForm.js.map +1 -1
  197. package/dist/components/Employee/StateTaxes/Actions.js +7 -8
  198. package/dist/components/Employee/StateTaxes/Actions.js.map +1 -1
  199. package/dist/components/Employee/Taxes/Actions.js +8 -9
  200. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  201. package/dist/components/Employee/Taxes/FederalForm.js +4 -5
  202. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  203. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js +11 -9
  204. package/dist/components/Employee/Terminations/TerminationFlow/TerminationFlow.js.map +1 -1
  205. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js +71 -89
  206. package/dist/components/Employee/Terminations/TerminationFlow/terminationStateMachine.js.map +1 -1
  207. package/dist/components/Employee/WorkAddress/management/WorkAddress.d.ts +6 -0
  208. package/dist/components/Employee/WorkAddress/management/WorkAddress.js +48 -0
  209. package/dist/components/Employee/WorkAddress/management/WorkAddress.js.map +1 -0
  210. package/dist/components/Employee/WorkAddress/management/WorkAddressView.d.ts +16 -0
  211. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js +368 -0
  212. package/dist/components/Employee/WorkAddress/management/WorkAddressView.js.map +1 -0
  213. package/dist/components/Employee/WorkAddress/management/getPendingFutureWorkAddress.d.ts +4 -0
  214. package/dist/components/Employee/WorkAddress/management/getPendingFutureWorkAddress.js +35 -0
  215. package/dist/components/Employee/WorkAddress/management/getPendingFutureWorkAddress.js.map +1 -0
  216. package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.d.ts +45 -0
  217. package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js +143 -0
  218. package/dist/components/Employee/WorkAddress/management/useWorkAddressManagement.js.map +1 -0
  219. package/dist/components/Employee/exports/employeeManagement.d.ts +3 -1
  220. package/dist/components/Employee/exports/employeeManagement.js +12 -10
  221. package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
  222. package/dist/components/Employee/exports/employeeOnboarding.d.ts +1 -1
  223. package/dist/components/Employee/exports/employeeOnboarding.js +1 -1
  224. package/dist/components/Employee/index.d.ts +5 -1
  225. package/dist/components/Employee/index.js +37 -33
  226. package/dist/components/Employee/index.js.map +1 -1
  227. package/dist/components/Flow/Flow.js +23 -51
  228. package/dist/components/Flow/Flow.js.map +1 -1
  229. package/dist/components/Flow/FlowHeader.d.ts +16 -0
  230. package/dist/components/Flow/FlowHeader.js +90 -0
  231. package/dist/components/Flow/FlowHeader.js.map +1 -0
  232. package/dist/components/Flow/useFlow.d.ts +33 -6
  233. package/dist/components/Flow/useFlow.js.map +1 -1
  234. package/dist/components/Payroll/Dismissal/DismissalFlow.js +20 -18
  235. package/dist/components/Payroll/Dismissal/DismissalFlow.js.map +1 -1
  236. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js +10 -10
  237. package/dist/components/Payroll/Dismissal/DismissalFlowComponents.js.map +1 -1
  238. package/dist/components/Payroll/Dismissal/dismissalStateMachine.js +17 -19
  239. package/dist/components/Payroll/Dismissal/dismissalStateMachine.js.map +1 -1
  240. package/dist/components/Payroll/OffCycle/OffCycleFlow.js +13 -11
  241. package/dist/components/Payroll/OffCycle/OffCycleFlow.js.map +1 -1
  242. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js +9 -9
  243. package/dist/components/Payroll/OffCycle/OffCycleFlowComponents.js.map +1 -1
  244. package/dist/components/Payroll/OffCycle/offCycleStateMachine.js +25 -29
  245. package/dist/components/Payroll/OffCycle/offCycleStateMachine.js.map +1 -1
  246. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +0 -1
  247. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
  248. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +6 -7
  249. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  250. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +2 -3
  251. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
  252. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js +43 -42
  253. package/dist/components/Payroll/PayrollExecutionFlow/PayrollExecutionFlow.js.map +1 -1
  254. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js +38 -42
  255. package/dist/components/Payroll/PayrollExecutionFlow/payrollExecutionMachine.js.map +1 -1
  256. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js +18 -17
  257. package/dist/components/Payroll/PayrollFlow/PayrollFlow.js.map +1 -1
  258. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js +69 -78
  259. package/dist/components/Payroll/PayrollFlow/payrollStateMachine.js.map +1 -1
  260. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js +13 -12
  261. package/dist/components/Payroll/PayrollLanding/PayrollLanding.js.map +1 -1
  262. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js +51 -82
  263. package/dist/components/Payroll/PayrollLanding/payrollLandingStateMachine.js.map +1 -1
  264. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js +45 -43
  265. package/dist/components/Payroll/RecoveryCases/RecoveryCasesList/RecoveryCasesList.js.map +1 -1
  266. package/dist/components/Payroll/Transition/TransitionFlow.js +17 -15
  267. package/dist/components/Payroll/Transition/TransitionFlow.js.map +1 -1
  268. package/dist/components/Payroll/Transition/TransitionFlowComponents.js +24 -24
  269. package/dist/components/Payroll/Transition/TransitionFlowComponents.js.map +1 -1
  270. package/dist/components/Payroll/Transition/transitionStateMachine.js +25 -29
  271. package/dist/components/Payroll/Transition/transitionStateMachine.js.map +1 -1
  272. package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js +6 -41
  273. package/dist/components/UNSTABLE_TimeOff/AddEmployeesHoliday/AddEmployeesHoliday.js.map +1 -1
  274. package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.d.ts +1 -0
  275. package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js +12 -40
  276. package/dist/components/UNSTABLE_TimeOff/AddEmployeesToPolicy/AddEmployeesToPolicy.js.map +1 -1
  277. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.js +61 -41
  278. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.js.map +1 -1
  279. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.module.scss.js +6 -8
  280. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettings.module.scss.js.map +1 -1
  281. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.js +32 -44
  282. package/dist/components/UNSTABLE_TimeOff/PolicySettings/PolicySettingsPresentation.js.map +1 -1
  283. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js +36 -29
  284. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/TimeOffFlowComponents.js.map +1 -1
  285. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js +50 -23
  286. package/dist/components/UNSTABLE_TimeOff/TimeOffFlow/timeOffStateMachine.js.map +1 -1
  287. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js +26 -25
  288. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationForm.js.map +1 -1
  289. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js +52 -38
  290. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/PolicyConfigurationForm/PolicyConfigurationFormPresentation.js.map +1 -1
  291. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployees.d.ts +2 -0
  292. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.d.ts +6 -0
  293. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js +66 -0
  294. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesHoliday.js.map +1 -0
  295. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.d.ts +2 -0
  296. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js +82 -0
  297. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentation.js.map +1 -0
  298. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesPresentationTypes.d.ts +24 -0
  299. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.d.ts +7 -0
  300. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js +70 -0
  301. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTimeOff.js.map +1 -0
  302. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/SelectEmployeesTypes.d.ts +24 -0
  303. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.d.ts +11 -0
  304. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js +56 -0
  305. package/dist/components/UNSTABLE_TimeOff/TimeOffManagement/SelectEmployees/useSelectEmployeesData.js.map +1 -0
  306. package/dist/components/UNSTABLE_TimeOff/index.d.ts +2 -4
  307. package/dist/components/UNSTABLE_TimeOff/index.js +19 -21
  308. package/dist/components/UNSTABLE_TimeOff/index.js.map +1 -1
  309. package/dist/components/UNSTABLE_TimeOff/shared/EmployeeTable/EmployeeTable.js +90 -0
  310. package/dist/components/UNSTABLE_TimeOff/shared/EmployeeTable/EmployeeTable.js.map +1 -0
  311. package/dist/components/UNSTABLE_TimeOff/shared/EmployeeTable/EmployeeTable.module.scss.js +10 -0
  312. package/dist/components/UNSTABLE_TimeOff/shared/EmployeeTable/EmployeeTable.module.scss.js.map +1 -0
  313. package/dist/components/UNSTABLE_TimeOff/shared/EmployeeTable/EmployeeTableTypes.d.ts +1 -0
  314. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +1 -0
  315. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +31 -31
  316. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  317. package/dist/contexts/ThemeProvider/ThemeProvider.d.ts +8 -0
  318. package/dist/contexts/ThemeProvider/ThemeProvider.js +26 -21
  319. package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
  320. package/dist/contexts/ThemeProvider/useTheme.d.ts +1 -1
  321. package/dist/contexts/ThemeProvider/useTheme.js.map +1 -1
  322. package/dist/helpers/breadcrumbHelpers.d.ts +35 -22
  323. package/dist/helpers/breadcrumbHelpers.js +45 -35
  324. package/dist/helpers/breadcrumbHelpers.js.map +1 -1
  325. package/dist/helpers/dateFormatting.d.ts +12 -0
  326. package/dist/helpers/dateFormatting.js +72 -65
  327. package/dist/helpers/dateFormatting.js.map +1 -1
  328. package/dist/helpers/formattedStrings.d.ts +2 -0
  329. package/dist/helpers/formattedStrings.js +30 -27
  330. package/dist/helpers/formattedStrings.js.map +1 -1
  331. package/dist/i18n/I18n.js +131 -35
  332. package/dist/i18n/I18n.js.map +1 -1
  333. package/dist/i18n/en/Company.Locations.json.js +43 -39
  334. package/dist/i18n/en/Company.Locations.json.js.map +1 -1
  335. package/dist/i18n/en/Company.TimeOff.CreateTimeOffPolicy.json.js +5 -5
  336. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js +22 -0
  337. package/dist/i18n/en/Company.TimeOff.SelectEmployees.json.js.map +1 -0
  338. package/dist/i18n/en/Employee.HomeAddress.Management.json.js +60 -0
  339. package/dist/i18n/en/Employee.HomeAddress.Management.json.js.map +1 -0
  340. package/dist/i18n/en/Employee.HomeAddress.json.js +22 -20
  341. package/dist/i18n/en/Employee.HomeAddress.json.js.map +1 -1
  342. package/dist/i18n/en/Employee.I9SignatureForm.json.js +79 -75
  343. package/dist/i18n/en/Employee.I9SignatureForm.json.js.map +1 -1
  344. package/dist/i18n/en/Employee.PaymentMethod.json.js +13 -13
  345. package/dist/i18n/en/Employee.WorkAddress.Management.json.js +62 -0
  346. package/dist/i18n/en/Employee.WorkAddress.Management.json.js.map +1 -0
  347. package/dist/i18n/en/Payroll.RecoveryCasesList.json.js +14 -10
  348. package/dist/i18n/en/Payroll.RecoveryCasesList.json.js.map +1 -1
  349. package/dist/i18n/en/common.json.d.ts +1 -0
  350. package/dist/i18n/en/common.json.js +28 -26
  351. package/dist/i18n/en/common.json.js.map +1 -1
  352. package/dist/index.d.ts +5 -5
  353. package/dist/index.js +72 -68
  354. package/dist/index.js.map +1 -1
  355. package/dist/partner-hook-utils/form/fields/CheckboxHookField.js +13 -14
  356. package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -1
  357. package/dist/partner-hook-utils/form/fields/DatePickerHookField.d.ts +4 -2
  358. package/dist/partner-hook-utils/form/fields/DatePickerHookField.js +19 -13
  359. package/dist/partner-hook-utils/form/fields/DatePickerHookField.js.map +1 -1
  360. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +16 -17
  361. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
  362. package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js +10 -11
  363. package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -1
  364. package/dist/partner-hook-utils/form/fields/SelectHookField.d.ts +5 -2
  365. package/dist/partner-hook-utils/form/fields/SelectHookField.js +21 -18
  366. package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
  367. package/dist/partner-hook-utils/form/fields/SwitchHookField.js +12 -13
  368. package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -1
  369. package/dist/partner-hook-utils/form/fields/TextInputHookField.js +14 -15
  370. package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -1
  371. package/dist/partner-hook-utils/form/withOptions.d.ts +1 -1
  372. package/dist/partner-hook-utils/form/withOptions.js.map +1 -1
  373. package/dist/partner-hook-utils/types.d.ts +1 -1
  374. package/dist/shared/constants.d.ts +6 -0
  375. package/dist/shared/constants.js +17 -14
  376. package/dist/shared/constants.js.map +1 -1
  377. package/dist/style.css +1 -1
  378. package/dist/types/i18next.d.ts +109 -1
  379. package/docs/reference/endpoint-inventory.json +241 -38
  380. package/package.json +11 -11
  381. package/dist/_virtual/dynamic-import-helper.js +0 -17
  382. package/dist/_virtual/dynamic-import-helper.js.map +0 -1
  383. package/dist/components/Common/SignatureForm/SignatureForm.d.ts +0 -14
  384. package/dist/components/Common/SignatureForm/SignatureForm.js +0 -28
  385. package/dist/components/Common/SignatureForm/SignatureForm.js.map +0 -1
  386. package/dist/components/Common/SignatureForm/SignatureForm.module.scss.js +0 -10
  387. package/dist/components/Common/SignatureForm/SignatureForm.module.scss.js.map +0 -1
  388. package/dist/components/Common/SignatureForm/SignatureFormActions.d.ts +0 -8
  389. package/dist/components/Common/SignatureForm/SignatureFormActions.js +0 -22
  390. package/dist/components/Common/SignatureForm/SignatureFormActions.js.map +0 -1
  391. package/dist/components/Common/SignatureForm/SignatureFormFields.d.ts +0 -9
  392. package/dist/components/Common/SignatureForm/SignatureFormFields.js +0 -39
  393. package/dist/components/Common/SignatureForm/SignatureFormFields.js.map +0 -1
  394. package/dist/components/Common/SignatureForm/index.d.ts +0 -5
  395. package/dist/components/Contractor/Profile/ContractorProfileForm.module.scss.js +0 -8
  396. package/dist/components/Contractor/Profile/ContractorProfileForm.module.scss.js.map +0 -1
  397. package/dist/components/Employee/DocumentSigner/SignatureForm/Actions.d.ts +0 -1
  398. package/dist/components/Employee/DocumentSigner/SignatureForm/Actions.js +0 -20
  399. package/dist/components/Employee/DocumentSigner/SignatureForm/Actions.js.map +0 -1
  400. package/dist/components/Employee/DocumentSigner/SignatureForm/Form.d.ts +0 -1
  401. package/dist/components/Employee/DocumentSigner/SignatureForm/Form.js +0 -20
  402. package/dist/components/Employee/DocumentSigner/SignatureForm/Form.js.map +0 -1
  403. package/dist/components/Employee/DocumentSigner/SignatureForm/Head.d.ts +0 -1
  404. package/dist/components/Employee/DocumentSigner/SignatureForm/Head.js +0 -35
  405. package/dist/components/Employee/DocumentSigner/SignatureForm/Head.js.map +0 -1
  406. package/dist/components/Employee/DocumentSigner/SignatureForm/Preview.d.ts +0 -1
  407. package/dist/components/Employee/DocumentSigner/SignatureForm/Preview.js +0 -20
  408. package/dist/components/Employee/DocumentSigner/SignatureForm/Preview.js.map +0 -1
  409. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.d.ts +0 -9
  410. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js +0 -21
  411. package/dist/components/Employee/DocumentSigner/SignatureForm/useSignatureForm.js.map +0 -1
  412. package/dist/components/Employee/employee-list/management/ManagementEmployeeList.js.map +0 -1
  413. package/dist/components/Employee/employee-list/management/ManagementEmployeeListView.js.map +0 -1
  414. package/dist/components/Employee/employee-list/onboarding/EmployeeList.js.map +0 -1
  415. package/dist/components/Employee/employee-list/onboarding/EmployeeListView.js.map +0 -1
  416. package/dist/components/Employee/employee-list/shared/useEmployeeList.js.map +0 -1
  417. /package/dist/components/Employee/{employee-list → EmployeeList}/management/ManagementEmployeeList.d.ts +0 -0
  418. /package/dist/components/Employee/{employee-list → EmployeeList}/management/ManagementEmployeeList.js +0 -0
  419. /package/dist/components/Employee/{employee-list → EmployeeList}/management/ManagementEmployeeListView.d.ts +0 -0
  420. /package/dist/components/Employee/{employee-list → EmployeeList}/management/ManagementEmployeeListView.js +0 -0
  421. /package/dist/components/Employee/{employee-list → EmployeeList}/onboarding/EmployeeList.d.ts +0 -0
  422. /package/dist/components/Employee/{employee-list → EmployeeList}/onboarding/EmployeeList.js +0 -0
  423. /package/dist/components/Employee/{employee-list → EmployeeList}/onboarding/EmployeeListView.d.ts +0 -0
  424. /package/dist/components/Employee/{employee-list → EmployeeList}/onboarding/EmployeeListView.js +0 -0
  425. /package/dist/components/Employee/{employee-list → EmployeeList}/shared/index.d.ts +0 -0
  426. /package/dist/components/Employee/{employee-list → EmployeeList}/shared/useEmployeeList.d.ts +0 -0
  427. /package/dist/components/Employee/{employee-list → EmployeeList}/shared/useEmployeeList.js +0 -0
@@ -1 +1 @@
1
- {"version":3,"file":"ComboBox.js","sources":["../../../../../src/components/Common/UI/ComboBox/ComboBox.tsx"],"sourcesContent":["import type { Key } from 'react-aria-components'\nimport {\n ComboBox as AriaComboBox,\n Button,\n Input,\n ListBox,\n ListBoxItem,\n ListLayout,\n Popover,\n Virtualizer,\n} from 'react-aria-components'\nimport { useTranslation } from 'react-i18next'\nimport { useMemo } from 'react'\nimport classNames from 'classnames'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './ComboBox.module.scss'\nimport type { ComboBoxProps } from './ComboBoxTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport { useTheme } from '@/contexts/ThemeProvider'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\n\nexport const ComboBox = ({\n allowsCustomValue,\n className,\n description,\n errorMessage,\n id,\n isDisabled,\n isInvalid,\n isRequired,\n label,\n onChange,\n onBlur,\n options,\n placeholder,\n value,\n inputRef,\n shouldVisuallyHideLabel,\n name,\n ...props\n}: ComboBoxProps) => {\n const { t } = useTranslation()\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n const { container } = useTheme()\n\n const items = useMemo(() => {\n return options.map(option => ({ name: option.label, id: option.value }))\n }, [options])\n\n return (\n <FieldLayout\n label={label}\n htmlFor={inputId}\n errorMessage={errorMessage}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n isRequired={isRequired}\n description={description}\n shouldVisuallyHideLabel={shouldVisuallyHideLabel}\n className={classNames(styles.root, className)}\n withErrorIcon={false}\n >\n <AriaComboBox\n aria-label={label}\n aria-describedby={ariaDescribedBy}\n className={'react-aria-ComboBox-root'}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n menuTrigger=\"focus\"\n allowsCustomValue={allowsCustomValue}\n {...(allowsCustomValue\n ? {\n inputValue: value ?? '',\n onInputChange: (inputVal: string) => onChange?.(inputVal),\n }\n : {\n selectedKey: value ? (value as Key) : null,\n onSelectionChange: (key: Key | null) => {\n if (key) onChange?.(key.toString())\n },\n })}\n id={inputId}\n name={name}\n >\n <Input ref={inputRef} placeholder={placeholder} onBlur={onBlur} {...props} />\n <Button>\n <div aria-hidden=\"true\" className={styles.icons}>\n {isInvalid && <AlertCircle fontSize={16} />}\n <CaretDown title={t('icons.selectArrow')} />\n </div>\n </Button>\n\n <Popover\n className={classNames(styles.popover, 'react-aria-Popover')}\n UNSTABLE_portalContainer={container.current}\n maxHeight={320}\n >\n <Virtualizer layout={ListLayout}>\n <ListBox items={items}>\n {item => <ListBoxItem key={item.id}>{item.name}</ListBoxItem>}\n </ListBox>\n </Virtualizer>\n </Popover>\n </AriaComboBox>\n </FieldLayout>\n )\n}\n"],"names":["ComboBox","allowsCustomValue","className","description","errorMessage","id","isDisabled","isInvalid","isRequired","label","onChange","onBlur","options","placeholder","value","inputRef","shouldVisuallyHideLabel","name","props","t","useTranslation","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","container","useTheme","items","useMemo","option","jsx","FieldLayout","classNames","styles","jsxs","AriaComboBox","inputVal","key","Input","Button","AlertCircle","CaretDown","Popover","Virtualizer","ListLayout","ListBox","item","ListBoxItem"],"mappings":";;;;;;;;;;;;AAsBO,MAAMA,KAAW,CAAC;AAAA,EACvB,mBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,IAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,MAAAC;AAAA,EACA,GAAGC;AACL,MAAqB;AACnB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACR,EAAE,SAAAC,GAAS,gBAAAC,GAAgB,eAAAC,GAAe,iBAAAC,EA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,gBAAAwB,EAACU,GAAA,EAAY,UAAU,GAAA,CAAI;AAAA,cACzC,gBAAAV,EAACW,GAAA,EAAU,OAAOvB,EAAE,mBAAmB,EAAA,CAAG;AAAA,YAAA,EAAA,CAC5C,EAAA,CACF;AAAA,YAEA,gBAAAY;AAAA,cAACY;AAAA,cAAA;AAAA,gBACC,WAAWV,EAAWC,EAAO,SAAS,oBAAoB;AAAA,gBAC1D,0BAA0BR,EAAU;AAAA,gBACpC,WAAW;AAAA,gBAEX,UAAA,gBAAAK,EAACa,GAAA,EAAY,QAAQC,GACnB,4BAACC,GAAA,EAAQ,OAAAlB,GACN,UAAA,CAAAmB,MAAQ,gBAAAhB,EAACiB,KAA2B,UAAAD,EAAK,KAAA,GAAfA,EAAK,EAAe,GACjD,EAAA,CACF;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"ComboBox.js","sources":["../../../../../src/components/Common/UI/ComboBox/ComboBox.tsx"],"sourcesContent":["import type { Key } from 'react-aria-components'\nimport {\n ComboBox as AriaComboBox,\n Button,\n Input,\n ListBox,\n ListBoxItem,\n ListLayout,\n Popover,\n Virtualizer,\n} from 'react-aria-components'\nimport { useTranslation } from 'react-i18next'\nimport { useMemo } from 'react'\nimport classNames from 'classnames'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './ComboBox.module.scss'\nimport type { ComboBoxProps } from './ComboBoxTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport { useTheme } from '@/contexts/ThemeProvider'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\n\nexport const ComboBox = ({\n allowsCustomValue,\n className,\n description,\n errorMessage,\n id,\n isDisabled,\n isInvalid,\n isRequired,\n label,\n onChange,\n onBlur,\n options,\n placeholder,\n value,\n inputRef,\n shouldVisuallyHideLabel,\n name,\n portalContainer,\n ...props\n}: ComboBoxProps) => {\n const { t } = useTranslation()\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n const { container } = useTheme()\n\n const items = useMemo(() => {\n return options.map(option => ({ name: option.label, id: option.value }))\n }, [options])\n\n return (\n <FieldLayout\n label={label}\n htmlFor={inputId}\n errorMessage={errorMessage}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n isRequired={isRequired}\n description={description}\n shouldVisuallyHideLabel={shouldVisuallyHideLabel}\n className={classNames(styles.root, className)}\n withErrorIcon={false}\n >\n <AriaComboBox\n aria-label={label}\n aria-describedby={ariaDescribedBy}\n className={'react-aria-ComboBox-root'}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n menuTrigger=\"focus\"\n allowsCustomValue={allowsCustomValue}\n {...(allowsCustomValue\n ? {\n inputValue: value ?? '',\n onInputChange: (inputVal: string) => onChange?.(inputVal),\n }\n : {\n selectedKey: value ? (value as Key) : null,\n onSelectionChange: (key: Key | null) => {\n if (key) onChange?.(key.toString())\n },\n })}\n id={inputId}\n name={name}\n >\n <Input ref={inputRef} placeholder={placeholder} onBlur={onBlur} {...props} />\n <Button>\n <div aria-hidden=\"true\" className={styles.icons}>\n {isInvalid && <AlertCircle fontSize={16} />}\n <CaretDown title={t('icons.selectArrow')} />\n </div>\n </Button>\n\n <Popover\n className={classNames(styles.popover, 'react-aria-Popover')}\n UNSTABLE_portalContainer={portalContainer ?? container.current ?? undefined}\n maxHeight={320}\n >\n <Virtualizer layout={ListLayout}>\n <ListBox items={items}>\n {item => <ListBoxItem key={item.id}>{item.name}</ListBoxItem>}\n </ListBox>\n </Virtualizer>\n </Popover>\n </AriaComboBox>\n </FieldLayout>\n )\n}\n"],"names":["ComboBox","allowsCustomValue","className","description","errorMessage","id","isDisabled","isInvalid","isRequired","label","onChange","onBlur","options","placeholder","value","inputRef","shouldVisuallyHideLabel","name","portalContainer","props","t","useTranslation","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","container","useTheme","items","useMemo","option","jsx","FieldLayout","classNames","styles","jsxs","AriaComboBox","inputVal","key","Input","Button","AlertCircle","CaretDown","Popover","Virtualizer","ListLayout","ListBox","item","ListBoxItem"],"mappings":";;;;;;;;;;;;AAsBO,MAAMA,KAAW,CAAC;AAAA,EACvB,mBAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,IAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,MAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,GAAGC;AACL,MAAqB;AACnB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACR,EAAE,SAAAC,GAAS,gBAAAC,GAAgB,eAAAC,GAAe,iBAAAC,EAAA,IAAoBC,EAAY;AAAA,IAC9E,SAASrB;AAAA,IACT,cAAAD;AAAA,IACA,aAAAD;AAAA,EAAA,CACD,GACK,EAAE,WAAAwB,EAAA,IAAcC,EAAA,GAEhBC,IAAQC,EAAQ,MACblB,EAAQ,IAAI,CAAAmB,OAAW,EAAE,MAAMA,EAAO,OAAO,IAAIA,EAAO,MAAA,EAAQ,GACtE,CAACnB,CAAO,CAAC;AAEZ,SACE,gBAAAoB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAxB;AAAA,MACA,SAASa;AAAA,MACT,cAAAlB;AAAA,MACA,gBAAAmB;AAAA,MACA,eAAAC;AAAA,MACA,YAAAhB;AAAA,MACA,aAAAL;AAAA,MACA,yBAAAa;AAAA,MACA,WAAWkB,EAAWC,EAAO,MAAMjC,CAAS;AAAA,MAC5C,eAAe;AAAA,MAEf,UAAA,gBAAAkC;AAAA,QAACC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AA;AAAA,IACF;AAAA,EAAA;AAGN;"}
@@ -48,4 +48,9 @@ export interface ComboBoxProps extends SharedFieldLayoutProps, Pick<InputHTMLAtt
48
48
  * The options list becomes a suggestion helper rather than a strict constraint.
49
49
  */
50
50
  allowsCustomValue?: boolean;
51
+ /**
52
+ * Element to use as the portal container for the dropdown popover.
53
+ * Overrides the default SDK root container from context.
54
+ */
55
+ portalContainer?: HTMLElement;
51
56
  }
@@ -55,9 +55,9 @@ const Cr = ({
55
55
  inputId: y,
56
56
  errorMessage: l,
57
57
  description: o
58
- }), { container: B } = X(), D = p ? or(p) : "", L = D ? T(D) : null, M = f ? C(f) : void 0, E = h ? C(h) : void 0, G = u ? (e) => {
59
- const v = N(e);
60
- return v ? u(v) : !1;
58
+ }), { container: B } = X(), v = p ? or(p) : "", L = v ? T(v) : null, M = f ? C(f) : void 0, E = h ? C(h) : void 0, G = u ? (e) => {
59
+ const D = N(e);
60
+ return D ? u(D) : !1;
61
61
  } : void 0, U = (e) => {
62
62
  m && m(N(e));
63
63
  };
@@ -99,7 +99,7 @@ const Cr = ({
99
99
  Y,
100
100
  {
101
101
  className: S(i.popover, "react-aria-Popover"),
102
- UNSTABLE_portalContainer: w || B.current,
102
+ UNSTABLE_portalContainer: w ?? B.current ?? void 0,
103
103
  children: /* @__PURE__ */ r(_, { children: /* @__PURE__ */ n($, { children: [
104
104
  /* @__PURE__ */ n("header", { children: [
105
105
  /* @__PURE__ */ r(c, { slot: "previous", children: /* @__PURE__ */ r(tr, { title: a("icons.previousMonth") }) }),
@@ -1 +1 @@
1
- {"version":3,"file":"DatePicker.js","sources":["../../../../../src/components/Common/UI/DatePicker/DatePicker.tsx"],"sourcesContent":["import {\n DatePicker as AriaDatePicker,\n Button,\n Calendar,\n CalendarCell,\n CalendarGrid,\n DateInput,\n DateSegment,\n Dialog,\n Group,\n Heading,\n Popover,\n type DateValue,\n} from 'react-aria-components'\nimport { useTranslation } from 'react-i18next'\nimport classNames from 'classnames'\nimport { parseDate, type CalendarDate } from '@internationalized/date'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './DatePicker.module.scss'\nimport type { DatePickerProps } from './DatePickerTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport { useTheme } from '@/contexts/ThemeProvider'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\nimport CaretRight from '@/assets/icons/caret-right.svg?react'\nimport CaretLeft from '@/assets/icons/caret-left.svg?react'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport { formatDateToStringDate } from '@/helpers/dateFormatting'\n\nfunction dateToCalendarDate(date: Date): CalendarDate | undefined {\n if (!(date instanceof Date) || isNaN(date.getTime())) {\n return undefined\n }\n\n // Use local date parts to avoid UTC timezone shift from toISOString()\n const dateString = [\n String(date.getFullYear()).padStart(4, '0'),\n String(date.getMonth() + 1).padStart(2, '0'),\n String(date.getDate()).padStart(2, '0'),\n ].join('-')\n\n return parseDate(dateString)\n}\n\nfunction calendarDateValueToDate(dateValue: DateValue | null): Date | null {\n if (!dateValue) return null\n\n const date = new Date(\n dateValue.year,\n dateValue.month - 1, // DateValue months are 1-indexed\n dateValue.day,\n )\n\n return date\n}\n\nexport const DatePicker = ({\n className,\n description,\n errorMessage,\n id,\n inputRef,\n isDisabled,\n isInvalid,\n isRequired,\n label,\n onChange,\n onBlur,\n value,\n portalContainer,\n minDate,\n maxDate,\n isDateDisabled,\n ...props\n}: DatePickerProps) => {\n const { t } = useTranslation()\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n const { container } = useTheme()\n\n // Convert JavaScript Date to DateValue for internal use\n // Format the date as YYYY-MM-DD for parseDate\n const formattedDate = value ? formatDateToStringDate(value) : ''\n const internalValue = formattedDate ? parseDate(formattedDate) : null\n\n // Convert date constraint props to react-aria DateValue format\n const minValue = minDate ? dateToCalendarDate(minDate) : undefined\n const maxValue = maxDate ? dateToCalendarDate(maxDate) : undefined\n const isDateUnavailable = isDateDisabled\n ? (dateValue: DateValue) => {\n const jsDate = calendarDateValueToDate(dateValue)\n return jsDate ? isDateDisabled(jsDate) : false\n }\n : undefined\n\n // Handle internal onChange to convert DateValue back to Date\n const handleChange = (dateValue: DateValue | null) => {\n if (onChange) {\n onChange(calendarDateValueToDate(dateValue))\n }\n }\n\n return (\n <FieldLayout\n label={label}\n htmlFor={inputId}\n errorMessage={errorMessage}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n isRequired={isRequired}\n description={description}\n className={classNames(styles.root, className)}\n withErrorIcon={false}\n >\n <div className={styles.container}>\n <AriaDatePicker\n aria-label={label}\n aria-describedby={ariaDescribedBy}\n id={inputId}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n value={internalValue}\n onChange={handleChange}\n minValue={minValue}\n maxValue={maxValue}\n isDateUnavailable={isDateUnavailable}\n {...props}\n >\n <Group>\n <DateInput ref={inputRef}>{segment => <DateSegment segment={segment} />}</DateInput>\n\n <div className={styles.icons}>\n {isInvalid && <AlertCircle aria-hidden=\"true\" fontSize={16} />}\n <Button onBlur={onBlur}>\n <CaretDown title={t('icons.calendarArrow')} />\n </Button>\n </div>\n </Group>\n <Popover\n className={classNames(styles.popover, 'react-aria-Popover')}\n UNSTABLE_portalContainer={portalContainer || container.current}\n >\n <Dialog>\n <Calendar>\n <header>\n <Button slot=\"previous\">\n <CaretLeft title={t('icons.previousMonth')} />\n </Button>\n <Heading />\n <Button slot=\"next\">\n <CaretRight title={t('icons.nextMonth')} />\n </Button>\n </header>\n <CalendarGrid>{date => <CalendarCell date={date} />}</CalendarGrid>\n </Calendar>\n </Dialog>\n </Popover>\n </AriaDatePicker>\n </div>\n </FieldLayout>\n )\n}\n"],"names":["dateToCalendarDate","date","dateString","parseDate","calendarDateValueToDate","dateValue","DatePicker","className","description","errorMessage","id","inputRef","isDisabled","isInvalid","isRequired","label","onChange","onBlur","value","portalContainer","minDate","maxDate","isDateDisabled","props","t","useTranslation","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","container","useTheme","formattedDate","formatDateToStringDate","internalValue","minValue","maxValue","isDateUnavailable","jsDate","handleChange","jsx","FieldLayout","classNames","styles","jsxs","AriaDatePicker","Group","DateInput","DateSegment","segment","AlertCircle","Button","CaretDown","Popover","Dialog","Calendar","CaretLeft","Heading","CaretRight","CalendarGrid","CalendarCell"],"mappings":";;;;;;;;;;;;;;;;AA4BA,SAASA,EAAmBC,GAAsC;AAChE,MAAI,EAAEA,aAAgB,SAAS,MAAMA,EAAK,QAAA,CAAS;AACjD;AAIF,QAAMC,IAAa;AAAA,IACjB,OAAOD,EAAK,YAAA,CAAa,EAAE,SAAS,GAAG,GAAG;AAAA,IAC1C,OAAOA,EAAK,SAAA,IAAa,CAAC,EAAE,SAAS,GAAG,GAAG;AAAA,IAC3C,OAAOA,EAAK,QAAA,CAAS,EAAE,SAAS,GAAG,GAAG;AAAA,EAAA,EACtC,KAAK,GAAG;AAEV,SAAOE,EAAUD,CAAU;AAC7B;AAEA,SAASE,EAAwBC,GAA0C;AACzE,SAAKA,IAEQ,IAAI;AAAA,IACfA,EAAU;AAAA,IACVA,EAAU,QAAQ;AAAA;AAAA,IAClBA,EAAU;AAAA,EAAA,IALW;AASzB;AAEO,MAAMC,KAAa,CAAC;AAAA,EACzB,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,IAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,GAAGC;AACL,MAAuB;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACR,EAAE,SAAAC,GAAS,gBAAAC,GAAgB,eAAAC,GAAe,iBAAAC,EAAA,IAAo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,SAAAC,GAAkB,EAAA,CAAG;AAAA,cAExE,gBAAAL,EAAC,OAAA,EAAI,WAAWD,EAAO,OACpB,UAAA;AAAA,gBAAA/B,KAAa,gBAAA4B,EAACU,IAAA,EAAY,eAAY,QAAO,UAAU,IAAI;AAAA,gBAC5D,gBAAAV,EAACW,KAAO,QAAAnC,GACN,UAAA,gBAAAwB,EAACY,KAAU,OAAO7B,EAAE,qBAAqB,EAAA,CAAG,EAAA,CAC9C;AAAA,cAAA,EAAA,CACF;AAAA,YAAA,GACF;AAAA,YACA,gBAAAiB;AAAA,cAACa;AAAA,cAAA;AAAA,gBACC,WAAWX,EAAWC,EAAO,SAAS,oBAAoB;AAAA,gBAC1D,0BAA0BzB,KAAmBY,EAAU;AAAA,gBAEvD,UAAA,gBAAAU,EAACc,GAAA,EACC,UAAA,gBAAAV,EAACW,GAAA,EACC,UAAA;AAAA,kBAAA,gBAAAX,EAAC,UAAA,EACC,UAAA;AAAA,oBAAA,gBAAAJ,EAACW,GAAA,EAAO,MAAK,YACX,UAAA,gBAAAX,EAACgB,MAAU,OAAOjC,EAAE,qBAAqB,EAAA,CAAG,EAAA,CAC9C;AAAA,sCACCkC,GAAA,EAAQ;AAAA,oBACT,gBAAAjB,EAACW,GAAA,EAAO,MAAK,QACX,UAAA,gBAAAX,EAACkB,MAAW,OAAOnC,EAAE,iBAAiB,EAAA,CAAG,EAAA,CAC3C;AAAA,kBAAA,GACF;AAAA,oCACCoC,GAAA,EAAc,UAAA,CAAA3D,MAAQ,gBAAAwC,EAACoB,GAAA,EAAa,MAAA5D,GAAY,EAAA,CAAG;AAAA,gBAAA,EAAA,CACtD,EAAA,CACF;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA,EACF,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"DatePicker.js","sources":["../../../../../src/components/Common/UI/DatePicker/DatePicker.tsx"],"sourcesContent":["import {\n DatePicker as AriaDatePicker,\n Button,\n Calendar,\n CalendarCell,\n CalendarGrid,\n DateInput,\n DateSegment,\n Dialog,\n Group,\n Heading,\n Popover,\n type DateValue,\n} from 'react-aria-components'\nimport { useTranslation } from 'react-i18next'\nimport classNames from 'classnames'\nimport { parseDate, type CalendarDate } from '@internationalized/date'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './DatePicker.module.scss'\nimport type { DatePickerProps } from './DatePickerTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport { useTheme } from '@/contexts/ThemeProvider'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\nimport CaretRight from '@/assets/icons/caret-right.svg?react'\nimport CaretLeft from '@/assets/icons/caret-left.svg?react'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport { formatDateToStringDate } from '@/helpers/dateFormatting'\n\nfunction dateToCalendarDate(date: Date): CalendarDate | undefined {\n if (!(date instanceof Date) || isNaN(date.getTime())) {\n return undefined\n }\n\n // Use local date parts to avoid UTC timezone shift from toISOString()\n const dateString = [\n String(date.getFullYear()).padStart(4, '0'),\n String(date.getMonth() + 1).padStart(2, '0'),\n String(date.getDate()).padStart(2, '0'),\n ].join('-')\n\n return parseDate(dateString)\n}\n\nfunction calendarDateValueToDate(dateValue: DateValue | null): Date | null {\n if (!dateValue) return null\n\n const date = new Date(\n dateValue.year,\n dateValue.month - 1, // DateValue months are 1-indexed\n dateValue.day,\n )\n\n return date\n}\n\nexport const DatePicker = ({\n className,\n description,\n errorMessage,\n id,\n inputRef,\n isDisabled,\n isInvalid,\n isRequired,\n label,\n onChange,\n onBlur,\n value,\n portalContainer,\n minDate,\n maxDate,\n isDateDisabled,\n ...props\n}: DatePickerProps) => {\n const { t } = useTranslation()\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n const { container } = useTheme()\n\n // Convert JavaScript Date to DateValue for internal use\n // Format the date as YYYY-MM-DD for parseDate\n const formattedDate = value ? formatDateToStringDate(value) : ''\n const internalValue = formattedDate ? parseDate(formattedDate) : null\n\n // Convert date constraint props to react-aria DateValue format\n const minValue = minDate ? dateToCalendarDate(minDate) : undefined\n const maxValue = maxDate ? dateToCalendarDate(maxDate) : undefined\n const isDateUnavailable = isDateDisabled\n ? (dateValue: DateValue) => {\n const jsDate = calendarDateValueToDate(dateValue)\n return jsDate ? isDateDisabled(jsDate) : false\n }\n : undefined\n\n // Handle internal onChange to convert DateValue back to Date\n const handleChange = (dateValue: DateValue | null) => {\n if (onChange) {\n onChange(calendarDateValueToDate(dateValue))\n }\n }\n\n return (\n <FieldLayout\n label={label}\n htmlFor={inputId}\n errorMessage={errorMessage}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n isRequired={isRequired}\n description={description}\n className={classNames(styles.root, className)}\n withErrorIcon={false}\n >\n <div className={styles.container}>\n <AriaDatePicker\n aria-label={label}\n aria-describedby={ariaDescribedBy}\n id={inputId}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n value={internalValue}\n onChange={handleChange}\n minValue={minValue}\n maxValue={maxValue}\n isDateUnavailable={isDateUnavailable}\n {...props}\n >\n <Group>\n <DateInput ref={inputRef}>{segment => <DateSegment segment={segment} />}</DateInput>\n\n <div className={styles.icons}>\n {isInvalid && <AlertCircle aria-hidden=\"true\" fontSize={16} />}\n <Button onBlur={onBlur}>\n <CaretDown title={t('icons.calendarArrow')} />\n </Button>\n </div>\n </Group>\n <Popover\n className={classNames(styles.popover, 'react-aria-Popover')}\n UNSTABLE_portalContainer={portalContainer ?? container.current ?? undefined}\n >\n <Dialog>\n <Calendar>\n <header>\n <Button slot=\"previous\">\n <CaretLeft title={t('icons.previousMonth')} />\n </Button>\n <Heading />\n <Button slot=\"next\">\n <CaretRight title={t('icons.nextMonth')} />\n </Button>\n </header>\n <CalendarGrid>{date => <CalendarCell date={date} />}</CalendarGrid>\n </Calendar>\n </Dialog>\n </Popover>\n </AriaDatePicker>\n </div>\n </FieldLayout>\n )\n}\n"],"names":["dateToCalendarDate","date","dateString","parseDate","calendarDateValueToDate","dateValue","DatePicker","className","description","errorMessage","id","inputRef","isDisabled","isInvalid","isRequired","label","onChange","onBlur","value","portalContainer","minDate","maxDate","isDateDisabled","props","t","useTranslation","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","container","useTheme","formattedDate","formatDateToStringDate","internalValue","minValue","maxValue","isDateUnavailable","jsDate","handleChange","jsx","FieldLayout","classNames","styles","jsxs","AriaDatePicker","Group","DateInput","DateSegment","segment","AlertCircle","Button","CaretDown","Popover","Dialog","Calendar","CaretLeft","Heading","CaretRight","CalendarGrid","CalendarCell"],"mappings":";;;;;;;;;;;;;;;;AA4BA,SAASA,EAAmBC,GAAsC;AAChE,MAAI,EAAEA,aAAgB,SAAS,MAAMA,EAAK,QAAA,CAAS;AACjD;AAIF,QAAMC,IAAa;AAAA,IACjB,OAAOD,EAAK,YAAA,CAAa,EAAE,SAAS,GAAG,GAAG;AAAA,IAC1C,OAAOA,EAAK,SAAA,IAAa,CAAC,EAAE,SAAS,GAAG,GAAG;AAAA,IAC3C,OAAOA,EAAK,QAAA,CAAS,EAAE,SAAS,GAAG,GAAG;AAAA,EAAA,EACtC,KAAK,GAAG;AAEV,SAAOE,EAAUD,CAAU;AAC7B;AAEA,SAASE,EAAwBC,GAA0C;AACzE,SAAKA,IAEQ,IAAI;AAAA,IACfA,EAAU;AAAA,IACVA,EAAU,QAAQ;AAAA;AAAA,IAClBA,EAAU;AAAA,EAAA,IALW;AASzB;AAEO,MAAMC,KAAa,CAAC;AAAA,EACzB,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,IAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SA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UACF;AAAA,QAAA;AAAA,MAAA,EACF,CACF;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -1,5 +1,5 @@
1
1
  import { InputHTMLAttributes, ReactNode, Ref } from 'react';
2
- export interface InputProps extends Pick<InputHTMLAttributes<HTMLInputElement>, 'className' | 'id' | 'name' | 'placeholder' | 'type' | 'value' | 'onChange' | 'onBlur' | 'aria-describedby' | 'aria-invalid' | 'min' | 'max' | 'maxLength'> {
2
+ export interface InputProps extends Pick<InputHTMLAttributes<HTMLInputElement>, 'className' | 'id' | 'name' | 'placeholder' | 'type' | 'value' | 'onChange' | 'onBlur' | 'aria-describedby' | 'aria-labelledby' | 'aria-invalid' | 'min' | 'max' | 'maxLength'> {
3
3
  /**
4
4
  * Ref for the input element
5
5
  */
@@ -1 +1 @@
1
- {"version":3,"file":"InputTypes.js","sources":["../../../../../src/components/Common/UI/Input/InputTypes.ts"],"sourcesContent":["import type { InputHTMLAttributes, ReactNode, Ref } from 'react'\n\nexport interface InputProps extends Pick<\n InputHTMLAttributes<HTMLInputElement>,\n | 'className'\n | 'id'\n | 'name'\n | 'placeholder'\n | 'type'\n | 'value'\n | 'onChange'\n | 'onBlur'\n | 'aria-describedby'\n | 'aria-invalid'\n | 'min'\n | 'max'\n | 'maxLength'\n> {\n /**\n * Ref for the input element\n */\n inputRef?: Ref<HTMLInputElement>\n\n /**\n * Content to display at the start of the input\n */\n adornmentStart?: ReactNode\n\n /**\n * Content to display at the end of the input\n */\n adornmentEnd?: ReactNode\n\n /**\n * Whether the input is disabled\n */\n isDisabled?: boolean\n}\n\n/**\n * Default prop values for Input component.\n * These are used by the component adapter to automatically provide defaults.\n */\nexport const InputDefaults = {\n isDisabled: false,\n} as const satisfies Partial<InputProps>\n"],"names":["InputDefaults"],"mappings":"AA2CO,MAAMA,IAAgB;AAAA,EAC3B,YAAY;AACd;"}
1
+ {"version":3,"file":"InputTypes.js","sources":["../../../../../src/components/Common/UI/Input/InputTypes.ts"],"sourcesContent":["import type { InputHTMLAttributes, ReactNode, Ref } from 'react'\n\nexport interface InputProps extends Pick<\n InputHTMLAttributes<HTMLInputElement>,\n | 'className'\n | 'id'\n | 'name'\n | 'placeholder'\n | 'type'\n | 'value'\n | 'onChange'\n | 'onBlur'\n | 'aria-describedby'\n | 'aria-labelledby'\n | 'aria-invalid'\n | 'min'\n | 'max'\n | 'maxLength'\n> {\n /**\n * Ref for the input element\n */\n inputRef?: Ref<HTMLInputElement>\n\n /**\n * Content to display at the start of the input\n */\n adornmentStart?: ReactNode\n\n /**\n * Content to display at the end of the input\n */\n adornmentEnd?: ReactNode\n\n /**\n * Whether the input is disabled\n */\n isDisabled?: boolean\n}\n\n/**\n * Default prop values for Input component.\n * These are used by the component adapter to automatically provide defaults.\n */\nexport const InputDefaults = {\n isDisabled: false,\n} as const satisfies Partial<InputProps>\n"],"names":["InputDefaults"],"mappings":"AA4CO,MAAMA,IAAgB;AAAA,EAC3B,YAAY;AACd;"}
@@ -1,46 +1,47 @@
1
1
  import { jsx as o, jsxs as P } from "react/jsx-runtime";
2
- import { Popover as b, Menu as v, MenuItem as x } from "react-aria-components";
2
+ import { Popover as b, Menu as x, MenuItem as I } from "react-aria-components";
3
3
  import r from "./Menu.module.scss.js";
4
- import { MenuDefaults as I } from "./MenuTypes.js";
5
- import { applyMissingDefaults as O } from "../../../../helpers/applyMissingDefaults.js";
4
+ import { MenuDefaults as O } from "./MenuTypes.js";
5
+ import { applyMissingDefaults as j } from "../../../../helpers/applyMissingDefaults.js";
6
6
  import "react";
7
- import { useTheme as j } from "../../../../contexts/ThemeProvider/useTheme.js";
7
+ import { useTheme as y } from "../../../../contexts/ThemeProvider/useTheme.js";
8
8
  /* empty css */
9
- function R(s) {
10
- const a = O(s, I), {
9
+ function S(a) {
10
+ const s = j(a, O), {
11
11
  triggerRef: i,
12
12
  items: m,
13
13
  isOpen: l,
14
14
  onClose: n,
15
15
  placement: p,
16
- "aria-label": c,
17
- ...u
18
- } = a, { container: f } = j(), h = (e) => {
16
+ portalContainer: c,
17
+ "aria-label": u,
18
+ ...f
19
+ } = s, { container: d } = y(), h = (e) => {
19
20
  e || n?.();
20
21
  };
21
22
  return /* @__PURE__ */ o(
22
23
  b,
23
24
  {
24
- UNSTABLE_portalContainer: f.current,
25
+ UNSTABLE_portalContainer: c ?? d.current ?? void 0,
25
26
  onOpenChange: h,
26
27
  isOpen: l,
27
28
  triggerRef: i,
28
29
  placement: p,
29
30
  offset: 8,
30
31
  shouldUpdatePosition: !0,
31
- children: /* @__PURE__ */ o(v, { onClose: n, "aria-label": c, className: r.root, ...u, children: m?.map(({ onClick: e, isDisabled: d, href: M, icon: t, label: g, ...C }, N) => /* @__PURE__ */ P(
32
- x,
32
+ children: /* @__PURE__ */ o(x, { onClose: n, "aria-label": u, className: r.root, ...f, children: m?.map(({ onClick: e, isDisabled: M, href: g, icon: t, label: C, ...v }, N) => /* @__PURE__ */ P(
33
+ I,
33
34
  {
34
35
  onAction: () => {
35
36
  e();
36
37
  },
37
- isDisabled: d,
38
- href: M,
38
+ isDisabled: M,
39
+ href: g,
39
40
  className: r.menuItem,
40
- ...C,
41
+ ...v,
41
42
  children: [
42
43
  t && /* @__PURE__ */ o("div", { className: r.menuIcon, children: t }),
43
- g
44
+ C
44
45
  ]
45
46
  },
46
47
  N
@@ -49,6 +50,6 @@ function R(s) {
49
50
  );
50
51
  }
51
52
  export {
52
- R as Menu
53
+ S as Menu
53
54
  };
54
55
  //# sourceMappingURL=Menu.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Menu.js","sources":["../../../../../src/components/Common/UI/Menu/Menu.tsx"],"sourcesContent":["import { Menu as AriaMenu, MenuItem as AriaMenuItem, Popover } from 'react-aria-components'\nimport styles from './Menu.module.scss'\nimport { type MenuProps, MenuDefaults } from './MenuTypes'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\nimport { useTheme } from '@/contexts/ThemeProvider'\n\nexport function Menu(rawProps: MenuProps) {\n const resolvedProps = applyMissingDefaults(rawProps, MenuDefaults)\n const {\n triggerRef,\n items,\n isOpen,\n onClose,\n placement,\n 'aria-label': ariaLabel,\n ...otherProps\n } = resolvedProps\n const { container } = useTheme()\n\n const handleOpenChange = (isOpen: boolean) => {\n if (!isOpen) {\n onClose?.()\n }\n }\n\n return (\n <Popover\n UNSTABLE_portalContainer={container.current}\n onOpenChange={handleOpenChange}\n isOpen={isOpen}\n triggerRef={triggerRef}\n placement={placement}\n offset={8}\n shouldUpdatePosition={true}\n >\n <AriaMenu onClose={onClose} aria-label={ariaLabel} className={styles.root} {...otherProps}>\n {items?.map(({ onClick, isDisabled, href, icon, label, ...itemProps }, index) => (\n <AriaMenuItem\n key={index}\n onAction={() => {\n onClick()\n }}\n isDisabled={isDisabled}\n href={href}\n className={styles.menuItem}\n {...itemProps}\n >\n {icon && <div className={styles.menuIcon}>{icon}</div>}\n {label}\n </AriaMenuItem>\n ))}\n </AriaMenu>\n </Popover>\n )\n}\n"],"names":["Menu","rawProps","resolvedProps","applyMissingDefaults","MenuDefaults","triggerRef","items","isOpen","onClose","placement","ariaLabel","otherProps","container","useTheme","handleOpenChange","jsx","Popover","AriaMenu","styles","onClick","isDisabled","href","icon","label","itemProps","index","jsxs","AriaMenuItem"],"mappings":";;;;;;;;AAMO,SAASA,EAAKC,GAAqB;AACxC,QAAMC,IAAgBC,EAAqBF,GAAUG,CAAY,GAC3D;AAAA,IACJ,YAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,SAAAC;AAAA,IACA,WAAAC;AAAA,IACA,cAAcC;AAAA,IACd,GAAGC;AAAA,EAAA,IACDT,GACE,EAAE,WAAAU,EAAA,IAAcC,EAAA,GAEhBC,IAAmB,CAACP,MAAoB;AAC5C,IAAKA,KACHC,IAAA;AAAA,EAEJ;AAEA,SACE,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,0BAA0BJ,EAAU;AAAA,MACpC,cAAcE;AAAA,MACd,QAAAP;AAAA,MACA,YAAAF;AAAA,MACA,WAAAI;AAAA,MACA,QAAQ;AAAA,MACR,sBAAsB;AAAA,MAEtB,UAAA,gBAAAM,EAACE,KAAS,SAAAT,GAAkB,cAAYE,GAAW,WAAWQ,EAAO,MAAO,GAAGP,GAC5E,UAAAL,GAAO,IAAI,CAAC,EAAE,SAAAa,GAAS,YAAAC,GAAY,MAAAC,GAAM,MAAAC,GAAM,OAAAC,GAAO,GAAGC,EAAA,GAAaC,MACrE,gBAAAC;AAAA,QAACC;AAAAA,QAAA;AAAA,UAEC,UAAU,MAAM;AACd,YAAAR,EAAA;AAAA,UACF;AAAA,UACA,YAAAC;AAAA,UACA,MAAAC;AAAA,UACA,WAAWH,EAAO;AAAA,UACjB,GAAGM;AAAA,UAEH,UAAA;AAAA,YAAAF,KAAQ,gBAAAP,EAAC,OAAA,EAAI,WAAWG,EAAO,UAAW,UAAAI,GAAK;AAAA,YAC/CC;AAAA,UAAA;AAAA,QAAA;AAAA,QAVIE;AAAA,MAAA,CAYR,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"Menu.js","sources":["../../../../../src/components/Common/UI/Menu/Menu.tsx"],"sourcesContent":["import { Menu as AriaMenu, MenuItem as AriaMenuItem, Popover } from 'react-aria-components'\nimport styles from './Menu.module.scss'\nimport { type MenuProps, MenuDefaults } from './MenuTypes'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\nimport { useTheme } from '@/contexts/ThemeProvider'\n\nexport function Menu(rawProps: MenuProps) {\n const resolvedProps = applyMissingDefaults(rawProps, MenuDefaults)\n const {\n triggerRef,\n items,\n isOpen,\n onClose,\n placement,\n portalContainer,\n 'aria-label': ariaLabel,\n ...otherProps\n } = resolvedProps\n const { container } = useTheme()\n\n const handleOpenChange = (isOpen: boolean) => {\n if (!isOpen) {\n onClose?.()\n }\n }\n\n return (\n <Popover\n UNSTABLE_portalContainer={portalContainer ?? container.current ?? undefined}\n onOpenChange={handleOpenChange}\n isOpen={isOpen}\n triggerRef={triggerRef}\n placement={placement}\n offset={8}\n shouldUpdatePosition={true}\n >\n <AriaMenu onClose={onClose} aria-label={ariaLabel} className={styles.root} {...otherProps}>\n {items?.map(({ onClick, isDisabled, href, icon, label, ...itemProps }, index) => (\n <AriaMenuItem\n key={index}\n onAction={() => {\n onClick()\n }}\n isDisabled={isDisabled}\n href={href}\n className={styles.menuItem}\n {...itemProps}\n >\n {icon && <div className={styles.menuIcon}>{icon}</div>}\n {label}\n </AriaMenuItem>\n ))}\n </AriaMenu>\n </Popover>\n )\n}\n"],"names":["Menu","rawProps","resolvedProps","applyMissingDefaults","MenuDefaults","triggerRef","items","isOpen","onClose","placement","portalContainer","ariaLabel","otherProps","container","useTheme","handleOpenChange","jsx","Popover","AriaMenu","styles","onClick","isDisabled","href","icon","label","itemProps","index","jsxs","AriaMenuItem"],"mappings":";;;;;;;;AAMO,SAASA,EAAKC,GAAqB;AACxC,QAAMC,IAAgBC,EAAqBF,GAAUG,CAAY,GAC3D;AAAA,IACJ,YAAAC;AAAA,IACA,OAAAC;AAAA,IACA,QAAAC;AAAA,IACA,SAAAC;AAAA,IACA,WAAAC;AAAA,IACA,iBAAAC;AAAA,IACA,cAAcC;AAAA,IACd,GAAGC;AAAA,EAAA,IACDV,GACE,EAAE,WAAAW,EAAA,IAAcC,EAAA,GAEhBC,IAAmB,CAACR,MAAoB;AAC5C,IAAKA,KACHC,IAAA;AAAA,EAEJ;AAEA,SACE,gBAAAQ;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,0BAA0BP,KAAmBG,EAAU,WAAW;AAAA,MAClE,cAAcE;AAAA,MACd,QAAAR;AAAA,MACA,YAAAF;AAAA,MACA,WAAAI;AAAA,MACA,QAAQ;AAAA,MACR,sBAAsB;AAAA,MAEtB,UAAA,gBAAAO,EAACE,KAAS,SAAAV,GAAkB,cAAYG,GAAW,WAAWQ,EAAO,MAAO,GAAGP,GAC5E,UAAAN,GAAO,IAAI,CAAC,EAAE,SAAAc,GAAS,YAAAC,GAAY,MAAAC,GAAM,MAAAC,GAAM,OAAAC,GAAO,GAAGC,EAAA,GAAaC,MACrE,gBAAAC;AAAA,QAACC;AAAAA,QAAA;AAAA,UAEC,UAAU,MAAM;AACd,YAAAR,EAAA;AAAA,UACF;AAAA,UACA,YAAAC;AAAA,UACA,MAAAC;AAAA,UACA,WAAWH,EAAO;AAAA,UACjB,GAAGM;AAAA,UAEH,UAAA;AAAA,YAAAF,KAAQ,gBAAAP,EAAC,OAAA,EAAI,WAAWG,EAAO,UAAW,UAAAI,GAAK;AAAA,YAC/CC;AAAA,UAAA;AAAA,QAAA;AAAA,QAVIE;AAAA,MAAA,CAYR,EAAA,CACH;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -43,6 +43,11 @@ export interface MenuProps extends DataAttributes {
43
43
  * Accessible label describing the menu's purpose
44
44
  */
45
45
  'aria-label': string;
46
+ /**
47
+ * Element to use as the portal container for the menu popover.
48
+ * Overrides the default SDK root container from context.
49
+ */
50
+ portalContainer?: HTMLElement;
46
51
  /**
47
52
  * Controls the placement of the menu popover relative to the trigger
48
53
  */
@@ -1 +1 @@
1
- {"version":3,"file":"MenuTypes.js","sources":["../../../../../src/components/Common/UI/Menu/MenuTypes.ts"],"sourcesContent":["import type { ReactNode, RefObject } from 'react'\nimport type { DataAttributes } from '@/types/Helpers'\n\nexport interface MenuItem extends DataAttributes {\n /**\n * Text label for the menu item\n */\n label: string\n /**\n * Optional icon to display before the label\n */\n icon?: ReactNode\n /**\n * Callback function when the menu item is clicked\n */\n onClick: () => void\n /**\n * Disables the menu item and prevents interaction\n */\n isDisabled?: boolean\n /**\n * Optional URL to navigate to when clicked\n */\n href?: string\n}\n\nexport interface MenuProps extends DataAttributes {\n /**\n * Reference to the element that triggers the menu\n */\n triggerRef?: RefObject<Element | null>\n /**\n * Array of menu items to display\n */\n items?: MenuItem[]\n /**\n * Controls whether the menu is currently open\n */\n isOpen?: boolean\n /**\n * Callback when the menu is closed\n */\n onClose?: () => void\n /**\n * Accessible label describing the menu's purpose\n */\n 'aria-label': string\n /**\n * Controls the placement of the menu popover relative to the trigger\n */\n placement?:\n | 'top'\n | 'top start'\n | 'top end'\n | 'bottom'\n | 'bottom start'\n | 'bottom end'\n | 'left'\n | 'right'\n}\n\n/**\n * Default prop values for Menu component.\n */\nexport const MenuDefaults = {\n isOpen: false,\n placement: 'bottom start',\n} as const satisfies Partial<MenuProps>\n"],"names":["MenuDefaults"],"mappings":"AAgEO,MAAMA,IAAe;AAAA,EAC1B,QAAQ;AAAA,EACR,WAAW;AACb;"}
1
+ {"version":3,"file":"MenuTypes.js","sources":["../../../../../src/components/Common/UI/Menu/MenuTypes.ts"],"sourcesContent":["import type { ReactNode, RefObject } from 'react'\nimport type { DataAttributes } from '@/types/Helpers'\n\nexport interface MenuItem extends DataAttributes {\n /**\n * Text label for the menu item\n */\n label: string\n /**\n * Optional icon to display before the label\n */\n icon?: ReactNode\n /**\n * Callback function when the menu item is clicked\n */\n onClick: () => void\n /**\n * Disables the menu item and prevents interaction\n */\n isDisabled?: boolean\n /**\n * Optional URL to navigate to when clicked\n */\n href?: string\n}\n\nexport interface MenuProps extends DataAttributes {\n /**\n * Reference to the element that triggers the menu\n */\n triggerRef?: RefObject<Element | null>\n /**\n * Array of menu items to display\n */\n items?: MenuItem[]\n /**\n * Controls whether the menu is currently open\n */\n isOpen?: boolean\n /**\n * Callback when the menu is closed\n */\n onClose?: () => void\n /**\n * Accessible label describing the menu's purpose\n */\n 'aria-label': string\n /**\n * Element to use as the portal container for the menu popover.\n * Overrides the default SDK root container from context.\n */\n portalContainer?: HTMLElement\n /**\n * Controls the placement of the menu popover relative to the trigger\n */\n placement?:\n | 'top'\n | 'top start'\n | 'top end'\n | 'bottom'\n | 'bottom start'\n | 'bottom end'\n | 'left'\n | 'right'\n}\n\n/**\n * Default prop values for Menu component.\n */\nexport const MenuDefaults = {\n isOpen: false,\n placement: 'bottom start',\n} as const satisfies Partial<MenuProps>\n"],"names":["MenuDefaults"],"mappings":"AAqEO,MAAMA,IAAe;AAAA,EAC1B,QAAQ;AAAA,EACR,WAAW;AACb;"}
@@ -111,7 +111,7 @@ function ye({
111
111
  Z,
112
112
  {
113
113
  className: N(i.popover, "react-aria-Popover"),
114
- UNSTABLE_portalContainer: z.current,
114
+ UNSTABLE_portalContainer: z.current ?? void 0,
115
115
  maxHeight: 320,
116
116
  children: /* @__PURE__ */ t($, { layout: V, children: /* @__PURE__ */ t(ee, { items: H, children: (e) => /* @__PURE__ */ t(te, { children: e.name }, e.id) }) })
117
117
  }
@@ -1 +1 @@
1
- {"version":3,"file":"MultiSelectComboBox.js","sources":["../../../../../src/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.tsx"],"sourcesContent":["import { useCallback, useMemo, useRef, useState } from 'react'\nimport type { Key } from 'react-aria-components'\nimport {\n ComboBox as AriaComboBox,\n Button,\n Input,\n ListBox,\n ListBoxItem,\n ListLayout,\n Popover,\n Virtualizer,\n} from 'react-aria-components'\nimport classNames from 'classnames'\nimport { useTranslation } from 'react-i18next'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './MultiSelectComboBox.module.scss'\nimport type { MultiSelectComboBoxProps } from './MultiSelectComboBoxTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useTheme } from '@/contexts/ThemeProvider'\nimport { useForkRef } from '@/hooks/useForkRef/useForkRef'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\n\nexport function MultiSelectComboBox({\n className,\n description,\n errorMessage,\n id,\n inputRef: inputRefFromProps,\n isDisabled,\n isInvalid,\n isLoading,\n isRequired,\n label,\n name,\n onBlur,\n onChange,\n options,\n placeholder,\n value: selectedValues = [],\n shouldVisuallyHideLabel,\n}: MultiSelectComboBoxProps) {\n const Components = useComponentContext()\n const { t } = useTranslation('common')\n const { container } = useTheme()\n const [inputValue, setInputValue] = useState('')\n const blurTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null)\n const internalInputRef = useRef<HTMLInputElement>(null)\n const inputRef = useForkRef(inputRefFromProps, internalInputRef)\n\n const handleInputBlur = useCallback(() => {\n blurTimeoutRef.current = setTimeout(() => {\n blurTimeoutRef.current = null\n onBlur?.()\n }, 50)\n }, [onBlur])\n\n const handleInputFocus = useCallback(() => {\n if (blurTimeoutRef.current) {\n clearTimeout(blurTimeoutRef.current)\n blurTimeoutRef.current = null\n }\n }, [])\n\n const selectedSet = useMemo(() => new Set(selectedValues), [selectedValues])\n\n const availableOptions = useMemo(\n () =>\n options\n .filter(option => !selectedSet.has(option.value))\n .map(option => ({\n label: option.label,\n value: option.value,\n })),\n [options, selectedSet],\n )\n\n const selectedOptions = useMemo(\n () => options.filter(option => selectedSet.has(option.value)),\n [options, selectedSet],\n )\n\n const items = useMemo(\n () => availableOptions.map(option => ({ name: option.label, id: option.value })),\n [availableOptions],\n )\n\n const handleSelectionChange = useCallback(\n (key: Key | null) => {\n if (!key) return\n onChange?.([...selectedValues, key.toString()])\n setInputValue('')\n internalInputRef.current?.blur()\n },\n [selectedValues, onChange],\n )\n\n const handleDismiss = useCallback(\n (value: string) => {\n onChange?.(selectedValues.filter(v => v !== value))\n },\n [selectedValues, onChange],\n )\n\n const loadingDescription = isLoading ? t('status.loadingOptions') : undefined\n const displayDescription = loadingDescription ?? description\n\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description: displayDescription,\n })\n\n return (\n <div className={classNames(styles.root, className)}>\n <FieldLayout\n label={label}\n htmlFor={inputId}\n errorMessage={errorMessage}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n isRequired={isRequired}\n description={displayDescription}\n shouldVisuallyHideLabel={shouldVisuallyHideLabel}\n className={styles.comboBoxField}\n withErrorIcon={false}\n >\n <AriaComboBox\n aria-label={label}\n aria-describedby={ariaDescribedBy}\n className={'react-aria-ComboBox-root'}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n menuTrigger=\"focus\"\n inputValue={inputValue}\n onInputChange={setInputValue}\n selectedKey={null}\n onSelectionChange={handleSelectionChange}\n id={inputId}\n name={name}\n >\n <Input\n ref={inputRef}\n placeholder={placeholder}\n onBlur={handleInputBlur}\n onFocus={handleInputFocus}\n />\n <Button>\n <div aria-hidden=\"true\" className={styles.icons}>\n {isInvalid && <AlertCircle fontSize={16} />}\n <CaretDown title={t('icons.selectArrow')} />\n </div>\n </Button>\n\n <Popover\n className={classNames(styles.popover, 'react-aria-Popover')}\n UNSTABLE_portalContainer={container.current}\n maxHeight={320}\n >\n <Virtualizer layout={ListLayout}>\n <ListBox items={items}>\n {item => <ListBoxItem key={item.id}>{item.name}</ListBoxItem>}\n </ListBox>\n </Virtualizer>\n </Popover>\n </AriaComboBox>\n </FieldLayout>\n\n {selectedOptions.length > 0 && (\n <div className={styles.chips} role=\"list\" aria-label={t('labels.selectedItems', { label })}>\n {selectedOptions.map(option => (\n <span key={option.value} role=\"listitem\">\n <Components.Badge\n status=\"info\"\n onDismiss={() => {\n handleDismiss(option.value)\n }}\n dismissAriaLabel={t('labels.removeItem', { label: option.label })}\n isDisabled={isDisabled}\n >\n {option.label}\n </Components.Badge>\n </span>\n ))}\n </div>\n )}\n </div>\n )\n}\n"],"names":["MultiSelectComboBox","className","description","errorMessage","id","inputRefFromProps","isDisabled","isInvalid","isLoading","isRequired","label","name","onBlur","onChange","options","placeholder","selectedValues","shouldVisuallyHideLabel","Components","useComponentContext","t","useTranslation","container","useTheme","inputValue","setInputValue","useState","blurTimeoutRef","useRef","internalInputRef","inputRef","useForkRef","handleInputBlur","useCallback","handleInputFocus","selectedSet","useMemo","availableOptions","option","selectedOptions","items","handleSelectionChange","key","handleDismiss","value","v","displayDescription","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","classNames","styles","jsx","FieldLayout","jsxs","AriaComboBox","Input","Button","AlertCircle","CaretDown","Popover","Virtualizer","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MAAK,QAAO,cAAYjC,EAAE,wBAAwB,EAAE,OAAAV,EAAA,CAAO,GACtF,UAAA6B,EAAgB,IAAI,CAAAD,MACnB,gBAAAgB,EAAC,QAAA,EAAwB,MAAK,YAC5B,UAAA,gBAAAA;AAAA,MAACpC,EAAW;AAAA,MAAX;AAAA,QACC,QAAO;AAAA,QACP,WAAW,MAAM;AACf,UAAAyB,EAAcL,EAAO,KAAK;AAAA,QAC5B;AAAA,QACA,kBAAkBlB,EAAE,qBAAqB,EAAE,OAAOkB,EAAO,OAAO;AAAA,QAChE,YAAAhC;AAAA,QAEC,UAAAgC,EAAO;AAAA,MAAA;AAAA,IAAA,KATDA,EAAO,KAWlB,CACD,EAAA,CACH;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"MultiSelectComboBox.js","sources":["../../../../../src/components/Common/UI/MultiSelectComboBox/MultiSelectComboBox.tsx"],"sourcesContent":["import { useCallback, useMemo, useRef, useState } from 'react'\nimport type { Key } from 'react-aria-components'\nimport {\n ComboBox as AriaComboBox,\n Button,\n Input,\n ListBox,\n ListBoxItem,\n ListLayout,\n Popover,\n Virtualizer,\n} from 'react-aria-components'\nimport classNames from 'classnames'\nimport { useTranslation } from 'react-i18next'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './MultiSelectComboBox.module.scss'\nimport type { MultiSelectComboBoxProps } from './MultiSelectComboBoxTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { useTheme } from '@/contexts/ThemeProvider'\nimport { useForkRef } from '@/hooks/useForkRef/useForkRef'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\n\nexport function MultiSelectComboBox({\n className,\n description,\n errorMessage,\n id,\n inputRef: inputRefFromProps,\n isDisabled,\n isInvalid,\n isLoading,\n isRequired,\n label,\n name,\n onBlur,\n onChange,\n options,\n placeholder,\n value: selectedValues = [],\n shouldVisuallyHideLabel,\n}: MultiSelectComboBoxProps) {\n const Components = useComponentContext()\n const { t } = useTranslation('common')\n const { container } = useTheme()\n const [inputValue, setInputValue] = useState('')\n const blurTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null)\n const internalInputRef = useRef<HTMLInputElement>(null)\n const inputRef = useForkRef(inputRefFromProps, internalInputRef)\n\n const handleInputBlur = useCallback(() => {\n blurTimeoutRef.current = setTimeout(() => {\n blurTimeoutRef.current = null\n onBlur?.()\n }, 50)\n }, [onBlur])\n\n const handleInputFocus = useCallback(() => {\n if (blurTimeoutRef.current) {\n clearTimeout(blurTimeoutRef.current)\n blurTimeoutRef.current = null\n }\n }, [])\n\n const selectedSet = useMemo(() => new Set(selectedValues), [selectedValues])\n\n const availableOptions = useMemo(\n () =>\n options\n .filter(option => !selectedSet.has(option.value))\n .map(option => ({\n label: option.label,\n value: option.value,\n })),\n [options, selectedSet],\n )\n\n const selectedOptions = useMemo(\n () => options.filter(option => selectedSet.has(option.value)),\n [options, selectedSet],\n )\n\n const items = useMemo(\n () => availableOptions.map(option => ({ name: option.label, id: option.value })),\n [availableOptions],\n )\n\n const handleSelectionChange = useCallback(\n (key: Key | null) => {\n if (!key) return\n onChange?.([...selectedValues, key.toString()])\n setInputValue('')\n internalInputRef.current?.blur()\n },\n [selectedValues, onChange],\n )\n\n const handleDismiss = useCallback(\n (value: string) => {\n onChange?.(selectedValues.filter(v => v !== value))\n },\n [selectedValues, onChange],\n )\n\n const loadingDescription = isLoading ? t('status.loadingOptions') : undefined\n const displayDescription = loadingDescription ?? description\n\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description: displayDescription,\n })\n\n return (\n <div className={classNames(styles.root, className)}>\n <FieldLayout\n label={label}\n htmlFor={inputId}\n errorMessage={errorMessage}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n isRequired={isRequired}\n description={displayDescription}\n shouldVisuallyHideLabel={shouldVisuallyHideLabel}\n className={styles.comboBoxField}\n withErrorIcon={false}\n >\n <AriaComboBox\n aria-label={label}\n aria-describedby={ariaDescribedBy}\n className={'react-aria-ComboBox-root'}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n menuTrigger=\"focus\"\n inputValue={inputValue}\n onInputChange={setInputValue}\n selectedKey={null}\n onSelectionChange={handleSelectionChange}\n id={inputId}\n name={name}\n >\n <Input\n ref={inputRef}\n placeholder={placeholder}\n onBlur={handleInputBlur}\n onFocus={handleInputFocus}\n />\n <Button>\n <div aria-hidden=\"true\" className={styles.icons}>\n {isInvalid && <AlertCircle fontSize={16} />}\n <CaretDown title={t('icons.selectArrow')} />\n </div>\n </Button>\n\n <Popover\n className={classNames(styles.popover, 'react-aria-Popover')}\n UNSTABLE_portalContainer={container.current ?? undefined}\n maxHeight={320}\n >\n <Virtualizer layout={ListLayout}>\n <ListBox items={items}>\n {item => <ListBoxItem key={item.id}>{item.name}</ListBoxItem>}\n </ListBox>\n </Virtualizer>\n </Popover>\n </AriaComboBox>\n </FieldLayout>\n\n {selectedOptions.length > 0 && (\n <div className={styles.chips} role=\"list\" aria-label={t('labels.selectedItems', { label })}>\n {selectedOptions.map(option => (\n <span key={option.value} role=\"listitem\">\n <Components.Badge\n status=\"info\"\n onDismiss={() => {\n handleDismiss(option.value)\n }}\n dismissAriaLabel={t('labels.removeItem', { label: option.label })}\n isDisabled={isDisabled}\n >\n {option.label}\n </Components.Badge>\n </span>\n ))}\n </div>\n )}\n </div>\n )\n}\n"],"names":["MultiSelectComboBox","className","description","errorMessage","id","inputRefFromProps","isDisabled","isInvalid","isLoading","isRequired","label","name","onBlur","onChange","options","placeholder","selectedValues","shouldVisuallyHideLabel","Components","useComponentContext","t","useTranslation","container","useTheme","inputValue","setInputValue","useState","blurTimeoutRef","useRef","internalInputRef","inputRef","useForkRef","handleInputBlur","useCallback","handleInputFocus","selectedSet","useMemo","availableOptions","option","selectedOptions","items","handleSelectionChange","key","handleDismiss","value","v","displayDescription","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","classNames","styles","jsx","FieldLayout","jsxs","AriaComboBox","Input","Button","AlertCircle","CaretDown","Popover","Virtualizer","ListLayout","ListBox","item","ListBoxItem"],"mappings":";;;;;;;;;;;;;;AAwBO,SAASA,GAAoB;AAAA,EAClC,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,IAAAC;AAAA,EACA,UAAUC;AAAA,EACV,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAOC,IAAiB,CAAA;AAAA,EACxB,yBAAAC;AACF,GAA6B;AAC3B,QAAMC,IAAaC,GAAA,GACb,EAAE,GAAAC,EAAA,IAAMC,GAAe,QAAQ,GAC/B,EAAE,WAAAC,EAAA,IAAcC,GAAA,GAChB,CAACC,GAAYC,CAAa,IAAIC,EAAS,EAAE,GACzCC,IAAiBC,EAA6C,IAAI,GAClEC,IAAmBD,EAAyB,IAAI,GAChDE,IAAWC,GAAW1B,GAAmBwB,CAAgB,GAEzDG,IAAkBC,EAAY,MAAM;AACxC,IAAAN,EAAe,UAAU,WAAW,MAAM;AACxC,MAAAA,EAAe,UAAU,MACzBf,IAAA;AAAA,IACF,GAAG,EAAE;AAAA,EACP,GAAG,CAACA,CAAM,CAAC,GAELsB,IAAmBD,EAAY,MAAM;AACzC,IAAIN,EAAe,YACjB,aAAaA,EAAe,OAAO,GACnCA,EAAe,UAAU;AAAA,EAE7B,GAAG,CAAA,CAAE,GAECQ,IAAcC,EAAQ,MAAM,IAAI,IAAIpB,CAAc,GAAG,CAACA,CAAc,CAAC,GAErEqB,IAAmBD;AAAA,IACvB,MACEtB,EACG,OAAO,CAAAwB,MAAU,CAACH,EAAY,IAAIG,EAAO,KA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A;AAAA,YACF;AAAA,UAAA;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,IAGD3B,EAAgB,SAAS,KACxB,gBAAAe,EAAC,SAAI,WAAWD,EAAO,OAAO,MAAK,QAAO,cAAYjC,EAAE,wBAAwB,EAAE,OAAAV,EAAA,CAAO,GACtF,UAAA6B,EAAgB,IAAI,CAAAD,MACnB,gBAAAgB,EAAC,QAAA,EAAwB,MAAK,YAC5B,UAAA,gBAAAA;AAAA,MAACpC,EAAW;AAAA,MAAX;AAAA,QACC,QAAO;AAAA,QACP,WAAW,MAAM;AACf,UAAAyB,EAAcL,EAAO,KAAK;AAAA,QAC5B;AAAA,QACA,kBAAkBlB,EAAE,qBAAqB,EAAE,OAAOkB,EAAO,OAAO;AAAA,QAChE,YAAAhC;AAAA,QAEC,UAAAgC,EAAO;AAAA,MAAA;AAAA,IAAA,KATDA,EAAO,KAWlB,CACD,EAAA,CACH;AAAA,EAAA,GAEJ;AAEJ;"}
@@ -19,13 +19,13 @@ const te = ({
19
19
  isRequired: h,
20
20
  label: m,
21
21
  onChange: S,
22
- onBlur: x,
22
+ onBlur: v,
23
23
  options: s,
24
24
  placeholder: c,
25
25
  value: l,
26
- shouldVisuallyHideLabel: I,
27
- name: g,
28
- className: v,
26
+ shouldVisuallyHideLabel: x,
27
+ name: I,
28
+ className: g,
29
29
  inputRef: B,
30
30
  portalContainer: C,
31
31
  ...N
@@ -45,8 +45,8 @@ const te = ({
45
45
  descriptionId: w,
46
46
  isRequired: h,
47
47
  description: i,
48
- shouldVisuallyHideLabel: I,
49
- className: p(o.root, "react-aria-CustomSelect", v),
48
+ shouldVisuallyHideLabel: x,
49
+ className: p(o.root, "react-aria-CustomSelect", g),
50
50
  withErrorIcon: !1,
51
51
  ...N,
52
52
  children: /* @__PURE__ */ t(
@@ -58,11 +58,11 @@ const te = ({
58
58
  onSelectionChange: (e) => {
59
59
  e && S?.(e.toString());
60
60
  },
61
- onBlur: x,
61
+ onBlur: v,
62
62
  id: d,
63
63
  selectedKey: l || null,
64
64
  "aria-describedby": A,
65
- name: g,
65
+ name: I,
66
66
  children: [
67
67
  /* @__PURE__ */ t(D, { ref: B, children: [
68
68
  /* @__PURE__ */ r(E, { children: ({ defaultChildren: e, isPlaceholder: T }) => T && c ? c : e }),
@@ -75,7 +75,7 @@ const te = ({
75
75
  P,
76
76
  {
77
77
  className: p(o.popover, "react-aria-Popover"),
78
- UNSTABLE_portalContainer: C || y.current,
78
+ UNSTABLE_portalContainer: C ?? y.current ?? void 0,
79
79
  maxHeight: 320,
80
80
  children: /* @__PURE__ */ r(z, { items: F, children: (e) => /* @__PURE__ */ r(H, { children: e.name }, e.id) })
81
81
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Select.js","sources":["../../../../../src/components/Common/UI/Select/Select.tsx"],"sourcesContent":["import type { Key } from 'react-aria-components'\nimport {\n Select as AriaSelect,\n Button,\n ListBox,\n ListBoxItem,\n Popover,\n SelectValue,\n} from 'react-aria-components'\nimport { useTranslation } from 'react-i18next'\nimport { useMemo } from 'react'\nimport classNames from 'classnames'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './Select.module.scss'\nimport type { SelectProps } from './SelectTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport { useTheme } from '@/contexts/ThemeProvider'\n\nexport const Select = ({\n description,\n errorMessage,\n id,\n isDisabled,\n isInvalid,\n isRequired,\n label,\n onChange,\n onBlur,\n options,\n placeholder,\n value,\n shouldVisuallyHideLabel,\n name,\n className,\n inputRef,\n portalContainer,\n ...props\n}: SelectProps) => {\n const { t } = useTranslation()\n const { container } = useTheme()\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n\n const items = useMemo(() => {\n return options.map(o => ({ name: o.label, id: o.value }))\n }, [options])\n\n return (\n <FieldLayout\n label={label}\n htmlFor={inputId}\n errorMessage={errorMessage}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n isRequired={isRequired}\n description={description}\n shouldVisuallyHideLabel={shouldVisuallyHideLabel}\n className={classNames(styles.root, 'react-aria-CustomSelect', className)}\n withErrorIcon={false}\n {...props}\n >\n <AriaSelect\n aria-label={label}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n onSelectionChange={key => {\n if (key) {\n onChange?.(key.toString())\n }\n }}\n onBlur={onBlur}\n id={inputId}\n selectedKey={value ? (value as Key) : null}\n aria-describedby={ariaDescribedBy}\n name={name}\n >\n <Button ref={inputRef}>\n <SelectValue>\n {({ defaultChildren, isPlaceholder }) => {\n return isPlaceholder && placeholder ? placeholder : defaultChildren\n }}\n </SelectValue>\n <div className={styles.icons} aria-hidden=\"true\">\n {isInvalid && <AlertCircle fontSize={16} />}\n <CaretDown title={t('icons.selectArrow')} />\n </div>\n </Button>\n <Popover\n className={classNames(styles.popover, 'react-aria-Popover')}\n UNSTABLE_portalContainer={portalContainer || container.current}\n maxHeight={320}\n >\n <ListBox items={items}>\n {item => <ListBoxItem key={item.id}>{item.name}</ListBoxItem>}\n </ListBox>\n </Popover>\n </AriaSelect>\n </FieldLayout>\n )\n}\n"],"names":["Select","description","errorMessage","id","isDisabled","isInvalid","isRequired","label","onChange","onBlur","options","placeholder","value","shouldVisuallyHideLabel","name","className","inputRef","portalContainer","props","t","useTranslation","container","useTheme","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","items","useMemo","o","jsx","FieldLayout","classNames","styles","jsxs","AriaSelect","key","Button","SelectValue","defaultChildren","isPlaceholder","AlertCircle","CaretDown","Popover","ListBox","item","ListBoxItem"],"mappings":";;;;;;;;;;;;AAoBO,MAAMA,KAAS,CAAC;AAAA,EACrB,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,IAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAA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KAAKtB,GACX,UAAA;AAAA,cAAA,gBAAAe,EAACQ,GAAA,EACE,UAAA,CAAC,EAAE,iBAAAC,GAAiB,eAAAC,QACZA,KAAiB9B,IAAcA,IAAc6B,GAExD;AAAA,gCACC,OAAA,EAAI,WAAWN,EAAO,OAAO,eAAY,QACvC,UAAA;AAAA,gBAAA7B,KAAa,gBAAA0B,EAACW,GAAA,EAAY,UAAU,GAAA,CAAI;AAAA,gBACzC,gBAAAX,EAACY,GAAA,EAAU,OAAOxB,EAAE,mBAAmB,EAAA,CAAG;AAAA,cAAA,EAAA,CAC5C;AAAA,YAAA,GACF;AAAA,YACA,gBAAAY;AAAA,cAACa;AAAA,cAAA;AAAA,gBACC,WAAWX,EAAWC,EAAO,SAAS,oBAAoB;AAAA,gBAC1D,0BAA0BjB,KAAmBI,EAAU;AAAA,gBACvD,WAAW;AAAA,gBAEX,UAAA,gBAAAU,EAACc,GAAA,EAAQ,OAAAjB,GACN,UAAA,CAAAkB,MAAQ,gBAAAf,EAACgB,KAA2B,UAAAD,EAAK,KAAA,GAAfA,EAAK,EAAe,EAAA,CACjD;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"Select.js","sources":["../../../../../src/components/Common/UI/Select/Select.tsx"],"sourcesContent":["import type { Key } from 'react-aria-components'\nimport {\n Select as AriaSelect,\n Button,\n ListBox,\n ListBoxItem,\n Popover,\n SelectValue,\n} from 'react-aria-components'\nimport { useTranslation } from 'react-i18next'\nimport { useMemo } from 'react'\nimport classNames from 'classnames'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport styles from './Select.module.scss'\nimport type { SelectProps } from './SelectTypes'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\nimport CaretDown from '@/assets/icons/caret-down.svg?react'\nimport AlertCircle from '@/assets/icons/alert-circle.svg?react'\nimport { useTheme } from '@/contexts/ThemeProvider'\n\nexport const Select = ({\n description,\n errorMessage,\n id,\n isDisabled,\n isInvalid,\n isRequired,\n label,\n onChange,\n onBlur,\n options,\n placeholder,\n value,\n shouldVisuallyHideLabel,\n name,\n className,\n inputRef,\n portalContainer,\n ...props\n}: SelectProps) => {\n const { t } = useTranslation()\n const { container } = useTheme()\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n })\n\n const items = useMemo(() => {\n return options.map(o => ({ name: o.label, id: o.value }))\n }, [options])\n\n return (\n <FieldLayout\n label={label}\n htmlFor={inputId}\n errorMessage={errorMessage}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n isRequired={isRequired}\n description={description}\n shouldVisuallyHideLabel={shouldVisuallyHideLabel}\n className={classNames(styles.root, 'react-aria-CustomSelect', className)}\n withErrorIcon={false}\n {...props}\n >\n <AriaSelect\n aria-label={label}\n isDisabled={isDisabled}\n isInvalid={isInvalid}\n onSelectionChange={key => {\n if (key) {\n onChange?.(key.toString())\n }\n }}\n onBlur={onBlur}\n id={inputId}\n selectedKey={value ? (value as Key) : null}\n aria-describedby={ariaDescribedBy}\n name={name}\n >\n <Button ref={inputRef}>\n <SelectValue>\n {({ defaultChildren, isPlaceholder }) => {\n return isPlaceholder && placeholder ? placeholder : defaultChildren\n }}\n </SelectValue>\n <div className={styles.icons} aria-hidden=\"true\">\n {isInvalid && <AlertCircle fontSize={16} />}\n <CaretDown title={t('icons.selectArrow')} />\n </div>\n </Button>\n <Popover\n className={classNames(styles.popover, 'react-aria-Popover')}\n UNSTABLE_portalContainer={portalContainer ?? container.current ?? undefined}\n maxHeight={320}\n >\n <ListBox items={items}>\n {item => <ListBoxItem key={item.id}>{item.name}</ListBoxItem>}\n </ListBox>\n </Popover>\n </AriaSelect>\n </FieldLayout>\n )\n}\n"],"names":["Select","description","errorMessage","id","isDisabled","isInvalid","isRequired","label","onChange","onBlur","options","placeholder","value","shouldVisuallyHideLabel","name","className","inputRef","portalContainer","props","t","useTranslation","container","useTheme","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","items","useMemo","o","jsx","FieldLayout","classNames","styles","jsxs","AriaSelect","key","Button","SelectValue","defaultChildren","isPlaceholder","AlertCircle","CaretDown","Popover","ListBox","item","ListBoxItem"],"mappings":";;;;;;;;;;;;AAoBO,MAAMA,KAAS,CAAC;AAAA,EACrB,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,IAAAC;AAAA,EACA,YAAAC;AAAA,EACA,WAAAC;AAAA,EACA,YAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,GAAGC;AACL,MAAmB;AACjB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAA,GACR,EAAE,WAAAC,EAAA,IAAcC,EAAA,GAChB,EAAE,SAAAC,GAAS,gBAAAC,GAAgB,eAAAC,GAAe,iBAAAC,EAAA,IAAoBC,EAAY;AAAA,IAC9E,SAASxB;AAAA,IACT,cAAAD;AAAA,IACA,aAAAD;AAAA,EAAA,CACD,GAEK2B,IAAQC,EAAQ,MACbnB,EAAQ,IAAI,CAAAoB,OAAM,EAAE,MAAMA,EAAE,OAAO,IAAIA,EAAE,MAAA,EAAQ,GACvD,CAACpB,CAAO,CAAC;AAEZ,SACE,gBAAAqB;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAzB;AAAA,MACA,SAASgB;AAAA,MACT,cAAArB;AAAA,MACA,gBAAAsB;AAAA,MACA,eAAAC;AAAA,MACA,YAAAnB;AAAA,MACA,aAAAL;AAAA,MACA,yBAAAY;AAAA,MACA,WAAWoB,EAAWC,EAAO,MAAM,2BAA2BnB,CAAS;AAAA,MACvE,eAAe;AAAA,MACd,GAAGG;AAAA,MAEJ,UAAA,gBAAAiB;AAAA,QAACC;AAAAA,QAAA;AAAA,UACC,cAAY7B;AAAA,UACZ,YAAAH;AAAA,UACA,WAAAC;AAAA,UACA,mBAAmB,CAAAgC,MAAO;AACxB,YAAIA,KACF7B,IAAW6B,EAAI,UAAU;AAAA,UAE7B;AAAA,UACA,QAAA5B;AAAA,UACA,IAAIc;AAAA,UACJ,aAAaX,KAAyB;AAAA,UACtC,oBAAkBc;AAAA,UAClB,MAAAZ;AAAA,UAEA,UAAA;AAAA,YAAA,gBAAAqB,EAACG,GAAA,EAAO,KAAKtB,GACX,UAAA;AAAA,cAAA,gBAAAe,EAACQ,GAAA,EACE,UAAA,CAAC,EAAE,iBAAAC,GAAiB,eAAAC,QACZA,KAAiB9B,IAAcA,IAAc6B,GAExD;AAAA,gCACC,OAAA,EAAI,WAAWN,EAAO,OAAO,eAAY,QACvC,UAAA;AAAA,gBAAA7B,KAAa,gBAAA0B,EAACW,GAAA,EAAY,UAAU,GAAA,CAAI;AAAA,gBACzC,gBAAAX,EAACY,GAAA,EAAU,OAAOxB,EAAE,mBAAmB,EAAA,CAAG;AAAA,cAAA,EAAA,CAC5C;AAAA,YAAA,GACF;AAAA,YACA,gBAAAY;AAAA,cAACa;AAAA,cAAA;AAAA,gBACC,WAAWX,EAAWC,EAAO,SAAS,oBAAoB;AAAA,gBAC1D,0BAA0BjB,KAAmBI,EAAU,WAAW;AAAA,gBAClE,WAAW;AAAA,gBAEX,UAAA,gBAAAU,EAACc,GAAA,EAAQ,OAAAjB,GACN,UAAA,CAAAkB,MAAQ,gBAAAf,EAACgB,KAA2B,UAAAD,EAAK,KAAA,GAAfA,EAAK,EAAe,EAAA,CACjD;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
@@ -1,68 +1,70 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
- import { useFieldIds as T } from "../hooks/useFieldIds.js";
3
- import { TextInputDefaults as j } from "./TextInputTypes.js";
4
- import { applyMissingDefaults as q } from "../../../../helpers/applyMissingDefaults.js";
5
- import { FieldLayout as w } from "../../FieldLayout/FieldLayout.js";
6
- import { Input as H } from "../Input/Input.js";
7
- function J(o) {
8
- const n = q(o, j), {
2
+ import { useFieldIds as j } from "../hooks/useFieldIds.js";
3
+ import { TextInputDefaults as q } from "./TextInputTypes.js";
4
+ import { applyMissingDefaults as w } from "../../../../helpers/applyMissingDefaults.js";
5
+ import { FieldLayout as H } from "../../FieldLayout/FieldLayout.js";
6
+ import { Input as N } from "../Input/Input.js";
7
+ function K(o) {
8
+ const n = w(o, q), {
9
9
  name: t,
10
- label: s,
10
+ label: d,
11
11
  description: e,
12
12
  errorMessage: r,
13
- isRequired: d,
14
- type: l,
13
+ isRequired: l,
14
+ type: s,
15
15
  inputRef: p,
16
16
  isInvalid: m,
17
17
  isDisabled: u,
18
18
  id: c,
19
- value: h,
20
- placeholder: f,
21
- onChange: b,
22
- onBlur: I,
23
- className: g,
24
- shouldVisuallyHideLabel: y,
19
+ value: b,
20
+ placeholder: h,
21
+ onChange: y,
22
+ onBlur: f,
23
+ className: I,
24
+ shouldVisuallyHideLabel: g,
25
25
  adornmentEnd: v,
26
26
  adornmentStart: x,
27
27
  min: D,
28
28
  max: B,
29
29
  maxLength: C,
30
30
  "aria-describedby": F,
31
- ...L
32
- } = n, { inputId: a, errorMessageId: M, descriptionId: P, ariaDescribedBy: E } = T({
31
+ "aria-labelledby": L,
32
+ ...M
33
+ } = n, { inputId: a, errorMessageId: P, descriptionId: E, ariaDescribedBy: R } = j({
33
34
  inputId: c,
34
35
  errorMessage: r,
35
36
  description: e,
36
37
  ariaDescribedBy: F
37
38
  });
38
39
  return /* @__PURE__ */ i(
39
- w,
40
+ H,
40
41
  {
41
- label: s,
42
+ label: d,
42
43
  description: e,
43
44
  errorMessage: r,
44
- isRequired: d,
45
+ isRequired: l,
45
46
  htmlFor: a,
46
- errorMessageId: M,
47
- descriptionId: P,
48
- className: g,
49
- shouldVisuallyHideLabel: y,
47
+ errorMessageId: P,
48
+ descriptionId: E,
49
+ className: I,
50
+ shouldVisuallyHideLabel: g,
50
51
  withErrorIcon: !1,
51
- ...L,
52
+ ...M,
52
53
  children: /* @__PURE__ */ i(
53
- H,
54
+ N,
54
55
  {
55
56
  id: a,
56
57
  inputRef: p,
57
58
  name: t,
58
- type: l,
59
- value: h ?? "",
60
- placeholder: f,
61
- onChange: (R) => {
62
- b?.(R.target.value);
59
+ type: s,
60
+ value: b ?? "",
61
+ placeholder: h,
62
+ onChange: (T) => {
63
+ y?.(T.target.value);
63
64
  },
64
- onBlur: I,
65
- "aria-describedby": E,
65
+ onBlur: f,
66
+ "aria-describedby": R,
67
+ "aria-labelledby": L,
66
68
  "aria-invalid": m,
67
69
  isDisabled: u,
68
70
  adornmentStart: x,
@@ -76,6 +78,6 @@ function J(o) {
76
78
  );
77
79
  }
78
80
  export {
79
- J as TextInput
81
+ K as TextInput
80
82
  };
81
83
  //# sourceMappingURL=TextInput.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.js","sources":["../../../../../src/components/Common/UI/TextInput/TextInput.tsx"],"sourcesContent":["import type { ChangeEvent } from 'react'\nimport { Input } from '../Input'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport type { TextInputProps } from './TextInputTypes'\nimport { TextInputDefaults } from './TextInputTypes'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\n\nexport function TextInput(rawProps: TextInputProps) {\n const resolvedProps = applyMissingDefaults(rawProps, TextInputDefaults)\n const {\n name,\n label,\n description,\n errorMessage,\n isRequired,\n type,\n inputRef,\n isInvalid,\n isDisabled,\n id,\n value,\n placeholder,\n onChange,\n onBlur,\n className,\n shouldVisuallyHideLabel,\n adornmentEnd,\n adornmentStart,\n min,\n max,\n maxLength,\n 'aria-describedby': ariaDescribedByFromProps,\n ...otherProps\n } = resolvedProps\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n ariaDescribedBy: ariaDescribedByFromProps,\n })\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n onChange?.(event.target.value)\n }\n\n return (\n <FieldLayout\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={isRequired}\n htmlFor={inputId}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n className={className}\n shouldVisuallyHideLabel={shouldVisuallyHideLabel}\n withErrorIcon={false}\n {...otherProps}\n >\n <Input\n id={inputId}\n inputRef={inputRef}\n name={name}\n type={type}\n value={value ?? ''}\n placeholder={placeholder}\n onChange={handleChange}\n onBlur={onBlur}\n aria-describedby={ariaDescribedBy}\n aria-invalid={isInvalid}\n isDisabled={isDisabled}\n adornmentStart={adornmentStart}\n adornmentEnd={adornmentEnd}\n min={min}\n max={max}\n maxLength={maxLength}\n />\n </FieldLayout>\n )\n}\n"],"names":["TextInput","rawProps","resolvedProps","applyMissingDefaults","TextInputDefaults","name","label","description","errorMessage","isRequired","type","inputRef","isInvalid","isDisabled","id","value","placeholder","onChange","onBlur","className","shouldVisuallyHideLabel","adornmentEnd","adornmentStart","min","max","maxLength","ariaDescribedByFromProps","otherProps","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","jsx","FieldLayout","Input","event"],"mappings":";;;;;;AAQO,SAASA,EAAUC,GAA0B;AAClD,QAAMC,IAAgBC,EAAqBF,GAAUG,CAAiB,GAChE;AAAA,IACJ,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,MAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,IAAAC;AAAA,IACA,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,yBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,KAAAC;AAAA,IACA,KAAAC;AAAA,IACA,WAAAC;AAAA,IACA,oBAAoBC;AAAA,IACpB,GAAGC;AAAA,EAAA,IACDzB,GACE,EAAE,SAAA0B,GAAS,gBAAAC,GAAgB,eAAAC,GAAe,iBAAAC,EAAA,IAAoBC,EAAY;AAAA,IAC9E,SAASlB;AAAA,IACT,cAAAN;AAAA,IACA,aAAAD;AAAA,IACA,iBAAiBmB;AAAA,EAAA,CAClB;AAMD,SACE,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAA5B;AAAA,MACA,aAAAC;AAAA,MACA,cAAAC;AAAA,MACA,YAAAC;AAAA,MACA,SAASmB;AAAA,MACT,gBAAAC;AAAA,MACA,eAAAC;AAAA,MACA,WAAAX;AAAA,MACA,yBAAAC;AAAA,MACA,eAAe;AAAA,MACd,GAAGO;AAAA,MAEJ,UAAA,gBAAAM;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,IAAIP;AAAA,UACJ,UAAAjB;AAAA,UACA,MAAAN;AAAA,UACA,MAAAK;AAAA,UACA,OAAOK,KAAS;AAAA,UAChB,aAAAC;AAAA,UACA,UAzBe,CAACoB,MAAyC;AAC7D,YAAAnB,IAAWmB,EAAM,OAAO,KAAK;AAAA,UAC/B;AAAA,UAwBM,QAAAlB;AAAA,UACA,oBAAkBa;AAAA,UAClB,gBAAcnB;AAAA,UACd,YAAAC;AAAA,UACA,gBAAAS;AAAA,UACA,cAAAD;AAAA,UACA,KAAAE;AAAA,UACA,KAAAC;AAAA,UACA,WAAAC;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"TextInput.js","sources":["../../../../../src/components/Common/UI/TextInput/TextInput.tsx"],"sourcesContent":["import type { ChangeEvent } from 'react'\nimport { Input } from '../Input'\nimport { useFieldIds } from '../hooks/useFieldIds'\nimport type { TextInputProps } from './TextInputTypes'\nimport { TextInputDefaults } from './TextInputTypes'\nimport { applyMissingDefaults } from '@/helpers/applyMissingDefaults'\nimport { FieldLayout } from '@/components/Common/FieldLayout'\n\nexport function TextInput(rawProps: TextInputProps) {\n const resolvedProps = applyMissingDefaults(rawProps, TextInputDefaults)\n const {\n name,\n label,\n description,\n errorMessage,\n isRequired,\n type,\n inputRef,\n isInvalid,\n isDisabled,\n id,\n value,\n placeholder,\n onChange,\n onBlur,\n className,\n shouldVisuallyHideLabel,\n adornmentEnd,\n adornmentStart,\n min,\n max,\n maxLength,\n 'aria-describedby': ariaDescribedByFromProps,\n 'aria-labelledby': ariaLabelledBy,\n ...otherProps\n } = resolvedProps\n const { inputId, errorMessageId, descriptionId, ariaDescribedBy } = useFieldIds({\n inputId: id,\n errorMessage,\n description,\n ariaDescribedBy: ariaDescribedByFromProps,\n })\n\n const handleChange = (event: ChangeEvent<HTMLInputElement>) => {\n onChange?.(event.target.value)\n }\n\n return (\n <FieldLayout\n label={label}\n description={description}\n errorMessage={errorMessage}\n isRequired={isRequired}\n htmlFor={inputId}\n errorMessageId={errorMessageId}\n descriptionId={descriptionId}\n className={className}\n shouldVisuallyHideLabel={shouldVisuallyHideLabel}\n withErrorIcon={false}\n {...otherProps}\n >\n <Input\n id={inputId}\n inputRef={inputRef}\n name={name}\n type={type}\n value={value ?? ''}\n placeholder={placeholder}\n onChange={handleChange}\n onBlur={onBlur}\n aria-describedby={ariaDescribedBy}\n aria-labelledby={ariaLabelledBy}\n aria-invalid={isInvalid}\n isDisabled={isDisabled}\n adornmentStart={adornmentStart}\n adornmentEnd={adornmentEnd}\n min={min}\n max={max}\n maxLength={maxLength}\n />\n </FieldLayout>\n )\n}\n"],"names":["TextInput","rawProps","resolvedProps","applyMissingDefaults","TextInputDefaults","name","label","description","errorMessage","isRequired","type","inputRef","isInvalid","isDisabled","id","value","placeholder","onChange","onBlur","className","shouldVisuallyHideLabel","adornmentEnd","adornmentStart","min","max","maxLength","ariaDescribedByFromProps","ariaLabelledBy","otherProps","inputId","errorMessageId","descriptionId","ariaDescribedBy","useFieldIds","jsx","FieldLayout","Input","event"],"mappings":";;;;;;AAQO,SAASA,EAAUC,GAA0B;AAClD,QAAMC,IAAgBC,EAAqBF,GAAUG,CAAiB,GAChE;AAAA,IACJ,MAAAC;AAAA,IACA,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,cAAAC;AAAA,IACA,YAAAC;AAAA,IACA,MAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAC;AAAA,IACA,YAAAC;AAAA,IACA,IAAAC;AAAA,IACA,OAAAC;AAAA,IACA,aAAAC;AAAA,IACA,UAAAC;AAAA,IACA,QAAAC;AAAA,IACA,WAAAC;AAAA,IACA,yBAAAC;AAAA,IACA,cAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,KAAAC;AAAA,IACA,KAAAC;AAAA,IACA,WAAAC;AAAA,IACA,oBAAoBC;AAAA,IACpB,mBAAmBC;AAAA,IACnB,GAAGC;AAAA,EAAA,IACD1B,GACE,EAAE,SAAA2B,GAAS,gBAAAC,GAAgB,eAAAC,GAAe,iBAAAC,EAAA,IAAoBC,EAAY;AAAA,IAC9E,SAASnB;AAAA,IACT,cAAAN;AAAA,IACA,aAAAD;AAAA,IACA,iBAAiBmB;AAAA,EAAA,CAClB;AAMD,SACE,gBAAAQ;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAA7B;AAAA,MACA,aAAAC;AAAA,MACA,cAAAC;AAAA,MACA,YAAAC;AAAA,MACA,SAASoB;AAAA,MACT,gBAAAC;AAAA,MACA,eAAAC;AAAA,MACA,WAAAZ;AAAA,MACA,yBAAAC;AAAA,MACA,eAAe;AAAA,MACd,GAAGQ;AAAA,MAEJ,UAAA,gBAAAM;AAAA,QAACE;AAAA,QAAA;AAAA,UACC,IAAIP;AAAA,UACJ,UAAAlB;AAAA,UACA,MAAAN;AAAA,UACA,MAAAK;AAAA,UACA,OAAOK,KAAS;AAAA,UAChB,aAAAC;AAAA,UACA,UAzBe,CAACqB,MAAyC;AAC7D,YAAApB,IAAWoB,EAAM,OAAO,KAAK;AAAA,UAC/B;AAAA,UAwBM,QAAAnB;AAAA,UACA,oBAAkBc;AAAA,UAClB,mBAAiBL;AAAA,UACjB,gBAAcf;AAAA,UACd,YAAAC;AAAA,UACA,gBAAAS;AAAA,UACA,cAAAD;AAAA,UACA,KAAAE;AAAA,UACA,KAAAC;AAAA,UACA,WAAAC;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
@@ -1,7 +1,7 @@
1
1
  import { Ref, InputHTMLAttributes } from 'react';
2
2
  import { InputProps } from '../Input/InputTypes';
3
3
  import { SharedFieldLayoutProps } from '../../FieldLayout/FieldLayoutTypes';
4
- export interface TextInputProps extends SharedFieldLayoutProps, Pick<InputHTMLAttributes<HTMLInputElement>, 'name' | 'id' | 'placeholder' | 'className' | 'type' | 'min' | 'max' | 'maxLength'>, Pick<InputHTMLAttributes<HTMLInputElement>, 'aria-describedby'> {
4
+ export interface TextInputProps extends SharedFieldLayoutProps, Pick<InputHTMLAttributes<HTMLInputElement>, 'name' | 'id' | 'placeholder' | 'className' | 'type' | 'min' | 'max' | 'maxLength'>, Pick<InputHTMLAttributes<HTMLInputElement>, 'aria-describedby' | 'aria-labelledby'> {
5
5
  /**
6
6
  * React ref for the input element
7
7
  */
@@ -1 +1 @@
1
- {"version":3,"file":"TextInputTypes.js","sources":["../../../../../src/components/Common/UI/TextInput/TextInputTypes.ts"],"sourcesContent":["import type { Ref, InputHTMLAttributes } from 'react'\nimport type { InputProps } from '../Input/InputTypes'\nimport type { SharedFieldLayoutProps } from '@/components/Common/FieldLayout/FieldLayoutTypes'\n\nexport interface TextInputProps\n extends\n SharedFieldLayoutProps,\n Pick<\n InputHTMLAttributes<HTMLInputElement>,\n 'name' | 'id' | 'placeholder' | 'className' | 'type' | 'min' | 'max' | 'maxLength'\n >,\n Pick<InputHTMLAttributes<HTMLInputElement>, 'aria-describedby'> {\n /**\n * React ref for the input element\n */\n inputRef?: Ref<HTMLInputElement>\n /**\n * Current value of the input\n */\n value?: string\n /**\n * Callback when input value changes\n */\n onChange?: (value: string) => void\n /**\n * Indicates that the field has an error\n */\n isInvalid?: boolean\n /**\n * Disables the input and prevents interaction\n */\n isDisabled?: boolean\n /**\n * Handler for blur events\n */\n onBlur?: () => void\n /**\n * Element to display at the start of the input\n */\n adornmentStart?: InputProps['adornmentStart']\n /**\n * Element to display at the end of the input\n */\n adornmentEnd?: InputProps['adornmentEnd']\n}\n\n/**\n * Default prop values for TextInput component.\n * These are used by the component adapter to automatically provide defaults.\n */\nexport const TextInputDefaults = {\n type: 'text',\n isInvalid: false,\n isDisabled: false,\n} as const satisfies Partial<TextInputProps>\n"],"names":["TextInputDefaults"],"mappings":"AAkDO,MAAMA,IAAoB;AAAA,EAC/B,MAAM;AAAA,EACN,WAAW;AAAA,EACX,YAAY;AACd;"}
1
+ {"version":3,"file":"TextInputTypes.js","sources":["../../../../../src/components/Common/UI/TextInput/TextInputTypes.ts"],"sourcesContent":["import type { Ref, InputHTMLAttributes } from 'react'\nimport type { InputProps } from '../Input/InputTypes'\nimport type { SharedFieldLayoutProps } from '@/components/Common/FieldLayout/FieldLayoutTypes'\n\nexport interface TextInputProps\n extends\n SharedFieldLayoutProps,\n Pick<\n InputHTMLAttributes<HTMLInputElement>,\n 'name' | 'id' | 'placeholder' | 'className' | 'type' | 'min' | 'max' | 'maxLength'\n >,\n Pick<InputHTMLAttributes<HTMLInputElement>, 'aria-describedby' | 'aria-labelledby'> {\n /**\n * React ref for the input element\n */\n inputRef?: Ref<HTMLInputElement>\n /**\n * Current value of the input\n */\n value?: string\n /**\n * Callback when input value changes\n */\n onChange?: (value: string) => void\n /**\n * Indicates that the field has an error\n */\n isInvalid?: boolean\n /**\n * Disables the input and prevents interaction\n */\n isDisabled?: boolean\n /**\n * Handler for blur events\n */\n onBlur?: () => void\n /**\n * Element to display at the start of the input\n */\n adornmentStart?: InputProps['adornmentStart']\n /**\n * Element to display at the end of the input\n */\n adornmentEnd?: InputProps['adornmentEnd']\n}\n\n/**\n * Default prop values for TextInput component.\n * These are used by the component adapter to automatically provide defaults.\n */\nexport const TextInputDefaults = {\n type: 'text',\n isInvalid: false,\n isDisabled: false,\n} as const satisfies Partial<TextInputProps>\n"],"names":["TextInputDefaults"],"mappings":"AAkDO,MAAMA,IAAoB;AAAA,EAC/B,MAAM;AAAA,EACN,WAAW;AAAA,EACX,YAAY;AACd;"}
@@ -2,10 +2,9 @@ import { jsx as i } from "react/jsx-runtime";
2
2
  import { useTranslation as e } from "react-i18next";
3
3
  import { useAssignSignatory as s, SignatoryAssignmentMode as o } from "./useAssignSignatory.js";
4
4
  import r from "./AssignSignatorySelection.module.scss.js";
5
- import "../../../shared/constants.js";
6
5
  import "classnames";
7
6
  import { RadioGroupField as a } from "../../Common/Fields/RadioGroupField/RadioGroupField.js";
8
- const S = () => {
7
+ const u = () => {
9
8
  const { t: n } = e("Company.AssignSignatory"), { onSignatoryAssignmentModeChange: t } = s();
10
9
  return /* @__PURE__ */ i("section", { className: r.container, children: /* @__PURE__ */ i(
11
10
  a,
@@ -28,6 +27,6 @@ const S = () => {
28
27
  ) });
29
28
  };
30
29
  export {
31
- S as AssignSignatorySelection
30
+ u as AssignSignatorySelection
32
31
  };
33
32
  //# sourceMappingURL=AssignSignatorySelection.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AssignSignatorySelection.js","sources":["../../../../src/components/Company/AssignSignatory/AssignSignatorySelection.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { SignatoryAssignmentMode, useAssignSignatory } from './useAssignSignatory'\nimport styles from './AssignSignatorySelection.module.scss'\nimport { RadioGroupField } from '@/components/Common'\n\nexport const AssignSignatorySelection = () => {\n const { t } = useTranslation('Company.AssignSignatory')\n const { onSignatoryAssignmentModeChange } = useAssignSignatory()\n\n return (\n <section className={styles.container}>\n <RadioGroupField\n onChange={onSignatoryAssignmentModeChange}\n label={t('signingOptions.label')}\n shouldVisuallyHideLabel\n name=\"signatoryAssignmentMode\"\n options={[\n {\n label: t('signingOptions.selfSign'),\n value: SignatoryAssignmentMode.createSignatory,\n },\n {\n label: t('signingOptions.appointOther'),\n value: SignatoryAssignmentMode.inviteSignatory,\n },\n ]}\n />\n </section>\n )\n}\n"],"names":["AssignSignatorySelection","t","useTranslation","onSignatoryAssignmentModeChange","useAssignSignatory","jsx","styles","RadioGroupField","SignatoryAssignmentMode"],"mappings":";;;;;;;AAKO,MAAMA,IAA2B,MAAM;AAC5C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB,GAChD,EAAE,iCAAAC,EAAA,IAAoCC,EAAA;AAE5C,SACE,gBAAAC,EAAC,WAAA,EAAQ,WAAWC,EAAO,WACzB,UAAA,gBAAAD;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,UAAUJ;AAAA,MACV,OAAOF,EAAE,sBAAsB;AAAA,MAC/B,yBAAuB;AAAA,MACvB,MAAK;AAAA,MACL,SAAS;AAAA,QACP;AAAA,UACE,OAAOA,EAAE,yBAAyB;AAAA,UAClC,OAAOO,EAAwB;AAAA,QAAA;AAAA,QAEjC;AAAA,UACE,OAAOP,EAAE,6BAA6B;AAAA,UACtC,OAAOO,EAAwB;AAAA,QAAA;AAAA,MACjC;AAAA,IACF;AAAA,EAAA,GAEJ;AAEJ;"}
1
+ {"version":3,"file":"AssignSignatorySelection.js","sources":["../../../../src/components/Company/AssignSignatory/AssignSignatorySelection.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { SignatoryAssignmentMode, useAssignSignatory } from './useAssignSignatory'\nimport styles from './AssignSignatorySelection.module.scss'\nimport { RadioGroupField } from '@/components/Common'\n\nexport const AssignSignatorySelection = () => {\n const { t } = useTranslation('Company.AssignSignatory')\n const { onSignatoryAssignmentModeChange } = useAssignSignatory()\n\n return (\n <section className={styles.container}>\n <RadioGroupField\n onChange={onSignatoryAssignmentModeChange}\n label={t('signingOptions.label')}\n shouldVisuallyHideLabel\n name=\"signatoryAssignmentMode\"\n options={[\n {\n label: t('signingOptions.selfSign'),\n value: SignatoryAssignmentMode.createSignatory,\n },\n {\n label: t('signingOptions.appointOther'),\n value: SignatoryAssignmentMode.inviteSignatory,\n },\n ]}\n />\n </section>\n )\n}\n"],"names":["AssignSignatorySelection","t","useTranslation","onSignatoryAssignmentModeChange","useAssignSignatory","jsx","styles","RadioGroupField","SignatoryAssignmentMode"],"mappings":";;;;;;AAKO,MAAMA,IAA2B,MAAM;AAC5C,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,yBAAyB,GAChD,EAAE,iCAAAC,EAAA,IAAoCC,EAAA;AAE5C,SACE,gBAAAC,EAAC,WAAA,EAAQ,WAAWC,EAAO,WACzB,UAAA,gBAAAD;AAAA,IAACE;AAAA,IAAA;AAAA,MACC,UAAUJ;AAAA,MACV,OAAOF,EAAE,sBAAsB;AAAA,MAC/B,yBAAuB;AAAA,MACvB,MAAK;AAAA,MACL,SAAS;AAAA,QACP;AAAA,UACE,OAAOA,EAAE,yBAAyB;AAAA,UAClC,OAAOO,EAAwB;AAAA,QAAA;AAAA,QAEjC;AAAA,UACE,OAAOP,EAAE,6BAA6B;AAAA,UACtC,OAAOO,EAAwB;AAAA,QAAA;AAAA,MACjC;AAAA,IACF;AAAA,EAAA,GAEJ;AAEJ;"}