@topjoao/top-design-system 0.1.0-beta.11 → 0.1.0-beta.12

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.
@@ -424,17 +424,20 @@ var z = { class: "top-button top-solutions-component h-fit w-fit rounded-[12px]
424
424
  key: 0,
425
425
  "aria-hidden": "true",
426
426
  class: "text-red-600 dark:text-red-400"
427
- }, ie = { class: "flex min-h-[130px] w-full flex-col items-center justify-center gap-3" }, ae = { class: "m-0 text-center text-xs text-secondary-600 dark:text-zinc-300" }, oe = {
427
+ }, ie = { class: "flex min-h-[130px] w-full flex-col items-center justify-center gap-3" }, ae = {
428
+ class: "top-file-upload__empty-icon",
429
+ "aria-hidden": "true"
430
+ }, oe = { class: "m-0 text-center text-xs text-secondary-600 dark:text-zinc-300" }, se = {
428
431
  key: 1,
429
432
  class: "flex w-full flex-col gap-2"
430
- }, se = ["src", "alt"], ce = {
433
+ }, ce = ["src", "alt"], le = {
431
434
  key: 1,
432
435
  class: "flex size-12 shrink-0 items-center justify-center rounded-lg bg-primary-50 text-primary-800 dark:bg-primary-950 dark:text-primary-200"
433
- }, le = { class: "min-w-0 flex-1" }, ue = { class: "m-0 truncate text-xs font-bold text-secondary-900 dark:text-zinc-100" }, de = { class: "text-[11px] text-secondary-500 dark:text-zinc-400" }, fe = [
436
+ }, ue = { class: "min-w-0 flex-1" }, de = { class: "m-0 truncate text-xs font-bold text-secondary-900 dark:text-zinc-100" }, fe = { class: "text-[11px] text-secondary-500 dark:text-zinc-400" }, pe = [
434
437
  "aria-label",
435
438
  "disabled",
436
439
  "onClick"
437
- ], pe = ["id"], me = /* @__PURE__ */ l({
440
+ ], me = ["id"], he = /* @__PURE__ */ l({
438
441
  inheritAttrs: !1,
439
442
  __name: "TopFileUpload",
440
443
  props: {
@@ -551,7 +554,7 @@ var z = { class: "top-button top-solutions-component h-fit w-fit rounded-[12px]
551
554
  function Z() {
552
555
  L.value || k.value?.choose();
553
556
  }
554
- function me(e, t) {
557
+ function he(e, t) {
555
558
  if (L.value) return;
556
559
  let n = A.value[t];
557
560
  if (!n) return;
@@ -559,7 +562,7 @@ var z = { class: "top-button top-solutions-component h-fit w-fit rounded-[12px]
559
562
  let r = A.value.filter((e, n) => n !== t);
560
563
  Y(r, "remove"), m("remove", n, t), r.length || m("clear");
561
564
  }
562
- function he() {
565
+ function ge() {
563
566
  L.value || !A.value.length || Y([], "clear");
564
567
  }
565
568
  function Q(e) {
@@ -583,7 +586,7 @@ var z = { class: "top-button top-solutions-component h-fit w-fit rounded-[12px]
583
586
  M.clear();
584
587
  }), l({
585
588
  choose: Z,
586
- clear: he
589
+ clear: ge
587
590
  }), (t, l) => (v(), i("div", te, [
588
591
  o.label ? (v(), i("label", {
589
592
  key: 0,
@@ -605,14 +608,14 @@ var z = { class: "top-button top-solutions-component h-fit w-fit rounded-[12px]
605
608
  header: { class: "hidden" },
606
609
  input: z.value,
607
610
  content: { class: [
608
- "top-file-upload__dropzone min-h-[164px] rounded-[10px] border border-dashed p-4 transition-colors",
609
- I.value ? "border-red-600 bg-red-50 dark:border-red-400 dark:bg-red-950/20" : "border-secondary-400 bg-secondary-50 hover:border-primary-600 hover:bg-primary-50 dark:border-zinc-600 dark:bg-zinc-800 dark:hover:border-primary-400 dark:hover:bg-zinc-700",
611
+ "top-file-upload__dropzone min-h-[224px] rounded-[10px] border p-4 transition-colors",
612
+ I.value ? "border-red-600 bg-red-50 dark:border-red-400 dark:bg-red-950/20" : "border-secondary-300 bg-white hover:border-primary-600 hover:bg-primary-50 dark:border-zinc-600 dark:bg-zinc-800 dark:hover:border-primary-400 dark:hover:bg-zinc-700",
610
613
  L.value ? "cursor-not-allowed opacity-60" : ""
611
614
  ].join(" ") }
612
615
  },
613
616
  onSelect: ee
614
617
  }, {
615
- content: O(({ removeFileCallback: s }) => [a("div", ie, [A.value.length ? (v(), i("div", oe, [(v(!0), i(e, null, b(A.value, (e, n) => (v(), i("div", {
618
+ content: O(({ removeFileCallback: s }) => [a("div", ie, [A.value.length ? (v(), i("div", se, [(v(!0), i(e, null, b(A.value, (e, n) => (v(), i("div", {
616
619
  key: `${e.name}-${e.size}-${e.lastModified}`,
617
620
  class: "flex min-w-0 items-center gap-3 rounded-[10px] border border-secondary-300 bg-white p-3 dark:border-zinc-600 dark:bg-zinc-900"
618
621
  }, [
@@ -625,21 +628,21 @@ var z = { class: "top-button top-solutions-component h-fit w-fit rounded-[12px]
625
628
  src: Q(e),
626
629
  alt: `Pré-visualização de ${e.name}`,
627
630
  class: "size-12 shrink-0 rounded-lg object-cover"
628
- }, null, 8, se)) : (v(), i("span", ce, [...l[0] ||= [a("i", {
631
+ }, null, 8, ce)) : (v(), i("span", le, [...l[0] ||= [a("i", {
629
632
  class: "pi pi-file text-2xl",
630
633
  "aria-hidden": "true"
631
634
  }, null, -1)]]))]),
632
- a("div", le, [a("p", ue, S(e.name), 1), a("span", de, S(W(e.size)), 1)]),
635
+ a("div", ue, [a("p", de, S(e.name), 1), a("span", fe, S(W(e.size)), 1)]),
633
636
  a("button", {
634
637
  type: "button",
635
638
  class: "flex size-8 shrink-0 items-center justify-center rounded-full border-0 bg-transparent p-0 text-red-600 transition-colors hover:bg-red-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-red-500 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 dark:text-red-400 dark:hover:bg-red-950/40 dark:focus-visible:ring-offset-zinc-900",
636
639
  "aria-label": `${o.removeLabel}: ${e.name}`,
637
640
  disabled: L.value,
638
- onClick: (e) => me(s, n)
641
+ onClick: (e) => he(s, n)
639
642
  }, [...l[1] ||= [a("i", {
640
643
  class: "pi pi-times",
641
644
  "aria-hidden": "true"
642
- }, null, -1)]], 8, fe)
645
+ }, null, -1)]], 8, pe)
643
646
  ]))), 128)), o.multiple && (!o.maxFiles || A.value.length < o.maxFiles) ? (v(), n(B, {
644
647
  key: 0,
645
648
  label: o.selectLabel,
@@ -657,11 +660,8 @@ var z = { class: "top-button top-solutions-component h-fit w-fit rounded-[12px]
657
660
  choose: Z,
658
661
  disabled: L.value
659
662
  }, () => [
660
- a("i", {
661
- class: p([o.loading ? "pi pi-spin pi-spinner" : "pi pi-cloud-upload", "text-4xl text-primary-800 dark:text-primary-300"]),
662
- "aria-hidden": "true"
663
- }, null, 2),
664
- a("p", ae, S(o.placeholder), 1),
663
+ a("span", ae, [a("i", { class: p([o.loading ? "pi pi-spin pi-spinner" : "pi pi-cloud-upload", "text-5xl"]) }, null, 2)]),
664
+ a("p", oe, S(o.placeholder), 1),
665
665
  c(B, {
666
666
  label: o.selectLabel,
667
667
  icon: "pi pi-plus-circle",
@@ -687,14 +687,14 @@ var z = { class: "top-button top-solutions-component h-fit w-fit rounded-[12px]
687
687
  id: P.value,
688
688
  class: "text-[11px] text-red-600 dark:text-red-400",
689
689
  role: "alert"
690
- }, S(I.value), 9, pe)) : r("", !0)
690
+ }, S(I.value), 9, me)) : r("", !0)
691
691
  ]));
692
692
  }
693
- }), he = { class: "top-input-text top-solutions-component flex w-full flex-col gap-1" }, Q = ["for"], $ = {
693
+ }), ge = { class: "top-input-text top-solutions-component flex w-full flex-col gap-1" }, Q = ["for"], $ = {
694
694
  key: 0,
695
695
  "aria-hidden": "true",
696
696
  class: "text-red-600 dark:text-red-400"
697
- }, ge = ["id"], _e = /* @__PURE__ */ l({
697
+ }, _e = ["id"], ve = /* @__PURE__ */ l({
698
698
  inheritAttrs: !1,
699
699
  __name: "TopInputText",
700
700
  props: {
@@ -728,7 +728,7 @@ var z = { class: "top-button top-solutions-component h-fit w-fit rounded-[12px]
728
728
  function g(e) {
729
729
  o("update:modelValue", e ?? "");
730
730
  }
731
- return (t, n) => (v(), i("div", he, [
731
+ return (t, n) => (v(), i("div", ge, [
732
732
  e.label ? (v(), i("label", {
733
733
  key: 0,
734
734
  for: f.value,
@@ -764,44 +764,44 @@ var z = { class: "top-button top-solutions-component h-fit w-fit rounded-[12px]
764
764
  id: p.value,
765
765
  class: "text-[11px] text-red-600 dark:text-red-400",
766
766
  role: "alert"
767
- }, S(e.error), 9, ge)) : r("", !0)
767
+ }, S(e.error), 9, _e)) : r("", !0)
768
768
  ]));
769
769
  }
770
- }), ve = { class: "top-field-icon pointer-events-none absolute left-3 top-1/2 z-10 -translate-y-1/2" }, ye = {
770
+ }), ye = { class: "top-field-icon pointer-events-none absolute left-3 top-1/2 z-10 -translate-y-1/2" }, be = {
771
771
  key: 0,
772
772
  class: "pi pi-spin pi-spinner"
773
- }, be = {
773
+ }, xe = {
774
774
  key: 1,
775
775
  class: "pi pi-search"
776
- }, xe = {
776
+ }, Se = {
777
777
  key: 1,
778
778
  class: "flex items-center gap-1 !text-sm"
779
- }, Se = { class: "flex items-center gap-2 rounded-[9px] bg-primary-500 px-2 py-1 text-white" }, Ce = ["onClick"], we = { class: "line-clamp-1 max-w-[300px] overflow-hidden text-ellipsis" }, Te = {
779
+ }, Ce = { class: "flex items-center gap-2 rounded-[9px] bg-primary-500 px-2 py-1 text-white" }, we = ["onClick"], Te = { class: "line-clamp-1 max-w-[300px] overflow-hidden text-ellipsis" }, Ee = {
780
780
  key: 1,
781
781
  class: "flex min-h-[100px] flex-col items-center justify-center gap-2 py-2"
782
- }, Ee = {
782
+ }, De = {
783
783
  key: 0,
784
784
  class: "text-xs font-medium text-primary-600"
785
- }, De = {
785
+ }, Oe = {
786
786
  key: 2,
787
787
  class: "text-xs text-secondary-500"
788
- }, Oe = { key: 1 }, ke = {
788
+ }, ke = { key: 1 }, Ae = {
789
789
  key: 1,
790
790
  class: "flex items-center gap-2 font-semibold"
791
- }, Ae = {
791
+ }, je = {
792
792
  key: 1,
793
793
  class: "flex w-full min-w-0 items-start gap-2 overflow-hidden px-2 py-3 text-sm",
794
794
  style: { "white-space": "normal" }
795
- }, je = ["title"], Me = {
795
+ }, Me = ["title"], Ne = {
796
796
  key: 0,
797
797
  class: "top-select-option-prefix whitespace-nowrap font-bold text-primary-800 dark:text-primary-100"
798
- }, Ne = {
798
+ }, Pe = {
799
799
  key: 0,
800
800
  class: "rounded-sm bg-primary-200 p-0 font-bold text-black dark:bg-cyan-700 dark:text-white"
801
- }, Pe = {
801
+ }, Fe = {
802
802
  key: 0,
803
803
  class: "rounded-sm bg-primary-200 p-0 font-bold text-black dark:bg-cyan-700 dark:text-white"
804
- }, Fe = /* @__PURE__ */ l({
804
+ }, Ie = /* @__PURE__ */ l({
805
805
  __name: "TopSelect",
806
806
  props: {
807
807
  modelValue: { default: null },
@@ -929,7 +929,7 @@ var z = { class: "top-button top-solutions-component h-fit w-fit rounded-[12px]
929
929
  }), (t, l) => (v(), i("div", {
930
930
  class: p(["top-select top-solutions-component relative w-full", { "pointer-events-none": n.disabled }]),
931
931
  onFocusin: J
932
- }, [a("span", ve, [x(t.$slots, "icon", { loading: n.loading }, () => [n.loading ? (v(), i("i", ye)) : (v(), i("i", be))])]), c(C(M), {
932
+ }, [a("span", ye, [x(t.$slots, "icon", { loading: n.loading }, () => [n.loading ? (v(), i("i", be)) : (v(), i("i", xe))])]), c(C(M), {
933
933
  ref_key: "autocompleteRef",
934
934
  ref: F,
935
935
  modelValue: z.value,
@@ -999,18 +999,18 @@ var z = { class: "top-button top-solutions-component h-fit w-fit rounded-[12px]
999
999
  },
1000
1000
  onChange: l[4] ||= (e) => T("change", e)
1001
1001
  }, o({
1002
- chip: O((e) => [C(A).chip ? x(t.$slots, "chip", m(u(e)), void 0, void 0, 0) : (v(), i("div", xe, [a("div", Se, [a("i", {
1002
+ chip: O((e) => [C(A).chip ? x(t.$slots, "chip", m(u(e)), void 0, void 0, 0) : (v(), i("div", Se, [a("div", Ce, [a("i", {
1003
1003
  class: "pi pi-times-circle shrink-0 cursor-pointer rounded-full hover:bg-primary-800",
1004
1004
  onClick: (t) => e.removeCallback(t)
1005
- }, null, 8, Ce), k((v(), i("span", we, [s(S(U(e.value)), 1)])), [[
1005
+ }, null, 8, we), k((v(), i("span", Te, [s(S(U(e.value)), 1)])), [[
1006
1006
  C(j),
1007
1007
  U(e.value),
1008
1008
  void 0,
1009
1009
  { top: !0 }
1010
1010
  ]])])]))]),
1011
- empty: O(() => [C(A).empty ? x(t.$slots, "empty", {}, void 0, void 0, 0) : n.loading ? (v(), i("div", Te, [l[5] ||= a("span", { class: "pi pi-spin pi-spinner text-2xl text-primary-600" }, null, -1), n.showLoadingMessage ? (v(), i("span", Ee, S(n.loadingMessage), 1)) : r("", !0)])) : (v(), i("span", De, S(n.emptyMessage), 1))]),
1012
- "selected-item": O((e) => [C(A)["selected-item"] ? x(t.$slots, "selected-item", m(u(e)), void 0, void 0, 0) : e.item ? (v(), i("span", Oe, S(U(e.item)), 1)) : r("", !0)]),
1013
- optiongroup: O((e) => [C(A)["option-group"] ? x(t.$slots, "option-group", m(u(e)), void 0, void 0, 0) : (v(), i("div", ke, [e.option.icon ? (v(), i("i", {
1011
+ empty: O(() => [C(A).empty ? x(t.$slots, "empty", {}, void 0, void 0, 0) : n.loading ? (v(), i("div", Ee, [l[5] ||= a("span", { class: "pi pi-spin pi-spinner text-2xl text-primary-600" }, null, -1), n.showLoadingMessage ? (v(), i("span", De, S(n.loadingMessage), 1)) : r("", !0)])) : (v(), i("span", Oe, S(n.emptyMessage), 1))]),
1012
+ "selected-item": O((e) => [C(A)["selected-item"] ? x(t.$slots, "selected-item", m(u(e)), void 0, void 0, 0) : e.item ? (v(), i("span", ke, S(U(e.item)), 1)) : r("", !0)]),
1013
+ optiongroup: O((e) => [C(A)["option-group"] ? x(t.$slots, "option-group", m(u(e)), void 0, void 0, 0) : (v(), i("div", Ae, [e.option.icon ? (v(), i("i", {
1014
1014
  key: 0,
1015
1015
  class: p(e.option.icon)
1016
1016
  }, null, 2)) : r("", !0), a("span", null, S(e.option[n.optionGroupLabel ?? "label"]), 1)]))]),
@@ -1018,10 +1018,10 @@ var z = { class: "top-button top-solutions-component h-fit w-fit rounded-[12px]
1018
1018
  label: V(o.option),
1019
1019
  prefix: H(o.option),
1020
1020
  query: N.value
1021
- }), void 0, void 0, 0) : k((v(), i("div", Ae, [a("span", {
1021
+ }), void 0, void 0, 0) : k((v(), i("div", je, [a("span", {
1022
1022
  class: "top-select-option-label line-clamp-2 min-w-0 flex-1 text-secondary-700 dark:text-zinc-200",
1023
1023
  title: V(o.option)
1024
- }, [n.showOptionPrefix && H(o.option) ? (v(), i("span", Me, [(v(!0), i(e, null, b(W(H(o.option)), (t, n) => (v(), i(e, { key: n }, [t.highlighted ? (v(), i("mark", Ne, S(t.text), 1)) : (v(), i(e, { key: 1 }, [s(S(t.text), 1)], 64))], 64))), 128)), l[6] ||= a("span", { class: "font-bold text-secondary-500 dark:text-zinc-400" }, "\xA0-\xA0", -1)])) : r("", !0), (v(!0), i(e, null, b(W(V(o.option)), (t, n) => (v(), i(e, { key: n }, [t.highlighted ? (v(), i("mark", Pe, S(t.text), 1)) : (v(), i(e, { key: 1 }, [s(S(t.text), 1)], 64))], 64))), 128))], 8, je)])), [[
1024
+ }, [n.showOptionPrefix && H(o.option) ? (v(), i("span", Ne, [(v(!0), i(e, null, b(W(H(o.option)), (t, n) => (v(), i(e, { key: n }, [t.highlighted ? (v(), i("mark", Pe, S(t.text), 1)) : (v(), i(e, { key: 1 }, [s(S(t.text), 1)], 64))], 64))), 128)), l[6] ||= a("span", { class: "font-bold text-secondary-500 dark:text-zinc-400" }, "\xA0-\xA0", -1)])) : r("", !0), (v(!0), i(e, null, b(W(V(o.option)), (t, n) => (v(), i(e, { key: n }, [t.highlighted ? (v(), i("mark", Fe, S(t.text), 1)) : (v(), i(e, { key: 1 }, [s(S(t.text), 1)], 64))], 64))), 128))], 8, Me)])), [[
1025
1025
  C(j),
1026
1026
  n.showTooltip ? V(o.option) : null,
1027
1027
  void 0,
@@ -1050,10 +1050,10 @@ var z = { class: "top-button top-solutions-component h-fit w-fit rounded-[12px]
1050
1050
  "pt"
1051
1051
  ])], 34));
1052
1052
  }
1053
- }), Ie = { class: "top-toast__content" }, Le = { class: "top-toast__detail" }, Re = ["onClick"], ze = {
1053
+ }), Le = { class: "top-toast__content" }, Re = { class: "top-toast__detail" }, ze = ["onClick"], Be = {
1054
1054
  key: 0,
1055
1055
  class: "top-toast__footer"
1056
- }, Be = /* @__PURE__ */ l({
1056
+ }, Ve = /* @__PURE__ */ l({
1057
1057
  __name: "TopToast",
1058
1058
  props: { baseZIndex: { default: 3e4 } },
1059
1059
  setup(e) {
@@ -1079,9 +1079,9 @@ var z = { class: "top-button top-solutions-component h-fit w-fit rounded-[12px]
1079
1079
  position: "top-right",
1080
1080
  "base-z-index": e.baseZIndex
1081
1081
  }, {
1082
- message: O((e) => [a("div", Ie, [
1082
+ message: O((e) => [a("div", Le, [
1083
1083
  a("div", { class: p(["top-toast__summary", d(e.message, "summary")]) }, S(e.message.summary), 3),
1084
- a("div", Le, S(e.message.detail), 1),
1084
+ a("div", Re, S(e.message.detail), 1),
1085
1085
  u(e.message) ? x(f.$slots, "action", {
1086
1086
  action: o(e.message),
1087
1087
  message: e.message,
@@ -1095,17 +1095,17 @@ var z = { class: "top-button top-solutions-component h-fit w-fit rounded-[12px]
1095
1095
  key: 0,
1096
1096
  class: p(o(e.message)?.icon),
1097
1097
  "aria-hidden": "true"
1098
- }, null, 2)) : r("", !0), s(" " + S(o(e.message)?.label), 1)], 10, Re)) : r("", !0)], void 0, 0) : r("", !0),
1098
+ }, null, 2)) : r("", !0), s(" " + S(o(e.message)?.label), 1)], 10, ze)) : r("", !0)], void 0, 0) : r("", !0),
1099
1099
  l(e.message) ? x(f.$slots, "footer", {
1100
1100
  message: e.message,
1101
1101
  footer: t(e.message)
1102
- }, () => [t(e.message) === void 0 ? r("", !0) : (v(), i("div", ze, S(t(e.message)), 1))], void 0, 1) : r("", !0)
1102
+ }, () => [t(e.message) === void 0 ? r("", !0) : (v(), i("div", Be, S(t(e.message)), 1))], void 0, 1) : r("", !0)
1103
1103
  ])]),
1104
1104
  _: 3
1105
1105
  }, 8, ["base-z-index"]));
1106
1106
  }
1107
1107
  });
1108
1108
  //#endregion
1109
- export { Z as a, B as c, me as i, Fe as n, q as o, _e as r, V as s, Be as t };
1109
+ export { Z as a, B as c, he as i, Ie as n, q as o, ve as r, V as s, Ve as t };
1110
1110
 
1111
- //# sourceMappingURL=TopToast-Bp0e2ch-.js.map
1111
+ //# sourceMappingURL=TopToast-B8ruKpjL.js.map