@aplus-frontend/ui 7.0.0-beta.1 → 7.0.0-beta.3

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.
Files changed (143) hide show
  1. package/es/index.mjs +216 -218
  2. package/es/src/ag-grid/editable/form-item.vue.mjs +68 -63
  3. package/es/src/ag-grid/editable/index.vue.mjs +66 -61
  4. package/es/src/ag-grid/editable/interface.d.ts +3 -1
  5. package/es/src/ag-grid/hooks/use-editable-form-item-api.mjs +65 -63
  6. package/es/src/ag-grid/style/index.d.ts +28 -1
  7. package/es/src/ag-grid/style/index.mjs +56 -43
  8. package/es/src/ag-grid/theme.mjs +12 -11
  9. package/es/src/ap-action/item/index.vue2.mjs +14 -12
  10. package/es/src/ap-action/style/dropdown-item.mjs +4 -4
  11. package/es/src/ap-action/style/index.d.ts +5 -2
  12. package/es/src/ap-action/style/index.mjs +29 -23
  13. package/es/src/ap-button/ap-button.vue.mjs +45 -49
  14. package/es/src/ap-button/style/index.mjs +5 -4
  15. package/es/src/ap-download/hooks/useStyle.mjs +9 -9
  16. package/es/src/ap-form/style/item.d.ts +1 -2
  17. package/es/src/ap-form/style/item.mjs +12 -16
  18. package/es/src/ap-form/style/modal-form.d.ts +2 -1
  19. package/es/src/ap-form/style/modal-form.mjs +26 -13
  20. package/es/src/ap-form/style/search-form-sorter.d.ts +2 -1
  21. package/es/src/ap-form/style/search-form-sorter.mjs +20 -13
  22. package/es/src/ap-form/style/token.d.ts +25 -1
  23. package/es/src/ap-grid/hooks/use-table-style.mjs +1 -1
  24. package/es/src/ap-grid/index.vue.mjs +2 -2
  25. package/es/src/ap-grid/style/index.d.ts +4 -1
  26. package/es/src/ap-grid/style/index.mjs +10 -7
  27. package/es/src/ap-table/ap-table.vue2.mjs +2 -2
  28. package/es/src/ap-table/utils.mjs +14 -11
  29. package/es/src/ap-tag/ap-tag.vue.mjs +7 -6
  30. package/es/src/business/ap-appendix/style/index.d.ts +3 -2
  31. package/es/src/business/ap-appendix/style/index.mjs +19 -16
  32. package/es/src/business/ap-appendix/style/token.d.ts +4 -0
  33. package/es/src/business/ap-appendix/style/token.mjs +6 -0
  34. package/es/src/business/ap-attachment/ApAttachment.mjs +73 -73
  35. package/es/src/business/ap-attachment/style/index.mjs +1 -0
  36. package/es/src/business/ap-batch-action/style/index.mjs +3 -3
  37. package/es/src/business/ap-radio-group/style/index.mjs +3 -3
  38. package/es/src/business/ap-view/style/index.mjs +18 -21
  39. package/es/src/business/batch-input-group/style/index.d.ts +3 -0
  40. package/es/src/business/batch-input-group/style/index.mjs +9 -5
  41. package/es/src/check-card/style/index.mjs +37 -31
  42. package/es/src/config-provider/config-provider.d.ts +1 -2
  43. package/es/src/config-provider/hooks/use-global-config.d.ts +1 -2
  44. package/es/src/config-provider/hooks/use-global-config.mjs +42 -33
  45. package/es/src/config-provider/hooks/use-token.d.ts +7 -2
  46. package/es/src/config-provider/hooks/use-token.mjs +6 -3
  47. package/es/src/config-provider/index.d.ts +1 -2
  48. package/es/src/design-token/constants.d.ts +1 -6
  49. package/es/src/design-token/constants.mjs +2 -100
  50. package/es/src/design-token/index.d.ts +1 -1
  51. package/es/src/design-token/index.mjs +5 -6
  52. package/es/src/design-token/interface.d.ts +9 -1
  53. package/es/src/design-token/interface.mjs +1 -0
  54. package/es/src/full-screen/index.vue.mjs +31 -30
  55. package/es/src/index.mjs +196 -198
  56. package/es/src/mask/style/index.mjs +2 -2
  57. package/es/src/scroll-bar/style/index.mjs +17 -17
  58. package/es/src/splitter/style/index.d.ts +9 -1
  59. package/es/src/splitter/style/index.mjs +1 -2
  60. package/es/src/text/style/index.d.ts +4 -1
  61. package/es/src/text/style/index.mjs +22 -18
  62. package/es/src/utils/cssinjs/index.d.ts +1 -5
  63. package/es/src/utils/cssinjs/index.mjs +49 -39
  64. package/es/src/utils/cssinjs/instance.mjs +7 -7
  65. package/es/src/utils/cssinjs/plugin-append-cssvar.d.ts +6 -0
  66. package/es/src/utils/cssinjs/plugin-append-cssvar.mjs +6 -0
  67. package/es/src/utils/cssinjs/utils.d.ts +6 -0
  68. package/es/src/utils/cssinjs/utils.mjs +15 -0
  69. package/es/src/version.d.ts +1 -1
  70. package/es/src/version.mjs +1 -1
  71. package/lib/index.js +1 -1
  72. package/lib/src/ag-grid/editable/form-item.vue.js +1 -1
  73. package/lib/src/ag-grid/editable/index.vue.js +1 -1
  74. package/lib/src/ag-grid/editable/interface.d.ts +3 -1
  75. package/lib/src/ag-grid/hooks/use-editable-form-item-api.js +1 -1
  76. package/lib/src/ag-grid/style/index.d.ts +28 -1
  77. package/lib/src/ag-grid/style/index.js +1 -1
  78. package/lib/src/ag-grid/theme.js +1 -1
  79. package/lib/src/ap-action/item/index.vue2.js +1 -1
  80. package/lib/src/ap-action/style/dropdown-item.js +1 -1
  81. package/lib/src/ap-action/style/index.d.ts +5 -2
  82. package/lib/src/ap-action/style/index.js +1 -1
  83. package/lib/src/ap-button/ap-button.vue.js +1 -1
  84. package/lib/src/ap-button/style/index.js +1 -1
  85. package/lib/src/ap-download/hooks/useStyle.js +1 -1
  86. package/lib/src/ap-form/style/item.d.ts +1 -2
  87. package/lib/src/ap-form/style/item.js +1 -1
  88. package/lib/src/ap-form/style/modal-form.d.ts +2 -1
  89. package/lib/src/ap-form/style/modal-form.js +1 -1
  90. package/lib/src/ap-form/style/search-form-sorter.d.ts +2 -1
  91. package/lib/src/ap-form/style/search-form-sorter.js +1 -1
  92. package/lib/src/ap-form/style/token.d.ts +25 -1
  93. package/lib/src/ap-grid/hooks/use-table-style.js +1 -1
  94. package/lib/src/ap-grid/index.vue.js +1 -1
  95. package/lib/src/ap-grid/style/index.d.ts +4 -1
  96. package/lib/src/ap-grid/style/index.js +1 -1
  97. package/lib/src/ap-table/ap-table.vue2.js +1 -1
  98. package/lib/src/ap-table/utils.js +1 -1
  99. package/lib/src/ap-tag/ap-tag.vue.js +1 -1
  100. package/lib/src/business/ap-appendix/style/index.d.ts +3 -2
  101. package/lib/src/business/ap-appendix/style/index.js +1 -1
  102. package/lib/src/business/ap-appendix/style/token.d.ts +4 -0
  103. package/lib/src/business/ap-appendix/style/token.js +1 -0
  104. package/lib/src/business/ap-attachment/ApAttachment.js +1 -1
  105. package/lib/src/business/ap-attachment/style/index.js +1 -1
  106. package/lib/src/business/ap-batch-action/style/index.js +1 -1
  107. package/lib/src/business/ap-radio-group/style/index.js +1 -1
  108. package/lib/src/business/ap-view/style/index.js +1 -1
  109. package/lib/src/business/batch-input-group/style/index.d.ts +3 -0
  110. package/lib/src/business/batch-input-group/style/index.js +1 -1
  111. package/lib/src/check-card/style/index.js +1 -1
  112. package/lib/src/config-provider/config-provider.d.ts +1 -2
  113. package/lib/src/config-provider/hooks/use-global-config.d.ts +1 -2
  114. package/lib/src/config-provider/hooks/use-global-config.js +1 -1
  115. package/lib/src/config-provider/hooks/use-token.d.ts +7 -2
  116. package/lib/src/config-provider/hooks/use-token.js +1 -1
  117. package/lib/src/config-provider/index.d.ts +1 -2
  118. package/lib/src/design-token/constants.d.ts +1 -6
  119. package/lib/src/design-token/constants.js +1 -1
  120. package/lib/src/design-token/index.d.ts +1 -1
  121. package/lib/src/design-token/index.js +1 -1
  122. package/lib/src/design-token/interface.d.ts +9 -1
  123. package/lib/src/design-token/interface.js +1 -0
  124. package/lib/src/full-screen/index.vue.js +1 -1
  125. package/lib/src/index.js +1 -1
  126. package/lib/src/mask/style/index.js +2 -2
  127. package/lib/src/scroll-bar/style/index.js +1 -1
  128. package/lib/src/splitter/style/index.d.ts +9 -1
  129. package/lib/src/splitter/style/index.js +1 -1
  130. package/lib/src/text/style/index.d.ts +4 -1
  131. package/lib/src/text/style/index.js +1 -1
  132. package/lib/src/utils/cssinjs/index.d.ts +1 -5
  133. package/lib/src/utils/cssinjs/index.js +1 -1
  134. package/lib/src/utils/cssinjs/instance.js +1 -1
  135. package/lib/src/utils/cssinjs/plugin-append-cssvar.d.ts +6 -0
  136. package/lib/src/utils/cssinjs/plugin-append-cssvar.js +1 -0
  137. package/lib/src/utils/cssinjs/utils.d.ts +6 -0
  138. package/lib/src/utils/cssinjs/utils.js +1 -0
  139. package/lib/src/version.d.ts +1 -1
  140. package/lib/src/version.js +1 -1
  141. package/package.json +1 -1
  142. package/es/src/utils/cssinjs/plugin-specificity.mjs +0 -13
  143. package/lib/src/utils/cssinjs/plugin-specificity.js +0 -1
