@imaginario27/air-ui-ds 1.0.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 (220) hide show
  1. package/assets/css/defaults.css +55 -0
  2. package/assets/css/main.css +238 -0
  3. package/assets/css/theme/colors.css +106 -0
  4. package/assets/css/theme/primitives.css +105 -0
  5. package/assets/css/theme/ui-theme.css +454 -0
  6. package/assets/images/placeholders/missing-image-placeholder.png +0 -0
  7. package/components/accordions/Accordion.vue +31 -0
  8. package/components/accordions/AccordionGroup.vue +78 -0
  9. package/components/accordions/AccordionItem.vue +39 -0
  10. package/components/action-panels/ActionPanel.vue +49 -0
  11. package/components/alerts/Alert.vue +159 -0
  12. package/components/avatars/Avatar.vue +152 -0
  13. package/components/avatars/AvatarStack.vue +97 -0
  14. package/components/avatars/AvatarStackCounter.vue +74 -0
  15. package/components/badges/Badge.vue +221 -0
  16. package/components/badges/BadgeStack.vue +110 -0
  17. package/components/badges/IconBadge.vue +57 -0
  18. package/components/badges/IconTextBadge.vue +50 -0
  19. package/components/breadcrumbs/Breadcrumbs.vue +54 -0
  20. package/components/buttons/ActionButton.vue +395 -0
  21. package/components/buttons/ActionIconButton.vue +283 -0
  22. package/components/buttons/AlertButton.vue +125 -0
  23. package/components/buttons/AlertIconButton.vue +105 -0
  24. package/components/buttons/PaginationButton.vue +45 -0
  25. package/components/buttons/options/OptionButton.vue +61 -0
  26. package/components/buttons/options/OptionButtonGroup.vue +155 -0
  27. package/components/buttons/options/OptionButtonSlider.vue +154 -0
  28. package/components/buttons/toggle/ToggleButton.vue +142 -0
  29. package/components/buttons/toggle/ToggleButtonGroup.vue +73 -0
  30. package/components/cards/Card.vue +33 -0
  31. package/components/cards/CardActions.vue +5 -0
  32. package/components/cards/CardBody.vue +5 -0
  33. package/components/cards/CardFooter.vue +20 -0
  34. package/components/cards/CardHeader.vue +5 -0
  35. package/components/cards/CardTitle.vue +13 -0
  36. package/components/cards/specific/ContactDetailsCard.vue +47 -0
  37. package/components/cards/specific/FeatureCard.vue +59 -0
  38. package/components/cards/specific/HelpTopicCard.vue +62 -0
  39. package/components/cards/specific/MetricCard.vue +42 -0
  40. package/components/cards/specific/TestimonialCard.vue +57 -0
  41. package/components/cards/specific/subscription/CurrentActiveSubscriptionCard.vue +105 -0
  42. package/components/cards/specific/subscription/SubscriptionPlanCard.vue +178 -0
  43. package/components/cards/specific/subscription/UniqueSubscriptionPlanCard.vue +106 -0
  44. package/components/collapsibles/Collapsible.vue +33 -0
  45. package/components/content/ContentItem.vue +144 -0
  46. package/components/content/ContentItemImage.vue +125 -0
  47. package/components/dividers/Divider.vue +35 -0
  48. package/components/dividers/TextLineDivider.vue +58 -0
  49. package/components/dropdowns/DropdownMenu.vue +207 -0
  50. package/components/dropdowns/DropdownMenuActions.vue +11 -0
  51. package/components/dropdowns/DropdownMenuItem.vue +240 -0
  52. package/components/dropdowns/DropdownSelect.vue +469 -0
  53. package/components/dropdowns/DropdownSelectItem.vue +182 -0
  54. package/components/empty-states/EmptyState.vue +170 -0
  55. package/components/features/Feature.vue +77 -0
  56. package/components/forms/DataDetails.vue +7 -0
  57. package/components/forms/DataDetailsActions.vue +23 -0
  58. package/components/forms/DataDetailsFieldGroup.vue +35 -0
  59. package/components/forms/DataDetailsRow.vue +22 -0
  60. package/components/forms/Form.vue +25 -0
  61. package/components/forms/FormActions.vue +23 -0
  62. package/components/forms/FormFieldGroup.vue +35 -0
  63. package/components/forms/FormRow.vue +22 -0
  64. package/components/forms/fields/ButtonField.vue +119 -0
  65. package/components/forms/fields/CheckboxField.vue +205 -0
  66. package/components/forms/fields/DataField.vue +99 -0
  67. package/components/forms/fields/FileUploadField.vue +326 -0
  68. package/components/forms/fields/InputField.vue +371 -0
  69. package/components/forms/fields/OptionButtonsGroupField.vue +120 -0
  70. package/components/forms/fields/RepeaterField.vue +109 -0
  71. package/components/forms/fields/SearchField.vue +184 -0
  72. package/components/forms/fields/SelectField.vue +233 -0
  73. package/components/forms/fields/SliderField.vue +759 -0
  74. package/components/forms/fields/SwitchField.vue +257 -0
  75. package/components/forms/fields/TextareaField.vue +205 -0
  76. package/components/forms/fields/ToggleButtonsGroupField.vue +65 -0
  77. package/components/forms/fields/radio/RadioButtonField.vue +238 -0
  78. package/components/forms/fields/radio/RadioField.vue +157 -0
  79. package/components/forms/fields/radio/RadioGroupField.vue +156 -0
  80. package/components/icons/ContainedIcon.vue +130 -0
  81. package/components/images/QRCode.vue +124 -0
  82. package/components/layouts/ContainerWrapper.vue +13 -0
  83. package/components/layouts/ContentBody.vue +30 -0
  84. package/components/layouts/Grid.vue +25 -0
  85. package/components/layouts/Heading.vue +159 -0
  86. package/components/layouts/MainContent.vue +26 -0
  87. package/components/layouts/MaxWidthContainer.vue +15 -0
  88. package/components/layouts/Overtitle.vue +25 -0
  89. package/components/layouts/headers/CompactHeader.vue +181 -0
  90. package/components/layouts/headers/PageHeader.vue +102 -0
  91. package/components/layouts/headers/WebAppHeader.vue +54 -0
  92. package/components/layouts/section/Section.vue +90 -0
  93. package/components/layouts/section/SectionBody.vue +12 -0
  94. package/components/layouts/section/SectionHeader.vue +12 -0
  95. package/components/layouts/section/SectionTitle.vue +13 -0
  96. package/components/lists/List.vue +69 -0
  97. package/components/lists/ListItem.vue +58 -0
  98. package/components/loaders/Loading.vue +83 -0
  99. package/components/loaders/LoadingScreen.vue +285 -0
  100. package/components/modals/DangerModalDialog.vue +149 -0
  101. package/components/modals/InfoModalDialog.vue +143 -0
  102. package/components/modals/ModalActions.vue +22 -0
  103. package/components/modals/ModalContent.vue +5 -0
  104. package/components/modals/ModalDescription.vue +5 -0
  105. package/components/modals/ModalDialog.vue +122 -0
  106. package/components/modals/ModalHeaderGroup.vue +19 -0
  107. package/components/modals/ModalHeadings.vue +5 -0
  108. package/components/modals/ModalSubtitle.vue +14 -0
  109. package/components/modals/ModalTitle.vue +14 -0
  110. package/components/modals/SuccessModalDialog.vue +90 -0
  111. package/components/modules/AppLogo.vue +46 -0
  112. package/components/modules/SVGImage.vue +44 -0
  113. package/components/navigation/links/NavLink.vue +112 -0
  114. package/components/navigation/nav-menu/NavFooterMenu.vue +91 -0
  115. package/components/navigation/nav-menu/NavMenu.vue +36 -0
  116. package/components/navigation/nav-menu/NavMenuItem.vue +44 -0
  117. package/components/navigation/nav-sidebar/BottomUserNavBar.vue +83 -0
  118. package/components/navigation/nav-sidebar/NavSidebar.vue +172 -0
  119. package/components/navigation/nav-sidebar/NavSidebarMenu.vue +14 -0
  120. package/components/navigation/nav-sidebar/NavSidebarMenuItem.vue +76 -0
  121. package/components/navigation/nav-sidebar/NavSidebarMenuSectionTitle.vue +54 -0
  122. package/components/navigation/table-of-contents/TableOfContents.vue +35 -0
  123. package/components/navigation/table-of-contents/TableOfContentsItem.vue +40 -0
  124. package/components/navigation/table-of-contents/TableOfContentsSidebar.vue +29 -0
  125. package/components/pagination/ButtonPagination.vue +274 -0
  126. package/components/pagination/RowsPerPage.vue +60 -0
  127. package/components/pagination/SimplePagination.vue +97 -0
  128. package/components/password/SecurePasswordCondition.vue +41 -0
  129. package/components/password/SecurePasswordConditions.vue +83 -0
  130. package/components/placeholders/ContentPlaceholder.vue +41 -0
  131. package/components/popovers/Popover.vue +128 -0
  132. package/components/rating/InteractiveRating.vue +94 -0
  133. package/components/rating/Rating.vue +60 -0
  134. package/components/rating/RatingItem.vue +54 -0
  135. package/components/skeletons/Skeleton.vue +11 -0
  136. package/components/spinners/Spinner.vue +13 -0
  137. package/components/steppers/CircleStepper.vue +122 -0
  138. package/components/steppers/Step.vue +72 -0
  139. package/components/steppers/StepIndicator.vue +228 -0
  140. package/components/steppers/TabStepper.vue +126 -0
  141. package/components/steppers/vertical-stepper/VerticalStep.vue +223 -0
  142. package/components/steppers/vertical-stepper/VerticalStepper.vue +63 -0
  143. package/components/tables/Table.vue +26 -0
  144. package/components/tables/TableBody.vue +5 -0
  145. package/components/tables/TableCell.vue +34 -0
  146. package/components/tables/TableCellActions.vue +7 -0
  147. package/components/tables/TableHeader.vue +5 -0
  148. package/components/tables/TableHeaderCell.vue +15 -0
  149. package/components/tables/TableRow.vue +14 -0
  150. package/components/tables/TableWrapper.vue +12 -0
  151. package/components/tabs/Tab.vue +145 -0
  152. package/components/tabs/TabBar.vue +64 -0
  153. package/components/tabs/TabContent.vue +5 -0
  154. package/components/tabs/TabsContainer.vue +5 -0
  155. package/components/transitions/HorizontalExpansionTransition.vue +12 -0
  156. package/components/transitions/VerticalExpansionTransition.vue +14 -0
  157. package/components/users/Author.vue +113 -0
  158. package/components/users/User.vue +53 -0
  159. package/composables/useAccordion.ts +12 -0
  160. package/composables/useDarkMode.ts +9 -0
  161. package/composables/useDropdownMenu.ts +25 -0
  162. package/composables/useForm.ts +134 -0
  163. package/composables/useFormValidationMode.ts +11 -0
  164. package/composables/useIsMobile.ts +27 -0
  165. package/composables/useMobileSidebar.ts +32 -0
  166. package/composables/useShiki.ts +12 -0
  167. package/composables/useTableOfContents.ts +50 -0
  168. package/composables/useToastifyConfig.ts +7 -0
  169. package/eslint.config.mjs +14 -0
  170. package/models/constants/app.ts +8 -0
  171. package/models/constants/form.ts +22 -0
  172. package/models/enums/alerts.ts +6 -0
  173. package/models/enums/aspect-ratios.ts +9 -0
  174. package/models/enums/avatars.ts +21 -0
  175. package/models/enums/badges.ts +10 -0
  176. package/models/enums/buttons.ts +38 -0
  177. package/models/enums/colors.ts +9 -0
  178. package/models/enums/content.ts +4 -0
  179. package/models/enums/counters.ts +4 -0
  180. package/models/enums/dividers.ts +9 -0
  181. package/models/enums/dropdowns.ts +18 -0
  182. package/models/enums/effects.ts +6 -0
  183. package/models/enums/emptyPlaceholders.ts +5 -0
  184. package/models/enums/formFields.ts +19 -0
  185. package/models/enums/formValidations.ts +4 -0
  186. package/models/enums/headings.ts +11 -0
  187. package/models/enums/icons.ts +22 -0
  188. package/models/enums/images.ts +16 -0
  189. package/models/enums/lists.ts +10 -0
  190. package/models/enums/loaders.ts +15 -0
  191. package/models/enums/navigation.ts +18 -0
  192. package/models/enums/order.ts +10 -0
  193. package/models/enums/orientations.ts +4 -0
  194. package/models/enums/pages.ts +10 -0
  195. package/models/enums/positions.ts +21 -0
  196. package/models/enums/rating.ts +12 -0
  197. package/models/enums/sections.ts +8 -0
  198. package/models/enums/selects.ts +16 -0
  199. package/models/enums/sliders.ts +4 -0
  200. package/models/enums/steppers.ts +20 -0
  201. package/models/enums/tabs.ts +11 -0
  202. package/models/enums/triggers.ts +4 -0
  203. package/models/types/accordions.ts +6 -0
  204. package/models/types/avatars.ts +4 -0
  205. package/models/types/badges.ts +4 -0
  206. package/models/types/buttons.ts +26 -0
  207. package/models/types/dropdowns.ts +20 -0
  208. package/models/types/forms.ts +14 -0
  209. package/models/types/navigation.ts +11 -0
  210. package/models/types/pagination.ts +4 -0
  211. package/models/types/pdfExportTable.ts +6 -0
  212. package/models/types/radio.ts +9 -0
  213. package/models/types/selects.ts +14 -0
  214. package/models/types/steppers.ts +17 -0
  215. package/models/types/tableOfContent.ts +6 -0
  216. package/models/types/tabs.ts +7 -0
  217. package/nuxt.config.ts +40 -0
  218. package/package.json +57 -0
  219. package/plugins/vue3-toastify.ts +14 -0
  220. package/tsconfig.json +7 -0
