@mercurjs/vendor 2.1.2-canary.4 → 2.1.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.
- package/dist/{[id]-5M6VHH3W.js → [id]-3G5G7ZFV.js} +3 -3
- package/dist/{[id]-EGXWMHVQ.js → [id]-4VCL3MMM.js} +4 -4
- package/dist/{[id]-CLZ7BUYL.js → [id]-6PXEWRG7.js} +3 -3
- package/dist/{[id]-UO5NDM4O.js → [id]-7RUAH3TI.js} +1 -1
- package/dist/{[id]-I5ES5RW7.js → [id]-B3LHVQM5.js} +3 -3
- package/dist/{[id]-STUTFCFY.js → [id]-BYP37PU4.js} +31 -13
- package/dist/{[id]-MZU34PWO.js → [id]-H3C3ZSC6.js} +4 -4
- package/dist/{[id]-LFCNAA7E.js → [id]-INOFZHL7.js} +23 -20
- package/dist/{[id]-RHMPOA6V.js → [id]-PDGHF5J2.js} +5 -5
- package/dist/{[id]-C6PLGSGW.js → [id]-T2ROPEGY.js} +3 -3
- package/dist/{[id]-ZD26ACGU.js → [id]-TO6KT3ZE.js} +4 -4
- package/dist/{[id]-EW3QSR2J.js → [id]-UTKO3VG4.js} +6 -6
- package/dist/{[id]-5VUGXK2D.js → [id]-X4DDKOMQ.js} +4 -4
- package/dist/{[id]-XRGNT7CY.js → [id]-Y7GAMNC5.js} +1 -1
- package/dist/{[location_id]-7ZUB2TTU.js → [location_id]-D55RQOXT.js} +1 -1
- package/dist/{[province_id]-XGKNI5CN.js → [province_id]-OFH2ZOFQ.js} +3 -3
- package/dist/{add-O5M7AHMZ.js → add-C6OX5C54.js} +6 -6
- package/dist/{add-SBUQXZND.js → add-KRAGFFBJ.js} +4 -4
- package/dist/{add-customer-groups-TJVGXKOA.js → add-customer-groups-PJRJUWS2.js} +2 -2
- package/dist/{add-products-NZ7TOIER.js → add-products-INOLNPO6.js} +3 -3
- package/dist/{add-promotions-PLQYT5B2.js → add-promotions-AHDOP52Q.js} +5 -5
- package/dist/{allocate-items-HUPFVTUR.js → allocate-items-SUCUZU4D.js} +7 -3
- package/dist/{areas-JO6L3M7Y.js → areas-UUMZDXLX.js} +3 -3
- package/dist/{bulk-edit-S7UU3C3C.js → bulk-edit-3SMBLIOA.js} +1 -1
- package/dist/{campaigns-SF2YDBID.js → campaigns-HS6MIO7X.js} +4 -4
- package/dist/{categories-IKMG6JX7.js → categories-PKWR3FM3.js} +4 -4
- package/dist/{chunk-AW4WN2EK.js → chunk-2RHAI7WK.js} +2 -2
- package/dist/{chunk-S2Q7PO7I.js → chunk-4KX6CBJ4.js} +1 -0
- package/dist/{chunk-SC7V66IV.js → chunk-4URLUCTD.js} +3 -3
- package/dist/{chunk-AIRJ4WZG.js → chunk-5M3SL4UZ.js} +4 -5
- package/dist/{chunk-5BONGICL.js → chunk-5UD4P6YL.js} +1 -1
- package/dist/{chunk-2SLAVXFY.js → chunk-6SBMVLJ2.js} +2 -2
- package/dist/{chunk-GWD2S44A.js → chunk-7Q5SDEK7.js} +3 -3
- package/dist/{chunk-QXUKJDZB.js → chunk-AIF2KTEE.js} +15 -12
- package/dist/{chunk-VOLO3WDZ.js → chunk-BLVJAKBA.js} +1 -1
- package/dist/{chunk-RM5RSDYP.js → chunk-CAS74NLJ.js} +4 -2
- package/dist/{chunk-3U63R3MT.js → chunk-CNLP35S7.js} +0 -2
- package/dist/{chunk-2UBZMAHM.js → chunk-CYTNBXWF.js} +2 -2
- package/dist/{chunk-DRLJXEDA.js → chunk-DKQ4XMSN.js} +2 -2
- package/dist/{chunk-A4LYFHPW.js → chunk-HGQTL7NX.js} +2 -2
- package/dist/{chunk-MXDS2AT4.js → chunk-I2IKYOZX.js} +3 -3
- package/dist/{chunk-KY5JBVSS.js → chunk-ITI54CII.js} +1 -1
- package/dist/{chunk-GL6V5Z6U.js → chunk-J6BRLL3F.js} +2 -2
- package/dist/{chunk-FEUCCLKR.js → chunk-JQP7MOFH.js} +2 -2
- package/dist/{chunk-BPHUIWZK.js → chunk-KQGVSLUI.js} +2 -0
- package/dist/chunk-LQYMBSRQ.js +66 -0
- package/dist/{chunk-KHVYXY2S.js → chunk-N7OVXN72.js} +1 -1
- package/dist/{chunk-GQGJOZZK.js → chunk-NK4NR6MN.js} +1 -1
- package/dist/{chunk-RXHRAJX6.js → chunk-OXXL4WQU.js} +1 -1
- package/dist/{chunk-DRAZNW7J.js → chunk-P3ZTO6T2.js} +2 -2
- package/dist/{chunk-3BZBEC3Y.js → chunk-PDQSPKG5.js} +6 -5
- package/dist/{chunk-3DXMZA7M.js → chunk-PEKANQ3T.js} +2 -2
- package/dist/{chunk-TZTKHOEK.js → chunk-PFU6FSXY.js} +3 -3
- package/dist/{chunk-5LKZCG77.js → chunk-PPLC4IKI.js} +6 -15
- package/dist/{chunk-SGT6QYWH.js → chunk-PTW7JNAP.js} +1 -1
- package/dist/{chunk-I5K5USJM.js → chunk-QJEOPT2P.js} +1 -1
- package/dist/{chunk-EFIF2GCZ.js → chunk-QX45GVAL.js} +10 -4
- package/dist/{chunk-ZNPXIXLL.js → chunk-STR3NGWE.js} +40 -33
- package/dist/{chunk-M2RIKNDT.js → chunk-VQ5EKDA3.js} +2 -2
- package/dist/{chunk-RLETOWCM.js → chunk-WITQNQXN.js} +2 -2
- package/dist/{chunk-WQX4ASK4.js → chunk-WNVEMFIK.js} +2 -2
- package/dist/{chunk-FQTYHU6G.js → chunk-X4FLOQ45.js} +2 -2
- package/dist/{chunk-W3TUVTRK.js → chunk-Y2QI7KWS.js} +9 -8
- package/dist/chunk-YGRTRAWX.js +163 -0
- package/dist/{chunk-LYUCDASZ.js → chunk-YN3FGNJM.js} +11 -4
- package/dist/{collections-UJ4B6SLM.js → collections-DJZI2RM2.js} +6 -6
- package/dist/{configuration-O5GDANA7.js → configuration-GN3TO77H.js} +4 -25
- package/dist/{create-W7DMQS3H.js → create-3DOO3RNH.js} +8 -4
- package/dist/{create-HDINR4VV.js → create-3EK5CNNX.js} +5 -5
- package/dist/{create-P7DGM4QT.js → create-3ZVXEPX5.js} +11 -26
- package/dist/{create-WT6EYIQD.js → create-G4T2PAJH.js} +7 -2
- package/dist/{create-6CQ3HRIK.js → create-HKJVSFB7.js} +1 -1
- package/dist/{create-Q6ITSYJM.js → create-I7HV3RM6.js} +1 -1
- package/dist/{create-IOUKWPE4.js → create-OCFPLNNY.js} +3 -3
- package/dist/{create-6LLSQO2D.js → create-OGLPDVOI.js} +11 -3
- package/dist/{create-7QGQLPPZ.js → create-YO55Z3YD.js} +10 -10
- package/dist/{customers-OXAD52MC.js → customers-6ZLE65UX.js} +4 -4
- package/dist/{edit-G5BAEVBL.js → edit-2KRJIPRK.js} +3 -3
- package/dist/{edit-A2TSQ7UD.js → edit-B75KK5ZX.js} +5 -5
- package/dist/{edit-PD56B3YH.js → edit-IR6V2IDN.js} +3 -3
- package/dist/{edit-TFJ6NA5Z.js → edit-K2AD335I.js} +1 -1
- package/dist/{edit-PGXUW4QC.js → edit-QBISX7D3.js} +29 -23
- package/dist/{edit-7GHQ3ZYV.js → edit-VO5XLIEL.js} +2 -2
- package/dist/{edit-7I7RQSIB.js → edit-ZSOI56BQ.js} +3 -3
- package/dist/{edit-stocks-and-prices-ZXBXENLJ.js → edit-stocks-and-prices-MHHQFWFA.js} +3 -3
- package/dist/{fulfillment-R7LRV54N.js → fulfillment-DCS67LTK.js} +14 -2
- package/dist/{fulfillment-providers-2YQGSI7R.js → fulfillment-providers-GM5PO6N3.js} +7 -9
- package/dist/index.js +104 -104
- package/dist/{inventory-W6S2NIBI.js → inventory-OPZ2FSEE.js} +4 -4
- package/dist/{invite-TVMB7OZZ.js → invite-764K3TJS.js} +2 -2
- package/dist/{locations-7SQJ3O2F.js → locations-ZVPTQCQY.js} +2 -2
- package/dist/{manage-locations-R4T72DTA.js → manage-locations-YUKEFCBJ.js} +32 -29
- package/dist/{media-UYKZ3G3T.js → media-4KYFHB5V.js} +4 -4
- package/dist/{onboarding-4HGCO3EK.js → onboarding-WXZHW62K.js} +3 -18
- package/dist/{orders-SSLTNL27.js → orders-LWJ472VM.js} +6 -6
- package/dist/{organization-QCSXE52A.js → organization-LPYQRTQC.js} +1 -1
- package/dist/{organize-5W5KNBM2.js → organize-OVKJ3HZO.js} +1 -1
- package/dist/{organize-U2LVYSOD.js → organize-RFOMQCBG.js} +1 -1
- package/dist/pages/index.js +31 -31
- package/dist/{payouts-MHAHAAFV.js → payouts-TR7K5I37.js} +4 -4
- package/dist/{price-lists-JX22K5EO.js → price-lists-S2WNELFZ.js} +4 -4
- package/dist/{prices-V25NS7PW.js → prices-3OXV5RGY.js} +3 -3
- package/dist/{pricing-WFBOYUSG.js → pricing-UF27DAXA.js} +2 -2
- package/dist/{product-tags-3UAZGIBS.js → product-tags-2CKH2M6D.js} +6 -6
- package/dist/{product-types-MBLFYJOA.js → product-types-FX43JEO2.js} +4 -4
- package/dist/{product-variant-detail-NQRHFOHY.js → product-variant-detail-WV4KXVXR.js} +4 -4
- package/dist/{products-EFWGQWL6.js → products-2LHGS7X3.js} +15 -15
- package/dist/{products-ZQY7KYGJ.js → products-H5EMRJYS.js} +3 -3
- package/dist/{profile-3DVJYKC3.js → profile-PB27WIRW.js} +1 -1
- package/dist/{promotions-YSQBY6YL.js → promotions-5EYPGHJP.js} +7 -7
- package/dist/{register-CNSFCBIZ.js → register-4O4F6YZK.js} +1 -1
- package/dist/{reset-password-YS7G6RXL.js → reset-password-GTWLBOFK.js} +1 -1
- package/dist/{return-reasons-EMJMFU2L.js → return-reasons-LOKYRGMI.js} +3 -3
- package/dist/{sales-channels-2OVI6RTV.js → sales-channels-7R2IY3KG.js} +1 -1
- package/dist/{sales-channels-BKOYQXVC.js → sales-channels-Y4LRP7JC.js} +1 -1
- package/dist/{settings-XS2GTIVD.js → settings-2XDLFYMS.js} +9 -9
- package/dist/{shipping-profile-JJBIVZPM.js → shipping-profile-R3NABPQF.js} +1 -1
- package/dist/{shipping-profiles-UNNPBX5T.js → shipping-profiles-QVKNFLCW.js} +4 -4
- package/dist/{stock-JQG3Y67T.js → stock-5RXNUPUT.js} +1 -1
- package/dist/{stock-Z3CVQETI.js → stock-GPC3BCL6.js} +1 -1
- package/dist/{store-BGZ7YFQ5.js → store-DE2RGX7T.js} +37 -31
- package/dist/{tax-regions-FPMGLITT.js → tax-regions-UD6P5FVC.js} +1 -1
- package/dist/{team-UJ4ZSZPU.js → team-JXKAVRPU.js} +3 -3
- package/package.json +2 -2
- package/dist/chunk-4DYUQ3G5.js +0 -146
- package/dist/chunk-NCYTM57J.js +0 -160
package/dist/chunk-4DYUQ3G5.js
DELETED
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
useRegions
|
|
3
|
-
} from "./chunk-UL4O5M4S.js";
|
|
4
|
-
import {
|
|
5
|
-
useSalesChannels
|
|
6
|
-
} from "./chunk-3B34B2M2.js";
|
|
7
|
-
|
|
8
|
-
// src/hooks/table/filters/use-order-table-filters.tsx
|
|
9
|
-
import { useTranslation } from "react-i18next";
|
|
10
|
-
import { useMemo } from "react";
|
|
11
|
-
var useOrderTableFilters = () => {
|
|
12
|
-
const { t } = useTranslation();
|
|
13
|
-
const { regions } = useRegions({
|
|
14
|
-
limit: 1e3,
|
|
15
|
-
fields: "id,name"
|
|
16
|
-
});
|
|
17
|
-
const { sales_channels } = useSalesChannels({
|
|
18
|
-
limit: 1e3,
|
|
19
|
-
fields: "id,name"
|
|
20
|
-
});
|
|
21
|
-
return useMemo(() => {
|
|
22
|
-
let filters = [];
|
|
23
|
-
if (regions) {
|
|
24
|
-
const regionFilter = {
|
|
25
|
-
key: "region_id",
|
|
26
|
-
label: t("fields.region"),
|
|
27
|
-
type: "select",
|
|
28
|
-
options: regions.map((r) => ({
|
|
29
|
-
label: r.name,
|
|
30
|
-
value: r.id
|
|
31
|
-
})),
|
|
32
|
-
multiple: true,
|
|
33
|
-
searchable: true
|
|
34
|
-
};
|
|
35
|
-
filters.push(regionFilter);
|
|
36
|
-
}
|
|
37
|
-
if (sales_channels) {
|
|
38
|
-
const salesChannelFilter = {
|
|
39
|
-
key: "sales_channel_id",
|
|
40
|
-
label: t("fields.salesChannel"),
|
|
41
|
-
type: "select",
|
|
42
|
-
multiple: true,
|
|
43
|
-
searchable: true,
|
|
44
|
-
options: sales_channels.map((s) => ({
|
|
45
|
-
label: s.name,
|
|
46
|
-
value: s.id
|
|
47
|
-
}))
|
|
48
|
-
};
|
|
49
|
-
filters.push(salesChannelFilter);
|
|
50
|
-
}
|
|
51
|
-
const paymentStatusFilter = {
|
|
52
|
-
key: "payment_status",
|
|
53
|
-
label: t("orders.payment.statusLabel"),
|
|
54
|
-
type: "select",
|
|
55
|
-
multiple: true,
|
|
56
|
-
options: [
|
|
57
|
-
{
|
|
58
|
-
label: t("orders.payment.status.notPaid"),
|
|
59
|
-
value: "not_paid"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
label: t("orders.payment.status.awaiting"),
|
|
63
|
-
value: "awaiting"
|
|
64
|
-
},
|
|
65
|
-
{
|
|
66
|
-
label: t("orders.payment.status.captured"),
|
|
67
|
-
value: "captured"
|
|
68
|
-
},
|
|
69
|
-
{
|
|
70
|
-
label: t("orders.payment.status.refunded"),
|
|
71
|
-
value: "refunded"
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
label: t("orders.payment.status.partiallyRefunded"),
|
|
75
|
-
value: "partially_refunded"
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
label: t("orders.payment.status.canceled"),
|
|
79
|
-
value: "canceled"
|
|
80
|
-
},
|
|
81
|
-
{
|
|
82
|
-
label: t("orders.payment.status.requiresAction"),
|
|
83
|
-
value: "requires_action"
|
|
84
|
-
}
|
|
85
|
-
]
|
|
86
|
-
};
|
|
87
|
-
const fulfillmentStatusFilter = {
|
|
88
|
-
key: "fulfillment_status",
|
|
89
|
-
label: t("orders.fulfillment.statusLabel"),
|
|
90
|
-
type: "select",
|
|
91
|
-
multiple: true,
|
|
92
|
-
options: [
|
|
93
|
-
{
|
|
94
|
-
label: t("orders.fulfillment.status.notFulfilled"),
|
|
95
|
-
value: "not_fulfilled"
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
label: t("orders.fulfillment.status.fulfilled"),
|
|
99
|
-
value: "fulfilled"
|
|
100
|
-
},
|
|
101
|
-
{
|
|
102
|
-
label: t("orders.fulfillment.status.partiallyFulfilled"),
|
|
103
|
-
value: "partially_fulfilled"
|
|
104
|
-
},
|
|
105
|
-
{
|
|
106
|
-
label: t("orders.fulfillment.status.returned"),
|
|
107
|
-
value: "returned"
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
label: t("orders.fulfillment.status.partiallyReturned"),
|
|
111
|
-
value: "partially_returned"
|
|
112
|
-
},
|
|
113
|
-
{
|
|
114
|
-
label: t("orders.fulfillment.status.shipped"),
|
|
115
|
-
value: "shipped"
|
|
116
|
-
},
|
|
117
|
-
{
|
|
118
|
-
label: t("orders.fulfillment.status.partiallyShipped"),
|
|
119
|
-
value: "partially_shipped"
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
label: t("orders.fulfillment.status.canceled"),
|
|
123
|
-
value: "canceled"
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
label: t("orders.fulfillment.status.requiresAction"),
|
|
127
|
-
value: "requires_action"
|
|
128
|
-
}
|
|
129
|
-
]
|
|
130
|
-
};
|
|
131
|
-
const dateFilters = [
|
|
132
|
-
{ label: t("fields.createdAt"), key: "created_at" },
|
|
133
|
-
{ label: t("fields.updatedAt"), key: "updated_at" }
|
|
134
|
-
].map((f) => ({
|
|
135
|
-
key: f.key,
|
|
136
|
-
label: f.label,
|
|
137
|
-
type: "date"
|
|
138
|
-
}));
|
|
139
|
-
filters.push(...dateFilters);
|
|
140
|
-
return filters;
|
|
141
|
-
}, [regions, sales_channels, t]);
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
export {
|
|
145
|
-
useOrderTableFilters
|
|
146
|
-
};
|
package/dist/chunk-NCYTM57J.js
DELETED
|
@@ -1,160 +0,0 @@
|
|
|
1
|
-
// src/components/inputs/chip-input/chip-input.tsx
|
|
2
|
-
import { XMarkMini } from "@medusajs/icons";
|
|
3
|
-
import { Badge, clx } from "@medusajs/ui";
|
|
4
|
-
import { AnimatePresence, motion } from "motion/react";
|
|
5
|
-
import {
|
|
6
|
-
forwardRef,
|
|
7
|
-
useImperativeHandle,
|
|
8
|
-
useRef,
|
|
9
|
-
useState
|
|
10
|
-
} from "react";
|
|
11
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
12
|
-
var ChipInput = forwardRef(
|
|
13
|
-
({
|
|
14
|
-
value,
|
|
15
|
-
onChange,
|
|
16
|
-
onBlur,
|
|
17
|
-
disabled,
|
|
18
|
-
name,
|
|
19
|
-
showRemove = true,
|
|
20
|
-
variant = "base",
|
|
21
|
-
allowDuplicates = false,
|
|
22
|
-
placeholder,
|
|
23
|
-
className
|
|
24
|
-
}, ref) => {
|
|
25
|
-
const innerRef = useRef(null);
|
|
26
|
-
const isControlledRef = useRef(typeof value !== "undefined");
|
|
27
|
-
const isControlled = isControlledRef.current;
|
|
28
|
-
const [uncontrolledValue, setUncontrolledValue] = useState([]);
|
|
29
|
-
useImperativeHandle(
|
|
30
|
-
ref,
|
|
31
|
-
() => innerRef.current
|
|
32
|
-
);
|
|
33
|
-
const [duplicateIndex, setDuplicateIndex] = useState(null);
|
|
34
|
-
const chips = isControlled ? value : uncontrolledValue;
|
|
35
|
-
const handleAddChip = (chip) => {
|
|
36
|
-
const cleanValue = chip.trim();
|
|
37
|
-
if (!cleanValue) {
|
|
38
|
-
return;
|
|
39
|
-
}
|
|
40
|
-
if (!allowDuplicates && chips.includes(cleanValue)) {
|
|
41
|
-
setDuplicateIndex(chips.indexOf(cleanValue));
|
|
42
|
-
setTimeout(() => {
|
|
43
|
-
setDuplicateIndex(null);
|
|
44
|
-
}, 300);
|
|
45
|
-
return;
|
|
46
|
-
}
|
|
47
|
-
onChange?.([...chips, cleanValue]);
|
|
48
|
-
if (!isControlled) {
|
|
49
|
-
setUncontrolledValue([...chips, cleanValue]);
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
const handleRemoveChip = (chip) => {
|
|
53
|
-
onChange?.(chips.filter((v) => v !== chip));
|
|
54
|
-
if (!isControlled) {
|
|
55
|
-
setUncontrolledValue(chips.filter((v) => v !== chip));
|
|
56
|
-
}
|
|
57
|
-
};
|
|
58
|
-
const handleBlur = (e) => {
|
|
59
|
-
onBlur?.();
|
|
60
|
-
if (e.target.value) {
|
|
61
|
-
handleAddChip(e.target.value);
|
|
62
|
-
e.target.value = "";
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
const handleKeyDown = (e) => {
|
|
66
|
-
if (e.key === "Enter" || e.key === ",") {
|
|
67
|
-
e.preventDefault();
|
|
68
|
-
if (!innerRef.current?.value) {
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
handleAddChip(innerRef.current?.value ?? "");
|
|
72
|
-
innerRef.current.value = "";
|
|
73
|
-
innerRef.current?.focus();
|
|
74
|
-
}
|
|
75
|
-
if (e.key === "Backspace" && innerRef.current?.value === "") {
|
|
76
|
-
handleRemoveChip(chips[chips.length - 1]);
|
|
77
|
-
}
|
|
78
|
-
};
|
|
79
|
-
const shake = {
|
|
80
|
-
x: [0, -2, 2, -2, 2, 0],
|
|
81
|
-
transition: { duration: 0.3 }
|
|
82
|
-
};
|
|
83
|
-
return /* @__PURE__ */ jsxs(
|
|
84
|
-
"div",
|
|
85
|
-
{
|
|
86
|
-
className: clx(
|
|
87
|
-
"shadow-borders-base flex min-h-8 flex-wrap items-center gap-1 rounded-md px-2 py-1.5",
|
|
88
|
-
"transition-fg focus-within:shadow-borders-interactive-with-active",
|
|
89
|
-
"has-[input:disabled]:bg-ui-bg-disabled has-[input:disabled]:text-ui-fg-disabled has-[input:disabled]:cursor-not-allowed",
|
|
90
|
-
{
|
|
91
|
-
"bg-ui-bg-field-component hover:bg-ui-bg-field-component-hover": variant === "contrast",
|
|
92
|
-
"bg-ui-bg-field hover:bg-ui-bg-field-hover": variant === "base"
|
|
93
|
-
},
|
|
94
|
-
className
|
|
95
|
-
),
|
|
96
|
-
tabIndex: -1,
|
|
97
|
-
onClick: () => innerRef.current?.focus(),
|
|
98
|
-
children: [
|
|
99
|
-
chips.map((v, index) => {
|
|
100
|
-
return /* @__PURE__ */ jsx(AnimatePresence, { children: /* @__PURE__ */ jsx(
|
|
101
|
-
Badge,
|
|
102
|
-
{
|
|
103
|
-
size: "2xsmall",
|
|
104
|
-
className: clx("gap-x-0.5 pl-1.5 pr-1.5", {
|
|
105
|
-
"transition-fg pr-1": showRemove,
|
|
106
|
-
"shadow-borders-focus": index === duplicateIndex
|
|
107
|
-
}),
|
|
108
|
-
asChild: true,
|
|
109
|
-
children: /* @__PURE__ */ jsxs(
|
|
110
|
-
motion.div,
|
|
111
|
-
{
|
|
112
|
-
animate: index === duplicateIndex ? shake : void 0,
|
|
113
|
-
children: [
|
|
114
|
-
v,
|
|
115
|
-
showRemove && /* @__PURE__ */ jsx(
|
|
116
|
-
"button",
|
|
117
|
-
{
|
|
118
|
-
tabIndex: -1,
|
|
119
|
-
type: "button",
|
|
120
|
-
onClick: () => handleRemoveChip(v),
|
|
121
|
-
className: clx(
|
|
122
|
-
"text-ui-fg-subtle transition-fg outline-none"
|
|
123
|
-
),
|
|
124
|
-
children: /* @__PURE__ */ jsx(XMarkMini, {})
|
|
125
|
-
}
|
|
126
|
-
)
|
|
127
|
-
]
|
|
128
|
-
}
|
|
129
|
-
)
|
|
130
|
-
}
|
|
131
|
-
) }, `${v}-${index}`);
|
|
132
|
-
}),
|
|
133
|
-
/* @__PURE__ */ jsx(
|
|
134
|
-
"input",
|
|
135
|
-
{
|
|
136
|
-
className: clx(
|
|
137
|
-
"caret-ui-fg-base text-ui-fg-base txt-compact-small flex-1 appearance-none bg-transparent",
|
|
138
|
-
"disabled:text-ui-fg-disabled disabled:cursor-not-allowed",
|
|
139
|
-
"focus:outline-none",
|
|
140
|
-
"placeholder:text-ui-fg-muted"
|
|
141
|
-
),
|
|
142
|
-
onKeyDown: handleKeyDown,
|
|
143
|
-
onBlur: handleBlur,
|
|
144
|
-
disabled,
|
|
145
|
-
name,
|
|
146
|
-
ref: innerRef,
|
|
147
|
-
placeholder: chips.length === 0 ? placeholder : void 0,
|
|
148
|
-
autoComplete: "off"
|
|
149
|
-
}
|
|
150
|
-
)
|
|
151
|
-
]
|
|
152
|
-
}
|
|
153
|
-
);
|
|
154
|
-
}
|
|
155
|
-
);
|
|
156
|
-
ChipInput.displayName = "ChipInput";
|
|
157
|
-
|
|
158
|
-
export {
|
|
159
|
-
ChipInput
|
|
160
|
-
};
|