@unsource/ui 1.6.0 → 1.7.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.
- package/dist/module.json +1 -1
- package/dist/runtime/components/UnCard.d.vue.ts +7 -6
- package/dist/runtime/components/UnCard.vue +12 -12
- package/dist/runtime/components/UnCard.vue.d.ts +7 -6
- package/dist/runtime/components/UnCollapsible.d.vue.ts +34 -0
- package/dist/runtime/components/UnCollapsible.vue +40 -0
- package/dist/runtime/components/UnCollapsible.vue.d.ts +34 -0
- package/dist/runtime/components/UnList.d.vue.ts +3 -3
- package/dist/runtime/components/UnList.vue +11 -24
- package/dist/runtime/components/UnList.vue.d.ts +3 -3
- package/dist/runtime/components/UnTab.vue +9 -4
- package/package.json +1 -1
package/dist/module.json
CHANGED
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
export type CardCustomClass = Record<'main' | 'inside' | 'logoName' | 'name' | 'desc' | 'body' | 'logo' | 'slider' | 'sliderWrapper' | 'sliderSlides' | 'title' | 'titleText' | 'tags' | 'tag' | 'description' | 'footer' | 'imagesItem' | 'image' | 'avatar', string
|
|
1
|
+
export type CardCustomClass = Partial<Record<'main' | 'inside' | 'logoName' | 'name' | 'desc' | 'body' | 'logo' | 'slider' | 'sliderWrapper' | 'sliderSlides' | 'title' | 'titleText' | 'tags' | 'tag' | 'description' | 'footer' | 'imagesItem' | 'image' | 'avatar', string>>;
|
|
2
|
+
export type TagItem = {
|
|
3
|
+
value?: string;
|
|
4
|
+
icon?: string;
|
|
5
|
+
variant?: string;
|
|
6
|
+
};
|
|
2
7
|
export type CardItem = {
|
|
3
8
|
title?: string;
|
|
4
9
|
description?: string;
|
|
5
10
|
image?: string;
|
|
6
11
|
avatar?: string;
|
|
7
12
|
images?: string[];
|
|
8
|
-
tags?:
|
|
9
|
-
value?: string;
|
|
10
|
-
icon?: string;
|
|
11
|
-
variant?: string;
|
|
12
|
-
}[];
|
|
13
|
+
tags?: TagItem[];
|
|
13
14
|
};
|
|
14
15
|
type __VLS_Props = {
|
|
15
16
|
direction?: 'column' | 'row' | 'row-reverse' | 'column-reverse';
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
:class="customClass.inside"
|
|
64
64
|
>
|
|
65
65
|
<div
|
|
66
|
-
name="logoName"
|
|
67
66
|
v-if="item.logo || item.name || item.desc"
|
|
67
|
+
name="logoName"
|
|
68
68
|
class="flex gap-2 items-center"
|
|
69
69
|
:class="customClass.logoName"
|
|
70
70
|
>
|
|
@@ -75,22 +75,22 @@
|
|
|
75
75
|
class="!object-cover shrink-0 w-14 h-14 aspect-square rounded-full border-(2 solid primary-500)"
|
|
76
76
|
/>
|
|
77
77
|
<div
|
|
78
|
-
name="nameDesc"
|
|
79
78
|
v-if="item.name || item.desc"
|
|
79
|
+
name="nameDesc"
|
|
80
80
|
:class="customClass.nameDesc"
|
|
81
81
|
class="flex flex-col"
|
|
82
82
|
>
|
|
83
83
|
<h3
|
|
84
|
-
name="name"
|
|
85
84
|
v-if="item.name"
|
|
85
|
+
name="name"
|
|
86
86
|
:class="customClass.name"
|
|
87
|
-
class="text-(lg gray-600) font-
|
|
87
|
+
class="text-(lg gray-600) font-semibold"
|
|
88
88
|
>
|
|
89
89
|
{{ item.name }}
|
|
90
90
|
</h3>
|
|
91
91
|
<p
|
|
92
|
-
name="desc"
|
|
93
92
|
v-if="item.desc"
|
|
93
|
+
name="desc"
|
|
94
94
|
:class="customClass.desc"
|
|
95
95
|
class="text-(base gray-500)"
|
|
96
96
|
>
|
|
@@ -103,16 +103,16 @@
|
|
|
103
103
|
:item="item"
|
|
104
104
|
/>
|
|
105
105
|
<div
|
|
106
|
-
name="title"
|
|
107
106
|
v-if="$slots.title || item.title"
|
|
107
|
+
name="title"
|
|
108
108
|
class="flex justify-between"
|
|
109
109
|
:class="customClass.title"
|
|
110
110
|
>
|
|
111
111
|
<h3
|
|
112
|
-
name="titleText"
|
|
113
112
|
v-if="item.title"
|
|
113
|
+
name="titleText"
|
|
114
114
|
:class="customClass.titleText"
|
|
115
|
-
class="text-(lg gray-600) font-
|
|
115
|
+
class="text-(lg gray-600) font-semibold"
|
|
116
116
|
>
|
|
117
117
|
{{ item.title }}
|
|
118
118
|
</h3>
|
|
@@ -122,23 +122,23 @@
|
|
|
122
122
|
/>
|
|
123
123
|
</div>
|
|
124
124
|
<p
|
|
125
|
-
name="description"
|
|
126
125
|
v-if="item.description"
|
|
126
|
+
name="description"
|
|
127
127
|
:class="customClass.description"
|
|
128
128
|
class="text-(base gray-500)"
|
|
129
129
|
>
|
|
130
130
|
{{ item.description }}
|
|
131
131
|
</p>
|
|
132
132
|
<div
|
|
133
|
-
name="tags"
|
|
134
133
|
v-if="item.tags?.length"
|
|
134
|
+
name="tags"
|
|
135
135
|
:class="customClass.tags"
|
|
136
136
|
class="flex items-center justify-start gap-2"
|
|
137
137
|
>
|
|
138
138
|
<UnChips
|
|
139
|
-
name="tag"
|
|
140
139
|
v-for="(tag, index) in item.tags"
|
|
141
140
|
:key="index"
|
|
141
|
+
name="tag"
|
|
142
142
|
:class="customClass.tag"
|
|
143
143
|
:label="tag.value"
|
|
144
144
|
:icon="tag.icon"
|
|
@@ -158,8 +158,8 @@
|
|
|
158
158
|
/>
|
|
159
159
|
</div>
|
|
160
160
|
<div
|
|
161
|
-
name="footer"
|
|
162
161
|
v-if="$slots.footerStart || $slots.footerEnd"
|
|
162
|
+
name="footer"
|
|
163
163
|
:class="customClass.footer"
|
|
164
164
|
class="flex justify-between items-stretch border-t-(2 dashed border) p-3"
|
|
165
165
|
>
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
export type CardCustomClass = Record<'main' | 'inside' | 'logoName' | 'name' | 'desc' | 'body' | 'logo' | 'slider' | 'sliderWrapper' | 'sliderSlides' | 'title' | 'titleText' | 'tags' | 'tag' | 'description' | 'footer' | 'imagesItem' | 'image' | 'avatar', string
|
|
1
|
+
export type CardCustomClass = Partial<Record<'main' | 'inside' | 'logoName' | 'name' | 'desc' | 'body' | 'logo' | 'slider' | 'sliderWrapper' | 'sliderSlides' | 'title' | 'titleText' | 'tags' | 'tag' | 'description' | 'footer' | 'imagesItem' | 'image' | 'avatar', string>>;
|
|
2
|
+
export type TagItem = {
|
|
3
|
+
value?: string;
|
|
4
|
+
icon?: string;
|
|
5
|
+
variant?: string;
|
|
6
|
+
};
|
|
2
7
|
export type CardItem = {
|
|
3
8
|
title?: string;
|
|
4
9
|
description?: string;
|
|
5
10
|
image?: string;
|
|
6
11
|
avatar?: string;
|
|
7
12
|
images?: string[];
|
|
8
|
-
tags?:
|
|
9
|
-
value?: string;
|
|
10
|
-
icon?: string;
|
|
11
|
-
variant?: string;
|
|
12
|
-
}[];
|
|
13
|
+
tags?: TagItem[];
|
|
13
14
|
};
|
|
14
15
|
type __VLS_Props = {
|
|
15
16
|
direction?: 'column' | 'row' | 'row-reverse' | 'column-reverse';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { CardCustomClass, CardItem, TagItem } from './UnCard.vue.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
tags?: TagItem[];
|
|
7
|
+
items?: CardItem[];
|
|
8
|
+
customClass?: Partial<Record<'card' | 'collapsibleIcon', unknown> & {
|
|
9
|
+
cardInside?: CardCustomClass;
|
|
10
|
+
}>;
|
|
11
|
+
collapsibleIcon?: string;
|
|
12
|
+
noRotate?: boolean;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_ModelProps = {
|
|
15
|
+
'show'?: boolean;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
18
|
+
declare var __VLS_11: {};
|
|
19
|
+
type __VLS_Slots = {} & {
|
|
20
|
+
default?: (props: typeof __VLS_11) => any;
|
|
21
|
+
};
|
|
22
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
23
|
+
"update:show": (value: boolean | undefined) => any;
|
|
24
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
25
|
+
"onUpdate:show"?: ((value: boolean | undefined) => any) | undefined;
|
|
26
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
class="flex flex-col p-3 bg-white rounded-2xl gap-4"
|
|
4
|
+
>
|
|
5
|
+
<div
|
|
6
|
+
:class="customClass?.header"
|
|
7
|
+
class="cursor-pointer flex items-center justify-between"
|
|
8
|
+
@click="show = !show"
|
|
9
|
+
>
|
|
10
|
+
<UnCard
|
|
11
|
+
:item="{ avatar: icon, title, tags, description }"
|
|
12
|
+
:class="customClass.card"
|
|
13
|
+
:custom-class="customClass.cardInside"
|
|
14
|
+
/>
|
|
15
|
+
<UnNuxtIcon
|
|
16
|
+
:class="customClass?.collapsibleIcon"
|
|
17
|
+
:name="collapsibleIcon || 'solar:alt-arrow-down-bold-duotone'"
|
|
18
|
+
class="transition-all duration-300"
|
|
19
|
+
:style="{ rotate: show && !noRotate ? '180deg' : '0deg' }"
|
|
20
|
+
/>
|
|
21
|
+
</div>
|
|
22
|
+
<template v-if="show">
|
|
23
|
+
<slot />
|
|
24
|
+
</template>
|
|
25
|
+
</div>
|
|
26
|
+
</template>
|
|
27
|
+
|
|
28
|
+
<script setup>
|
|
29
|
+
const { customClass = {} } = defineProps({
|
|
30
|
+
title: { type: String, required: false },
|
|
31
|
+
description: { type: String, required: false },
|
|
32
|
+
icon: { type: String, required: false },
|
|
33
|
+
tags: { type: Array, required: false },
|
|
34
|
+
items: { type: Array, required: false },
|
|
35
|
+
customClass: { type: Object, required: false },
|
|
36
|
+
collapsibleIcon: { type: String, required: false },
|
|
37
|
+
noRotate: { type: Boolean, required: false }
|
|
38
|
+
});
|
|
39
|
+
const show = defineModel("show", { type: Boolean });
|
|
40
|
+
</script>
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { CardCustomClass, CardItem, TagItem } from './UnCard.vue.js';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
title?: string;
|
|
4
|
+
description?: string;
|
|
5
|
+
icon?: string;
|
|
6
|
+
tags?: TagItem[];
|
|
7
|
+
items?: CardItem[];
|
|
8
|
+
customClass?: Partial<Record<'card' | 'collapsibleIcon', unknown> & {
|
|
9
|
+
cardInside?: CardCustomClass;
|
|
10
|
+
}>;
|
|
11
|
+
collapsibleIcon?: string;
|
|
12
|
+
noRotate?: boolean;
|
|
13
|
+
};
|
|
14
|
+
type __VLS_ModelProps = {
|
|
15
|
+
'show'?: boolean;
|
|
16
|
+
};
|
|
17
|
+
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
18
|
+
declare var __VLS_11: {};
|
|
19
|
+
type __VLS_Slots = {} & {
|
|
20
|
+
default?: (props: typeof __VLS_11) => any;
|
|
21
|
+
};
|
|
22
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
23
|
+
"update:show": (value: boolean | undefined) => any;
|
|
24
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
25
|
+
"onUpdate:show"?: ((value: boolean | undefined) => any) | undefined;
|
|
26
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
27
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
28
|
+
declare const _default: typeof __VLS_export;
|
|
29
|
+
export default _default;
|
|
30
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
31
|
+
new (): {
|
|
32
|
+
$slots: S;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
@@ -2,7 +2,7 @@ import type { CardCustomClass, CardItem } from './UnCard.vue.js';
|
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
title?: string;
|
|
4
4
|
items?: CardItem[];
|
|
5
|
-
customClass?: Record<'
|
|
5
|
+
customClass?: Record<'title' | 'header' | 'items' | 'collapsibleIcon', unknown> & {
|
|
6
6
|
item?: CardCustomClass;
|
|
7
7
|
};
|
|
8
8
|
collapsible?: boolean;
|
|
@@ -13,9 +13,9 @@ type __VLS_ModelProps = {
|
|
|
13
13
|
'show'?: boolean;
|
|
14
14
|
};
|
|
15
15
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
16
|
-
declare var
|
|
16
|
+
declare var __VLS_1: {};
|
|
17
17
|
type __VLS_Slots = {} & {
|
|
18
|
-
default?: (props: typeof
|
|
18
|
+
default?: (props: typeof __VLS_1) => any;
|
|
19
19
|
};
|
|
20
20
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
21
|
"update:show": (value: boolean | undefined) => any;
|
|
@@ -1,41 +1,28 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div
|
|
3
|
-
id="booking"
|
|
4
3
|
class="flex flex-col p-3 bg-white rounded-2xl gap-4"
|
|
5
4
|
>
|
|
6
5
|
<div
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
{ 'cursor-pointer': collapsible }
|
|
10
|
-
]"
|
|
6
|
+
v-if="title || $slots.default"
|
|
7
|
+
:class="customClass?.header"
|
|
11
8
|
class="flex items-center justify-between"
|
|
12
|
-
@click="collapsible ? show = !show : ''"
|
|
13
9
|
>
|
|
14
|
-
<
|
|
10
|
+
<h3
|
|
15
11
|
v-if="title"
|
|
16
12
|
:class="customClass?.title"
|
|
17
13
|
class="text-(lg gray-600) font-semibold"
|
|
18
14
|
>
|
|
19
15
|
{{ title }}
|
|
20
|
-
</
|
|
21
|
-
<UnNuxtIcon
|
|
22
|
-
v-if="collapsible"
|
|
23
|
-
:class="customClass?.collapsibleIcon"
|
|
24
|
-
:name="collapsibleIcon || 'solar:alt-arrow-down-bold-duotone'"
|
|
25
|
-
class="transition-all duration-300"
|
|
26
|
-
:style="{ rotate: show && !noRotate ? '180deg' : '0deg' }"
|
|
27
|
-
/>
|
|
16
|
+
</h3>
|
|
28
17
|
<slot />
|
|
29
18
|
</div>
|
|
30
|
-
<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
/>
|
|
38
|
-
</template>
|
|
19
|
+
<UnCard
|
|
20
|
+
v-for="(item, index) in items"
|
|
21
|
+
:key="index"
|
|
22
|
+
:class="customClass.items"
|
|
23
|
+
:custom-class="customClass.item"
|
|
24
|
+
:item="item"
|
|
25
|
+
/>
|
|
39
26
|
</div>
|
|
40
27
|
</template>
|
|
41
28
|
|
|
@@ -2,7 +2,7 @@ import type { CardCustomClass, CardItem } from './UnCard.vue.js';
|
|
|
2
2
|
type __VLS_Props = {
|
|
3
3
|
title?: string;
|
|
4
4
|
items?: CardItem[];
|
|
5
|
-
customClass?: Record<'
|
|
5
|
+
customClass?: Record<'title' | 'header' | 'items' | 'collapsibleIcon', unknown> & {
|
|
6
6
|
item?: CardCustomClass;
|
|
7
7
|
};
|
|
8
8
|
collapsible?: boolean;
|
|
@@ -13,9 +13,9 @@ type __VLS_ModelProps = {
|
|
|
13
13
|
'show'?: boolean;
|
|
14
14
|
};
|
|
15
15
|
type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
|
|
16
|
-
declare var
|
|
16
|
+
declare var __VLS_1: {};
|
|
17
17
|
type __VLS_Slots = {} & {
|
|
18
|
-
default?: (props: typeof
|
|
18
|
+
default?: (props: typeof __VLS_1) => any;
|
|
19
19
|
};
|
|
20
20
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
21
21
|
"update:show": (value: boolean | undefined) => any;
|
|
@@ -3,8 +3,13 @@
|
|
|
3
3
|
<label
|
|
4
4
|
v-for="item in items"
|
|
5
5
|
:key="item.value"
|
|
6
|
-
:class="[
|
|
7
|
-
|
|
6
|
+
:class="[
|
|
7
|
+
customClass.label,
|
|
8
|
+
item?.value === value ? customClass.selectedLabel : customClass.normalLabel,
|
|
9
|
+
item?.value === value ? 'font-semibold text-primary cursor-default border-b-primary' : 'border-b-border',
|
|
10
|
+
mini ? 'px-3' : ' px-4'
|
|
11
|
+
]"
|
|
12
|
+
class="flex gap-2 justify-center items-center flex-grow basis-1 border-b-(2 solid) cursor-pointer p-3 text-sm"
|
|
8
13
|
@click="addToQuery(item)"
|
|
9
14
|
>
|
|
10
15
|
<input
|
|
@@ -17,12 +22,12 @@
|
|
|
17
22
|
:class="customClass.icon"
|
|
18
23
|
:name="item.icon"
|
|
19
24
|
/>
|
|
20
|
-
<
|
|
25
|
+
<p
|
|
21
26
|
:class="customClass.title"
|
|
22
27
|
class="whitespace-nowrap"
|
|
23
28
|
>
|
|
24
29
|
{{ item.title || item.value }}
|
|
25
|
-
</
|
|
30
|
+
</p>
|
|
26
31
|
</label>
|
|
27
32
|
</div>
|
|
28
33
|
</template>
|