@thecb/components 8.3.1-beta.4 → 8.3.1-beta.6

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/index.esm.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import React, { createContext, createElement, PureComponent, forwardRef, Component, cloneElement, Children, useContext, Fragment as Fragment$1, useRef, useState, useLayoutEffect, memo, useEffect as useEffect$1, useMemo, useCallback, isValidElement, createRef } from 'react';
2
2
  import styled, { ThemeContext, css, ThemeProvider, keyframes as keyframes$3 } from 'styled-components';
3
3
  import theme from 'styled-theming';
4
- import { useMatch, Link, useNavigate, useLocation } from 'react-router-dom';
4
+ import { Link, useMatch, useNavigate, useLocation } from 'react-router-dom';
5
5
  import reactDom from 'react-dom';
6
6
 
7
7
  function ownKeys(object, enumerableOnly) {
@@ -19706,13 +19706,11 @@ var fontFamily$2 = {
19706
19706
  };
19707
19707
  var hoverColor$2 = SAPPHIRE_BLUE;
19708
19708
  var activeColor$3 = PEACOCK_BLUE;
19709
- var activeBackgroundColor$1 = INFO_BLUE;
19710
19709
  var externalLinkColor = MATISSE_BLUE;
19711
19710
  var fallbackValues$a = {
19712
19711
  fontFamily: fontFamily$2,
19713
19712
  hoverColor: hoverColor$2,
19714
19713
  activeColor: activeColor$3,
19715
- activeBackgroundColor: activeBackgroundColor$1,
19716
19714
  externalLinkColor: externalLinkColor
19717
19715
  };
19718
19716
 
@@ -19820,15 +19818,13 @@ var StyledInternalLink = styled( /*#__PURE__*/forwardRef(function (_ref, ref) {
19820
19818
  extrastyles = _ref.extrastyles,
19821
19819
  props = _objectWithoutProperties(_ref, _excluded$l);
19822
19820
 
19823
- var match = useMatch();
19824
- console.log("🚀 ~ file: InternalLink.styled.js:18 ~ match:", match);
19825
19821
  return /*#__PURE__*/React.createElement(Link, _extends({}, props, {
19826
19822
  ref: ref
19827
19823
  }));
19828
19824
  })).withConfig({
19829
19825
  displayName: "InternalLinkstyled__StyledInternalLink",
19830
19826
  componentId: "sc-cuqxud-0"
19831
- })(["display:flex;color:", ";font-weight:", ";line-height:", ";font-size:", ";font-family:", ";margin:", ";background-color:", " ? 'lightblue' :'transparent',&:hover{color:", ";text-decoration:underline;}&:focus{outline:3px solid ", ";outline-offset:2px;}&:active{text-decoration:underline;color:", ";background-color:", ";}", ""], function (_ref2) {
19827
+ })(["display:flex;color:", ";font-weight:", ";line-height:", ";font-size:", ";font-family:", ";margin:", ";background-color:", ";&:hover{color:", ";text-decoration:underline;}&:focus{outline:3px solid ", ";outline-offset:2px;}&:active{text-decoration:underline;color:", ";}", ""], function (_ref2) {
19832
19828
  var color = _ref2.color,
19833
19829
  active = _ref2.active,
19834
19830
  activeColor = _ref2.activeColor;
@@ -19848,15 +19844,15 @@ var StyledInternalLink = styled( /*#__PURE__*/forwardRef(function (_ref, ref) {
19848
19844
  }, function (_ref7) {
19849
19845
  var margin = _ref7.margin;
19850
19846
  return margin;
19851
- }, match, function (_ref8) {
19852
- var hoverColor = _ref8.hoverColor;
19847
+ }, function (_ref8) {
19848
+ var match = _ref8.match;
19849
+ return match ? INFO_BLUE : 'transparent';
19850
+ }, function (_ref9) {
19851
+ var hoverColor = _ref9.hoverColor;
19853
19852
  return hoverColor;
19854
- }, ROYAL_BLUE, function (_ref9) {
19855
- var activeColor = _ref9.activeColor;
19853
+ }, ROYAL_BLUE, function (_ref10) {
19854
+ var activeColor = _ref10.activeColor;
19856
19855
  return activeColor;
19857
- }, function (_ref10) {
19858
- var activeBackgroundColor = _ref10.activeBackgroundColor;
19859
- return activeBackgroundColor ? activeBackgroundColor : 'transparent';
19860
19856
  }, function (_ref11) {
19861
19857
  var extrastyles = _ref11.extrastyles;
19862
19858
  return extrastyles;
@@ -21509,15 +21505,11 @@ _curry2(function test(pattern, str) {
21509
21505
 
21510
21506
  var URL_TEST = /(([a-z]{3,6}:\/\/)|(^|\s))([a-zA-Z0-9\-]+\.)+[a-z]{2,13}[\.\?\=\&\%\/\w\-]*\b([^@]|$)/;
21511
21507
 
21512
- var _excluded$m = ["url", "active", "activeBackgroundColor", "disabled", "fileLink", "extraStyles", "linkExtraStyles", "newTab", "dataQa"];
21508
+ var _excluded$m = ["url", "disabled", "fileLink", "extraStyles", "linkExtraStyles", "newTab", "dataQa"];
21513
21509
 
21514
21510
  var ButtonWithLink = function ButtonWithLink(_ref) {
21515
21511
  var _ref$url = _ref.url,
21516
21512
  url = _ref$url === void 0 ? "/" : _ref$url,
21517
- _ref$active = _ref.active,
21518
- active = _ref$active === void 0 ? false : _ref$active,
21519
- _ref$activeBackground = _ref.activeBackgroundColor,
21520
- activeBackgroundColor = _ref$activeBackground === void 0 ? undefined : _ref$activeBackground,
21521
21513
  _ref$disabled = _ref.disabled,
21522
21514
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
21523
21515
  _ref$fileLink = _ref.fileLink,
@@ -21532,12 +21524,12 @@ var ButtonWithLink = function ButtonWithLink(_ref) {
21532
21524
  var ButtonWithLinkWrapper = function ButtonWithLinkWrapper(_ref2) {
21533
21525
  var children = _ref2.children,
21534
21526
  url = _ref2.url,
21535
- active = _ref2.active,
21536
- activeBackgroundColor = _ref2.activeBackgroundColor,
21537
21527
  disabled = _ref2.disabled,
21538
21528
  newTab = _ref2.newTab,
21539
21529
  dataQa = _ref2.dataQa,
21540
21530
  extraStyles = _ref2.extraStyles;
21531
+ var match = useMatch();
21532
+ console.log("🚀 ~ file: ButtonWithLink.js:32 ~ match:", match);
21541
21533
 
21542
21534
  if (disabled) {
21543
21535
  return safeChildren(children, /*#__PURE__*/React.createElement("span", null));
@@ -21551,8 +21543,7 @@ var ButtonWithLink = function ButtonWithLink(_ref) {
21551
21543
  dataQa: dataQa
21552
21544
  }, safeChildren(children, /*#__PURE__*/React.createElement("span", null))) : /*#__PURE__*/React.createElement(InternalLink, {
21553
21545
  to: url,
21554
- active: active,
21555
- activeBackgroundColor: activeBackgroundColor,
21546
+ match: match,
21556
21547
  tabIndex: "-1",
21557
21548
  dataQa: dataQa,
21558
21549
  extraStyles: extraStyles
@@ -21561,8 +21552,6 @@ var ButtonWithLink = function ButtonWithLink(_ref) {
21561
21552
 
21562
21553
  return /*#__PURE__*/React.createElement(ButtonWithLinkWrapper, {
21563
21554
  url: url,
21564
- active: active,
21565
- activeBackgroundColor: activeBackgroundColor,
21566
21555
  disabled: disabled,
21567
21556
  newTab: newTab,
21568
21557
  extraStyles: "".concat(linkExtraStyles, " text-decoration: none; &:hover {\n text-decoration: none; }"),
@@ -22377,22 +22366,22 @@ var process$1 = global_1.process;
22377
22366
  var Deno = global_1.Deno;
22378
22367
  var versions = process$1 && process$1.versions || Deno && Deno.version;
22379
22368
  var v8 = versions && versions.v8;
22380
- var match$1, version;
22369
+ var match, version;
22381
22370
 
22382
22371
  if (v8) {
22383
- match$1 = v8.split('.');
22372
+ match = v8.split('.');
22384
22373
  // in old Chrome, versions of V8 isn't V8 = Chrome / 10
22385
22374
  // but their correct versions are not interesting for us
22386
- version = match$1[0] > 0 && match$1[0] < 4 ? 1 : +(match$1[0] + match$1[1]);
22375
+ version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]);
22387
22376
  }
22388
22377
 
22389
22378
  // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0`
22390
22379
  // so check `userAgent` even if `.v8` exists, but 0
22391
22380
  if (!version && engineUserAgent) {
22392
- match$1 = engineUserAgent.match(/Edge\/(\d+)/);
22393
- if (!match$1 || match$1[1] >= 74) {
22394
- match$1 = engineUserAgent.match(/Chrome\/(\d+)/);
22395
- if (match$1) version = +match$1[1];
22381
+ match = engineUserAgent.match(/Edge\/(\d+)/);
22382
+ if (!match || match[1] >= 74) {
22383
+ match = engineUserAgent.match(/Chrome\/(\d+)/);
22384
+ if (match) version = +match[1];
22396
22385
  }
22397
22386
  }
22398
22387
 
@@ -47528,11 +47517,11 @@ var createPartialAmountFormState = function createPartialAmountFormState(lineIte
47528
47517
  var arrowColor = WHITE;
47529
47518
  var numberColor = MATISSE_BLUE;
47530
47519
  var hoverBackgroundColor$2 = ALABASTER_WHITE;
47531
- var activeBackgroundColor$2 = WHITE;
47520
+ var activeBackgroundColor$1 = WHITE;
47532
47521
  var activeColor$9 = MATISSE_BLUE;
47533
47522
  var fallbackValues$L = {
47534
47523
  activeColor: activeColor$9,
47535
- activeBackgroundColor: activeBackgroundColor$2,
47524
+ activeBackgroundColor: activeBackgroundColor$1,
47536
47525
  arrowColor: arrowColor,
47537
47526
  hoverBackgroundColor: hoverBackgroundColor$2,
47538
47527
  numberColor: numberColor