@exakt/ui 0.0.64 → 0.0.65
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
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<e-dropdown
|
|
3
|
+
:items="items"
|
|
4
|
+
:visible="focus"
|
|
5
|
+
:model-value="modelValue"
|
|
6
|
+
@update:model-value="modelValue = $event"
|
|
7
|
+
@update:visible="focus = $event"
|
|
8
|
+
>
|
|
9
|
+
<e-btn
|
|
10
|
+
background="i-depressed"
|
|
11
|
+
:class="{ focus }"
|
|
12
|
+
class="btn"
|
|
13
|
+
>
|
|
14
|
+
<div class="d-flex justify-space-between">
|
|
15
|
+
<div
|
|
16
|
+
v-if="modelValue != undefined && items[modelValue]"
|
|
17
|
+
class="flex-center"
|
|
18
|
+
>
|
|
19
|
+
<e-icon size="20">
|
|
20
|
+
{{ items[modelValue].icon }}
|
|
21
|
+
</e-icon>
|
|
22
|
+
<div class="ml-2 md-and-over">
|
|
23
|
+
{{ items[modelValue].name }}
|
|
24
|
+
</div>
|
|
25
|
+
</div>
|
|
26
|
+
<div v-else />
|
|
27
|
+
<e-icon
|
|
28
|
+
class="text-secondary ml-1"
|
|
29
|
+
size="20"
|
|
30
|
+
>
|
|
31
|
+
arrow_drop_down
|
|
32
|
+
</e-icon>
|
|
33
|
+
</div>
|
|
34
|
+
</e-btn>
|
|
35
|
+
</e-dropdown>
|
|
36
|
+
</template>
|
|
37
|
+
<script setup lang="ts">
|
|
38
|
+
import { ref } from "#imports";
|
|
39
|
+
const focus = ref(false);
|
|
40
|
+
const modelValue = ref(undefined);
|
|
41
|
+
|
|
42
|
+
interface DropdownItem {
|
|
43
|
+
name: string;
|
|
44
|
+
icon?: string;
|
|
45
|
+
href?: string;
|
|
46
|
+
to?: string;
|
|
47
|
+
callback?: () => void;
|
|
48
|
+
color?: string;
|
|
49
|
+
background?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const props = withDefaults(
|
|
53
|
+
defineProps<{
|
|
54
|
+
items: DropdownItem[] | [];
|
|
55
|
+
}>(),
|
|
56
|
+
{ items: () => [] },
|
|
57
|
+
);
|
|
58
|
+
</script>
|
|
59
|
+
<style lang="scss" scoped>
|
|
60
|
+
.btn {
|
|
61
|
+
outline: var(--e-color-i-outline) solid 0.1rem;
|
|
62
|
+
transition:
|
|
63
|
+
outline ease-in-out 0.15s,
|
|
64
|
+
background-color ease-in-out 0.15s;
|
|
65
|
+
margin: 0.125rem;
|
|
66
|
+
&.focus {
|
|
67
|
+
outline: var(--e-color-primary) solid 0.125rem;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
</style>
|
package/dist/runtime/plugin.mjs
CHANGED
|
@@ -33,7 +33,15 @@ export default defineNuxtPlugin(() => {
|
|
|
33
33
|
}
|
|
34
34
|
return p;
|
|
35
35
|
},
|
|
36
|
-
rootColors: [
|
|
36
|
+
rootColors: [
|
|
37
|
+
"primary",
|
|
38
|
+
"red",
|
|
39
|
+
"text",
|
|
40
|
+
"yellow",
|
|
41
|
+
"elev",
|
|
42
|
+
"i",
|
|
43
|
+
"i-depressed"
|
|
44
|
+
],
|
|
37
45
|
isRootColor: (c) => ["primary", "red", "text", "yellow", "elev", "i"].includes(c),
|
|
38
46
|
/**
|
|
39
47
|
* Generates an alphanumeric ID of a given length.
|