app/assets/build/coco/coco.js in coveragebook_components-0.17.0 vs app/assets/build/coco/coco.js in coveragebook_components-0.17.1
- old
+ new
@@ -4218,19 +4218,19 @@
dangerouslySetInnerHTML(arrow, value);
}
}
return arrow;
}
- function setContent(content2, props) {
+ function setContent(content, props) {
if (isElement(props.content)) {
- dangerouslySetInnerHTML(content2, "");
- content2.appendChild(props.content);
+ dangerouslySetInnerHTML(content, "");
+ content.appendChild(props.content);
} else if (typeof props.content !== "function") {
if (props.allowHTML) {
- dangerouslySetInnerHTML(content2, props.content);
+ dangerouslySetInnerHTML(content, props.content);
} else {
- content2.textContent = props.content;
+ content.textContent = props.content;
}
}
}
function getChildren(popper) {
var box = popper.firstElementChild;
@@ -4252,19 +4252,19 @@
var popper = div();
var box = div();
box.className = BOX_CLASS;
box.setAttribute("data-state", "hidden");
box.setAttribute("tabindex", "-1");
- var content2 = div();
- content2.className = CONTENT_CLASS;
- content2.setAttribute("data-state", "hidden");
- setContent(content2, instance.props);
+ var content = div();
+ content.className = CONTENT_CLASS;
+ content.setAttribute("data-state", "hidden");
+ setContent(content, instance.props);
popper.appendChild(box);
- box.appendChild(content2);
+ box.appendChild(content);
onUpdate(instance.props, instance.props);
function onUpdate(prevProps, nextProps) {
- var _getChildren = getChildren(popper), box2 = _getChildren.box, content3 = _getChildren.content, arrow = _getChildren.arrow;
+ var _getChildren = getChildren(popper), box2 = _getChildren.box, content2 = _getChildren.content, arrow = _getChildren.arrow;
if (nextProps.theme) {
box2.setAttribute("data-theme", nextProps.theme);
} else {
box2.removeAttribute("data-theme");
}
@@ -4283,11 +4283,11 @@
box2.setAttribute("role", nextProps.role);
} else {
box2.removeAttribute("role");
}
if (prevProps.content !== nextProps.content || prevProps.allowHTML !== nextProps.allowHTML) {
- setContent(content3, instance.props);
+ setContent(content2, instance.props);
}
if (nextProps.arrow) {
if (!arrow) {
box2.appendChild(createArrowElement(nextProps.arrow));
} else if (prevProps.arrow !== nextProps.arrow) {
@@ -4875,13 +4875,13 @@
requestAnimationFrame(nestedPopper._tippy.popperInstance.forceUpdate);
});
}
invokeHook("onAfterUpdate", [instance, partialProps]);
}
- function setContent2(content2) {
+ function setContent2(content) {
instance.setProps({
- content: content2
+ content
});
}
function show() {
if (process.env.NODE_ENV !== "production") {
warnWhen(instance.state.isDestroyed, createMemoryLeakWarning("show"));
@@ -4909,12 +4909,12 @@
addDocumentPress();
if (!instance.state.isMounted) {
popper.style.transition = "none";
}
if (getIsDefaultRenderFn()) {
- var _getDefaultTemplateCh2 = getDefaultTemplateChildren(), box = _getDefaultTemplateCh2.box, content2 = _getDefaultTemplateCh2.content;
- setTransitionDuration([box, content2], 0);
+ var _getDefaultTemplateCh2 = getDefaultTemplateChildren(), box = _getDefaultTemplateCh2.box, content = _getDefaultTemplateCh2.content;
+ setTransitionDuration([box, content], 0);
}
onFirstUpdate = function onFirstUpdate2() {
var _instance$popperInsta2;
if (!instance.state.isVisible || ignoreOnFirstUpdate) {
return;
@@ -4965,14 +4965,14 @@
}
cleanupInteractiveMouseListeners();
removeDocumentPress();
handleStyles(true);
if (getIsDefaultRenderFn()) {
- var _getDefaultTemplateCh4 = getDefaultTemplateChildren(), box = _getDefaultTemplateCh4.box, content2 = _getDefaultTemplateCh4.content;
+ var _getDefaultTemplateCh4 = getDefaultTemplateChildren(), box = _getDefaultTemplateCh4.box, content = _getDefaultTemplateCh4.content;
if (instance.props.animation) {
- setTransitionDuration([box, content2], duration);
- setVisibilityState([box, content2], "hidden");
+ setTransitionDuration([box, content], duration);
+ setVisibilityState([box, content], "hidden");
}
}
handleAriaContentAttribute();
handleAriaExpandedAttribute();
if (instance.props.animation) {
@@ -5385,11 +5385,11 @@
if (process.env.NODE_ENV !== "production") {
errorWhen(instance.props.animateFill, "The `animateFill` plugin requires the default render function.");
}
return {};
}
- var _getChildren = getChildren(instance.popper), box = _getChildren.box, content2 = _getChildren.content;
+ var _getChildren = getChildren(instance.popper), box = _getChildren.box, content = _getChildren.content;
var backdrop = instance.props.animateFill ? createBackdropElement() : null;
return {
onCreate: function onCreate() {
if (backdrop) {
box.insertBefore(backdrop, box.firstElementChild);
@@ -5403,11 +5403,11 @@
},
onMount: function onMount() {
if (backdrop) {
var transitionDuration = box.style.transitionDuration;
var duration = Number(transitionDuration.replace("ms", ""));
- content2.style.transitionDelay = Math.round(duration / 10) + "ms";
+ content.style.transitionDelay = Math.round(duration / 10) + "ms";
backdrop.style.transitionDuration = transitionDuration;
setVisibilityState([backdrop], "visible");
}
},
onShow: function onShow() {
@@ -10263,12 +10263,12 @@
var elementsToCheck = Array.from(elements);
while (elementsToCheck.length) {
var element = elementsToCheck.shift();
if (element.tagName === "SLOT") {
var assigned = element.assignedElements();
- var content2 = assigned.length ? assigned : element.children;
- var nestedCandidates = getCandidatesIteratively2(content2, true, options);
+ var content = assigned.length ? assigned : element.children;
+ var nestedCandidates = getCandidatesIteratively2(content, true, options);
if (options.flatten) {
candidates.push.apply(candidates, nestedCandidates);
} else {
candidates.push({
scope: element,
@@ -15124,39 +15124,39 @@
});
}
let initialContent = null;
const enableTooltip = () => el.__x_tippy.enable();
const disableTooltip = () => el.__x_tippy.disable();
- const setupTooltip = (content2) => {
- if (!content2) {
+ const setupTooltip = (content) => {
+ if (!content) {
disableTooltip();
} else {
enableTooltip();
- el.__x_tippy.setContent(content2);
- initialContent = initialContent || content2;
+ el.__x_tippy.setContent(content);
+ initialContent = initialContent || content;
}
};
if (modifiers.includes("raw")) {
setupTooltip(expression);
} else {
const getContent = evaluateLater(expression);
effect(() => {
- getContent((content2) => {
- if (typeof content2 === "object" && content2 !== null) {
- el.__x_tippy.setProps(content2);
- initialContent = initialContent || content2.content;
+ getContent((content) => {
+ if (typeof content === "object" && content !== null) {
+ el.__x_tippy.setProps(content);
+ initialContent = initialContent || content.content;
enableTooltip();
} else {
- setupTooltip(content2);
+ setupTooltip(content);
}
});
});
}
setData(el, {
tooltip: {
- setContent(content2) {
- setupTooltip(content2);
+ setContent(content) {
+ setupTooltip(content);
},
disable: () => disableTooltip(),
enable: () => enableTooltip(),
reset() {
if (initialContent)
@@ -15181,20 +15181,20 @@
// base/alpine/directives/dropdown.js
function dropdown_default(Alpine3) {
Alpine3.directive(
"dropdown",
- (el, { value, modifiers, expression }, { evaluate, effect }) => {
+ (el, { value, modifiers, expression }, { evaluate }) => {
if (value)
return;
const data = getData(el);
const settings = tippyModifiers(modifiers);
const result = expression ? evaluate(expression) : {};
const directiveConfig = isObject(result) ? result : {};
let { triggerTarget, contentTarget, anchorTarget, ...config } = directiveConfig;
contentTarget = contentTarget || el.querySelector("[x-dropdown\\:content]");
- content = isNode(contentTarget) ? contentTarget.firstElementChild : contentTarget;
+ const content = isNode(contentTarget) ? contentTarget.firstElementChild : contentTarget;
triggerTarget = triggerTarget || el.querySelector("[x-dropdown\\:trigger]") || el;
anchorTarget = anchorTarget || el.querySelector("[x-dropdown\\:anchor]") || el;
if (!el.__x_dropdown) {
const mixin = Alpine3.reactive({
dropdown: {
@@ -15369,11 +15369,11 @@
var alpine_default = import_alpinejs.default;
// ../../../package.json
var package_default = {
name: "coveragebook-components",
- version: "0.17.0",
+ version: "0.17.1",
repository: "git@github.com:coveragebook/coco.git",
license: "NO LICENSE",
author: "Mark Perkins <mark@coveragebook.com>",
main: "app/assets/build/coco/coco.js",
engines: {
@@ -15616,11 +15616,11 @@
},
toggleState(state1, state2 = this.laststate) {
this.state = this.state === state1 ? state2 : state1;
},
getContentForState(state) {
- const content2 = this.$refs[`${state}Content`];
- return content2 ? content2.innerText : null;
+ const content = this.$refs[`${state}Content`];
+ return content ? content.innerText : null;
},
hasIconForState(state) {
return !!this.$refs[`${state}Icon`];
},
hasContentForState(state) {