@exakt/ui 0.0.36 → 0.0.38

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.36"
4
+ "version": "0.0.38"
5
5
  }
package/dist/module.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { defineNuxtModule, createResolver, addPlugin, extendViteConfig, addComponentsDir } from '@nuxt/kit';
1
+ import { defineNuxtModule, createResolver, addPlugin, extendViteConfig, addImportsSources, addComponentsDir } from '@nuxt/kit';
2
2
  import fs from 'fs';
3
3
 
4
4
  const defaults = {
@@ -69,6 +69,10 @@ const module = defineNuxtModule({
69
69
  }
70
70
  });
71
71
  });
72
+ addImportsSources({
73
+ from: "material-symbols",
74
+ imports: ["material-symbols"]
75
+ });
72
76
  nuxt.options.css.push(resolver.resolve("./runtime/css/main.scss"));
73
77
  nuxt.options.css.push(resolver.resolve("./runtime/css/util.scss"));
74
78
  nuxt.options.css.push(
@@ -1,12 +1,13 @@
1
1
  <template>
2
2
  <div class="flex-center color-red">
3
3
  <e-icon
4
- :icon="mdiAlert"
4
+
5
5
  size="19"
6
6
  class="mr-2"
7
- /><small><slot /></small>
7
+ >
8
+ warning
9
+ </e-icon><small><slot /></small>
8
10
  </div>
9
11
  </template>
10
12
  <script setup lang="ts">
11
- import { mdiAlert } from "@mdi/js";
12
13
  </script>
@@ -14,13 +14,13 @@
14
14
  <div v-else>
15
15
  <e-icon
16
16
  :size="props.size"
17
- :icon="mdiAccountCircle"
18
- />
17
+ >
18
+ person_circle
19
+ </e-icon>
19
20
  </div>
20
21
  </div>
21
22
  </template>
22
23
  <script setup lang="ts">
23
- import { mdiAccountCircle } from "@mdi/js";
24
24
 
25
25
  const props = withDefaults(defineProps<{
26
26
  src?: string;
@@ -41,7 +41,7 @@
41
41
  </button>
42
42
  </template>
43
43
  <script lang="ts" setup>
44
- import { computed, useNuxtApp } from "#imports";
44
+ import { computed, useNuxtApp, } from "#imports";
45
45
  //import { IonSpinner } from "@ionic/vue";
46
46
  const { $exakt } = useNuxtApp();
47
47
  const props = withDefaults(
@@ -19,11 +19,10 @@
19
19
  </div>
20
20
  </template>
21
21
  <script setup lang="ts">
22
- import { mdiDelete, mdiFlag, mdiMinusCircle } from "@mdi/js";
23
22
  import { reactive, computed } from "#imports";
24
23
 
25
24
  const status = reactive({ dropdown: { visible: false, x: 0, y: 0 } });
26
- const items = [{ icon: mdiDelete, name: "Delete" }, { icon: mdiMinusCircle, name: "Delete just for me" }, { icon: mdiFlag, name: "Dox" }];
25
+ const items = [{ icon: 'delete', name: "Delete" }, { icon: 'remove', name: "Delete just for me" }, { icon: 'flag', name: "Dox" }];
27
26
 
28
27
  const openDropdown = ({ clientX, clientY }: MouseEvent) => {
29
28
  status.dropdown.visible = true;
@@ -38,9 +38,10 @@
38
38
  <e-icon
39
39
  v-if="item.icon"
40
40
  :size="20"
41
- :icon="item.icon"
42
41
  class="mr-2"
43
- />
42
+ >
43
+ {{ item.icon }}
44
+ </e-icon>
44
45
  {{ item.name }}
45
46
  </e-btn>
46
47
  </component>
@@ -1,30 +1,61 @@
1
1
  <template>
2
- <svg
3
- :viewBox="'0 0 ' + 24 + ' ' + 24"
4
- :height="size"
5
- :width="size"
6
- :fill="color"
2
+ <div
3
+ class="material-symbol"
4
+ :icon-style="iconStyle"
7
5
  >
8
- <path :d="icon" />
9
- </svg>
6
+ <slot />
7
+ </div>
10
8
  </template>
11
9
  <script setup lang="ts">
12
- withDefaults(
10
+ import { computed } from "#imports";
11
+
12
+ const props = withDefaults(
13
13
  defineProps<{
14
- icon: string;
15
- color?: string;
16
- size?: number | string;
14
+ iconStyle?: 'outlined' | 'rounded' | 'sharp', size?: number|`${number}`, fill?:boolean|"0"|"1"|`${boolean}`, grade?:number|`${number}`, weight?: number|`${number}`
17
15
  }>(),
18
- {
19
- icon: "",
20
- color: "",
21
- size: "21",
22
- }
16
+ { iconStyle: 'rounded', size: 24, fill:false, weight: 400, grade:0}
23
17
  );
24
18
 
19
+ const sizePx = computed(() => props.size + "px")
20
+ const fillNum = computed(()=> {
21
+ if([true, "true", "1"].includes(props.fill)){
22
+ return 1;
23
+ }
24
+ return 0;
25
+ })
26
+
25
27
  </script>
26
- <style scoped lang="css">
27
- svg {
28
- fill: currentColor;
28
+ <style lang="scss">
29
+ .material-symbol {
30
+ font-weight: normal;
31
+ font-style: normal;
32
+ /* Preferred icon size */
33
+ display: inline-block;
34
+ line-height: 1;
35
+ text-transform: none;
36
+ letter-spacing: normal;
37
+ word-wrap: normal;
38
+ white-space: nowrap;
39
+ direction: ltr;
40
+ }
41
+
42
+ .material-symbol[icon-style="outlined"] {
43
+ font-family: 'Material Symbols Outlined';
44
+ }
45
+
46
+ .material-symbol[icon-style="rounded"] {
47
+ font-family: 'Material Symbols Rounded';
48
+ }
49
+
50
+ .material-symbol[icon-style="sharp"] {
51
+ font-family: 'Material Symbols Sharp';
29
52
  }
30
53
  </style>
54
+ <style scoped lang="scss">
55
+ .material-symbol {
56
+ font-size: v-bind('sizePx');
57
+ width: v-bind('sizePx');
58
+ height: v-bind('sizePx');
59
+ font-variation-settings: 'FILL' v-bind('fillNum'), 'wght' v-bind('props.weight'), 'GRAD' v-bind('props.grade'), 'opsz' v-bind('props.size');
60
+ }
61
+ </style>
@@ -8,9 +8,11 @@
8
8
  >
9
9
  <e-icon
10
10
  v-if="icon"
11
- :icon="icon"
11
+
12
12
  :size="size"
13
- />
13
+ >
14
+ {{ icon }}
15
+ </e-icon>
14
16
  <slot />
15
17
  </e-btn>
16
18
  </template>
@@ -8,10 +8,12 @@
8
8
  >
9
9
  <e-icon
10
10
  v-if="icon"
11
- :icon="icon"
12
11
  class="mr-2"
13
- size="21"
14
- />
12
+ size="24"
13
+ :fill="inputState.focused"
14
+ >
15
+ {{ icon }}
16
+ </e-icon>
15
17
  <textarea
16
18
  v-if="type === 'textarea'"
17
19
  ref="input"
@@ -19,10 +19,12 @@
19
19
  :class="{ 'mr-2': label, 'mx-4': !label }"
20
20
  >
21
21
  <e-icon
22
- :icon="icon"
22
+
23
23
  class="icon"
24
24
  :size="size"
25
- />
25
+ >
26
+ {{ icon }}
27
+ </e-icon>
26
28
  <transition name="fade">
27
29
  <div
28
30
  v-if="alert"
@@ -12,9 +12,11 @@
12
12
  class="e-sidebar-btn-icon"
13
13
  >
14
14
  <e-icon
15
- :icon="icon"
15
+
16
16
  size="22"
17
- />
17
+ >
18
+ {{ icon }}
19
+ </e-icon>
18
20
  </div>
19
21
  <div class="ml-4 d-flex flex-column e-sidebar-btn-text">
20
22
  <div class="mb-1">
@@ -8,14 +8,15 @@
8
8
  class="pa-0 ma-0 e-sidebar-icon"
9
9
  >
10
10
  <e-icon
11
- :icon="mdiHome"
11
+
12
12
  size="22"
13
- />
13
+ >
14
+ home
15
+ </e-icon>
14
16
  </e-btn>
15
17
  </nuxt-link>
16
18
  </template>
17
19
  <script lang="ts" setup>
18
- import { mdiHome } from '@mdi/js';
19
20
  </script>
20
21
  <style lang="scss">
21
22
 
@@ -15,10 +15,9 @@
15
15
  background="transparent"
16
16
  class="pa-0 ma-0 e-sidebar-btn"
17
17
  >
18
- <e-icon
19
- :icon="item.icon"
20
- size="22"
21
- />
18
+ <e-icon size="22">
19
+ {{ item.icon }}
20
+ </e-icon>
22
21
  </e-btn>
23
22
  </nuxt-link>
24
23
  </div>
@@ -41,10 +40,9 @@
41
40
  v-if="item.icon"
42
41
  class="icon"
43
42
  >
44
- <e-icon
45
- :icon="item.icon"
46
- size="22"
47
- />
43
+ <e-icon size="22">
44
+ {{ item.icon }}
45
+ </e-icon>
48
46
  </div>
49
47
  <div class="ml-4 d-flex flex-column text">
50
48
  <div :class="{ 'mb-1': item.subtitle }">
@@ -2,12 +2,11 @@
2
2
  <e-icon-button
3
3
  class="rounded pa-1"
4
4
  size="20"
5
- :icon="modelValue ? mdiEye : mdiEyeOff"
5
+ :icon="modelValue ? 'visibility' : 'visibility_off'"
6
6
  @click.stop="emit('update:modelValue', !modelValue)"
7
7
  />
8
8
  </template>
9
9
  <script setup lang="ts">
10
- import { mdiEye, mdiEyeOff } from "@mdi/js";
11
10
  const emit = defineEmits(["update:modelValue"]);
12
11
 
13
12
  withDefaults(
@@ -1,2 +1,3 @@
1
+ import 'material-symbols';
1
2
  declare const _default: any;
2
3
  export default _default;
@@ -1,4 +1,5 @@
1
1
  import { defineNuxtPlugin } from "#app";
2
+ import "material-symbols";
2
3
  export default defineNuxtPlugin(() => {
3
4
  return {
4
5
  provide: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exakt/ui",
3
- "version": "0.0.36",
3
+ "version": "0.0.38",
4
4
  "description": "A UI library for Nuxt.js",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -18,7 +18,7 @@
18
18
  ],
19
19
  "scripts": {
20
20
  "prepack": "nuxt-module-build",
21
- "dev": "nuxi dev playground",
21
+ "dev": "nuxi dev playground --host 0.0.0.0",
22
22
  "dev:build": "nuxi build playground",
23
23
  "dev:prepare": "nuxt-module-build --stub && nuxi prepare playground",
24
24
  "release": "npm run lint && npm run test && npm run prepack && changelogen --release && npm publish && git push --follow-tags",
@@ -27,10 +27,10 @@
27
27
  "test:watch": "vitest watch"
28
28
  },
29
29
  "dependencies": {
30
- "@mdi/js": "^7.1.96",
31
30
  "@nuxt/kit": "^3.2.3",
32
31
  "blurhash": "^2.0.5",
33
32
  "lodash-es": "^4.17.21",
33
+ "material-symbols": "latest",
34
34
  "sass": "^1.62.1"
35
35
  },
36
36
  "devDependencies": {
@@ -45,7 +45,7 @@
45
45
  "eslint": "^8.35.0",
46
46
  "eslint-plugin-unused-imports": "^3.0.0",
47
47
  "mkdist": "^1.2.0",
48
- "nuxt": "^3.7.1",
48
+ "nuxt": "^3.12.4",
49
49
  "vitest": "^0.29.2"
50
50
  },
51
51
  "directories": {
@@ -68,4 +68,4 @@
68
68
  },
69
69
  "homepage": "https://github.com/wd-4000/exakt#readme",
70
70
  "packageManager": "yarn@3.5.1"
71
- }
71
+ }