@aplus-frontend/ui 7.0.0 → 7.0.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.
Files changed (68) hide show
  1. package/es/index.mjs +108 -106
  2. package/es/src/ag-grid/style/custom-header.mjs +1 -1
  3. package/es/src/ag-grid/style/index.mjs +0 -1
  4. package/es/src/ap-action/item-dropdown/index.vue.mjs +12 -12
  5. package/es/src/ap-form/style/item.mjs +5 -4
  6. package/es/src/ap-form/style/modal-form.mjs +11 -11
  7. package/es/src/ap-form/style/search-form-sorter.mjs +16 -12
  8. package/es/src/ap-form/style/token.d.ts +4 -0
  9. package/es/src/ap-upload/apUpload.vue.mjs +32 -31
  10. package/es/src/business/ag-grid-modal/interface.d.ts +1 -1
  11. package/es/src/business/ag-grid-modal/wrapper/index.vue.d.ts +6 -2
  12. package/es/src/business/ag-grid-modal/wrapper/index.vue2.mjs +29 -12
  13. package/es/src/business/ap-ladder/style/index.mjs +2 -5
  14. package/es/src/business/ap-size-input/ApSizeInput.d.ts +20 -4
  15. package/es/src/business/ap-size-input/ApSizeInput.mjs +37 -40
  16. package/es/src/business/ap-size-input/constans.d.ts +10 -2
  17. package/es/src/business/ap-size-input/constans.mjs +9 -1
  18. package/es/src/business/ap-size-input/form-item.vue.d.ts +13 -0
  19. package/es/src/business/ap-size-input/form-item.vue.mjs +65 -0
  20. package/es/src/business/ap-size-input/form-item.vue2.mjs +4 -0
  21. package/es/src/business/ap-size-input/index.d.ts +33 -8
  22. package/es/src/business/ap-size-input/index.mjs +3 -2
  23. package/es/src/business/ap-size-input/interface.d.ts +7 -0
  24. package/es/src/business/ap-size-input/style/index.mjs +2 -1
  25. package/es/src/business/ap-view/components/menu-list-content.vue2.mjs +61 -64
  26. package/es/src/business/ap-view/style/index.mjs +1 -1
  27. package/es/src/check-card/style/index.mjs +46 -51
  28. package/es/src/config-provider/hooks/use-token.d.ts +2 -2
  29. package/es/src/design-token/interface.d.ts +24 -1
  30. package/es/src/index.mjs +95 -93
  31. package/es/src/utils/cssinjs/index.d.ts +1 -1
  32. package/es/src/utils/cssinjs/index.mjs +48 -48
  33. package/es/src/version.d.ts +1 -1
  34. package/es/src/version.mjs +1 -1
  35. package/lib/index.js +1 -1
  36. package/lib/src/ag-grid/style/custom-header.js +1 -1
  37. package/lib/src/ap-action/item-dropdown/index.vue.js +1 -1
  38. package/lib/src/ap-form/style/item.js +1 -1
  39. package/lib/src/ap-form/style/modal-form.js +1 -1
  40. package/lib/src/ap-form/style/search-form-sorter.js +1 -1
  41. package/lib/src/ap-form/style/token.d.ts +4 -0
  42. package/lib/src/ap-upload/apUpload.vue.js +1 -1
  43. package/lib/src/business/ag-grid-modal/interface.d.ts +1 -1
  44. package/lib/src/business/ag-grid-modal/wrapper/index.vue.d.ts +6 -2
  45. package/lib/src/business/ag-grid-modal/wrapper/index.vue2.js +1 -1
  46. package/lib/src/business/ap-ladder/style/index.js +1 -1
  47. package/lib/src/business/ap-size-input/ApSizeInput.d.ts +20 -4
  48. package/lib/src/business/ap-size-input/ApSizeInput.js +1 -1
  49. package/lib/src/business/ap-size-input/constans.d.ts +10 -2
  50. package/lib/src/business/ap-size-input/constans.js +1 -1
  51. package/lib/src/business/ap-size-input/form-item.vue.d.ts +13 -0
  52. package/lib/src/business/ap-size-input/form-item.vue.js +1 -0
  53. package/lib/src/business/ap-size-input/form-item.vue2.js +1 -0
  54. package/lib/src/business/ap-size-input/index.d.ts +33 -8
  55. package/lib/src/business/ap-size-input/index.js +1 -1
  56. package/lib/src/business/ap-size-input/interface.d.ts +7 -0
  57. package/lib/src/business/ap-size-input/style/index.js +1 -1
  58. package/lib/src/business/ap-view/components/menu-list-content.vue2.js +1 -1
  59. package/lib/src/business/ap-view/style/index.js +1 -1
  60. package/lib/src/check-card/style/index.js +1 -1
  61. package/lib/src/config-provider/hooks/use-token.d.ts +2 -2
  62. package/lib/src/design-token/interface.d.ts +24 -1
  63. package/lib/src/index.js +1 -1
  64. package/lib/src/utils/cssinjs/index.d.ts +1 -1
  65. package/lib/src/utils/cssinjs/index.js +1 -1
  66. package/lib/src/version.d.ts +1 -1
  67. package/lib/src/version.js +1 -1
  68. package/package.json +1 -1
