nuxt-hs-ui 1.0.10 → 2.0.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.
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 +87 -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,82 @@
1
+ <script setup lang="ts">
2
+ /* ----------------------------------------------------------------------------
3
+ // src\runtime\components\interactive\modal-bg.vue
4
+ // ----------------------------------------------------------------------------
5
+ // ModalBg
6
+ // ModalBgModalBg
7
+ ----------------------------------------------------------------------------- */
8
+
9
+ // [ tailwind ]
10
+ import { twMerge } from "tailwind-merge";
11
+ // [ NUXT ]
12
+ import { computed } from "#imports";
13
+ // [ utils ]
14
+ import { type ClassType, ClassTypeToString } from "../../utils/class-style";
15
+ // [ composables ]
16
+ import { useHsModal } from "../../composables/use-hs-modal";
17
+ // ----------------------------------------------------------------------------
18
+ // [ com > lib > * ]
19
+ // ----------------------------------------------------------------------------
20
+ type Props = {
21
+ class?: ClassType;
22
+ };
23
+ const props = withDefaults(defineProps<Props>(), {
24
+ class: "",
25
+ });
26
+
27
+ const hsModal = useHsModal();
28
+
29
+ const zIndex = computed(() => {
30
+ if (hsModal.state.activeList.length === 0) return -1;
31
+ return Math.max(...hsModal.state.activeList.map((row) => row.zIndex)) - 1;
32
+ });
33
+
34
+ const activeData = computed(() => {
35
+ const len = hsModal.state.activeList.length;
36
+ if (len === 0) return null;
37
+ return hsModal.state.activeList[len - 1];
38
+ });
39
+
40
+ const bg = computed(() => {
41
+ if (activeData.value === null) return "";
42
+ if (activeData.value.closeable) {
43
+ // 外枠で閉じれるモーダル
44
+ return "bg-slate-700/[0.6]";
45
+ }
46
+ return "bg-blue-800/[0.8]";
47
+ });
48
+
49
+ const isShow = computed(() => {
50
+ if (hsModal.state.activeList.length === 0) return false;
51
+ return true;
52
+ });
53
+
54
+ const classStyle = computed(() => {
55
+ return twMerge(
56
+ "transition-opacity",
57
+ "fixed",
58
+ "inset-0",
59
+ "transition-opacity",
60
+ bg.value,
61
+ // isShow.value ? 'pointer-events-auto' : 'pointer-events-none',
62
+ isShow.value ? "opacity-100" : "opacity-0",
63
+ ClassTypeToString(props.class)
64
+ );
65
+ });
66
+
67
+ const closeAll = () => {
68
+ hsModal.removeAll();
69
+ };
70
+ </script>
71
+
72
+ <template>
73
+ <Teleport to="body">
74
+ <!-- -->
75
+ <div
76
+ class="ModalBg"
77
+ :class="classStyle"
78
+ :style="{ zIndex: zIndex }"
79
+ @click.stop="closeAll()"
80
+ />
81
+ </Teleport>
82
+ </template>
@@ -0,0 +1,143 @@
1
+ <script setup lang="ts">
2
+ /* ----------------------------------------------------------------------------
3
+ // src\runtime\components\interactive\modal.vue
4
+ // ----------------------------------------------------------------------------
5
+ // Modal
6
+ // ModalModal
7
+ ----------------------------------------------------------------------------- */
8
+
9
+ // [ tailwind ]
10
+ import { twMerge } from "tailwind-merge";
11
+ // [ NUXT ]
12
+ import { useId, computed, watch, onUnmounted } from "#imports";
13
+ // [ utils ]
14
+ import { type ClassType, ClassTypeToString } from "../../utils/class-style";
15
+ // [ composables ]
16
+ import { useHsModal } from "../../composables/use-hs-modal";
17
+ // ----------------------------------------------------------------------------
18
+ // ----------------------------------------------------------------------------
19
+ interface Props {
20
+ class?: ClassType;
21
+ classInner?: ClassType;
22
+ show: boolean;
23
+ mounted?: boolean;
24
+ zIndex?: number | undefined;
25
+ /** 背景クリックで閉じれる場合に背景色を切り替える機能
26
+ * - closeイベントとセットで使う */
27
+ closeable?: boolean;
28
+ }
29
+ const props = withDefaults(defineProps<Props>(), {
30
+ class: "",
31
+ classInner: "",
32
+ show: false,
33
+ mounted: true,
34
+ zIndex: undefined,
35
+ focusLock: false,
36
+ closeable: false,
37
+ });
38
+
39
+ type Emits = {
40
+ close: [];
41
+ "update:show": [bool: boolean];
42
+ };
43
+ const emit = defineEmits<Emits>();
44
+
45
+ // ----------------------------------------------------------------------------
46
+ const hsModal = useHsModal();
47
+ hsModal.watch();
48
+ const id = useId();
49
+
50
+ // );
51
+
52
+ // ----------------------------------------------------------------------------
53
+ const zOrder = computed(() => {
54
+ if (props.zIndex !== undefined) return props.zIndex;
55
+ return hsModal.myzIndex(id).value;
56
+ });
57
+ if (props.show) {
58
+ hsModal.add(id, props.closeable);
59
+ }
60
+ watch(
61
+ () => props.show,
62
+ (v) => {
63
+ if (v) {
64
+ hsModal.add(id, props.closeable);
65
+ } else {
66
+ hsModal.remove(id);
67
+ }
68
+ }
69
+ );
70
+ onUnmounted(() => {
71
+ hsModal.remove(id);
72
+ });
73
+ const mounted = computed(() => {
74
+ if (props.show) return true;
75
+ if (props.mounted) return true;
76
+ return false;
77
+ });
78
+ // 背景色は[VUiModalBg]が担当します
79
+
80
+ const classStyle = computed(() => {
81
+ return twMerge(
82
+ [
83
+ //
84
+ "p-2",
85
+ "transition-opacity",
86
+ "fixed",
87
+ "inset-0",
88
+ "flex",
89
+ "justify-center",
90
+ props.show ? "pointer-events-all" : "pointer-events-none",
91
+ ],
92
+ ClassTypeToString(props.class)
93
+ );
94
+ });
95
+
96
+ const classInner = computed(() => {
97
+ return twMerge(
98
+ "w-full",
99
+ "h-full",
100
+ "p-0",
101
+ "flex",
102
+ "flex-col",
103
+ "items-center",
104
+ "overflow-auto",
105
+ "transition-opacity",
106
+ props.closeable ? "cursor-pointer" : "",
107
+ props.show ? "pointer-events-all" : "pointer-events-none",
108
+ ClassTypeToString(props.classInner)
109
+ );
110
+ });
111
+ const closeOnBackEvent = () => {
112
+ if (props.closeable) {
113
+ emit("update:show", false);
114
+ emit("close");
115
+ }
116
+ };
117
+ </script>
118
+
119
+ <template>
120
+ <ClientOnly>
121
+ <Teleport to="body">
122
+ <div
123
+ v-if="mounted"
124
+ :id="id"
125
+ class="Modal"
126
+ data-show=""
127
+ :class="classStyle"
128
+ :style="{ zIndex: zOrder, opacity: props.show ? 1 : 0 }"
129
+ >
130
+ <!-- :aria-hidden="!props.show" -->
131
+ <div :class="classInner" @click="closeOnBackEvent">
132
+ <slot />
133
+ </div>
134
+ </div>
135
+ </Teleport>
136
+ </ClientOnly>
137
+ </template>
138
+
139
+ <style>
140
+ .Modal > * > * {
141
+ cursor: default;
142
+ }
143
+ </style>
@@ -1,44 +1,35 @@
1
1
  <script setup lang="ts">
