nuxt-hs-ui 2.12.7 → 4.0.0

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 (131) hide show
  1. package/README.md +202 -14
  2. package/dist/module.d.mts +3 -4
  3. package/dist/module.json +9 -6
  4. package/dist/module.mjs +109 -99
  5. package/dist/runtime/assets/flatpickr-dark.css +1 -1
  6. package/dist/runtime/assets/main.css +1 -0
  7. package/dist/runtime/assets/tabulator-custom.css +1 -1
  8. package/dist/runtime/components/form/_select/hidden-item-toggle.vue +28 -0
  9. package/dist/runtime/components/form/_select/hidden-item-toggle.vue.d.ts +10 -0
  10. package/dist/runtime/components/form/_select/item-container.vue +63 -0
  11. package/dist/runtime/components/form/_select/item-container.vue.d.ts +19 -0
  12. package/dist/runtime/components/form/_select/item-label.vue +31 -0
  13. package/dist/runtime/components/form/_select/item-label.vue.d.ts +13 -0
  14. package/dist/runtime/components/form/_select/item-row.vue +62 -0
  15. package/dist/runtime/components/form/_select/item-row.vue.d.ts +34 -0
  16. package/dist/runtime/components/form/btn-line-loading.vue +62 -81
  17. package/dist/runtime/components/form/btn-line-loading.vue.d.ts +14 -0
  18. package/dist/runtime/components/form/btn.vue +411 -494
  19. package/dist/runtime/components/form/btn.vue.d.ts +0 -0
  20. package/dist/runtime/components/form/check-box.vue +200 -315
  21. package/dist/runtime/components/form/check-box.vue.d.ts +71 -0
  22. package/dist/runtime/components/form/check-list.vue +234 -364
  23. package/dist/runtime/components/form/check-list.vue.d.ts +99 -0
  24. package/dist/runtime/components/form/combo-box.vue +340 -0
  25. package/dist/runtime/components/form/combo-box.vue.d.ts +69 -0
  26. package/dist/runtime/components/form/datepicker.vue +717 -883
  27. package/dist/runtime/components/form/datepicker.vue.d.ts +122 -0
  28. package/dist/runtime/components/form/input-frame.vue +174 -258
  29. package/dist/runtime/components/form/input-frame.vue.d.ts +88 -0
  30. package/dist/runtime/components/form/radio.vue +451 -614
  31. package/dist/runtime/components/form/radio.vue.d.ts +62 -0
  32. package/dist/runtime/components/form/select-img-icon.vue +38 -53
  33. package/dist/runtime/components/form/select-img-icon.vue.d.ts +15 -0
  34. package/dist/runtime/components/form/select.vue +733 -579
  35. package/dist/runtime/components/form/select.vue.d.ts +63 -0
  36. package/dist/runtime/components/form/text-box.vue +266 -365
  37. package/dist/runtime/components/form/text-box.vue.d.ts +105 -0
  38. package/dist/runtime/components/form/textarea.vue +338 -421
  39. package/dist/runtime/components/form/textarea.vue.d.ts +98 -0
  40. package/dist/runtime/components/form/value-box.vue +512 -641
  41. package/dist/runtime/components/form/value-box.vue.d.ts +128 -0
  42. package/dist/runtime/components/interactive/alert.vue +49 -113
  43. package/dist/runtime/components/interactive/alert.vue.d.ts +30 -0
  44. package/dist/runtime/components/interactive/block-loading.vue +91 -119
  45. package/dist/runtime/components/interactive/block-loading.vue.d.ts +22 -0
  46. package/dist/runtime/components/interactive/dialog.vue +252 -407
  47. package/dist/runtime/components/interactive/dialog.vue.d.ts +3 -0
  48. package/dist/runtime/components/interactive/modal-bg.vue +72 -82
  49. package/dist/runtime/components/interactive/modal-bg.vue.d.ts +11 -0
  50. package/dist/runtime/components/interactive/modal.vue +121 -169
  51. package/dist/runtime/components/interactive/modal.vue.d.ts +38 -0
  52. package/dist/runtime/components/interactive/toast.vue +164 -206
  53. package/dist/runtime/components/interactive/toast.vue.d.ts +3 -0
  54. package/dist/runtime/components/interactive/window-loader.vue +61 -84
  55. package/dist/runtime/components/interactive/window-loader.vue.d.ts +3 -0
  56. package/dist/runtime/components/layout/accordion-down.vue +72 -0
  57. package/dist/runtime/components/layout/accordion-down.vue.d.ts +26 -0
  58. package/dist/runtime/components/layout/accordion.vue +47 -78
  59. package/dist/runtime/components/layout/accordion.vue.d.ts +22 -0
  60. package/dist/runtime/components/layout/aspect-box.vue +29 -58
  61. package/dist/runtime/components/layout/aspect-box.vue.d.ts +29 -0
  62. package/dist/runtime/components/layout/card-item.vue +148 -193
  63. package/dist/runtime/components/layout/card-item.vue.d.ts +0 -0
  64. package/dist/runtime/components/layout/card.vue +27 -42
  65. package/dist/runtime/components/layout/card.vue.d.ts +23 -0
  66. package/dist/runtime/components/layout/container.vue +25 -40
  67. package/dist/runtime/components/layout/container.vue.d.ts +35 -0
  68. package/dist/runtime/components/layout/divider-h.vue +30 -50
  69. package/dist/runtime/components/layout/divider-h.vue.d.ts +18 -0
  70. package/dist/runtime/components/misc/breadcrumb.vue +47 -95
  71. package/dist/runtime/components/misc/breadcrumb.vue.d.ts +22 -0
  72. package/dist/runtime/components/misc/tabulator.vue +122 -190
  73. package/dist/runtime/components/misc/tabulator.vue.d.ts +28 -0
  74. package/dist/runtime/components/misc/view-name-display.vue +53 -68
  75. package/dist/runtime/components/misc/view-name-display.vue.d.ts +14 -0
  76. package/dist/runtime/components/test.vue +13 -0
  77. package/dist/runtime/components/test.vue.d.ts +3 -0
  78. package/dist/runtime/composables/test.d.ts +8 -0
  79. package/dist/runtime/composables/test.js +12 -0
  80. package/dist/runtime/composables/use-hs-dialog.d.ts +3 -20
  81. package/dist/runtime/composables/use-hs-dialog.js +3 -9
  82. package/dist/runtime/composables/use-hs-is-mobile.d.ts +8 -2
  83. package/dist/runtime/composables/use-hs-is-mobile.js +43 -25
  84. package/dist/runtime/composables/use-hs-misc.d.ts +8 -38
  85. package/dist/runtime/composables/use-hs-misc.js +9 -61
  86. package/dist/runtime/composables/use-hs-modal.js +1 -3
  87. package/dist/runtime/composables/use-hs-multi-lang.d.ts +23 -40
  88. package/dist/runtime/composables/use-hs-multi-lang.js +30 -74
  89. package/dist/runtime/composables/use-hs-scroll-lock.d.ts +1 -1
  90. package/dist/runtime/composables/use-hs-scroll-lock.js +2 -1
  91. package/dist/runtime/composables/use-hs-toast.d.ts +2 -2
  92. package/dist/runtime/composables/use-hs-toast.js +12 -4
  93. package/dist/runtime/composables/use-pinia.d.ts +1 -0
  94. package/dist/runtime/composables/use-pinia.js +2 -0
  95. package/dist/runtime/plugin.d.ts +2 -0
  96. package/dist/runtime/plugin.js +4 -0
  97. package/dist/runtime/server/tsconfig.json +3 -3
  98. package/dist/runtime/types/dialog.d.ts +11 -20
  99. package/dist/runtime/types/dialog.js +2 -1
  100. package/dist/runtime/types/flatpickr/default.js +2 -23
  101. package/dist/runtime/types/flatpickr/ja.js +3 -37
  102. package/dist/runtime/types/toast.d.ts +1 -1
  103. package/dist/runtime/utils/dayjs.d.ts +8 -6
  104. package/dist/runtime/utils/dayjs.js +12 -5
  105. package/dist/runtime/utils/modal.d.ts +9 -28
  106. package/dist/runtime/utils/modal.js +7 -36
  107. package/dist/runtime/utils/multi-lang-object.d.ts +2 -2
  108. package/dist/runtime/utils/multi-lang-object.js +1 -5
  109. package/dist/runtime/utils/multi-lang.js +12 -22
  110. package/dist/runtime/utils/object.js +1 -1
  111. package/dist/runtime/utils/select-item.d.ts +3 -1
  112. package/dist/runtime/utils/stop-watch.js +6 -4
  113. package/dist/runtime/utils/string.js +4 -4
  114. package/dist/runtime/utils/tabulator.d.ts +1 -42
  115. package/dist/runtime/utils/tabulator.js +2 -99
  116. package/dist/runtime/utils/theme.d.ts +20 -20
  117. package/dist/runtime/utils/theme.js +180 -30
  118. package/dist/runtime/utils/tv.d.ts +1 -101
  119. package/dist/runtime/utils/tv.js +0 -22
  120. package/dist/types.d.mts +3 -1
  121. package/package.json +61 -119
  122. package/dist/module.cjs +0 -5
  123. package/dist/module.d.ts +0 -16
  124. package/dist/runtime/assets/vue-select.css +0 -1
  125. package/dist/runtime/components/misc/view-name-display-target.vue +0 -39
  126. package/dist/runtime/plugin/v-select.d.ts +0 -2
  127. package/dist/runtime/plugin/v-select.js +0 -5
  128. package/dist/runtime/style.css +0 -22
  129. package/dist/runtime/tailwind.css +0 -78
  130. package/dist/runtime/types/app.config.d.ts +0 -5
  131. package/dist/types.d.ts +0 -1
