@aplus-frontend/ui 7.4.1 → 7.4.2

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.
@@ -1,13 +1,15 @@
1
- import { isVNode as g, defineComponent as C, ref as S, useSlots as _, createVNode as i, mergeProps as V, unref as r, computed as w, createBlock as R, openBlock as T, resolveDynamicComponent as j } from "vue";
2
- import { Input as U } from "@aplus-frontend/antdv";
1
+ import { isVNode as g, defineComponent as C, ref as S, useSlots as _, createVNode as i, mergeProps as R, unref as r, computed as V, createBlock as w, openBlock as T } from "vue";
2
+ import { Input as j } from "@aplus-frontend/antdv";
3
3
  import "../../hooks/index.mjs";
4
- import { omit as z } from "lodash-unified";
5
- import { useDefaultPlaceholder as F } from "../hooks/use-default-placeholder.mjs";
6
- import { useControllableValue as M } from "../../hooks/useControllableValue.mjs";
4
+ import { omit as U } from "lodash-unified";
5
+ import { useDefaultPlaceholder as z } from "../hooks/use-default-placeholder.mjs";
6
+ import "../../render/index.mjs";
7
+ import { useControllableValue as F } from "../../hooks/useControllableValue.mjs";
8
+ import M from "../../render/render.mjs";
7
9
  function N(n) {
8
10
  return typeof n == "function" || Object.prototype.toString.call(n) === "[object Object]" && !g(n);
9
11
  }
