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.
@@ -4,19 +4,19 @@ const i = /* @__PURE__ */ o({
4
4
  props: {
5
5
  text: { type: String, required: !0 }
6
6
  },
7
- setup(t) {
8
- return (e, m) => (r(), c(l, null, [
9
- u(" TESTE "),
10
- a("button", null, p(t.text), 1)
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(t) {
18
- Object.keys(n).forEach((e) => {
19
- t.component(e, n[e]);
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 };
@@ -0,0 +1,6 @@
1
+ import type { Meta, StoryFn } from '@storybook/vue3';
2
+ declare const meta: Meta;
3
+ export default meta;
4
+ export declare const Example: StoryFn<{
5
+ text: string;
6
+ }>;
@@ -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.16",
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
@@ -1,7 +1,6 @@
1
1
  <template>
2
2
  <div>
3
- OIEe
4
- <HpButton :text="'Clique Aqui'"></HpButton>
3
+ <HpButton text="Clique Aqui"></HpButton>
5
4
  </div>
6
5
  </template>
7
6
 
@@ -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
+ };
@@ -1,5 +1,5 @@
1
1
  <template>
2
- TESTE
2
+ TESTEe
3
3
  <button>{{ text }}</button>
4
4
  </template>
5
5
 
@@ -1,4 +1,4 @@
1
- import HpButton from './Button.vue'
1
+ import HpButton from './button/Button.vue'
2
2
 
3
3
  export {
4
4
  HpButton,