coveragebook_components 0.10.0 → 0.10.1.beta.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/build/coco/app.css +4339 -3025
- data/app/assets/build/coco/app.js +118 -106
- data/app/assets/build/coco/book.css +1492 -92
- data/app/assets/build/coco/book.js +279 -18
- data/app/assets/css/app/tippy.css +1 -1
- data/app/assets/css/app.css +3 -3
- data/app/assets/css/{base/base.css → base.css} +14 -7
- data/app/assets/css/book.css +2 -2
- data/app/assets/css/{libs → shared}/tippy.css +20 -1
- data/app/assets/css/shared/utils/text.css +143 -0
- data/app/assets/js/app.js +2 -2
- data/app/assets/js/book.js +2 -2
- data/app/assets/js/libs/alpine/directives/dropdown.js +1 -1
- data/app/assets/js/libs/alpine/directives/tooltip.js +1 -1
- data/app/assets/js/shared/components.js +4 -0
- data/app/components/coco/app/blocks/header/header.js +1 -1
- data/app/components/coco/app/blocks/header/header.rb +2 -2
- data/app/components/coco/app/blocks/nav_drawer/nav_drawer.css +4 -0
- data/app/components/coco/app/blocks/nav_drawer/nav_drawer.js +1 -1
- data/app/components/coco/app/blocks/sidebar_nav/item/item.css +3 -3
- data/app/components/coco/app/blocks/sidebar_nav/item/item.js +2 -2
- data/app/components/coco/app/blocks/sidebar_nav/menu/menu.css +3 -3
- data/app/components/coco/app/blocks/sidebar_nav/menu/menu.js +1 -1
- data/app/components/coco/app/blocks/sidebar_nav/navbar/navbar.js +1 -1
- data/app/components/coco/app/blocks/slide_editor/slide_editor.js +1 -1
- data/app/components/coco/app/elements/alert/alert.css +4 -4
- data/app/components/coco/app/elements/alert/alert.js +1 -1
- data/app/components/coco/app/elements/color_picker/color_picker.css +2 -2
- data/app/components/coco/app/elements/color_picker/color_picker.js +1 -1
- data/app/components/coco/app/elements/color_picker_button/color_picker_button.js +1 -1
- data/app/components/coco/app/elements/color_picker_button/color_picker_button.rb +3 -3
- data/app/components/coco/app/elements/confirm_panel/confirm_panel.css +1 -1
- data/app/components/coco/app/elements/confirm_panel/confirm_panel.js +1 -1
- data/app/components/coco/app/elements/image_picker/image_picker.css +4 -4
- data/app/components/coco/app/elements/image_picker/image_picker.js +1 -1
- data/app/components/coco/app/elements/image_picker_button/image_picker_button.js +1 -1
- data/app/components/coco/app/elements/image_picker_button/image_picker_button.rb +3 -3
- data/app/components/coco/app/elements/layout_picker_button/layout_picker_button.js +1 -1
- data/app/components/coco/app/elements/layout_picker_button/layout_picker_button.rb +3 -3
- data/app/components/coco/app/elements/link/link.rb +1 -1
- data/app/components/coco/app/elements/menu/menu.css +5 -5
- data/app/components/coco/app/elements/menu_button/menu_button.js +1 -1
- data/app/components/coco/app/elements/menu_button/menu_button.rb +3 -3
- data/app/components/coco/app/elements/menu_items/user_profile/user_profile.css +1 -1
- data/app/components/coco/app/elements/notice/notice.js +1 -1
- data/app/components/coco/app/elements/seamless_textarea/seamless_textarea.js +1 -1
- data/app/components/coco/app/elements/snackbar/snackbar.css +1 -1
- data/app/components/coco/app/elements/snackbar/snackbar.js +1 -1
- data/app/components/coco/app/elements/system_banner/system_banner.js +1 -1
- data/app/components/coco/app/elements/toast/toast.js +1 -1
- data/app/components/coco/app/elements/toolbar/toolbar.js +1 -1
- data/app/components/coco/app/elements/toolbar/toolbar.rb +1 -1
- data/app/components/coco/app/fields/button_component.rb +1 -1
- data/app/components/coco/app/fields/submit_component.rb +1 -0
- data/app/components/coco/app/layouts/application/application.js +1 -1
- data/app/components/coco/app/layouts/page/page.js +1 -1
- data/app/components/coco/{app/elements → shared}/button/button.css +104 -32
- data/app/components/coco/shared/button/button.html.erb +83 -0
- data/app/components/coco/{base → shared}/button/button.js +2 -1
- data/app/components/coco/{base → shared}/button/button.rb +107 -42
- data/app/components/coco/{base → shared}/button/button_dropdown.js +11 -2
- data/app/components/coco/{app/elements → shared}/button_group/button_group.css +1 -1
- data/app/components/coco/{app/elements → shared}/button_group/button_group.js +12 -4
- data/app/components/coco/shared/button_group/button_group.rb +40 -0
- data/app/components/coco/{app/elements → shared}/button_to/button_to.css +1 -1
- data/app/components/coco/shared/button_to/button_to.rb +50 -0
- data/app/components/coco/{base → shared}/dropdown/dropdown.js +1 -1
- data/app/components/coco/{base → shared}/icon/icon.js +1 -1
- data/app/components/coco/{base → shared}/image_uploader/image_uploader.js +1 -1
- data/app/components/coco/{base → shared}/modal/modal.js +2 -2
- data/app/components/coco/{base → shared}/modal_dialog/modal_dialog.js +1 -1
- data/app/components/coco/{base → shared}/modal_lightbox/modal_lightbox.js +1 -1
- data/app/components/coco/{base → shared}/poll_controller/poll_controller.js +1 -1
- data/app/helpers/coco/app_helper.rb +0 -23
- data/app/helpers/coco/component_helper.rb +1 -1
- data/app/helpers/coco/{base_helper.rb → shared_helper.rb} +24 -1
- data/app/helpers/coco/url_helper.rb +1 -1
- data/lib/coco/engine.rb +2 -2
- data/lib/coco.rb +1 -1
- data/lib/generators/coco/coco_generator.rb +1 -1
- metadata +75 -80
- data/app/assets/css/base/components/coco.css +0 -5
- data/app/assets/css/base/components/dropdown.css +0 -7
- data/app/assets/css/base/components/tooltip.css +0 -19
- data/app/assets/css/base/utils/text.css +0 -79
- data/app/assets/js/base/components.js +0 -4
- data/app/components/coco/app/elements/button/button.rb +0 -87
- data/app/components/coco/app/elements/button_group/button_group.rb +0 -42
- data/app/components/coco/app/elements/button_to/button_to.rb +0 -54
- data/app/components/coco/base/button/button.css +0 -75
- data/app/components/coco/base/button/button.html.erb +0 -71
- /data/app/assets/css/app/{utilities.css → utils.css} +0 -0
- /data/app/assets/css/{base → shared}/utils/colors.css +0 -0
- /data/app/assets/css/{base → shared}/utils/icons.css +0 -0
- /data/app/assets/js/{coco.js → shared/coco.js} +0 -0
- /data/app/components/coco/{base → shared}/avatar/avatar.css +0 -0
- /data/app/components/coco/{base → shared}/avatar/avatar.rb +0 -0
- /data/app/components/coco/{app/elements → shared}/button_group/button_group.html.erb +0 -0
- /data/app/components/coco/{app/elements → shared}/button_to/button_to.html.erb +0 -0
- /data/app/components/coco/{base → shared}/content/content.rb +0 -0
- /data/app/components/coco/{base → shared}/dropdown/dropdown.css +0 -0
- /data/app/components/coco/{base → shared}/dropdown/dropdown.html.erb +0 -0
- /data/app/components/coco/{base → shared}/dropdown/dropdown.rb +0 -0
- /data/app/components/coco/{base → shared}/embeds/youtube/youtube.css +0 -0
- /data/app/components/coco/{base → shared}/embeds/youtube/youtube.html.erb +0 -0
- /data/app/components/coco/{base → shared}/embeds/youtube/youtube.rb +0 -0
- /data/app/components/coco/{base → shared}/icon/icon.css +0 -0
- /data/app/components/coco/{base → shared}/icon/icon.html.erb +0 -0
- /data/app/components/coco/{base → shared}/icon/icon.rb +0 -0
- /data/app/components/coco/{base → shared}/image/image.css +0 -0
- /data/app/components/coco/{base → shared}/image/image.rb +0 -0
- /data/app/components/coco/{base → shared}/image_uploader/image_uploader.css +0 -0
- /data/app/components/coco/{base → shared}/image_uploader/image_uploader.html.erb +0 -0
- /data/app/components/coco/{base → shared}/image_uploader/image_uploader.rb +0 -0
- /data/app/components/coco/{base → shared}/link/link.css +0 -0
- /data/app/components/coco/{base → shared}/link/link.rb +0 -0
- /data/app/components/coco/{base → shared}/modal/modal.css +0 -0
- /data/app/components/coco/{base → shared}/modal/modal.html.erb +0 -0
- /data/app/components/coco/{base → shared}/modal/modal.rb +0 -0
- /data/app/components/coco/{base → shared}/modal_dialog/modal_dialog.css +0 -0
- /data/app/components/coco/{base → shared}/modal_dialog/modal_dialog.html.erb +0 -0
- /data/app/components/coco/{base → shared}/modal_dialog/modal_dialog.rb +0 -0
- /data/app/components/coco/{base → shared}/modal_lightbox/modal_lightbox.css +0 -0
- /data/app/components/coco/{base → shared}/modal_lightbox/modal_lightbox.html.erb +0 -0
- /data/app/components/coco/{base → shared}/modal_lightbox/modal_lightbox.rb +0 -0
- /data/app/components/coco/{base → shared}/pager_link/pager_link.css +0 -0
- /data/app/components/coco/{base → shared}/pager_link/pager_link.html.erb +0 -0
- /data/app/components/coco/{base → shared}/pager_link/pager_link.rb +0 -0
- /data/app/components/coco/{base → shared}/panel/panel.css +0 -0
- /data/app/components/coco/{base → shared}/panel/panel.html.erb +0 -0
- /data/app/components/coco/{base → shared}/panel/panel.rb +0 -0
- /data/app/components/coco/{base → shared}/placeholder/placeholder.css +0 -0
- /data/app/components/coco/{base → shared}/placeholder/placeholder.html.erb +0 -0
- /data/app/components/coco/{base → shared}/placeholder/placeholder.rb +0 -0
- /data/app/components/coco/{base → shared}/poll_controller/poll_controller.css +0 -0
- /data/app/components/coco/{base → shared}/poll_controller/poll_controller.html.erb +0 -0
- /data/app/components/coco/{base → shared}/poll_controller/poll_controller.rb +0 -0
- /data/app/components/coco/{base → shared}/svg/svg.html.erb +0 -0
- /data/app/components/coco/{base → shared}/svg/svg.rb +0 -0
@@ -14048,7 +14048,7 @@
|
|
14048
14048
|
var package_default = {
|
14049
14049
|
name: "coveragebook-components",
|
14050
14050
|
type: "module",
|
14051
|
-
version: "0.10.
|
14051
|
+
version: "0.10.1-beta.1",
|
14052
14052
|
main: "index.js",
|
14053
14053
|
repository: "git@github.com:coveragebook/coco.git",
|
14054
14054
|
author: "Mark Perkins <mark@coveragebook.com>",
|
@@ -24045,13 +24045,13 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
24045
24045
|
window.addEventListener("resize", setAppHeightProperty);
|
24046
24046
|
setAppHeightProperty();
|
24047
24047
|
|
24048
|
-
// ../../components/coco/
|
24048
|
+
// ../../components/coco/shared/button/button.js
|
24049
24049
|
var button_exports = {};
|
24050
24050
|
__export(button_exports, {
|
24051
24051
|
default: () => button_default
|
24052
24052
|
});
|
24053
24053
|
|
24054
|
-
// coco.js
|
24054
|
+
// shared/coco.js
|
24055
24055
|
function CocoComponent(name, fn3) {
|
24056
24056
|
const func = nameFunction(name, (...args) => {
|
24057
24057
|
const data2 = fn3(...args);
|
@@ -24069,7 +24069,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
24069
24069
|
return func;
|
24070
24070
|
}
|
24071
24071
|
|
24072
|
-
// ../../components/coco/
|
24072
|
+
// ../../components/coco/shared/button/button.js
|
24073
24073
|
var import_lodash2 = __toESM(require_lodash(), 1);
|
24074
24074
|
var button_default = CocoComponent("button", (data2 = {}) => {
|
24075
24075
|
return __spreadProps(__spreadValues({
|
@@ -24203,17 +24203,18 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
24203
24203
|
root: {
|
24204
24204
|
"x-options": "options",
|
24205
24205
|
"x-tooltip": "tooltipText",
|
24206
|
-
"x-effect": "setTooltipText"
|
24206
|
+
"x-effect": "setTooltipText",
|
24207
|
+
":disabled": "disabled"
|
24207
24208
|
}
|
24208
24209
|
});
|
24209
24210
|
});
|
24210
24211
|
|
24211
|
-
// ../../components/coco/
|
24212
|
+
// ../../components/coco/shared/button/button_dropdown.js
|
24212
24213
|
var button_dropdown_exports = {};
|
24213
24214
|
__export(button_dropdown_exports, {
|
24214
24215
|
default: () => button_dropdown_default
|
24215
24216
|
});
|
24216
|
-
var button_dropdown_default = CocoComponent("buttonDropdown", (
|
24217
|
+
var button_dropdown_default = CocoComponent("buttonDropdown", () => {
|
24217
24218
|
return {
|
24218
24219
|
dropdown: null,
|
24219
24220
|
button: null,
|
@@ -24231,11 +24232,108 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
24231
24232
|
if (this.dropdown) {
|
24232
24233
|
this.dropdown.show();
|
24233
24234
|
}
|
24235
|
+
},
|
24236
|
+
/* bindings */
|
24237
|
+
root: {
|
24238
|
+
"@dropdown:show": "button.setState('active')",
|
24239
|
+
"@dropdown:hide": "button.resetState()",
|
24240
|
+
"@confirmation:confirm": "button.approveAndRun($event)",
|
24241
|
+
"@confirmation:cancel": "button.cancelConfirmation($event)"
|
24242
|
+
}
|
24243
|
+
};
|
24244
|
+
});
|
24245
|
+
|
24246
|
+
// ../../components/coco/shared/button_group/button_group.js
|
24247
|
+
var button_group_exports = {};
|
24248
|
+
__export(button_group_exports, {
|
24249
|
+
default: () => button_group_default
|
24250
|
+
});
|
24251
|
+
var button_group_default = CocoComponent("appButtonGroup", () => {
|
24252
|
+
return {
|
24253
|
+
options: ["collapsible"],
|
24254
|
+
ready: false,
|
24255
|
+
containerWidth: 0,
|
24256
|
+
contentWidth: 0,
|
24257
|
+
collapsed: false,
|
24258
|
+
singletonTooltip: null,
|
24259
|
+
tooltipInstances: [],
|
24260
|
+
get collapsible() {
|
24261
|
+
return this.$options.collapsible !== false;
|
24262
|
+
},
|
24263
|
+
get buttons() {
|
24264
|
+
const buttonElements = this.$el.querySelectorAll(
|
24265
|
+
"[data-component='button']"
|
24266
|
+
);
|
24267
|
+
return Array.from(buttonElements).map((el) => getComponent(el));
|
24268
|
+
},
|
24269
|
+
get parent() {
|
24270
|
+
return this.$root.parentElement;
|
24271
|
+
},
|
24272
|
+
init() {
|
24273
|
+
if (this.collapsible) {
|
24274
|
+
this.$nextTick(() => {
|
24275
|
+
this.onResize();
|
24276
|
+
this.createSingletonTooltip();
|
24277
|
+
this.ready = true;
|
24278
|
+
});
|
24279
|
+
} else {
|
24280
|
+
this.ready = true;
|
24281
|
+
}
|
24282
|
+
this.$watch("collapsed", (value) => {
|
24283
|
+
this.buttons.forEach((button) => {
|
24284
|
+
button.isCollapsed = value;
|
24285
|
+
});
|
24286
|
+
this.$nextTick(() => this.createSingletonTooltip());
|
24287
|
+
});
|
24288
|
+
},
|
24289
|
+
createSingletonTooltip() {
|
24290
|
+
this.destroySingletonTooltip();
|
24291
|
+
this.tooltipInstances = this.buttons.map((button) => {
|
24292
|
+
if (button.tippyInstance && button.shouldShowTooltip && button.shouldShowTooltip()) {
|
24293
|
+
return button.tippyInstance;
|
24294
|
+
}
|
24295
|
+
}).filter((t3) => t3);
|
24296
|
+
this.singletonTooltip = createSingleton(this.tooltipInstances, {
|
24297
|
+
theme: "coco-tooltip",
|
24298
|
+
delay: 100,
|
24299
|
+
moveTransition: "transform 0.1s ease-out"
|
24300
|
+
});
|
24301
|
+
},
|
24302
|
+
destroySingletonTooltip() {
|
24303
|
+
if (this.singletonTooltip && this.singletonTooltip.destroy) {
|
24304
|
+
this.singletonTooltip.destroy();
|
24305
|
+
this.singletonTooltip = null;
|
24306
|
+
this.tooltipInstances.forEach((tooltip) => tooltip.destroy());
|
24307
|
+
this.tooltipInstances = [];
|
24308
|
+
}
|
24309
|
+
},
|
24310
|
+
onResize() {
|
24311
|
+
if (!this.collapsible)
|
24312
|
+
return;
|
24313
|
+
this.containerWidth = Math.ceil(this.parent.offsetWidth);
|
24314
|
+
if (this.collapsed) {
|
24315
|
+
if (this.containerWidth > this.contentWidth) {
|
24316
|
+
this.collapsed = false;
|
24317
|
+
}
|
24318
|
+
} else {
|
24319
|
+
if (this.containerWidth < this.contentWidth) {
|
24320
|
+
this.collapsed = true;
|
24321
|
+
} else {
|
24322
|
+
const contentWidth = Math.ceil(this.$refs.buttons.scrollWidth);
|
24323
|
+
this.contentWidth = contentWidth;
|
24324
|
+
}
|
24325
|
+
}
|
24326
|
+
},
|
24327
|
+
destroy() {
|
24328
|
+
if (this.singletonTooltip) {
|
24329
|
+
this.singletonTooltip.destroy();
|
24330
|
+
this.singletonTooltip = null;
|
24331
|
+
}
|
24234
24332
|
}
|
24235
24333
|
};
|
24236
24334
|
});
|
24237
24335
|
|
24238
|
-
// ../../components/coco/
|
24336
|
+
// ../../components/coco/shared/dropdown/dropdown.js
|
24239
24337
|
var dropdown_exports = {};
|
24240
24338
|
__export(dropdown_exports, {
|
24241
24339
|
default: () => dropdown_default2
|
@@ -24244,7 +24342,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
24244
24342
|
return {};
|
24245
24343
|
});
|
24246
24344
|
|
24247
|
-
// ../../components/coco/
|
24345
|
+
// ../../components/coco/shared/icon/icon.js
|
24248
24346
|
var icon_exports = {};
|
24249
24347
|
__export(icon_exports, {
|
24250
24348
|
default: () => icon_default
|
@@ -24270,7 +24368,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
24270
24368
|
};
|
24271
24369
|
});
|
24272
24370
|
|
24273
|
-
// ../../components/coco/
|
24371
|
+
// ../../components/coco/shared/image_uploader/image_uploader.js
|
24274
24372
|
var image_uploader_exports = {};
|
24275
24373
|
__export(image_uploader_exports, {
|
24276
24374
|
default: () => image_uploader_default
|
@@ -24343,7 +24441,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
24343
24441
|
};
|
24344
24442
|
});
|
24345
24443
|
|
24346
|
-
// ../../components/coco/
|
24444
|
+
// ../../components/coco/shared/modal/modal.js
|
24347
24445
|
var modal_exports = {};
|
24348
24446
|
__export(modal_exports, {
|
24349
24447
|
default: () => modal_default
|
@@ -24433,7 +24531,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
24433
24531
|
};
|
24434
24532
|
});
|
24435
24533
|
|
24436
|
-
// ../../components/coco/
|
24534
|
+
// ../../components/coco/shared/modal_dialog/modal_dialog.js
|
24437
24535
|
var modal_dialog_exports = {};
|
24438
24536
|
__export(modal_dialog_exports, {
|
24439
24537
|
default: () => modal_dialog_default
|
@@ -24467,7 +24565,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
24467
24565
|
};
|
24468
24566
|
});
|
24469
24567
|
|
24470
|
-
// ../../components/coco/
|
24568
|
+
// ../../components/coco/shared/modal_lightbox/modal_lightbox.js
|
24471
24569
|
var modal_lightbox_exports = {};
|
24472
24570
|
__export(modal_lightbox_exports, {
|
24473
24571
|
default: () => modal_lightbox_default
|
@@ -24501,7 +24599,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
24501
24599
|
};
|
24502
24600
|
});
|
24503
24601
|
|
24504
|
-
// ../../components/coco/
|
24602
|
+
// ../../components/coco/shared/poll_controller/poll_controller.js
|
24505
24603
|
var poll_controller_exports = {};
|
24506
24604
|
__export(poll_controller_exports, {
|
24507
24605
|
default: () => poll_controller_default
|
@@ -24565,14 +24663,14 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
24565
24663
|
}
|
24566
24664
|
}
|
24567
24665
|
|
24568
|
-
// import-glob:/Users/
|
24569
|
-
var modules = [button_exports, button_dropdown_exports, dropdown_exports, icon_exports, image_uploader_exports, modal_exports, modal_dialog_exports, modal_lightbox_exports, poll_controller_exports];
|
24666
|
+
// import-glob:/Users/oliviabonnal/code/coveragebook/coco/app/assets/js/shared|@sharedComponents/**/*.js
|
24667
|
+
var modules = [button_exports, button_dropdown_exports, button_group_exports, dropdown_exports, icon_exports, image_uploader_exports, modal_exports, modal_dialog_exports, modal_lightbox_exports, poll_controller_exports];
|
24570
24668
|
var __default = modules;
|
24571
24669
|
|
24572
|
-
//
|
24670
|
+
// shared/components.js
|
24573
24671
|
var components_default = registerComponents(__default);
|
24574
24672
|
|
24575
|
-
// import-glob:/Users/
|
24673
|
+
// import-glob:/Users/oliviabonnal/code/coveragebook/coco/app/assets/js/book|@bookComponents/**/*.js
|
24576
24674
|
var modules2 = [];
|
24577
24675
|
var __default2 = modules2;
|
24578
24676
|
|
@@ -25086,92 +25184,6 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
25086
25184
|
};
|
25087
25185
|
});
|
25088
25186
|
|
25089
|
-
// ../../components/coco/app/elements/button_group/button_group.js
|
25090
|
-
var button_group_exports = {};
|
25091
|
-
__export(button_group_exports, {
|
25092
|
-
default: () => button_group_default
|
25093
|
-
});
|
25094
|
-
var button_group_default = CocoComponent("appButtonGroup", () => {
|
25095
|
-
return {
|
25096
|
-
options: ["collapsible"],
|
25097
|
-
ready: false,
|
25098
|
-
containerWidth: 0,
|
25099
|
-
contentWidth: 0,
|
25100
|
-
collapsed: false,
|
25101
|
-
singletonTooltip: null,
|
25102
|
-
tooltipInstances: [],
|
25103
|
-
get collapsible() {
|
25104
|
-
return this.$options.collapsible !== false;
|
25105
|
-
},
|
25106
|
-
get buttons() {
|
25107
|
-
const buttonElements = this.$el.querySelectorAll(
|
25108
|
-
"[data-component='app-button']"
|
25109
|
-
);
|
25110
|
-
return Array.from(buttonElements).map((el) => getComponent(el));
|
25111
|
-
},
|
25112
|
-
get parent() {
|
25113
|
-
return this.$root.parentElement;
|
25114
|
-
},
|
25115
|
-
init() {
|
25116
|
-
if (this.collapsible) {
|
25117
|
-
this.$nextTick(() => {
|
25118
|
-
this.onResize();
|
25119
|
-
this.createSingletonTooltip();
|
25120
|
-
this.ready = true;
|
25121
|
-
});
|
25122
|
-
} else {
|
25123
|
-
this.ready = true;
|
25124
|
-
}
|
25125
|
-
this.$watch("collapsed", (value) => {
|
25126
|
-
this.buttons.forEach((button) => {
|
25127
|
-
button.isCollapsed = value;
|
25128
|
-
});
|
25129
|
-
this.$nextTick(() => this.createSingletonTooltip());
|
25130
|
-
});
|
25131
|
-
},
|
25132
|
-
createSingletonTooltip() {
|
25133
|
-
this.destroySingletonTooltip();
|
25134
|
-
this.tooltipInstances = this.buttons.map((button) => button.shouldShowTooltip() && button.tippyInstance).filter((t3) => t3);
|
25135
|
-
this.singletonTooltip = createSingleton(this.tooltipInstances, {
|
25136
|
-
theme: "coco-tooltip",
|
25137
|
-
delay: 100,
|
25138
|
-
moveTransition: "transform 0.1s ease-out"
|
25139
|
-
});
|
25140
|
-
},
|
25141
|
-
destroySingletonTooltip() {
|
25142
|
-
if (this.singletonTooltip && this.singletonTooltip.destroy) {
|
25143
|
-
this.singletonTooltip.destroy();
|
25144
|
-
this.singletonTooltip = null;
|
25145
|
-
this.tooltipInstances.forEach((tooltip) => tooltip.destroy());
|
25146
|
-
this.tooltipInstances = [];
|
25147
|
-
}
|
25148
|
-
},
|
25149
|
-
onResize() {
|
25150
|
-
if (!this.collapsible)
|
25151
|
-
return;
|
25152
|
-
this.containerWidth = Math.ceil(this.parent.offsetWidth);
|
25153
|
-
if (this.collapsed) {
|
25154
|
-
if (this.containerWidth > this.contentWidth) {
|
25155
|
-
this.collapsed = false;
|
25156
|
-
}
|
25157
|
-
} else {
|
25158
|
-
if (this.containerWidth < this.contentWidth) {
|
25159
|
-
this.collapsed = true;
|
25160
|
-
} else {
|
25161
|
-
const contentWidth = Math.ceil(this.$refs.buttons.scrollWidth);
|
25162
|
-
this.contentWidth = contentWidth;
|
25163
|
-
}
|
25164
|
-
}
|
25165
|
-
},
|
25166
|
-
destroy() {
|
25167
|
-
if (this.singletonTooltip) {
|
25168
|
-
this.singletonTooltip.destroy();
|
25169
|
-
this.singletonTooltip = null;
|
25170
|
-
}
|
25171
|
-
}
|
25172
|
-
};
|
25173
|
-
});
|
25174
|
-
|
25175
25187
|
// ../../components/coco/app/elements/color_picker/color_picker.js
|
25176
25188
|
var color_picker_exports = {};
|
25177
25189
|
__export(color_picker_exports, {
|
@@ -27436,8 +27448,8 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
|
|
27436
27448
|
return {};
|
27437
27449
|
});
|
27438
27450
|
|
27439
|
-
// import-glob:/Users/
|
27440
|
-
var modules3 = [header_exports, nav_drawer_exports, item_exports, menu_exports, navbar_exports, slide_editor_exports, alert_exports,
|
27451
|
+
// import-glob:/Users/oliviabonnal/code/coveragebook/coco/app/assets/js/app|@appComponents/**/*.js
|
27452
|
+
var modules3 = [header_exports, nav_drawer_exports, item_exports, menu_exports, navbar_exports, slide_editor_exports, alert_exports, color_picker_exports, color_picker_button_exports, confirm_panel_exports, image_picker_exports, image_picker_button_exports, layout_picker_button_exports, menu_button_exports, notice_exports, seamless_textarea_exports, snackbar_exports, system_banner_exports, toast_exports, toolbar_exports, application_exports, page_exports];
|
27441
27453
|
var __default3 = modules3;
|
27442
27454
|
|
27443
27455
|
// app/components.js
|