@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.
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 +15 -15
  5. package/components/badges/IconTextBadge.vue +2 -2
  6. package/components/breadcrumbs/Breadcrumbs.vue +92 -27
  7. package/components/buttons/ActionButton.vue +40 -74
  8. package/components/buttons/ActionIconButton.vue +23 -51
  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 +14 -24
  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
@@ -1,9 +1,8 @@
1
1
  <template>
2
- <MdiIcon
3
- :icon
4
- :size="iconSize"
5
- preserveAspectRatio="xMidYMid meet"
2
+ <Icon
3
+ :name="icon"
6
4
  :class="[
5
+ iconSizeClass,
7
6
  colorClass,
8
7
  isInteractive && 'hover:cursor-pointer'
9
8
  ]"
@@ -13,8 +12,8 @@
13
12
  // Props
14
13
  const props = defineProps({
15
14
  icon: {
16
- type: String as PropType<any>,
17
- default: 'mdiStarOutline'
15
+ type: String as PropType<string>,
16
+ default: 'mdi:star-outline'
18
17
  },
19
18
  size: {
20
19
  type: String as PropType<RatingItemSize>,
@@ -33,15 +32,15 @@ const props = defineProps({
33
32
  })
34
33
 
35
34
  // Computed
36
- const iconSize = computed(() => {
35
+ const iconSizeClass = computed(() => {
37
36
  const sizeVariant = {
38
- [RatingItemSize.SM]: '20',
39
- [RatingItemSize.MD]: '24',
40
- [RatingItemSize.LG]: '32',
41
- [RatingItemSize.XL]: '40',
42
- [RatingItemSize.XXL]: '48',
37
+ [RatingItemSize.SM]: 'w-[20px] h-[20px] min-w-[20px] min-h-[20px]',
38
+ [RatingItemSize.MD]: 'w-[24px] h-[24px] min-w-[24px] min-h-[24px]',
39
+ [RatingItemSize.LG]: 'w-[32px] h-[32px] min-w-[32px] min-h-[32px]',
40
+ [RatingItemSize.XL]: 'w-[40px] h-[40px] min-w-[40px] min-h-[40px]',
41
+ [RatingItemSize.XXL]: 'w-[48px] h-[48px] min-w-[48px] min-h-[48px]',
43
42
  }
44
- return sizeVariant[props.size as RatingItemSize] || '20'
43
+ return sizeVariant[props.size as RatingItemSize] || 'w-[20px] h-[20px] min-w-[20px] min-h-[20px]'
45
44
  })
46
45
 
47
46
  const colorClass = computed(() => {
@@ -47,19 +47,19 @@ const props = defineProps({
47
47
  type: [Array, Number] as PropType<number | CircleStep[]>,
48
48
  default: () => [
49
49
  {
50
- icon: 'mdiHomeOutline',
50
+ icon: 'mdi:home-outline',
51
51
  },
52
52
  {
53
- icon: 'mdiAccountOutline',
53
+ icon: 'mdi:account-outline',
54
54
  },
55
55
  {
56
- icon: 'mdiMapMarkerStarOutline',
56
+ icon: 'mdi:map-marker-star-outline',
57
57
  },
58
58
  ],
59
59
  },
60
60
  type: String as PropType<StepIndicatorType>,
61
61
  size: String as PropType<StepIndicatorSize>,
62
- completedIcon: String as PropType<any>,
62
+ completedIcon: String as PropType<string>,
63
63
  isInteractive: {
64
64
  type: Boolean as PropType<boolean>,
65
65
  default: false,
@@ -78,25 +78,23 @@ const hoveredIndex = ref<number | null>(null)
78
78
  const stepItems = computed(() => {
79
79
  const activeIndex = props.modelValue > 0 ? props.modelValue - 1 : 0
80
80
 
81
- const stepsArray = Array.isArray(props.steps)
82
- ? props.steps
81
+ const stepsArray: CircleStep[] = Array.isArray(props.steps)
82
+ ? props.steps as CircleStep[]
83
83
  : Array.from({ length: props.steps }, () => ({}))
84
84
 
85
85
  return stepsArray.map((step, index) => {
86
- let status: StepStatus
86
+ let status: StepStatus;
87
87
 
88
88
  if (index < activeIndex) {
89
- status = StepStatus.COMPLETED
89
+ status = StepStatus.COMPLETED;
90
90
  } else if (index === activeIndex) {
91
- status = StepStatus.CURRENT
91
+ status = StepStatus.CURRENT;
92
92
  } else {
93
- status = StepStatus.INACTIVE
93
+ status = StepStatus.INACTIVE;
94
94
  }
95
95
 
96
- const icon = typeof step === 'object' && 'icon' in step ? step.icon : undefined
97
-
98
96
  return {
99
- icon,
97
+ icon: step.icon,
100
98
  status,
101
99
  }
102
100
  })
@@ -49,8 +49,8 @@ const props = defineProps({
49
49
  status: String as PropType<StepStatus>,
50
50
  size: String as PropType<StepIndicatorSize>,
51
51
  step: Number as PropType<number>,
52
- stepIcon: String as PropType<any>,
53
- completedIcon: String as PropType<any>,
52
+ stepIcon: String as PropType<string>,
53
+ completedIcon: String as PropType<string>,
54
54
  isInteractive: {
55
55
  type: Boolean as PropType<boolean>,
56
56
  default: false,
@@ -16,6 +16,7 @@
16
16
  <span
17
17
  v-if="status === StepStatus.NONE"
18
18
  :class="[
19
+ 'flex items-center justify-center',
19
20
  'font-bold',
20
21
  stepNumberSizeClass,
21
22
  textColorClass,
@@ -25,10 +26,9 @@
25
26
  {{ step }}
26
27
  </template>
27
28
  <template v-else-if="type === StepIndicatorType.ICON && stepIcon">
28
- <MdiIcon
29
- :icon="stepIcon"
30
- :size="iconSize"
31
- preserveAspectRatio="xMidYMid meet"
29
+ <Icon
30
+ :name="stepIcon"
31
+ :iconClass="iconSizeClass"
32
32
  />
33
33
  </template>
34
34
  </span>
@@ -37,6 +37,7 @@
37
37
  <span
38
38
  v-if="status === StepStatus.INACTIVE"
39
39
  :class="[
40
+ 'flex items-center justify-center',
40
41
  'font-bold',
41
42
  stepNumberSizeClass,
42
43
  textColorClass,
@@ -46,10 +47,9 @@
46
47
  {{ step }}
47
48
  </template>
48
49
  <template v-else-if="type === StepIndicatorType.ICON && stepIcon">
49
- <MdiIcon
50
- :icon="stepIcon"
51
- :size="iconSize"
52
- preserveAspectRatio="xMidYMid meet"
50
+ <Icon
51
+ :name="stepIcon"
52
+ :iconClass="iconSizeClass"
53
53
  />
54
54
  </template>
55
55
  </span>
@@ -58,6 +58,7 @@
58
58
  <span
59
59
  v-else-if="status === StepStatus.CURRENT"
60
60
  :class="[
61
+ 'flex items-center justify-center',
61
62
  'font-bold text-text-primary-brand-default',
62
63
  stepNumberSizeClass,
63
64
  textColorClass,
@@ -67,10 +68,9 @@
67
68
  {{ step }}
68
69
  </template>
69
70
  <template v-else-if="type === StepIndicatorType.ICON && stepIcon">
70
- <MdiIcon
71
- :icon="stepIcon"
72
- :size="iconSize"
73
- preserveAspectRatio="xMidYMid meet"
71
+ <Icon
72
+ :name="stepIcon"
73
+ :iconClass="iconSizeClass"
74
74
  />
75
75
  </template>
76
76
  <template v-else-if="type === StepIndicatorType.EMPTY">
@@ -87,13 +87,14 @@
87
87
  <!-- COMPLETED -->
88
88
  <span
89
89
  v-else-if="status === StepStatus.COMPLETED"
90
- class="text-sm font-semibold text-text-primary-brand-default"
90
+ :class="[
91
+ 'text-sm font-semibold text-text-primary-brand-default',
92
+ 'flex items-center justify-center',
93
+ ]"
91
94
  >
92
- <MdiIcon
93
- :icon="completedIcon"
94
- :size="iconSize"
95
- preserveAspectRatio="xMidYMid meet"
96
- class="text-icon-neutral-on-filled-bg"
95
+ <Icon
96
+ :name="completedIcon"
97
+ :iconClass="['!text-icon-neutral-on-filled-bg', iconSizeClass]"
97
98
  />
98
99
  </span>
99
100
  </div>
@@ -120,10 +121,10 @@ const props = defineProps({
120
121
  type: Number as PropType<number>,
121
122
  default: 1,
122
123
  },
123
- stepIcon: String as PropType<any>,
124
+ stepIcon: String as PropType<string>,
124
125
  completedIcon: {
125
- type: String as PropType<any>,
126
- default: 'mdiCheck',
126
+ type: String as PropType<string>,
127
+ default: 'mdi:check',
127
128
  },
128
129
  isHovered: {
129
130
  type: Boolean as PropType<boolean>,
@@ -160,15 +161,15 @@ const containerBorderClass = computed(() => {
160
161
  return base
161
162
  })
162
163
 
163
- const iconSize = computed(() => {
164
+ const iconSizeClass = computed(() => {
164
165
  const variant = {
165
- [StepIndicatorSize.XL]: '24',
166
- [StepIndicatorSize.LG]: '20',
167
- [StepIndicatorSize.MD]: '20',
168
- [StepIndicatorSize.SM]: '16',
169
- [StepIndicatorSize.XS]: '16',
166
+ [StepIndicatorSize.XL]: 'w-[24px] h-[24px] min-w-[24px] min-h-[24px]',
167
+ [StepIndicatorSize.LG]: 'w-[20px] h-[20px] min-w-[20px] min-h-[20px]',
168
+ [StepIndicatorSize.MD]: 'w-[20px] h-[20px] min-w-[20px] min-h-[20px]',
169
+ [StepIndicatorSize.SM]: 'w-[16px] h-[16px] min-w-[16px] min-h-[16px]',
170
+ [StepIndicatorSize.XS]: 'w-[16px] h-[16px] min-w-[16px] min-h-[16px]',
170
171
  }
171
- return variant[props.size as StepIndicatorSize] || '24'
172
+ return variant[props.size as StepIndicatorSize] || 'w-[24px] h-[24px] min-w-[24px] min-h-[24px]'
172
173
  })
173
174
 
174
175
  const stepNumberSizeClass = computed(() => {
@@ -76,7 +76,7 @@ const props = defineProps({
76
76
  },
77
77
  type: String as PropType<StepIndicatorType>,
78
78
  size: String as PropType<StepIndicatorSize>,
79
- completedIcon: String as PropType<any>,
79
+ completedIcon: String as PropType<string>,
80
80
  isInteractive: {
81
81
  type: Boolean as PropType<boolean>,
82
82
  default: false,
@@ -125,8 +125,8 @@ const props = defineProps({
125
125
  default: StepIndicatorSize.SM,
126
126
  validator: (value: StepIndicatorSize) => Object.values(StepIndicatorSize).includes(value),
127
127
  },
128
- stepIcon: String as PropType<any>,
129
- stepCompletedIcon: String as PropType<any>,
128
+ stepIcon: String as PropType<string>,
129
+ stepCompletedIcon: String as PropType<string>,
130
130
  isLast: {
131
131
  type: Boolean as PropType<boolean>,
132
132
  default: false,
@@ -39,7 +39,7 @@ defineProps({
39
39
  items: Array as PropType<VerticalStepperItem[]>,
40
40
  stepType: String as PropType<StepIndicatorType>,
41
41
  stepSize: String as PropType<StepIndicatorSize>,
42
- stepCompletedIcon: String as PropType<any>,
42
+ stepCompletedIcon: String as PropType<string>,
43
43
  hasStepper: {
44
44
  type: Boolean as PropType<boolean>,
45
45
  default: true,
@@ -10,14 +10,9 @@
10
10
  styleClass
11
11
  ]"
12
12
  >
13
- <MdiIcon
13
+ <Icon
14
14
  v-if="decoration === TabDecoration.ICON"
15
- size="20"
16
- preserveAspectRatio="xMidYMid meet"
17
- :class="[
18
- 'min-w-[20px]'
19
- ]"
20
- :icon
15
+ :name="icon"
21
16
  />
22
17
 
23
18
  <template v-if="decoration === TabDecoration.IMAGE">
@@ -79,8 +74,8 @@ const props = defineProps({
79
74
  validator: (value: TabDecoration) => Object.values(TabDecoration).includes(value),
80
75
  },
81
76
  icon: {
82
- type: String as PropType<any>,
83
- default: 'mdiHelp',
77
+ type: String as PropType<string>,
78
+ default: 'mdi:help',
84
79
  },
85
80
  imgUrl: String as PropType<string>,
86
81
  active: {
@@ -1,5 +1,6 @@
1
1
  export enum DropdownItemType {
2
2
  TEXT = 'text',
3
+ DANGER_TEXT = 'danger-text',
3
4
  ICON = 'icon',
4
5
  DANGER_ICON = 'danger-icon',
5
6
  USER = 'user',
@@ -17,7 +17,7 @@ export interface OptionButton extends ActionButton {
17
17
  export interface AlertButton {
18
18
  text: string
19
19
  actionType?: ButtonActionType
20
- icon?: any
20
+ icon?: string
21
21
  iconPosition?: IconPosition
22
22
  disabled?: boolean
23
23
  to?: string
@@ -2,8 +2,7 @@ export interface SelectOption {
2
2
  id?: string | number
3
3
  value: string | number
4
4
  text?: string
5
- icon?: any
6
- customIcon?: string
5
+ icon?: string
7
6
  userDisplayName?: string
8
7
  userProfileImg?: string
9
8
  imgUrl?: string
package/nuxt.config.ts CHANGED
@@ -10,7 +10,7 @@ export default defineNuxtConfig({
10
10
  '../air-ui-utils',
11
11
  ],
12
12
 
13
- modules: ["@nuxt/image", "nuxt-mdi", "@nuxt/eslint", '@vueuse/nuxt', "@nuxt/icon"],
13
+ modules: ["@nuxt/image", "@nuxt/eslint", '@vueuse/nuxt', "@nuxt/icon"],
14
14
 
15
15
  plugins: ["@/plugins/vue3-toastify"],
16
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imaginario27/air-ui-ds",
3
- "version": "1.0.23",
3
+ "version": "1.1.1",
4
4
  "author": "imaginario27",
5
5
  "type": "module",
6
6
  "homepage": "https://air-ui.netlify.app/",
@@ -35,7 +35,6 @@
35
35
  "jspdf": "3.0.3",
36
36
  "jspdf-autotable": "5.0.2",
37
37
  "nuxt": "4.1.2",
38
- "nuxt-mdi": "2.1.1",
39
38
  "qrcode.vue": "3.6.0",
40
39
  "tailwindcss": "4.1.13",
41
40
  "vue": "3.5.22",
@@ -1,90 +0,0 @@
1
- <template>
2
- <div
3
- :class="[
4
- orientation === Orientation.HORIZONTAL ? 'flex flex-col gap-2' : 'flex gap-6 flex-wrap',
5
- ]"
6
- >
7
- <div>
8
- <p
9
- v-if="title"
10
- class="text-sm font-semibold text-theme-neutral-50 mb-4"
11
- >
12
- {{ title }}
13
- </p>
14
-
15
- <!-- Solo SVGs -->
16
- <div
17
- v-if="onlySvgs"
18
- class="flex gap-3 flex-wrap"
19
- >
20
- <NuxtLink
21
- v-for="(item, index) in items"
22
- :key="index"
23
- :to="item.path"
24
- class="inline-block"
25
- target="_blank"
26
- >
27
- <SVGImage
28
- v-if="item.svg"
29
- :src="item.svg"
30
- alt="icon"
31
- class="max-w-[20px] filter invert"
32
- />
33
- </NuxtLink>
34
- </div>
35
-
36
- <!-- Texto / Iconos -->
37
- <div
38
- v-else
39
- :class="[
40
- orientation === Orientation.VERTICAL
41
- ? 'flex flex-col gap-4'
42
- : 'flex gap-6 flex-wrap',
43
- ]"
44
- >
45
- <NuxtLink
46
- v-for="(item, index) in items"
47
- :key="index"
48
- :to="item.path"
49
- class="flex items-center gap-2 text-sm text-theme-neutral-50 hover:underline"
50
- >
51
- <MdiIcon
52
- v-if="item.icon"
53
- :icon="item.icon as any"
54
- size="20"
55
- preserveAspectRatio="xMidYMid meet"
56
- />
57
- <span v-if="item.text">{{ item.text }}</span>
58
- </NuxtLink>
59
- </div>
60
- </div>
61
- </div>
62
- </template>
63
-
64
- <script setup lang="ts">
65
- // Props
66
-
67
- type NavItem = {
68
- path: string
69
- text?: string
70
- icon?: string
71
- svg?: string
72
- }
73
-
74
- const props = defineProps({
75
- title: {
76
- type: String,
77
- default: '',
78
- },
79
- items: {
80
- type: Array as PropType<NavItem[]>,
81
- required: true,
82
- },
83
- orientation: {
84
- type: String as PropType<Orientation>,
85
- default: Orientation.VERTICAL,
86
- },
87
- })
88
-
89
- const onlySvgs = computed(() => props.items.every(item => item.svg && !item.text && !item.icon))
90
- </script>