coveragebook_components 0.17.3 → 0.17.5

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: 6227c973acecf2be12aa99e46d6364995f9f1368ac315bf9a2be1595cb47fa5e
4
+ data.tar.gz: a8fa2844345495435d8e58749f898984bd53709e778608d2d350f2387f59c264
5
5
  SHA512:
6
- metadata.gz: e4730eeebb41cd89b8bd77645fc50779339b83c3157bab022990d3bfcfcfae2a21b217d7f6d03f011830a6491623f5cfd8fe2529d4acf4625d878551ecf0a061
7
- data.tar.gz: 3c0929b433a8eab7860b52107965f3cb7f5b481603e6d903cec8c2bf0554e2ee32f26cd0ac695a8074fceb6037682b413b89ab90957c8f28b2756e6be9785062
6
+ metadata.gz: ffd6148a8eac59cfed1beddf84cfe70fe016c274779d2a179c38840c3dcfea2b31a4b4d1951d63f7cbe2b9b4c32bdd5e2029a8a6aca4276e7da854908ccc3382
7
+ data.tar.gz: b3b05b9945f7ea8d5cf2974281829bf13f386459c479a5140bc42ab48dbc7409924d03ad3db308c6ab9e8763dfdef4ffcc5d5124db59ac2469b7ebfd00ae1703
@@ -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.5",
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,24 @@ 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: () => document.body
16372
+ });
16373
+ }
16374
+ };
16375
+ });
16376
+
16361
16377
  // 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];
16378
+ var modules7 = [alert_exports, notice_exports, snackbar_exports, system_banner_exports, toast_exports, tooltip_exports];
16363
16379
  var __default7 = modules7;
16364
16380
 
16365
16381
  // ../../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,13 @@
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: () => document.body,
10
+ });
11
+ },
12
+ };
13
+ });
@@ -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.5"
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.5
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