@tesouro/embedded-components-react 0.9.53 → 0.9.55

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.
@@ -9975,24 +9975,29 @@ function Kb({ className: e, ...t }) {
9975
9975
  ...t
9976
9976
  });
9977
9977
  }
9978
- function qb({ className: e, children: t, side: n = "right", showCloseButton: r = !0, closeButtonTestId: i, closeDisabled: a = !1, onEscapeKeyDown: o, onInteractOutside: s, labels: c, ...l }) {
9979
- let u = {
9978
+ function qb({ className: e, children: t, side: n = "right", showCloseButton: r = !0, closeButtonTestId: i, closeDisabled: a = !1, onEscapeKeyDown: o, onInteractOutside: s, labels: c, onOpenAutoFocus: l, ...u }) {
9979
+ let d = {
9980
9980
  ...Hb,
9981
9981
  ...c
9982
9982
  };
9983
9983
  return /* @__PURE__ */ v(Gb, { children: [/* @__PURE__ */ _(Kb, {}), /* @__PURE__ */ v(ga, {
9984
9984
  "data-slot": "sheet-content",
9985
9985
  className: J("ttw:fixed ttw:z-50 ttw:flex ttw:flex-col ttw:gap-4 ttw:border-border ttw:bg-background ttw:shadow-lg ttw:transition ttw:ease-in-out ttw:data-[state=closed]:animate-out ttw:data-[state=closed]:duration-300 ttw:data-[state=open]:animate-in ttw:data-[state=open]:duration-500", n === "right" && "ttw:inset-y-0 ttw:right-0 ttw:h-full ttw:w-full ttw:border-l ttw:data-[state=closed]:slide-out-to-right ttw:data-[state=open]:slide-in-from-right ttw:sm:max-w-150", n === "left" && "ttw:inset-y-0 ttw:left-0 ttw:h-full ttw:w-full ttw:border-r ttw:data-[state=closed]:slide-out-to-left ttw:data-[state=open]:slide-in-from-left ttw:sm:max-w-150", n === "top" && "ttw:inset-x-0 ttw:top-0 ttw:h-auto ttw:border-b ttw:data-[state=closed]:slide-out-to-top ttw:data-[state=open]:slide-in-from-top", n === "bottom" && "ttw:inset-x-0 ttw:bottom-0 ttw:h-auto ttw:border-t ttw:data-[state=closed]:slide-out-to-bottom ttw:data-[state=open]:slide-in-from-bottom", e),
9986
+ onOpenAutoFocus: (e) => {
9987
+ if (l?.(e), e.defaultPrevented) return;
9988
+ let t = e.target.querySelector("[data-autofocus]");
9989
+ t && (t.focus(), document.activeElement === t && e.preventDefault());
9990
+ },
9986
9991
  onEscapeKeyDown: Av(a, o),
9987
9992
  onInteractOutside: Av(a, s),
9988
- ...l,
9993
+ ...u,
9989
9994
  children: [t, r && /* @__PURE__ */ _(Ta, {
9990
9995
  "data-slot": "sheet-close-button",
9991
9996
  "data-testid": i,
9992
9997
  disabled: a,
9993
- title: u.close,
9998
+ title: d.close,
9994
9999
  className: J(Ov, "ttw:absolute ttw:top-4 ttw:right-4"),
9995
- children: /* @__PURE__ */ _(jv, { label: u.close })
10000
+ children: /* @__PURE__ */ _(jv, { label: d.close })
9996
10001
  })]
9997
10002
  })] });
9998
10003
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tesouro/embedded-components-react",
3
- "version": "0.9.53",
3
+ "version": "0.9.55",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": [