@henriquepetrelli/hp-design-system 1.1.24 → 1.1.25

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.
@@ -23,8 +23,8 @@
23
23
  return ButtonSize2;
24
24
  })(ButtonSize || {});
25
25
 
26
- const _hoisted_1$g = ["xlink:href"];
27
- const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
26
+ const _hoisted_1$h = ["xlink:href"];
27
+ const _sfc_main$j = /* @__PURE__ */ vue.defineComponent({
28
28
  __name: "Icon",
29
29
  props: {
30
30
  name: {
@@ -58,7 +58,7 @@
58
58
  }, [
59
59
  vue.createElementVNode("use", {
60
60
  "xlink:href": `#icon-${__props.name}`
61
- }, null, 8, _hoisted_1$g)
61
+ }, null, 8, _hoisted_1$h)
62
62
  ], 6);
63
63
  };
64
64
  }
@@ -72,18 +72,18 @@
72
72
  return target;
73
73
  };
74
74
 
75
- const HpIcon = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-0b477588"]]);
75
+ const HpIcon = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-0b477588"]]);
76
76
 
77
- const _hoisted_1$f = ["aria-label", "aria-disabled", "disabled"];
78
- const _hoisted_2$e = {
77
+ const _hoisted_1$g = ["aria-label", "aria-disabled", "disabled"];
78
+ const _hoisted_2$f = {
79
79
  key: 0,
80
80
  class: "button-primary__icon--left"
81
81
  };
82
- const _hoisted_3$c = {
82
+ const _hoisted_3$d = {
83
83
  key: 1,
84
84
  class: "button-primary__icon--right"
85
85
  };
86
- const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
86
+ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
87
87
  __name: "ButtonPrimary",
88
88
  props: {
89
89
  label: {
@@ -156,7 +156,7 @@
156
156
  disabled: __props.disabled,
157
157
  onClick: handleClick
158
158
  }, [
159
- __props.icon && __props.iconPosition === vue.unref(IconPosition).LEFT ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$e, [
159
+ __props.icon && __props.iconPosition === vue.unref(IconPosition).LEFT ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$f, [
160
160
  vue.createVNode(HpIcon, {
161
161
  name: __props.icon,
162
162
  size: "sm",
@@ -167,31 +167,31 @@
167
167
  class: "button-primary__label",
168
168
  style: vue.normalizeStyle({ color: computedColor.value })
169
169
  }, vue.toDisplayString(__props.label), 5),
170
- __props.icon && __props.iconPosition === vue.unref(IconPosition).RIGHT ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$c, [
170
+ __props.icon && __props.iconPosition === vue.unref(IconPosition).RIGHT ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$d, [
171
171
  vue.createVNode(HpIcon, {
172
172
  name: __props.icon,
173
173
  size: "sm",
174
174
  color: computedColor.value
175
175
  }, null, 8, ["name", "color"])
176
176
  ])) : vue.createCommentVNode("", true)
177
- ], 14, _hoisted_1$f);
177
+ ], 14, _hoisted_1$g);
178
178
  };
179
179
  }
180
180
  });
181
181
 
182
- const HpButtonPrimary = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-5c29dcce"]]);
182
+ const HpButtonPrimary = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-5c29dcce"]]);
183
183
 
