@noya-app/noya-designsystem 0.1.83 → 0.1.84

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.mjs CHANGED
@@ -22033,17 +22033,19 @@ var DialogProvider = function DialogProvider2({
22033
22033
  const inputRef = useRef53(null);
22034
22034
  const confirmButtonRef = useRef53(null);
22035
22035
  const dialogRef = useRef53(null);
22036
+ const contentsType = contents?.type;
22037
+ const contentsInstance = contents?.resolve;
22036
22038
  React160.useEffect(() => {
22037
- if (!contents) return;
22039
+ if (!contentsType || !contentsInstance) return;
22038
22040
  requestAnimationFrame(() => {
22039
- if (contents.type === "input") {
22041
+ if (contentsType === "input") {
22040
22042
  inputRef.current?.focus();
22041
22043
  inputRef.current?.setSelectionRange(0, inputRef.current.value.length);
22042
- } else if (contents.type === "confirmation") {
22044
+ } else if (contentsType === "confirmation") {
22043
22045
  confirmButtonRef.current?.focus();
22044
22046
  }
22045
22047
  });
22046
- }, [contents]);
22048
+ }, [contentsType, contentsInstance]);
22047
22049
  const containsElement = useCallback41((element) => {
22048
22050
  if (!dialogRef.current) return false;
22049
22051
  return dialogRef.current.containsElement(element);