@gusto/embedded-react-sdk 0.47.0 → 0.47.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/dist/components/Common/ActionsLayout/ActionsLayout.d.ts +1 -0
  3. package/dist/components/Common/ActionsLayout/ActionsLayout.js.map +1 -1
  4. package/dist/components/Common/Alert/Alert.d.ts +2 -0
  5. package/dist/components/Common/DataView/DataCards/DataCards.d.ts +2 -0
  6. package/dist/components/Common/DataView/DataCards/DataCards.js.map +1 -1
  7. package/dist/components/Common/DataView/DataTable/DataTable.d.ts +2 -0
  8. package/dist/components/Common/DataView/DataTable/DataTable.js.map +1 -1
  9. package/dist/components/Common/DataView/DataView.d.ts +2 -0
  10. package/dist/components/Common/DataView/DataView.js.map +1 -1
  11. package/dist/components/Common/DataView/useDataView.d.ts +4 -0
  12. package/dist/components/Common/DataView/useDataView.js.map +1 -1
  13. package/dist/components/Common/DataView/useSelectionState.d.ts +1 -0
  14. package/dist/components/Common/DataView/useSelectionState.js.map +1 -1
  15. package/dist/components/Common/DateRangeFilter/DateRangeFilter.d.ts +1 -0
  16. package/dist/components/Common/DateRangeFilter/DateRangeFilter.js.map +1 -1
  17. package/dist/components/Common/DetailViewLayout/DetailViewLayout.d.ts +1 -0
  18. package/dist/components/Common/DetailViewLayout/DetailViewLayout.js.map +1 -1
  19. package/dist/components/Common/DetailViewLayout/DetailViewLayoutTypes.d.ts +1 -0
  20. package/dist/components/Common/DocumentList/DocumentList.d.ts +6 -0
  21. package/dist/components/Common/DocumentList/DocumentList.js.map +1 -1
  22. package/dist/components/Common/DocumentViewer/DocumentViewer.d.ts +1 -0
  23. package/dist/components/Common/DocumentViewer/DocumentViewer.js.map +1 -1
  24. package/dist/components/Common/EmptyData/EmptyData.d.ts +1 -0
  25. package/dist/components/Common/EmptyData/EmptyData.js.map +1 -1
  26. package/dist/components/Common/FadeIn/FadeIn.d.ts +1 -0
  27. package/dist/components/Common/FadeIn/FadeIn.js.map +1 -1
  28. package/dist/components/Common/FieldCaption/FieldCaption.d.ts +8 -0
  29. package/dist/components/Common/FieldCaption/FieldCaption.js.map +1 -1
  30. package/dist/components/Common/FieldDescription/FieldDescription.d.ts +5 -0
  31. package/dist/components/Common/FieldDescription/FieldDescription.js.map +1 -1
  32. package/dist/components/Common/FieldErrorMessage/FieldErrorMessage.d.ts +5 -0
  33. package/dist/components/Common/FieldErrorMessage/FieldErrorMessage.js.map +1 -1
  34. package/dist/components/Common/FieldLayout/FieldLayout.d.ts +5 -0
  35. package/dist/components/Common/FieldLayout/FieldLayout.js.map +1 -1
  36. package/dist/components/Common/FieldLayout/FieldLayoutTypes.d.ts +15 -0
  37. package/dist/components/Common/Fieldset/Fieldset.d.ts +2 -0
  38. package/dist/components/Common/Fieldset/Fieldset.js.map +1 -1
  39. package/dist/components/Common/Flex/Flex.d.ts +4 -0
  40. package/dist/components/Common/Flex/Flex.js.map +1 -1
  41. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.d.ts +20 -0
  42. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.js.map +1 -1
  43. package/dist/components/Common/FlowBreadcrumbs/FlowBreadcrumbsTypes.d.ts +33 -7
  44. package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.d.ts +16 -0
  45. package/dist/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.js.map +1 -1
  46. package/dist/components/Common/Form/Form.d.ts +2 -0
  47. package/dist/components/Common/Form/Form.js.map +1 -1
  48. package/dist/components/Common/Grid/Grid.d.ts +2 -0
  49. package/dist/components/Common/Grid/Grid.js.map +1 -1
  50. package/dist/components/Common/HamburgerMenu/HamburgerMenu.d.ts +7 -0
  51. package/dist/components/Common/HamburgerMenu/HamburgerMenu.js.map +1 -1
  52. package/dist/components/Common/HamburgerMenu/HamburgerMenuTypes.d.ts +11 -0
  53. package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.d.ts +7 -0
  54. package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.js.map +1 -1
  55. package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayoutTypes.d.ts +14 -0
  56. package/dist/components/Common/InlineSpinner/InlineSpinner.d.ts +1 -0
  57. package/dist/components/Common/InlineSpinner/InlineSpinner.js.map +1 -1
  58. package/dist/components/Common/InternalError/InternalError.d.ts +1 -0
  59. package/dist/components/Common/InternalError/InternalError.js.map +1 -1
  60. package/dist/components/Common/Loading/Loading.d.ts +2 -0
  61. package/dist/components/Common/Loading/Loading.js.map +1 -1
  62. package/dist/components/Common/OnboardingStatusBadge/index.d.ts +3 -0
  63. package/dist/components/Common/OnboardingStatusBadge/index.js.map +1 -1
  64. package/dist/components/Common/ReorderableList/DropZone.d.ts +1 -0
  65. package/dist/components/Common/ReorderableList/DropZone.js.map +1 -1
  66. package/dist/components/Common/ReorderableList/ReorderableItem.d.ts +1 -3
  67. package/dist/components/Common/ReorderableList/ReorderableItem.js.map +1 -1
  68. package/dist/components/Common/ReorderableList/ReorderableList.d.ts +1 -0
  69. package/dist/components/Common/ReorderableList/ReorderableList.js.map +1 -1
  70. package/dist/components/Common/ReorderableList/ReorderableListTypes.d.ts +4 -0
  71. package/dist/components/Common/ReorderableList/constants.d.ts +1 -3
  72. package/dist/components/Common/ReorderableList/constants.js.map +1 -1
  73. package/dist/components/Common/RequirementsList/RequirementsList.d.ts +1 -0
  74. package/dist/components/Common/RequirementsList/RequirementsList.js.map +1 -1
  75. package/dist/components/Common/TaxInputs/TaxInputs.d.ts +7 -0
  76. package/dist/components/Common/TaxInputs/TaxInputs.js.map +1 -1
  77. package/dist/components/Common/Toast/Toast.d.ts +1 -0
  78. package/dist/components/Common/VisuallyHidden/VisuallyHidden.d.ts +2 -0
  79. package/dist/components/Common/VisuallyHidden/VisuallyHidden.js.map +1 -1
  80. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js +6 -7
  81. package/dist/components/Company/AssignSignatory/AssignSignatorySelection.js.map +1 -1
  82. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js +8 -9
  83. package/dist/components/Company/AssignSignatory/CreateSignatory/Actions.js.map +1 -1
  84. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js +3 -5
  85. package/dist/components/Company/AssignSignatory/CreateSignatory/useCreateSignatory.js.map +1 -1
  86. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js +6 -7
  87. package/dist/components/Company/AssignSignatory/InviteSignatory/Actions.js.map +1 -1
  88. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js +3 -5
  89. package/dist/components/Company/AssignSignatory/InviteSignatory/useInviteSignatory.js.map +1 -1
  90. package/dist/components/Company/AssignSignatory/useAssignSignatory.js +5 -7
  91. package/dist/components/Company/AssignSignatory/useAssignSignatory.js.map +1 -1
  92. package/dist/components/Company/BankAccount/BankAccountForm/Actions.js +6 -6
  93. package/dist/components/Company/BankAccount/BankAccountForm/context.js +3 -5
  94. package/dist/components/Company/BankAccount/BankAccountForm/context.js.map +1 -1
  95. package/dist/components/Company/BankAccount/BankAccountList/Actions.js +6 -7
  96. package/dist/components/Company/BankAccount/BankAccountList/Actions.js.map +1 -1
  97. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js +7 -8
  98. package/dist/components/Company/BankAccount/BankAccountVerify/Actions.js.map +1 -1
  99. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js +5 -6
  100. package/dist/components/Company/DocumentSigner/DocumentList/Actions.js.map +1 -1
  101. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js +3 -5
  102. package/dist/components/Company/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  103. package/dist/components/Company/FederalTaxes/Actions.js +6 -7
  104. package/dist/components/Company/FederalTaxes/Actions.js.map +1 -1
  105. package/dist/components/Company/FederalTaxes/Form.js +1 -1
  106. package/dist/components/Company/FederalTaxes/Form.js.map +1 -1
  107. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +8 -10
  108. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  109. package/dist/components/Company/Industry/Actions.js +5 -6
  110. package/dist/components/Company/Industry/Actions.js.map +1 -1
  111. package/dist/components/Company/Industry/Context.js +6 -8
  112. package/dist/components/Company/Industry/Context.js.map +1 -1
  113. package/dist/components/Company/Industry/Edit.js +10 -11
  114. package/dist/components/Company/Industry/Edit.js.map +1 -1
  115. package/dist/components/Company/Locations/LocationForm/Actions.js +2 -3
  116. package/dist/components/Company/Locations/LocationForm/Actions.js.map +1 -1
  117. package/dist/components/Company/Locations/LocationForm/useLocationForm.js +3 -5
  118. package/dist/components/Company/Locations/LocationForm/useLocationForm.js.map +1 -1
  119. package/dist/components/Company/Locations/LocationsList/Actions.js +2 -3
  120. package/dist/components/Company/Locations/LocationsList/Actions.js.map +1 -1
  121. package/dist/components/Company/Locations/LocationsList/List.js +2 -3
  122. package/dist/components/Company/Locations/LocationsList/List.js.map +1 -1
  123. package/dist/components/Company/Locations/LocationsList/useLocationsList.js +3 -5
  124. package/dist/components/Company/Locations/LocationsList/useLocationsList.js.map +1 -1
  125. package/dist/components/Company/OnboardingOverview/context.js +3 -5
  126. package/dist/components/Company/OnboardingOverview/context.js.map +1 -1
  127. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js +5 -6
  128. package/dist/components/Company/StateTaxes/StateTaxesForm/Actions.js.map +1 -1
  129. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js +3 -5
  130. package/dist/components/Company/StateTaxes/StateTaxesForm/context.js.map +1 -1
  131. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js +6 -7
  132. package/dist/components/Company/StateTaxes/StateTaxesList/Actions.js.map +1 -1
  133. package/dist/components/Company/StateTaxes/StateTaxesList/context.js +3 -5
  134. package/dist/components/Company/StateTaxes/StateTaxesList/context.js.map +1 -1
  135. package/dist/components/Contractor/Address/Form.js +4 -4
  136. package/dist/components/Contractor/Address/useAddress.js +5 -7
  137. package/dist/components/Contractor/Address/useAddress.js.map +1 -1
  138. package/dist/components/Employee/Deductions/management/DeductionsCard/DeductionsCard.js +1 -1
  139. package/dist/components/Employee/Documents/management/DocumentsCard/DocumentsCard.js +12 -12
  140. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js +4 -5
  141. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/Actions.js.map +1 -1
  142. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js +3 -5
  143. package/dist/components/Employee/Documents/onboarding/DocumentSigner/DocumentList/useDocumentList.js.map +1 -1
  144. package/dist/components/Employee/FederalTaxes/management/FederalTaxesEditForm.js +1 -1
  145. package/dist/components/Employee/FederalTaxes/onboarding/FederalTaxes.js +1 -1
  146. package/dist/components/Employee/OnboardingSummary/OnboardingSummary.js +4 -4
  147. package/dist/components/Employee/PaymentMethod/onboarding/ListView.js +13 -13
  148. package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.js +2 -3
  149. package/dist/components/Employee/PaymentMethod/shared/BankFormBody/BankFormBody.js.map +1 -1
  150. package/dist/components/Employee/PaymentMethod/shared/SplitPaymentsFormBody/SplitPaymentsFormBody.js +1 -1
  151. package/dist/components/Employee/Paystubs/management/PaystubsCard/PaystubsCard.js +6 -6
  152. package/dist/components/Employee/Profile/management/ProfileCard/ProfileCard.js +12 -12
  153. package/dist/components/Employee/Profile/management/ProfileEditForm.js +1 -1
  154. package/dist/components/Employee/Profile/onboarding/EmployeeProfile.js +1 -1
  155. package/dist/components/Employee/StateTaxes/management/StateTaxesEditForm.js +1 -1
  156. package/dist/components/Employee/StateTaxes/onboarding/StateTaxes.js +1 -1
  157. package/dist/components/Employee/Taxes/Actions.js +7 -8
  158. package/dist/components/Employee/Taxes/Actions.js.map +1 -1
  159. package/dist/components/Employee/Taxes/useTaxes.js +3 -5
  160. package/dist/components/Employee/Taxes/useTaxes.js.map +1 -1
  161. package/dist/components/Employee/exports/employeeManagement.d.ts +0 -2
  162. package/dist/components/Employee/exports/employeeManagement.js +50 -52
  163. package/dist/components/Employee/exports/employeeManagement.js.map +1 -1
  164. package/dist/components/Employee/exports/employeeOnboarding.d.ts +1 -0
  165. package/dist/components/Employee/exports/employeeOnboarding.js +20 -18
  166. package/dist/components/Employee/exports/employeeOnboarding.js.map +1 -1
  167. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js +10 -11
  168. package/dist/components/Payroll/OffCyclePayPeriodDateForm/OffCyclePayPeriodDateFormPresentation.js.map +1 -1
  169. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js +0 -1
  170. package/dist/components/Payroll/OffCycleReasonSelection/OffCycleReasonSelectionPresentation.js.map +1 -1
  171. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js +2 -3
  172. package/dist/components/Payroll/OffCycleTaxWithholdingModal/OffCycleTaxWithholdingModal.js.map +1 -1
  173. package/dist/components/Payroll/usePreparedPayrollData.js +8 -10
  174. package/dist/components/Payroll/usePreparedPayrollData.js.map +1 -1
  175. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js +2 -3
  176. package/dist/components/TimeOff/HolidayPolicyDetail/HolidayPolicyDetailPresentation.js.map +1 -1
  177. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js +24 -25
  178. package/dist/components/TimeOff/shared/PolicyDetailLayout/PolicyDetailLayout.js.map +1 -1
  179. package/dist/contexts/GustoProvider/GustoProvider.d.ts +34 -1
  180. package/dist/contexts/GustoProvider/GustoProvider.js.map +1 -1
  181. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +42 -2
  182. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +2 -3
  183. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  184. package/dist/contexts/GustoProvider/SDKI18next.d.ts +1 -1
  185. package/dist/contexts/GustoProvider/SDKI18next.js.map +1 -1
  186. package/dist/contexts/GustoProvider/index.d.ts +0 -2
  187. package/dist/contexts/ThemeProvider/ThemeProvider.d.ts +5 -1
  188. package/dist/contexts/ThemeProvider/ThemeProvider.js.map +1 -1
  189. package/dist/contexts/ThemeProvider/customRender.d.ts +1 -0
  190. package/dist/contexts/ThemeProvider/index.d.ts +0 -1
  191. package/dist/contexts/ThemeProvider/theme.d.ts +7 -101
  192. package/dist/contexts/ThemeProvider/theme.js +58 -64
  193. package/dist/contexts/ThemeProvider/theme.js.map +1 -1
  194. package/dist/contexts/ThemeProvider/types.d.ts +181 -0
  195. package/dist/contexts/ThemeProvider/useTheme.d.ts +4 -0
  196. package/dist/contexts/ThemeProvider/useTheme.js.map +1 -1
  197. package/dist/contexts/index.d.ts +1 -0
  198. package/dist/index.d.ts +3 -2
  199. package/dist/index.js +145 -141
  200. package/dist/partner-hook-utils/form/fields/CheckboxHookField.js +6 -7
  201. package/dist/partner-hook-utils/form/fields/CheckboxHookField.js.map +1 -1
  202. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js +6 -7
  203. package/dist/partner-hook-utils/form/fields/NumberInputHookField.js.map +1 -1
  204. package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js +8 -9
  205. package/dist/partner-hook-utils/form/fields/RadioGroupHookField.js.map +1 -1
  206. package/dist/partner-hook-utils/form/fields/SelectHookField.js +2 -3
  207. package/dist/partner-hook-utils/form/fields/SelectHookField.js.map +1 -1
  208. package/dist/partner-hook-utils/form/fields/SwitchHookField.js +12 -13
  209. package/dist/partner-hook-utils/form/fields/SwitchHookField.js.map +1 -1
  210. package/dist/partner-hook-utils/form/fields/TextInputHookField.js +8 -9
  211. package/dist/partner-hook-utils/form/fields/TextInputHookField.js.map +1 -1
  212. package/dist/partner-hook-utils/form/fields/index.d.ts +2 -0
  213. package/dist/partner-hook-utils/form/index.d.ts +1 -1
  214. package/docs/reference/endpoint-inventory.json +16 -16
  215. package/package.json +7 -6
