nuxt-hs-ui 2.9.1 → 2.9.3

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.3",
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
@@ -514,13 +514,15 @@ const inputClass = computed(() => {
514
514
  <span
515
515
  v-if="row.deleted"
516
516
  class="text-error text-[0.7em] leading-[1em]"
517
- >※削除済み</span
518
517
  >
518
+ {{ tx({ ja: "※削除済", en: "*Deleted" }) }}
519
+ </span>
519
520
  <span
520
521
  v-if="row.hidden"
521
522
  class="text-error text-[0.7em] leading-[1em]"
522
- >※非表示</span
523
523
  >
524
+ {{ tx({ ja: "※非表示", en: "*Off by Default" }) }}
525
+ </span>
524
526
  </div>
525
527
  </div>
526
528
  </div>
@@ -351,10 +351,10 @@ const selectClose = () => {
351
351
  />
352
352
  <div class="flex-1 truncate">{{ tx(text) }}</div>
353
353
  <div v-if="deleted" class="text-error text-[0.7em] leading-[1em]">
354
- ※削除済み
354
+ {{ tx({ ja: "※削除済", en: "*Deleted" }) }}
355
355
  </div>
356
356
  <div v-if="hidden" class="text-error text-[0.7em] leading-[1em]">
357
- ※非表示
357
+ {{ tx({ ja: "※非表示", en: "*Off by Default" }) }}
358
358
  </div>
359
359
  <span v-if="appendIcon && typeof appendIcon === 'string'">
360
360
  <i :class="appendIcon"></i>
@@ -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.3",
4
4
  "description": "My new Nuxt module",
5
5
  "repository": "https://github.com/hare-systems-ryo/nuxt-hs-ui",
6
6
  "license": "MIT",