@tesouro/embedded-components-react 0.9.54 → 0.9.55

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.
@@ -28,6 +28,7 @@ function T({ query: T, onQueryChange: E, results: D, isLoading: O, onAddVendor:
28
28
  id: R,
29
29
  role: "combobox",
30
30
  "aria-expanded": B,
31
+ "aria-controls": B ? `${R}-options` : void 0,
31
32
  "aria-required": !0,
32
33
  "aria-describedby": M ? z : void 0,
33
34
  className: "ttw:flex ttw:h-10 ttw:w-full ttw:items-center ttw:justify-between ttw:gap-2 ttw:rounded-md ttw:border ttw:border-border ttw:bg-background ttw:px-3 ttw:text-left ttw:text-sm ttw:shadow-xs ttw:outline-none ttw:focus-visible:border-ring ttw:focus-visible:ring-[3px] ttw:focus-visible:ring-ring/50",
@@ -47,6 +48,7 @@ function T({ query: T, onQueryChange: E, results: D, isLoading: O, onAddVendor:
47
48
  ]
48
49
  })
49
50
  }), /* @__PURE__ */ y(d, {
51
+ id: `${R}-options`,
50
52
  align: "start",
51
53
  className: "ttw:w-[var(--radix-popover-trigger-width)] ttw:p-0",
52
54
  children: /* @__PURE__ */ b(t, {
@@ -2,53 +2,56 @@ import { Button as e, Typography as t } from "../../../../../packages/shared-ui-
2
2
  import { mergeProductFormSheetLabels as n } from "../../../shared/product-catalog/ui/dist/index2.js";
3
3
  import { ProductFormFields as r } from "../../../shared/product-catalog/ui/dist/index3.js";
4
4
  import "../../../shared/product-catalog/ui/dist/index.js";
5
- import { useId as i } from "react";
6
- import { jsx as a, jsxs as o } from "react/jsx-runtime";
5
+ import { useEffect as i, useId as a, useRef as o } from "react";
6
+ import { jsx as s, jsxs as c } from "react/jsx-runtime";
7
7
  //#region ../../libs/tesouro-embedded-components-react/products-widget/ui/dist/index5.js
8
- function s({ form: s }) {
9
- let c = n(s.labels), l = i();
10
- return /* @__PURE__ */ o("form", {
8
+ function l({ form: l }) {
9
+ let u = n(l.labels), d = a(), f = o(null);
10
+ return i(() => {
11
+ f.current?.querySelector("[data-autofocus]")?.focus();
12
+ }, []), /* @__PURE__ */ c("form", {
13
+ ref: f,
11
14
  className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-lg ttw:border ttw:border-border ttw:bg-muted ttw:p-4",
12
15
  onSubmit: (e) => {
13
- e.preventDefault(), e.stopPropagation(), s.onSubmit();
16
+ e.preventDefault(), e.stopPropagation(), l.onSubmit();
14
17
  },
15
18
  children: [
16
- /* @__PURE__ */ a("div", {
19
+ /* @__PURE__ */ s("div", {
17
20
  className: "ttw:flex ttw:flex-col ttw:gap-1.5 ttw:border-b ttw:border-border ttw:pt-6 ttw:pb-7",
18
- children: /* @__PURE__ */ a(t, {
21
+ children: /* @__PURE__ */ s(t, {
19
22
  variant: "body1",
20
23
  className: "ttw:font-medium",
21
- children: s.heading
24
+ children: l.heading
22
25
  })
23
26
  }),
24
- /* @__PURE__ */ a(r, {
25
- idPrefix: l,
26
- values: s.values,
27
- errors: s.errors,
28
- unitOptions: s.unitOptions,
29
- pricePrefix: s.pricePrefix,
30
- onChange: s.onChange,
31
- labels: s.labels
27
+ /* @__PURE__ */ s(r, {
28
+ idPrefix: d,
29
+ values: l.values,
30
+ errors: l.errors,
31
+ unitOptions: l.unitOptions,
32
+ pricePrefix: l.pricePrefix,
33
+ onChange: l.onChange,
34
+ labels: l.labels
32
35
  }),
33
- /* @__PURE__ */ o("div", {
36
+ /* @__PURE__ */ c("div", {
34
37
  className: "ttw:flex ttw:justify-end ttw:gap-4 ttw:pt-6",
35
- children: [/* @__PURE__ */ a(e, {
38
+ children: [/* @__PURE__ */ s(e, {
36
39
  type: "button",
37
40
  variant: "outline",
38
41
  className: "ttw:w-fit ttw:border-border",
39
- disabled: s.inProgress,
40
- onClick: s.onCancel,
41
- children: c.cancelButton
42
- }), /* @__PURE__ */ a(e, {
42
+ disabled: l.inProgress,
43
+ onClick: l.onCancel,
44
+ children: u.cancelButton
45
+ }), /* @__PURE__ */ s(e, {
43
46
  type: "submit",
44
47
  className: "ttw:w-fit",
45
- disabled: s.inProgress || s.submitDisabled,
46
- loading: s.inProgress,
47
- children: c.saveButton
48
+ disabled: l.inProgress || l.submitDisabled,
49
+ loading: l.inProgress,
50
+ children: u.saveButton
48
51
  })]
49
52
  })
50
53
  ]
51
54
  });
52
55
  }
53
56
  //#endregion
54
- export { s as ProductEditForm, s as default };
57
+ export { l as ProductEditForm, l as default };
@@ -76,7 +76,7 @@ function E({ open: E, onOpenChange: D, title: O, description: k, values: A, erro
76
76
  }),
77
77
  /* @__PURE__ */ x(a, {
78
78
  id: `${U}-gl-code`,
79
- autoFocus: !0,
79
+ "data-autofocus": !0,
80
80
  maxLength: 20,
81
81
  value: A.nominal_code,
82
82
  placeholder: H.glCodePlaceholder,
@@ -8,83 +8,85 @@ import "../../../../shared/ui/dist/index.js";
8
8
  import { AccountAccessTable as v } from "./index4.js";
9
9
  import { DEFAULT_LABELS as y } from "./index6.js";
10
10
  import { RoleCardGroup as b } from "./index7.js";
11
- import { useEffect as x, useMemo as S, useRef as C, useState as w } from "react";
12
- import { jsx as T, jsxs as E } from "react/jsx-runtime";
13
- import { ArrowLeftIcon as D, CheckIcon as O, ChevronDownIcon as k, SendIcon as A } from "lucide-react";
11
+ import { useEffect as x, useId as S, useMemo as C, useRef as w, useState as T } from "react";
12
+ import { jsx as E, jsxs as D } from "react/jsx-runtime";
13
+ import { ArrowLeftIcon as O, CheckIcon as k, ChevronDownIcon as A, SendIcon as j } from "lucide-react";
14
14
  //#region ../../libs/tesouro-embedded-components-react/settings-widget/team/ui/dist/index8.js
15
- function j({ id: e, message: t }) {
16
- return /* @__PURE__ */ T("p", {
15
+ function M({ id: e, message: t }) {
16
+ return /* @__PURE__ */ E("p", {
17
17
  id: e,
18
18
  className: "ttw:text-sm ttw:text-destructive",
19
19
  children: t
20
20
  });
21
21
  }
22
- var M = "__none__";
23
- function N({ id: e, value: o, options: s, placeholder: d, searchPlaceholder: f, noResultsLabel: p, noneLabel: m, disabled: h, onValueChange: _ }) {
24
- let [v, y] = w(!1), b = s.find((e) => e.value === o), x = (e) => {
22
+ var N = "__none__";
23
+ function P({ id: e, value: o, options: s, placeholder: d, searchPlaceholder: f, noResultsLabel: p, noneLabel: m, disabled: h, onValueChange: _ }) {
24
+ let [v, y] = T(!1), b = S(), x = s.find((e) => e.value === o), C = (e) => {
25
25
  _(e), y(!1);
26
26
  };
27
- return /* @__PURE__ */ E(c, {
27
+ return /* @__PURE__ */ D(c, {
28
28
  open: v,
29
29
  onOpenChange: y,
30
- children: [/* @__PURE__ */ T(u, {
30
+ children: [/* @__PURE__ */ E(u, {
31
31
  asChild: !0,
32
- children: /* @__PURE__ */ E("button", {
32
+ children: /* @__PURE__ */ D("button", {
33
33
  type: "button",
34
34
  id: e,
35
35
  role: "combobox",
36
36
  "aria-expanded": v,
37
+ "aria-controls": v ? b : void 0,
37
38
  disabled: h,
38
39
  className: "ttw:flex ttw:h-9 ttw:w-full ttw:items-center ttw:justify-between ttw:gap-2 ttw:rounded-md ttw:border ttw:border-input ttw:bg-transparent ttw:px-3 ttw:py-2 ttw:text-sm ttw:shadow-xs ttw:outline-none ttw:focus-visible:border-ring ttw:focus-visible:ring-[3px] ttw:focus-visible:ring-ring/50 ttw:disabled:cursor-not-allowed ttw:disabled:opacity-50",
39
- children: [/* @__PURE__ */ T("span", {
40
- className: g("ttw:truncate", !b && "ttw:text-muted-foreground"),
41
- children: b ? b.label : d
42
- }), /* @__PURE__ */ T(k, { className: "ttw:size-4 ttw:shrink-0 ttw:opacity-50" })]
40
+ children: [/* @__PURE__ */ E("span", {
41
+ className: g("ttw:truncate", !x && "ttw:text-muted-foreground"),
42
+ children: x ? x.label : d
43
+ }), /* @__PURE__ */ E(A, { className: "ttw:size-4 ttw:shrink-0 ttw:opacity-50" })]
43
44
  })
44
- }), /* @__PURE__ */ T(l, {
45
+ }), /* @__PURE__ */ E(l, {
46
+ id: b,
45
47
  align: "start",
46
48
  className: "ttw:w-[var(--radix-popover-trigger-width)] ttw:p-0",
47
- children: /* @__PURE__ */ E(t, {
49
+ children: /* @__PURE__ */ D(t, {
48
50
  filter: (e, t) => +!!e.toLowerCase().includes(t.toLowerCase()),
49
- children: [/* @__PURE__ */ T(r, {
51
+ children: [/* @__PURE__ */ E(r, {
50
52
  placeholder: f,
51
53
  "aria-label": f
52
- }), /* @__PURE__ */ E(a, { children: [
53
- /* @__PURE__ */ T(n, { children: p }),
54
- o ? /* @__PURE__ */ T(i, {
54
+ }), /* @__PURE__ */ D(a, { children: [
55
+ /* @__PURE__ */ E(n, { children: p }),
56
+ o ? /* @__PURE__ */ E(i, {
55
57
  value: m,
56
- onSelect: () => x(""),
58
+ onSelect: () => C(""),
57
59
  children: m
58
60
  }) : null,
59
- s.map((e) => /* @__PURE__ */ E(i, {
61
+ s.map((e) => /* @__PURE__ */ D(i, {
60
62
  value: `${e.label} ${e.sublabel ?? ""} ${e.value}`,
61
- onSelect: () => x(e.value),
62
- children: [/* @__PURE__ */ E("span", {
63
+ onSelect: () => C(e.value),
64
+ children: [/* @__PURE__ */ D("span", {
63
65
  className: "ttw:flex ttw:min-w-0 ttw:flex-1 ttw:flex-col ttw:gap-0.5",
64
- children: [/* @__PURE__ */ T("span", {
66
+ children: [/* @__PURE__ */ E("span", {
65
67
  className: "ttw:truncate",
66
68
  children: e.label
67
- }), e.sublabel ? /* @__PURE__ */ T("span", {
69
+ }), e.sublabel ? /* @__PURE__ */ E("span", {
68
70
  className: "ttw:truncate ttw:text-xs ttw:text-muted-foreground",
69
71
  children: e.sublabel
70
72
  }) : null]
71
- }), e.value === o ? /* @__PURE__ */ T(O, { className: "ttw:ml-auto ttw:size-4 ttw:shrink-0" }) : null]
73
+ }), e.value === o ? /* @__PURE__ */ E(k, { className: "ttw:ml-auto ttw:size-4 ttw:shrink-0" }) : null]
72
74
  }, e.value))
73
75
  ] })]
74
76
  })
75
77
  })]
76
78
  });
77
79
  }
78
- function P({ id: e, label: t, value: n, options: r, placeholder: i, emptyMessage: a, loadingMessage: o, noneLabel: c, isLoading: l = !1, isError: u = !1, errorMessage: g, errorHelper: _, emptyHelper: v, readyHelper: y, disabled: b, searchable: x = !1, searchPlaceholder: S, noResultsLabel: C, onValueChange: w }) {
79
- let D = r.length > 0, O = u ? g ?? a : l ? o : D ? i : a, k = u ? _ : !l && !D ? v : D ? y : void 0;
80
- return /* @__PURE__ */ E("div", {
80
+ function F({ id: e, label: t, value: n, options: r, placeholder: i, emptyMessage: a, loadingMessage: o, noneLabel: c, isLoading: l = !1, isError: u = !1, errorMessage: g, errorHelper: _, emptyHelper: v, readyHelper: y, disabled: b, searchable: x = !1, searchPlaceholder: S, noResultsLabel: C, onValueChange: w }) {
81
+ let T = r.length > 0, O = u ? g ?? a : l ? o : T ? i : a, k = u ? _ : !l && !T ? v : T ? y : void 0;
82
+ return /* @__PURE__ */ D("div", {
81
83
  className: "ttw:space-y-2",
82
84
  children: [
83
- /* @__PURE__ */ T(s, {
85
+ /* @__PURE__ */ E(s, {
84
86
  htmlFor: e,
85
87
  children: t
86
88
  }),
87
- x ? /* @__PURE__ */ T(N, {
89
+ x ? /* @__PURE__ */ E(P, {
88
90
  id: e,
89
91
  value: n,
90
92
  options: r,
@@ -92,138 +94,138 @@ function P({ id: e, label: t, value: n, options: r, placeholder: i, emptyMessage
92
94
  searchPlaceholder: S ?? "",
93
95
  noResultsLabel: C ?? "",
94
96
  noneLabel: c,
95
- disabled: b || l || !D,
97
+ disabled: b || l || !T,
96
98
  onValueChange: w
97
- }) : /* @__PURE__ */ E(d, {
99
+ }) : /* @__PURE__ */ D(d, {
98
100
  value: n || void 0,
99
- disabled: b || l || !D,
100
- onValueChange: (e) => w(e === M ? "" : e),
101
- children: [/* @__PURE__ */ T(m, {
101
+ disabled: b || l || !T,
102
+ onValueChange: (e) => w(e === N ? "" : e),
103
+ children: [/* @__PURE__ */ E(m, {
102
104
  id: e,
103
105
  className: "ttw:w-full",
104
- children: /* @__PURE__ */ T(h, { placeholder: O })
105
- }), /* @__PURE__ */ E(f, { children: [n ? /* @__PURE__ */ T(p, {
106
- value: M,
106
+ children: /* @__PURE__ */ E(h, { placeholder: O })
107
+ }), /* @__PURE__ */ D(f, { children: [n ? /* @__PURE__ */ E(p, {
108
+ value: N,
107
109
  children: c
108
- }) : null, r.map((e) => /* @__PURE__ */ T(p, {
110
+ }) : null, r.map((e) => /* @__PURE__ */ E(p, {
109
111
  value: e.value,
110
112
  description: e.sublabel,
111
113
  children: e.label
112
114
  }, e.value))] })]
113
115
  }),
114
- k ? /* @__PURE__ */ T("p", {
116
+ k ? /* @__PURE__ */ E("p", {
115
117
  className: "ttw:text-xs ttw:text-muted-foreground",
116
118
  children: k
117
119
  }) : null
118
120
  ]
119
121
  });
120
122
  }
121
- function F({ form: t, roleOptions: n, departmentOptions: r, locationOptions: i, reportingManagerOptions: a, accountAccessOptions: c, departmentsLoading: l = !1, locationsLoading: u = !1, reportingManagersLoading: d = !1, departmentsError: f = !1, locationsError: p = !1, reportingManagersError: m = !1, accountAccessLoading: h = !1, accountAccessError: g = !1, accountAccessMode: w = "hidden", errors: O, submitErrorMessage: k, isSubmitting: M = !1, isSubmitBlocked: N = !1, onFormChange: F, onBackClick: I, onCancel: L, onSubmit: R, labels: z }) {
123
+ function I({ form: t, roleOptions: n, departmentOptions: r, locationOptions: i, reportingManagerOptions: a, accountAccessOptions: c, departmentsLoading: l = !1, locationsLoading: u = !1, reportingManagersLoading: d = !1, departmentsError: f = !1, locationsError: p = !1, reportingManagersError: m = !1, accountAccessLoading: h = !1, accountAccessError: g = !1, accountAccessMode: S = "hidden", errors: T, submitErrorMessage: k, isSubmitting: A = !1, isSubmitBlocked: N = !1, onFormChange: P, onBackClick: I, onCancel: L, onSubmit: R, labels: z }) {
122
124
  let B = {
123
125
  ...y,
124
126
  ...z
125
- }, V = C(null), H = S(() => c.map((e) => ({
127
+ }, V = w(null), H = C(() => c.map((e) => ({
126
128
  ...e,
127
- checked: w === "admin" || t.accountAccess.includes(e.value)
129
+ checked: S === "admin" || t.accountAccess.includes(e.value)
128
130
  })), [
129
131
  c,
130
- w,
132
+ S,
131
133
  t.accountAccess
132
134
  ]);
133
135
  return x(() => {
134
136
  V.current?.focus();
135
- }, []), /* @__PURE__ */ E("section", {
137
+ }, []), /* @__PURE__ */ D("section", {
136
138
  "aria-label": B.inviteTitle,
137
139
  className: "ttw:rounded-md ttw:border ttw:border-border ttw:bg-card ttw:p-4",
138
140
  children: [
139
- /* @__PURE__ */ E(e, {
141
+ /* @__PURE__ */ D(e, {
140
142
  ref: V,
141
143
  variant: "ghost",
142
144
  size: "sm",
143
- disabled: M,
145
+ disabled: A,
144
146
  onClick: I,
145
- children: [/* @__PURE__ */ T(D, {
147
+ children: [/* @__PURE__ */ E(O, {
146
148
  "aria-hidden": !0,
147
149
  className: "ttw:size-4"
148
150
  }), B.inviteBackToTeamButton]
149
151
  }),
150
- /* @__PURE__ */ T("h3", {
152
+ /* @__PURE__ */ E("h3", {
151
153
  className: "ttw:mt-4 ttw:text-lg ttw:font-semibold ttw:text-foreground",
152
154
  children: B.inviteTitle
153
155
  }),
154
- /* @__PURE__ */ T("form", {
156
+ /* @__PURE__ */ E("form", {
155
157
  noValidate: !0,
156
158
  className: "ttw:mt-4",
157
159
  onSubmit: (e) => {
158
160
  e.preventDefault(), R();
159
161
  },
160
- children: /* @__PURE__ */ E("fieldset", {
162
+ children: /* @__PURE__ */ D("fieldset", {
161
163
  className: "ttw:space-y-6",
162
- disabled: M,
164
+ disabled: A,
163
165
  children: [
164
- /* @__PURE__ */ E("div", {
166
+ /* @__PURE__ */ D("div", {
165
167
  className: "ttw:space-y-4",
166
168
  children: [
167
- /* @__PURE__ */ T("h4", {
169
+ /* @__PURE__ */ E("h4", {
168
170
  className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
169
171
  children: B.inviteDetailsSectionHeading
170
172
  }),
171
- /* @__PURE__ */ E("div", {
173
+ /* @__PURE__ */ D("div", {
172
174
  className: "ttw:space-y-2",
173
175
  children: [
174
- /* @__PURE__ */ T(s, {
176
+ /* @__PURE__ */ E(s, {
175
177
  htmlFor: "team-invite-name",
176
178
  children: B.inviteNameLabel
177
179
  }),
178
- /* @__PURE__ */ T(o, {
180
+ /* @__PURE__ */ E(o, {
179
181
  id: "team-invite-name",
180
182
  name: "name",
181
183
  autoComplete: "name",
182
184
  required: !0,
183
185
  value: t.name,
184
- "aria-invalid": O?.name ? !0 : void 0,
185
- "aria-describedby": O?.name ? "team-invite-name-error" : void 0,
186
- onChange: (e) => F({
186
+ "aria-invalid": T?.name ? !0 : void 0,
187
+ "aria-describedby": T?.name ? "team-invite-name-error" : void 0,
188
+ onChange: (e) => P({
187
189
  ...t,
188
190
  name: e.target.value
189
191
  })
190
192
  }),
191
- O?.name && /* @__PURE__ */ T(j, {
193
+ T?.name && /* @__PURE__ */ E(M, {
192
194
  id: "team-invite-name-error",
193
- message: O.name
195
+ message: T.name
194
196
  })
195
197
  ]
196
198
  }),
197
- /* @__PURE__ */ E("div", {
199
+ /* @__PURE__ */ D("div", {
198
200
  className: "ttw:space-y-2",
199
201
  children: [
200
- /* @__PURE__ */ T(s, {
202
+ /* @__PURE__ */ E(s, {
201
203
  htmlFor: "team-invite-email",
202
204
  children: B.inviteWorkEmailLabel
203
205
  }),
204
- /* @__PURE__ */ T(o, {
206
+ /* @__PURE__ */ E(o, {
205
207
  id: "team-invite-email",
206
208
  name: "email",
207
209
  type: "email",
208
210
  autoComplete: "email",
209
211
  required: !0,
210
212
  value: t.email,
211
- "aria-invalid": O?.email ? !0 : void 0,
212
- "aria-describedby": O?.email ? "team-invite-email-error" : void 0,
213
- onChange: (e) => F({
213
+ "aria-invalid": T?.email ? !0 : void 0,
214
+ "aria-describedby": T?.email ? "team-invite-email-error" : void 0,
215
+ onChange: (e) => P({
214
216
  ...t,
215
217
  email: e.target.value
216
218
  })
217
219
  }),
218
- O?.email && /* @__PURE__ */ T(j, {
220
+ T?.email && /* @__PURE__ */ E(M, {
219
221
  id: "team-invite-email-error",
220
- message: O.email
222
+ message: T.email
221
223
  })
222
224
  ]
223
225
  }),
224
- /* @__PURE__ */ E("div", {
226
+ /* @__PURE__ */ D("div", {
225
227
  className: "ttw:grid ttw:grid-cols-1 ttw:gap-4 ttw:sm:grid-cols-2",
226
- children: [/* @__PURE__ */ T(P, {
228
+ children: [/* @__PURE__ */ E(F, {
227
229
  id: "team-invite-department",
228
230
  label: B.inviteDepartmentLabel,
229
231
  value: t.department,
@@ -237,11 +239,11 @@ function F({ form: t, roleOptions: n, departmentOptions: r, locationOptions: i,
237
239
  errorMessage: B.inviteDepartmentLoadError,
238
240
  errorHelper: B.inviteDepartmentLoadErrorHelper,
239
241
  emptyHelper: B.inviteDepartmentEmptyHelper,
240
- onValueChange: (e) => F({
242
+ onValueChange: (e) => P({
241
243
  ...t,
242
244
  department: e
243
245
  })
244
- }), /* @__PURE__ */ T(P, {
246
+ }), /* @__PURE__ */ E(F, {
245
247
  id: "team-invite-location",
246
248
  label: B.inviteLocationLabel,
247
249
  value: t.location,
@@ -255,13 +257,13 @@ function F({ form: t, roleOptions: n, departmentOptions: r, locationOptions: i,
255
257
  errorMessage: B.inviteLocationLoadError,
256
258
  errorHelper: B.inviteLocationLoadErrorHelper,
257
259
  emptyHelper: B.inviteLocationEmptyHelper,
258
- onValueChange: (e) => F({
260
+ onValueChange: (e) => P({
259
261
  ...t,
260
262
  location: e
261
263
  })
262
264
  })]
263
265
  }),
264
- /* @__PURE__ */ T(P, {
266
+ /* @__PURE__ */ E(F, {
265
267
  id: "team-invite-reporting-manager",
266
268
  label: B.inviteReportingManagerLabel,
267
269
  value: t.reportingManager,
@@ -279,82 +281,82 @@ function F({ form: t, roleOptions: n, departmentOptions: r, locationOptions: i,
279
281
  searchable: !0,
280
282
  searchPlaceholder: B.inviteReportingManagerSearchPlaceholder,
281
283
  noResultsLabel: B.inviteReportingManagerNoResults,
282
- onValueChange: (e) => F({
284
+ onValueChange: (e) => P({
283
285
  ...t,
284
286
  reportingManager: e
285
287
  })
286
288
  })
287
289
  ]
288
290
  }),
289
- /* @__PURE__ */ E("div", {
291
+ /* @__PURE__ */ D("div", {
290
292
  className: "ttw:space-y-1",
291
293
  children: [
292
- /* @__PURE__ */ T("div", {
294
+ /* @__PURE__ */ E("div", {
293
295
  id: "team-invite-role-heading",
294
296
  className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
295
297
  children: B.inviteRoleSectionHeading
296
298
  }),
297
- /* @__PURE__ */ T("p", {
299
+ /* @__PURE__ */ E("p", {
298
300
  className: "ttw:text-sm ttw:text-muted-foreground",
299
301
  children: B.inviteRoleSectionDescription
300
302
  }),
301
- /* @__PURE__ */ T("div", {
303
+ /* @__PURE__ */ E("div", {
302
304
  className: "ttw:mt-3",
303
- children: /* @__PURE__ */ T(b, {
305
+ children: /* @__PURE__ */ E(b, {
304
306
  idPrefix: "team-invite-role",
305
307
  options: n,
306
308
  value: t.role,
307
- onValueChange: (e) => F({
309
+ onValueChange: (e) => P({
308
310
  ...t,
309
311
  role: e
310
312
  }),
311
313
  ariaLabelledBy: "team-invite-role-heading",
312
- ariaInvalid: !!O?.role,
313
- ariaDescribedBy: O?.role ? "team-invite-role-error" : void 0
314
+ ariaInvalid: !!T?.role,
315
+ ariaDescribedBy: T?.role ? "team-invite-role-error" : void 0
314
316
  })
315
317
  }),
316
- O?.role && /* @__PURE__ */ T(j, {
318
+ T?.role && /* @__PURE__ */ E(M, {
317
319
  id: "team-invite-role-error",
318
- message: O.role
320
+ message: T.role
319
321
  })
320
322
  ]
321
323
  }),
322
- w === "employee" && /* @__PURE__ */ E("div", {
324
+ S === "employee" && /* @__PURE__ */ D("div", {
323
325
  className: "ttw:space-y-2",
324
- children: [/* @__PURE__ */ T("div", {
326
+ children: [/* @__PURE__ */ E("div", {
325
327
  id: "team-invite-account-access-heading",
326
328
  className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
327
329
  children: B.inviteAccountAccessSectionHeading
328
- }), /* @__PURE__ */ T("p", {
330
+ }), /* @__PURE__ */ E("p", {
329
331
  className: "ttw:text-sm ttw:text-muted-foreground",
330
332
  children: B.manageAccessEmployeeNote
331
333
  })]
332
334
  }),
333
- (w === "picker" || w === "admin") && /* @__PURE__ */ E("div", {
335
+ (S === "picker" || S === "admin") && /* @__PURE__ */ D("div", {
334
336
  className: "ttw:space-y-2",
335
337
  children: [
336
- /* @__PURE__ */ T("div", {
338
+ /* @__PURE__ */ E("div", {
337
339
  id: "team-invite-account-access-heading",
338
340
  className: "ttw:text-base ttw:font-semibold ttw:text-foreground",
339
341
  children: B.inviteAccountAccessSectionHeading
340
342
  }),
341
- /* @__PURE__ */ T("p", {
343
+ /* @__PURE__ */ E("p", {
342
344
  className: "ttw:text-sm ttw:text-muted-foreground",
343
345
  children: B.inviteAccountAccessSectionDescription
344
346
  }),
345
- g ? /* @__PURE__ */ T(_, { children: B.inviteAccountAccessLoadError }) : h ? /* @__PURE__ */ T("p", {
347
+ g ? /* @__PURE__ */ E(_, { children: B.inviteAccountAccessLoadError }) : h ? /* @__PURE__ */ E("p", {
346
348
  className: "ttw:text-sm ttw:text-muted-foreground",
347
349
  children: B.inviteOptionsLoading
348
- }) : /* @__PURE__ */ T(v, {
350
+ }) : /* @__PURE__ */ E(v, {
349
351
  rows: H,
350
352
  onToggle: (e, n) => {
351
- F({
353
+ P({
352
354
  ...t,
353
355
  accountAccess: n ? [...t.accountAccess, e] : t.accountAccess.filter((t) => t !== e)
354
356
  });
355
357
  },
356
- disabled: w === "admin",
357
- note: w === "admin" ? B.inviteAccountAccessAdminNote : void 0,
358
+ disabled: S === "admin",
359
+ note: S === "admin" ? B.inviteAccountAccessAdminNote : void 0,
358
360
  emptyMessage: B.inviteAccountAccessEmpty,
359
361
  labels: {
360
362
  accountNameColumn: B.accountAccessNameColumn,
@@ -364,19 +366,19 @@ function F({ form: t, roleOptions: n, departmentOptions: r, locationOptions: i,
364
366
  })
365
367
  ]
366
368
  }),
367
- k && /* @__PURE__ */ T(_, { children: k }),
368
- /* @__PURE__ */ E("div", {
369
+ k && /* @__PURE__ */ E(_, { children: k }),
370
+ /* @__PURE__ */ D("div", {
369
371
  className: "ttw:flex ttw:justify-end ttw:gap-2",
370
- children: [/* @__PURE__ */ T(e, {
372
+ children: [/* @__PURE__ */ E(e, {
371
373
  type: "button",
372
374
  variant: "ghost",
373
375
  onClick: L,
374
376
  children: B.inviteCancelButton
375
- }), /* @__PURE__ */ E(e, {
377
+ }), /* @__PURE__ */ D(e, {
376
378
  type: "submit",
377
- loading: M,
378
- disabled: N || l || u || d || (w === "picker" || w === "admin") && (h || g),
379
- children: [B.inviteSubmitButton, /* @__PURE__ */ T(A, {
379
+ loading: A,
380
+ disabled: N || l || u || d || (S === "picker" || S === "admin") && (h || g),
381
+ children: [B.inviteSubmitButton, /* @__PURE__ */ E(j, {
380
382
  "aria-hidden": !0,
381
383
  className: "ttw:size-4"
382
384
  })]
@@ -389,4 +391,4 @@ function F({ form: t, roleOptions: n, departmentOptions: r, locationOptions: i,
389
391
  });
390
392
  }
391
393
  //#endregion
392
- export { F as InviteTeamMemberForm, F as default, P as OptionalSelect };
394
+ export { I as InviteTeamMemberForm, I as default, F as OptionalSelect };