@wexio/messenger-widget-react 1.2.4 → 1.3.1
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/CHANGELOG.md +61 -1
- package/README.md +15 -1
- package/dist/{widget-react-DubCiNev.js → widget-react--IUy5lNt.js} +21 -20
- package/dist/{widget-react-CIy9jXND.js → widget-react-B7es3n1-.js} +1 -1
- package/dist/{widget-react-2tTH7-bO.js → widget-react-BAUpSGhZ.js} +1 -1
- package/dist/widget-react-BS9kUSRS.js +255 -0
- package/dist/{widget-react-CtvdaJvy.js → widget-react-BXf2Ty8d.js} +4 -4
- package/dist/{widget-react-DDEFbIbU.js → widget-react-BfO-uP4o.js} +89 -139
- package/dist/{widget-react-faSyVXFQ.js → widget-react-BgALABDe.js} +1 -1
- package/dist/{widget-react-DXP6EOCM.js → widget-react-BkXA6ytR.js} +1 -1
- package/dist/{widget-react-yTVzOzaU.js → widget-react-Bop75Z1t.js} +87 -87
- package/dist/widget-react-BxEjM2it.js +118 -0
- package/dist/{widget-react-CK8xTxwO.js → widget-react-C6lzldez.js} +4936 -4455
- package/dist/widget-react-CN_FIvMD.js +834 -0
- package/dist/{widget-react-CAsPo1rw.js → widget-react-DRER1XF_.js} +112 -112
- package/dist/widget-react-DSAyUf2U.js +229 -0
- package/dist/{widget-react-B9XrHKqv.js → widget-react-DbOJZl9F.js} +1238 -2052
- package/dist/{widget-react-BlTmXnei.js → widget-react-DgIxSjv7.js} +1 -1
- package/dist/widget-react-Ds5J9FbQ.js +27 -0
- package/dist/{widget-react-DV3UnggB.js → widget-react-MXOCL3Mg.js} +148 -237
- package/dist/{widget-react-B8rXZyxg.js → widget-react-SI7deQTE.js} +1 -1
- package/dist/{widget-react-AwEaD0v2.js → widget-react-bPokx9L5.js} +169 -273
- package/dist/widget-react-wSc9gIfG.js +198 -0
- package/dist/widget-react.d.ts +2 -2
- package/dist/widget-react.js +9387 -4696
- package/package.json +1 -1
- package/dist/widget-react-B9X7Tn7t.js +0 -125
- package/dist/widget-react-DNFROpaS.js +0 -262
|
@@ -11,247 +11,14 @@ import "react";
|
|
|
11
11
|
import "react-dom";
|
|
12
12
|
import "react/jsx-runtime";
|
|
13
13
|
import "react-dom/client";
|
|
14
|
-
import {
|
|
15
|
-
import { n as
|
|
16
|
-
import * as
|
|
17
|
-
import { jsx as
|
|
18
|
-
//#region dummy/help.ts
|
|
19
|
-
var l = [
|
|
20
|
-
"demo-cat-getting-started",
|
|
21
|
-
"demo-cat-automation",
|
|
22
|
-
"demo-cat-integrations",
|
|
23
|
-
"demo-cat-billing"
|
|
24
|
-
];
|
|
25
|
-
function u(e) {
|
|
26
|
-
return l.map((t) => ({
|
|
27
|
-
id: t,
|
|
28
|
-
articleCount: d.filter((e) => e.categoryId === t).length,
|
|
29
|
-
title: e.raw(`help.categories.${t}.title`),
|
|
30
|
-
description: e.raw(`help.categories.${t}.description`)
|
|
31
|
-
}));
|
|
32
|
-
}
|
|
33
|
-
var d = [
|
|
34
|
-
{
|
|
35
|
-
id: "demo-article-install",
|
|
36
|
-
slug: "install-the-widget",
|
|
37
|
-
categoryId: "demo-cat-getting-started",
|
|
38
|
-
viewCount: 2310,
|
|
39
|
-
publishedAt: "2026-01-12T10:00:00.000Z",
|
|
40
|
-
authorIds: ["maya"],
|
|
41
|
-
tagSlugs: ["setup", "install"]
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
id: "demo-article-flows",
|
|
45
|
-
slug: "build-your-first-flow",
|
|
46
|
-
categoryId: "demo-cat-automation",
|
|
47
|
-
viewCount: 1684,
|
|
48
|
-
publishedAt: "2026-02-04T10:00:00.000Z",
|
|
49
|
-
authorIds: ["leo"],
|
|
50
|
-
tagSlugs: ["automation", "flows"]
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
id: "demo-article-slack",
|
|
54
|
-
slug: "connect-slack",
|
|
55
|
-
categoryId: "demo-cat-integrations",
|
|
56
|
-
viewCount: 1102,
|
|
57
|
-
publishedAt: "2026-02-22T10:00:00.000Z",
|
|
58
|
-
authorIds: ["leo", "ira"],
|
|
59
|
-
tagSlugs: ["integrations", "slack"]
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
id: "demo-article-billing",
|
|
63
|
-
slug: "manage-billing",
|
|
64
|
-
categoryId: "demo-cat-billing",
|
|
65
|
-
viewCount: 540,
|
|
66
|
-
publishedAt: "2026-03-18T10:00:00.000Z",
|
|
67
|
-
authorIds: ["maya"],
|
|
68
|
-
tagSlugs: ["billing", "plans"]
|
|
69
|
-
},
|
|
70
|
-
{
|
|
71
|
-
id: "demo-article-theme",
|
|
72
|
-
slug: "customise-theme",
|
|
73
|
-
categoryId: "demo-cat-getting-started",
|
|
74
|
-
viewCount: 1340,
|
|
75
|
-
publishedAt: "2026-02-10T10:00:00.000Z",
|
|
76
|
-
authorIds: ["ira"],
|
|
77
|
-
tagSlugs: ["setup", "design"]
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
id: "demo-article-handoff",
|
|
81
|
-
slug: "human-handoff",
|
|
82
|
-
categoryId: "demo-cat-automation",
|
|
83
|
-
viewCount: 988,
|
|
84
|
-
publishedAt: "2026-03-01T10:00:00.000Z",
|
|
85
|
-
authorIds: ["leo"],
|
|
86
|
-
tagSlugs: ["automation", "ai"]
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
id: "demo-article-crm",
|
|
90
|
-
slug: "connect-crm",
|
|
91
|
-
categoryId: "demo-cat-integrations",
|
|
92
|
-
viewCount: 763,
|
|
93
|
-
publishedAt: "2026-03-25T10:00:00.000Z",
|
|
94
|
-
authorIds: ["ira"],
|
|
95
|
-
tagSlugs: ["integrations", "crm"]
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
id: "demo-article-shortcuts",
|
|
99
|
-
slug: "operator-shortcuts",
|
|
100
|
-
categoryId: "demo-cat-getting-started",
|
|
101
|
-
viewCount: 612,
|
|
102
|
-
publishedAt: "2026-04-08T10:00:00.000Z",
|
|
103
|
-
authorIds: ["maya"],
|
|
104
|
-
tagSlugs: ["productivity", "inbox"]
|
|
105
|
-
}
|
|
106
|
-
];
|
|
107
|
-
function f(e) {
|
|
108
|
-
return d.map(({ authorIds: t, tagSlugs: n, ...i }) => ({
|
|
109
|
-
...i,
|
|
110
|
-
title: e.raw(`help.articles.${i.id}.title`),
|
|
111
|
-
excerpt: e.raw(`help.articles.${i.id}.excerpt`),
|
|
112
|
-
contentMarkdown: e.raw(`help.articles.${i.id}.body`),
|
|
113
|
-
authors: r(t),
|
|
114
|
-
tags: n.map((t) => ({
|
|
115
|
-
_id: `demo-tag-${t}`,
|
|
116
|
-
slug: t,
|
|
117
|
-
label: e.raw(`help.tags.${t}`)
|
|
118
|
-
}))
|
|
119
|
-
}));
|
|
120
|
-
}
|
|
121
|
-
//#endregion
|
|
122
|
-
//#region node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
123
|
-
var p = Symbol.for("react.lazy"), m = s.use;
|
|
124
|
-
function h(e) {
|
|
125
|
-
return typeof e == "object" && !!e && "then" in e;
|
|
126
|
-
}
|
|
127
|
-
function g(e) {
|
|
128
|
-
return typeof e == "object" && !!e && "$$typeof" in e && e.$$typeof === p && "_payload" in e && h(e._payload);
|
|
129
|
-
}
|
|
130
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
131
|
-
function _(e) {
|
|
132
|
-
let t = /* @__PURE__ */ y(e), n = s.forwardRef((e, n) => {
|
|
133
|
-
let { children: r, ...i } = e;
|
|
134
|
-
g(r) && typeof m == "function" && (r = m(r._payload));
|
|
135
|
-
let a = s.Children.toArray(r), o = a.find(x);
|
|
136
|
-
if (o) {
|
|
137
|
-
let e = o.props.children, r = a.map((t) => t === o ? s.Children.count(e) > 1 ? s.Children.only(null) : s.isValidElement(e) ? e.props.children : null : t);
|
|
138
|
-
return /* @__PURE__ */ c(t, {
|
|
139
|
-
...i,
|
|
140
|
-
ref: n,
|
|
141
|
-
children: s.isValidElement(e) ? s.cloneElement(e, void 0, r) : null
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
return /* @__PURE__ */ c(t, {
|
|
145
|
-
...i,
|
|
146
|
-
ref: n,
|
|
147
|
-
children: r
|
|
148
|
-
});
|
|
149
|
-
});
|
|
150
|
-
return n.displayName = `${e}.Slot`, n;
|
|
151
|
-
}
|
|
152
|
-
var v = /* @__PURE__ */ _("Slot");
|
|
153
|
-
/* @__NO_SIDE_EFFECTS__ */
|
|
154
|
-
function y(t) {
|
|
155
|
-
let n = s.forwardRef((t, n) => {
|
|
156
|
-
let { children: r, ...i } = t;
|
|
157
|
-
if (g(r) && typeof m == "function" && (r = m(r._payload)), s.isValidElement(r)) {
|
|
158
|
-
let t = C(r), a = S(i, r.props);
|
|
159
|
-
return r.type !== s.Fragment && (a.ref = n ? e(n, t) : t), s.cloneElement(r, a);
|
|
160
|
-
}
|
|
161
|
-
return s.Children.count(r) > 1 ? s.Children.only(null) : null;
|
|
162
|
-
});
|
|
163
|
-
return n.displayName = `${t}.SlotClone`, n;
|
|
164
|
-
}
|
|
165
|
-
var b = Symbol("radix.slottable");
|
|
166
|
-
function x(e) {
|
|
167
|
-
return s.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === b;
|
|
168
|
-
}
|
|
169
|
-
function S(e, t) {
|
|
170
|
-
let n = { ...t };
|
|
171
|
-
for (let r in t) {
|
|
172
|
-
let i = e[r], a = t[r];
|
|
173
|
-
/^on[A-Z]/.test(r) ? i && a ? n[r] = (...e) => {
|
|
174
|
-
let t = a(...e);
|
|
175
|
-
return i(...e), t;
|
|
176
|
-
} : i && (n[r] = i) : r === "style" ? n[r] = {
|
|
177
|
-
...i,
|
|
178
|
-
...a
|
|
179
|
-
} : r === "className" && (n[r] = [i, a].filter(Boolean).join(" "));
|
|
180
|
-
}
|
|
181
|
-
return {
|
|
182
|
-
...e,
|
|
183
|
-
...n
|
|
184
|
-
};
|
|
185
|
-
}
|
|
186
|
-
function C(e) {
|
|
187
|
-
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
188
|
-
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
189
|
-
}
|
|
190
|
-
//#endregion
|
|
191
|
-
//#region node_modules/class-variance-authority/dist/index.mjs
|
|
192
|
-
var w = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, T = o, E = ((e, t) => (n) => {
|
|
193
|
-
if (t?.variants == null) return T(e, n?.class, n?.className);
|
|
194
|
-
let { variants: r, defaultVariants: i } = t, a = Object.keys(r).map((e) => {
|
|
195
|
-
let t = n?.[e], a = i?.[e];
|
|
196
|
-
if (t === null) return null;
|
|
197
|
-
let o = w(t) || w(a);
|
|
198
|
-
return r[e][o];
|
|
199
|
-
}), o = n && Object.entries(n).reduce((e, t) => {
|
|
200
|
-
let [n, r] = t;
|
|
201
|
-
return r === void 0 || (e[n] = r), e;
|
|
202
|
-
}, {});
|
|
203
|
-
return T(e, a, t?.compoundVariants?.reduce((e, t) => {
|
|
204
|
-
let { class: n, className: r, ...a } = t;
|
|
205
|
-
return Object.entries(a).every((e) => {
|
|
206
|
-
let [t, n] = e;
|
|
207
|
-
return Array.isArray(n) ? n.includes({
|
|
208
|
-
...i,
|
|
209
|
-
...o
|
|
210
|
-
}[t]) : {
|
|
211
|
-
...i,
|
|
212
|
-
...o
|
|
213
|
-
}[t] === n;
|
|
214
|
-
}) ? [
|
|
215
|
-
...e,
|
|
216
|
-
n,
|
|
217
|
-
r
|
|
218
|
-
] : e;
|
|
219
|
-
}, []), n?.class, n?.className);
|
|
220
|
-
})("inline-flex items-center justify-center gap-2 font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary focus-visible:ring-offset-2 focus-visible:ring-offset-wx-bg disabled:pointer-events-none disabled:opacity-50", {
|
|
221
|
-
variants: {
|
|
222
|
-
variant: {
|
|
223
|
-
solid: "bg-wx-primary text-wx-primary-fg hover:bg-wx-primary-hover",
|
|
224
|
-
tonal: "bg-wx-bg-elevated text-wx-fg hover:bg-wx-bg-elevated-2",
|
|
225
|
-
ghost: "bg-transparent text-wx-fg-muted hover:bg-wx-bg-elevated hover:text-wx-fg",
|
|
226
|
-
outline: "border border-wx-border bg-transparent text-wx-fg hover:bg-wx-bg-elevated"
|
|
227
|
-
},
|
|
228
|
-
size: {
|
|
229
|
-
sm: "h-8 px-3 text-xs rounded-wx-sm whitespace-nowrap",
|
|
230
|
-
md: "h-10 px-4 text-sm rounded-wx whitespace-nowrap",
|
|
231
|
-
lg: "h-12 px-5 text-sm rounded-wx-lg whitespace-nowrap",
|
|
232
|
-
tile: "w-full px-5 py-5 text-base rounded-wx-lg",
|
|
233
|
-
icon: "h-9 w-9 rounded-full whitespace-nowrap"
|
|
234
|
-
}
|
|
235
|
-
},
|
|
236
|
-
defaultVariants: {
|
|
237
|
-
variant: "solid",
|
|
238
|
-
size: "md"
|
|
239
|
-
}
|
|
240
|
-
}), D = s.forwardRef(({ className: e, variant: t, size: n, asChild: r = !1, ...i }, o) => /* @__PURE__ */ c(r ? v : "button", {
|
|
241
|
-
ref: o,
|
|
242
|
-
className: a(E({
|
|
243
|
-
variant: t,
|
|
244
|
-
size: n,
|
|
245
|
-
className: e
|
|
246
|
-
})),
|
|
247
|
-
...i
|
|
248
|
-
}));
|
|
249
|
-
D.displayName = "Button";
|
|
250
|
-
//#endregion
|
|
14
|
+
import { C as e, Et as t, Tt as n, wt as r } from "./widget-react-C6lzldez.js";
|
|
15
|
+
import { n as i, r as a } from "./widget-react-krPPnv02.js";
|
|
16
|
+
import * as o from "react";
|
|
17
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
251
18
|
//#region lib/graphql/queries/generated/help.generated.tsx
|
|
252
|
-
var
|
|
19
|
+
var c = {}, l = /* @__PURE__ */ function(e) {
|
|
253
20
|
return e.Popular = "POPULAR", e.Recent = "RECENT", e;
|
|
254
|
-
}({}),
|
|
21
|
+
}({}), u = t`
|
|
255
22
|
query VisitorHelpFolders($parentId: ID, $locale: String) {
|
|
256
23
|
visitorHelpFolders(parentId: $parentId, locale: $locale) {
|
|
257
24
|
_id
|
|
@@ -265,13 +32,13 @@ var O = {}, k = /* @__PURE__ */ function(e) {
|
|
|
265
32
|
}
|
|
266
33
|
}
|
|
267
34
|
`;
|
|
268
|
-
function
|
|
269
|
-
return
|
|
270
|
-
...
|
|
35
|
+
function d(e) {
|
|
36
|
+
return n(u, {
|
|
37
|
+
...c,
|
|
271
38
|
...e
|
|
272
39
|
});
|
|
273
40
|
}
|
|
274
|
-
|
|
41
|
+
t`
|
|
275
42
|
query VisitorHelpTags($locale: String) {
|
|
276
43
|
visitorHelpTags(locale: $locale) {
|
|
277
44
|
_id
|
|
@@ -281,7 +48,7 @@ i`
|
|
|
281
48
|
}
|
|
282
49
|
}
|
|
283
50
|
`;
|
|
284
|
-
var
|
|
51
|
+
var f = t`
|
|
285
52
|
query VisitorHelpList($args: VisitorHelpListArgs) {
|
|
286
53
|
visitorHelpList(args: $args) {
|
|
287
54
|
items {
|
|
@@ -325,13 +92,13 @@ var M = i`
|
|
|
325
92
|
}
|
|
326
93
|
}
|
|
327
94
|
`;
|
|
328
|
-
function
|
|
329
|
-
return
|
|
330
|
-
...
|
|
95
|
+
function p(e) {
|
|
96
|
+
return n(f, {
|
|
97
|
+
...c,
|
|
331
98
|
...e
|
|
332
99
|
});
|
|
333
100
|
}
|
|
334
|
-
var
|
|
101
|
+
var m = t`
|
|
335
102
|
query VisitorHelpArticle($args: VisitorHelpArticleArgs!) {
|
|
336
103
|
visitorHelpArticle(args: $args) {
|
|
337
104
|
_id
|
|
@@ -377,13 +144,13 @@ var P = i`
|
|
|
377
144
|
}
|
|
378
145
|
}
|
|
379
146
|
`;
|
|
380
|
-
function
|
|
381
|
-
return
|
|
382
|
-
...
|
|
147
|
+
function h(e) {
|
|
148
|
+
return n(m, {
|
|
149
|
+
...c,
|
|
383
150
|
...e
|
|
384
151
|
});
|
|
385
152
|
}
|
|
386
|
-
var
|
|
153
|
+
var g = t`
|
|
387
154
|
query VisitorHelpArticlesByIds($ids: [ID!]!, $locale: String) {
|
|
388
155
|
visitorHelpArticlesByIds(ids: $ids, locale: $locale) {
|
|
389
156
|
_id
|
|
@@ -398,13 +165,13 @@ var I = i`
|
|
|
398
165
|
}
|
|
399
166
|
}
|
|
400
167
|
`;
|
|
401
|
-
function
|
|
402
|
-
return
|
|
403
|
-
...
|
|
168
|
+
function _(e) {
|
|
169
|
+
return n(g, {
|
|
170
|
+
...c,
|
|
404
171
|
...e
|
|
405
172
|
});
|
|
406
173
|
}
|
|
407
|
-
var
|
|
174
|
+
var v = t`
|
|
408
175
|
query VisitorHelpRelated($articleId: ID!, $limit: Int, $locale: String) {
|
|
409
176
|
visitorHelpRelated(articleId: $articleId, limit: $limit, locale: $locale) {
|
|
410
177
|
_id
|
|
@@ -418,26 +185,26 @@ var R = i`
|
|
|
418
185
|
}
|
|
419
186
|
}
|
|
420
187
|
`;
|
|
421
|
-
function
|
|
422
|
-
return
|
|
423
|
-
...
|
|
188
|
+
function y(e) {
|
|
189
|
+
return n(v, {
|
|
190
|
+
...c,
|
|
424
191
|
...e
|
|
425
192
|
});
|
|
426
193
|
}
|
|
427
|
-
var
|
|
194
|
+
var b = t`
|
|
428
195
|
mutation RecordVisitorHelpView($articleId: String!) {
|
|
429
196
|
recordVisitorHelpView(articleId: $articleId) {
|
|
430
197
|
ok
|
|
431
198
|
}
|
|
432
199
|
}
|
|
433
200
|
`;
|
|
434
|
-
function
|
|
435
|
-
return
|
|
436
|
-
...
|
|
201
|
+
function x(e) {
|
|
202
|
+
return r(b, {
|
|
203
|
+
...c,
|
|
437
204
|
...e
|
|
438
205
|
});
|
|
439
206
|
}
|
|
440
|
-
var
|
|
207
|
+
var S = t`
|
|
441
208
|
query VisitorHelpListSlim($args: VisitorHelpListArgs) {
|
|
442
209
|
visitorHelpList(args: $args) {
|
|
443
210
|
items {
|
|
@@ -448,13 +215,13 @@ var H = i`
|
|
|
448
215
|
}
|
|
449
216
|
}
|
|
450
217
|
`;
|
|
451
|
-
function
|
|
452
|
-
return
|
|
453
|
-
...
|
|
218
|
+
function C(e) {
|
|
219
|
+
return n(S, {
|
|
220
|
+
...c,
|
|
454
221
|
...e
|
|
455
222
|
});
|
|
456
223
|
}
|
|
457
|
-
var
|
|
224
|
+
var w = t`
|
|
458
225
|
query VisitorHelpArticlesByIdsSlim($ids: [ID!]!, $locale: String) {
|
|
459
226
|
visitorHelpArticlesByIds(ids: $ids, locale: $locale) {
|
|
460
227
|
_id
|
|
@@ -463,13 +230,142 @@ var W = i`
|
|
|
463
230
|
}
|
|
464
231
|
}
|
|
465
232
|
`;
|
|
466
|
-
function
|
|
467
|
-
return
|
|
468
|
-
...
|
|
233
|
+
function T(e) {
|
|
234
|
+
return n(w, {
|
|
235
|
+
...c,
|
|
469
236
|
...e
|
|
470
237
|
});
|
|
471
238
|
}
|
|
472
239
|
//#endregion
|
|
473
|
-
|
|
240
|
+
//#region node_modules/@radix-ui/react-slot/dist/index.mjs
|
|
241
|
+
var E = Symbol.for("react.lazy"), D = o.use;
|
|
242
|
+
function O(e) {
|
|
243
|
+
return typeof e == "object" && !!e && "then" in e;
|
|
244
|
+
}
|
|
245
|
+
function k(e) {
|
|
246
|
+
return typeof e == "object" && !!e && "$$typeof" in e && e.$$typeof === E && "_payload" in e && O(e._payload);
|
|
247
|
+
}
|
|
248
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
249
|
+
function A(e) {
|
|
250
|
+
let t = /* @__PURE__ */ M(e), n = o.forwardRef((e, n) => {
|
|
251
|
+
let { children: r, ...i } = e;
|
|
252
|
+
k(r) && typeof D == "function" && (r = D(r._payload));
|
|
253
|
+
let a = o.Children.toArray(r), c = a.find(P);
|
|
254
|
+
if (c) {
|
|
255
|
+
let e = c.props.children, r = a.map((t) => t === c ? o.Children.count(e) > 1 ? o.Children.only(null) : o.isValidElement(e) ? e.props.children : null : t);
|
|
256
|
+
return /* @__PURE__ */ s(t, {
|
|
257
|
+
...i,
|
|
258
|
+
ref: n,
|
|
259
|
+
children: o.isValidElement(e) ? o.cloneElement(e, void 0, r) : null
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
return /* @__PURE__ */ s(t, {
|
|
263
|
+
...i,
|
|
264
|
+
ref: n,
|
|
265
|
+
children: r
|
|
266
|
+
});
|
|
267
|
+
});
|
|
268
|
+
return n.displayName = `${e}.Slot`, n;
|
|
269
|
+
}
|
|
270
|
+
var j = /* @__PURE__ */ A("Slot");
|
|
271
|
+
/* @__NO_SIDE_EFFECTS__ */
|
|
272
|
+
function M(t) {
|
|
273
|
+
let n = o.forwardRef((t, n) => {
|
|
274
|
+
let { children: r, ...i } = t;
|
|
275
|
+
if (k(r) && typeof D == "function" && (r = D(r._payload)), o.isValidElement(r)) {
|
|
276
|
+
let t = I(r), a = F(i, r.props);
|
|
277
|
+
return r.type !== o.Fragment && (a.ref = n ? e(n, t) : t), o.cloneElement(r, a);
|
|
278
|
+
}
|
|
279
|
+
return o.Children.count(r) > 1 ? o.Children.only(null) : null;
|
|
280
|
+
});
|
|
281
|
+
return n.displayName = `${t}.SlotClone`, n;
|
|
282
|
+
}
|
|
283
|
+
var N = Symbol("radix.slottable");
|
|
284
|
+
function P(e) {
|
|
285
|
+
return o.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === N;
|
|
286
|
+
}
|
|
287
|
+
function F(e, t) {
|
|
288
|
+
let n = { ...t };
|
|
289
|
+
for (let r in t) {
|
|
290
|
+
let i = e[r], a = t[r];
|
|
291
|
+
/^on[A-Z]/.test(r) ? i && a ? n[r] = (...e) => {
|
|
292
|
+
let t = a(...e);
|
|
293
|
+
return i(...e), t;
|
|
294
|
+
} : i && (n[r] = i) : r === "style" ? n[r] = {
|
|
295
|
+
...i,
|
|
296
|
+
...a
|
|
297
|
+
} : r === "className" && (n[r] = [i, a].filter(Boolean).join(" "));
|
|
298
|
+
}
|
|
299
|
+
return {
|
|
300
|
+
...e,
|
|
301
|
+
...n
|
|
302
|
+
};
|
|
303
|
+
}
|
|
304
|
+
function I(e) {
|
|
305
|
+
let t = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning;
|
|
306
|
+
return n ? e.ref : (t = Object.getOwnPropertyDescriptor(e, "ref")?.get, n = t && "isReactWarning" in t && t.isReactWarning, n ? e.props.ref : e.props.ref || e.ref);
|
|
307
|
+
}
|
|
308
|
+
//#endregion
|
|
309
|
+
//#region node_modules/class-variance-authority/dist/index.mjs
|
|
310
|
+
var L = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, R = a, z = ((e, t) => (n) => {
|
|
311
|
+
if (t?.variants == null) return R(e, n?.class, n?.className);
|
|
312
|
+
let { variants: r, defaultVariants: i } = t, a = Object.keys(r).map((e) => {
|
|
313
|
+
let t = n?.[e], a = i?.[e];
|
|
314
|
+
if (t === null) return null;
|
|
315
|
+
let o = L(t) || L(a);
|
|
316
|
+
return r[e][o];
|
|
317
|
+
}), o = n && Object.entries(n).reduce((e, t) => {
|
|
318
|
+
let [n, r] = t;
|
|
319
|
+
return r === void 0 || (e[n] = r), e;
|
|
320
|
+
}, {});
|
|
321
|
+
return R(e, a, t?.compoundVariants?.reduce((e, t) => {
|
|
322
|
+
let { class: n, className: r, ...a } = t;
|
|
323
|
+
return Object.entries(a).every((e) => {
|
|
324
|
+
let [t, n] = e;
|
|
325
|
+
return Array.isArray(n) ? n.includes({
|
|
326
|
+
...i,
|
|
327
|
+
...o
|
|
328
|
+
}[t]) : {
|
|
329
|
+
...i,
|
|
330
|
+
...o
|
|
331
|
+
}[t] === n;
|
|
332
|
+
}) ? [
|
|
333
|
+
...e,
|
|
334
|
+
n,
|
|
335
|
+
r
|
|
336
|
+
] : e;
|
|
337
|
+
}, []), n?.class, n?.className);
|
|
338
|
+
})("inline-flex items-center justify-center gap-2 font-semibold transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-wx-primary focus-visible:ring-offset-2 focus-visible:ring-offset-wx-bg disabled:pointer-events-none disabled:opacity-50", {
|
|
339
|
+
variants: {
|
|
340
|
+
variant: {
|
|
341
|
+
solid: "bg-wx-primary text-wx-primary-fg hover:bg-wx-primary-hover",
|
|
342
|
+
tonal: "bg-wx-bg-elevated text-wx-fg hover:bg-wx-bg-elevated-2",
|
|
343
|
+
ghost: "bg-transparent text-wx-fg-muted hover:bg-wx-bg-elevated hover:text-wx-fg",
|
|
344
|
+
outline: "border border-wx-border bg-transparent text-wx-fg hover:bg-wx-bg-elevated"
|
|
345
|
+
},
|
|
346
|
+
size: {
|
|
347
|
+
sm: "h-8 px-3 text-xs rounded-wx-sm whitespace-nowrap",
|
|
348
|
+
md: "h-10 px-4 text-sm rounded-wx whitespace-nowrap",
|
|
349
|
+
lg: "h-12 px-5 text-sm rounded-wx-lg whitespace-nowrap",
|
|
350
|
+
tile: "w-full px-5 py-5 text-base rounded-wx-lg",
|
|
351
|
+
icon: "h-9 w-9 rounded-full whitespace-nowrap"
|
|
352
|
+
}
|
|
353
|
+
},
|
|
354
|
+
defaultVariants: {
|
|
355
|
+
variant: "solid",
|
|
356
|
+
size: "md"
|
|
357
|
+
}
|
|
358
|
+
}), B = o.forwardRef(({ className: e, variant: t, size: n, asChild: r = !1, ...a }, o) => /* @__PURE__ */ s(r ? j : "button", {
|
|
359
|
+
ref: o,
|
|
360
|
+
className: i(z({
|
|
361
|
+
variant: t,
|
|
362
|
+
size: n,
|
|
363
|
+
className: e
|
|
364
|
+
})),
|
|
365
|
+
...a
|
|
366
|
+
}));
|
|
367
|
+
B.displayName = "Button";
|
|
368
|
+
//#endregion
|
|
369
|
+
export { f as a, _ as c, p as d, C as f, u as i, T as l, A as n, x as o, y as p, l as r, h as s, B as t, d as u };
|
|
474
370
|
|
|
475
|
-
//# sourceMappingURL=widget-react-
|
|
371
|
+
//# sourceMappingURL=widget-react-bPokx9L5.js.map
|