@thecb/components 6.3.1-beta.8 → 7.0.0

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/README.md CHANGED
@@ -70,7 +70,7 @@ Any components used in a Typescript app need a declaration file.
70
70
  1. Create a `index.d.ts` file in the directory for that component that exports the typed component constant.
71
71
  Use the `Expand` interface found in `./src/util/expand` so the full props will appear on hover in VSCode. Extend `React.HTMLAttributes<HTMLElement>>` to add all html props and event handlers. e.g.:
72
72
 
73
- ```
73
+ ```ts
74
74
  import React from "react";
75
75
  import Expand from "../../../util/expand";
76
76
 
@@ -87,12 +87,12 @@ export interface ButtonWithActionProps {
87
87
  }
88
88
 
89
89
  export const ButtonWithAction: React.FC<Expand<ButtonWithActionProps> &
90
- React.HTMLAttributes<HTMLElement>>;
90
+ React.HTMLAttributes<HTMLElement>>;
91
91
  ```
92
92
 
93
93
  2. Export the component from the `index.d.ts` in the top-level directory for your component, i.e. `src/components/atoms/index.d.ts`. e.g:
94
94
 
95
- ```
95
+ ```ts
96
96
  ...
97
97
  export * from "./button-with-action";
98
98
  ...
@@ -172,3 +172,7 @@ You can alias the component by
172
172
  To import multiple components
173
173
 
174
174
  - `import { ButtonWithAction, LoginForm, Box, Stack, Cluster } from "@thecb/components";`
175
+
176
+ ```
177
+
178
+ ```
package/dist/index.cjs.js CHANGED
@@ -22729,7 +22729,7 @@ var useFocusInvalidInput = function useFocusInvalidInput(hasErrors) {
22729
22729
 
22730
22730
  */
22731
22731
 
22732
- var useOutsideClickHook$1 = function useOutsideClickHook(handler) {
22732
+ var useOutsideClickHook = function useOutsideClickHook(handler) {
22733
22733
  var ref = React.useRef();
22734
22734
  React.useEffect(function () {
22735
22735
  }, [ref]);
@@ -22744,7 +22744,7 @@ var index$4 = /*#__PURE__*/Object.freeze({
22744
22744
  general: general,
22745
22745
  theme: themeUtils,
22746
22746
  useFocusInvalidInput: useFocusInvalidInput,
22747
- useOutsideClick: useOutsideClickHook$1
22747
+ useOutsideClick: useOutsideClickHook
22748
22748
  });
22749
22749
 
22750
22750
  var hoverColor$4 = "#116285";
@@ -22816,9 +22816,7 @@ var Popover = function Popover(_ref) {
22816
22816
  }
22817
22817
  };
22818
22818
 
22819
- var triggerRef = useOutsideClickHook(function () {
22820
- return handleTogglePopover(false);
22821
- });
22819
+ var triggerRef = useOutsideClickHook();
22822
22820
  return /*#__PURE__*/React__default.createElement(Box, {
22823
22821
  padding: "0",
22824
22822
  extraStyles: "position: relative; ".concat(extraStyles)
@@ -34999,10 +34997,10 @@ var ToggleSwitch = function ToggleSwitch(_ref6) {
34999
34997
  },
35000
34998
  on: {
35001
34999
  backgroundColor: themeValues.white,
35002
- right: "2px",
35000
+ right: "1px",
35003
35001
  top: "2px",
35004
35002
  bottom: "2px",
35005
- left: "24px",
35003
+ left: "25px",
35006
35004
  transition: {
35007
35005
  ease: "backIn"
35008
35006
  }
@@ -35054,7 +35052,8 @@ var ToggleSwitch = function ToggleSwitch(_ref6) {
35054
35052
  extraStyles: labelLeft ? themeValues.leftLabelStyles : themeValues.rightLabelStyles
35055
35053
  }, /*#__PURE__*/React__default.createElement(Center, null, /*#__PURE__*/React__default.createElement(Cluster, {
35056
35054
  justify: "stretch",
35057
- align: "center"
35055
+ align: "center",
35056
+ overflow: "visible"
35058
35057
  }, /*#__PURE__*/React__default.createElement(Cover, {
35059
35058
  minHeight: "100%",
35060
35059
  singleChild: true
@@ -35330,6 +35329,45 @@ var NavTabs = function NavTabs(_ref) {
35330
35329
  }, tabs)));
35331
35330
  };
35332
35331
 
35332
+
35333
+
35334
+ var index$5 = /*#__PURE__*/Object.freeze({
35335
+ __proto__: null,
35336
+ colors: colors,
35337
+ fontWeights: style_constants
35338
+ });
35339
+
35340
+ var shineFrames = styled.keyframes(["{0{background-position:0 0;}20%{background-position:100% 100%;}100%{background-position:100% 100%;}}"]);
35341
+ var LoadingPill = styled__default.div.withConfig({
35342
+ displayName: "LoadingPillstyled__LoadingPill",
35343
+ componentId: "sc-kn9rtt-0"
35344
+ })(["width:", "px;background-color:", ";margin:", ";height:", ";border-radius:16px;background-image:linear-gradient( 135deg,", " 0%,", " 40%,", " 60%,", " 100% );background-size:400%;animation:", " 2s infinite ease-in-out;animation-direction:reverse;"], function (_ref) {
35345
+ var width = _ref.width;
35346
+ return width;
35347
+ }, SEASHELL_WHITE, function (_ref2) {
35348
+ var margin = _ref2.margin;
35349
+ return margin;
35350
+ }, function (_ref3) {
35351
+ var height = _ref3.height;
35352
+ return height;
35353
+ }, SEASHELL_WHITE, ALABASTER_WHITE, SEASHELL_WHITE, SEASHELL_WHITE, shineFrames);
35354
+
35355
+ var LoadingLine = function LoadingLine(_ref) {
35356
+ var minWidth = _ref.minWidth,
35357
+ maxWidth = _ref.maxWidth,
35358
+ _ref$exactWidth = _ref.exactWidth,
35359
+ exactWidth = _ref$exactWidth === void 0 ? null : _ref$exactWidth,
35360
+ _ref$height = _ref.height,
35361
+ height = _ref$height === void 0 ? "16px" : _ref$height,
35362
+ _ref$margin = _ref.margin,
35363
+ margin = _ref$margin === void 0 ? "0px" : _ref$margin;
35364
+ return /*#__PURE__*/React__default.createElement(LoadingPill, {
35365
+ margin: margin,
35366
+ height: height,
35367
+ width: exactWidth || Math.floor(Math.random() * (maxWidth - minWidth + 1)) + minWidth
35368
+ });
35369
+ };
35370
+
35333
35371
  const validatorToPredicate = (validatorFn, emptyCase) => (
35334
35372
  value,
35335
35373
  ...rest
@@ -37930,7 +37968,7 @@ var FooterWithSubfooter = function FooterWithSubfooter(_ref) {
37930
37968
  }), /*#__PURE__*/React__default.createElement(NavFooter, {
37931
37969
  backgroundColor: themeValues.subfooterBackgroundColor,
37932
37970
  footerMinHeight: "45px",
37933
- footerPadding: "0 1rem",
37971
+ footerPadding: "0 16px",
37934
37972
  "aria-label": "subfooter",
37935
37973
  leftContent: leftSubfooterContent,
37936
37974
  rightContent: rightSubfooterContent
@@ -46667,14 +46705,6 @@ var SidebarStackContent = function SidebarStackContent(_ref) {
46667
46705
 
46668
46706
  var SidebarStackContent$1 = withWindowSize(themeComponent(SidebarStackContent, "Global", fallbackValues$M));
46669
46707
 
46670
-
46671
-
46672
- var index$5 = /*#__PURE__*/Object.freeze({
46673
- __proto__: null,
46674
- colors: colors,
46675
- fontWeights: style_constants
46676
- });
46677
-
46678
46708
  exports.AccountNumberImage = AccountNumberImage;
46679
46709
  exports.AccountsAddIcon = AccountsAddIcon$1;
46680
46710
  exports.AccountsIcon = AccountsIcon$1;
@@ -46755,6 +46785,7 @@ exports.Jumbo = Jumbo$1;
46755
46785
  exports.LabeledAmount = LabeledAmount$1;
46756
46786
  exports.LineItem = LineItem$1;
46757
46787
  exports.Loading = Loading;
46788
+ exports.LoadingLine = LoadingLine;
46758
46789
  exports.LoginForm = LoginForm;
46759
46790
  exports.Modal = Modal$1;
46760
46791
  exports.Module = Module$1;