@@ -1,108 +1,108 @@
1
- import { defineComponent as M, ref as C, useSlots as U, computed as o, cloneVNode as W, toRaw as f, unref as _, createVNode as t, createTextVNode as j } from "vue";
2
- import { Tooltip as K, Popover as B } from "@aplus-frontend/antdv";
1
+ import { defineComponent as U, ref as F, useSlots as W, computed as n, cloneVNode as _, toRaw as v, unref as j, createVNode as t, createTextVNode as K } from "vue";
2
+ import { Tooltip as B, Popover as G } from "@aplus-frontend/antdv";
3
3
  import "../../config-provider/index.mjs";
4
- import { ApAttachmentProps as G } from "./constans.mjs";
5
- import { getHexWithOpacity as H, getFileInfo as w } from "../../ap-download/utils/getFileInfo.mjs";
6
- import { useOssInit as R } from "../../ap-download/hooks/index.mjs";
7
- import { debounce as q, isArray as D } from "lodash-unified";
8
- import { LoadingOutlined as v } from "@ant-design/icons-vue";
9
- import { warning as E } from "../../utils/warning.mjs";
10
- import J from "./style/index.mjs";
11
- import { useNamespace as Q } from "../../config-provider/hooks/use-namespace.mjs";
12
- import { useGlobalConfig as h } from "../../config-provider/hooks/use-global-config.mjs";
13
- import { useLocale as X } from "../../config-provider/hooks/use-locale.mjs";
14
- const ue = /* @__PURE__ */ M({
4
+ import { ApAttachmentProps as H } from "./constans.mjs";
5
+ import { getHexWithOpacity as R, getFileInfo as b } from "../../ap-download/utils/getFileInfo.mjs";
6
+ import { useOssInit as q } from "../../ap-download/hooks/index.mjs";
7
+ import { debounce as D, isArray as E } from "lodash-unified";
8
+ import { LoadingOutlined as h } from "@ant-design/icons-vue";
9
+ import { warning as J } from "../../utils/warning.mjs";
10
+ import Q from "./style/index.mjs";
11
+ import { useNamespace as X } from "../../config-provider/hooks/use-namespace.mjs";
12
+ import { useGlobalConfig as g } from "../../config-provider/hooks/use-global-config.mjs";
13
+ import { useLocale as Y } from "../../config-provider/hooks/use-locale.mjs";
14
+ const me = /* @__PURE__ */ U({
15
15
  name: "ApAttachment",
16
- props: G(),
16
+ props: H(),
17
17
  setup(e) {
18
18
  const {
19
- b: F,
20
- e: a
21
- } = Q("ap-attachment"), g = J("ap-attachment"), b = h("uiMode"), x = h("apUpload"), N = h("downloadCenterTriggerConfig"), {
22
- lang: O,
23
- t: m
24
- } = X(), i = C(!1), c = C(""), u = U(), T = o(() => O.value === "zh-cn" ? "zh_CN" : "en_US"), r = o(() => e.attachmentList.length === 1), L = o(() => e.needName ? e.attachmentList.length > 0 && e.needName && e.needName.nameKey ? e.attachmentList[0][e.needName.nameKey] : "" : e.attachmentList.length > 0 ? e.attachmentList[0].fileName : ""), P = o(() => r.value ? L.value : m("ap.apAttachment.downloadall")), p = o(() => e.color ? e.color : b.value === "aplus" ? "#0070FF" : "#1890FF"), y = o(() => ({
25
- "--download-main-color": p.value,
26
- "--download-main-color-opacity": H(p.value, 0.6)
27
- })), k = o(() => e.getOssAccess || x.value?.getOssAccess), I = o(() => {
28
- const l = u.default ? u.default()[0] : null;
29
- return l ? W(l, {
19
+ b: x,
20
+ e: l
21
+ } = X("ap-attachment"), p = Q("ap-attachment"), O = g("uiMode"), L = g("apUpload"), N = g("downloadCenterTriggerConfig"), {
22
+ lang: T,
23
+ t: r
24
+ } = Y(), c = F(!1), s = F(""), m = W(), P = n(() => T.value === "zh-cn" ? "zh_CN" : "en_US"), i = n(() => e.needName ?? L?.value?.needName), d = n(() => e.attachmentList.length === 1), y = n(() => i.value ? e.attachmentList.length > 0 && i.value && i.value?.nameKey ? e.attachmentList[0][i.value.nameKey] : "" : e.attachmentList.length > 0 ? e.attachmentList[0].fileName : ""), k = n(() => d.value ? y.value : r("ap.apAttachment.downloadall")), A = n(() => e.color ? e.color : O.value === "aplus" ? "#0070FF" : "#1890FF"), C = n(() => ({
25
+ "--download-main-color": A.value,
26
+ "--download-main-color-opacity": R(A.value, 0.6)
27
+ })), I = n(() => e.getOssAccess || L.value?.getOssAccess), S = n(() => {
28
+ const a = m.default ? m.default()[0] : null;
29
+ return a ? _(a, {
30
30
  style: {
31
31
  "font-size": "16px"
32
32
  }
33
33
  }) : null;
34
- }), d = q(async (l, s) => {
34
+ }), f = D(async (a, u) => {
35
35
  if (!e.disabled) {
36
- i.value = !0, s && (c.value = s);
36
+ c.value = !0, u && (s.value = u);
37
37
  try {
38
- const n = D(f(l)) ? f(l) : [f(l)];
38
+ const o = E(v(a)) ? v(a) : [v(a)];
39
39
  if (N.value?.trigger) {
40
- const z = w(e.needName, n).map((A) => ({
41
- objectName: A.path,
42
- fileName: A.fileName
40
+ const M = b(i.value, o).map((w) => ({
41
+ objectName: w.path,
42
+ fileName: w.fileName
43
43
  }));
44
- N.value?.trigger(z);
44
+ N.value?.trigger(M);
45
45
  } else
46
- await (await R(k.value, _(T))).downloadFile(w(e.needName, n));
47
- } catch (n) {
48
- E(!1, n);
46
+ await (await q(I.value, j(P))).downloadFile(b(i.value, o));
47
+ } catch (o) {
48
+ J(!1, o);
49
49
  } finally {
50
- i.value = !1, c.value = "";
50
+ c.value = !1, s.value = "";
51
51
  }
52
52
  }
53
- }, 500), S = (l) => l && l.length > 0 ? t("ul", {
54
- class: [a("file-list"), g.value],
55
- style: y.value
56
- }, [l.map((s, n) => t("li", {
57
- key: n,
58
- class: [a("file-item")],
59
- onClick: () => d(s, n + 1)
60
- }, [i.value && c.value === n + 1 ? t("span", {
61
- class: [a("spin")]
62
- }, [t(v, {
53
+ }, 500), V = (a) => a && a.length > 0 ? t("ul", {
54
+ class: [l("file-list"), p.value],
55
+ style: C.value
56
+ }, [a.map((u, o) => t("li", {
57
+ key: o,
58
+ class: [l("file-item")],
59
+ onClick: () => f(u, o + 1)
60
+ }, [c.value && s.value === o + 1 ? t("span", {
61
+ class: [l("spin")]
62
+ }, [t(h, {
63
63
  spin: !0
64
- }, null)]) : null, s.fileName])), t("li", {
65
- class: [a("download-all")],
66
- onClick: () => d(e.attachmentList, "all")
67
- }, [i.value && c.value === "all" ? t("span", {
68
- class: [a("spin")]
69
- }, [t(v, {
64
+ }, null)]) : null, u.fileName])), t("li", {
65
+ class: [l("download-all")],
66
+ onClick: () => f(e.attachmentList, "all")
67
+ }, [c.value && s.value === "all" ? t("span", {
68
+ class: [l("spin")]
69
+ }, [t(h, {
70
70
  spin: !0
71
- }, null)]) : null, m("ap.apAttachment.downloadall")])]) : null;
71
+ }, null)]) : null, r("ap.apAttachment.downloadall")])]) : null;
72
72
  return () => e.attachmentList?.length > 0 && t("div", {
73
- class: [F(), g.value],
74
- style: [y.value]
75
- }, [t(K, {
76
- title: P.value,
73
+ class: [x(), p.value],
74
+ style: [C.value]
75
+ }, [t(B, {
76
+ title: k.value,
77
77
  placement: e.textToolTipPlacement,
78
78
  color: e.toolTipBgColor
79
79
  }, {
80
80
  default: () => [t("div", {
81
- class: [a("content")],
82
- onClick: () => d(r.value ? e.attachmentList[0] : e.attachmentList, "global")
83
- }, [i.value && c.value === "global" ? t("div", {
84
- class: [a("spin")]
85
- }, [t(v, {
81
+ class: [l("content")],
82
+ onClick: () => f(d.value ? e.attachmentList[0] : e.attachmentList, "global")
83
+ }, [c.value && s.value === "global" ? t("div", {
84
+ class: [l("spin")]
85
+ }, [t(h, {
86
86
  spin: !0
87
- }, null)]) : null, u.default ? t("div", {
88
- class: [a("text-render")]
89
- }, [I.value, j(" ")]) : null, t("div", {
90
- class: [a("text-inner")],
87
+ }, null)]) : null, m.default ? t("div", {
88
+ class: [l("text-render")]
89
+ }, [S.value, K(" ")]) : null, t("div", {
90
+ class: [l("text-inner")],
91
91
  style: {
92
92
  "max-width": e.maxWidth ? e.maxWidth + "px" : "auto"
93
93
  }
94
- }, [L.value])])]
95
- }), t(B, {
96
- content: S(e.attachmentList),
94
+ }, [y.value])])]
95
+ }), t(G, {
96
+ content: V(e.attachmentList),
97
97
  placement: e.fileMorePopoverPlacement,
98
98
  color: "#fff"
99
99
  }, {
100
- default: () => [!r.value && t("div", {
101
- class: [a("more")]
102
- }, [m("ap.apAttachment.more")])]
100
+ default: () => [!d.value && t("div", {
101
+ class: [l("more")]
102
+ }, [r("ap.apAttachment.more")])]
103
103
  })]);
104
104
  }
105
105
  });
106
106
  export {
107
- ue as default
107
+ me as default
108
108
  };
@@ -39,6 +39,7 @@ const n = (r) => {
39
39
  lineHeight: r.lineHeight,
40
40
  cursor: "pointer",
41
41
  color: "var(--download-main-color)",
42
+ marginLeft: "8px",
42
43
  "&:hover": {
43
44
  color: "var(--download-main-color-opacity)"
44
45
  }
@@ -8,7 +8,7 @@ const n = (t) => {
8
8
  width: "100%",
9
9
  paddingBottom: "8px",
10
10
  marginBottom: "8px",
11
- borderBottom: "1px solid var(--ap-color-bg)"
11
+ borderBottom: `1px solid ${t.colorBg1}`
12
12
  },
13
13
  [`${e}-body`]: {
14
14
  width: "100%",
@@ -23,9 +23,9 @@ const n = (t) => {
23
23
  display: "flex",
24
24
  alignItems: "center",
25
25
  fontSize: t.fontSize,
26
- color: "var(--ap-text-color-3)",
26
+ color: t.textColor3,
27
27
  span: {
28
- color: "var(--ap-color-primary)",
28
+ color: t.colorPrimary,
29
29
  fontWeight: "bold",
30
30
  minWidth: "10px",
31
31
  textAlign: "center",
@@ -1,5 +1,5 @@
1
1
  import { genComponentStyleHook as a } from "../../../utils/cssinjs/index.mjs";
2
- const e = (o) => {
2
+ const i = (o) => {
3
3
  const { componentCls: r } = o;
4
4
  return {
5
5
  [r]: {
@@ -24,8 +24,8 @@ const e = (o) => {
24
24
  }
25
25
  };
26
26
  }, l = a(
27
- "ApRadioGroupToken",
28
- (o) => [e(o)],
27
+ "ApRadioGroup",
28
+ (o) => [i(o)],
29
29
  {
30
30
  apRadioGroupItemActiveBgColor: "rgba(0, 112, 255, 0.12)"
31
31
  }
@@ -1,28 +1,25 @@
1
1
  import { genComponentStyleHook as n } from "../../../utils/cssinjs/index.mjs";
2
- const o = (e) => {
3
- const { componentCls: t } = e;
2
+ const o = (t) => {
3
+ const { componentCls: e } = t;
4
4
  return {
5
- [t]: {
6
- ".ant-btn-default:has(&-main-content-disabled)": {
7
- borderColor: "var(--ap-border-color-base) !important"
8
- },
5
+ [e]: {
9
6
  "& > .ant-btn": {
10
7
  padding: 0
11
8
  },
12
9
  "& > .ant-dropdown-trigger": {
13
- color: "var(--ap-text-color-3)"
10
+ color: t.textColor3
14
11
  },
15
- [`${t}-main-content`]: {
12
+ [`${e}-main-content`]: {
16
13
  padding: "4px 8px",
17
14
  display: "flex",
18
15
  alignItems: "center",
19
16
  justifyContent: "center",
20
17
  "&-disabled": {
21
- color: "var(--ap-text-color-4)",
18
+ color: t.textColor4,
22
19
  cursor: "not-allowed"
23
20
  }
24
21
  },
25
- [`${t}-icon`]: {
22
+ [`${e}-icon`]: {
26
23
  width: "100%",
27
24
  height: "100%",
28
25
  fontSize: "14px",
@@ -31,7 +28,7 @@ const o = (e) => {
31
28
  alignItems: "center"
32
29
  }
33
30
  },
34
- [`${t}-main-content-popover`]: {
31
+ [`${e}-main-content-popover`]: {
35
32
  width: "340px",
36
33
  "&-title-content": {
37
34
  display: "flex",
@@ -55,7 +52,7 @@ const o = (e) => {
55
52
  }
56
53
  }
57
54
  },
58
- [`${t}-overlay`]: {
55
+ [`${e}-overlay`]: {
59
56
  ".ant-dropdown-menu": {
60
57
  padding: "8px",
61
58
  "&-item": {
@@ -65,7 +62,7 @@ const o = (e) => {
65
62
  }
66
63
  }
67
64
  },
68
- [`${t}-menu-list-content`]: {
65
+ [`${e}-menu-list-content`]: {
69
66
  width: "250px",
70
67
  display: "flex",
71
68
  padding: "6px 8px",
@@ -94,13 +91,13 @@ const o = (e) => {
94
91
  fontSize: "12px",
95
92
  display: "flex",
96
93
  alignItems: "center",
97
- color: "var(--ap-color-primary)"
94
+ color: t.colorPrimary
98
95
  },
99
96
  "&-delete": {
100
97
  cursor: "pointer",
101
98
  display: "flex",
102
99
  alignItems: "center",
103
- color: "var(--ap-text-color-3)",
100
+ color: t.textColor3,
104
101
  svg: {
105
102
  outline: "none",
106
103
  boxShadow: "none"
@@ -123,23 +120,23 @@ const o = (e) => {
123
120
  cursor: "default"
124
121
  },
125
122
  "&:hover": {
126
- background: "var(--ap-color-bg-1)",
123
+ background: t.colorBg1,
127
124
  ".menu-list-content-action": {
128
125
  display: "block"
129
126
  }
130
127
  }
131
128
  },
132
- [`${t}-menu-list-content-active`]: {
129
+ [`${e}-menu-list-content-active`]: {
133
130
  ".menu-list-content-name": {
134
- color: "var(--ap-color-primary)"
131
+ color: t.colorPrimary
135
132
  }
136
133
  }
137
134
  }
138
135
  };
139
- }, a = n("ApView", (e) => [
140
- o(e)
136
+ }, r = n("ApView", (t) => [
137
+ o(t)
141
138
  ]);
142
139
  export {
143
- a as default,
140
+ r as default,
144
141
  o as genProCardStyle
145
142
  };
@@ -1,3 +1,6 @@
1
1
  import { Ref } from 'vue';
2
+ export type BatchInputGroupToken = {
3
+ batchInputGroupTriggerColorDisabled: string;
4
+ };
2
5
  declare const _default: (prefixCls: string) => Ref<string | undefined, string | undefined>;
3
6
  export default _default;
@@ -17,9 +17,9 @@ const a = (o) => {
17
17
  },
18
18
  "&--disabled": {
19
19
  cursor: "not-allowed",
20
- color: "var(--batch-input-group-trigger-color-disabled, rgba(24, 41, 72, 0.25))",
20
+ color: o.batchInputGroupTriggerColorDisabled,
21
21
  "&:hover": {
22
- color: "var(--batch-input-group-trigger-color-disabled, rgba(24, 41, 72, 0.25))"
22
+ color: o.batchInputGroupTriggerColorDisabled
23
23
  }
24
24
  }
25
25
  }
@@ -45,9 +45,13 @@ const a = (o) => {
45
45
  }
46
46
  }
47
47
  };
48
- }, c = i("BatchInputGroup", (o) => [
49
- a(o)
50
- ]);
48
+ }, c = i(
49
+ "BatchInputGroup",
50
+ (o) => [a(o)],
51
+ {
52
+ batchInputGroupTriggerColorDisabled: "rgba(24, 41, 72, 0.25)"
53
+ }
54
+ );
51
55
  export {
52
56
  c as default
53
57
  };
@@ -1,10 +1,16 @@
1
- import { resetComponent as d } from "../../style/index.mjs";
2
- import { genComponentStyleHook as e } from "../../utils/cssinjs/index.mjs";
1
+ import { resetComponent as t } from "../../style/index.mjs";
2
+ import { genComponentStyleHook as a } from "../../utils/cssinjs/index.mjs";
3
3
  const c = (r) => {
4
- const { componentCls: i } = r;
4
+ const {
5
+ componentCls: o,
6
+ checkCardDisabledOutlineColor: l,
7
+ checkCardIndicatorSize: e,
8
+ checkCardOutlineWidth: d,
9
+ checkCardIndicatorOffset: i
10
+ } = r;
5
11
  return {
6
- [`${i}`]: {
7
- ...d(r),
12
+ [`${o}`]: {
13
+ ...t(r),
8
14
  borderRadius: r.borderRadius,
9
15
  position: "relative",
10
16
  "&--disabled": {
@@ -14,7 +20,7 @@ const c = (r) => {
14
20
  "&--bordered": {
15
21
  outline: `1px solid ${r.borderColorBase}`
16
22
  },
17
- [`&:hover:not(${i}--disabled)`]: {
23
+ [`&:hover:not(${o}--disabled)`]: {
18
24
  cursor: "pointer",
19
25
  outline: `1px solid ${r.colorPrimary}`
20
26
  },
@@ -24,32 +30,32 @@ const c = (r) => {
24
30
  width: 0,
25
31
  height: 0,
26
32
  opacity: 0,
27
- insetBlockStart: r.checkCardIndicatorOffset,
28
- insetInlineEnd: r.checkCardIndicatorOffset,
29
- borderInlineStart: r.checkCardIndicatorSize,
30
- borderBlockEnd: r.checkCardIndicatorSize,
33
+ insetBlockStart: i,
34
+ insetInlineEnd: i,
35
+ borderInlineStart: e,
36
+ borderBlockEnd: e,
31
37
  borderRadius: r.borderRadius
32
38
  },
33
39
  "&--checked": {
34
- outline: `${r.checkCardOutlineWidth} solid ${r.colorPrimary}`,
35
- [`&:hover:not(${i}--disabled)`]: {
36
- outline: `${r.checkCardOutlineWidth} solid ${r.colorPrimary}`
40
+ outline: `${d} solid ${r.colorPrimary}`,
41
+ [`&:hover:not(${o}--disabled)`]: {
42
+ outline: `${d} solid ${r.colorPrimary}`
37
43
  },
38
44
  "&::after": {
39
45
  opacity: 1,
40
- border: `${r.checkCardIndicatorSize} solid ${r.colorPrimary}`,
41
- borderInlineStart: `${r.checkCardIndicatorSize} solid transparent`,
42
- borderBlockEnd: `${r.checkCardIndicatorSize} solid transparent`,
43
- insetBlockStart: r.checkCardIndicatorOffset,
44
- insetInlineEnd: r.checkCardIndicatorOffset,
46
+ border: `${e} solid ${r.colorPrimary}`,
47
+ borderInlineStart: `${e} solid transparent`,
48
+ borderBlockEnd: `${e} solid transparent`,
49
+ insetBlockStart: i,
50
+ insetInlineEnd: i,
45
51
  transition: "all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)"
46
52
  },
47
- [`&${i}--disabled`]: {
48
- outlineColor: r.checkCardDisabledOutlineColor,
53
+ [`&${o}--disabled`]: {
54
+ outlineColor: l,
49
55
  "&::after": {
50
- border: `${r.checkCardIndicatorSize} solid ${r.checkCardDisabledOutlineColor}`,
51
- borderInlineStart: `${r.checkCardIndicatorSize} solid transparent`,
52
- borderBlockEnd: `${r.checkCardIndicatorSize} solid transparent`
56
+ border: `${e} solid ${l}`,
57
+ borderInlineStart: `${e} solid transparent`,
58
+ borderBlockEnd: `${e} solid transparent`
53
59
  }
54
60
  }
55
61
  },
@@ -59,8 +65,8 @@ const c = (r) => {
59
65
  "&--small": {
60
66
  padding: `${r.spaceSM} ${r.spaceLG}`
61
67
  },
62
- [`${i}__title`]: {
63
- ...d(r),
68
+ [`${o}__title`]: {
69
+ ...t(r),
64
70
  marginBottom: r.spaceXS,
65
71
  color: "#333",
66
72
  fontWeight: "bold",
@@ -68,14 +74,14 @@ const c = (r) => {
68
74
  color: r.textColor4
69
75
  }
70
76
  },
71
- [`${i}__content`]: {
72
- ...d(r),
77
+ [`${o}__content`]: {
78
+ ...t(r),
73
79
  color: "#333",
74
80
  "&--disabled": {
75
81
  color: r.textColor4
76
82
  }
77
83
  },
78
- [`${i}__checked-icon`]: {
84
+ [`${o}__checked-icon`]: {
79
85
  position: "absolute",
80
86
  top: 0,
81
87
  right: 0,
@@ -83,13 +89,13 @@ const c = (r) => {
83
89
  lineHeight: 1,
84
90
  userSelect: "none",
85
91
  "& > img": {
86
- width: `calc(${r.checkCardIndicatorSize} - 2px)`,
92
+ width: `calc(${e} - ${d})`,
87
93
  verticalAlign: "top"
88
94
  }
89
95
  }
90
96
  }
91
97
  };
92
- }, l = e(
98
+ }, b = a(
93
99
  "CheckCard",
94
100
  (r) => [c(r)],
95
101
  {
@@ -101,5 +107,5 @@ const c = (r) => {
101
107
  }
102
108
  );
103
109
  export {
104
- l as default
110
+ b as default
105
111
  };
@@ -6,10 +6,9 @@ import { CSPConfig } from '@aplus-frontend/antdv/es/config-provider';
6
6
  import { Locale } from '@aplus-frontend/antdv/es/locale';
7
7
  import { ButtonSize } from '@aplus-frontend/antdv/es/button';
8
8
  import { ThemeConfig, InputConfig, PaginationConfig, FormConfig, SelectConfig, CascaderConfig, DatePickerConfig, RangePickerConfig, TreeSelectConfig, TextAreaConfig, InputNumberConfig, MentionsConfig, TimePickerConfig, CardConfig } from '@aplus-frontend/antdv/es/config-provider/context';
9
- import { ApGridRowSelection, AgGridRowSelection, ViewCacheOption } from '..';
9
+ import { ApGridRowSelection, AgGridRowSelection, FullToken, ViewCacheOption } from '..';
10
10
  import { LocaleType } from '../locale';
11
11
  import { RecursivePartial } from '../type';
12
- import { FullToken } from '../design-token/interface';
13
12
  import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField, SearchFormGlobalConfig } from './constants';
14
13
  export declare const globalConfigCached: Ref<ConfigProviderProps>;
15
14
  export declare const ConfigProvider: DefineComponent<ExtractPropTypes<{
@@ -7,10 +7,9 @@ import { CSPConfig } from '@aplus-frontend/antdv/es/config-provider';
7
7
  import { Locale } from '@aplus-frontend/antdv/es/locale';
8
8
  import { ButtonSize } from '@aplus-frontend/antdv/es/button';
9
9
  import { ThemeConfig, InputConfig, PaginationConfig, FormConfig, SelectConfig, CascaderConfig, DatePickerConfig, RangePickerConfig, TreeSelectConfig, TextAreaConfig, InputNumberConfig, MentionsConfig, TimePickerConfig, CardConfig } from '@aplus-frontend/antdv/es/config-provider/context';
10
- import { ApGridRowSelection, AgGridRowSelection, ViewCacheOption } from '../..';
10
+ import { ApGridRowSelection, AgGridRowSelection, FullToken, ViewCacheOption } from '../..';
11
11
  import { LocaleType } from '../../locale';
12
12
  import { RecursivePartial } from '../../type';
13
- import { FullToken } from '../../design-token/interface';
14
13
  import { ApiType, ApUploadConfig, ApDescriptionsConfig, ValueTypeRenderConfig, downloadCenterTriggerConfig, ExportField, SearchFormGlobalConfig } from '..';
15
14
  export declare const keysOf: <T extends Record<string, any>>(arr: T) => Array<keyof T>;
16
15
  export declare function useGlobalConfig<K extends keyof ConfigProviderContext, D extends ConfigProviderContext[K]>(key: K, defaultValue?: D): Ref<Exclude<ConfigProviderContext[K], undefined> | D>;
@@ -1,39 +1,48 @@
1
- import { ref as v, getCurrentInstance as a, inject as d, computed as f, provide as g, unref as C } from "vue";
2
- import { configProviderContextKey as m } from "../constants.mjs";
3
- import { localeContextKey as k } from "./use-locale.mjs";
4
- import { namespaceContextKey as y } from "./use-namespace.mjs";
5
- import { designTokenContextKey as x } from "./use-token.mjs";
6
- import { merge as K, cloneDeep as T } from "lodash-unified";
7
- import { defaultToken as b } from "../../design-token/constants.mjs";
8
- const l = (e) => Object.keys(e), s = v();
9
- function j(e, o = void 0) {
10
- const t = a() ? d(m, s) : s;
11
- return e ? f(() => t.value?.[e] ?? o) : t;
1
+ import { ref as p, getCurrentInstance as v, inject as k, computed as c, provide as y, unref as x, watch as T } from "vue";
2
+ import { configProviderContextKey as d } from "../constants.mjs";
3
+ import { localeContextKey as b } from "./use-locale.mjs";
4
+ import { namespaceContextKey as K } from "./use-namespace.mjs";
5
+ import { designTokenContextKey as j } from "./use-token.mjs";
6
+ import { merge as w, cloneDeep as G, omit as O } from "lodash-unified";
7
+ import { defaultToken as S } from "../../design-token/constants.mjs";
8
+ import { css as V } from "@emotion/css";
9
+ import { generateCssVar as h } from "../../utils/cssinjs/utils.mjs";
10
+ const m = (e) => Object.keys(e), u = p();
11
+ function D(e, o = void 0) {
12
+ const n = v() ? k(d, u) : u;
13
+ return e ? c(() => n.value?.[e] ?? o) : n;
12
14
  }
13
- const P = (e, o, t = !1) => {
14
- const i = !!a(), n = i ? j() : void 0, c = o?.provide ?? (i ? g : void 0);
15
- if (!c)
15
+ const J = (e, o, n = !1) => {
16
+ const s = !!v(), t = s ? D() : void 0, i = o?.provide ?? (s ? y : void 0);
17
+ if (!i)
16
18
  return;
17
- const r = f(() => {
18
- const u = C(e);
19
- return n?.value ? G(n.value, u) : u;
19
+ const r = c(() => {
20
+ const a = x(e);
21
+ return t?.value ? F(t.value, a) : a;
20
22
  });
21
- c(m, r), c(y, r.value.namespace);
22
- const p = f(() => ({
23
- ...K(T(b), r.value.aplusToken || {})
24
- }));
25
- return c(x, p), c(
26
- k,
27
- f(() => r.value.aplusLocale)
28
- ), (t || !s.value) && (s.value = r.value), r;
29
- }, G = (e, o) => {
30
- const t = [.../* @__PURE__ */ new Set([...l(e), ...l(o)])], i = {};
31
- for (const n of t)
32
- i[n] = o[n] !== void 0 ? o[n] : e[n];
33
- return i;
23
+ i(d, r), i(
24
+ b,
25
+ c(() => r.value.aplusLocale)
26
+ ), i(K, r.value.namespace);
27
+ const f = c(() => ({
28
+ ...w(G(S), r.value.aplusToken || {})
29
+ })), g = c(() => O(f.value, ["components"])), l = p();
30
+ return T(
31
+ () => g.value,
32
+ (a) => {
33
+ const C = h(a);
34
+ l.value = V(C);
35
+ },
36
+ { deep: !0, immediate: !0 }
37
+ ), i(j, { token: f, rootCls: l }), (n || !u.value) && (u.value = r.value), r;
38
+ }, F = (e, o) => {
39
+ const n = [.../* @__PURE__ */ new Set([...m(e), ...m(o)])], s = {};
40
+ for (const t of n)
41
+ s[t] = o[t] !== void 0 ? o[t] : e[t];
42
+ return s;
34
43
  };
35
44
  export {
36
- l as keysOf,
37
- P as provideGlobalConfig,
38
- j as useGlobalConfig
45
+ m as keysOf,
46
+ J as provideGlobalConfig,
47
+ D as useGlobalConfig
39
48
  };
@@ -1,4 +1,9 @@
1
1
  import { InjectionKey, Ref } from 'vue';
2
2
  import { FullToken } from '../../design-token/interface';
3
- export declare const designTokenContextKey: InjectionKey<Ref<Partial<FullToken>>>;
4
- export declare const useToken: () => Ref<FullToken>;
3
+ type DesignTokenContextType = {
4
+ token: Ref<Partial<FullToken>>;
5
+ rootCls: Ref<string | undefined>;
6
+ };
7
+ export declare const designTokenContextKey: InjectionKey<DesignTokenContextType>;
8
+ export declare const useToken: () => DesignTokenContextType;
9
+ export {};
@@ -1,6 +1,9 @@
1
- import { inject as e, ref as n } from "vue";
2
- const o = Symbol("designTokenContextKey"), r = () => e(o, n({}));
1
+ import { inject as o, ref as e } from "vue";
2
+ const n = Symbol("designTokenContextKey"), r = () => o(n, {
3
+ token: e({}),
4
+ rootCls: e()
5
+ });
3
6
  export {
4
- o as designTokenContextKey,
7
+ n as designTokenContextKey,
5
8
  r as useToken
6
9
  };