@@ -1,105 +1,102 @@
1
- import { defineComponent as R, ref as y, watch as $, createElementBlock as l, openBlock as c, normalizeClass as C, unref as e, createElementVNode as a, createCommentVNode as w, toDisplayString as m, createVNode as i, withModifiers as T, withCtx as r } from "vue";
1
+ import { defineComponent as T, ref as y, watch as $, createElementBlock as l, openBlock as m, normalizeClass as V, unref as e, createElementVNode as o, createCommentVNode as f, toDisplayString as c, createVNode as i, withModifiers as b, withCtx as r } from "vue";
2
2
  import "../../../config-provider/index.mjs";
3
3
  import { useViewInject as B } from "../hooks/use-view-provide.mjs";
4
- import { SYSTEM_VIEW_KEY as V } from "../utils/enum.mjs";
5
- import { Space as h, Popconfirm as F } from "@aplus-frontend/antdv";
4
+ import { SYSTEM_VIEW_KEY as h } from "../utils/enum.mjs";
5
+ import { Space as C, Popconfirm as F } from "@aplus-frontend/antdv";
6
6
  import L from "../icons/line-delete.vue.mjs";
7
7
  import "../../../ap-tag/index.mjs";
8
8
  import "../../../ap-form/ap-form.vue.mjs";
9
- import { ApField as Y } from "../../../ap-field/index.mjs";
10
- import j from "../style/index.mjs";
11
- import { useNamespace as A } from "../../../config-provider/hooks/use-namespace.mjs";
12
- import { useLocale as G } from "../../../config-provider/hooks/use-locale.mjs";
13
- import { useGlobalConfig as O } from "../../../config-provider/hooks/use-global-config.mjs";
14
- import P from "../../../ap-tag/ap-tag.vue.mjs";
9
+ import { ApField as M } from "../../../ap-field/index.mjs";
10
+ import P from "../style/index.mjs";
11
+ import { useToken as Y } from "../../../config-provider/hooks/use-token.mjs";
12
+ import { useNamespace as j } from "../../../config-provider/hooks/use-namespace.mjs";
13
+ import { useLocale as A } from "../../../config-provider/hooks/use-locale.mjs";
14
+ import O from "../../../ap-tag/ap-tag.vue.mjs";
15
15
  import x from "../../../ap-form/ap-form.vue2.mjs";
