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,113 @@
1
+ <script lang="ts">
2
+ /* ----------------------------------------------------------------------------
3
+ // src\runtime\components\interactive\alert.vue
4
+ // ----------------------------------------------------------------------------
5
+ // Alert
6
+ // AlertAlert
7
+ ----------------------------------------------------------------------------- */
8
+
9
+ // [ utils ]
10
+ import { tv } from "../../utils/tv";
11
+ import type { Theme } from "../../utils/theme";
12
+ const alertTv = tv({
13
+ slots: {
14
+ base: [
15
+ //
16
+ `p-2`,
17
+ "bg-white border-2 border-[var(--main-color)] text-[color-mix(in_srgb,_var(--main-color)_,_#000_30%)]",
18
+ "rounded-xl overflow-hidden",
19
+ ],
20
+ bg: "absolute inset-0 bg-[var(--main-color)] opacity-10",
21
+ inner: "",
22
+ },
23
+ variants: {
24
+ variant: {
25
+ header: {
26
+ base: [`flex justify-between items-center`],
27
+ },
28
+ body: {
29
+ base: [``],
30
+ },
31
+ footer: {
32
+ base: [`flex justify-between items-center`],
33
+ },
34
+ },
35
+ scroll: {
36
+ true: {
37
+ base: "overflow-y-auto overflow-x-hidden flex-1",
38
+ },
39
+ false: {
40
+ base: "flex-y-none",
41
+ },
42
+ },
43
+ },
44
+ });
45
+ </script>
46
+ <script setup lang="ts">
47
+ /* ----------------------------------------------------------------------------
48
+ // src\runtime\components\interactive\alert.vue
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,90 +1,72 @@
1
1
  <script setup lang="ts">
2
2
  /* ----------------------------------------------------------------------------
3
- src\runtime\components\hs-ui\block-loading.vue
3
+ // src\runtime\components\interactive\block-loading.vue
4
4
  // ----------------------------------------------------------------------------
5
- HsUiBlockLoading
6
- HsUiBlockLoadingHsUiBlockLoading
5
+ // BlockLoading
6
+ // BlockLoadingBlockLoading
7
7
  ----------------------------------------------------------------------------- */
8
8
 
9
- // [ vue ]
10
- import { computed } from 'vue';
11
9
  // [ NUXT ]
12
- import { useRuntimeConfig } from '#imports';
10
+ import { computed } 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
  type Props = {
26
- class?: ClassType | undefined;
18
+ class?: ClassType;
27
19
  show: boolean;
28
20
  message?: string;
29
21
  };
30
22
  const props = withDefaults(defineProps<Props>(), {
31
- class: '',
23
+ class: "",
32
24
  show: false,
33
- message: 'Loading',
25
+ message: "Loading",
34
26
  });
35
- const baseClass = RemovePrefix(prefix, [
27
+ const baseClass = [
28
+ //
36
29
  //
37
- 'px-2',
38
- 'tw-px-2',
39
- 'pt-2',
40
- 'tw-pt-2',
41
- 'pb-1',
42
- 'tw-pb-1',
43
- 'absolute',
44
- 'tw-absolute',
45
- 'inset-0',
46
- 'tw-inset-0',
47
- 'h-full',
48
- 'tw-h-full',
49
- 'w-full',
50
- 'tw-w-full',
51
- 'overflow-hidden',
52
- 'tw-overflow-hidden',
53
- 'bg-[#13175C]/[0.5]',
54
- 'tw-bg-[#43536E]/[0.5]',
55
- 'flex',
56
- 'tw-flex',
57
- 'items-center',
58
- 'tw-items-center',
59
- 'justify-center',
60
- 'tw-justify-center',
61
- 'transition-opacity',
62
- 'tw-transition-opacity',
63
- ]);
30
+ "z-100",
31
+ "px-2",
32
+ "pt-2",
33
+ "pb-1",
34
+ "absolute",
35
+ "inset-0",
36
+ "h-full",
37
+ "w-full",
38
+ "overflow-hidden",
39
+ "bg-[#13175C]/[0.5]",
40
+ "flex",
41
+ "items-center",
42
+ "justify-center",
43
+ "transition-opacity",
44
+ ];
64
45
 
