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
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
import type { ClassType } from '../../utils/class-style.js';
|
|
2
|
+
import type { MultiLang } from '../../utils/multi-lang.js';
|
|
3
|
+
type Enterkeyhint = 'done' | 'search' | 'enter' | 'go' | 'next' | 'previous' | 'send';
|
|
4
|
+
type Props = {
|
|
5
|
+
nullable?: boolean;
|
|
6
|
+
unit?: string;
|
|
7
|
+
step?: number;
|
|
8
|
+
min?: number;
|
|
9
|
+
max?: number;
|
|
10
|
+
digits?: number;
|
|
11
|
+
/** 小数点以下で末端のゼロを非表示 */
|
|
12
|
+
digitsAuto?: boolean;
|
|
13
|
+
isShowBtnControl?: boolean;
|
|
14
|
+
comma?: string;
|
|
15
|
+
enterkeyhint?: Enterkeyhint | undefined;
|
|
16
|
+
inputSize?: string | number;
|
|
17
|
+
placeholder?: MultiLang;
|
|
18
|
+
textAlign?: 'left' | 'center' | 'right';
|
|
19
|
+
digitsPointSmall?: boolean;
|
|
20
|
+
data: number | null;
|
|
21
|
+
diff?: number | null | undefined;
|
|
22
|
+
tabindex?: string | undefined;
|
|
23
|
+
class?: ClassType;
|
|
24
|
+
classHeader?: ClassType;
|
|
25
|
+
classInput?: ClassType;
|
|
26
|
+
focusColor?: string;
|
|
27
|
+
changeColor?: string;
|
|
28
|
+
error?: boolean;
|
|
29
|
+
errorColor?: string;
|
|
30
|
+
disabled?: boolean;
|
|
31
|
+
disabledColor?: string;
|
|
32
|
+
readonly?: boolean;
|
|
33
|
+
headerless?: boolean;
|
|
34
|
+
label?: MultiLang;
|
|
35
|
+
require?: boolean;
|
|
36
|
+
requireText?: MultiLang;
|
|
37
|
+
warn?: string;
|
|
38
|
+
warnTimeOut?: number;
|
|
39
|
+
size?: 's' | 'm' | 'l';
|
|
40
|
+
uiText?: {
|
|
41
|
+
validError: {
|
|
42
|
+
title: MultiLang;
|
|
43
|
+
nullValue: MultiLang;
|
|
44
|
+
minValue: MultiLang;
|
|
45
|
+
maxValue: MultiLang;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
type __VLS_Slots = {
|
|
50
|
+
default(props: {
|
|
51
|
+
msg: string;
|
|
52
|
+
}): any;
|
|
53
|
+
overlay?(): any;
|
|
54
|
+
'right-icons'?(): any;
|
|
55
|
+
'left-icons'?(): any;
|
|
56
|
+
'label-prepend'?(): any;
|
|
57
|
+
'label-append'?(): any;
|
|
58
|
+
'header-right'?(): any;
|
|
59
|
+
};
|
|
60
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {
|
|
61
|
+
el: import("vue").Ref<any, any>;
|
|
62
|
+
}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
63
|
+
blur: (elm: HTMLElement) => any;
|
|
64
|
+
focus: (elm: HTMLElement) => any;
|
|
65
|
+
keydown: (event: KeyboardEvent) => any;
|
|
66
|
+
keyup: (event: KeyboardEvent) => any;
|
|
67
|
+
ref: (element: HTMLElement) => any;
|
|
68
|
+
"update:data": (value: number | null) => any;
|
|
69
|
+
"value-change": (after: number | null, before: number | null) => any;
|
|
70
|
+
}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
|
|
71
|
+
onBlur?: ((elm: HTMLElement) => any) | undefined;
|
|
72
|
+
onFocus?: ((elm: HTMLElement) => any) | undefined;
|
|
73
|
+
onKeydown?: ((event: KeyboardEvent) => any) | undefined;
|
|
74
|
+
onKeyup?: ((event: KeyboardEvent) => any) | undefined;
|
|
75
|
+
onRef?: ((element: HTMLElement) => any) | undefined;
|
|
76
|
+
"onUpdate:data"?: ((value: number | null) => any) | undefined;
|
|
77
|
+
"onValue-change"?: ((after: number | null, before: number | null) => any) | undefined;
|
|
78
|
+
}>, {
|
|
79
|
+
error: boolean;
|
|
80
|
+
size: "s" | "m" | "l";
|
|
81
|
+
disabled: boolean;
|
|
82
|
+
step: number;
|
|
83
|
+
warn: string;
|
|
84
|
+
class: ClassType;
|
|
85
|
+
textAlign: "left" | "center" | "right";
|
|
86
|
+
diff: number | null;
|
|
87
|
+
tabindex: string;
|
|
88
|
+
label: MultiLang;
|
|
89
|
+
warnTimeOut: number;
|
|
90
|
+
uiText: {
|
|
91
|
+
validError: {
|
|
92
|
+
title: MultiLang;
|
|
93
|
+
nullValue: MultiLang;
|
|
94
|
+
minValue: MultiLang;
|
|
95
|
+
maxValue: MultiLang;
|
|
96
|
+
};
|
|
97
|
+
};
|
|
98
|
+
classHeader: ClassType;
|
|
99
|
+
classInput: ClassType;
|
|
100
|
+
focusColor: string;
|
|
101
|
+
changeColor: string;
|
|
102
|
+
errorColor: string;
|
|
103
|
+
disabledColor: string;
|
|
104
|
+
readonly: boolean;
|
|
105
|
+
headerless: boolean;
|
|
106
|
+
require: boolean;
|
|
107
|
+
requireText: MultiLang;
|
|
108
|
+
nullable: boolean;
|
|
109
|
+
enterkeyhint: Enterkeyhint;
|
|
110
|
+
inputSize: string | number;
|
|
111
|
+
placeholder: MultiLang;
|
|
112
|
+
unit: string;
|
|
113
|
+
min: number;
|
|
114
|
+
max: number;
|
|
115
|
+
digits: number;
|
|
116
|
+
digitsAuto: boolean;
|
|
117
|
+
isShowBtnControl: boolean;
|
|
118
|
+
comma: string;
|
|
119
|
+
digitsPointSmall: boolean;
|
|
120
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
121
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
122
|
+
declare const _default: typeof __VLS_export;
|
|
123
|
+
export default _default;
|
|
124
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
125
|
+
new (): {
|
|
126
|
+
$slots: S;
|
|
127
|
+
};
|
|
128
|
+
};
|
|
@@ -1,113 +1,49 @@
|
|
|
1
|
-
<script
|
|
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
|
-
// Alert
|
|
51
|
-
// AlertAlert
|
|
52
|
-
----------------------------------------------------------------------------- */
|
|
53
|
-
|
|
54
|
-
// ----------------------------------------------------------------------------
|
|
55
|
-
// [ NUXT ]
|
|
56
|
-
import { computed } from "#imports";
|
|
57
|
-
// [ utils ]
|
|
58
|
-
import { type ClassType, ClassTypeToString } from "../../utils/class-style";
|
|
59
|
-
import { GetGolorCode } from "../../utils/theme";
|
|
60
|
-
|
|
61
|
-
// ----------------------------------------------------------------------------
|
|
62
|
-
|
|
63
|
-
interface Props {
|
|
64
|
-
class?: ClassType;
|
|
65
|
-
classBg?: ClassType;
|
|
66
|
-
classInner?: ClassType;
|
|
67
|
-
theme?: Theme;
|
|
68
|
-
}
|
|
69
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
70
|
-
class: "",
|
|
71
|
-
classBg: "",
|
|
72
|
-
classInner: "",
|
|
73
|
-
theme: "info",
|
|
74
|
-
});
|
|
75
|
-
// ----------------------------------------------------------------------------
|
|
76
|
-
|
|
77
|
-
const styleMain = computed(() => {
|
|
78
|
-
return [
|
|
79
|
-
//
|
|
80
|
-
`--main-color:${GetGolorCode(props.theme)};`,
|
|
81
|
-
];
|
|
82
|
-
});
|
|
83
|
-
const classTv = computed(() => {
|
|
84
|
-
return alertTv({});
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
const classTvBase = computed(() => {
|
|
88
|
-
return classTv.value.base({
|
|
89
|
-
class: ClassTypeToString(props.class),
|
|
90
|
-
});
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
const classTvBg = computed(() => {
|
|
94
|
-
return classTv.value.bg({
|
|
95
|
-
class: ClassTypeToString(props.classBg),
|
|
96
|
-
});
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
const classTvInner = computed(() => {
|
|
100
|
-
return classTv.value.inner({
|
|
101
|
-
class: ClassTypeToString(props.classInner),
|
|
102
|
-
});
|
|
103
|
-
});
|
|
104
|
-
</script>
|
|
105
|
-
|
|
106
|
-
<template>
|
|
107
|
-
<div :class="classTvBase" :style="styleMain">
|
|
108
|
-
<div :class="classTvBg"></div>
|
|
109
|
-
<div :class="classTvInner">
|
|
110
|
-
<slot />
|
|
111
|
-
</div>
|
|
112
|
-
</div>
|
|
113
|
-
</template>
|
|
1
|
+
<script setup>
|
|
2
|
+
import { twMerge } from "tailwind-merge";
|
|
3
|
+
import { computed } from "#imports";
|
|
4
|
+
import { ClassTypeToString } from "../../utils/class-style";
|
|
5
|
+
import { GetColorCode, MakeAlertColors } from "../../utils/theme";
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
class: { type: [String, Object, Array], required: false, default: "" },
|
|
8
|
+
theme: { type: null, required: false, default: "info" },
|
|
9
|
+
bgDelta: { type: Number, required: false, default: 0.5 },
|
|
10
|
+
inkDelta: { type: Number, required: false, default: 0.3 },
|
|
11
|
+
borderDelta: { type: Number, required: false, default: 0.3 },
|
|
12
|
+
over: { type: String, required: false, default: "#ffffff" }
|
|
13
|
+
});
|
|
14
|
+
const baseColorCode = computed(() => {
|
|
15
|
+
return GetColorCode(props.theme);
|
|
16
|
+
});
|
|
17
|
+
const color = computed(() => {
|
|
18
|
+
return MakeAlertColors(baseColorCode.value, {
|
|
19
|
+
tone: "ink",
|
|
20
|
+
bgDelta: props.bgDelta,
|
|
21
|
+
inkDelta: props.inkDelta,
|
|
22
|
+
borderDelta: props.borderDelta
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
const styleMain = computed(() => {
|
|
26
|
+
return [
|
|
27
|
+
//
|
|
28
|
+
// `--main-color:${GetColorCode(props.theme)};`,
|
|
29
|
+
`--color-bg:${color.value.bg};`,
|
|
30
|
+
`--color-text:${color.value.text};`,
|
|
31
|
+
`--color-border:${color.value.border};`
|
|
32
|
+
];
|
|
33
|
+
});
|
|
34
|
+
const classStyle = computed(() => {
|
|
35
|
+
return twMerge(
|
|
36
|
+
`relative block`,
|
|
37
|
+
`p-2`,
|
|
38
|
+
"border border-[var(--color-border)] text-[var(--color-text)] bg-[var(--color-bg)]",
|
|
39
|
+
"rounded overflow-hidden",
|
|
40
|
+
ClassTypeToString(props.class)
|
|
41
|
+
);
|
|
42
|
+
});
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<div :class="classStyle" :style="styleMain">
|
|
47
|
+
<slot />
|
|
48
|
+
</div>
|
|
49
|
+
</template>
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type ClassType } from '../../utils/class-style.js';
|
|
2
|
+
import { type ThemeColor } from '../../utils/theme.js';
|
|
3
|
+
interface Props {
|
|
4
|
+
class?: ClassType;
|
|
5
|
+
theme?: ThemeColor;
|
|
6
|
+
bgDelta?: number;
|
|
7
|
+
inkDelta?: number;
|
|
8
|
+
borderDelta?: number;
|
|
9
|
+
over?: string;
|
|
10
|
+
}
|
|
11
|
+
declare var __VLS_1: {};
|
|
12
|
+
type __VLS_Slots = {} & {
|
|
13
|
+
default?: (props: typeof __VLS_1) => any;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
16
|
+
bgDelta: number;
|
|
17
|
+
inkDelta: number;
|
|
18
|
+
borderDelta: number;
|
|
19
|
+
over: string;
|
|
20
|
+
theme: ThemeColor;
|
|
21
|
+
class: ClassType;
|
|
22
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
24
|
+
declare const _default: typeof __VLS_export;
|
|
25
|
+
export default _default;
|
|
26
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
27
|
+
new (): {
|
|
28
|
+
$slots: S;
|
|
29
|
+
};
|
|
30
|
+
};
|
|
@@ -1,84 +1,61 @@
|
|
|
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
|
-
const classStyle = computed(() => {
|
|
61
|
-
return twMerge(
|
|
62
|
-
baseClass,
|
|
63
|
-
variableStyle.value,
|
|
64
|
-
ClassTypeToString(props.class)
|
|
65
|
-
);
|
|
66
|
-
});
|
|
67
|
-
</script>
|
|
68
|
-
|
|
69
|
-
<template>
|
|
70
|
-
<div class="HsUiBlockLoading" :class="[classStyle]">
|
|
71
|
-
<div class="loading-container">
|
|
72
|
-
<div class="loading-item">
|
|
73
|
-
<div class="loading-ball" />
|
|
74
|
-
<div class="loading-ball" />
|
|
75
|
-
<div class="loading-ball" />
|
|
76
|
-
</div>
|
|
77
|
-
<div class="loading-text">{{ props.message }}<slot /></div>
|
|
78
|
-
</div>
|
|
79
|
-
</div>
|
|
80
|
-
</template>
|
|
81
|
-
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } 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
|
+
show: { type: Boolean, required: true },
|
|
8
|
+
message: { type: String, required: false, default: "Loading" }
|
|
9
|
+
});
|
|
10
|
+
const variableStyle = computed(() => {
|
|
11
|
+
if (props.show) {
|
|
12
|
+
return [
|
|
13
|
+
//
|
|
14
|
+
"pointer-events-auto",
|
|
15
|
+
"opacity-100"
|
|
16
|
+
];
|
|
17
|
+
}
|
|
18
|
+
return [
|
|
19
|
+
//
|
|
20
|
+
"pointer-events-none",
|
|
21
|
+
"opacity-0"
|
|
22
|
+
];
|
|
23
|
+
});
|
|
24
|
+
const classStyle = computed(() => {
|
|
25
|
+
return twMerge(
|
|
26
|
+
"z-100",
|
|
27
|
+
"px-2",
|
|
28
|
+
"pt-2",
|
|
29
|
+
"pb-1",
|
|
30
|
+
"absolute",
|
|
31
|
+
"inset-0",
|
|
32
|
+
"h-full",
|
|
33
|
+
"w-full",
|
|
34
|
+
"overflow-hidden",
|
|
35
|
+
"bg-[#13175C]/[0.5]",
|
|
36
|
+
"flex",
|
|
37
|
+
"items-center",
|
|
38
|
+
"justify-center",
|
|
39
|
+
"transition-opacity",
|
|
40
|
+
variableStyle.value,
|
|
41
|
+
ClassTypeToString(props.class)
|
|
42
|
+
);
|
|
43
|
+
});
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<template>
|
|
47
|
+
<div class="HsUiBlockLoading" :class="[classStyle]">
|
|
48
|
+
<div class="loading-container relative">
|
|
49
|
+
<div class="loading-item ">
|
|
50
|
+
<div class="loading-ball relative" />
|
|
51
|
+
<div class="loading-ball relative" />
|
|
52
|
+
<div class="loading-ball relative" />
|
|
53
|
+
</div>
|
|
54
|
+
<div class="loading-text">{{ props.message }}<slot /></div>
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
</template>
|
|
58
|
+
|
|
82
59
|
<style scoped>
|
|
83
60
|
.loading-container {
|
|
84
61
|
width: 50%;
|
|
@@ -157,41 +134,36 @@ const classStyle = computed(() => {
|
|
|
157
134
|
-ms-user-select: none;
|
|
158
135
|
user-select: none;
|
|
159
136
|
}
|
|
160
|
-
</style>
|
|
161
|
-
|
|
162
|
-
<style
|
|
163
|
-
@keyframes HsUiBlockLoading-anime1 {
|
|
164
|
-
0% {
|
|
165
|
-
top: calc(100% - 4px);
|
|
166
|
-
height: 5px;
|
|
167
|
-
border-radius: 50% 50% 25% 25%;
|
|
168
|
-
transform: scaleX(1.4);
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
transform: scaleX(1
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
transform: scaleX(
|
|
189
|
-
opacity: 0.
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
transform: scaleX(0.2);
|
|
194
|
-
opacity: 0.4;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
</style>
|
|
137
|
+
</style>
|
|
138
|
+
|
|
139
|
+
<style>
|
|
140
|
+
@keyframes HsUiBlockLoading-anime1 {
|
|
141
|
+
0% {
|
|
142
|
+
top: calc(100% - 4px);
|
|
143
|
+
height: 5px;
|
|
144
|
+
border-radius: 50% 50% 25% 25%;
|
|
145
|
+
transform: scaleX(1.4);
|
|
146
|
+
}
|
|
147
|
+
40% {
|
|
148
|
+
height: 16px;
|
|
149
|
+
border-radius: 50%;
|
|
150
|
+
transform: scaleX(1);
|
|
151
|
+
}
|
|
152
|
+
100% {
|
|
153
|
+
top: 0%;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
@keyframes HsUiBlockLoading-anime2 {
|
|
157
|
+
0% {
|
|
158
|
+
transform: scaleX(1.5);
|
|
159
|
+
}
|
|
160
|
+
40% {
|
|
161
|
+
transform: scaleX(1);
|
|
162
|
+
opacity: 0.7;
|
|
163
|
+
}
|
|
164
|
+
100% {
|
|
165
|
+
transform: scaleX(0.2);
|
|
166
|
+
opacity: 0.4;
|
|
167
|
+
}
|
|
168
|
+
}
|
|
169
|
+
</style>
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type ClassType } from '../../utils/class-style.js';
|
|
2
|
+
type Props = {
|
|
3
|
+
class?: ClassType;
|
|
4
|
+
show: boolean;
|
|
5
|
+
message?: string;
|
|
6
|
+
};
|
|
7
|
+
declare var __VLS_1: {};
|
|
8
|
+
type __VLS_Slots = {} & {
|
|
9
|
+
default?: (props: typeof __VLS_1) => any;
|
|
10
|
+
};
|
|
11
|
+
declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
|
|
12
|
+
message: string;
|
|
13
|
+
class: ClassType;
|
|
14
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
15
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
16
|
+
declare const _default: typeof __VLS_export;
|
|
17
|
+
export default _default;
|
|
18
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
19
|
+
new (): {
|
|
20
|
+
$slots: S;
|
|
21
|
+
};
|
|
22
|
+
};
|