nuxt-hs-ui 2.12.7 → 4.0.0-beta.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.
Files changed (131) hide show
  1. package/README.md +202 -14
  2. package/dist/module.d.mts +3 -4
  3. package/dist/module.json +9 -6
  4. package/dist/module.mjs +125 -99
  5. package/dist/runtime/assets/flatpickr-dark.css +1 -1
  6. package/dist/runtime/assets/main.css +1 -0
  7. package/dist/runtime/assets/tabulator-custom.css +1 -1
  8. package/dist/runtime/components/form/_select/hidden-item-toggle.vue +28 -0
  9. package/dist/runtime/components/form/_select/hidden-item-toggle.vue.d.ts +10 -0
  10. package/dist/runtime/components/form/_select/item-container.vue +63 -0
  11. package/dist/runtime/components/form/_select/item-container.vue.d.ts +19 -0
  12. package/dist/runtime/components/form/_select/item-label.vue +31 -0
  13. package/dist/runtime/components/form/_select/item-label.vue.d.ts +13 -0
  14. package/dist/runtime/components/form/_select/item-row.vue +62 -0
  15. package/dist/runtime/components/form/_select/item-row.vue.d.ts +34 -0
  16. package/dist/runtime/components/form/btn-line-loading.vue +62 -81
  17. package/dist/runtime/components/form/btn-line-loading.vue.d.ts +14 -0
  18. package/dist/runtime/components/form/btn.vue +411 -494
  19. package/dist/runtime/components/form/btn.vue.d.ts +0 -0
  20. package/dist/runtime/components/form/check-box.vue +200 -315
  21. package/dist/runtime/components/form/check-box.vue.d.ts +71 -0
  22. package/dist/runtime/components/form/check-list.vue +234 -364
  23. package/dist/runtime/components/form/check-list.vue.d.ts +99 -0
  24. package/dist/runtime/components/form/combo-box.vue +340 -0
  25. package/dist/runtime/components/form/combo-box.vue.d.ts +69 -0
  26. package/dist/runtime/components/form/datepicker.vue +717 -883
  27. package/dist/runtime/components/form/datepicker.vue.d.ts +122 -0
  28. package/dist/runtime/components/form/input-frame.vue +174 -258
  29. package/dist/runtime/components/form/input-frame.vue.d.ts +88 -0
  30. package/dist/runtime/components/form/radio.vue +451 -614
  31. package/dist/runtime/components/form/radio.vue.d.ts +62 -0
  32. package/dist/runtime/components/form/select-img-icon.vue +38 -53
  33. package/dist/runtime/components/form/select-img-icon.vue.d.ts +15 -0
  34. package/dist/runtime/components/form/select.vue +733 -579
  35. package/dist/runtime/components/form/select.vue.d.ts +63 -0
  36. package/dist/runtime/components/form/text-box.vue +266 -365
  37. package/dist/runtime/components/form/text-box.vue.d.ts +105 -0
  38. package/dist/runtime/components/form/textarea.vue +338 -421
  39. package/dist/runtime/components/form/textarea.vue.d.ts +98 -0
  40. package/dist/runtime/components/form/value-box.vue +512 -641
  41. package/dist/runtime/components/form/value-box.vue.d.ts +128 -0
  42. package/dist/runtime/components/interactive/alert.vue +49 -113
  43. package/dist/runtime/components/interactive/alert.vue.d.ts +30 -0
  44. package/dist/runtime/components/interactive/block-loading.vue +91 -119
  45. package/dist/runtime/components/interactive/block-loading.vue.d.ts +22 -0
  46. package/dist/runtime/components/interactive/dialog.vue +252 -407
  47. package/dist/runtime/components/interactive/dialog.vue.d.ts +3 -0
  48. package/dist/runtime/components/interactive/modal-bg.vue +72 -82
  49. package/dist/runtime/components/interactive/modal-bg.vue.d.ts +11 -0
  50. package/dist/runtime/components/interactive/modal.vue +121 -169
  51. package/dist/runtime/components/interactive/modal.vue.d.ts +38 -0
  52. package/dist/runtime/components/interactive/toast.vue +164 -206
  53. package/dist/runtime/components/interactive/toast.vue.d.ts +3 -0
  54. package/dist/runtime/components/interactive/window-loader.vue +61 -84
  55. package/dist/runtime/components/interactive/window-loader.vue.d.ts +3 -0
  56. package/dist/runtime/components/layout/accordion-down.vue +72 -0
  57. package/dist/runtime/components/layout/accordion-down.vue.d.ts +26 -0
  58. package/dist/runtime/components/layout/accordion.vue +47 -78
  59. package/dist/runtime/components/layout/accordion.vue.d.ts +22 -0
  60. package/dist/runtime/components/layout/aspect-box.vue +29 -58
  61. package/dist/runtime/components/layout/aspect-box.vue.d.ts +29 -0
  62. package/dist/runtime/components/layout/card-item.vue +148 -193
  63. package/dist/runtime/components/layout/card-item.vue.d.ts +0 -0
  64. package/dist/runtime/components/layout/card.vue +27 -42
  65. package/dist/runtime/components/layout/card.vue.d.ts +23 -0
  66. package/dist/runtime/components/layout/container.vue +25 -40
  67. package/dist/runtime/components/layout/container.vue.d.ts +35 -0
  68. package/dist/runtime/components/layout/divider-h.vue +30 -50
  69. package/dist/runtime/components/layout/divider-h.vue.d.ts +18 -0
  70. package/dist/runtime/components/misc/breadcrumb.vue +47 -95
  71. package/dist/runtime/components/misc/breadcrumb.vue.d.ts +22 -0
  72. package/dist/runtime/components/misc/tabulator.vue +122 -190
  73. package/dist/runtime/components/misc/tabulator.vue.d.ts +28 -0
  74. package/dist/runtime/components/misc/view-name-display.vue +53 -68
  75. package/dist/runtime/components/misc/view-name-display.vue.d.ts +14 -0
  76. package/dist/runtime/components/test.vue +13 -0
  77. package/dist/runtime/components/test.vue.d.ts +3 -0
  78. package/dist/runtime/composables/test.d.ts +8 -0
  79. package/dist/runtime/composables/test.js +12 -0
  80. package/dist/runtime/composables/use-hs-dialog.d.ts +3 -20
  81. package/dist/runtime/composables/use-hs-dialog.js +3 -9
  82. package/dist/runtime/composables/use-hs-is-mobile.d.ts +8 -2
  83. package/dist/runtime/composables/use-hs-is-mobile.js +43 -25
  84. package/dist/runtime/composables/use-hs-misc.d.ts +8 -38
  85. package/dist/runtime/composables/use-hs-misc.js +9 -61
  86. package/dist/runtime/composables/use-hs-modal.js +1 -3
  87. package/dist/runtime/composables/use-hs-multi-lang.d.ts +23 -40
  88. package/dist/runtime/composables/use-hs-multi-lang.js +30 -74
  89. package/dist/runtime/composables/use-hs-scroll-lock.js +2 -1
  90. package/dist/runtime/composables/use-hs-toast.d.ts +2 -2
  91. package/dist/runtime/composables/use-hs-toast.js +12 -4
  92. package/dist/runtime/composables/use-pinia.d.ts +1 -0
  93. package/dist/runtime/composables/use-pinia.js +2 -0
  94. package/dist/runtime/plugin.d.ts +2 -0
  95. package/dist/runtime/plugin.js +4 -0
  96. package/dist/runtime/server/tsconfig.json +3 -3
  97. package/dist/runtime/types/dialog.d.ts +11 -20
  98. package/dist/runtime/types/dialog.js +2 -1
  99. package/dist/runtime/types/flatpickr/default.js +2 -23
  100. package/dist/runtime/types/flatpickr/ja.js +3 -37
  101. package/dist/runtime/types/toast.d.ts +1 -1
  102. package/dist/runtime/utils/dayjs.d.ts +8 -6
  103. package/dist/runtime/utils/dayjs.js +12 -5
  104. package/dist/runtime/utils/modal.d.ts +9 -28
  105. package/dist/runtime/utils/modal.js +7 -36
  106. package/dist/runtime/utils/multi-lang-object.d.ts +2 -2
  107. package/dist/runtime/utils/multi-lang-object.js +1 -5
  108. package/dist/runtime/utils/multi-lang.js +12 -22
  109. package/dist/runtime/utils/number.js +1 -1
  110. package/dist/runtime/utils/object.js +1 -1
  111. package/dist/runtime/utils/select-item.d.ts +3 -1
  112. package/dist/runtime/utils/stop-watch.js +6 -4
  113. package/dist/runtime/utils/string.js +4 -4
  114. package/dist/runtime/utils/tabulator.d.ts +1 -42
  115. package/dist/runtime/utils/tabulator.js +2 -99
  116. package/dist/runtime/utils/theme.d.ts +20 -20
  117. package/dist/runtime/utils/theme.js +180 -30
  118. package/dist/runtime/utils/tv.d.ts +1 -101
  119. package/dist/runtime/utils/tv.js +0 -22
  120. package/dist/types.d.mts +3 -1
  121. package/package.json +61 -118
  122. package/dist/module.cjs +0 -5
  123. package/dist/module.d.ts +0 -16
  124. package/dist/runtime/assets/vue-select.css +0 -1
  125. package/dist/runtime/components/misc/view-name-display-target.vue +0 -39
  126. package/dist/runtime/plugin/v-select.d.ts +0 -2
  127. package/dist/runtime/plugin/v-select.js +0 -5
  128. package/dist/runtime/style.css +0 -22
  129. package/dist/runtime/tailwind.css +0 -78
  130. package/dist/runtime/types/app.config.d.ts +0 -5
  131. package/dist/types.d.ts +0 -1
