@gusto/embedded-react-sdk 0.8.0 → 0.8.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 (214) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js +5 -3
  3. package/dist/components/Common/DataView/DataCards/DataCards.module.scss.js.map +1 -1
  4. package/dist/components/Common/FadeIn/FadeIn.module.scss.js +4 -4
  5. package/dist/components/Common/{UI/FieldCaption → FieldCaption}/FieldCaption.js +1 -1
  6. package/dist/components/Common/FieldCaption/FieldCaption.js.map +1 -0
  7. package/dist/components/Common/{UI/FieldDescription → FieldDescription}/FieldDescription.js +1 -1
  8. package/dist/components/Common/FieldDescription/FieldDescription.js.map +1 -0
  9. package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/FieldErrorMessage.js +1 -1
  10. package/dist/components/Common/FieldErrorMessage/FieldErrorMessage.js.map +1 -0
  11. package/dist/components/Common/{UI/FieldLayout → FieldLayout}/FieldLayout.js +1 -1
  12. package/dist/components/Common/FieldLayout/FieldLayout.js.map +1 -0
  13. package/dist/components/Common/FieldLayout/FieldLayoutTypes.d.ts +52 -0
  14. package/dist/components/Common/{UI/Fieldset → Fieldset}/Fieldset.js +1 -1
  15. package/dist/components/Common/Fieldset/Fieldset.js.map +1 -0
  16. package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayout.js +2 -2
  17. package/dist/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.js.map +1 -0
  18. package/dist/components/Common/SignatureForm/SignatureForm.d.ts +12 -6
  19. package/dist/components/Common/SignatureForm/SignatureForm.js +10 -10
  20. package/dist/components/Common/SignatureForm/SignatureForm.js.map +1 -1
  21. package/dist/components/Common/UI/Alert/Alert.d.ts +1 -1
  22. package/dist/components/Common/UI/Alert/Alert.js +13 -12
  23. package/dist/components/Common/UI/Alert/Alert.js.map +1 -1
  24. package/dist/components/Common/UI/Alert/AlertTypes.d.ts +16 -4
  25. package/dist/components/Common/UI/Badge/BadgeTypes.d.ts +6 -0
  26. package/dist/components/Common/UI/Button/Button.js +28 -27
  27. package/dist/components/Common/UI/Button/Button.js.map +1 -1
  28. package/dist/components/Common/UI/Button/Button.module.scss.js +1 -1
  29. package/dist/components/Common/UI/Button/ButtonTypes.d.ts +29 -4
  30. package/dist/components/Common/UI/CalendarPreview/CalendarPreviewTypes.d.ts +24 -0
  31. package/dist/components/Common/UI/Card/Card.module.scss.js +1 -1
  32. package/dist/components/Common/UI/Card/CardTypes.d.ts +12 -4
  33. package/dist/components/Common/UI/Checkbox/Checkbox.js +4 -4
  34. package/dist/components/Common/UI/Checkbox/Checkbox.js.map +1 -1
  35. package/dist/components/Common/UI/Checkbox/CheckboxTypes.d.ts +16 -1
  36. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js +4 -4
  37. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroup.js.map +1 -1
  38. package/dist/components/Common/UI/CheckboxGroup/CheckboxGroupTypes.d.ts +33 -3
  39. package/dist/components/Common/UI/ComboBox/ComboBox.js +8 -8
  40. package/dist/components/Common/UI/ComboBox/ComboBox.js.map +1 -1
  41. package/dist/components/Common/UI/ComboBox/ComboBoxTypes.d.ts +31 -1
  42. package/dist/components/Common/UI/DatePicker/DatePicker.js +13 -13
  43. package/dist/components/Common/UI/DatePicker/DatePicker.js.map +1 -1
  44. package/dist/components/Common/UI/DatePicker/DatePickerTypes.d.ts +25 -1
  45. package/dist/components/Common/UI/Heading/HeadingTypes.d.ts +12 -0
  46. package/dist/components/Common/UI/Link/LinkTypes.d.ts +53 -1
  47. package/dist/components/Common/UI/List/ListTypes.d.ts +3 -5
  48. package/dist/components/Common/UI/Menu/MenuTypes.d.ts +30 -0
  49. package/dist/components/Common/UI/NumberInput/NumberInput.js +4 -4
  50. package/dist/components/Common/UI/NumberInput/NumberInput.js.map +1 -1
  51. package/dist/components/Common/UI/NumberInput/NumberInputTypes.d.ts +34 -1
  52. package/dist/components/Common/UI/ProgressBar/ProgressBarTypes.d.ts +12 -0
  53. package/dist/components/Common/UI/Radio/Radio.js +1 -1
  54. package/dist/components/Common/UI/Radio/Radio.js.map +1 -1
  55. package/dist/components/Common/UI/Radio/RadioTypes.d.ts +16 -1
  56. package/dist/components/Common/UI/RadioGroup/RadioGroup.js +4 -4
  57. package/dist/components/Common/UI/RadioGroup/RadioGroup.js.map +1 -1
  58. package/dist/components/Common/UI/RadioGroup/RadioGroupTypes.d.ts +33 -3
  59. package/dist/components/Common/UI/Select/Select.js +8 -8
  60. package/dist/components/Common/UI/Select/Select.js.map +1 -1
  61. package/dist/components/Common/UI/Select/SelectTypes.d.ts +34 -1
  62. package/dist/components/Common/UI/Switch/Switch.js +1 -1
  63. package/dist/components/Common/UI/Switch/Switch.js.map +1 -1
  64. package/dist/components/Common/UI/Switch/SwitchTypes.d.ts +25 -1
  65. package/dist/components/Common/UI/Table/TableTypes.d.ts +21 -0
  66. package/dist/components/Common/UI/Text/TextTypes.d.ts +18 -0
  67. package/dist/components/Common/UI/TextInput/TextInput.js +1 -1
  68. package/dist/components/Common/UI/TextInput/TextInput.js.map +1 -1
  69. package/dist/components/Common/UI/TextInput/TextInputTypes.d.ts +22 -1
  70. package/dist/components/Company/AssignSignatory/AssignSignatory.js +12 -12
  71. package/dist/components/Company/AssignSignatory/AssignSignatory.js.map +1 -1
  72. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js +7 -7
  73. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatory.js.map +1 -1
  74. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.d.ts +2 -2
  75. package/dist/components/Company/AssignSignatory/CreateSignatory/CreateSignatoryForm.js.map +1 -1
  76. package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.d.ts +41 -15
  77. package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.js +17 -20
  78. package/dist/components/Company/AssignSignatory/CreateSignatory/Schema.js.map +1 -1
  79. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js +10 -10
  80. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatory.js.map +1 -1
  81. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.d.ts +17 -11
  82. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js +42 -45
  83. package/dist/components/Company/AssignSignatory/InviteSignatory/InviteSignatoryForm.js.map +1 -1
  84. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js +6 -6
  85. package/dist/components/Company/BankAccount/BankAccountForm/BankAccountForm.js.map +1 -1
  86. package/dist/components/Company/BankAccount/BankAccountForm/Form.d.ts +12 -6
  87. package/dist/components/Company/BankAccount/BankAccountForm/Form.js +2 -2
  88. package/dist/components/Company/BankAccount/BankAccountForm/Form.js.map +1 -1
  89. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js +10 -10
  90. package/dist/components/Company/BankAccount/BankAccountVerify/BankAccountVerify.js.map +1 -1
  91. package/dist/components/Company/BankAccount/BankAccountVerify/Form.d.ts +12 -6
  92. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js +17 -17
  93. package/dist/components/Company/BankAccount/BankAccountVerify/Form.js.map +1 -1
  94. package/dist/components/Company/DocumentSignerFlow/SignatureForm/SignatureForm.js +1 -1
  95. package/dist/components/Company/DocumentSignerFlow/SignatureForm/SignatureForm.js.map +1 -1
  96. package/dist/components/Company/FederalTaxes/FederalTaxes.js +5 -5
  97. package/dist/components/Company/FederalTaxes/FederalTaxes.js.map +1 -1
  98. package/dist/components/Company/FederalTaxes/useFederalTaxes.d.ts +18 -8
  99. package/dist/components/Company/FederalTaxes/useFederalTaxes.js +12 -16
  100. package/dist/components/Company/FederalTaxes/useFederalTaxes.js.map +1 -1
  101. package/dist/components/Company/Industry/Industry.js +1 -1
  102. package/dist/components/Company/Industry/Industry.js.map +1 -1
  103. package/dist/components/Company/Locations/LocationForm/Form.d.ts +27 -11
  104. package/dist/components/Company/Locations/LocationForm/Form.js +24 -24
  105. package/dist/components/Company/Locations/LocationForm/Form.js.map +1 -1
  106. package/dist/components/Company/Locations/LocationForm/LocationForm.js +24 -24
  107. package/dist/components/Company/Locations/LocationForm/LocationForm.js.map +1 -1
  108. package/dist/components/Company/PaySchedule/PaySchedule.js +7 -7
  109. package/dist/components/Company/PaySchedule/PaySchedule.js.map +1 -1
  110. package/dist/components/Company/PaySchedule/_parts/List.js +28 -31
  111. package/dist/components/Company/PaySchedule/_parts/List.js.map +1 -1
  112. package/dist/components/Company/PaySchedule/_parts/List.module.scss.js +8 -0
  113. package/dist/components/Company/PaySchedule/_parts/List.module.scss.js.map +1 -0
  114. package/dist/components/Company/PaySchedule/usePaySchedule.d.ts +31 -13
  115. package/dist/components/Company/PaySchedule/usePaySchedule.js +15 -20
  116. package/dist/components/Company/PaySchedule/usePaySchedule.js.map +1 -1
  117. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.d.ts +3 -3
  118. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js +3 -3
  119. package/dist/components/Company/StateTaxes/StateTaxesForm/Form.js.map +1 -1
  120. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js +66 -77
  121. package/dist/components/Company/StateTaxes/StateTaxesForm/StateTaxesForm.js.map +1 -1
  122. package/dist/components/Employee/Compensation/Compensation.js +5 -5
  123. package/dist/components/Employee/Compensation/Compensation.js.map +1 -1
  124. package/dist/components/Employee/Compensation/List.js +10 -10
  125. package/dist/components/Employee/Compensation/List.js.map +1 -1
  126. package/dist/components/Employee/Compensation/useCompensation.d.ts +90 -42
  127. package/dist/components/Employee/Compensation/useCompensation.js +45 -69
  128. package/dist/components/Employee/Compensation/useCompensation.js.map +1 -1
  129. package/dist/components/Employee/Deductions/Deductions.d.ts +9 -5
  130. package/dist/components/Employee/Deductions/Deductions.js +13 -13
  131. package/dist/components/Employee/Deductions/Deductions.js.map +1 -1
  132. package/dist/components/Employee/Deductions/useDeductions.d.ts +34 -14
  133. package/dist/components/Employee/Deductions/useDeductions.js +14 -32
  134. package/dist/components/Employee/Deductions/useDeductions.js.map +1 -1
  135. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js +1 -1
  136. package/dist/components/Employee/DocumentSigner/SignatureForm/SignatureForm.js.map +1 -1
  137. package/dist/components/Employee/EmployeeList/EmployeeList.js +1 -1
  138. package/dist/components/Employee/EmployeeList/EmployeeList.js.map +1 -1
  139. package/dist/components/Employee/PaymentMethod/BankAccount.d.ts +22 -10
  140. package/dist/components/Employee/PaymentMethod/BankAccount.js +9 -9
  141. package/dist/components/Employee/PaymentMethod/BankAccount.js.map +1 -1
  142. package/dist/components/Employee/PaymentMethod/PaymentMethod.js +13 -13
  143. package/dist/components/Employee/PaymentMethod/PaymentMethod.js.map +1 -1
  144. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.d.ts +10 -6
  145. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js +8 -8
  146. package/dist/components/Employee/PaymentMethod/PaymentTypeForm.js.map +1 -1
  147. package/dist/components/Employee/PaymentMethod/usePaymentMethod.d.ts +92 -37
  148. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js +35 -42
  149. package/dist/components/Employee/PaymentMethod/usePaymentMethod.js.map +1 -1
  150. package/dist/components/Employee/Profile/AdminPersonalDetails.d.ts +68 -31
  151. package/dist/components/Employee/Profile/AdminPersonalDetails.js +33 -46
  152. package/dist/components/Employee/Profile/AdminPersonalDetails.js.map +1 -1
  153. package/dist/components/Employee/Profile/HomeAddress.d.ts +33 -13
  154. package/dist/components/Employee/Profile/HomeAddress.js +39 -38
  155. package/dist/components/Employee/Profile/HomeAddress.js.map +1 -1
  156. package/dist/components/Employee/Profile/PersonalDetailsInputs.d.ts +81 -32
  157. package/dist/components/Employee/Profile/PersonalDetailsInputs.js +60 -74
  158. package/dist/components/Employee/Profile/PersonalDetailsInputs.js.map +1 -1
  159. package/dist/components/Employee/Profile/Profile.js +51 -55
  160. package/dist/components/Employee/Profile/Profile.js.map +1 -1
  161. package/dist/components/Employee/Profile/SelfPersonalDetails.d.ts +44 -15
  162. package/dist/components/Employee/Profile/SelfPersonalDetails.js +18 -21
  163. package/dist/components/Employee/Profile/SelfPersonalDetails.js.map +1 -1
  164. package/dist/components/Employee/Taxes/FederalForm.d.ts +28 -12
  165. package/dist/components/Employee/Taxes/FederalForm.js +28 -28
  166. package/dist/components/Employee/Taxes/FederalForm.js.map +1 -1
  167. package/dist/components/Employee/Taxes/StateForm.d.ts +9 -5
  168. package/dist/components/Employee/Taxes/StateForm.js +5 -5
  169. package/dist/components/Employee/Taxes/StateForm.js.map +1 -1
  170. package/dist/components/Employee/Taxes/Taxes.js +31 -34
  171. package/dist/components/Employee/Taxes/Taxes.js.map +1 -1
  172. package/dist/contexts/ApiProvider/ApiProvider.d.ts +5 -0
  173. package/dist/contexts/ApiProvider/ApiProvider.js +34 -0
  174. package/dist/contexts/ApiProvider/ApiProvider.js.map +1 -0
  175. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.d.ts +1 -1
  176. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js +16 -16
  177. package/dist/contexts/GustoProvider/GustoProviderCustomUIAdapter.js.map +1 -1
  178. package/dist/helpers/validations.d.ts +6 -5
  179. package/dist/helpers/validations.js +10 -17
  180. package/dist/helpers/validations.js.map +1 -1
  181. package/dist/style.css +1 -1
  182. package/package.json +7 -4
  183. package/dist/components/Common/UI/FieldCaption/FieldCaption.js.map +0 -1
  184. package/dist/components/Common/UI/FieldDescription/FieldDescription.js.map +0 -1
  185. package/dist/components/Common/UI/FieldErrorMessage/FieldErrorMessage.js.map +0 -1
  186. package/dist/components/Common/UI/FieldLayout/FieldLayout.js.map +0 -1
  187. package/dist/components/Common/UI/FieldLayout/FieldLayoutTypes.d.ts +0 -19
  188. package/dist/components/Common/UI/Fieldset/Fieldset.js.map +0 -1
  189. package/dist/components/Common/UI/HorizontalFieldLayout/HorizontalFieldLayout.js.map +0 -1
  190. /package/dist/components/Common/{UI/FieldCaption → FieldCaption}/FieldCaption.d.ts +0 -0
  191. /package/dist/components/Common/{UI/FieldCaption → FieldCaption}/FieldCaption.module.scss.js +0 -0
  192. /package/dist/components/Common/{UI/FieldCaption → FieldCaption}/FieldCaption.module.scss.js.map +0 -0
  193. /package/dist/components/Common/{UI/FieldCaption → FieldCaption}/index.d.ts +0 -0
  194. /package/dist/components/Common/{UI/FieldDescription → FieldDescription}/FieldDescription.d.ts +0 -0
  195. /package/dist/components/Common/{UI/FieldDescription → FieldDescription}/FieldDescription.module.scss.js +0 -0
  196. /package/dist/components/Common/{UI/FieldDescription → FieldDescription}/FieldDescription.module.scss.js.map +0 -0
  197. /package/dist/components/Common/{UI/FieldDescription → FieldDescription}/index.d.ts +0 -0
  198. /package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/FieldErrorMessage.d.ts +0 -0
  199. /package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/FieldErrorMessage.module.scss.js +0 -0
  200. /package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/FieldErrorMessage.module.scss.js.map +0 -0
  201. /package/dist/components/Common/{UI/FieldErrorMessage → FieldErrorMessage}/index.d.ts +0 -0
  202. /package/dist/components/Common/{UI/FieldLayout → FieldLayout}/FieldLayout.d.ts +0 -0
  203. /package/dist/components/Common/{UI/FieldLayout → FieldLayout}/FieldLayout.module.scss.js +0 -0
  204. /package/dist/components/Common/{UI/FieldLayout → FieldLayout}/FieldLayout.module.scss.js.map +0 -0
  205. /package/dist/components/Common/{UI/FieldLayout → FieldLayout}/index.d.ts +0 -0
  206. /package/dist/components/Common/{UI/Fieldset → Fieldset}/Fieldset.d.ts +0 -0
  207. /package/dist/components/Common/{UI/Fieldset → Fieldset}/Fieldset.module.scss.js +0 -0
  208. /package/dist/components/Common/{UI/Fieldset → Fieldset}/Fieldset.module.scss.js.map +0 -0
  209. /package/dist/components/Common/{UI/Fieldset → Fieldset}/index.d.ts +0 -0
  210. /package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayout.d.ts +0 -0
  211. /package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayout.module.scss.js +0 -0
  212. /package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayout.module.scss.js.map +0 -0
  213. /package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/HorizontalFieldLayoutTypes.d.ts +0 -0
  214. /package/dist/components/Common/{UI/HorizontalFieldLayout → HorizontalFieldLayout}/index.d.ts +0 -0
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.1
4
+
5
+ - Replaced Valibot with Zod for bundle size reduction. Also included zod as a dependency
6
+ - Updated package.json to fix an issue with types being unavailable for consumers
7
+ - Misc style corrections and consistency fixes
8
+ - Updated component adapter documentation to include generated props
9
+ - bug: GWS-4966 headers not being set properly for requests when configured in GustoProvider
10
+ - moved APIProvider into `embedded-react-sdk` from `embedded-api` package
11
+
3
12
  ## 0.8.0
4
13
 
5
14
  - Company Onboarding flow improvements and fixes:
@@ -1,8 +1,10 @@
1
- const t = "_columnTitle_1t032_1", l = {
2
- columnTitle: t
1
+ const t = "_columnTitle_1djp5_1", l = "_columnData_1djp5_8", o = {
2
+ columnTitle: t,
3
+ columnData: l
3
4
  };
4
5
  export {
6
+ l as columnData,
5
7
  t as columnTitle,
6
- l as default
8
+ o as default
7
9
  };
8
10
  //# sourceMappingURL=DataCards.module.scss.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"DataCards.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;"}
1
+ {"version":3,"file":"DataCards.module.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;"}
@@ -1,10 +1,10 @@
1
- const e = "_fade_4tpvm_1", a = "_fadeIn_4tpvm_7", t = {
1
+ const e = "_fade_6tfn1_1", f = "_fadeIn_6tfn1_8", a = {
2
2
  fade: e,
3
- fadeIn: a
3
+ fadeIn: f
4
4
  };
5
5
  export {
6
- t as default,
6
+ a as default,
7
7
  e as fade,
8
- a as fadeIn
8
+ f as fadeIn
9
9
  };
10
10
  //# sourceMappingURL=FadeIn.module.scss.js.map
@@ -2,7 +2,7 @@ import { jsxs as c, jsx as l } from "react/jsx-runtime";
2
2
  import { useTranslation as p } from "react-i18next";
3
3
  import d from "classnames";
4
4
  import n from "./FieldCaption.module.scss.js";
5
- import { VisuallyHidden as f } from "../../VisuallyHidden/VisuallyHidden.js";
5
+ import { VisuallyHidden as f } from "../VisuallyHidden/VisuallyHidden.js";
6
6
  const j = ({
7
7
  children: e,
8
8
  as: o = "label",
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldCaption.js","sources":["../../../../src/components/Common/FieldCaption/FieldCaption.tsx"],"sourcesContent":["import { useTranslation } from 'react-i18next'\nimport classNames from 'classnames'\nimport { VisuallyHidden } from '../VisuallyHidden'\nimport styles from './FieldCaption.module.scss'\n\nexport interface FieldCaptionProps {\n children: React.ReactNode\n as?: 'label' | 'legend'\n htmlFor?: string\n isRequired?: boolean\n isVisuallyHidden?: boolean\n className?: string\n}\n\nexport const FieldCaption: React.FC<FieldCaptionProps> = ({\n children,\n as = 'label',\n htmlFor,\n isRequired = false,\n isVisuallyHidden = false,\n className,\n}: FieldCaptionProps) => {\n const { t } = useTranslation('common')\n const Component = as\n\n const content = (\n <Component\n className={classNames(styles.root, className)}\n htmlFor={as === 'label' ? htmlFor : undefined}\n >\n {children}\n {!isRequired && <span className={styles.optionalLabel}>{t('optionalLabel')}</span>}\n </Component>\n )\n\n return isVisuallyHidden ? <VisuallyHidden>{content}</VisuallyHidden> : content\n}\n"],"names":["FieldCaption","children","as","htmlFor","isRequired","isVisuallyHidden","className","t","useTranslation","content","jsxs","classNames","styles","jsx","VisuallyHidden"],"mappings":";;;;;AAcO,MAAMA,IAA4C,CAAC;AAAA,EACxD,UAAAC;AAAA,EACA,IAAAC,IAAK;AAAA,EACL,SAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,kBAAAC,IAAmB;AAAA,EACnB,WAAAC;AACF,MAAyB;AACvB,QAAM,EAAE,GAAAC,EAAA,IAAMC,EAAe,QAAQ,GAG/BC,IACJ,gBAAAC;AAAA,IAHgBR;AAAA,IAGf;AAAA,MACC,WAAWS,EAAWC,EAAO,MAAMN,CAAS;AAAA,MAC5C,SAASJ,MAAO,UAAUC,IAAU;AAAA,MAEnC,UAAA;AAAA,QAAAF;AAAA,QACA,CAACG,KAAe,gBAAAS,EAAA,QAAA,EAAK,WAAWD,EAAO,eAAgB,UAAEL,EAAA,eAAe,EAAE,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAC7E;AAGF,SAAOF,IAAmB,gBAAAQ,EAACC,GAAgB,EAAA,UAAAL,EAAQ,CAAA,IAAoBA;AACzE;"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as t } from "react/jsx-runtime";
2
2
  import e from "classnames";
3
3
  import p from "./FieldDescription.module.scss.js";
4
- import { createMarkup as a } from "../../../../helpers/formattedStrings.js";
4
+ import { createMarkup as a } from "../../../helpers/formattedStrings.js";
5
5
  const u = ({
6
6
  children: o,
7
7
  className: s,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldDescription.js","sources":["../../../../src/components/Common/FieldDescription/FieldDescription.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport styles from './FieldDescription.module.scss'\nimport { createMarkup } from '@/helpers/formattedStrings'\n\ninterface FieldDescriptionProps {\n children: React.ReactNode\n className?: string\n id?: string\n}\n\nexport const FieldDescription: React.FC<FieldDescriptionProps> = ({\n children,\n className,\n id,\n}: FieldDescriptionProps) => {\n const commonProps = {\n className: classNames(styles.root, className),\n id,\n }\n\n return (\n children &&\n (typeof children === 'string' ? (\n <div {...commonProps} dangerouslySetInnerHTML={createMarkup(children)} />\n ) : (\n <div {...commonProps}>{children}</div>\n ))\n )\n}\n"],"names":["FieldDescription","children","className","id","commonProps","classNames","styles","jsx","createMarkup"],"mappings":";;;;AAUO,MAAMA,IAAoD,CAAC;AAAA,EAChE,UAAAC;AAAA,EACA,WAAAC;AAAA,EACA,IAAAC;AACF,MAA6B;AAC3B,QAAMC,IAAc;AAAA,IAClB,WAAWC,EAAWC,EAAO,MAAMJ,CAAS;AAAA,IAC5C,IAAAC;AAAA,EACF;AAEA,SACEF,MACC,OAAOA,KAAa,WACnB,gBAAAM,EAAC,SAAK,GAAGH,GAAa,yBAAyBI,EAAaP,CAAQ,EAAG,CAAA,sBAEtE,OAAK,EAAA,GAAGG,GAAc,UAAAH,EAAS,CAAA;AAGtC;"}
@@ -1,7 +1,7 @@
1
1
  import { jsx as i } from "react/jsx-runtime";
2
2
  import p from "classnames";
3
3
  import r from "./FieldErrorMessage.module.scss.js";
4
- import { useComponentContext as a } from "../../../../contexts/ComponentAdapter/useComponentContext.js";
4
+ import { useComponentContext as a } from "../../../contexts/ComponentAdapter/useComponentContext.js";
5
5
  function l({
6
6
  children: o,
7
7
  id: t,
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldErrorMessage.js","sources":["../../../../src/components/Common/FieldErrorMessage/FieldErrorMessage.tsx"],"sourcesContent":["import type { HTMLAttributes } from 'react'\nimport classNames from 'classnames'\nimport styles from './FieldErrorMessage.module.scss'\nimport { useComponentContext } from '@/contexts/ComponentAdapter/useComponentContext'\n\ninterface FieldErrorMessageProps extends HTMLAttributes<HTMLParagraphElement> {\n withErrorIcon?: boolean\n}\n\nexport function FieldErrorMessage({\n children,\n id,\n className,\n withErrorIcon = true,\n ...props\n}: FieldErrorMessageProps) {\n const { Text } = useComponentContext()\n\n return (\n children && (\n <Text\n id={id}\n className={classNames(styles.root, className, {\n [styles.withErrorIcon as string]: withErrorIcon,\n })}\n {...props}\n >\n {children}\n </Text>\n )\n )\n}\n"],"names":["FieldErrorMessage","children","id","className","withErrorIcon","props","Text","useComponentContext","jsx","classNames","styles"],"mappings":";;;;AASO,SAASA,EAAkB;AAAA,EAChC,UAAAC;AAAA,EACA,IAAAC;AAAA,EACA,WAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,GAAGC;AACL,GAA2B;AACnB,QAAA,EAAE,MAAAC,EAAK,IAAIC,EAAoB;AAErC,SACEN,KACE,gBAAAO;AAAA,IAACF;AAAA,IAAA;AAAA,MACC,IAAAJ;AAAA,MACA,WAAWO,EAAWC,EAAO,MAAMP,GAAW;AAAA,QAC5C,CAACO,EAAO,aAAuB,GAAGN;AAAA,MAAA,CACnC;AAAA,MACA,GAAGC;AAAA,MAEH,UAAAJ;AAAA,IAAA;AAAA,EACH;AAGN;"}
@@ -2,7 +2,7 @@ import { jsxs as s, jsx as e } from "react/jsx-runtime";
2
2
  import t from "classnames";
3
3
  import { FieldCaption as F } from "../FieldCaption/FieldCaption.js";
4
4
  import r from "./FieldLayout.module.scss.js";
5
- import { getDataProps as N } from "../../../../helpers/getDataProps.js";
5
+ import { getDataProps as N } from "../../../helpers/getDataProps.js";
6
6
  import { FieldDescription as g } from "../FieldDescription/FieldDescription.js";
7
7
  import { FieldErrorMessage as x } from "../FieldErrorMessage/FieldErrorMessage.js";
8
8
  const A = ({
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FieldLayout.js","sources":["../../../../src/components/Common/FieldLayout/FieldLayout.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { FieldDescription } from '../FieldDescription'\nimport { FieldErrorMessage } from '../FieldErrorMessage'\nimport { FieldCaption } from '../FieldCaption/FieldCaption'\nimport styles from './FieldLayout.module.scss'\nimport type { FieldLayoutProps } from './FieldLayoutTypes'\nimport { getDataProps } from '@/helpers/getDataProps'\n\nexport const FieldLayout: React.FC<FieldLayoutProps> = ({\n label,\n description,\n descriptionId,\n errorMessage,\n errorMessageId,\n children,\n isRequired = false,\n htmlFor,\n shouldVisuallyHideLabel = false,\n className,\n withErrorIcon = true,\n ...props\n}: FieldLayoutProps) => {\n return (\n <div className={classNames(styles.root, className)} {...getDataProps(props)}>\n <div\n className={classNames(styles.labelAndDescription, {\n [styles.withVisibleLabel as string]: !shouldVisuallyHideLabel,\n [styles.withDescription as string]: Boolean(description),\n })}\n >\n <FieldCaption\n htmlFor={htmlFor}\n isRequired={isRequired}\n isVisuallyHidden={shouldVisuallyHideLabel}\n >\n {label}\n </FieldCaption>\n <FieldDescription id={descriptionId}>{description}</FieldDescription>\n </div>\n {children}\n <FieldErrorMessage\n id={errorMessageId}\n className={styles.errorMessage}\n withErrorIcon={withErrorIcon}\n >\n {errorMessage}\n </FieldErrorMessage>\n </div>\n )\n}\n"],"names":["FieldLayout","label","description","descriptionId","errorMessage","errorMessageId","children","isRequired","htmlFor","shouldVisuallyHideLabel","className","withErrorIcon","props","jsxs","classNames","styles","getDataProps","jsx","FieldCaption","FieldDescription","FieldErrorMessage"],"mappings":";;;;;;;AAQO,MAAMA,IAA0C,CAAC;AAAA,EACtD,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,SAAAC;AAAA,EACA,yBAAAC,IAA0B;AAAA,EAC1B,WAAAC;AAAA,EACA,eAAAC,IAAgB;AAAA,EAChB,GAAGC;AACL,MAEI,gBAAAC,EAAC,OAAI,EAAA,WAAWC,EAAWC,EAAO,MAAML,CAAS,GAAI,GAAGM,EAAaJ,CAAK,GACxE,UAAA;AAAA,EAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAWC,EAAO,qBAAqB;AAAA,QAChD,CAACA,EAAO,gBAA0B,GAAG,CAACN;AAAA,QACtC,CAACM,EAAO,eAAyB,GAAG,EAAQb;AAAA,MAAW,CACxD;AAAA,MAED,UAAA;AAAA,QAAA,gBAAAe;AAAA,UAACC;AAAA,UAAA;AAAA,YACC,SAAAV;AAAA,YACA,YAAAD;AAAA,YACA,kBAAkBE;AAAA,YAEjB,UAAAR;AAAA,UAAA;AAAA,QACH;AAAA,QACC,gBAAAgB,EAAAE,GAAA,EAAiB,IAAIhB,GAAgB,UAAYD,EAAA,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACpD;AAAA,EACCI;AAAA,EACD,gBAAAW;AAAA,IAACG;AAAA,IAAA;AAAA,MACC,IAAIf;AAAA,MACJ,WAAWU,EAAO;AAAA,MAClB,eAAAJ;AAAA,MAEC,UAAAP;AAAA,IAAA;AAAA,EAAA;AACH,GACF;"}
@@ -0,0 +1,52 @@
1
+ import { ReactNode } from 'react';
2
+ import { DataAttributes } from '../../../types/Helpers';
3
+ export interface SharedFieldLayoutProps extends DataAttributes {
4
+ /**
5
+ * Optional description text for the field
6
+ */
7
+ description?: ReactNode;
8
+ /**
9
+ * Error message to display when the field is invalid
10
+ */
11
+ errorMessage?: string;
12
+ /**
13
+ * Indicates if the field is required
14
+ */
15
+ isRequired?: boolean;
16
+ /**
17
+ * Label text for the field
18
+ */
19
+ label: ReactNode;
20
+ /**
21
+ * Hides the label visually while keeping it accessible to screen readers
22
+ */
23
+ shouldVisuallyHideLabel?: boolean;
24
+ }
25
+ export interface InternalFieldLayoutProps {
26
+ /**
27
+ * Content to be rendered inside the field layout
28
+ */
29
+ children: React.ReactNode;
30
+ /**
31
+ * ID of the form control that this label is associated with
32
+ */
33
+ htmlFor: string;
34
+ /**
35
+ * ID of the error message element
36
+ */
37
+ errorMessageId: string;
38
+ /**
39
+ * ID of the description element
40
+ */
41
+ descriptionId: string;
42
+ /**
43
+ * Additional CSS class name
44
+ */
45
+ className?: string;
46
+ /**
47
+ * Whether to show the error icon
48
+ */
49
+ withErrorIcon?: boolean;
50
+ }
51
+ export interface FieldLayoutProps extends SharedFieldLayoutProps, InternalFieldLayoutProps {
52
+ }
@@ -2,7 +2,7 @@ import { jsxs as a, jsx as r } from "react/jsx-runtime";
2
2
  import { useId as f } from "react";
3
3
  import l from "classnames";
4
4
  import e from "./Fieldset.module.scss.js";
5
- import { getDataProps as g } from "../../../../helpers/getDataProps.js";
5
+ import { getDataProps as g } from "../../../helpers/getDataProps.js";
6
6
  import { FieldCaption as h } from "../FieldCaption/FieldCaption.js";
7
7
  import { FieldDescription as D } from "../FieldDescription/FieldDescription.js";
8
8
  import { FieldErrorMessage as F } from "../FieldErrorMessage/FieldErrorMessage.js";
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Fieldset.js","sources":["../../../../src/components/Common/Fieldset/Fieldset.tsx"],"sourcesContent":["import { useId } from 'react'\nimport classNames from 'classnames'\nimport { FieldDescription } from '../FieldDescription'\nimport { FieldErrorMessage } from '../FieldErrorMessage'\nimport { FieldCaption } from '../FieldCaption'\nimport type { SharedFieldLayoutProps } from '../FieldLayout/FieldLayoutTypes'\nimport styles from './Fieldset.module.scss'\nimport { getDataProps } from '@/helpers/getDataProps'\n\nexport interface FieldsetProps\n extends Omit<SharedFieldLayoutProps, 'label' | 'shouldVisuallyHideLabel'> {\n children: React.ReactNode\n description?: React.ReactNode\n errorMessage?: string\n isRequired?: boolean\n legend: React.ReactNode\n shouldVisuallyHideLegend?: boolean\n className?: string\n}\n\nexport const Fieldset: React.FC<FieldsetProps> = ({\n children,\n description,\n errorMessage,\n isRequired = false,\n legend,\n shouldVisuallyHideLegend = false,\n className,\n ...props\n}: FieldsetProps) => {\n const generatedErrorMessageId = useId()\n const errorMessageId = `error-message-${generatedErrorMessageId}`\n\n return (\n <fieldset\n className={classNames(styles.root, className)}\n aria-describedby={errorMessage ? errorMessageId : undefined}\n {...getDataProps(props)}\n >\n <div\n className={classNames(styles.legendAndDescription, {\n [styles.withVisibleLegend as string]: !shouldVisuallyHideLegend,\n [styles.withDescription as string]: Boolean(description),\n })}\n >\n <FieldCaption\n as=\"legend\"\n isRequired={isRequired}\n isVisuallyHidden={shouldVisuallyHideLegend}\n >\n {legend}\n </FieldCaption>\n <FieldDescription>{description}</FieldDescription>\n </div>\n {children}\n <FieldErrorMessage\n id={errorMessageId}\n className={styles.errorMessage}\n aria-live=\"polite\"\n role=\"alert\"\n >\n {errorMessage}\n </FieldErrorMessage>\n </fieldset>\n )\n}\n"],"names":["Fieldset","children","description","errorMessage","isRequired","legend","shouldVisuallyHideLegend","className","props","errorMessageId","useId","jsxs","classNames","styles","getDataProps","jsx","FieldCaption","FieldDescription","FieldErrorMessage"],"mappings":";;;;;;;;AAoBO,MAAMA,IAAoC,CAAC;AAAA,EAChD,UAAAC;AAAA,EACA,aAAAC;AAAA,EACA,cAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,QAAAC;AAAA,EACA,0BAAAC,IAA2B;AAAA,EAC3B,WAAAC;AAAA,EACA,GAAGC;AACL,MAAqB;AAEb,QAAAC,IAAiB,iBADSC,EAAM,CACyB;AAG7D,SAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC,EAAWC,EAAO,MAAMN,CAAS;AAAA,MAC5C,oBAAkBJ,IAAeM,IAAiB;AAAA,MACjD,GAAGK,EAAaN,CAAK;AAAA,MAEtB,UAAA;AAAA,QAAA,gBAAAG;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAWC,EAAWC,EAAO,sBAAsB;AAAA,cACjD,CAACA,EAAO,iBAA2B,GAAG,CAACP;AAAA,cACvC,CAACO,EAAO,eAAyB,GAAG,EAAQX;AAAA,YAAW,CACxD;AAAA,YAED,UAAA;AAAA,cAAA,gBAAAa;AAAA,gBAACC;AAAA,gBAAA;AAAA,kBACC,IAAG;AAAA,kBACH,YAAAZ;AAAA,kBACA,kBAAkBE;AAAA,kBAEjB,UAAAD;AAAA,gBAAA;AAAA,cACH;AAAA,cACA,gBAAAU,EAACE,KAAkB,UAAYf,EAAA,CAAA;AAAA,YAAA;AAAA,UAAA;AAAA,QACjC;AAAA,QACCD;AAAA,QACD,gBAAAc;AAAA,UAACG;AAAA,UAAA;AAAA,YACC,IAAIT;AAAA,YACJ,WAAWI,EAAO;AAAA,YAClB,aAAU;AAAA,YACV,MAAK;AAAA,YAEJ,UAAAV;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EACF;AAEJ;"}
@@ -1,8 +1,8 @@
1
1
  import { jsxs as f, jsx as e } from "react/jsx-runtime";
2
2
  import N from "classnames";
3
3
  import r from "./HorizontalFieldLayout.module.scss.js";
4
- import { getDataProps as b } from "../../../../helpers/getDataProps.js";
5
- import { VisuallyHidden as g } from "../../VisuallyHidden/VisuallyHidden.js";
4
+ import { getDataProps as b } from "../../../helpers/getDataProps.js";
5
+ import { VisuallyHidden as g } from "../VisuallyHidden/VisuallyHidden.js";
6
6
  import { FieldDescription as w } from "../FieldDescription/FieldDescription.js";
7
7
  import { FieldErrorMessage as x } from "../FieldErrorMessage/FieldErrorMessage.js";
8
8
  const M = ({
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HorizontalFieldLayout.js","sources":["../../../../src/components/Common/HorizontalFieldLayout/HorizontalFieldLayout.tsx"],"sourcesContent":["import classNames from 'classnames'\nimport { VisuallyHidden } from '../VisuallyHidden'\nimport { FieldErrorMessage } from '../FieldErrorMessage'\nimport { FieldDescription } from '../FieldDescription'\nimport styles from './HorizontalFieldLayout.module.scss'\nimport type { HorizontalFieldLayoutProps } from './HorizontalFieldLayoutTypes'\nimport { getDataProps } from '@/helpers/getDataProps'\n\nexport const HorizontalFieldLayout: React.FC<HorizontalFieldLayoutProps> = ({\n label,\n description,\n descriptionId,\n errorMessage,\n errorMessageId,\n children,\n htmlFor,\n className,\n shouldVisuallyHideLabel,\n ...props\n}: HorizontalFieldLayoutProps) => {\n const labelContent = (\n <label className={styles.label} htmlFor={htmlFor}>\n {label}\n </label>\n )\n\n const withDescriptionOrErrorMessage = description || errorMessage\n\n return (\n <div\n className={classNames(\n styles.root,\n {\n [styles.withoutVisibleLabel as string]:\n shouldVisuallyHideLabel && withDescriptionOrErrorMessage,\n [styles.withOnlyChildren as string]:\n shouldVisuallyHideLabel && !withDescriptionOrErrorMessage,\n },\n className,\n )}\n {...getDataProps(props)}\n >\n <div className={styles.children}>{children}</div>\n {shouldVisuallyHideLabel ? <VisuallyHidden>{labelContent}</VisuallyHidden> : labelContent}\n <FieldDescription id={descriptionId} className={styles.description}>\n {description}\n </FieldDescription>\n <FieldErrorMessage id={errorMessageId} className={styles.errorMessage}>\n {errorMessage}\n </FieldErrorMessage>\n </div>\n )\n}\n"],"names":["HorizontalFieldLayout","label","description","descriptionId","errorMessage","errorMessageId","children","htmlFor","className","shouldVisuallyHideLabel","props","labelContent","jsx","styles","withDescriptionOrErrorMessage","jsxs","classNames","getDataProps","VisuallyHidden","FieldDescription","FieldErrorMessage"],"mappings":";;;;;;;AAQO,MAAMA,IAA8D,CAAC;AAAA,EAC1E,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,eAAAC;AAAA,EACA,cAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,yBAAAC;AAAA,EACA,GAAGC;AACL,MAAkC;AAChC,QAAMC,IACH,gBAAAC,EAAA,SAAA,EAAM,WAAWC,EAAO,OAAO,SAAAN,GAC7B,UACHN,GAAA,GAGIa,IAAgCZ,KAAeE;AAGnD,SAAA,gBAAAW;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWC;AAAA,QACTH,EAAO;AAAA,QACP;AAAA,UACE,CAACA,EAAO,mBAA6B,GACnCJ,KAA2BK;AAAA,UAC7B,CAACD,EAAO,gBAA0B,GAChCJ,KAA2B,CAACK;AAAA,QAChC;AAAA,QACAN;AAAA,MACF;AAAA,MACC,GAAGS,EAAaP,CAAK;AAAA,MAEtB,UAAA;AAAA,QAAA,gBAAAE,EAAC,OAAI,EAAA,WAAWC,EAAO,UAAW,UAAAP,GAAS;AAAA,QAC1CG,IAA0B,gBAAAG,EAACM,GAAgB,EAAA,UAAAP,EAAa,CAAA,IAAoBA;AAAA,0BAC5EQ,GAAiB,EAAA,IAAIhB,GAAe,WAAWU,EAAO,aACpD,UACHX,GAAA;AAAA,0BACCkB,GAAkB,EAAA,IAAIf,GAAgB,WAAWQ,EAAO,cACtD,UACHT,EAAA,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EACF;AAEJ;"}
@@ -1,10 +1,16 @@
1
+ import { z } from 'zod';
1
2
  import { UseFormProps } from 'react-hook-form';
2
- import * as v from 'valibot';
3
- export declare const SignatureFormSchema: v.ObjectSchema<{
4
- readonly signature: v.SchemaWithPipe<[v.StringSchema<undefined>, v.NonEmptyAction<string, undefined>]>;
5
- readonly confirmSignature: v.LiteralSchema<true, undefined>;
6
- }, undefined>;
7
- export type SignatureFormInputs = v.InferInput<typeof SignatureFormSchema>;
3
+ export declare const SignatureFormSchema: z.ZodObject<{
4
+ signature: z.ZodString;
5
+ confirmSignature: z.ZodLiteral<true>;
6
+ }, "strip", z.ZodTypeAny, {
7
+ signature: string;
8
+ confirmSignature: true;
9
+ }, {
10
+ signature: string;
11
+ confirmSignature: true;
12
+ }>;
13
+ export type SignatureFormInputs = z.infer<typeof SignatureFormSchema>;
8
14
  interface SignatureFormProps {
9
15
  onSubmit: (data: SignatureFormInputs) => void | Promise<void>;
10
16
  children?: React.ReactNode;
@@ -1,23 +1,23 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import * as r from "valibot";
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import { z as o } from "zod";
3
3
  import { useForm as s, FormProvider as a } from "react-hook-form";
4
- import { valibotResolver as l } from "@hookform/resolvers/valibot";
4
+ import { zodResolver as l } from "@hookform/resolvers/zod";
5
5
  import t from "./SignatureForm.module.scss.js";
6
6
  import { Form as u } from "../Form/Form.js";
7
7
  import { Flex as c } from "../Flex/Flex.js";
8
- const f = r.object({
9
- signature: r.pipe(r.string(), r.nonEmpty()),
10
- confirmSignature: r.literal(!0)
11
- }), p = {
8
+ const f = o.object({
9
+ signature: o.string().min(1),
10
+ confirmSignature: o.literal(!0)
11
+ }), d = {
12
12
  signature: ""
13
13
  };
14
- function b({ onSubmit: i, children: m, formProps: n }) {
14
+ function b({ onSubmit: m, children: i, formProps: n }) {
15
15
  const e = s({
16
16
  resolver: l(f),
17
- defaultValues: p,
17
+ defaultValues: d,
18
18
  ...n
19
19
  });
20
- return /* @__PURE__ */ o(a, { ...e, children: /* @__PURE__ */ o(u, { onSubmit: e.handleSubmit(i), className: t.container, children: /* @__PURE__ */ o("div", { className: t.formFields, children: /* @__PURE__ */ o(c, { flexDirection: "column", gap: 20, children: m }) }) }) });
20
+ return /* @__PURE__ */ r(a, { ...e, children: /* @__PURE__ */ r(u, { onSubmit: e.handleSubmit(m), className: t.container, children: /* @__PURE__ */ r("div", { className: t.formFields, children: /* @__PURE__ */ r(c, { flexDirection: "column", gap: 20, children: i }) }) }) });
21
21
  }
22
22
  export {
23
23
  b as SignatureForm,
@@ -1 +1 @@
1
- {"version":3,"file":"SignatureForm.js","sources":["../../../../src/components/Common/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import * as v from 'valibot'\nimport { FormProvider, useForm, type UseFormProps } from 'react-hook-form'\nimport { valibotResolver } from '@hookform/resolvers/valibot'\nimport styles from './SignatureForm.module.scss'\nimport { Form } from '@/components/Common/Form'\nimport { Flex } from '@/components/Common'\n\nexport const SignatureFormSchema = v.object({\n signature: v.pipe(v.string(), v.nonEmpty()),\n confirmSignature: v.literal(true),\n})\n\nconst signatureFormDefaultValues = {\n signature: '',\n}\n\nexport type SignatureFormInputs = v.InferInput<typeof SignatureFormSchema>\n\ninterface SignatureFormProps {\n onSubmit: (data: SignatureFormInputs) => void | Promise<void>\n children?: React.ReactNode\n formProps?: Partial<UseFormProps<SignatureFormInputs>>\n}\n\nexport function SignatureForm({ onSubmit, children, formProps }: SignatureFormProps) {\n const methods = useForm<SignatureFormInputs>({\n resolver: valibotResolver(SignatureFormSchema),\n defaultValues: signatureFormDefaultValues,\n ...formProps,\n })\n\n return (\n <FormProvider {...methods}>\n <Form onSubmit={methods.handleSubmit(onSubmit)} className={styles.container}>\n <div className={styles.formFields}>\n <Flex flexDirection=\"column\" gap={20}>\n {children}\n </Flex>\n </div>\n </Form>\n </FormProvider>\n )\n}\n"],"names":["SignatureFormSchema","v","signatureFormDefaultValues","SignatureForm","onSubmit","children","formProps","methods","useForm","valibotResolver","jsx","FormProvider","Form","styles","Flex"],"mappings":";;;;;;;AAOa,MAAAA,IAAsBC,EAAE,OAAO;AAAA,EAC1C,WAAWA,EAAE,KAAKA,EAAE,UAAUA,EAAE,UAAU;AAAA,EAC1C,kBAAkBA,EAAE,QAAQ,EAAI;AAClC,CAAC,GAEKC,IAA6B;AAAA,EACjC,WAAW;AACb;AAUO,SAASC,EAAc,EAAE,UAAAC,GAAU,UAAAC,GAAU,WAAAC,KAAiC;AACnF,QAAMC,IAAUC,EAA6B;AAAA,IAC3C,UAAUC,EAAgBT,CAAmB;AAAA,IAC7C,eAAeE;AAAA,IACf,GAAGI;AAAA,EAAA,CACJ;AAED,SACG,gBAAAI,EAAAC,GAAA,EAAc,GAAGJ,GAChB,UAAC,gBAAAG,EAAAE,GAAA,EAAK,UAAUL,EAAQ,aAAaH,CAAQ,GAAG,WAAWS,EAAO,WAChE,UAAC,gBAAAH,EAAA,OAAA,EAAI,WAAWG,EAAO,YACrB,UAAA,gBAAAH,EAACI,GAAK,EAAA,eAAc,UAAS,KAAK,IAC/B,UAAAT,EACH,CAAA,EACF,CAAA,EACF,CAAA,GACF;AAEJ;"}
1
+ {"version":3,"file":"SignatureForm.js","sources":["../../../../src/components/Common/SignatureForm/SignatureForm.tsx"],"sourcesContent":["import { z } from 'zod'\nimport { FormProvider, useForm, type UseFormProps } from 'react-hook-form'\nimport { zodResolver } from '@hookform/resolvers/zod'\nimport styles from './SignatureForm.module.scss'\nimport { Form } from '@/components/Common/Form'\nimport { Flex } from '@/components/Common'\n\nexport const SignatureFormSchema = z.object({\n signature: z.string().min(1),\n confirmSignature: z.literal(true),\n})\n\nconst signatureFormDefaultValues = {\n signature: '',\n}\n\nexport type SignatureFormInputs = z.infer<typeof SignatureFormSchema>\n\ninterface SignatureFormProps {\n onSubmit: (data: SignatureFormInputs) => void | Promise<void>\n children?: React.ReactNode\n formProps?: Partial<UseFormProps<SignatureFormInputs>>\n}\n\nexport function SignatureForm({ onSubmit, children, formProps }: SignatureFormProps) {\n const methods = useForm<SignatureFormInputs>({\n resolver: zodResolver(SignatureFormSchema),\n defaultValues: signatureFormDefaultValues,\n ...formProps,\n })\n\n return (\n <FormProvider {...methods}>\n <Form onSubmit={methods.handleSubmit(onSubmit)} className={styles.container}>\n <div className={styles.formFields}>\n <Flex flexDirection=\"column\" gap={20}>\n {children}\n </Flex>\n </div>\n </Form>\n </FormProvider>\n )\n}\n"],"names":["SignatureFormSchema","z","signatureFormDefaultValues","SignatureForm","onSubmit","children","formProps","methods","useForm","zodResolver","jsx","FormProvider","Form","styles","Flex"],"mappings":";;;;;;;AAOa,MAAAA,IAAsBC,EAAE,OAAO;AAAA,EAC1C,WAAWA,EAAE,SAAS,IAAI,CAAC;AAAA,EAC3B,kBAAkBA,EAAE,QAAQ,EAAI;AAClC,CAAC,GAEKC,IAA6B;AAAA,EACjC,WAAW;AACb;AAUO,SAASC,EAAc,EAAE,UAAAC,GAAU,UAAAC,GAAU,WAAAC,KAAiC;AACnF,QAAMC,IAAUC,EAA6B;AAAA,IAC3C,UAAUC,EAAYT,CAAmB;AAAA,IACzC,eAAeE;AAAA,IACf,GAAGI;AAAA,EAAA,CACJ;AAED,SACG,gBAAAI,EAAAC,GAAA,EAAc,GAAGJ,GAChB,UAAC,gBAAAG,EAAAE,GAAA,EAAK,UAAUL,EAAQ,aAAaH,CAAQ,GAAG,WAAWS,EAAO,WAChE,UAAC,gBAAAH,EAAA,OAAA,EAAI,WAAWG,EAAO,YACrB,UAAA,gBAAAH,EAACI,GAAK,EAAA,eAAc,UAAS,KAAK,IAC/B,UAAAT,EACH,CAAA,EACF,CAAA,EACF,CAAA,GACF;AAEJ;"}
@@ -1,2 +1,2 @@
1
1
  import { AlertProps } from './AlertTypes';
2
- export declare function Alert({ label, children, status, icon }: AlertProps): import("react/jsx-runtime").JSX.Element;
2
+ export declare function Alert({ label, children, status, icon, className }: AlertProps): import("react/jsx-runtime").JSX.Element;
@@ -1,15 +1,16 @@
1
- import { jsx as r, jsxs as d } from "react/jsx-runtime";
2
- import { useId as s, useRef as m, useEffect as f } from "react";
1
+ import { jsx as r, jsxs as m } from "react/jsx-runtime";
2
+ import { useId as d, useRef as f, useEffect as h } from "react";
3
+ import u from "classnames";
3
4
  import i from "./Alert.module.scss.js";
4
- import h from "../../../../assets/icons/info.svg.js";
5
- import u from "../../../../assets/icons/success_check.svg.js";
6
- import v from "../../../../assets/icons/warning.svg.js";
7
- import p from "../../../../assets/icons/error.svg.js";
8
- function w({ label: a, children: t, status: e = "info", icon: c }) {
9
- const n = s(), o = m(null), l = e === "info" ? /* @__PURE__ */ r(h, { "aria-hidden": !0 }) : e === "success" ? /* @__PURE__ */ r(u, { "aria-hidden": !0 }) : e === "warning" ? /* @__PURE__ */ r(v, { "aria-hidden": !0 }) : /* @__PURE__ */ r(p, { "aria-hidden": !0 });
10
- return f(() => {
5
+ import v from "../../../../assets/icons/info.svg.js";
6
+ import p from "../../../../assets/icons/success_check.svg.js";
7
+ import g from "../../../../assets/icons/warning.svg.js";
8
+ import N from "../../../../assets/icons/error.svg.js";
9
+ function R({ label: a, children: t, status: e = "info", icon: c, className: l }) {
10
+ const n = d(), o = f(null), s = e === "info" ? /* @__PURE__ */ r(v, { "aria-hidden": !0 }) : e === "success" ? /* @__PURE__ */ r(p, { "aria-hidden": !0 }) : e === "warning" ? /* @__PURE__ */ r(g, { "aria-hidden": !0 }) : /* @__PURE__ */ r(N, { "aria-hidden": !0 });
11
+ return h(() => {
11
12
  o.current && o.current.scrollIntoView({ behavior: "smooth" });
12
- }, []), /* @__PURE__ */ r("div", { className: i.root, children: /* @__PURE__ */ d(
13
+ }, []), /* @__PURE__ */ r("div", { className: u(i.root, l), children: /* @__PURE__ */ m(
13
14
  "div",
14
15
  {
15
16
  className: i.alert,
@@ -18,7 +19,7 @@ function w({ label: a, children: t, status: e = "info", icon: c }) {
18
19
  "data-variant": e,
19
20
  ref: o,
20
21
  children: [
21
- /* @__PURE__ */ r("div", { className: i.icon, children: c || l }),
22
+ /* @__PURE__ */ r("div", { className: i.icon, children: c || s }),
22
23
  /* @__PURE__ */ r("h6", { id: n, children: a }),
23
24
  /* @__PURE__ */ r("div", { className: i.content, children: t })
24
25
  ]
@@ -26,6 +27,6 @@ function w({ label: a, children: t, status: e = "info", icon: c }) {
26
27
  ) });
27
28
  }
28
29
  export {
29
- w as Alert
30
+ R as Alert
30
31
  };
31
32
  //# sourceMappingURL=Alert.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Alert.js","sources":["../../../../../src/components/Common/UI/Alert/Alert.tsx"],"sourcesContent":["import { useEffect, useId, useRef } from 'react'\nimport { type AlertProps } from './AlertTypes'\nimport styles from './Alert.module.scss'\nimport InfoIcon from '@/assets/icons/info.svg?react'\nimport SuccessIcon from '@/assets/icons/success_check.svg?react'\nimport WarningIcon from '@/assets/icons/warning.svg?react'\nimport ErrorIcon from '@/assets/icons/error.svg?react'\n\nexport function Alert({ label, children, status = 'info', icon }: AlertProps) {\n const id = useId()\n const alertRef = useRef<HTMLDivElement>(null)\n const defaultIcon =\n status === 'info' ? (\n <InfoIcon aria-hidden />\n ) : status === 'success' ? (\n <SuccessIcon aria-hidden />\n ) : status === 'warning' ? (\n <WarningIcon aria-hidden />\n ) : (\n <ErrorIcon aria-hidden />\n )\n\n useEffect(() => {\n if (alertRef.current) alertRef.current.scrollIntoView({ behavior: 'smooth' })\n }, [])\n\n return (\n <div className={styles.root}>\n <div\n className={styles.alert}\n role=\"alert\"\n aria-labelledby={id}\n data-variant={status}\n ref={alertRef}\n >\n <div className={styles.icon}>{icon || defaultIcon}</div>\n <h6 id={id}>{label}</h6>\n <div className={styles.content}>{children}</div>\n </div>\n </div>\n )\n}\n"],"names":["Alert","label","children","status","icon","id","useId","alertRef","useRef","defaultIcon","jsx","InfoIcon","SuccessIcon","WarningIcon","ErrorIcon","useEffect","styles","jsxs"],"mappings":";;;;;;;AAQO,SAASA,EAAM,EAAE,OAAAC,GAAO,UAAAC,GAAU,QAAAC,IAAS,QAAQ,MAAAC,KAAoB;AAC5E,QAAMC,IAAKC,EAAM,GACXC,IAAWC,EAAuB,IAAI,GACtCC,IACJN,MAAW,SACR,gBAAAO,EAAAC,GAAA,EAAS,eAAW,GAAC,CAAA,IACpBR,MAAW,YACZ,gBAAAO,EAAAE,GAAA,EAAY,eAAW,GAAC,CAAA,IACvBT,MAAW,YACZ,gBAAAO,EAAAG,GAAA,EAAY,eAAW,GAAC,CAAA,IAEzB,gBAAAH,EAACI,GAAU,EAAA,eAAW,GAAC,CAAA;AAG3B,SAAAC,EAAU,MAAM;AACV,IAAAR,EAAS,WAAkBA,EAAA,QAAQ,eAAe,EAAE,UAAU,UAAU;AAAA,EAC9E,GAAG,EAAE,GAGF,gBAAAG,EAAA,OAAA,EAAI,WAAWM,EAAO,MACrB,UAAA,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWD,EAAO;AAAA,MAClB,MAAK;AAAA,MACL,mBAAiBX;AAAA,MACjB,gBAAcF;AAAA,MACd,KAAKI;AAAA,MAEL,UAAA;AAAA,QAAA,gBAAAG,EAAC,OAAI,EAAA,WAAWM,EAAO,MAAO,eAAQP,GAAY;AAAA,QAClD,gBAAAC,EAAC,MAAG,EAAA,IAAAL,GAAS,UAAMJ,EAAA,CAAA;AAAA,QAClB,gBAAAS,EAAA,OAAA,EAAI,WAAWM,EAAO,SAAU,UAAAd,EAAS,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAE9C;AAEJ;"}
1
+ {"version":3,"file":"Alert.js","sources":["../../../../../src/components/Common/UI/Alert/Alert.tsx"],"sourcesContent":["import { useEffect, useId, useRef } from 'react'\nimport classNames from 'classnames'\nimport { type AlertProps } from './AlertTypes'\nimport styles from './Alert.module.scss'\nimport InfoIcon from '@/assets/icons/info.svg?react'\nimport SuccessIcon from '@/assets/icons/success_check.svg?react'\nimport WarningIcon from '@/assets/icons/warning.svg?react'\nimport ErrorIcon from '@/assets/icons/error.svg?react'\n\nexport function Alert({ label, children, status = 'info', icon, className }: AlertProps) {\n const id = useId()\n const alertRef = useRef<HTMLDivElement>(null)\n const defaultIcon =\n status === 'info' ? (\n <InfoIcon aria-hidden />\n ) : status === 'success' ? (\n <SuccessIcon aria-hidden />\n ) : status === 'warning' ? (\n <WarningIcon aria-hidden />\n ) : (\n <ErrorIcon aria-hidden />\n )\n\n useEffect(() => {\n if (alertRef.current) alertRef.current.scrollIntoView({ behavior: 'smooth' })\n }, [])\n\n return (\n <div className={classNames(styles.root, className)}>\n <div\n className={styles.alert}\n role=\"alert\"\n aria-labelledby={id}\n data-variant={status}\n ref={alertRef}\n >\n <div className={styles.icon}>{icon || defaultIcon}</div>\n <h6 id={id}>{label}</h6>\n <div className={styles.content}>{children}</div>\n </div>\n </div>\n )\n}\n"],"names":["Alert","label","children","status","icon","className","id","useId","alertRef","useRef","defaultIcon","jsx","InfoIcon","SuccessIcon","WarningIcon","ErrorIcon","useEffect","classNames","styles","jsxs"],"mappings":";;;;;;;;AASgB,SAAAA,EAAM,EAAE,OAAAC,GAAO,UAAAC,GAAU,QAAAC,IAAS,QAAQ,MAAAC,GAAM,WAAAC,KAAyB;AACvF,QAAMC,IAAKC,EAAM,GACXC,IAAWC,EAAuB,IAAI,GACtCC,IACJP,MAAW,SACR,gBAAAQ,EAAAC,GAAA,EAAS,eAAW,GAAC,CAAA,IACpBT,MAAW,YACZ,gBAAAQ,EAAAE,GAAA,EAAY,eAAW,GAAC,CAAA,IACvBV,MAAW,YACZ,gBAAAQ,EAAAG,GAAA,EAAY,eAAW,GAAC,CAAA,IAEzB,gBAAAH,EAACI,GAAU,EAAA,eAAW,GAAC,CAAA;AAG3B,SAAAC,EAAU,MAAM;AACV,IAAAR,EAAS,WAAkBA,EAAA,QAAQ,eAAe,EAAE,UAAU,UAAU;AAAA,EAC9E,GAAG,EAAE,qBAGF,OAAI,EAAA,WAAWS,EAAWC,EAAO,MAAMb,CAAS,GAC/C,UAAA,gBAAAc;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWD,EAAO;AAAA,MAClB,MAAK;AAAA,MACL,mBAAiBZ;AAAA,MACjB,gBAAcH;AAAA,MACd,KAAKK;AAAA,MAEL,UAAA;AAAA,QAAA,gBAAAG,EAAC,OAAI,EAAA,WAAWO,EAAO,MAAO,eAAQR,GAAY;AAAA,QAClD,gBAAAC,EAAC,MAAG,EAAA,IAAAL,GAAS,UAAML,EAAA,CAAA;AAAA,QAClB,gBAAAU,EAAA,OAAA,EAAI,WAAWO,EAAO,SAAU,UAAAhB,EAAS,CAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA,GAE9C;AAEJ;"}
@@ -1,11 +1,23 @@
1
1
  import { ReactNode } from 'react';
2
2
  export interface AlertProps {
3
- /** The variant of the alert */
3
+ /**
4
+ * The visual status that the alert should convey
5
+ */
4
6
  status?: 'info' | 'success' | 'warning' | 'error';
5
- /** The label text for the alert */
7
+ /**
8
+ * The label text for the alert
9
+ */
6
10
  label: string;
7
- /** Optional children to be rendered inside the alert */
11
+ /**
12
+ * Optional children to be rendered inside the alert
13
+ */
8
14
  children?: ReactNode;
9
- /** Optional custom icon component to override the default icon */
15
+ /**
16
+ * Optional custom icon component to override the default icon
17
+ */
10
18
  icon?: ReactNode;
19
+ /**
20
+ * CSS className to be applied
21
+ */
22
+ className?: string;
11
23
  }
@@ -1,5 +1,11 @@
1
1
  import { HTMLAttributes, ReactNode } from 'react';
2
2
  export interface BadgeProps extends Pick<HTMLAttributes<HTMLSpanElement>, 'className' | 'id' | 'aria-label'> {
3
+ /**
4
+ * Content to be displayed inside the badge
5
+ */
3
6
  children: ReactNode;
7
+ /**
8
+ * Visual style variant of the badge
9
+ */
4
10
  status?: 'success' | 'warning' | 'error' | 'info';
5
11
  }
@@ -1,39 +1,40 @@
1
- import { jsx as t } from "react/jsx-runtime";
2
- import { Button as p } from "react-aria-components";
3
- import u from "./Button.module.scss.js";
4
- function x({
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import { Button as u } from "react-aria-components";
3
+ import v from "classnames";
4
+ import c from "./Button.module.scss.js";
5
+ function N({
5
6
  isError: o = !1,
6
- isLoading: a = !1,
7
+ isLoading: r = !1,
7
8
  isDisabled: s = !1,
8
- variant: e = "primary",
9
- ref: n,
10
- className: c,
9
+ variant: t = "primary",
10
+ ref: e,
11
+ className: m,
11
12
  children: i,
12
- onBlur: d,
13
- onFocus: l,
14
- onClick: r,
15
- ...m
13
+ onBlur: n,
14
+ onFocus: d,
15
+ onClick: a,
16
+ ...l
16
17
  }) {
17
- const f = r ? () => {
18
- r({});
19
- } : void 0;
20
- return /* @__PURE__ */ t("span", { className: u.root, children: /* @__PURE__ */ t(
21
- p,
18
+ return /* @__PURE__ */ p(
19
+ u,
22
20
  {
23
- ...m,
24
- ref: n,
25
- onBlur: d,
26
- onFocus: l,
27
- isDisabled: s || a,
28
- "data-variant": e,
29
- "data-loading": a || void 0,
21
+ ...l,
22
+ className: ({ defaultClassName: f }) => v(c.root, f, m),
23
+ ref: e,
24
+ onBlur: n,
25
+ onFocus: d,
26
+ isDisabled: s || r,
27
+ "data-variant": t,
28
+ "data-loading": r || void 0,
30
29
  "data-error": o || void 0,
31
- onPress: f,
30
+ onPress: a ? () => {
31
+ a({});
32
+ } : void 0,
32
33
  children: i
33
34
  }
34
- ) });
35
+ );
35
36
  }
36
37
  export {
37
- x as Button
38
+ N as Button
38
39
  };
39
40
  //# sourceMappingURL=Button.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../../../../../src/components/Common/UI/Button/Button.tsx"],"sourcesContent":["import { Button as AriaButton } from 'react-aria-components'\nimport { type ButtonProps } from './ButtonTypes'\nimport styles from './Button.module.scss'\n\nexport function Button({\n isError = false,\n isLoading = false,\n isDisabled = false,\n variant = 'primary',\n ref,\n className,\n children,\n onBlur,\n onFocus,\n onClick,\n ...props\n}: ButtonProps) {\n const handlePress = onClick\n ? () => {\n onClick({} as React.MouseEvent<HTMLButtonElement>)\n }\n : undefined\n\n return (\n <span className={styles.root}>\n <AriaButton\n {...props}\n ref={ref}\n onBlur={onBlur}\n onFocus={onFocus}\n isDisabled={isDisabled || isLoading}\n data-variant={variant}\n data-loading={isLoading || undefined}\n data-error={isError || undefined}\n onPress={handlePress}\n >\n {children}\n </AriaButton>\n </span>\n )\n}\n"],"names":["Button","isError","isLoading","isDisabled","variant","ref","className","children","onBlur","onFocus","onClick","props","handlePress","jsx","styles","AriaButton"],"mappings":";;;AAIO,SAASA,EAAO;AAAA,EACrB,SAAAC,IAAU;AAAA,EACV,WAAAC,IAAY;AAAA,EACZ,YAAAC,IAAa;AAAA,EACb,SAAAC,IAAU;AAAA,EACV,KAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGC;AACL,GAAgB;AACR,QAAAC,IAAcF,IAChB,MAAM;AACJ,IAAAA,EAAQ,CAAA,CAAyC;AAAA,EAAA,IAEnD;AAEJ,SACG,gBAAAG,EAAA,QAAA,EAAK,WAAWC,EAAO,MACtB,UAAA,gBAAAD;AAAA,IAACE;AAAAA,IAAA;AAAA,MACE,GAAGJ;AAAA,MACJ,KAAAN;AAAA,MACA,QAAAG;AAAA,MACA,SAAAC;AAAA,MACA,YAAYN,KAAcD;AAAA,MAC1B,gBAAcE;AAAA,MACd,gBAAcF,KAAa;AAAA,MAC3B,cAAYD,KAAW;AAAA,MACvB,SAASW;AAAA,MAER,UAAAL;AAAA,IAAA;AAAA,EAAA,GAEL;AAEJ;"}
1
+ {"version":3,"file":"Button.js","sources":["../../../../../src/components/Common/UI/Button/Button.tsx"],"sourcesContent":["import { Button as AriaButton } from 'react-aria-components'\nimport classNames from 'classnames'\nimport { type ButtonProps } from './ButtonTypes'\nimport styles from './Button.module.scss'\n\nexport function Button({\n isError = false,\n isLoading = false,\n isDisabled = false,\n variant = 'primary',\n ref,\n className,\n children,\n onBlur,\n onFocus,\n onClick,\n ...props\n}: ButtonProps) {\n const handlePress = onClick\n ? () => {\n onClick({} as React.MouseEvent<HTMLButtonElement>)\n }\n : undefined\n\n return (\n <AriaButton\n {...props}\n className={({ defaultClassName }) => classNames(styles.root, defaultClassName, className)}\n ref={ref}\n onBlur={onBlur}\n onFocus={onFocus}\n isDisabled={isDisabled || isLoading}\n data-variant={variant}\n data-loading={isLoading || undefined}\n data-error={isError || undefined}\n onPress={handlePress}\n >\n {children}\n </AriaButton>\n )\n}\n"],"names":["Button","isError","isLoading","isDisabled","variant","ref","className","children","onBlur","onFocus","onClick","props","jsx","AriaButton","defaultClassName","classNames","styles"],"mappings":";;;;AAKO,SAASA,EAAO;AAAA,EACrB,SAAAC,IAAU;AAAA,EACV,WAAAC,IAAY;AAAA,EACZ,YAAAC,IAAa;AAAA,EACb,SAAAC,IAAU;AAAA,EACV,KAAAC;AAAA,EACA,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,GAAGC;AACL,GAAgB;AAQZ,SAAA,gBAAAC;AAAA,IAACC;AAAAA,IAAA;AAAA,MACE,GAAGF;AAAA,MACJ,WAAW,CAAC,EAAE,kBAAAG,QAAuBC,EAAWC,EAAO,MAAMF,GAAkBR,CAAS;AAAA,MACxF,KAAAD;AAAA,MACA,QAAAG;AAAA,MACA,SAAAC;AAAA,MACA,YAAYN,KAAcD;AAAA,MAC1B,gBAAcE;AAAA,MACd,gBAAcF,KAAa;AAAA,MAC3B,cAAYD,KAAW;AAAA,MACvB,SAjBgBS,IAChB,MAAM;AACJ,QAAAA,EAAQ,CAAA,CAAyC;AAAA,MAAA,IAEnD;AAAA,MAeC,UAAAH;AAAA,IAAA;AAAA,EACH;AAEJ;"}
@@ -1,4 +1,4 @@
1
- const o = "_root_1co44_1", t = {
1
+ const o = "_root_1p4kg_1", t = {
2
2
  root: o
3
3
  };
4
4
  export {
@@ -1,16 +1,41 @@
1
1
  import { Ref, ButtonHTMLAttributes, ReactNode, FocusEvent } from 'react';
2
- type ButtonFocusHandler = (e: FocusEvent) => void;
3
2
  export interface ButtonProps extends Pick<ButtonHTMLAttributes<HTMLButtonElement>, 'name' | 'id' | 'className' | 'type' | 'onClick' | 'onKeyDown' | 'onKeyUp' | 'aria-label' | 'aria-labelledby' | 'aria-describedby' | 'form' | 'title' | 'tabIndex'> {
3
+ /**
4
+ * React ref for the button element
5
+ */
4
6
  ref?: Ref<HTMLButtonElement>;
7
+ /**
8
+ * Visual style variant of the button
9
+ */
5
10
  variant?: 'primary' | 'secondary' | 'tertiary' | 'icon';
11
+ /**
12
+ * Indicates if the button is in an error state
13
+ */
6
14
  isError?: boolean;
15
+ /**
16
+ * Shows a loading spinner and disables the button
17
+ */
7
18
  isLoading?: boolean;
19
+ /**
20
+ * Disables the button and prevents interaction
21
+ */
8
22
  isDisabled?: boolean;
23
+ /**
24
+ * Content to be rendered inside the button
25
+ */
9
26
  children?: ReactNode;
10
- onBlur?: ButtonFocusHandler;
11
- onFocus?: ButtonFocusHandler;
27
+ /**
28
+ * Handler for blur events
29
+ */
30
+ onBlur?: (e: FocusEvent) => void;
31
+ /**
32
+ * Handler for focus events
33
+ */
34
+ onFocus?: (e: FocusEvent) => void;
12
35
  }
13
36
  export type ButtonIconProps = Omit<ButtonProps, 'variant'> & {
37
+ /**
38
+ * Required aria-label for icon buttons to ensure accessibility
39
+ */
14
40
  'aria-label': string;
15
41
  };
16
- export {};
@@ -1,12 +1,36 @@
1
1
  export type CalendarPreviewProps = {
2
+ /**
3
+ * Array of dates to highlight with custom colors and labels
4
+ */
2
5
  highlightDates?: Array<{
6
+ /**
7
+ * Date to highlight
8
+ */
3
9
  date: Date;
10
+ /**
11
+ * Color to use for highlighting
12
+ */
4
13
  highlightColor: 'primary' | 'secondary';
14
+ /**
15
+ * Label text for the highlighted date
16
+ */
5
17
  label: string;
6
18
  }>;
19
+ /**
20
+ * Date range to display in the calendar preview
21
+ */
7
22
  dateRange: {
23
+ /**
24
+ * Start date of the range
25
+ */
8
26
  start: Date;
27
+ /**
28
+ * End date of the range
29
+ */
9
30
  end: Date;
31
+ /**
32
+ * Label text for the date range
33
+ */
10
34
  label: string;
11
35
  };
12
36
  };
@@ -1,4 +1,4 @@
1
- const a = "_cardContainer_ycbrf_1", n = {
1
+ const a = "_cardContainer_baj0w_1", n = {
2
2
  cardContainer: a
3
3
  };
4
4
  export {
@@ -1,11 +1,19 @@
1
1
  import { ReactNode } from 'react';
2
2
  export interface CardProps {
3
- /** Callback function when the card is selected */
3
+ /**
4
+ * Callback function when the card is selected
5
+ */
4
6
  onSelect?: (checked: boolean) => void;
5
- /** Content to be displayed inside the card */
7
+ /**
8
+ * Content to be displayed inside the card
9
+ */
6
10
  children: ReactNode;
7
- /** Optional menu component to be displayed on the right side of the card */
11
+ /**
12
+ * Optional menu component to be displayed on the right side of the card
13
+ */
8
14
  menu?: ReactNode;
9
- /** Additional CSS class name */
15
+ /**
16
+ * CSS className to be applied
17
+ */
10
18
  className?: string;
11
19
  }