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.
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,10 +4971,8 @@ function SActionModal({
4965
4971
  color: button.color ?? "primary",
4966
4972
  outline: button.outline,
4967
4973
  size: button.size ?? "md",
4968
- onClick: () => {
4969
- button.onClick?.();
4970
- onOpenChange?.(false);
4971
- },
4974
+ disabled: button.disabled,
4975
+ onClick: () => button.onClick?.(),
4972
4976
  label: button.label ?? "\uD655\uC778"
4973
4977
  }
4974
4978
  )