nuxt-hs-ui 1.0.10 → 2.0.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 (112) hide show
  1. package/README.md +11 -4
  2. package/dist/module.d.mts +10 -2
  3. package/dist/module.d.ts +10 -2
  4. package/dist/module.json +5 -2
  5. package/dist/module.mjs +90 -51
  6. package/dist/runtime/assets/flatpickr-dark.css +1 -0
  7. package/dist/runtime/assets/flatpickr-month-select-style.css +1 -0
  8. package/dist/runtime/assets/tabulator-custom.css +1 -0
  9. package/dist/runtime/assets/tabulator.css +1 -0
  10. package/dist/runtime/assets/vue-select.css +1 -0
  11. package/dist/runtime/components/{hs-fc/btn/line-loading.vue → form/btn-line-loading.vue} +28 -42
  12. package/dist/runtime/components/form/btn.vue +488 -0
  13. package/dist/runtime/components/form/check-box.vue +352 -0
  14. package/dist/runtime/components/form/check-list.vue +354 -0
  15. package/dist/runtime/components/form/datepicker copy.vue +770 -0
  16. package/dist/runtime/components/form/datepicker.vue +897 -0
  17. package/dist/runtime/components/form/input-frame.vue +272 -0
  18. package/dist/runtime/components/form/radio.vue +685 -0
  19. package/dist/runtime/components/form/select-img-icon.vue +53 -0
  20. package/dist/runtime/components/form/select.vue +438 -0
  21. package/dist/runtime/components/form/text-box.vue +375 -0
  22. package/dist/runtime/components/form/textarea.vue +466 -0
  23. package/dist/runtime/components/form/value-box.vue +681 -0
  24. package/dist/runtime/components/interactive/alert.vue +113 -0
  25. package/dist/runtime/components/{hs-ui → interactive}/block-loading.vue +42 -59
  26. package/dist/runtime/components/{hs-ui/dialog/index.vue → interactive/dialog.vue} +132 -127
  27. package/dist/runtime/components/interactive/modal-bg.vue +82 -0
  28. package/dist/runtime/components/interactive/modal.vue +143 -0
  29. package/dist/runtime/components/{hs-ui/toast/index.vue → interactive/toast.vue} +76 -109
  30. package/dist/runtime/components/{hs-ui → interactive}/window-loader.vue +12 -9
  31. package/dist/runtime/components/{hs-ui → layout}/accordion.vue +21 -30
  32. package/dist/runtime/components/layout/aspect-box.vue +71 -0
  33. package/dist/runtime/components/layout/card-item.vue +193 -0
  34. package/dist/runtime/components/layout/card.vue +42 -0
  35. package/dist/runtime/components/layout/container.vue +40 -0
  36. package/dist/runtime/components/misc/breadcrumb.vue +96 -0
  37. package/dist/runtime/components/misc/tabulator.vue +187 -0
  38. package/dist/runtime/components/misc/view-name-display-target.vue +39 -0
  39. package/dist/runtime/components/misc/view-name-display.vue +90 -0
  40. package/dist/runtime/composables/use-hs-dialog.d.ts +40 -0
  41. package/dist/runtime/composables/{use-hs-ui-dialog.js → use-hs-dialog.js} +15 -10
  42. package/dist/runtime/composables/{use-hs-form-focus.d.ts → use-hs-focus.d.ts} +1 -1
  43. package/dist/runtime/composables/{use-hs-form-focus.js → use-hs-focus.js} +2 -4
  44. package/dist/runtime/composables/use-hs-misc.d.ts +22 -0
  45. package/dist/runtime/composables/use-hs-misc.js +62 -0
  46. package/dist/runtime/composables/use-hs-modal.d.ts +31 -0
  47. package/dist/runtime/{components/hs-ui/modal/use-ui-modal.js → composables/use-hs-modal.js} +18 -16
  48. package/dist/runtime/composables/use-hs-multi-lang.d.ts +14 -6
  49. package/dist/runtime/composables/use-hs-multi-lang.js +44 -11
  50. package/dist/runtime/composables/{use-hs-ui-toast.d.ts → use-hs-toast.d.ts} +3 -3
  51. package/dist/runtime/composables/{use-hs-ui-toast.js → use-hs-toast.js} +4 -5
  52. package/dist/runtime/composables/{use-hs-ui-window-loader.d.ts → use-hs-window-loader.d.ts} +1 -1
  53. package/dist/runtime/composables/{use-hs-ui-window-loader.js → use-hs-window-loader.js} +1 -2
  54. package/dist/runtime/plugin/v-select.d.ts +2 -0
  55. package/dist/runtime/plugin/v-select.js +5 -0
  56. package/dist/runtime/style.css +22 -1
  57. package/dist/runtime/tailwind.css +78 -0
  58. package/dist/runtime/types/app.config.d.ts +5 -0
  59. package/dist/runtime/{components/hs-ui/dialog/index.type.d.ts → types/dialog.d.ts} +3 -3
  60. package/dist/runtime/{components/hs-ui/toast/index.type.d.ts → types/toast.d.ts} +1 -2
  61. package/dist/runtime/{components/hs-ui/toast/index.type.js → types/toast.js} +0 -1
  62. package/dist/runtime/utils/class-style.d.ts +6 -0
  63. package/dist/runtime/utils/class-style.js +27 -0
  64. package/dist/runtime/utils/com.d.ts +6 -0
  65. package/dist/runtime/{lib → utils}/com.js +1 -4
  66. package/dist/runtime/utils/dayjs.d.ts +53 -0
  67. package/dist/runtime/utils/dayjs.js +124 -0
  68. package/dist/runtime/utils/float.d.ts +2 -0
  69. package/dist/runtime/utils/float.js +35 -0
  70. package/dist/runtime/utils/multi-lang-object.d.ts +17 -0
  71. package/dist/runtime/utils/multi-lang-object.js +34 -0
  72. package/dist/runtime/{lib → utils}/multi-lang.d.ts +1 -1
  73. package/dist/runtime/{lib → utils}/multi-lang.js +31 -27
  74. package/dist/runtime/{lib → utils}/number.d.ts +2 -4
  75. package/dist/runtime/{lib → utils}/number.js +29 -69
  76. package/dist/runtime/utils/object.d.ts +46 -0
  77. package/dist/runtime/utils/object.js +107 -0
  78. package/dist/runtime/utils/select-item.d.ts +31 -0
  79. package/dist/runtime/utils/select.d.ts +14 -0
  80. package/dist/runtime/utils/select.js +36 -0
  81. package/dist/runtime/utils/string.d.ts +39 -0
  82. package/dist/runtime/utils/string.js +125 -0
  83. package/dist/runtime/utils/tabulator.d.ts +108 -0
  84. package/dist/runtime/utils/tabulator.js +296 -0
  85. package/dist/runtime/utils/theme.d.ts +21 -0
  86. package/dist/runtime/utils/theme.js +31 -0
  87. package/dist/runtime/utils/tv.d.ts +101 -0
  88. package/dist/runtime/utils/tv.js +26 -0
  89. package/dist/runtime/utils/wareki.d.ts +3 -0
  90. package/dist/runtime/utils/wareki.js +106 -0
  91. package/dist/types.d.mts +1 -17
  92. package/dist/types.d.ts +1 -17
  93. package/package.json +99 -37
  94. package/dist/runtime/components/hs-fc/btn/index.vue +0 -510
  95. package/dist/runtime/components/hs-ui/aspect-box.vue +0 -83
  96. package/dist/runtime/components/hs-ui/card-item.vue +0 -141
  97. package/dist/runtime/components/hs-ui/card.vue +0 -54
  98. package/dist/runtime/components/hs-ui/container.vue +0 -50
  99. package/dist/runtime/components/hs-ui/modal/bg.vue +0 -94
  100. package/dist/runtime/components/hs-ui/modal/index.vue +0 -206
  101. package/dist/runtime/components/hs-ui/modal/use-ui-modal.d.ts +0 -20
  102. package/dist/runtime/components/v-test.vue +0 -60
  103. package/dist/runtime/composables/use-hs-ui-dialog.d.ts +0 -22
  104. package/dist/runtime/lib/class-style.d.ts +0 -8
  105. package/dist/runtime/lib/class-style.js +0 -59
  106. package/dist/runtime/lib/com.d.ts +0 -14
  107. package/dist/runtime/lib/prefix.d.ts +0 -2
  108. package/dist/runtime/lib/prefix.js +0 -17
  109. package/dist/runtime/lib/theme.d.ts +0 -2
  110. package/dist/runtime/lib/theme.js +0 -21
  111. /package/dist/runtime/{components/hs-ui/dialog/index.type.js → types/dialog.js} +0 -0
  112. /package/dist/runtime/{components/hs-fc/hoge → utils/select-item.js} +0 -0