@@ -1 +1 @@
1
- {"version":3,"file":"FieldErrorMessage.js","sources":["../../../../src/components/Common/FieldErrorMessage/FieldErrorMessage.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react'\nimport classNames from 'classnames'\nimport styles from './FieldErrorMessage.module.scss'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface FieldErrorMessageProps extends HTMLAttributes<HTMLParagraphElement> {\n withErrorIcon?: boolean\n}\n\nexport function FieldErrorMessage({\n children,\n id,\n className,\n withErrorIcon = true,\n ...props\n}: FieldErrorMessageProps) {\n const { Text } = useComponentContext()\n\n return (\n children && (\n <Text\n id={id}\n className={classNames(styles.root, className, {\n [styles.withErrorIcon as string]: withErrorIcon,\n })}\n {...props}\n >\n {children}\n </Text>\n )\n )\n}\n"],"names":["FieldErrorMessage","children","id","className","withErrorIcon","props","Text","useComponentContext","jsx","classNames","styles"],"mappings":";;;;AASO,SAASA,EAAkB;AAAA,EAChC,UAAAC;AAAA,EACA,IAAAC;AAAA,EACA,WAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,GAAGC;AACL,GAA2B;AACzB,QAAM,EAAE,MAAAC,EAAA,IAASC,EAAA;AAEjB,SACEN,KACE,gBAAAO;AAAA,IAACF;AAAA,IAAA;AAAA,MACC,IAAAJ;AAAA,MACA,WAAWO,EAAWC,EAAO,MAAMP,GAAW;AAAA,QAC5C,CAACO,EAAO,aAAuB,GAAGN;AAAA,MAAA,CACnC;AAAA,MACA,GAAGC;AAAA,MAEH,UAAAJ;AAAA,IAAA;AAAA,EAAA;AAIT;"}
1
+ {"version":3,"file":"FieldErrorMessage.js","sources":["../../../../src/components/Common/FieldErrorMessage/FieldErrorMessage.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react'\nimport classNames from 'classnames'\nimport styles from './FieldErrorMessage.module.scss'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface FieldErrorMessageProps extends HTMLAttributes<HTMLParagraphElement> {\n withErrorIcon?: boolean\n}\n\n/**\n * Renders a field's validation error message via the component adapter's `Text` primitive.\n *\n * @internal\n */\nexport function FieldErrorMessage({\n children,\n id,\n className,\n withErrorIcon = true,\n ...props\n}: FieldErrorMessageProps) {\n const { Text } = useComponentContext()\n\n return (\n children && (\n <Text\n id={id}\n className={classNames(styles.root, className, {\n [styles.withErrorIcon as string]: withErrorIcon,\n })}\n {...props}\n >\n {children}\n </Text>\n )\n )\n}\n"],"names":["FieldErrorMessage","children","id","className","withErrorIcon","props","Text","useComponentContext","jsx","classNames","styles"],"mappings":";;;;AAcO,SAASA,EAAkB;AAAA,EAChC,UAAAC;AAAA,EACA,IAAAC;AAAA,EACA,WAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,GAAGC;AACL,GAA2B;AACzB,QAAM,EAAE,MAAAC,EAAA,IAASC,EAAA;AAEjB,SACEN,KACE,gBAAAO;AAAA,IAACF;AAAA,IAAA;AAAA,MACC,IAAAJ;AAAA,MACA,WAAWO,EAAWC,EAAO,MAAMP,GAAW;AAAA,QAC5C,CAACO,EAAO,aAAuB,GAAGN;AAAA,MAAA,CACnC;AAAA,MACA,GAAGC;AAAA,MAEH,UAAAJ;AAAA,IAAA;AAAA,EAAA;AAIT;"}
@@ -1,2 +1,7 @@
1
1
  import { FieldLayoutProps } from './FieldLayoutTypes';
2
+ /**
3
+ * Wraps a form control with its label, description, and error message in a consistent vertical layout.
4
+ *
5
+ * @internal
6
+ */
2
7
  export declare const FieldLayout: React.FC<FieldLayoutProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"FieldLayout.js","sources":["../../../../src/components/Common/FieldLayout/FieldLayout.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { FieldDescription } from '../FieldDescription'\nimport { FieldErrorMessage } from '../FieldErrorMessage'\nimport { FieldCaption } from '../FieldCaption/FieldCaption'\nimport styles from './FieldLayout.module.scss'\nimport type { FieldLayoutProps } from './FieldLayoutTypes'\nimport { getDataProps } from '@/helpers/getDataProps'\n\nexport const FieldLayout: React.FC<FieldLayoutProps> = ({\n label,\n description,\n descriptionId,\n errorMessage,\n errorMessageId,\n children,\n isRequired = false,\n htmlFor,\n shouldVisuallyHideLabel = false,\n className,\n withErrorIcon = true,\n ...props\n}: FieldLayoutProps) => {\n return (\n <div className={classNames(styles.root, className)} {...getDataProps(props)}>\n <div\n className={classNames(styles.labelAndDescription, {\n [styles.withVisibleLabel as string]: !shouldVisuallyHideLabel,\n [styles.withDescription as string]: Boolean(description),\n })}\n >\n <FieldCaption\n htmlFor={htmlFor}\n isRequired={isRequired}\n isVisuallyHidden={shouldVisuallyHideLabel}\n >\n {label}\n </FieldCaption>\n <FieldDescription id={descriptionId}>{description}</FieldDescription>\n </div>\n {children}\n <FieldErrorMessage\n id={errorMessageId}\n className={styles.errorMessage}\n withErrorIcon={withErrorIcon}\n >\n {errorMessage}\n </FieldErrorMessage>\n </div>\n )\n}\n"],"names":["FieldLayout","label","description","descriptionId","errorMessage","errorMessageId","children","isRequired","htmlFor","shouldVisuallyHideLabel","className","withErrorIcon","props","jsxs","classNames","styles","getDataProps","jsx","FieldCaption","FieldDescription","FieldErrorMessage"],"mappings":";;;;;;;AAQO,MAAMA,IAA0C,CAAC;AAAA,EACtD,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,SAAAC;AAAA,EACA,yBAAAC,IAA0B;AAAA,EAC1B,WAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,GAAGC;AACL,MAEI,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAWC,EAAO,MAAML,CAAS,GAAI,GAAGM,EAAaJ,CAAK,GACxE,UAAA;AAAA,EAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAWC,EAAO,qBAAqB;AAAA,QAChD,CAACA,EAAO,gBAA0B,GAAG,CAACN;AAAA,QACtC,CAACM,EAAO,eAAyB,GAAG,EAAQb;AAAA,MAAW,CACxD;AAAA,MAED,UAAA;AAAA,QAAA,gBAAAe;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,SAAAV;AAAA,YACA,YAAAD;AAAA,YACA,kBAAkBE;AAAA,YAEjB,UAAAR;AAAA,UAAA;AAAA,QAAA;AAAA,QAEH,gBAAAgB,EAACE,GAAA,EAAiB,IAAIhB,GAAgB,UAAAD,EAAA,CAAY;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAAA,EAEnDI;AAAA,EACD,gBAAAW;AAAA,IAACG;AAAA,IAAA;AAAA,MACC,IAAIf;AAAA,MACJ,WAAWU,EAAO;AAAA,MAClB,eAAAJ;AAAA,MAEC,UAAAP;AAAA,IAAA;AAAA,EAAA;AACH,GACF;"}
1
+ {"version":3,"file":"FieldLayout.js","sources":["../../../../src/components/Common/FieldLayout/FieldLayout.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { FieldDescription } from '../FieldDescription'\nimport { FieldErrorMessage } from '../FieldErrorMessage'\nimport { FieldCaption } from '../FieldCaption/FieldCaption'\nimport styles from './FieldLayout.module.scss'\nimport type { FieldLayoutProps } from './FieldLayoutTypes'\nimport { getDataProps } from '@/helpers/getDataProps'\n\n/**\n * Wraps a form control with its label, description, and error message in a consistent vertical layout.\n *\n * @internal\n */\nexport const FieldLayout: React.FC<FieldLayoutProps> = ({\n label,\n description,\n descriptionId,\n errorMessage,\n errorMessageId,\n children,\n isRequired = false,\n htmlFor,\n shouldVisuallyHideLabel = false,\n className,\n withErrorIcon = true,\n ...props\n}: FieldLayoutProps) => {\n return (\n <div className={classNames(styles.root, className)} {...getDataProps(props)}>\n <div\n className={classNames(styles.labelAndDescription, {\n [styles.withVisibleLabel as string]: !shouldVisuallyHideLabel,\n [styles.withDescription as string]: Boolean(description),\n })}\n >\n <FieldCaption\n htmlFor={htmlFor}\n isRequired={isRequired}\n isVisuallyHidden={shouldVisuallyHideLabel}\n >\n {label}\n </FieldCaption>\n <FieldDescription id={descriptionId}>{description}</FieldDescription>\n </div>\n {children}\n <FieldErrorMessage\n id={errorMessageId}\n className={styles.errorMessage}\n withErrorIcon={withErrorIcon}\n >\n {errorMessage}\n </FieldErrorMessage>\n </div>\n )\n}\n"],"names":["FieldLayout","label","description","descriptionId","errorMessage","errorMessageId","children","isRequired","htmlFor","shouldVisuallyHideLabel","className","withErrorIcon","props","jsxs","classNames","styles","getDataProps","jsx","FieldCaption","FieldDescription","FieldErrorMessage"],"mappings":";;;;;;;AAaO,MAAMA,IAA0C,CAAC;AAAA,EACtD,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,SAAAC;AAAA,EACA,yBAAAC,IAA0B;AAAA,EAC1B,WAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,GAAGC;AACL,MAEI,gBAAAC,EAAC,OAAA,EAAI,WAAWC,EAAWC,EAAO,MAAML,CAAS,GAAI,GAAGM,EAAaJ,CAAK,GACxE,UAAA;AAAA,EAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAWC,EAAO,qBAAqB;AAAA,QAChD,CAACA,EAAO,gBAA0B,GAAG,CAACN;AAAA,QACtC,CAACM,EAAO,eAAyB,GAAG,EAAQb;AAAA,MAAW,CACxD;AAAA,MAED,UAAA;AAAA,QAAA,gBAAAe;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,SAAAV;AAAA,YACA,YAAAD;AAAA,YACA,kBAAkBE;AAAA,YAEjB,UAAAR;AAAA,UAAA;AAAA,QAAA;AAAA,QAEH,gBAAAgB,EAACE,GAAA,EAAiB,IAAIhB,GAAgB,UAAAD,EAAA,CAAY;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAAA,EAEnDI;AAAA,EACD,gBAAAW;AAAA,IAACG;AAAA,IAAA;AAAA,MACC,IAAIf;AAAA,MACJ,WAAWU,EAAO;AAAA,MAClB,eAAAJ;AAAA,MAEC,UAAAP;AAAA,IAAA;AAAA,EAAA;AACH,GACF;"}
@@ -1,5 +1,14 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { DataAttributes } from '../../../types/Helpers';
3
+ /**
4
+ * Common layout props shared by form controls — label, description, error message, required state, and visual label hiding.
5
+ *
6
+ * @remarks
7
+ * Extended by the props interfaces of UI primitive components (such as `TextInputProps`, `SelectProps`, and `CheckboxGroupProps`)
8
+ * so each control exposes a consistent surface for labeling, helper text, and validation messaging.
9
+ *
10
+ * @public
11
+ */
3
12
  export interface SharedFieldLayoutProps extends DataAttributes {
4
13
  /**
5
14
  * Optional description text for the field
@@ -22,6 +31,9 @@ export interface SharedFieldLayoutProps extends DataAttributes {
22
31
  */
23
32
  shouldVisuallyHideLabel?: boolean;
24
33
  }
34
+ /**
35
+ * @internal
36
+ */
25
37
  export interface InternalFieldLayoutProps {
26
38
  /**
27
39
  * Content to be rendered inside the field layout
@@ -48,5 +60,8 @@ export interface InternalFieldLayoutProps {
48
60
  */
49
61
  withErrorIcon?: boolean;
50
62
  }
63
+ /**
64
+ * @internal
65
+ */
51
66
  export interface FieldLayoutProps extends SharedFieldLayoutProps, InternalFieldLayoutProps {
52
67
  }
@@ -1,4 +1,5 @@
1
1
  import { SharedFieldLayoutProps } from '../FieldLayout/FieldLayoutTypes';
2
+ /** @internal */
2
3
  export interface FieldsetProps extends Omit<SharedFieldLayoutProps, 'label' | 'shouldVisuallyHideLabel'> {
3
4
  children: React.ReactNode;
4
5
  description?: React.ReactNode;
@@ -8,4 +9,5 @@ export interface FieldsetProps extends Omit<SharedFieldLayoutProps, 'label' | 's
8
9
  shouldVisuallyHideLegend?: boolean;
9
10
  className?: string;
10
11
  }
