maz-ui 3.15.3 → 3.16.0

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 (35) hide show
  1. package/components/MazBottomSheet.mjs +2 -0
  2. package/components/MazBtn.mjs +2 -0
  3. package/components/MazCard.mjs +2 -0
  4. package/components/MazCarousel.mjs +2 -0
  5. package/components/MazCheckbox.mjs +2 -0
  6. package/components/MazDialog.mjs +2 -0
  7. package/components/MazDialogPromise.d.ts +3 -3
  8. package/components/MazDialogPromise.mjs +40 -40
  9. package/components/MazDrawer.mjs +2 -0
  10. package/components/MazIcon.mjs +2 -0
  11. package/components/MazInput.mjs +2 -0
  12. package/components/MazInputNumber.mjs +2 -0
  13. package/components/MazInputPrice.mjs +2 -0
  14. package/components/MazInputTags.mjs +2 -0
  15. package/components/MazPhoneNumberInput.mjs +2 -0
  16. package/components/MazPicker.mjs +2 -0
  17. package/components/MazSelect.mjs +2 -0
  18. package/components/MazStepper.mjs +2 -0
  19. package/components/MazTabsBar.mjs +2 -0
  20. package/components/MazTabsContent.mjs +2 -0
  21. package/components/MazTabsContentItem.mjs +2 -0
  22. package/components/MazTextarea.mjs +2 -0
  23. package/modules/index.mjs +41 -0
  24. package/nuxt/index.d.mts +5 -0
  25. package/nuxt/index.d.ts +5 -0
  26. package/nuxt/index.json +1 -1
  27. package/nuxt/index.mjs +9 -1
  28. package/nuxt/runtime/composables/use-theme-handler.mjs +1 -1
  29. package/nuxt/runtime/plugins/maz-icon-path.d.ts +2 -0
  30. package/nuxt/runtime/plugins/maz-icon-path.mjs +5 -0
  31. package/package.json +4 -4
  32. package/types/components/MazDialogPromise.vue.d.ts +3 -3
  33. package/types/modules/composables/index.d.ts +1 -0
  34. package/types/components/MazDialogPromise/use-maz-dialog-promise.d.ts +0 -30
  35. /package/{components/MazDialogPromise → types/modules/composables}/use-maz-dialog-promise.d.ts +0 -0
@@ -86,6 +86,8 @@ const MazFullscreenImg_vue_vue_type_style_index_1_scoped_7858a9bc_lang = "";
86
86
  const MazToast_vue_vue_type_style_index_0_lang = "";
87
87
  const MazToast_vue_vue_type_style_index_1_scoped_6a8f0d79_lang = "";
88
88
  ref();
89
+ ref();
90
+ ref([]);
89
91
  const _hoisted_1$1 = ["innerHTML"];
90
92
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
91
93
  __name: "MazIcon",
@@ -59,6 +59,8 @@ const MazFullscreenImg_vue_vue_type_style_index_1_scoped_7858a9bc_lang = "";
59
59
  const MazToast_vue_vue_type_style_index_0_lang = "";
60
60
  const MazToast_vue_vue_type_style_index_1_scoped_6a8f0d79_lang = "";
61
61
  ref();
62
+ ref();
63
+ ref([]);
62
64
  const _hoisted_1 = ["innerHTML"];
63
65
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
64
66
  __name: "MazIcon",
@@ -865,6 +865,8 @@ const MazFullscreenImg_vue_vue_type_style_index_1_scoped_7858a9bc_lang = "";
865
865
  const MazToast_vue_vue_type_style_index_0_lang = "";
866
866
  const MazToast_vue_vue_type_style_index_1_scoped_6a8f0d79_lang = "";
867
867
  ref();
868
+ ref();
869
+ ref([]);
868
870
  const _hoisted_1$2 = ["innerHTML"];
869
871
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
870
872
  __name: "MazIcon",
