@burdenoff/microfe-movethewheels 2026.923.1 → 2026.924.2

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.
@@ -3,128 +3,121 @@ import { RefreshCw as t } from "../node_modules/lucide-react/dist/esm/icons/refr
3
3
  import { UserPlus as n } from "../node_modules/lucide-react/dist/esm/icons/user-plus.js";
4
4
  import { Button as r, Dialog as i, DialogContent as a, DialogDescription as o, DialogFooter as s, DialogHeader as c, DialogTitle as l, Input as u, Label as d, Select as f, SelectContent as p, SelectItem as m, SelectTrigger as h, SelectValue as g } from "./ui.js";
5
5
  import { FormError as _ } from "./FormError.js";
6
- import { useState as v } from "react";
7
- import { jsx as y, jsxs as b } from "react/jsx-runtime";
6
+ import { EntityCombobox as v } from "./EntityCombobox.js";
7
+ import { useState as y } from "react";
8
+ import { Fragment as b, jsx as x, jsxs as S } from "react/jsx-runtime";
8
9
  //#region src/movethewheels/components/CustomerPicker.tsx
9
- var x = {
10
+ var C = {
10
11
  name: "",
11
12
  type: "b2c",
12
13
  email: "",
13
14
  phone: "",
14
15
  company: ""
15
16
  };
16
- function S(e, t) {
17
- return !t || e.some((e) => e.id === t.id) ? e : [t, ...e];
18
- }
19
- function C({ customers: C, value: w, onValueChange: T, onCreated: E, createCustomer: D, isLoading: O, error: k, onRetry: A, onOpenCustomers: j, selectedCustomer: M, searchQuery: N = "", onSearchQueryChange: P, disabled: F = !1 }) {
20
- let [I, L] = v(!1), [R, z] = v(x), [B, V] = v(!1), [H, U] = v(null), W = S(C, M), G = () => {
21
- U(null), z(x), L(!0);
22
- }, K = () => {
17
+ function w({ customers: w, value: T, onValueChange: E, onCreated: D, createCustomer: O, isLoading: k, error: A, onRetry: j, onOpenCustomers: M, selectedCustomer: N, onSearchQueryChange: P, disabled: F = !1 }) {
18
+ let [I, L] = y(!1), [R, z] = y(C), [B, V] = y(!1), [H, U] = y(null), W = () => {
19
+ U(null), z(C), L(!0);
20
+ }, G = () => {
23
21
  B || L(!1);
24
22
  };
25
- return /* @__PURE__ */ b("div", {
23
+ return /* @__PURE__ */ S("div", {
26
24
  className: "space-y-2",
27
25
  children: [
28
- /* @__PURE__ */ b("div", {
26
+ /* @__PURE__ */ S("div", {
29
27
  className: "flex items-center justify-between gap-2",
30
- children: [/* @__PURE__ */ y(d, {
28
+ children: [/* @__PURE__ */ x(d, {
31
29
  htmlFor: "customer",
32
30
  children: "Customer"
33
- }), /* @__PURE__ */ b(r, {
31
+ }), /* @__PURE__ */ S(r, {
34
32
  type: "button",
35
33
  variant: "ghost",
36
34
  size: "sm",
37
- onClick: G,
38
- disabled: F || O,
39
- children: [/* @__PURE__ */ y(e, {
35
+ onClick: W,
36
+ disabled: F || k,
37
+ children: [/* @__PURE__ */ x(e, {
40
38
  size: 14,
41
39
  className: "mr-1"
42
40
  }), "Add customer"]
43
41
  })]
44
42
  }),
45
- /* @__PURE__ */ b("div", {
43
+ /* @__PURE__ */ S("div", {
46
44
  className: "flex flex-col gap-2 sm:flex-row sm:items-start",
47
- children: [
48
- P && /* @__PURE__ */ y(u, {
49
- value: N,
50
- onChange: (e) => P(e.target.value),
51
- placeholder: "Search customers",
52
- "aria-label": "Search customers",
53
- disabled: F,
54
- className: "sm:max-w-56"
55
- }),
56
- /* @__PURE__ */ b(f, {
57
- value: w,
58
- onValueChange: T,
59
- disabled: F || O || !!k,
60
- children: [/* @__PURE__ */ y(h, {
61
- id: "customer",
62
- className: "flex-1",
63
- children: /* @__PURE__ */ y(g, { placeholder: O ? "Loading customers..." : "Select customer" })
64
- }), /* @__PURE__ */ y(p, { children: W.map((e) => /* @__PURE__ */ b(m, {
65
- value: e.id,
66
- children: [
67
- e.name,
68
- " ",
69
- e.email ? `(${e.email})` : ""
70
- ]
71
- }, e.id)) })]
72
- }),
73
- k && /* @__PURE__ */ b(r, {
74
- type: "button",
75
- variant: "outline",
76
- size: "sm",
77
- onClick: A,
78
- children: [/* @__PURE__ */ y(t, {
79
- size: 14,
80
- className: "mr-1"
81
- }), "Retry"]
82
- })
83
- ]
45
+ children: [/* @__PURE__ */ x(v, {
46
+ id: "customer",
47
+ value: T,
48
+ onChange: E,
49
+ options: w,
50
+ loading: k,
51
+ getId: (e) => e.id,
52
+ getLabel: (e) => `${e.name}${e.email ? ` (${e.email})` : ""}`,
53
+ renderOption: (e) => /* @__PURE__ */ S(b, { children: [
54
+ e.name,
55
+ " ",
56
+ e.email ? `(${e.email})` : ""
57
+ ] }),
58
+ selectedOption: N,
59
+ required: !0,
60
+ placeholder: k ? "Loading customers..." : "Select customer",
61
+ searchPlaceholder: "Search customers",
62
+ emptyText: "No customers found.",
63
+ disabled: F || !!A,
64
+ error: A ? "Customers could not be loaded" : void 0,
65
+ onSearchChange: P,
66
+ className: "flex-1"
67
+ }), A && /* @__PURE__ */ S(r, {
68
+ type: "button",
69
+ variant: "outline",
70
+ size: "sm",
71
+ onClick: j,
72
+ children: [/* @__PURE__ */ x(t, {
73
+ size: 14,
74
+ className: "mr-1"
75
+ }), "Retry"]
76
+ })]
84
77
  }),
85
- k ? /* @__PURE__ */ b("div", {
78
+ A ? /* @__PURE__ */ S("div", {
86
79
  className: "flex flex-wrap items-center gap-2",
87
- children: [/* @__PURE__ */ y("p", {
80
+ children: [/* @__PURE__ */ x("p", {
88
81
  role: "alert",
89
82
  className: "text-sm text-status-error-text",
90
83
  children: "Customers could not be loaded. Retry or add a customer to continue."
91
- }), j && /* @__PURE__ */ y(r, {
84
+ }), M && /* @__PURE__ */ x(r, {
92
85
  type: "button",
93
86
  variant: "outline",
94
87
  size: "sm",
95
- onClick: j,
88
+ onClick: M,
96
89
  children: "Open customer page"
97
90
  })]
98
- }) : !O && W.length === 0 ? /* @__PURE__ */ b("div", {
91
+ }) : !k && w.length === 0 ? /* @__PURE__ */ S("div", {
99
92
  className: "rounded-lg border border-border-seam bg-bg-sunken/40 p-3",
100
- children: [/* @__PURE__ */ b("div", {
93
+ children: [/* @__PURE__ */ S("div", {
101
94
  className: "flex items-start gap-2",
102
- children: [/* @__PURE__ */ y(n, {
95
+ children: [/* @__PURE__ */ x(n, {
103
96
  size: 16,
104
97
  className: "mt-0.5 shrink-0 text-text-secondary"
105
- }), /* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
98
+ }), /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ x("p", {
106
99
  className: "text-sm font-medium text-text-primary",
107
100
  children: "Add a customer to continue"
108
- }), /* @__PURE__ */ y("p", {
101
+ }), /* @__PURE__ */ x("p", {
109
102
  className: "text-sm text-text-secondary",
110
103
  children: "The customer will be selected automatically and your order details will stay here."
111
104
  })] })]
112
- }), /* @__PURE__ */ b(r, {
105
+ }), /* @__PURE__ */ S(r, {
113
106
  type: "button",
114
107
  size: "sm",
115
108
  className: "mt-3",
116
- onClick: G,
109
+ onClick: W,
117
110
  disabled: F,
118
- children: [/* @__PURE__ */ y(e, {
111
+ children: [/* @__PURE__ */ x(e, {
119
112
  size: 14,
120
113
  className: "mr-1.5"
121
114
  }), "Create customer"]
122
115
  })]
123
116
  }) : null,
124
- /* @__PURE__ */ y(i, {
117
+ /* @__PURE__ */ x(i, {
125
118
  open: I,
126
- onOpenChange: (e) => e ? L(!0) : K(),
127
- children: /* @__PURE__ */ b(a, { children: [/* @__PURE__ */ b(c, { children: [/* @__PURE__ */ y(l, { children: "Create customer" }), /* @__PURE__ */ y(o, { children: "Add the customer without leaving this order. They will be selected automatically." })] }), /* @__PURE__ */ b("form", {
119
+ onOpenChange: (e) => e ? L(!0) : G(),
120
+ children: /* @__PURE__ */ S(a, { children: [/* @__PURE__ */ S(c, { children: [/* @__PURE__ */ x(l, { children: "Create customer" }), /* @__PURE__ */ x(o, { children: "Add the customer without leaving this order. They will be selected automatically." })] }), /* @__PURE__ */ S("form", {
128
121
  onSubmit: async (e) => {
129
122
  e.preventDefault(), e.stopPropagation();
130
123
  let t = R.name.trim();
@@ -134,13 +127,13 @@ function C({ customers: C, value: w, onValueChange: T, onCreated: E, createCusto
134
127
  }
135
128
  V(!0), U(null);
136
129
  try {
137
- E(await D({
130
+ D(await O({
138
131
  name: t,
139
132
  type: R.type,
140
133
  email: R.email.trim() || void 0,
141
134
  phone: R.phone.trim() || void 0,
142
135
  company: R.company.trim() || void 0
143
- })), L(!1), z(x);
136
+ })), L(!1), z(C);
144
137
  } catch (e) {
145
138
  U(e instanceof Error ? e.message : "Could not create the customer. Please try again.");
146
139
  } finally {
@@ -149,13 +142,13 @@ function C({ customers: C, value: w, onValueChange: T, onCreated: E, createCusto
149
142
  },
150
143
  className: "space-y-4",
151
144
  children: [
152
- /* @__PURE__ */ y(_, { message: H }),
153
- /* @__PURE__ */ b("div", {
145
+ /* @__PURE__ */ x(_, { message: H }),
146
+ /* @__PURE__ */ S("div", {
154
147
  className: "space-y-2",
155
- children: [/* @__PURE__ */ y(d, {
148
+ children: [/* @__PURE__ */ x(d, {
156
149
  htmlFor: "quick-customer-name",
157
150
  children: "Name"
158
- }), /* @__PURE__ */ y(u, {
151
+ }), /* @__PURE__ */ x(u, {
159
152
  id: "quick-customer-name",
160
153
  value: R.name,
161
154
  onChange: (e) => z((t) => ({
@@ -167,37 +160,37 @@ function C({ customers: C, value: w, onValueChange: T, onCreated: E, createCusto
167
160
  required: !0
168
161
  })]
169
162
  }),
170
- /* @__PURE__ */ b("div", {
163
+ /* @__PURE__ */ S("div", {
171
164
  className: "space-y-2",
172
- children: [/* @__PURE__ */ y(d, {
165
+ children: [/* @__PURE__ */ x(d, {
173
166
  htmlFor: "quick-customer-type",
174
167
  children: "Customer type"
175
- }), /* @__PURE__ */ b(f, {
168
+ }), /* @__PURE__ */ S(f, {
176
169
  value: R.type,
177
170
  onValueChange: (e) => z((t) => ({
178
171
  ...t,
179
172
  type: e
180
173
  })),
181
- children: [/* @__PURE__ */ y(h, {
174
+ children: [/* @__PURE__ */ x(h, {
182
175
  id: "quick-customer-type",
183
- children: /* @__PURE__ */ y(g, {})
184
- }), /* @__PURE__ */ b(p, { children: [/* @__PURE__ */ y(m, {
176
+ children: /* @__PURE__ */ x(g, {})
177
+ }), /* @__PURE__ */ S(p, { children: [/* @__PURE__ */ x(m, {
185
178
  value: "b2c",
186
179
  children: "B2C (Individual)"
187
- }), /* @__PURE__ */ y(m, {
180
+ }), /* @__PURE__ */ x(m, {
188
181
  value: "b2b",
189
182
  children: "B2B (Business)"
190
183
  })] })]
191
184
  })]
192
185
  }),
193
- /* @__PURE__ */ b("div", {
186
+ /* @__PURE__ */ S("div", {
194
187
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
195
- children: [/* @__PURE__ */ b("div", {
188
+ children: [/* @__PURE__ */ S("div", {
196
189
  className: "space-y-2",
197
- children: [/* @__PURE__ */ y(d, {
190
+ children: [/* @__PURE__ */ x(d, {
198
191
  htmlFor: "quick-customer-email",
199
192
  children: "Email"
200
- }), /* @__PURE__ */ y(u, {
193
+ }), /* @__PURE__ */ x(u, {
201
194
  id: "quick-customer-email",
202
195
  type: "email",
203
196
  value: R.email,
@@ -207,12 +200,12 @@ function C({ customers: C, value: w, onValueChange: T, onCreated: E, createCusto
207
200
  })),
208
201
  placeholder: "customer@example.com"
209
202
  })]
210
- }), /* @__PURE__ */ b("div", {
203
+ }), /* @__PURE__ */ S("div", {
211
204
  className: "space-y-2",
212
- children: [/* @__PURE__ */ y(d, {
205
+ children: [/* @__PURE__ */ x(d, {
213
206
  htmlFor: "quick-customer-phone",
214
207
  children: "Phone"
215
- }), /* @__PURE__ */ y(u, {
208
+ }), /* @__PURE__ */ x(u, {
216
209
  id: "quick-customer-phone",
217
210
  value: R.phone,
218
211
  onChange: (e) => z((t) => ({
@@ -223,12 +216,12 @@ function C({ customers: C, value: w, onValueChange: T, onCreated: E, createCusto
223
216
  })]
224
217
  })]
225
218
  }),
226
- /* @__PURE__ */ b("div", {
219
+ /* @__PURE__ */ S("div", {
227
220
  className: "space-y-2",
228
- children: [/* @__PURE__ */ y(d, {
221
+ children: [/* @__PURE__ */ x(d, {
229
222
  htmlFor: "quick-customer-company",
230
223
  children: "Company"
231
- }), /* @__PURE__ */ y(u, {
224
+ }), /* @__PURE__ */ x(u, {
232
225
  id: "quick-customer-company",
233
226
  value: R.company,
234
227
  onChange: (e) => z((t) => ({
@@ -238,27 +231,27 @@ function C({ customers: C, value: w, onValueChange: T, onCreated: E, createCusto
238
231
  placeholder: "Company name (optional)"
239
232
  })]
240
233
  }),
241
- /* @__PURE__ */ b(s, { children: [
242
- j && /* @__PURE__ */ y(r, {
234
+ /* @__PURE__ */ S(s, { children: [
235
+ M && /* @__PURE__ */ x(r, {
243
236
  type: "button",
244
237
  variant: "outline",
245
238
  onClick: () => {
246
- K(), j();
239
+ G(), M();
247
240
  },
248
241
  disabled: B,
249
242
  children: "Use customer page"
250
243
  }),
251
- /* @__PURE__ */ y(r, {
244
+ /* @__PURE__ */ x(r, {
252
245
  type: "button",
253
246
  variant: "outline",
254
- onClick: K,
247
+ onClick: G,
255
248
  disabled: B,
256
249
  children: "Cancel"
257
250
  }),
258
- /* @__PURE__ */ b(r, {
251
+ /* @__PURE__ */ S(r, {
259
252
  type: "submit",
260
253
  disabled: B,
261
- children: [/* @__PURE__ */ y(e, { size: 16 }), B ? "Creating..." : "Create and select"]
254
+ children: [/* @__PURE__ */ x(e, { size: 16 }), B ? "Creating..." : "Create and select"]
262
255
  })
263
256
  ] })
264
257
  ]
@@ -268,4 +261,4 @@ function C({ customers: C, value: w, onValueChange: T, onCreated: E, createCusto
268
261
  });
269
262
  }
270
263
  //#endregion
271
- export { C as CustomerPicker };
264
+ export { w as CustomerPicker };
@@ -0,0 +1,105 @@
1
+ import { Check as e } from "../node_modules/lucide-react/dist/esm/icons/check.js";
2
+ import { ChevronsUpDown as t } from "../node_modules/lucide-react/dist/esm/icons/chevrons-up-down.js";
3
+ import { cn as n } from "../utils/cn.js";
4
+ import { Command as r, CommandEmpty as i, CommandInput as a, CommandItem as o, CommandList as s, Popover as c, PopoverContent as l, PopoverTrigger as u } from "./ui.js";
5
+ import { useDebouncedValue as d } from "../hooks/useDebouncedValue.js";
6
+ import { useEffect as f, useState as p } from "react";
7
+ import { jsx as m, jsxs as h } from "react/jsx-runtime";
8
+ //#region src/movethewheels/components/EntityCombobox.tsx
9
+ function g({ value: g, onChange: _, options: v, loading: y = !1, getId: b, renderOption: x, getLabel: S, selectedOption: C = null, selectedLoading: w = !1, required: T = !1, placeholder: E = "Select…", searchPlaceholder: D = "Search…", emptyText: O = "No results found.", noneLabel: k = "None", disabled: A = !1, id: j, error: M, className: N, onSearchChange: P, hasMore: F = !1, totalCount: I }) {
10
+ let [L, R] = p(!1), [z, B] = p(""), V = d(z.trim(), 200);
11
+ f(() => {
12
+ P && P(V);
13
+ }, [V]);
14
+ let H = C ? S(C) : g ? w ? "Loading…" : g : E, U = n("w-full flex items-center justify-between gap-2 px-3 py-2", "bg-surface", "border border-default", "rounded-lg", "text-left text-sm text-text-primary", "focus:outline-none focus:ring-2 focus:ring-[var(--color-border-focus)]", "disabled:bg-bg-sunken disabled:cursor-not-allowed", "transition-all duration-200", M && "border-[var(--color-status-error)]", !C && "text-text-tertiary", N), W = F && typeof I == "number" && I > v.length;
15
+ return /* @__PURE__ */ h(c, {
16
+ open: L,
17
+ onOpenChange: (e) => {
18
+ R(e), e || B("");
19
+ },
20
+ children: [/* @__PURE__ */ m(u, {
21
+ asChild: !0,
22
+ children: /* @__PURE__ */ h("button", {
23
+ type: "button",
24
+ id: j,
25
+ role: "combobox",
26
+ "aria-expanded": L,
27
+ "aria-required": T,
28
+ "aria-invalid": M ? !0 : void 0,
29
+ disabled: A,
30
+ className: U,
31
+ children: [/* @__PURE__ */ m("span", {
32
+ className: "truncate",
33
+ children: H
34
+ }), /* @__PURE__ */ m(t, {
35
+ size: 16,
36
+ className: "shrink-0 text-text-tertiary",
37
+ "aria-hidden": "true"
38
+ })]
39
+ })
40
+ }), /* @__PURE__ */ m(l, {
41
+ align: "start",
42
+ className: "w-[var(--radix-popover-trigger-width)] p-0 border border-default bg-surface",
43
+ children: /* @__PURE__ */ h(r, {
44
+ shouldFilter: !1,
45
+ className: "bg-surface text-text-primary",
46
+ children: [P && /* @__PURE__ */ m(a, {
47
+ value: z,
48
+ onValueChange: B,
49
+ placeholder: D,
50
+ className: "text-text-primary placeholder:text-text-tertiary"
51
+ }), /* @__PURE__ */ h(s, { children: [
52
+ /* @__PURE__ */ m(i, {
53
+ className: "text-text-tertiary",
54
+ children: y ? "Searching…" : O
55
+ }),
56
+ !T && /* @__PURE__ */ h(o, {
57
+ value: "__none__",
58
+ onSelect: () => {
59
+ _(""), R(!1);
60
+ },
61
+ className: "text-text-tertiary",
62
+ children: [/* @__PURE__ */ m(e, {
63
+ size: 16,
64
+ className: n("shrink-0", g === "" ? "opacity-100" : "opacity-0"),
65
+ "aria-hidden": "true"
66
+ }), /* @__PURE__ */ m("span", {
67
+ className: "truncate italic",
68
+ children: k
69
+ })]
70
+ }),
71
+ v.map((t) => {
72
+ let r = b(t);
73
+ return /* @__PURE__ */ h(o, {
74
+ value: r,
75
+ onSelect: () => {
76
+ _(r), R(!1);
77
+ },
78
+ className: "text-text-primary",
79
+ children: [/* @__PURE__ */ m(e, {
80
+ size: 16,
81
+ className: n("shrink-0", r === g ? "opacity-100" : "opacity-0"),
82
+ "aria-hidden": "true"
83
+ }), /* @__PURE__ */ m("span", {
84
+ className: "truncate",
85
+ children: x(t)
86
+ })]
87
+ }, r);
88
+ }),
89
+ W && /* @__PURE__ */ h("div", {
90
+ className: "px-2 py-1.5 text-xs text-text-tertiary border-t border-border-seam",
91
+ children: [
92
+ "Showing ",
93
+ v.length,
94
+ " of ",
95
+ I,
96
+ P ? " — keep typing to narrow results." : "."
97
+ ]
98
+ })
99
+ ] })]
100
+ })
101
+ })]
102
+ });
103
+ }
104
+ //#endregion
105
+ export { g as EntityCombobox };
@@ -0,0 +1,124 @@
1
+ import { Trash2 as e } from "../node_modules/lucide-react/dist/esm/icons/trash-2.js";
2
+ import { useProduct as t, useProductStockLevels as n } from "../hooks/useInventory.js";
3
+ import { Button as r, Input as i, Label as a, Separator as o } from "./ui.js";
4
+ import { EntityCombobox as s } from "./EntityCombobox.js";
5
+ import { Fragment as c, jsx as l, jsxs as u } from "react/jsx-runtime";
6
+ //#region src/movethewheels/components/OrderItemRow.tsx
7
+ function d(e, t) {
8
+ return e <= 0 ? "No stock recorded for this item." : t.length === 1 ? `${e.toLocaleString()} available at ${t[0].warehouseName}` : `${e.toLocaleString()} available across ${t.length} warehouses`;
9
+ }
10
+ function f({ item: f, index: p, isFirst: m, products: h, productsLoading: g, onUpdate: _, onRemove: v }) {
11
+ let { product: y, isLoading: b } = t(f.productId || void 0), { levels: x, totalAvailable: S, isLoading: C } = n(f.productId || void 0);
12
+ return /* @__PURE__ */ u("div", { children: [
13
+ !m && /* @__PURE__ */ l(o, { className: "my-4" }),
14
+ /* @__PURE__ */ u("div", {
15
+ className: "mb-3 space-y-2",
16
+ children: [
17
+ /* @__PURE__ */ l(a, {
18
+ htmlFor: `item-product-${f.id}`,
19
+ children: "Catalog item (optional)"
20
+ }),
21
+ /* @__PURE__ */ l(s, {
22
+ id: `item-product-${f.id}`,
23
+ value: f.productId,
24
+ onChange: (e) => {
25
+ if (!e) {
26
+ _(p, "productId", "");
27
+ return;
28
+ }
29
+ let t = h.find((t) => t.id === e);
30
+ t && (_(p, "productId", t.id), _(p, "name", t.name), _(p, "sku", t.sku), _(p, "weight", t.weight), _(p, "value", t.value), _(p, "dimensions", t.dimensions));
31
+ },
32
+ options: h,
33
+ loading: g,
34
+ getId: (e) => e.id,
35
+ getLabel: (e) => `${e.name} (${e.sku})`,
36
+ renderOption: (e) => /* @__PURE__ */ u(c, { children: [
37
+ e.name,
38
+ " ",
39
+ /* @__PURE__ */ u("span", {
40
+ className: "text-text-tertiary",
41
+ children: [
42
+ "(",
43
+ e.sku,
44
+ ")"
45
+ ]
46
+ })
47
+ ] }),
48
+ selectedOption: y,
49
+ selectedLoading: b,
50
+ placeholder: "Pick from your product catalog",
51
+ emptyText: "No products found.",
52
+ noneLabel: "Enter details manually"
53
+ }),
54
+ f.productId && !C && /* @__PURE__ */ l("p", {
55
+ className: "text-xs text-text-secondary",
56
+ children: d(S, x)
57
+ })
58
+ ]
59
+ }),
60
+ /* @__PURE__ */ u("div", {
61
+ className: "grid grid-cols-1 gap-4 md:grid-cols-7",
62
+ children: [
63
+ /* @__PURE__ */ u("div", {
64
+ className: "space-y-2 md:col-span-2",
65
+ children: [/* @__PURE__ */ l(a, { children: "Item Name" }), /* @__PURE__ */ l(i, {
66
+ value: f.name,
67
+ onChange: (e) => _(p, "name", e.target.value),
68
+ placeholder: "Product name"
69
+ })]
70
+ }),
71
+ /* @__PURE__ */ u("div", {
72
+ className: "space-y-2",
73
+ children: [/* @__PURE__ */ l(a, { children: "SKU" }), /* @__PURE__ */ l(i, {
74
+ value: f.sku,
75
+ onChange: (e) => _(p, "sku", e.target.value),
76
+ placeholder: "SKU-001"
77
+ })]
78
+ }),
79
+ /* @__PURE__ */ u("div", {
80
+ className: "space-y-2",
81
+ children: [/* @__PURE__ */ l(a, { children: "Quantity" }), /* @__PURE__ */ l(i, {
82
+ type: "number",
83
+ min: "1",
84
+ value: f.quantity,
85
+ onChange: (e) => _(p, "quantity", parseInt(e.target.value) || 1)
86
+ })]
87
+ }),
88
+ /* @__PURE__ */ u("div", {
89
+ className: "space-y-2",
90
+ children: [/* @__PURE__ */ l(a, { children: "Weight (kg)" }), /* @__PURE__ */ l(i, {
91
+ type: "number",
92
+ min: "0",
93
+ step: "0.1",
94
+ value: f.weight,
95
+ onChange: (e) => _(p, "weight", parseFloat(e.target.value) || 0)
96
+ })]
97
+ }),
98
+ /* @__PURE__ */ u("div", {
99
+ className: "space-y-2",
100
+ children: [/* @__PURE__ */ l(a, { children: "Value ($)" }), /* @__PURE__ */ l(i, {
101
+ type: "number",
102
+ min: "0",
103
+ step: "0.01",
104
+ value: f.value,
105
+ onChange: (e) => _(p, "value", parseFloat(e.target.value) || 0)
106
+ })]
107
+ }),
108
+ /* @__PURE__ */ l("div", {
109
+ className: "flex items-end",
110
+ children: /* @__PURE__ */ l(r, {
111
+ type: "button",
112
+ variant: "ghost",
113
+ size: "icon",
114
+ className: "text-status-error-text",
115
+ onClick: () => v(p),
116
+ children: /* @__PURE__ */ l(e, { size: 16 })
117
+ })
118
+ })
119
+ ]
120
+ })
121
+ ] });
122
+ }
123
+ //#endregion
124
+ export { f as OrderItemRow };
@@ -1,7 +1,7 @@
1
1
  import { cn as e } from "../utils/cn.js";
2
2
  import * as t from "react";
3
3
  import { jsx as n } from "react/jsx-runtime";
4
- import { Badge as r, Button as i, Card as a, CardContent as o, CardDescription as s, CardFooter as c, CardHeader as l, CardTitle as u, Checkbox as d, Dialog as f, DialogContent as p, DialogDescription as m, DialogFooter as h, DialogHeader as g, DialogTitle as _, DialogTrigger as v, DropdownMenu as y, DropdownMenuContent as b, DropdownMenuItem as x, DropdownMenuSeparator as S, DropdownMenuTrigger as C, Input as w, Label as T, ScrollArea as E, Select as D, SelectContent as O, SelectItem as k, SelectTrigger as A, SelectValue as j, Separator as M, Skeleton as N, Switch as P, Table as F, TableBody as I, TableCell as L, TableHead as R, TableHeader as z, TableRow as B, Tabs as V, TabsContent as H, TabsList as U, TabsTrigger as W, Textarea as G, Tooltip as K, TooltipContent as q, TooltipProvider as J, TooltipTrigger as Y } from "@burdenoff/fe-libs/ui";
4
+ import { Badge as r, Button as i, Card as a, CardContent as o, CardDescription as s, CardFooter as c, CardHeader as ee, CardTitle as te, Checkbox as ne, Command as re, CommandEmpty as l, CommandGroup as u, CommandInput as d, CommandItem as f, CommandList as p, Dialog as m, DialogContent as h, DialogDescription as g, DialogFooter as _, DialogHeader as v, DialogTitle as y, DialogTrigger as b, DropdownMenu as x, DropdownMenuContent as S, DropdownMenuItem as C, DropdownMenuSeparator as w, DropdownMenuTrigger as T, Input as E, Label as D, Popover as O, PopoverContent as k, PopoverTrigger as A, ScrollArea as j, Select as M, SelectContent as ie, SelectItem as N, SelectTrigger as P, SelectValue as F, Separator as I, Skeleton as L, Switch as R, Table as z, TableBody as B, TableCell as V, TableHead as H, TableHeader as U, TableRow as W, Tabs as G, TabsContent as K, TabsList as q, TabsTrigger as J, Textarea as Y, Tooltip as ae, TooltipContent as oe, TooltipProvider as se, TooltipTrigger as ce } from "@burdenoff/fe-libs/ui";
5
5
  //#region src/movethewheels/components/ui.tsx
6
6
  var X = t.forwardRef(({ className: t, value: r = 0, max: i = 100, ...a }, o) => {
7
7
  let s = Math.min(Math.max(r / i * 100, 0), 100);
@@ -35,4 +35,4 @@ var $ = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("div", {
35
35
  }));
36
36
  $.displayName = "AvatarFallback";
37
37
  //#endregion
38
- export { Z as Avatar, $ as AvatarFallback, Q as AvatarImage, r as Badge, i as Button, a as Card, o as CardContent, s as CardDescription, c as CardFooter, l as CardHeader, u as CardTitle, d as Checkbox, f as Dialog, p as DialogContent, m as DialogDescription, h as DialogFooter, g as DialogHeader, _ as DialogTitle, v as DialogTrigger, y as DropdownMenu, b as DropdownMenuContent, x as DropdownMenuItem, S as DropdownMenuSeparator, C as DropdownMenuTrigger, w as Input, T as Label, X as Progress, E as ScrollArea, D as Select, O as SelectContent, k as SelectItem, A as SelectTrigger, j as SelectValue, M as Separator, N as Skeleton, P as Switch, F as Table, I as TableBody, L as TableCell, R as TableHead, z as TableHeader, B as TableRow, V as Tabs, H as TabsContent, U as TabsList, W as TabsTrigger, G as Textarea, K as Tooltip, q as TooltipContent, J as TooltipProvider, Y as TooltipTrigger };
38
+ export { Z as Avatar, $ as AvatarFallback, Q as AvatarImage, r as Badge, i as Button, a as Card, o as CardContent, s as CardDescription, c as CardFooter, ee as CardHeader, te as CardTitle, ne as Checkbox, re as Command, l as CommandEmpty, u as CommandGroup, d as CommandInput, f as CommandItem, p as CommandList, m as Dialog, h as DialogContent, g as DialogDescription, _ as DialogFooter, v as DialogHeader, y as DialogTitle, b as DialogTrigger, x as DropdownMenu, S as DropdownMenuContent, C as DropdownMenuItem, w as DropdownMenuSeparator, T as DropdownMenuTrigger, E as Input, D as Label, O as Popover, k as PopoverContent, A as PopoverTrigger, X as Progress, j as ScrollArea, M as Select, ie as SelectContent, N as SelectItem, P as SelectTrigger, F as SelectValue, I as Separator, L as Skeleton, R as Switch, z as Table, B as TableBody, V as TableCell, H as TableHead, U as TableHeader, W as TableRow, G as Tabs, K as TabsContent, q as TabsList, J as TabsTrigger, Y as Textarea, ae as Tooltip, oe as TooltipContent, se as TooltipProvider, ce as TooltipTrigger };