2
2
  /* ----------------------------------------------------------------------------
3
- src\runtime\components\hs-ui\toast\index.vue
3
+ // src\runtime\components\interactive\toast.vue
4
4
  // ----------------------------------------------------------------------------
5
- HsUiToast
6
- HsUiToastHsUiToast
5
+ // Toast
6
+ // ToastToast
7
7
  ----------------------------------------------------------------------------- */
8
8
 
9
9
  // [ vue ]
10
- import { computed, watch } from 'vue';
11
- // [ NUXT ]
12
- import { useRuntimeConfig } from '#imports';
10
+ import { computed, watch } from "vue";
13
11
  // [ vueuse ]
14
- import { watchArray } from '@vueuse/core';
12
+ import { watchArray } from "@vueuse/core";
15
13
  // ----------------------------------------------------------------------------
16
- // [ tailwind ]
17
- import { GetPrefix, RemovePrefix } from '../../../lib/prefix';
14
+ // [ types ]
15
+ import type { Message } from "../../types/toast";
16
+ // [ utils ]
17
+ import { Int } from "../../utils/number";
18
+ // [ composables ]
19
+ import { useHsToast } from "../../composables/use-hs-toast";
20
+ import { useHsMultiLang } from "../../composables/use-hs-multi-lang";
21
+ // [ Components ]
22
+ import Accordion from "../layout/accordion.vue";
23
+ import Card from "../layout/card.vue";
24
+ import CardItem from "../layout/card-item.vue";
25
+ import Btn from "../form/btn.vue";
18
26
  // ----------------------------------------------------------------------------
