@tesouro/embedded-components-react 0.5.257 → 0.5.259
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.
- package/README.md +2 -1
- package/dist/fixtures/index.d.ts +1 -1
- package/dist/index.css +109 -9
- package/dist/index.d.ts +41 -10
- package/dist/lib/ReceivablesWidget.d.ts +41 -10
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index.js +11 -10
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index10.js +42 -94
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index11.js +91 -76
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index12.js +67 -173
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index13.js +186 -17
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index14.js +27 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index4.js +28 -72
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index5.js +128 -53
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index6.js +66 -28
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index7.js +28 -34
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index8.js +24 -168
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/data-access/dist/index9.js +173 -44
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/ReceivablesWidget.js +274 -267
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/helpers.js +99 -95
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/labels.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/paymentTerms.js +28 -25
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/preview.js +49 -43
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/unsavedChanges.js +13 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActions.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableActionsModal.js +2 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableAttachmentUploads.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableBankAccount.js +77 -72
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableDetails.js +4 -4
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableForm.js +363 -295
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableIssuePreflight.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePaymentRecord.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablePreview.js +36 -21
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableReminders.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivableStatusCards.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/feature/dist/lib/ReceivablesWidget/useReceivablesTable.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index.js +12 -10
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index13.js +21 -14
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index15.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index16.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index20.js +68 -64
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index38.js +383 -379
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index40.js +22 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index41.js +8 -2
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index43.js +258 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index44.js +2 -100
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index45.js +95 -23
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index46.js +23 -231
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index47.js +237 -3
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index48.js +3 -249
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index49.js +234 -78
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index50.js +87 -53
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index51.js +49 -349
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index52.js +359 -0
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index53.js +45 -0
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +40 -40
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/@tanstack/react-query.gen.js +247 -214
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +175 -147
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/index.js +12 -12
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index2.js +2 -1
- package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index6.js +109 -89
- package/package.json +1 -1
- package/dist/libs/tesouro-embedded-components-react/invoicing-widget/ui/dist/index42.js +0 -4
package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js
CHANGED
|
@@ -1571,7 +1571,7 @@ var Cr = e.object({
|
|
|
1571
1571
|
unverified: e.union([e.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }), e.string().regex(/^-?(?:0|[1-9]\d*)$/)]).optional(),
|
|
1572
1572
|
verificationSent: e.union([e.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }), e.string().regex(/^-?(?:0|[1-9]\d*)$/)]).optional(),
|
|
1573
1573
|
verified: e.union([e.int().min(-2147483648, { error: "Invalid value: Expected int32 to be >= -2147483648" }).max(2147483647, { error: "Invalid value: Expected int32 to be <= 2147483647" }), e.string().regex(/^-?(?:0|[1-9]\d*)$/)]).optional()
|
|
1574
|
-
}), Gr = e.enum(["PAYMENT_RETURNED"]), Kr = e.object({
|
|
1574
|
+
}), Gr = e.enum(["PAYMENT_RETURNED", "CORRECTION_NOT_APPLIED"]), Kr = e.object({
|
|
1575
1575
|
reason: Gr.nullish(),
|
|
1576
1576
|
returnCategory: Je.nullish(),
|
|
1577
1577
|
suspendedAt: e.iso.datetime()
|
package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
//#region ../../libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js
|
|
2
|
-
var e = "@tesouro/embedded-components-react", t = "0.5.
|
|
2
|
+
var e = "@tesouro/embedded-components-react", t = "0.5.259", n = "4c4fe34528a8496061bdc90b3ebaa49ea86d098f", r = Object.freeze({
|
|
3
3
|
library_name: e,
|
|
4
4
|
library_version: t,
|
|
5
5
|
library_sha: n
|
package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/feature/dist/index.js
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import "../../../util/dist/lib/apiErrors.js";
|
|
2
2
|
import { PRODUCT_MESSAGE_LABELS_EN as e } from "./lib/labels.js";
|
|
3
|
-
import { buildProductDetailsView as t, buildProductRows as n, formatPrice as r,
|
|
4
|
-
import { ProductFormSheet as
|
|
3
|
+
import { buildProductDetailsView as t, buildProductRows as n, formatPrice as r, hasSelectedText as i } from "./lib/helpers.js";
|
|
4
|
+
import { ProductFormSheet as a } from "../../ui/dist/index3.js";
|
|
5
5
|
import "../../ui/dist/index4.js";
|
|
6
6
|
import "../../ui/dist/index5.js";
|
|
7
7
|
import "../../ui/dist/index.js";
|
|
8
|
-
import { useProductsQuery as
|
|
8
|
+
import { useProductsQuery as o } from "../../data-access/dist/index2.js";
|
|
9
9
|
import "../../data-access/dist/index3.js";
|
|
10
|
-
import { useProductQuery as
|
|
11
|
-
import { useCreateProductMutation as
|
|
10
|
+
import { useProductQuery as s } from "../../data-access/dist/index4.js";
|
|
11
|
+
import { useCreateProductMutation as c } from "../../data-access/dist/index6.js";
|
|
12
12
|
import "../../data-access/dist/index7.js";
|
|
13
|
-
import { useDeleteProductMutation as
|
|
14
|
-
import { useMeasureUnitsQuery as
|
|
13
|
+
import { useDeleteProductMutation as l } from "../../data-access/dist/index8.js";
|
|
14
|
+
import { useMeasureUnitsQuery as u } from "../../data-access/dist/index9.js";
|
|
15
15
|
import "../../data-access/dist/index10.js";
|
|
16
16
|
import "../../data-access/dist/index11.js";
|
|
17
17
|
import "../../data-access/dist/index12.js";
|
|
18
18
|
import "../../data-access/dist/index13.js";
|
|
19
19
|
import "../../data-access/dist/index.js";
|
|
20
|
-
import { MeasureUnitsManagerContainer as
|
|
21
|
-
import { useMeasureUnits as
|
|
22
|
-
import { useProductForm as
|
|
20
|
+
import { MeasureUnitsManagerContainer as d } from "./lib/MeasureUnitsManagerContainer.js";
|
|
21
|
+
import { useMeasureUnits as f } from "./lib/useMeasureUnits.js";
|
|
22
|
+
import { useProductForm as p } from "./lib/useProductForm.js";
|
|
23
23
|
import "./lib/useProductSelector.js";
|
|
24
|
-
import { ProductSelector as
|
|
25
|
-
export {
|
|
24
|
+
import { ProductSelector as m } from "./lib/ProductSelector.js";
|
|
25
|
+
export { d as MeasureUnitsManagerContainer, e as PRODUCT_MESSAGE_LABELS_EN, a as ProductFormSheet, m as ProductSelector, t as buildProductDetailsView, n as buildProductRows, r as formatPrice, i as hasSelectedText, c as useCreateProductMutation, l as useDeleteProductMutation, f as useMeasureUnits, u as useMeasureUnitsQuery, p as useProductForm, s as useProductQuery, o as useProductsQuery };
|
package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index2.js
CHANGED
|
@@ -53,7 +53,8 @@ var e = {
|
|
|
53
53
|
}, r = {
|
|
54
54
|
fieldLabel: "Item name",
|
|
55
55
|
placeholder: "e.g., Office supplies",
|
|
56
|
-
emptyText: "No saved items found - type to add an item"
|
|
56
|
+
emptyText: "No saved items found - type to add an item",
|
|
57
|
+
toggleListButton: "Show saved items"
|
|
57
58
|
};
|
|
58
59
|
//#endregion
|
|
59
60
|
export { t as MEASURE_UNITS_MANAGER_LABELS_EN, n as MEASURE_UNIT_DELETE_DIALOG_LABELS_EN, e as PRODUCT_FORM_SHEET_LABELS_EN, r as PRODUCT_SELECTOR_LABELS_EN };
|
package/dist/libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index6.js
CHANGED
|
@@ -1,107 +1,127 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { PRODUCT_SELECTOR_LABELS_EN as
|
|
3
|
-
import { useCallback as
|
|
1
|
+
import { cn as e } from "../../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
2
|
+
import { PRODUCT_SELECTOR_LABELS_EN as t } from "./index2.js";
|
|
3
|
+
import { useCallback as n, useId as r, useRef as i, useState as a } from "react";
|
|
4
4
|
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
|
-
import { CheckIcon as c,
|
|
5
|
+
import { CheckIcon as c, ChevronDownIcon as l, Loader2Icon as u } from "lucide-react";
|
|
6
6
|
//#region ../../libs/tesouro-embedded-components-react/shared/product-catalog/ui/dist/index6.js
|
|
7
|
-
function
|
|
8
|
-
let
|
|
9
|
-
...
|
|
10
|
-
...
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
},
|
|
14
|
-
|
|
15
|
-
},
|
|
7
|
+
function d({ inputValue: d, onInputValueChange: f, options: p, value: m, onOptionSelect: h, isLoading: g, disabled: _, invalid: v, inputId: y, focusOnMount: b, maxLength: x, labels: S }) {
|
|
8
|
+
let C = {
|
|
9
|
+
...t,
|
|
10
|
+
...S
|
|
11
|
+
}, w = r(), [T, E] = a(!1), [D, O] = a(), k = p.findIndex((e) => e.value === D), A = () => {
|
|
12
|
+
E(!1), O(void 0);
|
|
13
|
+
}, j = (e) => {
|
|
14
|
+
h(e), A();
|
|
15
|
+
}, M = (e) => `${w}-option-${e}`, N = (e) => {
|
|
16
16
|
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
17
|
-
if (e.preventDefault(),
|
|
18
|
-
let t = e.key === "ArrowDown" ? Math.min(
|
|
19
|
-
|
|
17
|
+
if (e.preventDefault(), E(!0), !p.length) return;
|
|
18
|
+
let t = e.key === "ArrowDown" ? Math.min(k + 1, p.length - 1) : Math.max(k - 1, 0);
|
|
19
|
+
O(p[t].value), document.getElementById(M(t))?.scrollIntoView?.({ block: "nearest" });
|
|
20
20
|
return;
|
|
21
21
|
}
|
|
22
22
|
if (e.key === "Enter") {
|
|
23
23
|
e.preventDefault();
|
|
24
|
-
let t =
|
|
25
|
-
|
|
24
|
+
let t = p[k];
|
|
25
|
+
T && t ? j(t.value) : A();
|
|
26
26
|
return;
|
|
27
27
|
}
|
|
28
|
-
if (e.key === "Tab" &&
|
|
29
|
-
let e =
|
|
28
|
+
if (e.key === "Tab" && T) {
|
|
29
|
+
let e = d.trim().toLowerCase();
|
|
30
30
|
if (!e) return;
|
|
31
|
-
let t =
|
|
32
|
-
t ?
|
|
31
|
+
let t = p.find((t) => t.label.toLowerCase() === e) ?? (p.length === 1 ? p[0] : void 0);
|
|
32
|
+
t ? j(t.value) : A();
|
|
33
33
|
return;
|
|
34
34
|
}
|
|
35
|
-
e.key === "Escape" &&
|
|
36
|
-
},
|
|
37
|
-
e &&
|
|
38
|
-
}, [
|
|
35
|
+
e.key === "Escape" && T && (e.stopPropagation(), A());
|
|
36
|
+
}, P = i(null), F = n((e) => {
|
|
37
|
+
P.current = e, e && b && e.focus();
|
|
38
|
+
}, [b]), I = () => {
|
|
39
|
+
if (T) {
|
|
40
|
+
A();
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
P.current?.focus(), E(!0);
|
|
44
|
+
}, L = T && k >= 0 ? M(k) : void 0;
|
|
39
45
|
return /* @__PURE__ */ s("div", {
|
|
40
46
|
className: "ttw:relative ttw:w-full",
|
|
41
|
-
children: [
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"aria-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
className: t("ttw:relative ttw:flex ttw:w-full ttw:cursor-default ttw:items-center ttw:gap-2 ttw:rounded-sm ttw:py-1.5 ttw:pr-8 ttw:pl-2 ttw:text-sm ttw:select-none", n === O && "ttw:bg-accent ttw:text-accent-foreground"),
|
|
81
|
-
onMouseEnter: () => D(e.value),
|
|
82
|
-
onMouseDown: () => A(e.value),
|
|
83
|
-
children: [
|
|
84
|
-
/* @__PURE__ */ o("span", {
|
|
85
|
-
className: "ttw:min-w-0 ttw:flex-1 ttw:truncate",
|
|
86
|
-
children: e.label
|
|
87
|
-
}),
|
|
88
|
-
e.meta ? /* @__PURE__ */ o("span", {
|
|
89
|
-
className: "ttw:shrink-0 ttw:text-right ttw:text-xs ttw:text-muted-foreground",
|
|
90
|
-
children: e.meta
|
|
91
|
-
}) : null,
|
|
92
|
-
e.value === p ? /* @__PURE__ */ o("span", {
|
|
93
|
-
className: "ttw:pointer-events-none ttw:absolute ttw:right-2 ttw:flex ttw:size-4 ttw:items-center ttw:justify-center",
|
|
94
|
-
children: /* @__PURE__ */ o(c, { className: "ttw:size-4" })
|
|
95
|
-
}) : null
|
|
96
|
-
]
|
|
97
|
-
}, e.value)), f.length ? null : /* @__PURE__ */ o("li", {
|
|
98
|
-
className: "ttw:py-2 ttw:text-center ttw:text-sm ttw:text-muted-foreground",
|
|
99
|
-
children: S.emptyText
|
|
100
|
-
})]
|
|
47
|
+
children: [/* @__PURE__ */ s("div", {
|
|
48
|
+
className: e("ttw:flex ttw:h-9 ttw:w-full ttw:min-w-0 ttw:items-center ttw:rounded-md ttw:border ttw:border-input ttw:shadow-xs ttw:transition-[color,box-shadow] ttw:has-[input:focus-visible]:border-ring ttw:has-[input:focus-visible]:ring-[3px] ttw:has-[input:focus-visible]:ring-ring/50 ttw:has-[[aria-invalid=true]]:border-destructive", _ && "ttw:opacity-50"),
|
|
49
|
+
children: [
|
|
50
|
+
g ? /* @__PURE__ */ o(u, { className: "ttw:pointer-events-none ttw:ml-3 ttw:size-4 ttw:shrink-0 ttw:animate-spin ttw:text-muted-foreground" }) : null,
|
|
51
|
+
/* @__PURE__ */ o("input", {
|
|
52
|
+
id: y,
|
|
53
|
+
role: "combobox",
|
|
54
|
+
"aria-label": C.fieldLabel,
|
|
55
|
+
"aria-autocomplete": "list",
|
|
56
|
+
"aria-expanded": T,
|
|
57
|
+
"aria-controls": w,
|
|
58
|
+
"aria-activedescendant": L,
|
|
59
|
+
"aria-invalid": v || void 0,
|
|
60
|
+
autoComplete: "off",
|
|
61
|
+
ref: F,
|
|
62
|
+
maxLength: x,
|
|
63
|
+
disabled: _,
|
|
64
|
+
placeholder: C.placeholder,
|
|
65
|
+
className: e("ttw:h-full ttw:min-w-0 ttw:flex-1 ttw:bg-transparent ttw:pr-2 ttw:text-base ttw:outline-none ttw:placeholder:text-muted-foreground ttw:disabled:cursor-not-allowed ttw:md:text-sm", g ? "ttw:pl-2" : "ttw:pl-3"),
|
|
66
|
+
value: d,
|
|
67
|
+
onFocus: () => E(!0),
|
|
68
|
+
onClick: () => E(!0),
|
|
69
|
+
onBlur: A,
|
|
70
|
+
onChange: (e) => {
|
|
71
|
+
f(e.target.value), E(!0), O(void 0);
|
|
72
|
+
},
|
|
73
|
+
onKeyDown: N
|
|
74
|
+
}),
|
|
75
|
+
/* @__PURE__ */ o("button", {
|
|
76
|
+
type: "button",
|
|
77
|
+
tabIndex: -1,
|
|
78
|
+
"aria-label": C.toggleListButton,
|
|
79
|
+
"aria-controls": w,
|
|
80
|
+
"aria-expanded": T,
|
|
81
|
+
disabled: _,
|
|
82
|
+
className: "ttw:mr-[0.3rem] ttw:flex ttw:size-6 ttw:shrink-0 ttw:cursor-pointer ttw:items-center ttw:justify-center ttw:rounded-[calc(var(--radius)-5px)] ttw:text-muted-foreground ttw:transition-all ttw:hover:bg-accent ttw:hover:text-accent-foreground ttw:disabled:pointer-events-none",
|
|
83
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
84
|
+
onClick: I,
|
|
85
|
+
children: /* @__PURE__ */ o(l, { className: "ttw:pointer-events-none ttw:size-4" })
|
|
101
86
|
})
|
|
102
|
-
|
|
103
|
-
|
|
87
|
+
]
|
|
88
|
+
}), T && !_ ? /* @__PURE__ */ o("div", {
|
|
89
|
+
role: "presentation",
|
|
90
|
+
className: "ttw:absolute ttw:left-0 ttw:top-full ttw:z-50 ttw:mt-1.5 ttw:w-full ttw:min-w-138 ttw:overflow-hidden ttw:rounded-md ttw:bg-popover ttw:text-popover-foreground ttw:shadow-md ttw:ring-1 ttw:ring-foreground/10",
|
|
91
|
+
onMouseDown: (e) => e.preventDefault(),
|
|
92
|
+
children: /* @__PURE__ */ s("ul", {
|
|
93
|
+
id: w,
|
|
94
|
+
role: "listbox",
|
|
95
|
+
"aria-label": C.fieldLabel,
|
|
96
|
+
className: "ttw:max-h-87 ttw:scroll-py-1 ttw:overflow-y-auto ttw:p-1",
|
|
97
|
+
children: [p.map((t, n) => /* @__PURE__ */ s("li", {
|
|
98
|
+
id: M(n),
|
|
99
|
+
role: "option",
|
|
100
|
+
"aria-selected": t.value === m,
|
|
101
|
+
className: e("ttw:relative ttw:flex ttw:w-full ttw:cursor-default ttw:items-center ttw:gap-2 ttw:rounded-sm ttw:py-1.5 ttw:pr-8 ttw:pl-2 ttw:text-sm ttw:select-none", n === k && "ttw:bg-accent ttw:text-accent-foreground"),
|
|
102
|
+
onMouseEnter: () => O(t.value),
|
|
103
|
+
onMouseDown: () => j(t.value),
|
|
104
|
+
children: [
|
|
105
|
+
/* @__PURE__ */ o("span", {
|
|
106
|
+
className: "ttw:min-w-0 ttw:flex-1 ttw:truncate",
|
|
107
|
+
children: t.label
|
|
108
|
+
}),
|
|
109
|
+
t.meta ? /* @__PURE__ */ o("span", {
|
|
110
|
+
className: "ttw:shrink-0 ttw:text-right ttw:text-xs ttw:text-muted-foreground",
|
|
111
|
+
children: t.meta
|
|
112
|
+
}) : null,
|
|
113
|
+
t.value === m ? /* @__PURE__ */ o("span", {
|
|
114
|
+
className: "ttw:pointer-events-none ttw:absolute ttw:right-2 ttw:flex ttw:size-4 ttw:items-center ttw:justify-center",
|
|
115
|
+
children: /* @__PURE__ */ o(c, { className: "ttw:size-4" })
|
|
116
|
+
}) : null
|
|
117
|
+
]
|
|
118
|
+
}, t.value)), p.length ? null : /* @__PURE__ */ o("li", {
|
|
119
|
+
className: "ttw:py-2 ttw:text-center ttw:text-sm ttw:text-muted-foreground",
|
|
120
|
+
children: C.emptyText
|
|
121
|
+
})]
|
|
122
|
+
})
|
|
123
|
+
}) : null]
|
|
104
124
|
});
|
|
105
125
|
}
|
|
106
126
|
//#endregion
|
|
107
|
-
export {
|
|
127
|
+
export { d as ProductSelector, d as default };
|
package/package.json
CHANGED