hp-design-system 0.0.16 → 0.1.0
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/hp-design-system.es.js +7 -7
- package/dist/types/components/button/Button.stories.d.ts +6 -0
- package/dist/types/components/index.d.ts +1 -1
- package/package.json +13 -2
- package/src/App.vue +1 -2
- package/src/components/button/Button.stories.ts +39 -0
- package/src/components/{Button.vue → button/Button.vue} +1 -1
- package/src/components/index.ts +1 -1
- /package/dist/types/components/{Button.vue.d.ts → button/Button.vue.d.ts} +0 -0
@@ -4,19 +4,19 @@ const i = /* @__PURE__ */ o({
|
|
4
4
|
props: {
|
5
5
|
text: { type: String, required: !0 }
|
6
6
|
},
|
7
|
-
setup(
|
8
|
-
return (
|
9
|
-
u("
|
10
|
-
a("button", null, p(
|
7
|
+
setup(e) {
|
8
|
+
return (t, m) => (r(), c(l, null, [
|
9
|
+
u(" TESTEe "),
|
10
|
+
a("button", null, p(e.text), 1)
|
11
11
|
], 64));
|
12
12
|
}
|
13
13
|
}), n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
14
14
|
__proto__: null,
|
15
15
|
HpButton: i
|
16
16
|
}, Symbol.toStringTag, { value: "Module" }));
|
17
|
-
function s(
|
18
|
-
Object.keys(n).forEach((
|
19
|
-
|
17
|
+
function s(e) {
|
18
|
+
Object.keys(n).forEach((t) => {
|
19
|
+
e.component(t, n[t]);
|
20
20
|
});
|
21
21
|
}
|
22
22
|
const d = { install: s };
|
@@ -1,2 +1,2 @@
|
|
1
|
-
import HpButton from './Button.vue';
|
1
|
+
import HpButton from './button/Button.vue';
|
2
2
|
export { HpButton, };
|
package/package.json
CHANGED
@@ -1,24 +1,35 @@
|
|
1
1
|
{
|
2
2
|
"name": "hp-design-system",
|
3
|
-
"version": "0.0
|
3
|
+
"version": "0.1.0",
|
4
4
|
"type": "module",
|
5
5
|
"main": "dist/hp-design-system.umd.js",
|
6
6
|
"scripts": {
|
7
7
|
"dev": "vite",
|
8
8
|
"clean:cache": "rmdir /s /q node_modules\\.vite",
|
9
9
|
"build": "rimraf dist && vue-tsc && vite build",
|
10
|
-
"preview": "vite preview"
|
10
|
+
"preview": "vite preview",
|
11
|
+
"storybook": "storybook dev -p 6006",
|
12
|
+
"build-storybook": "storybook build"
|
11
13
|
},
|
12
14
|
"dependencies": {
|
13
15
|
"@vitejs/plugin-vue": "^5.0.5",
|
14
16
|
"vue": "^3.4.29"
|
15
17
|
},
|
16
18
|
"devDependencies": {
|
19
|
+
"@chromatic-com/storybook": "^1.5.0",
|
20
|
+
"@storybook/addon-essentials": "^8.1.10",
|
21
|
+
"@storybook/addon-interactions": "^8.1.10",
|
22
|
+
"@storybook/addon-links": "^8.1.10",
|
23
|
+
"@storybook/blocks": "^8.1.10",
|
24
|
+
"@storybook/test": "^8.1.10",
|
25
|
+
"@storybook/vue3": "^8.1.10",
|
26
|
+
"@storybook/vue3-vite": "^8.1.10",
|
17
27
|
"@types/node": "^20.14.8",
|
18
28
|
"@types/vue": "^2.0.0",
|
19
29
|
"@vue/runtime-dom": "^3.4.30",
|
20
30
|
"rimraf": "^5.0.1",
|
21
31
|
"sass": "^1.63.6",
|
32
|
+
"storybook": "^8.1.10",
|
22
33
|
"typescript": "^5.5.2",
|
23
34
|
"vite": "^5.3.1",
|
24
35
|
"vue-tsc": "^2.0.21"
|
package/src/App.vue
CHANGED
@@ -0,0 +1,39 @@
|
|
1
|
+
// src/components/Button/Button.stories.ts
|
2
|
+
import type { Meta, StoryFn } from '@storybook/vue3'; // Importa StoryFn em vez de Story
|
3
|
+
import HpButton from './Button.vue';
|
4
|
+
|
5
|
+
const meta: Meta = {
|
6
|
+
title: 'Componentes/Button',
|
7
|
+
component: HpButton,
|
8
|
+
argTypes: {
|
9
|
+
text: {
|
10
|
+
control: {
|
11
|
+
type: 'text',
|
12
|
+
},
|
13
|
+
table: {
|
14
|
+
category: 'Propriedades',
|
15
|
+
type: {
|
16
|
+
summary: 'string',
|
17
|
+
detail: 'Tipo de texto',
|
18
|
+
},
|
19
|
+
defaultValue: { summary: 'Label padrão' },
|
20
|
+
},
|
21
|
+
description: 'Texto do botão',
|
22
|
+
},
|
23
|
+
},
|
24
|
+
};
|
25
|
+
|
26
|
+
export default meta;
|
27
|
+
|
28
|
+
const Template: StoryFn<{ text: string }> = (args) => ({ // Define explicitamente o tipo de args
|
29
|
+
components: { HpButton },
|
30
|
+
setup() {
|
31
|
+
return { args };
|
32
|
+
},
|
33
|
+
template: '<HpButton :text="args.text" />',
|
34
|
+
});
|
35
|
+
|
36
|
+
export const Example = Template.bind({});
|
37
|
+
Example.args = {
|
38
|
+
text: 'Label',
|
39
|
+
};
|
package/src/components/index.ts
CHANGED
File without changes
|