@star-insure/sdk 3.2.10 → 3.2.11

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.
package/dist/sdk.esm.js CHANGED
@@ -6,6 +6,7 @@ import { Transition, Dialog } from '@headlessui/react';
6
6
  import cn from 'classnames';
7
7
  import { padStart } from 'lodash-es';
8
8
  import { HiArrowLeft, HiMagnifyingGlass, HiXMark, HiChevronDown, HiChevronLeft, HiChevronRight } from 'react-icons/hi2';
9
+ import { Tooltip } from 'react-tooltip';
9
10
  import Select from 'react-select';
10
11
  import { router as router$1 } from '@inertiajs/core';
11
12
 
@@ -2411,6 +2412,8 @@ function Action(_ref) {
2411
2412
  shortcutKey = _ref.shortcutKey;
2412
2413
 
2413
2414
  var className = 'bg-white rounded-full font-bold px-4 py-1.5 text-sm whitespace-nowrap hover:bg-gray-100 hover:border-gray-400 transition-colors border border-gray-300';
2415
+ var tooltipId = "action-" + title;
2416
+ var tooltipContent = shortcutKey ? "Ctrl + " + shortcutKey : undefined;
2414
2417
 
2415
2418
  function runAction() {
2416
2419
  if (as === 'Link' && href) {
@@ -2444,33 +2447,48 @@ function Action(_ref) {
2444
2447
  }, [shortcutKey]);
2445
2448
 
2446
2449
  if (as === 'Link' && href) {
2447
- return React__default.createElement(Link, {
2450
+ return React__default.createElement(React__default.Fragment, null, tooltipContent && React__default.createElement(Tooltip, {
2451
+ id: tooltipId,
2452
+ className: "z-10"
2453
+ }), React__default.createElement(Link, {
2454
+ "data-tooltip-id": tooltipId,
2455
+ "data-tooltip-content": tooltipContent,
2448
2456
  className: className,
2449
2457
  href: href,
2450
2458
  onClick: function onClick() {
2451
2459
  return _onClick();
2452
2460
  }
2453
- }, title);
2461
+ }, title));
2454
2462
  }
2455
2463
 
2456
2464
  if (as === 'a' && href) {
2457
- return React__default.createElement("a", {
2465
+ return React__default.createElement(React__default.Fragment, null, tooltipContent && React__default.createElement(Tooltip, {
2466
+ id: tooltipId,
2467
+ className: "z-10"
2468
+ }), React__default.createElement("a", {
2469
+ "data-tooltip-id": tooltipId,
2470
+ "data-tooltip-content": tooltipContent,
2458
2471
  className: className,
2459
2472
  target: target,
2460
2473
  href: href,
2461
2474
  onClick: function onClick() {
2462
2475
  return _onClick();
2463
2476
  }
2464
- }, title);
2477
+ }, title));
2465
2478
  }
2466
2479
 
2467
- return React__default.createElement("button", {
2480
+ return React__default.createElement(React__default.Fragment, null, tooltipContent && React__default.createElement(Tooltip, {
2481
+ id: tooltipId,
2482
+ className: "z-10"
2483
+ }), React__default.createElement("button", {
2484
+ "data-tooltip-id": tooltipId,
2485
+ "data-tooltip-content": tooltipContent,
2468
2486
  className: className,
2469
2487
  type: type,
2470
2488
  onClick: function onClick() {
2471
2489
  return _onClick();
2472
2490
  }
2473
- }, title);
2491
+ }, title));
2474
2492
  }
2475
2493
 
2476
2494
  function Dropdown(_ref) {