coveragebook_components 0.7.9 → 0.8.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (82) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/build/coco/app.css +1134 -165
  3. data/app/assets/build/coco/app.js +307 -49
  4. data/app/assets/build/coco/book.css +55 -9
  5. data/app/assets/build/coco/book.js +24 -2
  6. data/app/assets/css/app/tippy.css +4 -0
  7. data/app/assets/css/base/base.css +12 -0
  8. data/app/assets/css/base/components/coco.css +0 -3
  9. data/app/assets/js/app/setup.js +22 -0
  10. data/app/assets/js/app.js +2 -0
  11. data/app/assets/js/helpers/location.js +9 -0
  12. data/app/assets/js/libs/tippy/index.js +7 -2
  13. data/app/components/coco/app/blocks/header/header.css +43 -0
  14. data/app/components/coco/app/blocks/header/header.html.erb +30 -0
  15. data/app/components/coco/app/blocks/header/header.js +11 -0
  16. data/app/components/coco/app/blocks/header/header.rb +35 -0
  17. data/app/components/coco/app/blocks/nav_drawer/nav_drawer.css +48 -3
  18. data/app/components/coco/app/blocks/nav_drawer/nav_drawer.html.erb +14 -6
  19. data/app/components/coco/app/blocks/nav_drawer/nav_drawer.js +18 -1
  20. data/app/components/coco/app/blocks/nav_drawer/nav_drawer.rb +26 -1
  21. data/app/components/coco/app/blocks/sidebar_nav/sidebar_nav.css +104 -0
  22. data/app/components/coco/app/blocks/sidebar_nav/sidebar_nav.html.erb +42 -0
  23. data/app/components/coco/app/blocks/sidebar_nav/sidebar_nav.js +28 -0
  24. data/app/components/coco/app/blocks/sidebar_nav/sidebar_nav.rb +28 -0
  25. data/app/components/coco/app/blocks/sidebar_nav_item/sidebar_nav_item.css +165 -0
  26. data/app/components/coco/app/blocks/sidebar_nav_item/sidebar_nav_item.html.erb +43 -0
  27. data/app/components/coco/app/blocks/sidebar_nav_item/sidebar_nav_item.js +41 -0
  28. data/app/components/coco/app/blocks/sidebar_nav_item/sidebar_nav_item.rb +98 -0
  29. data/app/components/coco/app/elements/alert/alert.css +65 -18
  30. data/app/components/coco/app/elements/alert/alert.html.erb +20 -5
  31. data/app/components/coco/app/elements/alert/alert.js +4 -3
  32. data/app/components/coco/app/elements/alert/alert.rb +16 -6
  33. data/app/components/coco/app/elements/button/button.css +87 -5
  34. data/app/components/coco/app/elements/button/button.rb +3 -1
  35. data/app/components/coco/app/elements/button_group/button_group.rb +4 -0
  36. data/app/components/coco/app/elements/button_to/button_to.css +5 -1
  37. data/app/components/coco/app/elements/button_to/button_to.rb +8 -1
  38. data/app/components/coco/app/elements/color_picker/color_picker.rb +1 -1
  39. data/app/components/coco/app/elements/menu/menu.css +5 -0
  40. data/app/components/coco/app/elements/menu/menu.html.erb +1 -1
  41. data/app/components/coco/app/elements/menu/menu.rb +2 -1
  42. data/app/components/coco/app/elements/menu_button/menu_button.html.erb +6 -0
  43. data/app/components/coco/app/elements/menu_button/menu_button.rb +8 -9
  44. data/app/components/coco/app/elements/menu_items/user_profile/user_profile.css +22 -0
  45. data/app/components/coco/app/elements/menu_items/user_profile/user_profile.html.erb +17 -0
  46. data/app/components/coco/app/elements/menu_items/user_profile/user_profile.rb +20 -0
  47. data/app/components/coco/app/elements/notice/notice.css +4 -0
  48. data/app/components/coco/app/elements/notice/notice.rb +2 -2
  49. data/app/components/coco/app/elements/snackbar/snackbar.css +8 -1
  50. data/app/components/coco/app/elements/snackbar/snackbar.rb +2 -2
  51. data/app/components/coco/app/elements/system_banner/system_banner.html.erb +2 -1
  52. data/app/components/coco/app/elements/system_banner/system_banner.js +35 -2
  53. data/app/components/coco/app/elements/system_banner/system_banner.rb +47 -3
  54. data/app/components/coco/app/layouts/application/application.css +104 -4
  55. data/app/components/coco/app/layouts/application/application.html.erb +28 -7
  56. data/app/components/coco/app/layouts/application/application.js +16 -0
  57. data/app/components/coco/app/layouts/application/application.rb +11 -3
  58. data/app/components/coco/base/avatar/avatar.css +25 -0
  59. data/app/components/coco/base/avatar/avatar.rb +20 -0
  60. data/app/components/coco/base/icon/icon.css +6 -2
  61. data/app/components/coco/base/icon/icon.rb +1 -1
  62. data/app/components/coco/base/modal/modal.css +2 -1
  63. data/app/components/coco/base/modal/modal.html.erb +1 -1
  64. data/app/components/coco/base/modal/modal.js +2 -0
  65. data/app/components/coco/base/modal_lightbox/modal_lightbox.js +2 -2
  66. data/app/components/coco/base/placeholder/placeholder.css +15 -1
  67. data/app/components/coco/base/placeholder/placeholder.rb +2 -0
  68. data/app/components/coco/concerns/accepts_tag_attributes.rb +6 -2
  69. data/app/components/coco/concerns/acts_as_button_group.rb +30 -12
  70. data/app/helpers/coco/app_helper.rb +26 -2
  71. data/app/helpers/coco/base_helper.rb +6 -0
  72. data/app/helpers/coco/url_helper.rb +5 -1
  73. data/config/tailwind.base.config.cjs +3 -0
  74. data/config/tokens.cjs +6 -0
  75. data/lib/coco.rb +1 -1
  76. metadata +24 -10
  77. data/app/components/coco/app/blocks/banner/banner.css +0 -5
  78. data/app/components/coco/app/blocks/banner/banner.rb +0 -8
  79. data/app/components/coco/app/blocks/nav_bar/nav_bar.css +0 -51
  80. data/app/components/coco/app/blocks/nav_bar/nav_bar.html.erb +0 -23
  81. data/app/components/coco/app/blocks/nav_bar/nav_bar.js +0 -31
  82. data/app/components/coco/app/blocks/nav_bar/nav_bar.rb +0 -19