10
- const K = /* @__PURE__ */ C({
12
+ const $ = /* @__PURE__ */ C({
11
13
  name: "ApFieldText",
12
14
  __name: "index",
13
15
  props: {
@@ -95,43 +97,45 @@ const K = /* @__PURE__ */ C({
95
97
  emits: ["update:value"],
96
98
  setup(n, {
97
99
  expose: d,
98
- emit: c
100
+ emit: f
99
101
  }) {
100
- const t = S(), l = _(), f = (o) => {
102
+ const t = S(), u = _(), c = (o) => {
101
103
  t.value?.focus(o);
102
104
  }, m = () => {
103
105
  t.value?.blur();
104
- }, y = (o, u, a) => {
105
- t.value?.setSelectionRange(o, u, a);
106
- }, v = () => {
106
+ }, y = (o, l, a) => {
107
+ t.value?.setSelectionRange(o, l, a);
108
+ }, x = () => {
107
109
  t.value?.select();
108
- }, x = c, e = n, {
110
+ }, v = f, e = n, {
109
111
  value: p,
110
112
  updateValue: B
111
- } = M(e, x), b = F("Text", e);
113
+ } = F(e, v), b = z("Text", e);
112
114
  function h(o) {
113
- const u = o.target.value || "", a = e.beforeInput ? e.beforeInput?.(u) : u, s = t.value?.$el?.querySelector("input");
115
+ const l = o.target.value || "", a = e.beforeInput ? e.beforeInput?.(l) : l, s = t.value?.$el?.querySelector("input");
114
116
  s && (s.value = a), B(a);
115
117
  }
116
118
  function I() {
117
- return e.mode === "edit" ? i(U, V(z(e, ["mode", "emptyText", "value", "onUpdate:value", "beforeInput"]), {
119
+ return e.mode === "edit" ? i(j, R(U(e, ["mode", "emptyText", "value", "onUpdate:value", "beforeInput"]), {
118
120
  placeholder: r(b),
119
121
  value: r(p),
120
122
  onInput: h,
121
123
  ref: t
122
- }), N(l) ? l : {
123
- default: () => [l]
124
- }) : i("span", null, [e.prefix || l?.prefix?.(), r(p) || e.emptyText, e.suffix || l?.suffix?.()]);
124
+ }), N(u) ? u : {
125
+ default: () => [u]
126
+ }) : i("span", null, [e.prefix || u?.prefix?.(), r(p) || e.emptyText, e.suffix || u?.suffix?.()]);
125
127
  }
126
128
  return d({
127
- focus: f,
129
+ focus: c,
128
130
  blur: m,
129
131
  setSelectionRange: y,
130
- select: v,
131
- input: w(() => t.value?.input)
132
- }), (o, u) => (T(), R(j(I())));
132
+ select: x,
133
+ input: V(() => t.value?.input)
134
+ }), (o, l) => (T(), w(r(M), {
135
+ renderer: I
136
+ }));
133
137
  }
134
138
  });
135
139
  export {
136
- K as default
140
+ $ as default
137
141
  };
@@ -1,14 +1,16 @@
1
- import { isVNode as x, defineComponent as h, useSlots as C, ref as g, unref as i, createVNode as e, mergeProps as w, Fragment as P, createBlock as U, openBlock as V, resolveDynamicComponent as _ } from "vue";
2
- import { Input as S, Space as T } from "@aplus-frontend/antdv";
1
+ import { isVNode as x, defineComponent as h, useSlots as g, ref as C, unref as a, createVNode as e, mergeProps as w, Fragment as P, createBlock as U, openBlock as V } from "vue";
2
+ import { Input as _, Space as S } from "@aplus-frontend/antdv";
3
3
  import "../../hooks/index.mjs";
4
- import { omit as I } from "lodash-unified";
5
- import { EyeOutlined as O, EyeInvisibleOutlined as j } from "@ant-design/icons-vue";
6
- import { useDefaultPlaceholder as k } from "../hooks/use-default-placeholder.mjs";
7
- import { useControllableValue as d } from "../../hooks/useControllableValue.mjs";
4
+ import { omit as T } from "lodash-unified";
5
+ import { EyeOutlined as I, EyeInvisibleOutlined as O } from "@ant-design/icons-vue";
6
+ import { useDefaultPlaceholder as j } from "../hooks/use-default-placeholder.mjs";
7
+ import "../../render/index.mjs";
8
+ import { useControllableValue as p } from "../../hooks/useControllableValue.mjs";
9
+ import k from "../../render/render.mjs";
8
10
  function E(t) {
9
11
  return typeof t == "function" || Object.prototype.toString.call(t) === "[object Object]" && !x(t);
10
12
  }
11
- const G = /* @__PURE__ */ h({
13
+ const J = /* @__PURE__ */ h({
12
14
  name: "ApFieldTextPassword",
13
15
  __name: "password",
14
16
  props: {
@@ -110,48 +112,50 @@ const G = /* @__PURE__ */ h({
110
112
  expose: c,
111
113
  emit: f
112
114
  }) {
113
- const s = f, o = t, a = C(), u = g(), {
115
+ const r = f, o = t, u = g(), i = C(), {
114
116
  value: m,
115
117
  updateValue: v
116
- } = d(o, s), y = k("TextPassword", o), {
118
+ } = p(o, r), y = j("TextPassword", o), {
117
119
  value: b,
118
- updateValue: r
119
- } = d(o, s, {
120
+ updateValue: s
121
+ } = p(o, r, {
120
122
  valuePropName: "visible"
121
123
  });
122
124
  function B() {
123
- const n = i(m), l = i(b);
125
+ const n = a(m), l = a(b);
124
126
  if (o.mode === "edit")
125
- return e(S.Password, w(I(o, ["mode", "emptyText", "value", "onUpdate:value", "visible", "onUpdate:visible"]), {
126
- placeholder: i(y),
127
+ return e(_.Password, w(T(o, ["mode", "emptyText", "value", "onUpdate:value", "visible", "onUpdate:visible"]), {
128
+ placeholder: a(y),
127
129
  value: n,
128
130
  "onUpdate:value": v,
129
131
  visible: l,
130
- "onUpdate:visible": r,
131
- ref: u
132
- }), E(a) ? a : {
133
- default: () => [a]
132
+ "onUpdate:visible": s,
133
+ ref: i
134
+ }), E(u) ? u : {
135
+ default: () => [u]
134
136
  });
135
- let p = e(P, null, [o.emptyText]);
136
- return n && (p = e(T, null, {
137
+ let d = e(P, null, [o.emptyText]);
138
+ return n && (d = e(S, null, {
137
139
  default: () => [e("span", null, [l ? n : "********"]), e("span", {
138
140
  style: {
139
141
  cursor: "pointer"
140
142
  },
141
- onClick: () => r(!l)
142
- }, [l ? e(O, null, null) : e(j, null, null)])]
143
- })), p;
143
+ onClick: () => s(!l)
144
+ }, [l ? e(I, null, null) : e(O, null, null)])]
145
+ })), d;
144
146
  }
145
147
  return c({
146
148
  focus: () => {
147
- u.value?.focus();
149
+ i.value?.focus();
148
150
  },
149
151
  blur: () => {
150
- u.value?.blur();
152
+ i.value?.blur();
151
153
  }
152
- }), (n, l) => (V(), U(_(B())));
154
+ }), (n, l) => (V(), U(a(k), {
155
+ renderer: B
156
+ }));
153
157
  }
154
158
  });
155
159
  export {
156
- G as default
160
+ J as default
157
161
  };
@@ -1,8 +1,8 @@
1
- import { genComponentStyleHook as o } from "../../utils/cssinjs/index.mjs";
2
- const n = (t) => {
3
- const { componentCls: e } = t;
1
+ import { genComponentStyleHook as e } from "../../utils/cssinjs/index.mjs";
2
+ const r = (t) => {
3
+ const { componentCls: o } = t;
4
4
  return {
5
- [e]: {
5
+ [o]: {
6
6
  "&-default": {
7
7
  position: "relative",
8
8
  fontWeight: "bold",
@@ -19,7 +19,7 @@ const n = (t) => {
19
19
  transform: "translateY(-50%)",
20
20
  width: "3px",
21
21
  height: "14px",
22
- backgroundColor: "#0070ff",
22
+ backgroundColor: t.colorPrimary,
23
23
  borderRadius: "0px 4px 4px 0px"
24
24
  }
25
25
  },
@@ -34,17 +34,17 @@ const n = (t) => {
34
34
  width: "8px",
35
35
  height: "8px",
36
36
  borderRadius: "50%",
37
- border: "2px solid #34b77c",
37
+ border: `2px solid ${t.colorPrimary}`,
38
38
  background: "#fff"
39
39
  }
40
40
  }
41
41
  }
42
42
  }
43
43
  };
44
- }, p = o("ProCard.Title", (t) => [
45
- n(t)
44
+ }, a = e("ProCard.Title", (t) => [
45
+ r(t)
46
46
  ]);
47
47
  export {
48
- p as default,
49
- n as genProCardTitleStyle
48
+ a as default,
49
+ r as genProCardTitleStyle
50
50
  };
@@ -18,7 +18,7 @@ const l = (o) => {
18
18
  boxSizing: "border-box",
19
19
  padding: "8px 16px",
20
20
  color: o.textColor2,
21
- border: `1px solid ${o.colorBg1}`,
21
+ border: `1px solid ${o.borderColorBase}`,
22
22
  borderRadius: o.borderRadius,
23
23
  cursor: "pointer",
24
24
  "&-close": {
@@ -69,7 +69,7 @@ const l = (o) => {
69
69
  color: o.textColor3,
70
70
  background: "#f9f9fa",
71
71
  cursor: "not-allowed",
72
- border: `1px solid ${o.colorBg1}`
72
+ border: `1px solid ${o.borderColorBase}`
73
73
  },
74
74
  "&.select": {
75
75
  backgroundColor: o.colorBgControl,
package/es/src/index.d.ts CHANGED
@@ -10,6 +10,7 @@ export * from './ap-button';
10
10
  export * from './ap-drawer';
11
11
  export * from './ap-pro-card';
12
12
  export * from './loading-bar';
13
+ export * from './render';
13
14
  export * from './business';
14
15
  export * from './ap-table';
15
16
  export * from './editable-table';