lau-ecom-design-system 1.0.19 β†’ 1.0.21

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.
Files changed (50) hide show
  1. package/README.md +49 -0
  2. package/dist/316236bc7a52233c.png +0 -0
  3. package/dist/lau-ecom-design-system.esm.css +8 -1
  4. package/dist/lau-ecom-design-system.esm.js +1657 -682
  5. package/dist/lau-ecom-design-system.min.css +8 -1
  6. package/dist/lau-ecom-design-system.min.js +1 -1
  7. package/dist/lau-ecom-design-system.ssr.css +8 -1
  8. package/dist/lau-ecom-design-system.ssr.js +1406 -470
  9. package/dist/style.css +290 -69
  10. package/package.json +81 -80
  11. package/src/components/LauEcomBannerCookies/LauEcomBannerCookies.vue +178 -168
  12. package/src/components/LauEcomBannerCookies/LauEcomBannerCookiesConfig.vue +160 -159
  13. package/src/components/LauEcomBannerCookies/LauEcomBannerCookiesConfigAccordion.vue +80 -76
  14. package/src/components/LauEcomButton/LauEcomButton.vue +137 -137
  15. package/src/components/LauEcomCheckbox/LauEcomCheckbox.vue +143 -143
  16. package/src/components/LauEcomDisclamer/LauEcomDisclamer.vue +79 -79
  17. package/src/components/LauEcomDropdown/LauEcomDropdown.vue +208 -203
  18. package/src/components/LauEcomFooter/LauEcomFooter.vue +24 -73
  19. package/src/components/LauEcomFooter/LauEcomSubFooter.vue +5 -31
  20. package/src/components/LauEcomFooter/LauEcomSubFooterCategory.vue +9 -48
  21. package/src/components/LauEcomIcon/LauEcomCoreIconBook.vue +26 -26
  22. package/src/components/LauEcomIcon/LauEcomCoreIconFileCode.vue +28 -28
  23. package/src/components/LauEcomIcon/LauEcomUpcIconArrowDown.vue +0 -7
  24. package/src/components/LauEcomIcon/LauEcomUpcIconCertificate.vue +28 -28
  25. package/src/components/LauEcomIcon/LauEcomUpcIconCheck.vue +26 -26
  26. package/src/components/LauEcomIcon/LauEcomUpcIconCheckCircle.vue +28 -28
  27. package/src/components/LauEcomIcon/LauEcomUpcIconCreditCard.vue +28 -28
  28. package/src/components/LauEcomIcon/LauEcomUpcIconExclamationCircle.vue +28 -28
  29. package/src/components/LauEcomIcon/LauEcomUpcIconExclamationTriangle.vue +28 -28
  30. package/src/components/LauEcomIcon/LauEcomUpcIconInfoCircle.vue +26 -26
  31. package/src/components/LauEcomIcon/LauEcomUpcIconNavArrow.vue +26 -26
  32. package/src/components/LauEcomIcon/LauEcomUpcIconNavBack.vue +25 -0
  33. package/src/components/LauEcomIcon/LauEcomUpcIconNavCheckmark.vue +26 -26
  34. package/src/components/LauEcomInput/LauEcomInput.vue +207 -207
  35. package/src/components/LauEcomInput2/LauEcomInput2.vue +207 -0
  36. package/src/components/LauEcomInputSearch/LauEcomInputSearch.vue +244 -0
  37. package/src/components/LauEcomLoaderPage/LauEcomLoaderPage.vue +16 -16
  38. package/src/components/LauEcomPaginator/LauEcomPaginator.vue +57 -0
  39. package/src/components/LauEcomPaginator/LauEcomPaginatorButton.vue +68 -0
  40. package/src/components/LauEcomRadioButton/LauEcomRadioButton.vue +103 -103
  41. package/src/components/LauEcomRtb/LauEcomRtb.vue +71 -71
  42. package/src/components/LauEcomStepbar/LauEcomStepbar.vue +43 -43
  43. package/src/components/LauEcomStepbar/LauEcomStepbarItem.vue +128 -128
  44. package/src/components/LauEcomSwitch/LauEcomSwitch.vue +110 -108
  45. package/src/components/LauEcomTab/LauEcomTab.vue +82 -82
  46. package/src/components/LauEcomTag/LauEcomTag.vue +56 -0
  47. package/src/components/LauEcomTextButton/LauEcomTextButton.vue +71 -71
  48. package/src/components/LauEcomTyPage/LauEcomSummary.vue +14 -0
  49. package/src/components/LauEcomTyPage/LauEcomSummaryItem.vue +22 -0
  50. package/src/components/LauEcomTyPage/LauEcomTyPage.vue +149 -0
