hp-design-system 1.0.2 → 1.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hp-design-system",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "type": "module",
5
5
  "main": "dist/hp-design-system.umd.js",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -1,10 +1,14 @@
1
1
  import { App } from 'vue'
2
2
  import * as components from './components'
3
+ import * as tokens from './views/tokens'
3
4
 
4
- function install (app: App) {
5
+ function install(app: App) {
5
6
  Object.keys(components).forEach((key) => {
6
7
  app.component(key, components[key as keyof typeof components])
7
8
  })
9
+ Object.keys(tokens).forEach((key) => {
10
+ app.component(key, tokens[key as keyof typeof tokens])
11
+ })
8
12
  }
9
13
 
10
14
  // import '../assets/main.scss';
@@ -0,0 +1,39 @@
1
+ import type { Meta, StoryFn } from '@storybook/vue3'
2
+ import HpColors from './Colors.vue'
3
+
4
+ const meta: Meta = {
5
+ title: 'Componentes/Colors',
6
+ component: HpColors,
7
+ argTypes: {
8
+ label: {
9
+ control: {
10
+ type: 'text'
11
+ },
12
+ table: {
13
+ category: 'Propriedades',
14
+ type: {
15
+ summary: 'string',
16
+ detail: 'Tipo de texto'
17
+ },
18
+ defaultValue: { summary: 'Label padrão' }
19
+ },
20
+ description: 'Texto do botão'
21
+ }
22
+ }
23
+ }
24
+
25
+ export default meta
26
+
27
+ const Template: StoryFn<{ label: string }> = (args) => ({
28
+ // Define explicitamente o tipo de args
29
+ components: { HpColors },
30
+ setup() {
31
+ return { args }
32
+ },
33
+ template: '<HpColors :label="args.label" />'
34
+ })
35
+
36
+ export const Example = Template.bind({})
37
+ Example.args = {
38
+ label: 'Label'
39
+ }
@@ -0,0 +1,3 @@
1
+ import { colors } from './Colors'
2
+
3
+ export { colors }