@@ -0,0 +1,3 @@
1
+ declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
+ declare const _default: typeof __VLS_export;
3
+ export default _default;
@@ -1,82 +1,72 @@
1
- <script setup lang="ts">
2
- /* ----------------------------------------------------------------------------
3
- // src\runtime\components\interactive\modal-bg.vue
4
- // ----------------------------------------------------------------------------
5
- // ModalBg
6
- // ModalBgModalBg
7
- ----------------------------------------------------------------------------- */
8
-
9
- // [ tailwind ]
10
- import { twMerge } from "tailwind-merge";
11
- // [ NUXT ]
12
- import { computed } from "#imports";
13
- // [ utils ]
14
- import { type ClassType, ClassTypeToString } from "../../utils/class-style";
15
- // [ composables ]
16
- import { useHsModal } from "../../composables/use-hs-modal";
17
- // ----------------------------------------------------------------------------
18
- // [ com > lib > * ]
19
- // ----------------------------------------------------------------------------
20
- type Props = {
21
- class?: ClassType;
22
- };
23
- const props = withDefaults(defineProps<Props>(), {
24
- class: "",
25
- });
26
-
27
- const hsModal = useHsModal();
28
-
29
- const zIndex = computed(() => {
30
- if (hsModal.state.activeList.length === 0) return -1;
31
- return Math.max(...hsModal.state.activeList.map((row) => row.zIndex)) - 1;
32
- });
33
-
34
- const activeData = computed(() => {
35
- const len = hsModal.state.activeList.length;
36
- if (len === 0) return null;
37
- return hsModal.state.activeList[len - 1];
38
- });
39
-
40
- const bg = computed(() => {
41
- if (activeData.value === null) return "";
42
- if (activeData.value.closeable) {
43
- // 外枠で閉じれるモーダル
44
- return "bg-slate-700/[0.6]";
45
- }
46
- return "bg-blue-800/[0.8]";
47
- });
48
-
49
- const isShow = computed(() => {
50
- if (hsModal.state.activeList.length === 0) return false;
51
- return true;
52
- });
53
-
54
- const classStyle = computed(() => {
55
- return twMerge(
56
- "transition-opacity",
57
- "fixed",
58
- "inset-0",
59
- "transition-opacity",
60
- bg.value,
61
- // isShow.value ? 'pointer-events-auto' : 'pointer-events-none',
62
- isShow.value ? "opacity-100" : "opacity-0",
63
- ClassTypeToString(props.class)
64
- );
65
- });
66
-
67
- const closeAll = () => {
68
- hsModal.removeAll();
69
- };
70
- </script>
71
-
72
- <template>
73
- <Teleport to="body">
74
- <!-- -->
75
- <div
76
- class="ModalBg"
77
- :class="classStyle"
78
- :style="{ zIndex: zIndex }"
79
- @click.stop="closeAll()"
80
- />
81
- </Teleport>
82
- </template>
1
+ <script setup>
2
+ import { twMerge } from "tailwind-merge";
3
+ import { computed, useHead } from "#imports";
4
+ import { ClassTypeToString } from "../../utils/class-style";
5
+ import { useHsModal } from "../../composables/use-hs-modal";
6
+ import { useHsPinia } from "../../composables/use-pinia";
7
+ const props = defineProps({
8
+ class: { type: [String, Object, Array], required: false, default: "" },
9
+ target: { type: String, required: false, default: "body" }
10
+ });
11
+ const hsModal = useHsModal(useHsPinia());
12
+ const zIndex = computed(() => {
13
+ if (hsModal.state.activeList.length === 0) return -1;
14
+ return Math.max(...hsModal.state.activeList.map((row) => row.zIndex)) - 1;
15
+ });
16
+ const zIndexUiModal = computed(() => {
17
+ if (hsModal.state.activeList.length === 0) return 1;
18
+ return Math.max(...hsModal.state.activeList.map((row) => row.zIndex)) + 2;
19
+ });
20
+ useHead({
21
+ style: [
22
+ {
23
+ key: "ui-z-modal",
24
+ textContent: computed(() => `:root{--ui-z-modal:${zIndexUiModal.value}}`)
25
+ }
26
+ ]
27
+ });
28
+ const activeData = computed(() => {
29
+ const len = hsModal.state.activeList.length;
30
+ if (len === 0) return null;
31
+ return hsModal.state.activeList[len - 1];
32
+ });
33
+ const bg = computed(() => {
34
+ if (!activeData.value) return "";
35
+ if (activeData.value.closeable) {
36
+ return "bg-slate-700/[0.6]";
37
+ }
38
+ return "bg-blue-800/[0.8]";
39
+ });
40
+ const isShow = computed(() => {
41
+ if (hsModal.state.activeList.length === 0) return false;
42
+ return true;
43
+ });
44
+ const classStyle = computed(() => {
45
+ return twMerge(
46
+ // 'transition-opacity',
47
+ "fixed",
48
+ "inset-0",
49
+ // 'transition-opacity',
50
+ bg.value,
51
+ // isShow.value ? 'pointer-events-auto' : 'pointer-events-none',
52
+ isShow.value ? "opacity-100" : "opacity-0",
53
+ ClassTypeToString(props.class)
54
+ );
55
+ });
56
+ const closeAll = () => {
57
+ hsModal.removeAll();
58
+ };
59
+ </script>
60
+
61
+ <template>
62
+ <ClientOnly>
63
+ <Teleport :to="target">
64
+ <!-- -->
65
+ <div class="ModalBg" :class="classStyle" :style="{ zIndex }" @click.stop="closeAll()" />
66
+ </Teleport>
67
+ </ClientOnly>
68
+ </template>
69
+
70
+ <style>
71
+ [data-reka-popper-content-wrapper]{z-index:var(--ui-z-modal)!important}
72
+ </style>
@@ -0,0 +1,11 @@
1
+ import { type ClassType } from '../../utils/class-style.js';
2
+ type Props = {
3
+ class?: ClassType;
4
+ target?: string;
5
+ };
6
+ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
7
+ class: ClassType;
8
+ target: string;
9
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
10
+ declare const _default: typeof __VLS_export;
11
+ export default _default;
@@ -1,172 +1,124 @@
1
- <script setup lang="ts">
2
- /* ----------------------------------------------------------------------------
3
- // src\runtime\components\interactive\modal.vue
4
- // ----------------------------------------------------------------------------
5
- // Modal
6
- // ModalModal
7
- ----------------------------------------------------------------------------- */
8
-
9
- // [ tailwind ]
10
- import { twMerge } from "tailwind-merge";
11
- // [ NUXT ]
12
- import { useId, computed, watch, onUnmounted, ref, useHead } from "#imports";
13
- // [ utils ]
14
- import { type ClassType, ClassTypeToString } from "../../utils/class-style";
15
- // [ composables ]
16
- import { useHsModal } from "../../composables/use-hs-modal";
17
- // ----------------------------------------------------------------------------
18
- // ----------------------------------------------------------------------------
19
- interface Props {
20
- class?: ClassType;
21
- classInner?: ClassType;
22
- show: boolean;
23
- mounted?: boolean;
24
- zIndex?: number | undefined;
25
- /** 背景クリックで閉じれる場合に背景色を切り替える機能
26
- * - closeイベントとセットで使う */
27
- closeable?: boolean;
28
- }
29
- const props = withDefaults(defineProps<Props>(), {
30
- class: "",
31
- classInner: "",
32
- mounted: true,
33
- zIndex: undefined,
34
- closeable: false,
35
- });
36
-
37
- type Emits = {
38
- close: [];
39
- "update:show": [bool: boolean];
40
- };
41
- const emit = defineEmits<Emits>();
42
-
43
- // ----------------------------------------------------------------------------
44
- const hsModal = useHsModal();
45
- hsModal.watch();
46
- const id = useId();
47
-
48
- // );
49
-
50
- // ----------------------------------------------------------------------------
51
- const zOrder = computed(() => {
52
- if (props.zIndex !== undefined) return props.zIndex;
53
- return hsModal.myzIndex(id).value;
54
- });
55
- if (props.show) {
56
- if (props.zIndex !== undefined) {
57
- hsModal.add(id, props.closeable, props.zIndex - 1);
58
- } else {
59
- hsModal.add(id, props.closeable);
60
- }
61
- }
62
- useHead({
63
- style: [
64
- {
65
- // flatpickr が毎回勝てるよう、都度上書き
66
- children: `.flatpickr-calendar{z-index:${zOrder.value + 1} !important;}`,
67
- },
68
- ],
69
- });
70
- watch(
71
- () => props.show,
72
- (show) => {
73
- if (show) {
74
- if (props.zIndex !== undefined) {
75
- hsModal.add(id, props.closeable, props.zIndex - 1);
76
- } else {
77
- hsModal.add(id, props.closeable);
78
- }
79
- } else {
80
- hsModal.remove(id);
81
- }
82
- }
83
- );
84
- onUnmounted(() => {
85
- hsModal.remove(id);
86
- });
87
- const mounted = computed(() => {
88
- if (props.show) return true;
89
- if (props.mounted) return true;
90
- return false;
91
- });
92
- // 背景色は[VUiModalBg]が担当します
93
-
94
- const classStyle = computed(() => {
95
- return twMerge(
96
- [
97
- //
98
- "p-2",
99
- "transition-opacity",
100
- "fixed",
101
- "inset-0",
102
- "flex",
103
- "justify-center",
104
- props.show ? "pointer-events-all" : "pointer-events-none",
105
- ],
106
- ClassTypeToString(props.class)
107
- );
108
- });
109
-
110
- const classInner = computed(() => {
111
- return twMerge(
112
- "w-full",
113
- "h-full",
114
- "p-0",
115
- "flex",
116
- "flex-col",
117
- "items-center",
118
- "overflow-auto",
119
- "transition-opacity",
120
- props.closeable ? "cursor-pointer" : "",
121
- props.show ? "pointer-events-all" : "pointer-events-none",
122
- // "bg-red-600",
123
- ClassTypeToString(props.classInner)
124
- );
125
- });
126
- const closeOnBackEvent = () => {
127
- if (props.closeable) {
128
- emit("update:show", false);
129
- emit("close");
130
- }
131
- };
132
- const down = ref(false);
133
- const downStop = () => {
134
- // console.log("downStop", down.value);
135
- if (down.value) {
136
- down.value = false;
137
- closeOnBackEvent();
138
- }
139
- };
140
- </script>
141
-
142
- <template>
143
- <ClientOnly>
144
- <Teleport to="body">
145
- <div
146
- v-if="mounted"
147
- :id="id"
148
- class="Modal"
149
- data-show=""
150
- :class="classStyle"
151
- :style="{ zIndex: zOrder, opacity: props.show ? 1 : 0 }"
152
- >
153
- <div
154
- :class="classInner"
155
- @mousedown.self="down = true"
156
- @mouseup.self="downStop"
157
- @mousedown.stop
158
- @mouseup.stop
159
- @click.stop=""
160
- >
161
- <slot />
162
- </div>
163
- </div>
164
- </Teleport>
165
- </ClientOnly>
166
- </template>
167
-
1
+ <script setup>
2
+ import { twMerge } from "tailwind-merge";
3
+ import { useId, computed, watch, onUnmounted, ref } from "#imports";
4
+ import { ClassTypeToString } from "../../utils/class-style";
5
+ import { useHsModal } from "../../composables/use-hs-modal";
6
+ import { useHsPinia } from "../../composables/use-pinia";
7
+ const props = defineProps({
8
+ class: { type: [String, Object, Array], required: false, default: "" },
9
+ classInner: { type: [String, Object, Array], required: false, default: "" },
10
+ show: { type: Boolean, required: true },
11
+ mounted: { type: Boolean, required: false, default: true },
12
+ zIndex: { type: null, required: false, default: void 0 },
13
+ closeable: { type: Boolean, required: false, default: false },
14
+ target: { type: String, required: false, default: "body" }
15
+ });
16
+ const emit = defineEmits(["close", "update:show"]);
17
+ const hsModal = useHsModal(useHsPinia());
18
+ hsModal.watch();
19
+ const id = useId();
20
+ const zOrder = computed(() => {
21
+ if (props.zIndex !== void 0) return props.zIndex;
22
+ return hsModal.myzIndex(id).value;
23
+ });
24
+ if (props.show) {
25
+ if (props.zIndex !== void 0) {
26
+ hsModal.add(id, props.closeable, props.zIndex - 1);
27
+ } else {
28
+ hsModal.add(id, props.closeable);
29
+ }
30
+ }
31
+ watch(
32
+ () => props.show,
33
+ (show) => {
34
+ if (show) {
35
+ if (props.zIndex !== void 0) {
36
+ hsModal.add(id, props.closeable, props.zIndex - 1);
37
+ } else {
38
+ hsModal.add(id, props.closeable);
39
+ }
40
+ } else {
41
+ hsModal.remove(id);
42
+ }
43
+ }
44
+ );
45
+ onUnmounted(() => {
46
+ hsModal.remove(id);
47
+ });
48
+ const mounted = computed(() => {
49
+ if (props.show) return true;
50
+ if (props.mounted) return true;
51
+ return false;
52
+ });
53
+ const classStyle = computed(() => {
54
+ return twMerge(
55
+ [
56
+ //
57
+ "p-2",
58
+ "fixed",
59
+ "inset-0",
60
+ "flex",
61
+ "justify-center",
62
+ props.show ? "pointer-events-all" : "pointer-events-none"
63
+ ],
64
+ ClassTypeToString(props.class)
65
+ );
66
+ });
67
+ const classInner = computed(() => {
68
+ return twMerge(
69
+ "w-full",
70
+ "h-full",
71
+ "p-0",
72
+ "flex",
73
+ "flex-col",
74
+ "items-center",
75
+ "overflow-auto",
76
+ // 'transition-opacity',
77
+ props.closeable ? "cursor-pointer" : "",
78
+ props.show ? "pointer-events-all" : "pointer-events-none",
79
+ // "bg-red-600",
80
+ ClassTypeToString(props.classInner)
81
+ );
82
+ });
83
+ const closeOnBackEvent = () => {
84
+ if (props.closeable) {
85
+ emit("update:show", false);
86
+ emit("close");
87
+ }
88
+ };
89
+ const down = ref(false);
90
+ const downStop = () => {
91
+ if (down.value) {
92
+ down.value = false;
93
+ closeOnBackEvent();
94
+ }
95
+ };
96
+ </script>
97
+
98
+ <template>
99
+ <ClientOnly>
100
+ <Teleport :to="target">
101
+ <div
102
+ v-if="mounted"
103
+ :id="id"
104
+ class="Modal"
105
+ data-show=""
106
+ :class="classStyle"
107
+ :style="{ zIndex: zOrder, opacity: props.show ? 1 : 0 }"
108
+ >
109
+ <div :class="classInner" @mousedown.self="down = true" @mouseup.self="downStop">
110
+ <!-- @click.stop="" -->
111
+ <!-- @mousedown.stop @mouseup.stop -->
112
+
113
+ <slot />
114
+ </div>
115
+ </div>
116
+ </Teleport>
117
+ </ClientOnly>
118
+ </template>
119
+
168
120
  <style>
