coveragebook_components 0.17.0 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dc43045cc6048971e404fd7a2379f96920e0010e55c24b699b6765a03b1f94cc
4
- data.tar.gz: 4149e9785f9e4d7a23b07cf10683ca7da2375b9d7ead3f248f5779d33d5734da
3
+ metadata.gz: cd71727c5f2de38b71197cc66fafb74c94e49ea9a50b0f1dd6c80d4c90b420b6
4
+ data.tar.gz: a786af7b55623200e2d6cd4f5c1f0f0a13305f6ef79508c3726445e6dd7ca347
5
5
  SHA512:
6
- metadata.gz: ed242d2d14c076df4b69ef6de50b5bf8478680cd78372d54d4e3836fbdb86408f0dce619881a726312b6ac0e517ac2886d0c61cfdd411581228e181de8272334
7
- data.tar.gz: accd767375b3d5f2cc9a479fa8d60bde2e4f894226f1673f8758624e00ba79d34e2ba55a7aae950272afb977778d714869b7914c46808b559dd67a5062b33c4c
6
+ metadata.gz: 96949e0868cfcf1cab1000c8b8971333620dac8b96626556214477de3ea9aa4141b7785f772a0d90ff9469cf136b27aaff5acbb33569b6ae7543a6db26a5f66f
7
+ data.tar.gz: 3ef018ff32c75d340bebf3965359888aa875792ebf3f84ed1bf26becc8739e4ddd952aa4fd4ad9bc44ce72bd8d07f17d6382fd7e1cada2f6fda666568f72f637
@@ -4220,15 +4220,15 @@ var require_tippy_cjs = __commonJS({
4220
4220
  }
4221
4221
  return arrow;
4222
4222
  }