@@ -1,42 +1,27 @@
1
- <script setup lang="ts">
2
- /* ----------------------------------------------------------------------------
3
- // src\runtime\components\layout\card.vue
4
- // ----------------------------------------------------------------------------
5
- // Card
6
- // CardCard
7
- ----------------------------------------------------------------------------- */
8
-
9
- // [ NUXT ]
10
- import { computed } from "#imports";
11
- // [ tailwind ]
12
- import { twMerge } from "tailwind-merge";
13
- // [ utils ]
14
- import { type ClassType, ClassTypeToString } from "../../utils/class-style";
15
- // ----------------------------------------------------------------------------
16
- // ----------------------------------------------------------------------------
17
- interface Props {
18
- class?: ClassType;
19
- }
20
- const props = withDefaults(defineProps<Props>(), {
21
- class: "",
22
- });
23
-
24
- const baseClass = [
25
- //
26
- "relative",
27
- "flex",
28
- "flex-col",
29
- "border-[2px]",
30
- "border-white",
31
- "shadow-[0px_0px_4px_0px_#000]",
32
- ];
33
- const classStyle = computed(() => {
34
- return twMerge(baseClass, ClassTypeToString(props.class));
35
- });
36
- </script>
37
-
38
- <template>
39
- <div :class="classStyle">
40
- <slot />
41
- </div>
42
- </template>
1
+ <script setup>
2
+ import { computed } from "#imports";
3
+ import { twMerge } from "tailwind-merge";
4
+ import { ClassTypeToString } from "../../utils/class-style";
5
+ const props = defineProps({
6
+ class: { type: [String, Object, Array], required: false, default: "" }
7
+ });
8
+ const emit = defineEmits(["ref"]);
9
+ const baseClass = [
10
+ //
11
+ "relative",
12
+ "flex",
13
+ "flex-col",
14
+ "border-[2px]",
15
+ "border-white",
16
+ "shadow-[0px_0px_4px_0px_#000]"
17
+ ];
18
+ const classStyle = computed(() => {
19
+ return twMerge(baseClass, ClassTypeToString(props.class));
20
+ });
21
+ </script>
22
+
23
+ <template>
24
+ <div :ref="(e) => emit('ref', e)" :class="classStyle">
25
+ <slot />
26
+ </div>
27
+ </template>
@@ -0,0 +1,23 @@
1
+ import { type ClassType } from '../../utils/class-style.js';
2
+ interface Props {
3
+ class?: ClassType;
4
+ }
5
+ declare var __VLS_1: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_1) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
10
+ ref: (element: HTMLElement) => any;
11
+ }, string, import("vue").PublicProps, Readonly<Props> & Readonly<{
12
+ onRef?: ((element: HTMLElement) => any) | undefined;
13
+ }>, {
14
+ class: ClassType;
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
19
+ type __VLS_WithSlots<T, S> = T & {
20
+ new (): {
21
+ $slots: S;
22
+ };
23
+ };
@@ -1,40 +1,25 @@
1
- <script setup lang="ts">
2
- /* ----------------------------------------------------------------------------
3
- // src\runtime\components\layout\container.vue
4
- // ----------------------------------------------------------------------------
5
- // Container
6
- // ContainerContainer
7
- ----------------------------------------------------------------------------- */
8
-
9
- // [ NUXT ]
10
- import { computed } from "#imports";
11
- // [ tailwind ]
12
- import { twMerge } from "tailwind-merge";
13
- // [ utils ]
14
- import { type ClassType, ClassTypeToString } from "../../utils/class-style";
15
- // ----------------------------------------------------------------------------
16
- // ----------------------------------------------------------------------------
17
- interface Props {
18
- class?: ClassType;
19
- fluid?: boolean;
20
- }
21
- const props = withDefaults(defineProps<Props>(), {
22
- class: "",
23
- fluid: false,
24
- });
25
- const classStyle = computed(() => {
26
- return twMerge(
27
- "mx-auto px-2",
28
- props.fluid
29
- ? "w-full"
30
- : "w-full xs:max-w-[600px] md:max-w-[700px] lg:max-w-[950px] xl:max-w-[1200px] 2xl:max-w-[1450px]",
31
- ClassTypeToString(props.class)
32
- );
33
- });
34
- </script>
35
-
36
- <template>
37
- <div :class="classStyle">
38
- <slot />
39
- </div>
40
- </template>
1
+ <script setup>
2
+ import { computed } from "#imports";
3
+ import { twMerge } from "tailwind-merge";
4
+ import { ClassTypeToString } from "../../utils/class-style";
5
+ const props = defineProps({
6
+ class: { type: [String, Object, Array], required: false, default: "" },
7
+ fluid: { type: Boolean, required: false, default: false },
8
+ brakePoint: { type: Array, required: false, default: () => [
9
+ "xs:max-w-[600px]",
10
+ "md:max-w-[700px]",
11
+ "lg:max-w-[950px]",
12
+ "xl:max-w-[1200px]",
13
+ "2xl:max-w-[1450px]"
14
+ ] }
15
+ });
16
+ const classStyle = computed(() => {
17
+ return twMerge("mx-auto px-2 w-full", props.fluid ? "" : props.brakePoint, ClassTypeToString(props.class));
18
+ });
19
+ </script>
20
+
21
+ <template>
22
+ <div :class="classStyle">
23
+ <slot />
24
+ </div>
25
+ </template>
@@ -0,0 +1,35 @@
1
+ import { type ClassType } from '../../utils/class-style.js';
2
+ interface Props {
3
+ class?: ClassType;
4
+ fluid?: boolean;
5
+ /**
6
+ * default
7
+ * ```javascript
8
+ * const brakePoint= [
9
+ * 'xs:max-w-[600px]',
10
+ * 'md:max-w-[700px]',
11
+ * 'lg:max-w-[950px]',
12
+ * 'xl:max-w-[1200px]',
13
+ * '2xl:max-w-[1450px]',
14
+ * ]
15
+ * ```
16
+ */
17
+ brakePoint?: string[];
18
+ }
19
+ declare var __VLS_1: {};
20
+ type __VLS_Slots = {} & {
21
+ default?: (props: typeof __VLS_1) => any;
22
+ };
23
+ declare const __VLS_base: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
24
+ class: ClassType;
25
+ fluid: boolean;
26
+ brakePoint: string[];
27
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
29
+ declare const _default: typeof __VLS_export;
30
+ export default _default;
31
+ type __VLS_WithSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };
@@ -1,52 +1,32 @@
1
- <script setup lang="ts">
2
- /* ----------------------------------------------------------------------------
3
- // src\runtime\components\layout\divider-h.vue
4
- // ----------------------------------------------------------------------------
5
- // DividerH
6
- // DividerHDividerH
7
- ----------------------------------------------------------------------------- */
8
- // [ tailwind ]
9
- import { twMerge } from "tailwind-merge";
10
- // [ NUXT ]
11
- import { computed } from "#imports";
12
- // [ utils ]
13
- import { type ClassType, ClassTypeToString } from "../../utils/class-style";
14
- import { Theme, GetGolorCode } from "../../utils/theme";
15
- // ----------------------------------------------------------------------------
16
-
17
- // [ Props ]
18
- interface Props {
19
- theme?: Theme;
20
- size?: number;
21
- span1?: number;
22
- span2?: number;
23
- class?: ClassType;
24
- }
25
- const props = withDefaults(defineProps<Props>(), {
26
- theme: Theme.main2,
27
- size: 2,
28
- span1: 4,
29
- span2: 8,
30
- class: "",
31
- });
32
-
33
- const style = computed(() => {
34
- return [
35
- `--main-color:${GetGolorCode(props.theme)};`,
36
- `--size:${props.size}px;`,
37
- `--span1:${props.span1}px;`,
38
- `--span2:${props.span2}px;`,
39
- ];
40
- });
41
- const classStyle = computed(() => {
42
- return twMerge("h-[var(--size)] w-full", ClassTypeToString(props.class));
43
- });
44
- </script>
45
-
46
- <template>
47
- <div class="divider" :class="classStyle" :style="style"></div>
48
- </template>
49
-
1
+ <script setup>
2
+ import { twMerge } from "tailwind-merge";
3
+ import { computed } from "#imports";
4
+ import { ClassTypeToString } from "../../utils/class-style";
5
+ import { Theme, GetColorCode } from "../../utils/theme";
6
+ const props = defineProps({
7
+ theme: { type: null, required: false, default: Theme.main0 },
8
+ size: { type: Number, required: false, default: 2 },
9
+ span1: { type: Number, required: false, default: 4 },
10
+ span2: { type: Number, required: false, default: 8 },
11
+ class: { type: [String, Object, Array], required: false, default: "" }
12
+ });
13
+ const style = computed(() => {
14
+ return [
15
+ `--main-color:${GetColorCode(props.theme)};`,
16
+ `--size:${props.size}px;`,
17
+ `--span1:${props.span1}px;`,
18
+ `--span2:${props.span2}px;`
19
+ ];
20
+ });
21
+ const classStyle = computed(() => {
22
+ return twMerge("h-[var(--size)] w-full", ClassTypeToString(props.class));
23
+ });
24
+ </script>
25
+
26
+ <template>
27
+ <div class="divider" :class="classStyle" :style="style"></div>
28
+ </template>
29
+
50
30
  <style scoped>
