@aplus-frontend/ui 0.4.3 → 0.4.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.
Files changed (99) hide show
  1. package/es/index.mjs +170 -162
  2. package/es/src/business/ap-select-layout/select-layout.vue2.mjs +52 -56
  3. package/es/src/business/ap-summary/ap-summary.vue.d.ts +0 -1
  4. package/es/src/business/ap-summary/ap-summary.vue2.mjs +36 -35
  5. package/es/src/business/ap-summary/index.d.ts +0 -3
  6. package/es/src/business/ap-table-modal/table-modal.vue2.mjs +8 -4
  7. package/es/src/business/batch-input-group/form-item.vue.d.ts +9 -1
  8. package/es/src/business/batch-input-group/form-item.vue.mjs +48 -44
  9. package/es/src/config-provider/hooks/use-namespace.d.ts +1 -1
  10. package/es/src/config-provider/hooks/use-namespace.mjs +3 -3
  11. package/es/src/hooks/index.d.ts +2 -0
  12. package/es/src/hooks/index.mjs +7 -3
  13. package/es/src/hooks/useManualRef.d.ts +6 -0
  14. package/es/src/hooks/useManualRef.mjs +27 -0
  15. package/es/src/hooks/useThrottleRef.d.ts +2 -0
  16. package/es/src/hooks/useThrottleRef.mjs +31 -0
  17. package/es/src/index.d.ts +1 -1
  18. package/es/src/index.mjs +227 -222
  19. package/es/src/locale/lang/en.mjs +3 -0
  20. package/es/src/locale/lang/zh-cn.mjs +3 -0
  21. package/es/src/path-map.mjs +1 -1
  22. package/es/src/scroll-bar/hooks/use-track.d.ts +30 -0
  23. package/es/src/scroll-bar/hooks/use-track.mjs +76 -0
  24. package/es/src/scroll-bar/index.d.ts +5 -0
  25. package/es/src/scroll-bar/index.mjs +7 -0
  26. package/es/src/scroll-bar/index.vue.d.ts +53 -0
  27. package/es/src/scroll-bar/index.vue.mjs +90 -0
  28. package/es/src/scroll-bar/index.vue2.mjs +4 -0
  29. package/es/src/scroll-bar/interface.d.ts +66 -0
  30. package/es/src/scroll-bar/internal.vue.d.ts +22 -0
  31. package/es/src/scroll-bar/internal.vue.mjs +132 -0
  32. package/es/src/scroll-bar/internal.vue2.mjs +4 -0
  33. package/es/src/scroll-bar/style/css.js +1 -0
  34. package/es/src/scroll-bar/style/index.js +1 -0
  35. package/es/src/scroll-bar/utils/index.d.ts +29 -0
  36. package/es/src/scroll-bar/utils/index.mjs +22 -0
  37. package/lib/index.js +1 -1
  38. package/lib/src/business/ap-select-layout/select-layout.vue2.js +1 -1
  39. package/lib/src/business/ap-summary/ap-summary.vue.d.ts +0 -1
  40. package/lib/src/business/ap-summary/ap-summary.vue2.js +1 -1
  41. package/lib/src/business/ap-summary/index.d.ts +0 -3
  42. package/lib/src/business/ap-table-modal/table-modal.vue2.js +1 -1
  43. package/lib/src/business/batch-input-group/form-item.vue.d.ts +9 -1
  44. package/lib/src/business/batch-input-group/form-item.vue.js +1 -1
  45. package/lib/src/config-provider/hooks/use-namespace.d.ts +1 -1
  46. package/lib/src/config-provider/hooks/use-namespace.js +1 -1
  47. package/lib/src/hooks/index.d.ts +2 -0
  48. package/lib/src/hooks/index.js +1 -1
  49. package/lib/src/hooks/useManualRef.d.ts +6 -0
  50. package/lib/src/hooks/useManualRef.js +1 -0
  51. package/lib/src/hooks/useThrottleRef.d.ts +2 -0
  52. package/lib/src/hooks/useThrottleRef.js +1 -0
  53. package/lib/src/index.d.ts +1 -1
  54. package/lib/src/index.js +1 -1
  55. package/lib/src/locale/lang/en.js +1 -1
  56. package/lib/src/locale/lang/zh-cn.js +1 -1
  57. package/lib/src/path-map.js +1 -1
  58. package/lib/src/scroll-bar/hooks/use-track.d.ts +30 -0
  59. package/lib/src/scroll-bar/hooks/use-track.js +1 -0
  60. package/lib/src/scroll-bar/index.d.ts +5 -0
  61. package/lib/src/scroll-bar/index.js +1 -0
  62. package/lib/src/scroll-bar/index.vue.d.ts +53 -0
  63. package/lib/src/scroll-bar/index.vue.js +1 -0
  64. package/lib/src/scroll-bar/index.vue2.js +1 -0
  65. package/lib/src/scroll-bar/interface.d.ts +66 -0
  66. package/lib/src/scroll-bar/internal.vue.d.ts +22 -0
  67. package/lib/src/scroll-bar/internal.vue.js +1 -0
  68. package/lib/src/scroll-bar/internal.vue2.js +1 -0
  69. package/lib/src/scroll-bar/style/css.cjs +1 -0
  70. package/lib/src/scroll-bar/style/index.cjs +1 -0
  71. package/lib/src/scroll-bar/utils/index.d.ts +29 -0
  72. package/lib/src/scroll-bar/utils/index.js +1 -0
  73. package/package.json +1 -1
  74. package/theme/index.css +36 -21
  75. package/theme/index.less +1 -1
  76. package/theme/scroll-bar/index.css +46 -0
  77. package/theme/scroll-bar/index.less +62 -0
  78. package/es/src/ap-scroll-bar/ap-scroll-bar.vue.d.ts +0 -8
  79. package/es/src/ap-scroll-bar/ap-scroll-bar.vue.mjs +0 -4
  80. package/es/src/ap-scroll-bar/ap-scroll-bar.vue2.mjs +0 -116
  81. package/es/src/ap-scroll-bar/index.d.ts +0 -29
  82. package/es/src/ap-scroll-bar/index.mjs +0 -8
  83. package/es/src/ap-scroll-bar/interface.d.ts +0 -4
  84. package/es/src/ap-scroll-bar/style/css.js +0 -1
  85. package/es/src/ap-scroll-bar/style/index.js +0 -1
  86. package/lib/src/ap-scroll-bar/ap-scroll-bar.vue.d.ts +0 -8
  87. package/lib/src/ap-scroll-bar/ap-scroll-bar.vue.js +0 -1
  88. package/lib/src/ap-scroll-bar/ap-scroll-bar.vue2.js +0 -1
  89. package/lib/src/ap-scroll-bar/index.d.ts +0 -29
  90. package/lib/src/ap-scroll-bar/index.js +0 -1
  91. package/lib/src/ap-scroll-bar/interface.d.ts +0 -4
  92. package/lib/src/ap-scroll-bar/style/css.cjs +0 -1
  93. package/lib/src/ap-scroll-bar/style/index.cjs +0 -1
  94. /package/es/src/{ap-scroll-bar → scroll-bar}/interface.mjs +0 -0
  95. /package/es/src/{ap-scroll-bar → scroll-bar}/style/css.d.ts +0 -0
  96. /package/es/src/{ap-scroll-bar → scroll-bar}/style/index.d.ts +0 -0
  97. /package/lib/src/{ap-scroll-bar → scroll-bar}/interface.js +0 -0
  98. /package/lib/src/{ap-scroll-bar → scroll-bar}/style/css.d.ts +0 -0
  99. /package/lib/src/{ap-scroll-bar → scroll-bar}/style/index.d.ts +0 -0
