@teammodlr/ui-kit 2.1.78 → 2.1.79

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.78",
3
+ "version": "2.1.79",
4
4
  "description": "",
5
5
  "main": "lib/index.cjs.js",
6
6
  "module": "lib/index.es.js",
@@ -108,7 +108,7 @@ export default defineComponent({
108
108
  const wrapper = ref<HTMLElement | null>(null);
109
109
  const dialog = ref<HTMLElement | null>(null);
110
110
  const handle = ref<HTMLElement | null>(null);
111
- const { nextZIndex } = useZIndex();
111
+ const { nextZIndex, current: maxZIndex } = useZIndex();
112
112
  const zIndex = ref(props.zIndex ?? nextZIndex());
113
113
 
114
114
  const isOpen = ref<boolean>(props.open);
@@ -174,7 +174,9 @@ export default defineComponent({
174
174
  }
175
175
 
176
176
  function onDragStart() {
177
- zIndex.value = nextZIndex();
177
+ if (zIndex.value < maxZIndex.value) {
178
+ zIndex.value = nextZIndex();
179
+ }
178
180
  isDragging.value = true;
179
181
  }
180
182
 
@@ -1,54 +1,54 @@
1
- <template>
2
- <div>
3
- <button @click="showDialog">Show Dialog</button>
4
- <button @click="showDialog2">Show Dialog 2</button>
5
- {{ testTitle }}
6
- </div>
7
- </template>
8
-
9
- <script lang="ts" setup>
10
- import {ref, h} from 'vue';
11
- import {useDialog} from '../useDialog';
12
-
13
- const dialog = useDialog();
14
- const testTitle = ref('This is a test');
15
-
16
- function renderMessage({message}: { message: string }) {
17
- return h('p', [
18
- 'Here are ',
19
- h('span', {style: 'color: red'}, [message]),
20
- ' that using render function',
21
- ]);
22
- }
23
-
24
- function showDialog() {
25
- dialog.create('hello', {
26
- title: testTitle,
27
- render: renderMessage,
28
- props: {message: testTitle},
29
- open: true,
30
- });
31
-
32
- setTimeout(() => {
33
- testTitle.value = 'changed';
34
- }, 4000);
35
- }
36
-
37
- function showDialog2() {
38
- dialog.create('hello-two', {
39
- title: "Hello Second Dialog",
40
- render: renderMessage,
41
- props: {message: testTitle},
42
- open: true,
43
- modal: false,
44
- draggable: false,
45
- onOpen: () => {
46
- console.log('hello world')
47
- }
48
- });
49
-
50
- setTimeout(() => {
51
- testTitle.value = 'changed again';
52
- }, 4000);
53
- }
54
- </script>
1
+ <template>
2
+ <div>
3
+ <button @click="showDialog">Show Dialog</button>
4
+ <button @click="showDialog2">Show Dialog 2</button>
5
+ {{ testTitle }}
6
+ </div>
7
+ </template>
8
+
9
+ <script lang="ts" setup>
10
+ import {ref, h} from 'vue';
11
+ import {useDialog} from '../useDialog';
12
+
13
+ const dialog = useDialog();
14
+ const testTitle = ref('This is a test');
15
+
16
+ function renderMessage({message}: { message: string }) {
17
+ return h('p', [
18
+ 'Here are ',
19
+ h('span', {style: 'color: red'}, [message]),
20
+ ' that using render function',
21
+ ]);
22
+ }
23
+
24
+ function showDialog() {
25
+ dialog.create('hello', {
26
+ title: testTitle,
27
+ render: renderMessage,
28
+ props: {message: testTitle},
29
+ open: true,
30
+ });
31
+
32
+ setTimeout(() => {
33
+ testTitle.value = 'changed';
34
+ }, 4000);
35
+ }
36
+
37
+ function showDialog2() {
38
+ dialog.create('hello-two', {
39
+ title: "Hello Second Dialog",
40
+ render: renderMessage,
41
+ props: {message: testTitle},
42
+ open: true,
43
+ modal: false,
44
+ draggable: false,
45
+ onOpen: () => {
46
+ console.log('hello world')
47
+ }
48
+ });
49
+
50
+ setTimeout(() => {
51
+ testTitle.value = 'changed again';
52
+ }, 4000);
53
+ }
54
+ </script>
@@ -1,26 +1,26 @@
1
- import MDialogProvider from '../DialogProvider.vue';
2
- import { MDialogProviderBasic } from './index';
3
-
4
- const Template = (args: any) => ({
5
- components: {
6
- MDialogProvider,
7
- MDialogProviderBasic
8
- },
9
- setup() {
10
- return {
11
- args
12
- }
13
- },
14
- template: `
15
- <m-dialog-provider v-bind="args">
16
- <MDialogProviderBasic />
17
- </m-dialog-provider>
18
- `
19
- });
20
-
21
- export default {
22
- component: MDialogProvider,
23
- title: 'Components/DialogProvider'
24
- };
25
-
26
- export const Primary = Template.bind({});
1
+ import MDialogProvider from '../DialogProvider.vue';
2
+ import { MDialogProviderBasic } from './index';
3
+
4
+ const Template = (args: any) => ({
5
+ components: {
6
+ MDialogProvider,
7
+ MDialogProviderBasic
8
+ },
9
+ setup() {
10
+ return {
11
+ args
12
+ }
13
+ },
14
+ template: `
15
+ <m-dialog-provider v-bind="args">
16
+ <MDialogProviderBasic />
17
+ </m-dialog-provider>
18
+ `
19
+ });
20
+
21
+ export default {
22
+ component: MDialogProvider,
23
+ title: 'Components/DialogProvider'
24
+ };
25
+
26
+ export const Primary = Template.bind({});