@@ -0,0 +1,170 @@
1
+ <template>
2
+ <div
3
+ :class="hasContainer && containerClasses"
4
+ >
5
+ <div
6
+ :class="[
7
+ 'py-3',
8
+ 'flex',
9
+ 'items-center',
10
+ orientationClass,
11
+ ]"
12
+ >
13
+ <!-- Icon -->
14
+ <MdiIcon
15
+ v-if="icon"
16
+ :icon="icon"
17
+ :size="iconSize"
18
+ preserveAspectRatio="xMidYMid meet"
19
+ :class="[
20
+ hasContainer ? isContainedIconClass : iconClass,
21
+ iconSizeClass,
22
+ ]"
23
+ />
24
+ <div
25
+ :class="[
26
+ 'flex gap-2 flex-col',
27
+ 'max-w-[400px]',
28
+ orientation === Orientation.VERTICAL
29
+ ? 'text-center justify-center'
30
+ : 'text-center justify-center sm:text-left sm:justify-start',
31
+ ]"
32
+ >
33
+ <span :class="['font-semibold', titleClass && titleClass]">
34
+ {{ title }}
35
+ </span>
36
+ <p
37
+ v-if="description"
38
+ :class="descriptionClass"
39
+ >
40
+ {{ description }}
41
+ </p>
42
+ </div>
43
+
44
+ <div
45
+ v-if="buttonText"
46
+ :class="[
47
+ orientation === Orientation.VERTICAL ? 'pt-4' : 'pt-4 sm:pt-0 sm:ml-4'
48
+ ]"
49
+ >
50
+ <ActionButton
51
+ :text="buttonText"
52
+ :styleType="buttonStyleType"
53
+ :icon="buttonIcon"
54
+ :iconPosition="buttonIconPosition"
55
+ @click="emitButtonClick"
56
+ />
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </template>
61
+ <script setup lang="ts">
62
+
63
+ // Props
64
+ const props = defineProps({
65
+ title: {
66
+ type: String as PropType<string>,
67
+ default: 'Ups! No data found',
68
+ },
69
+ description: String as PropType<string>,
70
+ icon: {
71
+ type: String as PropType<any>,
72
+ default: 'mdiDatabaseAlertOutline',
73
+ },
74
+ iconClass: {
75
+ type: String as PropType<string>,
76
+ default: 'text-icon-neutral-sublest',
77
+ },
78
+ titleClass: String as PropType<string>,
79
+ descriptionClass: {
80
+ type: String as PropType<string>,
81
+ default: 'text-sm text-text-neutral-subtle',
82
+ },
83
+ orientation: {
84
+ type: String as PropType<Orientation>,
85
+ default: Orientation.VERTICAL,
86
+ validator: (value: Orientation) => Object.values(Orientation).includes(value),
87
+ },
88
+ buttonText: String as PropType<string>,
89
+ buttonIconPosition: String as PropType<IconPosition>,
90
+ buttonIcon: String as PropType<any>,
91
+ buttonStyleType: {
92
+ type: String as PropType<ButtonStyleType>,
93
+ default: ButtonStyleType.PRIMARY_BRAND_FILLED
94
+ },
95
+ hasContainer: {
96
+ type: Boolean as PropType<boolean>,
97
+ default: false
98
+ },
99
+ containerStyle: {
100
+ type: String as PropType<EmptyPlaceholderContainerStyle>,
101
+ default: EmptyPlaceholderContainerStyle.FILLED_NEUTRAL,
102
+ validator: (value: EmptyPlaceholderContainerStyle) => Object.values(EmptyPlaceholderContainerStyle).includes(value),
103
+ },
104
+ styledContainerClass: String as PropType<string>,
105
+ })
106
+
107
+ // Emits
108
+ const emit = defineEmits(['buttonClick'])
109
+ const emitButtonClick = () => {
110
+ emit('buttonClick')
111
+ }
112
+
113
+ // Computed functions
114
+ const orientationClass = computed(() => {
115
+ const orientationVariant = {
116
+ [Orientation.VERTICAL]: 'flex-col gap-3',
117
+ [Orientation.HORIZONTAL]: 'flex-col gap-3 sm:flex-row sm:gap-3',
118
+ }
119
+ return orientationVariant[props.orientation as Orientation] || 'flex-col gap-3 sm:flex-row sm:gap-3'
120
+ })
121
+
122
+ const iconSize = computed(() => {
123
+ const iconSize = {
124
+ [Orientation.VERTICAL]: '40px',
125
+ [Orientation.HORIZONTAL]: '32px',
126
+ }
127
+ return iconSize[props.orientation as Orientation] || '32px'
128
+ })
129
+
130
+ const iconSizeClass = computed(() => {
131
+ const iconSize = {
132
+ [Orientation.VERTICAL]: 'min-w-[40px] max-w-[40px]',
133
+ [Orientation.HORIZONTAL]: 'min-w-[32px] max-w-[32px]',
134
+ }
135
+ return iconSize[props.orientation as Orientation] || 'min-w-[32px] max-w-[32px]'
136
+ })
137
+
138
+ const containerClasses = computed(() => {
139
+ return [
140
+ 'flex',
141
+ 'w-full',
142
+ 'justify-center',
143
+ 'rounded-md',
144
+ 'p-[5vw]',
145
+ customContainerClass.value,
146
+ props.styledContainerClass
147
+ ]
148
+ })
149
+
150
+ const customContainerClass = computed(() => {
151
+ const variant = {
152
+ [EmptyPlaceholderContainerStyle.DASHED]: 'border-2 border-dashed border-border-default',
153
+ [EmptyPlaceholderContainerStyle.FILLED_NEUTRAL]: 'bg-background-neutral-subtlest',
154
+ [EmptyPlaceholderContainerStyle.FILLED_PRIMARY_BRAND]: 'bg-background-primary-brand-soft',
155
+
156
+ }
157
+ return variant[props.containerStyle as EmptyPlaceholderContainerStyle] || 'bg-background-neutral-subtlest'
158
+ })
159
+
160
+ const isContainedIconClass = computed(() => {
161
+ const variant = {
162
+ [EmptyPlaceholderContainerStyle.DASHED]: 'text-icon-neutral-subtlest',
163
+ [EmptyPlaceholderContainerStyle.FILLED_NEUTRAL]: 'text-icon-neutral-on-subtlest-bg',
164
+ [EmptyPlaceholderContainerStyle.FILLED_PRIMARY_BRAND]: 'text-icon-neutral-on-primary-brand-soft-bg',
165
+
166
+ }
167
+ return variant[props.containerStyle as EmptyPlaceholderContainerStyle] || 'text-icon-neutral-on-subtlest-bg'
168
+ })
169
+
170
+ </script>
@@ -0,0 +1,77 @@
1
+ <template>
2
+ <div class="flex gap-2.5">
3
+ <div v-if="icon">
4
+ <MdiIcon
5
+ v-if="icon && !svgIcon"
6
+ :icon
7
+ preserveAspectRatio="xMidYMid meet"
8
+ :class="[
9
+ 'w-[24px] h-[24px] min-w-[24px] min-h-[24px]',
10
+ iconColorClass,
11
+ ]"
12
+ />
13
+ <span
14
+ v-else-if="svgIcon"
15
+ class="w-[24px] h-[24px] min-w-[24px] min-h-[24px]"
16
+ >
17
+ <SVGImage
18
+ :src="svgIcon"
19
+ :color="resolvedSvgIconColor?.value"
20
+ />
21
+ </span>
22
+ </div>
23
+
24
+ <div class="w-full flex flex-col gap-1">
25
+ <div class="text-base font-semibold">
26
+ {{ title }}
27
+ </div>
28
+ <p
29
+ v-if="description"
30
+ class="text-base text-text-neutral-subtle"
31
+ >
32
+ {{ description }}
33
+ </p>
34
+ </div>
35
+ </div>
36
+ </template>
37
+ <script setup lang="ts">
38
+ // Props
39
+ const props = defineProps({
40
+ title: {
41
+ type: String as PropType<string>,
42
+ default: 'Title',
43
+ },
44
+ description: String as PropType<string>,
45
+ icon: String as PropType<any>,
46
+ iconColor: {
47
+ type: String as PropType<ColorAccent>,
48
+ default: ColorAccent.SECONDARY_BRAND,
49
+ validator: (value: ColorAccent) => Object.values(ColorAccent).includes(value),
50
+ },
51
+ svgIcon: String as PropType<string>,
52
+ useSVGIconColor: {
53
+ type: Boolean as PropType<boolean>,
54
+ default: false,
55
+ },
56
+ })
57
+
58
+ // Computed functions
59
+ const resolvedSvgIconColor = computed(() => {
60
+ return props.useSVGIconColor ? undefined : iconColorClass
61
+ })
62
+
63
+ // Class
64
+ const iconColorClass = computed(() => {
65
+ const variant = {
66
+ [ColorAccent.NEUTRAL]: "text-icon-neutral-subtle",
67
+ [ColorAccent.SUCCESS]: "text-icon-success",
68
+ [ColorAccent.WARNING]: "text-icon-warning",
69
+ [ColorAccent.DANGER]: "text-icon-danger",
70
+ [ColorAccent.INFO]: "text-icon-info",
71
+ [ColorAccent.PRIMARY_BRAND]: "text-icon-primary-brand-default",
72
+ [ColorAccent.SECONDARY_BRAND]: "text-icon-secondary-brand-default",
73
+ }
74
+ return variant[props.iconColor as ColorAccent] || 'text-icon-secondary-brand-default"'
75
+ })
76
+
77
+ </script>
@@ -0,0 +1,7 @@
1
+ <template>
2
+ <div
3
+ class="w-full flex flex-col gap-4"
4
+ >
5
+ <slot />
6
+ </div>
7
+ </template>
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <div
3
+ :class="[
4
+ 'flex',
5
+ 'gap-4',
6
+ 'mt-2',
7
+ 'w-full',
8
+ reverseOnMobile ? 'flex-col-reverse md:flex-row' : 'flex-col md:flex-row'
9
+ ]"
10
+ >
11
+ <slot />
12
+ </div>
13
+ </template>
14
+
15
+ <script setup lang="ts">
16
+ // Props
17
+ defineProps({
18
+ reverseOnMobile: {
19
+ type: Boolean as PropType<boolean>,
20
+ default: true,
21
+ },
22
+ })
23
+ </script>
@@ -0,0 +1,35 @@
1
+ <template>
2
+ <div
3
+ :class="[
4
+ 'flex',
5
+ 'flex-col',
6
+ 'gap-4',
7
+ dividedRows && '!gap-0 divide-y divide-border-neutral-subtle border-b border-border-neutral-subtle'
8
+ ]"
9
+ >
10
+ <h3
11
+ :class="[
12
+ 'form-field-group-title',
13
+ 'font-semibold',
14
+ 'text-text-neutral-subtle',
15
+ dividedRows && 'mb-4'
16
+ ]"
17
+ >
18
+ {{ title }}
19
+ </h3>
20
+ <slot />
21
+ </div>
22
+ </template>
23
+ <script setup lang="ts">
24
+ // Props
25
+ defineProps({
26
+ title: {
27
+ type: String as PropType<string>,
28
+ default: 'Group title',
29
+ },
30
+ dividedRows: {
31
+ type: Boolean as PropType<boolean>,
32
+ default: false,
33
+ },
34
+ })
35
+ </script>
@@ -0,0 +1,22 @@
1
+ <template>
2
+ <div
3
+ :class="[
4
+ 'flex',
5
+ 'gap-column-gap',
6
+ 'flex-col',
7
+ 'md:flex-row',
8
+ spaced && 'py-6'
9
+ ]"
10
+ >
11
+ <slot />
12
+ </div>
13
+ </template>
14
+ <script setup lang="ts">
15
+ // Props
16
+ defineProps({
17
+ spaced: {
18
+ type: Boolean as PropType<boolean>,
19
+ default: false,
20
+ },
21
+ })
22
+ </script>
@@ -0,0 +1,25 @@
1
+ <template>
2
+ <form
3
+ class="w-full flex flex-col gap-4"
4
+ @submit="handleSubmit"
5
+ @reset="handleReset"
6
+ >
7
+ <slot />
8
+ </form>
9
+ </template>
10
+
11
+ <script setup lang="ts">
12
+ // Imports
13
+ const emit = defineEmits(['submit', 'reset'])
14
+
15
+ // Handlers
16
+ const handleSubmit = (event: Event) => {
17
+ event.preventDefault()
18
+ emit('submit')
19
+ }
20
+
21
+ const handleReset = (event: Event) => {
22
+ event.preventDefault()
23
+ emit('reset')
24
+ }
25
+ </script>
@@ -0,0 +1,23 @@
1
+ <template>
2
+ <div
3
+ :class="[
4
+ 'flex',
5
+ 'gap-4',
6
+ 'mt-4',
7
+ 'w-full',
8
+ reverseOnMobile ? 'flex-col-reverse md:flex-row' : 'flex-col md:flex-row'
9
+ ]"
10
+ >
11
+ <slot />
12
+ </div>
13
+ </template>
14
+
15
+ <script setup lang="ts">
16
+ // Props
17
+ defineProps({
18
+ reverseOnMobile: {
19
+ type: Boolean as PropType<boolean>,
20
+ default: true,
21
+ },
22
+ })
23
+ </script>
@@ -0,0 +1,35 @@
1
+ <template>
2
+ <div
3
+ :class="[
4
+ 'flex',
5
+ 'flex-col',
6
+ 'gap-4',
7
+ dividedRows && '!gap-0 divide-y divide-border-neutral-subtle border-b border-border-neutral-subtle'
8
+ ]"
9
+ >
10
+ <h3
11
+ :class="[
12
+ 'form-field-group-title',
13
+ 'font-semibold',
14
+ 'text-text-neutral-subtle',
15
+ dividedRows && 'mb-4'
16
+ ]"
17
+ >
18
+ {{ title }}
19
+ </h3>
20
+ <slot />
21
+ </div>
22
+ </template>
23
+ <script setup lang="ts">
24
+ // Props
25
+ defineProps({
26
+ title: {
27
+ type: String as PropType<string>,
28
+ default: 'Group title',
29
+ },
30
+ dividedRows: {
31
+ type: Boolean as PropType<boolean>,
32
+ default: false,
33
+ },
34
+ })
35
+ </script>
@@ -0,0 +1,22 @@
1
+ <template>
2
+ <div
3
+ :class="[
4
+ 'flex',
5
+ 'gap-column-gap',
6
+ 'flex-col',
7
+ 'md:flex-row',
8
+ spaced && 'py-6'
9
+ ]"
10
+ >
11
+ <slot />
12
+ </div>
13
+ </template>
14
+ <script setup lang="ts">
15
+ // Props
16
+ defineProps({
17
+ spaced: {
18
+ type: Boolean as PropType<boolean>,
19
+ default: false,
20
+ },
21
+ })
22
+ </script>
@@ -0,0 +1,119 @@
1
+ <template>
2
+ <div :class="[ 'flex flex-col', 'w-full', 'gap-2' ]">
3
+ <!-- Label -->
4
+ <label
5
+ v-if="label"
6
+ :for="id"
7
+ :class="[
8
+ 'text-sm',
9
+ 'font-semibold',
10
+ 'text-left',
11
+ ]"
12
+ >
13
+ {{ label }}
14
+ </label>
15
+ <ActionButton
16
+ :text
17
+ :size
18
+ :icon
19
+ :iconPosition
20
+ :disabled
21
+ :isLoading
22
+ :loadingText
23
+ :styleType
24
+ :actionType
25
+ :svgIcon
26
+ :useSVGIconColor
27
+ :isRounded
28
+ :isFullWidth
29
+ :isMobileFullWidth
30
+ :to
31
+ :isExternal
32
+ @click="emitClick"
33
+ />
34
+ </div>
35
+ </template>
36
+
37
+ <script setup lang="ts">
38
+ // Props
39
+ const props = defineProps({
40
+ id: {
41
+ type: String as PropType<string>,
42
+ required: true,
43
+ },
44
+ label: String as PropType<string>,
45
+ actionType: {
46
+ type: String as PropType<ButtonActionType>,
47
+ default: ButtonActionType.ACTION,
48
+ validator: (value: ButtonActionType) => Object.values(ButtonActionType).includes(value),
49
+ },
50
+ styleType: {
51
+ type: String as PropType<ButtonStyleType>,
52
+ default: ButtonStyleType.NEUTRAL_OUTLINED,
53
+ validator: (value: ButtonStyleType) => Object.values(ButtonStyleType).includes(value),
54
+ },
55
+ text: {
56
+ type: String as PropType<string>,
57
+ default: 'Button text'
58
+ },
59
+ size: {
60
+ type: String as PropType<ButtonSize>,
61
+ default: ButtonSize.LG,
62
+ validator: (value: ButtonSize) => Object.values(ButtonSize).includes(value),
63
+ },
64
+ icon: {
65
+ type: String as PropType<any>,
66
+ default: "mdiHelp"
67
+ },
68
+ iconPosition: {
69
+ type: String as PropType<IconPosition>,
70
+ default: IconPosition.NONE,
71
+ validator: (value: IconPosition) => Object.values(IconPosition).includes(value),
72
+ },
73
+ svgIcon: String as PropType<string>,
74
+ useSVGIconColor: {
75
+ type: Boolean as PropType<boolean>,
76
+ default: false,
77
+ },
78
+ disabled: {
79
+ type: Boolean as PropType<boolean>,
80
+ default: false,
81
+ },
82
+ to: {
83
+ type: String as PropType<string>,
84
+ default: ''
85
+ },
86
+ isExternal: {
87
+ type: Boolean as PropType<boolean>,
88
+ default: false
89
+ },
90
+ isRounded: {
91
+ type: Boolean as PropType<boolean>,
92
+ default: false
93
+ },
94
+ isFullWidth: {
95
+ type: Boolean as PropType<boolean>,
96
+ default: false
97
+ },
98
+ isMobileFullWidth: {
99
+ type: Boolean as PropType<boolean>,
100
+ default: false
101
+ },
102
+ isLoading: {
103
+ type: Boolean as PropType<boolean>,
104
+ default: false,
105
+ },
106
+ loadingText: {
107
+ type: String as PropType<string>,
108
+ default: 'Processing...',
109
+ },
110
+ })
111
+
112
+ // Emits
113
+ const emit = defineEmits(['click'])
114
+ const emitClick = () => {
115
+ if (!props.disabled) {
116
+ emit('click')
117
+ }
118
+ }
119
+ </script>