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.
@@ -3110,6 +3110,7 @@ function SModalContainer({
3110
3110
  style
3111
3111
  }) {
3112
3112
  const [shaking, setShaking] = react.useState(false);
3113
+ const contentRef = react.useRef(null);
3113
3114
  const [portalContainer, setPortalContainer] = react.useState(null);
3114
3115
  const triggerShake = react.useCallback(() => {
3115
3116
  setShaking(false);
@@ -3124,7 +3125,12 @@ function SModalContainer({
3124
3125
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none fixed inset-0 z-[1001] flex items-center justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs(
3125
3126
  RDialog__namespace.Content,
3126
3127
  {
3128
+ ref: contentRef,
3127
3129
  className: "pointer-events-auto outline-none data-[state=open]:animate-modal-in data-[state=closed]:animate-modal-out",
3130
+ onOpenAutoFocus: (e) => {
3131
+ e.preventDefault();
3132
+ contentRef.current?.focus({ preventScroll: true });
3133
+ },
3128
3134
  onEscapeKeyDown: guardClose,
3129
3135
  onPointerDownOutside: guardClose,
3130
3136
  onInteractOutside: guardClose,
@@ -3372,10 +3378,8 @@ function SActionModal({
3372
3378
  color: button.color ?? "primary",
3373
3379
  outline: button.outline,
3374
3380
  size: button.size ?? "md",
3375
- onClick: () => {
3376
- button.onClick?.();
3377
- onOpenChange?.(false);
3378
- },
3381
+ disabled: button.disabled,
3382
+ onClick: () => button.onClick?.(),
3379
3383
  label: button.label ?? "\uD655\uC778"
3380
3384
  }
3381
3385
  )