@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.
Files changed (73) hide show
  1. package/components/accordions/AccordionItem.vue +1 -1
  2. package/components/alerts/Alert.vue +19 -22
  3. package/components/badges/Badge.vue +32 -25
  4. package/components/badges/IconBadge.vue +7 -7
  5. package/components/badges/IconTextBadge.vue +2 -2
  6. package/components/breadcrumbs/Breadcrumbs.vue +92 -27
  7. package/components/buttons/ActionButton.vue +34 -68
  8. package/components/buttons/ActionIconButton.vue +11 -39
  9. package/components/buttons/AlertButton.vue +8 -13
  10. package/components/buttons/AlertIconButton.vue +6 -7
  11. package/components/buttons/CopyButton.vue +4 -4
  12. package/components/buttons/options/OptionButton.vue +2 -2
  13. package/components/buttons/toggle/ToggleButton.vue +8 -10
  14. package/components/cards/specific/ContactDetailsCard.vue +4 -8
  15. package/components/cards/specific/FeatureCard.vue +2 -2
  16. package/components/cards/specific/HelpTopicCard.vue +4 -4
  17. package/components/cards/specific/subscription/SubscriptionPlanCard.vue +6 -6
  18. package/components/cards/specific/subscription/UniqueSubscriptionPlanCard.vue +1 -1
  19. package/components/collapsibles/Collapsible.vue +1 -1
  20. package/components/content/ContentItem.vue +2 -2
  21. package/components/content/ContentItemImage.vue +12 -14
  22. package/components/dropdowns/DropdownMenuItem.vue +10 -10
  23. package/components/dropdowns/DropdownSelect.vue +5 -16
  24. package/components/dropdowns/DropdownSelectItem.vue +13 -23
  25. package/components/empty-states/EmptyState.vue +21 -27
  26. package/components/features/Feature.vue +11 -48
  27. package/components/forms/fields/ButtonField.vue +2 -9
  28. package/components/forms/fields/CheckboxField.vue +9 -8
  29. package/components/forms/fields/DataField.vue +1 -1
  30. package/components/forms/fields/FileUploadField.vue +6 -6
  31. package/components/forms/fields/InputField.vue +17 -28
  32. package/components/forms/fields/RepeaterField.vue +2 -2
  33. package/components/forms/fields/SearchField.vue +7 -10
  34. package/components/forms/fields/SliderField.vue +16 -19
  35. package/components/forms/fields/SwitchField.vue +12 -34
  36. package/components/forms/fields/TextareaField.vue +7 -5
  37. package/components/forms/fields/radio/RadioButtonField.vue +6 -7
  38. package/components/icons/ContainedIcon.vue +5 -15
  39. package/components/icons/Icon.vue +13 -22
  40. package/components/layouts/ErrorDisplay.vue +3 -3
  41. package/components/layouts/headers/CompactHeader.vue +4 -4
  42. package/components/layouts/headers/ContentPageHeader.vue +1 -1
  43. package/components/lists/List.vue +1 -1
  44. package/components/lists/ListItem.vue +11 -14
  45. package/components/loaders/LoadingScreen.vue +3 -3
  46. package/components/modals/DangerModalDialog.vue +4 -4
  47. package/components/modals/InfoModalDialog.vue +3 -3
  48. package/components/modals/ModalDialog.vue +1 -1
  49. package/components/modals/SuccessModalDialog.vue +2 -2
  50. package/components/navigation/links/NavLink.vue +10 -10
  51. package/components/navigation/nav-sidebar/BottomUserNavBar.vue +3 -3
  52. package/components/navigation/nav-sidebar/NavSidebar.vue +9 -9
  53. package/components/navigation/nav-sidebar/NavSidebarMenuItem.vue +7 -9
  54. package/components/navigation/nav-sidebar/NavSidebarMenuSectionTitle.vue +4 -5
  55. package/components/pagination/ButtonPagination.vue +6 -10
  56. package/components/pagination/SimplePagination.vue +2 -2
  57. package/components/password/SecurePasswordCondition.vue +5 -6
  58. package/components/rating/InteractiveRating.vue +6 -6
  59. package/components/rating/Rating.vue +6 -6
  60. package/components/rating/RatingItem.vue +12 -13
  61. package/components/steppers/CircleStepper.vue +11 -13
  62. package/components/steppers/Step.vue +2 -2
  63. package/components/steppers/StepIndicator.vue +29 -28
  64. package/components/steppers/TabStepper.vue +1 -1
  65. package/components/steppers/vertical-stepper/VerticalStep.vue +2 -2
  66. package/components/steppers/vertical-stepper/VerticalStepper.vue +1 -1
  67. package/components/tabs/Tab.vue +4 -9
  68. package/models/enums/dropdowns.ts +1 -0
  69. package/models/types/buttons.ts +1 -1
  70. package/models/types/selects.ts +1 -2
  71. package/nuxt.config.ts +1 -1
  72. package/package.json +1 -2
  73. 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<any>,
66
- default: "mdiHelp"
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
- <MdiIcon
57
+ <Icon
58
58
  v-if="modelValue"
