pukaad-ui-lib 1.450.0 → 1.450.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 (60) hide show
  1. package/dist/module.json +1 -1
  2. package/dist/runtime/components/card/card-blog.vue +2 -2
  3. package/dist/runtime/components/card/card-review.vue +2 -2
  4. package/dist/runtime/components/card/card-user/card-user-blog.vue +2 -2
  5. package/dist/runtime/components/comment.vue +3 -3
  6. package/dist/runtime/components/data-table.d.vue.ts +2 -2
  7. package/dist/runtime/components/data-table.vue.d.ts +2 -2
  8. package/dist/runtime/components/display/display-video.d.vue.ts +1 -1
  9. package/dist/runtime/components/display/display-video.vue.d.ts +1 -1
  10. package/dist/runtime/components/input/input-address.d.vue.ts +2 -2
  11. package/dist/runtime/components/input/input-address.vue.d.ts +2 -2
  12. package/dist/runtime/components/input/input-autocomplete.d.vue.ts +1 -1
  13. package/dist/runtime/components/input/input-autocomplete.vue.d.ts +1 -1
  14. package/dist/runtime/components/input/input-birth-date.d.vue.ts +1 -1
  15. package/dist/runtime/components/input/input-birth-date.vue.d.ts +1 -1
  16. package/dist/runtime/components/input/input-chat.d.vue.ts +1 -1
  17. package/dist/runtime/components/input/input-chat.vue.d.ts +1 -1
  18. package/dist/runtime/components/input/input-date-picker.d.vue.ts +1 -1
  19. package/dist/runtime/components/input/input-date-picker.vue.d.ts +1 -1
  20. package/dist/runtime/components/input/input-file.d.vue.ts +2 -2
  21. package/dist/runtime/components/input/input-file.vue.d.ts +2 -2
  22. package/dist/runtime/components/input/input-localized-name.d.vue.ts +1 -1
  23. package/dist/runtime/components/input/input-localized-name.vue.d.ts +1 -1
  24. package/dist/runtime/components/input/input-password.d.vue.ts +1 -1
  25. package/dist/runtime/components/input/input-password.vue.d.ts +1 -1
  26. package/dist/runtime/components/input/input-radio.d.vue.ts +1 -1
  27. package/dist/runtime/components/input/input-radio.vue.d.ts +1 -1
  28. package/dist/runtime/components/input/input-tag-modal.d.vue.ts +1 -1
  29. package/dist/runtime/components/input/input-tag-modal.vue.d.ts +1 -1
  30. package/dist/runtime/components/input/input-tag.d.vue.ts +1 -1
  31. package/dist/runtime/components/input/input-tag.vue.d.ts +1 -1
  32. package/dist/runtime/components/input/input-textarea.d.vue.ts +1 -1
  33. package/dist/runtime/components/input/input-textarea.vue.d.ts +1 -1
  34. package/dist/runtime/components/modal/modal-media-view.vue +3 -3
  35. package/dist/runtime/components/table.d.vue.ts +1 -1
  36. package/dist/runtime/components/table.vue.d.ts +1 -1
  37. package/dist/runtime/components/video.d.vue.ts +1 -1
  38. package/dist/runtime/components/video.vue.d.ts +1 -1
  39. package/dist/runtime/composables/store-notification.d.ts +1 -1
  40. package/dist/runtime/composables/useConvert.d.ts +2 -1
  41. package/dist/runtime/composables/useConvert.js +2 -1
  42. package/package.json +1 -1
  43. package/dist/runtime/components/data-list.d.vue.ts +0 -55
  44. package/dist/runtime/components/data-list.vue +0 -78
  45. package/dist/runtime/components/data-list.vue.d.ts +0 -55
  46. package/dist/runtime/components/input/input-media.d.vue.ts +0 -22
  47. package/dist/runtime/components/input/input-media.vue +0 -141
  48. package/dist/runtime/components/input/input-media.vue.d.ts +0 -22
  49. package/dist/runtime/components/list/list-menu.d.vue.ts +0 -93
  50. package/dist/runtime/components/list/list-menu.vue +0 -33
  51. package/dist/runtime/components/list/list-menu.vue.d.ts +0 -93
  52. package/dist/runtime/components/modal/modal-review-detail.d.vue.ts +0 -21
  53. package/dist/runtime/components/modal/modal-review-detail.vue +0 -192
  54. package/dist/runtime/components/modal/modal-review-detail.vue.d.ts +0 -21
  55. package/dist/runtime/components/profile-cover.d.vue.ts +0 -3
  56. package/dist/runtime/components/profile-cover.vue +0 -86
  57. package/dist/runtime/components/profile-cover.vue.d.ts +0 -3
  58. package/dist/runtime/components/tab_old.d.vue.ts +0 -48
  59. package/dist/runtime/components/tab_old.vue +0 -176
  60. package/dist/runtime/components/tab_old.vue.d.ts +0 -48
