@katlux/toolkit 0.1.0-beta.22 → 0.1.0-beta.26

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@katlux/toolkit",
3
3
  "configKey": "katluxToolkit",
4
- "version": "0.1.0-beta.22",
4
+ "version": "0.1.0-beta.26",
5
5
  "builder": {
6
6
  "@nuxt/module-builder": "1.0.2",
7
7
  "unbuild": "3.6.1"
@@ -25,5 +25,5 @@ export declare const KIconDefaultProps: {
25
25
  export declare function useKIconLogic(props: KIconProps): {
26
26
  widthPx: import("vue").ComputedRef<string | undefined>;
27
27
  heightPx: import("vue").ComputedRef<string>;
28
- iconComponent: import("vue").ComputedRef<any>;
28
+ iconComponent: import("vue").ComputedRef<string | null>;
29
29
  };
@@ -18,12 +18,12 @@ export const KIconDefaultProps = {
18
18
  }
19
19
  };
20
20
  export function useKIconLogic(props) {
21
- const modules = import.meta.glob("../../presets/default/assets/svg/*.svg", { eager: true });
21
+ const modules = import.meta.glob("../../presets/default/assets/svg/*.svg", { eager: true, as: "raw" });
22
22
  const iconMap = {};
23
23
  for (const path in modules) {
24
24
  const match = path.match(/([^/]+)\.svg$/);
25
25
  if (match) {
26
- iconMap[match[1]] = modules[path].default;
26
+ iconMap[match[1]] = modules[path];
27
27
  }
28
28
  }
29
29
  const widthPx = computed(
@@ -208,4 +208,12 @@ li {
208
208
  }
209
209
  .content .important p {
210
210
  margin: 0;
211
+ }
212
+
213
+ body {
214
+ margin: 0;
215
+ padding: 0;
216
+ background-color: var(--layout-content-bg);
217
+ font-family: var(--font-family);
218
+ color: var(--font-color-primary);
211
219
  }
@@ -1,4 +1,12 @@
1
1
  @use "reset";
2
2
  @use "css-variables";
3
3
  @use "docs";
4
- @forward "mixins";
4
+ @forward "mixins";
5
+
6
+ body {
7
+ margin: 0;
8
+ padding: 0;
9
+ background-color: var(--layout-content-bg);
10
+ font-family: var(--font-family);
11
+ color: var(--font-color-primary);
12
+ }
@@ -1,7 +1,7 @@
1
1
  type __VLS_Props = {
2
2
  widthPx?: string;
3
3
  heightPx?: string;
4
- iconComponent: any;
4
+ iconComponent: string;
5
5
  rotate: number | string;
6
6
  };
7
7
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -1,19 +1,26 @@
1
1
  <template lang="pug">
2
- span.KIcon(:style="{ width: widthPx, height: heightPx }")
3
- component(
4
- v-if="iconComponent"
5
- :is="iconComponent"
6
- :style="{ transform: rotate ? `rotate(${rotate}deg)` : undefined }"
7
- )
2
+ span.KIcon(
3
+ v-if="iconComponent"
4
+ :style="iconStyle"
5
+ v-html="iconComponent"
6
+ )
8
7
  </template>
9
8
 
10
9
  <script lang="ts" setup>
10
+ import { computed } from 'vue'
11
+
11
12
  const props = defineProps<{
12
13
  widthPx?: string
13
14
  heightPx?: string
14
- iconComponent: any
15
+ iconComponent: string
15
16
  rotate: number | string
16
17
  }>()
18
+
19
+ const iconStyle = computed(() => ({
20
+ width: props.widthPx,
21
+ height: props.heightPx,
22
+ transform: props.rotate ? `rotate(${props.rotate}deg)` : undefined
23
+ }))
17
24
  </script>
18
25
 
19
26
  <style lang="scss" scoped>
@@ -23,7 +30,9 @@ const props = defineProps<{
23
30
  justify-content: center;
24
31
  line-height: 0;
25
32
  vertical-align: middle;
26
- svg {
33
+
34
+ :deep(svg) {
35
+ width: 100%;
27
36
  height: 100%;
28
37
  }
29
38
  }
@@ -1,7 +1,7 @@
1
1
  type __VLS_Props = {
2
2
  widthPx?: string;
3
3
  heightPx?: string;
4
- iconComponent: any;
4
+ iconComponent: string;
5
5
  rotate: number | string;
6
6
  };
7
7
  declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@katlux/toolkit",
3
- "version": "0.1.0-beta.22",
3
+ "version": "0.1.0-beta.26",
4
4
  "description": "Core UI toolkit and utilities for the Katlux ecosystem",
5
5
  "author": "Katlux",
6
6
  "license": "MIT",