@tesouro/embedded-components-react 0.11.54 → 0.11.58

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 (38) hide show
  1. package/README.md +2 -2
  2. package/dist/index.css +0 -21
  3. package/dist/index.d.ts +31 -6
  4. package/dist/lib/ProductsWidget.d.ts +30 -5
  5. package/dist/lib/ReceivablesWidget.d.ts +27 -5
  6. package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index14.js +1 -1
  7. package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/lib/ProductsWidget/ProductsWidget.js +99 -92
  8. package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/lib/ProductsWidget/useProductDelete.js +24 -21
  9. package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/lib/ProductsWidget/useProductsWidget.js +79 -75
  10. package/dist/libs/tesouro-embedded-components-react/products-widget/feature/dist/mocks/labels.js +5 -5
  11. package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index2.js +9 -7
  12. package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index3.js +7 -9
  13. package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index4.js +103 -118
  14. package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index5.js +28 -50
  15. package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index6.js +118 -147
  16. package/dist/libs/tesouro-embedded-components-react/products-widget/ui/dist/index7.js +24 -27
  17. package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
  18. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/index.js +16 -14
  19. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/MeasureUnitCreateDialogContainer.js +38 -0
  20. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/MeasureUnitsManagerContainer.js +73 -123
  21. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/ProductSelector.js +1 -1
  22. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/helpers.js +6 -2
  23. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/labels.js +7 -7
  24. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/useMeasureUnitForm.js +83 -0
  25. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/lib/useProductForm.js +17 -4
  26. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index.js +6 -4
  27. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index2.js +45 -17
  28. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index3.js +121 -123
  29. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index4.js +36 -61
  30. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index5.js +26 -194
  31. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index6.js +115 -49
  32. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index7.js +62 -113
  33. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index8.js +51 -0
  34. package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index9.js +117 -0
  35. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/index.js +14 -14
  36. package/dist/libs/tesouro-embedded-components-react/shared/ui/dist/lib/StatePanel/NoAccessState.js +10 -2
  37. package/dist/packages/shared-ui-shadcn/dist/index.js +2393 -2373
  38. package/package.json +1 -1
@@ -1,81 +1,82 @@
1
- import { Button as e, DataTable as t, FilterBar as n, FilterMenuButton as r, FilterTag as i, MultiSelectFilter as a, Popover as o, PopoverContent as s, PopoverTrigger as c, RadioGroup as l, RadioGroupItem as u, SearchInput as d } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { EmptyState as f } from "../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
3
- import { ErrorState as p } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
1
+ import { Button as e, DataTable as t, DataTableSortableHeader as n, FilterMenuButton as r, FilterTag as i, MultiSelectFilter as a, Popover as o, PopoverContent as s, PopoverTrigger as c, RadioGroup as l, RadioGroupItem as u, SearchInput as d, TableToolbar as f } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { EmptyState as p } from "../../../shared/ui/dist/lib/EmptyState/EmptyState.js";
3
+ import { ErrorState as m } from "../../../shared/ui/dist/lib/ErrorState/ErrorState.js";
4
+ import { NoAccessState as h } from "../../../shared/ui/dist/lib/StatePanel/NoAccessState.js";
4
5
  import "../../../shared/ui/dist/index.js";
5
- import { PRODUCTS_SCREEN_LABELS_EN as m } from "./index2.js";
6
- import { ProductTypeBadge as h } from "./index3.js";
7
- import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
8
- import { ArrowDownIcon as y, ArrowUpDownIcon as b, ArrowUpIcon as x, ListFilter as S } from "lucide-react";
6
+ import { PRODUCTS_SCREEN_LABELS_EN as g } from "./index2.js";
7
+ import { ProductTypeBadge as _ } from "./index3.js";
8
+ import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
9
+ import { ListFilter as x } from "lucide-react";
9
10
  // ../../libs/tesouro-embedded-components-react/products-widget/ui/dist/index4.js