@@ -1,192 +0,0 @@
1
- <template>
2
- <Modal
3
- v-model="modelValue"
4
- :title="props.title"
5
- :width="1280"
6
- divider
7
- @close="onClosed"
8
- >
9
- <Carousel
10
- :items="props.items"
11
- :select-index="currentIndex"
12
- @clicked-image="switcComment = false"
13
- :width="1280"
14
- :height="768"
15
- >
16
- <Card v-if="switcComment" full-width>
17
- <div class="flex gap-[16px] max-h-[318px]">
18
- <div>
19
- <!-- <Avatar :src="props.review.user?.avatar" :name="props.review.user?.name" /> -->
20
- </div>
21
- <div class="flex flex-col gap-[8px] w-full">
22
- <div class="flex flex-col gap-[2px]">
23
- <div class="flex justify-between items-center">
24
- <div class="font-body-large">{{ props.review.user?.name }}</div>
25
- <div class="flex gap-[8px] items-center">
26
- <Button
27
- type="text"
28
- :variant="liked ? 'primary' : 'black'"
29
- :icon-size="20"
30
- size="tiny"
31
- :prepend-icon="
32
- liked ? 'pukaad:thumbs-up-solid' : 'pukaad:thumbs-up-regular'
33
- "
34
- :aria-pressed="liked"
35
- @click="toggleLike"
36
- disabled-padding
37
- >
38
- <div>
39
- {{ likeCount }}
40
- </div>
41
- </Button>
42
- <PickerOptionMenuUser :state="menuType" disabled-padding />
43
- </div>
44
- </div>
45
- <div class="flex flex-col gap-[6px]">
46
- <div class="font-body-small">
47
- {{ props.review.user?.review_count }} รีวิว •
48
- {{ props.review.user?.like_count }} ชื่นชอบรีวิว
49
- </div>
50
- <div class="flex gap-[8px] items-center">
51
- <InputRating
52
- :size="16"
53
- readonly
54
- :model-value="props.review.review?.rating"
55
- />
56
- <div class="font-body-small">
57
- {{ props.review.review?.created_at }}
58
- </div>
59
- </div>
60
- </div>
61
- </div>
62
- <div
63
- v-if="props.review.review?.description"
64
- class="font-body-large max-h-[208px] overflow-y-auto"
65
- >
66
- {{ props.review.review?.description }}
67
- </div>
68
- </div>
69
- </div>
70
- </Card>
71
- <div
72
- v-else
73
- class="w-full bg-gradient-to-b from-transparent to-black/70 p-[16px] text-white flex gap-[16px]"
74
- >
75
- <div>
76
- <!-- <Avatar
77
- :src="props.review.user?.avatar"
78
- :name="props.review.user?.name"
79
- /> -->
80
- </div>
81
- <div class="flex flex-col gap-[8px] w-full">
82
- <div class="flex flex-col gap-[2px]">
83
- <div class="flex justify-between items-center">
84
- <div class="font-body-large">{{ props.review.user?.name }}</div>
85
- <div class="flex gap-[8px] items-center">
86
- <Button variant="text" disabled-padding @click="toggleComment">
87
- <Icon
88
- name="lucide:message-square-warning"
89
- :size="20"
90
- color="white"
91
- />
92
- </Button>
93
- </div>
94
- </div>
95
- <div class="flex flex-col gap-[6px]">
96
- <div class="font-body-small">
97
- {{ props.review.user?.review_count }} รีวิว •
98
- {{ props.review.user?.like_count }} ชื่นชอบรีวิว
99
- </div>
100
- <div class="flex gap-[8px] items-center">
101
- <InputRating
102
- :size="16"
103
- readonly
104
- :model-value="props.review.review?.rating"
105
- />
106
- <div class="font-body-small">
107
- {{ props.review.review?.created_at }}
108
- </div>
109
- </div>
110
- </div>
111
- </div>
112
- <div
113
- v-if="props.review.review?.description"
114
- class="font-body-large line-clamp-1"
115
- >
116
- {{ props.review.review?.description }}
117
- </div>
118
- </div>
119
- </div>
120
- </Carousel>
121
- </Modal>
122
- </template>
123
-
124
- <script setup>
125
- import { ref, watch, computed } from "vue";
126
- import Carousel from "../carousel.vue";
127
- const modelValue = defineModel({ type: Boolean, ...{ default: false } });
128
- const switcComment = ref(false);
129
- const emit = defineEmits(["toggle-like"]);
130
- const props = defineProps({
131
- title: { type: String, required: true, default: "\u0E41\u0E2A\u0E14\u0E07\u0E2A\u0E37\u0E48\u0E2D" },
132
- items: { type: Array, required: true, default: () => [] },
133
- review: { type: Object, required: true, default: () => ({
134
- review_id: "0",
135
- user: {
136
- user_id: "0",
137
- name: "Guest",
138
- avatar: "",
139
- path_name: "",
140
- review_count: 0,
141
- like_count: 0
142
- },
143
- review: {
144
- rating: 0,
145
- created_at: "",
146
- description: "",
147
- like_count: 0,
148
- liked: false
149
- }
150
- }) },
151
- selectIndex: { type: Number, required: true, default: 0 },
152
- isProfile: { type: Boolean, required: true, default: false }
153
- });
154
- const currentIndex = ref(props.selectIndex);
155
- const liked = ref(props.review.review.liked);
156
- const likeCount = ref(props.review.review.like_count);
157
- function onClosed() {
158
- modelValue.value = false;
159
- currentIndex.value = props.selectIndex;
160
- switcComment.value = false;
161
- }
162
- function toggleLike() {
163
- if (liked.value) {
164
- likeCount.value -= 1;
165
- liked.value = false;
166
- } else {
167
- likeCount.value += 1;
168
- liked.value = true;
169
- }
170
- emit("toggle-like", props.review.review_id, liked.value);
171
- }
172
- function toggleComment() {
173
- switcComment.value = !switcComment.value;
174
- }
175
- const menuType = computed(() => props.isProfile ? "my-profile" : "profile");
176
- watch(
177
- () => props.selectIndex,
178
- (newVal) => currentIndex.value = newVal
179
- );
180
- watch(
181
- () => props.review.review.liked,
182
- (newVal) => {
183
- liked.value = newVal;
184
- }
185
- );
186
- watch(
187
- () => props.review.review.like_count,
188
- (newVal) => {
189
- likeCount.value = newVal;
190
- }
191
- );
192
- </script>
@@ -1,21 +0,0 @@
1
- import type { ModalReviewDetailProps } from "#pukaad-ui/types/components/modal/modal-review-detail";
2
- type __VLS_Props = ModalReviewDetailProps;
3
- type __VLS_ModelProps = {
4
- modelValue?: boolean;
5
- };
6
- type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
7
- declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
8
- "update:modelValue": (value: boolean) => any;
9
- "toggle-like": (reviewId: string, liked: boolean) => any;
10
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
11
- "onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
12
- "onToggle-like"?: ((reviewId: string, liked: boolean) => any) | undefined;
13
- }>, {
14
- title: string;
15
- items: string[];
16
- selectIndex: number;
17
- isProfile: boolean;
18
- review: import("../../../types/components/card/card-review.js").CardReviewProps;
19
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
20
- declare const _default: typeof __VLS_export;
21
- export default _default;
@@ -1,3 +0,0 @@
1
- declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
- declare const _default: typeof __VLS_export;
3
- export default _default;
@@ -1,86 +0,0 @@
1
- <template>
2
- <!-- <div class="h-[512px] w-full">
3
- <div class="relative">
4
- <Image :height="512" />
5
- <div class="absolute bottom-[24px] right-[24px]" v-if="props.isMyProfile">
6
- <PickerImageCoverProfile />
7
- </div>
8
- </div>
9
- <div class="relative w-full p-[24px] pl-[200px]">
10
- <div
11
- class="absolute left-[24px] top-[-86px] flex justify-center p-[24px]"
12
- >
13
- <div class="relative">
14
- <Avatar :size="128" class="border-[6px] border-white" />
15
- <div class="absolute bottom-0 right-0" v-if="props.isMyProfile">
16
- <PickerImageProfile>
17
- <Button
18
- circle
19
- size="small"
20
- :icon-size="20"
21
- prepend-icon="lucide:camera"
22
- />
23
- </PickerImageProfile>
24
- </div>
25
- </div>
26
- </div>
27
- <div class="flex gap-[100px]">
28
- <div class="flex flex-col gap-[8px] w-full">
29
- <div class="inline-flex flex-wrap items-center gap-[16px]">
30
- <div class="font-headline-medium-prominent">
31
- {{ props.item?.profile_name || props.item?.id || "-" }}
32
- </div>
33
- <Icon name="pukaad:verify" size="20" />
34
- </div>
35
- <div class="flex gap-[24px] text-gray font-body-large">
36
- <div
37
- v-for="info in infoToShow"
38
- :key="info.label"
39
- class="flex gap-[4px]"
40
- >
41
- {{ info.label }}
42
- <div class="text-black">{{ info.value }}</div>
43
- </div>
44
- </div>
45
- </div>
46
- <div class="flex gap-[16px] items-center">
47
- <template v-if="props.isMyProfile">
48
- <Button
49
- prepend-icon="lucide:plus"
50
- :icon-size="20"
51
- color="primary"
52
- @click="emit('create-post')"
53
- >
54
- สร้างโพสต์
55
- </Button>
56
- <PickerOptionMenuUser state="my-profile" disabled-padding />
57
- </template>
58
- <template v-else>
59
- <Button
60
- prepend-icon="lucide:message-circle"
61
- :icon-size="20"
62
- color="primary"
63
- @click="emit('chat')"
64
- >
65
- แชท
66
- </Button>
67
- <Button
68
- v-if="!props.isMyProfile"
69
- prepend-icon="lucide:user-round-plus"
70
- :icon-size="20"
71
- variant="outline"
72
- @click="emit('follow')"
73
- >
74
- ติดตาม
75
- </Button>
76
- <PickerOptionMenuUser state="profile" disabled-padding />
77
- </template>
78
- </div>
79
- </div>
80
- </div>
81
- </div> -->
82
- </template>
83
-
84
- <script setup>
85
-
86
- </script>
@@ -1,3 +0,0 @@
1
- declare const __VLS_export: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
2
- declare const _default: typeof __VLS_export;
3
- export default _default;
@@ -1,48 +0,0 @@
1
- import type { TabProps, TabColor, TabVariant } from "#pukaad-ui/types/components/tab";
2
- type __VLS_Props = TabProps;
3
- type __VLS_ModelProps = {
4
- modelValue?: string | number;
5
- };
6
- type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
7
- declare var __VLS_7: `tab-${any}-label`, __VLS_8: {
8
- active: boolean;
9
- disabled: any;
10
- }, __VLS_11: `tab-${any}-label-text`, __VLS_12: {}, __VLS_15: `tab-${any}-label-text-prepend-icon`, __VLS_16: {}, __VLS_24: `tab-${any}-label-text-word`, __VLS_25: {}, __VLS_28: `tab-${any}-label-text-append-icon`, __VLS_29: {}, __VLS_47: `tab-content-${any}`, __VLS_48: {
11
- active: boolean;
12
- };
13
- type __VLS_Slots = {} & {
14
- [K in NonNullable<typeof __VLS_7>]?: (props: typeof __VLS_8) => any;
15
- } & {
16
- [K in NonNullable<typeof __VLS_11>]?: (props: typeof __VLS_12) => any;
17
- } & {
18
- [K in NonNullable<typeof __VLS_15>]?: (props: typeof __VLS_16) => any;
19
- } & {
20
- [K in NonNullable<typeof __VLS_24>]?: (props: typeof __VLS_25) => any;
21
- } & {
22
- [K in NonNullable<typeof __VLS_28>]?: (props: typeof __VLS_29) => any;
23
- } & {
24
- [K in NonNullable<typeof __VLS_47>]?: (props: typeof __VLS_48) => any;
25
- };
26
- declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
27
- "update:modelValue": (value: string | number | undefined) => any;
28
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
29
- "onUpdate:modelValue"?: ((value: string | number | undefined) => any) | undefined;
30
- }>, {
31
- variant: TabVariant;
32
- color: TabColor;
33
- items: Item[];
34
- disabledHeader: boolean;
35
- tabButtonSize: import("#pukaad-ui/types/components/tab").TabButtonSize;
36
- tabButtonGap: string | number;
37
- changeTabContentReset: boolean;
38
- disabledHeaderDivider: boolean;
39
- disabledContent: boolean;
40
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
41
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
42
- declare const _default: typeof __VLS_export;
43
- export default _default;
44
- type __VLS_WithSlots<T, S> = T & {
45
- new (): {
46
- $slots: S;
47
- };
48
- };
@@ -1,176 +0,0 @@
1
- <template>
2
- <div v-if="!props.disabledHeader">
3
- <div class="relative">
4
- <button
5
- v-if="!isTabScrollLeft"
6
- :class="[
7
- 'absolute flex items-center justify-start left-0 top-1/2 transform -translate-y-1/2',
8
- 'bg-gradient-to-r from-white via-white to-transparent w-12 cursor-pointer',
9
- buttonSize
10
- ]"
11
- @click="onScrollLeft"
12
- >
13
- <Icon name="mdi:chevron-left" size="24" />
14
- </button>
15
-
16
- <div
17
- ref="tabHeaderRef"
18
- class="flex overflow-x-hidden"
19
- :style="{
20
- columnGap: `${props.tabButtonGap}px`
21
- }"
22
- >
23
- <div v-for="(tab, i) in items" :key="i" @click="activeTab = tab.value">
24
- <slot
25
- :name="`tab-${tab.value}-label`"
26
- :active="activeTab == tab.value"
27
- :disabled="tab.disabled"
28
- >
29
- <button
30
- :class="[
31
- 'flex items-center justify-center font-body-large p-[16px] gap-[8px] text-nowrap',
32
- 'cursor-pointer disabled:cursor-not-allowed',
33
- tab.disabled ? 'text-cloud' : 'text-gray',
34
- color(tab.value),
35
- buttonSize
36
- ]"
37
- :disabled="tab.disabled"
38
- >
39
- <slot :name="`tab-${tab.value}-label-text`">
40
- <slot
41
- v-if="
42
- $slots[`tab-${tab.value}-label-text-prepend-icon`] || props.tabButtonPrependIcon
43
- "
44
- :name="`tab-${tab.value}-label-text-prepend-icon`"
45
- >
46
- <Icon :name="props.tabButtonPrependIcon" />
47
- </slot>
48
- <slot :name="`tab-${tab.value}-label-text-word`">
49
- {{ tab.label }}
50
- </slot>
51
- <slot
52
- v-if="
53
- $slots[`tab-${tab.value}-label-text-append-icon`] || props.tabButtonAppendIcon
54
- "
55
- :name="`tab-${tab.value}-label-text-append-icon`"
56
- >
57
- <Icon :name="props.tabButtonAppendIcon" />
58
- </slot>
59
- </slot>
60
- </button>
61
- </slot>
62
- </div>
63
- </div>
64
-
65
- <button
66
- v-if="!isTabScrollRight"
67
- :class="[
68
- 'absolute flex items-center justify-end right-0 top-1/2 transform -translate-y-1/2',
69
- 'bg-gradient-to-l from-white via-white to-transparent w-12 cursor-pointer',
70
- buttonSize
71
- ]"
72
- @click="onScrollRight"
73
- >
74
- <Icon name="mdi:chevron-right" size="24" />
75
- </button>
76
- </div>
77
-
78
- <Divider
79
- v-if="!props.disabledHeaderDivider && props.variant == 'text'"
80
- class="mt-[-2px]"
81
- />
82
- </div>
83
-
84
- <div
85
- v-if="!props.disabledContent"
86
- v-for="(content, i_content) in items"
87
- :key="i_content"
88
- v-show="activeTab == content.value"
89
- :style="{
90
- marginTop: !props.disabledHeader ? `${props.tabContentGab}px` : '0px'
91
- }"
92
- >
93
- <slot
94
- :name="`tab-content-${content.value}`"
95
- :active="activeTab == content.value"
96
- >
97
- <div class="font-body-medium">
98
- {{ content.content }}
99
- </div>
100
- </slot>
101
- </div>
102
- </template>
103
-
104
- <script setup>
105
- import { ref, computed, onMounted } from "vue";
106
- import { useScroll } from "@vueuse/core";
107
- const props = defineProps({
108
- items: { type: Array, required: false, default: () => [] },
109
- color: { type: String, required: false, default: "primary" },
110
- variant: { type: String, required: false, default: "button" },
111
- tabButtonPrependIcon: { type: String, required: false },
112
- tabButtonAppendIcon: { type: String, required: false },
113
- tabButtonSize: { type: String, required: false, default: "medium" },
114
- tabButtonGap: { type: [String, Number], required: false, default: 8 },
115
- tabContentGab: { type: null, required: false },
116
- changeTabContentReset: { type: Boolean, required: false, default: false },
117
- disabledHeader: { type: Boolean, required: false, default: false },
118
- disabledHeaderDivider: { type: Boolean, required: false, default: false },
119
- disabledContent: { type: Boolean, required: false, default: false }
120
- });
121
- const tabHeaderRef = ref(null);
122
- const activeTab = defineModel({ type: [String, Number] });
123
- const items = computed(() => {
124
- return props.items?.filter((item) => !item.hidden);
125
- });
126
- const color = (tab) => {
127
- if (activeTab.value == tab) {
128
- const colors = {
129
- primary: {
130
- button: "font-body-large-prominent text-primary bg-info rounded-[8px] ",
131
- text: " font-body-large-prominent text-primary border-b-[2px] border-primary",
132
- outline: "font-body-large-prominent text-primary border-[1px] rounded-full"
133
- },
134
- black: {
135
- button: "font-body-large-prominent bg-dark text-white rounded-[8px]",
136
- text: "font-body-large-prominent border-b-[2px] text-black",
137
- outline: "font-body-large-prominent border-[1px] border-black rounded-full text-black "
138
- }
139
- };
140
- return colors[props.color]?.[props.variant];
141
- } else {
142
- const types = {
143
- button: "bg-bright rounded-[8px]",
144
- outline: "rounded-[8px] border-[1px] border-mercury rounded-full ",
145
- text: ""
146
- };
147
- return types[props.variant];
148
- }
149
- };
150
- const buttonSize = computed(() => {
151
- const sizes = {
152
- small: "h-[32px]",
153
- medium: "h-[40px]",
154
- large: "h-[48px]"
155
- };
156
- return sizes[props.tabButtonSize];
157
- });
158
- const { x, arrivedState } = useScroll(tabHeaderRef, {
159
- behavior: "smooth"
160
- });
161
- const onScrollLeft = () => {
162
- x.value -= 100;
163
- };
164
- const onScrollRight = () => {
165
- x.value += 100;
166
- };
167
- const isTabScrollLeft = computed(() => {
168
- return arrivedState.left;
169
- });
170
- const isTabScrollRight = computed(() => arrivedState.right);
171
- onMounted(() => {
172
- if (!activeTab.value) {
173
- activeTab.value = props.items[0]?.value;
174
- }
175
- });
176
- </script>
@@ -1,48 +0,0 @@
1
- import type { TabProps, TabColor, TabVariant } from "#pukaad-ui/types/components/tab";
2
- type __VLS_Props = TabProps;
3
- type __VLS_ModelProps = {
4
- modelValue?: string | number;
5
- };
6
- type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
7
- declare var __VLS_7: `tab-${any}-label`, __VLS_8: {
8
- active: boolean;
9
- disabled: any;
10
- }, __VLS_11: `tab-${any}-label-text`, __VLS_12: {}, __VLS_15: `tab-${any}-label-text-prepend-icon`, __VLS_16: {}, __VLS_24: `tab-${any}-label-text-word`, __VLS_25: {}, __VLS_28: `tab-${any}-label-text-append-icon`, __VLS_29: {}, __VLS_47: `tab-content-${any}`, __VLS_48: {
11
- active: boolean;
12
- };
13
- type __VLS_Slots = {} & {
14
- [K in NonNullable<typeof __VLS_7>]?: (props: typeof __VLS_8) => any;
15
- } & {
16
- [K in NonNullable<typeof __VLS_11>]?: (props: typeof __VLS_12) => any;
17
- } & {
18
- [K in NonNullable<typeof __VLS_15>]?: (props: typeof __VLS_16) => any;
19
- } & {
20
- [K in NonNullable<typeof __VLS_24>]?: (props: typeof __VLS_25) => any;
21
- } & {
22
- [K in NonNullable<typeof __VLS_28>]?: (props: typeof __VLS_29) => any;
23
- } & {
24
- [K in NonNullable<typeof __VLS_47>]?: (props: typeof __VLS_48) => any;
25
- };
26
- declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
27
- "update:modelValue": (value: string | number | undefined) => any;
28
- }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
29
- "onUpdate:modelValue"?: ((value: string | number | undefined) => any) | undefined;
30
- }>, {
31
- variant: TabVariant;
32
- color: TabColor;
33
- items: Item[];
34
- disabledHeader: boolean;
35
- tabButtonSize: import("#pukaad-ui/types/components/tab").TabButtonSize;
36
- tabButtonGap: string | number;
37
- changeTabContentReset: boolean;
38
- disabledHeaderDivider: boolean;
39
- disabledContent: boolean;
40
- }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
41
- declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
42
- declare const _default: typeof __VLS_export;
43
- export default _default;
44
- type __VLS_WithSlots<T, S> = T & {
45
- new (): {
46
- $slots: S;
47
- };
48
- };