lau-ecom-design-system 1.0.2 → 1.0.3
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/dist/lau-ecom-design-system.esm.js +514 -340
- package/dist/lau-ecom-design-system.min.js +1 -1
- package/dist/lau-ecom-design-system.ssr.js +465 -298
- package/dist/style.css +36 -6
- package/package.json +1 -1
- package/src/components/LauEcomBannerCookies/LauEcomBannerCookies.vue +199 -105
- package/src/components/LauEcomBannerCookies/LauEcomBannerCookiesConfig.vue +197 -191
- package/src/components/LauEcomBannerCookies/LauEcomBannerCookiesConfigAccordion.vue +87 -80
- package/src/components/LauEcomLoaderPage/LauEcomLoaderPage.vue +42 -0
- package/src/components/LauEcomSwitch/LauEcomSwitch.vue +119 -113
- package/src/components/LauEcomTextButton/LauEcomTextButton.vue +133 -139
|
@@ -1,113 +1,119 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { computed } from "vue";
|
|
3
|
-
import { LauEcomInstance } from "../../enums";
|
|
4
|
-
|
|
5
|
-
interface Props {
|
|
6
|
-
instance?: LauEcomInstance;
|
|
7
|
-
currentClass?: string;
|
|
8
|
-
isDisabled?: boolean;
|
|
9
|
-
isChecked?: boolean;
|
|
10
|
-
id?: string;
|
|
11
|
-
name?: string;
|
|
12
|
-
label?: string;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
16
|
-
instance: LauEcomInstance.Upc,
|
|
17
|
-
currentClass: "",
|
|
18
|
-
isDisabled: false,
|
|
19
|
-
isChecked: false,
|
|
20
|
-
id: "",
|
|
21
|
-
name: "",
|
|
22
|
-
label: "",
|
|
23
|
-
errorMessage: "",
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
const model = defineModel<boolean>();
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"lau-ecom-switch
|
|
33
|
-
"lau-ecom-switch--
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
dsEcom-
|
|
69
|
-
dsEcom-
|
|
70
|
-
dsEcom-
|
|
71
|
-
dsEcom-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
checked:dsEcom-bg-upc-color-
|
|
81
|
-
checked:dsEcom-border-upc-color-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.lau-ecom-switch--
|
|
85
|
-
@apply dsEcom-border-
|
|
86
|
-
checked:dsEcom-bg-
|
|
87
|
-
checked:dsEcom-border-
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
.lau-ecom-switch--
|
|
91
|
-
@apply dsEcom-border-
|
|
92
|
-
dsEcom-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
dsEcom-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
dsEcom-
|
|
104
|
-
dsEcom-
|
|
105
|
-
dsEcom-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed, watch } from "vue";
|
|
3
|
+
import { LauEcomInstance } from "../../enums";
|
|
4
|
+
|
|
5
|
+
interface Props {
|
|
6
|
+
instance?: LauEcomInstance;
|
|
7
|
+
currentClass?: string;
|
|
8
|
+
isDisabled?: boolean;
|
|
9
|
+
isChecked?: boolean;
|
|
10
|
+
id?: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
label?: string;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
16
|
+
instance: LauEcomInstance.Upc,
|
|
17
|
+
currentClass: "",
|
|
18
|
+
isDisabled: false,
|
|
19
|
+
isChecked: false,
|
|
20
|
+
id: "",
|
|
21
|
+
name: "",
|
|
22
|
+
label: "",
|
|
23
|
+
errorMessage: "",
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const model = defineModel<boolean>();
|
|
27
|
+
|
|
28
|
+
const emit = defineEmits(["onToggle"]);
|
|
29
|
+
|
|
30
|
+
const lauEcomSwitchClasses = computed(() => {
|
|
31
|
+
return {
|
|
32
|
+
"dsEcom-peer lau-ecom-switch": true,
|
|
33
|
+
"lau-ecom-switch--upc": props.instance === LauEcomInstance.Upc,
|
|
34
|
+
"lau-ecom-switch--cbt": props.instance === LauEcomInstance.Cibertec,
|
|
35
|
+
"lau-ecom-switch--disabled": props.isDisabled,
|
|
36
|
+
};
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const lauEcomSwitchButtonClasses = computed(() => {
|
|
40
|
+
return {
|
|
41
|
+
"lau-ecom-switch-button": true,
|
|
42
|
+
"lau-ecom-switch-button--disabled": props.isDisabled,
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
watch(model, (newValue) => {
|
|
47
|
+
if (newValue) emit("onToggle");
|
|
48
|
+
});
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<template>
|
|
52
|
+
<div class="dsEcom-relative">
|
|
53
|
+
<input
|
|
54
|
+
:id="id"
|
|
55
|
+
v-model="model"
|
|
56
|
+
type="checkbox"
|
|
57
|
+
:name="name"
|
|
58
|
+
:disabled="isDisabled"
|
|
59
|
+
:class="lauEcomSwitchClasses"
|
|
60
|
+
/>
|
|
61
|
+
<div :class="lauEcomSwitchButtonClasses" />
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
64
|
+
|
|
65
|
+
<style scoped>
|
|
66
|
+
.lau-ecom-switch {
|
|
67
|
+
@apply dsEcom-relative
|
|
68
|
+
dsEcom-cursor-pointer
|
|
69
|
+
dsEcom-shrink-0
|
|
70
|
+
dsEcom-appearance-none
|
|
71
|
+
dsEcom-w-10
|
|
72
|
+
dsEcom-h-6
|
|
73
|
+
dsEcom-border
|
|
74
|
+
dsEcom-rounded-full
|
|
75
|
+
dsEcom-bg-white
|
|
76
|
+
dsEcom-transition-all
|
|
77
|
+
dsEcom-duration-[0.3s]
|
|
78
|
+
checked:dsEcom-p-1
|
|
79
|
+
checked:dsEcom-cursor-pointer
|
|
80
|
+
checked:disabled:!dsEcom-bg-upc-color-neutral-60
|
|
81
|
+
checked:disabled:!dsEcom-border-upc-color-neutral-60;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.lau-ecom-switch--upc {
|
|
85
|
+
@apply dsEcom-border-upc-color-neutral-90
|
|
86
|
+
checked:dsEcom-bg-upc-color-red-60-base
|
|
87
|
+
checked:dsEcom-border-upc-color-red-60-base;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.lau-ecom-switch--cbt {
|
|
91
|
+
@apply dsEcom-border-color-cbt-color-neutral-90
|
|
92
|
+
checked:dsEcom-bg-cbt-color-apple-green-60-base
|
|
93
|
+
checked:dsEcom-border-cbt-color-apple-green-60-base;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
.lau-ecom-switch--disabled {
|
|
97
|
+
@apply dsEcom-border-upc-color-neutral-60
|
|
98
|
+
dsEcom-pointer-events-none;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.lau-ecom-switch-button {
|
|
102
|
+
@apply dsEcom-absolute
|
|
103
|
+
dsEcom-top-1
|
|
104
|
+
dsEcom-w-4
|
|
105
|
+
dsEcom-h-4
|
|
106
|
+
dsEcom-ml-1
|
|
107
|
+
dsEcom-bg-upc-color-neutral-90
|
|
108
|
+
dsEcom-rounded-full
|
|
109
|
+
dsEcom-pointer-events-none
|
|
110
|
+
dsEcom-transition-all
|
|
111
|
+
dsEcom-duration-[0.3s]
|
|
112
|
+
peer-checked:dsEcom-ml-5
|
|
113
|
+
peer-checked:dsEcom-bg-white;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
.lau-ecom-switch-button--disabled {
|
|
117
|
+
@apply dsEcom-bg-upc-color-neutral-60;
|
|
118
|
+
}
|
|
119
|
+
</style>
|
|
@@ -1,139 +1,133 @@
|
|
|
1
|
-
<script lang="ts" setup>
|
|
2
|
-
import { computed, ref } from "vue";
|
|
3
|
-
import { LauEcomInstance } from "../../enums";
|
|
4
|
-
import { Colors } from "../../utils";
|
|
5
|
-
import { LauEcomUpcIconNavArrow } from "../LauEcomIcon";
|
|
6
|
-
|
|
7
|
-
interface Props {
|
|
8
|
-
instance?: LauEcomInstance;
|
|
9
|
-
size?: string;
|
|
10
|
-
isDisabled?: boolean;
|
|
11
|
-
type?: string;
|
|
12
|
-
hasArrow?: boolean;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const props = withDefaults(defineProps<Props>(), {
|
|
16
|
-
instance: LauEcomInstance.Upc,
|
|
17
|
-
size: "medium",
|
|
18
|
-
isDisabled: false,
|
|
19
|
-
type: "button",
|
|
20
|
-
hasArrow: false,
|
|
21
|
-
});
|
|
22
|
-
|
|
23
|
-
const emit = defineEmits(["onClick"]);
|
|
24
|
-
|
|
25
|
-
const handleClick = () => {
|
|
26
|
-
emit("onClick");
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
const isMouseOver = ref(false);
|
|
30
|
-
const isActive = ref(false);
|
|
31
|
-
|
|
32
|
-
const handleMouseOver = () => {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
isActive.value =
|
|
46
|
-
};
|
|
47
|
-
|
|
48
|
-
const
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return Colors["cbt-color-
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
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
|
-
.lau-ecom-text-button {
|
|
120
|
-
@apply dsEcom-
|
|
121
|
-
dsEcom-
|
|
122
|
-
dsEcom-
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
.lau-ecom-text-button--
|
|
126
|
-
@apply dsEcom-text-
|
|
127
|
-
hover:dsEcom-text-
|
|
128
|
-
active:dsEcom-text-
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
active:dsEcom-text-cbt-color-apple-green-80;
|
|
135
|
-
}
|
|
136
|
-
.lau-ecom-text-button--disabled {
|
|
137
|
-
@apply dsEcom-text-upc-color-neutral-70;
|
|
138
|
-
}
|
|
139
|
-
</style>
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed, ref } from "vue";
|
|
3
|
+
import { LauEcomInstance } from "../../enums";
|
|
4
|
+
import { Colors } from "../../utils";
|
|
5
|
+
import { LauEcomUpcIconNavArrow } from "../LauEcomIcon";
|
|
6
|
+
|
|
7
|
+
interface Props {
|
|
8
|
+
instance?: LauEcomInstance;
|
|
9
|
+
size?: string;
|
|
10
|
+
isDisabled?: boolean;
|
|
11
|
+
type?: string;
|
|
12
|
+
hasArrow?: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
16
|
+
instance: LauEcomInstance.Upc,
|
|
17
|
+
size: "medium",
|
|
18
|
+
isDisabled: false,
|
|
19
|
+
type: "button",
|
|
20
|
+
hasArrow: false,
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const emit = defineEmits(["onClick"]);
|
|
24
|
+
|
|
25
|
+
const handleClick = () => {
|
|
26
|
+
emit("onClick");
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
const isMouseOver = ref(false);
|
|
30
|
+
const isActive = ref(false);
|
|
31
|
+
|
|
32
|
+
const handleMouseOver = () => {
|
|
33
|
+
isMouseOver.value = true;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
const handleMouseOut = () => {
|
|
37
|
+
isMouseOver.value = false;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const handleMouseDown = () => {
|
|
41
|
+
isActive.value = true;
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
const handleMouseUp = () => {
|
|
45
|
+
isActive.value = false;
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
const lauEcomButtonTextClasses = computed(() => {
|
|
49
|
+
return {
|
|
50
|
+
"lau-ecom-text-button": true,
|
|
51
|
+
"lau-ecom-text-button--upc upc-font-button-16px":
|
|
52
|
+
props.instance === LauEcomInstance.Upc,
|
|
53
|
+
"lau-ecom-text-button--cbt cbt-font-button-16px":
|
|
54
|
+
props.instance === LauEcomInstance.Cibertec,
|
|
55
|
+
"lau-ecom-text-button--disabled": props.isDisabled,
|
|
56
|
+
};
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
const getIconColor = computed(() => {
|
|
60
|
+
if (props.instance === LauEcomInstance.Upc) {
|
|
61
|
+
if (props.isDisabled) {
|
|
62
|
+
return Colors["upc-color-neutral-70"];
|
|
63
|
+
}
|
|
64
|
+
if (isMouseOver.value) {
|
|
65
|
+
if (isActive.value) {
|
|
66
|
+
return Colors["upc-color-red-80"];
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return Colors["upc-color-red-70"];
|
|
70
|
+
}
|
|
71
|
+
return Colors["upc-color-red-60-base"];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
if (props.instance === LauEcomInstance.Cibertec) {
|
|
75
|
+
if (props.isDisabled) {
|
|
76
|
+
return Colors["cbt-color-neutral-70"];
|
|
77
|
+
}
|
|
78
|
+
if (isMouseOver.value) {
|
|
79
|
+
if (isActive.value) {
|
|
80
|
+
return Colors["cbt-color-apple-green-80"];
|
|
81
|
+
}
|
|
82
|
+
return Colors["cbt-color-apple-green-70"];
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
return Colors["cbt-color-apple-green-60-base"];
|
|
86
|
+
}
|
|
87
|
+
return "";
|
|
88
|
+
});
|
|
89
|
+
</script>
|
|
90
|
+
|
|
91
|
+
<template>
|
|
92
|
+
<button
|
|
93
|
+
:class="lauEcomButtonTextClasses"
|
|
94
|
+
:disabled="isDisabled"
|
|
95
|
+
@mouseover="handleMouseOver"
|
|
96
|
+
@mouseout="handleMouseOut"
|
|
97
|
+
@mouseup="handleMouseUp"
|
|
98
|
+
@mousedown="handleMouseDown"
|
|
99
|
+
@click="handleClick"
|
|
100
|
+
>
|
|
101
|
+
<slot></slot>
|
|
102
|
+
<LauEcomUpcIconNavArrow
|
|
103
|
+
v-if="hasArrow"
|
|
104
|
+
class="dsEcom-rotate-90"
|
|
105
|
+
width="16"
|
|
106
|
+
height="16"
|
|
107
|
+
:color="getIconColor"
|
|
108
|
+
/>
|
|
109
|
+
</button>
|
|
110
|
+
</template>
|
|
111
|
+
|
|
112
|
+
<style scoped>
|
|
113
|
+
.lau-ecom-text-button {
|
|
114
|
+
@apply dsEcom-flex
|
|
115
|
+
dsEcom-items-center
|
|
116
|
+
dsEcom-gap-2;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.lau-ecom-text-button--upc {
|
|
120
|
+
@apply dsEcom-text-upc-color-red-60-base
|
|
121
|
+
hover:dsEcom-text-upc-color-red-70
|
|
122
|
+
active:dsEcom-text-upc-color-red-80;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.lau-ecom-text-button--cbt {
|
|
126
|
+
@apply dsEcom-text-cbt-color-apple-green-60-base
|
|
127
|
+
hover:dsEcom-text-cbt-color-apple-green-70
|
|
128
|
+
active:dsEcom-text-cbt-color-apple-green-80;
|
|
129
|
+
}
|
|
130
|
+
.lau-ecom-text-button--disabled {
|
|
131
|
+
@apply dsEcom-text-upc-color-neutral-70;
|
|
132
|
+
}
|
|
133
|
+
</style>
|