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.
@@ -3111,6 +3111,7 @@ function SModalContainer({
3111
3111
  style
3112
3112
  }) {
3113
3113
  const [shaking, setShaking] = react.useState(false);
3114
+ const contentRef = react.useRef(null);
3114
3115
  const [portalContainer, setPortalContainer] = react.useState(null);
3115
3116
  const triggerShake = react.useCallback(() => {
3116
3117
  setShaking(false);
@@ -3125,7 +3126,12 @@ function SModalContainer({
3125
3126
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none fixed inset-0 z-[1001] flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs(
3126
3127
  RDialog__namespace.Content,
3127
3128
  {
3129
+ ref: contentRef,
3128
3130
  className: "pointer-events-auto outline-none data-[state=open]:animate-modal-in data-[state=closed]:animate-modal-out",
3131
+ onOpenAutoFocus: (e) => {
3132
+ e.preventDefault();
3133
+ contentRef.current?.focus({ preventScroll: true });
3134
+ },
3129
3135
  onEscapeKeyDown: guardClose,
3130
3136
  onPointerDownOutside: guardClose,
3131
3137
  onInteractOutside: guardClose,