@exakt/ui 0.0.63 → 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
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "exakt-ui",
3
3
  "configKey": "exakt",
4
- "version": "0.0.63"
4
+ "version": "0.0.65"
5
5
  }
@@ -123,7 +123,6 @@ const updatePosition = async () => {
123
123
  state.x = 0;
124
124
 
125
125
  //Too far right :(
126
- console.log(list.value);
127
126
  if (list.value) {
128
127
  if (window?.innerWidth > list.value?.getBoundingClientRect().right) {
129
128
  state.x = -1 * activatorRect.width;
@@ -188,6 +187,12 @@ const onActivatorClick = () => {
188
187
  };
189
188
  </script>
190
189
  <style scoped lang="scss">
190
+ a {
191
+ text-decoration: none !important;
192
+ color: inherit !important;
193
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
194
+ }
195
+
191
196
  .t-dropdown {
192
197
  position: relative;
193
198
  }
@@ -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>
@@ -33,7 +33,15 @@ export default defineNuxtPlugin(() => {
33
33
  }
34
34
  return p;
35
35
  },
36
- rootColors: ["primary", "red", "text", "yellow", "elev", "i"],
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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exakt/ui",
3
- "version": "0.0.63",
3
+ "version": "0.0.65",
4
4
  "description": "A UI library for Nuxt.js",
5
5
  "license": "MIT",
6
6
  "type": "module",