heart-ui 0.0.11 → 0.0.12

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.
@@ -6,8 +6,8 @@ export type ButtonCssProp = {
6
6
  suffix?: CssEntry;
7
7
  };
8
8
  declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
9
- tag: string | Component;
10
- nativeType: string;
9
+ tag?: string | Component | undefined;
10
+ nativeType?: string | undefined;
11
11
  prefixIcon?: Component | undefined;
12
12
  suffixIcon?: Component | undefined;
13
13
  css?: ButtonCssProp | undefined;
@@ -15,8 +15,8 @@ declare const _default: __VLS_WithTemplateSlots<import("vue").DefineComponent<__
15
15
  tag: string;
16
16
  nativeType: string;
17
17
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
18
- tag: string | Component;
19
- nativeType: string;
18
+ tag?: string | Component | undefined;
19
+ nativeType?: string | undefined;
20
20
  prefixIcon?: Component | undefined;
21
21
  suffixIcon?: Component | undefined;
22
22
  css?: ButtonCssProp | undefined;
@@ -6,7 +6,7 @@ export declare const components: (({
6
6
  default: number;
7
7
  };
8
8
  css: {
9
- type: import("vue").PropType<import("./HIcon.vue").IconCssProp>;
9
+ type: import("vue").PropType<import("./components/HIcon.vue").IconCssProp>;
10
10
  };
11
11
  }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
12
12
  size: {
@@ -15,7 +15,7 @@ export declare const components: (({
15
15
  default: number;
16
16
  };
17
17
  css: {
18
- type: import("vue").PropType<import("./HIcon.vue").IconCssProp>;
18
+ type: import("vue").PropType<import("./components/HIcon.vue").IconCssProp>;
19
19
  };
20
20
  }>>, {
21
21
  size: number;
@@ -33,7 +33,7 @@ export declare const components: (({
33
33
  default: number;
34
34
  };
35
35
  css: {
36
- type: import("vue").PropType<import("./HIcon.vue").IconCssProp>;
36
+ type: import("vue").PropType<import("./components/HIcon.vue").IconCssProp>;
37
37
  };
38
38
  }>>, {}, {}, {}, {}, {
39
39
  size: number;
@@ -48,7 +48,7 @@ export declare const components: (({
48
48
  default: number;
49
49
  };
50
50
  css: {
51
- type: import("vue").PropType<import("./HIcon.vue").IconCssProp>;
51
+ type: import("vue").PropType<import("./components/HIcon.vue").IconCssProp>;
52
52
  };
53
53
  }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, {
54
54
  size: number;
@@ -59,16 +59,14 @@ export declare const components: (({
59
59
  })) | ({
60
60
  new (...args: any[]): import("vue").CreateComponentPublicInstance<Readonly<import("vue").ExtractPropTypes<{
61
61
  css: {
62
- type: import("vue").PropType<import("./HButton.vue").ButtonCssProp>;
62
+ type: import("vue").PropType<import("./components/HButton.vue").ButtonCssProp>;
63
63
  };
64
64
  tag: {
65
65
  type: import("vue").PropType<string | import("vue").Component>;
66
- required: true;
67
66
  default: string;
68
67
  };
69
68
  nativeType: {
70
69
  type: import("vue").PropType<string>;
71
- required: true;
72
70
  default: string;
73
71
  };
74
72
  prefixIcon: {
@@ -79,16 +77,14 @@ export declare const components: (({
79
77
  };
80
78
  }>>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<import("vue").ExtractPropTypes<{
81
79
  css: {
82
- type: import("vue").PropType<import("./HButton.vue").ButtonCssProp>;
80
+ type: import("vue").PropType<import("./components/HButton.vue").ButtonCssProp>;
83
81
  };
84
82
  tag: {
85
83
  type: import("vue").PropType<string | import("vue").Component>;
86
- required: true;
87
84
  default: string;
88
85
  };
89
86
  nativeType: {
90
87
  type: import("vue").PropType<string>;
91
- required: true;
92
88
  default: string;
93
89
  };
94
90
  prefixIcon: {
@@ -109,16 +105,14 @@ export declare const components: (({
109
105
  Defaults: {};
110
106
  }, Readonly<import("vue").ExtractPropTypes<{
111
107
  css: {
112
- type: import("vue").PropType<import("./HButton.vue").ButtonCssProp>;
108
+ type: import("vue").PropType<import("./components/HButton.vue").ButtonCssProp>;
113
109
  };
114
110
  tag: {
115
111
  type: import("vue").PropType<string | import("vue").Component>;
116
- required: true;
117
112
  default: string;
118
113
  };
119
114
  nativeType: {
120
115
  type: import("vue").PropType<string>;
121
- required: true;
122
116
  default: string;
123
117
  };
124
118
  prefixIcon: {
@@ -136,16 +130,14 @@ export declare const components: (({
136
130
  __isSuspense?: undefined;
137
131
  } & import("vue").ComponentOptionsBase<Readonly<import("vue").ExtractPropTypes<{
138
132
  css: {
139
- type: import("vue").PropType<import("./HButton.vue").ButtonCssProp>;
133
+ type: import("vue").PropType<import("./components/HButton.vue").ButtonCssProp>;
140
134
  };
141
135
  tag: {
142
136
  type: import("vue").PropType<string | import("vue").Component>;
143
- required: true;
144
137
  default: string;
145
138
  };
146
139
  nativeType: {
147
140
  type: import("vue").PropType<string>;
148
- required: true;
149
141
  default: string;
150
142
  };
151
143
  prefixIcon: {
@@ -0,0 +1,6 @@
1
+ import o from "./components/HButton.vue.js";
2
+ import m from "./components/HIcon.vue.js";
3
+ const t = [o, m];
4
+ export {
5
+ t as components
6
+ };
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { components as t } from "./components/index.js";
1
+ import { components as t } from "./components.js";
2
2
  import { setGlobalCss as e, globalCss as l } from "./common/global.js";
3
3
  import { heartGlobalKey as m } from "./common/symbols.js";
4
4
  import { useGlobalCss as b } from "./composables/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "heart-ui",
3
- "version": "0.0.11",
3
+ "version": "0.0.12",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist"
@@ -43,7 +43,7 @@
43
43
  "jsdelivr": "./dist/index.js",
44
44
  "scripts": {
45
45
  "dev": "pnpm run -C playground dev",
46
- "build": "vite build && vue-tsc && node ./scripts/nuxt-layer.js",
46
+ "build": "vite build && vue-tsc",
47
47
  "types": "vue-tsc",
48
48
  "preview": "pnpm run -C playground preview",
49
49
  "release": "changelogen --clean --release && npm publish && git push --follow-tags",
@@ -1,6 +0,0 @@
1
- import o from "./HButton.vue.js";
2
- import m from "./HIcon.vue.js";
3
- const t = [o, m];
4
- export {
5
- t as components
6
- };
@@ -1,2 +0,0 @@
1
- declare const _default: import("c12").InputConfig<import("@nuxt/schema").NuxtConfig, import("c12").ConfigLayerMeta>;
2
- export default _default;
@@ -1,47 +0,0 @@
1
- <template>
2
- <component
3
- :is="tag"
4
- :type="nativeType"
5
- :class="css?.root ?? globalCss.button.root"
6
- >
7
- <slot name="prefix">
8
- <HIcon v-if="prefixIcon" :class="css?.prefix ?? globalCss.button.prefix">
9
- <component :is="prefixIcon" />
10
- </HIcon>
11
- </slot>
12
- <slot />
13
- <slot name="suffix">
14
- <HIcon v-if="suffixIcon" :class="css?.suffix ?? globalCss.button.suffix">
15
- <component :is="suffixIcon" />
16
- </HIcon>
17
- </slot>
18
- </component>
19
- </template>
20
-
21
- <script setup lang="ts">
22
- import { Component } from "vue";
23
- import { CssEntry, globalCss } from "../common";
24
- import HIcon from "./HIcon.vue";
25
-
26
- export type ButtonCssProp = {
27
- root?: CssEntry;
28
- prefix?: CssEntry;
29
- suffix?: CssEntry;
30
- };
31
-
32
- defineOptions({ name: "HButton", components: { HIcon } });
33
-
34
- withDefaults(
35
- defineProps<{
36
- tag: string | Component;
37
- nativeType: string;
38
- prefixIcon?: Component;
39
- suffixIcon?: Component;
40
- css?: ButtonCssProp;
41
- }>(),
42
- {
43
- tag: "button",
44
- nativeType: "button",
45
- }
46
- );
47
- </script>
@@ -1,29 +0,0 @@
1
- <template>
2
- <i :style="computedStyle" :class="css?.root ?? globalCss.icon.root">
3
- <slot />
4
- </i>
5
- </template>
6
-
7
- <script setup lang="ts">
8
- import { CSSProperties, computed } from "vue";
9
- import { CssEntry, globalCss } from "../common/index";
10
-
11
- export type IconCssProp = {
12
- root?: CssEntry;
13
- };
14
-
15
- defineOptions({ name: "HIcon" });
16
-
17
- const props = withDefaults(
18
- defineProps<{
19
- size: number;
20
- css?: IconCssProp;
21
- }>(),
22
- { size: 24 }
23
- );
24
-
25
- const computedStyle = computed<CSSProperties>(() => ({
26
- fontSize: props.size,
27
- lineHeight: props.size,
28
- }));
29
- </script>
@@ -1,4 +0,0 @@
1
- import HButton from "./HButton.vue";
2
- import HIcon from "./HIcon.vue";
3
-
4
- export const components = [HButton, HIcon];
@@ -1,5 +0,0 @@
1
- import { globalCss, setGlobalCss } from "../common";
2
-
3
- export const useGlobalCss = () => {
4
- return { globalCss, setGlobalCss };
5
- };
@@ -1,3 +0,0 @@
1
- import { defineNuxtConfig } from "nuxt/config";
2
-
3
- export default defineNuxtConfig({});
@@ -1,10 +0,0 @@
1
- {
2
- "name": "@heart-ui/nuxt-layer",
3
- "version": "1.0.0",
4
- "type": "module",
5
- "main": "./nuxt.config.ts",
6
- "dependencies": {},
7
- "devDependencies": {
8
- "nuxt": "^3.0.0"
9
- }
10
- }
@@ -1 +0,0 @@
1
- export const testUtil = "";