184
- const _hoisted_1$e = ["aria-label", "aria-disabled", "disabled"];
185
- const _hoisted_2$d = {
184
+ const _hoisted_1$f = ["aria-label", "aria-disabled", "disabled"];
185
+ const _hoisted_2$e = {
186
186
  key: 0,
187
187
  class: "button-secondary__icon--left"
188
188
  };
189
- const _hoisted_3$b = { class: "button-secondary__label" };
189
+ const _hoisted_3$c = { class: "button-secondary__label" };
190
190
  const _hoisted_4$8 = {
191
191
  key: 1,
192
192
  class: "button-secondary__icon--right"
193
193
  };
194
- const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
194
+ const _sfc_main$h = /* @__PURE__ */ vue.defineComponent({
195
195
  __name: "ButtonSecondary",
196
196
  props: {
197
197
  label: {
@@ -249,37 +249,37 @@
249
249
  disabled: __props.disabled,
250
250
  onClick: handleClick
251
251
  }, [
252
- __props.icon && __props.iconPosition === vue.unref(IconPosition).LEFT ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$d, [
252
+ __props.icon && __props.iconPosition === vue.unref(IconPosition).LEFT ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$e, [
253
253
  vue.createVNode(HpIcon, {
254
254
  name: __props.icon,
255
255
  size: "sm"
256
256
  }, null, 8, ["name"])
257
257
  ])) : vue.createCommentVNode("", true),
258
- vue.createElementVNode("span", _hoisted_3$b, vue.toDisplayString(__props.label), 1),
258
+ vue.createElementVNode("span", _hoisted_3$c, vue.toDisplayString(__props.label), 1),
259
259
  __props.icon && __props.iconPosition === vue.unref(IconPosition).RIGHT ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$8, [
260
260
  vue.createVNode(HpIcon, {
261
261
  name: __props.icon,
262
262
  size: "sm"
263
263
  }, null, 8, ["name"])
264
264
  ])) : vue.createCommentVNode("", true)
265
- ], 14, _hoisted_1$e);
265
+ ], 14, _hoisted_1$f);
266
266
  };
267
267
  }
268
268
  });
269
269
 
270
- const HpButtonSecondary = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-ce9350e4"]]);
270
+ const HpButtonSecondary = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-ce9350e4"]]);
271
271
 
272
- const _hoisted_1$d = ["aria-label", "aria-disabled", "disabled"];
273
- const _hoisted_2$c = {
272
+ const _hoisted_1$e = ["aria-label", "aria-disabled", "disabled"];
273
+ const _hoisted_2$d = {
274
274
  key: 0,
275
275
  class: "button-tertiary__icon--left"
276
276
  };
277
- const _hoisted_3$a = { class: "button-tertiary__label" };
277
+ const _hoisted_3$b = { class: "button-tertiary__label" };
278
278
  const _hoisted_4$7 = {
279
279
  key: 1,
280
280
  class: "button-tertiary__icon--right"
281
281
  };
282
- const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
282
+ const _sfc_main$g = /* @__PURE__ */ vue.defineComponent({
283
283
  __name: "ButtonTertiary",
284
284
  props: {
285
285
  label: {
@@ -337,25 +337,25 @@
337
337
  disabled: __props.disabled,
338
338
  onClick: handleClick
339
339
  }, [
340
- __props.icon && __props.iconPosition === vue.unref(IconPosition).LEFT ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$c, [
340
+ __props.icon && __props.iconPosition === vue.unref(IconPosition).LEFT ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$d, [
341
341
  vue.createVNode(HpIcon, {
342
342
  name: __props.icon,
343
343
  size: "sm"
344
344
  }, null, 8, ["name"])
345
345
  ])) : vue.createCommentVNode("", true),
346
- vue.createElementVNode("span", _hoisted_3$a, vue.toDisplayString(__props.label), 1),
346
+ vue.createElementVNode("span", _hoisted_3$b, vue.toDisplayString(__props.label), 1),
347
347
  __props.icon && __props.iconPosition === vue.unref(IconPosition).RIGHT ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$7, [
348
348
  vue.createVNode(HpIcon, {
349
349
  name: __props.icon,
350
350
  size: "sm"
351
351
  }, null, 8, ["name"])
352
352
  ])) : vue.createCommentVNode("", true)
353
- ], 14, _hoisted_1$d);
353
+ ], 14, _hoisted_1$e);
354
354
  };
355
355
  }
356
356
  });
357
357
 
358
- const ButtonTertiary = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-0401b00e"]]);
358
+ const ButtonTertiary = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-0401b00e"]]);
359
359
 
