independer-design-system 1.7.3 → 1.7.5
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/module.json
CHANGED
|
@@ -89,10 +89,10 @@ const classes = computed(() => {
|
|
|
89
89
|
"filled-yellow": "bg-yellow border-yellow text-yellow-1000 hover:bg-yellow-dark hover:border-yellow-dark active:bg-yellow-300 active:border-yellow-300 disabled:bg-grey-200 disabled:text-grey-500 disabled:border-grey-200 disabled:cursor-not-allowed",
|
|
90
90
|
"filled-purple": "bg-purple border-purple text-white hover:bg-purple-dark hover:border-purple-dark active:bg-purple-800 active:border-purple-800 disabled:bg-grey-200 disabled:text-grey-500 disabled:border-grey-200 disabled:cursor-not-allowed",
|
|
91
91
|
"wire-purple": "border-purple text-purple hover:text-purple hover:bg-purple-200 active:bg-purple/40 disabled:bg-transparent disabled:border-grey disabled:text-grey disabled:cursor-not-allowed",
|
|
92
|
-
"naked-purple": "border-transparent text-purple hover:bg-purple-200 active:bg-purple/40",
|
|
92
|
+
"naked-purple": "border-transparent text-purple hover:bg-purple-200 active:bg-purple/40 disabled:text-grey disabled:cursor-not-allowed",
|
|
93
93
|
"wire-white": "bg-transparent border-white text-white hover:bg-black/10 active:bg-black/30 ring-white focus-visible:border-white disabled:bg-transparent disabled:border-grey disabled:text-grey disabled:cursor-not-allowed",
|
|
94
|
-
"naked-white": "bg-transparent border-white text-white hover:bg-black/10 active:bg-black/30 ring-white focus-visible:border-white",
|
|
95
|
-
"link": "justify-start bg-transparent border-transparent text-purple hover:text-purple-dark active:text-purple-900"
|
|
94
|
+
"naked-white": "bg-transparent border-white text-white hover:bg-black/10 active:bg-black/30 ring-white focus-visible:border-white disabled:text-grey disabled:cursor-not-allowed",
|
|
95
|
+
"link": "justify-start bg-transparent border-transparent text-purple hover:text-purple-dark active:text-purple-900 disabled:text-grey disabled:cursor-not-allowed"
|
|
96
96
|
}[props.tone];
|
|
97
97
|
});
|
|
98
98
|
const sizeClasses = computed(() => {
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
<div
|
|
3
3
|
v-if="show"
|
|
4
4
|
class="notification flex gap-2 p-3 border rounded-lg"
|
|
5
|
-
:class="
|
|
5
|
+
:class="colorClasses.background"
|
|
6
6
|
>
|
|
7
7
|
<Icon
|
|
8
8
|
v-if="icon"
|
|
9
9
|
:name="icon"
|
|
10
|
-
:class="
|
|
10
|
+
:class="colorClasses.icon"
|
|
11
11
|
/>
|
|
12
12
|
|
|
13
13
|
<div class="w-full">
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
<Icon
|
|
18
18
|
v-if="closeButton"
|
|
19
19
|
name="eva:close-outline"
|
|
20
|
-
class="
|
|
20
|
+
class="cursor-pointer"
|
|
21
|
+
:class="colorClasses.close"
|
|
21
22
|
@click.prevent="close"
|
|
22
23
|
/>
|
|
23
24
|
</div>
|
|
@@ -34,19 +35,33 @@ const props = defineProps({
|
|
|
34
35
|
}
|
|
35
36
|
});
|
|
36
37
|
const show = ref(true);
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
38
|
+
const colors = {
|
|
39
|
+
"brand-primary": "bg-brand-primary text-white border-transparent",
|
|
40
|
+
"brand-primary-subtle": "bg-brand-primary-subtlest text-brand-primary-strong border-brand-primary",
|
|
41
|
+
"spotlight-subtle": "bg-spotlight text-blue-800 border-border-spotlight",
|
|
42
|
+
"spotlight-strong": "bg-blue-700 text-white border-transparent",
|
|
43
|
+
"positive-subtle": "bg-green-100 text-green-800 border-green-600",
|
|
44
|
+
"positive-strong": "bg-green-700 text-white border-transparent",
|
|
45
|
+
"warning-subtle": "bg-warning text-orange-800 border-orange-400",
|
|
46
|
+
"warning-strong": "bg-orange-700 text-white border-transparent",
|
|
47
|
+
"negative-subtle": "bg-red-100 text-red-800 border-red-600",
|
|
48
|
+
"negative-strong": "bg-red-700 text-white border-transparent",
|
|
49
|
+
"neutral-subtle": "bg-neutral-subtlest text-text-default border-border-default-strong",
|
|
50
|
+
"neutral-strong": "bg-grey-700 text-white border-transparent"
|
|
51
|
+
};
|
|
52
|
+
const aliases = {
|
|
53
|
+
info: "spotlight-subtle",
|
|
54
|
+
warning: "warning-subtle",
|
|
55
|
+
error: "negative-subtle"
|
|
56
|
+
};
|
|
57
|
+
const colorClasses = computed(() => {
|
|
58
|
+
const tone = aliases[props.tone] ?? props.tone;
|
|
59
|
+
const strong = tone === "brand-primary" || tone?.endsWith("-strong");
|
|
45
60
|
return {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
}
|
|
61
|
+
background: colors[tone],
|
|
62
|
+
icon: tone === "brand-primary-subtle" ? "text-brand-primary" : "text-current",
|
|
63
|
+
close: strong ? "text-white" : "text-grey-700"
|
|
64
|
+
};
|
|
50
65
|
});
|
|
51
66
|
const close = () => {
|
|
52
67
|
show.value = false;
|
|
@@ -54,5 +69,5 @@ const close = () => {
|
|
|
54
69
|
</script>
|
|
55
70
|
|
|
56
71
|
<style>
|
|
57
|
-
@reference "../assets/style.css";.notification a{@apply font-semibold text-
|
|
72
|
+
@reference "../assets/style.css";.notification a{@apply font-semibold text-current}
|
|
58
73
|
</style>
|
package/package.json
CHANGED