@edu-tosel/design 1.0.52 → 1.0.54
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.
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import DaumPostcodeEmbed from "react-daum-postcode";
|
|
3
2
|
import ModalDesign from "../design/Modal.design";
|
|
4
3
|
import { useActionStore } from "../../store";
|
|
4
|
+
import { lazy, useEffect, useState, Suspense } from "react";
|
|
5
|
+
import { Loading } from "../../interaction";
|
|
6
|
+
const DaumPostcodeEmbed = lazy(() => import("react-daum-postcode"));
|
|
5
7
|
export default function PostcodeModal({ state, showAction, }) {
|
|
6
8
|
const { removeModal } = useActionStore();
|
|
7
9
|
const [value, setValue] = state;
|
|
10
|
+
const [isClient, setIsClient] = useState(false);
|
|
11
|
+
useEffect(() => {
|
|
12
|
+
if (!isClient)
|
|
13
|
+
return setIsClient(true);
|
|
14
|
+
}, []);
|
|
8
15
|
const handler = (data) => {
|
|
9
16
|
setValue({
|
|
10
17
|
address: data.address,
|
|
@@ -18,5 +25,5 @@ export default function PostcodeModal({ state, showAction, }) {
|
|
|
18
25
|
}, showAction: showAction, options: {
|
|
19
26
|
width: "lg",
|
|
20
27
|
height: "xl",
|
|
21
|
-
}, children: _jsx(DaumPostcodeEmbed, { onComplete: handler, className: "mt-16" }) }));
|
|
28
|
+
}, children: _jsx(Suspense, { fallback: _jsx(Loading.Spinner, {}), children: isClient && (_jsx(DaumPostcodeEmbed, { onComplete: handler, className: "mt-16" })) }) }));
|
|
22
29
|
}
|
package/package.json
CHANGED
package/version.txt
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
1.0.
|
|
1
|
+
1.0.54
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { HTMLSelectElement } from "../../../interface";
|
|
2
|
-
export default function SelectLG<T>({ state }: HTMLSelectElement<T>): import("react/jsx-runtime").JSX.Element;
|
|
2
|
+
export default function SelectLG<T>({ state, }: HTMLSelectElement<T>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -12,10 +12,7 @@ const widthSize = {
|
|
|
12
12
|
const heightSize = {
|
|
13
13
|
xs: "h-6.5",
|
|
14
14
|
};
|
|
15
|
-
|
|
16
|
-
// placeholder,
|
|
17
|
-
// options,
|
|
18
|
-
export default function SelectLG({ state }) {
|
|
15
|
+
export default function SelectLG({ state, }) {
|
|
19
16
|
const id = useId();
|
|
20
17
|
const { setIsOwn, setIsOwnId } = useActionStore();
|
|
21
18
|
const [value, setValue] = state;
|