lau-ecom-design-system 1.0.17 → 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 +1578 -258
  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 +1492 -211
  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 -150
  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,208 +1,207 @@
1
- <script lang="ts" setup>
2
- import { computed, ref } from "vue";
3
- import { LauEcomSize } from "../../enums";
4
- import {
5
- LauEcomUpcIconExclamationTriangle,
6
- LauEcomUpcIconNavCheckmark,
7
- } from "../LauEcomIcon";
8
- import { Colors } from "../../utils";
9
-
10
- interface Props {
11
- id?: string;
12
- type?: string;
13
- placeholder?: string;
14
- isDisabled?: boolean;
15
- label?: string;
16
- size?: LauEcomSize;
17
- name?: string;
18
- modelValue?: string | number;
19
- inputContainerClass?: string;
20
- inputClass?: string;
21
- errorMessage?: string;
22
- hasSuccess?: boolean;
23
- limit?: number;
24
- }
25
-
26
- const props = withDefaults(defineProps<Props>(), {
27
- id: "lauEcomInput",
28
- type: "text",
29
- placeholder: "Placeholder",
30
- isDisabled: false,
31
- label: "Text label",
32
- size: LauEcomSize.md,
33
- name: "input",
34
- modelValue: "",
35
- inputContainerClass: "",
36
- inputClass: "",
37
- errorMessage: "",
38
- hasSuccess: false,
39
- limit: 50,
40
- });
41
-
42
- const emit = defineEmits<{
43
- "update:modelValue": [value: string];
44
- }>();
45
-
46
- const inputValue = ref(props.modelValue);
47
- const errorMessageValue = ref(props.errorMessage);
48
-
49
- const handleInput = (event: Event) => {
50
- const newValue = (event.target as HTMLInputElement).value;
51
-
52
- if (newValue.length === props.limit) {
53
- errorMessageValue.value = "Excediste el numero de caracteres";
54
- inputValue.value = newValue;
55
- emit("update:modelValue", newValue);
56
- return;
57
- } else {
58
- errorMessageValue.value = props.errorMessage;
59
- }
60
-
61
- inputValue.value = newValue;
62
- emit("update:modelValue", newValue);
63
- };
64
-
65
- const labelClasses = computed(() => {
66
- return {
67
- "lau-ecom-label": true,
68
- "lau-ecom-label--disabled": props.isDisabled,
69
- };
70
- });
71
-
72
- const inputContainerClasses = computed(() => {
73
- return [
74
- "dsEcom-relative",
75
- props.inputContainerClass ? props.inputContainerClass : "dsEcom-w-[284px]",
76
- props.size === LauEcomSize.md ? "dsEcom-h-[42px]" : "dsEcom-h-[46px]",
77
- ];
78
- });
79
-
80
- const inputClasses = computed(() => {
81
- return [
82
- "lau-ecom-input core-font-body-reg-04-16px",
83
- props.inputClass,
84
- props.size === LauEcomSize.md ? "dsEcom-py-[9px]" : "dsEcom-py-[11px]",
85
- { "lau-ecom-input--disabled": props.isDisabled },
86
- { "lau-ecom-input--error": errorMessageValue.value },
87
- { "lau-ecom-input-success": props.hasSuccess && !errorMessageValue.value },
88
- props.hasSuccess || errorMessageValue.value
89
- ? "placeholder:!dsEcom-text-upc-color-neutral-100"
90
- : "placeholder:!dsEcom-text-upc-color-neutral-80",
91
- ];
92
- });
93
-
94
- const successClasses = computed(() => {
95
- return [
96
- "lau-ecom-success",
97
- props.size === LauEcomSize.md ? "dsEcom-top-[10px]" : "dsEcom-top-3",
98
- ];
99
- });
100
- </script>
101
-
102
- <template>
103
- <div class="dsEcom-flex dsEcom-flex-col">
104
- <label v-if="label" :class="labelClasses">
105
- {{ label }}
106
- </label>
107
- <div :class="inputContainerClasses">
108
- <input
109
- :id="id"
110
- :class="inputClasses"
111
- :type="type"
112
- :placeholder="placeholder"
113
- :name="name"
114
- :disabled="isDisabled"
115
- :value="inputValue"
116
- :maxlength="limit"
117
- @input="handleInput"
118
- />
119
- <div v-if="hasSuccess && !errorMessageValue" :class="successClasses">
120
- <LauEcomUpcIconNavCheckmark
121
- :color="Colors[`core-color-green-60-base`]"
122
- width="24"
123
- height="24"
124
- />
125
- </div>
126
- <div
127
- v-if="errorMessageValue"
128
- class="lau-ecom-error-message core-font-body-reg-06-12px"
129
- >
130
- <div class="dsEcom-flex">
131
- <LauEcomUpcIconExclamationTriangle
132
- :color="Colors[`upc-color-red-60-base`]"
133
- width="16"
134
- height="16"
135
- />
136
- <p class="dsEcom-ml-1">
137
- {{ errorMessageValue }}
138
- </p>
139
- </div>
140
-
141
- <span v-if="inputValue.toString().length === limit">
142
- {{ `${inputValue.toString().length}/${limit}` }}
143
- </span>
144
- </div>
145
- </div>
146
- </div>
147
- </template>
148
-
149
- <style scoped>
150
- input[type="number"]::-webkit-inner-spin-button,
151
- input[type="number"]::-webkit-outer-spin-button {
152
- -webkit-appearance: none;
153
- margin: 0;
154
- }
155
-
156
- .lau-ecom-label {
157
- @apply dsEcom-block
158
- dsEcom-text-upc-color-neutral-100
159
- dsEcom-font-core-font-family-public-sans
160
- dsEcom-text-[12px]
161
- dsEcom-font-core-font-weight-extrabold
162
- dsEcom-leading-[18px];
163
- }
164
-
165
- .lau-ecom-label--disabled {
166
- @apply !dsEcom-text-upc-color-neutral-70;
167
- }
168
-
169
- .lau-ecom-input {
170
- @apply dsEcom-w-full
171
- dsEcom-pl-3
172
- dsEcom-pr-[44px]
173
- dsEcom-rounded-sm
174
- dsEcom-border
175
- dsEcom-border-upc-color-neutral-80
176
- hover:dsEcom-border-upc-epg-color-purple-80
177
- focus:dsEcom-border-upc-epg-color-purple-60-base focus:!dsEcom-text-upc-color-neutral-100
178
- focus-visible:dsEcom-outline-none
179
- disabled:placeholder:dsEcom-text-upc-color-neutral-70 disabled:dsEcom-bg-upc-color-neutral-20
180
- disabled:!dsEcom-border-upc-color-neutral-70;
181
- }
182
-
183
- .lau-ecom-input--disabled {
184
- @apply !dsEcom-text-upc-color-neutral-70;
185
- }
186
-
187
- .lau-ecom-input--error {
188
- @apply !dsEcom-border-upc-color-red-60-base;
189
- }
190
-
191
- .lau-ecom-input-success {
192
- @apply !dsEcom-border-core-color-green-60-base
193
- placeholder:!dsEcom-text-upc-color-neutral-100;
194
- }
195
-
196
- .lau-ecom-error-message {
197
- @apply dsEcom-flex
198
- dsEcom-items-center
199
- dsEcom-mt-[2px]
200
- dsEcom-justify-between
201
- dsEcom-text-upc-color-red-60-base;
202
- }
203
-
204
- .lau-ecom-success {
205
- @apply dsEcom-absolute
206
- dsEcom-right-3;
207
- }
208
- </style>
1
+ <script lang="ts" setup>
2
+ import { computed, ref } from "vue";
3
+ import { LauEcomSize } from "../../enums";
4
+ import {
5
+ LauEcomUpcIconExclamationTriangle,
6
+ LauEcomUpcIconNavCheckmark,
7
+ } from "../LauEcomIcon";
8
+
9
+ interface Props {
10
+ id?: string;
11
+ type?: string;
12
+ placeholder?: string;
13
+ isDisabled?: boolean;
14
+ label?: string;
15
+ size?: LauEcomSize;
16
+ name?: string;
17
+ modelValue?: string | number;
18
+ inputContainerClass?: string;
19
+ inputClass?: string;
20
+ errorMessage?: string;
21
+ hasSuccess?: boolean;
22
+ limit?: number;
23
+ }
24
+
25
+ const props = withDefaults(defineProps<Props>(), {
26
+ id: "lauEcomInput",
27
+ type: "text",
28
+ placeholder: "Placeholder",
29
+ isDisabled: false,
30
+ label: "Text label",
31
+ size: LauEcomSize.md,
32
+ name: "input",
33
+ modelValue: "",
34
+ inputContainerClass: "",
35
+ inputClass: "",
36
+ errorMessage: "",
37
+ hasSuccess: false,
38
+ limit: 50,
39
+ });
40
+
41
+ const emit = defineEmits<{
42
+ "update:modelValue": [value: string];
43
+ }>();
44
+
45
+ const inputValue = ref(props.modelValue);
46
+ const errorMessageValue = ref(props.errorMessage);
47
+
48
+ const handleInput = (event: Event) => {
49
+ const newValue = (event.target as HTMLInputElement).value;
50
+
51
+ if (newValue.length === props.limit) {
52
+ errorMessageValue.value = "Excediste el numero de caracteres";
53
+ inputValue.value = newValue;
54
+ emit("update:modelValue", newValue);
55
+ return;
56
+ } else {
57
+ errorMessageValue.value = props.errorMessage;
58
+ }
59
+
60
+ inputValue.value = newValue;
61
+ emit("update:modelValue", newValue);
62
+ };
63
+
64
+ const labelClasses = computed(() => {
65
+ return {
66
+ "lau-ecom-label": true,
67
+ "lau-ecom-label--disabled": props.isDisabled,
68
+ };
69
+ });
70
+
71
+ const inputContainerClasses = computed(() => {
72
+ return [
73
+ "dsEcom-relative",
74
+ props.inputContainerClass ? props.inputContainerClass : "dsEcom-w-[284px]",
75
+ props.size === LauEcomSize.md ? "dsEcom-h-[42px]" : "dsEcom-h-[46px]",
76
+ ];
77
+ });
78
+
79
+ const inputClasses = computed(() => {
80
+ return [
81
+ "lau-ecom-input core-font-body-reg-04-16px",
82
+ props.inputClass,
83
+ props.size === LauEcomSize.md ? "dsEcom-py-[9px]" : "dsEcom-py-[11px]",
84
+ { "lau-ecom-input--disabled": props.isDisabled },
85
+ { "lau-ecom-input--error": errorMessageValue.value },
86
+ { "lau-ecom-input-success": props.hasSuccess && !errorMessageValue.value },
87
+ props.hasSuccess || errorMessageValue.value
88
+ ? "placeholder:!dsEcom-text-neutral-100"
89
+ : "placeholder:!dsEcom-text-neutral-80",
90
+ ];
91
+ });
92
+
93
+ const successClasses = computed(() => {
94
+ return [
95
+ "lau-ecom-success",
96
+ props.size === LauEcomSize.md ? "dsEcom-top-[10px]" : "dsEcom-top-3",
97
+ ];
98
+ });
99
+ </script>
100
+
101
+ <template>
102
+ <div class="dsEcom-flex dsEcom-flex-col">
103
+ <label v-if="label" :class="labelClasses">
104
+ {{ label }}
105
+ </label>
106
+ <div :class="inputContainerClasses">
107
+ <input
108
+ :id="id"
109
+ :class="inputClasses"
110
+ :type="type"
111
+ :placeholder="placeholder"
112
+ :name="name"
113
+ :disabled="isDisabled"
114
+ :value="inputValue"
115
+ :maxlength="limit"
116
+ @input="handleInput"
117
+ />
118
+ <div v-if="hasSuccess && !errorMessageValue" :class="successClasses">
119
+ <LauEcomUpcIconNavCheckmark
120
+ class="dsEcom-fill-feedback-success-60"
121
+ width="24"
122
+ height="24"
123
+ />
124
+ </div>
125
+ <div
126
+ v-if="errorMessageValue"
127
+ class="lau-ecom-error-message core-font-body-reg-06-12px"
128
+ >
129
+ <div class="dsEcom-flex">
130
+ <LauEcomUpcIconExclamationTriangle
131
+ class="dsEcom-fill-primary-60"
132
+ width="16"
133
+ height="16"
134
+ />
135
+ <p class="dsEcom-ml-1">
136
+ {{ errorMessageValue }}
137
+ </p>
138
+ </div>
139
+
140
+ <span v-if="inputValue.toString().length === limit">
141
+ {{ `${inputValue.toString().length}/${limit}` }}
142
+ </span>
143
+ </div>
144
+ </div>
145
+ </div>
146
+ </template>
147
+
148
+ <style scoped>
149
+ input[type="number"]::-webkit-inner-spin-button,
150
+ input[type="number"]::-webkit-outer-spin-button {
151
+ -webkit-appearance: none;
152
+ margin: 0;
153
+ }
154
+
155
+ .lau-ecom-label {
156
+ @apply dsEcom-block
157
+ dsEcom-text-neutral-100
158
+ dsEcom-font-core-font-family-public-sans
159
+ dsEcom-text-[12px]
160
+ dsEcom-font-core-font-weight-extrabold
161
+ dsEcom-leading-[18px];
162
+ }
163
+
164
+ .lau-ecom-label--disabled {
165
+ @apply !dsEcom-text-neutral-70;
166
+ }
167
+
168
+ .lau-ecom-input {
169
+ @apply dsEcom-w-full
170
+ dsEcom-pl-3
171
+ dsEcom-pr-[44px]
172
+ dsEcom-rounded-sm
173
+ dsEcom-border
174
+ dsEcom-border-neutral-80
175
+ hover:dsEcom-border-stroke-secondary-60
176
+ focus:dsEcom-border-stroke-secondary-60 focus:!dsEcom-text-neutral-100
177
+ focus-visible:dsEcom-outline-none
178
+ disabled:placeholder:dsEcom-text-neutral-70 disabled:dsEcom-bg-neutral-20
179
+ disabled:!dsEcom-border-neutral-70;
180
+ }
181
+
182
+ .lau-ecom-input--disabled {
183
+ @apply !dsEcom-text-neutral-70;
184
+ }
185
+
186
+ .lau-ecom-input--error {
187
+ @apply !dsEcom-border-feedback-error-60;
188
+ }
189
+
190
+ .lau-ecom-input-success {
191
+ @apply !dsEcom-border-feedback-success-60
192
+ placeholder:!dsEcom-text-neutral-100;
193
+ }
194
+
195
+ .lau-ecom-error-message {
196
+ @apply dsEcom-flex
197
+ dsEcom-items-center
198
+ dsEcom-mt-[2px]
199
+ dsEcom-justify-between
200
+ dsEcom-text-primary-60;
201
+ }
202
+
203
+ .lau-ecom-success {
204
+ @apply dsEcom-absolute
205
+ dsEcom-right-3;
206
+ }
207
+ </style>
@@ -1,34 +1,8 @@
1
- <script setup lang="ts">
2
- import { computed } from "vue";
3
- import { LauEcomInstance } from "../../enums";
4
-
5
- interface Props {
6
- instance?: LauEcomInstance;
7
- }
8
-
9
- const props = withDefaults(defineProps<Props>(), {
10
- instance: LauEcomInstance.Upc,
11
- });
12
-
13
- const isUpcInstance = computed(() => {
14
- return props.instance === LauEcomInstance.Upc;
15
- });
16
-
17
- const isCbtInstance = computed(() => {
18
- return props.instance === LauEcomInstance.Cibertec;
19
- });
20
-
21
- const getBackgroundClassColor = computed(() => {
22
- if (isUpcInstance.value) return "dsEcom-bg-upc-color-neutral-80";
23
- if (isCbtInstance.value) return "dsEcom-bg-cbt-astro-blue-90";
24
- return "";
25
- });
26
- </script>
1
+ <script setup lang="ts"></script>
27
2
 
28
3
  <template>
29
4
  <div
30
- class="dsEcom-bg-opacity-70 dsEcom-flex dsEcom-justify-center dsEcom-items-center dsEcom-absolute dsEcom-inset-0 dsEcom-z-50"
31
- :class="getBackgroundClassColor"
5
+ class="dsEcom-bg-opacity-70 dsEcom-flex dsEcom-justify-center dsEcom-items-center dsEcom-absolute dsEcom-inset-0 dsEcom-z-50 dsEcom-bg-neutral-80"
32
6
  >
33
7
  <div
34
8
  class="dsEcom-flex dsEcom-flex-col dsEcom-gap-4 dsEcom-text-white dsEcom-items-center"