independer-design-system 1.7.2 → 1.7.4
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
|
@@ -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>
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
<Icon
|
|
7
7
|
v-if="icon"
|
|
8
8
|
:name="icon"
|
|
9
|
-
class="shrink-0
|
|
9
|
+
class="shrink-0 text-current"
|
|
10
10
|
:class="sizeClasses.image"
|
|
11
11
|
/>
|
|
12
12
|
{{ label }}
|
|
@@ -69,10 +69,10 @@ const colors = {
|
|
|
69
69
|
"blue-subtle": "bg-blue-200 text-blue-900"
|
|
70
70
|
};
|
|
71
71
|
const sizes = {
|
|
72
|
-
xs: { root: "gap-1 px-2 py-1 text-xs leading-4", image: "size-4" },
|
|
73
|
-
sm: { root: "gap-1 px-2 py-1 text-sm leading-5", image: "size-5" },
|
|
74
|
-
md: { root: "gap-1
|
|
75
|
-
lg: { root: "gap-2 px-4 py-2 text-base leading-6", image: "size-6" }
|
|
72
|
+
xs: { root: "gap-1 px-2 py-1 text-xs leading-4", image: "size-4!" },
|
|
73
|
+
sm: { root: "gap-1 px-2 py-1 text-sm leading-5", image: "size-5!" },
|
|
74
|
+
md: { root: "gap-1 px-3 py-2 text-sm leading-5", image: "size-5!" },
|
|
75
|
+
lg: { root: "gap-2 px-4 py-2 text-base leading-6", image: "size-6!" }
|
|
76
76
|
};
|
|
77
77
|
const colorClasses = computed(() => colors[props.color] ?? colors["secondary-subtle"]);
|
|
78
78
|
const sizeClasses = computed(() => sizes[props.size] ?? sizes.xs);
|
package/package.json
CHANGED