19
- // [ components > v-ui > toast > * ]
20
- import { type Message } from './index.type';
21
- // ----------------------------------------------------------------------------
22
- // [ src > runtime > lib > * ]
23
- import { Int } from '../../../lib/number';
24
- // [ store ]
25
- import { useHsUiToast } from '../../../composables/use-hs-ui-toast';
26
- import { useHsMultiLang } from '../../../composables/use-hs-multi-lang';
27
- // ----------------------------------------------------------------------------
28
- // ----------------------------------------------------------------------------
29
- const runtimeConfig: any = useRuntimeConfig();
30
- const prefix = GetPrefix(runtimeConfig);
31
-
32
- // const twMerge = extendTailwindMerge({
33
- // prefix: prefix,
34
- // });
35
-
36
27
  // [ nac-Stroe ]
37
- const toast = useHsUiToast();
28
+ const toast = useHsToast();
38
29
  const state = toast.state;
39
30
  // ----------------------------------------------------------------------------
40
- const storeMultiLang = useHsMultiLang();
41
- const MultiLangText = storeMultiLang.MultiLangText;
31
+ const multiLang = useHsMultiLang();
32
+ const tx = multiLang.tx;
42
33
  // ----------------------------------------------------------------------------
43
34
  // 要素を消し始めから完全に消すのにかかる時間(Accordionの動作時間)
44
35
  const hideSpan = 300;
@@ -78,136 +69,111 @@ const style = (message: Message) => {
78
69
  let d = Int(message.hideAfter);
79
70
  if (d < 0) d = 0;
80
71
  return {
81
- 'animation-duration': d + 'ms',
72
+ "animation-duration": d + "ms",
82
73
  };
83
74
  };
84
75
 
85
- const closeBtnStyle = RemovePrefix(prefix, [
76
+ const closeBtnStyle = [
86
77
  //
87
- 'bg-transparent',
88
- 'tw-bg-transparent',
89
- 'border-[1px]',
90
- 'tw-border-[1px]',
91
- 'border-white',
92
- 'tw-border-white',
93
- 'rounded',
94
- 'tw-rounded',
95
- 'min-h-0',
96
- 'tw-min-h-0',
97
- 'w-[30px]',
98
- 'tw-w-[30px]',
99
- 'h-[30px]',
100
- 'tw-h-[30px]',
101
- 'p-0',
102
- 'tw-p-0',
103
- 'flex-none',
104
- 'tw-flex-none',
105
- 'self-start',
106
- 'tw-self-start',
107
- ]);
78
+ "bg-transparent",
79
+ "border-[1px]",
80
+ "border-white",
81
+ "rounded",
82
+ "min-h-0",
83
+ "w-[30px]",
84
+ "h-[30px]",
85
+ "p-0",
86
+ "flex-none",
87
+ "self-start",
88
+ ];
108
89
 
