@aplus-frontend/ui 0.1.40 → 0.1.41
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/es/src/ap-action/group/index.vue.d.ts +1 -1
- package/es/src/ap-download/interface.d.ts +1 -1
- package/es/src/ap-field/date/index.vue.d.ts +1 -1
- package/es/src/ap-field/date-range/index.vue.d.ts +1 -1
- package/es/src/ap-field/number/index.vue.d.ts +1 -1
- package/es/src/ap-field/rate/index.vue.d.ts +1 -1
- package/es/src/ap-field/select/index.vue.d.ts +1 -1
- package/es/src/ap-form/ap-form-item.vue.d.ts +1 -1
- package/es/src/ap-form/items/number/index.vue.d.ts +16 -16
- package/es/src/ap-form/items/text/index.vue.d.ts +12 -12
- package/es/src/ap-form/items/text/password.vue.d.ts +12 -12
- package/es/src/ap-form/items/text-area/index.vue.d.ts +12 -12
- package/es/src/ap-table/constants.d.ts +209 -209
- package/es/src/ap-table/utils.d.ts +72 -72
- package/es/src/base-button/index.d.ts +4 -4
- package/es/src/business/ap-label/ApLabel.d.ts +1 -1
- package/es/src/business/index.d.ts +11 -11
- package/es/src/check-card/group.vue.d.ts +1 -1
- package/es/src/config-provider/config-provider-props.d.ts +5 -0
- package/es/src/config-provider/config-provider-props.mjs +4 -0
- package/es/src/config-provider/config-provider.d.ts +90 -3
- package/es/src/config-provider/config-provider.mjs +27 -23
- package/es/src/config-provider/css-var.d.ts +88 -0
- package/es/src/{theme/css-var/index.mjs → config-provider/css-var.mjs} +1 -0
- package/es/src/config-provider/hooks/use-global-config.d.ts +5 -0
- package/es/src/config-provider/index.d.ts +486 -9
- package/es/src/theme/antd-global-overwrite/admin/button.css +0 -3
- package/es/src/theme/antd-global-overwrite/admin/index.css +0 -3
- package/es/src/theme/antd-global-overwrite/aplus/button.css +0 -3
- package/es/src/theme/antd-global-overwrite/aplus/index.css +0 -3
- package/es/src/type.d.ts +3 -0
- package/es/src/utils/config-provider-preset.d.ts +3 -3
- package/lib/src/ap-action/group/index.vue.d.ts +1 -1
- package/lib/src/ap-download/interface.d.ts +1 -1
- package/lib/src/ap-field/date/index.vue.d.ts +1 -1
- package/lib/src/ap-field/date-range/index.vue.d.ts +1 -1
- package/lib/src/ap-field/number/index.vue.d.ts +1 -1
- package/lib/src/ap-field/rate/index.vue.d.ts +1 -1
- package/lib/src/ap-field/select/index.vue.d.ts +1 -1
- package/lib/src/ap-form/ap-form-item.vue.d.ts +1 -1
- package/lib/src/ap-form/items/number/index.vue.d.ts +16 -16
- package/lib/src/ap-form/items/text/index.vue.d.ts +12 -12
- package/lib/src/ap-form/items/text/password.vue.d.ts +12 -12
- package/lib/src/ap-form/items/text-area/index.vue.d.ts +12 -12
- package/lib/src/ap-table/constants.d.ts +209 -209
- package/lib/src/ap-table/utils.d.ts +72 -72
- package/lib/src/base-button/index.d.ts +4 -4
- package/lib/src/business/ap-label/ApLabel.d.ts +1 -1
- package/lib/src/business/index.d.ts +11 -11
- package/lib/src/check-card/group.vue.d.ts +1 -1
- package/lib/src/config-provider/config-provider-props.d.ts +5 -0
- package/lib/src/config-provider/config-provider-props.js +1 -1
- package/lib/src/config-provider/config-provider.d.ts +90 -3
- package/lib/src/config-provider/config-provider.js +1 -1
- package/lib/src/config-provider/css-var.d.ts +88 -0
- package/lib/src/{theme/css-var/index.js → config-provider/css-var.js} +1 -1
- package/lib/src/config-provider/hooks/use-global-config.d.ts +5 -0
- package/lib/src/config-provider/index.d.ts +486 -9
- package/lib/src/theme/antd-global-overwrite/admin/button.css +0 -3
- package/lib/src/theme/antd-global-overwrite/admin/index.css +0 -3
- package/lib/src/theme/antd-global-overwrite/aplus/button.css +0 -3
- package/lib/src/theme/antd-global-overwrite/aplus/index.css +0 -3
- package/lib/src/type.d.ts +3 -0
- package/lib/src/utils/config-provider-preset.d.ts +3 -3
- package/package.json +2 -2
- package/es/src/theme/css-var/index.d.ts +0 -7
- package/lib/src/theme/css-var/index.d.ts +0 -7
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Ref, DefineComponent, PropType, ComponentOptionsMixin, PublicProps, ExtractPropTypes } from 'vue';
|
|
2
2
|
import { ConfigProviderProps } from './config-provider-props';
|
|
3
|
+
import { CssVarType } from './css-var';
|
|
3
4
|
import { default as __DTS_DEFAULT_0__ } from 'ant-design-vue/es/config-provider/renderEmpty';
|
|
4
5
|
import { TransformCellTextProps } from 'ant-design-vue/es/table/interface';
|
|
5
6
|
import { CSPConfig } from 'ant-design-vue/es/config-provider';
|
|
@@ -10,6 +11,7 @@ import { RequiredMark } from 'ant-design-vue/es/form/Form';
|
|
|
10
11
|
import { ThemeConfig } from 'ant-design-vue/es/config-provider/context';
|
|
11
12
|
import { LocaleType } from '..';
|
|
12
13
|
import { ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig } from './constants';
|
|
14
|
+
import { RecursivePartial } from '../type';
|
|
13
15
|
export declare const globalConfigCached: Ref<ConfigProviderProps>;
|
|
14
16
|
export declare const ConfigProvider: DefineComponent<{
|
|
15
17
|
iconPrefixCls: StringConstructor;
|
|
@@ -164,6 +166,10 @@ export declare const ConfigProvider: DefineComponent<{
|
|
|
164
166
|
type: PropType<downloadCenterTriggerConfig>;
|
|
165
167
|
default: () => {};
|
|
166
168
|
};
|
|
169
|
+
cssVar: {
|
|
170
|
+
type: PropType<CssVarType>;
|
|
171
|
+
default: () => {};
|
|
172
|
+
};
|
|
167
173
|
}, () => import("vue/jsx-runtime").JSX.Element, unknown, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly< ExtractPropTypes<{
|
|
168
174
|
iconPrefixCls: StringConstructor;
|
|
169
175
|
getTargetContainer: {
|
|
@@ -317,6 +323,10 @@ export declare const ConfigProvider: DefineComponent<{
|
|
|
317
323
|
type: PropType<downloadCenterTriggerConfig>;
|
|
318
324
|
default: () => {};
|
|
319
325
|
};
|
|
326
|
+
cssVar: {
|
|
327
|
+
type: PropType<CssVarType>;
|
|
328
|
+
default: () => {};
|
|
329
|
+
};
|
|
320
330
|
}>>, {
|
|
321
331
|
input: {
|
|
322
332
|
autocomplete?: string;
|
|
@@ -334,6 +344,9 @@ export declare const ConfigProvider: DefineComponent<{
|
|
|
334
344
|
};
|
|
335
345
|
scrollbar: ScrollbarGlobalConfig;
|
|
336
346
|
direction: "ltr" | "rtl";
|
|
347
|
+
pagination: {
|
|
348
|
+
showSizeChanger?: boolean;
|
|
349
|
+
};
|
|
337
350
|
csp: CSPConfig;
|
|
338
351
|
autoInsertSpaceInButton: boolean;
|
|
339
352
|
locale: Locale;
|
|
@@ -343,9 +356,6 @@ export declare const ConfigProvider: DefineComponent<{
|
|
|
343
356
|
componentDisabled: boolean;
|
|
344
357
|
virtual: boolean;
|
|
345
358
|
dropdownMatchSelectWidth: number | boolean;
|
|
346
|
-
pagination: {
|
|
347
|
-
showSizeChanger?: boolean;
|
|
348
|
-
};
|
|
349
359
|
theme: ThemeConfig;
|
|
350
360
|
wave: {
|
|
351
361
|
disabled?: boolean;
|
|
@@ -357,5 +367,82 @@ export declare const ConfigProvider: DefineComponent<{
|
|
|
357
367
|
apDescriptions: ApDescriptionsConfig;
|
|
358
368
|
valueTypeMap: Record<string, ValueTypeRenderConfig>;
|
|
359
369
|
downloadCenterTriggerConfig: downloadCenterTriggerConfig;
|
|
370
|
+
cssVar: RecursivePartial<{
|
|
371
|
+
'ap-form': {
|
|
372
|
+
bordered: {
|
|
373
|
+
'border-color': {
|
|
374
|
+
base: string;
|
|
375
|
+
hover: string;
|
|
376
|
+
active: string;
|
|
377
|
+
};
|
|
378
|
+
'shadow-color': string;
|
|
379
|
+
};
|
|
380
|
+
};
|
|
381
|
+
'ap-action': {
|
|
382
|
+
color: {
|
|
383
|
+
primary: {
|
|
384
|
+
base: string;
|
|
385
|
+
hover: string;
|
|
386
|
+
};
|
|
387
|
+
success: string;
|
|
388
|
+
error: string;
|
|
389
|
+
warn: string;
|
|
390
|
+
};
|
|
391
|
+
};
|
|
392
|
+
'check-card': {
|
|
393
|
+
outline: {
|
|
394
|
+
color: string;
|
|
395
|
+
};
|
|
396
|
+
hover: {
|
|
397
|
+
outline: {
|
|
398
|
+
color: string;
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
checked: {
|
|
402
|
+
outline: {
|
|
403
|
+
color: string;
|
|
404
|
+
};
|
|
405
|
+
bg: string;
|
|
406
|
+
};
|
|
407
|
+
};
|
|
408
|
+
'ap-table': {
|
|
409
|
+
header: {
|
|
410
|
+
bg: string;
|
|
411
|
+
};
|
|
412
|
+
pagination: {
|
|
413
|
+
total: {
|
|
414
|
+
color: string;
|
|
415
|
+
count: {
|
|
416
|
+
color: string;
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
};
|
|
420
|
+
setting: {
|
|
421
|
+
button: {
|
|
422
|
+
color: string;
|
|
423
|
+
};
|
|
424
|
+
};
|
|
425
|
+
};
|
|
426
|
+
'ap-batch-action': {
|
|
427
|
+
color: {
|
|
428
|
+
font: string;
|
|
429
|
+
active: string;
|
|
430
|
+
};
|
|
431
|
+
};
|
|
432
|
+
basic: {
|
|
433
|
+
color: {
|
|
434
|
+
primary: string;
|
|
435
|
+
};
|
|
436
|
+
};
|
|
437
|
+
'ap-descriptions': {
|
|
438
|
+
item: {
|
|
439
|
+
'padding-bottom': string;
|
|
440
|
+
'label-width': string;
|
|
441
|
+
};
|
|
442
|
+
'last-row-item': {
|
|
443
|
+
'padding-bottom': string;
|
|
444
|
+
};
|
|
445
|
+
};
|
|
446
|
+
}>;
|
|
360
447
|
}, {}>;
|
|
361
448
|
export type ConfigProviderInstance = InstanceType<typeof ConfigProvider>;
|
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { isVNode as
|
|
2
|
-
import { ConfigProvider as
|
|
3
|
-
import { provideGlobalConfig as
|
|
4
|
-
import { configProviderProps as
|
|
5
|
-
import { tableDefaultConfig as
|
|
6
|
-
import { mergeAntdProvideConfig as
|
|
7
|
-
import {
|
|
8
|
-
function
|
|
9
|
-
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !
|
|
1
|
+
import { isVNode as c, ref as u, defineComponent as s, computed as m, watch as t, createVNode as g, renderSlot as C } from "vue";
|
|
2
|
+
import { ConfigProvider as p } from "ant-design-vue";
|
|
3
|
+
import { provideGlobalConfig as v } from "./hooks/use-global-config.mjs";
|
|
4
|
+
import { configProviderProps as b } from "./config-provider-props.mjs";
|
|
5
|
+
import { tableDefaultConfig as V } from "./constants.mjs";
|
|
6
|
+
import { mergeAntdProvideConfig as P } from "../utils/config-provider-preset.mjs";
|
|
7
|
+
import { generateCssVar as w, aplusCssVar as y, adminCssVar as M, setCSSVariables as S } from "./css-var.mjs";
|
|
8
|
+
function T(e) {
|
|
9
|
+
return typeof e == "function" || Object.prototype.toString.call(e) === "[object Object]" && !c(e);
|
|
10
10
|
}
|
|
11
|
-
const
|
|
11
|
+
const r = u({}), U = /* @__PURE__ */ s({
|
|
12
12
|
name: "AplusConfigProvider",
|
|
13
|
-
props:
|
|
13
|
+
props: b(),
|
|
14
14
|
setup(e, {
|
|
15
|
-
slots:
|
|
15
|
+
slots: i
|
|
16
16
|
}) {
|
|
17
|
-
const n =
|
|
17
|
+
const n = m(() => ({
|
|
18
18
|
namespace: e.namespace,
|
|
19
19
|
aplusLocale: e.aplusLocale,
|
|
20
20
|
api: e.api,
|
|
21
21
|
table: {
|
|
22
|
-
...
|
|
22
|
+
...V,
|
|
23
23
|
...e.table || {}
|
|
24
24
|
},
|
|
25
25
|
scrollbar: e.scrollbar,
|
|
@@ -28,20 +28,24 @@ const a = d({}), A = /* @__PURE__ */ f({
|
|
|
28
28
|
apDescriptions: e.apDescriptions,
|
|
29
29
|
valueTypeMap: e.valueTypeMap,
|
|
30
30
|
downloadCenterTriggerConfig: e.downloadCenterTriggerConfig
|
|
31
|
-
})),
|
|
32
|
-
return
|
|
33
|
-
|
|
31
|
+
})), a = v(n);
|
|
32
|
+
return t(() => e, (o) => {
|
|
33
|
+
r.value = P(o);
|
|
34
34
|
}, {
|
|
35
35
|
deep: !0,
|
|
36
36
|
immediate: !0
|
|
37
|
-
}), typeof window < "u" &&
|
|
38
|
-
|
|
37
|
+
}), typeof window < "u" && t(() => [e.uiMode, e.cssVar], ([o, l]) => {
|
|
38
|
+
const d = w(l), f = {
|
|
39
|
+
...o === "aplus" ? y : M,
|
|
40
|
+
...d
|
|
41
|
+
};
|
|
42
|
+
S(f);
|
|
39
43
|
}, {
|
|
40
44
|
immediate: !0
|
|
41
45
|
}), () => {
|
|
42
46
|
let o;
|
|
43
|
-
return
|
|
44
|
-
config:
|
|
47
|
+
return g(p, r.value, T(o = C(i, "default", {
|
|
48
|
+
config: a == null ? void 0 : a.value
|
|
45
49
|
})) ? o : {
|
|
46
50
|
default: () => [o]
|
|
47
51
|
});
|
|
@@ -49,6 +53,6 @@ const a = d({}), A = /* @__PURE__ */ f({
|
|
|
49
53
|
}
|
|
50
54
|
});
|
|
51
55
|
export {
|
|
52
|
-
|
|
53
|
-
|
|
56
|
+
U as ConfigProvider,
|
|
57
|
+
r as globalConfigCached
|
|
54
58
|
};
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { RecursivePartial } from '../type';
|
|
2
|
+
declare const aplusCssVarObj: {
|
|
3
|
+
'ap-form': {
|
|
4
|
+
bordered: {
|
|
5
|
+
'border-color': {
|
|
6
|
+
base: string;
|
|
7
|
+
hover: string;
|
|
8
|
+
active: string;
|
|
9
|
+
};
|
|
10
|
+
'shadow-color': string;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
'ap-action': {
|
|
14
|
+
color: {
|
|
15
|
+
primary: {
|
|
16
|
+
base: string;
|
|
17
|
+
hover: string;
|
|
18
|
+
};
|
|
19
|
+
success: string;
|
|
20
|
+
error: string;
|
|
21
|
+
warn: string;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
'check-card': {
|
|
25
|
+
outline: {
|
|
26
|
+
color: string;
|
|
27
|
+
};
|
|
28
|
+
hover: {
|
|
29
|
+
outline: {
|
|
30
|
+
color: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
checked: {
|
|
34
|
+
outline: {
|
|
35
|
+
color: string;
|
|
36
|
+
};
|
|
37
|
+
bg: string;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
'ap-table': {
|
|
41
|
+
header: {
|
|
42
|
+
bg: string;
|
|
43
|
+
};
|
|
44
|
+
pagination: {
|
|
45
|
+
total: {
|
|
46
|
+
color: string;
|
|
47
|
+
count: {
|
|
48
|
+
color: string;
|
|
49
|
+
};
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
setting: {
|
|
53
|
+
button: {
|
|
54
|
+
color: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
'ap-batch-action': {
|
|
59
|
+
color: {
|
|
60
|
+
font: string;
|
|
61
|
+
active: string;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
basic: {
|
|
65
|
+
color: {
|
|
66
|
+
primary: string;
|
|
67
|
+
};
|
|
68
|
+
};
|
|
69
|
+
'ap-descriptions': {
|
|
70
|
+
item: {
|
|
71
|
+
'padding-bottom': string;
|
|
72
|
+
'label-width': string;
|
|
73
|
+
};
|
|
74
|
+
'last-row-item': {
|
|
75
|
+
'padding-bottom': string;
|
|
76
|
+
};
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
export type CssVarType = RecursivePartial<typeof aplusCssVarObj>;
|
|
80
|
+
export declare function generateCssVar(cssVarRawObj: CssVarType): Record<string, any>;
|
|
81
|
+
export declare const aplusCssVar: Record<string, any>;
|
|
82
|
+
export declare const adminCssVar: Record<string, any>;
|
|
83
|
+
/**
|
|
84
|
+
* 多次设置css变量(这种方式如果css变量过多可能会有性能问题)
|
|
85
|
+
* @param variables
|
|
86
|
+
*/
|
|
87
|
+
export declare function setCSSVariables(variables: Record<string, any>): void;
|
|
88
|
+
export {};
|
|
@@ -11,6 +11,7 @@ import { RequiredMark } from 'ant-design-vue/es/form/Form';
|
|
|
11
11
|
import { ThemeConfig } from 'ant-design-vue/es/config-provider/context';
|
|
12
12
|
import { LocaleType } from '../..';
|
|
13
13
|
import { ApiType, TableDefaultConfig, ScrollbarGlobalConfig, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig } from '..';
|
|
14
|
+
import { CssVarType } from '../css-var';
|
|
14
15
|
export declare const keysOf: <T extends Record<string, any>>(arr: T) => Array<keyof T>;
|
|
15
16
|
export declare function useGlobalConfig<K extends keyof ConfigProviderContext, D extends ConfigProviderContext[K]>(key: K, defaultValue?: D): Ref<Exclude<ConfigProviderContext[K], undefined> | D>;
|
|
16
17
|
export declare function useGlobalConfig(): Ref<ConfigProviderContext>;
|
|
@@ -167,4 +168,8 @@ export declare const provideGlobalConfig: (config: MaybeRef<ConfigProviderContex
|
|
|
167
168
|
type: PropType<downloadCenterTriggerConfig>;
|
|
168
169
|
default: () => {};
|
|
169
170
|
};
|
|
171
|
+
cssVar: {
|
|
172
|
+
type: PropType<CssVarType>;
|
|
173
|
+
default: () => {};
|
|
174
|
+
};
|
|
170
175
|
}>>>> | undefined;
|