lau-ecom-design-system 1.0.16 → 1.0.18

Sign up to get free protection for your applications and to get access to all the features.
Files changed (35) hide show
  1. package/dist/lau-ecom-design-system.esm.css +13 -1
  2. package/dist/lau-ecom-design-system.esm.js +1582 -265
  3. package/dist/lau-ecom-design-system.min.css +13 -1
  4. package/dist/lau-ecom-design-system.min.js +1 -1
  5. package/dist/lau-ecom-design-system.ssr.css +13 -1
  6. package/dist/lau-ecom-design-system.ssr.js +1496 -218
  7. package/dist/style.css +190 -19
  8. package/package.json +80 -80
  9. package/src/components/LauEcomBannerCookies/LauEcomBannerCookies.vue +8 -39
  10. package/src/components/LauEcomBannerCookies/LauEcomBannerCookiesConfig.vue +8 -46
  11. package/src/components/LauEcomBannerCookies/LauEcomBannerCookiesConfigAccordion.vue +2 -13
  12. package/src/components/LauEcomButton/LauEcomButton.vue +137 -149
  13. package/src/components/LauEcomCheckbox/LauEcomCheckbox.vue +143 -148
  14. package/src/components/LauEcomDisclamer/LauEcomDisclamer.vue +79 -82
  15. package/src/components/LauEcomDropdown/LauEcomDropdown.vue +203 -203
  16. package/src/components/LauEcomIcon/LauEcomCoreIconBook.vue +26 -29
  17. package/src/components/LauEcomIcon/LauEcomCoreIconFileCode.vue +28 -31
  18. package/src/components/LauEcomIcon/LauEcomUpcIconCertificate.vue +28 -31
  19. package/src/components/LauEcomIcon/LauEcomUpcIconCheck.vue +26 -29
  20. package/src/components/LauEcomIcon/LauEcomUpcIconCheckCircle.vue +28 -31
  21. package/src/components/LauEcomIcon/LauEcomUpcIconCreditCard.vue +28 -31
  22. package/src/components/LauEcomIcon/LauEcomUpcIconExclamationCircle.vue +28 -31
  23. package/src/components/LauEcomIcon/LauEcomUpcIconExclamationTriangle.vue +28 -31
  24. package/src/components/LauEcomIcon/LauEcomUpcIconInfoCircle.vue +26 -29
  25. package/src/components/LauEcomIcon/LauEcomUpcIconNavArrow.vue +26 -28
  26. package/src/components/LauEcomIcon/LauEcomUpcIconNavCheckmark.vue +26 -29
  27. package/src/components/LauEcomInput/LauEcomInput.vue +207 -208
  28. package/src/components/LauEcomLoaderPage/LauEcomLoaderPage.vue +2 -28
  29. package/src/components/LauEcomRadioButton/LauEcomRadioButton.vue +103 -115
  30. package/src/components/LauEcomRtb/LauEcomRtb.vue +71 -92
  31. package/src/components/LauEcomStepbar/LauEcomStepbar.vue +43 -49
  32. package/src/components/LauEcomStepbar/LauEcomStepbarItem.vue +128 -172
  33. package/src/components/LauEcomSwitch/LauEcomSwitch.vue +9 -20
  34. package/src/components/LauEcomTab/LauEcomTab.vue +82 -113
  35. package/src/components/LauEcomTextButton/LauEcomTextButton.vue +13 -75