@@ -4299,7 +4299,7 @@
4299
4299
  function toString(value) {
4300
4300
  return value == null ? "" : baseToString(value);
4301
4301
  }
4302
- var assign = createAssigner(function(object, source) {
4302
+ var assign2 = createAssigner(function(object, source) {
4303
4303
  if (isPrototype(source) || isArrayLike(source)) {
4304
4304
  copyObject(source, keys(source), object);
4305
4305
  return;
@@ -4611,7 +4611,7 @@
4611
4611
  position -= target.length;
4612
4612
  return position >= 0 && string.slice(position, end2) == target;
4613
4613
  }
4614
- function escape(string) {
4614
+ function escape2(string) {
4615
4615
  string = toString(string);
4616
4616
  return string && reHasUnescapedHtml.test(string) ? string.replace(reUnescapedHtml, escapeHtmlChar) : string;
4617
4617
  }
@@ -5049,7 +5049,7 @@
5049
5049
  }
5050
5050
  lodash.after = after;
5051
5051
  lodash.ary = ary;
5052
- lodash.assign = assign;
5052
+ lodash.assign = assign2;
5053
5053
  lodash.assignIn = assignIn;
5054
5054
  lodash.assignInWith = assignInWith;
5055
5055
  lodash.assignWith = assignWith;
@@ -5217,7 +5217,7 @@
5217
5217
  lodash.divide = divide;
5218
5218
  lodash.endsWith = endsWith;
5219
5219
  lodash.eq = eq;
5220
- lodash.escape = escape;
5220
+ lodash.escape = escape2;
5221
5221
  lodash.escapeRegExp = escapeRegExp;
5222
5222
  lodash.every = every;
5223
5223
  lodash.find = find;
@@ -6073,6 +6073,9 @@
6073
6073
  warning: __spreadValues({}, colors.amber),
6074
6074
  info: __spreadValues({}, colors.blue),
6075
6075
  background: {
6076
+ header: {
6077
+ DEFAULT: "#427484"
6078
+ },
6076
6079
  light: {
6077
6080
  1: colors.white,
6078
6081
  2: colors.gray[50],
@@ -6118,7 +6121,8 @@
6118
6121
  primary: {
6119
6122
  DEFAULT: colors.green[500],
6120
6123
  dark: colors.green[600],
6121
- inverse: colors.green[300]
6124
+ inverse: colors.green[300],
6125
+ "inverse-vivid": "#009979"
6122
6126
  },
6123
6127
  negative: {
6124
6128
  DEFAULT: colors.red[600],
@@ -6150,6 +6154,7 @@
6150
6154
  xl: "1200px",
6151
6155
  "2xl": "1400px",
6152
6156
  max: "1800px",
6157
+ letterbox: { raw: "(max-height: 760px) and (min-width: 576px)" },
6153
6158
  print: { raw: "print" }
6154
6159
  // Note: PDFs are rendered at a viewport width of 1280px
6155
6160
  };
@@ -6158,6 +6163,7 @@
6158
6163
  "para-sm": ["14px", "20px"],
6159
6164
  "para-md": ["16px", "24px"],
6160
6165
  "para-lg": ["18px", "27px"],
6166
+ "label-xxs": ["10px", "12px"],
6161
6167
  "label-xs": ["12px", "14px"],
6162
6168
  "label-sm": ["14px", "16px"],
6163
6169
  "label-md": ["16px", "20px"],
@@ -14032,7 +14038,7 @@
14032
14038
  var package_default = {
14033
14039
  name: "coveragebook-components",
14034
14040
  type: "module",
14035
- version: "0.7.9",
14041
+ version: "0.8.0-beta.1",
14036
14042
  main: "index.js",
14037
14043
  repository: "git@github.com:coveragebook/coco.git",
14038
14044
  author: "Mark Perkins <mark@coveragebook.com>",
@@ -14053,6 +14059,7 @@
14053
14059
  "container-query-polyfill": "^1.0.2",
14054
14060
  del: "^7.0.0",
14055
14061
  html2canvas: "^1.4.1",
14062
+ "js-cookie": "^3.0.5",
14056
14063
  lodash: "^4.17.21",
14057
14064
  "lucide-static": "^0.258.0",
14058
14065
  tailwindcss: "^3.3.0",
@@ -20207,17 +20214,6 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
20207
20214
  var import_lodash = __toESM(require_lodash(), 1);
20208
20215
 
20209
20216
  // helpers/dom.js
20210
- function getHiddenElementDimensions(el, display = "block") {
20211
- let size2;
20212
- if (el.style.display === "none") {
20213
- el.style.display = display;
20214
- size2 = el.getBoundingClientRect();
20215
- el.style.display = "none";
20216
- } else {
20217
- size2 = el.getBoundingClientRect();
20218
- }
20219
- return size2;
20220
- }
20221
20217
  function castAttributeValue(value) {
20222
20218
  if (value === "false") {
20223
20219
  return false;
@@ -23006,6 +23002,27 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
23006
23002
  tippy.defaultProps = defaultProps;
23007
23003
  tippy.setDefaultProps = setDefaultProps;
23008
23004
  tippy.currentInput = currentInput;
23005
+ var hideAll = function hideAll2(_temp) {
23006
+ var _ref = _temp === void 0 ? {} : _temp, excludedReferenceOrInstance = _ref.exclude, duration = _ref.duration;
23007
+ mountedInstances.forEach(function(instance) {
23008
+ var isExcluded = false;
23009
+ if (excludedReferenceOrInstance) {
23010
+ isExcluded = isReferenceElement(excludedReferenceOrInstance) ? instance.reference === excludedReferenceOrInstance : instance.popper === excludedReferenceOrInstance.popper;
23011
+ }
23012
+ if (!isExcluded) {
23013
+ var originalDuration = instance.props.duration;
23014
+ instance.setProps({
23015
+ duration
23016
+ });
23017
+ instance.hide();
23018
+ if (!instance.state.isDestroyed) {
23019
+ instance.setProps({
23020
+ duration: originalDuration
23021
+ });
23022
+ }
23023
+ }
23024
+ });
23025
+ };
23009
23026
  var applyStylesModifier = Object.assign({}, applyStyles_default, {
23010
23027
  effect: function effect6(_ref) {
23011
23028
  var state = _ref.state;
@@ -23662,6 +23679,31 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
23662
23679
  module_default.plugin(notification_default);
23663
23680
  var alpine_default2 = module_default;
23664
23681
 
23682
+ // helpers/location.js
23683
+ function navigateTo(url, options = {}) {
23684
+ if (window.Turbo && options.turbo === true) {
23685
+ window.Turbo.visit(url, { action: options.action || "advance" });
23686
+ } else {
23687
+ location.assign(url);
23688
+ }
23689
+ }
23690
+
23691
+ // app/setup.js
23692
+ window.addEventListener("navigate", (event) => {
23693
+ const { url, turbo, action } = event.detail;
23694
+ if (url) {
23695
+ navigateTo(url, { turbo, action });
23696
+ }
23697
+ });
23698
+ function setAppHeightProperty() {
23699
+ document.documentElement.style.setProperty(
23700
+ "--app-height",
23701
+ `${window.innerHeight}px`
23702
+ );
23703
+ }
23704
+ window.addEventListener("resize", setAppHeightProperty);
23705
+ setAppHeightProperty();
23706
+
23665
23707
  // ../../components/coco/base/button/button.js
23666
23708
  var button_exports = {};
23667
23709
  __export(button_exports, {
@@ -23962,6 +24004,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
23962
24004
  },
23963
24005
  show() {
23964
24006
  this.open = true;
24007
+ hideAll();
23965
24008
  setTimeout(() => {
23966
24009
  this.$dispatch("modal:shown");
23967
24010
  }, 400);
@@ -24080,12 +24123,12 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
24080
24123
  },
24081
24124
  imageLoaded() {
24082
24125
  this.loaded = true;
24083
- this.$nextTick(() => {
24126
+ setTimeout(() => {
24084
24127
  const scrollTop = parseInt(this.img.dataset.scrollTop, 10);
24085
24128
  if (!isNaN(scrollTop) && scrollTop !== 0) {
24086
24129
  this.modal.scrollTo(scrollTop);
24087
24130
  }
24088
- });
24131
+ }, 200);
24089
24132
  },
24090
24133
  get img() {
24091
24134
  return this.$refs.media.querySelector("img");
@@ -24110,45 +24153,111 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
24110
24153
  // book/components.js
24111
24154
  var components_default2 = registerComponents(__default2);
24112
24155
 
24113
- // ../../components/coco/app/blocks/nav_bar/nav_bar.js
24114
- var nav_bar_exports = {};
24115
- __export(nav_bar_exports, {
24116
- default: () => nav_bar_default
24156
+ // ../../components/coco/app/blocks/header/header.js
24157
+ var header_exports = {};
24158
+ __export(header_exports, {
24159
+ default: () => header_default
24160
+ });
24161
+ var header_default = CocoComponent("appHeader", () => {
24162
+ return {
24163
+ drawerOpen: false,
24164
+ toggleDrawer() {
24165
+ this.drawerOpen = !this.drawerOpen;
24166
+ }
24167
+ };
24168
+ });
24169
+
24170
+ // ../../components/coco/app/blocks/nav_drawer/nav_drawer.js
24171
+ var nav_drawer_exports = {};
24172
+ __export(nav_drawer_exports, {
24173
+ default: () => nav_drawer_default
24174
+ });
24175
+ var nav_drawer_default = CocoComponent("appNavDrawer", () => {
24176
+ return {
24177
+ active: false,
24178
+ init() {
24179
+ this.$watch("drawerOpen", (open) => {
24180
+ if (open) {
24181
+ this.$refs.content.scrollTop = 0;
24182
+ setTimeout(() => {
24183
+ this.active = true;
24184
+ }, 200);
24185
+ } else {
24186
+ this.active = false;
24187
+ }
24188
+ });
24189
+ },
24190
+ close() {
24191
+ this.drawerOpen = false;
24192
+ }
24193
+ };
24194
+ });
24195
+
24196
+ // ../../components/coco/app/blocks/sidebar_nav/sidebar_nav.js
24197
+ var sidebar_nav_exports = {};
24198
+ __export(sidebar_nav_exports, {
24199
+ default: () => sidebar_nav_default
24117
24200
  });
24118
24201
  var import_tokens = __toESM(require_tokens(), 1);
24119
- var nav_bar_default = CocoComponent("appNavBar", () => {
24120
- const mobileMaxWidth = parseInt(import_tokens.default.app.screens.md, 10);
24202
+ var mobileMaxWidth = parseInt(import_tokens.default.app.screens.sm, 10);
24203
+ var sidebar_nav_default = CocoComponent("appSidebarNav", () => {
24121
24204
  return {
24122
- mobile: true,
24205
+ sizeObserver: null,
24206
+ mobileLayout: true,
24123
24207
  init() {
24124
- const sizeObserver = new ResizeObserver(
24208
+ this.sizeObserver = new ResizeObserver(
24125
24209
  Alpine.throttle((entries) => {
24126
24210
  this.$nextTick(() => {
24127
- const navWidth = entries[0].contentRect.width;
24128
- const linksWidth = this.$refs.links.offsetWidth;
24129
- const primaryWidth = getHiddenElementDimensions(this.$refs.primaryLinks, "flex").width;
24130
- const secondaryWidth = getHiddenElementDimensions(
24131
- this.$refs.secondaryLinks,
24132
- "flex"
24133
- ).width;
24134
- const difference = linksWidth - primaryWidth - secondaryWidth;
24135
- this.mobile = navWidth < mobileMaxWidth || this.mobudifference <= 50;
24211
+ const bodyWidth = entries[0].contentRect.width;
24212
+ this.mobileLayout = bodyWidth < mobileMaxWidth;
24136
24213
  });
24137
24214
  }, 20)
24138
24215
  );
24139
- sizeObserver.observe(this.$root);
24216
+ this.sizeObserver.observe(document.documentElement);
24217
+ },
24218
+ destroy() {
24219
+ this.sizeObserver && this.sizeObserver.disconnect();
24140
24220
  }
24141
24221
  };
24142
24222
  });
24143
24223
 
24144
- // ../../components/coco/app/blocks/nav_drawer/nav_drawer.js
24145
- var nav_drawer_exports = {};
24146
- __export(nav_drawer_exports, {
24147
- default: () => nav_drawer_default
24224
+ // ../../components/coco/app/blocks/sidebar_nav_item/sidebar_nav_item.js
24225
+ var sidebar_nav_item_exports = {};
24226
+ __export(sidebar_nav_item_exports, {
24227
+ default: () => sidebar_nav_item_default
24148
24228
  });
24149
- var nav_drawer_default = CocoComponent("appNavDrawer", () => {
24229
+ var sidebar_nav_item_default = CocoComponent("appSidebarNavItem", () => {
24150
24230
  return {
24151
- open: false
24231
+ menu: null,
24232
+ init() {
24233
+ if (this.$refs.menu) {
24234
+ this.menu = tippy_default(this.$el, {
24235
+ theme: "coco-naked-dropdown",
24236
+ placement: this.menuPlacement,
24237
+ arrow: false,
24238
+ offset: [0, 0],
24239
+ trigger: "click",
24240
+ interactive: true,
24241
+ maxWidth: null,
24242
+ content: () => {
24243
+ return this.$refs.menu.innerHTML;
24244
+ }
24245
+ });
24246
+ }
24247
+ this.$watch("mobileLayout", () => {
24248
+ this.onOrientationChange();
24249
+ });
24250
+ },
24251
+ onOrientationChange() {
24252
+ if (this.menu) {
24253
+ this.menu.setProps({
24254
+ placement: this.menuPlacement
24255
+ });
24256
+ }
24257
+ },
24258
+ get menuPlacement() {
24259
+ return this.mobileLayout ? "top" : "right-start";
24260
+ }
24152
24261
  };
24153
24262
  });
24154
24263
 
@@ -24481,16 +24590,17 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
24481
24590
  }
24482
24591
  },
24483
24592
  remove() {
24593
+ this.$nextTick(() => this.$dispatch("alert:removed", { alert: this }));
24484
24594
  this.$root.remove();
24485
24595
  },
24486
24596
  checkSingleLineWrap({ height }) {
24487
- if (!this.forceMultiLine) {
24597
+ this.forceMultiLine = false;
24598
+ this.$nextTick(() => {
24488
24599
  this.forceMultiLine = height > 24 && this.$options.singleLine;
24489
- }
24600
+ });
24490
24601
  },
24491
24602
  root: {
24492
24603
  "x-options": '["dismissable", "singleLine"]',
24493
- "x-show": "!dismissed",
24494
24604
  ":class": "{'force-multi-line': forceMultiLine}"
24495
24605
  }
24496
24606
  };
@@ -26600,8 +26710,135 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
26600
26710
  __export(system_banner_exports, {
26601
26711
  default: () => system_banner_default
26602
26712
  });
26603
- var system_banner_default = CocoComponent("appSystemBanner", () => {
26604
- return {};
26713
+
26714
+ // ../../../node_modules/js-cookie/dist/js.cookie.mjs
26715
+ function assign(target) {
26716
+ for (var i3 = 1; i3 < arguments.length; i3++) {
26717
+ var source = arguments[i3];
26718
+ for (var key in source) {
26719
+ target[key] = source[key];
26720
+ }
26721
+ }
26722
+ return target;
26723
+ }
26724
+ var defaultConverter = {
26725
+ read: function(value) {
26726
+ if (value[0] === '"') {
26727
+ value = value.slice(1, -1);
26728
+ }
26729
+ return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent);
26730
+ },
26731
+ write: function(value) {
26732
+ return encodeURIComponent(value).replace(
26733
+ /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,
26734
+ decodeURIComponent
26735
+ );
26736
+ }
26737
+ };
26738
+ function init(converter, defaultAttributes) {
26739
+ function set3(name, value, attributes) {
26740
+ if (typeof document === "undefined") {
26741
+ return;
26742
+ }
26743
+ attributes = assign({}, defaultAttributes, attributes);
26744
+ if (typeof attributes.expires === "number") {
26745
+ attributes.expires = new Date(Date.now() + attributes.expires * 864e5);
26746
+ }
26747
+ if (attributes.expires) {
26748
+ attributes.expires = attributes.expires.toUTCString();
26749
+ }
26750
+ name = encodeURIComponent(name).replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent).replace(/[()]/g, escape);
26751
+ var stringifiedAttributes = "";
26752
+ for (var attributeName in attributes) {
26753
+ if (!attributes[attributeName]) {
26754
+ continue;
26755
+ }
26756
+ stringifiedAttributes += "; " + attributeName;
26757
+ if (attributes[attributeName] === true) {
26758
+ continue;
26759
+ }
26760
+ stringifiedAttributes += "=" + attributes[attributeName].split(";")[0];
26761
+ }
26762
+ return document.cookie = name + "=" + converter.write(value, name) + stringifiedAttributes;
26763
+ }
26764
+ function get3(name) {
26765
+ if (typeof document === "undefined" || arguments.length && !name) {
26766
+ return;
26767
+ }
26768
+ var cookies = document.cookie ? document.cookie.split("; ") : [];
26769
+ var jar = {};
26770
+ for (var i3 = 0; i3 < cookies.length; i3++) {
26771
+ var parts = cookies[i3].split("=");
26772
+ var value = parts.slice(1).join("=");
26773
+ try {
26774
+ var found = decodeURIComponent(parts[0]);
26775
+ jar[found] = converter.read(value, found);
26776
+ if (name === found) {
26777
+ break;
26778
+ }
26779
+ } catch (e3) {
26780
+ }
26781
+ }
26782
+ return name ? jar[name] : jar;
26783
+ }
26784
+ return Object.create(
26785
+ {
26786
+ set: set3,
26787
+ get: get3,
26788
+ remove: function(name, attributes) {
26789
+ set3(
26790
+ name,
26791
+ "",
26792
+ assign({}, attributes, {
26793
+ expires: -1
26794
+ })
26795
+ );
26796
+ },
26797
+ withAttributes: function(attributes) {
26798
+ return init(this.converter, assign({}, this.attributes, attributes));
26799
+ },
26800
+ withConverter: function(converter2) {
26801
+ return init(assign({}, this.converter, converter2), this.attributes);
26802
+ }
26803
+ },
26804
+ {
26805
+ attributes: { value: Object.freeze(defaultAttributes) },
26806
+ converter: { value: Object.freeze(converter) }
26807
+ }
26808
+ );
26809
+ }
26810
+ var api = init(defaultConverter, { path: "/" });
26811
+
26812
+ // ../../components/coco/app/elements/system_banner/system_banner.js
26813
+ var system_banner_default = CocoComponent("appSystemBanner", (opts = {}) => {
26814
+ return {
26815
+ cookieName: null,
26816
+ cookieValue: null,
26817
+ cookieExpiry: null,
26818
+ init() {
26819
+ this.cookieName = opts.cookieName;
26820
+ this.cookieValue = opts.cookieValue;
26821
+ this.cookieExpiry = opts.cookieExpiry;
26822
+ },
26823
+ onDismiss() {
26824
+ this.$dispatch("banner:dismiss", { banner: this });
26825
+ if (this.shouldSetCookie) {
26826
+ api.set(this.cookieName, this.cookieValue, {
26827
+ expires: this.cookieExpiry
26828
+ });
26829
+ }
26830
+ },
26831
+ remove() {
26832
+ this.$root.remove();
26833
+ },
26834
+ get shouldSetCookie() {
26835
+ return Number.isInteger(this.cookieExpiry);
26836
+ },
26837
+ root: {
26838
+ "@alert:dismiss": "onDismiss",
26839
+ "@alert:removed": "remove"
26840
+ }
26841
+ };
26605
26842
  });
26606
26843
 
26607
26844
  // ../../components/coco/app/elements/toast/toast.js
@@ -26674,8 +26911,26 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
26674
26911
  };
26675
26912
  });
26676
26913
 
26914
+ // ../../components/coco/app/layouts/application/application.js
26915
+ var application_exports = {};
26916
+ __export(application_exports, {
26917
+ default: () => application_default
26918
+ });
26919
+ var application_default = CocoComponent("appLayout", (opts) => {
26920
+ return {
26921
+ banner: false,
26922
+ init() {
26923
+ this.banner = opts.banner;
26924
+ },
26925
+ hideBanner() {
26926
+ this.banner = false;
26927
+ this.$el.remove();
26928
+ }
26929
+ };
26930
+ });
26931
+
26677
26932
  // import-glob:/Users/mark/Code/coveragebook/coco/app/assets/js/app|@appComponents/**/*.js
26678
- var modules3 = [nav_bar_exports, nav_drawer_exports, slide_editor_exports, alert_exports, button_group_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];
26933
+ var modules3 = [header_exports, nav_drawer_exports, sidebar_nav_exports, sidebar_nav_item_exports, slide_editor_exports, alert_exports, button_group_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];
26679
26934
  var __default3 = modules3;
26680
26935
 
26681
26936
  // app/components.js
@@ -26735,4 +26990,7 @@ html2canvas/dist/html2canvas.js:
26735
26990
  * Licensed under MPL 2.0
26736
26991
  * github.com/jaames/iro.js
26737
26992
  *)
26993
+
26994
+ js-cookie/dist/js.cookie.mjs:
26995
+ (*! js-cookie v3.0.5 | MIT *)
26738
26996
  */
@@ -542,12 +542,17 @@ select {
542
542
  outline: 1px solid ButtonText;
543
543
  outline: 1px auto -webkit-focus-ring-color;
544
544
  }
545
+ :root {
546
+ --app-height: 100%;
547
+ }
548
+
545
549
  html {
546
550
  scroll-behavior: smooth;
547
551
  font-family: proxima-nova, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
548
552
  --tw-text-opacity: 1;
549
553
  color: rgb(17 24 39 / var(--tw-text-opacity));
550
554
  }
555
+
551
556
  @media (prefers-reduced-motion: no-preference) {
552
557
 
553
558
  html {
@@ -723,9 +728,6 @@ select {
723
728
  font-family: proxima-nova, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
724
729
  --tw-text-opacity: 1;
725
730
  color: rgb(17 24 39 / var(--tw-text-opacity));
726
-
727
- -webkit-font-smoothing: antialiased;
728
- -moz-osx-font-smoothing: grayscale;
729
731
  }
730
732
  [data-coco] h1,
731
733
  [data-coco] h2,
@@ -735,6 +737,32 @@ select {
735
737
  [data-coco] h6 {
736
738
  font-family: proxima-nova, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
737
739
  }
740
+ [data-coco][data-component="avatar"] {
741
+ display: block;
742
+ flex: none;
743
+ overflow: hidden;
744
+ border-radius: 9999px;
745
+ }
746
+ [data-coco][data-component="avatar"] img {
747
+ width: 100%;
748
+ border-radius: 9999px;
749
+ }
750
+ [data-coco][data-component="avatar"][data-size="sm"] {
751
+ height: 1.25rem;
752
+ width: 1.25rem;
753
+ }
754
+ [data-coco][data-component="avatar"][data-size="md"] {
755
+ height: 1.5rem;
756
+ width: 1.5rem;
757
+ }
758
+ [data-coco][data-component="avatar"][data-size="lg"] {
759
+ height: 1.75rem;
760
+ width: 1.75rem;
761
+ }
762
+ [data-coco][data-component="avatar"][data-size="xl"] {
763
+ height: 2rem;
764
+ width: 2rem;
765
+ }
738
766
  [data-coco].coco-button {
739
767
  display: flex;
740
768
  width: auto;
@@ -905,12 +933,16 @@ select {
905
933
  width: 1.5rem;
906
934
  }
907
935
  [data-coco][data-component="icon"][data-size="xl"] {
908
- height: 2.25rem;
909
- width: 2.25rem;
936
+ height: 2rem;
937
+ width: 2rem;
910
938
  }
911
939
  [data-coco][data-component="icon"][data-size="xxl"] {
912
- height: 3rem;
913
- width: 3rem;
940
+ height: 2.5rem;
941
+ width: 2.5rem;
942
+ }
943
+ [data-coco][data-component="icon"][data-size="full"] {
944
+ height: 100%;
945
+ width: 100%;
914
946
  }
915
947
  /* Motion */
916
948
  @keyframes spin {
@@ -980,7 +1012,6 @@ select {
980
1012
  position: relative;
981
1013
  z-index: 10000;
982
1014
  display: flex;
983
- min-height: 100vh;
984
1015
  align-items: center;
985
1016
  justify-content: center;
986
1017
  padding: 0.5rem;
@@ -991,6 +1022,9 @@ select {
991
1022
  padding: 2rem;
992
1023
  }
993
1024
  }
1025
+ [data-coco][data-component="modal"] .modal-container {
1026
+ min-height: var(--app-height);
1027
+ }
994
1028
  [data-coco][data-component="modal"] .modal-content {
995
1029
  display: contents;
996
1030
  }
@@ -1253,13 +1287,22 @@ select {
1253
1287
  box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
1254
1288
  }
1255
1289
  [data-coco][data-component="placeholder"] {
1290
+ padding: 1rem;
1291
+ }
1292
+ [data-coco][data-component="placeholder"][data-boxed="true"] {
1256
1293
  border-width: 1px;
1257
1294
  border-style: dashed;
1258
1295
  --tw-border-opacity: 1;
1259
1296
  border-color: rgb(156 163 175 / var(--tw-border-opacity));
1260
1297
  --tw-bg-opacity: 1;
1261
1298
  background-color: rgb(249 250 251 / var(--tw-bg-opacity));
1262
- padding: 1rem;
1299
+ }
1300
+ [data-coco][data-component="placeholder"][data-prose="true"] .placeholder-content > :not([hidden]) ~ :not([hidden]) {
1301
+ --tw-space-y-reverse: 0;
1302
+ margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));
1303
+ margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));
1304
+ }
1305
+ [data-coco][data-component="placeholder"][data-prose="false"] {
1263
1306
  text-align: center;
1264
1307
  }
1265
1308
  [data-coco][data-component="placeholder"][data-size="full"] {
@@ -1755,6 +1798,9 @@ select {
1755
1798
  .fixed {
1756
1799
  position: fixed;
1757
1800
  }
1801
+ .\!block {
1802
+ display: block !important;
1803
+ }
1758
1804
  .block {
1759
1805
  display: block;
1760
1806
  }
@@ -14395,6 +14395,27 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
14395
14395
  tippy.defaultProps = defaultProps;
14396
14396
  tippy.setDefaultProps = setDefaultProps;
14397
14397
  tippy.currentInput = currentInput;
14398
+ var hideAll = function hideAll2(_temp) {
14399
+ var _ref = _temp === void 0 ? {} : _temp, excludedReferenceOrInstance = _ref.exclude, duration = _ref.duration;
14400
+ mountedInstances.forEach(function(instance) {
14401
+ var isExcluded = false;
14402
+ if (excludedReferenceOrInstance) {
14403
+ isExcluded = isReferenceElement(excludedReferenceOrInstance) ? instance.reference === excludedReferenceOrInstance : instance.popper === excludedReferenceOrInstance.popper;
14404
+ }
14405
+ if (!isExcluded) {
14406
+ var originalDuration = instance.props.duration;
14407
+ instance.setProps({
14408
+ duration
14409
+ });
14410
+ instance.hide();
14411
+ if (!instance.state.isDestroyed) {
14412
+ instance.setProps({
14413
+ duration: originalDuration
14414
+ });
14415
+ }
14416
+ }
14417
+ });
14418
+ };
14398
14419
  var applyStylesModifier = Object.assign({}, applyStyles_default, {
14399
14420
  effect: function effect6(_ref) {
14400
14421
  var state = _ref.state;
@@ -15188,6 +15209,7 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
15188
15209
  },
15189
15210
  show() {
15190
15211
  this.open = true;
15212
+ hideAll();
15191
15213
  setTimeout(() => {
15192
15214
  this.$dispatch("modal:shown");
15193
15215
  }, 400);
@@ -15306,12 +15328,12 @@ ${expression ? 'Expression: "' + expression + '"\n\n' : ""}`, el);
15306
15328
  },
15307
15329
  imageLoaded() {
15308
15330
  this.loaded = true;
15309
- this.$nextTick(() => {
15331
+ setTimeout(() => {
15310
15332
  const scrollTop = parseInt(this.img.dataset.scrollTop, 10);
15311
15333
  if (!isNaN(scrollTop) && scrollTop !== 0) {
15312
15334
  this.modal.scrollTo(scrollTop);
15313
15335
  }
15314
- });
15336
+ }, 200);
15315
15337
  },
15316
15338
  get img() {
15317
15339
  return this.$refs.media.querySelector("img");