16
16
  const U = { class: "menu-list-content-name" }, W = ["title"], q = {
17
17
  key: 0,
18
18
  class: "menu-list-content-default"
19
- }, H = { class: "menu-list-content-action-delete" }, J = { class: "menu-list-content-edit" }, ve = /* @__PURE__ */ R({
19
+ }, G = { class: "menu-list-content-action-delete" }, H = { class: "menu-list-content-edit" }, ve = /* @__PURE__ */ T({
20
20
  __name: "menu-list-content",
21
21
  props: {
22
22
  view: {}
23
23
  },
24
24
  setup(N) {
25
- const { b: u } = A("ap-view"), d = j("ap-view"), { t: n } = G(), t = N, K = {
26
- aplus: "#2ed1a3",
27
- admin: "#34b77c"
28
- }, D = O("uiMode"), {
29
- currentViewKey: S,
30
- changeCurrentViewKey: g,
25
+ const { b: v } = j("ap-view"), d = P("ap-view"), { token: K } = Y(), { t: n } = A(), t = N, {
26
+ currentViewKey: D,
27
+ changeCurrentViewKey: S,
31
28
  viewListCRUD: p,
32
- tableKey: f,
29
+ tableKey: w,
33
30
  menuOpen: _
34
- } = B(), s = y(!1), k = y(), E = () => {
35
- g(t.view.viewKey), _.value = !1;
36
- }, I = () => {
31
+ } = B(), s = y(!1), k = y(), g = () => {
32
+ S(t.view.viewKey), _.value = !1;
33
+ }, E = () => {
37
34
  p?.changeView?.({
38
35
  ...t.view,
39
- tableKey: f,
36
+ tableKey: w,
40
37
  isDefault: !0
41
38
  });
42
- }, M = () => {
39
+ }, I = () => {
43
40
  p?.removeView?.({
44
- tableKey: f,
41
+ tableKey: w,
45
42
  viewKey: t.view.viewKey
46
43
  });
47
- }, b = async () => {
48
- const v = await k.value?.validate?.();
44
+ }, z = async () => {
45
+ const u = await k.value?.validate?.();
49
46
  p?.changeView?.({
50
47
  ...t.view,
51
- tableKey: f,
52
- viewName: v?.viewName || t.view.viewName
48
+ tableKey: w,
49
+ viewName: u?.viewName || t.view.viewName
53
50
  }), s.value = !1;
54
51
  };
55
52
  return $(
56
53
  () => _.value,
57
- (v) => {
58
- v && (s.value = !1);
54
+ (u) => {
55
+ u && (s.value = !1);
59
56
  }
60
- ), (v, o) => s.value === !1 ? (c(), l("div", {
57
+ ), (u, a) => s.value === !1 ? (m(), l("div", {
61
58
  key: 0,
62
- class: C({
63
- [e(u)("menu-list-content")]: !0,
64
- [e(u)("menu-list-content-active")]: t.view?.viewKey === e(S),
59
+ class: V({
60
+ [e(v)("menu-list-content")]: !0,
61
+ [e(v)("menu-list-content-active")]: t.view?.viewKey === e(D),
65
62
  hashId: e(d)
66
63
  }),
67
- onClick: E
64
+ onClick: g
68
65
  }, [
69
- a("div", U, [
70
- a("span", {
66
+ o("div", U, [
67
+ o("span", {
71
68
  title: t.view?.viewName
72
- }, m(t.view?.viewName), 9, W)
69
+ }, c(t.view?.viewName), 9, W)
73
70
  ]),
74
- t.view?.viewKey !== e(V) && t.view?.isDefault ? (c(), l("div", q, [
75
- i(e(P), {
71
+ t.view?.viewKey !== e(h) && t.view?.isDefault ? (m(), l("div", q, [
72
+ i(e(O), {
76
73
  text: e(n)("ap.apView.default"),
77
74
  size: "small",
78
- color: K[e(D) ?? "aplus"]
75
+ color: e(K).colorPrimary
79
76
  }, null, 8, ["text", "color"])
80
- ])) : w("", !0),
81
- t.view?.viewKey !== e(V) ? (c(), l("div", {
77
+ ])) : f("", !0),
78
+ t.view?.viewKey !== e(h) ? (m(), l("div", {
82
79
  key: 1,
83
80
  class: "menu-list-content-action",
84
- onClick: o[1] || (o[1] = T(() => {
81
+ onClick: a[1] || (a[1] = b(() => {
85
82
  }, ["stop"]))
86
83
  }, [
87
- i(e(h), { size: 8 }, {
84
+ i(e(C), { size: 8 }, {
88
85
  default: r(() => [
89
- a("div", {
86
+ o("div", {
90
87
  class: "menu-list-content-action-text",
91
- onClick: o[0] || (o[0] = (z) => s.value = !0)
92
- }, m(e(n)("ap.apView.rename")), 1),
93
- t.view?.isDefault ? w("", !0) : (c(), l("div", {
88
+ onClick: a[0] || (a[0] = (R) => s.value = !0)
89
+ }, c(e(n)("ap.apView.rename")), 1),
90
+ t.view?.isDefault ? f("", !0) : (m(), l("div", {
94
91
  key: 0,
95
92
  class: "menu-list-content-action-text",
96
- onClick: I
97
- }, m(e(n)("ap.apView.setDefault")), 1)),
98
- a("div", H, [
93
+ onClick: E
94
+ }, c(e(n)("ap.apView.setDefault")), 1)),
95
+ o("div", G, [
99
96
  i(e(F), {
100
97
  title: e(n)("ap.apView.deleteTip"),
101
98
  "ok-text": e(n)("ap.apView.ok"),
102
- onConfirm: M
99
+ onConfirm: I
103
100
  }, {
104
101
  default: r(() => [
105
102
  i(L)
@@ -110,10 +107,10 @@ const U = { class: "menu-list-content-name" }, W = ["title"], q = {
110
107
  ]),
111
108
  _: 1
112
109
  })
113
- ])) : w("", !0)
114
- ], 2)) : (c(), l("div", {
110
+ ])) : f("", !0)
111
+ ], 2)) : (m(), l("div", {
115
112
  key: 1,
116
- class: C([e(u)("menu-list-content"), e(u)("menu-list-content-edit"), e(d)])
113
+ class: V([e(v)("menu-list-content"), e(v)("menu-list-content-edit"), e(d)])
117
114
  }, [
118
115
  i(x, {
119
116
  ref_key: "formRef",
@@ -123,23 +120,23 @@ const U = { class: "menu-list-content-name" }, W = ["title"], q = {
123
120
  }
124
121
  }, {
125
122
  default: r(() => [
126
- a("div", J, [
127
- i(e(h), { size: 8 }, {
123
+ o("div", H, [
124
+ i(e(C), { size: 8 }, {
128
125
  default: r(() => [
129
126
  i(x.FormItem, { name: "viewName" }, {
130
127
  default: r(() => [
131
- i(e(Y).Text, { maxlength: 20 })
128
+ i(e(M).Text, { maxlength: 20 })
132
129
  ]),
133
130
  _: 1
134
131
  }),
135
- a("div", {
132
+ o("div", {
136
133
  class: "menu-list-content-action-text",
137
- onClick: b
138
- }, m(e(n)("ap.apView.save")), 1),
139
- a("div", {
134
+ onClick: z
135
+ }, c(e(n)("ap.apView.save")), 1),
136
+ o("div", {
140
137
  class: "menu-list-content-action-text",
141
- onClick: o[2] || (o[2] = (z) => s.value = !1)
142
- }, m(e(n)("ap.apView.cancel")), 1)
138
+ onClick: a[2] || (a[2] = (R) => s.value = !1)
139
+ }, c(e(n)("ap.apView.cancel")), 1)
143
140
  ]),
144
141
  _: 1
145
142
  })
@@ -120,7 +120,7 @@ const o = (t) => {
120
120
  cursor: "default"
121
121
  },
122
122
  "&:hover": {
123
- background: t.colorBg1,
123
+ background: t.colorBg3,
124
124
  ".menu-list-content-action": {
125
125
  display: "block"
126
126
  }
@@ -1,87 +1,82 @@
1
- import { resetComponent as t } from "../../style/index.mjs";
2
- import { genComponentStyleHook as a } from "../../utils/cssinjs/index.mjs";
3
- const c = (r) => {
1
+ import { resetComponent as c } from "../../style/index.mjs";
2
+ import { genComponentStyleHook as l } from "../../utils/cssinjs/index.mjs";
3
+ const a = (e) => {
4
4
  const {
5
- componentCls: o,
6
- checkCardDisabledOutlineColor: l,
7
- checkCardIndicatorSize: e,
8
- checkCardOutlineWidth: d,
9
- checkCardIndicatorOffset: i
10
- } = r;
5
+ componentCls: r,
6
+ checkCardDisabledOutlineColor: d,
7
+ checkCardIndicatorSize: i,
8
+ checkCardOutlineWidth: o,
9
+ checkCardIndicatorOffset: t
10
+ } = e;
11
11
  return {
12
- [`${o}`]: {
13
- ...t(r),
14
- borderRadius: r.borderRadius,
12
+ [`${r}`]: {
13
+ ...c(e),
14
+ borderRadius: e.borderRadius,
15
15
  position: "relative",
16
16
  "&--disabled": {
17
- backgroundColor: r.checkCardDisabledBg,
17
+ backgroundColor: e.checkCardDisabledBg,
18
18
  cursor: "not-allowed !important"
19
19
  },
20
20
  "&--bordered": {
21
- outline: `1px solid ${r.borderColorBase}`
21
+ outline: `1px solid ${e.borderColorBase}`
22
22
  },
23
- [`&:hover:not(${o}--disabled)`]: {
23
+ [`&:hover:not(${r}--disabled)`]: {
24
24
  cursor: "pointer",
25
- outline: `1px solid ${r.colorPrimary}`
25
+ outline: `1px solid ${e.colorPrimary}`
26
26
  },
27
27
  "&::after": {
28
28
  content: '""',
29
29
  position: "absolute",
30
30
  width: 0,
31
31
  height: 0,
32
- opacity: 0,
33
- insetBlockStart: i,
34
- insetInlineEnd: i,
35
- borderInlineStart: e,
36
- borderBlockEnd: e,
37
- borderRadius: r.borderRadius
32
+ insetBlockStart: 0,
33
+ insetInlineEnd: 0,
34
+ clipPath: "polygon(100% 0, 100% 100%, 0 0)",
35
+ background: e.colorPrimary,
36
+ borderRadius: `calc(${e.borderRadius} + 2px)`
38
37
  },
39
38
  "&--checked": {
40
- outline: `${d} solid ${r.colorPrimary}`,
41
- [`&:hover:not(${o}--disabled)`]: {
42
- outline: `${d} solid ${r.colorPrimary}`
39
+ outline: `${o} solid ${e.colorPrimary}`,
40
+ [`&:hover:not(${r}--disabled)`]: {
41
+ outline: `${o} solid ${e.colorPrimary}`
43
42
  },
44
43
  "&::after": {
45
- opacity: 1,
46
- border: `${e} solid ${r.colorPrimary}`,
47
- borderInlineStart: `${e} solid transparent`,
48
- borderBlockEnd: `${e} solid transparent`,
49
- insetBlockStart: i,
50
- insetInlineEnd: i,
51
- transition: "all 0.2s cubic-bezier(0.645, 0.045, 0.355, 1)"
44
+ width: `calc(${i} * 2)`,
45
+ height: `calc(${i} * 2)`,
46
+ insetBlockStart: t,
47
+ insetInlineEnd: t,
48
+ transition: "width 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), height 0.3s cubic-bezier(0.645, 0.045, 0.355, 1), inset 0.3s cubic-bezier(0.645, 0.045, 0.355, 1)"
52
49
  },
53
- [`&${o}--disabled`]: {
54
- outlineColor: l,
50
+ [`&${r}--disabled`]: {
51
+ outlineColor: d,
55
52
  "&::after": {
56
- border: `${e} solid ${l}`,
57
- borderInlineStart: `${e} solid transparent`,
58
- borderBlockEnd: `${e} solid transparent`
53
+ backgroundColor: d
59
54
  }
60
55
  }
61
56
  },
62
57
  "&--middle": {
63
- padding: r.spaceLG
58
+ padding: e.spaceLG
64
59
  },
65
60
  "&--small": {
66
- padding: `${r.spaceSM} ${r.spaceLG}`
61
+ padding: `${e.spaceSM} ${e.spaceLG}`
67
62
  },
68
- [`${o}__title`]: {
69
- ...t(r),
70
- marginBottom: r.spaceXS,
63
+ [`${r}__title`]: {
64
+ ...c(e),
65
+ marginBottom: e.spaceXS,
71
66
  color: "#333",
72
67
  fontWeight: "bold",
73
68
  "&--disabled": {
74
- color: r.textColor4
69
+ color: e.textColor4
75
70
  }
76
71
  },
77
- [`${o}__content`]: {
78
- ...t(r),
72
+ [`${r}__content`]: {
73
+ ...c(e),
79
74
  color: "#333",
80
75
  "&--disabled": {
81
- color: r.textColor4
76
+ color: e.textColor4
82
77
  }
83
78
  },
84
- [`${o}__checked-icon`]: {
79
+ [`${r}__checked-icon`]: {
85
80
  position: "absolute",
86
81
  top: 0,
87
82
  right: 0,
@@ -89,15 +84,15 @@ const c = (r) => {
89
84
  lineHeight: 1,
90
85
  userSelect: "none",
91
86
  "& > img": {
92
- width: `calc(${e} - ${d})`,
87
+ width: `calc(${i} - ${o})`,
93
88
  verticalAlign: "top"
94
89
  }
95
90
  }
96
91
  }
97
92
  };
98
- }, b = a(
93
+ }, h = l(
99
94
  "CheckCard",
100
- (r) => [c(r)],
95
+ (e) => [a(e)],
101
96
  {
102
97
  checkCardDisabledBg: "#F9F9FA",
103
98
  checkCardDisabledOutlineColor: "#E9EDF3",
@@ -107,5 +102,5 @@ const c = (r) => {
107
102
  }
108
103
  );
109
104
  export {
110
- b as default
105
+ h as default
111
106
  };
@@ -1,7 +1,7 @@
1
1
  import { InjectionKey, Ref } from 'vue';
2
- import { FullToken } from '../../design-token/interface';
2
+ import { ContextToken } from '../../design-token/interface';
3
3
  type DesignTokenContextType = {
4
- token: Ref<Partial<FullToken>>;
4
+ token: Ref<ContextToken>;
5
5
  rootCls: Ref<string | undefined>;
6
6
  };
7
7
  export declare const designTokenContextKey: InjectionKey<DesignTokenContextType>;
@@ -1,5 +1,5 @@
1
1
  import { ActionToken } from '../ap-action/style';
2
- import { Recordable } from '../type';
2
+ import { Recordable, RecursivePartial } from '../type';
3
3
  import { CSSInterpolation, CSSObject } from '@emotion/serialize';
4
4
  import { CheckCardToken } from '../check-card/style';
5
5
  import { ApFormToken } from '../ap-form/style/token';
@@ -127,6 +127,9 @@ export type BaseToken = {
127
127
  */
128
128
  lineClamp: number;
129
129
  };
130
+ /**
131
+ * 全量token
132
+ */
130
133
  export type FullToken = BaseToken & {
131
134
  components: {
132
135
  ApAction: ActionToken;
@@ -144,6 +147,26 @@ export type FullToken = BaseToken & {
144
147
  ApGrid: ApGridToken;
145
148
  };
146
149
  };
150
+ /**
151
+ * 上下文token(基础token+部分组件token)
152
+ */
153
+ export type ContextToken = BaseToken & RecursivePartial<{
154
+ components: {
155
+ ApAction: ActionToken;
156
+ CheckCard: CheckCardToken;
157
+ ApForm: ApFormToken;
158
+ ApList: ApListToken;
159
+ Scrollbar: ScrollbarToken;
160
+ Mask: MaskToken;
161
+ Splitter: SplitterToken;
162
+ ProCard: ProCardToken;
163
+ StatisticsCard: ProCardToken;
164
+ AgGrid: AgGridToken;
165
+ BatchInputGroup: BatchInputGroupToken;
166
+ ApRadioGroup: ApRadioGroupToken;
167
+ ApGrid: ApGridToken;
168
+ };
169
+ }>;
147
170
  export type TokenWithComponentCls<Token> = Token & {
148
171
  componentCls: string;
149
172
  namespace: string;