169
- .Modal > * > * {
121
+ .Modal > div > * {
170
122
  cursor: default;
171
123
  }
172
- </style>
124
+ </style>
@@ -0,0 +1,38 @@
1
+ import { type ClassType } from '../../utils/class-style.js';
2
+ interface Props {
3
+ class?: ClassType;
4
+ classInner?: ClassType;
5
+ show: boolean;
6
+ mounted?: boolean;
7
+ zIndex?: number | undefined;
8
+ /** 背景クリックで閉じれる場合に背景色を切り替える機能
9
+ * - closeイベントとセットで使う */
10
+ closeable?: boolean;
11
+ target?: string;
12
+ }
13
+ declare var __VLS_14: {};
14
+ type __VLS_Slots = {} & {
15
+ default?: (props: typeof __VLS_14) => any;
16
+ };
17
+ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
18
+ close: () => any;
19
+ "update:show": (bool: boolean) => any;
20
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
21
+ onClose?: (() => any) | undefined;
22
+ "onUpdate:show"?: ((bool: boolean) => any) | undefined;
23
+ }>, {
24
+ zIndex: number;
25
+ closeable: boolean;
26
+ class: ClassType;
27
+ classInner: ClassType;
28
+ mounted: boolean;
29
+ target: string;
30
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
31
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
32
+ declare const _default: typeof __VLS_export;
33
+ export default _default;
34
+ type __VLS_WithSlots<T, S> = T & {
35
+ new (): {
36
+ $slots: S;
37
+ };
38
+ };