public/lookbook-assets/js/index.js in lookbook-2.2.1 vs public/lookbook-assets/js/index.js in lookbook-2.2.2
- old
+ new
@@ -6522,26 +6522,37 @@
if (modifiers.includes("border") && config.interactive) config.interactiveBorder = parseInt(getModifierArgument("border"));
if (modifiers.includes("debounce") && config.interactive) config.interactiveDebounce = parseInt(getModifierArgument("debounce"));
if (modifiers.includes("max-width")) config.maxWidth = parseInt(getModifierArgument("max-width"));
if (modifiers.includes("theme")) config.theme = getModifierArgument("theme");
if (modifiers.includes("placement")) config.placement = getModifierArgument("placement");
+ const popperOptions = {};
+ if (modifiers.includes("no-flip")) {
+ popperOptions.modifiers ||= [];
+ popperOptions.modifiers.push({
+ name: "flip",
+ enabled: false
+ });
+ }
+ config.popperOptions = popperOptions;
return config;
};
// src/index.js
-function $69a8ec8dbeef3157$var$src_default(Alpine) {
+function $69a8ec8dbeef3157$var$Tooltip(Alpine) {
Alpine.magic("tooltip", (el)=>{
return (content, config = {})=>{
+ const timeout = config.timeout;
+ delete config.timeout;
const instance = (0, $69a8ec8dbeef3157$var$import_tippy2.default)(el, {
content: content,
trigger: "manual",
...config
});
instance.show();
setTimeout(()=>{
instance.hide();
setTimeout(()=>instance.destroy(), config.duration || 300);
- }, config.timeout || 2e3);
+ }, timeout || 2e3);
};
});
Alpine.directive("tooltip", (el, { modifiers: modifiers, expression: expression }, { evaluateLater: evaluateLater, effect: effect })=>{
const config = modifiers.length > 0 ? $69a8ec8dbeef3157$var$buildConfigFromModifiers(modifiers) : {};
if (!el.__x_tippy) el.__x_tippy = (0, $69a8ec8dbeef3157$var$import_tippy2.default)(el, config);
@@ -6566,10 +6577,15 @@
});
});
}
});
}
+$69a8ec8dbeef3157$var$Tooltip.defaultProps = (props)=>{
+ $69a8ec8dbeef3157$var$import_tippy2.default.setDefaultProps(props);
+ return $69a8ec8dbeef3157$var$Tooltip;
+};
+var $69a8ec8dbeef3157$var$src_default = $69a8ec8dbeef3157$var$Tooltip;
// builds/module.js
var $69a8ec8dbeef3157$export$2e2bcd8739ae039 = $69a8ec8dbeef3157$var$src_default;
var $5267f0d63de538ba$exports = {};
@@ -7970,11 +7986,11 @@
return $1.toUpperCase().replace("-", "").replace("_", "");
});
}
-var $c9dfaeb25bf110ce$exports = {};
+var $e29b71de1c821c6e$exports = {};
var $cbd28b10fa9798c7$exports = {};
$parcel$defineInteropFlag($cbd28b10fa9798c7$exports);
$parcel$export($cbd28b10fa9798c7$exports, "default", () => $cbd28b10fa9798c7$export$2e2bcd8739ae039);
@@ -11489,20 +11505,10 @@
_spinning: false
};
}
-var $99486586f6691564$exports = {};
-
-$parcel$defineInteropFlag($99486586f6691564$exports);
-
-$parcel$export($99486586f6691564$exports, "default", () => $99486586f6691564$export$2e2bcd8739ae039);
-function $99486586f6691564$export$2e2bcd8739ae039() {
- return {};
-}
-
-
var $47a1c62621be0c54$exports = {};
$parcel$defineInteropFlag($47a1c62621be0c54$exports);
$parcel$export($47a1c62621be0c54$exports, "default", () => $47a1c62621be0c54$export$2e2bcd8739ae039);
@@ -11555,10 +11561,20 @@
}
};
}
+var $99486586f6691564$exports = {};
+
+$parcel$defineInteropFlag($99486586f6691564$exports);
+
+$parcel$export($99486586f6691564$exports, "default", () => $99486586f6691564$export$2e2bcd8739ae039);
+function $99486586f6691564$export$2e2bcd8739ae039() {
+ return {};
+}
+
+
var $e398acaded942bbe$exports = {};
$parcel$defineInteropFlag($e398acaded942bbe$exports);
$parcel$export($e398acaded942bbe$exports, "default", () => $e398acaded942bbe$export$2e2bcd8739ae039);
@@ -12464,14 +12480,14 @@
}
};
}
-$c9dfaeb25bf110ce$exports = {
+$e29b71de1c821c6e$exports = {
"button": $cbd28b10fa9798c7$exports,
- "code": $99486586f6691564$exports,
"copy_button": $47a1c62621be0c54$exports,
+ "code": $99486586f6691564$exports,
"dimensions_display": $e398acaded942bbe$exports,
"embed_code_dropdown": $216ef7001f59f21d$exports,
"filter": $e9904a14dabf652d$exports,
"nav": $d92d9d5253f84566$exports,
"split_layout": $506dabb2bf255b38$exports,
@@ -13659,10 +13675,10 @@
prefix: $22969b543678f572$var$prefix
}));
// Components
(0, $caa9439642c6336c$export$2e2bcd8739ae039).data("app", (0, $5792afa4170ed552$export$2e2bcd8739ae039));
[
- $c9dfaeb25bf110ce$exports,
+ $e29b71de1c821c6e$exports,
$6178ee12f80cbf68$exports,
$d56e5cced44001d2$exports
].forEach((scripts)=>{
const components = (0, $12b7aa006b8a97e1$export$4e811121b221213b)(scripts);
Object.keys(components).forEach((name)=>{