hp-design-system 1.0.3 → 1.0.4

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,5 +1,5 @@
1
- import { computed as y, openBlock as c, createElementBlock as i, normalizeClass as m, normalizeStyle as d, createElementVNode as o, defineComponent as p, createVNode as h, createCommentVNode as k, toDisplayString as l, pushScopeId as g, popScopeId as P, createTextVNode as S } from "vue";
2
- const _ = ["xlink:href"], f = {
1
+ import { computed as m, openBlock as a, createElementBlock as i, normalizeClass as h, normalizeStyle as d, createElementVNode as o, defineComponent as f, createVNode as g, createCommentVNode as k, toDisplayString as l, pushScopeId as S, popScopeId as P, createTextVNode as _ } from "vue";
2
+ const C = ["xlink:href"], b = {
3
3
  __name: "Icon",
4
4
  props: {
5
5
  name: {
@@ -16,26 +16,26 @@ const _ = ["xlink:href"], f = {
16
16
  }
17
17
  },
18
18
  setup(e) {
19
- const n = e, t = y(() => ({
19
+ const n = e, t = m(() => ({
20
20
  sm: "icon-small",
21
21
  md: "icon-medium",
22
22
  lg: "icon-large"
23
23
  })[n.size] || "icon-medium");
24
- return (a, r) => (c(), i("svg", {
25
- class: m(["icon", t.value]),
24
+ return (c, r) => (a(), i("svg", {
25
+ class: h(["icon", t.value]),
26
26
  xmlns: "http://www.w3.org/2000/svg",
27
27
  "aria-hidden": "true",
28
28
  style: d({ fill: e.color })
29
29
  }, [
30
30
  o("use", {
31
31
  "xlink:href": `#icon-${e.name}`
32
- }, null, 8, _)
32
+ }, null, 8, C)
33
33
  ], 6));
34
34
  }
35
- }, C = ["aria-label", "aria-disabled"], x = {
35
+ }, x = ["aria-label", "aria-disabled"], O = {
36
36
  key: 0,
37
37
  class: "button-icon"
38
- }, O = { class: "button-label" }, v = /* @__PURE__ */ p({
38
+ }, v = { class: "button-label" }, I = /* @__PURE__ */ f({
39
39
  __name: "Button",
40
40
  props: {
41
41
  label: {
@@ -73,26 +73,26 @@ const _ = ["xlink:href"], f = {
73
73
  },
74
74
  emits: ["click"],
75
75
  setup(e, { emit: n }) {
76
- const t = e, a = n, r = (u) => {
77
- t.disabled || a("click", u);
76
+ const t = e, c = n, r = (u) => {
77
+ t.disabled || c("click", u);
78
78
  };
79
- return (u, R) => (c(), i("button", {
79
+ return (u, V) => (a(), i("button", {
80
80
  class: "button",
81
81
  "aria-label": e.ariaLabel || e.label,
82
82
  onClick: r,
83
83
  "aria-disabled": e.disabled
84
84
  }, [
85
- e.icon ? (c(), i("span", x, [
86
- h(f, {
85
+ e.icon ? (a(), i("span", O, [
86
+ g(b, {
87
87
  name: e.icon,
88
88
  size: "sm",
89
89
  color: "white"
90
90
  }, null, 8, ["name"])
91
91
  ])) : k("", !0),
92
- o("span", O, l(e.label), 1)
93
- ], 8, C));
92
+ o("span", v, l(e.label), 1)
93
+ ], 8, x));
94
94
  }
95
- }), I = (e) => (g("data-v-7d29c03a"), e = e(), P(), e), w = ["checked"], B = /* @__PURE__ */ I(() => /* @__PURE__ */ o("label", {
95
+ }), j = (e) => (S("data-v-7d29c03a"), e = e(), P(), e), w = ["checked"], z = /* @__PURE__ */ j(() => /* @__PURE__ */ o("label", {
96
96
  class: "check",
97
97
  for: "check"
98
98
  }, [
@@ -105,7 +105,7 @@ const _ = ["xlink:href"], f = {
105
105
  /* @__PURE__ */ o("polyline", { points: "1 5 4 8 11 1" })
106
106
  ])
107
107
  ])
108
- ], -1)), H = { class: "checkbox-label" }, j = /* @__PURE__ */ p({
108
+ ], -1)), B = { class: "checkbox-label" }, H = /* @__PURE__ */ f({
109
109
  __name: "Checkbox",
110
110
  props: {
111
111
  checked: {
@@ -130,7 +130,7 @@ const _ = ["xlink:href"], f = {
130
130
  }
131
131
  },
132
132
  setup(e) {
133
- return (n, t) => (c(), i("div", {
133
+ return (n, t) => (a(), i("div", {
134
134
  class: "checkbox",
135
135
  style: d({
136
136
  "--background-color": e.backgroundColor || "#8f44fd",
@@ -145,16 +145,16 @@ const _ = ["xlink:href"], f = {
145
145
  type: "checkbox",
146
146
  style: { display: "none" }
147
147
  }, null, 8, w),
148
- B,
149
- o("span", H, l(e.label), 1)
148
+ z,
149
+ o("span", B, l(e.label), 1)
150
150
  ], 4));
151
151
  }
152
- }), b = (e, n) => {
152
+ }), y = (e, n) => {
153
153
  const t = e.__vccOpts || e;
154
- for (const [a, r] of n)
155
- t[a] = r;
154
+ for (const [c, r] of n)
155
+ t[c] = r;
156
156
  return t;
157
- }, z = /* @__PURE__ */ b(j, [["__scopeId", "data-v-7d29c03a"]]), N = {
157
+ }, N = /* @__PURE__ */ y(H, [["__scopeId", "data-v-7d29c03a"]]), q = {
158
158
  name: "Teste",
159
159
  props: {
160
160
  textProp: {
@@ -219,8 +219,8 @@ const _ = ["xlink:href"], f = {
219
219
  }
220
220
  }
221
221
  };
222
- function q(e, n, t, a, r, u) {
223
- return c(), i("div", null, [
222
+ function T(e, n, t, c, r, u) {
223
+ return a(), i("div", null, [
224
224
  o("h1", null, l(t.textProp), 1),
225
225
  o("p", null, "Boolean: " + l(t.booleanProp), 1),
226
226
  o("p", null, "Number: " + l(t.numberProp), 1),
@@ -234,7 +234,7 @@ function q(e, n, t, a, r, u) {
234
234
  o("p", null, "Object: " + l(t.objectProp), 1),
235
235
  o("p", null, "Array: " + l(t.arrayProp), 1),
236
236
  o("p", null, [
237
- S(" Color: "),
237
+ _(" Color: "),
238
238
  o("span", {
239
239
  style: d({ backgroundColor: t.colorProp })
240
240
  }, l(t.colorProp), 5)
@@ -243,23 +243,35 @@ function q(e, n, t, a, r, u) {
243
243
  o("p", null, "File: " + l(t.fileProp ? t.fileProp.name : "No file selected"), 1)
244
244
  ]);
245
245
  }
246
- const T = /* @__PURE__ */ b(N, [["render", q], ["__scopeId", "data-v-65be170a"]]), s = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
246
+ const A = /* @__PURE__ */ y(q, [["render", T], ["__scopeId", "data-v-65be170a"]]), s = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
247
247
  __proto__: null,
248
- HpButton: v,
249
- HpCheckbox: z,
250
- HpIcon: f,
251
- HpTeste: T
248
+ HpButton: I,
249
+ HpCheckbox: N,
250
+ HpIcon: b,
251
+ HpTeste: A
252
+ }, Symbol.toStringTag, { value: "Module" })), R = {
253
+ primary: "#3498db",
254
+ secondary: "#2ecc71",
255
+ error: "#e74c3c",
256
+ warning: "#f39c12",
257
+ success: "#2ecc71"
258
+ }, p = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
259
+ __proto__: null,
260
+ colors: R
252
261
  }, Symbol.toStringTag, { value: "Module" }));
253
- function A(e) {
262
+ function E(e) {
254
263
  Object.keys(s).forEach((n) => {
255
264
  e.component(n, s[n]);
265
+ }), Object.keys(p).forEach((n) => {
266
+ e.component(n, p[n]);
256
267
  });
257
268
  }
258
- const D = { install: A };
269
+ const M = { install: E };
259
270
  export {
260
- v as HpButton,
261
- z as HpCheckbox,
262
- f as HpIcon,
263
- T as HpTeste,
264
- D as default
271
+ I as HpButton,
272
+ N as HpCheckbox,
273
+ b as HpIcon,
274
+ A as HpTeste,
275
+ R as colors,
276
+ M as default
265
277
  };
@@ -5,3 +5,4 @@ declare const _default: {
5
5
  };
6
6
  export default _default;
7
7
  export * from './components';
8
+ export * from './views/tokens';
@@ -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
+ label: string;
6
+ }>;
@@ -0,0 +1,2 @@
1
+ import { colors } from './Colors';
2
+ export { colors };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hp-design-system",
3
- "version": "1.0.3",
3
+ "version": "1.0.4",
4
4
  "type": "module",
5
5
  "main": "dist/hp-design-system.umd.js",
6
6
  "scripts": {
package/src/index.ts CHANGED
@@ -16,3 +16,4 @@ function install(app: App) {
16
16
  export default { install }
17
17
 
18
18
  export * from './components'
19
+ export * from './views/tokens'