@cntrl-site/components 0.1.0-alpha.8 → 0.1.0-alpha.9
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 +6 -1
- package/dist/index.mjs +6 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1583,6 +1583,11 @@ const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = t
|
|
|
1583
1583
|
const handleContentClick = (e) => {
|
|
1584
1584
|
if (!closeOnBackdropClick) return;
|
|
1585
1585
|
const target = e.target;
|
|
1586
|
+
const currentTarget = e.currentTarget;
|
|
1587
|
+
if (target === currentTarget) {
|
|
1588
|
+
onClose();
|
|
1589
|
+
return;
|
|
1590
|
+
}
|
|
1586
1591
|
const isImg = target.tagName === "IMG" || target.closest("img");
|
|
1587
1592
|
const isButton = target.tagName === "BUTTON" || target.closest("button");
|
|
1588
1593
|
if (!isImg && !isButton) {
|
|
@@ -1748,13 +1753,13 @@ const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = t
|
|
|
1748
1753
|
{
|
|
1749
1754
|
className: cn(styles.backdropStyle, { [styles.editor]: isEditor }),
|
|
1750
1755
|
onClick: handleBackdropClick,
|
|
1756
|
+
onTouchEnd: handleBackdropClick,
|
|
1751
1757
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1752
1758
|
"div",
|
|
1753
1759
|
{
|
|
1754
1760
|
className: cn(styles.contentStyle, appearClass),
|
|
1755
1761
|
onClick: handleContentClick,
|
|
1756
1762
|
style: {
|
|
1757
|
-
// padding: `${layout.padding.top}px ${layout.padding.right}px ${layout.padding.bottom}px ${layout.padding.left}px`,
|
|
1758
1763
|
animationDuration: `${appearDurationMs}ms`,
|
|
1759
1764
|
animationTimingFunction: "ease",
|
|
1760
1765
|
animationFillMode: "both",
|
package/dist/index.mjs
CHANGED
|
@@ -1581,6 +1581,11 @@ const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = t
|
|
|
1581
1581
|
const handleContentClick = (e) => {
|
|
1582
1582
|
if (!closeOnBackdropClick) return;
|
|
1583
1583
|
const target = e.target;
|
|
1584
|
+
const currentTarget = e.currentTarget;
|
|
1585
|
+
if (target === currentTarget) {
|
|
1586
|
+
onClose();
|
|
1587
|
+
return;
|
|
1588
|
+
}
|
|
1584
1589
|
const isImg = target.tagName === "IMG" || target.closest("img");
|
|
1585
1590
|
const isButton = target.tagName === "BUTTON" || target.closest("button");
|
|
1586
1591
|
if (!isImg && !isButton) {
|
|
@@ -1746,13 +1751,13 @@ const Lightbox = ({ isOpen, onClose, content, settings, closeOnBackdropClick = t
|
|
|
1746
1751
|
{
|
|
1747
1752
|
className: cn(styles.backdropStyle, { [styles.editor]: isEditor }),
|
|
1748
1753
|
onClick: handleBackdropClick,
|
|
1754
|
+
onTouchEnd: handleBackdropClick,
|
|
1749
1755
|
children: /* @__PURE__ */ jsxs(
|
|
1750
1756
|
"div",
|
|
1751
1757
|
{
|
|
1752
1758
|
className: cn(styles.contentStyle, appearClass),
|
|
1753
1759
|
onClick: handleContentClick,
|
|
1754
1760
|
style: {
|
|
1755
|
-
// padding: `${layout.padding.top}px ${layout.padding.right}px ${layout.padding.bottom}px ${layout.padding.left}px`,
|
|
1756
1761
|
animationDuration: `${appearDurationMs}ms`,
|
|
1757
1762
|
animationTimingFunction: "ease",
|
|
1758
1763
|
animationFillMode: "both",
|