@@ -0,0 +1,90 @@
1
+ <script setup lang="ts">
2
+ /* ----------------------------------------------------------------------------
3
+ // src\runtime\components\misc\view-name-display.vue
4
+ // ----------------------------------------------------------------------------
5
+ // ViewNameDisplay
6
+ // ViewNameDisplayViewNameDisplay
7
+ ----------------------------------------------------------------------------- */
8
+
9
+ // [ NUXT ]
10
+ import { ref, watch, onMounted, type Ref } from "#imports";
11
+ // [ vueuse ]
12
+ import { useElementVisibility } from "@vueuse/core";
13
+ // ----------------------------------------------------------------------------
14
+ // [ utils ]
15
+ import type { MultiLang } from "../../utils/multi-lang";
16
+ // [ composables ]
17
+ import { useHsMultiLang } from "../../composables/use-hs-multi-lang";
18
+ // ----------------------------------------------------------------------------
19
+ // [ Props ]
20
+ interface Props {
21
+ // isShow: boolean;
22
+ componentName: MultiLang;
23
+ headerElm: HTMLElement | null;
24
+ }
25
+ const props = defineProps<Props>();
26
+ // ----------------------------------------------------------------------------
27
+ // [ MultiLang ]
28
+ const hsMultiLang = useHsMultiLang();
29
+ const tx = hsMultiLang.tx;
30
+ // ----------------------------------------------------------------------------
31
+ let targetIsVisible: false | Ref<boolean> = false;
32
+ watch(
33
+ () => props.headerElm,
34
+ () => {
35
+ targetIsVisible = useElementVisibility(props.headerElm);
36
+ }
37
+ );
38
+
39
+ const isMounted = ref(false);
40
+ onMounted(() => {
41
+ setTimeout(() => {
42
+ isMounted.value = true;
43
+ }, 1000);
44
+ });
45
+
46
+ const scroll = () => {
47
+ if (props.headerElm === null) return;
48
+ props.headerElm.scrollIntoView({ behavior: "smooth" });
49
+ };
50
+ </script>
51
+
52
+ <template>
53
+ <div
54
+ class="view-name-display flex-cc"
55
+ :class="{ isShow: !targetIsVisible && isMounted }"
56
+ >
57
+ <div class="view-name elevation-4" @click.stop="scroll()">
58
+ {{ tx(props.componentName).value }}
59
+ </div>
60
+ </div>
61
+ </template>
62
+
63
+ <style scoped>
64
+ .view-name-display {
65
+ position: fixed;
66
+ top: 20px;
67
+ left: 0;
68
+ right: 0;
69
+ z-index: 1;
70
+ opacity: 0;
71
+ transition: opacity 300ms;
72
+ pointer-events: none;
73
+ }
74
+ .view-name-display.isShow {
75
+ opacity: 1;
76
+ }
77
+ .view-name-display .view-name {
78
+ font-size: 0.8rem;
79
+ padding: 2px 10px;
80
+ background-color: white;
81
+ border: solid 2px #eb6600;
82
+ color: #eb6600;
83
+ border: solid 2px #1c03a2;
84
+ color: #1c03a2;
85
+ pointer-events: all;
86
+ }
87
+ .view-name-display .view-name {
88
+ font-size: 0.8rem;
89
+ }
90
+ </style>
@@ -0,0 +1,40 @@
1
+ import type { MultiLang } from "../utils/multi-lang.js";
2
+ import { DialogItem, DialogResult, type DialogOption } from "../types/dialog.js";
3
+ interface State {
4
+ state: {
5
+ id: number;
6
+ pendingList: {
7
+ ts: string;
8
+ data: DialogItem;
9
+ }[];
10
+ };
11
+ }
12
+ export declare const useHsDialog: import("pinia").StoreDefinition<"HsDialog", State, {
13
+ Themes: () => {
14
+ readonly main0: "main0";
15
+ readonly main1: "main1";
16
+ readonly main2: "main2";
17
+ readonly main3: "main3";
18
+ readonly accent1: "accent1";
19
+ readonly accent2: "accent2";
20
+ readonly info: "info";
21
+ readonly link: "link";
22
+ readonly download: "download";
23
+ readonly success: "success";
24
+ readonly warn: "warn";
25
+ readonly error: "error";
26
+ readonly white: "white";
27
+ readonly black: "black";
28
+ readonly dark: "dark";
29
+ readonly back: "back";
30
+ };
31
+ InitOption: () => () => DialogOption;
32
+ Result: () => {
33
+ readonly left: "left";
34
+ readonly right: "right";
35
+ readonly cancel: "cancel";
36
+ };
37
+ }, {
38
+ Show(message: MultiLang, title: MultiLang, option?: DialogOption): Promise<DialogResult>;
39
+ }>;
40
+ export {};
@@ -1,9 +1,13 @@
1
1
  import dayjs from "dayjs/esm/index";
