nuxt-hs-ui 2.9.1 → 2.9.2

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/dist/module.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.15.0"
6
6
  },
7
- "version": "2.9.1",
7
+ "version": "2.9.2",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -33,7 +33,7 @@ const buttonTv = tv({
33
33
  `absolute inset-0`,
34
34
  "bg-white",
35
35
  "transition-[opacity_100ms_ease]",
36
- "z-10",
36
+ // "z-10",
37
37
  "opacity-0",
38
38
  ],
39
39
  body: [
@@ -459,10 +459,10 @@ const btnTvOverlay = computed(() => {
459
459
  @keyup.enter="pushOff"
460
460
  >
461
461
  <div :class="btnTvIndicator"></div>
462
- <div :class="btnTvOverlay"></div>
463
462
  <div :class="btnTvBody">
464
463
  <slot />
465
464
  </div>
465
+ <div :class="btnTvOverlay"></div>
466
466
  <BtnLineLoading class="Btn--loading" :show="props.loading" />
467
467
  </button>
468
468
  <NuxtLink
@@ -53,13 +53,21 @@ const zOrder = computed(() => {
53
53
  return hsModal.myzIndex(id).value;
54
54
  });
55
55
  if (props.show) {
56
- hsModal.add(id, props.closeable);
56
+ if (props.zIndex !== undefined) {
57
+ hsModal.add(id, props.closeable, props.zIndex - 1);
58
+ } else {
59
+ hsModal.add(id, props.closeable);
60
+ }
57
61
  }
58
62
  watch(
59
63
  () => props.show,
60
- (v) => {
61
- if (v) {
62
- hsModal.add(id, props.closeable);
64
+ (show) => {
65
+ if (show) {
66
+ if (props.zIndex !== undefined) {
67
+ hsModal.add(id, props.closeable, props.zIndex - 1);
68
+ } else {
69
+ hsModal.add(id, props.closeable);
70
+ }
63
71
  } else {
64
72
  hsModal.remove(id);
65
73
  }
@@ -24,7 +24,7 @@ export declare const useHsModal: import("pinia").StoreDefinition<"HsModal", Stat
24
24
  }, {
25
25
  watch(): void;
26
26
  myzIndex(id: string): import("vue").ComputedRef<number>;
27
- add(id: string, closeable?: boolean): number;
27
+ add(id: string, closeable?: boolean, _zIndex?: undefined | number): number;
28
28
  remove(id: string): void;
29
29
  removeAll(): void;
30
30
  }>;
@@ -47,8 +47,13 @@ export const useHsModal = defineStore("HsModal", {
47
47
  return target.zIndex;
48
48
  });
49
49
  },
50
- add(id, closeable = false) {
51
- const zIndex = this.state.activeList.length === 0 ? this.state.baseIndex : Math.max(...this.state.activeList.map((row) => row.zIndex)) + 2;
50
+ add(id, closeable = false, _zIndex = void 0) {
51
+ const getIndex = () => {
52
+ if (_zIndex !== void 0) return _zIndex;
53
+ if (this.state.activeList.length === 0) return this.state.baseIndex;
54
+ return Math.max(...this.state.activeList.map((row) => row.zIndex)) + 2;
55
+ };
56
+ const zIndex = getIndex();
52
57
  this.state.activeList.push({
53
58
  id,
54
59
  zIndex,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-hs-ui",
3
- "version": "2.9.1",
3
+ "version": "2.9.2",
4
4
  "description": "My new Nuxt module",
5
5
  "repository": "https://github.com/hare-systems-ryo/nuxt-hs-ui",
6
6
  "license": "MIT",