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.cjs CHANGED
@@ -4783,6 +4783,7 @@ function SModalContainer({
4783
4783
  style
4784
4784
  }) {
4785
4785
  const [shaking, setShaking] = react.useState(false);
4786
+ const contentRef = react.useRef(null);
4786
4787
  const [portalContainer, setPortalContainer] = react.useState(null);
4787
4788
  const triggerShake = react.useCallback(() => {
4788
4789
  setShaking(false);
@@ -4797,7 +4798,12 @@ function SModalContainer({
4797
4798
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none fixed inset-0 z-[1001] flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs(
4798
4799
  RDialog__namespace.Content,
4799
4800
  {
4801
+ ref: contentRef,
4800
4802
  className: "pointer-events-auto outline-none data-[state=open]:animate-modal-in data-[state=closed]:animate-modal-out",
4803
+ onOpenAutoFocus: (e) => {
4804
+ e.preventDefault();
4805
+ contentRef.current?.focus({ preventScroll: true });
4806
+ },
4801
4807
  onEscapeKeyDown: guardClose,
4802
4808
  onPointerDownOutside: guardClose,
4803
4809
  onInteractOutside: guardClose,
@@ -4993,6 +4999,7 @@ function SActionModal({
4993
4999
  color: button.color ?? "primary",
4994
5000
  outline: button.outline,
4995
5001
  size: button.size ?? "md",
5002
+ disabled: button.disabled,
4996
5003
  onClick: () => {
4997
5004
  button.onClick?.();
4998
5005
  onOpenChange?.(false);