360
360
  var ButtonIconSize = /* @__PURE__ */ ((ButtonIconSize2) => {
361
361
  ButtonIconSize2["SMALL"] = "sm";
@@ -382,8 +382,8 @@
382
382
  return "";
383
383
  };
384
384
 
385
- const _hoisted_1$c = ["aria-label", "tabindex", "aria-disabled", "disabled"];
386
- const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
385
+ const _hoisted_1$d = ["aria-label", "tabindex", "aria-disabled", "disabled"];
386
+ const _sfc_main$f = /* @__PURE__ */ vue.defineComponent({
387
387
  __name: "ButtonIcon",
388
388
  props: {
389
389
  label: {
@@ -473,12 +473,12 @@
473
473
  size: __props.size,
474
474
  speed: 0.8
475
475
  }, null, 8, ["color", "secondaryColor", "size"]))
476
- ], 14, _hoisted_1$c);
476
+ ], 14, _hoisted_1$d);
477
477
  };
478
478
  }
479
479
  });
480
480
 
481
- const HpButtonIcon = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-8cf8a123"]]);
481
+ const HpButtonIcon = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-8cf8a123"]]);
482
482
 
483
483
  var ButtonLetterSize = /* @__PURE__ */ ((ButtonLetterSize2) => {
484
484
  ButtonLetterSize2["SMALL"] = "sm";
@@ -487,9 +487,9 @@
487
487
  return ButtonLetterSize2;
488
488
  })(ButtonLetterSize || {});
489
489
 
490
- const _hoisted_1$b = ["aria-label", "aria-disabled", "disabled", "tabindex"];
491
- const _hoisted_2$b = { key: 0 };
492
- const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
490
+ const _hoisted_1$c = ["aria-label", "aria-disabled", "disabled", "tabindex"];
491
+ const _hoisted_2$c = { key: 0 };
492
+ const _sfc_main$e = /* @__PURE__ */ vue.defineComponent({
493
493
  __name: "ButtonLetter",
494
494
  props: {
495
495
  label: {
@@ -572,7 +572,7 @@
572
572
  color: computedLetterColor.value
573
573
  })
574
574
  }, [
575
- !__props.isLoading ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$b, vue.toDisplayString(__props.letter), 1)) : (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$b), {
575
+ !__props.isLoading ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$c, vue.toDisplayString(__props.letter), 1)) : (vue.openBlock(), vue.createBlock(vue.unref(_sfc_main$b), {
576
576
  key: 1,
577
577
  type: "circle1",
578
578
  color: computedLetterColor.value || "var(--color-primary)",
@@ -580,12 +580,12 @@
580
580
  size: __props.size,
581
581
  speed: 0.8
582
582
  }, null, 8, ["color", "secondaryColor", "size"]))
583
- ], 14, _hoisted_1$b);
583
+ ], 14, _hoisted_1$c);
584
584
  };
585
585
  }
586
586
  });
587
587
 
588
- const ButtonLetter = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-13b75270"]]);
588
+ const ButtonLetter = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-13b75270"]]);
589
589
 
590
590
  var AlertType = /* @__PURE__ */ ((AlertType2) => {
591
591
  AlertType2["WARNING"] = "warning";
@@ -595,9 +595,9 @@
595
595
  return AlertType2;
596
596
  })(AlertType || {});
597
597
 
