nuxt-hs-ui 2.12.7 → 4.0.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.
- package/README.md +202 -14
- package/dist/module.d.mts +3 -4
- package/dist/module.json +9 -6
- package/dist/module.mjs +109 -99
- package/dist/runtime/assets/flatpickr-dark.css +1 -1
- package/dist/runtime/assets/main.css +1 -0
- package/dist/runtime/assets/tabulator-custom.css +1 -1
- package/dist/runtime/components/form/_select/hidden-item-toggle.vue +28 -0
- package/dist/runtime/components/form/_select/hidden-item-toggle.vue.d.ts +10 -0
- package/dist/runtime/components/form/_select/item-container.vue +63 -0
- package/dist/runtime/components/form/_select/item-container.vue.d.ts +19 -0
- package/dist/runtime/components/form/_select/item-label.vue +31 -0
- package/dist/runtime/components/form/_select/item-label.vue.d.ts +13 -0
- package/dist/runtime/components/form/_select/item-row.vue +62 -0
- package/dist/runtime/components/form/_select/item-row.vue.d.ts +34 -0
- package/dist/runtime/components/form/btn-line-loading.vue +62 -81
- package/dist/runtime/components/form/btn-line-loading.vue.d.ts +14 -0
- package/dist/runtime/components/form/btn.vue +411 -494
- package/dist/runtime/components/form/btn.vue.d.ts +0 -0
- package/dist/runtime/components/form/check-box.vue +200 -315
- package/dist/runtime/components/form/check-box.vue.d.ts +71 -0
- package/dist/runtime/components/form/check-list.vue +234 -364
- package/dist/runtime/components/form/check-list.vue.d.ts +99 -0
- package/dist/runtime/components/form/combo-box.vue +340 -0
- package/dist/runtime/components/form/combo-box.vue.d.ts +69 -0
- package/dist/runtime/components/form/datepicker.vue +717 -883
- package/dist/runtime/components/form/datepicker.vue.d.ts +122 -0
- package/dist/runtime/components/form/input-frame.vue +174 -258
- package/dist/runtime/components/form/input-frame.vue.d.ts +88 -0
- package/dist/runtime/components/form/radio.vue +451 -614
- package/dist/runtime/components/form/radio.vue.d.ts +62 -0
- package/dist/runtime/components/form/select-img-icon.vue +38 -53
- package/dist/runtime/components/form/select-img-icon.vue.d.ts +15 -0
- package/dist/runtime/components/form/select.vue +733 -579
- package/dist/runtime/components/form/select.vue.d.ts +63 -0
- package/dist/runtime/components/form/text-box.vue +266 -365
- package/dist/runtime/components/form/text-box.vue.d.ts +105 -0
- package/dist/runtime/components/form/textarea.vue +338 -421
- package/dist/runtime/components/form/textarea.vue.d.ts +98 -0
- package/dist/runtime/components/form/value-box.vue +512 -641
- package/dist/runtime/components/form/value-box.vue.d.ts +128 -0
- package/dist/runtime/components/interactive/alert.vue +49 -113
- package/dist/runtime/components/interactive/alert.vue.d.ts +30 -0
- package/dist/runtime/components/interactive/block-loading.vue +91 -119
- package/dist/runtime/components/interactive/block-loading.vue.d.ts +22 -0
- package/dist/runtime/components/interactive/dialog.vue +252 -407
- package/dist/runtime/components/interactive/dialog.vue.d.ts +3 -0
- package/dist/runtime/components/interactive/modal-bg.vue +72 -82
- package/dist/runtime/components/interactive/modal-bg.vue.d.ts +11 -0
- package/dist/runtime/components/interactive/modal.vue +121 -169
- package/dist/runtime/components/interactive/modal.vue.d.ts +38 -0
- package/dist/runtime/components/interactive/toast.vue +164 -206
- package/dist/runtime/components/interactive/toast.vue.d.ts +3 -0
- package/dist/runtime/components/interactive/window-loader.vue +61 -84
- package/dist/runtime/components/interactive/window-loader.vue.d.ts +3 -0
- package/dist/runtime/components/layout/accordion-down.vue +72 -0
- package/dist/runtime/components/layout/accordion-down.vue.d.ts +26 -0
- package/dist/runtime/components/layout/accordion.vue +47 -78
- package/dist/runtime/components/layout/accordion.vue.d.ts +22 -0
- package/dist/runtime/components/layout/aspect-box.vue +29 -58
- package/dist/runtime/components/layout/aspect-box.vue.d.ts +29 -0
- package/dist/runtime/components/layout/card-item.vue +148 -193
- package/dist/runtime/components/layout/card-item.vue.d.ts +0 -0
- package/dist/runtime/components/layout/card.vue +27 -42
- package/dist/runtime/components/layout/card.vue.d.ts +23 -0
- package/dist/runtime/components/layout/container.vue +25 -40
- package/dist/runtime/components/layout/container.vue.d.ts +35 -0
- package/dist/runtime/components/layout/divider-h.vue +30 -50
- package/dist/runtime/components/layout/divider-h.vue.d.ts +18 -0
- package/dist/runtime/components/misc/breadcrumb.vue +47 -95
- package/dist/runtime/components/misc/breadcrumb.vue.d.ts +22 -0
- package/dist/runtime/components/misc/tabulator.vue +122 -190
- package/dist/runtime/components/misc/tabulator.vue.d.ts +28 -0
- package/dist/runtime/components/misc/view-name-display.vue +53 -68
- package/dist/runtime/components/misc/view-name-display.vue.d.ts +14 -0
- package/dist/runtime/components/test.vue +13 -0
- package/dist/runtime/components/test.vue.d.ts +3 -0
- package/dist/runtime/composables/test.d.ts +8 -0
- package/dist/runtime/composables/test.js +12 -0
- package/dist/runtime/composables/use-hs-dialog.d.ts +3 -20
- package/dist/runtime/composables/use-hs-dialog.js +3 -9
- package/dist/runtime/composables/use-hs-is-mobile.d.ts +8 -2
- package/dist/runtime/composables/use-hs-is-mobile.js +43 -25
- package/dist/runtime/composables/use-hs-misc.d.ts +8 -38
- package/dist/runtime/composables/use-hs-misc.js +9 -61
- package/dist/runtime/composables/use-hs-modal.js +1 -3
- package/dist/runtime/composables/use-hs-multi-lang.d.ts +23 -40
- package/dist/runtime/composables/use-hs-multi-lang.js +30 -74
- package/dist/runtime/composables/use-hs-scroll-lock.d.ts +1 -1
- package/dist/runtime/composables/use-hs-scroll-lock.js +2 -1
- package/dist/runtime/composables/use-hs-toast.d.ts +2 -2
- package/dist/runtime/composables/use-hs-toast.js +12 -4
- package/dist/runtime/composables/use-pinia.d.ts +1 -0
- package/dist/runtime/composables/use-pinia.js +2 -0
- package/dist/runtime/plugin.d.ts +2 -0
- package/dist/runtime/plugin.js +4 -0
- package/dist/runtime/server/tsconfig.json +3 -3
- package/dist/runtime/types/dialog.d.ts +11 -20
- package/dist/runtime/types/dialog.js +2 -1
- package/dist/runtime/types/flatpickr/default.js +2 -23
- package/dist/runtime/types/flatpickr/ja.js +3 -37
- package/dist/runtime/types/toast.d.ts +1 -1
- package/dist/runtime/utils/dayjs.d.ts +8 -6
- package/dist/runtime/utils/dayjs.js +12 -5
- package/dist/runtime/utils/modal.d.ts +9 -28
- package/dist/runtime/utils/modal.js +7 -36
- package/dist/runtime/utils/multi-lang-object.d.ts +2 -2
- package/dist/runtime/utils/multi-lang-object.js +1 -5
- package/dist/runtime/utils/multi-lang.js +12 -22
- package/dist/runtime/utils/object.js +1 -1
- package/dist/runtime/utils/select-item.d.ts +3 -1
- package/dist/runtime/utils/stop-watch.js +6 -4
- package/dist/runtime/utils/string.js +4 -4
- package/dist/runtime/utils/tabulator.d.ts +1 -42
- package/dist/runtime/utils/tabulator.js +2 -99
- package/dist/runtime/utils/theme.d.ts +20 -20
- package/dist/runtime/utils/theme.js +180 -30
- package/dist/runtime/utils/tv.d.ts +1 -101
- package/dist/runtime/utils/tv.js +0 -22
- package/dist/types.d.mts +3 -1
- package/package.json +61 -119
- package/dist/module.cjs +0 -5
- package/dist/module.d.ts +0 -16
- package/dist/runtime/assets/vue-select.css +0 -1
- package/dist/runtime/components/misc/view-name-display-target.vue +0 -39
- package/dist/runtime/plugin/v-select.d.ts +0 -2
- package/dist/runtime/plugin/v-select.js +0 -5
- package/dist/runtime/style.css +0 -22
- package/dist/runtime/tailwind.css +0 -78
- package/dist/runtime/types/app.config.d.ts +0 -5
- package/dist/types.d.ts +0 -1
|
@@ -1,185 +1,142 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
//
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
<
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
:class="closeBtnStyle"
|
|
119
|
-
theme="white"
|
|
120
|
-
type="outlined"
|
|
121
|
-
@click="deleteMessage(message)"
|
|
122
|
-
>
|
|
123
|
-
<i class="fas fa-times" />
|
|
124
|
-
</Btn>
|
|
125
|
-
</CardItem>
|
|
126
|
-
<CardItem
|
|
127
|
-
v-if="tx(message.message).value.length > 0"
|
|
128
|
-
:class="[`theme-${message.theme}`, ['items-overflow-visible']]"
|
|
129
|
-
>
|
|
130
|
-
<div class="HsUiToast-message">
|
|
131
|
-
{{ tx(message.message) }}
|
|
132
|
-
</div>
|
|
133
|
-
</CardItem>
|
|
134
|
-
<CardItem
|
|
135
|
-
v-if="message.hideAfter != 0"
|
|
136
|
-
:class="[
|
|
137
|
-
`theme-${message.theme}`,
|
|
138
|
-
['overflow-visible', 'p-0', 'min-h-[8px]'],
|
|
139
|
-
]"
|
|
140
|
-
>
|
|
141
|
-
<div class="HsUiToast-bar-body" :class="[`${message.theme}`]">
|
|
142
|
-
<div class="HsUiToast-bar" :style="style(message)" />
|
|
143
|
-
</div>
|
|
144
|
-
</CardItem>
|
|
145
|
-
</template>
|
|
146
|
-
<template v-else>
|
|
147
|
-
<CardItem
|
|
148
|
-
variant="header"
|
|
149
|
-
:class="[`theme-${message.theme}`, ['items-center']]"
|
|
150
|
-
>
|
|
151
|
-
<div class="HsUiToast-message">
|
|
152
|
-
{{ tx(message.message) }}
|
|
153
|
-
</div>
|
|
154
|
-
<Btn
|
|
155
|
-
:class="closeBtnStyle"
|
|
156
|
-
theme="white"
|
|
157
|
-
variant="outlined"
|
|
158
|
-
@click="deleteMessage(message)"
|
|
159
|
-
>
|
|
160
|
-
<i class="fas fa-times" />
|
|
161
|
-
</Btn>
|
|
162
|
-
</CardItem>
|
|
163
|
-
<CardItem
|
|
164
|
-
v-if="message.hideAfter != 0"
|
|
165
|
-
:class="[
|
|
166
|
-
`theme-${message.theme}`,
|
|
167
|
-
['overflow-visible', 'p-0', 'min-h-[8px]'],
|
|
168
|
-
]"
|
|
169
|
-
>
|
|
170
|
-
<div class="HsUiToast-bar-body" :class="[`${message.theme}`]">
|
|
171
|
-
<div class="HsUiToast-bar" :style="style(message)" />
|
|
172
|
-
</div>
|
|
173
|
-
</CardItem>
|
|
174
|
-
</template>
|
|
175
|
-
</Card>
|
|
176
|
-
</Accordion>
|
|
177
|
-
</template>
|
|
178
|
-
</div>
|
|
179
|
-
</div>
|
|
180
|
-
</template>
|
|
181
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { Int } from "../../utils/number";
|
|
3
|
+
import { useHsToast } from "../../composables/use-hs-toast";
|
|
4
|
+
import { useHsMultiLang } from "../../composables/use-hs-multi-lang";
|
|
5
|
+
import { useHsPinia } from "../../composables/use-pinia";
|
|
6
|
+
import Card from "../layout/card.vue";
|
|
7
|
+
import CardItem from "../layout/card-item.vue";
|
|
8
|
+
import Btn from "../form/btn.vue";
|
|
9
|
+
const toast = useHsToast(useHsPinia());
|
|
10
|
+
const state = toast.state;
|
|
11
|
+
const multiLang = useHsMultiLang(useHsPinia());
|
|
12
|
+
const tx = multiLang.tx;
|
|
13
|
+
const style = (message) => {
|
|
14
|
+
let d = Int(message.hideAfter);
|
|
15
|
+
if (d < 0) d = 0;
|
|
16
|
+
return {
|
|
17
|
+
"animation-duration": d + "ms"
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
const closeBtnStyle = [
|
|
21
|
+
//
|
|
22
|
+
"bg-transparent",
|
|
23
|
+
"border-[1px]",
|
|
24
|
+
"border-white",
|
|
25
|
+
"rounded",
|
|
26
|
+
"min-h-0",
|
|
27
|
+
"w-[30px]",
|
|
28
|
+
"h-[30px]",
|
|
29
|
+
"p-0",
|
|
30
|
+
"flex-none",
|
|
31
|
+
"self-start"
|
|
32
|
+
];
|
|
33
|
+
const removeMessage = (key) => {
|
|
34
|
+
state.pendingList = state.pendingList.filter((row) => {
|
|
35
|
+
return row.key !== key;
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
</script>
|
|
39
|
+
|
|
40
|
+
<template>
|
|
41
|
+
<div class="HsUiToast-base" :style="{ 'z-index': state.zindex }">
|
|
42
|
+
<div v-show="state.pendingList.length !== 0" class="HsUiToast-container">
|
|
43
|
+
<TransitionGroup name="list" tag="div" class="flex flex-col-reverse items-end gap-1">
|
|
44
|
+
<div v-for="message in state.pendingList" :key="message.key" class="z-[1]">
|
|
45
|
+
<Card
|
|
46
|
+
class="HsUiToast"
|
|
47
|
+
:class="['drop-shadow-md', 'pointer-events-all']"
|
|
48
|
+
@click.stop=""
|
|
49
|
+
@mousedown.stop=""
|
|
50
|
+
@mouseup.stop=""
|
|
51
|
+
>
|
|
52
|
+
<template v-if="!!tx(message.title).value">
|
|
53
|
+
<CardItem variant="header" :class="[`theme-${message.theme}`, 'items-center', 'gap-1']">
|
|
54
|
+
<div class="HsUiToast-title">
|
|
55
|
+
{{ tx(message.title) }}
|
|
56
|
+
</div>
|
|
57
|
+
<Btn :class="closeBtnStyle" theme="white" variant="outlined" @click="removeMessage(message.key)">
|
|
58
|
+
<i class="fas fa-times" />
|
|
59
|
+
</Btn>
|
|
60
|
+
</CardItem>
|
|
61
|
+
<CardItem
|
|
62
|
+
v-if="!!tx(message.message).value"
|
|
63
|
+
:class="[`theme-${message.theme}`, ['items-overflow-visible']]"
|
|
64
|
+
>
|
|
65
|
+
<div class="HsUiToast-message">
|
|
66
|
+
{{ tx(message.message) }}
|
|
67
|
+
</div>
|
|
68
|
+
</CardItem>
|
|
69
|
+
<CardItem
|
|
70
|
+
v-if="message.hideAfter != 0"
|
|
71
|
+
:class="[`theme-${message.theme}`, ['overflow-visible', 'p-0', 'min-h-[8px]']]"
|
|
72
|
+
>
|
|
73
|
+
<div class="HsUiToast-bar-body" :class="[`${message.theme}`]">
|
|
74
|
+
<div class="HsUiToast-bar" :style="style(message)" />
|
|
75
|
+
</div>
|
|
76
|
+
</CardItem>
|
|
77
|
+
</template>
|
|
78
|
+
<template v-else>
|
|
79
|
+
<CardItem variant="header" :class="[`theme-${message.theme}`, 'items-center', 'gap-1']">
|
|
80
|
+
<div class="HsUiToast-message">
|
|
81
|
+
{{ tx(message.message) }}
|
|
82
|
+
</div>
|
|
83
|
+
<Btn :class="closeBtnStyle" theme="white" variant="outlined" @click="removeMessage(message.key)">
|
|
84
|
+
<i class="fas fa-times" />
|
|
85
|
+
</Btn>
|
|
86
|
+
</CardItem>
|
|
87
|
+
<CardItem
|
|
88
|
+
v-if="message.hideAfter != 0"
|
|
89
|
+
:class="[`theme-${message.theme}`, ['overflow-visible', 'p-0', 'min-h-[8px]']]"
|
|
90
|
+
>
|
|
91
|
+
<div class="HsUiToast-bar-body" :class="[`${message.theme}`]">
|
|
92
|
+
<div class="HsUiToast-bar" :style="style(message)" />
|
|
93
|
+
</div>
|
|
94
|
+
</CardItem>
|
|
95
|
+
</template>
|
|
96
|
+
</Card>
|
|
97
|
+
</div>
|
|
98
|
+
</TransitionGroup>
|
|
99
|
+
<div
|
|
100
|
+
v-if="state.pendingList.length > 5"
|
|
101
|
+
class="absolute right-[-50px] bottom-[-50px] z-10 pt-[10px] pr-[55px] pb-[55px] pl-[10px]"
|
|
102
|
+
>
|
|
103
|
+
<div class="absolute inset-0 blur-sm bg-white/60"></div>
|
|
104
|
+
<Btn
|
|
105
|
+
theme="accent1"
|
|
106
|
+
variant="outlined"
|
|
107
|
+
size="xs"
|
|
108
|
+
class="bg-white mb-1 w-[80px] blur-none pointer-events-auto"
|
|
109
|
+
@click="state.pendingList.length = 0"
|
|
110
|
+
>
|
|
111
|
+
Clear
|
|
112
|
+
</Btn>
|
|
113
|
+
</div>
|
|
114
|
+
</div>
|
|
115
|
+
</div>
|
|
116
|
+
</template>
|
|
117
|
+
|
|
182
118
|
<style scoped>
|
|
119
|
+
@charset "UTF-8";
|
|
120
|
+
.list-move,
|
|
121
|
+
.list-enter-active,
|
|
122
|
+
.list-leave-active {
|
|
123
|
+
transition: all 0.5s ease;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
.list-enter-from,
|
|
127
|
+
.list-leave-to {
|
|
128
|
+
opacity: 0;
|
|
129
|
+
transform: translateX(100%);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/* leave する項目をレイアウトフローから外すことで
|
|
133
|
+
アニメーションが正しく計算されるようになる */
|
|
134
|
+
.list-leave-active {
|
|
135
|
+
position: absolute;
|
|
136
|
+
z-index: -1;
|
|
137
|
+
transform: translateX(400%);
|
|
138
|
+
}
|
|
139
|
+
|
|
183
140
|
.theme-success {
|
|
184
141
|
background-color: #2bb60c !important;
|
|
185
142
|
color: white !important;
|
|
@@ -218,47 +175,49 @@ const closeBtnStyle = [
|
|
|
218
175
|
inset: 0 0 0 0;
|
|
219
176
|
overflow: hidden;
|
|
220
177
|
display: flex;
|
|
221
|
-
justify-content:
|
|
178
|
+
justify-content: end;
|
|
179
|
+
align-items: end;
|
|
222
180
|
}
|
|
223
181
|
|
|
224
182
|
.HsUiToast-container {
|
|
225
183
|
pointer-events: none;
|
|
226
184
|
position: relative;
|
|
227
|
-
overflow-x: hidden;
|
|
228
|
-
overflow-y: auto;
|
|
229
|
-
height: 100%;
|
|
230
|
-
height: 100svh;
|
|
231
185
|
max-height: 100%;
|
|
186
|
+
max-height: 100vh;
|
|
187
|
+
max-height: 100dvh;
|
|
232
188
|
max-height: 100svh;
|
|
233
189
|
display: flex;
|
|
234
190
|
flex-direction: column;
|
|
235
|
-
width: 800px;
|
|
236
|
-
padding: 10px
|
|
191
|
+
max-width: 800px;
|
|
192
|
+
padding: 10px;
|
|
237
193
|
}
|
|
238
194
|
@media screen and (min-width: 0px) and (max-width: 399.9px) {
|
|
239
195
|
.HsUiToast-container {
|
|
240
|
-
width: 100%;
|
|
241
|
-
|
|
196
|
+
max-width: 100%;
|
|
197
|
+
max-width: 100vh;
|
|
198
|
+
max-width: 100dvh;
|
|
199
|
+
max-width: 100svh;
|
|
242
200
|
}
|
|
243
201
|
}
|
|
244
202
|
@media screen and (min-width: 400px) and (max-width: 599.9px) {
|
|
245
203
|
.HsUiToast-container {
|
|
246
|
-
width: 380px;
|
|
204
|
+
max-width: 380px;
|
|
247
205
|
}
|
|
248
206
|
}
|
|
249
207
|
@media screen and (min-width: 600px) and (max-width: 799.9px) {
|
|
250
208
|
.HsUiToast-container {
|
|
251
|
-
width: 550px;
|
|
209
|
+
max-width: 550px;
|
|
252
210
|
}
|
|
253
211
|
}
|
|
254
212
|
@media screen and (min-width: 800px) and (max-width: 1199.9px) {
|
|
255
213
|
.HsUiToast-container {
|
|
256
|
-
width: 600px;
|
|
214
|
+
max-width: 600px;
|
|
257
215
|
}
|
|
258
216
|
}
|
|
259
217
|
|
|
260
218
|
.HsUiToast {
|
|
261
219
|
pointer-events: all;
|
|
220
|
+
min-width: 120px;
|
|
262
221
|
}
|
|
263
222
|
|
|
264
223
|
.HsUiToast-title {
|
|
@@ -324,16 +283,15 @@ const closeBtnStyle = [
|
|
|
324
283
|
animation-timing-function: linear;
|
|
325
284
|
animation-fill-mode: forwards;
|
|
326
285
|
}
|
|
327
|
-
</style>
|
|
328
|
-
|
|
329
|
-
<style
|
|
330
|
-
@keyframes HsUiToast-bar-key-frame {
|
|
331
|
-
0% {
|
|
332
|
-
width: 0%;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
</style>
|
|
286
|
+
</style>
|
|
287
|
+
|
|
288
|
+
<style>
|
|
289
|
+
@keyframes HsUiToast-bar-key-frame {
|
|
290
|
+
0% {
|
|
291
|
+
width: 0%;
|
|
292
|
+
}
|
|
293
|
+
100% {
|
|
294
|
+
width: 100%;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
</style>
|
|
@@ -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,70 +1,50 @@
|
|
|
1
|
-
<script setup
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
<!-- -->
|
|
49
|
-
<!-- -->
|
|
50
|
-
<div class="HsUiWindowLoader-body">
|
|
51
|
-
<div class="sk-cube-grid">
|
|
52
|
-
<div class="sk-cube sk-cube1" />
|
|
53
|
-
<div class="sk-cube sk-cube2" />
|
|
54
|
-
<div class="sk-cube sk-cube3" />
|
|
55
|
-
<div class="sk-cube sk-cube4" />
|
|
56
|
-
<div class="sk-cube sk-cube5" />
|
|
57
|
-
<div class="sk-cube sk-cube6" />
|
|
58
|
-
<div class="sk-cube sk-cube7" />
|
|
59
|
-
<div class="sk-cube sk-cube8" />
|
|
60
|
-
<div class="sk-cube sk-cube9" />
|
|
61
|
-
</div>
|
|
62
|
-
<div class="HsUiWindowLoader-text">Please wait...</div>
|
|
63
|
-
<input type="checkbox" class="dummy" />
|
|
64
|
-
</div>
|
|
65
|
-
</div>
|
|
66
|
-
</template>
|
|
67
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { useFocusTrap } from "@vueuse/integrations/useFocusTrap";
|
|
3
|
+
import { ref, watch } from "#imports";
|
|
4
|
+
import { useHsWindowLoader } from "../../composables/use-hs-window-loader";
|
|
5
|
+
import { useHsPinia } from "../../composables/use-pinia";
|
|
6
|
+
const WindowLoader = useHsWindowLoader(useHsPinia());
|
|
7
|
+
const focusTargetElm = ref(null);
|
|
8
|
+
const { activate, deactivate } = useFocusTrap(focusTargetElm);
|
|
9
|
+
watch(
|
|
10
|
+
() => WindowLoader.state.show,
|
|
11
|
+
(show) => {
|
|
12
|
+
if (show) {
|
|
13
|
+
activate();
|
|
14
|
+
} else {
|
|
15
|
+
deactivate();
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
</script>
|
|
20
|
+
|
|
21
|
+
<template>
|
|
22
|
+
<div
|
|
23
|
+
ref="focusTargetElm"
|
|
24
|
+
class="HsUiWindowLoader"
|
|
25
|
+
:class="{ show: WindowLoader.state.show }"
|
|
26
|
+
:style="{ 'z-index': WindowLoader.state.zindex }"
|
|
27
|
+
>
|
|
28
|
+
<!-- -->
|
|
29
|
+
<!-- -->
|
|
30
|
+
<div class="HsUiWindowLoader-body">
|
|
31
|
+
<div class="sk-cube-grid">
|
|
32
|
+
<div class="sk-cube sk-cube1" />
|
|
33
|
+
<div class="sk-cube sk-cube2" />
|
|
34
|
+
<div class="sk-cube sk-cube3" />
|
|
35
|
+
<div class="sk-cube sk-cube4" />
|
|
36
|
+
<div class="sk-cube sk-cube5" />
|
|
37
|
+
<div class="sk-cube sk-cube6" />
|
|
38
|
+
<div class="sk-cube sk-cube7" />
|
|
39
|
+
<div class="sk-cube sk-cube8" />
|
|
40
|
+
<div class="sk-cube sk-cube9" />
|
|
41
|
+
</div>
|
|
42
|
+
<div class="HsUiWindowLoader-text">Please wait...</div>
|
|
43
|
+
<input type="checkbox" class="dummy" />
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
68
48
|
<style scoped>
|
|
69
49
|
.dummy {
|
|
70
50
|
opacity: 0;
|
|
@@ -169,20 +149,17 @@ watch(
|
|
|
169
149
|
-webkit-animation-delay: 0.2s;
|
|
170
150
|
animation-delay: 0.2s;
|
|
171
151
|
}
|
|
172
|
-
</style>
|
|
173
|
-
|
|
174
|
-
<style
|
|
175
|
-
@keyframes HsUiWindowLoader-anime {
|
|
176
|
-
0%,
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
</style>
|
|
152
|
+
</style>
|
|
153
|
+
|
|
154
|
+
<style>
|
|
155
|
+
@keyframes HsUiWindowLoader-anime {
|
|
156
|
+
0%, 70%, 100% {
|
|
157
|
+
-webkit-transform: scale3D(1, 1, 1);
|
|
158
|
+
transform: scale3D(1, 1, 1);
|
|
159
|
+
}
|
|
160
|
+
35% {
|
|
161
|
+
-webkit-transform: scale3D(0, 0, 1);
|
|
162
|
+
transform: scale3D(0, 0, 1);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
</style>
|
|
@@ -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;
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, ref, watch, nextTick } from "#imports";
|
|
3
|
+
import { twMerge } from "tailwind-merge";
|
|
4
|
+
import { ClassTypeToString } from "../../utils/class-style";
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
class: { type: [String, Object, Array], required: false, default: "" },
|
|
7
|
+
open: { type: Boolean, required: true },
|
|
8
|
+
span: { type: Number, required: false, default: 300 }
|
|
9
|
+
});
|
|
10
|
+
const emit = defineEmits(["closed"]);
|
|
11
|
+
const innerHidden = ref(!props.open);
|
|
12
|
+
watch(
|
|
13
|
+
() => props.open,
|
|
14
|
+
async () => {
|
|
15
|
+
if (props.open) {
|
|
16
|
+
innerHidden.value = false;
|
|
17
|
+
} else {
|
|
18
|
+
await nextTick();
|
|
19
|
+
setTimeout(() => {
|
|
20
|
+
if (props.open) {
|
|
21
|
+
innerHidden.value = false;
|
|
22
|
+
} else {
|
|
23
|
+
innerHidden.value = true;
|
|
24
|
+
emit("closed");
|
|
25
|
+
}
|
|
26
|
+
}, props.span);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
);
|
|
30
|
+
const classStyle = computed(() => {
|
|
31
|
+
return twMerge([props.open ? "open" : ""], ClassTypeToString(props.class));
|
|
32
|
+
});
|
|
33
|
+
</script>
|
|
34
|
+
|
|
35
|
+
<template>
|
|
36
|
+
<div
|
|
37
|
+
v-if="!innerHidden"
|
|
38
|
+
class="Accordion"
|
|
39
|
+
:class="[props.open ? 'open' : '', classStyle]"
|
|
40
|
+
:style="`--hsui-accordion-span:${props.span}ms`"
|
|
41
|
+
:inert="!props.open"
|
|
42
|
+
>
|
|
43
|
+
<div class="Accordion__inner" :class="{ hidden: innerHidden }">
|
|
44
|
+
<slot />
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<style scoped>
|
|
50
|
+
.Accordion {
|
|
51
|
+
overflow: hidden;
|
|
52
|
+
display: flex;
|
|
53
|
+
flex-direction: column;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.Accordion__inner {
|
|
57
|
+
transform-origin: bottom;
|
|
58
|
+
transition: transform var(--hsui-accordion-span) ease, opacity var(--hsui-accordion-span) ease;
|
|
59
|
+
transform: scaleY(0);
|
|
60
|
+
opacity: 0;
|
|
61
|
+
will-change: transform, opacity;
|
|
62
|
+
}
|
|
63
|
+
.Accordion__inner.hidden {
|
|
64
|
+
display: none;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.Accordion.open .Accordion__inner {
|
|
68
|
+
transform: scaleY(1);
|
|
69
|
+
opacity: 1;
|
|
70
|
+
display: block;
|
|
71
|
+
}
|
|
72
|
+
</style>
|