@thecb/components 8.3.1-beta.5 → 8.3.1-beta.7

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,16 +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
- match: match,
19827
19822
  ref: ref
19828
19823
  }));
19829
19824
  })).withConfig({
19830
19825
  displayName: "InternalLinkstyled__StyledInternalLink",
19831
19826
  componentId: "sc-cuqxud-0"
19832
- })(["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:", ";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) {
19833
19828
  var color = _ref2.color,
19834
19829
  active = _ref2.active,
19835
19830
  activeColor = _ref2.activeColor;
@@ -19859,10 +19854,7 @@ var StyledInternalLink = styled( /*#__PURE__*/forwardRef(function (_ref, ref) {
19859
19854
  var activeColor = _ref10.activeColor;
19860
19855
  return activeColor;
19861
19856
  }, function (_ref11) {
19862
- var activeBackgroundColor = _ref11.activeBackgroundColor;
19863
- return activeBackgroundColor ? activeBackgroundColor : 'transparent';
19864
- }, function (_ref12) {
19865
- var extrastyles = _ref12.extrastyles;
19857
+ var extrastyles = _ref11.extrastyles;
19866
19858
  return extrastyles;
19867
19859
  });
19868
19860
  /* eslint-enable no-unused-vars */
@@ -21513,15 +21505,11 @@ _curry2(function test(pattern, str) {
21513
21505
 
21514
21506
  var URL_TEST = /(([a-z]{3,6}:\/\/)|(^|\s))([a-zA-Z0-9\-]+\.)+[a-z]{2,13}[\.\?\=\&\%\/\w\-]*\b([^@]|$)/;
21515
21507
 
21516
- var _excluded$m = ["url", "active", "activeBackgroundColor", "disabled", "fileLink", "extraStyles", "linkExtraStyles", "newTab", "dataQa"];
21508
+ var _excluded$m = ["url", "disabled", "fileLink", "extraStyles", "linkExtraStyles", "newTab", "dataQa"];
21517
21509
 
21518
21510
  var ButtonWithLink = function ButtonWithLink(_ref) {
21519
21511
  var _ref$url = _ref.url,
21520
21512
  url = _ref$url === void 0 ? "/" : _ref$url,
21521
- _ref$active = _ref.active,
21522
- active = _ref$active === void 0 ? false : _ref$active,
21523
- _ref$activeBackground = _ref.activeBackgroundColor,
21524
- activeBackgroundColor = _ref$activeBackground === void 0 ? undefined : _ref$activeBackground,
21525
21513
  _ref$disabled = _ref.disabled,
21526
21514
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
21527
21515
  _ref$fileLink = _ref.fileLink,
@@ -21536,12 +21524,12 @@ var ButtonWithLink = function ButtonWithLink(_ref) {
21536
21524
  var ButtonWithLinkWrapper = function ButtonWithLinkWrapper(_ref2) {
21537
21525
  var children = _ref2.children,
21538
21526
  url = _ref2.url,
21539
- active = _ref2.active,
21540
- activeBackgroundColor = _ref2.activeBackgroundColor,
21541
21527
  disabled = _ref2.disabled,
21542
21528
  newTab = _ref2.newTab,
21543
21529
  dataQa = _ref2.dataQa,
21544
21530
  extraStyles = _ref2.extraStyles;
21531
+ var match = useMatch(url);
21532
+ console.log("🚀 ~ file: ButtonWithLink.js:32 ~ match:", match);
21545
21533
 
21546
21534
  if (disabled) {
21547
21535
  return safeChildren(children, /*#__PURE__*/React.createElement("span", null));
@@ -21555,8 +21543,7 @@ var ButtonWithLink = function ButtonWithLink(_ref) {
21555
21543
  dataQa: dataQa
21556
21544
  }, safeChildren(children, /*#__PURE__*/React.createElement("span", null))) : /*#__PURE__*/React.createElement(InternalLink, {
21557
21545
  to: url,
21558
- active: active,
21559
- activeBackgroundColor: activeBackgroundColor,
21546
+ match: match,
21560
21547
  tabIndex: "-1",
21561
21548
  dataQa: dataQa,
21562
21549
  extraStyles: extraStyles
@@ -21565,8 +21552,6 @@ var ButtonWithLink = function ButtonWithLink(_ref) {
21565
21552
 
21566
21553
  return /*#__PURE__*/React.createElement(ButtonWithLinkWrapper, {
21567
21554
  url: url,
21568
- active: active,
21569
- activeBackgroundColor: activeBackgroundColor,
21570
21555
  disabled: disabled,
21571
21556
  newTab: newTab,
21572
21557
  extraStyles: "".concat(linkExtraStyles, " text-decoration: none; &:hover {\n text-decoration: none; }"),
@@ -47532,11 +47517,11 @@ var createPartialAmountFormState = function createPartialAmountFormState(lineIte
47532
47517
  var arrowColor = WHITE;
47533
47518
  var numberColor = MATISSE_BLUE;
47534
47519
  var hoverBackgroundColor$2 = ALABASTER_WHITE;
47535
- var activeBackgroundColor$2 = WHITE;
47520
+ var activeBackgroundColor$1 = WHITE;
47536
47521
  var activeColor$9 = MATISSE_BLUE;
47537
47522
  var fallbackValues$L = {
47538
47523
  activeColor: activeColor$9,
47539
- activeBackgroundColor: activeBackgroundColor$2,
47524
+ activeBackgroundColor: activeBackgroundColor$1,
47540
47525
  arrowColor: arrowColor,
47541
47526
  hoverBackgroundColor: hoverBackgroundColor$2,
47542
47527
  numberColor: numberColor