109
90
  // ----------------------------------------------------------------------------
110
91
  </script>
92
+
111
93
  <template>
112
94
  <div class="HsUiToast-base" :style="{ 'z-index': state.zindex }">
113
95
  <div
114
- v-show="state.pendingList.length != 0"
115
- class="HsUiToast-container"
116
- :class="RemovePrefix(prefix, ['grid', 'tw-grid', 'gap-1', 'tw-gap-1'])"
96
+ v-show="state.pendingList.length !== 0"
97
+ class="HsUiToast-container grid gap-1"
117
98
  >
118
99
  <template v-for="(message, index) in state.pendingList" :key="index">
119
- <HsUiAccordion :span="hideSpan" :open="message.isShow">
120
- <HsUiCard
100
+ <Accordion :span="hideSpan" :open="message.isShow">
101
+ <Card
121
102
  class="HsUiToast"
122
- :class="
123
- RemovePrefix(prefix, [
124
- 'drop-shadow-md',
125
- 'tw-drop-shadow-md',
126
- 'pointer-events-all',
127
- 'tw-pointer-events-all',
128
- ])
129
- "
103
+ :class="['drop-shadow-md', 'pointer-events-all']"
130
104
  @click.stop=""
131
105
  @mousedown.stop=""
132
106
  @mouseup.stop=""
133
107
  >
134
- <template v-if="MultiLangText(message.title).length > 0">
135
- <HsUiCardItem
108
+ <template v-if="tx(message.title).value.length > 0">
109
+ <CardItem
136
110
  variant="header"
137
111
  class="items-center"
138
- :class="[`theme-${message.theme}`, RemovePrefix(prefix, ['items-center', 'tw-items-center'])]"
112
+ :class="[`theme-${message.theme}`]"
139
113
  >
140
114
  <div class="HsUiToast-title">
141
- {{ MultiLangText(message.title) }}
115
+ {{ tx(message.title) }}
142
116
  </div>
143
- <HsFcBtn :class="closeBtnStyle" theme="white" type="outlined" @click="deleteMessage(message)">
117
+ <Btn
118
+ :class="closeBtnStyle"
119
+ theme="white"
120
+ type="outlined"
121
+ @click="deleteMessage(message)"
122
+ >
144
123
  <i class="fas fa-times" />
145
- </HsFcBtn>
146
- </HsUiCardItem>
147
- <HsUiCardItem
148
- v-if="MultiLangText(message.message).length > 0"
149
- :class="[
150
- `theme-${message.theme}`,
151
- RemovePrefix(prefix, ['items-overflow-visible', 'tw-overflow-visible']),
152
- ]"
124
+ </Btn>
125
+ </CardItem>
126
+ <CardItem
127
+ v-if="tx(message.message).value.length > 0"
128
+ :class="[`theme-${message.theme}`, ['items-overflow-visible']]"
153
129
  >
154
130
  <div class="HsUiToast-message">
155
- {{ MultiLangText(message.message) }}
131
+ {{ tx(message.message) }}
156
132
  </div>
157
- <!-- </div> -->
158
- </HsUiCardItem>
159
- <HsUiCardItem
133
+ </CardItem>
134
+ <CardItem
160
135
  v-if="message.hideAfter != 0"
161
136
  :class="[
162
137
  `theme-${message.theme}`,
163
- RemovePrefix(prefix, [
164
- 'overflow-visible',
165
- 'tw-overflow-visible',
166
- 'p-0',
167
- 'tw-p-0',
168
- 'min-h-[8px]',
169
- 'tw-min-h-[8px]',
170
- ]),
138
+ ['overflow-visible', 'p-0', 'min-h-[8px]'],
171
139
  ]"
172
140
  >
173
141
  <div class="HsUiToast-bar-body" :class="[`${message.theme}`]">
174
142
  <div class="HsUiToast-bar" :style="style(message)" />
175
143
  </div>
176
- </HsUiCardItem>
144
+ </CardItem>
177
145
  </template>
178
146
  <template v-else>
179
- <HsUiCardItem
147
+ <CardItem
180
148
  variant="header"
