sellmate-design-system-react 1.1.3 → 2.0.0

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.
@@ -3088,6 +3088,7 @@ function SModalContainer({
3088
3088
  style
3089
3089
  }) {
3090
3090
  const [shaking, setShaking] = useState(false);
3091
+ const contentRef = useRef(null);
3091
3092
  const [portalContainer, setPortalContainer] = useState(null);
3092
3093
  const triggerShake = useCallback(() => {
3093
3094
  setShaking(false);
@@ -3102,7 +3103,12 @@ function SModalContainer({
3102
3103
  /* @__PURE__ */ jsx("div", { className: "pointer-events-none fixed inset-0 z-[1001] flex items-center justify-center", children: /* @__PURE__ */ jsxs(
3103
3104
  RDialog.Content,
3104
3105
  {
3106
+ ref: contentRef,
3105
3107
  className: "pointer-events-auto outline-none data-[state=open]:animate-modal-in data-[state=closed]:animate-modal-out",
3108
+ onOpenAutoFocus: (e) => {
3109
+ e.preventDefault();
3110
+ contentRef.current?.focus({ preventScroll: true });
3111
+ },
3106
3112
  onEscapeKeyDown: guardClose,
3107
3113
  onPointerDownOutside: guardClose,
3108
3114
  onInteractOutside: guardClose,