hp-design-system 0.0.15 → 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.
@@ -1,23 +1,26 @@
1
- import { defineComponent as o, openBlock as r, createElementBlock as c, toDisplayString as p } from "vue";
2
- const u = /* @__PURE__ */ o({
1
+ import { defineComponent as o, openBlock as r, createElementBlock as c, Fragment as l, createTextVNode as u, createElementVNode as a, toDisplayString as p } from "vue";
2
+ const i = /* @__PURE__ */ o({
3
3
  __name: "Button",
4
4
  props: {
5
5
  text: { type: String, required: !0 }
6
6
  },
7
- setup(t) {
8
- return (e, a) => (r(), c("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
+ ], 64));
9
12
  }
10
13
  }), n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
11
14
  __proto__: null,
12
- HpButton: u
15
+ HpButton: i
13
16
  }, Symbol.toStringTag, { value: "Module" }));
14
- function l(t) {
15
- Object.keys(n).forEach((e) => {
16
- t.component(e, n[e]);
17
+ function s(e) {
18
+ Object.keys(n).forEach((t) => {
19
+ e.component(t, n[t]);
17
20
  });
18
21
  }
19
- const s = { install: l };
22
+ const d = { install: s };
20
23
  export {
21
- u as HpButton,
22
- s as default
24
+ i as HpButton,
25
+ d as default
23
26
  };
@@ -0,0 +1,2 @@
1
+ declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}, {}>;
2
+ export default _default;
@@ -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, };
@@ -0,0 +1 @@
1
+ import './style.css';
package/package.json CHANGED
@@ -1,24 +1,35 @@
1
1
  {
2
2
  "name": "hp-design-system",
3
- "version": "0.0.15",
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 ADDED
@@ -0,0 +1,11 @@
1
+ <template>
2
+ <div>
3
+ <HpButton text="Clique Aqui"></HpButton>
4
+ </div>
5
+ </template>
6
+
7
+ <script setup lang="ts">
8
+ import { HpButton } from './components/index';
9
+
10
+ </script>
11
+
@@ -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,4 +1,5 @@
1
1
  <template>
2
+ TESTEe
2
3
  <button>{{ text }}</button>
3
4
  </template>
4
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,
package/src/main.ts ADDED
@@ -0,0 +1,6 @@
1
+ import { createApp } from 'vue';
2
+ import './style.css'
3
+ import App from './App.vue'
4
+
5
+ const app = createApp(App);
6
+ app.mount('#app');