181
- :class="[`theme-${message.theme}`, RemovePrefix(prefix, ['items-center', 'tw-items-center'])]"
149
+ :class="[`theme-${message.theme}`, ['items-center']]"
182
150
  >
183
151
  <div class="HsUiToast-message">
184
- {{ MultiLangText(message.message) }}
152
+ {{ tx(message.message) }}
185
153
  </div>
186
- <HsFcBtn :class="closeBtnStyle" theme="white" variant="outlined" @click="deleteMessage(message)">
154
+ <Btn
155
+ :class="closeBtnStyle"
156
+ theme="white"
157
+ variant="outlined"
158
+ @click="deleteMessage(message)"
159
+ >
187
160
  <i class="fas fa-times" />
188
- </HsFcBtn>
189
- </HsUiCardItem>
190
- <HsUiCardItem
161
+ </Btn>
162
+ </CardItem>
163
+ <CardItem
191
164
  v-if="message.hideAfter != 0"
192
165
  :class="[
193
166
  `theme-${message.theme}`,
194
- RemovePrefix(prefix, [
195
- 'overflow-visible',
196
- 'tw-overflow-visible',
197
- 'p-0',
198
- 'tw-p-0',
199
- 'min-h-[8px]',
200
- 'tw-min-h-[8px]',
201
- ]),
167
+ ['overflow-visible', 'p-0', 'min-h-[8px]'],
202
168
  ]"
203
169
  >
204
170
  <div class="HsUiToast-bar-body" :class="[`${message.theme}`]">
205
171
  <div class="HsUiToast-bar" :style="style(message)" />
206
172
  </div>
207
- </HsUiCardItem>
173
+ </CardItem>
208
174
  </template>
209
- </HsUiCard>
210
- </HsUiAccordion>
175
+ </Card>
176
+ </Accordion>
211
177
  </template>
212
178
  </div>
213
179
  </div>
