nuxt-hs-ui 2.2.0 → 2.3.1
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 +33 -33
- package/dist/module.json +1 -1
- package/dist/runtime/components/form/check-box.vue +0 -2
- package/dist/runtime/components/interactive/block-loading.vue +0 -1
- package/dist/runtime/components/interactive/dialog.vue +16 -6
- package/dist/runtime/components/interactive/modal.vue +0 -1
- package/dist/runtime/components/layout/accordion.vue +0 -1
- package/dist/runtime/composables/use-hs-scroll-lock.js +4 -1
- package/dist/runtime/types/dialog.d.ts +2 -0
- package/dist/runtime/types/dialog.js +4 -2
- package/dist/runtime/utils/object.d.ts +4 -0
- package/dist/runtime/utils/object.js +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
# nuxt-hs-ui
|
|
2
|
-
|
|
3
|
-
.......
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
## Installation
|
|
7
|
-
|
|
8
|
-
```sh
|
|
9
|
-
npm i nuxt-hs-ui
|
|
10
|
-
```
|
|
11
|
-
|
|
12
|
-
### Nuxt
|
|
13
|
-
|
|
14
|
-
```ts
|
|
15
|
-
import twConfig from "./tailwind.config";
|
|
16
|
-
export default defineNuxtConfig({
|
|
17
|
-
modules: [
|
|
18
|
-
//
|
|
19
|
-
[
|
|
20
|
-
"nuxt-hs-ui",
|
|
21
|
-
{
|
|
22
|
-
tailwind: twConfig,
|
|
23
|
-
prefix: {
|
|
24
|
-
nuxtUi: "",
|
|
25
|
-
form: "",
|
|
26
|
-
interactive: "",
|
|
27
|
-
layout: "",
|
|
28
|
-
},
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
],
|
|
32
|
-
});
|
|
33
|
-
```
|
|
1
|
+
# nuxt-hs-ui
|
|
2
|
+
|
|
3
|
+
.......
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
npm i nuxt-hs-ui
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
### Nuxt
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import twConfig from "./tailwind.config";
|
|
16
|
+
export default defineNuxtConfig({
|
|
17
|
+
modules: [
|
|
18
|
+
//
|
|
19
|
+
[
|
|
20
|
+
"nuxt-hs-ui",
|
|
21
|
+
{
|
|
22
|
+
tailwind: twConfig,
|
|
23
|
+
prefix: {
|
|
24
|
+
nuxtUi: "",
|
|
25
|
+
form: "",
|
|
26
|
+
interactive: "",
|
|
27
|
+
layout: "",
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
],
|
|
31
|
+
],
|
|
32
|
+
});
|
|
33
|
+
```
|
package/dist/module.json
CHANGED
|
@@ -64,8 +64,6 @@ const props = withDefaults(defineProps<Props>(), {
|
|
|
64
64
|
classImgTag: "",
|
|
65
65
|
classLabel: "",
|
|
66
66
|
// ----------------------------------------------------------------------------
|
|
67
|
-
// data
|
|
68
|
-
data: false,
|
|
69
67
|
diff: undefined,
|
|
70
68
|
tabindex: undefined,
|
|
71
69
|
// ----------------------------------------------------------------------------
|
|
@@ -260,11 +260,16 @@ const baseCardHeader = [
|
|
|
260
260
|
{{ tx(activeItem.data.message) }}
|
|
261
261
|
</div>
|
|
262
262
|
<div :class="btnBaseStyle">
|
|
263
|
-
<div>
|
|
263
|
+
<div class="flex-cc">
|
|
264
264
|
<Btn
|
|
265
265
|
v-if="activeItem.data.option.btnLeft.isShow"
|
|
266
|
-
:class="
|
|
267
|
-
|
|
266
|
+
:class="[
|
|
267
|
+
btnStyle,
|
|
268
|
+
activeItem.data.option.btnLeft.variant === 'outlined'
|
|
269
|
+
? 'bg-white'
|
|
270
|
+
: '',
|
|
271
|
+
]"
|
|
272
|
+
:variant="activeItem.data.option.btnLeft.variant"
|
|
268
273
|
:theme="activeItem.data.option.btnLeft.theme"
|
|
269
274
|
@click="clickLeft()"
|
|
270
275
|
@ref="(e:any) => (leftBtnElm = e)"
|
|
@@ -273,11 +278,16 @@ const baseCardHeader = [
|
|
|
273
278
|
{{ tx(activeItem.data.option.btnLeft.title) }}
|
|
274
279
|
</Btn>
|
|
275
280
|
</div>
|
|
276
|
-
<div>
|
|
281
|
+
<div class="flex-cc">
|
|
277
282
|
<Btn
|
|
278
283
|
v-if="activeItem.data.option.btnRight.isShow"
|
|
279
|
-
:class="
|
|
280
|
-
|
|
284
|
+
:class="[
|
|
285
|
+
btnStyle,
|
|
286
|
+
activeItem.data.option.btnRight.variant === 'outlined'
|
|
287
|
+
? 'bg-white'
|
|
288
|
+
: '',
|
|
289
|
+
]"
|
|
290
|
+
:variant="activeItem.data.option.btnRight.variant"
|
|
281
291
|
:theme="activeItem.data.option.btnRight.theme"
|
|
282
292
|
@click="clickRight()"
|
|
283
293
|
@ref="(e:any) => (rightBtnElm = e)"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { defineStore } from "pinia";
|
|
2
2
|
import { GenerateUniqeKey } from "../utils/com.js";
|
|
3
3
|
import { disableBodyScroll, enableBodyScroll } from "body-scroll-lock";
|
|
4
|
-
import { ref } from "vue";
|
|
4
|
+
import { ref, onUnmounted } from "vue";
|
|
5
5
|
export const useHsScrollLockPinia = defineStore("HsScrollLockPinia", () => {
|
|
6
6
|
const active = ref(false);
|
|
7
7
|
const key = ref("");
|
|
@@ -13,6 +13,9 @@ export const useHsScrollLock = () => {
|
|
|
13
13
|
const elm = ref(null);
|
|
14
14
|
const key = GenerateUniqeKey();
|
|
15
15
|
const hsScrollLockPinia = useHsScrollLockPinia();
|
|
16
|
+
onUnmounted(() => {
|
|
17
|
+
unlock();
|
|
18
|
+
});
|
|
16
19
|
const checkSafariMobile = () => {
|
|
17
20
|
if (typeof navigator === "undefined") return false;
|
|
18
21
|
const ua = navigator.userAgent || "";
|
|
@@ -18,11 +18,13 @@ export interface DialogOption {
|
|
|
18
18
|
isShow: boolean;
|
|
19
19
|
title: MultiLang;
|
|
20
20
|
theme: Theme;
|
|
21
|
+
variant: "flat" | "text" | "outlined";
|
|
21
22
|
};
|
|
22
23
|
btnRight: {
|
|
23
24
|
isShow: boolean;
|
|
24
25
|
title: MultiLang;
|
|
25
26
|
theme: Theme;
|
|
27
|
+
variant: "flat" | "text" | "outlined";
|
|
26
28
|
};
|
|
27
29
|
btnCancel: {
|
|
28
30
|
isShow: boolean;
|
|
@@ -12,12 +12,14 @@ export const InitDialogOption = () => {
|
|
|
12
12
|
btnLeft: {
|
|
13
13
|
isShow: true,
|
|
14
14
|
title: "no",
|
|
15
|
-
theme: "dark"
|
|
15
|
+
theme: "dark",
|
|
16
|
+
variant: "flat"
|
|
16
17
|
},
|
|
17
18
|
btnRight: {
|
|
18
19
|
isShow: true,
|
|
19
20
|
title: "Yes",
|
|
20
|
-
theme: "accent1"
|
|
21
|
+
theme: "accent1",
|
|
22
|
+
variant: "flat"
|
|
21
23
|
},
|
|
22
24
|
btnCancel: {
|
|
23
25
|
isShow: true,
|
|
@@ -12,6 +12,10 @@ export declare const ObjectKeys: <T>(obj: T) => (keyof T)[];
|
|
|
12
12
|
* Object.values
|
|
13
13
|
*/
|
|
14
14
|
export declare const ObjectValues: <T>(obj: T) => T[keyof T][];
|
|
15
|
+
/**
|
|
16
|
+
* Object.entries
|
|
17
|
+
*/
|
|
18
|
+
export declare const ObjectEntries: <T>(obj: T) => [keyof T, T[keyof T]][];
|
|
15
19
|
/**
|
|
16
20
|
* オブジェクトのキーを再利用して
|
|
17
21
|
* Value値をinitDataにした新しいオブジェクトを生成します
|
|
@@ -11,6 +11,7 @@ export const ObjectKeys = (obj) => {
|
|
|
11
11
|
export const ObjectValues = (obj) => {
|
|
12
12
|
return Object.values(obj);
|
|
13
13
|
};
|
|
14
|
+
export const ObjectEntries = (obj) => Object.entries(obj);
|
|
14
15
|
export const ObjectKeyToMap = (obj, initData) => {
|
|
15
16
|
const valueType = typeOf(initData);
|
|
16
17
|
const ngObje = ["set", "map", "symbol"].includes(valueType);
|