59
- icon="mdiCheckBold"
60
- :size="checkboxIconSizeClass"
61
- preserveAspectRatio="xMidYMid meet"
62
- :class="disabled ? 'text-icon-neutral-disabled' : 'text-icon-neutral-on-filled-bg'"
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]: '16',
157
- [ControlFieldSize.LG]: '20',
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] || '16'
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(() => {
@@ -35,7 +35,7 @@
35
35
 
36
36
  <ActionIconButton
37
37
  v-if="hasCopyToClipboardButton"
38
- icon="mdiContentCopy"
38
+ icon="mdi:content-copy"
39
39
  :size="ButtonSize.XS"
40
40
  @click="handleCopyToClipboard"
41
41
  />
@@ -48,10 +48,10 @@
48
48
  @error="handleError"
49
49
  >
50
50
  <template #placeholder-img>
51
- <MdiIcon
52
- :icon="icon"
53
- preserveAspectRatio="xMidYMid meet"
54
- class="min-w-[40px] min-h-[40px] aspect-square text-icon-default"
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<any>,
113
- default: 'mdiUploadOutline',
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
- <span
45
+ <Icon
46
46
  v-if="icon"
47
- class="text-icon-neutral-subtler"
48
- >
49
- <MdiIcon
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
- <MdiIcon
105
- :icon="suffixIcon"
106
- size="20"
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
- <MdiIcon
125
- :icon="showPassword ? 'mdiEyeOffOutline' : 'mdiEyeOutline'"
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
- <span
126
+ <Icon
133
127
  v-if="hasError && !suffixIcon"
134
- class="text-icon-error"
135
- >
136
- <MdiIcon
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<any>,
175
- suffixIcon: String as PropType<any>,
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="mdiPlusCircleOutline"
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="mdiMinusCircleOutline"
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
- <span class="text-icon-neutral-subtler">
42
- <MdiIcon
43
- :icon
44
- size="20"
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="mdiCloseCircle"
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<any>,
105
- default: 'mdiMagnify',
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-sublter hover:border-border-primary-brand-default hover:text-text-primary-brand-default cursor-pointer',
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
- <MdiIcon
83
- icon="mdiPencil"
84
- size="14px"
85
- preserveAspectRatio="xMidYMid meet"
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-sublter hover:border-border-primary-brand-default hover:text-text-primary-brand-default cursor-pointer',
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
- <MdiIcon
179
- icon="mdiPencil"
180
- size="14px"
181
- preserveAspectRatio="xMidYMid meet"
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-sublter hover:border-border-primary-brand-default hover:text-text-primary-brand-default cursor-pointer hover:shadow-sm',
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
- <MdiIcon
245
- icon="mdiPencil"
246
- size="14px"
247
- preserveAspectRatio="xMidYMid meet"
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-sublter',
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 || customIcon ? 'justify-between' : 'justify-end',
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 || customIcon"
33
+ v-if="label || icon"
34
34
  class="flex gap-2.5 w-full"
35
35
  >
36
36
  <!-- Icon -->
37
- <template v-if="icon || customIcon">
38
- <MdiIcon
39
- v-if="icon && !customIcon"
40
- :icon="icon"
41
- :size="iconSize"
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<any>,
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 iconSize = computed(() => {
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 v-if="hasError" class="text-icon-error absolute top-4 right-4">
58
- <MdiIcon
59
- icon="mdiAlertCircle"
60
- size="20"
61
- preserveAspectRatio="xMidYMid meet"
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
- <MdiIcon
41
- :icon="icon"
42
- size="24"
43
- preserveAspectRatio="xMidYMid meet"
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<any>,
130
- default: 'mdiHelp',
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
- <div
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<any>,
27
- default: 'mdiHelp',
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
- v-else-if="type === IconType.COLLECTION"
14
- :name="icon"
3
+ :name
15
4
  :mode
16
5
  :customize="svgCustomize"
17
6
  :class="[
18
7
  iconSizeClass,
19
8
  iconColorClass,
20
- iconClass,
9
+ ...normalizedIconClass,
21
10
  ]"
22
11
  />
23
12
  </template>
24
13
  <script setup lang="ts">
25
14
  // Props
26
15
  const props = defineProps({
27
- icon: {
28
- type: String as PropType<any>,
29
- default: 'mdiHelp',
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<any>,
126
- default: 'mdiAlertCircleOutline',
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: 'mdiHomeOutline',
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 ? 'mdiMenuOpen' : 'mdiMenuClose'"
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 ? 'mdiMenuOpen' : 'mdiMenuClose'"
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="mdiMenu"
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 ? 'mdiMenuOpen' : 'mdiMenuClose'"
143
+ :icon="isMobileSidebarOpen ? 'mdi:menu-open' : 'mdi:menu-close'"
144
144
  class="lg:hidden shadow-sm"
145
145
  @click="toggleMobileSidebar"
146
146
  />
@@ -16,7 +16,7 @@
16
16
  :text="goBackText"
17
17
  :iconPosition="IconPosition.LEFT"
18
18
  :to="goBackLink"
19
- icon="mdiKeyboardBackspace"
19
+ icon="mdi:keyboard-backspace"
20
20
  class="mb-2"
21
21
  />
22
22
 
@@ -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<any>,
51
+ listItemIcon: String as PropType<string>,
52
52
  listItemIconClass: {
53
53
  type: String as PropType<string>,
54
54
  default: 'text-icon-secondary-brand-default'