@teammodlr/ui-kit 2.1.24 → 2.1.26

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teammodlr/ui-kit",
3
- "version": "2.1.24",
3
+ "version": "2.1.26",
4
4
  "description": "",
5
5
  "main": "lib/index.cjs.js",
6
6
  "module": "lib/index.es.js",
@@ -1,7 +1,7 @@
1
1
  <template>
2
- <template>
3
- <slot />
4
- <Teleport :to="teleportTo ?? 'body'">
2
+ <slot />
3
+ <template v-if="messageList.length > 0">
4
+ <Teleport to="body">
5
5
  <transition
6
6
  type="animation"
7
7
  :enter-active-class="modalScale.enterActive"
@@ -64,10 +64,6 @@ export default defineComponent({
64
64
  MMessage
65
65
  },
66
66
  props: {
67
- teleportTo: {
68
- type: String,
69
- default: 'body'
70
- },
71
67
  placement: {
72
68
  type: String as PropType<MessagePlacement>,
73
69
  default: 'top'
@@ -78,7 +74,6 @@ export default defineComponent({
78
74
  }
79
75
  },
80
76
  setup(props, { slots }) {
81
- const isServer = useIsServer();
82
77
  const messageListRef = ref<PrivateMessageReactive[]>([]);
83
78
  const messageRefs = ref<Record<string, PrivateMessageRef>>({});
84
79
  const api: MessageApiInjection = {
@@ -104,13 +99,13 @@ export default defineComponent({
104
99
  };
105
100
 
106
101
  provide('m-message', api);
107
-
108
102
  function create(
109
103
  content: ContentType,
110
104
  options: MessageOptions & { type: MessageType }
111
105
  ): MessageReactive {
112
- const { id } = useCachedUid('m-message');
113
- const key = id.value;
106
+ const key = Math.random()
107
+ .toString(16)
108
+ .slice(2, 2 + 12);
114
109
  const messageReactive = reactive({
115
110
  ...options,
116
111
  content,
@@ -150,7 +145,6 @@ export default defineComponent({
150
145
  {
151
146
  messageRefs,
152
147
  messageList: messageListRef,
153
- isServer,
154
148
  onInternalAfterLeave,
155
149
  classes,
156
150
  modalScale