@@ -1,19 +1,18 @@
1
- import { defineComponent as I, computed as L, createVNode as N, Fragment as y, openBlock as m, createBlock as i, unref as r, normalizeClass as f, withCtx as x, createElementBlock as w, renderList as z, normalizeStyle as B, resolveDynamicComponent as R } from "vue";
2
- import { isNil as A, get as c } from "lodash-unified";
3
- import { TableSummaryRow as D, TableSummaryCell as F } from "@aplus-frontend/antdv";
4
- import { flattenColumns as V, formatDataIndex as u } from "./utils.mjs";
1
+ import { defineComponent as w, computed as y, createVNode as z, Fragment as f, openBlock as m, createBlock as i, unref as r, normalizeClass as x, withCtx as k, createElementBlock as B, renderList as R, normalizeStyle as A, resolveDynamicComponent as D } from "vue";
2
+ import { isNil as F, get as c } from "lodash-unified";
3
+ import { TableSummaryRow as V, TableSummaryCell as E } from "@aplus-frontend/antdv";
4
+ import { flattenColumns as P, formatDataIndex as u } from "./utils.mjs";
5
5
  import "../../config-provider/index.mjs";
6
- import { isNumeric as E, toThousand as P, toFixed as $ } from "@aplus-frontend/utils";
7
- import { useNamespace as j } from "../../config-provider/hooks/use-namespace.mjs";
8
- const Q = /* @__PURE__ */ I({
6
+ import { isNumeric as $, toThousand as j, toFixed as q } from "@aplus-frontend/utils";
7
+ import { useLocale as G } from "../../config-provider/hooks/use-locale.mjs";
8
+ import { useNamespace as H } from "../../config-provider/hooks/use-namespace.mjs";
9
+ const Y = /* @__PURE__ */ w({
9
10
  name: "ApSummary",
10
11
  __name: "ap-summary",
11
12
  props: {
12
13
  data: {},
13
14
  columns: {},
14
- summaryTitle: {
15
- default: "合计"
16
- },
15
+ summaryTitle: {},
17
16
  hasSelect: {
18
17
  type: Boolean,
19
18
  default: !0
@@ -22,14 +21,16 @@ const Q = /* @__PURE__ */ I({
22
21
  default: "middle"
23
22
  }
24
23
  },
25
- setup(k) {
26
- const n = k, h = (a) => a === 0, T = (a, o) => {
24
+ setup(h) {
25
+ const n = h, {
26
+ t: T
27
+ } = G(), S = y(() => n.summaryTitle ?? T("ap.apSummary.total")), C = (a) => a === 0, _ = (a, o) => {
27
28
  var s;
28
- if (!E(a) || o.valueType !== "number")
29
+ if (!$(a) || o.valueType !== "number")
29
30
  return a;
30
31
  const e = (s = o.fieldProps) == null ? void 0 : s.field, t = (e == null ? void 0 : e.precision) || 0;
31
- return (A(e == null ? void 0 : e.thousands) ? !0 : e == null ? void 0 : e.thousands) ? P(a, t) : $(a, t);
32
- }, C = L(() => {
32
+ return (F(e == null ? void 0 : e.thousands) ? !0 : e == null ? void 0 : e.thousands) ? j(a, t) : q(a, t);
33
+ }, g = y(() => {
33
34
  let a = [];
34
35
  n.hasSelect && a.push({
35
36
  key: "select",
@@ -37,17 +38,17 @@ const Q = /* @__PURE__ */ I({
37
38
  align: "left",
38
39
  value: ""
39
40
  });
40
- const e = V(n.columns).map((t, d) => {
41
+ const e = P(n.columns).map((t, d) => {
41
42
  let s;
42
- const b = c(n.data, u(t.dataIndex || t.key));
43
- if (h(d))
44
- s = n.summaryTitle;
45
- else if (b && (t.customRender || t.renderText)) {
46
- const p = c(n.data, u(t.dataIndex || t.key)), v = u(t.dataIndex || t.key), l = t.customRender || t.renderText;
43
+ const L = c(n.data, u(t.dataIndex || t.key));
44
+ if (C(d))
45
+ s = S.value;
46
+ else if (L && (t.customRender || t.renderText)) {
47
+ const p = c(n.data, u(t.dataIndex || t.key)), N = u(t.dataIndex || t.key), l = t.customRender || t.renderText;
47
48
  s = l == null ? void 0 : l({
48
49
  value: p,
49
50
  record: {
50
- [v]: p
51
+ [N]: p
51
52
  },
52
53
  text: void 0,
53
54
  index: 0,
@@ -55,32 +56,32 @@ const Q = /* @__PURE__ */ I({
55
56
  column: {}
56
57
  });
57
58
  } else
58
- s = T(c(n.data, u(t.dataIndex || t.key)), t);
59
+ s = _(c(n.data, u(t.dataIndex || t.key)), t);
59
60
  return {
60
61
  key: t.key,
61
62
  rowSpan: 1,
62
63
  align: t.align,
63
- value: N(y, null, [s])
64
+ value: z(f, null, [s])
64
65
  };
65
66
  });
66
67
  return a.concat(e);
67
68
  }), {
68
- b: S,
69
- e: _,
70
- em: g
71
- } = j("ap-summary");
72
- return (a, o) => (m(), i(r(D), {
73
- class: f(r(S)())
69
+ b: v,
70
+ e: b,
71
+ em: I
72
+ } = H("ap-summary");
73
+ return (a, o) => (m(), i(r(V), {
74
+ class: x(r(v)())
74
75
  }, {
75
- default: x(() => [(m(!0), w(y, null, z(C.value, (e, t) => (m(), i(r(F), {
76
+ default: k(() => [(m(!0), B(f, null, R(g.value, (e, t) => (m(), i(r(E), {
76
77
  key: e.key,
77
- class: f(`${n.size === "small" ? r(g)("item", "small") : r(_)("item")}`),
78
+ class: x(`${n.size === "small" ? r(I)("item", "small") : r(b)("item")}`),
78
79
  index: t,
79
- style: B({
80
+ style: A({
80
81
  textAlign: e.align
81
82
  })
82
83
  }, {
83
- default: x(() => [(m(), i(R(e.value)))]),
84
+ default: k(() => [(m(), i(D(e.value)))]),
84
85
  _: 2
85
86
  }, 1032, ["class", "index", "style"]))), 128))]),
86
87
  _: 1
@@ -88,5 +89,5 @@ const Q = /* @__PURE__ */ I({
88
89
  }
89
90
  });
90
91
  export {
91
- Q as default
92
+ Y as default
92
93
  };
@@ -5,7 +5,6 @@ export * from './utils';
5
5
  declare const ApSummary: {
6
6
  new (...args: any[]): CreateComponentPublicInstanceWithMixins<Readonly< ApSummaryProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, PublicProps, {
7
7
  size: "middle" | "small";
8
- summaryTitle: string;
9
8
  hasSelect: boolean;
10
9
  }, false, {}, {}, GlobalComponents, GlobalDirectives, string, {}, any, ComponentProvideOptions, {
11
10
  P: {};
@@ -16,7 +15,6 @@ declare const ApSummary: {
16
15
  Defaults: {};
17
16
  }, Readonly< ApSummaryProps> & Readonly<{}>, {}, {}, {}, {}, {
18
17
  size: "middle" | "small";
19
- summaryTitle: string;
20
18
  hasSelect: boolean;
21
19
  }>;
22
20
  __isFragment?: never;
@@ -24,7 +22,6 @@ declare const ApSummary: {
24
22
  __isSuspense?: never;
25
23
  } & ComponentOptionsBase<Readonly< ApSummaryProps> & Readonly<{}>, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, {
26
24
  size: "middle" | "small";
27
- summaryTitle: string;
28
25
  hasSelect: boolean;
29
26
  }, {}, string, {}, GlobalComponents, GlobalDirectives, string, ComponentProvideOptions> & VNodeProps & AllowedComponentProps & ComponentCustomProps & ( Plugin & (new (...args: any[]) => {
30
27
  $props: {
@@ -117,7 +117,9 @@ const pe = /* @__PURE__ */ U({
117
117
  var u, p;
118
118
  if (l.length > e.maxCount) {
119
119
  B.warning(
120
- g("ap.apTableModal.messageMaxCount", { maxCount: e.maxCount })
120
+ g("ap.apTableModal.messageMaxCount", {
121
+ maxCount: e.maxCount
122
+ })
121
123
  );
122
124
  return;
123
125
  }
@@ -132,7 +134,9 @@ const pe = /* @__PURE__ */ U({
132
134
  if (l) {
133
135
  if (a.value.length >= e.maxCount) {
134
136
  B.warning(
135
- g("ap.apTableModal.messageMaxCount", { maxCount: e.maxCount })
137
+ g("ap.apTableModal.messageMaxCount", {
138
+ maxCount: e.maxCount
139
+ })
136
140
  );
137
141
  return;
138
142
  }
@@ -209,7 +213,7 @@ const pe = /* @__PURE__ */ U({
209
213
  onDeleteItem: E
210
214
  }), {
211
215
  default: h(() => [
212
- S(s(ee), y(s(R)(e.apTableProps, "dataSource"), {
216
+ S(s(ee), y({
213
217
  ref_key: "apTableRef",
214
218
  ref: d,
215
219
  scroll: { y: "100%" },
@@ -220,7 +224,7 @@ const pe = /* @__PURE__ */ U({
220
224
  "row-selection": A.value,
221
225
  bordered: s(I) === "admin",
222
226
  "data-source": C.value
223
- }), null, 16, ["columns", "row-key", "row-selection", "bordered", "data-source"])
227
+ }, s(R)(e.apTableProps, "dataSource")), null, 16, ["columns", "row-key", "row-selection", "bordered", "data-source"])
224
228
  ]),
225
229
  _: 1
226
230
  }, 16, ["selected-list"])
@@ -1,6 +1,14 @@
1
- import { ApFormItemBatchInputProps } from './interface';
1
+ import { ApFormItemBatchInputProps, BatchInputGroupProps } from './interface';
2
2
  import { DefineComponent, ComponentOptionsMixin, PublicProps, ComponentProvideOptions } from 'vue';
3
3
  declare const _default: DefineComponent<ApFormItemBatchInputProps, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, {}, string, PublicProps, Readonly<ApFormItemBatchInputProps> & Readonly<{}>, {
4
4
  trim: boolean;
5
+ disabled: boolean;
6
+ bordered: boolean;
7
+ field: Omit< BatchInputGroupProps, "value" | "onUpdate:value">;
8
+ colon: boolean;
9
+ required: boolean;
10
+ hasFeedback: boolean;
11
+ autoLink: boolean;
12
+ validateFirst: boolean;
5
13
  }, {}, {}, {}, string, ComponentProvideOptions, false, {}, any>;
6
14
  export default _default;
@@ -1,11 +1,11 @@
1
- import { defineComponent as B, computed as n, openBlock as b, createBlock as _, mergeProps as u, unref as f, withCtx as g, createVNode as x } from "vue";
1
+ import { defineComponent as b, computed as r, openBlock as B, createBlock as g, mergeProps as u, unref as m, withCtx as _, createVNode as V } from "vue";
2
2
  import "./index.vue2.mjs";
3
3
  import "../../ap-form/item/index.vue2.mjs";
4
- import { isValid as d } from "@aplus-frontend/utils";
4
+ import { isValid as s } from "@aplus-frontend/utils";
5
5
  import { omit as p } from "lodash-unified";
6
- import V from "../../ap-form/item/index.vue.mjs";
6
+ import x from "../../ap-form/item/index.vue.mjs";
7
7
  import k from "./index.vue.mjs";
8
- const A = /* @__PURE__ */ B({
8
+ const A = /* @__PURE__ */ b({
9
9
  __name: "form-item",
10
10
  props: {
11
11
  htmlFor: {},
@@ -15,15 +15,15 @@ const A = /* @__PURE__ */ B({
15
15
  extra: {},
16
16
  labelCol: {},
17
17
  wrapperCol: {},
18
- hasFeedback: { type: Boolean },
19
- colon: { type: Boolean },
18
+ hasFeedback: { type: Boolean, default: !1 },
19
+ colon: { type: Boolean, default: void 0 },
20
20
  labelAlign: {},
21
21
  prop: {},
22
22
  name: {},
23
23
  rules: {},
24
- autoLink: { type: Boolean },
25
- required: { type: Boolean },
26
- validateFirst: { type: Boolean },
24
+ autoLink: { type: Boolean, default: !0 },
25
+ required: { type: Boolean, default: void 0 },
26
+ validateFirst: { type: Boolean, default: void 0 },
27
27
  validateStatus: {},
28
28
  validateTrigger: {},
29
29
  messageVariables: {},
@@ -42,58 +42,62 @@ const A = /* @__PURE__ */ B({
42
42
  xl: {},
43
43
  xxl: {},
44
44
  flex: {},
45
- bordered: { type: Boolean },
45
+ bordered: { type: Boolean, default: !1 },
46
46
  valuePropName: {},
47
47
  initialValue: {},
48
48
  _signal: {},
49
49
  transform: {},
50
- field: {},
51
- disabled: { type: Boolean },
50
+ field: { default: () => ({}) },
51
+ disabled: { type: Boolean, default: void 0 },
52
52
  placeholer: {},
53
53
  trim: { type: Boolean, default: !0 }
54
54
  },
55
- setup(c) {
56
- const l = c, y = n(() => (l == null ? void 0 : l.transform) || {
55
+ setup(v) {
56
+ const l = v, c = r(() => (l == null ? void 0 : l.transform) || {
57
57
  flat: !1,
58
58
  transformer: (e) => {
59
- var o, a, i, r, m, s;
59
+ var a, o, i, n, d, f;
60
60
  if (e)
61
- return !(e != null && e.value) || ((o = e == null ? void 0 : e.value) == null ? void 0 : o.length) < 1 ? void 0 : (a = l == null ? void 0 : l.field) != null && a.options ? {
61
+ return !(e != null && e.value) || ((a = e == null ? void 0 : e.value) == null ? void 0 : a.length) < 1 ? void 0 : (o = l == null ? void 0 : l.field) != null && o.options ? {
62
62
  ...e,
63
- value: (r = (i = e == null ? void 0 : e.value) == null ? void 0 : i.filter((t) => d(t == null ? void 0 : t.trim()))) == null ? void 0 : r.map((t) => l.trim ? t == null ? void 0 : t.trim() : t)
64
- } : (s = (m = e == null ? void 0 : e.value) == null ? void 0 : m.filter((t) => d(t == null ? void 0 : t.trim()))) == null ? void 0 : s.map((t) => l.trim ? t == null ? void 0 : t.trim() : t);
63
+ value: (n = (i = e == null ? void 0 : e.value) == null ? void 0 : i.filter((t) => s(t == null ? void 0 : t.trim()))) == null ? void 0 : n.map((t) => l.trim ? t == null ? void 0 : t.trim() : t)
64
+ } : (f = (d = e == null ? void 0 : e.value) == null ? void 0 : d.filter((t) => s(t == null ? void 0 : t.trim()))) == null ? void 0 : f.map((t) => l.trim ? t == null ? void 0 : t.trim() : t);
65
65
  }
66
- }), v = n(() => {
66
+ }), y = r(() => {
67
67
  var e;
68
68
  return ((e = l.field) == null ? void 0 : e.style) || "width:auto";
69
- }), h = n(() => {
70
- var e, o;
69
+ }), h = r(() => {
70
+ var e, a;
71
71
  return (l == null ? void 0 : l.initialValue) || {
72
- key: (o = (e = l == null ? void 0 : l.field) == null ? void 0 : e.options) == null ? void 0 : o.map((a) => a.value)
72
+ key: (a = (e = l == null ? void 0 : l.field) == null ? void 0 : e.options) == null ? void 0 : a.map((o) => o.value)
73
73
  };
74
74
  });
75
- return (e, o) => (b(), _(V, u(
76
- f(p)(l, [
77
- "field",
78
- "initialValue",
79
- "transform",
80
- "placeholder",
81
- "disabled"
82
- ]),
83
- {
84
- "initial-value": h.value,
85
- transform: y.value
86
- }
87
- ), {
88
- default: g(() => [
89
- x(k, u(f(p)(l.field, ["style"]), {
90
- style: v.value,
91
- disabled: e.disabled,
92
- placeholer: e.placeholer
93
- }), null, 16, ["style", "disabled", "placeholer"])
94
- ]),
95
- _: 1
96
- }, 16, ["initial-value", "transform"]));
75
+ return (e, a) => {
76
+ var o, i;
77
+ return B(), g(x, u(
78
+ m(p)(l, [
79
+ "field",
80
+ "initialValue",
81
+ "transform",
82
+ "placeholder",
83
+ "disabled"
84
+ ]),
85
+ {
86
+ "initial-value": h.value,
87
+ transform: c.value,
88
+ bordered: (i = (o = e.field) == null ? void 0 : o.options) != null && i.length ? !1 : e.bordered
89
+ }
90
+ ), {
91
+ default: _(() => [
92
+ V(k, u(m(p)(l.field, ["style"]), {
93
+ style: y.value,
94
+ disabled: e.disabled,
95
+ placeholer: e.placeholer
96
+ }), null, 16, ["style", "disabled", "placeholer"])
97
+ ]),
98
+ _: 1
99
+ }, 16, ["initial-value", "transform", "bordered"]);
100
+ };
97
101
  }
98
102
  });
99
103
  export {
@@ -15,7 +15,7 @@ export declare const useNamespace: (block: string, namespaceOverrides?: Ref<stri
15
15
  (name: string, state: boolean | undefined): string;
16
16
  (name: string): string;
17
17
  };
18
- cssVar: (object: Record<string, string>) => Record<string, string>;
18
+ cssVar: (object: Record<string, string | undefined | null>) => Record<string, string>;
19
19
  cssVarName: (name: string) => string;
20
20
  cssVarBlock: (object: Record<string, string>) => Record<string, string>;
21
21
  cssVarBlockName: (name: string) => string;
@@ -1,7 +1,7 @@
1
1
  import { getCurrentInstance as v, inject as N, ref as p, computed as V, unref as y } from "vue";
2
- const m = "aplus", l = "is-", c = (a, r, t, o, $) => {
2
+ const m = "aplus", l = "is-", c = (a, r, t, $, o) => {
3
3
  let u = `${a}-${r}`;
4
- return t && (u += `-${t}`), o && (u += `__${o}`), $ && (u += `--${$}`), u;
4
+ return t && (u += `-${t}`), $ && (u += `__${$}`), o && (u += `--${o}`), u;
5
5
  }, B = Symbol("namespaceContextKey"), C = (a) => {
6
6
  const r = a || (v() ? N(B, p(m)) : p(m));
7
7
  return V(() => y(r) || m);
@@ -23,7 +23,7 @@ const m = "aplus", l = "is-", c = (a, r, t, o, $) => {
23
23
  cssVar: (s) => {
24
24
  const e = {};
25
25
  for (const n in s)
26
- s[n] && (e[`--${t.value}-${n}`] = s[n]);
26
+ s[n] && (e[`--${t.value}-${a}-${n}`] = s[n]);
27
27
  return e;
28
28
  },
29
29
  cssVarName: (s) => `--${t.value}-${s}`,
@@ -1,2 +1,4 @@
1
1
  export { useMessage } from './useMessage';
2
2
  export { useControllableValue } from './useControllableValue';
3
+ export { useManualRef } from './useManualRef';
4
+ export { useThrottleRef } from './useThrottleRef';
@@ -1,6 +1,10 @@
1
1
  import { useMessage as r } from "./useMessage.mjs";
2
- import { useControllableValue as s } from "./useControllableValue.mjs";
2
+ import { useControllableValue as f } from "./useControllableValue.mjs";
3
+ import { useManualRef as s } from "./useManualRef.mjs";
4
+ import { useThrottleRef as a } from "./useThrottleRef.mjs";
3
5
  export {
4
- s as useControllableValue,
5
- r as useMessage
6
+ f as useControllableValue,
7
+ s as useManualRef,
8
+ r as useMessage,
9
+ a as useThrottleRef
6
10
  };
@@ -0,0 +1,6 @@
1
+ import { Ref } from 'vue';
2
+ export declare function useManualRef(): {
3
+ updateSet: Set<() => void>;
4
+ manualRef: <T>(value: T) => Ref<T, T>;
5
+ triggerUpdate: () => void;
6
+ };
@@ -0,0 +1,27 @@
1
+ import { customRef as g } from "vue";
2
+ function d() {
3
+ const r = /* @__PURE__ */ new Set();
4
+ function o(t) {
5
+ return g((i, c) => {
6
+ let n = t;
7
+ const u = () => {
8
+ t !== n && (n = t, c());
9
+ };
10
+ return {
11
+ get: () => (i(), t),
12
+ set: (e) => {
13
+ e !== t && (t = e, r.add(u));
14
+ }
15
+ };
16
+ });
17
+ }
18
+ function f() {
19
+ for (const t of r)
20
+ t();
21
+ r.clear();
22
+ }
23
+ return { updateSet: r, manualRef: o, triggerUpdate: f };
24
+ }
25
+ export {
26
+ d as useManualRef
27
+ };
@@ -0,0 +1,2 @@
1
+ import { Ref } from 'vue';
2
+ export declare function useThrottleRef<T = any>(value: T, delay?: number): Ref<T, T>;
@@ -0,0 +1,31 @@
1
+ import { customRef as a } from "vue";
2
+ function m(n, o = 16.67) {
3
+ let l = n, r = !1, e = null;
4
+ return a((s, f) => {
5
+ const u = (t) => {
6
+ if (t !== l) {
7
+ if (r) {
8
+ e = t;
9
+ return;
10
+ }
11
+ l = t, f(), r = !0, setTimeout(() => {
12
+ if (r = !1, e !== null) {
13
+ const i = e;
14
+ e = null, u(i);
15
+ }
16
+ }, o);
17
+ }
18
+ };
19
+ return {
20
+ get() {
21
+ return s(), l;
22
+ },
23
+ set(t) {
24
+ u(t);
25
+ }
26
+ };
27
+ });
28
+ }
29
+ export {
30
+ m as useThrottleRef
31
+ };
package/es/src/index.d.ts CHANGED
@@ -17,4 +17,4 @@ export * from './business';
17
17
  export * from './ap-table';
18
18
  export * from './editable-table';
19
19
  export * from './ap-descriptions';
20
- export * from './ap-scroll-bar';
20
+ export * from './scroll-bar';