@xto/feedback 1.2.2 → 1.2.4

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.
@@ -2,7 +2,8 @@ import { App } from 'vue';
2
2
  import { default as MessageService } from './message';
3
3
  export type { MessageType, MessageProps, MessageInstance, MessageOptions, MessageReturnType } from './types';
4
4
  export type { Message as MessageFn } from './types';
5
- export declare const Message: import('./types').Message;
5
+ declare const Message: import('./types').Message;
6
+ export { Message };
6
7
  export default MessageService;
7
8
  export declare const MessageComponent: {
8
9
  new (...args: any[]): import('vue').CreateComponentPublicInstanceWithMixins<Readonly<import('./types').MessageProps> & Readonly<{
@@ -1,5 +1,5 @@
1
1
  import { Message } from './types';
2
2
  declare const closeAll: () => void;
3
- declare const Message: Message;
4
- export default Message;
5
- export { closeAll };
3
+ declare const message: Message;
4
+ export default message;
5
+ export { closeAll, message as Message };
@@ -2,7 +2,8 @@ import { App } from 'vue';
2
2
  import { default as MessageBoxService } from './messageBox';
3
3
  export type { MessageBoxMessageType, MessageBoxOptions, MessageBoxResult, MessageBoxFn } from './types';
4
4
  export type { MessageBox as MessageBoxType } from './types';
5
- export declare const MessageBox: import('./types').MessageBox;
5
+ declare const MessageBox: import('./types').MessageBox;
6
+ export { MessageBox };
6
7
  export default MessageBoxService;
7
8
  export declare const TMessageBox: {
8
9
  install(app: App): void;
@@ -1,5 +1,5 @@
1
1
  import { MessageBox } from './types';
2
2
  declare const closeAll: () => void;
3
- declare const MessageBox: MessageBox;
4
- export default MessageBox;
5
- export { closeAll };
3
+ declare const messageBox: MessageBox;
4
+ export default messageBox;
5
+ export { closeAll, messageBox as MessageBox };
@@ -3,7 +3,8 @@ import { default as NotificationService } from './notification';
3
3
  export type { NotificationPosition, NotificationOptions, NotificationInstance, NotificationFn } from './types';
4
4
  export type { NotificationType } from './types';
5
5
  export type { Notification as NotificationInterface } from './types';
6
- export declare const Notification: import('./types').Notification;
6
+ declare const Notification: import('./types').Notification;
7
+ export { Notification };
7
8
  export default NotificationService;
8
9
  export declare const TNotification: {
9
10
  install(app: App): void;
@@ -1,5 +1,5 @@
1
1
  import { Notification } from './types';
2
2
  declare const closeAll: () => void;
3
- declare const Notification: Notification;
4
- export default Notification;
5
- export { closeAll };
3
+ declare const notification: Notification;
4
+ export default notification;
5
+ export { closeAll, notification as Notification };
package/es/index.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent as R, computed as B, openBlock as u, createElementBlock as f, normalizeStyle as P, normalizeClass as s, createElementVNode as z, renderSlot as H, createTextVNode as S, toDisplayString as $, ref as I, watch as ae, resolveComponent as ze, createBlock as Z, Teleport as oe, createVNode as E, Transition as K, withCtx as D, unref as o, withModifiers as re, createCommentVNode as C, withDirectives as ce, vShow as ue, Fragment as ge, renderList as be, nextTick as te, onUnmounted as de, onMounted as ye, reactive as Ce, createApp as Me, h as k } from "vue";
2
- import { useNamespace as N, useZIndex as Ve, useEscape as Le, nextMessageZIndex as He } from "@xto/core";
2
+ import { useNamespace as j, useZIndex as Ve, useEscape as Le, nextMessageZIndex as He } from "@xto/core";
3
3
  const we = {
4
4
  // 箭头类
5
5
  "arrow-up": "M12 19V5m0 0l-7 7m7-7l7 7",
@@ -215,7 +215,7 @@ const Be = ["aria-hidden", "aria-label"], Te = ["stroke-width"], Ie = ["d"], X =
215
215
  strokeWidth: { default: 2 }
216
216
  },
217
217
  setup(e, { expose: n }) {
218
- const t = e, r = N("icon"), a = B(() => typeof t.size == "number" ? `${t.size}px` : t.size), i = B(() => ({
218
+ const t = e, r = j("icon"), a = B(() => typeof t.size == "number" ? `${t.size}px` : t.size), i = B(() => ({
219
219
  width: a.value,
220
220
  height: a.value,
221
221
  color: t.color
@@ -272,7 +272,7 @@ const Be = ["aria-hidden", "aria-label"], Te = ["stroke-width"], Ie = ["d"], X =
272
272
  },
273
273
  emits: ["update:modelValue", "update:open", "close", "open", "ok", "cancel"],
274
274
  setup(e, { emit: n }) {
275
- const t = e, r = n, a = N("modal"), { next: i } = Ve(), m = I(i()), g = B({
275
+ const t = e, r = n, a = j("modal"), { next: i } = Ve(), m = I(i()), g = B({
276
276
  get: () => t.modelValue !== void 0 ? t.modelValue : t.open !== void 0 ? t.open : !1,
277
277
  set: (h) => {
278
278
  t.modelValue !== void 0 && r("update:modelValue", h), t.open !== void 0 && r("update:open", h), t.modelValue === void 0 && t.open === void 0 && r("update:modelValue", h);
@@ -396,7 +396,7 @@ const Be = ["aria-hidden", "aria-label"], Te = ["stroke-width"], Ie = ["d"], X =
396
396
  },
397
397
  emits: ["update:modelValue", "close", "open"],
398
398
  setup(e, { emit: n }) {
399
- const t = e, r = n, a = N("drawer"), i = I(2e3), m = () => {
399
+ const t = e, r = n, a = j("drawer"), i = I(2e3), m = () => {
400
400
  r("update:modelValue", !1), r("close");
401
401
  }, g = () => {
402
402
  t.closeOnClickModal && m();
@@ -494,7 +494,7 @@ const Be = ["aria-hidden", "aria-label"], Te = ["stroke-width"], Ie = ["d"], X =
494
494
  },
495
495
  emits: ["update:modelValue", "confirm", "cancel", "close", "field-change"],
496
496
  setup(e, { emit: n }) {
497
- const t = e, r = n, a = N("drawer-form"), i = I({}), m = I({});
497
+ const t = e, r = n, a = j("drawer-form"), i = I({}), m = I({});
498
498
  B(() => [
499
499
  a.b()
500
500
  ]), ae(() => t.formData, (M) => {
@@ -659,7 +659,7 @@ const Be = ["aria-hidden", "aria-label"], Te = ["stroke-width"], Ie = ["d"], X =
659
659
  },
660
660
  emits: ["close"],
661
661
  setup(e, { emit: n }) {
662
- const t = e, r = n, a = N("alert"), i = I(!0), m = {
662
+ const t = e, r = n, a = j("alert"), i = I(!0), m = {
663
663
  success: "check",
664
664
  warning: "warning",
665
665
  error: "close-circle",
@@ -739,29 +739,29 @@ const Be = ["aria-hidden", "aria-label"], Te = ["stroke-width"], Ie = ["d"], X =
739
739
  },
740
740
  emits: ["update:visible", "show", "hide"],
741
741
  setup(e, { emit: n }) {
742
- const t = e, r = n, a = N("tooltip"), i = I(!1), m = I(), g = I();
742
+ const t = e, r = n, a = j("tooltip"), i = I(!1), m = I(), g = I();
743
743
  let v, c;
744
744
  const x = I({}), p = () => {
745
745
  if (!m.value || !g.value) return;
746
746
  const L = m.value.getBoundingClientRect(), F = g.value;
747
747
  F.style.visibility = "hidden", F.style.display = "block";
748
- const j = F.offsetWidth, U = F.offsetHeight, q = t.offset, he = window.innerWidth, fe = window.innerHeight;
748
+ const N = F.offsetWidth, U = F.offsetHeight, q = t.offset, he = window.innerWidth, fe = window.innerHeight;
749
749
  let O = 0, W = 0, J = t.placement;
750
750
  switch (t.placement) {
751
751
  case "top":
752
- O = L.top - U - q, W = L.left + (L.width - j) / 2;
752
+ O = L.top - U - q, W = L.left + (L.width - N) / 2;
753
753
  break;
754
754
  case "bottom":
755
- O = L.bottom + q, W = L.left + (L.width - j) / 2;
755
+ O = L.bottom + q, W = L.left + (L.width - N) / 2;
756
756
  break;
757
757
  case "left":
758
- O = L.top + (L.height - U) / 2, W = L.left - j - q;
758
+ O = L.top + (L.height - U) / 2, W = L.left - N - q;
759
759
  break;
760
760
  case "right":
761
761
  O = L.top + (L.height - U) / 2, W = L.right + q;
762
762
  break;
763
763
  }
764
- t.placement === "top" && O < 0 ? (J = "bottom", O = L.bottom + q) : t.placement === "bottom" && O + U > fe ? (J = "top", O = L.top - U - q) : t.placement === "left" && W < 0 ? (J = "right", W = L.right + q) : t.placement === "right" && W + j > he && (J = "left", W = L.left - j - q), W < 8 && (W = 8), W + j > he - 8 && (W = he - j - 8), O < 8 && (O = 8), O + U > fe - 8 && (O = fe - U - 8), x.value = {
764
+ t.placement === "top" && O < 0 ? (J = "bottom", O = L.bottom + q) : t.placement === "bottom" && O + U > fe ? (J = "top", O = L.top - U - q) : t.placement === "left" && W < 0 ? (J = "right", W = L.right + q) : t.placement === "right" && W + N > he && (J = "left", W = L.left - N - q), W < 8 && (W = 8), W + N > he - 8 && (W = he - N - 8), O < 8 && (O = 8), O + U > fe - 8 && (O = fe - U - 8), x.value = {
765
765
  position: "fixed",
766
766
  top: `${O}px`,
767
767
  left: `${W}px`,
@@ -791,8 +791,8 @@ const Be = ["aria-hidden", "aria-label"], Te = ["stroke-width"], Ie = ["d"], X =
791
791
  }, A = () => {
792
792
  t.trigger === "focus" && h();
793
793
  }, T = (L) => {
794
- var F, j;
795
- t.trigger === "click" && !((F = m.value) != null && F.contains(L.target)) && !((j = g.value) != null && j.contains(L.target)) && h();
794
+ var F, N;
795
+ t.trigger === "click" && !((F = m.value) != null && F.contains(L.target)) && !((N = g.value) != null && N.contains(L.target)) && h();
796
796
  }, V = () => {
797
797
  i.value && p();
798
798
  };
@@ -854,7 +854,7 @@ const Be = ["aria-hidden", "aria-label"], Te = ["stroke-width"], Ie = ["d"], X =
854
854
  ]))
855
855
  ], 2));
856
856
  }
857
- }), Ne = { class: "x-popconfirm-wrapper" }, je = { class: "x-popconfirm__main" }, De = { class: "x-popconfirm__title" }, Xe = { class: "x-popconfirm__action" }, ht = /* @__PURE__ */ R({
857
+ }), je = { class: "x-popconfirm-wrapper" }, Ne = { class: "x-popconfirm__main" }, De = { class: "x-popconfirm__title" }, Xe = { class: "x-popconfirm__action" }, ht = /* @__PURE__ */ R({
858
858
  name: "XPopconfirm",
859
859
  __name: "index",
860
860
  props: {
@@ -974,7 +974,7 @@ const Be = ["aria-hidden", "aria-label"], Te = ["stroke-width"], Ie = ["d"], X =
974
974
  }
975
975
  return y;
976
976
  });
977
- return (d, y) => (u(), f("span", Ne, [
977
+ return (d, y) => (u(), f("span", je, [
978
978
  z("span", {
979
979
  ref_key: "triggerRef",
980
980
  ref: i,
@@ -1000,7 +1000,7 @@ const Be = ["aria-hidden", "aria-label"], Te = ["stroke-width"], Ie = ["d"], X =
1000
1000
  class: "x-popconfirm__arrow",
1001
1001
  style: P(b.value)
1002
1002
  }, null, 4)) : C("", !0),
1003
- z("div", je, [
1003
+ z("div", Ne, [
1004
1004
  e.hideIcon ? C("", !0) : (u(), f("span", {
1005
1005
  key: 0,
1006
1006
  class: "x-popconfirm__icon",
@@ -1045,7 +1045,7 @@ const Be = ["aria-hidden", "aria-label"], Te = ["stroke-width"], Ie = ["d"], X =
1045
1045
  },
1046
1046
  emits: ["click"],
1047
1047
  setup(e, { emit: n }) {
1048
- const t = e, r = n, a = N("backtop"), i = I(!1), m = () => {
1048
+ const t = e, r = n, a = j("backtop"), i = I(!1), m = () => {
1049
1049
  const c = window.scrollY || document.documentElement.scrollTop || document.body.scrollTop || 0;
1050
1050
  i.value = c >= t.visibilityHeight;
1051
1051
  }, g = (c) => {
@@ -1095,7 +1095,7 @@ const Be = ["aria-hidden", "aria-label"], Te = ["stroke-width"], Ie = ["d"], X =
1095
1095
  icon: {}
1096
1096
  },
1097
1097
  setup(e) {
1098
- const n = e, t = N("result"), r = B(() => n.icon ? n.icon : {
1098
+ const n = e, t = j("result"), r = B(() => n.icon ? n.icon : {
1099
1099
  success: "check-circle",
1100
1100
  warning: "warning",
1101
1101
  error: "close-circle",
@@ -1148,7 +1148,7 @@ const Be = ["aria-hidden", "aria-label"], Te = ["stroke-width"], Ie = ["d"], X =
1148
1148
  name: "XTimeline",
1149
1149
  __name: "index",
1150
1150
  setup(e) {
1151
- const n = N("timeline");
1151
+ const n = j("timeline");
1152
1152
  return (t, r) => (u(), f("ul", {
1153
1153
  class: s(o(n).b())
1154
1154
  }, [
@@ -1168,7 +1168,7 @@ const Be = ["aria-hidden", "aria-label"], Te = ["stroke-width"], Ie = ["d"], X =
1168
1168
  hollow: { type: Boolean, default: !1 }
1169
1169
  },
1170
1170
  setup(e) {
1171
- const n = N("timeline-item");
1171
+ const n = j("timeline-item");
1172
1172
  return (t, r) => (u(), f("li", {
1173
1173
  class: s([o(n).b(), o(n).m(e.placement)])
1174
1174
  }, [
@@ -1220,7 +1220,7 @@ const Be = ["aria-hidden", "aria-label"], Te = ["stroke-width"], Ie = ["d"], X =
1220
1220
  },
1221
1221
  emits: ["close", "destroy"],
1222
1222
  setup(e, { expose: n, emit: t }) {
1223
- const r = e, a = t, i = N("message"), m = I(!1), g = I(He()), v = {
1223
+ const r = e, a = t, i = j("message"), m = I(!1), g = I(He()), v = {
1224
1224
  success: "check",
1225
1225
  warning: "warning",
1226
1226
  error: "close-circle",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xto/feedback",
3
- "version": "1.2.2",
3
+ "version": "1.2.4",
4
4
  "description": "Xto Feedback - Feedback components",
5
5
  "homepage": "https://jinguchu.github.io/xto-ui/",
6
6
  "repository": {