hp-design-system 0.0.1 → 0.0.3
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/package.json +3 -1
- package/src/App.vue +3 -25
- package/src/App.vue.js +33 -0
- package/src/components/Button.vue +5 -31
- package/src/components/Button.vue.js +49 -0
- package/src/components/HelloWorld.vue.js +64 -0
- package/src/index.js +8 -0
- package/src/main.js +4 -0
- package/src/shims-vue.d.ts +1 -1
- package/tsconfig.json +3 -13
- package/vite.config.ts +8 -22
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "hp-design-system",
|
3
|
-
"version": "0.0.
|
3
|
+
"version": "0.0.3",
|
4
4
|
"type": "module",
|
5
5
|
"scripts": {
|
6
6
|
"dev": "vite",
|
@@ -12,7 +12,9 @@
|
|
12
12
|
},
|
13
13
|
"devDependencies": {
|
14
14
|
"@types/node": "^20.14.8",
|
15
|
+
"@types/vue": "^2.0.0",
|
15
16
|
"@vitejs/plugin-vue": "^5.0.5",
|
17
|
+
"@vue/runtime-dom": "^3.4.30",
|
16
18
|
"typescript": "^5.2.2",
|
17
19
|
"vite": "^5.3.1",
|
18
20
|
"vue-tsc": "^2.0.21"
|
package/src/App.vue
CHANGED
@@ -1,30 +1,8 @@
|
|
1
|
-
<script setup lang="ts">
|
2
|
-
import HpButton from './components/Button.vue'
|
3
|
-
</script>
|
4
|
-
|
5
1
|
<template>
|
6
2
|
<div>
|
7
|
-
|
8
|
-
<img src="/vite.svg" class="logo" alt="Vite logo" />
|
9
|
-
</a>
|
10
|
-
<a href="https://vuejs.org/" target="_blank">
|
11
|
-
<img src="./assets/vue.svg" class="logo vue" alt="Vue logo" />
|
12
|
-
</a>
|
3
|
+
Design System
|
13
4
|
</div>
|
14
|
-
<HpButton>TESTE</HpButton>
|
15
5
|
</template>
|
16
6
|
|
17
|
-
<
|
18
|
-
|
19
|
-
height: 6em;
|
20
|
-
padding: 1.5em;
|
21
|
-
will-change: filter;
|
22
|
-
transition: filter 300ms;
|
23
|
-
}
|
24
|
-
.logo:hover {
|
25
|
-
filter: drop-shadow(0 0 2em #646cffaa);
|
26
|
-
}
|
27
|
-
.logo.vue:hover {
|
28
|
-
filter: drop-shadow(0 0 2em #42b883aa);
|
29
|
-
}
|
30
|
-
</style>
|
7
|
+
<script setup lang="ts">
|
8
|
+
</script>
|
package/src/App.vue.js
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
const { defineProps, defineSlots, defineEmits, defineExpose, defineModel, defineOptions, withDefaults, } = await import('vue');
|
2
|
+
const __VLS_fnComponent = (await import('vue')).defineComponent({});
|
3
|
+
let __VLS_functionalComponentProps;
|
4
|
+
const __VLS_modelEmitsType = {};
|
5
|
+
function __VLS_template() {
|
6
|
+
let __VLS_ctx;
|
7
|
+
/* Components */
|
8
|
+
let __VLS_otherComponents;
|
9
|
+
let __VLS_own;
|
10
|
+
let __VLS_localComponents;
|
11
|
+
let __VLS_components;
|
12
|
+
let __VLS_styleScopedClasses;
|
13
|
+
let __VLS_resolvedLocalAndGlobalComponents;
|
14
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({});
|
15
|
+
if (typeof __VLS_styleScopedClasses === 'object' && !Array.isArray(__VLS_styleScopedClasses)) {
|
16
|
+
}
|
17
|
+
var __VLS_slots;
|
18
|
+
return __VLS_slots;
|
19
|
+
const __VLS_componentsOption = {};
|
20
|
+
let __VLS_name;
|
21
|
+
let __VLS_defineComponent;
|
22
|
+
const __VLS_internalComponent = __VLS_defineComponent({
|
23
|
+
setup() {
|
24
|
+
return {};
|
25
|
+
},
|
26
|
+
});
|
27
|
+
}
|
28
|
+
export default (await import('vue')).defineComponent({
|
29
|
+
setup() {
|
30
|
+
return {};
|
31
|
+
},
|
32
|
+
});
|
33
|
+
;
|
@@ -1,36 +1,10 @@
|
|
1
1
|
<template>
|
2
|
-
<button
|
3
|
-
<slot></slot>
|
4
|
-
</button>
|
2
|
+
<button>{{ text }}</button>
|
5
3
|
</template>
|
6
4
|
|
7
|
-
<script
|
8
|
-
import { defineComponent } from 'vue'
|
5
|
+
<script setup>
|
9
6
|
|
10
|
-
|
11
|
-
|
12
|
-
emits: ['click'],
|
13
|
-
setup(_, { emit }) {
|
14
|
-
const handleClick = () => {
|
15
|
-
emit('click')
|
16
|
-
}
|
17
|
-
|
18
|
-
return { handleClick }
|
19
|
-
}
|
7
|
+
const props = defineProps({
|
8
|
+
text: { type: String, required: true }
|
20
9
|
})
|
21
|
-
</script>
|
22
|
-
|
23
|
-
<style scoped>
|
24
|
-
button {
|
25
|
-
padding: 10px;
|
26
|
-
background-color: #42b983;
|
27
|
-
color: white;
|
28
|
-
border: none;
|
29
|
-
border-radius: 5px;
|
30
|
-
cursor: pointer;
|
31
|
-
}
|
32
|
-
|
33
|
-
button:hover {
|
34
|
-
background-color: #38a172;
|
35
|
-
}
|
36
|
-
</style>
|
10
|
+
</script>
|
@@ -0,0 +1,49 @@
|
|
1
|
+
const { defineProps, defineSlots, defineEmits, defineExpose, defineModel, defineOptions, withDefaults, } = await import('vue');
|
2
|
+
const props = defineProps({
|
3
|
+
text: { type: String, required: true }
|
4
|
+
});
|
5
|
+
const __VLS_fnComponent = (await import('vue')).defineComponent({
|
6
|
+
props: {
|
7
|
+
text: { type: String, required: true }
|
8
|
+
},
|
9
|
+
});
|
10
|
+
let __VLS_functionalComponentProps;
|
11
|
+
const __VLS_modelEmitsType = {};
|
12
|
+
function __VLS_template() {
|
13
|
+
let __VLS_ctx;
|
14
|
+
/* Components */
|
15
|
+
let __VLS_otherComponents;
|
16
|
+
let __VLS_own;
|
17
|
+
let __VLS_localComponents;
|
18
|
+
let __VLS_components;
|
19
|
+
let __VLS_styleScopedClasses;
|
20
|
+
let __VLS_resolvedLocalAndGlobalComponents;
|
21
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.button, __VLS_intrinsicElements.button)({});
|
22
|
+
(__VLS_ctx.text);
|
23
|
+
// @ts-ignore
|
24
|
+
[text,];
|
25
|
+
if (typeof __VLS_styleScopedClasses === 'object' && !Array.isArray(__VLS_styleScopedClasses)) {
|
26
|
+
}
|
27
|
+
var __VLS_slots;
|
28
|
+
return __VLS_slots;
|
29
|
+
const __VLS_componentsOption = {};
|
30
|
+
let __VLS_name;
|
31
|
+
let __VLS_defineComponent;
|
32
|
+
const __VLS_internalComponent = __VLS_defineComponent({
|
33
|
+
setup() {
|
34
|
+
return {
|
35
|
+
$props: __VLS_makeOptional(props),
|
36
|
+
...props,
|
37
|
+
};
|
38
|
+
},
|
39
|
+
});
|
40
|
+
}
|
41
|
+
export default (await import('vue')).defineComponent({
|
42
|
+
setup() {
|
43
|
+
return {
|
44
|
+
$props: __VLS_makeOptional(props),
|
45
|
+
...props,
|
46
|
+
};
|
47
|
+
},
|
48
|
+
});
|
49
|
+
;
|
@@ -0,0 +1,64 @@
|
|
1
|
+
import { ref } from 'vue';
|
2
|
+
const { defineProps, defineSlots, defineEmits, defineExpose, defineModel, defineOptions, withDefaults, } = await import('vue');
|
3
|
+
let __VLS_typeProps;
|
4
|
+
const __VLS_props = defineProps();
|
5
|
+
const count = ref(0);
|
6
|
+
const __VLS_fnComponent = (await import('vue')).defineComponent({});
|
7
|
+
let __VLS_functionalComponentProps;
|
8
|
+
const __VLS_modelEmitsType = {};
|
9
|
+
function __VLS_template() {
|
10
|
+
let __VLS_ctx;
|
11
|
+
/* Components */
|
12
|
+
let __VLS_otherComponents;
|
13
|
+
let __VLS_own;
|
14
|
+
let __VLS_localComponents;
|
15
|
+
let __VLS_components;
|
16
|
+
let __VLS_styleScopedClasses;
|
17
|
+
// CSS variable injection
|
18
|
+
// CSS variable injection end
|
19
|
+
let __VLS_resolvedLocalAndGlobalComponents;
|
20
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.h1, __VLS_intrinsicElements.h1)({});
|
21
|
+
(__VLS_ctx.msg);
|
22
|
+
// @ts-ignore
|
23
|
+
[msg,];
|
24
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.div, __VLS_intrinsicElements.div)({ ...{ class: ("card") }, });
|
25
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.button, __VLS_intrinsicElements.button)({ ...{ onClick: (...[$event]) => {
|
26
|
+
__VLS_ctx.count++;
|
27
|
+
// @ts-ignore
|
28
|
+
[count,];
|
29
|
+
} }, type: ("button"), });
|
30
|
+
(__VLS_ctx.count);
|
31
|
+
// @ts-ignore
|
32
|
+
[count,];
|
33
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.p, __VLS_intrinsicElements.p)({});
|
34
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.code, __VLS_intrinsicElements.code)({});
|
35
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.p, __VLS_intrinsicElements.p)({});
|
36
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.a, __VLS_intrinsicElements.a)({ href: ("https://vuejs.org/guide/quick-start.html#local"), target: ("_blank"), });
|
37
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.p, __VLS_intrinsicElements.p)({});
|
38
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.a, __VLS_intrinsicElements.a)({ href: ("https://vuejs.org/guide/scaling-up/tooling.html#ide-support"), target: ("_blank"), });
|
39
|
+
__VLS_elementAsFunction(__VLS_intrinsicElements.p, __VLS_intrinsicElements.p)({ ...{ class: ("read-the-docs") }, });
|
40
|
+
if (typeof __VLS_styleScopedClasses === 'object' && !Array.isArray(__VLS_styleScopedClasses)) {
|
41
|
+
__VLS_styleScopedClasses['card'];
|
42
|
+
__VLS_styleScopedClasses['read-the-docs'];
|
43
|
+
}
|
44
|
+
var __VLS_slots;
|
45
|
+
return __VLS_slots;
|
46
|
+
const __VLS_componentsOption = {};
|
47
|
+
let __VLS_name;
|
48
|
+
let __VLS_defineComponent;
|
49
|
+
const __VLS_internalComponent = __VLS_defineComponent({
|
50
|
+
setup() {
|
51
|
+
return {
|
52
|
+
count: count,
|
53
|
+
};
|
54
|
+
},
|
55
|
+
props: {},
|
56
|
+
});
|
57
|
+
}
|
58
|
+
export default (await import('vue')).defineComponent({
|
59
|
+
setup() {
|
60
|
+
return {};
|
61
|
+
},
|
62
|
+
props: {},
|
63
|
+
});
|
64
|
+
;
|
package/src/index.js
ADDED
package/src/main.js
ADDED
package/src/shims-vue.d.ts
CHANGED
package/tsconfig.json
CHANGED
@@ -1,23 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"compilerOptions": {
|
3
3
|
"target": "esnext",
|
4
|
-
"useDefineForClassFields": true,
|
5
4
|
"module": "esnext",
|
6
|
-
"moduleResolution": "node",
|
7
5
|
"strict": true,
|
8
|
-
"
|
9
|
-
"sourceMap": true,
|
10
|
-
"resolveJsonModule": true,
|
6
|
+
"moduleResolution": "node",
|
11
7
|
"esModuleInterop": true,
|
12
|
-
"lib": ["esnext", "dom"],
|
13
8
|
"skipLibCheck": true,
|
14
9
|
"types": ["vite/client", "node"]
|
15
10
|
},
|
16
|
-
"include": [
|
17
|
-
"src/**/*.ts",
|
18
|
-
"src/**/*.d.ts",
|
19
|
-
"src/**/*.tsx",
|
20
|
-
"src/**/*.vue"
|
21
|
-
],
|
11
|
+
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.vue"],
|
22
12
|
"exclude": ["node_modules"]
|
23
|
-
}
|
13
|
+
}
|
package/vite.config.ts
CHANGED
@@ -1,22 +1,8 @@
|
|
1
|
-
import { defineConfig } from 'vite'
|
2
|
-
import vue from '@vitejs/plugin-vue'
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
entry: path.resolve(__dirname, 'src/index.ts'),
|
10
|
-
name: 'HpDesignSystem',
|
11
|
-
fileName: (format) => `hp-design-system.${format}.js`
|
12
|
-
},
|
13
|
-
rollupOptions: {
|
14
|
-
external: ['vue'],
|
15
|
-
output: {
|
16
|
-
globals: {
|
17
|
-
vue: 'Vue'
|
18
|
-
}
|
19
|
-
}
|
20
|
-
}
|
21
|
-
}
|
22
|
-
})
|
1
|
+
import { defineConfig } from 'vite'
|
2
|
+
import vue from '@vitejs/plugin-vue'
|
3
|
+
|
4
|
+
export default defineConfig({
|
5
|
+
plugins: [
|
6
|
+
vue(),
|
7
|
+
],
|
8
|
+
})
|