@imaginario27/air-ui-ds 1.0.23 → 1.1.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/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 +7 -7
- package/components/badges/IconTextBadge.vue +2 -2
- package/components/breadcrumbs/Breadcrumbs.vue +92 -27
- package/components/buttons/ActionButton.vue +34 -68
- package/components/buttons/ActionIconButton.vue +11 -39
- 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 +5 -15
- 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
|
@@ -22,8 +22,6 @@
|
|
|
22
22
|
:loadingText
|
|
23
23
|
:styleType
|
|
24
24
|
:actionType
|
|
25
|
-
:svgIcon
|
|
26
|
-
:useSVGIconColor
|
|
27
25
|
:isRounded
|
|
28
26
|
:isFullWidth
|
|
29
27
|
:isMobileFullWidth
|
|
@@ -62,19 +60,14 @@ const props = defineProps({
|
|
|
62
60
|
validator: (value: ButtonSize) => Object.values(ButtonSize).includes(value),
|
|
63
61
|
},
|
|
64
62
|
icon: {
|
|
65
|
-
type: String as PropType<
|
|
66
|
-
default: "
|
|
63
|
+
type: String as PropType<string>,
|
|
64
|
+
default: "mdi:help"
|
|
67
65
|
},
|
|
68
66
|
iconPosition: {
|
|
69
67
|
type: String as PropType<IconPosition>,
|
|
70
68
|
default: IconPosition.NONE,
|
|
71
69
|
validator: (value: IconPosition) => Object.values(IconPosition).includes(value),
|
|
72
70
|
},
|
|
73
|
-
svgIcon: String as PropType<string>,
|
|
74
|
-
useSVGIconColor: {
|
|
75
|
-
type: Boolean as PropType<boolean>,
|
|
76
|
-
default: false,
|
|
77
|
-
},
|
|
78
71
|
disabled: {
|
|
79
72
|
type: Boolean as PropType<boolean>,
|
|
80
73
|
default: false,
|
|
@@ -54,12 +54,13 @@
|
|
|
54
54
|
]"
|
|
55
55
|
@click="toggleCheckbox"
|
|
56
56
|
>
|
|
57
|
-
<
|
|
57
|
+
<Icon
|
|
58
58
|
v-if="modelValue"
|
|
59
|
-
|
|
60
|
-
:
|
|
61
|
-
|
|
62
|
-
|
|
59
|
+
name="mdi:check-bold"
|
|
60
|
+
:iconClass="[
|
|
61
|
+
checkboxIconSizeClass,
|
|
62
|
+
disabled ? '!text-icon-neutral-disabled' : '!text-icon-neutral-on-filled-bg'
|
|
63
|
+
]"
|
|
63
64
|
/>
|
|
64
65
|
</div>
|
|
65
66
|
|
|
@@ -153,10 +154,10 @@ const controlFieldSizeClass = computed(() => {
|
|
|
153
154
|
|
|
154
155
|
const checkboxIconSizeClass = computed(() => {
|
|
155
156
|
const sizeVariant = {
|
|
156
|
-
[ControlFieldSize.MD]: '
|
|
157
|
-
[ControlFieldSize.LG]: '
|
|
157
|
+
[ControlFieldSize.MD]: '!w-[16px] !h-[16px] !min-w-[16px] !min-h-[16px]',
|
|
158
|
+
[ControlFieldSize.LG]: '!w-[20px] !h-[20px] !min-w-[20px] !min-h-[20px]',
|
|
158
159
|
}
|
|
159
|
-
return sizeVariant[props.size as ControlFieldSize] || '
|
|
160
|
+
return sizeVariant[props.size as ControlFieldSize] || '!w-[16px] !h-[16px] !min-w-[16px] !min-h-[16px]'
|
|
160
161
|
})
|
|
161
162
|
|
|
162
163
|
const labelSizeClass = computed(() => {
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
@error="handleError"
|
|
49
49
|
>
|
|
50
50
|
<template #placeholder-img>
|
|
51
|
-
<
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
51
|
+
<Icon
|
|
52
|
+
name="mdi:cloud-upload-outline"
|
|
53
|
+
:size="IconSize.XXL"
|
|
54
|
+
:color="ColorAccent.NEUTRAL"
|
|
55
55
|
/>
|
|
56
56
|
</template>
|
|
57
57
|
<template #title>
|
|
@@ -109,8 +109,8 @@ const props = defineProps({
|
|
|
109
109
|
},
|
|
110
110
|
helpText: String as PropType<string>,
|
|
111
111
|
icon: {
|
|
112
|
-
type: String as PropType<
|
|
113
|
-
default: '
|
|
112
|
+
type: String as PropType<string>,
|
|
113
|
+
default: 'mdi:cloud-upload-outline',
|
|
114
114
|
},
|
|
115
115
|
buttonText: String as PropType<string>,
|
|
116
116
|
upToText: {
|
|
@@ -42,16 +42,11 @@
|
|
|
42
42
|
]"
|
|
43
43
|
>
|
|
44
44
|
<!-- Icon -->
|
|
45
|
-
<
|
|
45
|
+
<Icon
|
|
46
46
|
v-if="icon"
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
:icon="icon"
|
|
51
|
-
size="20"
|
|
52
|
-
preserveAspectRatio="xMidYMid meet"
|
|
53
|
-
/>
|
|
54
|
-
</span>
|
|
47
|
+
:name="icon"
|
|
48
|
+
iconClass="text-icon-neutral-subtler"
|
|
49
|
+
/>
|
|
55
50
|
|
|
56
51
|
<!-- Input -->
|
|
57
52
|
<input
|
|
@@ -98,13 +93,13 @@
|
|
|
98
93
|
'focus:outline-none',
|
|
99
94
|
'transition-colors',
|
|
100
95
|
'cursor-pointer',
|
|
96
|
+
'h-[20px]'
|
|
101
97
|
]"
|
|
102
98
|
@click="handleSuffixClick"
|
|
103
99
|
>
|
|
104
|
-
<
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
preserveAspectRatio="xMidYMid meet"
|
|
100
|
+
<Icon
|
|
101
|
+
v-if="suffixIcon"
|
|
102
|
+
:name="suffixIcon"
|
|
108
103
|
/>
|
|
109
104
|
</button>
|
|
110
105
|
|
|
@@ -118,27 +113,21 @@
|
|
|
118
113
|
'focus:outline-none',
|
|
119
114
|
'transition-colors',
|
|
120
115
|
'cursor-pointer',
|
|
116
|
+
'h-[20px]'
|
|
121
117
|
]"
|
|
122
118
|
@click="() => showPassword = !showPassword"
|
|
123
119
|
>
|
|
124
|
-
<
|
|
125
|
-
:
|
|
126
|
-
size="20"
|
|
127
|
-
preserveAspectRatio="xMidYMid meet"
|
|
120
|
+
<Icon
|
|
121
|
+
:name="showPassword ? 'mdi:eye-off-outline' : 'mdi:eye-outline'"
|
|
128
122
|
/>
|
|
129
123
|
</button>
|
|
130
124
|
|
|
131
125
|
<!-- Error Icon -->
|
|
132
|
-
<
|
|
126
|
+
<Icon
|
|
133
127
|
v-if="hasError && !suffixIcon"
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
icon="mdiAlertCircle"
|
|
138
|
-
size="20"
|
|
139
|
-
preserveAspectRatio="xMidYMid meet"
|
|
140
|
-
/>
|
|
141
|
-
</span>
|
|
128
|
+
name="mdi:alert-circle-outline"
|
|
129
|
+
iconClass="text-icon-error"
|
|
130
|
+
/>
|
|
142
131
|
</div>
|
|
143
132
|
|
|
144
133
|
<!-- Help Text -->
|
|
@@ -171,8 +160,8 @@ const props = defineProps({
|
|
|
171
160
|
default: 'Placeholder',
|
|
172
161
|
},
|
|
173
162
|
helpText: String as PropType<string>,
|
|
174
|
-
icon: String as PropType<
|
|
175
|
-
suffixIcon: String as PropType<
|
|
163
|
+
icon: String as PropType<string>,
|
|
164
|
+
suffixIcon: String as PropType<string>,
|
|
176
165
|
linkText: String as PropType<string>,
|
|
177
166
|
linkUrl: String as PropType<string>,
|
|
178
167
|
size: {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
<ActionIconButton
|
|
20
20
|
v-if="index === items.length - 1"
|
|
21
21
|
:styleType="ButtonStyleType.NEUTRAL_OUTLINED"
|
|
22
|
-
icon="
|
|
22
|
+
icon="mdi:plus-circle-outline"
|
|
23
23
|
:size="ButtonSize.SM"
|
|
24
24
|
@click="addItem"
|
|
25
25
|
/>
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<ActionIconButton
|
|
29
29
|
v-if="items.length > 1"
|
|
30
30
|
:styleType="ButtonStyleType.DELETE_SOFT"
|
|
31
|
-
icon="
|
|
31
|
+
icon="mdi:minus-circle-outline"
|
|
32
32
|
:size="ButtonSize.SM"
|
|
33
33
|
@click="removeItem(index)"
|
|
34
34
|
/>
|
|
@@ -38,13 +38,10 @@
|
|
|
38
38
|
]"
|
|
39
39
|
>
|
|
40
40
|
<!-- Icon -->
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
preserveAspectRatio="xMidYMid meet"
|
|
46
|
-
/>
|
|
47
|
-
</span>
|
|
41
|
+
<Icon
|
|
42
|
+
:name="icon"
|
|
43
|
+
iconClass="text-icon-neutral-subtler"
|
|
44
|
+
/>
|
|
48
45
|
|
|
49
46
|
<!-- Input -->
|
|
50
47
|
<input
|
|
@@ -73,7 +70,7 @@
|
|
|
73
70
|
v-if="filled"
|
|
74
71
|
:size="ButtonSize.SM"
|
|
75
72
|
:styleType="ButtonStyleType.NEUTRAL_TRANSPARENT_SUBTLE"
|
|
76
|
-
icon="
|
|
73
|
+
icon="mdi:close-circle"
|
|
77
74
|
@click="clearField"
|
|
78
75
|
/>
|
|
79
76
|
</div>
|
|
@@ -101,8 +98,8 @@ const props = defineProps({
|
|
|
101
98
|
},
|
|
102
99
|
helpText: String as PropType<string>,
|
|
103
100
|
icon: {
|
|
104
|
-
type: String as PropType<
|
|
105
|
-
default: '
|
|
101
|
+
type: String as PropType<string>,
|
|
102
|
+
default: 'mdi:magnify',
|
|
106
103
|
},
|
|
107
104
|
size: {
|
|
108
105
|
type: String as PropType<InputSize>,
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
'transition-all duration-200',
|
|
70
70
|
disabled
|
|
71
71
|
? 'opacity-50 cursor-not-allowed'
|
|
72
|
-
: 'hover:bg-background-neutral-
|
|
72
|
+
: 'hover:bg-background-neutral-subtler hover:border-border-primary-brand-default hover:text-text-primary-brand-default cursor-pointer',
|
|
73
73
|
'focus:outline-none focus:ring-2 focus:ring-primary-brand-200'
|
|
74
74
|
]"
|
|
75
75
|
@click="startEditing(0)"
|
|
@@ -79,11 +79,10 @@
|
|
|
79
79
|
<span>
|
|
80
80
|
{{ `${currentValuePrefix || ''}${(modelValue as [number, number])[0]}${currentValueSuffix || ''}` }}
|
|
81
81
|
</span>
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
size="
|
|
85
|
-
|
|
86
|
-
class="ml-1 opacity-60"
|
|
82
|
+
<Icon
|
|
83
|
+
name="mdi:pencil"
|
|
84
|
+
:size="IconSize.SM"
|
|
85
|
+
iconClass="ml-1 opacity-60"
|
|
87
86
|
/>
|
|
88
87
|
</button>
|
|
89
88
|
|
|
@@ -167,7 +166,7 @@
|
|
|
167
166
|
'transition-all duration-200',
|
|
168
167
|
disabled
|
|
169
168
|
? 'opacity-50 cursor-not-allowed'
|
|
170
|
-
: 'hover:bg-background-neutral-
|
|
169
|
+
: 'hover:bg-background-neutral-subtler hover:border-border-primary-brand-default hover:text-text-primary-brand-default cursor-pointer',
|
|
171
170
|
'focus:outline-none focus:ring-2 focus:ring-primary-brand-200'
|
|
172
171
|
]"
|
|
173
172
|
@click="startEditing(1)"
|
|
@@ -175,11 +174,10 @@
|
|
|
175
174
|
@keydown.space.prevent="startEditing(1)"
|
|
176
175
|
>
|
|
177
176
|
<span>{{ `${currentValuePrefix || ''}${(modelValue as [number, number])[1]}${currentValueSuffix || ''}` }}</span>
|
|
178
|
-
<
|
|
179
|
-
|
|
180
|
-
size="
|
|
181
|
-
|
|
182
|
-
class="ml-1 opacity-60"
|
|
177
|
+
<Icon
|
|
178
|
+
name="mdi:pencil"
|
|
179
|
+
:size="IconSize.SM"
|
|
180
|
+
iconClass="ml-1 opacity-60"
|
|
183
181
|
/>
|
|
184
182
|
</button>
|
|
185
183
|
</div>
|
|
@@ -231,7 +229,7 @@
|
|
|
231
229
|
'transition-all duration-200',
|
|
232
230
|
disabled
|
|
233
231
|
? 'opacity-50 cursor-not-allowed'
|
|
234
|
-
: 'hover:bg-background-neutral-
|
|
232
|
+
: 'hover:bg-background-neutral-subtler hover:border-border-primary-brand-default hover:text-text-primary-brand-default cursor-pointer hover:shadow-sm',
|
|
235
233
|
'focus:outline-none focus:ring-2 focus:ring-primary-brand-200'
|
|
236
234
|
]"
|
|
237
235
|
@click="startEditing(0)"
|
|
@@ -241,11 +239,10 @@
|
|
|
241
239
|
<span>
|
|
242
240
|
{{ `${currentValuePrefix || ''}${modelValue}${currentValueSuffix || ''}` }}
|
|
243
241
|
</span>
|
|
244
|
-
<
|
|
245
|
-
|
|
246
|
-
size="
|
|
247
|
-
|
|
248
|
-
:class="[
|
|
242
|
+
<Icon
|
|
243
|
+
name="mdi:pencil"
|
|
244
|
+
:size="IconSize.SM"
|
|
245
|
+
:iconClass="[
|
|
249
246
|
'ml-1',
|
|
250
247
|
'opacity-60',
|
|
251
248
|
'group-hover:opacity-100',
|
|
@@ -309,7 +306,7 @@
|
|
|
309
306
|
'left-0',
|
|
310
307
|
'w-full',
|
|
311
308
|
'h-[4px]',
|
|
312
|
-
'bg-background-neutral-
|
|
309
|
+
'bg-background-neutral-subtler',
|
|
313
310
|
'rounded-full',
|
|
314
311
|
'-translate-y-1/2',
|
|
315
312
|
]"
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
<div
|
|
23
23
|
:class="[
|
|
24
24
|
'flex items-center gap-3',
|
|
25
|
-
label || icon
|
|
25
|
+
label || icon ? 'justify-between' : 'justify-end',
|
|
26
26
|
'text-sm w-full',
|
|
27
27
|
hasError ? 'text-text-error' : 'text-text-default',
|
|
28
28
|
checkboxWrapperClass && checkboxWrapperClass
|
|
@@ -30,27 +30,15 @@
|
|
|
30
30
|
>
|
|
31
31
|
<!-- Label + Icon block (only if present) -->
|
|
32
32
|
<div
|
|
33
|
-
v-if="label || icon
|
|
33
|
+
v-if="label || icon"
|
|
34
34
|
class="flex gap-2.5 w-full"
|
|
35
35
|
>
|
|
36
36
|
<!-- Icon -->
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
preserveAspectRatio="xMidYMid meet"
|
|
43
|
-
class="text-icon-default"
|
|
44
|
-
/>
|
|
45
|
-
<div
|
|
46
|
-
v-else
|
|
47
|
-
:class="[
|
|
48
|
-
customIconSizeClass,
|
|
49
|
-
'text-icon-default'
|
|
50
|
-
]"
|
|
51
|
-
v-html="customIcon"
|
|
52
|
-
/>
|
|
53
|
-
</template>
|
|
37
|
+
<Icon
|
|
38
|
+
v-if="icon"
|
|
39
|
+
:name="icon"
|
|
40
|
+
:iconClass="iconSizeClass"
|
|
41
|
+
/>
|
|
54
42
|
|
|
55
43
|
<!-- Label -->
|
|
56
44
|
<label
|
|
@@ -59,7 +47,6 @@
|
|
|
59
47
|
:class="[
|
|
60
48
|
disabled && 'text-text-neutral-disabled',
|
|
61
49
|
labelSizeClass,
|
|
62
|
-
customIcon && 'mt-1',
|
|
63
50
|
labelClass && labelClass
|
|
64
51
|
]"
|
|
65
52
|
v-html="label"
|
|
@@ -151,8 +138,7 @@ const props = defineProps({
|
|
|
151
138
|
default: ControlFieldSize.MD,
|
|
152
139
|
validator: (value: ControlFieldSize) => Object.values(ControlFieldSize).includes(value),
|
|
153
140
|
},
|
|
154
|
-
icon: String as PropType<
|
|
155
|
-
customIcon: String as PropType<any>,
|
|
141
|
+
icon: String as PropType<string>,
|
|
156
142
|
styleType: {
|
|
157
143
|
type: String as PropType<SwitchStyle>,
|
|
158
144
|
default: SwitchStyle.BRAND,
|
|
@@ -196,20 +182,12 @@ const labelSizeClass = computed(() => {
|
|
|
196
182
|
return sizeVariant[props.size as ControlFieldSize] || 'text-sm'
|
|
197
183
|
})
|
|
198
184
|
|
|
199
|
-
const
|
|
200
|
-
const sizeVariant = {
|
|
201
|
-
[ControlFieldSize.MD]: '20',
|
|
202
|
-
[ControlFieldSize.LG]: '24',
|
|
203
|
-
}
|
|
204
|
-
return sizeVariant[props.size as ControlFieldSize] || '20'
|
|
205
|
-
})
|
|
206
|
-
|
|
207
|
-
const customIconSizeClass = computed(() => {
|
|
185
|
+
const iconSizeClass = computed(() => {
|
|
208
186
|
const sizeVariant = {
|
|
209
|
-
[ControlFieldSize.MD]: 'w-[20px] h-[20px]',
|
|
210
|
-
[ControlFieldSize.LG]: 'w-[24px] h-[24px]',
|
|
187
|
+
[ControlFieldSize.MD]: 'w-[20px] h-[20px] min-w-[20px] min-h-[20px]',
|
|
188
|
+
[ControlFieldSize.LG]: 'w-[24px] h-[24px] min-w-[24px] min-h-[24px]',
|
|
211
189
|
}
|
|
212
|
-
return sizeVariant[props.size as ControlFieldSize] || 'w-[20px] h-[20px]'
|
|
190
|
+
return sizeVariant[props.size as ControlFieldSize] || 'w-[20px] h-[20px] min-w-[20px] min-h-[20px]'
|
|
213
191
|
})
|
|
214
192
|
|
|
215
193
|
const checkedBackgroundClass = computed(() => {
|
|
@@ -54,11 +54,13 @@
|
|
|
54
54
|
/>
|
|
55
55
|
|
|
56
56
|
<!-- Error Icon -->
|
|
57
|
-
<span
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
57
|
+
<span
|
|
58
|
+
v-if="hasError"
|
|
59
|
+
class="absolute top-4 right-4"
|
|
60
|
+
>
|
|
61
|
+
<Icon
|
|
62
|
+
name="mdi:alert-circle"
|
|
63
|
+
iconClass="text-icon-error"
|
|
62
64
|
/>
|
|
63
65
|
</span>
|
|
64
66
|
</div>
|
|
@@ -37,11 +37,10 @@
|
|
|
37
37
|
modelValue === value ? selectedIconBackgroundColorClass : 'bg-background-neutral-sublter'
|
|
38
38
|
]"
|
|
39
39
|
>
|
|
40
|
-
<
|
|
41
|
-
:
|
|
42
|
-
size="
|
|
43
|
-
|
|
44
|
-
:class="modelValue === value ? selectedIconColorClass : 'text-icon-neutral-subtle'"
|
|
40
|
+
<Icon
|
|
41
|
+
:name="icon"
|
|
42
|
+
:size="IconSize.LG"
|
|
43
|
+
:iconClass="modelValue === value ? selectedIconColorClass : 'text-icon-neutral-subtle'"
|
|
45
44
|
/>
|
|
46
45
|
</div>
|
|
47
46
|
<!-- Label with help text -->
|
|
@@ -126,8 +125,8 @@ const props = defineProps({
|
|
|
126
125
|
required: true,
|
|
127
126
|
},
|
|
128
127
|
icon: {
|
|
129
|
-
type: String as PropType<
|
|
130
|
-
default: '
|
|
128
|
+
type: String as PropType<string>,
|
|
129
|
+
default: 'mdi:help',
|
|
131
130
|
},
|
|
132
131
|
type: {
|
|
133
132
|
type: String as PropType<
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
|
|
2
|
+
<div
|
|
3
3
|
:class="[
|
|
4
4
|
'flex',
|
|
5
5
|
'items-center',
|
|
@@ -12,10 +12,9 @@
|
|
|
12
12
|
]"
|
|
13
13
|
>
|
|
14
14
|
<Icon
|
|
15
|
-
:icon
|
|
16
|
-
:type
|
|
15
|
+
:name="icon"
|
|
17
16
|
:mode
|
|
18
|
-
:iconClass
|
|
17
|
+
:iconClass="[iconSizeClass, iconColorClass]"
|
|
19
18
|
/>
|
|
20
19
|
</div>
|
|
21
20
|
</template>
|
|
@@ -23,19 +22,14 @@
|
|
|
23
22
|
// Props
|
|
24
23
|
const props = defineProps({
|
|
25
24
|
icon: {
|
|
26
|
-
type: String as PropType<
|
|
27
|
-
default: '
|
|
25
|
+
type: String as PropType<string>,
|
|
26
|
+
default: 'mdi:help',
|
|
28
27
|
},
|
|
29
28
|
styleType: {
|
|
30
29
|
type: String as PropType<IconContainerStyleType>,
|
|
31
30
|
default: IconContainerStyleType.FLAT,
|
|
32
31
|
validator: (value: IconContainerStyleType) => Object.values(IconContainerStyleType).includes(value),
|
|
33
32
|
},
|
|
34
|
-
type: {
|
|
35
|
-
type: String as PropType<IconType>,
|
|
36
|
-
default: IconType.NATIVE,
|
|
37
|
-
validator: (value: IconType) => Object.values(IconType).includes(value),
|
|
38
|
-
},
|
|
39
33
|
mode: {
|
|
40
34
|
type: String as PropType<IconMode>,
|
|
41
35
|
default: IconMode.CSS,
|
|
@@ -136,8 +130,4 @@ const iconSizeClass = computed(() => {
|
|
|
136
130
|
|
|
137
131
|
return sizeVariants[props.size as IconContainerSize] || 'w-[24px] h-[24px] min-w-[24px] min-h-[24px]'
|
|
138
132
|
})
|
|
139
|
-
|
|
140
|
-
const iconClass = computed(() => {
|
|
141
|
-
return [iconSizeClass.value, iconColorClass.value].join(' ')
|
|
142
|
-
})
|
|
143
133
|
</script>
|
|
@@ -1,37 +1,21 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<MdiIcon
|
|
3
|
-
v-if="type === IconType.NATIVE"
|
|
4
|
-
:icon
|
|
5
|
-
preserveAspectRatio="xMidYMid meet"
|
|
6
|
-
:class="[
|
|
7
|
-
iconSizeClass,
|
|
8
|
-
iconColorClass,
|
|
9
|
-
iconClass,
|
|
10
|
-
]"
|
|
11
|
-
/>
|
|
12
2
|
<NuxtIcon
|
|
13
|
-
|
|
14
|
-
:name="icon"
|
|
3
|
+
:name
|
|
15
4
|
:mode
|
|
16
5
|
:customize="svgCustomize"
|
|
17
6
|
:class="[
|
|
18
7
|
iconSizeClass,
|
|
19
8
|
iconColorClass,
|
|
20
|
-
|
|
9
|
+
...normalizedIconClass,
|
|
21
10
|
]"
|
|
22
11
|
/>
|
|
23
12
|
</template>
|
|
24
13
|
<script setup lang="ts">
|
|
25
14
|
// Props
|
|
26
15
|
const props = defineProps({
|
|
27
|
-
|
|
28
|
-
type: String as PropType<
|
|
29
|
-
default: '
|
|
30
|
-
},
|
|
31
|
-
type: {
|
|
32
|
-
type: String as PropType<IconType>,
|
|
33
|
-
default: IconType.NATIVE,
|
|
34
|
-
validator: (value: IconType) => Object.values(IconType).includes(value),
|
|
16
|
+
name: {
|
|
17
|
+
type: String as PropType<string>,
|
|
18
|
+
default: 'mdi:help',
|
|
35
19
|
},
|
|
36
20
|
mode: {
|
|
37
21
|
type: String as PropType<IconMode>,
|
|
@@ -49,7 +33,14 @@ const props = defineProps({
|
|
|
49
33
|
validator: (value: ColorAccent) => Object.values(ColorAccent).includes(value),
|
|
50
34
|
},
|
|
51
35
|
svgCustomize: Function as PropType<CollectionCustomizeCallback>,
|
|
52
|
-
iconClass: String as PropType<string>,
|
|
36
|
+
iconClass: [String, Array] as PropType<string | string[]>,
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
// Computed function
|
|
40
|
+
const normalizedIconClass = computed(() => {
|
|
41
|
+
return Array.isArray(props.iconClass)
|
|
42
|
+
? props.iconClass
|
|
43
|
+
: props.iconClass?.split(' ').filter(Boolean) || []
|
|
53
44
|
})
|
|
54
45
|
|
|
55
46
|
// Computed classes
|
|
@@ -122,8 +122,8 @@ const props = defineProps({
|
|
|
122
122
|
default: true,
|
|
123
123
|
},
|
|
124
124
|
icon: {
|
|
125
|
-
type: String as PropType<
|
|
126
|
-
default: '
|
|
125
|
+
type: String as PropType<string>,
|
|
126
|
+
default: 'mdi:alert-circle-outline',
|
|
127
127
|
},
|
|
128
128
|
backToHomeText: {
|
|
129
129
|
type: String as PropType<string>,
|
|
@@ -131,7 +131,7 @@ const props = defineProps({
|
|
|
131
131
|
},
|
|
132
132
|
backToHomeIcon: {
|
|
133
133
|
type: String as PropType<string>,
|
|
134
|
-
default: '
|
|
134
|
+
default: 'mdi:home-outline',
|
|
135
135
|
},
|
|
136
136
|
homeRoute: {
|
|
137
137
|
type: String as PropType<string>,
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"
|
|
36
36
|
>
|
|
37
37
|
<ActionIconButton
|
|
38
|
-
:icon="isMobileSidebarOpen ? '
|
|
38
|
+
:icon="isMobileSidebarOpen ? 'mdi:menu-open' : 'mdi:menu-close'"
|
|
39
39
|
class="lg:hidden shadow-sm"
|
|
40
40
|
@click="toggleMobileSidebar"
|
|
41
41
|
/>
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"
|
|
51
51
|
>
|
|
52
52
|
<ActionIconButton
|
|
53
|
-
:icon="isMobileSidebarOpen ? '
|
|
53
|
+
:icon="isMobileSidebarOpen ? 'mdi:menu-open' : 'mdi:menu-close'"
|
|
54
54
|
class="lg:hidden shadow-sm"
|
|
55
55
|
@click="toggleMobileSidebar"
|
|
56
56
|
/>
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
>
|
|
115
115
|
<template #activator="{ onClick }">
|
|
116
116
|
<ActionIconButton
|
|
117
|
-
icon="
|
|
117
|
+
icon="mdi:menu"
|
|
118
118
|
class="lg:hidden shadow-sm"
|
|
119
119
|
@click="onClick"
|
|
120
120
|
/>
|
|
@@ -140,7 +140,7 @@
|
|
|
140
140
|
"
|
|
141
141
|
>
|
|
142
142
|
<ActionIconButton
|
|
143
|
-
:icon="isMobileSidebarOpen ? '
|
|
143
|
+
:icon="isMobileSidebarOpen ? 'mdi:menu-open' : 'mdi:menu-close'"
|
|
144
144
|
class="lg:hidden shadow-sm"
|
|
145
145
|
@click="toggleMobileSidebar"
|
|
146
146
|
/>
|
|
@@ -48,7 +48,7 @@ const props = defineProps({
|
|
|
48
48
|
type: Number as PropType<number>,
|
|
49
49
|
default: 1,
|
|
50
50
|
},
|
|
51
|
-
listItemIcon: String as PropType<
|
|
51
|
+
listItemIcon: String as PropType<string>,
|
|
52
52
|
listItemIconClass: {
|
|
53
53
|
type: String as PropType<string>,
|
|
54
54
|
default: 'text-icon-secondary-brand-default'
|