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 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
@@ -4,7 +4,7 @@
4
4
  "compatibility": {
5
5
  "nuxt": ">=3.15.0"
6
6
  },
7
- "version": "2.2.0",
7
+ "version": "2.3.1",
8
8
  "builder": {
9
9
  "@nuxt/module-builder": "0.8.4",
10
10
  "unbuild": "2.0.0"
@@ -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
  // ----------------------------------------------------------------------------
@@ -21,7 +21,6 @@ type Props = {
21
21
  };
22
22
  const props = withDefaults(defineProps<Props>(), {
23
23
  class: "",
24
- show: false,
25
24
  message: "Loading",
26
25
  });
27
26
  const baseClass = [
@@ -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="btnStyle"
267
- variant="flat"
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="btnStyle"
280
- variant="flat"
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)"
@@ -29,7 +29,6 @@ interface Props {
29
29
  const props = withDefaults(defineProps<Props>(), {
30
30
  class: "",
31
31
  classInner: "",
32
- show: false,
33
32
  mounted: true,
34
33
  zIndex: undefined,
35
34
  closeable: false,
@@ -22,7 +22,6 @@ type Props = {
22
22
  };
23
23
  const props = withDefaults(defineProps<Props>(), {
24
24
  class: "",
25
- open: true,
26
25
  span: 300,
27
26
  });
28
27
 
@@ -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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nuxt-hs-ui",
3
- "version": "2.2.0",
3
+ "version": "2.3.1",
4
4
  "description": "My new Nuxt module",
5
5
  "repository": "https://github.com/hare-systems-ryo/nuxt-hs-ui",
6
6
  "license": "MIT",