@imaginario27/air-ui-ds 1.0.23 → 1.1.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.
- package/components/accordions/AccordionItem.vue +1 -1
- package/components/alerts/Alert.vue +19 -22
- package/components/badges/Badge.vue +32 -25
- package/components/badges/IconBadge.vue +15 -15
- package/components/badges/IconTextBadge.vue +2 -2
- package/components/breadcrumbs/Breadcrumbs.vue +92 -27
- package/components/buttons/ActionButton.vue +40 -74
- package/components/buttons/ActionIconButton.vue +23 -51
- package/components/buttons/AlertButton.vue +8 -13
- package/components/buttons/AlertIconButton.vue +6 -7
- package/components/buttons/CopyButton.vue +4 -4
- package/components/buttons/options/OptionButton.vue +2 -2
- package/components/buttons/toggle/ToggleButton.vue +8 -10
- package/components/cards/specific/ContactDetailsCard.vue +4 -8
- package/components/cards/specific/FeatureCard.vue +2 -2
- package/components/cards/specific/HelpTopicCard.vue +4 -4
- package/components/cards/specific/subscription/SubscriptionPlanCard.vue +6 -6
- package/components/cards/specific/subscription/UniqueSubscriptionPlanCard.vue +1 -1
- package/components/collapsibles/Collapsible.vue +1 -1
- package/components/content/ContentItem.vue +2 -2
- package/components/content/ContentItemImage.vue +12 -14
- package/components/dropdowns/DropdownMenuItem.vue +10 -10
- package/components/dropdowns/DropdownSelect.vue +5 -16
- package/components/dropdowns/DropdownSelectItem.vue +13 -23
- package/components/empty-states/EmptyState.vue +21 -27
- package/components/features/Feature.vue +11 -48
- package/components/forms/fields/ButtonField.vue +2 -9
- package/components/forms/fields/CheckboxField.vue +9 -8
- package/components/forms/fields/DataField.vue +1 -1
- package/components/forms/fields/FileUploadField.vue +6 -6
- package/components/forms/fields/InputField.vue +17 -28
- package/components/forms/fields/RepeaterField.vue +2 -2
- package/components/forms/fields/SearchField.vue +7 -10
- package/components/forms/fields/SliderField.vue +16 -19
- package/components/forms/fields/SwitchField.vue +12 -34
- package/components/forms/fields/TextareaField.vue +7 -5
- package/components/forms/fields/radio/RadioButtonField.vue +6 -7
- package/components/icons/ContainedIcon.vue +14 -24
- package/components/icons/Icon.vue +13 -22
- package/components/layouts/ErrorDisplay.vue +3 -3
- package/components/layouts/headers/CompactHeader.vue +4 -4
- package/components/layouts/headers/ContentPageHeader.vue +1 -1
- package/components/lists/List.vue +1 -1
- package/components/lists/ListItem.vue +11 -14
- package/components/loaders/LoadingScreen.vue +3 -3
- package/components/modals/DangerModalDialog.vue +4 -4
- package/components/modals/InfoModalDialog.vue +3 -3
- package/components/modals/ModalDialog.vue +1 -1
- package/components/modals/SuccessModalDialog.vue +2 -2
- package/components/navigation/links/NavLink.vue +10 -10
- package/components/navigation/nav-sidebar/BottomUserNavBar.vue +3 -3
- package/components/navigation/nav-sidebar/NavSidebar.vue +9 -9
- package/components/navigation/nav-sidebar/NavSidebarMenuItem.vue +7 -9
- package/components/navigation/nav-sidebar/NavSidebarMenuSectionTitle.vue +4 -5
- package/components/pagination/ButtonPagination.vue +6 -10
- package/components/pagination/SimplePagination.vue +2 -2
- package/components/password/SecurePasswordCondition.vue +5 -6
- package/components/rating/InteractiveRating.vue +6 -6
- package/components/rating/Rating.vue +6 -6
- package/components/rating/RatingItem.vue +12 -13
- package/components/steppers/CircleStepper.vue +11 -13
- package/components/steppers/Step.vue +2 -2
- package/components/steppers/StepIndicator.vue +29 -28
- package/components/steppers/TabStepper.vue +1 -1
- package/components/steppers/vertical-stepper/VerticalStep.vue +2 -2
- package/components/steppers/vertical-stepper/VerticalStepper.vue +1 -1
- package/components/tabs/Tab.vue +4 -9
- package/models/enums/dropdowns.ts +1 -0
- package/models/types/buttons.ts +1 -1
- package/models/types/selects.ts +1 -2
- package/nuxt.config.ts +1 -1
- package/package.json +1 -2
- package/components/navigation/nav-menu/NavFooterMenu.vue +0 -90
|
@@ -18,21 +18,14 @@
|
|
|
18
18
|
:disabled="disabled"
|
|
19
19
|
|
|
20
20
|
>
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
:
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
<Icon
|
|
22
|
+
:name="icon"
|
|
23
|
+
:iconClass="[
|
|
24
|
+
iconSizeClass,
|
|
25
|
+
iconColorClass,
|
|
26
|
+
iconClass ? iconClass : ''
|
|
27
|
+
]"
|
|
26
28
|
/>
|
|
27
|
-
<span
|
|
28
|
-
v-else-if="svgIcon"
|
|
29
|
-
:class="[iconSizeClass, iconClass]"
|
|
30
|
-
>
|
|
31
|
-
<SVGImage
|
|
32
|
-
:src="svgIcon"
|
|
33
|
-
:color="resolvedSvgIconColor"
|
|
34
|
-
/>
|
|
35
|
-
</span>
|
|
36
29
|
</component>
|
|
37
30
|
</template>
|
|
38
31
|
|
|
@@ -69,13 +62,8 @@ const props = defineProps({
|
|
|
69
62
|
validator: (value: ButtonSize) => Object.values(ButtonSize).includes(value),
|
|
70
63
|
},
|
|
71
64
|
icon: {
|
|
72
|
-
type: String as PropType<
|
|
73
|
-
default: "
|
|
74
|
-
},
|
|
75
|
-
svgIcon: String as PropType<string>,
|
|
76
|
-
useSVGIconColor: {
|
|
77
|
-
type: Boolean as PropType<boolean>,
|
|
78
|
-
default: false
|
|
65
|
+
type: String as PropType<string>,
|
|
66
|
+
default: "mdi:help"
|
|
79
67
|
},
|
|
80
68
|
iconClass: String as PropType<string>,
|
|
81
69
|
disabled: {
|
|
@@ -242,38 +230,22 @@ const iconSizeClass = computed(() => {
|
|
|
242
230
|
return variant[props.size as ButtonSize] || 'w-[20px] h-[20px] min-w-[20px] min-h-[20px]'
|
|
243
231
|
})
|
|
244
232
|
|
|
245
|
-
const
|
|
233
|
+
const iconColorClass = computed(() => {
|
|
246
234
|
const variant = {
|
|
247
|
-
[ButtonStyleType.PRIMARY_BRAND_FILLED]: 'text-text-neutral-on-filled',
|
|
248
|
-
[ButtonStyleType.PRIMARY_BRAND_SOFT]: 'text-icon-primary-brand-on-soft-bg',
|
|
249
|
-
[ButtonStyleType.PRIMARY_BRAND_TRANSPARENT]:
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
],
|
|
253
|
-
[ButtonStyleType.
|
|
254
|
-
[ButtonStyleType.
|
|
255
|
-
[ButtonStyleType.
|
|
256
|
-
[ButtonStyleType.
|
|
257
|
-
[ButtonStyleType.
|
|
258
|
-
[ButtonStyleType.
|
|
259
|
-
[ButtonStyleType.DELETE_SOFT]: 'text-text-delete',
|
|
260
|
-
[ButtonStyleType.DELETE_OUTLINED]: 'text-text-delete',
|
|
261
|
-
[ButtonStyleType.DELETE_TRANSPARENT]: 'text-text-delete',
|
|
235
|
+
[ButtonStyleType.PRIMARY_BRAND_FILLED]: '!text-text-neutral-on-filled',
|
|
236
|
+
[ButtonStyleType.PRIMARY_BRAND_SOFT]: '!text-icon-primary-brand-on-soft-bg',
|
|
237
|
+
[ButtonStyleType.PRIMARY_BRAND_TRANSPARENT]: '!text-text-primary-brand-default',
|
|
238
|
+
[ButtonStyleType.SECONDARY_BRAND_FILLED]: '!text-text-neutral-on-filled',
|
|
239
|
+
[ButtonStyleType.NEUTRAL_FILLED]: '!text-text-neutral-on-neutral-filled-bg',
|
|
240
|
+
[ButtonStyleType.NEUTRAL_OUTLINED]: '!text-text-default',
|
|
241
|
+
[ButtonStyleType.NEUTRAL_TRANSPARENT]: '!text-text-default',
|
|
242
|
+
[ButtonStyleType.NEUTRAL_TRANSPARENT_SUBTLE]: '!text-text-neutral-subtler',
|
|
243
|
+
[ButtonStyleType.DELETE_FILLED]: '!text-text-neutral-on-filled',
|
|
244
|
+
[ButtonStyleType.DELETE_SOFT]: '!text-text-delete',
|
|
245
|
+
[ButtonStyleType.DELETE_OUTLINED]: '!text-text-delete',
|
|
246
|
+
[ButtonStyleType.DELETE_TRANSPARENT]: '!text-text-delete',
|
|
262
247
|
}
|
|
263
|
-
return variant[props.styleType as ButtonStyleType] || 'text-text-default'
|
|
264
|
-
})
|
|
265
|
-
|
|
266
|
-
// Computed functions
|
|
267
|
-
const resolvedSvgIconColor = computed(() => {
|
|
268
|
-
if (props.useSVGIconColor) return undefined
|
|
269
|
-
|
|
270
|
-
const val = svgIconColorClass.value
|
|
271
|
-
|
|
272
|
-
if (Array.isArray(val)) {
|
|
273
|
-
return val.filter(Boolean).join(' ')
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
return val
|
|
248
|
+
return variant[props.styleType as ButtonStyleType] || '!text-text-default'
|
|
277
249
|
})
|
|
278
250
|
|
|
279
251
|
// Props for the dynamic component
|
|
@@ -18,26 +18,21 @@
|
|
|
18
18
|
...(actionType === ButtonActionType.ACTION ? { onClick: emitClick } : {})
|
|
19
19
|
}"
|
|
20
20
|
:disabled
|
|
21
|
-
|
|
22
21
|
>
|
|
23
22
|
<!-- Left icon -->
|
|
24
|
-
<
|
|
23
|
+
<Icon
|
|
25
24
|
v-if="iconPosition === IconPosition.LEFT"
|
|
26
|
-
:icon
|
|
27
|
-
|
|
28
|
-
preserveAspectRatio="xMidYMid meet"
|
|
29
|
-
class="min-w-[20px]"
|
|
25
|
+
:name="icon"
|
|
26
|
+
:iconClass="textIconClass"
|
|
30
27
|
/>
|
|
31
28
|
<span :class="[ 'font-semibold' ]">
|
|
32
29
|
{{ text }}
|
|
33
30
|
</span>
|
|
34
31
|
<!-- Right icon -->
|
|
35
|
-
<
|
|
32
|
+
<Icon
|
|
36
33
|
v-if="iconPosition === IconPosition.RIGHT"
|
|
37
|
-
:icon
|
|
38
|
-
|
|
39
|
-
preserveAspectRatio="xMidYMid meet"
|
|
40
|
-
class="min-w-[20px]"
|
|
34
|
+
:name="icon"
|
|
35
|
+
:iconClass="textIconClass"
|
|
41
36
|
/>
|
|
42
37
|
</component>
|
|
43
38
|
</template>
|
|
@@ -68,8 +63,8 @@ const props = defineProps({
|
|
|
68
63
|
default: 'Button text'
|
|
69
64
|
},
|
|
70
65
|
icon: {
|
|
71
|
-
type: String as PropType<
|
|
72
|
-
default: "
|
|
66
|
+
type: String as PropType<string>,
|
|
67
|
+
default: "mdi:help"
|
|
73
68
|
},
|
|
74
69
|
iconPosition: {
|
|
75
70
|
type: String as PropType<IconPosition>,
|
|
@@ -18,11 +18,10 @@
|
|
|
18
18
|
}"
|
|
19
19
|
:disabled
|
|
20
20
|
>
|
|
21
|
-
<
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
class="min-w-[20px]"
|
|
21
|
+
<Icon
|
|
22
|
+
v-if="icon"
|
|
23
|
+
:name="icon"
|
|
24
|
+
:iconClass
|
|
26
25
|
/>
|
|
27
26
|
</component>
|
|
28
27
|
</template>
|
|
@@ -53,8 +52,8 @@ const props = defineProps({
|
|
|
53
52
|
default: 'Button text'
|
|
54
53
|
},
|
|
55
54
|
icon: {
|
|
56
|
-
type: String as PropType<
|
|
57
|
-
default: "
|
|
55
|
+
type: String as PropType<string>,
|
|
56
|
+
default: "mdi:help"
|
|
58
57
|
},
|
|
59
58
|
disabled: {
|
|
60
59
|
type: Boolean as PropType<boolean>,
|
|
@@ -83,8 +83,8 @@ const props = defineProps({
|
|
|
83
83
|
validator: (value: ButtonSize) => Object.values(ButtonSize).includes(value),
|
|
84
84
|
},
|
|
85
85
|
icon: {
|
|
86
|
-
type: String as PropType<
|
|
87
|
-
default: "
|
|
86
|
+
type: String as PropType<string>,
|
|
87
|
+
default: "mdi:content-copy",
|
|
88
88
|
},
|
|
89
89
|
iconPosition: {
|
|
90
90
|
type: String as PropType<IconPosition>,
|
|
@@ -114,7 +114,7 @@ const handleCopy = useThrottleFn(
|
|
|
114
114
|
const success = await copyToClipboard(props.textToCopy)
|
|
115
115
|
|
|
116
116
|
if (success) {
|
|
117
|
-
currentCopyButtonIcon.value = '
|
|
117
|
+
currentCopyButtonIcon.value = 'mdi:check-circle-outline'
|
|
118
118
|
currentCopyButtonText.value = props.copySuccessText
|
|
119
119
|
|
|
120
120
|
if (
|
|
@@ -133,7 +133,7 @@ const handleCopy = useThrottleFn(
|
|
|
133
133
|
|
|
134
134
|
emit('success')
|
|
135
135
|
} else {
|
|
136
|
-
currentCopyButtonIcon.value = '
|
|
136
|
+
currentCopyButtonIcon.value = 'mdi:alert-circle-outline'
|
|
137
137
|
currentCopyButtonText.value = props.copyErrorText
|
|
138
138
|
|
|
139
139
|
if (props.showToast) {
|
|
@@ -29,8 +29,8 @@ const props = defineProps({
|
|
|
29
29
|
default: ButtonStyleType.NEUTRAL_OUTLINED,
|
|
30
30
|
},
|
|
31
31
|
icon: {
|
|
32
|
-
type: String as PropType<
|
|
33
|
-
default: '
|
|
32
|
+
type: String as PropType<string>,
|
|
33
|
+
default: 'mdi:help',
|
|
34
34
|
},
|
|
35
35
|
iconPosition: {
|
|
36
36
|
type: String as PropType<IconPosition>,
|
|
@@ -16,21 +16,19 @@
|
|
|
16
16
|
@click="emitClick"
|
|
17
17
|
>
|
|
18
18
|
<!-- Left icon -->
|
|
19
|
-
<
|
|
19
|
+
<Icon
|
|
20
20
|
v-if="iconPosition === IconPosition.LEFT"
|
|
21
|
-
:
|
|
22
|
-
|
|
23
|
-
:size="iconSizeClass"
|
|
21
|
+
:name="icon"
|
|
22
|
+
:iconClass="iconSizeClass"
|
|
24
23
|
/>
|
|
25
24
|
<span :class="['font-semibold', textSizeClass]">
|
|
26
25
|
{{ text }}
|
|
27
26
|
</span>
|
|
28
27
|
<!-- Right icon -->
|
|
29
|
-
<
|
|
28
|
+
<Icon
|
|
30
29
|
v-if="iconPosition === IconPosition.RIGHT"
|
|
31
|
-
:
|
|
32
|
-
|
|
33
|
-
:size="iconSizeClass"
|
|
30
|
+
:name="icon"
|
|
31
|
+
:iconClass="iconSizeClass"
|
|
34
32
|
/>
|
|
35
33
|
</button>
|
|
36
34
|
</template>
|
|
@@ -47,8 +45,8 @@ const props = defineProps({
|
|
|
47
45
|
validator: (value: ButtonSize) => Object.values(ButtonSize).includes(value),
|
|
48
46
|
},
|
|
49
47
|
icon: {
|
|
50
|
-
type: String as PropType<
|
|
51
|
-
default: '
|
|
48
|
+
type: String as PropType<string>,
|
|
49
|
+
default: 'mdi:help',
|
|
52
50
|
},
|
|
53
51
|
iconPosition: {
|
|
54
52
|
type: String as PropType<IconPosition>,
|
|
@@ -8,10 +8,8 @@
|
|
|
8
8
|
v-if="email"
|
|
9
9
|
class="flex gap-2 items-center text-text-primary-brand-default"
|
|
10
10
|
>
|
|
11
|
-
<
|
|
12
|
-
|
|
13
|
-
size="20"
|
|
14
|
-
preserveAspectRatio="xMidYMid meet"
|
|
11
|
+
<Icon
|
|
12
|
+
name="mdi:at"
|
|
15
13
|
/>
|
|
16
14
|
<span class="font-semibold text-sm">
|
|
17
15
|
{{ email }}
|
|
@@ -22,10 +20,8 @@
|
|
|
22
20
|
v-if="phone"
|
|
23
21
|
class="flex gap-2 items-center text-text-neutral-subtle"
|
|
24
22
|
>
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
size="20"
|
|
28
|
-
preserveAspectRatio="xMidYMid meet"
|
|
23
|
+
<Icon
|
|
24
|
+
name="mdi:phone-outline"
|
|
29
25
|
/>
|
|
30
26
|
<span class="text-sm">
|
|
31
27
|
{{ phone }}
|
|
@@ -32,8 +32,8 @@ defineProps({
|
|
|
32
32
|
default: 'Feature description'
|
|
33
33
|
},
|
|
34
34
|
icon: {
|
|
35
|
-
type: String as PropType<
|
|
36
|
-
default: '
|
|
35
|
+
type: String as PropType<string>,
|
|
36
|
+
default: 'mdi:help'
|
|
37
37
|
},
|
|
38
38
|
containedIconShape: {
|
|
39
39
|
type: String as PropType<IconContainerShape>,
|
|
@@ -35,8 +35,8 @@
|
|
|
35
35
|
// Props
|
|
36
36
|
defineProps({
|
|
37
37
|
icon: {
|
|
38
|
-
type: String as PropType<
|
|
39
|
-
default: '
|
|
38
|
+
type: String as PropType<string>,
|
|
39
|
+
default: 'mdi:help'
|
|
40
40
|
},
|
|
41
41
|
title: {
|
|
42
42
|
type: String as PropType<string>,
|
|
@@ -55,8 +55,8 @@ defineProps({
|
|
|
55
55
|
default: 'Learn more'
|
|
56
56
|
},
|
|
57
57
|
buttonIcon: {
|
|
58
|
-
type: String as PropType<
|
|
59
|
-
default: '
|
|
58
|
+
type: String as PropType<string>,
|
|
59
|
+
default: 'mdi:arrow-right'
|
|
60
60
|
},
|
|
61
61
|
})
|
|
62
62
|
</script>
|
|
@@ -28,13 +28,13 @@
|
|
|
28
28
|
{{ computedAmount }}{{ currencySymbol }}<span class="text-text-neutral-subtle font-normal text-lg">/{{ computedPeriodicity }}</span>
|
|
29
29
|
</span>
|
|
30
30
|
|
|
31
|
-
<
|
|
31
|
+
<Icon
|
|
32
32
|
v-if="isActive && !isFeatured"
|
|
33
|
-
|
|
34
|
-
size="
|
|
35
|
-
|
|
36
|
-
class="active-icon absolute top-0 right-0 text-icon-primary-brand-active"
|
|
33
|
+
name="mdi:check-circle"
|
|
34
|
+
:size="IconSize.LG"
|
|
35
|
+
iconClass="active-icon absolute top-0 right-0 text-icon-primary-brand-active"
|
|
37
36
|
/>
|
|
37
|
+
|
|
38
38
|
</CardHeader>
|
|
39
39
|
|
|
40
40
|
<CardBody class="h-full">
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
>
|
|
50
50
|
<ListItem
|
|
51
51
|
v-for="feature in features" :key="feature"
|
|
52
|
-
icon="
|
|
52
|
+
icon="mdi:check"
|
|
53
53
|
:spaced="hasFeatureListSeparator"
|
|
54
54
|
>
|
|
55
55
|
{{ feature }}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
|
|
8
8
|
<!-- This button does not have click event because the toggle is being controlled by the accordeon header div-->
|
|
9
9
|
<ActionIconButton
|
|
10
|
-
:icon="isOpen ? '
|
|
10
|
+
:icon="isOpen ? 'mdi:unfold-less-horizontal' : 'mdi:unfold-more-horizontal'"
|
|
11
11
|
:styleType="ButtonStyleType.NEUTRAL_OUTLINED"
|
|
12
12
|
:size="ButtonSize.MD"
|
|
13
13
|
/>
|
|
@@ -100,8 +100,8 @@ const props = defineProps({
|
|
|
100
100
|
default: ImageHoverEffect.BLUR,
|
|
101
101
|
validator: (value: ImageHoverEffect) => Object.values(ImageHoverEffect).includes(value),
|
|
102
102
|
},
|
|
103
|
-
imgHoverIcon: String as PropType<
|
|
104
|
-
imgFallbackIcon: String as PropType<
|
|
103
|
+
imgHoverIcon: String as PropType<string>,
|
|
104
|
+
imgFallbackIcon: String as PropType<string>,
|
|
105
105
|
imgContainerClass: String as PropType<string>,
|
|
106
106
|
containerClass: String as PropType<string>,
|
|
107
107
|
hasCardShadow: {
|
|
@@ -29,11 +29,10 @@
|
|
|
29
29
|
v-else
|
|
30
30
|
class="w-full h-full flex items-center justify-center bg-background-neutral-subtlest"
|
|
31
31
|
>
|
|
32
|
-
<
|
|
33
|
-
:
|
|
34
|
-
size="
|
|
35
|
-
|
|
36
|
-
class="text-icon-primary-brand-default"
|
|
32
|
+
<Icon
|
|
33
|
+
:name="fallbackIcon"
|
|
34
|
+
:size="IconSize.XL"
|
|
35
|
+
iconClass="text-icon-primary-brand-default"
|
|
37
36
|
/>
|
|
38
37
|
</div>
|
|
39
38
|
|
|
@@ -53,11 +52,10 @@
|
|
|
53
52
|
'transition-opacity duration-300',
|
|
54
53
|
]"
|
|
55
54
|
>
|
|
56
|
-
<
|
|
57
|
-
:
|
|
58
|
-
size="
|
|
59
|
-
|
|
60
|
-
class="text-icon-neutral-on-filled-bg"
|
|
55
|
+
<Icon
|
|
56
|
+
:name="hoverIcon"
|
|
57
|
+
:size="IconSize.XL"
|
|
58
|
+
iconClass="text-icon-neutral-on-filled-bg"
|
|
61
59
|
/>
|
|
62
60
|
</div>
|
|
63
61
|
</template>
|
|
@@ -82,12 +80,12 @@ const props = defineProps({
|
|
|
82
80
|
default: ImageHoverEffect.BLUR,
|
|
83
81
|
},
|
|
84
82
|
hoverIcon: {
|
|
85
|
-
type: String as PropType<
|
|
86
|
-
default: '
|
|
83
|
+
type: String as PropType<string>,
|
|
84
|
+
default: 'mdi:eye-outline',
|
|
87
85
|
},
|
|
88
86
|
fallbackIcon: {
|
|
89
|
-
type: String as PropType<
|
|
90
|
-
default: '
|
|
87
|
+
type: String as PropType<string>,
|
|
88
|
+
default: 'mdi:image-off-outline',
|
|
91
89
|
},
|
|
92
90
|
containerClass: String as PropType<string>,
|
|
93
91
|
})
|
|
@@ -19,16 +19,12 @@
|
|
|
19
19
|
]"
|
|
20
20
|
>
|
|
21
21
|
<div class="flex items-center gap-3 w-full">
|
|
22
|
-
<
|
|
22
|
+
<Icon
|
|
23
23
|
v-if="icon && (type === DropdownItemType.ICON || type === DropdownItemType.DANGER_ICON)"
|
|
24
|
-
:
|
|
25
|
-
|
|
26
|
-
preserveAspectRatio="xMidYMid meet"
|
|
27
|
-
:class="[
|
|
28
|
-
'min-w-[20px]',
|
|
29
|
-
iconColorClass
|
|
30
|
-
]"
|
|
24
|
+
:name="icon"
|
|
25
|
+
:iconClass="iconColorClass"
|
|
31
26
|
/>
|
|
27
|
+
|
|
32
28
|
<template v-if="type === DropdownItemType.IMAGE">
|
|
33
29
|
<img
|
|
34
30
|
v-if="imgUrl && isImageLoaded"
|
|
@@ -45,9 +41,11 @@
|
|
|
45
41
|
class="w-[24px] h-[24px] rounded"
|
|
46
42
|
>
|
|
47
43
|
</template>
|
|
44
|
+
|
|
48
45
|
<span v-if="type !== DropdownItemType.USER" class="text-sm">
|
|
49
46
|
{{ text }}
|
|
50
47
|
</span>
|
|
48
|
+
|
|
51
49
|
<User
|
|
52
50
|
v-if="userDisplayName && type === DropdownItemType.USER"
|
|
53
51
|
:displayName="userDisplayName"
|
|
@@ -88,8 +86,8 @@ const props = defineProps({
|
|
|
88
86
|
default: "Menu item text",
|
|
89
87
|
},
|
|
90
88
|
icon: {
|
|
91
|
-
type: String as PropType<
|
|
92
|
-
default: "
|
|
89
|
+
type: String as PropType<string>,
|
|
90
|
+
default: "mdi:help",
|
|
93
91
|
},
|
|
94
92
|
size: {
|
|
95
93
|
type: String as PropType<DropdownItemSize>,
|
|
@@ -178,6 +176,7 @@ const sizeClass = computed(() => {
|
|
|
178
176
|
const typeClass = computed(() => {
|
|
179
177
|
const typeVariant = {
|
|
180
178
|
[DropdownItemType.DANGER_ICON]: "text-text-delete",
|
|
179
|
+
[DropdownItemType.DANGER_TEXT]: "text-text-delete",
|
|
181
180
|
[DropdownItemType.TEXT]: "text-text-default",
|
|
182
181
|
[DropdownItemType.ICON]: "text-text-default",
|
|
183
182
|
[DropdownItemType.IMAGE]: "text-text-default",
|
|
@@ -189,6 +188,7 @@ const typeClass = computed(() => {
|
|
|
189
188
|
const iconColorClass = computed(() => {
|
|
190
189
|
const colorVariant = {
|
|
191
190
|
[DropdownItemType.DANGER_ICON]: "text-icon-delete",
|
|
191
|
+
[DropdownItemType.DANGER_TEXT]: "text-icon-delete",
|
|
192
192
|
[DropdownItemType.TEXT]: "text-icon-neutral-subtle",
|
|
193
193
|
[DropdownItemType.ICON]: "text-icon-neutral-subtle",
|
|
194
194
|
[DropdownItemType.IMAGE]: undefined,
|
|
@@ -64,16 +64,8 @@
|
|
|
64
64
|
</template>
|
|
65
65
|
</template>
|
|
66
66
|
<template v-else-if="type === SelectType.ICON && selectedOption?.icon">
|
|
67
|
-
<
|
|
68
|
-
:
|
|
69
|
-
size="20px"
|
|
70
|
-
preserveAspectRatio="xMidYMid meet"
|
|
71
|
-
/>
|
|
72
|
-
</template>
|
|
73
|
-
<template v-else-if="type === SelectType.ICON && selectedOption?.customIcon">
|
|
74
|
-
<div
|
|
75
|
-
class="w-[20px] h-[20px] text-icon-neutral-subtle"
|
|
76
|
-
v-html="selectedOption?.customIcon"
|
|
67
|
+
<Icon
|
|
68
|
+
:name="selectedOption?.icon"
|
|
77
69
|
/>
|
|
78
70
|
</template>
|
|
79
71
|
<template v-else-if="type === SelectType.IMAGE && selectedOption?.imgUrl">
|
|
@@ -106,17 +98,15 @@
|
|
|
106
98
|
v-if="multiple && Array.isArray(selected) && selected.length"
|
|
107
99
|
:size="ButtonSize.SM"
|
|
108
100
|
:styleType="ButtonStyleType.NEUTRAL_TRANSPARENT_SUBTLE"
|
|
109
|
-
icon="
|
|
101
|
+
icon="mdi:close-circle"
|
|
110
102
|
@click="selected = []"
|
|
111
103
|
/>
|
|
112
104
|
|
|
113
105
|
<!-- Show loading icon while loading instead of the icon-->
|
|
114
106
|
<Spinner v-if="isLoading" />
|
|
115
|
-
<
|
|
107
|
+
<Icon
|
|
116
108
|
v-else
|
|
117
|
-
:
|
|
118
|
-
size="20px"
|
|
119
|
-
preserveAspectRatio="xMidYMid meet"
|
|
109
|
+
:name="isOpen ? 'mdi:unfold-less-horizontal' : 'mdi:unfold-more-horizontal'"
|
|
120
110
|
/>
|
|
121
111
|
</div>
|
|
122
112
|
</div>
|
|
@@ -165,7 +155,6 @@
|
|
|
165
155
|
:type="type"
|
|
166
156
|
:text="option.text"
|
|
167
157
|
:icon="option.icon"
|
|
168
|
-
:customIcon="option.customIcon"
|
|
169
158
|
:userDisplayName="option.userDisplayName"
|
|
170
159
|
:userProfileImg="option.userProfileImg"
|
|
171
160
|
:imgUrl="option.imgUrl"
|
|
@@ -17,23 +17,14 @@
|
|
|
17
17
|
>
|
|
18
18
|
<div class="flex justify-between items-center gap-3 w-full">
|
|
19
19
|
<div class="flex items-center gap-3">
|
|
20
|
-
<
|
|
21
|
-
v-if="
|
|
22
|
-
:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
:class="[
|
|
26
|
-
'min-w-[20px]',
|
|
27
|
-
isSelected && activeStyle === SelectActiveStyle.FILL ? 'text-icon-on-filled' : 'text-icon-neutral-subtle'
|
|
20
|
+
<Icon
|
|
21
|
+
v-if="type === SelectType.ICON"
|
|
22
|
+
:name="icon"
|
|
23
|
+
:iconClass="[
|
|
24
|
+
isSelected && activeStyle === SelectActiveStyle.FILL ? '!text-icon-on-filled' : '!text-icon-neutral-subtle'
|
|
28
25
|
]"
|
|
29
26
|
/>
|
|
30
|
-
|
|
31
|
-
<div
|
|
32
|
-
v-if="(type === SelectType.ICON) && customIcon"
|
|
33
|
-
class="w-[20px] h-[20px]"
|
|
34
|
-
:class="isSelected && activeStyle === SelectActiveStyle.FILL ? 'text-icon-on-filled' : 'text-icon-neutral-subtle'"
|
|
35
|
-
v-html="customIcon"
|
|
36
|
-
/>
|
|
27
|
+
|
|
37
28
|
<template v-if="type === SelectType.IMAGE">
|
|
38
29
|
<img
|
|
39
30
|
v-if="imgUrl && isImageLoaded"
|
|
@@ -50,6 +41,7 @@
|
|
|
50
41
|
class="w-[24px] h-[24px] rounded"
|
|
51
42
|
>
|
|
52
43
|
</template>
|
|
44
|
+
|
|
53
45
|
<span
|
|
54
46
|
v-if="type !== SelectType.USER"
|
|
55
47
|
:class="[
|
|
@@ -61,6 +53,7 @@
|
|
|
61
53
|
>
|
|
62
54
|
{{ text }}
|
|
63
55
|
</span>
|
|
56
|
+
|
|
64
57
|
<User
|
|
65
58
|
v-if="type === SelectType.USER"
|
|
66
59
|
:displayName="userDisplayName"
|
|
@@ -69,12 +62,10 @@
|
|
|
69
62
|
:class="isSelected && activeStyle === SelectActiveStyle.FILL ? '!text-text-neutral-on-filled' : ''"
|
|
70
63
|
/>
|
|
71
64
|
</div>
|
|
72
|
-
<
|
|
65
|
+
<Icon
|
|
73
66
|
v-if="isSelected && activeStyle === SelectActiveStyle.CHECK"
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
preserveAspectRatio="xMidYMid meet"
|
|
77
|
-
class="text-icon-primary-brand-active"
|
|
67
|
+
name="mdi:check"
|
|
68
|
+
iconClass="text-icon-primary-brand-active"
|
|
78
69
|
/>
|
|
79
70
|
</div>
|
|
80
71
|
<p
|
|
@@ -97,10 +88,9 @@ const props = defineProps({
|
|
|
97
88
|
default: 'Select menu item',
|
|
98
89
|
},
|
|
99
90
|
icon: {
|
|
100
|
-
type: String as PropType<
|
|
101
|
-
default: '
|
|
91
|
+
type: String as PropType<string>,
|
|
92
|
+
default: 'mdi:help',
|
|
102
93
|
},
|
|
103
|
-
customIcon: String as PropType<string>,
|
|
104
94
|
size: {
|
|
105
95
|
type: String as PropType<SelectSize>,
|
|
106
96
|
default: SelectSize.MD,
|