coveragebook_components 0.17.3 → 0.17.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1fc0953881f78a258a61ca7b0f24ea84133a1f63046af384ea9d081cbc2db6d8
4
- data.tar.gz: dfc32ff156d2b19aa5271e42a44c540e0337a9c1b0674d470e88e8b4c4e74845
3
+ metadata.gz: 640690640d1cb09848352d16bf5eab6b24525775a46bff8773c316eadc349333
4
+ data.tar.gz: 64520da2e244704072216713b5d08376b468015145850bdf393f6636b73a4dd1
5
5
  SHA512:
6
- metadata.gz: e4730eeebb41cd89b8bd77645fc50779339b83c3157bab022990d3bfcfcfae2a21b217d7f6d03f011830a6491623f5cfd8fe2529d4acf4625d878551ecf0a061
7
- data.tar.gz: 3c0929b433a8eab7860b52107965f3cb7f5b481603e6d903cec8c2bf0554e2ee32f26cd0ac695a8074fceb6037682b413b89ab90957c8f28b2756e6be9785062
6
+ metadata.gz: dd6d5464840a829d94a91093897bebc91c0af1c73d64729088a4563fe89b8f00e401c245067e8c95f50d878fb8ac6af7e394fbbe2022f28113f196fa5573a6f2
7
+ data.tar.gz: edda3f86449b0cf48c5c2811a4ee9b61b3c5b706727fe8e8259abebf34135e235489d6288cea5cd533ad8401ba3069c7044422a604dd29e82e4dfeb51aabfeeb
@@ -4383,6 +4383,12 @@ select{
4383
4383
  opacity: 0
4384
4384
  }
4385
4385
 
4386
+ [data-coco][data-component="tooltip"] {
4387
+ display: block;
4388
+ width: -moz-fit-content;
4389
+ width: fit-content;
4390
+ }
4391
+
4386
4392
  [data-coco][data-component="modal"]{
4387
4393
  position: fixed;
4388
4394
  inset: 0px;
@@ -6897,9 +6903,6 @@ select{
6897
6903
 
6898
6904
  .tippy-box[data-theme~="coco-tooltip"] .tippy-content{
6899
6905
  max-width: 240px;
6900
- overflow: hidden;
6901
- text-overflow: ellipsis;
6902
- white-space: nowrap;
6903
6906
  padding-left: 0.75rem;
6904
6907
  padding-right: 0.75rem;
6905
6908
  padding-top: 0.5rem;
@@ -15415,7 +15415,7 @@ var alpine_default = import_alpinejs.default;
15415
15415
  // ../../../package.json
15416
15416
  var package_default = {
15417
15417
  name: "coveragebook-components",
15418
- version: "0.17.3",
15418
+ version: "0.17.4",
15419
15419
  repository: "git@github.com:coveragebook/coco.git",
15420
15420
  license: "NO LICENSE",
15421
15421
  author: "Mark Perkins <mark@coveragebook.com>",
@@ -16358,8 +16358,26 @@ var toast_default = CocoComponent("toast", () => {
16358
16358
  };
16359
16359
  });
16360
16360
 
16361
+ // ../../components/coco/messaging/tooltip/tooltip.js
16362
+ var tooltip_exports = {};
16363
+ __export(tooltip_exports, {
16364
+ default: () => tooltip_default2
16365
+ });
16366
+ var tooltip_default2 = CocoComponent("tooltip", () => {
16367
+ return {
16368
+ init() {
16369
+ tippy_default(this.$el, {
16370
+ theme: "coco-tooltip",
16371
+ appendTo: () => {
16372
+ return this.$el.firstElementChild;
16373
+ }
16374
+ });
16375
+ }
16376
+ };
16377
+ });
16378
+
16361
16379
  // import-glob:/Users/mark/Code/coveragebook/coco/app/assets/js/base|@components/messaging/**/*.js
16362
- var modules7 = [alert_exports, notice_exports, snackbar_exports, system_banner_exports, toast_exports];
16380
+ var modules7 = [alert_exports, notice_exports, snackbar_exports, system_banner_exports, toast_exports, tooltip_exports];
16363
16381
  var __default7 = modules7;
16364
16382
 
16365
16383
  // ../../components/coco/modals/modal/modal.js
@@ -35,7 +35,7 @@
35
35
  @apply bg-background-dark-2 text-white label-sm rounded-lg shadow-xl;
36
36
 
37
37
  .tippy-content {
38
- @apply px-3 py-2 truncate max-w-[240px];
38
+ @apply px-3 py-2 max-w-[240px];
39
39
  }
40
40
 
41
41
  /* arrow background */
@@ -0,0 +1,6 @@
1
+ @layer components {
2
+ [data-coco][data-component="tooltip"] {
3
+ display: block;
4
+ width: fit-content;
5
+ }
6
+ }
@@ -0,0 +1,3 @@
1
+ <%= render component_tag(x:{data: "tooltip"}, data: {tippy_content: text}) do %>
2
+ <%= content %>
3
+ <% end %>
@@ -0,0 +1,15 @@
1
+ import { CocoComponent } from "@assets/js/coco/component";
2
+ import tippy from "@js/base/tippy";
3
+
4
+ export default CocoComponent("tooltip", () => {
5
+ return {
6
+ init() {
7
+ tippy(this.$el, {
8
+ theme: "coco-tooltip",
9
+ appendTo: () => {
10
+ return this.$el.firstElementChild;
11
+ },
12
+ });
13
+ },
14
+ };
15
+ });
@@ -0,0 +1,9 @@
1
+ module Coco
2
+ class Tooltip < Coco::Component
3
+ attr_reader :text
4
+
5
+ def initialize(text:, **)
6
+ @text = text
7
+ end
8
+ end
9
+ end
@@ -146,6 +146,10 @@ module Coco
146
146
 
147
147
  # Messaging
148
148
 
149
+ def coco_tooltip(text, **, &)
150
+ render(Coco::Tooltip.new(text:, **), &)
151
+ end
152
+
149
153
  def coco_notice(**, &)
150
154
  render(Coco::Notice.new(**), &)
151
155
  end
data/lib/coco.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Coco
2
- VERSION = "0.17.3"
2
+ VERSION = "0.17.4"
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.3
4
+ version: 0.17.4
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-03-27 00:00:00.000000000 Z
11
+ date: 2024-04-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -1653,6 +1653,10 @@ files:
1653
1653
  - app/components/coco/messaging/toast/toast.html.erb
1654
1654
  - app/components/coco/messaging/toast/toast.js
1655
1655
  - app/components/coco/messaging/toast/toast.rb
1656
+ - app/components/coco/messaging/tooltip/tooltip.css
1657
+ - app/components/coco/messaging/tooltip/tooltip.html.erb
1658
+ - app/components/coco/messaging/tooltip/tooltip.js
1659
+ - app/components/coco/messaging/tooltip/tooltip.rb
1656
1660
  - app/components/coco/modals/modal/modal.css
1657
1661
  - app/components/coco/modals/modal/modal.html.erb
1658
1662
  - app/components/coco/modals/modal/modal.js