@@ -0,0 +1,244 @@
1
+ <script lang="ts" setup>
2
+ import { ref, computed, onMounted, onBeforeUnmount, watch, nextTick } from "vue";
3
+ import {
4
+ LauEcomUpcIconCheck as LauEcomUpcIconSearch,
5
+ LauEcomCoreIconNavClose as LauEcomUpcIconClose,
6
+ } from "../LauEcomIcon";
7
+
8
+ // Log de versiΓ³n del componente
9
+ console.log('πŸ” InputSearch Version: 1.0.20 - Debug Mode');
10
+
11
+ interface Props {
12
+ placeholder?: string;
13
+ isDisabled?: boolean;
14
+ modelValue?: string;
15
+ forceClose?: boolean;
16
+ }
17
+
18
+ const props = withDefaults(defineProps<Props>(), {
19
+ placeholder: "Quiero aprender...",
20
+ isDisabled: false,
21
+ modelValue: "",
22
+ forceClose: false,
23
+ });
24
+
25
+ // Log de props iniciales
26
+ console.log('πŸ” InputSearch Props:', {
27
+ placeholder: props.placeholder,
28
+ isDisabled: props.isDisabled,
29
+ modelValue: props.modelValue,
30
+ forceClose: props.forceClose
31
+ });
32
+
33
+ const emit = defineEmits({
34
+ "update:modelValue": (value: string) => true,
35
+ "search": (value: string) => true,
36
+ });
37
+
38
+ const searchQuery = ref(props.modelValue);
39
+ const isExpanded = ref(false);
40
+ const showOverlay = ref(false);
41
+
42
+ const handleSearch = () => {
43
+ console.log('πŸ” Search triggered:', {
44
+ query: searchQuery.value,
45
+ isExpanded: isExpanded.value,
46
+ showOverlay: showOverlay.value
47
+ });
48
+
49
+ if (searchQuery.value && searchQuery.value.trim()) {
50
+ emit("search", searchQuery.value);
51
+ emit("update:modelValue", searchQuery.value);
52
+ closeSearch();
53
+ }
54
+ };
55
+
56
+ const handleInput = () => {
57
+ console.log('πŸ” Input changed:', {
58
+ value: searchQuery.value,
59
+ length: searchQuery.value.length,
60
+ isExpanded: isExpanded.value
61
+ });
62
+ emit("update:modelValue", searchQuery.value);
63
+ };
64
+
65
+ const clearSearch = () => {
66
+ console.log('πŸ” Clear search triggered');
67
+ searchQuery.value = "";
68
+ emit("update:modelValue", "");
69
+ };
70
+
71
+ const closeSearch = () => {
72
+ console.log('πŸ” Close search triggered');
73
+ showOverlay.value = false;
74
+ setTimeout(() => {
75
+ console.log('πŸ” Closing search after timeout');
76
+ isExpanded.value = false;
77
+ }, 300);
78
+ };
79
+
80
+ const handleFocus = () => {
81
+ console.log('πŸ” Focus triggered:', {
82
+ currentValue: searchQuery.value,
83
+ wasExpanded: isExpanded.value
84
+ });
85
+ isExpanded.value = true;
86
+ showOverlay.value = true;
87
+ };
88
+
89
+ const containerClasses = computed(() => {
90
+ const classes = [
91
+ "dsEcom-transition-transform dsEcom-duration-300 dsEcom-ease-in-out",
92
+ {
93
+ "dsEcom-relative dsEcom-w-[250px] md:dsEcom-w-[350px]": !isExpanded.value
94
+ }
95
+ ];
96
+ console.log('πŸ” Container classes updated:', { isExpanded: isExpanded.value });
97
+ return classes;
98
+ });
99
+
100
+ const overlayClasses = computed(() => [
101
+ "dsEcom-fixed dsEcom-inset-0 dsEcom-bg-black dsEcom-transition-opacity dsEcom-duration-300 dsEcom-ease-in-out dsEcom-z-40",
102
+ {
103
+ "dsEcom-opacity-50": showOverlay.value,
104
+ "dsEcom-opacity-0 dsEcom-pointer-events-none": !showOverlay.value
105
+ }
106
+ ]);
107
+
108
+ const originalContainer = ref<HTMLElement | null>(null);
109
+ const expandedContainer = ref<HTMLElement | null>(null);
110
+
111
+ const updateExpandedPosition = () => {
112
+ if (originalContainer.value && expandedContainer.value) {
113
+ const rect = originalContainer.value.getBoundingClientRect();
114
+ const scrollTop = window.pageYOffset || document.documentElement.scrollTop;
115
+ expandedContainer.value.style.top = `${rect.top + scrollTop}px`;
116
+ console.log('πŸ” Updated expanded position:', { top: rect.top + scrollTop });
117
+ }
118
+ };
119
+
120
+ onMounted(() => {
121
+ console.log('πŸ” Component mounted');
122
+ window.addEventListener('resize', updateExpandedPosition);
123
+ });
124
+
125
+ onBeforeUnmount(() => {
126
+ console.log('πŸ” Component will unmount');
127
+ window.removeEventListener('resize', updateExpandedPosition);
128
+ });
129
+
130
+ watch(isExpanded, (newValue) => {
131
+ console.log('πŸ” isExpanded changed:', {
132
+ newValue,
133
+ searchQuery: searchQuery.value,
134
+ showOverlay: showOverlay.value
135
+ });
136
+ if (newValue) {
137
+ nextTick(updateExpandedPosition);
138
+ }
139
+ });
140
+
141
+ watch(() => props.forceClose, (newValue) => {
142
+ console.log('πŸ” forceClose prop changed:', newValue);
143
+ if (newValue) {
144
+ closeSearch();
145
+ }
146
+ });
147
+
148
+ watch(() => props.modelValue, (newValue) => {
149
+ console.log('πŸ” modelValue prop changed:', {
150
+ newValue,
151
+ currentSearchQuery: searchQuery.value
152
+ });
153
+ if (newValue !== searchQuery.value) {
154
+ searchQuery.value = newValue;
155
+ }
156
+ });
157
+ </script>
158
+
159
+ <template>
160
+ <div class="dsEcom-relative">
161
+ <div
162
+ :class="containerClasses"
163
+ ref="originalContainer"
164
+ >
165
+ <input
166
+ v-model="searchQuery"
167
+ type="text"
168
+ :placeholder="placeholder"
169
+ :disabled="isDisabled"
170
+ class="lau-ecom-input dsEcom-border dsEcom-border-neutral-80 dsEcom-rounded-lg dsEcom-px-4 dsEcom-h-10 dsEcom-w-full dsEcom-focus:outline-none dsEcom-focus:ring-2 dsEcom-focus:ring-primary-60"
171
+ @focus="handleFocus"
172
+ @input="handleInput"
173
+ @keyup.enter="handleSearch"
174
+ :class="{ 'dsEcom-invisible': isExpanded }"
175
+ />
176
+ <button
177
+ v-if="searchQuery.length >= 3 && !isExpanded"
178
+ @click="handleSearch"
179
+ class="dsEcom-absolute dsEcom-right-2 dsEcom-top-1/2 -dsEcom-translate-y-1/2 dsEcom-bg-primary-60 hover:dsEcom-bg-primary-70 dsEcom-text-white dsEcom-p-2 dsEcom-rounded-lg dsEcom-transition-all dsEcom-duration-300"
180
+ >
181
+ <LauEcomUpcIconSearch width="20" height="20" />
182
+ </button>
183
+ </div>
184
+
185
+ <!-- Overlay -->
186
+ <div
187
+ :class="overlayClasses"
188
+ @click="closeSearch"
189
+ ></div>
190
+
191
+ <!-- VersiΓ³n expandida -->
192
+ <div
193
+ v-show="isExpanded"
194
+ class="dsEcom-fixed dsEcom-w-[656px] dsEcom-left-1/2 dsEcom-transform -dsEcom-translate-x-1/2 dsEcom-z-50"
195
+ :style="{ top: isExpanded ? `${originalContainer?.getBoundingClientRect().top}px` : '0' }"
196
+ ref="expandedContainer"
197
+ >
198
+ <div class="dsEcom-relative">
199
+ <input
200
+ v-model="searchQuery"
201
+ type="text"
202
+ :placeholder="placeholder"
203
+ :disabled="isDisabled"
204
+ class="lau-ecom-input dsEcom-border dsEcom-border-neutral-80 dsEcom-rounded-lg dsEcom-px-4 dsEcom-h-10 dsEcom-w-full dsEcom-focus:outline-none dsEcom-focus:ring-2 dsEcom-focus:ring-primary-60 dsEcom-bg-white"
205
+ @input="handleInput"
206
+ @keyup.enter="handleSearch"
207
+ autofocus
208
+ />
209
+
210
+ <div class="dsEcom-absolute dsEcom-right-2 dsEcom-top-1/2 -dsEcom-translate-y-1/2 dsEcom-flex dsEcom-gap-2">
211
+ <button
212
+ v-if="searchQuery.length >= 3"
213
+ @click="clearSearch"
214
+ class="dsEcom-text-neutral-100 hover:dsEcom-text-neutral-80 dsEcom-transition-all dsEcom-duration-300"
215
+ >
216
+ <LauEcomUpcIconClose width="16" height="16" />
217
+ </button>
218
+
219
+ <button
220
+ v-if="searchQuery.length >= 3"
221
+ @click="handleSearch"
222
+ class="dsEcom-bg-primary-60 hover:dsEcom-bg-primary-70 dsEcom-text-white dsEcom-p-2 dsEcom-rounded-lg dsEcom-transition-all dsEcom-duration-300"
223
+ >
224
+ <LauEcomUpcIconSearch width="20" height="20" />
225
+ </button>
226
+ </div>
227
+ </div>
228
+ </div>
229
+ </div>
230
+ </template>
231
+
232
+ <style scoped>
233
+ .lau-ecom-input {
234
+ transition: all 0.3s ease-in-out;
235
+ }
236
+
237
+ .dsEcom-transform-gpu {
238
+ transform: translateZ(0);
239
+ backface-visibility: hidden;
240
+ perspective: 1000px;
241
+ }
242
+ </style>
243
+
244
+
@@ -1,16 +1,16 @@
1
- <script setup lang="ts"></script>
2
-
3
- <template>
4
- <div
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"
6
- >
7
- <div
8
- class="dsEcom-flex dsEcom-flex-col dsEcom-gap-4 dsEcom-text-white dsEcom-items-center"
9
- >
10
- <p class="upc-epg-font-heading-04-32px">Procesando los datos...</p>
11
- <p class="core-font-body-reg-02-20px">Espere un momento por favor</p>
12
- </div>
13
- </div>
14
- </template>
15
-
16
- <style scoped></style>
1
+ <script setup lang="ts"></script>
2
+
3
+ <template>
4
+ <div
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"
6
+ >
7
+ <div
8
+ class="dsEcom-flex dsEcom-flex-col dsEcom-gap-4 dsEcom-text-white dsEcom-items-center"
9
+ >
10
+ <p class="upc-epg-font-heading-04-32px">Procesando los datos...</p>
11
+ <p class="core-font-body-reg-02-20px">Espere un momento por favor</p>
12
+ </div>
13
+ </div>
14
+ </template>
15
+
16
+ <style scoped></style>
@@ -0,0 +1,57 @@
1
+ <script setup lang="ts">
2
+ import { computed } from "vue";
3
+ import LauEcomPaginatorButton from "./LauEcomPaginatorButton.vue";
4
+
5
+ interface Props {
6
+ currentPage?: number;
7
+ totalPages?: number;
8
+ }
9
+
10
+ const props = withDefaults(defineProps<Props>(), {
11
+ currentPage: 6,
12
+ totalPages: 6,
13
+ });
14
+
15
+ const emit = defineEmits(["onPrevPage", "onNextPage"]);
16
+
17
+ const handlePrevPage = () => {
18
+ emit("onPrevPage");
19
+ };
20
+
21
+ const handleNextPage = () => {
22
+ emit("onNextPage");
23
+ };
24
+
25
+ const isPrevPageDisabled = computed(() => {
26
+ return props.currentPage === 1;
27
+ });
28
+
29
+ const isNextPageDisabled = computed(() => {
30
+ return props.currentPage === props.totalPages;
31
+ });
32
+ </script>
33
+
34
+ <template>
35
+ <div class="dsEcom-flex dsEcom-gap-6 dsEcom-items-center">
36
+ <LauEcomPaginatorButton
37
+ :is-disabled="isPrevPageDisabled"
38
+ @on-click="handlePrevPage"
39
+ />
40
+ <p class="pagination button-bold-05-20px">
41
+ {{ currentPage }}/{{ totalPages }}
42
+ </p>
43
+ <LauEcomPaginatorButton
44
+ class="dsEcom-rotate-180"
45
+ :is-disabled="isNextPageDisabled"
46
+ @on-click="handleNextPage"
47
+ />
48
+ </div>
49
+ </template>
50
+
51
+ <style scoped>
52
+ .pagination {
53
+ @apply dsEcom-text-primary-60
54
+ dsEcom-cursor-default
55
+ hover:dsEcom-text-primary-70;
56
+ }
57
+ </style>
@@ -0,0 +1,68 @@
1
+ <script lang="ts" setup>
2
+ import { computed } from "vue";
3
+ import { LauEcomUpcIconNavBack } from "../LauEcomIcon";
4
+
5
+ interface Props {
6
+ isDisabled?: boolean;
7
+ }
8
+
9
+ const props = withDefaults(defineProps<Props>(), {
10
+ isDisabled: false,
11
+ });
12
+
13
+ const emit = defineEmits(["onClick"]);
14
+
15
+ const buttonClasses = computed(() => {
16
+ return {
17
+ "paginator-button": true,
18
+ "paginator-button--disabled": props.isDisabled,
19
+ };
20
+ });
21
+
22
+ const iconClasses = computed(() => {
23
+ return {
24
+ "paginator-button__icon": true,
25
+ "paginator-button__icon--disabled": props.isDisabled,
26
+ };
27
+ });
28
+
29
+ const handleClick = () => {
30
+ emit("onClick");
31
+ };
32
+ </script>
33
+
34
+ <template>
35
+ <button :class="buttonClasses" :disabled="isDisabled" @click="handleClick">
36
+ <LauEcomUpcIconNavBack :class="iconClasses" />
37
+ </button>
38
+ </template>
39
+
40
+ <style scoped>
41
+ .paginator-button {
42
+ @apply dsEcom-border-[1px]
43
+ dsEcom-w-fit
44
+ dsEcom-p-[10px]
45
+ dsEcom-rounded-full
46
+ dsEcom-border-secondary-60
47
+ hover:dsEcom-border-secondary-70
48
+ active:dsEcom-border-secondary-80;
49
+ }
50
+
51
+ .paginator-button--disabled {
52
+ @apply dsEcom-border-neutral-70
53
+ hover:dsEcom-border-neutral-70
54
+ active:dsEcom-border-neutral-70;
55
+ }
56
+
57
+ .paginator-button__icon {
58
+ @apply dsEcom-fill-secondary-60
59
+ hover:dsEcom-fill-secondary-70
60
+ active:dsEcom-fill-secondary-80;
61
+ }
62
+
63
+ .paginator-button__icon--disabled {
64
+ @apply dsEcom-fill-neutral-70
65
+ hover:dsEcom-fill-neutral-70
66
+ active:dsEcom-fill-neutral-70;
67
+ }
68
+ </style>
@@ -1,103 +1,103 @@
1
- <script lang="ts" setup>
2
- import { computed, ref, watch } from "vue";
3
-
4
- interface Props {
5
- id?: string;
6
- label?: string;
7
- value?: string | number | boolean;
8
- modelValue?: string | number | boolean;
9
- isRequired?: boolean;
10
- isDisabled?: boolean;
11
- }
12
-
13
- const props = withDefaults(defineProps<Props>(), {
14
- id: "",
15
- label: "default",
16
- value: "",
17
- modelValue: "",
18
- isRequired: false,
19
- isDisabled: false,
20
- });
21
-
22
- const emit = defineEmits<{
23
- "update:modelValue": [value: string];
24
- }>();
25
-
26
- const lauEcomRadioButtonClasses = computed(() => {
27
- return {
28
- "lau-ecom-radio-button lau-ecom-radio-button--upc": true,
29
- "lau-ecom-radio-button--disabled": props.isDisabled,
30
- "lau-ecom-radio-button--required": props.isRequired,
31
- };
32
- });
33
-
34
- const radioGroupValue = ref(props.modelValue);
35
-
36
- const handleChange = () => {
37
- emit("update:modelValue", String(props.value));
38
- };
39
-
40
- watch(
41
- () => props.modelValue,
42
- (newValue) => {
43
- radioGroupValue.value = newValue;
44
- },
45
- );
46
- </script>
47
-
48
- <template>
49
- <label>
50
- <input
51
- :id="id"
52
- v-model="radioGroupValue"
53
- :class="lauEcomRadioButtonClasses"
54
- type="radio"
55
- :disabled="isDisabled"
56
- :value="value"
57
- @change="handleChange"
58
- />
59
- <span :for="id">{{ label }}</span>
60
- </label>
61
- </template>
62
-
63
- <style scoped>
64
- .lau-ecom-radio-button {
65
- @apply dsEcom-relative
66
- dsEcom-float-left
67
- dsEcom-mr-2
68
- dsEcom-h-5
69
- dsEcom-w-5
70
- dsEcom-appearance-none
71
- dsEcom-rounded-full
72
- dsEcom-border-[1px]
73
- dsEcom-border-solid
74
- dsEcom-border-neutral-90
75
- checked:before:dsEcom-opacity-[0.16]
76
- checked:after:dsEcom-content-['']
77
- checked:after:dsEcom-absolute
78
- checked:after:dsEcom-left-1/2
79
- checked:after:dsEcom-top-1/2
80
- checked:after:dsEcom-h-3
81
- checked:after:dsEcom-w-3
82
- checked:after:dsEcom-rounded-full
83
- checked:after:[transform:translate(-50%,-50%)]
84
- checked:focus:before:dsEcom-scale-100;
85
- }
86
-
87
- .lau-ecom-radio-button--upc {
88
- @apply hover:dsEcom-border-primary-60
89
- checked:dsEcom-border-primary-60
90
- checked:after:dsEcom-bg-primary-60
91
- checked:focus:dsEcom-border-primary-60;
92
- }
93
-
94
- .lau-ecom-radio-button--disabled {
95
- @apply !dsEcom-border-neutral-50
96
- checked:after:dsEcom-bg-neutral-50
97
- disabled:dsEcom-cursor-not-allowed;
98
- }
99
-
100
- .lau-ecom-radio-button--required {
101
- @apply dsEcom-border-primary-60;
102
- }
103
- </style>
1
+ <script lang="ts" setup>
2
+ import { computed, ref, watch } from "vue";
3
+
4
+ interface Props {
5
+ id?: string;
6
+ label?: string;
7
+ value?: string | number | boolean;
8
+ modelValue?: string | number | boolean;
9
+ isRequired?: boolean;
10
+ isDisabled?: boolean;
11
+ }
12
+
13
+ const props = withDefaults(defineProps<Props>(), {
14
+ id: "",
15
+ label: "default",
16
+ value: "",
17
+ modelValue: "",
18
+ isRequired: false,
19
+ isDisabled: false,
20
+ });
21
+
22
+ const emit = defineEmits<{
23
+ "update:modelValue": [value: string];
24
+ }>();
25
+
26
+ const lauEcomRadioButtonClasses = computed(() => {
27
+ return {
28
+ "lau-ecom-radio-button lau-ecom-radio-button--upc": true,
29
+ "lau-ecom-radio-button--disabled": props.isDisabled,
30
+ "lau-ecom-radio-button--required": props.isRequired,
31
+ };
32
+ });
33
+
34
+ const radioGroupValue = ref(props.modelValue);
35
+
36
+ const handleChange = () => {
37
+ emit("update:modelValue", String(props.value));
38
+ };
39
+
40
+ watch(
41
+ () => props.modelValue,
42
+ (newValue) => {
43
+ radioGroupValue.value = newValue;
44
+ },
45
+ );
46
+ </script>
47
+
48
+ <template>
49
+ <label>
50
+ <input
51
+ :id="id"
52
+ v-model="radioGroupValue"
53
+ :class="lauEcomRadioButtonClasses"
54
+ type="radio"
55
+ :disabled="isDisabled"
56
+ :value="value"
57
+ @change="handleChange"
58
+ />
59
+ <span :for="id">{{ label }}</span>
60
+ </label>
61
+ </template>
62
+
63
+ <style scoped>
64
+ .lau-ecom-radio-button {
65
+ @apply dsEcom-relative
66
+ dsEcom-float-left
67
+ dsEcom-mr-2
68
+ dsEcom-h-5
69
+ dsEcom-w-5
70
+ dsEcom-appearance-none
71
+ dsEcom-rounded-full
72
+ dsEcom-border-[1px]
73
+ dsEcom-border-solid
74
+ dsEcom-border-neutral-90
75
+ checked:before:dsEcom-opacity-[0.16]
76
+ checked:after:dsEcom-content-['']
77
+ checked:after:dsEcom-absolute
78
+ checked:after:dsEcom-left-1/2
79
+ checked:after:dsEcom-top-1/2
80
+ checked:after:dsEcom-h-3
81
+ checked:after:dsEcom-w-3
82
+ checked:after:dsEcom-rounded-full
83
+ checked:after:[transform:translate(-50%,-50%)]
84
+ checked:focus:before:dsEcom-scale-100;
85
+ }
86
+
87
+ .lau-ecom-radio-button--upc {
88
+ @apply hover:dsEcom-border-primary-60
89
+ checked:dsEcom-border-primary-60
90
+ checked:after:dsEcom-bg-primary-60
91
+ checked:focus:dsEcom-border-primary-60;
92
+ }
93
+
94
+ .lau-ecom-radio-button--disabled {
95
+ @apply !dsEcom-border-neutral-50
96
+ checked:after:dsEcom-bg-neutral-50
97
+ disabled:dsEcom-cursor-not-allowed;
98
+ }
99
+
100
+ .lau-ecom-radio-button--required {
101
+ @apply dsEcom-border-primary-60;
102
+ }
103
+ </style>