65
46
  const variableStyle = computed(() => {
66
47
  if (props.show) {
67
- return RemovePrefix(prefix,[
48
+ return [
68
49
  //
69
- 'pointer-events-auto',
70
- 'tw-pointer-events-auto',
71
- 'opacity-100',
72
- 'tw-opacity-100',
73
- ]);
50
+ "pointer-events-auto",
51
+ "opacity-100",
52
+ ];
74
53
  }
75
- return RemovePrefix(prefix,[
54
+ return [
76
55
  //
77
- 'pointer-events-none',
78
- 'tw-pointer-events-none',
79
- 'opacity-0',
80
- 'tw-opacity-0',
81
- ]);
56
+ "pointer-events-none",
57
+ "opacity-0",
58
+ ];
82
59
  });
83
60
 
84
61
  const classStyle = computed(() => {
85
- return twMerge(baseClass, variableStyle.value, ClassTypeToString(props.class));
62
+ return twMerge(
63
+ baseClass,
64
+ variableStyle.value,
65
+ ClassTypeToString(props.class)
66
+ );
86
67
  });
87
68
  </script>
69
+
88
70
  <template>
89
71
  <div class="HsUiBlockLoading" :class="[classStyle]">
90
72
  <div class="loading-container">
@@ -97,6 +79,7 @@ const classStyle = computed(() => {
97
79
  </div>
98
80
  </div>
99
81
  </template>
82
+
100
83
  <style scoped>
101
84
  .loading-container {
102
85
  width: 50%;
@@ -1,40 +1,42 @@
1
1
  <script setup lang="ts">
2
2
  /* ----------------------------------------------------------------------------
3
- src\runtime\components\hs-ui\dialog\index.vue
3
+ // src\runtime\components\interactive\dialog.vue
4
4
  // ----------------------------------------------------------------------------
5
- HsUiDialog
6
- HsUiDialogHsUiDialog
5
+ // Dialog
6
+ // DialogDialog
7
7
  ----------------------------------------------------------------------------- */
8
8
 
9
- // [ vue ]
10
- import { computed, watch, ref, nextTick } from 'vue';
11
- // [ NUXT ]
12
- import { useRuntimeConfig } from '#imports';
13
- // ----------------------------------------------------------------------------
14
9
  // [ tailwind ]
15
- // import { extendTailwindMerge } from 'tailwind-merge';
16
- // import { type ClassType, ClassTypeToString } from '../../../lib/class-style';
17
- import { GetPrefix, RemovePrefix } from '../../../lib/prefix';
10
+ // import { twMerge } from 'tailwind-merge';
18
11
 
19
12
  // ----------------------------------------------------------------------------
20
- import { DialogDefaultZIndex } from './index.type';
21
- import { disableBodyScroll, enableBodyScroll } from 'body-scroll-lock';
13
+
14
+ // import { type ClassType, ClassTypeToString } from '~/components/lib/class-style';
15
+ // import { TailwindPrefix } from '~/components/hs/setting';
22
16
  // ----------------------------------------------------------------------------
23
- import { useHsUiDialog } from '../../../composables/use-hs-ui-dialog';
24
- import { useHsMultiLang } from '../../../composables/use-hs-multi-lang';
17
+
18
+ import { disableBodyScroll, enableBodyScroll } from "body-scroll-lock";
19
+ // [ NUXT ]
20
+ import { computed, ref, watch, nextTick } from "#imports";
21
+ // [ types ]
22
+ import { DialogDefaultZIndex } from "../../types/dialog";
23
+ // [ composables ]
24
+ import { useHsDialog } from "../../composables/use-hs-dialog";
25
+ import { useHsMultiLang } from "../../composables/use-hs-multi-lang";
26
+ // [ Components ]
27
+ import Modal from "./modal.vue";
28
+ import Card from "../layout/card.vue";
29
+ import CardItem from "../layout/card-item.vue";
30
+ import Btn from "../form/btn.vue";
25
31
  // ----------------------------------------------------------------------------
26
- const runtimeConfig: any = useRuntimeConfig();
27
- const prefix = GetPrefix(runtimeConfig);
28
- // const twMerge = extendTailwindMerge({
29
- // prefix: prefix,
30
- // });
32
+
31
33
  // ----------------------------------------------------------------------------
32
34
  // [ nac-Stroe ]
33
- const toast = useHsUiDialog();
35
+ const toast = useHsDialog();
34
36
  const state = toast.state;
35
37
  // ----------------------------------------------------------------------------
36
- const storeMultiLang = useHsMultiLang();
37
- const MultiLangText = storeMultiLang.MultiLangText;
38
+ const multiLang = useHsMultiLang();
39
+ const tx = multiLang.tx;
38
40
  // ----------------------------------------------------------------------------
39
41
  const cancelBtnElm = ref<HTMLElement | null>(null);
40
42
  const leftBtnElm = ref<HTMLElement | null>(null);
@@ -88,11 +90,20 @@ watch(activateTs, async (ts) => {
88
90
  }
89
91
  if (activeItem.value === null) return;
90
92
  if (isShow.value === true) {
91
- if (activeItem.value.data.option.defaultBtn === 'right' && rightBtnElm.value !== null) {
93
+ if (
94
+ activeItem.value.data.option.defaultBtn === "right" &&
95
+ rightBtnElm.value !== null
96
+ ) {
92
97
  rightBtnElm.value.focus();
93
- } else if (activeItem.value.data.option.defaultBtn === 'left' && leftBtnElm.value !== null) {
98
+ } else if (
99
+ activeItem.value.data.option.defaultBtn === "left" &&
100
+ leftBtnElm.value !== null
101
+ ) {
94
102
  leftBtnElm.value.focus();
95
- } else if (activeItem.value.data.option.defaultBtn === 'cancel' && cancelBtnElm.value !== null) {
103
+ } else if (
104
+ activeItem.value.data.option.defaultBtn === "cancel" &&
105
+ cancelBtnElm.value !== null
106
+ ) {
96
107
  cancelBtnElm.value.focus();
97
108
  }
98
109
  }
@@ -100,18 +111,24 @@ watch(activateTs, async (ts) => {
100
111
 
101
112
  const keyMoveFlag = ref(false);
102
113
  const onKeyDownNoBtn = (e: KeyboardEvent) => {
103
- if (activeItem.value === null) return '';
104
- if (e.key === 'Tab') return;
105
- if (activeItem.value.data.option.btnRight.isShow === true && rightBtnElm.value !== null) {
114
+ if (activeItem.value === null) return "";
115
+ if (e.key === "Tab") return;
116
+ if (
117
+ activeItem.value.data.option.btnRight.isShow === true &&
118
+ rightBtnElm.value !== null
119
+ ) {
106
120
  keyMoveFlag.value = true;
107
121
  rightBtnElm.value.focus();
108
122
  }
109
123
  };
110
124
 
111
125
  const onKeyDownYesBtn = (e: KeyboardEvent) => {
112
- if (activeItem.value === null) return '';
113
- if (e.key === 'Tab') return;
114
- if (activeItem.value.data.option.btnLeft.isShow === true && leftBtnElm.value !== null) {
126
+ if (activeItem.value === null) return "";
127
+ if (e.key === "Tab") return;
128
+ if (
129
+ activeItem.value.data.option.btnLeft.isShow === true &&
130
+ leftBtnElm.value !== null
131
+ ) {
115
132
  keyMoveFlag.value = true;
116
133
  leftBtnElm.value.focus();
117
134
  }
@@ -144,101 +161,88 @@ watch(isShow, (v) => {
144
161
  }
145
162
  });
146
163
 
147
- const cancelBtnStyle = RemovePrefix(prefix, [
164
+ const cancelBtnStyle = [
148
165
  //
149
- 'px-2',
150
- 'tw-px-2',
151
- 'py-1',
152
- 'tw-py-1',
153
- 'border-[1px]',
154
- 'tw-border-[1px]',
155
- '!bg-transparent',
156
- '!tw-bg-transparent',
157
- 'rounded-none',
158
- 'tw-rounded-none',
159
- 'h-full',
160
- 'tw-h-full',
161
- ]);
166
+ "px-2",
167
+ "py-1",
168
+ "border-[1px]",
169
+ "!bg-transparent",
170
+ "rounded-none",
171
+ "h-full",
172
+ ];
162
173
 
163
- const cancelBtnStyleInner = RemovePrefix(prefix, [
164
- //
165
- 'flex',
166
- 'tw-flex',
167
- 'items-center',
168
- 'tw-items-center',
169
- ]);
170
- const btnBaseStyle = RemovePrefix(prefix, [
174
+ const cancelBtnStyleInner = [
171
175
  //
172
- 'grid',
173
- 'tw-grid',
174
- 'grid-cols-2',
175
- 'tw-grid-cols-2',
176
- 'gap-2',
177
- 'tw-gap-2',
178
- ]);
179
- const btnStyle = RemovePrefix(prefix, [
176
+ "flex",
177
+ "items-center",
178
+ ];
179
+ const btnBaseStyle = [
180
180
  //
181
- 'py-1',
182
- 'tw-py-1',
183
- 'w-full',
184
- 'tw-w-full',
185
- ]);
186
- const titleStyle = RemovePrefix(prefix, [
181
+ "grid",
182
+ "grid-cols-2",
183
+ "gap-2",
184
+ ];
185
+ const btnStyle = [
187
186
  //
188
- 'text-[14px]',
189
- 'tw-text-[14px]',
190
- 'sm:text-[18px]',
191
- 'sm:tw-text-[18px]',
192
- 'whitespace-pre-line',
193
- 'tw-whitespace-pre-line',
194
- 'text-wrap',
195
- 'tw-text-wrap',
196
- ]);
197
- const messageStyle = RemovePrefix(prefix, [
187
+ "py-1",
188
+ "w-full",
189
+ ];
190
+ const titleStyle = [
198
191
  //
199
- 'text-[14px]',
200
- 'tw-text-[14px]',
201
- 'sm:text-[18px]',
202
- 'sm:tw-text-[18px]',
203
- 'whitespace-pre-line',
204
- 'tw-whitespace-pre-line',
205
- 'text-wrap',
206
- 'tw-text-wrap',
192
+ "text-[14px]",
193
+ "sm:text-[18px]",
194
+ "whitespace-pre-line",
195
+ "text-wrap",
196
+ ];
197
+ const messageStyle = [
207
198
  //
208
- 'pb-2',
209
- 'tw-pb-2',
210
- ]);
211
- const cardStyle = RemovePrefix(prefix, [
199
+ "text-[14px]",
200
+ "sm:text-[18px]",
201
+ "whitespace-pre-line",
202
+ "text-wrap",
203
+ "pb-2",
204
+ ];
205
+ const cardStyle = [
212
206
  //
213
- 'min-w-[300px]',
214
- 'tw-min-w-[300px]',
215
- 'mt-auto',
216
- 'tw-mt-auto',
217
- 'mb-auto',
218
- 'tw-mb-auto',
219
- ]);
220
- const closeBtnIcon = RemovePrefix(prefix, [
207
+ "min-w-[300px]",
208
+ "mt-auto",
209
+ "mb-auto",
210
+ ];
211
+ const closeBtnIcon = [
221
212
  //
222
- 'tw-mx-1',
223
- 'mx-1',
224
- ]);
225
- const baseCardHeader = RemovePrefix(prefix, [
213
+ "mx-1",
214
+ ];
215
+ const baseCardHeader = [
226
216
  //
227
- 'py-1',
228
- 'tw-py-1',
229
- 'pe-1',
230
- 'tw-pe-1',
231
- ]);
217
+ "py-1",
218
+ "pe-1",
219
+ ];
232
220
  </script>
221
+
233
222
  <template>
234
223
  <ClientOnly>
235
- <HsUiModal ref="targetElm" :show="isShow" :z-index="zindex" focus-lock @close="clickCancel()">
236
- <HsUiCard v-if="activeItem !== null" class="HsUiDialog" :class="cardStyle" @click.stop>
237
- <HsUiCardItem :class="[`theme-${activeItem.data.option.theme}`, baseCardHeader]" variant="header">
224
+ <Modal
225
+ ref="targetElm"
226
+ :show="isShow"
227
+ :z-index="zindex"
228
+ focus-lock
229
+ :closeable="activeItem?.data.option.btnCancel.isShow || false"
230
+ @close="clickCancel()"
231
+ >
232
+ <Card
233
+ v-if="activeItem !== null"
234
+ class="HsUiDialog"
235
+ :class="cardStyle"
236
+ @click.stop
237
+ >
238
+ <CardItem
239
+ :class="[`theme-${activeItem.data.option.theme}`, baseCardHeader]"
240
+ variant="header"
241
+ >
238
242
  <div :class="titleStyle">
239
- {{ MultiLangText(activeItem.data.title) }}
243
+ {{ tx(activeItem.data.title) }}
240
244
  </div>
241
- <HsFcBtn
245
+ <Btn
242
246
  v-if="activeItem.data.option.btnCancel.isShow"
243
247
  :class="cancelBtnStyle"
244
248
  :class-inner="cancelBtnStyleInner"
@@ -248,16 +252,16 @@ const baseCardHeader = RemovePrefix(prefix, [
248
252
  @ref="(e:any) => (cancelBtnElm = e)"
249
253
  >
250
254
  <i class="fas fa-times" :class="closeBtnIcon" />
251
- {{ MultiLangText(activeItem.data.option.btnCancel.title) }}
252
- </HsFcBtn>
253
- </HsUiCardItem>
254
- <HsUiCardItem variant="body">
255
+ {{ tx(activeItem.data.option.btnCancel.title) }}
256
+ </Btn>
257
+ </CardItem>
258
+ <CardItem variant="body">
255
259
  <div :class="messageStyle">
256
- {{ MultiLangText(activeItem.data.message) }}
260
+ {{ tx(activeItem.data.message) }}
257
261
  </div>
258
262
  <div :class="btnBaseStyle">
259
263
  <div>
260
- <HsFcBtn
264
+ <Btn
261
265
  v-if="activeItem.data.option.btnLeft.isShow"
262
266
  :class="btnStyle"
263
267
  variant="flat"
@@ -266,11 +270,11 @@ const baseCardHeader = RemovePrefix(prefix, [
266
270
  @ref="(e:any) => (leftBtnElm = e)"
267
271
  @keydown="onKeyDownNoBtn"
268
272
  >
269
- {{ MultiLangText(activeItem.data.option.btnLeft.title) }}
270
- </HsFcBtn>
273
+ {{ tx(activeItem.data.option.btnLeft.title) }}
274
+ </Btn>
271
275
  </div>
272
276
  <div>
273
- <HsFcBtn
277
+ <Btn
274
278
  v-if="activeItem.data.option.btnRight.isShow"
275
279
  :class="btnStyle"
276
280
  variant="flat"
@@ -279,15 +283,16 @@ const baseCardHeader = RemovePrefix(prefix, [
279
283
  @ref="(e:any) => (rightBtnElm = e)"
280
284
  @keydown="onKeyDownYesBtn"
281
285
  >
282
- {{ MultiLangText(activeItem.data.option.btnRight.title) }}
283
- </HsFcBtn>
286
+ {{ tx(activeItem.data.option.btnRight.title) }}
287
+ </Btn>
284
288
  </div>
285
289
  </div>
286
- </HsUiCardItem>
287
- </HsUiCard>
288
- </HsUiModal>
290
+ </CardItem>
291
+ </Card>
292
+ </Modal>
289
293
  </ClientOnly>
290
294
  </template>
295
+
291
296
  <style scoped>
292
297
  .theme-main0 {
293
298
  background-color: theme("colors.main0");
@@ -353,7 +358,7 @@ const baseCardHeader = RemovePrefix(prefix, [
353
358
  background-color: theme("colors.white");
354
359
  color: theme("colors.main1");
355
360
  }
356
- .theme-white .HsFcBtn--border {
361
+ .theme-white .Btn--border {
357
362
  border-color: theme("colors.gray.600");
358
363
  }
359
364