@henriquepetrelli/hp-design-system 1.1.23 → 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.
- package/dist/hp-design-system.es.js +104 -46
- package/dist/hp-design-system.es.js.map +1 -1
- package/dist/hp-design-system.umd.js +103 -44
- package/dist/hp-design-system.umd.js.map +1 -1
- package/dist/style.css +53 -2
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent, computed, createElementBlock, openBlock, normalizeStyle, normalizeClass, createElementVNode, unref, createCommentVNode, createVNode, toDisplayString, createBlock, onMounted, onUnmounted, Fragment, renderList, ref, watch,
|
|
1
|
+
import { defineComponent, computed, createElementBlock, openBlock, normalizeStyle, normalizeClass, createElementVNode, unref, createCommentVNode, createVNode, toDisplayString, createBlock, onMounted, onUnmounted, renderSlot, Fragment, renderList, ref, watch, resolveDynamicComponent, withCtx, Transition, withModifiers, withKeys, withDirectives, vModelCheckbox, onBeforeUnmount, createTextVNode, vModelText, vShow } from 'vue';
|
|
2
2
|
|
|
3
3
|
var ButtonColor = /* @__PURE__ */ ((ButtonColor2) => {
|
|
4
4
|
ButtonColor2["PRIMARY"] = "primary";
|
|
@@ -19,8 +19,8 @@ var ButtonSize = /* @__PURE__ */ ((ButtonSize2) => {
|
|
|
19
19
|
return ButtonSize2;
|
|
20
20
|
})(ButtonSize || {});
|
|
21
21
|
|
|
22
|
-
const _hoisted_1$
|
|
23
|
-
const _sfc_main$
|
|
22
|
+
const _hoisted_1$h = ["xlink:href"];
|
|
23
|
+
const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
24
24
|
__name: "Icon",
|
|
25
25
|
props: {
|
|
26
26
|
name: {
|
|
@@ -54,7 +54,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
54
54
|
}, [
|
|
55
55
|
createElementVNode("use", {
|
|
56
56
|
"xlink:href": `#icon-${__props.name}`
|
|
57
|
-
}, null, 8, _hoisted_1$
|
|
57
|
+
}, null, 8, _hoisted_1$h)
|
|
58
58
|
], 6);
|
|
59
59
|
};
|
|
60
60
|
}
|
|
@@ -68,18 +68,18 @@ const _export_sfc = (sfc, props) => {
|
|
|
68
68
|
return target;
|
|
69
69
|
};
|
|
70
70
|
|
|
71
|
-
const HpIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
71
|
+
const HpIcon = /* @__PURE__ */ _export_sfc(_sfc_main$j, [["__scopeId", "data-v-0b477588"]]);
|
|
72
72
|
|
|
73
|
-
const _hoisted_1$
|
|
74
|
-
const _hoisted_2$
|
|
73
|
+
const _hoisted_1$g = ["aria-label", "aria-disabled", "disabled"];
|
|
74
|
+
const _hoisted_2$f = {
|
|
75
75
|
key: 0,
|
|
76
76
|
class: "button-primary__icon--left"
|
|
77
77
|
};
|
|
78
|
-
const _hoisted_3$
|
|
78
|
+
const _hoisted_3$d = {
|
|
79
79
|
key: 1,
|
|
80
80
|
class: "button-primary__icon--right"
|
|
81
81
|
};
|
|
82
|
-
const _sfc_main$
|
|
82
|
+
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
83
83
|
__name: "ButtonPrimary",
|
|
84
84
|
props: {
|
|
85
85
|
label: {
|
|
@@ -152,7 +152,7 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
152
152
|
disabled: __props.disabled,
|
|
153
153
|
onClick: handleClick
|
|
154
154
|
}, [
|
|
155
|
-
__props.icon && __props.iconPosition === unref(IconPosition).LEFT ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
155
|
+
__props.icon && __props.iconPosition === unref(IconPosition).LEFT ? (openBlock(), createElementBlock("span", _hoisted_2$f, [
|
|
156
156
|
createVNode(HpIcon, {
|
|
157
157
|
name: __props.icon,
|
|
158
158
|
size: "sm",
|
|
@@ -163,31 +163,31 @@ const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
|
163
163
|
class: "button-primary__label",
|
|
164
164
|
style: normalizeStyle({ color: computedColor.value })
|
|
165
165
|
}, toDisplayString(__props.label), 5),
|
|
166
|
-
__props.icon && __props.iconPosition === unref(IconPosition).RIGHT ? (openBlock(), createElementBlock("span", _hoisted_3$
|
|
166
|
+
__props.icon && __props.iconPosition === unref(IconPosition).RIGHT ? (openBlock(), createElementBlock("span", _hoisted_3$d, [
|
|
167
167
|
createVNode(HpIcon, {
|
|
168
168
|
name: __props.icon,
|
|
169
169
|
size: "sm",
|
|
170
170
|
color: computedColor.value
|
|
171
171
|
}, null, 8, ["name", "color"])
|
|
172
172
|
])) : createCommentVNode("", true)
|
|
173
|
-
], 14, _hoisted_1$
|
|
173
|
+
], 14, _hoisted_1$g);
|
|
174
174
|
};
|
|
175
175
|
}
|
|
176
176
|
});
|
|
177
177
|
|
|
178
|
-
const HpButtonPrimary = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
178
|
+
const HpButtonPrimary = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__scopeId", "data-v-5c29dcce"]]);
|
|
179
179
|
|
|
180
|
-
const _hoisted_1$
|
|
181
|
-
const _hoisted_2$
|
|
180
|
+
const _hoisted_1$f = ["aria-label", "aria-disabled", "disabled"];
|
|
181
|
+
const _hoisted_2$e = {
|
|
182
182
|
key: 0,
|
|
183
183
|
class: "button-secondary__icon--left"
|
|
184
184
|
};
|
|
185
|
-
const _hoisted_3$
|
|
185
|
+
const _hoisted_3$c = { class: "button-secondary__label" };
|
|
186
186
|
const _hoisted_4$8 = {
|
|
187
187
|
key: 1,
|
|
188
188
|
class: "button-secondary__icon--right"
|
|
189
189
|
};
|
|
190
|
-
const _sfc_main$
|
|
190
|
+
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
191
191
|
__name: "ButtonSecondary",
|
|
192
192
|
props: {
|
|
193
193
|
label: {
|
|
@@ -245,37 +245,37 @@ const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
|
245
245
|
disabled: __props.disabled,
|
|
246
246
|
onClick: handleClick
|
|
247
247
|
}, [
|
|
248
|
-
__props.icon && __props.iconPosition === unref(IconPosition).LEFT ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
248
|
+
__props.icon && __props.iconPosition === unref(IconPosition).LEFT ? (openBlock(), createElementBlock("span", _hoisted_2$e, [
|
|
249
249
|
createVNode(HpIcon, {
|
|
250
250
|
name: __props.icon,
|
|
251
251
|
size: "sm"
|
|
252
252
|
}, null, 8, ["name"])
|
|
253
253
|
])) : createCommentVNode("", true),
|
|
254
|
-
createElementVNode("span", _hoisted_3$
|
|
254
|
+
createElementVNode("span", _hoisted_3$c, toDisplayString(__props.label), 1),
|
|
255
255
|
__props.icon && __props.iconPosition === unref(IconPosition).RIGHT ? (openBlock(), createElementBlock("span", _hoisted_4$8, [
|
|
256
256
|
createVNode(HpIcon, {
|
|
257
257
|
name: __props.icon,
|
|
258
258
|
size: "sm"
|
|
259
259
|
}, null, 8, ["name"])
|
|
260
260
|
])) : createCommentVNode("", true)
|
|
261
|
-
], 14, _hoisted_1$
|
|
261
|
+
], 14, _hoisted_1$f);
|
|
262
262
|
};
|
|
263
263
|
}
|
|
264
264
|
});
|
|
265
265
|
|
|
266
|
-
const HpButtonSecondary = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
266
|
+
const HpButtonSecondary = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__scopeId", "data-v-ce9350e4"]]);
|
|
267
267
|
|
|
268
|
-
const _hoisted_1$
|
|
269
|
-
const _hoisted_2$
|
|
268
|
+
const _hoisted_1$e = ["aria-label", "aria-disabled", "disabled"];
|
|
269
|
+
const _hoisted_2$d = {
|
|
270
270
|
key: 0,
|
|
271
271
|
class: "button-tertiary__icon--left"
|
|
272
272
|
};
|
|
273
|
-
const _hoisted_3$
|
|
273
|
+
const _hoisted_3$b = { class: "button-tertiary__label" };
|
|
274
274
|
const _hoisted_4$7 = {
|
|
275
275
|
key: 1,
|
|
276
276
|
class: "button-tertiary__icon--right"
|
|
277
277
|
};
|
|
278
|
-
const _sfc_main$
|
|
278
|
+
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
279
279
|
__name: "ButtonTertiary",
|
|
280
280
|
props: {
|
|
281
281
|
label: {
|
|
@@ -333,25 +333,25 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
333
333
|
disabled: __props.disabled,
|
|
334
334
|
onClick: handleClick
|
|
335
335
|
}, [
|
|
336
|
-
__props.icon && __props.iconPosition === unref(IconPosition).LEFT ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
336
|
+
__props.icon && __props.iconPosition === unref(IconPosition).LEFT ? (openBlock(), createElementBlock("span", _hoisted_2$d, [
|
|
337
337
|
createVNode(HpIcon, {
|
|
338
338
|
name: __props.icon,
|
|
339
339
|
size: "sm"
|
|
340
340
|
}, null, 8, ["name"])
|
|
341
341
|
])) : createCommentVNode("", true),
|
|
342
|
-
createElementVNode("span", _hoisted_3$
|
|
342
|
+
createElementVNode("span", _hoisted_3$b, toDisplayString(__props.label), 1),
|
|
343
343
|
__props.icon && __props.iconPosition === unref(IconPosition).RIGHT ? (openBlock(), createElementBlock("span", _hoisted_4$7, [
|
|
344
344
|
createVNode(HpIcon, {
|
|
345
345
|
name: __props.icon,
|
|
346
346
|
size: "sm"
|
|
347
347
|
}, null, 8, ["name"])
|
|
348
348
|
])) : createCommentVNode("", true)
|
|
349
|
-
], 14, _hoisted_1$
|
|
349
|
+
], 14, _hoisted_1$e);
|
|
350
350
|
};
|
|
351
351
|
}
|
|
352
352
|
});
|
|
353
353
|
|
|
354
|
-
const ButtonTertiary = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
354
|
+
const ButtonTertiary = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__scopeId", "data-v-0401b00e"]]);
|
|
355
355
|
|
|
356
356
|
var ButtonIconSize = /* @__PURE__ */ ((ButtonIconSize2) => {
|
|
357
357
|
ButtonIconSize2["SMALL"] = "sm";
|
|
@@ -378,8 +378,8 @@ const convertHexToRgb = (color) => {
|
|
|
378
378
|
return "";
|
|
379
379
|
};
|
|
380
380
|
|
|
381
|
-
const _hoisted_1$
|
|
382
|
-
const _sfc_main$
|
|
381
|
+
const _hoisted_1$d = ["aria-label", "tabindex", "aria-disabled", "disabled"];
|
|
382
|
+
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
383
383
|
__name: "ButtonIcon",
|
|
384
384
|
props: {
|
|
385
385
|
label: {
|
|
@@ -469,12 +469,12 @@ const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
|
469
469
|
size: __props.size,
|
|
470
470
|
speed: 0.8
|
|
471
471
|
}, null, 8, ["color", "secondaryColor", "size"]))
|
|
472
|
-
], 14, _hoisted_1$
|
|
472
|
+
], 14, _hoisted_1$d);
|
|
473
473
|
};
|
|
474
474
|
}
|
|
475
475
|
});
|
|
476
476
|
|
|
477
|
-
const HpButtonIcon = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
477
|
+
const HpButtonIcon = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__scopeId", "data-v-8cf8a123"]]);
|
|
478
478
|
|
|
479
479
|
var ButtonLetterSize = /* @__PURE__ */ ((ButtonLetterSize2) => {
|
|
480
480
|
ButtonLetterSize2["SMALL"] = "sm";
|
|
@@ -483,9 +483,9 @@ var ButtonLetterSize = /* @__PURE__ */ ((ButtonLetterSize2) => {
|
|
|
483
483
|
return ButtonLetterSize2;
|
|
484
484
|
})(ButtonLetterSize || {});
|
|
485
485
|
|
|
486
|
-
const _hoisted_1$
|
|
487
|
-
const _hoisted_2$
|
|
488
|
-
const _sfc_main$
|
|
486
|
+
const _hoisted_1$c = ["aria-label", "aria-disabled", "disabled", "tabindex"];
|
|
487
|
+
const _hoisted_2$c = { key: 0 };
|
|
488
|
+
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
489
489
|
__name: "ButtonLetter",
|
|
490
490
|
props: {
|
|
491
491
|
label: {
|
|
@@ -568,7 +568,7 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
568
568
|
color: computedLetterColor.value
|
|
569
569
|
})
|
|
570
570
|
}, [
|
|
571
|
-
!__props.isLoading ? (openBlock(), createElementBlock("span", _hoisted_2$
|
|
571
|
+
!__props.isLoading ? (openBlock(), createElementBlock("span", _hoisted_2$c, toDisplayString(__props.letter), 1)) : (openBlock(), createBlock(unref(_sfc_main$b), {
|
|
572
572
|
key: 1,
|
|
573
573
|
type: "circle1",
|
|
574
574
|
color: computedLetterColor.value || "var(--color-primary)",
|
|
@@ -576,12 +576,12 @@ const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
|
576
576
|
size: __props.size,
|
|
577
577
|
speed: 0.8
|
|
578
578
|
}, null, 8, ["color", "secondaryColor", "size"]))
|
|
579
|
-
], 14, _hoisted_1$
|
|
579
|
+
], 14, _hoisted_1$c);
|
|
580
580
|
};
|
|
581
581
|
}
|
|
582
582
|
});
|
|
583
583
|
|
|
584
|
-
const ButtonLetter = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
584
|
+
const ButtonLetter = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__scopeId", "data-v-13b75270"]]);
|
|
585
585
|
|
|
586
586
|
var AlertType = /* @__PURE__ */ ((AlertType2) => {
|
|
587
587
|
AlertType2["WARNING"] = "warning";
|
|
@@ -591,9 +591,9 @@ var AlertType = /* @__PURE__ */ ((AlertType2) => {
|
|
|
591
591
|
return AlertType2;
|
|
592
592
|
})(AlertType || {});
|
|
593
593
|
|
|
594
|
-
const _hoisted_1$
|
|
595
|
-
const _hoisted_2$
|
|
596
|
-
const _sfc_main$
|
|
594
|
+
const _hoisted_1$b = { class: "alert" };
|
|
595
|
+
const _hoisted_2$b = { class: "alert__container__message" };
|
|
596
|
+
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
597
597
|
__name: "Alert",
|
|
598
598
|
props: {
|
|
599
599
|
message: {
|
|
@@ -656,7 +656,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
656
656
|
return props.type;
|
|
657
657
|
});
|
|
658
658
|
return (_ctx, _cache) => {
|
|
659
|
-
return openBlock(), createElementBlock("section", _hoisted_1$
|
|
659
|
+
return openBlock(), createElementBlock("section", _hoisted_1$b, [
|
|
660
660
|
createElementVNode("div", {
|
|
661
661
|
class: "alert__container",
|
|
662
662
|
style: normalizeStyle({
|
|
@@ -664,7 +664,7 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
664
664
|
"--color": computedColorType.value
|
|
665
665
|
})
|
|
666
666
|
}, [
|
|
667
|
-
createElementVNode("p", _hoisted_2$
|
|
667
|
+
createElementVNode("p", _hoisted_2$b, toDisplayString(__props.message), 1),
|
|
668
668
|
createVNode(unref(HpButtonIcon), {
|
|
669
669
|
class: "alert__container__icon",
|
|
670
670
|
label: "Fechar modal",
|
|
@@ -680,7 +680,64 @@ const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
|
680
680
|
}
|
|
681
681
|
});
|
|
682
682
|
|
|
683
|
-
const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$
|
|
683
|
+
const Alert = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__scopeId", "data-v-10dcca72"]]);
|
|
684
|
+
|
|
685
|
+
const _hoisted_1$a = {
|
|
686
|
+
key: 0,
|
|
687
|
+
class: "card__header"
|
|
688
|
+
};
|
|
689
|
+
const _hoisted_2$a = { class: "card__body" };
|
|
690
|
+
const _hoisted_3$a = {
|
|
691
|
+
key: 1,
|
|
692
|
+
class: "card__footer"
|
|
693
|
+
};
|
|
694
|
+
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
695
|
+
__name: "Card",
|
|
696
|
+
props: {
|
|
697
|
+
title: { type: String, default: "" },
|
|
698
|
+
description: { type: String, default: "" },
|
|
699
|
+
variant: { type: String, default: "default" },
|
|
700
|
+
interactive: { type: Boolean, default: false }
|
|
701
|
+
},
|
|
702
|
+
setup(__props) {
|
|
703
|
+
const props = __props;
|
|
704
|
+
const titleId = `card-title-${Math.random().toString(36).slice(2)}`;
|
|
705
|
+
const descriptionId = `card-desc-${Math.random().toString(36).slice(2)}`;
|
|
706
|
+
const cardClasses = computed(() => ({
|
|
707
|
+
[`card--${props.variant}`]: true,
|
|
708
|
+
"card--interactive": props.interactive
|
|
709
|
+
}));
|
|
710
|
+
return (_ctx, _cache) => {
|
|
711
|
+
return openBlock(), createElementBlock("article", {
|
|
712
|
+
class: normalizeClass(["card", cardClasses.value]),
|
|
713
|
+
"aria-labelledby": titleId,
|
|
714
|
+
"aria-describedby": descriptionId
|
|
715
|
+
}, [
|
|
716
|
+
_ctx.$slots.header ? (openBlock(), createElementBlock("header", _hoisted_1$a, [
|
|
717
|
+
renderSlot(_ctx.$slots, "header", {}, void 0, true)
|
|
718
|
+
])) : createCommentVNode("", true),
|
|
719
|
+
createElementVNode("div", _hoisted_2$a, [
|
|
720
|
+
__props.title ? (openBlock(), createElementBlock("h3", {
|
|
721
|
+
key: 0,
|
|
722
|
+
id: titleId,
|
|
723
|
+
class: "card__title"
|
|
724
|
+
}, toDisplayString(__props.title), 1)) : createCommentVNode("", true),
|
|
725
|
+
__props.description ? (openBlock(), createElementBlock("p", {
|
|
726
|
+
key: 1,
|
|
727
|
+
id: descriptionId,
|
|
728
|
+
class: "card__description"
|
|
729
|
+
}, toDisplayString(__props.description), 1)) : createCommentVNode("", true),
|
|
730
|
+
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
731
|
+
]),
|
|
732
|
+
_ctx.$slots.footer ? (openBlock(), createElementBlock("footer", _hoisted_3$a, [
|
|
733
|
+
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
734
|
+
])) : createCommentVNode("", true)
|
|
735
|
+
], 2);
|
|
736
|
+
};
|
|
737
|
+
}
|
|
738
|
+
});
|
|
739
|
+
|
|
740
|
+
const Card = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__scopeId", "data-v-2b489100"]]);
|
|
684
741
|
|
|
685
742
|
var SpinnerLoaderSize = /* @__PURE__ */ ((SpinnerLoaderSize2) => {
|
|
686
743
|
SpinnerLoaderSize2["SMALL"] = "sm";
|
|
@@ -2767,6 +2824,7 @@ const components = /*#__PURE__*/Object.freeze(/*#__PURE__*/Object.defineProperty
|
|
|
2767
2824
|
HpButtonPrimary,
|
|
2768
2825
|
HpButtonSecondary,
|
|
2769
2826
|
HpButtonTertiary: ButtonTertiary,
|
|
2827
|
+
HpCard: Card,
|
|
2770
2828
|
HpCheckbox: Checkbox,
|
|
2771
2829
|
HpHeading: Heading,
|
|
2772
2830
|
HpIcon,
|
|
@@ -2817,5 +2875,5 @@ const index = {
|
|
|
2817
2875
|
...components
|
|
2818
2876
|
};
|
|
2819
2877
|
|
|
2820
|
-
export { Alert as HpAlert, HpButtonIcon, ButtonLetter as HpButtonLetter, HpButtonPrimary, HpButtonSecondary, ButtonTertiary as HpButtonTertiary, Checkbox as HpCheckbox, Heading as HpHeading, HpIcon, InputNumber as HpInputNumber, InputRange as HpInputRange, InputSelect as HpInputSelect, InputText as HpInputText, Modal as HpModal, RadioButton as HpRadioButton, _sfc_main$b as HpSpinnerLoader, Text as HpText, ThemeSwitcher as HpThemeSwitcher, ToggleSwitch as HpToggleSwitch, index as default };
|
|
2878
|
+
export { Alert as HpAlert, HpButtonIcon, ButtonLetter as HpButtonLetter, HpButtonPrimary, HpButtonSecondary, ButtonTertiary as HpButtonTertiary, Card as HpCard, Checkbox as HpCheckbox, Heading as HpHeading, HpIcon, InputNumber as HpInputNumber, InputRange as HpInputRange, InputSelect as HpInputSelect, InputText as HpInputText, Modal as HpModal, RadioButton as HpRadioButton, _sfc_main$b as HpSpinnerLoader, Text as HpText, ThemeSwitcher as HpThemeSwitcher, ToggleSwitch as HpToggleSwitch, index as default };
|
|
2821
2879
|
//# sourceMappingURL=hp-design-system.es.js.map
|