4223
- function setContent(content2, props) {
4223
+ function setContent(content, props) {
4224
4224
  if (isElement(props.content)) {
4225
- dangerouslySetInnerHTML(content2, "");
4226
- content2.appendChild(props.content);
4225
+ dangerouslySetInnerHTML(content, "");
4226
+ content.appendChild(props.content);
4227
4227
  } else if (typeof props.content !== "function") {
4228
4228
  if (props.allowHTML) {
4229
- dangerouslySetInnerHTML(content2, props.content);
4229
+ dangerouslySetInnerHTML(content, props.content);
4230
4230
  } else {
4231
- content2.textContent = props.content;
4231
+ content.textContent = props.content;
4232
4232
  }
4233
4233
  }
4234
4234
  }
@@ -4254,15 +4254,15 @@ var require_tippy_cjs = __commonJS({
4254
4254
  box.className = BOX_CLASS;
4255
4255
  box.setAttribute("data-state", "hidden");
4256
4256
  box.setAttribute("tabindex", "-1");
4257
- var content2 = div();
4258
- content2.className = CONTENT_CLASS;
4259
- content2.setAttribute("data-state", "hidden");
4260
- setContent(content2, instance.props);
4257
+ var content = div();
4258
+ content.className = CONTENT_CLASS;
4259
+ content.setAttribute("data-state", "hidden");
4260
+ setContent(content, instance.props);
4261
4261
  popper.appendChild(box);
4262
- box.appendChild(content2);
4262
+ box.appendChild(content);
4263
4263
  onUpdate(instance.props, instance.props);
4264
4264
  function onUpdate(prevProps, nextProps) {
4265
- var _getChildren = getChildren(popper), box2 = _getChildren.box, content3 = _getChildren.content, arrow = _getChildren.arrow;
4265
+ var _getChildren = getChildren(popper), box2 = _getChildren.box, content2 = _getChildren.content, arrow = _getChildren.arrow;
4266
4266
  if (nextProps.theme) {
4267
4267
  box2.setAttribute("data-theme", nextProps.theme);
4268
4268
  } else {
@@ -4285,7 +4285,7 @@ var require_tippy_cjs = __commonJS({
4285
4285
  box2.removeAttribute("role");
4286
4286
  }
4287
4287
  if (prevProps.content !== nextProps.content || prevProps.allowHTML !== nextProps.allowHTML) {
4288
- setContent(content3, instance.props);
4288
+ setContent(content2, instance.props);
4289
4289
  }
4290
4290
  if (nextProps.arrow) {
4291
4291
  if (!arrow) {
@@ -4877,9 +4877,9 @@ var require_tippy_cjs = __commonJS({
4877
4877
  }
4878
4878
  invokeHook("onAfterUpdate", [instance, partialProps]);
4879
4879
  }
4880
- function setContent2(content2) {
4880
+ function setContent2(content) {
4881
4881
  instance.setProps({
4882
- content: content2
4882
+ content
4883
4883
  });
4884
4884
  }
4885
4885
  function show() {
@@ -4911,8 +4911,8 @@ var require_tippy_cjs = __commonJS({
4911
4911
  popper.style.transition = "none";
4912
4912
  }
4913
4913
  if (getIsDefaultRenderFn()) {
4914
- var _getDefaultTemplateCh2 = getDefaultTemplateChildren(), box = _getDefaultTemplateCh2.box, content2 = _getDefaultTemplateCh2.content;
4915
- setTransitionDuration([box, content2], 0);
4914
+ var _getDefaultTemplateCh2 = getDefaultTemplateChildren(), box = _getDefaultTemplateCh2.box, content = _getDefaultTemplateCh2.content;
4915
+ setTransitionDuration([box, content], 0);
4916
4916
  }
4917
4917
  onFirstUpdate = function onFirstUpdate2() {
4918
4918
  var _instance$popperInsta2;
@@ -4967,10 +4967,10 @@ var require_tippy_cjs = __commonJS({
4967
4967
  removeDocumentPress();
4968
4968
  handleStyles(true);
4969
4969
  if (getIsDefaultRenderFn()) {
4970
- var _getDefaultTemplateCh4 = getDefaultTemplateChildren(), box = _getDefaultTemplateCh4.box, content2 = _getDefaultTemplateCh4.content;
4970
+ var _getDefaultTemplateCh4 = getDefaultTemplateChildren(), box = _getDefaultTemplateCh4.box, content = _getDefaultTemplateCh4.content;
4971
4971
  if (instance.props.animation) {
4972
- setTransitionDuration([box, content2], duration);
4973
- setVisibilityState([box, content2], "hidden");
4972
+ setTransitionDuration([box, content], duration);
4973
+ setVisibilityState([box, content], "hidden");
4974
4974
  }
4975
4975
  }
4976
4976
  handleAriaContentAttribute();
@@ -5387,7 +5387,7 @@ var require_tippy_cjs = __commonJS({
5387
5387
  }
5388
5388
  return {};
5389
5389
  }
5390
- var _getChildren = getChildren(instance.popper), box = _getChildren.box, content2 = _getChildren.content;
5390
+ var _getChildren = getChildren(instance.popper), box = _getChildren.box, content = _getChildren.content;
5391
5391
  var backdrop = instance.props.animateFill ? createBackdropElement() : null;
5392
5392
  return {
5393
5393
  onCreate: function onCreate() {
@@ -5405,7 +5405,7 @@ var require_tippy_cjs = __commonJS({
5405
5405
  if (backdrop) {
5406
5406
  var transitionDuration = box.style.transitionDuration;
5407
5407
  var duration = Number(transitionDuration.replace("ms", ""));
5408
- content2.style.transitionDelay = Math.round(duration / 10) + "ms";
5408
+ content.style.transitionDelay = Math.round(duration / 10) + "ms";
5409
5409
  backdrop.style.transitionDuration = transitionDuration;
5410
5410
  setVisibilityState([backdrop], "visible");
5411
5411
  }
@@ -10265,8 +10265,8 @@ var require_module_cjs4 = __commonJS({
10265
10265
  var element = elementsToCheck.shift();
10266
10266
  if (element.tagName === "SLOT") {
10267
10267
  var assigned = element.assignedElements();
10268
- var content2 = assigned.length ? assigned : element.children;
10269
- var nestedCandidates = getCandidatesIteratively2(content2, true, options);
10268
+ var content = assigned.length ? assigned : element.children;
10269
+ var nestedCandidates = getCandidatesIteratively2(content, true, options);
10270
10270
  if (options.flatten) {
10271
10271
  candidates.push.apply(candidates, nestedCandidates);
10272
10272
  } else {
@@ -15126,13 +15126,13 @@ function tooltip_default(Alpine3) {
15126
15126
  let initialContent = null;
15127
15127
  const enableTooltip = () => el.__x_tippy.enable();
15128
15128
  const disableTooltip = () => el.__x_tippy.disable();
15129
- const setupTooltip = (content2) => {
15130
- if (!content2) {
15129
+ const setupTooltip = (content) => {
15130
+ if (!content) {
15131
15131
  disableTooltip();
15132
15132
  } else {
15133
15133
  enableTooltip();
15134
- el.__x_tippy.setContent(content2);
15135
- initialContent = initialContent || content2;
15134
+ el.__x_tippy.setContent(content);
15135
+ initialContent = initialContent || content;
15136
15136
  }
15137
15137
  };
15138
15138
  if (modifiers.includes("raw")) {
@@ -15140,21 +15140,21 @@ function tooltip_default(Alpine3) {
15140
15140
  } else {
15141
15141
  const getContent = evaluateLater(expression);
15142
15142
  effect(() => {
15143
- getContent((content2) => {
15144
- if (typeof content2 === "object" && content2 !== null) {
15145
- el.__x_tippy.setProps(content2);
15146
- initialContent = initialContent || content2.content;
15143
+ getContent((content) => {
15144
+ if (typeof content === "object" && content !== null) {
15145
+ el.__x_tippy.setProps(content);
15146
+ initialContent = initialContent || content.content;
15147
15147
  enableTooltip();
15148
15148
  } else {
15149
- setupTooltip(content2);
15149
+ setupTooltip(content);
15150
15150
  }
15151
15151
  });
15152
15152
  });
15153
15153
  }
15154
15154
  setData(el, {
15155
15155
  tooltip: {
15156
- setContent(content2) {
15157
- setupTooltip(content2);
15156
+ setContent(content) {
15157
+ setupTooltip(content);
15158
15158
  },
15159
15159
  disable: () => disableTooltip(),
15160
15160
  enable: () => enableTooltip(),
@@ -15183,7 +15183,7 @@ function destroy_default(Alpine3) {
15183
15183
  function dropdown_default(Alpine3) {
15184
15184
  Alpine3.directive(
15185
15185
  "dropdown",
15186
- (el, { value, modifiers, expression }, { evaluate, effect }) => {
15186
+ (el, { value, modifiers, expression }, { evaluate }) => {
15187
15187
  if (value)
15188
15188
  return;
15189
15189
  const data = getData(el);
@@ -15192,7 +15192,7 @@ function dropdown_default(Alpine3) {
15192
15192
  const directiveConfig = isObject(result) ? result : {};
15193
15193
  let { triggerTarget, contentTarget, anchorTarget, ...config } = directiveConfig;
15194
15194
  contentTarget = contentTarget || el.querySelector("[x-dropdown\\:content]");
15195
- content = isNode(contentTarget) ? contentTarget.firstElementChild : contentTarget;
15195
+ const content = isNode(contentTarget) ? contentTarget.firstElementChild : contentTarget;
15196
15196
  triggerTarget = triggerTarget || el.querySelector("[x-dropdown\\:trigger]") || el;
15197
15197
  anchorTarget = anchorTarget || el.querySelector("[x-dropdown\\:anchor]") || el;
15198
15198
  if (!el.__x_dropdown) {
@@ -15371,7 +15371,7 @@ var alpine_default = import_alpinejs.default;
15371
15371
  // ../../../package.json
15372
15372
  var package_default = {
15373
15373
  name: "coveragebook-components",
15374
- version: "0.17.0",
15374
+ version: "0.17.1",
15375
15375
  repository: "git@github.com:coveragebook/coco.git",
15376
15376
  license: "NO LICENSE",
15377
15377
  author: "Mark Perkins <mark@coveragebook.com>",
@@ -15618,8 +15618,8 @@ var button_default = CocoComponent("button", (data = {}) => {
15618
15618
  this.state = this.state === state1 ? state2 : state1;
15619
15619
  },
15620
15620
  getContentForState(state) {
15621
- const content2 = this.$refs[`${state}Content`];
15622
- return content2 ? content2.innerText : null;
15621
+ const content = this.$refs[`${state}Content`];
15622
+ return content ? content.innerText : null;
15623
15623
  },
15624
15624
  hasIconForState(state) {
15625
15625
  return !!this.$refs[`${state}Icon`];
@@ -7,7 +7,7 @@ import { setData, getData } from "@helpers/alpine";
7
7
  export default function (Alpine) {
8
8
  Alpine.directive(
9
9
  "dropdown",
10
- (el, { value, modifiers, expression }, { evaluate, effect }) => {
10
+ (el, { value, modifiers, expression }, { evaluate }) => {
11
11
  // Don't run for dropdown sub-elements
12
12
  // like `x-dropdown:trigger` and `x-dropdown:content`
13
13
  if (value) return;
@@ -21,7 +21,7 @@ export default function (Alpine) {
21
21
 
22
22
  contentTarget =
23
23
  contentTarget || el.querySelector("[x-dropdown\\:content]");
24
- content = isNode(contentTarget)
24
+ const content = isNode(contentTarget)
25
25
  ? contentTarget.firstElementChild
26
26
  : contentTarget;
27
27
  triggerTarget =
data/lib/coco.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Coco
2
- VERSION = "0.17.0"
2
+ VERSION = "0.17.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: coveragebook_components
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.17.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mark Perkins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-30 00:00:00.000000000 Z
11
+ date: 2024-02-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails