@tesouro/embedded-components-react 0.5.50 → 0.5.52

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 (40) hide show
  1. package/dist/index.d.ts +42 -1
  2. package/dist/lib/CounterpartsWidget.d.ts +41 -0
  3. package/dist/lib/ReceivablesWidget.d.ts +40 -1
  4. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +6 -9
  5. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +9 -12
  6. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +1 -2
  7. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +8 -8
  8. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index101.js +18 -4
  9. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index102.js +91 -88
  10. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index104.js +18 -3
  11. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index106.js +113 -102
  12. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index28.js +5 -1
  13. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index30.js +28 -20
  14. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index31.js +148 -147
  15. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index33.js +15 -3
  16. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index34.js +39 -34
  17. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index39.js +16 -4
  18. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index40.js +203 -174
  19. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index42.js +15 -3
  20. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index43.js +52 -52
  21. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index45.js +22 -3
  22. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index46.js +2 -17
  23. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index48.js +31 -31
  24. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +97 -96
  25. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index55.js +15 -3
  26. package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index56.js +57 -61
  27. package/dist/libs/tesouro-embedded-components-react/counterparts-widget/ui/dist/index4.js +189 -188
  28. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index230.js +14 -7
  29. package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index624.js +1 -0
  30. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index10.js +1 -0
  31. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index12.js +1 -0
  32. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index13.js +54 -37
  33. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js +23 -16
  34. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index3.js +1 -0
  35. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index5.js +54 -41
  36. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index6.js +88 -70
  37. package/dist/libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index9.js +333 -282
  38. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  39. package/dist/packages/shared-ui-shadcn/dist/index.js +3757 -3705
  40. package/package.json +1 -1
@@ -5,15 +5,22 @@ import { jsx as n } from "@emotion/react/jsx-runtime";
5
5
  import r from "@emotion/cache";
6
6
  import { CacheProvider as i } from "@emotion/react";
7
7
  //#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index230.js
8
- var a = ({ cacheKey: a, children: o }) => {
9
- let s = e(), [c] = t(() => r({
10
- key: a,
11
- container: s.styles
8
+ var a = ({ cacheKey: e, container: t, prebuiltStylesheet: n = !1 }) => {
9
+ let i = r({
10
+ key: e,
11
+ container: t
12
+ });
13
+ return n && (i.compat = !0), i;
14
+ }, o = ({ cacheKey: r, prebuiltStylesheet: o = !1, children: s }) => {
15
+ let c = e(), [l] = t(() => a({
16
+ cacheKey: r,
17
+ container: c.styles,
18
+ prebuiltStylesheet: o
12
19
  }));
13
20
  return /* @__PURE__ */ n(i, {
14
- value: c,
15
- children: o
21
+ value: l,
22
+ children: s
16
23
  });
17
24
  };
18
25
  //#endregion
19
- export { a as EmotionCacheProvider };
26
+ export { o as EmotionCacheProvider, a as createEmotionCache };
@@ -15,6 +15,7 @@ var l = /* @__PURE__ */ new Set(), u = ({ monite: u, theme: d, componentSettings
15
15
  userPermissions: g,
16
16
  children: [/* @__PURE__ */ s(r, {
17
17
  cacheKey: "monite-css-baseline",
18
+ prebuiltStylesheet: !0,
18
19
  children: /* @__PURE__ */ c(o, {
19
20
  onThemeMounted: () => {
20
21
  h?.();
@@ -1,4 +1,5 @@
1
1
  import "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import "./index2.js";
2
3
  import "./index4.js";
3
4
  import "./index6.js";
4
5
  import "./index8.js";
@@ -1,4 +1,5 @@
1
1
  import "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import "./index2.js";
2
3
  import "./index4.js";
3
4
  import "./index8.js";
4
5
  import "react";
@@ -1,52 +1,69 @@
1
- import { Button as e, Sheet as t, SheetContent as n, SheetDescription as r, SheetFooter as i, SheetHeader as a, SheetTitle as o } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { ADDRESS_FORM_SHEET_LABELS_EN as s } from "./index2.js";
3
- import { AddressFieldGroup as c } from "./index6.js";
4
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
1
+ import { Button as e, RequiredFieldsLegend as t, Sheet as n, SheetContent as r, SheetDescription as i, SheetFooter as a, SheetHeader as o, SheetTitle as s, mergeRequiredFieldsLegendLabels as c } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { ADDRESS_FORM_SHEET_LABELS_EN as l } from "./index2.js";
3
+ import { AddressFieldGroup as u } from "./index6.js";
4
+ import { jsx as d, jsxs as f } from "react/jsx-runtime";
5
5
  //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index13.js
6
- function d({ open: d, onOpenChange: f, values: p, errors: m, stateOptions: h, inProgress: g, formError: _, onChange: v, onSubmit: y, onCancel: b, labels: x }) {
7
- let S = {
8
- ...s,
9
- ...x
6
+ function p({ open: p, onOpenChange: m, values: h, errors: g, stateOptions: _, inProgress: v, formError: y, onChange: b, onSubmit: x, onCancel: S, labels: C }) {
7
+ let w = {
8
+ ...l.fieldMarkers,
9
+ ...C?.fieldMarkers
10
+ }, T = {
11
+ ...l,
12
+ ...C,
13
+ fieldMarkers: w,
14
+ address: {
15
+ ...l.address,
16
+ ...C?.address,
17
+ fieldMarkers: {
18
+ ...w,
19
+ ...C?.address?.fieldMarkers
20
+ }
21
+ },
22
+ requiredFieldsLegend: c(w, C?.requiredFieldsLegend)
10
23
  };
11
- return /* @__PURE__ */ l(t, {
12
- open: d,
13
- onOpenChange: f,
14
- children: /* @__PURE__ */ u(n, {
24
+ return /* @__PURE__ */ d(n, {
25
+ open: p,
26
+ onOpenChange: m,
27
+ children: /* @__PURE__ */ f(r, {
15
28
  className: "ttw:w-[600px] ttw:sm:max-w-[600px] ttw:overflow-y-auto",
16
- children: [/* @__PURE__ */ u(a, { children: [/* @__PURE__ */ l(o, { children: S.title }), /* @__PURE__ */ l(r, {
29
+ children: [/* @__PURE__ */ f(o, { children: [/* @__PURE__ */ d(s, { children: T.title }), /* @__PURE__ */ d(i, {
17
30
  className: "ttw:sr-only",
18
- children: S.title
19
- })] }), /* @__PURE__ */ u("form", {
31
+ children: T.title
32
+ })] }), /* @__PURE__ */ f("form", {
20
33
  onSubmit: (e) => {
21
- e.preventDefault(), e.stopPropagation(), y();
34
+ e.preventDefault(), e.stopPropagation(), x();
22
35
  },
23
- children: [/* @__PURE__ */ u("div", {
36
+ children: [/* @__PURE__ */ f("div", {
24
37
  className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:px-6 ttw:pt-8 ttw:pb-6",
25
- children: [_ && /* @__PURE__ */ l("p", {
26
- role: "alert",
27
- className: "ttw:rounded-md ttw:bg-destructive/10 ttw:px-3 ttw:py-2 ttw:text-sm ttw:text-destructive",
28
- children: _
29
- }), /* @__PURE__ */ l(c, {
30
- idPrefix: "address-edit",
31
- values: p,
32
- errors: m,
33
- stateOptions: h,
34
- onChange: v,
35
- labels: S.address
36
- })]
37
- }), /* @__PURE__ */ u(i, {
38
+ children: [
39
+ y && /* @__PURE__ */ d("p", {
40
+ role: "alert",
41
+ className: "ttw:rounded-md ttw:bg-destructive/10 ttw:px-3 ttw:py-2 ttw:text-sm ttw:text-destructive",
42
+ children: y
43
+ }),
44
+ /* @__PURE__ */ d(t, { labels: T.requiredFieldsLegend }),
45
+ /* @__PURE__ */ d(u, {
46
+ idPrefix: "address-edit",
47
+ values: h,
48
+ errors: g,
49
+ stateOptions: _,
50
+ onChange: b,
51
+ labels: T.address
52
+ })
53
+ ]
54
+ }), /* @__PURE__ */ f(a, {
38
55
  className: "ttw:flex ttw:flex-row ttw:justify-end ttw:gap-2",
39
- children: [/* @__PURE__ */ l(e, {
56
+ children: [/* @__PURE__ */ d(e, {
40
57
  type: "button",
41
58
  variant: "ghost",
42
59
  size: "lg",
43
- onClick: b,
44
- children: S.cancelButton
45
- }), /* @__PURE__ */ l(e, {
60
+ onClick: S,
61
+ children: T.cancelButton
62
+ }), /* @__PURE__ */ d(e, {
46
63
  type: "submit",
47
64
  size: "lg",
48
- disabled: g,
49
- children: S.saveButton
65
+ disabled: v,
66
+ children: T.saveButton
50
67
  })]
51
68
  })]
52
69
  })]
@@ -54,4 +71,4 @@ function d({ open: d, onOpenChange: f, values: p, errors: m, stateOptions: h, in
54
71
  });
55
72
  }
56
73
  //#endregion
57
- export { d as AddressFormSheet, d as default };
74
+ export { p as AddressFormSheet, p as default };
@@ -1,14 +1,15 @@
1
+ import { LABEL_LABELS_EN as e, REQUIRED_FIELDS_LEGEND_LABELS_EN as t } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
1
2
  //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index2.js
2
- var e = {
3
+ var n = {
3
4
  organization: "Organization",
4
5
  individual: "Individual"
5
- }, t = {
6
+ }, r = {
6
7
  heading: "What kind of counterpart is this?",
7
8
  organization: "Organization",
8
9
  organizationHint: "A company or other legal entity.",
9
10
  individual: "Individual",
10
11
  individualHint: "A natural person."
11
- }, n = {
12
+ }, i = {
12
13
  line1: "Address line 1",
13
14
  line2: "Address line 2",
14
15
  city: "City",
@@ -16,12 +17,14 @@ var e = {
16
17
  statePlaceholder: "Select a state",
17
18
  postalCode: "ZIP code",
18
19
  country: "Country",
19
- countryValue: "United States"
20
- }, r = {
20
+ countryValue: "United States",
21
+ fieldMarkers: e
22
+ }, a = {
21
23
  accountHolderName: "Account holder name",
22
24
  routingNumber: "Routing number",
23
- accountNumber: "Account number"
24
- }, i = {
25
+ accountNumber: "Account number",
26
+ fieldMarkers: e
27
+ }, o = {
25
28
  createTitleOrganization: "Create organization",
26
29
  createTitleIndividual: "Create individual",
27
30
  editTitleOrganization: "Edit organization",
@@ -47,7 +50,7 @@ var e = {
47
50
  lastNameLabel: "Last name",
48
51
  titleLabel: "Title",
49
52
  emailLabel: "Email",
50
- phoneLabel: "Phone (optional)",
53
+ phoneLabel: "Phone",
51
54
  taxIdLabel: "Tax ID",
52
55
  customerTaxIdHelp: "Required only if you'll issue a 1099 IRS form at year-end.",
53
56
  vendorTaxIdHelp: "Required only if you'll file a 1099 IRS form for this vendor at year-end.",
@@ -62,9 +65,11 @@ var e = {
62
65
  cancelButton: "Cancel",
63
66
  createButton: "Create",
64
67
  saveButton: "Save",
65
- address: n,
66
- ach: r
67
- }, a = {
68
+ address: i,
69
+ ach: a,
70
+ fieldMarkers: e,
71
+ requiredFieldsLegend: t
72
+ }, s = {
68
73
  createTitle: "Add bank account",
69
74
  editTitle: "Edit bank account",
70
75
  nameLabel: "Account name",
@@ -82,15 +87,17 @@ var e = {
82
87
  cancelButton: "Cancel",
83
88
  createButton: "Add",
84
89
  saveButton: "Save"
85
- }, o = {
90
+ }, c = {
86
91
  title: "Edit address",
87
92
  cancelButton: "Cancel",
88
93
  saveButton: "Save",
89
- address: n
90
- }, s = {
94
+ address: i,
95
+ fieldMarkers: e,
96
+ requiredFieldsLegend: t
97
+ }, l = {
91
98
  confirmButton: "Delete",
92
99
  cancelButton: "Cancel"
93
- }, c = {
100
+ }, u = {
94
101
  fieldLabel: "Counterpart",
95
102
  searchPlaceholder: "Search counterparts",
96
103
  selectPlaceholder: "Select a counterpart",
@@ -101,4 +108,4 @@ var e = {
101
108
  createButton: "Create counterpart"
102
109
  };
103
110
  //#endregion
104
- export { r as ACH_FIELD_GROUP_LABELS_EN, n as ADDRESS_FIELD_GROUP_LABELS_EN, o as ADDRESS_FORM_SHEET_LABELS_EN, a as BANK_ACCOUNT_FORM_SHEET_LABELS_EN, s as CONFIRM_DELETE_DIALOG_LABELS_EN, i as COUNTERPART_FORM_SHEET_LABELS_EN, c as COUNTERPART_SELECTOR_LABELS_EN, e as COUNTERPART_TYPE_BADGE_LABELS_EN, t as COUNTERPART_TYPE_CHOOSER_LABELS_EN };
111
+ export { a as ACH_FIELD_GROUP_LABELS_EN, i as ADDRESS_FIELD_GROUP_LABELS_EN, c as ADDRESS_FORM_SHEET_LABELS_EN, s as BANK_ACCOUNT_FORM_SHEET_LABELS_EN, l as CONFIRM_DELETE_DIALOG_LABELS_EN, o as COUNTERPART_FORM_SHEET_LABELS_EN, u as COUNTERPART_SELECTOR_LABELS_EN, n as COUNTERPART_TYPE_BADGE_LABELS_EN, r as COUNTERPART_TYPE_CHOOSER_LABELS_EN };
@@ -1,3 +1,4 @@
1
1
  import "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import "./index2.js";
2
3
  import "react/jsx-runtime";
3
4
  import "lucide-react";
@@ -1,65 +1,78 @@
1
- import { Input as e, Label as t } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { ACH_FIELD_GROUP_LABELS_EN as n } from "./index2.js";
3
- import { FieldError as r } from "./index4.js";
4
- import { jsx as i, jsxs as a } from "react/jsx-runtime";
1
+ import { FieldRequirement as e, Input as t, Label as n } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { ACH_FIELD_GROUP_LABELS_EN as r } from "./index2.js";
3
+ import { FieldError as i } from "./index4.js";
4
+ import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
5
  //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index5.js
6
- function o({ idPrefix: o, values: s, errors: c, onChange: l, labels: u }) {
7
- let d = {
8
- ...n,
9
- ...u
6
+ function s({ idPrefix: s, values: c, errors: l, onChange: u, labels: d }) {
7
+ let f = {
8
+ ...r,
9
+ ...d,
10
+ fieldMarkers: {
11
+ ...r.fieldMarkers,
12
+ ...d?.fieldMarkers
13
+ }
10
14
  };
11
- return /* @__PURE__ */ a("div", {
15
+ return /* @__PURE__ */ o("div", {
12
16
  className: "ttw:flex ttw:flex-col ttw:gap-4",
13
- children: [/* @__PURE__ */ a("div", {
17
+ children: [/* @__PURE__ */ o("div", {
14
18
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
15
19
  children: [
16
- /* @__PURE__ */ i(t, {
17
- htmlFor: `${o}-account-holder`,
18
- children: d.accountHolderName
20
+ /* @__PURE__ */ a(n, {
21
+ htmlFor: `${s}-account-holder`,
22
+ requirement: e.Required,
23
+ labels: f.fieldMarkers,
24
+ children: f.accountHolderName
19
25
  }),
20
- /* @__PURE__ */ i(e, {
21
- id: `${o}-account-holder`,
22
- value: s.accountHolderName,
23
- "aria-invalid": !!c?.accountHolderName,
24
- onChange: (e) => l({ accountHolderName: e.target.value })
26
+ /* @__PURE__ */ a(t, {
27
+ id: `${s}-account-holder`,
28
+ value: c.accountHolderName,
29
+ "aria-required": !0,
30
+ "aria-invalid": !!l?.accountHolderName,
31
+ onChange: (e) => u({ accountHolderName: e.target.value })
25
32
  }),
26
- /* @__PURE__ */ i(r, { message: c?.accountHolderName })
33
+ /* @__PURE__ */ a(i, { message: l?.accountHolderName })
27
34
  ]
28
- }), /* @__PURE__ */ a("div", {
35
+ }), /* @__PURE__ */ o("div", {
29
36
  className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
30
- children: [/* @__PURE__ */ a("div", {
37
+ children: [/* @__PURE__ */ o("div", {
31
38
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
32
39
  children: [
33
- /* @__PURE__ */ i(t, {
34
- htmlFor: `${o}-routing-number`,
35
- children: d.routingNumber
40
+ /* @__PURE__ */ a(n, {
41
+ htmlFor: `${s}-routing-number`,
42
+ requirement: e.Required,
43
+ labels: f.fieldMarkers,
44
+ children: f.routingNumber
36
45
  }),
37
- /* @__PURE__ */ i(e, {
38
- id: `${o}-routing-number`,
39
- value: s.routingNumber,
40
- "aria-invalid": !!c?.routingNumber,
41
- onChange: (e) => l({ routingNumber: e.target.value })
46
+ /* @__PURE__ */ a(t, {
47
+ id: `${s}-routing-number`,
48
+ value: c.routingNumber,
49
+ "aria-required": !0,
50
+ "aria-invalid": !!l?.routingNumber,
51
+ onChange: (e) => u({ routingNumber: e.target.value })
42
52
  }),
43
- /* @__PURE__ */ i(r, { message: c?.routingNumber })
53
+ /* @__PURE__ */ a(i, { message: l?.routingNumber })
44
54
  ]
45
- }), /* @__PURE__ */ a("div", {
55
+ }), /* @__PURE__ */ o("div", {
46
56
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
47
57
  children: [
48
- /* @__PURE__ */ i(t, {
49
- htmlFor: `${o}-account-number`,
50
- children: d.accountNumber
58
+ /* @__PURE__ */ a(n, {
59
+ htmlFor: `${s}-account-number`,
60
+ requirement: e.Required,
61
+ labels: f.fieldMarkers,
62
+ children: f.accountNumber
51
63
  }),
52
- /* @__PURE__ */ i(e, {
53
- id: `${o}-account-number`,
54
- value: s.accountNumber,
55
- "aria-invalid": !!c?.accountNumber,
56
- onChange: (e) => l({ accountNumber: e.target.value })
64
+ /* @__PURE__ */ a(t, {
65
+ id: `${s}-account-number`,
66
+ value: c.accountNumber,
67
+ "aria-required": !0,
68
+ "aria-invalid": !!l?.accountNumber,
69
+ onChange: (e) => u({ accountNumber: e.target.value })
57
70
  }),
58
- /* @__PURE__ */ i(r, { message: c?.accountNumber })
71
+ /* @__PURE__ */ a(i, { message: l?.accountNumber })
59
72
  ]
60
73
  })]
61
74
  })]
62
75
  });
63
76
  }
64
77
  //#endregion
65
- export { o as AchFieldGroup, o as default };
78
+ export { s as AchFieldGroup, s as default };
@@ -1,115 +1,133 @@
1
- import { Input as e, Label as t, Select as n, SelectContent as r, SelectItem as i, SelectTrigger as a, SelectValue as o } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { ADDRESS_FIELD_GROUP_LABELS_EN as s } from "./index2.js";
3
- import { FieldError as c } from "./index4.js";
4
- import { jsx as l, jsxs as u } from "react/jsx-runtime";
1
+ import { FieldRequirement as e, Input as t, Label as n, Select as r, SelectContent as i, SelectItem as a, SelectTrigger as o, SelectValue as s } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { ADDRESS_FIELD_GROUP_LABELS_EN as c } from "./index2.js";
3
+ import { FieldError as l } from "./index4.js";
4
+ import { jsx as u, jsxs as d } from "react/jsx-runtime";
5
5
  //#region ../../libs/tesouro-embedded-components-react/shared/counterpart-management/ui/dist/index6.js
6
- var d = {
6
+ var f = {
7
7
  line1: "",
8
8
  line2: "",
9
9
  city: "",
10
10
  state: "",
11
11
  postalCode: ""
12
12
  };
13
- function f({ idPrefix: d, values: f, errors: p, stateOptions: m, onChange: h, labels: g }) {
14
- let _ = {
15
- ...s,
16
- ...g
13
+ function p({ idPrefix: f, values: p, errors: m, stateOptions: h, onChange: g, labels: _ }) {
14
+ let v = {
15
+ ...c,
16
+ ..._,
17
+ fieldMarkers: {
18
+ ...c.fieldMarkers,
19
+ ..._?.fieldMarkers
20
+ }
17
21
  };
18
- return /* @__PURE__ */ u("div", {
22
+ return /* @__PURE__ */ d("div", {
19
23
  className: "ttw:flex ttw:flex-col ttw:gap-4",
20
24
  children: [
21
- /* @__PURE__ */ u("div", {
25
+ /* @__PURE__ */ d("div", {
22
26
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
23
27
  children: [
24
- /* @__PURE__ */ l(t, {
25
- htmlFor: `${d}-line1`,
26
- children: _.line1
28
+ /* @__PURE__ */ u(n, {
29
+ htmlFor: `${f}-line1`,
30
+ requirement: e.Required,
31
+ labels: v.fieldMarkers,
32
+ children: v.line1
27
33
  }),
28
- /* @__PURE__ */ l(e, {
29
- id: `${d}-line1`,
30
- value: f.line1,
31
- "aria-invalid": !!p?.line1,
32
- onChange: (e) => h({ line1: e.target.value })
34
+ /* @__PURE__ */ u(t, {
35
+ id: `${f}-line1`,
36
+ value: p.line1,
37
+ "aria-required": !0,
38
+ "aria-invalid": !!m?.line1,
39
+ onChange: (e) => g({ line1: e.target.value })
33
40
  }),
34
- /* @__PURE__ */ l(c, { message: p?.line1 })
41
+ /* @__PURE__ */ u(l, { message: m?.line1 })
35
42
  ]
36
43
  }),
37
- /* @__PURE__ */ u("div", {
44
+ /* @__PURE__ */ d("div", {
38
45
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
39
- children: [/* @__PURE__ */ l(t, {
40
- htmlFor: `${d}-line2`,
41
- children: _.line2
42
- }), /* @__PURE__ */ l(e, {
43
- id: `${d}-line2`,
44
- value: f.line2,
45
- onChange: (e) => h({ line2: e.target.value })
46
+ children: [/* @__PURE__ */ u(n, {
47
+ htmlFor: `${f}-line2`,
48
+ requirement: e.Optional,
49
+ labels: v.fieldMarkers,
50
+ children: v.line2
51
+ }), /* @__PURE__ */ u(t, {
52
+ id: `${f}-line2`,
53
+ value: p.line2,
54
+ onChange: (e) => g({ line2: e.target.value })
46
55
  })]
47
56
  }),
48
- /* @__PURE__ */ u("div", {
57
+ /* @__PURE__ */ d("div", {
49
58
  className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
50
- children: [/* @__PURE__ */ u("div", {
59
+ children: [/* @__PURE__ */ d("div", {
51
60
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
52
61
  children: [
53
- /* @__PURE__ */ l(t, {
54
- htmlFor: `${d}-city`,
55
- children: _.city
62
+ /* @__PURE__ */ u(n, {
63
+ htmlFor: `${f}-city`,
64
+ requirement: e.Required,
65
+ labels: v.fieldMarkers,
66
+ children: v.city
56
67
  }),
57
- /* @__PURE__ */ l(e, {
58
- id: `${d}-city`,
59
- value: f.city,
60
- "aria-invalid": !!p?.city,
61
- onChange: (e) => h({ city: e.target.value })
68
+ /* @__PURE__ */ u(t, {
69
+ id: `${f}-city`,
70
+ value: p.city,
71
+ "aria-required": !0,
72
+ "aria-invalid": !!m?.city,
73
+ onChange: (e) => g({ city: e.target.value })
62
74
  }),
63
- /* @__PURE__ */ l(c, { message: p?.city })
75
+ /* @__PURE__ */ u(l, { message: m?.city })
64
76
  ]
65
- }), /* @__PURE__ */ u("div", {
77
+ }), /* @__PURE__ */ d("div", {
66
78
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
67
79
  children: [
68
- /* @__PURE__ */ l(t, {
69
- htmlFor: `${d}-state`,
70
- children: _.state
71
- }),
72
80
  /* @__PURE__ */ u(n, {
73
- value: f.state === "" ? void 0 : f.state,
74
- onValueChange: (e) => h({ state: e }),
75
- children: [/* @__PURE__ */ l(a, {
76
- id: `${d}-state`,
81
+ htmlFor: `${f}-state`,
82
+ requirement: e.Required,
83
+ labels: v.fieldMarkers,
84
+ children: v.state
85
+ }),
86
+ /* @__PURE__ */ d(r, {
87
+ value: p.state === "" ? void 0 : p.state,
88
+ onValueChange: (e) => g({ state: e }),
89
+ children: [/* @__PURE__ */ u(o, {
90
+ id: `${f}-state`,
91
+ "aria-required": !0,
77
92
  className: "ttw:w-full",
78
- children: /* @__PURE__ */ l(o, { placeholder: _.statePlaceholder })
79
- }), /* @__PURE__ */ l(r, { children: m.map((e) => /* @__PURE__ */ l(i, {
93
+ children: /* @__PURE__ */ u(s, { placeholder: v.statePlaceholder })
94
+ }), /* @__PURE__ */ u(i, { children: h.map((e) => /* @__PURE__ */ u(a, {
80
95
  value: e.value,
81
96
  children: e.label
82
97
  }, e.value)) })]
83
98
  }),
84
- /* @__PURE__ */ l(c, { message: p?.state })
99
+ /* @__PURE__ */ u(l, { message: m?.state })
85
100
  ]
86
101
  })]
87
102
  }),
88
- /* @__PURE__ */ u("div", {
103
+ /* @__PURE__ */ d("div", {
89
104
  className: "ttw:grid ttw:grid-cols-2 ttw:gap-4",
90
- children: [/* @__PURE__ */ u("div", {
105
+ children: [/* @__PURE__ */ d("div", {
91
106
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
92
107
  children: [
93
- /* @__PURE__ */ l(t, {
94
- htmlFor: `${d}-postal`,
95
- children: _.postalCode
108
+ /* @__PURE__ */ u(n, {
109
+ htmlFor: `${f}-postal`,
110
+ requirement: e.Required,
111
+ labels: v.fieldMarkers,
112
+ children: v.postalCode
96
113
  }),
97
- /* @__PURE__ */ l(e, {
98
- id: `${d}-postal`,
99
- value: f.postalCode,
100
- "aria-invalid": !!p?.postalCode,
101
- onChange: (e) => h({ postalCode: e.target.value })
114
+ /* @__PURE__ */ u(t, {
115
+ id: `${f}-postal`,
116
+ value: p.postalCode,
117
+ "aria-required": !0,
118
+ "aria-invalid": !!m?.postalCode,
119
+ onChange: (e) => g({ postalCode: e.target.value })
102
120
  }),
103
- /* @__PURE__ */ l(c, { message: p?.postalCode })
121
+ /* @__PURE__ */ u(l, { message: m?.postalCode })
104
122
  ]
105
- }), /* @__PURE__ */ u("div", {
123
+ }), /* @__PURE__ */ d("div", {
106
124
  className: "ttw:flex ttw:flex-col ttw:gap-1.5",
107
- children: [/* @__PURE__ */ l(t, {
108
- htmlFor: `${d}-country`,
109
- children: _.country
110
- }), /* @__PURE__ */ l(e, {
111
- id: `${d}-country`,
112
- value: _.countryValue,
125
+ children: [/* @__PURE__ */ u(n, {
126
+ htmlFor: `${f}-country`,
127
+ children: v.country
128
+ }), /* @__PURE__ */ u(t, {
129
+ id: `${f}-country`,
130
+ value: v.countryValue,
113
131
  disabled: !0,
114
132
  readOnly: !0
115
133
  })]
@@ -119,4 +137,4 @@ function f({ idPrefix: d, values: f, errors: p, stateOptions: m, onChange: h, la
119
137
  });
120
138
  }
121
139
  //#endregion
122
- export { f as AddressFieldGroup, f as default, d as EMPTY_ADDRESS_FORM_VALUES };
140
+ export { p as AddressFieldGroup, p as default, f as EMPTY_ADDRESS_FORM_VALUES };