@drippr/embed-react 0.2.2 → 0.2.4
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 +7 -11
- package/dist/index.mjs +7 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -211,13 +211,9 @@ function ModalContainer({
|
|
|
211
211
|
display: "block"
|
|
212
212
|
};
|
|
213
213
|
const containerStyles = mounted ? {} : {
|
|
214
|
-
position: "absolute",
|
|
215
|
-
left: "-9999px",
|
|
216
|
-
width: "1px",
|
|
217
|
-
height: "1px",
|
|
218
214
|
visibility: "hidden",
|
|
219
215
|
pointerEvents: "none",
|
|
220
|
-
|
|
216
|
+
opacity: 0
|
|
221
217
|
};
|
|
222
218
|
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(import_jsx_runtime2.Fragment, { children: [
|
|
223
219
|
trigger,
|
|
@@ -424,13 +420,9 @@ function DrawerContainer({
|
|
|
424
420
|
display: "block"
|
|
425
421
|
};
|
|
426
422
|
const containerStyles = mounted ? {} : {
|
|
427
|
-
position: "absolute",
|
|
428
|
-
left: "-9999px",
|
|
429
|
-
width: "1px",
|
|
430
|
-
height: "1px",
|
|
431
423
|
visibility: "hidden",
|
|
432
424
|
pointerEvents: "none",
|
|
433
|
-
|
|
425
|
+
opacity: 0
|
|
434
426
|
};
|
|
435
427
|
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
436
428
|
trigger,
|
|
@@ -511,7 +503,11 @@ function DripprFlow({
|
|
|
511
503
|
baseUrl = DEFAULT_BASE_URL,
|
|
512
504
|
prefetch = true
|
|
513
505
|
}) {
|
|
514
|
-
const
|
|
506
|
+
const reactId = React3.useId();
|
|
507
|
+
const [instanceId, setInstanceId] = React3.useState(reactId);
|
|
508
|
+
React3.useEffect(() => {
|
|
509
|
+
setInstanceId(generateInstanceId());
|
|
510
|
+
}, []);
|
|
515
511
|
const [height, setHeight] = React3.useState(fallbackHeight);
|
|
516
512
|
const [internalOpen, setInternalOpen] = React3.useState(false);
|
|
517
513
|
const iframeRef = React3.useRef(null);
|
package/dist/index.mjs
CHANGED
|
@@ -175,13 +175,9 @@ function ModalContainer({
|
|
|
175
175
|
display: "block"
|
|
176
176
|
};
|
|
177
177
|
const containerStyles = mounted ? {} : {
|
|
178
|
-
position: "absolute",
|
|
179
|
-
left: "-9999px",
|
|
180
|
-
width: "1px",
|
|
181
|
-
height: "1px",
|
|
182
178
|
visibility: "hidden",
|
|
183
179
|
pointerEvents: "none",
|
|
184
|
-
|
|
180
|
+
opacity: 0
|
|
185
181
|
};
|
|
186
182
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
187
183
|
trigger,
|
|
@@ -388,13 +384,9 @@ function DrawerContainer({
|
|
|
388
384
|
display: "block"
|
|
389
385
|
};
|
|
390
386
|
const containerStyles = mounted ? {} : {
|
|
391
|
-
position: "absolute",
|
|
392
|
-
left: "-9999px",
|
|
393
|
-
width: "1px",
|
|
394
|
-
height: "1px",
|
|
395
387
|
visibility: "hidden",
|
|
396
388
|
pointerEvents: "none",
|
|
397
|
-
|
|
389
|
+
opacity: 0
|
|
398
390
|
};
|
|
399
391
|
return /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
400
392
|
trigger,
|
|
@@ -475,7 +467,11 @@ function DripprFlow({
|
|
|
475
467
|
baseUrl = DEFAULT_BASE_URL,
|
|
476
468
|
prefetch = true
|
|
477
469
|
}) {
|
|
478
|
-
const
|
|
470
|
+
const reactId = React3.useId();
|
|
471
|
+
const [instanceId, setInstanceId] = React3.useState(reactId);
|
|
472
|
+
React3.useEffect(() => {
|
|
473
|
+
setInstanceId(generateInstanceId());
|
|
474
|
+
}, []);
|
|
479
475
|
const [height, setHeight] = React3.useState(fallbackHeight);
|
|
480
476
|
const [internalOpen, setInternalOpen] = React3.useState(false);
|
|
481
477
|
const iframeRef = React3.useRef(null);
|