51
31
  .divider {
52
32
  background-image: linear-gradient(to right, var(--main-color), var(--main-color) var(--span1), transparent var(--span1), transparent var(--span2));
@@ -54,4 +34,4 @@ const classStyle = computed(() => {
54
34
  background-repeat: repeat-x;
55
35
  background-position: left bottom;
56
36
  }
57
- </style>
37
+ </style>
@@ -0,0 +1,18 @@
1
+ import { type ClassType } from '../../utils/class-style.js';
2
+ import { type ThemeColor } from '../../utils/theme.js';
3
+ interface Props {
4
+ theme?: ThemeColor;
5
+ size?: number;
6
+ span1?: number;
7
+ span2?: number;
8
+ class?: ClassType;
9
+ }
10
+ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
11
+ size: number;
12
+ theme: ThemeColor;
13
+ class: ClassType;
14
+ span1: number;
15
+ span2: number;
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
@@ -1,83 +1,49 @@
1
- <script setup lang="ts">
2
- /* ----------------------------------------------------------------------------
3
- // src\runtime\components\misc\breadcrumb.vue
4
- // ----------------------------------------------------------------------------
5
- // Breadcrumb
6
- // BreadcrumbBreadcrumb
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
-
16
- import Card from "../layout/card.vue";
17
- import CardItem from "../layout/card-item.vue";
18
- import type { MultiLang } from "../../utils/multi-lang";
19
- import { useHsMultiLang } from "../../composables/use-hs-multi-lang";
20
- // ----------------------------------------------------------------------------
21
-
22
- interface Props {
23
- class?: ClassType;
24
- links: { label: MultiLang; to?: string; icon?: string }[];
25
- classLink?: ClassType;
26
- classUnlink?: ClassType;
27
- }
28
- const props = withDefaults(defineProps<Props>(), {
29
- class: "",
30
- classLink: "",
31
- classUnlink: "",
32
- });
33
- // ----------------------------------------------------------------------------
34
- const multiLang = useHsMultiLang();
35
- const tx = multiLang.tx;
36
- // ----------------------------------------------------------------------------
37
-
38
- const classStyle = computed(() => {
39
- return twMerge(`w-full min-w-0`, ClassTypeToString(props.class));
40
- });
41
- const classStyleLink = computed(() => {
42
- return twMerge(`text-main1`, ClassTypeToString(props.classLink));
43
- });
44
- const classStyleUnlink = computed(() => {
45
- return twMerge(`text-gray-600`, ClassTypeToString(props.classUnlink));
46
- });
47
- </script>
48
-
49
- <template>
50
- <Card :class="classStyle">
51
- <CardItem
52
- class="px-1 py-1 sm:px-4 sm:py-1 min-w-0 h-full flex-c"
53
- theme="back"
54
- variant="body"
55
- >
56
- <div class="flex flex-wrap gap-[2px] sm:gap-[4px] max-w-full">
57
- <template v-for="(item, index) in props.links" :key="index">
58
- <div class="truncate min-w-0 w-full sm:w-auto">
59
- <NuxtLink
60
- v-if="item.to !== undefined"
61
- :to="item.to"
62
- :class="[classStyleLink, { hasBefore: index !== 0 }]"
63
- >
64
- <i v-if="item.icon" :class="item.icon"></i>
65
- {{ tx(item.label) }}
66
- </NuxtLink>
67
- <span
68
- v-else
69
- :class="[classStyleUnlink, { hasBefore: index !== 0 }]"
70
- >
71
- <i v-if="item.icon" :class="item.icon"></i>
72
- {{ tx(item.label) }}
73
- </span>
74
- </div>
75
- </template>
76
- </div>
77
- </CardItem>
78
- </Card>
79
- </template>
80
-
1
+ <script setup>
2
+ import { twMerge } from "tailwind-merge";
3
+ import { computed } from "#imports";
4
+ import { ClassTypeToString } from "../../utils/class-style";
5
+ import Card from "../layout/card.vue";
6
+ import CardItem from "../layout/card-item.vue";
7
+ import { Theme } from "../../utils/theme";
8
+ const props = defineProps({
9
+ class: { type: [String, Object, Array], required: false, default: "" },
10
+ links: { type: Array, required: true },
11
+ classLink: { type: [String, Object, Array], required: false, default: "" },
12
+ classUnlink: { type: [String, Object, Array], required: false, default: "" },
13
+ theme: { type: null, required: false, default: Theme.back1 }
14
+ });
15
+ const classStyle = computed(() => {
16
+ return twMerge(`w-full min-w-0`, ClassTypeToString(props.class));
17
+ });
18
+ const classStyleLink = computed(() => {
19
+ return twMerge(`!text-link`, "relative", ClassTypeToString(props.classLink));
20
+ });
21
+ const classStyleUnlink = computed(() => {
22
+ return twMerge(`text-gray-600`, ClassTypeToString(props.classUnlink));
23
+ });
24
+ </script>
25
+
26
+ <template>
27
+ <Card :class="classStyle">
28
+ <CardItem class="px-1 py-1 min-w-0 h-full" :theme="props.theme" variant="body">
29
+ <div class="flex flex-wrap gap-[2px] max-w-full relative items-center min-h-full">
30
+ <template v-for="(item, index) in props.links" :key="index">
31
+ <div class="truncate min-w-0 w-auto relative text-link">
32
+ <NuxtLink v-if="item.to !== void 0" :to="item.to" :class="[classStyleLink, { hasBefore: index !== 0 }]">
33
+ <i v-if="item.icon" :class="item.icon"></i>
34
+ {{ item.label }}
35
+ </NuxtLink>
36
+ <span v-else :class="[classStyleUnlink, { hasBefore: index !== 0 }]">
37
+ <i v-if="item.icon" :class="item.icon"></i>
38
+ {{ item.label }}
39
+ </span>
40
+ </div>
41
+ </template>
42
+ </div>
43
+ </CardItem>
44
+ </Card>
45
+ </template>
46
+
81
47
  <style scoped>
82
48
  .hasBefore {
83
49
  padding-left: calc(1em + 4px);
@@ -95,18 +61,4 @@ const classStyleUnlink = computed(() => {
95
61
  justify-content: center;
96
62
  align-items: center;
97
63
  }
98
-
99
- .hov::before {
100
- content: "";
101
- position: absolute;
102
- inset: auto auto 0 0;
103
- width: 0;
104
- height: 1px;
105
- background-color: white;
106
- transition: all 300ms ease;
107
- }
108
-
109
- .hov:hover::before {
110
- width: 100%;
111
- }
112
- </style>
64
+ </style>
@@ -0,0 +1,22 @@
1
+ import { type ClassType } from '../../utils/class-style.js';
2
+ import type { MultiLang } from '../../utils/multi-lang.js';
3
+ import { type ThemeColor } from '../../utils/theme.js';
4
+ interface Props {
5
+ class?: ClassType;
6
+ links: {
7
+ label: MultiLang;
8
+ to?: string;
9
+ icon?: string;
10
+ }[];
11
+ classLink?: ClassType;
12
+ classUnlink?: ClassType;
13
+ theme?: ThemeColor;
14
+ }
15
+ declare const __VLS_export: import("vue").DefineComponent<Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<Props> & Readonly<{}>, {
16
+ theme: ThemeColor;
17
+ class: ClassType;
18
+ classLink: ClassType;
19
+ classUnlink: ClassType;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ declare const _default: typeof __VLS_export;
22
+ export default _default;