@@ -86,6 +86,8 @@ const MazFullscreenImg_vue_vue_type_style_index_1_scoped_7858a9bc_lang = "";
86
86
  const MazToast_vue_vue_type_style_index_0_lang = "";
87
87
  const MazToast_vue_vue_type_style_index_1_scoped_6a8f0d79_lang = "";
88
88
  ref();
89
+ ref();
90
+ ref([]);
89
91
  const _hoisted_1$2 = ["innerHTML"];
90
92
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
91
93
  __name: "MazIcon",
@@ -8,6 +8,8 @@ const useInstanceUniqId = ({
8
8
  }) => {
9
9
  return computed(() => providedId ?? `${componentName}-${instance == null ? void 0 : instance.uid}`);
10
10
  };
11
+ ref();
12
+ ref([]);
11
13
  const _hoisted_1 = ["id", "checked", "name"];
12
14
  const _hoisted_2 = ["for"];
13
15
  const _sfc_main = /* @__PURE__ */ defineComponent({
@@ -86,6 +86,8 @@ const MazFullscreenImg_vue_vue_type_style_index_1_scoped_7858a9bc_lang = "";
86
86
  const MazToast_vue_vue_type_style_index_0_lang = "";
87
87
  const MazToast_vue_vue_type_style_index_1_scoped_6a8f0d79_lang = "";
88
88
  ref();
89
+ ref();
90
+ ref([]);
89
91
  const _hoisted_1$1 = ["innerHTML"];
90
92
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
91
93
  __name: "MazIcon",
@@ -1,8 +1,8 @@
1
1
  import { type PropType } from 'vue';
2
2
  import { type Color, type Size } from './MazBtn.vue';
3
- import { type DialogData } from './MazDialogPromise/use-maz-dialog-promise';
4
- export { useMazDialogPromise } from './MazDialogPromise/use-maz-dialog-promise';
5
- export type { DialogState, DialogData } from './MazDialogPromise/use-maz-dialog-promise';
3
+ import { type DialogData } from './../modules';
4
+ export { useMazDialogPromise } from './../modules';
5
+ export type { DialogState, DialogData } from './../modules';
6
6
  export type { Color, Size } from './types';
7
7
  export type DialogButton = {
8
8
  response?: string | boolean;
@@ -86,6 +86,46 @@ const MazFullscreenImg_vue_vue_type_style_index_1_scoped_7858a9bc_lang = "";
86
86
  const MazToast_vue_vue_type_style_index_0_lang = "";
87
87
  const MazToast_vue_vue_type_style_index_1_scoped_6a8f0d79_lang = "";
88
88
  ref();
89
+ const confirmDialogData = ref();
90
+ const dialogState = ref([]);
91
+ const showDialogAndWaitChoice = (identifier, callback) => {
92
+ return new Promise((resolve, reject) => {
93
+ dialogState.value = [
94
+ ...dialogState.value,
95
+ {
96
+ id: identifier,
97
+ isActive: true,
98
+ resolve: async () => {
99
+ await (callback == null ? void 0 : callback());
100
+ resolve(true);
101
+ },
102
+ reject
103
+ }
104
+ ];
105
+ });
106
+ };
107
+ const removeDialogFromState = (identifier) => {
108
+ dialogState.value = dialogState.value.filter(({ id }) => id !== identifier);
109
+ return dialogState.value;
110
+ };
111
+ const responseDialog = (type, currentDialog, response = false) => {
112
+ var _a;
113
+ if (currentDialog) {
114
+ (_a = currentDialog[type]) == null ? void 0 : _a.call(currentDialog, response);
115
+ currentDialog.isActive = false;
116
+ setTimeout(() => {
117
+ removeDialogFromState(currentDialog.id);
118
+ }, 500);
119
+ }
120
+ };
121
+ const useMazDialogPromise = () => ({
122
+ confirmDialogData,
123
+ dialogState,
124
+ showDialogAndWaitChoice,
125
+ removeDialogFromState,
126
+ rejectDialog: (currentDialog, response = false) => responseDialog("reject", currentDialog, response),
127
+ resolveDialog: (currentDialog, response = false) => responseDialog("resolve", currentDialog, response)
128
+ });
89
129
  const _hoisted_1$2 = ["innerHTML"];
90
130
  const _sfc_main$4 = /* @__PURE__ */ defineComponent({
91
131
  __name: "MazIcon",
@@ -690,46 +730,6 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
690
730
  });
691
731
  const MazDialog_vue_vue_type_style_index_0_scoped_89e2590f_lang = "";
692
732
  const MazDialog = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-89e2590f"]]);
693
- const confirmDialogData = ref();
694
- const dialogState = ref([]);
695
- const showDialogAndWaitChoice = (identifier, callback) => {
696
- return new Promise((resolve, reject) => {
697
- dialogState.value = [
698
- ...dialogState.value,
699
- {
700
- id: identifier,
701
- isActive: true,
702
- resolve: async () => {
703
- await (callback == null ? void 0 : callback());
704
- resolve(true);
705
- },
706
- reject
707
- }
708
- ];
709
- });
710
- };
711
- const removeDialogFromState = (identifier) => {
712
- dialogState.value = dialogState.value.filter(({ id }) => id !== identifier);
713
- return dialogState.value;
714
- };
715
- const responseDialog = (type, currentDialog, response = false) => {
716
- var _a;
717
- if (currentDialog) {
718
- (_a = currentDialog[type]) == null ? void 0 : _a.call(currentDialog, response);
719
- currentDialog.isActive = false;
720
- setTimeout(() => {
721
- removeDialogFromState(currentDialog.id);
722
- }, 500);
723
- }
724
- };
725
- const useMazDialogPromise = () => ({
726
- confirmDialogData,
727
- dialogState,
728
- showDialogAndWaitChoice,
729
- removeDialogFromState,
730
- rejectDialog: (currentDialog, response = false) => responseDialog("reject", currentDialog, response),
731
- resolveDialog: (currentDialog, response = false) => responseDialog("resolve", currentDialog, response)
732
- });
733
733
  const _hoisted_1 = { class: "maz-space-x-2" };
734
734
  const _sfc_main = /* @__PURE__ */ defineComponent({
735
735
  __name: "MazDialogPromise",
@@ -240,6 +240,8 @@ const MazFullscreenImg_vue_vue_type_style_index_1_scoped_7858a9bc_lang = "";
240
240
  const MazToast_vue_vue_type_style_index_0_lang = "";
241
241
  const MazToast_vue_vue_type_style_index_1_scoped_6a8f0d79_lang = "";
242
242
  ref();
243
+ ref();
244
+ ref([]);
243
245
  const _hoisted_1$1 = ["innerHTML"];
244
246
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
245
247
  __name: "MazIcon",
@@ -13,6 +13,8 @@ const MazFullscreenImg_vue_vue_type_style_index_1_scoped_7858a9bc_lang = "";
13
13
  const MazToast_vue_vue_type_style_index_0_lang = "";
14
14
  const MazToast_vue_vue_type_style_index_1_scoped_6a8f0d79_lang = "";
15
15
  ref();
16
+ ref();
17
+ ref([]);
16
18
  const _hoisted_1 = ["innerHTML"];
17
19
  const _sfc_main = /* @__PURE__ */ defineComponent({
18
20
  __name: "MazIcon",
@@ -26,6 +26,8 @@ function injectStrict(key, fallback) {
26
26
  }
27
27
  return resolved;
28
28
  }
29
+ ref();
30
+ ref([]);
29
31
  const _withScopeId = (n) => (pushScopeId("data-v-7a2b89c9"), n = n(), popScopeId(), n);
30
32
  const _hoisted_1$2 = ["width", "height"];
31
33
  const _hoisted_2$1 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode(
@@ -77,6 +77,8 @@ const useInstanceUniqId = ({
77
77
  }) => {
78
78
  return computed(() => providedId ?? `${componentName}-${instance == null ? void 0 : instance.uid}`);
79
79
  };
80
+ ref();
81
+ ref([]);
80
82
  const _hoisted_1$3 = ["innerHTML"];
81
83
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
82
84
  __name: "MazIcon",
@@ -112,6 +112,8 @@ const useInstanceUniqId = ({
112
112
  }) => {
113
113
  return computed(() => providedId ?? `${componentName}-${instance == null ? void 0 : instance.uid}`);
114
114
  };
115
+ ref();
116
+ ref([]);
115
117
  const _hoisted_1$2 = ["innerHTML"];
116
118
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
117
119
  __name: "MazIcon",
@@ -104,6 +104,8 @@ const useInstanceUniqId = ({
104
104
  }) => {
105
105
  return computed(() => providedId ?? `${componentName}-${instance == null ? void 0 : instance.uid}`);
106
106
  };
107
+ ref();
108
+ ref([]);
107
109
  const _hoisted_1$1 = ["innerHTML"];
108
110
  const _sfc_main$3 = /* @__PURE__ */ defineComponent({
109
111
  __name: "MazIcon",
@@ -407,6 +407,8 @@ const useInstanceUniqId = ({
407
407
  }) => {
408
408
  return computed(() => providedId ?? `${componentName}-${instance == null ? void 0 : instance.uid}`);
409
409
  };
410
+ ref();
411
+ ref([]);
410
412
  const locales = {
411
413
  countrySelector: {
412
414
  placeholder: "Country code",
@@ -30,6 +30,8 @@ function injectStrict(key, fallback) {
30
30
  }
31
31
  return resolved;
32
32
  }
33
+ ref();
34
+ ref([]);
33
35
  const _withScopeId = (n) => (pushScopeId("data-v-7a2b89c9"), n = n(), popScopeId(), n);
34
36
  const _hoisted_1$g = ["width", "height"];
35
37
  const _hoisted_2$9 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode(
@@ -26,6 +26,8 @@ function injectStrict(key, fallback) {
26
26
  }
27
27
  return resolved;
28
28
  }
29
+ ref();
30
+ ref([]);
29
31
  const _withScopeId = (n) => (pushScopeId("data-v-7a2b89c9"), n = n(), popScopeId(), n);
30
32
  const _hoisted_1$6 = ["width", "height"];
31
33
  const _hoisted_2$5 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode(
@@ -71,6 +71,8 @@ const MazFullscreenImg_vue_vue_type_style_index_1_scoped_7858a9bc_lang = "";
71
71
  const MazToast_vue_vue_type_style_index_0_lang = "";
72
72
  const MazToast_vue_vue_type_style_index_1_scoped_6a8f0d79_lang = "";
73
73
  ref();
74
+ ref();
75
+ ref([]);
74
76
  const _hoisted_1$1 = ["innerHTML"];
75
77
  const _sfc_main$1 = /* @__PURE__ */ defineComponent({
76
78
  __name: "MazIcon",
@@ -59,6 +59,8 @@ const MazFullscreenImg_vue_vue_type_style_index_1_scoped_7858a9bc_lang = "";
59
59
  const MazToast_vue_vue_type_style_index_0_lang = "";
60
60
  const MazToast_vue_vue_type_style_index_1_scoped_6a8f0d79_lang = "";
61
61
  ref();
62
+ ref();
63
+ ref([]);
62
64
  const _hoisted_1 = ["innerHTML"];
63
65
  const _sfc_main$2 = /* @__PURE__ */ defineComponent({
64
66
  __name: "MazIcon",
@@ -24,6 +24,8 @@ const MazFullscreenImg_vue_vue_type_style_index_1_scoped_7858a9bc_lang = "";
24
24
  const MazToast_vue_vue_type_style_index_0_lang = "";
25
25
  const MazToast_vue_vue_type_style_index_1_scoped_6a8f0d79_lang = "";
26
26
  ref();
27
+ ref();
28
+ ref([]);
27
29
  const _sfc_main = /* @__PURE__ */ defineComponent({
28
30
  __name: "MazTabsContent",
29
31
  setup(__props) {
@@ -20,6 +20,8 @@ const MazFullscreenImg_vue_vue_type_style_index_1_scoped_7858a9bc_lang = "";
20
20
  const MazToast_vue_vue_type_style_index_0_lang = "";
21
21
  const MazToast_vue_vue_type_style_index_1_scoped_6a8f0d79_lang = "";
22
22
  ref();
23
+ ref();
24
+ ref([]);
23
25
  const _sfc_main = /* @__PURE__ */ defineComponent({
24
26
  __name: "MazTabsContentItem",
25
27
  props: {
@@ -14,6 +14,8 @@ const useInstanceUniqId = ({
14
14
  }) => {
15
15
  return computed(() => providedId ?? `${componentName}-${instance == null ? void 0 : instance.uid}`);
16
16
  };
17
+ ref();
18
+ ref([]);
17
19
  function debounce(func, delay) {
18
20
  let timeoutId;
19
21
  return (...args) => {
package/modules/index.mjs CHANGED
@@ -2199,6 +2199,46 @@ const useUserVisibility = ({
2199
2199
  }) => {
2200
2200
  return new UserVisibility(callback, options);
2201
2201
  };
2202
+ const confirmDialogData = ref();
2203
+ const dialogState = ref([]);
2204
+ const showDialogAndWaitChoice = (identifier, callback) => {
2205
+ return new Promise((resolve, reject) => {
2206
+ dialogState.value = [
2207
+ ...dialogState.value,
2208
+ {
2209
+ id: identifier,
2210
+ isActive: true,
2211
+ resolve: async () => {
2212
+ await (callback == null ? void 0 : callback());
2213
+ resolve(true);
2214
+ },
2215
+ reject
2216
+ }
2217
+ ];
2218
+ });
2219
+ };
2220
+ const removeDialogFromState = (identifier) => {
2221
+ dialogState.value = dialogState.value.filter(({ id }) => id !== identifier);
2222
+ return dialogState.value;
2223
+ };
2224
+ const responseDialog = (type, currentDialog, response = false) => {
2225
+ var _a;
2226
+ if (currentDialog) {
2227
+ (_a = currentDialog[type]) == null ? void 0 : _a.call(currentDialog, response);
2228
+ currentDialog.isActive = false;
2229
+ setTimeout(() => {
2230
+ removeDialogFromState(currentDialog.id);
2231
+ }, 500);
2232
+ }
2233
+ };
2234
+ const useMazDialogPromise = () => ({
2235
+ confirmDialogData,
2236
+ dialogState,
2237
+ showDialogAndWaitChoice,
2238
+ removeDialogFromState,
2239
+ rejectDialog: (currentDialog, response = false) => responseDialog("reject", currentDialog, response),
2240
+ resolveDialog: (currentDialog, response = false) => responseDialog("resolve", currentDialog, response)
2241
+ });
2202
2242
  export {
2203
2243
  AosHandler,
2204
2244
  IdleTimeout,
@@ -2227,6 +2267,7 @@ export {
2227
2267
  useAos,
2228
2268
  useIdleTimeout,
2229
2269
  useInstanceUniqId,
2270
+ useMazDialogPromise,
2230
2271
  useThemeHandler,
2231
2272
  useToast,
2232
2273
  useUserVisibility,
package/nuxt/index.d.mts CHANGED
@@ -73,6 +73,11 @@ interface MazUiNuxtOptions {
73
73
  * @default true
74
74
  */
75
75
  injectComponents?: boolean;
76
+ /**
77
+ * Default path to public svg icons folder for `<MazIcon />` component
78
+ * @default undefined
79
+ */
80
+ defaultMazIconPath?: string;
76
81
  /**
77
82
  * Enable Nuxt Devtools integration
78
83
  * @default true
package/nuxt/index.d.ts CHANGED
@@ -73,6 +73,11 @@ interface MazUiNuxtOptions {
73
73
  * @default true
74
74
  */
75
75
  injectComponents?: boolean;
76
+ /**
77
+ * Default path to public svg icons folder for `<MazIcon />` component
78
+ * @default undefined
79
+ */
80
+ defaultMazIconPath?: string;
76
81
  /**
77
82
  * Enable Nuxt Devtools integration
78
83
  * @default true
package/nuxt/index.json CHANGED
@@ -4,5 +4,5 @@
4
4
  "compatibility": {
5
5
  "nuxt": "^3.0.0"
6
6
  },
7
- "version": "3.15.3"
7
+ "version": "3.16.0"
8
8
  }
package/nuxt/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { defineNuxtModule, createResolver, addComponent, addPlugin, addImports } from '@nuxt/kit';
1
+ import { defineNuxtModule, createResolver, addComponent, addImports, addPlugin } from '@nuxt/kit';
2
2
  import { resolve, dirname } from 'node:path';
3
3
  import { fileURLToPath } from 'node:url';
4
4
  import { readdir } from 'node:fs/promises';
@@ -103,6 +103,11 @@ const module = defineNuxtModule({
103
103
  filePath: process.env.MAZ_UI_DEV === "true" ? `maz-ui/components/${name}.vue` : `maz-ui/components/${name}.mjs`
104
104
  });
105
105
  }
106
+ addImports({
107
+ from: "maz-ui",
108
+ name: "useMazDialogPromise",
109
+ as: "useMazDialogPromise"
110
+ });
106
111
  }
107
112
  if (moduleOptions.injectAos) {
108
113
  addPlugin(resolve(_dirname, "./runtime/plugins/aos"));
@@ -167,6 +172,9 @@ const module = defineNuxtModule({
167
172
  as: "useUserVisibility"
168
173
  });
169
174
  }
175
+ if (moduleOptions.defaultMazIconPath) {
176
+ addPlugin(resolve(_dirname, "./runtime/plugins/maz-icon-path"));
177
+ }
170
178
  if (options.devtools) {
171
179
  nuxt.hook("devtools:customTabs", (iframeTabs) => {
172
180
  iframeTabs.push({
@@ -3,6 +3,6 @@ import { useThemeHandler as useThemeHandlerComposable } from "maz-ui";
3
3
  export function useThemeHandler() {
4
4
  const { $config } = useNuxtApp();
5
5
  const themeHandlerOptions = $config.public.mazUi?.injectUseThemeHandler;
6
- const options = typeof themeHandlerOptions === "object" ? themeHandlerOptions : void 0;
6
+ const options = typeof themeHandlerOptions === "object" ? themeHandlerOptions : {};
7
7
  return useThemeHandlerComposable(options);
8
8
  }
@@ -0,0 +1,2 @@
1
+ declare const _default: import("nuxt/app").Plugin<Record<string, unknown>> & import("nuxt/app").ObjectPlugin<Record<string, unknown>>;
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { defineNuxtPlugin } from "nuxt/app";
2
+ export default defineNuxtPlugin(({ $config, vueApp }) => {
3
+ const defaultMazIconPath = $config.public.mazUi?.defaultMazIconPath;
4
+ vueApp.provide("mazIconPath", defaultMazIconPath);
5
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "maz-ui",
3
- "version": "3.15.3",
3
+ "version": "3.16.0",
4
4
  "description": "A standalone components library for Vue.Js 3 & Nuxt.Js 3",
5
5
  "author": "Louis Mazel <me@loicmazuel.com>",
6
6
  "main": "./modules/index.mjs",
@@ -93,7 +93,7 @@
93
93
  "@types/dropzone": "^5.7.5",
94
94
  "@types/google.maps": "^3.54.1",
95
95
  "@types/node": "^20.7.0",
96
- "@types/rollup-plugin-peer-deps-external": "^2.2.1",
96
+ "@types/rollup-plugin-peer-deps-external": "^2.2.2",
97
97
  "@typescript-eslint/eslint-plugin": "^6.7.3",
98
98
  "@typescript-eslint/parser": "^6.7.3",
99
99
  "@vitejs/plugin-vue": "^4.3.4",
@@ -118,7 +118,7 @@
118
118
  "fs": "0.0.2",
119
119
  "jsdom": "^22.1.0",
120
120
  "json-templater": "^1.2.0",
121
- "libphonenumber-js": "^1.10.44",
121
+ "libphonenumber-js": "^1.10.45",
122
122
  "lint-staged": "^14.0.1",
123
123
  "minimist": "^1.2.8",
124
124
  "nuxt": "^3.7.4",
@@ -132,7 +132,7 @@
132
132
  "postcss-url": "^10.1.3",
133
133
  "prettier-plugin-tailwindcss": "^0.5.4",
134
134
  "replace-in-file": "^7.0.1",
135
- "rimraf": "^5.0.4",
135
+ "rimraf": "^5.0.5",
136
136
  "rollup-plugin-peer-deps-external": "^2.2.4",
137
137
  "sass": "^1.68.0",
138
138
  "semver": "^7.5.4",
@@ -1,8 +1,8 @@
1
1
  import { type PropType } from 'vue';
2
2
  import { type Color, type Size } from './MazBtn.vue';
3
- import { type DialogData } from './MazDialogPromise/use-maz-dialog-promise';
4
- export { useMazDialogPromise } from './MazDialogPromise/use-maz-dialog-promise';
5
- export type { DialogState, DialogData } from './MazDialogPromise/use-maz-dialog-promise';
3
+ import { type DialogData } from './../modules';
4
+ export { useMazDialogPromise } from './../modules';
5
+ export type { DialogState, DialogData } from './../modules';
6
6
  export type { Color, Size } from './types';
7
7
  export type DialogButton = {
8
8
  response?: string | boolean;
@@ -5,3 +5,4 @@ export * from './use-wait';
5
5
  export * from './use-toast';
6
6
  export * from './use-idle-timeout';
7
7
  export * from './use-user-visibilty';
8
+ export * from './use-maz-dialog-promise';
@@ -1,30 +0,0 @@
1
- export interface DialogState {
2
- id: string;
3
- isActive: boolean;
4
- resolve: (value: unknown) => void;
5
- reject?: (reason?: unknown) => void;
6
- }
7
- export interface DialogData {
8
- title: string;
9
- message: string;
10
- cancelText?: string;
11
- confirmText?: string;
12
- }
13
- export declare const useMazDialogPromise: () => {
14
- confirmDialogData: import("vue").Ref<DialogData | undefined>;
15
- dialogState: import("vue").Ref<{
16
- id: string;
17
- isActive: boolean;
18
- resolve: (value: unknown) => void;
19
- reject?: ((reason?: unknown) => void) | undefined;
20
- }[]>;
21
- showDialogAndWaitChoice: (identifier: string, callback?: () => unknown) => Promise<unknown>;
22
- removeDialogFromState: (identifier: string) => {
23
- id: string;
24
- isActive: boolean;
25
- resolve: (value: unknown) => void;
26
- reject?: ((reason?: unknown) => void) | undefined;
27
- }[];
28
- rejectDialog: (currentDialog: DialogState, response?: string | boolean) => void;
29
- resolveDialog: (currentDialog: DialogState, response?: string | boolean) => void;
30
- };