sellmate-design-system-react 1.1.3 → 1.2.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.
package/dist/index.js CHANGED
@@ -4755,6 +4755,7 @@ function SModalContainer({
4755
4755
  style
4756
4756
  }) {
4757
4757
  const [shaking, setShaking] = useState(false);
4758
+ const contentRef = useRef(null);
4758
4759
  const [portalContainer, setPortalContainer] = useState(null);
4759
4760
  const triggerShake = useCallback(() => {
4760
4761
  setShaking(false);
@@ -4769,7 +4770,12 @@ function SModalContainer({
4769
4770
  /* @__PURE__ */ jsx("div", { className: "pointer-events-none fixed inset-0 z-[1001] flex items-center justify-center", children: /* @__PURE__ */ jsxs(
4770
4771
  RDialog.Content,
4771
4772
  {
4773
+ ref: contentRef,
4772
4774
  className: "pointer-events-auto outline-none data-[state=open]:animate-modal-in data-[state=closed]:animate-modal-out",
4775
+ onOpenAutoFocus: (e) => {
4776
+ e.preventDefault();
4777
+ contentRef.current?.focus({ preventScroll: true });
4778
+ },
4773
4779
  onEscapeKeyDown: guardClose,
4774
4780
  onPointerDownOutside: guardClose,
4775
4781
  onInteractOutside: guardClose,
@@ -4965,6 +4971,7 @@ function SActionModal({
4965
4971
  color: button.color ?? "primary",
4966
4972
  outline: button.outline,
4967
4973
  size: button.size ?? "md",
4974
+ disabled: button.disabled,
4968
4975
  onClick: () => {
4969
4976
  button.onClick?.();
4970
4977
  onOpenChange?.(false);