lau-ecom-design-system 1.0.17 → 1.0.19
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/lau-ecom-design-system.esm.css +13 -1
- package/dist/lau-ecom-design-system.esm.js +1577 -258
- package/dist/lau-ecom-design-system.min.css +13 -1
- package/dist/lau-ecom-design-system.min.js +1 -1
- package/dist/lau-ecom-design-system.ssr.css +13 -1
- package/dist/lau-ecom-design-system.ssr.js +1491 -211
- package/dist/style.css +194 -19
- package/package.json +80 -80
- package/src/components/LauEcomBannerCookies/LauEcomBannerCookies.vue +8 -39
- package/src/components/LauEcomBannerCookies/LauEcomBannerCookiesConfig.vue +8 -46
- package/src/components/LauEcomBannerCookies/LauEcomBannerCookiesConfigAccordion.vue +2 -13
- package/src/components/LauEcomButton/LauEcomButton.vue +137 -150
- package/src/components/LauEcomCheckbox/LauEcomCheckbox.vue +143 -148
- package/src/components/LauEcomDisclamer/LauEcomDisclamer.vue +79 -82
- package/src/components/LauEcomDropdown/LauEcomDropdown.vue +203 -203
- package/src/components/LauEcomIcon/LauEcomCoreIconBook.vue +26 -29
- package/src/components/LauEcomIcon/LauEcomCoreIconFileCode.vue +28 -31
- package/src/components/LauEcomIcon/LauEcomUpcIconCertificate.vue +28 -31
- package/src/components/LauEcomIcon/LauEcomUpcIconCheck.vue +26 -29
- package/src/components/LauEcomIcon/LauEcomUpcIconCheckCircle.vue +28 -31
- package/src/components/LauEcomIcon/LauEcomUpcIconCreditCard.vue +28 -31
- package/src/components/LauEcomIcon/LauEcomUpcIconExclamationCircle.vue +28 -31
- package/src/components/LauEcomIcon/LauEcomUpcIconExclamationTriangle.vue +28 -31
- package/src/components/LauEcomIcon/LauEcomUpcIconInfoCircle.vue +26 -29
- package/src/components/LauEcomIcon/LauEcomUpcIconNavArrow.vue +26 -28
- package/src/components/LauEcomIcon/LauEcomUpcIconNavCheckmark.vue +26 -29
- package/src/components/LauEcomInput/LauEcomInput.vue +207 -208
- package/src/components/LauEcomLoaderPage/LauEcomLoaderPage.vue +2 -28
- package/src/components/LauEcomRadioButton/LauEcomRadioButton.vue +103 -115
- package/src/components/LauEcomRtb/LauEcomRtb.vue +71 -92
- package/src/components/LauEcomStepbar/LauEcomStepbar.vue +43 -49
- package/src/components/LauEcomStepbar/LauEcomStepbarItem.vue +128 -172
- package/src/components/LauEcomSwitch/LauEcomSwitch.vue +9 -20
- package/src/components/LauEcomTab/LauEcomTab.vue +82 -113
- 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
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
const
|
47
|
-
|
48
|
-
|
49
|
-
const
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
"lau-ecom-label":
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
"dsEcom-
|
75
|
-
props.
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
props.
|
84
|
-
|
85
|
-
{ "lau-ecom-input--
|
86
|
-
{ "lau-ecom-input
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
"
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
<
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
:
|
110
|
-
:
|
111
|
-
:
|
112
|
-
:
|
113
|
-
:
|
114
|
-
:
|
115
|
-
:
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
input[type="number"]::-webkit-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
dsEcom-
|
159
|
-
dsEcom-
|
160
|
-
dsEcom-
|
161
|
-
dsEcom-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
dsEcom-
|
172
|
-
dsEcom-
|
173
|
-
dsEcom-
|
174
|
-
dsEcom-border
|
175
|
-
dsEcom-border-
|
176
|
-
|
177
|
-
focus:dsEcom-
|
178
|
-
|
179
|
-
disabled
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
dsEcom-
|
199
|
-
dsEcom-
|
200
|
-
dsEcom-
|
201
|
-
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
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"
|