@skalar-saas/design-system 0.2.3 → 0.2.5

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.
@@ -592,7 +592,7 @@ const r3 = ({
592
592
  "div",
593
593
  {
594
594
  className: P(
595
- "absolute top-0 z-50",
595
+ "absolute inset-y-0 z-50",
596
596
  q === "right" ? "right-0 translate-x-full" : "left-0 -translate-x-full"
597
597
  ),
598
598
  onMouseDown: R,
@@ -4930,7 +4930,7 @@ const f4 = {
4930
4930
  )
4931
4931
  ] }) })
4932
4932
  }
4933
- ), x4 = A.lazy(() => import("./index-DOWXdrvI.js")), tg = ({ children: e }) => /* @__PURE__ */ s(aO, { fallback: /* @__PURE__ */ s("span", { children: e }), children: /* @__PURE__ */ s(x4, { children: e }) }), w4 = A.memo(({
4933
+ ), x4 = A.lazy(() => import("./index-ByK6rU3h.js")), tg = ({ children: e }) => /* @__PURE__ */ s(aO, { fallback: /* @__PURE__ */ s("span", { children: e }), children: /* @__PURE__ */ s(x4, { children: e }) }), w4 = A.memo(({
4934
4934
  messages: e,
4935
4935
  showTypingIndicator: t = !1,
4936
4936
  children: r,
@@ -6628,68 +6628,68 @@ const TV = ({
6628
6628
  "items-center",
6629
6629
  "justify-center",
6630
6630
  "p-1 bg-brand-primary-main-special rounded-8 border border-brand-primary-accent-special gap-2"
6631
- ), [i, o] = G(null), l = le(null);
6631
+ ), [i, o] = G(null);
6632
6632
  return ve(() => {
6633
- const u = (d) => {
6634
- l.current && !l.current.contains(d.target) && o(null);
6633
+ const c = (u) => {
6634
+ u.target?.closest("[data-floatingbar-dropdown]") || o(null);
6635
6635
  };
6636
6636
  if (i)
6637
- return document.addEventListener("mousedown", u), () => document.removeEventListener("mousedown", u);
6637
+ return document.addEventListener("mousedown", c), () => document.removeEventListener("mousedown", c);
6638
6638
  }, [i]), /* @__PURE__ */ s("div", { style: {
6639
6639
  width: r,
6640
6640
  height: n
6641
- }, className: P("flex items-center gap-4 w-fit", t), children: e.map((u, d) => /* @__PURE__ */ s("div", { className: a, children: u.map((f) => /* @__PURE__ */ s("div", { className: "relative", children: f.type === "dropdown" ? (
6641
+ }, className: P("flex items-center gap-4 w-fit", t), children: e.map((c, u) => /* @__PURE__ */ s("div", { className: a, children: c.map((d) => /* @__PURE__ */ s("div", { className: "relative", children: d.type === "dropdown" ? (
6642
6642
  /* Dropdown Action with DropMenu */
6643
- /* @__PURE__ */ w("div", { ref: l, className: "relative gap-4", children: [
6643
+ /* @__PURE__ */ w("div", { "data-floatingbar-dropdown": d.id, className: "relative gap-4", children: [
6644
6644
  /* @__PURE__ */ s(
6645
6645
  H,
6646
6646
  {
6647
- variant: f.variant || "brand",
6648
- hierarchy: f.hierarchy || "secondary",
6649
- size: f.size || "sm",
6650
- icons: f.label && f.leadingIcon ? "both" : "trailing",
6651
- leadingIcon: f.label ? f.leadingIcon : void 0,
6652
- trailingIcon: i === f.id ? /* @__PURE__ */ s(s3, {}) : /* @__PURE__ */ s(o3, {}),
6653
- onClick: () => o(i === f.id ? null : f.id),
6654
- disabled: f.disabled,
6647
+ variant: d.variant || "brand",
6648
+ hierarchy: d.hierarchy || "secondary",
6649
+ size: d.size || "sm",
6650
+ icons: d.label && d.leadingIcon ? "both" : "trailing",
6651
+ leadingIcon: d.label ? d.leadingIcon : void 0,
6652
+ trailingIcon: i === d.id ? /* @__PURE__ */ s(s3, {}) : /* @__PURE__ */ s(o3, {}),
6653
+ onClick: () => o(i === d.id ? null : d.id),
6654
+ disabled: d.disabled,
6655
6655
  style: { outline: "none", boxShadow: "none" },
6656
6656
  className: P(
6657
- f.className,
6658
- i === f.id && "bg-brand-primary-accent-special"
6657
+ d.className,
6658
+ i === d.id && "bg-brand-primary-accent-special"
6659
6659
  ),
6660
- children: f.label ? f.label : A.isValidElement(f.leadingIcon) ? A.cloneElement(f.leadingIcon, {
6660
+ children: d.label ? d.label : A.isValidElement(d.leadingIcon) ? A.cloneElement(d.leadingIcon, {
6661
6661
  size: 18,
6662
6662
  color: "currentColor"
6663
- }) : f.leadingIcon
6663
+ }) : d.leadingIcon
6664
6664
  }
6665
6665
  ),
6666
- i === f.id && /* @__PURE__ */ s(
6666
+ i === d.id && /* @__PURE__ */ s(
6667
6667
  or,
6668
6668
  {
6669
6669
  floating: !0,
6670
- size: f.dropMenuSize || "sm",
6671
- selectedIds: f.selectedIds,
6672
- items: f.items.map((h) => ({
6673
- id: h.id,
6674
- title: h.label,
6675
- leadingIcon: h.icon,
6676
- showLeadingIcon: !!h.icon,
6677
- showDescription: f.showDescription ?? !1,
6678
- showTrailingIcon: f.showTrailingIcon ?? !1,
6679
- showTrailingText: f.showTrailingText ?? !1,
6680
- trailingText: h.trailingText,
6681
- showTag: f.showTag ?? !1,
6682
- showCheckbox: f.showCheckbox ?? !1,
6683
- disabled: h.disabled,
6684
- showDividerAfter: h.showDividerAfter,
6670
+ size: d.dropMenuSize || "sm",
6671
+ selectedIds: d.selectedIds,
6672
+ items: d.items.map((f) => ({
6673
+ id: f.id,
6674
+ title: f.label,
6675
+ leadingIcon: f.icon,
6676
+ showLeadingIcon: !!f.icon,
6677
+ showDescription: d.showDescription ?? !1,
6678
+ showTrailingIcon: d.showTrailingIcon ?? !1,
6679
+ showTrailingText: d.showTrailingText ?? !1,
6680
+ trailingText: f.trailingText,
6681
+ showTag: d.showTag ?? !1,
6682
+ showCheckbox: d.showCheckbox ?? !1,
6683
+ disabled: f.disabled,
6684
+ showDividerAfter: f.showDividerAfter,
6685
6685
  onClick: () => {
6686
- h.onClick(), o(null);
6686
+ f.onClick(), o(null);
6687
6687
  },
6688
- ...h.destructive && {
6689
- customTitleColor: f.destructiveColor || "text-danger-em"
6688
+ ...f.destructive && {
6689
+ customTitleColor: d.destructiveColor || "text-danger-em"
6690
6690
  }
6691
6691
  })),
6692
- className: P("bottom-full mb-4", f.dropMenuClassName)
6692
+ className: P("bottom-full mb-4", d.dropMenuClassName)
6693
6693
  }
6694
6694
  )
6695
6695
  ] })
@@ -6698,22 +6698,22 @@ const TV = ({
6698
6698
  /* @__PURE__ */ s(
6699
6699
  H,
6700
6700
  {
6701
- variant: f.variant || "brand",
6702
- hierarchy: f.hierarchy || "secondary",
6703
- size: f.size || "sm",
6704
- icons: f.label ? f.leadingIcon && f.trailingIcon ? "both" : f.leadingIcon ? "leading" : f.trailingIcon ? "trailing" : void 0 : "only",
6705
- leadingIcon: f.leadingIcon,
6706
- trailingIcon: f.trailingIcon,
6707
- onClick: f.onClick,
6708
- disabled: f.disabled,
6701
+ variant: d.variant || "brand",
6702
+ hierarchy: d.hierarchy || "secondary",
6703
+ size: d.size || "sm",
6704
+ icons: d.label ? d.leadingIcon && d.trailingIcon ? "both" : d.leadingIcon ? "leading" : d.trailingIcon ? "trailing" : void 0 : "only",
6705
+ leadingIcon: d.leadingIcon,
6706
+ trailingIcon: d.trailingIcon,
6707
+ onClick: d.onClick,
6708
+ disabled: d.disabled,
6709
6709
  style: { outline: "none", boxShadow: "none" },
6710
6710
  className: P(
6711
- f.className
6711
+ d.className
6712
6712
  ),
6713
- children: f.label
6713
+ children: d.label
6714
6714
  }
6715
6715
  )
6716
- ) }, f.id)) }, d)) });
6716
+ ) }, d.id)) }, u)) });
6717
6717
  }, Z4 = ({
6718
6718
  icon: e,
6719
6719
  text: t,
@@ -38952,4 +38952,4 @@ export {
38952
38952
  cN as y,
38953
38953
  Ir as z
38954
38954
  };
38955
- //# sourceMappingURL=index-DC7H6Bp7.js.map
38955
+ //# sourceMappingURL=index-D7xgKYfe.js.map