@@ -359,6 +325,7 @@ const closeBtnStyle = RemovePrefix(prefix, [
359
325
  animation-fill-mode: forwards;
360
326
  }
361
327
  </style>
328
+
362
329
  <style lang="scss">
363
330
  @keyframes HsUiToast-bar-key-frame {
364
331
  0% {
@@ -1,24 +1,26 @@
1
1
  <script setup lang="ts">
2
2
  /* ----------------------------------------------------------------------------
3
- src\runtime\components\hs-ui\window-loader.vue
3
+ // src\runtime\components\interactive\window-loader.vue
4
4
  // ----------------------------------------------------------------------------
5
- HsUiWindowLoader
6
- HsUiWindowLoaderHsUiWindowLoader
5
+ // WindowLoader
6
+ // WindowLoaderWindowLoader
7
7
  ----------------------------------------------------------------------------- */
8
8
 
9
9
  /* ----------------------------------------------------------------------------
10
- const WindowLoader = useHsUiWindowLoader();
10
+ const WindowLoader = useHsWindowLoader();
11
11
  WindowLoader.Show()
12
12
  WindowLoader.zindex=10000
13
13
  ----------------------------------------------------------------------------- */
14
14
 
15
- // [ vue ]
16
- import { ref, watch } from 'vue';
17
- import { useHsUiWindowLoader } from '../../composables/use-hs-ui-window-loader';
18
15
  // [ vueuse ]
19
- import { useFocusTrap } from '@vueuse/integrations/useFocusTrap';
16
+ import { useFocusTrap } from "@vueuse/integrations/useFocusTrap";
17
+
18
+ // [ NUXT ]
19
+ import { ref, watch } from "#imports";
20
+ // [ composables ]
21
+ import { useHsWindowLoader } from "../../composables/use-hs-window-loader";
20
22
  // ----------------------------------------------------------------------------
21
- const WindowLoader = useHsUiWindowLoader();
23
+ const WindowLoader = useHsWindowLoader();
22
24
  // ----------------------------------------------------------------------------
23
25
  // [ focusTrap ]
24
26
  const focusTargetElm = ref<HTMLElement | null>(null);
@@ -35,6 +37,7 @@ watch(
35
37
  );
36
38
  // ----------------------------------------------------------------------------
37
39
  </script>
40
+
38
41
  <template>
39
42
  <div
40
43
  ref="focusTargetElm"
@@ -1,35 +1,27 @@
1
1
  <script setup lang="ts">
2
2
  /* ----------------------------------------------------------------------------
3
- src\runtime\components\hs-ui\accordion.vue
3
+ // src\runtime\components\layout\accordion.vue
4
4
  // ----------------------------------------------------------------------------
5
- HsUiAccordion
6
- HsUiAccordionHsUiAccordion
5
+ // Accordion
6
+ // AccordionAccordion
7
7
  ----------------------------------------------------------------------------- */
8
8
 
9
- // [ vue ]
10
- import { computed, ref, watch, nextTick } from 'vue';
11
9
  // [ NUXT ]
12
- import { useRuntimeConfig } from '#imports';
10
+ import { computed, ref, watch, nextTick } from "#imports";
13
11
  // [ tailwind ]
14
- import { extendTailwindMerge } from 'tailwind-merge';
15
- import { type ClassType, ClassTypeToString } from '../../lib/class-style';
16
- import { GetPrefix, RemovePrefix } from '../../lib/prefix';
12
+ import { twMerge } from "tailwind-merge";
13
+ // [ utils ]
14
+ import { type ClassType, ClassTypeToString } from "../../utils/class-style";
17
15
  // ----------------------------------------------------------------------------
18
- const runtimeConfig: any = useRuntimeConfig();
19
- const prefix = GetPrefix(runtimeConfig);
20
- // ----------------------------------------------------------------------------
21
- const twMerge = extendTailwindMerge({
22
- prefix: prefix,
23
- });
24
16
  // ----------------------------------------------------------------------------
25
17
  // [ Props ]
26
18
  type Props = {
27
- class?: ClassType | undefined;
19
+ class?: ClassType;
28
20
  open: boolean;
29
21
  span?: number;
30
22
  };
31
23
  const props = withDefaults(defineProps<Props>(), {
32
- class: '',
24
+ class: "",
33
25
  open: true,
34
26
  span: 300,
35
27
  });
@@ -53,44 +45,43 @@ watch(
53
45
  }
54
46
  );
55
47
 
56
- const baseClass = RemovePrefix(prefix, [
48
+ const baseClass = [
57
49
  //
58
- 'w-full',
59
- 'tw-w-full',
60
- ]);
50
+ "w-full",
51
+ ];
61
52
 
62
53
  const classStyle = computed(() => {
63
54
  return twMerge(baseClass, ClassTypeToString(props.class));
64
55
  });
65
- const classOverflow = RemovePrefix(prefix, [
56
+ const classOverflow = [
66
57
  //
67
- 'overflow-y-hidden',
68
- 'tw-overflow-y-hidden',
69
- ]);
58
+ "overflow-y-hidden",
59
+ ];
70
60
  const overflowClass = computed(() => {
71
61
  if (innerHidden.value) return classOverflow;
72
- return '';
62
+ return "";
73
63
  });
74
64
  // ----------------------------------------------------------------------------
75
65
  </script>
66
+
76
67
  <template>
77
68
  <div
78
- class="HsUiAccordion"
69
+ class="Accordion"
79
70
  :class="[{ open: open }, classStyle]"
80
71
  :style="`--hsui-accordion-span:${props.span}ms`"
81
- :aria-hidden="!props.open"
82
72
  >
73
+ <!-- :aria-hidden="!props.open" -->
83
74
  <div :class="overflowClass"><slot /></div>
84
75
  </div>
85
76
  </template>
86
77
 
87
78
  <style scoped>
88
- .HsUiAccordion {
79
+ .Accordion {
89
80
  display: grid;
90
81
  grid-template-rows: 0fr;
91
82
  transition: grid-template-rows var(--hsui-accordion-span);
92
83
  }
93
- .HsUiAccordion.open {
84
+ .Accordion.open {
94
85
  grid-template-rows: 1fr;
95
86
  }
96
87
  </style>