@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.
- package/assets/css/defaults.css +55 -0
- package/assets/css/main.css +238 -0
- package/assets/css/theme/colors.css +106 -0
- package/assets/css/theme/primitives.css +105 -0
- package/assets/css/theme/ui-theme.css +454 -0
- package/assets/images/placeholders/missing-image-placeholder.png +0 -0
- package/components/accordions/Accordion.vue +31 -0
- package/components/accordions/AccordionGroup.vue +78 -0
- package/components/accordions/AccordionItem.vue +39 -0
- package/components/action-panels/ActionPanel.vue +49 -0
- package/components/alerts/Alert.vue +159 -0
- package/components/avatars/Avatar.vue +152 -0
- package/components/avatars/AvatarStack.vue +97 -0
- package/components/avatars/AvatarStackCounter.vue +74 -0
- package/components/badges/Badge.vue +221 -0
- package/components/badges/BadgeStack.vue +110 -0
- package/components/badges/IconBadge.vue +57 -0
- package/components/badges/IconTextBadge.vue +50 -0
- package/components/breadcrumbs/Breadcrumbs.vue +54 -0
- package/components/buttons/ActionButton.vue +395 -0
- package/components/buttons/ActionIconButton.vue +283 -0
- package/components/buttons/AlertButton.vue +125 -0
- package/components/buttons/AlertIconButton.vue +105 -0
- package/components/buttons/PaginationButton.vue +45 -0
- package/components/buttons/options/OptionButton.vue +61 -0
- package/components/buttons/options/OptionButtonGroup.vue +155 -0
- package/components/buttons/options/OptionButtonSlider.vue +154 -0
- package/components/buttons/toggle/ToggleButton.vue +142 -0
- package/components/buttons/toggle/ToggleButtonGroup.vue +73 -0
- package/components/cards/Card.vue +33 -0
- package/components/cards/CardActions.vue +5 -0
- package/components/cards/CardBody.vue +5 -0
- package/components/cards/CardFooter.vue +20 -0
- package/components/cards/CardHeader.vue +5 -0
- package/components/cards/CardTitle.vue +13 -0
- package/components/cards/specific/ContactDetailsCard.vue +47 -0
- package/components/cards/specific/FeatureCard.vue +59 -0
- package/components/cards/specific/HelpTopicCard.vue +62 -0
- package/components/cards/specific/MetricCard.vue +42 -0
- package/components/cards/specific/TestimonialCard.vue +57 -0
- package/components/cards/specific/subscription/CurrentActiveSubscriptionCard.vue +105 -0
- package/components/cards/specific/subscription/SubscriptionPlanCard.vue +178 -0
- package/components/cards/specific/subscription/UniqueSubscriptionPlanCard.vue +106 -0
- package/components/collapsibles/Collapsible.vue +33 -0
- package/components/content/ContentItem.vue +144 -0
- package/components/content/ContentItemImage.vue +125 -0
- package/components/dividers/Divider.vue +35 -0
- package/components/dividers/TextLineDivider.vue +58 -0
- package/components/dropdowns/DropdownMenu.vue +207 -0
- package/components/dropdowns/DropdownMenuActions.vue +11 -0
- package/components/dropdowns/DropdownMenuItem.vue +240 -0
- package/components/dropdowns/DropdownSelect.vue +469 -0
- package/components/dropdowns/DropdownSelectItem.vue +182 -0
- package/components/empty-states/EmptyState.vue +170 -0
- package/components/features/Feature.vue +77 -0
- package/components/forms/DataDetails.vue +7 -0
- package/components/forms/DataDetailsActions.vue +23 -0
- package/components/forms/DataDetailsFieldGroup.vue +35 -0
- package/components/forms/DataDetailsRow.vue +22 -0
- package/components/forms/Form.vue +25 -0
- package/components/forms/FormActions.vue +23 -0
- package/components/forms/FormFieldGroup.vue +35 -0
- package/components/forms/FormRow.vue +22 -0
- package/components/forms/fields/ButtonField.vue +119 -0
- package/components/forms/fields/CheckboxField.vue +205 -0
- package/components/forms/fields/DataField.vue +99 -0
- package/components/forms/fields/FileUploadField.vue +326 -0
- package/components/forms/fields/InputField.vue +371 -0
- package/components/forms/fields/OptionButtonsGroupField.vue +120 -0
- package/components/forms/fields/RepeaterField.vue +109 -0
- package/components/forms/fields/SearchField.vue +184 -0
- package/components/forms/fields/SelectField.vue +233 -0
- package/components/forms/fields/SliderField.vue +759 -0
- package/components/forms/fields/SwitchField.vue +257 -0
- package/components/forms/fields/TextareaField.vue +205 -0
- package/components/forms/fields/ToggleButtonsGroupField.vue +65 -0
- package/components/forms/fields/radio/RadioButtonField.vue +238 -0
- package/components/forms/fields/radio/RadioField.vue +157 -0
- package/components/forms/fields/radio/RadioGroupField.vue +156 -0
- package/components/icons/ContainedIcon.vue +130 -0
- package/components/images/QRCode.vue +124 -0
- package/components/layouts/ContainerWrapper.vue +13 -0
- package/components/layouts/ContentBody.vue +30 -0
- package/components/layouts/Grid.vue +25 -0
- package/components/layouts/Heading.vue +159 -0
- package/components/layouts/MainContent.vue +26 -0
- package/components/layouts/MaxWidthContainer.vue +15 -0
- package/components/layouts/Overtitle.vue +25 -0
- package/components/layouts/headers/CompactHeader.vue +181 -0
- package/components/layouts/headers/PageHeader.vue +102 -0
- package/components/layouts/headers/WebAppHeader.vue +54 -0
- package/components/layouts/section/Section.vue +90 -0
- package/components/layouts/section/SectionBody.vue +12 -0
- package/components/layouts/section/SectionHeader.vue +12 -0
- package/components/layouts/section/SectionTitle.vue +13 -0
- package/components/lists/List.vue +69 -0
- package/components/lists/ListItem.vue +58 -0
- package/components/loaders/Loading.vue +83 -0
- package/components/loaders/LoadingScreen.vue +285 -0
- package/components/modals/DangerModalDialog.vue +149 -0
- package/components/modals/InfoModalDialog.vue +143 -0
- package/components/modals/ModalActions.vue +22 -0
- package/components/modals/ModalContent.vue +5 -0
- package/components/modals/ModalDescription.vue +5 -0
- package/components/modals/ModalDialog.vue +122 -0
- package/components/modals/ModalHeaderGroup.vue +19 -0
- package/components/modals/ModalHeadings.vue +5 -0
- package/components/modals/ModalSubtitle.vue +14 -0
- package/components/modals/ModalTitle.vue +14 -0
- package/components/modals/SuccessModalDialog.vue +90 -0
- package/components/modules/AppLogo.vue +46 -0
- package/components/modules/SVGImage.vue +44 -0
- package/components/navigation/links/NavLink.vue +112 -0
- package/components/navigation/nav-menu/NavFooterMenu.vue +91 -0
- package/components/navigation/nav-menu/NavMenu.vue +36 -0
- package/components/navigation/nav-menu/NavMenuItem.vue +44 -0
- package/components/navigation/nav-sidebar/BottomUserNavBar.vue +83 -0
- package/components/navigation/nav-sidebar/NavSidebar.vue +172 -0
- package/components/navigation/nav-sidebar/NavSidebarMenu.vue +14 -0
- package/components/navigation/nav-sidebar/NavSidebarMenuItem.vue +76 -0
- package/components/navigation/nav-sidebar/NavSidebarMenuSectionTitle.vue +54 -0
- package/components/navigation/table-of-contents/TableOfContents.vue +35 -0
- package/components/navigation/table-of-contents/TableOfContentsItem.vue +40 -0
- package/components/navigation/table-of-contents/TableOfContentsSidebar.vue +29 -0
- package/components/pagination/ButtonPagination.vue +274 -0
- package/components/pagination/RowsPerPage.vue +60 -0
- package/components/pagination/SimplePagination.vue +97 -0
- package/components/password/SecurePasswordCondition.vue +41 -0
- package/components/password/SecurePasswordConditions.vue +83 -0
- package/components/placeholders/ContentPlaceholder.vue +41 -0
- package/components/popovers/Popover.vue +128 -0
- package/components/rating/InteractiveRating.vue +94 -0
- package/components/rating/Rating.vue +60 -0
- package/components/rating/RatingItem.vue +54 -0
- package/components/skeletons/Skeleton.vue +11 -0
- package/components/spinners/Spinner.vue +13 -0
- package/components/steppers/CircleStepper.vue +122 -0
- package/components/steppers/Step.vue +72 -0
- package/components/steppers/StepIndicator.vue +228 -0
- package/components/steppers/TabStepper.vue +126 -0
- package/components/steppers/vertical-stepper/VerticalStep.vue +223 -0
- package/components/steppers/vertical-stepper/VerticalStepper.vue +63 -0
- package/components/tables/Table.vue +26 -0
- package/components/tables/TableBody.vue +5 -0
- package/components/tables/TableCell.vue +34 -0
- package/components/tables/TableCellActions.vue +7 -0
- package/components/tables/TableHeader.vue +5 -0
- package/components/tables/TableHeaderCell.vue +15 -0
- package/components/tables/TableRow.vue +14 -0
- package/components/tables/TableWrapper.vue +12 -0
- package/components/tabs/Tab.vue +145 -0
- package/components/tabs/TabBar.vue +64 -0
- package/components/tabs/TabContent.vue +5 -0
- package/components/tabs/TabsContainer.vue +5 -0
- package/components/transitions/HorizontalExpansionTransition.vue +12 -0
- package/components/transitions/VerticalExpansionTransition.vue +14 -0
- package/components/users/Author.vue +113 -0
- package/components/users/User.vue +53 -0
- package/composables/useAccordion.ts +12 -0
- package/composables/useDarkMode.ts +9 -0
- package/composables/useDropdownMenu.ts +25 -0
- package/composables/useForm.ts +134 -0
- package/composables/useFormValidationMode.ts +11 -0
- package/composables/useIsMobile.ts +27 -0
- package/composables/useMobileSidebar.ts +32 -0
- package/composables/useShiki.ts +12 -0
- package/composables/useTableOfContents.ts +50 -0
- package/composables/useToastifyConfig.ts +7 -0
- package/eslint.config.mjs +14 -0
- package/models/constants/app.ts +8 -0
- package/models/constants/form.ts +22 -0
- package/models/enums/alerts.ts +6 -0
- package/models/enums/aspect-ratios.ts +9 -0
- package/models/enums/avatars.ts +21 -0
- package/models/enums/badges.ts +10 -0
- package/models/enums/buttons.ts +38 -0
- package/models/enums/colors.ts +9 -0
- package/models/enums/content.ts +4 -0
- package/models/enums/counters.ts +4 -0
- package/models/enums/dividers.ts +9 -0
- package/models/enums/dropdowns.ts +18 -0
- package/models/enums/effects.ts +6 -0
- package/models/enums/emptyPlaceholders.ts +5 -0
- package/models/enums/formFields.ts +19 -0
- package/models/enums/formValidations.ts +4 -0
- package/models/enums/headings.ts +11 -0
- package/models/enums/icons.ts +22 -0
- package/models/enums/images.ts +16 -0
- package/models/enums/lists.ts +10 -0
- package/models/enums/loaders.ts +15 -0
- package/models/enums/navigation.ts +18 -0
- package/models/enums/order.ts +10 -0
- package/models/enums/orientations.ts +4 -0
- package/models/enums/pages.ts +10 -0
- package/models/enums/positions.ts +21 -0
- package/models/enums/rating.ts +12 -0
- package/models/enums/sections.ts +8 -0
- package/models/enums/selects.ts +16 -0
- package/models/enums/sliders.ts +4 -0
- package/models/enums/steppers.ts +20 -0
- package/models/enums/tabs.ts +11 -0
- package/models/enums/triggers.ts +4 -0
- package/models/types/accordions.ts +6 -0
- package/models/types/avatars.ts +4 -0
- package/models/types/badges.ts +4 -0
- package/models/types/buttons.ts +26 -0
- package/models/types/dropdowns.ts +20 -0
- package/models/types/forms.ts +14 -0
- package/models/types/navigation.ts +11 -0
- package/models/types/pagination.ts +4 -0
- package/models/types/pdfExportTable.ts +6 -0
- package/models/types/radio.ts +9 -0
- package/models/types/selects.ts +14 -0
- package/models/types/steppers.ts +17 -0
- package/models/types/tableOfContent.ts +6 -0
- package/models/types/tabs.ts +7 -0
- package/nuxt.config.ts +40 -0
- package/package.json +57 -0
- package/plugins/vue3-toastify.ts +14 -0
- package/tsconfig.json +7 -0
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { FormValidationMode } from '@/models/enums/formValidations'
|
|
2
|
+
import { useFormValidationMode } from '@/composables/useFormValidationMode'
|
|
3
|
+
|
|
4
|
+
export const useForm = <
|
|
5
|
+
T extends Record<string, any>
|
|
6
|
+
>(options: {
|
|
7
|
+
formData: T,
|
|
8
|
+
requiredFields: string[],
|
|
9
|
+
requiredFieldMessage?: string,
|
|
10
|
+
validators?: Partial<Record<string, (value: unknown) => string | null>>,
|
|
11
|
+
validateOn?: FormValidationMode,
|
|
12
|
+
}) => {
|
|
13
|
+
const { currentFormValidationMode } = useFormValidationMode()
|
|
14
|
+
|
|
15
|
+
const formErrors = reactive({}) as Record<string, string>
|
|
16
|
+
|
|
17
|
+
currentFormValidationMode.value = options.validateOn ?? FormValidationMode.SUBMIT
|
|
18
|
+
|
|
19
|
+
const setDeep = (obj: Record<string, any>, path: string, value: any) => {
|
|
20
|
+
const keys = path.split('.')
|
|
21
|
+
const lastKey = keys.pop()!
|
|
22
|
+
const target = keys.reduce((o, k) => (o[k] ??= {}), obj)
|
|
23
|
+
target[lastKey] = value
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const getDeep = (obj: Record<string, any>, path: string) => {
|
|
27
|
+
return path.split('.').reduce((o, k) => o?.[k], obj)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const validateField = (fieldPath: string): string => {
|
|
31
|
+
const value = getDeep(options.formData, fieldPath)
|
|
32
|
+
const validator = options.validators?.[fieldPath]
|
|
33
|
+
|
|
34
|
+
if (validator) {
|
|
35
|
+
const result = validator(value)
|
|
36
|
+
return result || ''
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (
|
|
40
|
+
value === undefined ||
|
|
41
|
+
value === null ||
|
|
42
|
+
(typeof value === 'string' && (value as string).trim() === '')
|
|
43
|
+
) {
|
|
44
|
+
return options.requiredFieldMessage ?? 'This field is required'
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return ''
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const validateFormFields = (): boolean => {
|
|
51
|
+
let isValid = true
|
|
52
|
+
|
|
53
|
+
for (const fieldPath of options.requiredFields) {
|
|
54
|
+
const error = validateField(fieldPath)
|
|
55
|
+
setDeep(formErrors, fieldPath, error)
|
|
56
|
+
|
|
57
|
+
if (error) {
|
|
58
|
+
isValid = false
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
if (!isValid) {
|
|
63
|
+
currentFormValidationMode.value = FormValidationMode.BLUR
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
return isValid
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
const resetForm = () => {
|
|
70
|
+
const formData = options.formData as Record<string, any>
|
|
71
|
+
|
|
72
|
+
const resetValue = (value: unknown): unknown => {
|
|
73
|
+
if (Array.isArray(value)) {
|
|
74
|
+
value.splice(0, value.length)
|
|
75
|
+
return value
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
switch (typeof value) {
|
|
79
|
+
case 'string':
|
|
80
|
+
return ''
|
|
81
|
+
case 'number':
|
|
82
|
+
return 0
|
|
83
|
+
case 'boolean':
|
|
84
|
+
return false
|
|
85
|
+
case 'object':
|
|
86
|
+
if (value !== null) {
|
|
87
|
+
resetObject(value)
|
|
88
|
+
}
|
|
89
|
+
return value
|
|
90
|
+
default:
|
|
91
|
+
return ''
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
const resetObject = (obj: Record<string, any>) => {
|
|
96
|
+
for (const key of Object.keys(obj)) {
|
|
97
|
+
const value = obj[key]
|
|
98
|
+
|
|
99
|
+
if (Array.isArray(value)) {
|
|
100
|
+
value.splice(0, value.length)
|
|
101
|
+
} else if (typeof value === 'object' && value !== null) {
|
|
102
|
+
resetObject(value)
|
|
103
|
+
} else {
|
|
104
|
+
obj[key] = resetValue(value)
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
for (const key of Object.keys(formData)) {
|
|
110
|
+
const value = formData[key]
|
|
111
|
+
|
|
112
|
+
if (Array.isArray(value)) {
|
|
113
|
+
value.splice(0, value.length)
|
|
114
|
+
} else if (typeof value === 'object' && value !== null) {
|
|
115
|
+
resetObject(value)
|
|
116
|
+
} else {
|
|
117
|
+
formData[key] = resetValue(value)
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
for (const key of Object.keys(formErrors)) {
|
|
122
|
+
setDeep(formErrors, key, '')
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
currentFormValidationMode.value = options.validateOn ?? FormValidationMode.SUBMIT
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
return {
|
|
129
|
+
formErrors,
|
|
130
|
+
resetForm,
|
|
131
|
+
validateFormFields,
|
|
132
|
+
validateField,
|
|
133
|
+
}
|
|
134
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const validationMode = ref<FormValidationMode>(FormValidationMode.SUBMIT)
|
|
2
|
+
|
|
3
|
+
export const useFormValidationMode = () => {
|
|
4
|
+
provide('formValidationMode', validationMode)
|
|
5
|
+
return {
|
|
6
|
+
currentFormValidationMode: validationMode,
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export const useInjectedValidationMode = () => {
|
|
10
|
+
return inject<Ref<FormValidationMode>>('formValidationMode', ref(FormValidationMode.SUBMIT))
|
|
11
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export const useIsMobile = (breakpoint: number = 1024) => {
|
|
2
|
+
const isMobile = ref(false) // Initial value for SSR
|
|
3
|
+
|
|
4
|
+
// Function to update `isMobile`
|
|
5
|
+
const updateIsMobile = () => {
|
|
6
|
+
if (typeof window !== 'undefined') {
|
|
7
|
+
isMobile.value = window.innerWidth < breakpoint
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Attach resize listener on the client
|
|
12
|
+
onMounted(() => {
|
|
13
|
+
updateIsMobile() // Initialize the value
|
|
14
|
+
window.addEventListener('resize', updateIsMobile)
|
|
15
|
+
})
|
|
16
|
+
|
|
17
|
+
// Cleanup listener when unmounted
|
|
18
|
+
onUnmounted(() => {
|
|
19
|
+
if (typeof window !== 'undefined') {
|
|
20
|
+
window.removeEventListener('resize', updateIsMobile)
|
|
21
|
+
}
|
|
22
|
+
})
|
|
23
|
+
|
|
24
|
+
return {
|
|
25
|
+
isMobile,
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// Shared state
|
|
2
|
+
const isMobileSidebarOpen: Ref = ref(false)
|
|
3
|
+
|
|
4
|
+
export const useMobileSidebar = () => {
|
|
5
|
+
|
|
6
|
+
const { isMobile } = useIsMobile()
|
|
7
|
+
|
|
8
|
+
const toggleMobileSidebar = () => {
|
|
9
|
+
isMobileSidebarOpen.value = !isMobileSidebarOpen.value
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const openMobileSidebar = () => {
|
|
13
|
+
isMobileSidebarOpen.value = true
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const closeMobileSidebar = () => {
|
|
17
|
+
isMobileSidebarOpen.value = false
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
watch(isMobile, newVal => {
|
|
21
|
+
if (!newVal) {
|
|
22
|
+
isMobileSidebarOpen.value = false
|
|
23
|
+
}
|
|
24
|
+
})
|
|
25
|
+
|
|
26
|
+
return {
|
|
27
|
+
isMobileSidebarOpen,
|
|
28
|
+
toggleMobileSidebar,
|
|
29
|
+
openMobileSidebar,
|
|
30
|
+
closeMobileSidebar,
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createHighlighter, type Highlighter } from 'shiki'
|
|
2
|
+
|
|
3
|
+
let highlighter: Highlighter | null = null
|
|
4
|
+
|
|
5
|
+
export const useShikiHighlighter = async () => {
|
|
6
|
+
highlighter ??= await createHighlighter({
|
|
7
|
+
themes: ['github-light', 'github-dark'],
|
|
8
|
+
langs: ['vue'],
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
return highlighter
|
|
12
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
export const useTableOfContents = () => {
|
|
2
|
+
// Tracks the currently active heading
|
|
3
|
+
const activeId = ref<string | null>(null)
|
|
4
|
+
const route = useRoute()
|
|
5
|
+
|
|
6
|
+
let observer: IntersectionObserver | null = null
|
|
7
|
+
|
|
8
|
+
const initObserver = () => {
|
|
9
|
+
if (observer) observer.disconnect()
|
|
10
|
+
|
|
11
|
+
observer = new IntersectionObserver(
|
|
12
|
+
(entries) => {
|
|
13
|
+
for (const entry of entries) {
|
|
14
|
+
if (entry.isIntersecting) {
|
|
15
|
+
activeId.value = entry.target.id
|
|
16
|
+
break
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
rootMargin: '0px 0px -70% 0px',
|
|
22
|
+
threshold: 0.1,
|
|
23
|
+
}
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
const headings = document.querySelectorAll('h2, h3')
|
|
27
|
+
headings.forEach((heading) => observer!.observe(heading))
|
|
28
|
+
|
|
29
|
+
// First heading is active by default when the page loads
|
|
30
|
+
if (headings.length > 0) {
|
|
31
|
+
activeId.value = headings[0].id
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
watch(
|
|
36
|
+
() => route.path,
|
|
37
|
+
() => {
|
|
38
|
+
nextTick(() => {
|
|
39
|
+
initObserver()
|
|
40
|
+
})
|
|
41
|
+
},
|
|
42
|
+
{ immediate: true }
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
onBeforeUnmount(() => {
|
|
46
|
+
if (observer) observer.disconnect()
|
|
47
|
+
})
|
|
48
|
+
|
|
49
|
+
return { activeId }
|
|
50
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// https://eslint.nuxt.com/packages/module
|
|
2
|
+
|
|
3
|
+
// @ts-check
|
|
4
|
+
import withNuxt from './.nuxt/eslint.config.mjs'
|
|
5
|
+
|
|
6
|
+
export default withNuxt({
|
|
7
|
+
rules: {
|
|
8
|
+
'vue/attribute-hyphenation': 'off',
|
|
9
|
+
'vue/no-multiple-template-root': 'off',
|
|
10
|
+
'vue/require-default-prop': 'off',
|
|
11
|
+
'vue/multi-word-component-names': 'off',
|
|
12
|
+
'@typescript-eslint/no-explicit-any': 'warn',
|
|
13
|
+
}
|
|
14
|
+
})
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
|
|
2
|
+
export const FieldMaxLength = {
|
|
3
|
+
FULLNAME: 80,
|
|
4
|
+
LASTNAME: 80,
|
|
5
|
+
EMAIL: 254,
|
|
6
|
+
PHONE: 15,
|
|
7
|
+
SUBJECT: 100,
|
|
8
|
+
MESSAGE: 500,
|
|
9
|
+
PASSWORD: 64,
|
|
10
|
+
SEARCH: 80,
|
|
11
|
+
DESCRIPTION: 400,
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export const FieldError = {
|
|
15
|
+
REQUIRED_FIELD: 'This field is required.',
|
|
16
|
+
REQUIRED_EMAIL: 'Email is required.',
|
|
17
|
+
INVALID_EMAIL: 'Invalid email address.',
|
|
18
|
+
REQUIRED_OPTION: 'Please select an option.',
|
|
19
|
+
INVALID_DATE_RANGE: 'Start date must be before or equal to end date',
|
|
20
|
+
PASSWORDS_DO_NOT_MATCH: 'Passwords do not match.',
|
|
21
|
+
INVALID_URL: 'Invalid URL.',
|
|
22
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export enum AvatarSize {
|
|
2
|
+
XS = 'xs',
|
|
3
|
+
SM = 'sm',
|
|
4
|
+
MD = 'md',
|
|
5
|
+
LG = 'lg',
|
|
6
|
+
XL = 'xl',
|
|
7
|
+
XXL = '2xl',
|
|
8
|
+
XXXL = '3xl',
|
|
9
|
+
XXXXL = '4xl',
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export enum AvatarShape {
|
|
13
|
+
CIRCLE = 'circle',
|
|
14
|
+
SQUARE = 'square',
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export enum AvatarStackSize {
|
|
18
|
+
XS = 'xs',
|
|
19
|
+
SM = 'sm',
|
|
20
|
+
MD = 'md',
|
|
21
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export enum ButtonStyleType {
|
|
2
|
+
PRIMARY_BRAND_FILLED = 'primary-brand-filled',
|
|
3
|
+
PRIMARY_BRAND_TRANSPARENT = 'primary-brand-transparent',
|
|
4
|
+
PRIMARY_BRAND_SOFT = 'primary-brand-soft',
|
|
5
|
+
SECONDARY_BRAND_FILLED = 'secondary-brand-filled',
|
|
6
|
+
NEUTRAL_OUTLINED = 'neutral-outlined',
|
|
7
|
+
NEUTRAL_TRANSPARENT = 'neutral-transparent',
|
|
8
|
+
NEUTRAL_TRANSPARENT_SUBTLE = 'neutral-transparent-subtle',
|
|
9
|
+
NEUTRAL_FILLED = 'neutral-filled',
|
|
10
|
+
DELETE_FILLED = 'delete-filled',
|
|
11
|
+
DELETE_OUTLINED = 'delete-outlined',
|
|
12
|
+
DELETE_SOFT = 'delete-soft',
|
|
13
|
+
DELETE_TRANSPARENT = 'delete-transparent',
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export enum ButtonSize {
|
|
17
|
+
XS = 'xs',
|
|
18
|
+
SM = 'sm',
|
|
19
|
+
MD = 'md',
|
|
20
|
+
LG = 'lg',
|
|
21
|
+
XL = 'xl',
|
|
22
|
+
XXL = '2xl',
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export enum ButtonActionType {
|
|
26
|
+
ACTION = 'action',
|
|
27
|
+
LINK = 'link',
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export enum ToggleButtonGroupStyle {
|
|
31
|
+
GROUPED = 'grouped',
|
|
32
|
+
SEGMENTED = 'segmented'
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export enum ButtonPaginationStyle {
|
|
36
|
+
BUTTON = 'button',
|
|
37
|
+
OVERLINE = 'overline',
|
|
38
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export enum DropdownItemType {
|
|
2
|
+
TEXT = 'text',
|
|
3
|
+
ICON = 'icon',
|
|
4
|
+
DANGER_ICON = 'danger-icon',
|
|
5
|
+
USER = 'user',
|
|
6
|
+
IMAGE = 'image',
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export enum DropdownItemSize {
|
|
10
|
+
MD = 'md',
|
|
11
|
+
LG = 'lg',
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export enum DropdownActionType {
|
|
15
|
+
ACTION = 'action',
|
|
16
|
+
LINK = 'link',
|
|
17
|
+
EXPORT_EXCEL = 'export-excel',
|
|
18
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export enum ControlFieldSize {
|
|
2
|
+
MD = 'md',
|
|
3
|
+
LG = 'lg',
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export enum InputSize {
|
|
7
|
+
MD = 'md',
|
|
8
|
+
LG = 'lg',
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export enum RadioType {
|
|
12
|
+
DEFAULT = 'default',
|
|
13
|
+
BUTTON = 'button',
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export enum SwitchStyle {
|
|
17
|
+
BRAND = 'brand',
|
|
18
|
+
SUCCESS = 'success',
|
|
19
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export enum IconPosition {
|
|
2
|
+
LEFT = 'left',
|
|
3
|
+
RIGHT = 'right',
|
|
4
|
+
NONE = 'none',
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export enum IconContainerShape {
|
|
8
|
+
CIRCLE = 'circle',
|
|
9
|
+
SQUARE = 'square',
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export enum IconContainerStyleType {
|
|
13
|
+
FLAT = 'flat',
|
|
14
|
+
FILLED = 'filled',
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export enum IconContainerSize {
|
|
18
|
+
LG = 'lg',
|
|
19
|
+
XL = 'xl',
|
|
20
|
+
XXL = '2xl',
|
|
21
|
+
XXXL = '3xl',
|
|
22
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export enum NavLinkSize {
|
|
2
|
+
XS = 'xs',
|
|
3
|
+
SM = 'sm',
|
|
4
|
+
MD = 'md',
|
|
5
|
+
LG = 'lg',
|
|
6
|
+
XL = 'xl',
|
|
7
|
+
XXL = '2xl',
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export enum MobileNavigationMenuType {
|
|
11
|
+
DROPDOWN = 'dropdown',
|
|
12
|
+
SIDEBAR = 'sidebar',
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export enum SidebarNavMenuItemStyleType {
|
|
16
|
+
SPACED = 'spaced',
|
|
17
|
+
COMPACT = 'sidebar',
|
|
18
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export enum Position {
|
|
2
|
+
TOP = 'top',
|
|
3
|
+
BOTTOM = 'bottom',
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
export enum DropdownPosition {
|
|
7
|
+
LEFT_TOP = 'left-top',
|
|
8
|
+
LEFT_BOTTOM = 'left-bottom',
|
|
9
|
+
RIGHT_TOP = 'right-top',
|
|
10
|
+
RIGHT_BOTTOM = 'right-bottom',
|
|
11
|
+
TOP_LEFT = 'top-left',
|
|
12
|
+
TOP_RIGHT = 'top-right',
|
|
13
|
+
BOTTOM_LEFT = 'bottom-left',
|
|
14
|
+
BOTTOM_RIGHT = 'bottom-right',
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export enum Align {
|
|
18
|
+
LEFT = 'left',
|
|
19
|
+
CENTER = 'center',
|
|
20
|
+
RIGHT = 'right'
|
|
21
|
+
}
|