app/assets/build/coco/app.js in coveragebook_components-0.7.9 vs app/assets/build/coco/app.js in coveragebook_components-0.7.10
- old
+ new
@@ -6116,11 +6116,12 @@
muted: colors.gray[400]
},
primary: {
DEFAULT: colors.green[500],
dark: colors.green[600],
- inverse: colors.green[300]
+ inverse: colors.green[300],
+ "inverse-vivid": "#009979"
},
negative: {
DEFAULT: colors.red[600],
dark: colors.red[700],
inverse: colors.red[300]
@@ -6148,18 +6149,20 @@
md: "768px",
lg: "992px",
xl: "1200px",
"2xl": "1400px",
max: "1800px",
+ "small-landscape": { raw: "(max-height: 760px) and (min-width: 576px)" },
print: { raw: "print" }
// Note: PDFs are rendered at a viewport width of 1280px
};
var fontSize = {
"para-xs": ["12px", "16px"],
"para-sm": ["14px", "20px"],
"para-md": ["16px", "24px"],
"para-lg": ["18px", "27px"],
+ "label-xxs": ["10px", "12px"],
"label-xs": ["12px", "14px"],
"label-sm": ["14px", "16px"],
"label-md": ["16px", "20px"],
"label-lg": ["18px", "24px"],
"display-1": ["96px", "96px"],
@@ -14030,11 +14033,11 @@
// ../../../package.json
var package_default = {
name: "coveragebook-components",
type: "module",
- version: "0.7.9",
+ version: "0.7.10",
main: "index.js",
repository: "git@github.com:coveragebook/coco.git",
author: "Mark Perkins <mark@coveragebook.com>",
license: "NO LICENSE",
browserslist: [
@@ -23004,10 +23007,31 @@
return isElement2(targets) ? instances[0] : instances;
}
tippy.defaultProps = defaultProps;
tippy.setDefaultProps = setDefaultProps;
tippy.currentInput = currentInput;
+ var hideAll = function hideAll2(_temp) {
+ var _ref = _temp === void 0 ? {} : _temp, excludedReferenceOrInstance = _ref.exclude, duration = _ref.duration;
+ mountedInstances.forEach(function(instance) {
+ var isExcluded = false;
+ if (excludedReferenceOrInstance) {
+ isExcluded = isReferenceElement(excludedReferenceOrInstance) ? instance.reference === excludedReferenceOrInstance : instance.popper === excludedReferenceOrInstance.popper;
+ }
+ if (!isExcluded) {
+ var originalDuration = instance.props.duration;
+ instance.setProps({
+ duration
+ });
+ instance.hide();
+ if (!instance.state.isDestroyed) {
+ instance.setProps({
+ duration: originalDuration
+ });
+ }
+ }
+ });
+ };
var applyStylesModifier = Object.assign({}, applyStyles_default, {
effect: function effect6(_ref) {
var state = _ref.state;
var initialStyles = {
popper: {
@@ -23660,10 +23684,35 @@
module_default.plugin(dropdown_default);
module_default.plugin(dimensions_default);
module_default.plugin(notification_default);
var alpine_default2 = module_default;
+ // helpers/location.js
+ function navigateTo(url, options = {}) {
+ if (window.Turbo && options.turbo === true) {
+ window.Turbo.visit(url, { action: options.action || "advance" });
+ } else {
+ location.assign(url);
+ }
+ }
+
+ // app/setup.js
+ window.addEventListener("navigate", (event) => {
+ const { url, turbo, action } = event.detail;
+ if (url) {
+ navigateTo(url, { turbo, action });
+ }
+ });
+ function setAppHeightProperty() {
+ document.documentElement.style.setProperty(
+ "--app-height",
+ `${window.innerHeight}px`
+ );
+ }
+ window.addEventListener("resize", setAppHeightProperty);
+ setAppHeightProperty();
+
// ../../components/coco/base/button/button.js
var button_exports = {};
__export(button_exports, {
default: () => button_default
});
@@ -23960,10 +24009,11 @@
this.frame.addEventListener("turbo:submit-end", this.onFrameSubmitEnd);
this.$nextTick(() => this.show());
},
show() {
this.open = true;
+ hideAll();
setTimeout(() => {
this.$dispatch("modal:shown");
}, 400);
},
hide() {
@@ -24078,15 +24128,15 @@
close() {
this.modal.hide();
},
imageLoaded() {
this.loaded = true;
- this.$nextTick(() => {
+ setTimeout(() => {
const scrollTop = parseInt(this.img.dataset.scrollTop, 10);
if (!isNaN(scrollTop) && scrollTop !== 0) {
this.modal.scrollTo(scrollTop);
}
- });
+ }, 200);
},
get img() {
return this.$refs.media.querySelector("img");
},
root: {