am-ui-package 0.0.16 → 0.2.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/README.md +5 -5
- package/package.json +39 -39
- package/src/App.vue +157 -157
- package/src/assets/css/index.css +2 -2
- package/src/components/Bars/ActionBar.vue +38 -38
- package/src/components/Buttons/AmButton.vue +82 -82
- package/src/components/Buttons/LinkButton.vue +30 -30
- package/src/components/EmptyStateIllustration.vue +17 -17
- package/src/components/Icons/ArrowTrip.vue +25 -25
- package/src/components/Icons/Check.vue +15 -15
- package/src/components/Icons/Close.vue +25 -25
- package/src/components/Icons/Eye.vue +75 -75
- package/src/components/Icons/Icon.vue +26 -26
- package/src/components/Icons/IconsModals/MailCircle.vue +35 -35
- package/src/components/Icons/IconsModals/TrashWarnCircle.vue +83 -83
- package/src/components/Icons/Illustration.vue +388 -388
- package/src/components/Icons/InfoAlert.vue +33 -33
- package/src/components/Icons/InputTextIcon.vue +54 -0
- package/src/components/Icons/ShortArrow.vue +23 -23
- package/src/components/Icons/ToggleArrow.vue +24 -24
- package/src/components/Icons/WarnAlert.vue +32 -32
- package/src/components/Inputs/BaseInput.vue +114 -114
- package/src/components/Inputs/PasswordInput.vue +43 -43
- package/src/components/Modals/AlertModal.vue +45 -45
- package/src/components/Modals/BaseModal.vue +40 -40
- package/src/components/Notifications/NotificationBar.vue +57 -57
- package/src/components/Overlay.vue +37 -37
- package/src/components/Panels/ToolPanel.vue +21 -0
- package/src/components/Tickets/BaseTicket.vue +18 -18
- package/src/components/Tickets/TicketColumnGrid.vue +67 -67
- package/src/components/Tickets/TicketLabel.vue +23 -23
- package/src/components/Wrappers/ToolWrapper.vue +45 -45
- package/src/index.js +55 -55
- package/src/main.js +5 -5
- package/src/style.css +30 -30
- package/src/components/Tickets/TicketStatusTicket.vue +0 -82
package/README.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
# Vue 3 + Vite
|
|
2
|
-
|
|
3
|
-
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
|
4
|
-
|
|
5
|
-
Learn more about IDE Support for Vue in the [Vue Docs Scaling up Guide](https://vuejs.org/guide/scaling-up/tooling.html#ide-support).
|
|
1
|
+
# Vue 3 + Vite
|
|
2
|
+
|
|
3
|
+
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
|
|
4
|
+
|
|
5
|
+
Learn more about IDE Support for Vue in the [Vue Docs Scaling up Guide](https://vuejs.org/guide/scaling-up/tooling.html#ide-support).
|
package/package.json
CHANGED
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "am-ui-package",
|
|
3
|
-
"private": false,
|
|
4
|
-
"version": "0.0
|
|
5
|
-
"type": "module",
|
|
6
|
-
"main": "./dist/am-ui-package.umd.js",
|
|
7
|
-
"module": "./dist/am-ui-package.es.js",
|
|
8
|
-
"style": "dist/style.css",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"import": "./dist/am-ui-package.es.js",
|
|
12
|
-
"require": "./dist/am-ui-package.umd.js"
|
|
13
|
-
},
|
|
14
|
-
"./src": "./src/index.js"
|
|
15
|
-
},
|
|
16
|
-
"files": [
|
|
17
|
-
"dist",
|
|
18
|
-
"src"
|
|
19
|
-
],
|
|
20
|
-
"scripts": {
|
|
21
|
-
"dev": "vite",
|
|
22
|
-
"build": "vite build",
|
|
23
|
-
"preview": "vite preview",
|
|
24
|
-
"prepublishOnly": "npm run build"
|
|
25
|
-
},
|
|
26
|
-
"peerDependencies": {
|
|
27
|
-
"vue": "^3.5.0"
|
|
28
|
-
},
|
|
29
|
-
"devDependencies": {
|
|
30
|
-
"vue": "^3.5.18",
|
|
31
|
-
"@vitejs/plugin-vue": "^6.0.1",
|
|
32
|
-
"vite": "^7.1.2",
|
|
33
|
-
"tailwindcss": "^3.1.0",
|
|
34
|
-
"postcss": "^8.4.14",
|
|
35
|
-
"autoprefixer": "^10.4.7",
|
|
36
|
-
"@tailwindcss/forms": "^0.5.2",
|
|
37
|
-
"@tailwindcss/typography": "^0.5.2"
|
|
38
|
-
}
|
|
39
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "am-ui-package",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.2.0",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/am-ui-package.umd.js",
|
|
7
|
+
"module": "./dist/am-ui-package.es.js",
|
|
8
|
+
"style": "dist/style.css",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/am-ui-package.es.js",
|
|
12
|
+
"require": "./dist/am-ui-package.umd.js"
|
|
13
|
+
},
|
|
14
|
+
"./src": "./src/index.js"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist",
|
|
18
|
+
"src"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"dev": "vite",
|
|
22
|
+
"build": "vite build",
|
|
23
|
+
"preview": "vite preview",
|
|
24
|
+
"prepublishOnly": "npm run build"
|
|
25
|
+
},
|
|
26
|
+
"peerDependencies": {
|
|
27
|
+
"vue": "^3.5.0"
|
|
28
|
+
},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"vue": "^3.5.18",
|
|
31
|
+
"@vitejs/plugin-vue": "^6.0.1",
|
|
32
|
+
"vite": "^7.1.2",
|
|
33
|
+
"tailwindcss": "^3.1.0",
|
|
34
|
+
"postcss": "^8.4.14",
|
|
35
|
+
"autoprefixer": "^10.4.7",
|
|
36
|
+
"@tailwindcss/forms": "^0.5.2",
|
|
37
|
+
"@tailwindcss/typography": "^0.5.2"
|
|
38
|
+
}
|
|
39
|
+
}
|
package/src/App.vue
CHANGED
|
@@ -1,157 +1,157 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { ref, watch } from "vue";
|
|
3
|
-
import ActionBar from "./components/Bars/ActionBar.vue";
|
|
4
|
-
import Button from "./components/Buttons/AmButton.vue";
|
|
5
|
-
import EmptyStateIllustration from "./components/EmptyStateIllustration.vue";
|
|
6
|
-
import BaseInput from "./components/Inputs/BaseInput.vue";
|
|
7
|
-
import PasswordInput from "./components/Inputs/PasswordInput.vue";
|
|
8
|
-
import AlertModal from "./components/Modals/AlertModal.vue";
|
|
9
|
-
import BaseModal from "./components/Modals/BaseModal.vue";
|
|
10
|
-
import NotificationBar from "./components/Notifications/NotificationBar.vue";
|
|
11
|
-
import TicketStatusTicket from "./components/Tickets/TicketStatusTicket.vue";
|
|
12
|
-
import ToolWrapper from "./components/Wrappers/ToolWrapper.vue";
|
|
13
|
-
import AmButton from "./components/Buttons/AmButton.vue";
|
|
14
|
-
const isOpenModal = ref(false);
|
|
15
|
-
|
|
16
|
-
const flight = ref("");
|
|
17
|
-
|
|
18
|
-
watch(flight, (newValue) => {
|
|
19
|
-
console.log(newValue);
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
const flightDate = ref("");
|
|
23
|
-
|
|
24
|
-
watch(flightDate, (newValue) => {
|
|
25
|
-
console.log(newValue);
|
|
26
|
-
});
|
|
27
|
-
</script>
|
|
28
|
-
|
|
29
|
-
<template>
|
|
30
|
-
<ToolWrapper
|
|
31
|
-
tool="Estatus de vuelo"
|
|
32
|
-
description="Aquí podrás visualizar el estatus de tus vuelos"
|
|
33
|
-
>
|
|
34
|
-
<form
|
|
35
|
-
@submit.prevent
|
|
36
|
-
class="md:mt-[66px] md:flex items-center justify-between gap-[50px]"
|
|
37
|
-
>
|
|
38
|
-
<BaseInput
|
|
39
|
-
label="N° de vuelo"
|
|
40
|
-
placeholder="N° de vuelo"
|
|
41
|
-
type="number"
|
|
42
|
-
v-model="flight"
|
|
43
|
-
class="mt-[3px] md:mt-0"
|
|
44
|
-
error=""
|
|
45
|
-
/>
|
|
46
|
-
<BaseInput
|
|
47
|
-
label="Fecha de vuelo"
|
|
48
|
-
placeholder="N° de vuelo"
|
|
49
|
-
type="date"
|
|
50
|
-
v-model="flightDate"
|
|
51
|
-
class="mt-5 md:mt-0"
|
|
52
|
-
:check-icon="false"
|
|
53
|
-
error="Proporciona un número de vuelo"
|
|
54
|
-
/>
|
|
55
|
-
<AmButton size="lg" class="mt-5 md:mt-0 self-end" :disabled="true"
|
|
56
|
-
>Consultar</AmButton
|
|
57
|
-
>
|
|
58
|
-
</form>
|
|
59
|
-
|
|
60
|
-
<NotificationBar variant="error" class="mt-5 md:mt-10">
|
|
61
|
-
<template #description>
|
|
62
|
-
<p class="text-xs">
|
|
63
|
-
<span class="text-amRed font-GarnettSemibold">
|
|
64
|
-
Información inválida
|
|
65
|
-
</span>
|
|
66
|
-
No coincide con algún vuelo operado por Aeromexico o vuelo en código
|
|
67
|
-
compartido
|
|
68
|
-
</p>
|
|
69
|
-
</template>
|
|
70
|
-
</NotificationBar>
|
|
71
|
-
|
|
72
|
-
<FlightStatusTicket class="mt-5 md:mt-10" />
|
|
73
|
-
|
|
74
|
-
<EmptyStateIllustration
|
|
75
|
-
description="No hay vuelos registrados."
|
|
76
|
-
class="mt-5 md:mt-10"
|
|
77
|
-
/>
|
|
78
|
-
|
|
79
|
-
<AlertModal
|
|
80
|
-
:isOpen="isOpenModal"
|
|
81
|
-
title="Correo"
|
|
82
|
-
description="jgonazalez@aeromexico.com"
|
|
83
|
-
@confirm="isOpenModal = false"
|
|
84
|
-
button-text="Enviar"
|
|
85
|
-
/>
|
|
86
|
-
|
|
87
|
-
<template #action-bar>
|
|
88
|
-
<ActionBar
|
|
89
|
-
description="Enviar información a correo electrónico"
|
|
90
|
-
button-text="Enviar"
|
|
91
|
-
@action="isOpenModal = true"
|
|
92
|
-
:disabled="true"
|
|
93
|
-
/>
|
|
94
|
-
</template>
|
|
95
|
-
</ToolWrapper>
|
|
96
|
-
<!-- <div class="flex flex-col gap-5 p-5 font-GarnettRegular text-amBluePremium">
|
|
97
|
-
<form>
|
|
98
|
-
<Button :disabled="true">Hola</Button>
|
|
99
|
-
<Button :disabled="false">Hola</Button>
|
|
100
|
-
<Button :disabled="false" variant="secondary">Hola</Button>
|
|
101
|
-
<Button :disabled="true" variant="secondary">Hola</Button>
|
|
102
|
-
<BaseInput type="email" label="Email" placeholder="Email" />
|
|
103
|
-
<BaseInput type="date" label="Fecha de vuelo" :check-icon="false" />
|
|
104
|
-
<PasswordInput />
|
|
105
|
-
</form>
|
|
106
|
-
|
|
107
|
-
<NotificationBar variant="error">
|
|
108
|
-
<template #description>
|
|
109
|
-
<p class="text-xs">
|
|
110
|
-
<span class="text-amRed font-GarnettSemibold">
|
|
111
|
-
Información inválida
|
|
112
|
-
</span>
|
|
113
|
-
No coincide con algún vuelo operado por Aeromexico o vuelo en código
|
|
114
|
-
compartido
|
|
115
|
-
</p>
|
|
116
|
-
</template>
|
|
117
|
-
</NotificationBar>
|
|
118
|
-
<NotificationBar
|
|
119
|
-
variant="info"
|
|
120
|
-
@close="console.log('probando emit de cierre')"
|
|
121
|
-
>
|
|
122
|
-
<template #description>
|
|
123
|
-
<p class="text-xs">
|
|
124
|
-
Aviso importante! Los vuelos con salida dentro de las próximas 24hrs
|
|
125
|
-
pueden ser sujetos a cambios. si requieres confimación de esos casos,
|
|
126
|
-
por favor contacta a Global Sales Support
|
|
127
|
-
</p>
|
|
128
|
-
</template>
|
|
129
|
-
</NotificationBar>
|
|
130
|
-
|
|
131
|
-
<EmptyStateIllustration description="No hay vuelos registrados." />
|
|
132
|
-
<FlightStatusTicket />
|
|
133
|
-
<TicketStatusTicket />
|
|
134
|
-
<ActionBar
|
|
135
|
-
description="Enviar información a correo electrónico"
|
|
136
|
-
button-text="Enviar"
|
|
137
|
-
@button-click="isOpenModal = true"
|
|
138
|
-
/>
|
|
139
|
-
<AlertModal
|
|
140
|
-
:isOpen="isOpenModal"
|
|
141
|
-
title="Correo"
|
|
142
|
-
description="jgonazalez@aeromexico.com"
|
|
143
|
-
button-text="Enviar"
|
|
144
|
-
:on-confirm="() => (isOpenModal = false)"
|
|
145
|
-
/>
|
|
146
|
-
<AlertModal
|
|
147
|
-
:isOpen="isOpenModal"
|
|
148
|
-
icon-name="TrashWarnCircle"
|
|
149
|
-
title="No se ha podido eliminar el Check-in de la reservación"
|
|
150
|
-
description="Por favor, contactar al provedor de ventas a través de nuestro chat."
|
|
151
|
-
button-text="Continuar"
|
|
152
|
-
:on-confirm="() => (isOpenModal = false)"
|
|
153
|
-
/>
|
|
154
|
-
</div> -->
|
|
155
|
-
</template>
|
|
156
|
-
|
|
157
|
-
<style scoped></style>
|
|
1
|
+
<script setup>
|
|
2
|
+
import { ref, watch } from "vue";
|
|
3
|
+
import ActionBar from "./components/Bars/ActionBar.vue";
|
|
4
|
+
import Button from "./components/Buttons/AmButton.vue";
|
|
5
|
+
import EmptyStateIllustration from "./components/EmptyStateIllustration.vue";
|
|
6
|
+
import BaseInput from "./components/Inputs/BaseInput.vue";
|
|
7
|
+
import PasswordInput from "./components/Inputs/PasswordInput.vue";
|
|
8
|
+
import AlertModal from "./components/Modals/AlertModal.vue";
|
|
9
|
+
import BaseModal from "./components/Modals/BaseModal.vue";
|
|
10
|
+
import NotificationBar from "./components/Notifications/NotificationBar.vue";
|
|
11
|
+
import TicketStatusTicket from "./components/Tickets/TicketStatusTicket.vue";
|
|
12
|
+
import ToolWrapper from "./components/Wrappers/ToolWrapper.vue";
|
|
13
|
+
import AmButton from "./components/Buttons/AmButton.vue";
|
|
14
|
+
const isOpenModal = ref(false);
|
|
15
|
+
|
|
16
|
+
const flight = ref("");
|
|
17
|
+
|
|
18
|
+
watch(flight, (newValue) => {
|
|
19
|
+
console.log(newValue);
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const flightDate = ref("");
|
|
23
|
+
|
|
24
|
+
watch(flightDate, (newValue) => {
|
|
25
|
+
console.log(newValue);
|
|
26
|
+
});
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<template>
|
|
30
|
+
<ToolWrapper
|
|
31
|
+
tool="Estatus de vuelo"
|
|
32
|
+
description="Aquí podrás visualizar el estatus de tus vuelos"
|
|
33
|
+
>
|
|
34
|
+
<form
|
|
35
|
+
@submit.prevent
|
|
36
|
+
class="md:mt-[66px] md:flex items-center justify-between gap-[50px]"
|
|
37
|
+
>
|
|
38
|
+
<BaseInput
|
|
39
|
+
label="N° de vuelo"
|
|
40
|
+
placeholder="N° de vuelo"
|
|
41
|
+
type="number"
|
|
42
|
+
v-model="flight"
|
|
43
|
+
class="mt-[3px] md:mt-0"
|
|
44
|
+
error=""
|
|
45
|
+
/>
|
|
46
|
+
<BaseInput
|
|
47
|
+
label="Fecha de vuelo"
|
|
48
|
+
placeholder="N° de vuelo"
|
|
49
|
+
type="date"
|
|
50
|
+
v-model="flightDate"
|
|
51
|
+
class="mt-5 md:mt-0"
|
|
52
|
+
:check-icon="false"
|
|
53
|
+
error="Proporciona un número de vuelo"
|
|
54
|
+
/>
|
|
55
|
+
<AmButton size="lg" class="mt-5 md:mt-0 self-end" :disabled="true"
|
|
56
|
+
>Consultar</AmButton
|
|
57
|
+
>
|
|
58
|
+
</form>
|
|
59
|
+
|
|
60
|
+
<NotificationBar variant="error" class="mt-5 md:mt-10">
|
|
61
|
+
<template #description>
|
|
62
|
+
<p class="text-xs">
|
|
63
|
+
<span class="text-amRed font-GarnettSemibold">
|
|
64
|
+
Información inválida
|
|
65
|
+
</span>
|
|
66
|
+
No coincide con algún vuelo operado por Aeromexico o vuelo en código
|
|
67
|
+
compartido
|
|
68
|
+
</p>
|
|
69
|
+
</template>
|
|
70
|
+
</NotificationBar>
|
|
71
|
+
|
|
72
|
+
<FlightStatusTicket class="mt-5 md:mt-10" />
|
|
73
|
+
|
|
74
|
+
<EmptyStateIllustration
|
|
75
|
+
description="No hay vuelos registrados."
|
|
76
|
+
class="mt-5 md:mt-10"
|
|
77
|
+
/>
|
|
78
|
+
|
|
79
|
+
<AlertModal
|
|
80
|
+
:isOpen="isOpenModal"
|
|
81
|
+
title="Correo"
|
|
82
|
+
description="jgonazalez@aeromexico.com"
|
|
83
|
+
@confirm="isOpenModal = false"
|
|
84
|
+
button-text="Enviar"
|
|
85
|
+
/>
|
|
86
|
+
|
|
87
|
+
<template #action-bar>
|
|
88
|
+
<ActionBar
|
|
89
|
+
description="Enviar información a correo electrónico"
|
|
90
|
+
button-text="Enviar"
|
|
91
|
+
@action="isOpenModal = true"
|
|
92
|
+
:disabled="true"
|
|
93
|
+
/>
|
|
94
|
+
</template>
|
|
95
|
+
</ToolWrapper>
|
|
96
|
+
<!-- <div class="flex flex-col gap-5 p-5 font-GarnettRegular text-amBluePremium">
|
|
97
|
+
<form>
|
|
98
|
+
<Button :disabled="true">Hola</Button>
|
|
99
|
+
<Button :disabled="false">Hola</Button>
|
|
100
|
+
<Button :disabled="false" variant="secondary">Hola</Button>
|
|
101
|
+
<Button :disabled="true" variant="secondary">Hola</Button>
|
|
102
|
+
<BaseInput type="email" label="Email" placeholder="Email" />
|
|
103
|
+
<BaseInput type="date" label="Fecha de vuelo" :check-icon="false" />
|
|
104
|
+
<PasswordInput />
|
|
105
|
+
</form>
|
|
106
|
+
|
|
107
|
+
<NotificationBar variant="error">
|
|
108
|
+
<template #description>
|
|
109
|
+
<p class="text-xs">
|
|
110
|
+
<span class="text-amRed font-GarnettSemibold">
|
|
111
|
+
Información inválida
|
|
112
|
+
</span>
|
|
113
|
+
No coincide con algún vuelo operado por Aeromexico o vuelo en código
|
|
114
|
+
compartido
|
|
115
|
+
</p>
|
|
116
|
+
</template>
|
|
117
|
+
</NotificationBar>
|
|
118
|
+
<NotificationBar
|
|
119
|
+
variant="info"
|
|
120
|
+
@close="console.log('probando emit de cierre')"
|
|
121
|
+
>
|
|
122
|
+
<template #description>
|
|
123
|
+
<p class="text-xs">
|
|
124
|
+
Aviso importante! Los vuelos con salida dentro de las próximas 24hrs
|
|
125
|
+
pueden ser sujetos a cambios. si requieres confimación de esos casos,
|
|
126
|
+
por favor contacta a Global Sales Support
|
|
127
|
+
</p>
|
|
128
|
+
</template>
|
|
129
|
+
</NotificationBar>
|
|
130
|
+
|
|
131
|
+
<EmptyStateIllustration description="No hay vuelos registrados." />
|
|
132
|
+
<FlightStatusTicket />
|
|
133
|
+
<TicketStatusTicket />
|
|
134
|
+
<ActionBar
|
|
135
|
+
description="Enviar información a correo electrónico"
|
|
136
|
+
button-text="Enviar"
|
|
137
|
+
@button-click="isOpenModal = true"
|
|
138
|
+
/>
|
|
139
|
+
<AlertModal
|
|
140
|
+
:isOpen="isOpenModal"
|
|
141
|
+
title="Correo"
|
|
142
|
+
description="jgonazalez@aeromexico.com"
|
|
143
|
+
button-text="Enviar"
|
|
144
|
+
:on-confirm="() => (isOpenModal = false)"
|
|
145
|
+
/>
|
|
146
|
+
<AlertModal
|
|
147
|
+
:isOpen="isOpenModal"
|
|
148
|
+
icon-name="TrashWarnCircle"
|
|
149
|
+
title="No se ha podido eliminar el Check-in de la reservación"
|
|
150
|
+
description="Por favor, contactar al provedor de ventas a través de nuestro chat."
|
|
151
|
+
button-text="Continuar"
|
|
152
|
+
:on-confirm="() => (isOpenModal = false)"
|
|
153
|
+
/>
|
|
154
|
+
</div> -->
|
|
155
|
+
</template>
|
|
156
|
+
|
|
157
|
+
<style scoped></style>
|
package/src/assets/css/index.css
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
@tailwind base;
|
|
2
|
-
@tailwind components;
|
|
1
|
+
@tailwind base;
|
|
2
|
+
@tailwind components;
|
|
3
3
|
@tailwind utilities;
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import AmButton from "../Buttons/AmButton.vue";
|
|
3
|
-
|
|
4
|
-
defineProps({
|
|
5
|
-
description: {
|
|
6
|
-
type: String,
|
|
7
|
-
},
|
|
8
|
-
buttonText: {
|
|
9
|
-
type: String,
|
|
10
|
-
},
|
|
11
|
-
disabled: {
|
|
12
|
-
type: Boolean,
|
|
13
|
-
default: false,
|
|
14
|
-
},
|
|
15
|
-
});
|
|
16
|
-
const emit = defineEmits(["action"]);
|
|
17
|
-
|
|
18
|
-
const handleClick = async () => {
|
|
19
|
-
emit("action");
|
|
20
|
-
};
|
|
21
|
-
</script>
|
|
22
|
-
<template>
|
|
23
|
-
<div
|
|
24
|
-
class="border-t border-amNewLighterGray flex justify-center"
|
|
25
|
-
v-bind="$attrs"
|
|
26
|
-
>
|
|
27
|
-
<div
|
|
28
|
-
class="w-full md:max-w-[644px] max-w-[736px] flex flex-col bg-white md:flex-row justify-between items-center py-[10px] gap-5 px-5 md:px-0"
|
|
29
|
-
>
|
|
30
|
-
<h5 class="text-amBluePremium text-xs md:text-sm lg:text-base">
|
|
31
|
-
{{ description }}
|
|
32
|
-
</h5>
|
|
33
|
-
<AmButton size="xl" @click="handleClick" :disabled="disabled">
|
|
34
|
-
{{ buttonText }}
|
|
35
|
-
</AmButton>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
</template>
|
|
1
|
+
<script setup>
|
|
2
|
+
import AmButton from "../Buttons/AmButton.vue";
|
|
3
|
+
|
|
4
|
+
defineProps({
|
|
5
|
+
description: {
|
|
6
|
+
type: String,
|
|
7
|
+
},
|
|
8
|
+
buttonText: {
|
|
9
|
+
type: String,
|
|
10
|
+
},
|
|
11
|
+
disabled: {
|
|
12
|
+
type: Boolean,
|
|
13
|
+
default: false,
|
|
14
|
+
},
|
|
15
|
+
});
|
|
16
|
+
const emit = defineEmits(["action"]);
|
|
17
|
+
|
|
18
|
+
const handleClick = async () => {
|
|
19
|
+
emit("action");
|
|
20
|
+
};
|
|
21
|
+
</script>
|
|
22
|
+
<template>
|
|
23
|
+
<div
|
|
24
|
+
class="border-t border-amNewLighterGray flex justify-center"
|
|
25
|
+
v-bind="$attrs"
|
|
26
|
+
>
|
|
27
|
+
<div
|
|
28
|
+
class="w-full md:max-w-[644px] max-w-[736px] flex flex-col bg-white md:flex-row justify-between items-center py-[10px] gap-5 px-5 md:px-0"
|
|
29
|
+
>
|
|
30
|
+
<h5 class="text-amBluePremium text-xs md:text-sm lg:text-base">
|
|
31
|
+
{{ description }}
|
|
32
|
+
</h5>
|
|
33
|
+
<AmButton size="xl" @click="handleClick" :disabled="disabled">
|
|
34
|
+
{{ buttonText }}
|
|
35
|
+
</AmButton>
|
|
36
|
+
</div>
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
<script setup>
|
|
2
|
-
import { computed } from "vue";
|
|
3
|
-
|
|
4
|
-
const props = defineProps({
|
|
5
|
-
type: {
|
|
6
|
-
type: String,
|
|
7
|
-
default: "button",
|
|
8
|
-
},
|
|
9
|
-
disabled: {
|
|
10
|
-
type: Boolean,
|
|
11
|
-
default: false,
|
|
12
|
-
},
|
|
13
|
-
variant: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: "primary",
|
|
16
|
-
validator: (prop) => ["primary", "secondary"].includes(prop),
|
|
17
|
-
},
|
|
18
|
-
size: {
|
|
19
|
-
type: String,
|
|
20
|
-
default: "md",
|
|
21
|
-
validator: (prop) => ["sm", "md", "lg", "xl"].includes(prop),
|
|
22
|
-
},
|
|
23
|
-
width: {
|
|
24
|
-
type: String,
|
|
25
|
-
default: "flexible",
|
|
26
|
-
validator: (prop) => ["flexible", "compact", "full"].includes(prop),
|
|
27
|
-
},
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
// Emit
|
|
31
|
-
const emit = defineEmits(["click"]);
|
|
32
|
-
|
|
33
|
-
// Clases dinámicas
|
|
34
|
-
const buttonClasses = computed(() => {
|
|
35
|
-
const base =
|
|
36
|
-
"rounded text-white font-GarnettSemibold disabled:bg-amNewLightGray";
|
|
37
|
-
const variants = {
|
|
38
|
-
primary: "bg-amRoseMexican",
|
|
39
|
-
secondary: "bg-amBlueInnovation",
|
|
40
|
-
};
|
|
41
|
-
const sizes = {
|
|
42
|
-
sm: "text-[11px] h-[30px] px-[12px]",
|
|
43
|
-
md: "text-xs h-[40px] px-[12px]",
|
|
44
|
-
lg: "text-xs h-[40px] md:h-[50px] px-[12px]",
|
|
45
|
-
xl: "text-sm h-[40px] md:h-[60px] px-[18px]",
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const widths = {
|
|
49
|
-
flexible: "w-full md:w-max",
|
|
50
|
-
compact: "w-max",
|
|
51
|
-
full: "w-full",
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
return [
|
|
55
|
-
base,
|
|
56
|
-
variants[props.variant] || variants.primary,
|
|
57
|
-
sizes[props.size] || sizes.md,
|
|
58
|
-
widths[props.width],
|
|
59
|
-
];
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
// Función para manejar click y emitir evento
|
|
63
|
-
const handleClick = (event) => {
|
|
64
|
-
if (!props.disabled) {
|
|
65
|
-
emit("click", event);
|
|
66
|
-
// if ($attrs.onCustomFunction) $attrs.onCustomFunction(event); // ejemplo callback dinámico
|
|
67
|
-
}
|
|
68
|
-
};
|
|
69
|
-
</script>
|
|
70
|
-
|
|
71
|
-
<template>
|
|
72
|
-
<button
|
|
73
|
-
:type="type"
|
|
74
|
-
:disabled="disabled"
|
|
75
|
-
:class="buttonClasses"
|
|
76
|
-
class=""
|
|
77
|
-
v-bind="$attrs"
|
|
78
|
-
@click="handleClick"
|
|
79
|
-
>
|
|
80
|
-
<slot />
|
|
81
|
-
</button>
|
|
82
|
-
</template>
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed } from "vue";
|
|
3
|
+
|
|
4
|
+
const props = defineProps({
|
|
5
|
+
type: {
|
|
6
|
+
type: String,
|
|
7
|
+
default: "button",
|
|
8
|
+
},
|
|
9
|
+
disabled: {
|
|
10
|
+
type: Boolean,
|
|
11
|
+
default: false,
|
|
12
|
+
},
|
|
13
|
+
variant: {
|
|
14
|
+
type: String,
|
|
15
|
+
default: "primary",
|
|
16
|
+
validator: (prop) => ["primary", "secondary"].includes(prop),
|
|
17
|
+
},
|
|
18
|
+
size: {
|
|
19
|
+
type: String,
|
|
20
|
+
default: "md",
|
|
21
|
+
validator: (prop) => ["sm", "md", "lg", "xl"].includes(prop),
|
|
22
|
+
},
|
|
23
|
+
width: {
|
|
24
|
+
type: String,
|
|
25
|
+
default: "flexible",
|
|
26
|
+
validator: (prop) => ["flexible", "compact", "full"].includes(prop),
|
|
27
|
+
},
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
// Emit
|
|
31
|
+
const emit = defineEmits(["click"]);
|
|
32
|
+
|
|
33
|
+
// Clases dinámicas
|
|
34
|
+
const buttonClasses = computed(() => {
|
|
35
|
+
const base =
|
|
36
|
+
"rounded text-white font-GarnettSemibold disabled:bg-amNewLightGray";
|
|
37
|
+
const variants = {
|
|
38
|
+
primary: "bg-amRoseMexican",
|
|
39
|
+
secondary: "bg-amBlueInnovation",
|
|
40
|
+
};
|
|
41
|
+
const sizes = {
|
|
42
|
+
sm: "text-[11px] h-[30px] px-[12px]",
|
|
43
|
+
md: "text-xs h-[40px] px-[12px]",
|
|
44
|
+
lg: "text-xs h-[40px] md:h-[50px] px-[12px]",
|
|
45
|
+
xl: "text-sm h-[40px] md:h-[60px] px-[18px]",
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const widths = {
|
|
49
|
+
flexible: "w-full md:w-max",
|
|
50
|
+
compact: "w-max",
|
|
51
|
+
full: "w-full",
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
return [
|
|
55
|
+
base,
|
|
56
|
+
variants[props.variant] || variants.primary,
|
|
57
|
+
sizes[props.size] || sizes.md,
|
|
58
|
+
widths[props.width],
|
|
59
|
+
];
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
// Función para manejar click y emitir evento
|
|
63
|
+
const handleClick = (event) => {
|
|
64
|
+
if (!props.disabled) {
|
|
65
|
+
emit("click", event);
|
|
66
|
+
// if ($attrs.onCustomFunction) $attrs.onCustomFunction(event); // ejemplo callback dinámico
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<template>
|
|
72
|
+
<button
|
|
73
|
+
:type="type"
|
|
74
|
+
:disabled="disabled"
|
|
75
|
+
:class="buttonClasses"
|
|
76
|
+
class=""
|
|
77
|
+
v-bind="$attrs"
|
|
78
|
+
@click="handleClick"
|
|
79
|
+
>
|
|
80
|
+
<slot />
|
|
81
|
+
</button>
|
|
82
|
+
</template>
|