2
2
  import { defineStore } from "pinia";
3
- import { GenerateUniqeKey } from "../lib/com.js";
4
- import { DialogItem, InitDialogOption, DialogResult } from "../components/hs-ui/dialog/index.type.js";
5
- export const useHsUiDialog = defineStore({
6
- id: "HsUiDialog",
3
+ import { GenerateUniqeKey } from "../utils/com.js";
4
+ import { Theme } from "../utils/theme.js";
5
+ import {
6
+ DialogItem,
7
+ InitDialogOption,
8
+ DialogResult
9
+ } from "../types/dialog.js";
10
+ export const useHsDialog = defineStore("HsDialog", {
7
11
  state: () => {
8
12
  return {
9
13
  state: {
@@ -13,9 +17,9 @@ export const useHsUiDialog = defineStore({
13
17
  };
14
18
  },
15
19
  getters: {
16
- // hoge: (state) => {
17
- // return '';
18
- // },
20
+ Themes: () => {
21
+ return Theme;
22
+ },
19
23
  InitOption: () => {
20
24
  return InitDialogOption;
21
25
  },
@@ -25,8 +29,7 @@ export const useHsUiDialog = defineStore({
25
29
  },
26
30
  actions: {
27
31
  async Show(message, title, option = InitDialogOption()) {
28
- if (import.meta.server)
29
- return DialogResult.cancel;
32
+ if (import.meta.server) return DialogResult.cancel;
30
33
  const item = new DialogItem(message, title, option);
31
34
  const pendingList = this.state.pendingList;
32
35
  const ts = GenerateUniqeKey() + dayjs().format("x");
@@ -35,7 +38,9 @@ export const useHsUiDialog = defineStore({
35
38
  data: item
36
39
  });
37
40
  const ret = await item.show();
38
- this.state.pendingList = this.state.pendingList.filter((row) => row.ts !== ts);
41
+ this.state.pendingList = this.state.pendingList.filter(
42
+ (row) => row.ts !== ts
43
+ );
39
44
  return ret;
40
45
  }
41
46
  // ---------------------------------------------------
@@ -4,7 +4,7 @@ interface State {
4
4
  id: string;
5
5
  };
6
6
  }
7
- export declare const useHsFormFocus: import("pinia").StoreDefinition<"HsFormFocus", State, {}, {
7
+ export declare const useHsFocus: import("pinia").StoreDefinition<"HsFocus", State, {}, {
8
8
  Init(): Promise<void>;
9
9
  }>;
10
10
  export {};
@@ -1,8 +1,7 @@
1
1
  import { watch } from "vue";
2
2
  import { defineStore } from "pinia";
3
3
  import { useRoute } from "#imports";
4
- export const useHsFormFocus = defineStore({
5
- id: "HsFormFocus",
4
+ export const useHsFocus = defineStore("HsFocus", {
6
5
  state: () => {
7
6
  return {
8
7
  state: {
@@ -14,8 +13,7 @@ export const useHsFormFocus = defineStore({
14
13
  actions: {
15
14
  async Init() {
16
15
  const state = this.state;
17
- if (state.isInit)
18
- return;
16
+ if (state.isInit) return;
19
17
  const route = useRoute();
20
18
  watch(
21
19
  () => route.fullPath,
@@ -0,0 +1,22 @@
1
+ interface StoreState {
2
+ state: {
3
+ isInit: boolean;
4
+ isReady: boolean;
5
+ isMobile: boolean;
6
+ isBracke: boolean;
7
+ spBracke: number;
8
+ readyDeray: number;
9
+ window: {
10
+ h: number;
11
+ w: number;
12
+ };
13
+ scrollbarWidth: number;
14
+ };
15
+ }
16
+ export declare const useHsMisc: import("pinia").StoreDefinition<"HsMisc", StoreState, {}, {
17
+ Init(arg?: {
18
+ spBracke?: number;
19
+ readyDeray?: number;
20
+ }): Promise<void>;
21
+ }>;
22
+ export {};
@@ -0,0 +1,62 @@
1
+ import { defineStore } from "pinia";
2
+ import { useEventListener, nextTick } from "#imports";
3
+ import { Sleep, IsMobile } from "../utils/com.js";
4
+ export const useHsMisc = defineStore("HsMisc", {
5
+ state: () => {
6
+ return {
7
+ state: {
8
+ isInit: false,
9
+ isReady: false,
10
+ isMobile: false,
11
+ isBracke: false,
12
+ spBracke: 768,
13
+ readyDeray: 10,
14
+ window: {
15
+ h: 0,
16
+ w: 0
17
+ },
18
+ scrollbarWidth: 0
19
+ }
20
+ };
21
+ },
22
+ // ----------------------------------------------------------------------------
23
+ actions: {
24
+ // ---------------------
25
+ async Init(arg) {
26
+ await Sleep(0);
27
+ const state = this.state;
28
+ if (state.isInit) return;
29
+ if (arg?.readyDeray) {
30
+ state.readyDeray = arg.readyDeray;
31
+ }
32
+ if (arg?.spBracke) {
33
+ state.spBracke = arg.spBracke;
34
+ }
35
+ state.isInit = true;
36
+ state.isMobile = IsMobile();
37
+ const initWindow = () => {
38
+ useEventListener(window, "resize", () => {
39
+ state.isBracke = window.innerWidth < state.spBracke;
40
+ state.window = {
41
+ h: window.innerHeight,
42
+ w: window.innerWidth
43
+ };
44
+ state.scrollbarWidth = window.innerWidth - document.body.clientWidth < 0 ? 0 : window.innerWidth - document.body.clientWidth;
45
+ });
46
+ state.isBracke = window.innerWidth < state.spBracke;
47
+ state.window = {
48
+ h: window.innerHeight,
49
+ w: window.innerWidth
50
+ };
51
+ setTimeout(() => {
52
+ state.scrollbarWidth = window.innerWidth - document.body.clientWidth < 0 ? 0 : window.innerWidth - document.body.clientWidth;
53
+ }, 1e3);
54
+ };
55
+ initWindow();
56
+ await Sleep(state.readyDeray);
57
+ state.isReady = true;
58
+ await nextTick();
59
+ }
60
+ // ---------------------
61
+ }
62
+ });
@@ -0,0 +1,31 @@
1
+ interface State {
2
+ state: {
3
+ init: boolean;
4
+ baseIndex: number;
5
+ activeList: {
6
+ id: string;
7
+ zIndex: number;
8
+ closeable: boolean;
9
+ }[];
10
+ };
11
+ }
12
+ export declare const useHsModal: import("pinia").StoreDefinition<"HsModal", State, {
13
+ activeId: (state: {
14
+ state: {
15
+ init: boolean;
16
+ baseIndex: number;
17
+ activeList: {
18
+ id: string;
19
+ zIndex: number;
20
+ closeable: boolean;
21
+ }[];
22
+ };
23
+ } & import("pinia").PiniaCustomStateProperties<State>) => string | null;
24
+ }, {
25
+ watch(): void;
26
+ myzIndex(id: string): import("vue").ComputedRef<number>;
27
+ add(id: string, closeable?: boolean): number;
28
+ remove(id: string): void;
29
+ removeAll(): void;
30
+ }>;
31
+ export {};
@@ -1,14 +1,13 @@
1
- import { computed, watch } from "vue";
2
- import { useRoute } from "#imports";
3
1
  import { defineStore } from "pinia";
4
2
  import { clearAllBodyScrollLocks } from "body-scroll-lock";
5
- export const useStoreModal = defineStore({
6
- id: "HsUiStoreModal",
3
+ import { computed, watch, useRoute } from "#imports";
4
+ import { useHsToast } from "../composables/use-hs-toast.js";
5
+ export const useHsModal = defineStore("HsModal", {
7
6
  state: () => {
8
7
  return {
9
8
  state: {
10
9
  init: false,
11
- baseIndex: 5e3,
10
+ baseIndex: 500,
12
11
  activeList: []
13
12
  }
14
13
  };
@@ -16,22 +15,18 @@ export const useStoreModal = defineStore({
16
15
  getters: {
17
16
  activeId: (state) => {
18
17
  const activeList = state.state.activeList;
19
- if (activeList.length === 0)
20
- return null;
18
+ if (activeList.length === 0) return null;
21
19
  const zIndex = Math.max(...activeList.map((row) => row.zIndex));
22
20
  const data = activeList.find((row) => row.zIndex === zIndex);
23
- if (!data)
24
- return null;
21
+ if (!data) return null;
25
22
  return data.id;
26
23
  }
27
24
  },
28
25
  actions: {
29
26
  watch() {
30
27
  const state = this.state;
31
- if (import.meta.server)
32
- return;
33
- if (state.init)
34
- return;
28
+ if (import.meta.server) return;
29
+ if (state.init) return;
35
30
  state.init = true;
36
31
  const route = useRoute();
37
32
  watch(
@@ -51,16 +46,23 @@ export const useStoreModal = defineStore({
51
46
  return target.zIndex;
52
47
  });
53
48
  },
54
- add(id) {
49
+ add(id, closeable = false) {
55
50
  const zIndex = this.state.activeList.length === 0 ? this.state.baseIndex : Math.max(...this.state.activeList.map((row) => row.zIndex)) + 2;
56
51
  this.state.activeList.push({
57
52
  id,
58
- zIndex
53
+ zIndex,
54
+ closeable
55
+ });
56
+ const toast = useHsToast();
57
+ toast.state.pendingList.forEach((row) => {
58
+ row.isShow = false;
59
59
  });
60
60
  return zIndex;
61
61
  },
62
62
  remove(id) {
63
- this.state.activeList = this.state.activeList.filter((row) => row.id !== id);
63
+ this.state.activeList = this.state.activeList.filter(
64
+ (row) => row.id !== id
65
+ );
64
66
  if (this.state.activeList.length === 0) {
65
67
  clearAllBodyScrollLocks();
66
68
  }
@@ -1,9 +1,17 @@
1
- import { type MultiLang } from '../lib/multi-lang.js';
2
- export interface StoreState {
3
- lang: string;
4
- fallback: string;
1
+ import type { MultiLang } from "../utils/multi-lang.js";
2
+ interface StoreState {
3
+ state: {
4
+ lang: string;
5
+ fallBack: string;
6
+ dateFormat: string;
7
+ isInit: boolean;
8
+ };
5
9
  }
6
10
  export declare const useHsMultiLang: import("pinia").StoreDefinition<"HsMultiLang", StoreState, {}, {
7
- MultiLangText(text: MultiLang): string;
8
- GetTextByMultiLang: (text: MultiLang, lang: string | undefined, fallback?: string | undefined) => string;
11
+ init(arg: {
12
+ lang?: string;
13
+ setDayjsLang?: (lang: string) => void;
14
+ }): void;
15
+ tx(text: MultiLang, lang?: undefined): import("vue").ComputedRef<string>;
9
16
  }>;
17
+ export {};
@@ -1,21 +1,54 @@
1
- import { computed } from "vue";
1
+ import dayjs from "dayjs";
2
+ import ja from "dayjs/locale/ja.js";
3
+ import en from "dayjs/locale/en.js";
2
4
  import { defineStore } from "pinia";
3
- import { GetTextByMultiLang } from "../lib/multi-lang.js";
4
- export const useHsMultiLang = defineStore({
5
- id: "HsMultiLang",
5
+ import { computed, watch } from "#imports";
6
+ import { GetTextByMultiLang } from "../utils/multi-lang.js";
7
+ export const useHsMultiLang = defineStore("HsMultiLang", {
6
8
  state: () => {
7
9
  return {
8
- lang: "ja",
9
- fallback: "ja"
10
+ state: {
11
+ lang: "ja",
12
+ fallBack: "ja",
13
+ dateFormat: "YYYY-MM-DD",
14
+ isInit: false
15
+ }
10
16
  };
11
17
  },
12
18
  // ----------------------------------------------------------------------------
13
19
  actions: {
14
- MultiLangText(text) {
15
- return computed(() => {
16
- return GetTextByMultiLang(text, this.lang, this.fallback);
17
- }).value;
20
+ init(arg) {
21
+ const state = this.state;
22
+ if (state.isInit) return;
23
+ const setDayjsLang = arg.setDayjsLang !== void 0 ? arg.setDayjsLang : (lang) => {
24
+ if (lang === "ja") {
25
+ dayjs.locale(ja);
26
+ } else {
27
+ dayjs.locale(en);
28
+ }
29
+ };
30
+ watch(
31
+ () => this.state.lang,
32
+ (lang) => {
33
+ if (arg.setDayjsLang) {
34
+ arg.setDayjsLang(lang);
35
+ } else {
36
+ setDayjsLang(lang);
37
+ }
38
+ },
39
+ { immediate: true }
40
+ );
18
41
  },
19
- GetTextByMultiLang
42
+ // ---------------------
43
+ tx(text, lang = void 0) {
44
+ const state = this.state;
45
+ return computed(() => {
46
+ if (lang) {
47
+ return GetTextByMultiLang(text, lang, state.fallBack);
48
+ }
49
+ return GetTextByMultiLang(text, state.lang, state.fallBack);
50
+ });
51
+ }
52
+ // ---------------------
20
53
  }
21
54
  });
@@ -1,5 +1,5 @@
1
- import { type MultiLang } from '../lib/multi-lang.js';
2
- import { type Message } from '../components/hs-ui/toast/index.type.js';
1
+ import type { MultiLang } from "../utils/multi-lang.js";
2
+ import { type Message } from "../types/toast.js";
3
3
  interface State {
4
4
  state: {
5
5
  id: number;
@@ -7,7 +7,7 @@ interface State {
7
7
  zindex: number;
8
8
  };
9
9
  }
10
- export declare const useHsUiToast: import("pinia").StoreDefinition<"HsUiToast", State, {}, {
10
+ export declare const useHsToast: import("pinia").StoreDefinition<"HsUiToast", State, {}, {
11
11
  s(message: MultiLang, title: MultiLang, hideAfter?: number): void;
12
12
  Success(message: MultiLang, title: MultiLang, hideAfter?: number): void;
13
13
  Info(message: MultiLang, title: MultiLang, hideAfter?: number): void;
@@ -1,8 +1,8 @@
1
1
  import { defineStore } from "pinia";
2
- import { GenerateUniqeKey } from "../lib/com.js";
3
- import { Theme } from "../components/hs-ui/toast/index.type.js";
2
+ import { GenerateUniqeKey } from "../utils/com.js";
3
+ import { Theme } from "../types/toast.js";
4
4
  const toastShow = (message, title, hideAfter, theme) => {
5
- const toast = useHsUiToast();
5
+ const toast = useHsToast();
6
6
  const newToast = {
7
7
  key: GenerateUniqeKey(),
8
8
  isShow: true,
@@ -14,8 +14,7 @@ const toastShow = (message, title, hideAfter, theme) => {
14
14
  };
15
15
  toast.state.pendingList.push(newToast);
16
16
  };
17
- export const useHsUiToast = defineStore({
18
- id: "HsUiToast",
17
+ export const useHsToast = defineStore("HsUiToast", {
19
18
  state: () => {
20
19
  return {
21
20
  state: {
@@ -4,7 +4,7 @@ interface State {
4
4
  zindex: number;
5
5
  };
6
6
  }
7
- export declare const useHsUiWindowLoader: import("pinia").StoreDefinition<"HsUiWindowLoader", State, {}, {
7
+ export declare const useHsWindowLoader: import("pinia").StoreDefinition<"HsWindowLoader", State, {}, {
8
8
  Show(): Promise<void>;
9
9
  Hide(): Promise<void>;
10
10
  }>;
@@ -1,6 +1,5 @@
1
1
  import { defineStore } from "pinia";
2
- export const useHsUiWindowLoader = defineStore({
3
- id: "HsUiWindowLoader",
2
+ export const useHsWindowLoader = defineStore("HsWindowLoader", {
4
3
  state: () => {
5
4
  return {
6
5
  state: {
@@ -0,0 +1,2 @@
1
+ declare const _default: import("#app").Plugin<Record<string, unknown>> & import("#app").ObjectPlugin<Record<string, unknown>>;
2
+ export default _default;
@@ -0,0 +1,5 @@
1
+ import { defineNuxtPlugin } from "#imports";
2
+ import vSelect from "vue-select";
3
+ export default defineNuxtPlugin((nuxtApp) => {
4
+ nuxtApp.vueApp.component("v-select", vSelect);
5
+ });
@@ -1 +1,22 @@
1
- @tailwind base;@tailwind components;@tailwind utilities;*{position:relative}
1
+ @import url(//use.fontawesome.com/releases/v6.4.0/css/all.css);
2
+ *:focus {
3
+ outline: none !important;
4
+ }
5
+
6
+ :root {
7
+ color-scheme: light !important;
8
+ }
9
+
10
+ * {
11
+ position: relative;
12
+ }
13
+
14
+ .flatpickr-monthSelect-theme-dark {
15
+ background: #3f4458;
16
+ }
17
+
18
+ .flatpickr-day.flatpickr-disabled {
19
+ background-color: rgba(255, 34, 34, 0.164) !important;
20
+ color: rgb(255, 255, 255) !important;
21
+ border: solid 1px rgb(187, 153, 153) !important;
22
+ }
@@ -0,0 +1,78 @@
1
+ @tailwind base;
2
+ @tailwind components;
3
+ @tailwind utilities;
4
+ @layer utilities {
5
+ .flex-cc {
6
+ display: flex;
7
+ justify-content: center;
8
+ align-items: center;
9
+ }
10
+ .flex-c {
11
+ display: flex;
12
+ align-items: center;
13
+ }
14
+ .row {
15
+ display: flex;
16
+ margin-left: -6px;
17
+ margin-right: -6px;
18
+ flex-wrap: wrap;
19
+ }
20
+ .col-1,
21
+ .col-2,
22
+ .col-3,
23
+ .col-4,
24
+ .col-5,
25
+ .col-6,
26
+ .col-7,
27
+ .col-8,
28
+ .col-9,
29
+ .col-10,
30
+ .col-11,
31
+ .col-12 {
32
+ padding-left: 6px;
33
+ padding-right: 6px;
34
+ flex: none;
35
+ }
36
+ .col-a {
37
+ width: auto;
38
+ padding-left: 6px;
39
+ padding-right: 6px;
40
+ flex: 1 1 auto;
41
+ }
42
+ .col-1 {
43
+ width: 8.3333333333%;
44
+ }
45
+ .col-2 {
46
+ width: 16.6666666667%;
47
+ }
48
+ .col-3 {
49
+ width: 25%;
50
+ }
51
+ .col-4 {
52
+ width: 33.3333333333%;
53
+ }
54
+ .col-5 {
55
+ width: 41.6666666667%;
56
+ }
57
+ .col-6 {
58
+ width: 50%;
59
+ }
60
+ .col-7 {
61
+ width: 58.3333333333%;
62
+ }
63
+ .col-8 {
64
+ width: 66.6666666667%;
65
+ }
66
+ .col-9 {
67
+ width: 75%;
68
+ }
69
+ .col-10 {
70
+ width: 83.3333333333%;
71
+ }
72
+ .col-11 {
73
+ width: 91.6666666667%;
74
+ }
75
+ .col-12 {
76
+ width: 100%;
77
+ }
78
+ }
@@ -0,0 +1,5 @@
1
+ declare module "#build/app.config" {
2
+ import type { AppConfig } from "@nuxt/schema";
3
+ const _default: AppConfig;
4
+ export default _default;
5
+ }