12
+ /** @internal */
11
13
  export declare const Fieldset: React.FC<FieldsetProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"Fieldset.js","sources":["../../../../src/components/Common/Fieldset/Fieldset.tsx"],"sourcesContent":["import { useId } from 'react'\nimport classNames from 'classnames'\nimport { FieldDescription } from '../FieldDescription'\nimport { FieldErrorMessage } from '../FieldErrorMessage'\nimport { FieldCaption } from '../FieldCaption'\nimport type { SharedFieldLayoutProps } from '../FieldLayout/FieldLayoutTypes'\nimport styles from './Fieldset.module.scss'\nimport { getDataProps } from '@/helpers/getDataProps'\n\nexport interface FieldsetProps extends Omit<\n SharedFieldLayoutProps,\n 'label' | 'shouldVisuallyHideLabel'\n> {\n children: React.ReactNode\n description?: React.ReactNode\n errorMessage?: string\n isRequired?: boolean\n legend: React.ReactNode\n shouldVisuallyHideLegend?: boolean\n className?: string\n}\n\nexport const Fieldset: React.FC<FieldsetProps> = ({\n children,\n description,\n errorMessage,\n isRequired = false,\n legend,\n shouldVisuallyHideLegend = false,\n className,\n ...props\n}: FieldsetProps) => {\n const generatedErrorMessageId = useId()\n const errorMessageId = `error-message-${generatedErrorMessageId}`\n\n return (\n <fieldset\n className={classNames(styles.root, className)}\n aria-describedby={errorMessage ? errorMessageId : undefined}\n {...getDataProps(props)}\n >\n <div\n className={classNames(styles.legendAndDescription, {\n [styles.withVisibleLegend as string]: !shouldVisuallyHideLegend,\n [styles.withDescription as string]: Boolean(description),\n })}\n >\n <FieldCaption\n as=\"legend\"\n isRequired={isRequired}\n isVisuallyHidden={shouldVisuallyHideLegend}\n >\n {legend}\n </FieldCaption>\n <FieldDescription>{description}</FieldDescription>\n </div>\n {children}\n <FieldErrorMessage\n id={errorMessageId}\n className={styles.errorMessage}\n aria-live=\"polite\"\n role=\"alert\"\n >\n {errorMessage}\n </FieldErrorMessage>\n </fieldset>\n )\n}\n"],"names":["Fieldset","children","description","errorMessage","isRequired","legend","shouldVisuallyHideLegend","className","props","errorMessageId","useId","jsxs","classNames","styles","getDataProps","jsx","FieldCaption","FieldDescription","FieldErrorMessage"],"mappings":";;;;;;;;AAsBO,MAAMA,IAAoC,CAAC;AAAA,EAChD,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,QAAAC;AAAA,EACA,0BAAAC,IAA2B;AAAA,EAC3B,WAAAC;AAAA,EACA,GAAGC;AACL,MAAqB;AAEnB,QAAMC,IAAiB,iBADSC,EAAA,CAC+B;AAE/D,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAWC,EAAO,MAAMN,CAAS;AAAA,MAC5C,oBAAkBJ,IAAeM,IAAiB;AAAA,MACjD,GAAGK,EAAaN,CAAK;AAAA,MAEtB,UAAA;AAAA,QAAA,gBAAAG;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWC,EAAWC,EAAO,sBAAsB;AAAA,cACjD,CAACA,EAAO,iBAA2B,GAAG,CAACP;AAAA,cACvC,CAACO,EAAO,eAAyB,GAAG,EAAQX;AAAA,YAAW,CACxD;AAAA,YAED,UAAA;AAAA,cAAA,gBAAAa;AAAA,gBAACC;AAAA,gBAAA;AAAA,kBACC,IAAG;AAAA,kBACH,YAAAZ;AAAA,kBACA,kBAAkBE;AAAA,kBAEjB,UAAAD;AAAA,gBAAA;AAAA,cAAA;AAAA,cAEH,gBAAAU,EAACE,KAAkB,UAAAf,EAAA,CAAY;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,QAEhCD;AAAA,QACD,gBAAAc;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,IAAIT;AAAA,YACJ,WAAWI,EAAO;AAAA,YAClB,aAAU;AAAA,YACV,MAAK;AAAA,YAEJ,UAAAV;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"Fieldset.js","sources":["../../../../src/components/Common/Fieldset/Fieldset.tsx"],"sourcesContent":["import { useId } from 'react'\nimport classNames from 'classnames'\nimport { FieldDescription } from '../FieldDescription'\nimport { FieldErrorMessage } from '../FieldErrorMessage'\nimport { FieldCaption } from '../FieldCaption'\nimport type { SharedFieldLayoutProps } from '../FieldLayout/FieldLayoutTypes'\nimport styles from './Fieldset.module.scss'\nimport { getDataProps } from '@/helpers/getDataProps'\n\n/** @internal */\nexport interface FieldsetProps extends Omit<\n SharedFieldLayoutProps,\n 'label' | 'shouldVisuallyHideLabel'\n> {\n children: React.ReactNode\n description?: React.ReactNode\n errorMessage?: string\n isRequired?: boolean\n legend: React.ReactNode\n shouldVisuallyHideLegend?: boolean\n className?: string\n}\n\n/** @internal */\nexport const Fieldset: React.FC<FieldsetProps> = ({\n children,\n description,\n errorMessage,\n isRequired = false,\n legend,\n shouldVisuallyHideLegend = false,\n className,\n ...props\n}: FieldsetProps) => {\n const generatedErrorMessageId = useId()\n const errorMessageId = `error-message-${generatedErrorMessageId}`\n\n return (\n <fieldset\n className={classNames(styles.root, className)}\n aria-describedby={errorMessage ? errorMessageId : undefined}\n {...getDataProps(props)}\n >\n <div\n className={classNames(styles.legendAndDescription, {\n [styles.withVisibleLegend as string]: !shouldVisuallyHideLegend,\n [styles.withDescription as string]: Boolean(description),\n })}\n >\n <FieldCaption\n as=\"legend\"\n isRequired={isRequired}\n isVisuallyHidden={shouldVisuallyHideLegend}\n >\n {legend}\n </FieldCaption>\n <FieldDescription>{description}</FieldDescription>\n </div>\n {children}\n <FieldErrorMessage\n id={errorMessageId}\n className={styles.errorMessage}\n aria-live=\"polite\"\n role=\"alert\"\n >\n {errorMessage}\n </FieldErrorMessage>\n </fieldset>\n )\n}\n"],"names":["Fieldset","children","description","errorMessage","isRequired","legend","shouldVisuallyHideLegend","className","props","errorMessageId","useId","jsxs","classNames","styles","getDataProps","jsx","FieldCaption","FieldDescription","FieldErrorMessage"],"mappings":";;;;;;;;AAwBO,MAAMA,IAAoC,CAAC;AAAA,EAChD,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,QAAAC;AAAA,EACA,0BAAAC,IAA2B;AAAA,EAC3B,WAAAC;AAAA,EACA,GAAGC;AACL,MAAqB;AAEnB,QAAMC,IAAiB,iBADSC,EAAA,CAC+B;AAE/D,SACE,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAWC,EAAO,MAAMN,CAAS;AAAA,MAC5C,oBAAkBJ,IAAeM,IAAiB;AAAA,MACjD,GAAGK,EAAaN,CAAK;AAAA,MAEtB,UAAA;AAAA,QAAA,gBAAAG;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWC,EAAWC,EAAO,sBAAsB;AAAA,cACjD,CAACA,EAAO,iBAA2B,GAAG,CAACP;AAAA,cACvC,CAACO,EAAO,eAAyB,GAAG,EAAQX;AAAA,YAAW,CACxD;AAAA,YAED,UAAA;AAAA,cAAA,gBAAAa;AAAA,gBAACC;AAAA,gBAAA;AAAA,kBACC,IAAG;AAAA,kBACH,YAAAZ;AAAA,kBACA,kBAAkBE;AAAA,kBAEjB,UAAAD;AAAA,gBAAA;AAAA,cAAA;AAAA,cAEH,gBAAAU,EAACE,KAAkB,UAAAf,EAAA,CAAY;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,QAEhCD;AAAA,QACD,gBAAAc;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,IAAIT;AAAA,YACJ,WAAWI,EAAO;AAAA,YAClB,aAAU;AAAA,YACV,MAAK;AAAA,YAEJ,UAAAV;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -1,4 +1,5 @@
1
1
  import { Responsive, CustomPropertyValue } from '../../../helpers/responsive';
2
+ /** @internal */
2
3
  export interface FlexProps {
3
4
  children: React.ReactNode;
4
5
  flexDirection?: Responsive<'row' | 'column'>;
@@ -7,9 +8,12 @@ export interface FlexProps {
7
8
  flexWrap?: Responsive<'wrap' | 'nowrap' | 'wrap-reverse'>;
8
9
  gap?: Responsive<CustomPropertyValue>;
9
10
  }
11
+ /** @internal */
10
12
  export declare function Flex({ children, flexDirection, justifyContent, alignItems, flexWrap, gap, }: FlexProps): import("react").JSX.Element;
13
+ /** @internal */
11
14
  export interface FlexItemProps {
12
15
  flexGrow?: number | 'initial';
13
16
  children: React.ReactNode;
14
17
  }
18
+ /** @internal */
15
19
  export declare function FlexItem({ flexGrow, children }: FlexItemProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Flex.js","sources":["../../../../src/components/Common/Flex/Flex.tsx"],"sourcesContent":["import style from './Flex.module.scss'\nimport {\n setResponsiveCustomProperties,\n type Responsive,\n type CustomPropertyValue,\n} from '@/helpers/responsive'\n\nexport interface FlexProps {\n children: React.ReactNode\n flexDirection?: Responsive<'row' | 'column'>\n justifyContent?: Responsive<\n | 'space-between'\n | 'center'\n | 'flex-start'\n | 'flex-end'\n | 'space-around'\n | 'space-evenly'\n | 'normal'\n >\n alignItems?: Responsive<'center' | 'flex-start' | 'flex-end' | 'stretch'>\n flexWrap?: Responsive<'wrap' | 'nowrap' | 'wrap-reverse'>\n gap?: Responsive<CustomPropertyValue>\n}\n\nexport function Flex({\n children,\n flexDirection = 'row',\n justifyContent = 'normal',\n alignItems = 'flex-start',\n flexWrap,\n gap = 24,\n}: FlexProps) {\n const properties = setResponsiveCustomProperties({\n 'flex-direction': flexDirection,\n 'justify-content': justifyContent,\n 'align-items': alignItems,\n 'flex-wrap': flexWrap,\n gap,\n })\n\n return (\n <div className={style.flexContainer}>\n <div className={style.flex} style={properties}>\n {children}\n </div>\n </div>\n )\n}\n\nexport interface FlexItemProps {\n flexGrow?: number | 'initial'\n children: React.ReactNode\n}\n\nexport function FlexItem({ flexGrow = 'initial', children }: FlexItemProps) {\n return <div style={{ flexGrow: flexGrow }}>{children}</div>\n}\n"],"names":["Flex","children","flexDirection","justifyContent","alignItems","flexWrap","gap","properties","setResponsiveCustomProperties","jsx","style","FlexItem","flexGrow"],"mappings":";;;AAwBO,SAASA,EAAK;AAAA,EACnB,UAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,gBAAAC,IAAiB;AAAA,EACjB,YAAAC,IAAa;AAAA,EACb,UAAAC;AAAA,EACA,KAAAC,IAAM;AACR,GAAc;AACZ,QAAMC,IAAaC,EAA8B;AAAA,IAC/C,kBAAkBN;AAAA,IAClB,mBAAmBC;AAAA,IACnB,eAAeC;AAAA,IACf,aAAaC;AAAA,IACb,KAAAC;AAAA,EAAA,CACD;AAED,SACE,gBAAAG,EAAC,OAAA,EAAI,WAAWC,EAAM,eACpB,UAAA,gBAAAD,EAAC,OAAA,EAAI,WAAWC,EAAM,MAAM,OAAOH,GAChC,UAAAN,GACH,GACF;AAEJ;AAOO,SAASU,EAAS,EAAE,UAAAC,IAAW,WAAW,UAAAX,KAA2B;AAC1E,2BAAQ,OAAA,EAAI,OAAO,EAAE,UAAAW,EAAA,GAAuB,UAAAX,GAAS;AACvD;"}
1
+ {"version":3,"file":"Flex.js","sources":["../../../../src/components/Common/Flex/Flex.tsx"],"sourcesContent":["import style from './Flex.module.scss'\nimport {\n setResponsiveCustomProperties,\n type Responsive,\n type CustomPropertyValue,\n} from '@/helpers/responsive'\n\n/** @internal */\nexport interface FlexProps {\n children: React.ReactNode\n flexDirection?: Responsive<'row' | 'column'>\n justifyContent?: Responsive<\n | 'space-between'\n | 'center'\n | 'flex-start'\n | 'flex-end'\n | 'space-around'\n | 'space-evenly'\n | 'normal'\n >\n alignItems?: Responsive<'center' | 'flex-start' | 'flex-end' | 'stretch'>\n flexWrap?: Responsive<'wrap' | 'nowrap' | 'wrap-reverse'>\n gap?: Responsive<CustomPropertyValue>\n}\n\n/** @internal */\nexport function Flex({\n children,\n flexDirection = 'row',\n justifyContent = 'normal',\n alignItems = 'flex-start',\n flexWrap,\n gap = 24,\n}: FlexProps) {\n const properties = setResponsiveCustomProperties({\n 'flex-direction': flexDirection,\n 'justify-content': justifyContent,\n 'align-items': alignItems,\n 'flex-wrap': flexWrap,\n gap,\n })\n\n return (\n <div className={style.flexContainer}>\n <div className={style.flex} style={properties}>\n {children}\n </div>\n </div>\n )\n}\n\n/** @internal */\nexport interface FlexItemProps {\n flexGrow?: number | 'initial'\n children: React.ReactNode\n}\n\n/** @internal */\nexport function FlexItem({ flexGrow = 'initial', children }: FlexItemProps) {\n return <div style={{ flexGrow: flexGrow }}>{children}</div>\n}\n"],"names":["Flex","children","flexDirection","justifyContent","alignItems","flexWrap","gap","properties","setResponsiveCustomProperties","jsx","style","FlexItem","flexGrow"],"mappings":";;;AA0BO,SAASA,EAAK;AAAA,EACnB,UAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,gBAAAC,IAAiB;AAAA,EACjB,YAAAC,IAAa;AAAA,EACb,UAAAC;AAAA,EACA,KAAAC,IAAM;AACR,GAAc;AACZ,QAAMC,IAAaC,EAA8B;AAAA,IAC/C,kBAAkBN;AAAA,IAClB,mBAAmBC;AAAA,IACnB,eAAeC;AAAA,IACf,aAAaC;AAAA,IACb,KAAAC;AAAA,EAAA,CACD;AAED,SACE,gBAAAG,EAAC,OAAA,EAAI,WAAWC,EAAM,eACpB,UAAA,gBAAAD,EAAC,OAAA,EAAI,WAAWC,EAAM,MAAM,OAAOH,GAChC,UAAAN,GACH,GACF;AAEJ;AASO,SAASU,EAAS,EAAE,UAAAC,IAAW,WAAW,UAAAX,KAA2B;AAC1E,2BAAQ,OAAA,EAAI,OAAO,EAAE,UAAAW,EAAA,GAAuB,UAAAX,GAAS;AACvD;"}
@@ -1,2 +1,22 @@
1
1
  import { FlowBreadcrumbsProps } from './FlowBreadcrumbsTypes';
2
+ /**
3
+ * Renders the breadcrumb trail for a multi-step flow.
4
+ *
5
+ * @remarks
6
+ * Translates each breadcrumb's label via i18next using the optional `namespace`
7
+ * and `variables`, formats `startDate`/`endDate` variables through the locale's
8
+ * short-with-year date formatter, and emits a `breadcrumb/navigate` event when
9
+ * a clickable breadcrumb is selected. A breadcrumb is clickable when
10
+ * `isNavigable` is true, or when `isNavigable` is omitted and `onNavigate` is
11
+ * defined. Switches to a condensed mobile layout when the container only
12
+ * contains the base breakpoint.
13
+ *
14
+ * | Event | Description | Data |
15
+ * | ----- | ----------- | ---- |
16
+ * | `breadcrumb/navigate` | Emitted when a clickable breadcrumb is selected | `{ key: string; onNavigate: (ctx: unknown) => unknown }` |
17
+ *
18
+ * @param props - See {@link FlowBreadcrumbsProps}.
19
+ * @returns The breadcrumb trail rendered through the component adapter.
20
+ * @internal
21
+ */
2
22
  export declare function FlowBreadcrumbs({ breadcrumbs, currentBreadcrumbId, onEvent, }: FlowBreadcrumbsProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"FlowBreadcrumbs.js","sources":["../../../../src/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.tsx"],"sourcesContent":["import type { CustomTypeOptions } from 'i18next'\nimport { useTranslation } from 'react-i18next'\nimport { useMemo, useRef } from 'react'\nimport type { FlowBreadcrumbsProps } from './FlowBreadcrumbsTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { componentEvents } from '@/shared/constants'\nimport { useI18n } from '@/i18n/I18n'\nimport { useLocale } from '@/contexts/LocaleProvider/useLocale'\nimport { useContainerBreakpoints } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\n\nexport function FlowBreadcrumbs({\n breadcrumbs,\n currentBreadcrumbId,\n onEvent,\n}: FlowBreadcrumbsProps) {\n const breadcrumbContainerRef = useRef<HTMLDivElement | null>(null)\n const breakpoints = useContainerBreakpoints({ ref: breadcrumbContainerRef })\n // Small if we only contain the base breakpoint\n const isSmallContainer = breakpoints.length === 1\n\n const { Breadcrumbs } = useComponentContext()\n const { locale } = useLocale()\n const dateFormatter = useDateFormatter()\n const namespaces = breadcrumbs.reduce<Array<keyof CustomTypeOptions['resources']>>(\n (acc, breadcrumb) => {\n if (breadcrumb.namespace) {\n acc.push(breadcrumb.namespace as keyof CustomTypeOptions['resources'])\n }\n return acc\n },\n [],\n )\n useI18n(namespaces)\n const { t } = useTranslation()\n const parsedBreadcrumbs = useMemo(\n () =>\n breadcrumbs.map(breadcrumb => {\n const formattedVariables = breadcrumb.variables\n ? {\n ...breadcrumb.variables,\n startDate:\n typeof breadcrumb.variables.startDate === 'string'\n ? dateFormatter.formatShortWithYear(breadcrumb.variables.startDate)\n : breadcrumb.variables.startDate,\n endDate:\n typeof breadcrumb.variables.endDate === 'string'\n ? dateFormatter.formatShortWithYear(breadcrumb.variables.endDate)\n : breadcrumb.variables.endDate,\n }\n : undefined\n\n const translatedLabel = breadcrumb.namespace\n ? (t(breadcrumb.label, {\n ns: breadcrumb.namespace,\n defaultValue: breadcrumb.label,\n ...formattedVariables,\n } as never) as unknown as string)\n : (t(breadcrumb.label, {\n defaultValue: breadcrumb.label,\n ...formattedVariables,\n } as never) as unknown as string)\n const isClickable =\n breadcrumb.isNavigable !== undefined ? breadcrumb.isNavigable : !!breadcrumb.onNavigate\n\n return {\n id: breadcrumb.id,\n label: translatedLabel,\n isClickable,\n }\n }),\n [breadcrumbs, t, locale],\n )\n\n const handleBreadcrumbClick = (breadcrumbId: string) => {\n const breadcrumb = breadcrumbs.find(breadcrumb => breadcrumb.id === breadcrumbId)\n if (onEvent && breadcrumb?.onNavigate) {\n onEvent(componentEvents.BREADCRUMB_NAVIGATE, {\n key: breadcrumbId,\n onNavigate: breadcrumb.onNavigate,\n })\n }\n }\n return (\n <div ref={breadcrumbContainerRef}>\n <Breadcrumbs\n isSmallContainer={isSmallContainer}\n breadcrumbs={parsedBreadcrumbs}\n currentBreadcrumbId={currentBreadcrumbId}\n onClick={handleBreadcrumbClick}\n />\n </div>\n )\n}\n"],"names":["FlowBreadcrumbs","breadcrumbs","currentBreadcrumbId","onEvent","breadcrumbContainerRef","useRef","isSmallContainer","useContainerBreakpoints","Breadcrumbs","useComponentContext","locale","useLocale","dateFormatter","useDateFormatter","namespaces","acc","breadcrumb","useI18n","t","useTranslation","parsedBreadcrumbs","useMemo","formattedVariables","translatedLabel","isClickable","jsx","breadcrumbId","componentEvents"],"mappings":";;;;;;;;;AAWO,SAASA,EAAgB;AAAA,EAC9B,aAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,SAAAC;AACF,GAAyB;AACvB,QAAMC,IAAyBC,EAA8B,IAAI,GAG3DC,IAFcC,EAAwB,EAAE,KAAKH,GAAwB,EAEtC,WAAW,GAE1C,EAAE,aAAAI,EAAA,IAAgBC,EAAA,GAClB,EAAE,QAAAC,EAAA,IAAWC,EAAA,GACbC,IAAgBC,EAAA,GAChBC,IAAab,EAAY;AAAA,IAC7B,CAACc,GAAKC,OACAA,EAAW,aACbD,EAAI,KAAKC,EAAW,SAAiD,GAEhED;AAAA,IAET,CAAA;AAAA,EAAC;AAEH,EAAAE,EAAQH,CAAU;AAClB,QAAM,EAAE,GAAAI,EAAA,IAAMC,EAAA,GACRC,IAAoBC;AAAA,IACxB,MACEpB,EAAY,IAAI,CAAAe,MAAc;AAC5B,YAAMM,IAAqBN,EAAW,YAClC;AAAA,QACE,GAAGA,EAAW;AAAA,QACd,WACE,OAAOA,EAAW,UAAU,aAAc,WACtCJ,EAAc,oBAAoBI,EAAW,UAAU,SAAS,IAChEA,EAAW,UAAU;AAAA,QAC3B,SACE,OAAOA,EAAW,UAAU,WAAY,WACpCJ,EAAc,oBAAoBI,EAAW,UAAU,OAAO,IAC9DA,EAAW,UAAU;AAAA,MAAA,IAE7B,QAEEO,IAAkBP,EAAW,YAC9BE,EAAEF,EAAW,OAAO;AAAA,QACnB,IAAIA,EAAW;AAAA,QACf,cAAcA,EAAW;AAAA,QACzB,GAAGM;AAAA,MAAA,CACK,IACTJ,EAAEF,EAAW,OAAO;AAAA,QACnB,cAAcA,EAAW;AAAA,QACzB,GAAGM;AAAA,MAAA,CACK,GACRE,IACJR,EAAW,gBAAgB,SAAYA,EAAW,cAAc,CAAC,CAACA,EAAW;AAE/E,aAAO;AAAA,QACL,IAAIA,EAAW;AAAA,QACf,OAAOO;AAAA,QACP,aAAAC;AAAA,MAAA;AAAA,IAEJ,CAAC;AAAA,IACH,CAACvB,GAAaiB,GAAGR,CAAM;AAAA,EAAA;AAYzB,SACE,gBAAAe,EAAC,OAAA,EAAI,KAAKrB,GACR,UAAA,gBAAAqB;AAAA,IAACjB;AAAA,IAAA;AAAA,MACC,kBAAAF;AAAA,MACA,aAAac;AAAA,MACb,qBAAAlB;AAAA,MACA,SAfwB,CAACwB,MAAyB;AACtD,cAAMV,IAAaf,EAAY,KAAK,CAAAe,MAAcA,EAAW,OAAOU,CAAY;AAChF,QAAIvB,KAAWa,GAAY,cACzBb,EAAQwB,EAAgB,qBAAqB;AAAA,UAC3C,KAAKD;AAAA,UACL,YAAYV,EAAW;AAAA,QAAA,CACxB;AAAA,MAEL;AAAA,IAOe;AAAA,EAAA,GAEb;AAEJ;"}
1
+ {"version":3,"file":"FlowBreadcrumbs.js","sources":["../../../../src/components/Common/FlowBreadcrumbs/FlowBreadcrumbs.tsx"],"sourcesContent":["import type { CustomTypeOptions } from 'i18next'\nimport { useTranslation } from 'react-i18next'\nimport { useMemo, useRef } from 'react'\nimport type { FlowBreadcrumbsProps } from './FlowBreadcrumbsTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport { componentEvents } from '@/shared/constants'\nimport { useI18n } from '@/i18n/I18n'\nimport { useLocale } from '@/contexts/LocaleProvider/useLocale'\nimport { useContainerBreakpoints } from '@/hooks/useContainerBreakpoints/useContainerBreakpoints'\nimport { useDateFormatter } from '@/hooks/useDateFormatter'\n\n/**\n * Renders the breadcrumb trail for a multi-step flow.\n *\n * @remarks\n * Translates each breadcrumb's label via i18next using the optional `namespace`\n * and `variables`, formats `startDate`/`endDate` variables through the locale's\n * short-with-year date formatter, and emits a `breadcrumb/navigate` event when\n * a clickable breadcrumb is selected. A breadcrumb is clickable when\n * `isNavigable` is true, or when `isNavigable` is omitted and `onNavigate` is\n * defined. Switches to a condensed mobile layout when the container only\n * contains the base breakpoint.\n *\n * | Event | Description | Data |\n * | ----- | ----------- | ---- |\n * | `breadcrumb/navigate` | Emitted when a clickable breadcrumb is selected | `{ key: string; onNavigate: (ctx: unknown) => unknown }` |\n *\n * @param props - See {@link FlowBreadcrumbsProps}.\n * @returns The breadcrumb trail rendered through the component adapter.\n * @internal\n */\nexport function FlowBreadcrumbs({\n breadcrumbs,\n currentBreadcrumbId,\n onEvent,\n}: FlowBreadcrumbsProps) {\n const breadcrumbContainerRef = useRef<HTMLDivElement | null>(null)\n const breakpoints = useContainerBreakpoints({ ref: breadcrumbContainerRef })\n // Small if we only contain the base breakpoint\n const isSmallContainer = breakpoints.length === 1\n\n const { Breadcrumbs } = useComponentContext()\n const { locale } = useLocale()\n const dateFormatter = useDateFormatter()\n const namespaces = breadcrumbs.reduce<Array<keyof CustomTypeOptions['resources']>>(\n (acc, breadcrumb) => {\n if (breadcrumb.namespace) {\n acc.push(breadcrumb.namespace as keyof CustomTypeOptions['resources'])\n }\n return acc\n },\n [],\n )\n useI18n(namespaces)\n const { t } = useTranslation()\n const parsedBreadcrumbs = useMemo(\n () =>\n breadcrumbs.map(breadcrumb => {\n const formattedVariables = breadcrumb.variables\n ? {\n ...breadcrumb.variables,\n startDate:\n typeof breadcrumb.variables.startDate === 'string'\n ? dateFormatter.formatShortWithYear(breadcrumb.variables.startDate)\n : breadcrumb.variables.startDate,\n endDate:\n typeof breadcrumb.variables.endDate === 'string'\n ? dateFormatter.formatShortWithYear(breadcrumb.variables.endDate)\n : breadcrumb.variables.endDate,\n }\n : undefined\n\n const translatedLabel = breadcrumb.namespace\n ? (t(breadcrumb.label, {\n ns: breadcrumb.namespace,\n defaultValue: breadcrumb.label,\n ...formattedVariables,\n } as never) as unknown as string)\n : (t(breadcrumb.label, {\n defaultValue: breadcrumb.label,\n ...formattedVariables,\n } as never) as unknown as string)\n const isClickable =\n breadcrumb.isNavigable !== undefined ? breadcrumb.isNavigable : !!breadcrumb.onNavigate\n\n return {\n id: breadcrumb.id,\n label: translatedLabel,\n isClickable,\n }\n }),\n [breadcrumbs, t, locale],\n )\n\n const handleBreadcrumbClick = (breadcrumbId: string) => {\n const breadcrumb = breadcrumbs.find(breadcrumb => breadcrumb.id === breadcrumbId)\n if (onEvent && breadcrumb?.onNavigate) {\n onEvent(componentEvents.BREADCRUMB_NAVIGATE, {\n key: breadcrumbId,\n onNavigate: breadcrumb.onNavigate,\n })\n }\n }\n return (\n <div ref={breadcrumbContainerRef}>\n <Breadcrumbs\n isSmallContainer={isSmallContainer}\n breadcrumbs={parsedBreadcrumbs}\n currentBreadcrumbId={currentBreadcrumbId}\n onClick={handleBreadcrumbClick}\n />\n </div>\n )\n}\n"],"names":["FlowBreadcrumbs","breadcrumbs","currentBreadcrumbId","onEvent","breadcrumbContainerRef","useRef","isSmallContainer","useContainerBreakpoints","Breadcrumbs","useComponentContext","locale","useLocale","dateFormatter","useDateFormatter","namespaces","acc","breadcrumb","useI18n","t","useTranslation","parsedBreadcrumbs","useMemo","formattedVariables","translatedLabel","isClickable","jsx","breadcrumbId","componentEvents"],"mappings":";;;;;;;;;AA+BO,SAASA,EAAgB;AAAA,EAC9B,aAAAC;AAAA,EACA,qBAAAC;AAAA,EACA,SAAAC;AACF,GAAyB;AACvB,QAAMC,IAAyBC,EAA8B,IAAI,GAG3DC,IAFcC,EAAwB,EAAE,KAAKH,GAAwB,EAEtC,WAAW,GAE1C,EAAE,aAAAI,EAAA,IAAgBC,EAAA,GAClB,EAAE,QAAAC,EAAA,IAAWC,EAAA,GACbC,IAAgBC,EAAA,GAChBC,IAAab,EAAY;AAAA,IAC7B,CAACc,GAAKC,OACAA,EAAW,aACbD,EAAI,KAAKC,EAAW,SAAiD,GAEhED;AAAA,IAET,CAAA;AAAA,EAAC;AAEH,EAAAE,EAAQH,CAAU;AAClB,QAAM,EAAE,GAAAI,EAAA,IAAMC,EAAA,GACRC,IAAoBC;AAAA,IACxB,MACEpB,EAAY,IAAI,CAAAe,MAAc;AAC5B,YAAMM,IAAqBN,EAAW,YAClC;AAAA,QACE,GAAGA,EAAW;AAAA,QACd,WACE,OAAOA,EAAW,UAAU,aAAc,WACtCJ,EAAc,oBAAoBI,EAAW,UAAU,SAAS,IAChEA,EAAW,UAAU;AAAA,QAC3B,SACE,OAAOA,EAAW,UAAU,WAAY,WACpCJ,EAAc,oBAAoBI,EAAW,UAAU,OAAO,IAC9DA,EAAW,UAAU;AAAA,MAAA,IAE7B,QAEEO,IAAkBP,EAAW,YAC9BE,EAAEF,EAAW,OAAO;AAAA,QACnB,IAAIA,EAAW;AAAA,QACf,cAAcA,EAAW;AAAA,QACzB,GAAGM;AAAA,MAAA,CACK,IACTJ,EAAEF,EAAW,OAAO;AAAA,QACnB,cAAcA,EAAW;AAAA,QACzB,GAAGM;AAAA,MAAA,CACK,GACRE,IACJR,EAAW,gBAAgB,SAAYA,EAAW,cAAc,CAAC,CAACA,EAAW;AAE/E,aAAO;AAAA,QACL,IAAIA,EAAW;AAAA,QACf,OAAOO;AAAA,QACP,aAAAC;AAAA,MAAA;AAAA,IAEJ,CAAC;AAAA,IACH,CAACvB,GAAaiB,GAAGR,CAAM;AAAA,EAAA;AAYzB,SACE,gBAAAe,EAAC,OAAA,EAAI,KAAKrB,GACR,UAAA,gBAAAqB;AAAA,IAACjB;AAAA,IAAA;AAAA,MACC,kBAAAF;AAAA,MACA,aAAac;AAAA,MACb,qBAAAlB;AAAA,MACA,SAfwB,CAACwB,MAAyB;AACtD,cAAMV,IAAaf,EAAY,KAAK,CAAAe,MAAcA,EAAW,OAAOU,CAAY;AAChF,QAAIvB,KAAWa,GAAY,cACzBb,EAAQwB,EAAgB,qBAAqB;AAAA,UAC3C,KAAKD;AAAA,UACL,YAAYV,EAAW;AAAA,QAAA,CACxB;AAAA,MAEL;AAAA,IAOe;AAAA,EAAA,GAEb;AAEJ;"}
@@ -1,32 +1,53 @@
1
1
  import { OnEventType } from '../../Base/useBase';
2
2
  import { EventType } from '../../../types/Helpers';
3
+ /**
4
+ * A single step in a flow's breadcrumb trail.
5
+ *
6
+ * @remarks
7
+ * Labels are resolved through i18next. When `namespace` is set, the label is
8
+ * looked up in that namespace; otherwise the global namespace is used. The
9
+ * label string itself is also used as the i18n key, with the raw value as a
10
+ * fallback when no translation is registered. Date-typed `variables` (the
11
+ * `startDate` and `endDate` keys) are auto-formatted with the active locale's
12
+ * short-with-year date format before interpolation.
13
+ *
14
+ * @public
15
+ */
3
16
  export interface FlowBreadcrumb {
4
17
  /**
5
- * Unique key for the breadcrumb step
18
+ * Unique identifier for the breadcrumb step. Matched against the current
19
+ * breadcrumb to mark the active entry and passed to `onNavigate` when the
20
+ * breadcrumb is selected.
6
21
  */
7
22
  id: string;
8
23
  /**
9
- * Translation key for the breadcrumb label
24
+ * i18next translation key for the breadcrumb label. Falls back to the raw
25
+ * string when no translation is registered.
10
26
  */
11
27
  label: string;
12
28
  /**
13
- * Optional translation namespace
29
+ * Optional i18next namespace to resolve `label` against. Defaults to the
30
+ * global namespace when omitted.
14
31
  */
15
32
  namespace?: string;
16
33
  /**
17
- * Optional variables for the breadcrumb label
34
+ * Optional interpolation variables for the translated label. `startDate` and
35
+ * `endDate` values typed as strings are auto-formatted with the active
36
+ * locale's short-with-year date format before interpolation.
18
37
  */
19
38
  variables?: Record<string, unknown>;
20
39
  /**
21
- * Event handler for breadcrumb navigation
40
+ * Callback invoked when the breadcrumb is selected. Receives the current
41
+ * flow context and returns the next context.
22
42
  */
23
43
  onNavigate?: (context: unknown) => unknown;
24
44
  /**
25
- * When false, the breadcrumb is rendered as non-clickable even if onNavigate is defined.
26
- * Defaults to true when onNavigate is present, false otherwise.
45
+ * Overrides the default clickability of the breadcrumb. When omitted, the
46
+ * breadcrumb is clickable iff `onNavigate` is defined.
27
47
  */
28
48
  isNavigable?: boolean;
29
49
  }
50
+ /** @internal */
30
51
  export interface BreadcrumbNode {
31
52
  /**
32
53
  * Parent node key (null for root nodes)
@@ -37,10 +58,15 @@ export interface BreadcrumbNode {
37
58
  */
38
59
  item: FlowBreadcrumb;
39
60
  }
61
+ /** @internal */
40
62
  export type BreadcrumbNodes = Record<string, BreadcrumbNode>;
63
+ /** @internal */
41
64
  export type BreadcrumbTrail = Record<string, FlowBreadcrumb[]>;
65
+ /** @internal */
42
66
  export interface FlowBreadcrumbsProps {
67
+ /** Breadcrumb steps to render, in order. */
43
68
  breadcrumbs: FlowBreadcrumb[];
69
+ /** Identifier of the active breadcrumb step. */
44
70
  currentBreadcrumbId?: string;
45
71
  /**
46
72
  * Event handler for breadcrumb navigation
@@ -1 +1,17 @@
1
+ /**
2
+ * Builds a factory that produces robot3 transitions handling a
3
+ * `breadcrumb/navigate` event for a given target state.
4
+ *
5
+ * @remarks
6
+ * The returned factory takes a target state name and an optional `canNavigate`
7
+ * guard. The resulting transition only fires when the event payload's `key`
8
+ * matches the target state and the guard (if provided) returns true, then
9
+ * reduces the machine context by invoking the breadcrumb's `onNavigate`. The
10
+ * outer generic is used purely to anchor `TContext` for the inner closures.
11
+ *
12
+ * @typeParam TContext - The state machine context shape.
13
+ * @returns A factory `(targetState, canNavigate?) => transition` that emits a
14
+ * guarded robot3 transition for the `breadcrumb/navigate` event.
15
+ * @internal
16
+ */
1
17
  export declare const createBreadcrumbNavigateTransition: <TContext>() => (targetState: string, canNavigate?: (ctx: TContext) => boolean) => import('robot3').Transition<"breadcrumb/navigate">;
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumbTransitionHelpers.js","sources":["../../../../src/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.ts"],"sourcesContent":["import { guard, reduce, transition } from 'robot3'\nimport { componentEvents } from '@/shared/constants'\n\ntype BreadcrumbNavigateEvent<TContext> = {\n payload: {\n key: string\n onNavigate: (ctx: TContext) => TContext\n }\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters\nexport const createBreadcrumbNavigateTransition = <TContext>() => {\n return (targetState: string, canNavigate?: (ctx: TContext) => boolean) =>\n transition(\n componentEvents.BREADCRUMB_NAVIGATE,\n targetState,\n guard(\n (ctx: TContext, ev: { payload: { key: string } }) =>\n ev.payload.key === targetState && (canNavigate?.(ctx) ?? true),\n ),\n reduce(\n (ctx: TContext, ev: BreadcrumbNavigateEvent<TContext>): TContext =>\n ev.payload.onNavigate(ctx),\n ),\n )\n}\n"],"names":["createBreadcrumbNavigateTransition","targetState","canNavigate","transition","componentEvents","guard","ctx","ev","reduce"],"mappings":";;AAWO,MAAMA,IAAqC,MACzC,CAACC,GAAqBC,MAC3BC;AAAA,EACEC,EAAgB;AAAA,EAChBH;AAAA,EACAI;AAAA,IACE,CAACC,GAAeC,MACdA,EAAG,QAAQ,QAAQN,MAAgBC,IAAcI,CAAG,KAAK;AAAA,EAAA;AAAA,EAE7DE;AAAA,IACE,CAACF,GAAeC,MACdA,EAAG,QAAQ,WAAWD,CAAG;AAAA,EAAA;AAC7B;"}
1
+ {"version":3,"file":"breadcrumbTransitionHelpers.js","sources":["../../../../src/components/Common/FlowBreadcrumbs/breadcrumbTransitionHelpers.ts"],"sourcesContent":["import { guard, reduce, transition } from 'robot3'\nimport { componentEvents } from '@/shared/constants'\n\ntype BreadcrumbNavigateEvent<TContext> = {\n payload: {\n key: string\n onNavigate: (ctx: TContext) => TContext\n }\n}\n\n/* eslint-disable @typescript-eslint/no-unnecessary-type-parameters */\n/**\n * Builds a factory that produces robot3 transitions handling a\n * `breadcrumb/navigate` event for a given target state.\n *\n * @remarks\n * The returned factory takes a target state name and an optional `canNavigate`\n * guard. The resulting transition only fires when the event payload's `key`\n * matches the target state and the guard (if provided) returns true, then\n * reduces the machine context by invoking the breadcrumb's `onNavigate`. The\n * outer generic is used purely to anchor `TContext` for the inner closures.\n *\n * @typeParam TContext - The state machine context shape.\n * @returns A factory `(targetState, canNavigate?) => transition` that emits a\n * guarded robot3 transition for the `breadcrumb/navigate` event.\n * @internal\n */\nexport const createBreadcrumbNavigateTransition = <TContext>() => {\n /* eslint-enable @typescript-eslint/no-unnecessary-type-parameters */\n return (targetState: string, canNavigate?: (ctx: TContext) => boolean) =>\n transition(\n componentEvents.BREADCRUMB_NAVIGATE,\n targetState,\n guard(\n (ctx: TContext, ev: { payload: { key: string } }) =>\n ev.payload.key === targetState && (canNavigate?.(ctx) ?? true),\n ),\n reduce(\n (ctx: TContext, ev: BreadcrumbNavigateEvent<TContext>): TContext =>\n ev.payload.onNavigate(ctx),\n ),\n )\n}\n"],"names":["createBreadcrumbNavigateTransition","targetState","canNavigate","transition","componentEvents","guard","ctx","ev","reduce"],"mappings":";;AA2BO,MAAMA,IAAqC,MAEzC,CAACC,GAAqBC,MAC3BC;AAAA,EACEC,EAAgB;AAAA,EAChBH;AAAA,EACAI;AAAA,IACE,CAACC,GAAeC,MACdA,EAAG,QAAQ,QAAQN,MAAgBC,IAAcI,CAAG,KAAK;AAAA,EAAA;AAAA,EAE7DE;AAAA,IACE,CAACF,GAAeC,MACdA,EAAG,QAAQ,WAAWD,CAAG;AAAA,EAAA;AAC7B;"}
@@ -1,2 +1,4 @@
1
+ /** @internal */
1
2
  export type FormProps = React.FormHTMLAttributes<HTMLFormElement>;
3
+ /** @internal */
2
4
  export declare const Form: ({ children, className, onSubmit, ...props }: FormProps) => import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Form.js","sources":["../../../../src/components/Common/Form/Form.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport styles from './Form.module.scss'\n\nexport type FormProps = React.FormHTMLAttributes<HTMLFormElement>\n\nexport const Form = ({ children, className, onSubmit, ...props }: FormProps) => {\n return (\n <form\n className={classNames(styles.form, className)}\n onSubmit={e => {\n e.preventDefault()\n onSubmit?.(e)\n }}\n {...props}\n >\n {children}\n </form>\n )\n}\n"],"names":["Form","children","className","onSubmit","props","jsx","classNames","styles","e"],"mappings":";;;AAKO,MAAMA,IAAO,CAAC,EAAE,UAAAC,GAAU,WAAAC,GAAW,UAAAC,GAAU,GAAGC,QAErD,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAWC,EAAO,MAAML,CAAS;AAAA,IAC5C,UAAU,CAAAM,MAAK;AACb,MAAAA,EAAE,eAAA,GACFL,IAAWK,CAAC;AAAA,IACd;AAAA,IACC,GAAGJ;AAAA,IAEH,UAAAH;AAAA,EAAA;AAAA;"}
1
+ {"version":3,"file":"Form.js","sources":["../../../../src/components/Common/Form/Form.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport styles from './Form.module.scss'\n\n/** @internal */\nexport type FormProps = React.FormHTMLAttributes<HTMLFormElement>\n\n/** @internal */\nexport const Form = ({ children, className, onSubmit, ...props }: FormProps) => {\n return (\n <form\n className={classNames(styles.form, className)}\n onSubmit={e => {\n e.preventDefault()\n onSubmit?.(e)\n }}\n {...props}\n >\n {children}\n </form>\n )\n}\n"],"names":["Form","children","className","onSubmit","props","jsx","classNames","styles","e"],"mappings":";;;AAOO,MAAMA,IAAO,CAAC,EAAE,UAAAC,GAAU,WAAAC,GAAW,UAAAC,GAAU,GAAGC,QAErD,gBAAAC;AAAA,EAAC;AAAA,EAAA;AAAA,IACC,WAAWC,EAAWC,EAAO,MAAML,CAAS;AAAA,IAC5C,UAAU,CAAAM,MAAK;AACb,MAAAA,EAAE,eAAA,GACFL,IAAWK,CAAC;AAAA,IACd;AAAA,IACC,GAAGJ;AAAA,IAEH,UAAAH;AAAA,EAAA;AAAA;"}
@@ -2,6 +2,7 @@ import { ReactNode } from 'react';
2
2
  import { CustomPropertyValue, Responsive } from '../../../helpers/responsive';
3
3
  type Flow = 'row' | 'column' | 'row dense' | 'column dense';
4
4
  type Alignment = 'start' | 'end' | 'center' | 'stretch';
5
+ /** @internal */
5
6
  export interface GridProps {
6
7
  children: ReactNode;
7
8
  gap?: Responsive<CustomPropertyValue>;
@@ -14,5 +15,6 @@ export interface GridProps {
14
15
  justifyContent?: Responsive<'start' | 'end' | 'center' | 'stretch' | 'space-between' | 'space-around' | 'space-evenly'>;
15
16
  className?: string;
16
17
  }
18
+ /** @internal */
17
19
  export declare function Grid({ children, gap, gridTemplateColumns, gridTemplateRows, gridTemplateAreas, gridAutoFlow, alignItems, justifyItems, justifyContent, className, }: GridProps): import("react").JSX.Element;
18
20
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"Grid.js","sources":["../../../../src/components/Common/Grid/Grid.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport cn from 'classnames'\nimport styles from './Grid.module.scss'\nimport {\n setResponsiveCustomProperties,\n type CustomPropertyValue,\n type Responsive,\n} from '@/helpers/responsive'\n\ntype Flow = 'row' | 'column' | 'row dense' | 'column dense'\ntype Alignment = 'start' | 'end' | 'center' | 'stretch'\n\nexport interface GridProps {\n children: ReactNode\n gap?: Responsive<CustomPropertyValue>\n gridTemplateColumns?: Responsive<CustomPropertyValue | CustomPropertyValue[]>\n gridTemplateRows?: Responsive<CustomPropertyValue | CustomPropertyValue[]>\n gridTemplateAreas?: Responsive<string>\n gridAutoFlow?: Responsive<Flow>\n alignItems?: Responsive<Alignment>\n justifyItems?: Responsive<Alignment>\n justifyContent?: Responsive<\n 'start' | 'end' | 'center' | 'stretch' | 'space-between' | 'space-around' | 'space-evenly'\n >\n className?: string\n}\n\nexport function Grid({\n children,\n gap = 24,\n gridTemplateColumns = ['1fr'],\n gridTemplateRows,\n gridTemplateAreas,\n gridAutoFlow,\n alignItems,\n justifyItems,\n justifyContent,\n className,\n}: GridProps) {\n const properties = setResponsiveCustomProperties({\n gap,\n 'grid-template-columns': gridTemplateColumns,\n 'grid-template-rows': gridTemplateRows,\n 'grid-template-areas': gridTemplateAreas,\n 'grid-auto-flow': gridAutoFlow,\n 'align-items': alignItems,\n 'justify-items': justifyItems,\n 'justify-content': justifyContent,\n })\n\n return (\n <div className={cn(styles.gridContainer, className)}>\n <div className={styles.grid} style={properties}>\n {children}\n </div>\n </div>\n )\n}\n"],"names":["Grid","children","gap","gridTemplateColumns","gridTemplateRows","gridTemplateAreas","gridAutoFlow","alignItems","justifyItems","justifyContent","className","properties","setResponsiveCustomProperties","cn","styles","jsx"],"mappings":";;;;AA2BO,SAASA,EAAK;AAAA,EACnB,UAAAC;AAAA,EACA,KAAAC,IAAM;AAAA,EACN,qBAAAC,IAAsB,CAAC,KAAK;AAAA,EAC5B,kBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,WAAAC;AACF,GAAc;AACZ,QAAMC,IAAaC,EAA8B;AAAA,IAC/C,KAAAV;AAAA,IACA,yBAAyBC;AAAA,IACzB,sBAAsBC;AAAA,IACtB,uBAAuBC;AAAA,IACvB,kBAAkBC;AAAA,IAClB,eAAeC;AAAA,IACf,iBAAiBC;AAAA,IACjB,mBAAmBC;AAAA,EAAA,CACpB;AAED,2BACG,OAAA,EAAI,WAAWI,EAAGC,EAAO,eAAeJ,CAAS,GAChD,UAAA,gBAAAK,EAAC,OAAA,EAAI,WAAWD,EAAO,MAAM,OAAOH,GACjC,UAAAV,GACH,GACF;AAEJ;"}
1
+ {"version":3,"file":"Grid.js","sources":["../../../../src/components/Common/Grid/Grid.tsx"],"sourcesContent":["import type { ReactNode } from 'react'\nimport cn from 'classnames'\nimport styles from './Grid.module.scss'\nimport {\n setResponsiveCustomProperties,\n type CustomPropertyValue,\n type Responsive,\n} from '@/helpers/responsive'\n\ntype Flow = 'row' | 'column' | 'row dense' | 'column dense'\ntype Alignment = 'start' | 'end' | 'center' | 'stretch'\n\n/** @internal */\nexport interface GridProps {\n children: ReactNode\n gap?: Responsive<CustomPropertyValue>\n gridTemplateColumns?: Responsive<CustomPropertyValue | CustomPropertyValue[]>\n gridTemplateRows?: Responsive<CustomPropertyValue | CustomPropertyValue[]>\n gridTemplateAreas?: Responsive<string>\n gridAutoFlow?: Responsive<Flow>\n alignItems?: Responsive<Alignment>\n justifyItems?: Responsive<Alignment>\n justifyContent?: Responsive<\n 'start' | 'end' | 'center' | 'stretch' | 'space-between' | 'space-around' | 'space-evenly'\n >\n className?: string\n}\n\n/** @internal */\nexport function Grid({\n children,\n gap = 24,\n gridTemplateColumns = ['1fr'],\n gridTemplateRows,\n gridTemplateAreas,\n gridAutoFlow,\n alignItems,\n justifyItems,\n justifyContent,\n className,\n}: GridProps) {\n const properties = setResponsiveCustomProperties({\n gap,\n 'grid-template-columns': gridTemplateColumns,\n 'grid-template-rows': gridTemplateRows,\n 'grid-template-areas': gridTemplateAreas,\n 'grid-auto-flow': gridAutoFlow,\n 'align-items': alignItems,\n 'justify-items': justifyItems,\n 'justify-content': justifyContent,\n })\n\n return (\n <div className={cn(styles.gridContainer, className)}>\n <div className={styles.grid} style={properties}>\n {children}\n </div>\n </div>\n )\n}\n"],"names":["Grid","children","gap","gridTemplateColumns","gridTemplateRows","gridTemplateAreas","gridAutoFlow","alignItems","justifyItems","justifyContent","className","properties","setResponsiveCustomProperties","cn","styles","jsx"],"mappings":";;;;AA6BO,SAASA,EAAK;AAAA,EACnB,UAAAC;AAAA,EACA,KAAAC,IAAM;AAAA,EACN,qBAAAC,IAAsB,CAAC,KAAK;AAAA,EAC5B,kBAAAC;AAAA,EACA,mBAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,WAAAC;AACF,GAAc;AACZ,QAAMC,IAAaC,EAA8B;AAAA,IAC/C,KAAAV;AAAA,IACA,yBAAyBC;AAAA,IACzB,sBAAsBC;AAAA,IACtB,uBAAuBC;AAAA,IACvB,kBAAkBC;AAAA,IAClB,eAAeC;AAAA,IACf,iBAAiBC;AAAA,IACjB,mBAAmBC;AAAA,EAAA,CACpB;AAED,2BACG,OAAA,EAAI,WAAWI,EAAGC,EAAO,eAAeJ,CAAS,GAChD,UAAA,gBAAAK,EAAC,OAAA,EAAI,WAAWD,EAAO,MAAM,OAAOH,GACjC,UAAAV,GACH,GACF;AAEJ;"}
@@ -1,2 +1,9 @@
1
1
  import { HamburgerMenuProps } from './HamburgerMenuTypes';
2
+ /**
3
+ * Hamburger icon button that opens a menu of actions when activated.
4
+ *
5
+ * @param props - See {@link HamburgerMenuProps}.
6
+ * @returns A button-and-menu pair rendered through the components context.
7
+ * @internal
8
+ */
2
9
  export declare function HamburgerMenu({ items, triggerLabel, menuLabel, onClose, isLoading, placement, ...props }: HamburgerMenuProps): import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"HamburgerMenu.js","sources":["../../../../src/components/Common/HamburgerMenu/HamburgerMenu.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { type HamburgerMenuProps } from './HamburgerMenuTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport HamburgerIcon from '@/assets/icons/hamburger.svg?react'\nimport { useMenu } from '@/hooks/useMenu'\n\nexport function HamburgerMenu({\n items,\n triggerLabel,\n menuLabel,\n onClose,\n isLoading = false,\n placement = 'bottom end',\n ...props\n}: HamburgerMenuProps) {\n const { t } = useTranslation('common')\n const Components = useComponentContext()\n const { triggerProps, menuProps } = useMenu()\n\n const { ref, ...restTriggerProps } = triggerProps\n\n return (\n <>\n <Components.ButtonIcon\n isLoading={isLoading}\n aria-label={triggerLabel || t('labels.openMenu')}\n buttonRef={ref}\n {...restTriggerProps}\n >\n <HamburgerIcon />\n </Components.ButtonIcon>\n <Components.Menu\n {...menuProps}\n items={items}\n aria-label={menuLabel || t('labels.menuLabel')}\n onClose={onClose || menuProps.onClose}\n placement={placement}\n {...props}\n />\n </>\n )\n}\n"],"names":["HamburgerMenu","items","triggerLabel","menuLabel","onClose","isLoading","placement","props","t","useTranslation","Components","useComponentContext","triggerProps","menuProps","useMenu","ref","restTriggerProps","jsxs","Fragment","jsx","HamburgerIcon"],"mappings":";;;;;AAMO,SAASA,EAAc;AAAA,EAC5B,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,WAAAC,IAAY;AAAA,EACZ,GAAGC;AACL,GAAuB;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,QAAQ,GAC/BC,IAAaC,EAAA,GACb,EAAE,cAAAC,GAAc,WAAAC,EAAA,IAAcC,EAAA,GAE9B,EAAE,KAAAC,GAAK,GAAGC,EAAA,IAAqBJ;AAErC,SACE,gBAAAK,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACT,EAAW;AAAA,MAAX;AAAA,QACC,WAAAL;AAAA,QACA,cAAYH,KAAgBM,EAAE,iBAAiB;AAAA,QAC/C,WAAWO;AAAA,QACV,GAAGC;AAAA,QAEJ,4BAACI,GAAA,CAAA,CAAc;AAAA,MAAA;AAAA,IAAA;AAAA,IAEjB,gBAAAD;AAAA,MAACT,EAAW;AAAA,MAAX;AAAA,QACE,GAAGG;AAAA,QACJ,OAAAZ;AAAA,QACA,cAAYE,KAAaK,EAAE,kBAAkB;AAAA,QAC7C,SAASJ,KAAWS,EAAU;AAAA,QAC9B,WAAAP;AAAA,QACC,GAAGC;AAAA,MAAA;AAAA,IAAA;AAAA,EACN,GACF;AAEJ;"}
1
+ {"version":3,"file":"HamburgerMenu.js","sources":["../../../../src/components/Common/HamburgerMenu/HamburgerMenu.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport { type HamburgerMenuProps } from './HamburgerMenuTypes'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\nimport HamburgerIcon from '@/assets/icons/hamburger.svg?react'\nimport { useMenu } from '@/hooks/useMenu'\n\n/**\n * Hamburger icon button that opens a menu of actions when activated.\n *\n * @param props - See {@link HamburgerMenuProps}.\n * @returns A button-and-menu pair rendered through the components context.\n * @internal\n */\nexport function HamburgerMenu({\n items,\n triggerLabel,\n menuLabel,\n onClose,\n isLoading = false,\n placement = 'bottom end',\n ...props\n}: HamburgerMenuProps) {\n const { t } = useTranslation('common')\n const Components = useComponentContext()\n const { triggerProps, menuProps } = useMenu()\n\n const { ref, ...restTriggerProps } = triggerProps\n\n return (\n <>\n <Components.ButtonIcon\n isLoading={isLoading}\n aria-label={triggerLabel || t('labels.openMenu')}\n buttonRef={ref}\n {...restTriggerProps}\n >\n <HamburgerIcon />\n </Components.ButtonIcon>\n <Components.Menu\n {...menuProps}\n items={items}\n aria-label={menuLabel || t('labels.menuLabel')}\n onClose={onClose || menuProps.onClose}\n placement={placement}\n {...props}\n />\n </>\n )\n}\n"],"names":["HamburgerMenu","items","triggerLabel","menuLabel","onClose","isLoading","placement","props","t","useTranslation","Components","useComponentContext","triggerProps","menuProps","useMenu","ref","restTriggerProps","jsxs","Fragment","jsx","HamburgerIcon"],"mappings":";;;;;AAaO,SAASA,EAAc;AAAA,EAC5B,OAAAC;AAAA,EACA,cAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,WAAAC,IAAY;AAAA,EACZ,GAAGC;AACL,GAAuB;AACrB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,QAAQ,GAC/BC,IAAaC,EAAA,GACb,EAAE,cAAAC,GAAc,WAAAC,EAAA,IAAcC,EAAA,GAE9B,EAAE,KAAAC,GAAK,GAAGC,EAAA,IAAqBJ;AAErC,SACE,gBAAAK,EAAAC,GAAA,EACE,UAAA;AAAA,IAAA,gBAAAC;AAAA,MAACT,EAAW;AAAA,MAAX;AAAA,QACC,WAAAL;AAAA,QACA,cAAYH,KAAgBM,EAAE,iBAAiB;AAAA,QAC/C,WAAWO;AAAA,QACV,GAAGC;AAAA,QAEJ,4BAACI,GAAA,CAAA,CAAc;AAAA,MAAA;AAAA,IAAA;AAAA,IAEjB,gBAAAD;AAAA,MAACT,EAAW;AAAA,MAAX;AAAA,QACE,GAAGG;AAAA,QACJ,OAAAZ;AAAA,QACA,cAAYE,KAAaK,EAAE,kBAAkB;AAAA,QAC7C,SAASJ,KAAWS,EAAU;AAAA,QAC9B,WAAAP;AAAA,QACC,GAAGC;AAAA,MAAA;AAAA,IAAA;AAAA,EACN,GACF;AAEJ;"}
@@ -1,10 +1,21 @@
1
1
  import { MenuProps } from '../UI/Menu/MenuTypes';
2
2
  import { DataAttributes } from '../../../types/Helpers';
3
+ /**
4
+ * Props for the {@link HamburgerMenu} component.
5
+ *
6
+ * @internal
7
+ */
3
8
  export interface HamburgerMenuProps extends DataAttributes {
9
+ /** Accessible label for the trigger button. Defaults to a localized "Open menu" string. */
4
10
  triggerLabel?: string;
11
+ /** Accessible label for the menu popover. Defaults to a localized menu label. */
5
12
  menuLabel?: string;
13
+ /** Items rendered inside the menu popover. */
6
14
  items: MenuProps['items'];
15
+ /** Called when the menu is dismissed. */
7
16
  onClose?: () => void;
17
+ /** Renders the trigger button in a loading state when true. */
8
18
  isLoading?: boolean;
19
+ /** Placement of the menu popover relative to the trigger. Defaults to `'bottom end'`. */
9
20
  placement?: MenuProps['placement'];
10
21
  }
@@ -1,2 +1,9 @@
1
1
  import { HorizontalFieldLayoutProps } from './HorizontalFieldLayoutTypes';
2
+ /**
3
+ * Layout that positions a form control's children alongside its label, description, and error message.
4
+ *
5
+ * @param props - See {@link HorizontalFieldLayoutProps}.
6
+ * @returns The control's children laid out horizontally with associated label and helper text.
7
+ * @internal
8
+ */
2
9
  export declare const HorizontalFieldLayout: React.FC<HorizontalFieldLayoutProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"HorizontalFieldLayout.js","sources":["../../../../src/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { VisuallyHidden } from '../VisuallyHidden'\nimport { FieldErrorMessage } from '../FieldErrorMessage'\nimport { FieldDescription } from '../FieldDescription'\nimport styles from './HorizontalFieldLayout.module.scss'\nimport type { HorizontalFieldLayoutProps } from './HorizontalFieldLayoutTypes'\nimport { getDataProps } from '@/helpers/getDataProps'\n\nexport const HorizontalFieldLayout: React.FC<HorizontalFieldLayoutProps> = ({\n label,\n description,\n descriptionId,\n errorMessage,\n errorMessageId,\n children,\n htmlFor,\n className,\n shouldVisuallyHideLabel,\n ...props\n}: HorizontalFieldLayoutProps) => {\n const labelContent = (\n <label className={styles.label} htmlFor={htmlFor}>\n {label}\n </label>\n )\n\n const withDescriptionOrErrorMessage = description || errorMessage\n\n return (\n <div\n className={classNames(\n styles.root,\n {\n [styles.withoutVisibleLabel as string]:\n shouldVisuallyHideLabel && withDescriptionOrErrorMessage,\n [styles.withOnlyChildren as string]:\n shouldVisuallyHideLabel && !withDescriptionOrErrorMessage,\n },\n className,\n )}\n {...getDataProps(props)}\n >\n <div className={styles.children}>{children}</div>\n {shouldVisuallyHideLabel ? <VisuallyHidden>{labelContent}</VisuallyHidden> : labelContent}\n <FieldDescription id={descriptionId} className={styles.description}>\n {description}\n </FieldDescription>\n <FieldErrorMessage id={errorMessageId} className={styles.errorMessage}>\n {errorMessage}\n </FieldErrorMessage>\n </div>\n )\n}\n"],"names":["HorizontalFieldLayout","label","description","descriptionId","errorMessage","errorMessageId","children","htmlFor","className","shouldVisuallyHideLabel","props","labelContent","jsx","styles","withDescriptionOrErrorMessage","jsxs","classNames","getDataProps","VisuallyHidden","FieldDescription","FieldErrorMessage"],"mappings":";;;;;;;AAQO,MAAMA,IAA8D,CAAC;AAAA,EAC1E,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,GAAGC;AACL,MAAkC;AAChC,QAAMC,IACJ,gBAAAC,EAAC,SAAA,EAAM,WAAWC,EAAO,OAAO,SAAAN,GAC7B,UAAAN,GACH,GAGIa,IAAgCZ,KAAeE;AAErD,SACE,gBAAAW;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACTH,EAAO;AAAA,QACP;AAAA,UACE,CAACA,EAAO,mBAA6B,GACnCJ,KAA2BK;AAAA,UAC7B,CAACD,EAAO,gBAA0B,GAChCJ,KAA2B,CAACK;AAAA,QAAA;AAAA,QAEhCN;AAAA,MAAA;AAAA,MAED,GAAGS,EAAaP,CAAK;AAAA,MAEtB,UAAA;AAAA,QAAA,gBAAAE,EAAC,OAAA,EAAI,WAAWC,EAAO,UAAW,UAAAP,GAAS;AAAA,QAC1CG,IAA0B,gBAAAG,EAACM,GAAA,EAAgB,UAAAP,EAAA,CAAa,IAAoBA;AAAA,0BAC5EQ,GAAA,EAAiB,IAAIhB,GAAe,WAAWU,EAAO,aACpD,UAAAX,GACH;AAAA,0BACCkB,GAAA,EAAkB,IAAIf,GAAgB,WAAWQ,EAAO,cACtD,UAAAT,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"HorizontalFieldLayout.js","sources":["../../../../src/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { VisuallyHidden } from '../VisuallyHidden'\nimport { FieldErrorMessage } from '../FieldErrorMessage'\nimport { FieldDescription } from '../FieldDescription'\nimport styles from './HorizontalFieldLayout.module.scss'\nimport type { HorizontalFieldLayoutProps } from './HorizontalFieldLayoutTypes'\nimport { getDataProps } from '@/helpers/getDataProps'\n\n/**\n * Layout that positions a form control's children alongside its label, description, and error message.\n *\n * @param props - See {@link HorizontalFieldLayoutProps}.\n * @returns The control's children laid out horizontally with associated label and helper text.\n * @internal\n */\nexport const HorizontalFieldLayout: React.FC<HorizontalFieldLayoutProps> = ({\n label,\n description,\n descriptionId,\n errorMessage,\n errorMessageId,\n children,\n htmlFor,\n className,\n shouldVisuallyHideLabel,\n ...props\n}: HorizontalFieldLayoutProps) => {\n const labelContent = (\n <label className={styles.label} htmlFor={htmlFor}>\n {label}\n </label>\n )\n\n const withDescriptionOrErrorMessage = description || errorMessage\n\n return (\n <div\n className={classNames(\n styles.root,\n {\n [styles.withoutVisibleLabel as string]:\n shouldVisuallyHideLabel && withDescriptionOrErrorMessage,\n [styles.withOnlyChildren as string]:\n shouldVisuallyHideLabel && !withDescriptionOrErrorMessage,\n },\n className,\n )}\n {...getDataProps(props)}\n >\n <div className={styles.children}>{children}</div>\n {shouldVisuallyHideLabel ? <VisuallyHidden>{labelContent}</VisuallyHidden> : labelContent}\n <FieldDescription id={descriptionId} className={styles.description}>\n {description}\n </FieldDescription>\n <FieldErrorMessage id={errorMessageId} className={styles.errorMessage}>\n {errorMessage}\n </FieldErrorMessage>\n </div>\n )\n}\n"],"names":["HorizontalFieldLayout","label","description","descriptionId","errorMessage","errorMessageId","children","htmlFor","className","shouldVisuallyHideLabel","props","labelContent","jsx","styles","withDescriptionOrErrorMessage","jsxs","classNames","getDataProps","VisuallyHidden","FieldDescription","FieldErrorMessage"],"mappings":";;;;;;;AAeO,MAAMA,IAA8D,CAAC;AAAA,EAC1E,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,GAAGC;AACL,MAAkC;AAChC,QAAMC,IACJ,gBAAAC,EAAC,SAAA,EAAM,WAAWC,EAAO,OAAO,SAAAN,GAC7B,UAAAN,GACH,GAGIa,IAAgCZ,KAAeE;AAErD,SACE,gBAAAW;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACTH,EAAO;AAAA,QACP;AAAA,UACE,CAACA,EAAO,mBAA6B,GACnCJ,KAA2BK;AAAA,UAC7B,CAACD,EAAO,gBAA0B,GAChCJ,KAA2B,CAACK;AAAA,QAAA;AAAA,QAEhCN;AAAA,MAAA;AAAA,MAED,GAAGS,EAAaP,CAAK;AAAA,MAEtB,UAAA;AAAA,QAAA,gBAAAE,EAAC,OAAA,EAAI,WAAWC,EAAO,UAAW,UAAAP,GAAS;AAAA,QAC1CG,IAA0B,gBAAAG,EAACM,GAAA,EAAgB,UAAAP,EAAA,CAAa,IAAoBA;AAAA,0BAC5EQ,GAAA,EAAiB,IAAIhB,GAAe,WAAWU,EAAO,aACpD,UAAAX,GACH;AAAA,0BACCkB,GAAA,EAAkB,IAAIf,GAAgB,WAAWQ,EAAO,cACtD,UAAAT,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -1,3 +1,17 @@
1
1
  import { InternalFieldLayoutProps, SharedFieldLayoutProps } from '../FieldLayout/FieldLayoutTypes';
2
+ /**
3
+ * Shared layout props consumed by horizontally-laid-out form controls — label, description, error message, required state, and visual label hiding.
4
+ *
5
+ * @remarks
6
+ * Extended by props interfaces for inline controls such as `CheckboxProps`, `RadioProps`, and `SwitchProps`.
7
+ * Alias of {@link SharedFieldLayoutProps} — exposed as a distinct name to mirror the horizontal layout used by these controls.
8
+ *
9
+ * @public
10
+ */
2
11
  export type SharedHorizontalFieldLayoutProps = SharedFieldLayoutProps;
12
+ /**
13
+ * Props for the {@link HorizontalFieldLayout} component.
14
+ *
15
+ * @internal
16
+ */
3
17
  export type HorizontalFieldLayoutProps = SharedHorizontalFieldLayoutProps & InternalFieldLayoutProps;
@@ -2,5 +2,6 @@ interface InlineSpinnerProps {
2
2
  ariaLabel?: string;
3
3
  size?: 'small' | 'medium' | 'large';
4
4
  }
5
+ /** @internal */
5
6
  export declare const InlineSpinner: ({ ariaLabel, size }: InlineSpinnerProps) => import("react").JSX.Element;
6
7
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"InlineSpinner.js","sources":["../../../../src/components/Common/InlineSpinner/InlineSpinner.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport styles from './InlineSpinner.module.scss'\nimport SpinnerIcon from '@/assets/icons/spinner_small.svg?react'\n\ninterface InlineSpinnerProps {\n ariaLabel?: string\n size?: 'small' | 'medium' | 'large'\n}\n\nexport const InlineSpinner = ({ ariaLabel, size = 'small' }: InlineSpinnerProps) => {\n const { t } = useTranslation('common')\n const defaultAriaLabel = t('status.loading')\n\n const sizeMap = {\n small: 16,\n medium: 20,\n large: 24,\n }\n\n const iconSize = sizeMap[size]\n\n return (\n <span\n className={styles.inlineSpinner}\n aria-label={ariaLabel || defaultAriaLabel}\n aria-live=\"polite\"\n role=\"status\"\n >\n <SpinnerIcon className={styles.spinnerIcon} width={iconSize} height={iconSize} />\n </span>\n )\n}\n"],"names":["InlineSpinner","ariaLabel","size","t","useTranslation","defaultAriaLabel","iconSize","jsx","styles","SpinnerIcon"],"mappings":";;;;AASO,MAAMA,IAAgB,CAAC,EAAE,WAAAC,GAAW,MAAAC,IAAO,cAAkC;AAClF,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,QAAQ,GAC/BC,IAAmBF,EAAE,gBAAgB,GAQrCG,IANU;AAAA,IACd,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,OAAO;AAAA,EAAA,EAGgBJ,CAAI;AAE7B,SACE,gBAAAK;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAO;AAAA,MAClB,cAAYP,KAAaI;AAAA,MACzB,aAAU;AAAA,MACV,MAAK;AAAA,MAEL,UAAA,gBAAAE,EAACE,KAAY,WAAWD,EAAO,aAAa,OAAOF,GAAU,QAAQA,EAAA,CAAU;AAAA,IAAA;AAAA,EAAA;AAGrF;"}
1
+ {"version":3,"file":"InlineSpinner.js","sources":["../../../../src/components/Common/InlineSpinner/InlineSpinner.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport styles from './InlineSpinner.module.scss'\nimport SpinnerIcon from '@/assets/icons/spinner_small.svg?react'\n\ninterface InlineSpinnerProps {\n ariaLabel?: string\n size?: 'small' | 'medium' | 'large'\n}\n\n/** @internal */\nexport const InlineSpinner = ({ ariaLabel, size = 'small' }: InlineSpinnerProps) => {\n const { t } = useTranslation('common')\n const defaultAriaLabel = t('status.loading')\n\n const sizeMap = {\n small: 16,\n medium: 20,\n large: 24,\n }\n\n const iconSize = sizeMap[size]\n\n return (\n <span\n className={styles.inlineSpinner}\n aria-label={ariaLabel || defaultAriaLabel}\n aria-live=\"polite\"\n role=\"status\"\n >\n <SpinnerIcon className={styles.spinnerIcon} width={iconSize} height={iconSize} />\n </span>\n )\n}\n"],"names":["InlineSpinner","ariaLabel","size","t","useTranslation","defaultAriaLabel","iconSize","jsx","styles","SpinnerIcon"],"mappings":";;;;AAUO,MAAMA,IAAgB,CAAC,EAAE,WAAAC,GAAW,MAAAC,IAAO,cAAkC;AAClF,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,QAAQ,GAC/BC,IAAmBF,EAAE,gBAAgB,GAQrCG,IANU;AAAA,IACd,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,OAAO;AAAA,EAAA,EAGgBJ,CAAI;AAE7B,SACE,gBAAAK;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAO;AAAA,MAClB,cAAYP,KAAaI;AAAA,MACzB,aAAU;AAAA,MACV,MAAK;AAAA,MAEL,UAAA,gBAAAE,EAACE,KAAY,WAAWD,EAAO,aAAa,OAAOF,GAAU,QAAQA,EAAA,CAAU;AAAA,IAAA;AAAA,EAAA;AAGrF;"}
@@ -1,2 +1,3 @@
1
1
  import { FallbackProps } from 'react-error-boundary';
2
+ /** @internal */
2
3
  export declare const InternalError: ({ error, resetErrorBoundary }: FallbackProps) => import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"InternalError.js","sources":["../../../../src/components/Common/InternalError/InternalError.tsx"],"sourcesContent":["import type { FallbackProps } from 'react-error-boundary'\nimport { Trans, useTranslation } from 'react-i18next'\nimport styles from './InternalError.module.scss'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\nexport const InternalError = ({ error, resetErrorBoundary }: FallbackProps) => {\n const { t } = useTranslation('common')\n const Components = useComponentContext()\n const errorMessage =\n typeof error === 'string'\n ? error\n : error instanceof Error\n ? error.message\n : t('errors.unknownError')\n return (\n <div className={styles.internalErrorCard} role=\"alert\" data-testid=\"internal-error-card\">\n <div>\n <Components.Heading className={styles.internalErrorCardTitle} as=\"h1\" styledAs=\"h3\">\n {t('errors.errorHeading')}\n </Components.Heading>\n <Components.Text className={styles.errorMessage}>\n <Trans\n t={t}\n i18nKey=\"errors.globalReactError\"\n values={{ error: errorMessage }}\n shouldUnescape={true}\n />\n </Components.Text>\n </div>\n <div>\n <Components.Button variant=\"secondary\" onClick={resetErrorBoundary}>\n {t('errors.resetGlobalError')}\n </Components.Button>\n </div>\n </div>\n )\n}\n"],"names":["InternalError","error","resetErrorBoundary","t","useTranslation","Components","useComponentContext","errorMessage","jsxs","styles","jsx","Trans"],"mappings":";;;;AAKO,MAAMA,IAAgB,CAAC,EAAE,OAAAC,GAAO,oBAAAC,QAAwC;AAC7E,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,QAAQ,GAC/BC,IAAaC,EAAA,GACbC,IACJ,OAAON,KAAU,WACbA,IACAA,aAAiB,QACfA,EAAM,UACNE,EAAE,qBAAqB;AAC/B,SACE,gBAAAK,EAAC,SAAI,WAAWC,EAAO,mBAAmB,MAAK,SAAQ,eAAY,uBACjE,UAAA;AAAA,IAAA,gBAAAD,EAAC,OAAA,EACC,UAAA;AAAA,MAAA,gBAAAE,EAACL,EAAW,SAAX,EAAmB,WAAWI,EAAO,wBAAwB,IAAG,MAAK,UAAS,MAC5E,UAAAN,EAAE,qBAAqB,EAAA,CAC1B;AAAA,wBACCE,EAAW,MAAX,EAAgB,WAAWI,EAAO,cACjC,UAAA,gBAAAC;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,GAAAR;AAAA,UACA,SAAQ;AAAA,UACR,QAAQ,EAAE,OAAOI,EAAA;AAAA,UACjB,gBAAgB;AAAA,QAAA;AAAA,MAAA,EAClB,CACF;AAAA,IAAA,GACF;AAAA,IACA,gBAAAG,EAAC,OAAA,EACC,UAAA,gBAAAA,EAACL,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAAC,EAAE,yBAAyB,GAC9B,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"InternalError.js","sources":["../../../../src/components/Common/InternalError/InternalError.tsx"],"sourcesContent":["import type { FallbackProps } from 'react-error-boundary'\nimport { Trans, useTranslation } from 'react-i18next'\nimport styles from './InternalError.module.scss'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\n/** @internal */\nexport const InternalError = ({ error, resetErrorBoundary }: FallbackProps) => {\n const { t } = useTranslation('common')\n const Components = useComponentContext()\n const errorMessage =\n typeof error === 'string'\n ? error\n : error instanceof Error\n ? error.message\n : t('errors.unknownError')\n return (\n <div className={styles.internalErrorCard} role=\"alert\" data-testid=\"internal-error-card\">\n <div>\n <Components.Heading className={styles.internalErrorCardTitle} as=\"h1\" styledAs=\"h3\">\n {t('errors.errorHeading')}\n </Components.Heading>\n <Components.Text className={styles.errorMessage}>\n <Trans\n t={t}\n i18nKey=\"errors.globalReactError\"\n values={{ error: errorMessage }}\n shouldUnescape={true}\n />\n </Components.Text>\n </div>\n <div>\n <Components.Button variant=\"secondary\" onClick={resetErrorBoundary}>\n {t('errors.resetGlobalError')}\n </Components.Button>\n </div>\n </div>\n )\n}\n"],"names":["InternalError","error","resetErrorBoundary","t","useTranslation","Components","useComponentContext","errorMessage","jsxs","styles","jsx","Trans"],"mappings":";;;;AAMO,MAAMA,IAAgB,CAAC,EAAE,OAAAC,GAAO,oBAAAC,QAAwC;AAC7E,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,QAAQ,GAC/BC,IAAaC,EAAA,GACbC,IACJ,OAAON,KAAU,WACbA,IACAA,aAAiB,QACfA,EAAM,UACNE,EAAE,qBAAqB;AAC/B,SACE,gBAAAK,EAAC,SAAI,WAAWC,EAAO,mBAAmB,MAAK,SAAQ,eAAY,uBACjE,UAAA;AAAA,IAAA,gBAAAD,EAAC,OAAA,EACC,UAAA;AAAA,MAAA,gBAAAE,EAACL,EAAW,SAAX,EAAmB,WAAWI,EAAO,wBAAwB,IAAG,MAAK,UAAS,MAC5E,UAAAN,EAAE,qBAAqB,EAAA,CAC1B;AAAA,wBACCE,EAAW,MAAX,EAAgB,WAAWI,EAAO,cACjC,UAAA,gBAAAC;AAAA,QAACC;AAAA,QAAA;AAAA,UACC,GAAAR;AAAA,UACA,SAAQ;AAAA,UACR,QAAQ,EAAE,OAAOI,EAAA;AAAA,UACjB,gBAAgB;AAAA,QAAA;AAAA,MAAA,EAClB,CACF;AAAA,IAAA,GACF;AAAA,IACA,gBAAAG,EAAC,OAAA,EACC,UAAA,gBAAAA,EAACL,EAAW,QAAX,EAAkB,SAAQ,aAAY,SAASH,GAC7C,UAAAC,EAAE,yBAAyB,GAC9B,EAAA,CACF;AAAA,EAAA,GACF;AAEJ;"}
@@ -1,5 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
+ /** @internal */
2
3
  export interface LoadingProps {
3
4
  children?: ReactNode;
4
5
  }
6
+ /** @internal */
5
7
  export declare const Loading: ({ children }: LoadingProps) => import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"Loading.js","sources":["../../../../src/components/Common/Loading/Loading.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport cn from 'classnames'\nimport type { ReactNode } from 'react'\nimport styles from './Loading.module.scss'\nimport { FadeIn } from '@/components/Common/FadeIn/FadeIn'\n\nexport interface LoadingProps {\n children?: ReactNode\n}\n\nexport const Loading = ({ children }: LoadingProps) => {\n const { t } = useTranslation('common')\n return (\n <FadeIn>\n <section\n className={styles.skeletonContainer}\n aria-label={t('status.loading')}\n aria-live=\"polite\"\n aria-busy\n >\n <div className={cn(styles.skeleton, styles.skeletonBox)}>{children}</div>\n </section>\n </FadeIn>\n )\n}\n"],"names":["Loading","children","t","useTranslation","FadeIn","jsx","styles","cn"],"mappings":";;;;;AAUO,MAAMA,IAAU,CAAC,EAAE,UAAAC,QAA6B;AACrD,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,QAAQ;AACrC,2BACGC,GAAA,EACC,UAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAO;AAAA,MAClB,cAAYJ,EAAE,gBAAgB;AAAA,MAC9B,aAAU;AAAA,MACV,aAAS;AAAA,MAET,UAAA,gBAAAG,EAAC,SAAI,WAAWE,EAAGD,EAAO,UAAUA,EAAO,WAAW,GAAI,UAAAL,EAAA,CAAS;AAAA,IAAA;AAAA,EAAA,GAEvE;AAEJ;"}
1
+ {"version":3,"file":"Loading.js","sources":["../../../../src/components/Common/Loading/Loading.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport cn from 'classnames'\nimport type { ReactNode } from 'react'\nimport styles from './Loading.module.scss'\nimport { FadeIn } from '@/components/Common/FadeIn/FadeIn'\n\n/** @internal */\nexport interface LoadingProps {\n children?: ReactNode\n}\n\n/** @internal */\nexport const Loading = ({ children }: LoadingProps) => {\n const { t } = useTranslation('common')\n return (\n <FadeIn>\n <section\n className={styles.skeletonContainer}\n aria-label={t('status.loading')}\n aria-live=\"polite\"\n aria-busy\n >\n <div className={cn(styles.skeleton, styles.skeletonBox)}>{children}</div>\n </section>\n </FadeIn>\n )\n}\n"],"names":["Loading","children","t","useTranslation","FadeIn","jsx","styles","cn"],"mappings":";;;;;AAYO,MAAMA,IAAU,CAAC,EAAE,UAAAC,QAA6B;AACrD,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,QAAQ;AACrC,2BACGC,GAAA,EACC,UAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAO;AAAA,MAClB,cAAYJ,EAAE,gBAAgB;AAAA,MAC9B,aAAU;AAAA,MACV,aAAS;AAAA,MAET,UAAA,gBAAAG,EAAC,SAAI,WAAWE,EAAGD,EAAO,UAAUA,EAAO,WAAW,GAAI,UAAAL,EAAA,CAAS;AAAA,IAAA;AAAA,EAAA,GAEvE;AAEJ;"}
@@ -7,15 +7,18 @@ interface OnboardingStatusBadgeProps<T extends OnboardingStatuses> {
7
7
  onboardingEntity: 'contractor' | 'employee';
8
8
  onboardingStatus?: T | null;
9
9
  }
10
+ /** @internal */
10
11
  export declare const OnboardingStatusBadge: <T extends OnboardingStatuses>({ onboarded, onboardingEntity, onboardingStatus, }: OnboardingStatusBadgeProps<T>) => import("react").JSX.Element;
11
12
  interface ContractorOnboardingStatusBadgeProps {
12
13
  onboarded?: boolean;
13
14
  onboardingStatus?: ContractorOnboardingStatus1 | null;
14
15
  }
16
+ /** @internal */
15
17
  export declare const ContractorOnboardingStatusBadge: (props: ContractorOnboardingStatusBadgeProps) => import("react").JSX.Element;
16
18
  interface EmployeeOnboardingStatusBadgeProps {
17
19
  onboarded?: boolean;
18
20
  onboardingStatus?: OnboardingStatus | null;
19
21
  }
22
+ /** @internal */
20
23
  export declare const EmployeeOnboardingStatusBadge: (props: EmployeeOnboardingStatusBadgeProps) => import("react").JSX.Element;
21
24
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../../../src/components/Common/OnboardingStatusBadge/index.tsx"],"sourcesContent":["import type { ContractorOnboardingStatus1 } from '@gusto/embedded-api-v-2025-11-15/models/components/contractor'\nimport type { OnboardingStatus } from '@gusto/embedded-api-v-2025-11-15/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { useTranslation } from 'react-i18next'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ntype OnboardingStatuses = ContractorOnboardingStatus1 | OnboardingStatus\n\ninterface OnboardingStatusBadgeProps<T extends OnboardingStatuses> {\n onboarded?: boolean\n onboardingEntity: 'contractor' | 'employee'\n onboardingStatus?: T | null\n}\nexport const OnboardingStatusBadge = <T extends OnboardingStatuses>({\n onboarded,\n onboardingEntity,\n onboardingStatus,\n}: OnboardingStatusBadgeProps<T>) => {\n const { Badge } = useComponentContext()\n const { t } = useTranslation()\n\n //HACK: `never` should instead be a better type\n return (\n <Badge status={onboarded ? 'success' : 'warning'}>\n {t(`onboardingStatus.${onboardingEntity}.${onboardingStatus ?? 'undefined'}` as never)}\n </Badge>\n )\n}\n\ninterface ContractorOnboardingStatusBadgeProps {\n onboarded?: boolean\n onboardingStatus?: ContractorOnboardingStatus1 | null\n}\nexport const ContractorOnboardingStatusBadge = (props: ContractorOnboardingStatusBadgeProps) => (\n <OnboardingStatusBadge {...props} onboardingEntity=\"contractor\" />\n)\n\ninterface EmployeeOnboardingStatusBadgeProps {\n onboarded?: boolean\n onboardingStatus?: OnboardingStatus | null\n}\nexport const EmployeeOnboardingStatusBadge = (props: EmployeeOnboardingStatusBadgeProps) => (\n <OnboardingStatusBadge {...props} onboardingEntity=\"employee\" />\n)\n"],"names":["OnboardingStatusBadge","onboarded","onboardingEntity","onboardingStatus","Badge","useComponentContext","t","useTranslation","jsx","ContractorOnboardingStatusBadge","props","EmployeeOnboardingStatusBadge"],"mappings":";;;AAYO,MAAMA,IAAwB,CAA+B;AAAA,EAClE,WAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,kBAAAC;AACF,MAAqC;AACnC,QAAM,EAAE,OAAAC,EAAA,IAAUC,EAAA,GACZ,EAAE,GAAAC,EAAA,IAAMC,EAAA;AAGd,SACE,gBAAAC,EAACJ,GAAA,EAAM,QAAQH,IAAY,YAAY,WACpC,UAAAK,EAAE,oBAAoBJ,CAAgB,IAAIC,KAAoB,WAAW,EAAW,GACvF;AAEJ,GAMaM,IAAkC,CAACC,MAC9C,gBAAAF,EAACR,KAAuB,GAAGU,GAAO,kBAAiB,aAAA,CAAa,GAOrDC,IAAgC,CAACD,MAC5C,gBAAAF,EAACR,KAAuB,GAAGU,GAAO,kBAAiB,WAAA,CAAW;"}
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/Common/OnboardingStatusBadge/index.tsx"],"sourcesContent":["import type { ContractorOnboardingStatus1 } from '@gusto/embedded-api-v-2025-11-15/models/components/contractor'\nimport type { OnboardingStatus } from '@gusto/embedded-api-v-2025-11-15/models/operations/putv1employeesemployeeidonboardingstatus'\nimport { useTranslation } from 'react-i18next'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ntype OnboardingStatuses = ContractorOnboardingStatus1 | OnboardingStatus\n\ninterface OnboardingStatusBadgeProps<T extends OnboardingStatuses> {\n onboarded?: boolean\n onboardingEntity: 'contractor' | 'employee'\n onboardingStatus?: T | null\n}\n/** @internal */\nexport const OnboardingStatusBadge = <T extends OnboardingStatuses>({\n onboarded,\n onboardingEntity,\n onboardingStatus,\n}: OnboardingStatusBadgeProps<T>) => {\n const { Badge } = useComponentContext()\n const { t } = useTranslation()\n\n //HACK: `never` should instead be a better type\n return (\n <Badge status={onboarded ? 'success' : 'warning'}>\n {t(`onboardingStatus.${onboardingEntity}.${onboardingStatus ?? 'undefined'}` as never)}\n </Badge>\n )\n}\n\ninterface ContractorOnboardingStatusBadgeProps {\n onboarded?: boolean\n onboardingStatus?: ContractorOnboardingStatus1 | null\n}\n/** @internal */\nexport const ContractorOnboardingStatusBadge = (props: ContractorOnboardingStatusBadgeProps) => (\n <OnboardingStatusBadge {...props} onboardingEntity=\"contractor\" />\n)\n\ninterface EmployeeOnboardingStatusBadgeProps {\n onboarded?: boolean\n onboardingStatus?: OnboardingStatus | null\n}\n/** @internal */\nexport const EmployeeOnboardingStatusBadge = (props: EmployeeOnboardingStatusBadgeProps) => (\n <OnboardingStatusBadge {...props} onboardingEntity=\"employee\" />\n)\n"],"names":["OnboardingStatusBadge","onboarded","onboardingEntity","onboardingStatus","Badge","useComponentContext","t","useTranslation","jsx","ContractorOnboardingStatusBadge","props","EmployeeOnboardingStatusBadge"],"mappings":";;;AAaO,MAAMA,IAAwB,CAA+B;AAAA,EAClE,WAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,kBAAAC;AACF,MAAqC;AACnC,QAAM,EAAE,OAAAC,EAAA,IAAUC,EAAA,GACZ,EAAE,GAAAC,EAAA,IAAMC,EAAA;AAGd,SACE,gBAAAC,EAACJ,GAAA,EAAM,QAAQH,IAAY,YAAY,WACpC,UAAAK,EAAE,oBAAoBJ,CAAgB,IAAIC,KAAoB,WAAW,EAAW,GACvF;AAEJ,GAOaM,IAAkC,CAACC,MAC9C,gBAAAF,EAACR,KAAuB,GAAGU,GAAO,kBAAiB,aAAA,CAAa,GAQrDC,IAAgC,CAACD,MAC5C,gBAAAF,EAACR,KAAuB,GAAGU,GAAO,kBAAiB,WAAA,CAAW;"}
@@ -7,5 +7,6 @@ interface DropZoneProps {
7
7
  listId: string;
8
8
  className?: string;
9
9
  }
10
+ /** @internal */
10
11
  export declare const DropZone: import('react').NamedExoticComponent<DropZoneProps>;
11
12
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"DropZone.js","sources":["../../../../src/components/Common/ReorderableList/DropZone.tsx"],"sourcesContent":["import { useRef, useEffect, memo } from 'react'\nimport classnames from 'classnames'\nimport { useDrop } from 'react-dnd'\nimport { useTranslation } from 'react-i18next'\nimport styles from './ReorderableList.module.scss'\nimport { ITEM_TYPE } from './constants'\n\ninterface DropZoneProps {\n position: number\n isActive: boolean\n onActivate: () => void\n onDeactivate: () => void\n onDrop: (fromPosition: number) => void\n listId: string\n className?: string\n}\n\nexport const DropZone = memo(function DropZone({\n position,\n isActive,\n onActivate,\n onDeactivate,\n onDrop,\n listId,\n className,\n}: DropZoneProps) {\n const ref = useRef<HTMLDivElement>(null)\n const { t } = useTranslation()\n\n // Add a debounce timer for hover state changes to prevent flickering\n const debounceTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null)\n const isHoveringRef = useRef(false)\n\n const [{ isOver }, drop] = useDrop(\n () => ({\n accept: ITEM_TYPE,\n hover: (item: { index: number; listId: string }, monitor) => {\n if (item.listId !== listId) return\n\n const clientOffset = monitor.getClientOffset()\n if (!clientOffset || !ref.current) return\n\n if (isHoveringRef.current) return\n\n isHoveringRef.current = true\n\n if (debounceTimerRef.current) {\n clearTimeout(debounceTimerRef.current)\n }\n\n onActivate()\n },\n collect: monitor => ({\n isOver: monitor.isOver(),\n }),\n drop: (item: { index: number; listId: string }) => {\n if (item.listId !== listId) return\n onDeactivate()\n onDrop(item.index)\n return { dropped: true }\n },\n canDrop: (item: { index: number; listId: string }) => {\n if (item.listId !== listId) return false\n return item.index !== position && item.index !== position - 1\n },\n }),\n [listId, onActivate, onDeactivate, onDrop, position],\n )\n\n // Connect the drop ref to the DOM element\n useEffect(() => {\n if (ref.current) {\n drop(ref.current)\n }\n }, [drop])\n\n // Handle deactivation when item is no longer being hovered\n useEffect(() => {\n if (!isOver && isActive) {\n if (debounceTimerRef.current) {\n clearTimeout(debounceTimerRef.current)\n }\n\n debounceTimerRef.current = setTimeout(() => {\n isHoveringRef.current = false\n onDeactivate()\n debounceTimerRef.current = null\n }, 100)\n }\n\n return () => {\n if (debounceTimerRef.current) {\n clearTimeout(debounceTimerRef.current)\n }\n }\n }, [isOver, isActive, onDeactivate])\n\n const isHighlighted = isActive || isOver\n\n const dropZoneClass = classnames(\n styles.dropZone,\n isActive || isOver ? styles.activeDropZone : '',\n isHighlighted ? styles.isHighlighted : '',\n className,\n )\n\n return (\n <div className={styles.dropZoneContainer}>\n <div\n ref={ref}\n className={dropZoneClass}\n data-position={position}\n data-list-id={listId}\n aria-hidden=\"true\"\n aria-label={t('reorderableList.dropItemHere')}\n />\n </div>\n )\n})\n"],"names":["DropZone","memo","position","isActive","onActivate","onDeactivate","onDrop","listId","className","ref","useRef","t","useTranslation","debounceTimerRef","isHoveringRef","isOver","drop","useDrop","ITEM_TYPE","item","monitor","useEffect","isHighlighted","dropZoneClass","classnames","styles","jsx"],"mappings":";;;;;;;AAiBO,MAAMA,IAAWC,EAAK,SAAkB;AAAA,EAC7C,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,cAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AACF,GAAkB;AAChB,QAAMC,IAAMC,EAAuB,IAAI,GACjC,EAAE,GAAAC,EAAA,IAAMC,EAAA,GAGRC,IAAmBH,EAA6C,IAAI,GACpEI,IAAgBJ,EAAO,EAAK,GAE5B,CAAC,EAAE,QAAAK,KAAUC,CAAI,IAAIC;AAAA,IACzB,OAAO;AAAA,MACL,QAAQC;AAAA,MACR,OAAO,CAACC,GAAyCC,MAAY;AAI3D,QAHID,EAAK,WAAWZ,KAGhB,CADiBa,EAAQ,gBAAA,KACR,CAACX,EAAI,WAEtBK,EAAc,YAElBA,EAAc,UAAU,IAEpBD,EAAiB,WACnB,aAAaA,EAAiB,OAAO,GAGvCT,EAAA;AAAA,MACF;AAAA,MACA,SAAS,CAAAgB,OAAY;AAAA,QACnB,QAAQA,EAAQ,OAAA;AAAA,MAAO;AAAA,MAEzB,MAAM,CAACD,MAA4C;AACjD,YAAIA,EAAK,WAAWZ;AACpB,iBAAAF,EAAA,GACAC,EAAOa,EAAK,KAAK,GACV,EAAE,SAAS,GAAA;AAAA,MACpB;AAAA,MACA,SAAS,CAACA,MACJA,EAAK,WAAWZ,IAAe,KAC5BY,EAAK,UAAUjB,KAAYiB,EAAK,UAAUjB,IAAW;AAAA,IAC9D;AAAA,IAEF,CAACK,GAAQH,GAAYC,GAAcC,GAAQJ,CAAQ;AAAA,EAAA;AAIrD,EAAAmB,EAAU,MAAM;AACd,IAAIZ,EAAI,WACNO,EAAKP,EAAI,OAAO;AAAA,EAEpB,GAAG,CAACO,CAAI,CAAC,GAGTK,EAAU,OACJ,CAACN,KAAUZ,MACTU,EAAiB,WACnB,aAAaA,EAAiB,OAAO,GAGvCA,EAAiB,UAAU,WAAW,MAAM;AAC1C,IAAAC,EAAc,UAAU,IACxBT,EAAA,GACAQ,EAAiB,UAAU;AAAA,EAC7B,GAAG,GAAG,IAGD,MAAM;AACX,IAAIA,EAAiB,WACnB,aAAaA,EAAiB,OAAO;AAAA,EAEzC,IACC,CAACE,GAAQZ,GAAUE,CAAY,CAAC;AAEnC,QAAMiB,IAAgBnB,KAAYY,GAE5BQ,IAAgBC;AAAAA,IACpBC,EAAO;AAAA,IACPtB,KAAYY,IAASU,EAAO,iBAAiB;AAAA,IAC7CH,IAAgBG,EAAO,gBAAgB;AAAA,IACvCjB;AAAA,EAAA;AAGF,SACE,gBAAAkB,EAAC,OAAA,EAAI,WAAWD,EAAO,mBACrB,UAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAjB;AAAA,MACA,WAAWc;AAAA,MACX,iBAAerB;AAAA,MACf,gBAAcK;AAAA,MACd,eAAY;AAAA,MACZ,cAAYI,EAAE,8BAA8B;AAAA,IAAA;AAAA,EAAA,GAEhD;AAEJ,CAAC;"}
1
+ {"version":3,"file":"DropZone.js","sources":["../../../../src/components/Common/ReorderableList/DropZone.tsx"],"sourcesContent":["import { useRef, useEffect, memo } from 'react'\nimport classnames from 'classnames'\nimport { useDrop } from 'react-dnd'\nimport { useTranslation } from 'react-i18next'\nimport styles from './ReorderableList.module.scss'\nimport { ITEM_TYPE } from './constants'\n\ninterface DropZoneProps {\n position: number\n isActive: boolean\n onActivate: () => void\n onDeactivate: () => void\n onDrop: (fromPosition: number) => void\n listId: string\n className?: string\n}\n\n/** @internal */\nexport const DropZone = memo(function DropZone({\n position,\n isActive,\n onActivate,\n onDeactivate,\n onDrop,\n listId,\n className,\n}: DropZoneProps) {\n const ref = useRef<HTMLDivElement>(null)\n const { t } = useTranslation()\n\n // Add a debounce timer for hover state changes to prevent flickering\n const debounceTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null)\n const isHoveringRef = useRef(false)\n\n const [{ isOver }, drop] = useDrop(\n () => ({\n accept: ITEM_TYPE,\n hover: (item: { index: number; listId: string }, monitor) => {\n if (item.listId !== listId) return\n\n const clientOffset = monitor.getClientOffset()\n if (!clientOffset || !ref.current) return\n\n if (isHoveringRef.current) return\n\n isHoveringRef.current = true\n\n if (debounceTimerRef.current) {\n clearTimeout(debounceTimerRef.current)\n }\n\n onActivate()\n },\n collect: monitor => ({\n isOver: monitor.isOver(),\n }),\n drop: (item: { index: number; listId: string }) => {\n if (item.listId !== listId) return\n onDeactivate()\n onDrop(item.index)\n return { dropped: true }\n },\n canDrop: (item: { index: number; listId: string }) => {\n if (item.listId !== listId) return false\n return item.index !== position && item.index !== position - 1\n },\n }),\n [listId, onActivate, onDeactivate, onDrop, position],\n )\n\n // Connect the drop ref to the DOM element\n useEffect(() => {\n if (ref.current) {\n drop(ref.current)\n }\n }, [drop])\n\n // Handle deactivation when item is no longer being hovered\n useEffect(() => {\n if (!isOver && isActive) {\n if (debounceTimerRef.current) {\n clearTimeout(debounceTimerRef.current)\n }\n\n debounceTimerRef.current = setTimeout(() => {\n isHoveringRef.current = false\n onDeactivate()\n debounceTimerRef.current = null\n }, 100)\n }\n\n return () => {\n if (debounceTimerRef.current) {\n clearTimeout(debounceTimerRef.current)\n }\n }\n }, [isOver, isActive, onDeactivate])\n\n const isHighlighted = isActive || isOver\n\n const dropZoneClass = classnames(\n styles.dropZone,\n isActive || isOver ? styles.activeDropZone : '',\n isHighlighted ? styles.isHighlighted : '',\n className,\n )\n\n return (\n <div className={styles.dropZoneContainer}>\n <div\n ref={ref}\n className={dropZoneClass}\n data-position={position}\n data-list-id={listId}\n aria-hidden=\"true\"\n aria-label={t('reorderableList.dropItemHere')}\n />\n </div>\n )\n})\n"],"names":["DropZone","memo","position","isActive","onActivate","onDeactivate","onDrop","listId","className","ref","useRef","t","useTranslation","debounceTimerRef","isHoveringRef","isOver","drop","useDrop","ITEM_TYPE","item","monitor","useEffect","isHighlighted","dropZoneClass","classnames","styles","jsx"],"mappings":";;;;;;;AAkBO,MAAMA,IAAWC,EAAK,SAAkB;AAAA,EAC7C,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC;AAAA,EACA,cAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AACF,GAAkB;AAChB,QAAMC,IAAMC,EAAuB,IAAI,GACjC,EAAE,GAAAC,EAAA,IAAMC,EAAA,GAGRC,IAAmBH,EAA6C,IAAI,GACpEI,IAAgBJ,EAAO,EAAK,GAE5B,CAAC,EAAE,QAAAK,KAAUC,CAAI,IAAIC;AAAA,IACzB,OAAO;AAAA,MACL,QAAQC;AAAA,MACR,OAAO,CAACC,GAAyCC,MAAY;AAI3D,QAHID,EAAK,WAAWZ,KAGhB,CADiBa,EAAQ,gBAAA,KACR,CAACX,EAAI,WAEtBK,EAAc,YAElBA,EAAc,UAAU,IAEpBD,EAAiB,WACnB,aAAaA,EAAiB,OAAO,GAGvCT,EAAA;AAAA,MACF;AAAA,MACA,SAAS,CAAAgB,OAAY;AAAA,QACnB,QAAQA,EAAQ,OAAA;AAAA,MAAO;AAAA,MAEzB,MAAM,CAACD,MAA4C;AACjD,YAAIA,EAAK,WAAWZ;AACpB,iBAAAF,EAAA,GACAC,EAAOa,EAAK,KAAK,GACV,EAAE,SAAS,GAAA;AAAA,MACpB;AAAA,MACA,SAAS,CAACA,MACJA,EAAK,WAAWZ,IAAe,KAC5BY,EAAK,UAAUjB,KAAYiB,EAAK,UAAUjB,IAAW;AAAA,IAC9D;AAAA,IAEF,CAACK,GAAQH,GAAYC,GAAcC,GAAQJ,CAAQ;AAAA,EAAA;AAIrD,EAAAmB,EAAU,MAAM;AACd,IAAIZ,EAAI,WACNO,EAAKP,EAAI,OAAO;AAAA,EAEpB,GAAG,CAACO,CAAI,CAAC,GAGTK,EAAU,OACJ,CAACN,KAAUZ,MACTU,EAAiB,WACnB,aAAaA,EAAiB,OAAO,GAGvCA,EAAiB,UAAU,WAAW,MAAM;AAC1C,IAAAC,EAAc,UAAU,IACxBT,EAAA,GACAQ,EAAiB,UAAU;AAAA,EAC7B,GAAG,GAAG,IAGD,MAAM;AACX,IAAIA,EAAiB,WACnB,aAAaA,EAAiB,OAAO;AAAA,EAEzC,IACC,CAACE,GAAQZ,GAAUE,CAAY,CAAC;AAEnC,QAAMiB,IAAgBnB,KAAYY,GAE5BQ,IAAgBC;AAAAA,IACpBC,EAAO;AAAA,IACPtB,KAAYY,IAASU,EAAO,iBAAiB;AAAA,IAC7CH,IAAgBG,EAAO,gBAAgB;AAAA,IACvCjB;AAAA,EAAA;AAGF,SACE,gBAAAkB,EAAC,OAAA,EAAI,WAAWD,EAAO,mBACrB,UAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAAjB;AAAA,MACA,WAAWc;AAAA,MACX,iBAAerB;AAAA,MACf,gBAAcK;AAAA,MACd,eAAY;AAAA,MACZ,cAAYI,EAAE,8BAA8B;AAAA,IAAA;AAAA,EAAA,GAEhD;AAEJ,CAAC;"}