@antdv-next/x 1.2.4 → 1.2.5
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/index.umd.js +50 -16
- package/dist/package.js +1 -1
- package/dist/sender/Sender.d.ts +15 -0
- package/dist/sender/Sender.js +18 -6
- package/dist/sender/SenderHeader.d.ts +15 -0
- package/dist/sender/SenderHeader.js +13 -2
- package/dist/sender/SenderSwitch.d.ts +15 -0
- package/dist/sender/SenderSwitch.js +16 -5
- package/dist/sender/components/SlotTextAreaProseMirror.js +1 -1
- package/dist/sender/components/TextArea.js +1 -1
- package/dist/sender/interface.d.ts +4 -0
- package/dist/x-provider/context.d.ts +1 -3
- package/dist/x-provider/index.d.ts +1 -3
- package/es/antdv-next-x.esm.js +49 -25
- package/package.json +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
shiki_dist_themes_vitesse_dark_mjs = __toESM(shiki_dist_themes_vitesse_dark_mjs, 1);
|
|
67
67
|
shiki_dist_themes_vitesse_light_mjs = __toESM(shiki_dist_themes_vitesse_light_mjs, 1);
|
|
68
68
|
//#region package.json
|
|
69
|
-
var version = "1.2.
|
|
69
|
+
var version = "1.2.5";
|
|
70
70
|
//#endregion
|
|
71
71
|
//#region components/x-provider/context.ts
|
|
72
72
|
var XProviderContextKey = Symbol("antdv-next-x-provider-context");
|
|
@@ -21441,7 +21441,7 @@
|
|
|
21441
21441
|
"class": (0, _v_c_util.classNames)([
|
|
21442
21442
|
inputCls,
|
|
21443
21443
|
`${inputCls}-slot`,
|
|
21444
|
-
senderCtx.value.classNames?.input
|
|
21444
|
+
senderCtx.value.classes?.input ?? senderCtx.value.classNames?.input
|
|
21445
21445
|
]),
|
|
21446
21446
|
"style": mergeInputStyle.value,
|
|
21447
21447
|
"data-placeholder": senderCtx.value.placeholder
|
|
@@ -21641,7 +21641,7 @@
|
|
|
21641
21641
|
"ref": inputRef,
|
|
21642
21642
|
"disabled": ctx.disabled,
|
|
21643
21643
|
"style": ctx.styles?.input,
|
|
21644
|
-
"class": [`${ctx.prefixCls}-input`, ctx.classNames?.input],
|
|
21644
|
+
"class": [`${ctx.prefixCls}-input`, ctx.classes?.input ?? ctx.classNames?.input],
|
|
21645
21645
|
"autoSize": ctx.autoSize,
|
|
21646
21646
|
"value": ctx.value,
|
|
21647
21647
|
"onChange": (e) => {
|
|
@@ -22199,6 +22199,13 @@
|
|
|
22199
22199
|
type: [Boolean, Object],
|
|
22200
22200
|
default: () => ({ maxRows: 8 })
|
|
22201
22201
|
},
|
|
22202
|
+
classes: {
|
|
22203
|
+
type: Object,
|
|
22204
|
+
default: () => ({})
|
|
22205
|
+
},
|
|
22206
|
+
/**
|
|
22207
|
+
* @deprecated Use `classes` instead.
|
|
22208
|
+
*/
|
|
22202
22209
|
classNames: {
|
|
22203
22210
|
type: Object,
|
|
22204
22211
|
default: () => ({})
|
|
@@ -22362,6 +22369,10 @@
|
|
|
22362
22369
|
return inputRef.value?.getValue() ?? { value: "" };
|
|
22363
22370
|
}
|
|
22364
22371
|
});
|
|
22372
|
+
const mergedClasses = (0, vue.computed)(() => ({
|
|
22373
|
+
...props.classNames,
|
|
22374
|
+
...props.classes
|
|
22375
|
+
}));
|
|
22365
22376
|
provideSenderContext((0, vue.computed)(() => ({
|
|
22366
22377
|
value: mergedValue.value,
|
|
22367
22378
|
onChange: triggerValueChange,
|
|
@@ -22376,7 +22387,8 @@
|
|
|
22376
22387
|
submitType: props.submitType,
|
|
22377
22388
|
prefixCls: prefixCls.value,
|
|
22378
22389
|
styles: props.styles,
|
|
22379
|
-
|
|
22390
|
+
classes: mergedClasses.value,
|
|
22391
|
+
classNames: mergedClasses.value,
|
|
22380
22392
|
autoSize: props.autoSize,
|
|
22381
22393
|
triggerSend,
|
|
22382
22394
|
placeholder: props.placeholder,
|
|
@@ -22426,7 +22438,7 @@
|
|
|
22426
22438
|
contextConfig.value.classes?.root,
|
|
22427
22439
|
props.class,
|
|
22428
22440
|
props.rootClass,
|
|
22429
|
-
|
|
22441
|
+
mergedClasses.value.root,
|
|
22430
22442
|
hashId.value,
|
|
22431
22443
|
cssVarCls.value,
|
|
22432
22444
|
`${cls}-main`,
|
|
@@ -22444,7 +22456,7 @@
|
|
|
22444
22456
|
}, attrs), [
|
|
22445
22457
|
headerNode,
|
|
22446
22458
|
(0, vue.createVNode)("div", {
|
|
22447
|
-
"class": [`${cls}-content`,
|
|
22459
|
+
"class": [`${cls}-content`, mergedClasses.value.content],
|
|
22448
22460
|
"style": props.styles.content,
|
|
22449
22461
|
"onMousedown": (e) => {
|
|
22450
22462
|
const inputNode = containerRef.value?.querySelector(`.${cls}-input`);
|
|
@@ -22456,7 +22468,7 @@
|
|
|
22456
22468
|
"class": [
|
|
22457
22469
|
`${cls}-prefix`,
|
|
22458
22470
|
contextConfig.value.classes?.prefix,
|
|
22459
|
-
|
|
22471
|
+
mergedClasses.value.prefix
|
|
22460
22472
|
],
|
|
22461
22473
|
"style": [contextConfig.value.styles?.prefix, props.styles.prefix]
|
|
22462
22474
|
}, [prefixNode]),
|
|
@@ -22465,7 +22477,7 @@
|
|
|
22465
22477
|
"class": [
|
|
22466
22478
|
actionListCls,
|
|
22467
22479
|
contextConfig.value.classes?.suffix,
|
|
22468
|
-
|
|
22480
|
+
mergedClasses.value.suffix
|
|
22469
22481
|
],
|
|
22470
22482
|
"style": [contextConfig.value.styles?.suffix, props.styles.suffix]
|
|
22471
22483
|
}, [suffixNode])
|
|
@@ -22474,7 +22486,7 @@
|
|
|
22474
22486
|
"class": [
|
|
22475
22487
|
`${cls}-footer`,
|
|
22476
22488
|
contextConfig.value.classes?.footer,
|
|
22477
|
-
|
|
22489
|
+
mergedClasses.value.footer
|
|
22478
22490
|
],
|
|
22479
22491
|
"style": [contextConfig.value.styles?.footer, props.styles.footer]
|
|
22480
22492
|
}, [footerNode])
|
|
@@ -22511,6 +22523,13 @@
|
|
|
22511
22523
|
type: [String, Object],
|
|
22512
22524
|
default: void 0
|
|
22513
22525
|
},
|
|
22526
|
+
classes: {
|
|
22527
|
+
type: Object,
|
|
22528
|
+
default: () => ({})
|
|
22529
|
+
},
|
|
22530
|
+
/**
|
|
22531
|
+
* @deprecated Use `classes` instead.
|
|
22532
|
+
*/
|
|
22514
22533
|
classNames: {
|
|
22515
22534
|
type: Object,
|
|
22516
22535
|
default: () => ({})
|
|
@@ -22536,6 +22555,10 @@
|
|
|
22536
22555
|
return `${props.prefixCls ?? senderPrefix ?? "antd-sender"}-header`;
|
|
22537
22556
|
});
|
|
22538
22557
|
const direction = (0, vue.computed)(() => configCtx.value.direction);
|
|
22558
|
+
const mergedClasses = (0, vue.computed)(() => ({
|
|
22559
|
+
...props.classNames,
|
|
22560
|
+
...props.classes
|
|
22561
|
+
}));
|
|
22539
22562
|
return () => {
|
|
22540
22563
|
const headerCls = prefixCls.value;
|
|
22541
22564
|
const contentNode = (0, vue.createVNode)("div", {
|
|
@@ -22546,7 +22569,7 @@
|
|
|
22546
22569
|
],
|
|
22547
22570
|
"style": props.style
|
|
22548
22571
|
}, [(props.closable || props.title) && (0, vue.createVNode)("div", {
|
|
22549
|
-
"class": [`${headerCls}-header`,
|
|
22572
|
+
"class": [`${headerCls}-header`, mergedClasses.value.header],
|
|
22550
22573
|
"style": props.styles.header
|
|
22551
22574
|
}, [(0, vue.createVNode)("div", { "class": `${headerCls}-title` }, [slots.title?.() ?? props.title]), props.closable && (0, vue.createVNode)("div", { "class": `${headerCls}-close` }, [(0, vue.createVNode)(antdv_next.Button, {
|
|
22552
22575
|
"type": "text",
|
|
@@ -22554,7 +22577,7 @@
|
|
|
22554
22577
|
"size": "small",
|
|
22555
22578
|
"onClick": () => props.onOpenChange?.(!props.open)
|
|
22556
22579
|
}, null)])]), slots.default && (0, vue.createVNode)("div", {
|
|
22557
|
-
"class": [`${headerCls}-content`,
|
|
22580
|
+
"class": [`${headerCls}-content`, mergedClasses.value.content],
|
|
22558
22581
|
"style": props.styles.content
|
|
22559
22582
|
}, [slots.default()])]);
|
|
22560
22583
|
return (0, vue.createVNode)(vue.Transition, {
|
|
@@ -22644,6 +22667,13 @@
|
|
|
22644
22667
|
type: Function,
|
|
22645
22668
|
default: void 0
|
|
22646
22669
|
},
|
|
22670
|
+
classes: {
|
|
22671
|
+
type: Object,
|
|
22672
|
+
default: () => ({})
|
|
22673
|
+
},
|
|
22674
|
+
/**
|
|
22675
|
+
* @deprecated Use `classes` instead.
|
|
22676
|
+
*/
|
|
22647
22677
|
classNames: {
|
|
22648
22678
|
type: Object,
|
|
22649
22679
|
default: () => ({})
|
|
@@ -22670,6 +22700,10 @@
|
|
|
22670
22700
|
if (val !== void 0) innerChecked.value = val;
|
|
22671
22701
|
}, { immediate: true });
|
|
22672
22702
|
const mergedChecked = (0, vue.computed)(() => props.value ?? innerChecked.value);
|
|
22703
|
+
const mergedClasses = (0, vue.computed)(() => ({
|
|
22704
|
+
...props.classNames,
|
|
22705
|
+
...props.classes
|
|
22706
|
+
}));
|
|
22673
22707
|
expose({ get nativeElement() {
|
|
22674
22708
|
return containerRef.value;
|
|
22675
22709
|
} });
|
|
@@ -22686,8 +22720,8 @@
|
|
|
22686
22720
|
props.class,
|
|
22687
22721
|
props.rootClass,
|
|
22688
22722
|
contextConfig.value.classes?.switch,
|
|
22689
|
-
senderCtx.value.classNames?.switch,
|
|
22690
|
-
|
|
22723
|
+
senderCtx.value.classes?.switch ?? senderCtx.value.classNames?.switch,
|
|
22724
|
+
mergedClasses.value.root,
|
|
22691
22725
|
{
|
|
22692
22726
|
[`${cls}-checked`]: mergedChecked.value,
|
|
22693
22727
|
[`${cls}-rtl`]: direction.value === "rtl"
|
|
@@ -22702,12 +22736,12 @@
|
|
|
22702
22736
|
}, attrs), [(0, vue.createVNode)(antdv_next.Button, (0, vue.mergeProps)({
|
|
22703
22737
|
"disabled": props.disabled,
|
|
22704
22738
|
"loading": props.loading,
|
|
22705
|
-
"class": [`${cls}-content`,
|
|
22739
|
+
"class": [`${cls}-content`, mergedClasses.value.content],
|
|
22706
22740
|
"style": props.styles.content
|
|
22707
22741
|
}, {
|
|
22708
22742
|
classes: {
|
|
22709
|
-
icon:
|
|
22710
|
-
content:
|
|
22743
|
+
icon: mergedClasses.value.icon,
|
|
22744
|
+
content: mergedClasses.value.title
|
|
22711
22745
|
},
|
|
22712
22746
|
styles: {
|
|
22713
22747
|
icon: props.styles.icon,
|
package/dist/package.js
CHANGED
package/dist/sender/Sender.d.ts
CHANGED
|
@@ -66,6 +66,13 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
66
66
|
maxRows: number;
|
|
67
67
|
};
|
|
68
68
|
};
|
|
69
|
+
classes: {
|
|
70
|
+
type: PropType<Record<string, string>>;
|
|
71
|
+
default: () => {};
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* @deprecated Use `classes` instead.
|
|
75
|
+
*/
|
|
69
76
|
classNames: {
|
|
70
77
|
type: PropType<Record<string, string>>;
|
|
71
78
|
default: () => {};
|
|
@@ -200,6 +207,13 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
200
207
|
maxRows: number;
|
|
201
208
|
};
|
|
202
209
|
};
|
|
210
|
+
classes: {
|
|
211
|
+
type: PropType<Record<string, string>>;
|
|
212
|
+
default: () => {};
|
|
213
|
+
};
|
|
214
|
+
/**
|
|
215
|
+
* @deprecated Use `classes` instead.
|
|
216
|
+
*/
|
|
203
217
|
classNames: {
|
|
204
218
|
type: PropType<Record<string, string>>;
|
|
205
219
|
default: () => {};
|
|
@@ -278,6 +292,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
278
292
|
loading: boolean;
|
|
279
293
|
rootClass: string;
|
|
280
294
|
class: string;
|
|
295
|
+
classes: Record<string, string>;
|
|
281
296
|
styles: Record<string, CSSProperties>;
|
|
282
297
|
footer: BaseNode | NodeRender;
|
|
283
298
|
header: BaseNode | NodeRender;
|
package/dist/sender/Sender.js
CHANGED
|
@@ -87,6 +87,13 @@ var Sender_default = /* @__PURE__ */ defineComponent({
|
|
|
87
87
|
type: [Boolean, Object],
|
|
88
88
|
default: () => ({ maxRows: 8 })
|
|
89
89
|
},
|
|
90
|
+
classes: {
|
|
91
|
+
type: Object,
|
|
92
|
+
default: () => ({})
|
|
93
|
+
},
|
|
94
|
+
/**
|
|
95
|
+
* @deprecated Use `classes` instead.
|
|
96
|
+
*/
|
|
90
97
|
classNames: {
|
|
91
98
|
type: Object,
|
|
92
99
|
default: () => ({})
|
|
@@ -250,6 +257,10 @@ var Sender_default = /* @__PURE__ */ defineComponent({
|
|
|
250
257
|
return inputRef.value?.getValue() ?? { value: "" };
|
|
251
258
|
}
|
|
252
259
|
});
|
|
260
|
+
const mergedClasses = computed(() => ({
|
|
261
|
+
...props.classNames,
|
|
262
|
+
...props.classes
|
|
263
|
+
}));
|
|
253
264
|
provideSenderContext(computed(() => ({
|
|
254
265
|
value: mergedValue.value,
|
|
255
266
|
onChange: triggerValueChange,
|
|
@@ -264,7 +275,8 @@ var Sender_default = /* @__PURE__ */ defineComponent({
|
|
|
264
275
|
submitType: props.submitType,
|
|
265
276
|
prefixCls: prefixCls.value,
|
|
266
277
|
styles: props.styles,
|
|
267
|
-
|
|
278
|
+
classes: mergedClasses.value,
|
|
279
|
+
classNames: mergedClasses.value,
|
|
268
280
|
autoSize: props.autoSize,
|
|
269
281
|
triggerSend,
|
|
270
282
|
placeholder: props.placeholder,
|
|
@@ -314,7 +326,7 @@ var Sender_default = /* @__PURE__ */ defineComponent({
|
|
|
314
326
|
contextConfig.value.classes?.root,
|
|
315
327
|
props.class,
|
|
316
328
|
props.rootClass,
|
|
317
|
-
|
|
329
|
+
mergedClasses.value.root,
|
|
318
330
|
hashId.value,
|
|
319
331
|
cssVarCls.value,
|
|
320
332
|
`${cls}-main`,
|
|
@@ -332,7 +344,7 @@ var Sender_default = /* @__PURE__ */ defineComponent({
|
|
|
332
344
|
}, attrs), [
|
|
333
345
|
headerNode,
|
|
334
346
|
createVNode("div", {
|
|
335
|
-
"class": [`${cls}-content`,
|
|
347
|
+
"class": [`${cls}-content`, mergedClasses.value.content],
|
|
336
348
|
"style": props.styles.content,
|
|
337
349
|
"onMousedown": (e) => {
|
|
338
350
|
const inputNode = containerRef.value?.querySelector(`.${cls}-input`);
|
|
@@ -344,7 +356,7 @@ var Sender_default = /* @__PURE__ */ defineComponent({
|
|
|
344
356
|
"class": [
|
|
345
357
|
`${cls}-prefix`,
|
|
346
358
|
contextConfig.value.classes?.prefix,
|
|
347
|
-
|
|
359
|
+
mergedClasses.value.prefix
|
|
348
360
|
],
|
|
349
361
|
"style": [contextConfig.value.styles?.prefix, props.styles.prefix]
|
|
350
362
|
}, [prefixNode]),
|
|
@@ -353,7 +365,7 @@ var Sender_default = /* @__PURE__ */ defineComponent({
|
|
|
353
365
|
"class": [
|
|
354
366
|
actionListCls,
|
|
355
367
|
contextConfig.value.classes?.suffix,
|
|
356
|
-
|
|
368
|
+
mergedClasses.value.suffix
|
|
357
369
|
],
|
|
358
370
|
"style": [contextConfig.value.styles?.suffix, props.styles.suffix]
|
|
359
371
|
}, [suffixNode])
|
|
@@ -362,7 +374,7 @@ var Sender_default = /* @__PURE__ */ defineComponent({
|
|
|
362
374
|
"class": [
|
|
363
375
|
`${cls}-footer`,
|
|
364
376
|
contextConfig.value.classes?.footer,
|
|
365
|
-
|
|
377
|
+
mergedClasses.value.footer
|
|
366
378
|
],
|
|
367
379
|
"style": [contextConfig.value.styles?.footer, props.styles.footer]
|
|
368
380
|
}, [footerNode])
|
|
@@ -25,6 +25,13 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
25
25
|
type: PropType<string | CSSProperties>;
|
|
26
26
|
default: undefined;
|
|
27
27
|
};
|
|
28
|
+
classes: {
|
|
29
|
+
type: PropType<Partial<Record<HeaderSemanticType, string>>>;
|
|
30
|
+
default: () => {};
|
|
31
|
+
};
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated Use `classes` instead.
|
|
34
|
+
*/
|
|
28
35
|
classNames: {
|
|
29
36
|
type: PropType<Partial<Record<HeaderSemanticType, string>>>;
|
|
30
37
|
default: () => {};
|
|
@@ -66,6 +73,13 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
66
73
|
type: PropType<string | CSSProperties>;
|
|
67
74
|
default: undefined;
|
|
68
75
|
};
|
|
76
|
+
classes: {
|
|
77
|
+
type: PropType<Partial<Record<HeaderSemanticType, string>>>;
|
|
78
|
+
default: () => {};
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* @deprecated Use `classes` instead.
|
|
82
|
+
*/
|
|
69
83
|
classNames: {
|
|
70
84
|
type: PropType<Partial<Record<HeaderSemanticType, string>>>;
|
|
71
85
|
default: () => {};
|
|
@@ -87,6 +101,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
87
101
|
style: string | CSSProperties;
|
|
88
102
|
open: boolean;
|
|
89
103
|
class: string;
|
|
104
|
+
classes: Partial<Record<HeaderSemanticType, string>>;
|
|
90
105
|
styles: Partial<Record<HeaderSemanticType, CSSProperties>>;
|
|
91
106
|
title: string | Record<string, any>;
|
|
92
107
|
onOpenChange: (open: boolean) => void;
|
|
@@ -31,6 +31,13 @@ var SenderHeader_default = /* @__PURE__ */ defineComponent({
|
|
|
31
31
|
type: [String, Object],
|
|
32
32
|
default: void 0
|
|
33
33
|
},
|
|
34
|
+
classes: {
|
|
35
|
+
type: Object,
|
|
36
|
+
default: () => ({})
|
|
37
|
+
},
|
|
38
|
+
/**
|
|
39
|
+
* @deprecated Use `classes` instead.
|
|
40
|
+
*/
|
|
34
41
|
classNames: {
|
|
35
42
|
type: Object,
|
|
36
43
|
default: () => ({})
|
|
@@ -56,6 +63,10 @@ var SenderHeader_default = /* @__PURE__ */ defineComponent({
|
|
|
56
63
|
return `${props.prefixCls ?? senderPrefix ?? "antd-sender"}-header`;
|
|
57
64
|
});
|
|
58
65
|
const direction = computed(() => configCtx.value.direction);
|
|
66
|
+
const mergedClasses = computed(() => ({
|
|
67
|
+
...props.classNames,
|
|
68
|
+
...props.classes
|
|
69
|
+
}));
|
|
59
70
|
return () => {
|
|
60
71
|
const headerCls = prefixCls.value;
|
|
61
72
|
const contentNode = createVNode("div", {
|
|
@@ -66,7 +77,7 @@ var SenderHeader_default = /* @__PURE__ */ defineComponent({
|
|
|
66
77
|
],
|
|
67
78
|
"style": props.style
|
|
68
79
|
}, [(props.closable || props.title) && createVNode("div", {
|
|
69
|
-
"class": [`${headerCls}-header`,
|
|
80
|
+
"class": [`${headerCls}-header`, mergedClasses.value.header],
|
|
70
81
|
"style": props.styles.header
|
|
71
82
|
}, [createVNode("div", { "class": `${headerCls}-title` }, [slots.title?.() ?? props.title]), props.closable && createVNode("div", { "class": `${headerCls}-close` }, [createVNode(Button, {
|
|
72
83
|
"type": "text",
|
|
@@ -74,7 +85,7 @@ var SenderHeader_default = /* @__PURE__ */ defineComponent({
|
|
|
74
85
|
"size": "small",
|
|
75
86
|
"onClick": () => props.onOpenChange?.(!props.open)
|
|
76
87
|
}, null)])]), slots.default && createVNode("div", {
|
|
77
|
-
"class": [`${headerCls}-content`,
|
|
88
|
+
"class": [`${headerCls}-content`, mergedClasses.value.content],
|
|
78
89
|
"style": props.styles.content
|
|
79
90
|
}, [slots.default()])]);
|
|
80
91
|
return createVNode(Transition, {
|
|
@@ -49,6 +49,13 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
49
49
|
type: PropType<(checked: boolean) => void>;
|
|
50
50
|
default: undefined;
|
|
51
51
|
};
|
|
52
|
+
classes: {
|
|
53
|
+
type: PropType<Partial<Record<SwitchSemanticType, string>>>;
|
|
54
|
+
default: () => {};
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* @deprecated Use `classes` instead.
|
|
58
|
+
*/
|
|
52
59
|
classNames: {
|
|
53
60
|
type: PropType<Partial<Record<SwitchSemanticType, string>>>;
|
|
54
61
|
default: () => {};
|
|
@@ -106,6 +113,13 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
106
113
|
type: PropType<(checked: boolean) => void>;
|
|
107
114
|
default: undefined;
|
|
108
115
|
};
|
|
116
|
+
classes: {
|
|
117
|
+
type: PropType<Partial<Record<SwitchSemanticType, string>>>;
|
|
118
|
+
default: () => {};
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* @deprecated Use `classes` instead.
|
|
122
|
+
*/
|
|
109
123
|
classNames: {
|
|
110
124
|
type: PropType<Partial<Record<SwitchSemanticType, string>>>;
|
|
111
125
|
default: () => {};
|
|
@@ -123,6 +137,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
123
137
|
loading: boolean;
|
|
124
138
|
rootClass: string;
|
|
125
139
|
class: string;
|
|
140
|
+
classes: Partial<Record<SwitchSemanticType, string>>;
|
|
126
141
|
styles: Partial<Record<SwitchSemanticType, CSSProperties>>;
|
|
127
142
|
onChange: (checked: boolean) => void;
|
|
128
143
|
classNames: Partial<Record<SwitchSemanticType, string>>;
|
|
@@ -60,6 +60,13 @@ var SenderSwitch_default = /* @__PURE__ */ defineComponent({
|
|
|
60
60
|
type: Function,
|
|
61
61
|
default: void 0
|
|
62
62
|
},
|
|
63
|
+
classes: {
|
|
64
|
+
type: Object,
|
|
65
|
+
default: () => ({})
|
|
66
|
+
},
|
|
67
|
+
/**
|
|
68
|
+
* @deprecated Use `classes` instead.
|
|
69
|
+
*/
|
|
63
70
|
classNames: {
|
|
64
71
|
type: Object,
|
|
65
72
|
default: () => ({})
|
|
@@ -86,6 +93,10 @@ var SenderSwitch_default = /* @__PURE__ */ defineComponent({
|
|
|
86
93
|
if (val !== void 0) innerChecked.value = val;
|
|
87
94
|
}, { immediate: true });
|
|
88
95
|
const mergedChecked = computed(() => props.value ?? innerChecked.value);
|
|
96
|
+
const mergedClasses = computed(() => ({
|
|
97
|
+
...props.classNames,
|
|
98
|
+
...props.classes
|
|
99
|
+
}));
|
|
89
100
|
expose({ get nativeElement() {
|
|
90
101
|
return containerRef.value;
|
|
91
102
|
} });
|
|
@@ -102,8 +113,8 @@ var SenderSwitch_default = /* @__PURE__ */ defineComponent({
|
|
|
102
113
|
props.class,
|
|
103
114
|
props.rootClass,
|
|
104
115
|
contextConfig.value.classes?.switch,
|
|
105
|
-
senderCtx.value.classNames?.switch,
|
|
106
|
-
|
|
116
|
+
senderCtx.value.classes?.switch ?? senderCtx.value.classNames?.switch,
|
|
117
|
+
mergedClasses.value.root,
|
|
107
118
|
{
|
|
108
119
|
[`${cls}-checked`]: mergedChecked.value,
|
|
109
120
|
[`${cls}-rtl`]: direction.value === "rtl"
|
|
@@ -118,12 +129,12 @@ var SenderSwitch_default = /* @__PURE__ */ defineComponent({
|
|
|
118
129
|
}, attrs), [createVNode(Button, mergeProps({
|
|
119
130
|
"disabled": props.disabled,
|
|
120
131
|
"loading": props.loading,
|
|
121
|
-
"class": [`${cls}-content`,
|
|
132
|
+
"class": [`${cls}-content`, mergedClasses.value.content],
|
|
122
133
|
"style": props.styles.content
|
|
123
134
|
}, {
|
|
124
135
|
classes: {
|
|
125
|
-
icon:
|
|
126
|
-
content:
|
|
136
|
+
icon: mergedClasses.value.icon,
|
|
137
|
+
content: mergedClasses.value.title
|
|
127
138
|
},
|
|
128
139
|
styles: {
|
|
129
140
|
icon: props.styles.icon,
|
|
@@ -1160,7 +1160,7 @@ var SlotTextAreaProseMirror_default = /* @__PURE__ */ defineComponent({
|
|
|
1160
1160
|
"class": classNames([
|
|
1161
1161
|
inputCls,
|
|
1162
1162
|
`${inputCls}-slot`,
|
|
1163
|
-
senderCtx.value.classNames?.input
|
|
1163
|
+
senderCtx.value.classes?.input ?? senderCtx.value.classNames?.input
|
|
1164
1164
|
]),
|
|
1165
1165
|
"style": mergeInputStyle.value,
|
|
1166
1166
|
"data-placeholder": senderCtx.value.placeholder
|
|
@@ -113,7 +113,7 @@ var TextArea_default = /* @__PURE__ */ defineComponent({
|
|
|
113
113
|
"ref": inputRef,
|
|
114
114
|
"disabled": ctx.disabled,
|
|
115
115
|
"style": ctx.styles?.input,
|
|
116
|
-
"class": [`${ctx.prefixCls}-input`, ctx.classNames?.input],
|
|
116
|
+
"class": [`${ctx.prefixCls}-input`, ctx.classes?.input ?? ctx.classNames?.input],
|
|
117
117
|
"autoSize": ctx.autoSize,
|
|
118
118
|
"value": ctx.value,
|
|
119
119
|
"onChange": (e) => {
|
|
@@ -116,6 +116,10 @@ export interface SenderProps {
|
|
|
116
116
|
onCut?: (event: ClipboardEvent, info: SenderCopyInfo) => void;
|
|
117
117
|
onFocus?: (event: FocusEvent) => void;
|
|
118
118
|
onBlur?: (event: FocusEvent) => void;
|
|
119
|
+
classes?: Partial<Record<SemanticType, string>>;
|
|
120
|
+
/**
|
|
121
|
+
* @deprecated Use `classes` instead.
|
|
122
|
+
*/
|
|
119
123
|
classNames?: Partial<Record<SemanticType, string>>;
|
|
120
124
|
styles?: Partial<Record<SemanticType, CSSProperties>>;
|
|
121
125
|
rootClass?: string;
|
|
@@ -35,9 +35,7 @@ export interface XComponentsConfig {
|
|
|
35
35
|
folder?: Pick<FolderProps, "style" | "styles" | "classes">;
|
|
36
36
|
mermaid?: Pick<MermaidProps, "style" | "styles" | "classes">;
|
|
37
37
|
prompts?: Pick<PromptsProps, "style" | "styles" | "classes">;
|
|
38
|
-
sender?: Pick<SenderProps, "style" | "styles" | "
|
|
39
|
-
classes?: SenderProps["classNames"];
|
|
40
|
-
};
|
|
38
|
+
sender?: Pick<SenderProps, "style" | "styles" | "classes" | "classNames">;
|
|
41
39
|
suggestion?: Pick<SuggestionProps, "style" | "styles" | "classes">;
|
|
42
40
|
think?: Pick<ThinkProps, "style" | "styles" | "classes">;
|
|
43
41
|
thoughtChain?: Pick<ThoughtChainProps, "style" | "styles" | "classes">;
|
|
@@ -154,9 +154,7 @@ declare const XProvider: import('vue').DefineComponent<import('vue').ExtractProp
|
|
|
154
154
|
codeHighlighter: Pick<import('..').CodeHighlighterProps, "style" | "classes" | "styles"> | undefined;
|
|
155
155
|
mermaid: Pick<import('..').MermaidProps, "style" | "classes" | "styles"> | undefined;
|
|
156
156
|
prompts: Pick<import('..').PromptsProps, "style" | "classes" | "styles"> | undefined;
|
|
157
|
-
sender:
|
|
158
|
-
classes?: import('..').SenderProps["classNames"];
|
|
159
|
-
}) | undefined;
|
|
157
|
+
sender: Pick<import('..').SenderProps, "style" | "classes" | "styles" | "classNames"> | undefined;
|
|
160
158
|
suggestion: Pick<import('..').SuggestionProps<any>, "style" | "classes" | "styles"> | undefined;
|
|
161
159
|
think: Pick<import('..').ThinkProps, "style" | "classes" | "styles"> | undefined;
|
|
162
160
|
thoughtChain: Pick<import('..').ThoughtChainProps, "style" | "classes" | "styles"> | undefined;
|
package/es/antdv-next-x.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { S as e, _ as t, a as n, b as r, c as i, d as a, f as o, g as s, h as c, i as l, l as u, m as d, n as f, o as p, p as m, r as h, s as g, t as _, u as v, v as y, x as b, y as x } from "./Serializer-Sc9uEpQk.js";
|
|
2
2
|
import { Comment as S, Fragment as C, Teleport as w, Text as T, Transition as E, TransitionGroup as D, cloneVNode as O, computed as k, createTextVNode as A, createVNode as j, defineComponent as M, getCurrentInstance as N, getCurrentScope as P, h as F, inject as I, isVNode as L, markRaw as R, mergeDefaults as z, mergeProps as B, nextTick as V, onBeforeMount as ee, onBeforeUnmount as H, onBeforeUpdate as U, onMounted as te, onScopeDispose as ne, onUnmounted as re, onUpdated as ie, provide as W, reactive as ae, ref as G, render as oe, resolveDynamicComponent as se, shallowReactive as ce, shallowRef as K, toRaw as le, toRef as ue, toRefs as de, toValue as fe, triggerRef as pe, unref as me, useAttrs as he, useId as ge, useSlots as _e, vShow as ve, watch as q, watchEffect as ye, withDirectives as be } from "vue";
|
|
3
3
|
//#region package.json
|
|
4
|
-
var xe = "1.2.
|
|
4
|
+
var xe = "1.2.5", Se = "anticon", Ce = {}, we = [
|
|
5
5
|
"outlined",
|
|
6
6
|
"borderless",
|
|
7
7
|
"filled",
|
|
@@ -60508,7 +60508,7 @@ var sG = /* @__PURE__ */ M({
|
|
|
60508
60508
|
class: Y([
|
|
60509
60509
|
e,
|
|
60510
60510
|
`${e}-slot`,
|
|
60511
|
-
n.value.classNames?.input
|
|
60511
|
+
n.value.classes?.input ?? n.value.classNames?.input
|
|
60512
60512
|
]),
|
|
60513
60513
|
style: v.value,
|
|
60514
60514
|
"data-placeholder": n.value.placeholder
|
|
@@ -60657,7 +60657,7 @@ var bG = /* @__PURE__ */ M({
|
|
|
60657
60657
|
ref: r,
|
|
60658
60658
|
disabled: e.disabled,
|
|
60659
60659
|
style: e.styles?.input,
|
|
60660
|
-
class: [`${e.prefixCls}-input`, e.classNames?.input],
|
|
60660
|
+
class: [`${e.prefixCls}-input`, e.classes?.input ?? e.classNames?.input],
|
|
60661
60661
|
autoSize: e.autoSize,
|
|
60662
60662
|
value: e.value,
|
|
60663
60663
|
onChange: (t) => {
|
|
@@ -61147,6 +61147,10 @@ var CG = (e) => {
|
|
|
61147
61147
|
type: [Boolean, Object],
|
|
61148
61148
|
default: () => ({ maxRows: 8 })
|
|
61149
61149
|
},
|
|
61150
|
+
classes: {
|
|
61151
|
+
type: Object,
|
|
61152
|
+
default: () => ({})
|
|
61153
|
+
},
|
|
61150
61154
|
classNames: {
|
|
61151
61155
|
type: Object,
|
|
61152
61156
|
default: () => ({})
|
|
@@ -61288,7 +61292,12 @@ var CG = (e) => {
|
|
|
61288
61292
|
getValue() {
|
|
61289
61293
|
return f.value?.getValue() ?? { value: "" };
|
|
61290
61294
|
}
|
|
61291
|
-
})
|
|
61295
|
+
});
|
|
61296
|
+
let C = k(() => ({
|
|
61297
|
+
...e.classNames,
|
|
61298
|
+
...e.classes
|
|
61299
|
+
}));
|
|
61300
|
+
UW(k(() => ({
|
|
61292
61301
|
value: h.value,
|
|
61293
61302
|
onChange: g,
|
|
61294
61303
|
onKeyUp: e.onKeyUp,
|
|
@@ -61302,7 +61311,8 @@ var CG = (e) => {
|
|
|
61302
61311
|
submitType: e.submitType,
|
|
61303
61312
|
prefixCls: s.value,
|
|
61304
61313
|
styles: e.styles,
|
|
61305
|
-
|
|
61314
|
+
classes: C.value,
|
|
61315
|
+
classNames: C.value,
|
|
61306
61316
|
autoSize: e.autoSize,
|
|
61307
61317
|
triggerSend: x,
|
|
61308
61318
|
placeholder: e.placeholder,
|
|
@@ -61314,9 +61324,9 @@ var CG = (e) => {
|
|
|
61314
61324
|
_.value = e;
|
|
61315
61325
|
}
|
|
61316
61326
|
})));
|
|
61317
|
-
let
|
|
61327
|
+
let w = k(() => `${s.value}-actions-btn`);
|
|
61318
61328
|
UF(k(() => ({
|
|
61319
|
-
prefixCls:
|
|
61329
|
+
prefixCls: w.value,
|
|
61320
61330
|
onSend: x,
|
|
61321
61331
|
onSendDisabled: _.value,
|
|
61322
61332
|
onClear: S,
|
|
@@ -61328,12 +61338,12 @@ var CG = (e) => {
|
|
|
61328
61338
|
speechRecording: b.value,
|
|
61329
61339
|
disabled: e.disabled
|
|
61330
61340
|
})));
|
|
61331
|
-
let
|
|
61341
|
+
let T = (e, t, r) => n[t] ? n[t]?.({
|
|
61332
61342
|
defaultNode: r,
|
|
61333
61343
|
components: OG
|
|
61334
61344
|
}) : typeof e == "function" ? e(r, { components: OG }) : e || e === !1 ? e : null;
|
|
61335
61345
|
return () => {
|
|
61336
|
-
let t = s.value, n = `${t}-actions-list`, r = j(HE, { class: `${n}-presets` }, { default: () => [e.allowSpeech && j(bG, null, null), e.loading ? j(YF, null, null) : j(ZF, null, null)] }), a =
|
|
61346
|
+
let t = s.value, n = `${t}-actions-list`, r = j(HE, { class: `${n}-presets` }, { default: () => [e.allowSpeech && j(bG, null, null), e.loading ? j(YF, null, null) : j(ZF, null, null)] }), a = T(e.suffix, "suffix", r) ?? r, m = T(e.prefix, "prefix", r), h = T(e.header, "header", r), g = T(e.footer, "footer", r);
|
|
61337
61347
|
return j("div", B({
|
|
61338
61348
|
ref: d,
|
|
61339
61349
|
class: [
|
|
@@ -61341,7 +61351,7 @@ var CG = (e) => {
|
|
|
61341
61351
|
o.value.classes?.root,
|
|
61342
61352
|
e.class,
|
|
61343
61353
|
e.rootClass,
|
|
61344
|
-
|
|
61354
|
+
C.value.root,
|
|
61345
61355
|
l.value,
|
|
61346
61356
|
u.value,
|
|
61347
61357
|
`${t}-main`,
|
|
@@ -61359,7 +61369,7 @@ var CG = (e) => {
|
|
|
61359
61369
|
}, i), [
|
|
61360
61370
|
h,
|
|
61361
61371
|
j("div", {
|
|
61362
|
-
class: [`${t}-content`,
|
|
61372
|
+
class: [`${t}-content`, C.value.content],
|
|
61363
61373
|
style: e.styles.content,
|
|
61364
61374
|
onMousedown: (e) => {
|
|
61365
61375
|
let n = d.value?.querySelector(`.${t}-input`);
|
|
@@ -61370,7 +61380,7 @@ var CG = (e) => {
|
|
|
61370
61380
|
class: [
|
|
61371
61381
|
`${t}-prefix`,
|
|
61372
61382
|
o.value.classes?.prefix,
|
|
61373
|
-
|
|
61383
|
+
C.value.prefix
|
|
61374
61384
|
],
|
|
61375
61385
|
style: [o.value.styles?.prefix, e.styles.prefix]
|
|
61376
61386
|
}, [m]),
|
|
@@ -61379,7 +61389,7 @@ var CG = (e) => {
|
|
|
61379
61389
|
class: [
|
|
61380
61390
|
n,
|
|
61381
61391
|
o.value.classes?.suffix,
|
|
61382
|
-
|
|
61392
|
+
C.value.suffix
|
|
61383
61393
|
],
|
|
61384
61394
|
style: [o.value.styles?.suffix, e.styles.suffix]
|
|
61385
61395
|
}, [a])
|
|
@@ -61388,7 +61398,7 @@ var CG = (e) => {
|
|
|
61388
61398
|
class: [
|
|
61389
61399
|
`${t}-footer`,
|
|
61390
61400
|
o.value.classes?.footer,
|
|
61391
|
-
|
|
61401
|
+
C.value.footer
|
|
61392
61402
|
],
|
|
61393
61403
|
style: [o.value.styles?.footer, e.styles.footer]
|
|
61394
61404
|
}, [g])
|
|
@@ -61422,6 +61432,10 @@ var CG = (e) => {
|
|
|
61422
61432
|
type: [String, Object],
|
|
61423
61433
|
default: void 0
|
|
61424
61434
|
},
|
|
61435
|
+
classes: {
|
|
61436
|
+
type: Object,
|
|
61437
|
+
default: () => ({})
|
|
61438
|
+
},
|
|
61425
61439
|
classNames: {
|
|
61426
61440
|
type: Object,
|
|
61427
61441
|
default: () => ({})
|
|
@@ -61443,7 +61457,10 @@ var CG = (e) => {
|
|
|
61443
61457
|
let n = Oe(), r = HW(), i = k(() => {
|
|
61444
61458
|
let t = r.value.prefixCls;
|
|
61445
61459
|
return `${e.prefixCls ?? t ?? "antd-sender"}-header`;
|
|
61446
|
-
}), a = k(() => n.value.direction)
|
|
61460
|
+
}), a = k(() => n.value.direction), o = k(() => ({
|
|
61461
|
+
...e.classNames,
|
|
61462
|
+
...e.classes
|
|
61463
|
+
}));
|
|
61447
61464
|
return () => {
|
|
61448
61465
|
let n = i.value, r = j("div", {
|
|
61449
61466
|
class: [
|
|
@@ -61453,7 +61470,7 @@ var CG = (e) => {
|
|
|
61453
61470
|
],
|
|
61454
61471
|
style: e.style
|
|
61455
61472
|
}, [(e.closable || e.title) && j("div", {
|
|
61456
|
-
class: [`${n}-header`,
|
|
61473
|
+
class: [`${n}-header`, o.value.header],
|
|
61457
61474
|
style: e.styles.header
|
|
61458
61475
|
}, [j("div", { class: `${n}-title` }, [t.title?.() ?? e.title]), e.closable && j("div", { class: `${n}-close` }, [j(_h, {
|
|
61459
61476
|
type: "text",
|
|
@@ -61461,7 +61478,7 @@ var CG = (e) => {
|
|
|
61461
61478
|
size: "small",
|
|
61462
61479
|
onClick: () => e.onOpenChange?.(!e.open)
|
|
61463
61480
|
}, null)])]), t.default && j("div", {
|
|
61464
|
-
class: [`${n}-content`,
|
|
61481
|
+
class: [`${n}-content`, o.value.content],
|
|
61465
61482
|
style: e.styles.content
|
|
61466
61483
|
}, [t.default()])]);
|
|
61467
61484
|
return j(E, {
|
|
@@ -61543,6 +61560,10 @@ var CG = (e) => {
|
|
|
61543
61560
|
type: Function,
|
|
61544
61561
|
default: void 0
|
|
61545
61562
|
},
|
|
61563
|
+
classes: {
|
|
61564
|
+
type: Object,
|
|
61565
|
+
default: () => ({})
|
|
61566
|
+
},
|
|
61546
61567
|
classNames: {
|
|
61547
61568
|
type: Object,
|
|
61548
61569
|
default: () => ({})
|
|
@@ -61560,11 +61581,14 @@ var CG = (e) => {
|
|
|
61560
61581
|
q(() => e.value, (e) => {
|
|
61561
61582
|
e !== void 0 && (d.value = e);
|
|
61562
61583
|
}, { immediate: !0 });
|
|
61563
|
-
let f = k(() => e.value ?? d.value)
|
|
61584
|
+
let f = k(() => e.value ?? d.value), p = k(() => ({
|
|
61585
|
+
...e.classNames,
|
|
61586
|
+
...e.classes
|
|
61587
|
+
}));
|
|
61564
61588
|
return t({ get nativeElement() {
|
|
61565
61589
|
return u.value;
|
|
61566
61590
|
} }), () => {
|
|
61567
|
-
let t = c.value, i = n.icon?.() ?? e.icon,
|
|
61591
|
+
let t = c.value, i = n.icon?.() ?? e.icon, m = n.checkedChildren?.() ?? e.checkedChildren, h = n.unCheckedChildren?.() ?? e.unCheckedChildren;
|
|
61568
61592
|
return j("div", B({
|
|
61569
61593
|
ref: u,
|
|
61570
61594
|
class: [
|
|
@@ -61573,8 +61597,8 @@ var CG = (e) => {
|
|
|
61573
61597
|
e.class,
|
|
61574
61598
|
e.rootClass,
|
|
61575
61599
|
o.value.classes?.switch,
|
|
61576
|
-
a.value.classNames?.switch,
|
|
61577
|
-
|
|
61600
|
+
a.value.classes?.switch ?? a.value.classNames?.switch,
|
|
61601
|
+
p.value.root,
|
|
61578
61602
|
{
|
|
61579
61603
|
[`${t}-checked`]: f.value,
|
|
61580
61604
|
[`${t}-rtl`]: l.value === "rtl"
|
|
@@ -61589,12 +61613,12 @@ var CG = (e) => {
|
|
|
61589
61613
|
}, r), [j(_h, B({
|
|
61590
61614
|
disabled: e.disabled,
|
|
61591
61615
|
loading: e.loading,
|
|
61592
|
-
class: [`${t}-content`,
|
|
61616
|
+
class: [`${t}-content`, p.value.content],
|
|
61593
61617
|
style: e.styles.content
|
|
61594
61618
|
}, {
|
|
61595
61619
|
classes: {
|
|
61596
|
-
icon:
|
|
61597
|
-
content:
|
|
61620
|
+
icon: p.value.icon,
|
|
61621
|
+
content: p.value.title
|
|
61598
61622
|
},
|
|
61599
61623
|
styles: {
|
|
61600
61624
|
icon: e.styles.icon,
|
|
@@ -61608,7 +61632,7 @@ var CG = (e) => {
|
|
|
61608
61632
|
let t = !f.value;
|
|
61609
61633
|
d.value = t, e.onChange?.(t);
|
|
61610
61634
|
}
|
|
61611
|
-
}), { default: () => [f.value ?
|
|
61635
|
+
}), { default: () => [f.value ? m : h, n.default?.()] })]);
|
|
61612
61636
|
};
|
|
61613
61637
|
}
|
|
61614
61638
|
}), MG = kG;
|