598
- const _hoisted_1$a = { class: "alert" };
599
- const _hoisted_2$a = { class: "alert__container__message" };
600
- const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
598
+ const _hoisted_1$b = { class: "alert" };
599
+ const _hoisted_2$b = { class: "alert__container__message" };
600
+ const _sfc_main$d = /* @__PURE__ */ vue.defineComponent({
601
601
  __name: "Alert",
602
602
  props: {
603
603
  message: {
@@ -660,7 +660,7 @@
660
660
  return props.type;
661
661
  });
662
662
  return (_ctx, _cache) => {
663
- return vue.openBlock(), vue.createElementBlock("section", _hoisted_1$a, [
663
+ return vue.openBlock(), vue.createElementBlock("section", _hoisted_1$b, [
664
664
  vue.createElementVNode("div", {
665
665
  class: "alert__container",
666
666
  style: vue.normalizeStyle({
@@ -668,7 +668,7 @@
668
668
  "--color": computedColorType.value
669
669
  })
670
670
  }, [
671
- vue.createElementVNode("p", _hoisted_2$a, vue.toDisplayString(__props.message), 1),
671
+ vue.createElementVNode("p", _hoisted_2$b, vue.toDisplayString(__props.message), 1),
672
672
  vue.createVNode(vue.unref(HpButtonIcon), {
673
673
  class: "alert__container__icon",
674
674
  label: "Fechar modal",
@@ -684,7 +684,64 @@
684
684
  }
685
685
  });
686
686
 
687
- const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-10dcca72"]]);
687
+ const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-10dcca72"]]);
688
+
689
+ const _hoisted_1$a = {
690
+ key: 0,
691
+ class: "card__header"
692
+ };
693
+ const _hoisted_2$a = { class: "card__body" };
694
+ const _hoisted_3$a = {
695
+ key: 1,
696
+ class: "card__footer"
697
+ };
698
+ const _sfc_main$c = /* @__PURE__ */ vue.defineComponent({
699
+ __name: "Card",
700
+ props: {
701
+ title: { type: String, default: "" },
702
+ description: { type: String, default: "" },
703
+ variant: { type: String, default: "default" },
704
+ interactive: { type: Boolean, default: false }
705
+ },
706
+ setup(__props) {
707
+ const props = __props;
708
+ const titleId = `card-title-${Math.random().toString(36).slice(2)}`;
709
+ const descriptionId = `card-desc-${Math.random().toString(36).slice(2)}`;
710
+ const cardClasses = vue.computed(() => ({
711
+ [`card--${props.variant}`]: true,
712
+ "card--interactive": props.interactive
713
+ }));
714
+ return (_ctx, _cache) => {
715
+ return vue.openBlock(), vue.createElementBlock("article", {
716
+ class: vue.normalizeClass(["card", cardClasses.value]),
717
+ "aria-labelledby": titleId,
718
+ "aria-describedby": descriptionId
719
+ }, [
720
+ _ctx.$slots.header ? (vue.openBlock(), vue.createElementBlock("header", _hoisted_1$a, [
721
+ vue.renderSlot(_ctx.$slots, "header", {}, void 0, true)
722
+ ])) : vue.createCommentVNode("", true),
723
+ vue.createElementVNode("div", _hoisted_2$a, [
724
+ __props.title ? (vue.openBlock(), vue.createElementBlock("h3", {
725
+ key: 0,
726
+ id: titleId,
727
+ class: "card__title"
728
+ }, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true),
729
+ __props.description ? (vue.openBlock(), vue.createElementBlock("p", {
730
+ key: 1,
731
+ id: descriptionId,
732
+ class: "card__description"
733
+ }, vue.toDisplayString(__props.description), 1)) : vue.createCommentVNode("", true),
734
+ vue.renderSlot(_ctx.$slots, "default", {}, void 0, true)
735
+ ]),
736
+ _ctx.$slots.footer ? (vue.openBlock(), vue.createElementBlock("footer", _hoisted_3$a, [
737
+ vue.renderSlot(_ctx.$slots, "footer", {}, void 0, true)
738
+ ])) : vue.createCommentVNode("", true)
739
+ ], 2);
740
+ };
741
+ }
742
+ });
743
+
744
+ const Card = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-2b489100"]]);
688
745
 
689
746
  var SpinnerLoaderSize = /* @__PURE__ */ ((SpinnerLoaderSize2) => {
690
747
  SpinnerLoaderSize2["SMALL"] = "sm";
@@ -2771,6 +2828,7 @@
2771
2828
  HpButtonPrimary,
2772
2829
  HpButtonSecondary,
2773
2830
  HpButtonTertiary: ButtonTertiary,
2831
+ HpCard: Card,
2774
2832
  HpCheckbox: Checkbox,
2775
2833
  HpHeading: Heading,
2776
2834
  HpIcon,
@@ -2827,6 +2885,7 @@
2827
2885
  exports.HpButtonPrimary = HpButtonPrimary;
2828
2886
  exports.HpButtonSecondary = HpButtonSecondary;
2829
2887
  exports.HpButtonTertiary = ButtonTertiary;
2888
+ exports.HpCard = Card;
2830
2889
  exports.HpCheckbox = Checkbox;
2831
2890
  exports.HpHeading = Heading;
2832
2891
  exports.HpIcon = HpIcon;