@star-insure/sdk 3.2.8 → 3.2.10

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
@@ -2407,9 +2407,41 @@ function Action(_ref) {
2407
2407
  target = _ref$target === void 0 ? '_self' : _ref$target,
2408
2408
  type = _ref.type,
2409
2409
  _ref$onClick = _ref.onClick,
2410
- _onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick;
2410
+ _onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
2411
+ shortcutKey = _ref.shortcutKey;
2411
2412
 
2412
- var className = 'bg-white rounded-full font-bold px-3 py-1.5 text-xs whitespace-nowrap hover:bg-gray-100 hover:border-gray-300 transition-colors border border-gray-200';
2413
+ 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';
2414
+
2415
+ function runAction() {
2416
+ if (as === 'Link' && href) {
2417
+ return router.get(href);
2418
+ }
2419
+
2420
+ if (as === 'a' && href) {
2421
+ return window.location.href = href;
2422
+ }
2423
+
2424
+ _onClick();
2425
+ }
2426
+ React__default.useEffect(function () {
2427
+ if (typeof window === 'undefined') return;
2428
+ if (!shortcutKey) return;
2429
+
2430
+ var listener = function listener(e) {
2431
+ // Check if Ctrl (Windows) or Cmd (Mac) key is pressed
2432
+ var isCtrlOrCmdPressed = e.ctrlKey || e.metaKey;
2433
+
2434
+ if (e.key === shortcutKey && isCtrlOrCmdPressed) {
2435
+ e.preventDefault();
2436
+ runAction();
2437
+ }
2438
+ };
2439
+
2440
+ window.addEventListener('keydown', listener);
2441
+ return function () {
2442
+ window.removeEventListener('keydown', listener);
2443
+ };
2444
+ }, [shortcutKey]);
2413
2445
 
2414
2446
  if (as === 'Link' && href) {
2415
2447
  return React__default.createElement(Link, {
@@ -2954,7 +2986,7 @@ function PageHeader(_ref) {
2954
2986
  placeholder: "Search " + title + "...",
2955
2987
  focusSearchShortcut: focusSearchShortcut
2956
2988
  }), !isSearchActive && React__default.createElement("h1", {
2957
- className: "text-base font-bold"
2989
+ className: "text-base font-black"
2958
2990
  }, title)), React__default.createElement("div", {
2959
2991
  className: "flex items-center ml-auto gap-2 h-full min-w-0 max-w-full"
2960
2992
  }, filterOptions.length > 0 && React__default.createElement(React__default.Fragment, null, React__default.createElement("button", {