@@ -1,148 +1,143 @@
1
- <script lang="ts" setup>
2
- import { computed, ref } from "vue";
3
- import { LauEcomUpcIconNavCheckmark } from "../LauEcomIcon";
4
- import { LauEcomInstance } from "../../enums";
5
-
6
- interface Props {
7
- instance?: LauEcomInstance;
8
- id?: string;
9
- label?: string;
10
- value?: string | number | boolean;
11
- modelValue?: string | number | boolean | [];
12
- isRequired?: boolean;
13
- isDisabled?: boolean;
14
- }
15
-
16
- const props = withDefaults(defineProps<Props>(), {
17
- instance: LauEcomInstance.Upc,
18
- id: "",
19
- label: "text label",
20
- value: "",
21
- modelValue: () => false,
22
- isRequired: false,
23
- isDisabled: false,
24
- });
25
-
26
- const emit = defineEmits<{
27
- "update:modelValue": [value: string | number | boolean];
28
- }>();
29
-
30
- const isChecked = ref(
31
- typeof props.modelValue === "boolean"
32
- ? props.modelValue
33
- : //@ts-ignore
34
- props.modelValue.includes(props.value),
35
- );
36
-
37
- const handleChange = () => {
38
- if (typeof props.modelValue !== "boolean") {
39
- isChecked.value = !isChecked.value;
40
- //@ts-ignore
41
- const newValue = isChecked.value
42
- ? [...props.modelValue, props.value]
43
- : props.modelValue.filter((val) => val !== props.value);
44
- emit("update:modelValue", newValue);
45
- } else {
46
- isChecked.value = !isChecked.value;
47
- emit("update:modelValue", isChecked.value);
48
- }
49
- };
50
-
51
- const lauEcomCheckboxClasses = computed(() => {
52
- return {
53
- "lau-ecom-checkbox dsEcom-peer": true,
54
- "lau-ecom-checkbox--upc": props.instance === LauEcomInstance.Upc,
55
- "lau-ecom-checkbox--cib": props.instance === LauEcomInstance.Cibertec,
56
- "lau-ecom-checkbox--disabled": props.isDisabled,
57
- "dsEcom-cursor-pointer checked:!dsEcom-border-upc-color-red-60-base group-hover:dsEcom-border-upc-color-red-60-base":
58
- !props.isDisabled,
59
- "!dsEcom-border-upc-color-red-60-base":
60
- props.isRequired && !props.isDisabled,
61
- };
62
- });
63
-
64
- const textLabelClass = computed(() => {
65
- if (props.isDisabled) return "!dsEcom-text-upc-color-neutral-70";
66
- return "";
67
- });
68
- </script>
69
-
70
- <template>
71
- <div class="dsEcom-flex">
72
- <label class="lau-ecom-label group upc-font-body-reg-05-14px">
73
- <input
74
- :class="lauEcomCheckboxClasses"
75
- type="checkbox"
76
- :required="isRequired"
77
- :disabled="isDisabled"
78
- :checked="isChecked"
79
- @change="handleChange"
80
- />
81
- <LauEcomUpcIconNavCheckmark
82
- class="icon-checkmark"
83
- color="#fff"
84
- width="16"
85
- height="16"
86
- />
87
- <span
88
- v-if="!$slots.default"
89
- class="upc-font-link-03-14px"
90
- :class="textLabelClass"
91
- >{{ label }}</span
92
- >
93
- </label>
94
- <div :class="textLabelClass">
95
- <slot :text="`upc-font-link-03-14px ${textLabelClass}`" />
96
- </div>
97
- </div>
98
- </template>
99
-
100
- <style scoped>
101
- .lau-ecom-checkbox {
102
- @apply dsEcom-w-5
103
- dsEcom-h-5
104
- dsEcom-mr-2
105
- dsEcom-rounded
106
- dsEcom-appearance-none
107
- dsEcom-border
108
- dsEcom-border-upc-color-neutral-90
109
-
110
- dsEcom-transition
111
- dsEcom-duration-200
112
- after:dsEcom-absolute
113
- after:dsEcom-left-0
114
- after:dsEcom-top-0
115
- after:dsEcom-h-full
116
- after:dsEcom-w-full
117
- focus:dsEcom-outline-none;
118
- }
119
-
120
- .lau-ecom-checkbox--upc {
121
- @apply hover:dsEcom-border-upc-color-red-80
122
- checked:dsEcom-bg-upc-color-red-60-base
123
- checked:!dsEcom-border-upc-color-red-60-base;
124
- }
125
-
126
- .lau-ecom-checkbox--cib {
127
- @apply hover:dsEcom-border-cbt-color-apple-green-70
128
- checked:dsEcom-bg-cbt-color-apple-green-60-base
129
- checked:!dsEcom-border-cbt-color-apple-green-60-base;
130
- }
131
-
132
- .lau-ecom-checkbox--disabled {
133
- @apply !dsEcom-border-upc-color-neutral-60
134
- checked:!dsEcom-border-upc-color-neutral-60
135
- checked:!dsEcom-bg-upc-color-neutral-60;
136
- }
137
-
138
- .lau-ecom-label {
139
- @apply dsEcom-flex dsEcom-items-center dsEcom-text-upc-color-neutral-90 dsEcom-relative;
140
- }
141
-
142
- .icon-checkmark {
143
- @apply dsEcom-absolute
144
- dsEcom-left-[2px]
145
- dsEcom-hidden
146
- peer-checked:!dsEcom-block;
147
- }
148
- </style>
1
+ <script lang="ts" setup>
2
+ import { computed, ref } from "vue";
3
+ import { LauEcomUpcIconNavCheckmark } from "../LauEcomIcon";
4
+
5
+ interface Props {
6
+ id?: string;
7
+ label?: string;
8
+ value?: string | number | boolean;
9
+ modelValue?: string | number | boolean | [];
10
+ isRequired?: boolean;
11
+ isDisabled?: boolean;
12
+ }
13
+
14
+ const props = withDefaults(defineProps<Props>(), {
15
+ id: "",
16
+ label: "text label",
17
+ value: "",
18
+ modelValue: () => false,
19
+ isRequired: false,
20
+ isDisabled: false,
21
+ });
22
+
23
+ const emit = defineEmits<{
24
+ "update:modelValue": [value: string | number | boolean];
25
+ }>();
26
+
27
+ const isChecked = ref(
28
+ typeof props.modelValue === "boolean"
29
+ ? props.modelValue
30
+ : //@ts-ignore
31
+ props.modelValue.includes(props.value),
32
+ );
33
+
34
+ const handleChange = () => {
35
+ if (typeof props.modelValue !== "boolean") {
36
+ isChecked.value = !isChecked.value;
37
+ //@ts-ignore
38
+ const newValue = isChecked.value
39
+ ? [...props.modelValue, props.value]
40
+ : props.modelValue.filter((val) => val !== props.value);
41
+ emit("update:modelValue", newValue);
42
+ } else {
43
+ isChecked.value = !isChecked.value;
44
+ emit("update:modelValue", isChecked.value);
45
+ }
46
+ };
47
+
48
+ const lauEcomCheckboxClasses = computed(() => {
49
+ return {
50
+ "lau-ecom-checkbox dsEcom-peer lau-ecom-checkbox--upc": true,
51
+ "lau-ecom-checkbox--disabled": props.isDisabled,
52
+ "lau-ecom-checkbox--checked": !props.isDisabled,
53
+ "!dsEcom-border-upc-primary-60": props.isRequired && !props.isDisabled,
54
+ };
55
+ });
56
+
57
+ const textLabelClass = computed(() => {
58
+ if (props.isDisabled) return "!dsEcom-text-neutral-70";
59
+ return "";
60
+ });
61
+ </script>
62
+
63
+ <template>
64
+ <div class="dsEcom-flex">
65
+ <label class="lau-ecom-label group upc-font-body-reg-05-14px">
66
+ <input
67
+ :class="lauEcomCheckboxClasses"
68
+ type="checkbox"
69
+ :required="isRequired"
70
+ :disabled="isDisabled"
71
+ :checked="isChecked"
72
+ @change="handleChange"
73
+ />
74
+ <LauEcomUpcIconNavCheckmark
75
+ class="icon-checkmark"
76
+ color="#fff"
77
+ width="16"
78
+ height="16"
79
+ />
80
+ <span
81
+ v-if="!$slots.default"
82
+ class="upc-font-link-03-14px"
83
+ :class="textLabelClass"
84
+ >{{ label }}</span
85
+ >
86
+ </label>
87
+ <div :class="textLabelClass">
88
+ <slot :text="`upc-font-link-03-14px ${textLabelClass}`" />
89
+ </div>
90
+ </div>
91
+ </template>
92
+
93
+ <style scoped>
94
+ .lau-ecom-checkbox {
95
+ @apply dsEcom-w-5
96
+ dsEcom-h-5
97
+ dsEcom-mr-2
98
+ dsEcom-rounded
99
+ dsEcom-appearance-none
100
+ dsEcom-border
101
+ dsEcom-border-neutral-90
102
+ dsEcom-transition
103
+ dsEcom-duration-200
104
+ after:dsEcom-absolute
105
+ after:dsEcom-left-0
106
+ after:dsEcom-top-0
107
+ after:dsEcom-h-full
108
+ after:dsEcom-w-full
109
+ focus:dsEcom-outline-none;
110
+ }
111
+
112
+ .lau-ecom-checkbox--upc {
113
+ @apply hover:dsEcom-border-primary-80
114
+ checked:dsEcom-bg-primary-60
115
+ checked:!dsEcom-border-primary-60;
116
+ }
117
+
118
+ .lau-ecom-checkbox--checked {
119
+ @apply dsEcom-cursor-pointer
120
+ checked:!dsEcom-border-primary-60
121
+ group-hover:dsEcom-border-primary-60;
122
+ }
123
+
124
+ .lau-ecom-checkbox--disabled {
125
+ @apply !dsEcom-border-neutral-60
126
+ checked:!dsEcom-border-neutral-60
127
+ checked:!dsEcom-bg-neutral-60;
128
+ }
129
+
130
+ .lau-ecom-label {
131
+ @apply dsEcom-flex
132
+ dsEcom-items-center
133
+ dsEcom-text-neutral-90
134
+ dsEcom-relative;
135
+ }
136
+
137
+ .icon-checkmark {
138
+ @apply dsEcom-absolute
139
+ dsEcom-left-[2px]
140
+ dsEcom-hidden
141
+ peer-checked:!dsEcom-block;
142
+ }
143
+ </style>
@@ -1,82 +1,79 @@
1
- <script lang="ts" setup>
2
- import { computed } from "vue";
3
- import { LauEcomInstance, LauEcomState } from "../../enums";
4
- import {
5
- LauEcomUpcIconCheckCircle,
6
- LauEcomUpcIconExclamationCircle,
7
- LauEcomUpcIconExclamationTriangle,
8
- LauEcomUpcIconInfoCircle,
9
- } from "../LauEcomIcon";
10
- import { Colors } from "../../utils";
11
-
12
- interface Props {
13
- instance?: LauEcomInstance;
14
- state?: LauEcomState;
15
- }
16
-
17
- const props = withDefaults(defineProps<Props>(), {
18
- instance: LauEcomInstance.Upc,
19
- state: LauEcomState.success,
20
- });
21
-
22
- const lauEcomDisclamerClasses = computed(() => {
23
- return {
24
- "lau-ecom-disclamer upc-font-body-reg-05-14px": true,
25
- "lau-ecom-disclamer--success": props.state === LauEcomState.success,
26
- "lau-ecom-disclamer--warning": props.state === LauEcomState.warning,
27
- "lau-ecom-disclamer--error": props.state === LauEcomState.error,
28
- "lau-ecom-disclamer--information": props.state === LauEcomState.information,
29
- };
30
- });
31
- </script>
32
-
33
- <template>
34
- <div :class="lauEcomDisclamerClasses">
35
- <span>
36
- <LauEcomUpcIconCheckCircle
37
- v-if="state === LauEcomState.success"
38
- :color="Colors['core-color-green-60-base']"
39
- />
40
- <LauEcomUpcIconExclamationTriangle
41
- v-if="state === LauEcomState.warning"
42
- :color="Colors['core-icon-critical-60']"
43
- />
44
- <LauEcomUpcIconExclamationCircle
45
- v-if="state === LauEcomState.error"
46
- :color="Colors['core-color-redibbon-60-base']"
47
- />
48
- <LauEcomUpcIconInfoCircle
49
- v-if="state === LauEcomState.information"
50
- :color="Colors['core-color-blue-intense-60-base']"
51
- />
52
- </span>
53
- <p>
54
- ¡Qué buena elección! Inscríbete pero antes escoge la fecha de inicio y el
55
- horario
56
- </p>
57
- </div>
58
- </template>
59
-
60
- <style scoped>
61
- .lau-ecom-disclamer {
62
- @apply dsEcom-text-upc-color-neutral-100
63
- dsEcom-p-4
64
- dsEcom-flex
65
- dsEcom-gap-3
66
- dsEcom-w-fit
67
- dsEcom-rounded-[2px];
68
- }
69
-
70
- .lau-ecom-disclamer--success {
71
- @apply dsEcom-bg-core-color-green-30;
72
- }
73
- .lau-ecom-disclamer--warning {
74
- @apply dsEcom-bg-core-feedback-critical-30;
75
- }
76
- .lau-ecom-disclamer--error {
77
- @apply dsEcom-bg-core-color-redibbon-30;
78
- }
79
- .lau-ecom-disclamer--information {
80
- @apply dsEcom-bg-core-color-blue-intense-30;
81
- }
82
- </style>
1
+ <script lang="ts" setup>
2
+ import { computed } from "vue";
3
+ import { LauEcomState } from "../../enums";
4
+ import {
5
+ LauEcomUpcIconCheckCircle,
6
+ LauEcomUpcIconExclamationCircle,
7
+ LauEcomUpcIconExclamationTriangle,
8
+ LauEcomUpcIconInfoCircle,
9
+ } from "../LauEcomIcon";
10
+
11
+ interface Props {
12
+ state?: LauEcomState;
13
+ }
14
+
15
+ const props = withDefaults(defineProps<Props>(), {
16
+ state: LauEcomState.success,
17
+ });
18
+
19
+ const lauEcomDisclamerClasses = computed(() => {
20
+ return {
21
+ "lau-ecom-disclamer upc-font-body-reg-05-14px": true,
22
+ "lau-ecom-disclamer--success": props.state === LauEcomState.success,
23
+ "lau-ecom-disclamer--warning": props.state === LauEcomState.warning,
24
+ "lau-ecom-disclamer--error": props.state === LauEcomState.error,
25
+ "lau-ecom-disclamer--information": props.state === LauEcomState.information,
26
+ };
27
+ });
28
+ </script>
29
+
30
+ <template>
31
+ <div :class="lauEcomDisclamerClasses">
32
+ <span>
33
+ <LauEcomUpcIconCheckCircle
34
+ v-if="state === LauEcomState.success"
35
+ class="dsEcom-fill-feedback-success-60"
36
+ />
37
+ <LauEcomUpcIconExclamationTriangle
38
+ v-if="state === LauEcomState.warning"
39
+ class="dsEcom-fill-feedback-critical-60"
40
+ />
41
+ <LauEcomUpcIconExclamationCircle
42
+ v-if="state === LauEcomState.error"
43
+ class="dsEcom-fill-feedback-error-60"
44
+ />
45
+ <LauEcomUpcIconInfoCircle
46
+ v-if="state === LauEcomState.information"
47
+ class="dsEcom-fill-feedback-informative-60"
48
+ />
49
+ </span>
50
+ <p>
51
+ ¡Qué buena elección! Inscríbete pero antes escoge la fecha de inicio y el
52
+ horario
53
+ </p>
54
+ </div>
55
+ </template>
56
+
57
+ <style scoped>
58
+ .lau-ecom-disclamer {
59
+ @apply dsEcom-text-neutral-100
60
+ dsEcom-p-4
61
+ dsEcom-flex
62
+ dsEcom-gap-3
63
+ dsEcom-w-fit
64
+ dsEcom-rounded-[2px];
65
+ }
66
+
67
+ .lau-ecom-disclamer--success {
68
+ @apply dsEcom-bg-feedback-success-30;
69
+ }
70
+ .lau-ecom-disclamer--warning {
71
+ @apply dsEcom-bg-feedback-critical-30;
72
+ }
73
+ .lau-ecom-disclamer--error {
74
+ @apply dsEcom-bg-feedback-error-30;
75
+ }
76
+ .lau-ecom-disclamer--information {
77
+ @apply dsEcom-bg-feedback-informative-30;
78
+ }
79
+ </style>