10
- var C = [
11
+ var S = [
11
12
  10,
12
13
  25,
13
14
  50,
14
15
  100
15
- ], w = "ttw:flex ttw:w-full ttw:cursor-pointer ttw:items-center ttw:gap-2 ttw:rounded-md ttw:px-2 ttw:py-1.5 ttw:text-xs ttw:font-medium ttw:transition-colors ttw:hover:bg-accent";
16
- function T({ labels: e, filters: t }) {
17
- return /* @__PURE__ */ _(n, {
18
- className: "ttw:flex-wrap ttw:px-4",
19
- searchSlot: /* @__PURE__ */ _(d, {
16
+ ], C = "ttw:flex ttw:w-full ttw:cursor-pointer ttw:items-center ttw:gap-2 ttw:rounded-md ttw:px-2 ttw:py-1.5 ttw:text-xs ttw:font-medium ttw:transition-colors ttw:hover:bg-accent";
17
+ function w({ labels: e, filters: t, action: n }) {
18
+ return /* @__PURE__ */ y(f, {
19
+ className: "ttw:px-4",
20
+ search: /* @__PURE__ */ y(d, {
20
21
  value: t.searchValue,
21
22
  onChange: (e) => t.onSearchChange(e.target.value),
22
23
  placeholder: e.searchPlaceholder,
23
24
  "aria-label": e.searchLabel,
24
25
  className: "ttw:min-w-64"
25
26
  }),
26
- menuSlot: /* @__PURE__ */ v(o, {
27
+ filterButton: /* @__PURE__ */ b(o, {
27
28
  open: t.isPopoverOpen,
28
29
  onOpenChange: (e) => {
29
30
  e || t.onPopoverClose();
30
31
  },
31
- children: [/* @__PURE__ */ _(c, {
32
+ children: [/* @__PURE__ */ y(c, {
32
33
  asChild: !0,
33
- children: /* @__PURE__ */ _(r, {
34
+ children: /* @__PURE__ */ y(r, {
34
35
  activeCount: t.activeFilterCount,
35
36
  onClick: (e) => {
36
37
  t.isPanelOpen && e.preventDefault(), t.onMenuToggle();
37
38
  },
38
39
  labels: { filters: e.filtersButton }
39
40
  })
40
- }), /* @__PURE__ */ v(s, {
41
+ }), /* @__PURE__ */ b(s, {
41
42
  align: "start",
42
43
  className: "ttw:w-56 ttw:p-0",
43
44
  children: [
44
- t.isMenuOpen && /* @__PURE__ */ v("div", {
45
+ t.isMenuOpen && /* @__PURE__ */ b("div", {
45
46
  className: "ttw:p-1",
46
- children: [/* @__PURE__ */ v("button", {
47
+ children: [/* @__PURE__ */ b("button", {
47
48
  type: "button",
48
- className: w,
49
+ className: C,
49
50
  onClick: t.onTypeFieldSelect,
50
- children: [/* @__PURE__ */ _(S, {
51
+ children: [/* @__PURE__ */ y(x, {
51
52
  className: "ttw:size-4 ttw:shrink-0 ttw:text-muted-foreground",
52
53
  "aria-hidden": !0
53
54
  }), e.filterFieldType]
54
- }), /* @__PURE__ */ v("button", {
55
+ }), /* @__PURE__ */ b("button", {
55
56
  type: "button",
56
- className: w,
57
+ className: C,
57
58
  onClick: t.onUnitFieldSelect,
58
- children: [/* @__PURE__ */ _(S, {
59
+ children: [/* @__PURE__ */ y(x, {
59
60
  className: "ttw:size-4 ttw:shrink-0 ttw:text-muted-foreground",
60
61
  "aria-hidden": !0
61
62
  }), e.filterFieldUnit]
62
63
  })]
63
64
  }),
64
- t.isTypePanelOpen && /* @__PURE__ */ _(a, {
65
+ t.isTypePanelOpen && /* @__PURE__ */ y(a, {
65
66
  options: [...t.typeOptions],
66
67
  selectedValues: [...t.selectedTypes],
67
68
  onSelectionChange: t.onTypeChange
68
69
  }),
69
- t.isUnitPanelOpen && /* @__PURE__ */ _("div", {
70
+ t.isUnitPanelOpen && /* @__PURE__ */ y("div", {
70
71
  className: "ttw:max-h-64 ttw:overflow-auto ttw:p-3",
71
- children: /* @__PURE__ */ _(l, {
72
+ children: /* @__PURE__ */ y(l, {
72
73
  value: t.selectedUnit,
73
74
  onValueChange: t.onUnitChange,
74
75
  "aria-label": e.filterFieldUnit,
75
76
  className: "ttw:flex ttw:flex-col ttw:gap-1",
76
- children: t.unitOptions.map((e) => /* @__PURE__ */ v("label", {
77
+ children: t.unitOptions.map((e) => /* @__PURE__ */ b("label", {
77
78
  className: "ttw:flex ttw:cursor-pointer ttw:items-center ttw:gap-2",
78
- children: [/* @__PURE__ */ _(u, { value: e.value }), /* @__PURE__ */ _("span", {
79
+ children: [/* @__PURE__ */ y(u, { value: e.value }), /* @__PURE__ */ y("span", {
79
80
  className: "ttw:text-xs ttw:font-medium",
80
81
  children: e.label
81
82
  })]
@@ -85,12 +86,13 @@ function T({ labels: e, filters: t }) {
85
86
  ]
86
87
  })]
87
88
  }),
88
- activeChipsSlot: /* @__PURE__ */ v(g, { children: [t.chips.map((n) => /* @__PURE__ */ _(i, {
89
+ action: n,
90
+ tags: /* @__PURE__ */ b(v, { children: [t.chips.map((n) => /* @__PURE__ */ y(i, {
89
91
  label: n.label,
90
92
  variant: "default",
91
93
  labels: { remove: e.filterChipRemove },
92
94
  onDismiss: () => t.onRemoveChip(n.key)
93
- }, n.key)), t.chips.length > 0 && /* @__PURE__ */ _("button", {
95
+ }, n.key)), t.chips.length > 0 && /* @__PURE__ */ y("button", {
94
96
  type: "button",
95
97
  className: "ttw:cursor-pointer ttw:whitespace-nowrap ttw:text-xs ttw:text-muted-foreground ttw:transition-colors ttw:hover:text-foreground",
96
98
  onClick: t.onClearAll,
@@ -98,32 +100,24 @@ function T({ labels: e, filters: t }) {
98
100
  })] })
99
101
  });
100
102
  }
101
- function E({ products: n, isLoading: r, isError: i, sorting: a, onSortingChange: o, pageSize: s, onPageSizeChange: c, pageSizeOptions: l = C, hasNextPage: u, hasPrevPage: d, onNextPage: S, onPrevPage: w, filters: E, isFiltering: D, onCreateClick: O, onManageUnitsClick: k, onRowClick: A, onRetry: j, canCreate: M = !0, canManageUnits: N = !0, isAccessRestricted: P, labels: F, testIds: I }) {
102
- let L = {
103
- ...m,
104
- ...F,
103
+ function T({ products: r, isLoading: i, isError: a, sorting: o, onSortingChange: s, pageSize: c, onPageSizeChange: l, pageSizeOptions: u = S, hasNextPage: d, hasPrevPage: f, onNextPage: x, onPrevPage: C, filters: T, isFiltering: E, onCreateClick: D, onManageUnitsClick: O, onRowClick: k, onRetry: A, canCreate: j = !0, canManageUnits: M = !0, isAccessRestricted: N, labels: P, testIds: F }) {
104
+ let I = {
105
+ ...g,
106
+ ...P,
105
107
  typeBadge: {
106
- ...m.typeBadge,
107
- ...F?.typeBadge
108
+ ...g.typeBadge,
109
+ ...P?.typeBadge
108
110
  }
109
- }, R = [
111
+ }, L = !E && j, R = !i && r.length === 0 && L, z = [
110
112
  {
111
113
  accessorKey: "name",
112
114
  enableSorting: !0,
113
- header: ({ column: t }) => {
114
- let n = t.getIsSorted();
115
- return /* @__PURE__ */ v("div", {
116
- className: "ttw:flex ttw:items-center ttw:gap-2 ttw:text-inherit",
117
- children: [L.columnName, /* @__PURE__ */ _(e, {
118
- variant: "ghost",
119
- size: "icon-sm",
120
- onClick: () => t.toggleSorting(n === "asc"),
121
- children: _(n === "asc" ? x : n === "desc" ? y : b, { className: "ttw:size-4" })
122
- })]
123
- });
124
- },
115
+ header: ({ column: e }) => /* @__PURE__ */ y(n, {
116
+ column: e,
117
+ title: I.columnName
118
+ }),
125
119
  size: 320,
126
- cell: ({ row: e }) => /* @__PURE__ */ _("span", {
120
+ cell: ({ row: e }) => /* @__PURE__ */ y("span", {
127
121
  className: "ttw:block ttw:w-74 ttw:truncate",
128
122
  children: e.original.name
129
123
  })
@@ -131,22 +125,19 @@ function E({ products: n, isLoading: r, isError: i, sorting: a, onSortingChange:
131
125
  {
132
126
  accessorKey: "type",
133
127
  size: 112,
134
- header: L.columnType,
135
- cell: ({ row: e }) => /* @__PURE__ */ _("div", {
136
- className: "ttw:w-22",
137
- children: e.original.type && /* @__PURE__ */ _(h, {
138
- type: e.original.type,
139
- labels: L.typeBadge
140
- })
141
- })
128
+ header: I.columnType,
129
+ cell: ({ row: e }) => e.original.type ? /* @__PURE__ */ y(_, {
130
+ type: e.original.type,
131
+ labels: I.typeBadge
132
+ }) : null
142
133
  },
143
134
  {
144
135
  accessorKey: "description",
145
- header: L.columnDescription,
136
+ header: I.columnDescription,
146
137
  size: 1e4,
147
- cell: ({ row: e }) => /* @__PURE__ */ _("div", {
138
+ cell: ({ row: e }) => /* @__PURE__ */ y("div", {
148
139
  className: "ttw:relative ttw:h-5 ttw:min-w-40",
149
- children: /* @__PURE__ */ _("span", {
140
+ children: /* @__PURE__ */ y("span", {
150
141
  className: "ttw:absolute ttw:inset-0 ttw:truncate",
151
142
  children: e.original.description
152
143
  })
@@ -155,70 +146,64 @@ function E({ products: n, isLoading: r, isError: i, sorting: a, onSortingChange:
155
146
  {
156
147
  accessorKey: "priceLabel",
157
148
  size: 180,
158
- header: () => /* @__PURE__ */ _("div", {
149
+ header: () => /* @__PURE__ */ y("div", {
159
150
  className: "ttw:text-right",
160
- children: L.columnPrice
151
+ children: I.columnPrice
161
152
  }),
162
- cell: ({ row: e }) => /* @__PURE__ */ v("div", {
163
- className: "ttw:flex ttw:w-39 ttw:justify-end ttw:items-center ttw:gap-1",
164
- children: [/* @__PURE__ */ _("span", { children: e.original.priceLabel }), e.original.unitLabel && /* @__PURE__ */ _("span", {
165
- className: "ttw:text-muted-foreground ttw:text-sm",
153
+ cell: ({ row: e }) => /* @__PURE__ */ b("div", {
154
+ className: "ttw:flex ttw:w-39 ttw:items-center ttw:justify-end ttw:gap-1 ttw:tabular-nums",
155
+ children: [/* @__PURE__ */ y("span", { children: e.original.priceLabel }), e.original.unitLabel && /* @__PURE__ */ y("span", {
156
+ className: "ttw:text-muted-foreground",
166
157
  children: e.original.unitLabel
167
158
  })]
168
159
  })
169
160
  }
170
161
  ];
171
- return /* @__PURE__ */ _("div", {
172
- className: "ttw:flex ttw:flex-col ttw:gap-4",
173
- children: P ? /* @__PURE__ */ _(p, {
174
- testId: I?.accessRestricted,
175
- title: L.accessRestrictedTitle,
176
- description: L.accessRestrictedDescription
177
- }) : i ? /* @__PURE__ */ _(p, {
178
- title: L.errorTitle,
179
- description: L.errorDescription,
180
- retryLabel: j ? L.errorRetry : void 0,
181
- onRetry: j
182
- }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("div", {
183
- className: "ttw:flex ttw:flex-wrap ttw:items-center ttw:justify-end ttw:gap-2",
184
- children: [/* @__PURE__ */ _(e, {
185
- variant: "ghost",
186
- className: "ttw:text-primary ttw:hover:text-primary",
187
- onClick: k,
188
- disabled: !N,
189
- children: L.manageUnitsButton
190
- }), /* @__PURE__ */ _(e, {
162
+ return N ? /* @__PURE__ */ y(h, {
163
+ testId: F?.accessRestricted,
164
+ title: I.accessRestrictedTitle,
165
+ description: I.accessRestrictedDescription
166
+ }) : a ? /* @__PURE__ */ y(m, {
167
+ title: I.errorTitle,
168
+ description: I.errorDescription,
169
+ retryLabel: A ? I.errorRetry : void 0,
170
+ onRetry: A
171
+ }) : /* @__PURE__ */ y(t, {
172
+ columns: z,
173
+ data: r,
174
+ isLoading: i,
175
+ sorting: o,
176
+ onSortingChange: s,
177
+ pageSize: c,
178
+ onPageSizeChange: l,
179
+ pageSizeOptions: u,
180
+ hasNextPage: d,
181
+ hasPrevPage: f,
182
+ onNextPage: x,
183
+ onPrevPage: C,
184
+ onRowClick: k,
185
+ rowAriaLabel: (e) => I.openRow(e.name),
186
+ filterComponent: /* @__PURE__ */ y(w, {
187
+ labels: I,
188
+ filters: T,
189
+ action: /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y(e, {
190
+ variant: "outline",
191
191
  onClick: O,
192
192
  disabled: !M,
193
- children: L.createButton
194
- })]
195
- }), /* @__PURE__ */ _(t, {
196
- columns: R,
197
- data: n,
198
- isLoading: r,
199
- sorting: a,
200
- onSortingChange: o,
201
- pageSize: s,
202
- onPageSizeChange: c,
203
- pageSizeOptions: l,
204
- hasNextPage: u,
205
- hasPrevPage: d,
206
- onNextPage: S,
207
- onPrevPage: w,
208
- onRowClick: A,
209
- rowAriaLabel: (e) => L.openRow(e.name),
210
- filterComponent: /* @__PURE__ */ _(T, {
211
- labels: L,
212
- filters: E
213
- }),
214
- children: /* @__PURE__ */ _(f, {
215
- testId: I?.empty,
216
- title: D ? L.filterEmptyTitle : L.emptyTitle,
217
- description: D ? L.filterEmptyDescription : L.emptyDescription,
218
- actionLabel: D || !M ? void 0 : L.emptyAction,
219
- onAction: D || !M ? void 0 : O
220
- })
221
- })] })
193
+ children: I.manageUnitsButton
194
+ }), !R && /* @__PURE__ */ y(e, {
195
+ onClick: D,
196
+ disabled: !j,
197
+ children: I.createButton
198
+ })] })
199
+ }),
200
+ children: /* @__PURE__ */ y(p, {
201
+ testId: F?.empty,
202
+ title: E ? I.filterEmptyTitle : I.emptyTitle,
203
+ description: E ? I.filterEmptyDescription : I.emptyDescription,
204
+ actionLabel: L ? I.emptyAction : void 0,
205
+ onAction: L ? D : void 0
206
+ })
222
207
  });
223
208
  }
224
- export { E as ProductsScreen, E as default };
209
+ export { T as ProductsScreen, T as default };
@@ -1,56 +1,34 @@
1
- import { Button as e, Typography as t } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
- import { mergeProductFormSheetLabels as n } from "../../../shared/product-catalog/ui/dist/index2.js";
3
- import { ProductFormFields as r } from "../../../shared/product-catalog/ui/dist/index3.js";
1
+ import { Heading as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
2
+ import { ProductFormFields as t } from "../../../shared/product-catalog/ui/dist/index3.js";
4
3
  import "../../../shared/product-catalog/ui/dist/index.js";
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";
4
+ import { useEffect as n, useRef as r } from "react";
5
+ import { jsx as i, jsxs as a } from "react/jsx-runtime";
7
6
  // ../../libs/tesouro-embedded-components-react/products-widget/ui/dist/index5.js
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,
14
- className: "ttw:flex ttw:flex-col ttw:gap-4 ttw:rounded-lg ttw:border ttw:border-border ttw:bg-muted ttw:p-4",
7
+ function o({ form: o, formId: s }) {
8
+ let c = r(null);
9
+ return n(() => {
10
+ c.current?.querySelector("[data-autofocus]")?.focus();
11
+ }, []), /* @__PURE__ */ a("form", {
12
+ ref: c,
13
+ id: s,
14
+ noValidate: !0,
15
+ className: "ttw:flex ttw:flex-col ttw:gap-4",
15
16
  onSubmit: (e) => {
16
- e.preventDefault(), e.stopPropagation(), l.onSubmit();
17
+ e.preventDefault(), e.stopPropagation(), o.onSubmit();
17
18
  },
18
- children: [
19
- /* @__PURE__ */ s("div", {
20
- className: "ttw:flex ttw:flex-col ttw:gap-1.5 ttw:border-b ttw:border-border ttw:pt-6 ttw:pb-7",
21
- children: /* @__PURE__ */ s(t, {
22
- variant: "body1",
23
- className: "ttw:font-medium",
24
- children: l.heading
25
- })
26
- }),
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
35
- }),
36
- /* @__PURE__ */ c("div", {
37
- className: "ttw:flex ttw:justify-end ttw:gap-4 ttw:pt-6",
38
- children: [/* @__PURE__ */ s(e, {
39
- type: "button",
40
- variant: "outline",
41
- className: "ttw:w-fit ttw:border-border",
42
- disabled: l.inProgress,
43
- onClick: l.onCancel,
44
- children: u.cancelButton
45
- }), /* @__PURE__ */ s(e, {
46
- type: "submit",
47
- className: "ttw:w-fit",
48
- disabled: l.inProgress || l.submitDisabled,
49
- loading: l.inProgress,
50
- children: u.saveButton
51
- })]
52
- })
53
- ]
19
+ children: [/* @__PURE__ */ i(e, {
20
+ variant: "subsection",
21
+ children: o.heading
22
+ }), /* @__PURE__ */ i(t, {
23
+ idPrefix: s,
24
+ values: o.values,
25
+ errors: o.errors,
26
+ unitOptions: o.unitOptions,
27
+ pricePrefix: o.pricePrefix,
28
+ onChange: o.onChange,
29
+ onAddUnit: o.onAddUnit,
30
+ labels: o.labels
31
+ })]
54
32
  });
55
33
  }
56
- export { l as ProductEditForm, l as default };
34
+ export { o as ProductEditForm, o as default };