@thecb/components 10.2.4-beta.8 → 10.3.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.
Files changed (57) hide show
  1. package/README.md +2 -2
  2. package/dist/index.cjs.js +588 -273
  3. package/dist/index.cjs.js.map +1 -1
  4. package/dist/index.d.ts +64 -1
  5. package/dist/index.esm.js +584 -272
  6. package/dist/index.esm.js.map +1 -1
  7. package/package.json +1 -1
  8. package/src/components/atoms/badge/Badge.stories.js +1 -2
  9. package/src/components/atoms/badge/Badge.theme.js +4 -8
  10. package/src/components/atoms/breadcrumb/Breadcrumb.js +4 -3
  11. package/src/components/atoms/breadcrumb/Breadcrumb.theme.js +5 -2
  12. package/src/components/atoms/button-with-action/ButtonWithAction.js +6 -14
  13. package/src/components/atoms/button-with-action/ButtonWithAction.stories.js +0 -1
  14. package/src/components/atoms/button-with-action/ButtonWithAction.theme.js +37 -33
  15. package/src/components/atoms/button-with-link/ButtonWithLink.js +2 -2
  16. package/src/components/atoms/form-layouts/FormInput.js +1 -1
  17. package/src/components/atoms/icons/CloseIcon.d.ts +1 -0
  18. package/src/components/atoms/icons/CloseIcon.js +48 -0
  19. package/src/components/atoms/icons/TrashIconV2.d.ts +1 -0
  20. package/src/components/atoms/icons/TrashIconV2.js +41 -0
  21. package/src/components/atoms/icons/icons.stories.js +5 -1
  22. package/src/components/atoms/icons/index.d.ts +2 -0
  23. package/src/components/atoms/icons/index.js +5 -1
  24. package/src/components/atoms/layouts/Box.js +0 -1
  25. package/src/components/atoms/layouts/examples/box-example/BoxExample.stories.js +1 -2
  26. package/src/components/atoms/link/ExternalLink.styled.js +6 -3
  27. package/src/components/atoms/link/InternalLink.styled.js +6 -3
  28. package/src/components/atoms/placeholder/Placeholder.js +74 -87
  29. package/src/components/atoms/placeholder/Placeholder.stories.js +9 -22
  30. package/src/components/atoms/text/Text.styled.js +1 -0
  31. package/src/components/molecules/account-and-routing-modal/AccountAndRoutingModal.js +1 -0
  32. package/src/components/molecules/account-and-routing-modal/AccountAndRoutingModal.stories.js +41 -0
  33. package/src/components/molecules/account-and-routing-modal/AccountAndRoutingModal.theme.js +10 -2
  34. package/src/components/molecules/index.d.ts +1 -0
  35. package/src/components/molecules/index.js +1 -0
  36. package/src/components/molecules/link-card/LinkCard.js +2 -5
  37. package/src/components/molecules/link-card/LinkCard.stories.js +34 -62
  38. package/src/components/molecules/link-card/LinkCard.theme.js +5 -19
  39. package/src/components/molecules/obligation/Obligation.js +1 -4
  40. package/src/components/molecules/obligation/modules/AutopayModalModule.js +1 -4
  41. package/src/components/molecules/obligation/modules/PaymentDetailsActions.js +1 -5
  42. package/src/components/molecules/pagination/Pagination.js +1 -7
  43. package/src/components/molecules/pagination/Pagination.stories.js +32 -0
  44. package/src/components/molecules/pagination/Pagination.theme.js +1 -2
  45. package/src/components/molecules/tab-sidebar/TabSidebar.js +2 -2
  46. package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.js +1 -0
  47. package/src/components/molecules/terms-and-conditions-modal/TermsAndConditionsModal.theme.js +10 -2
  48. package/src/components/templates/default-page-template/DefaultPageTemplate.js +3 -2
  49. package/src/constants/index.d.ts +2 -1
  50. package/src/constants/index.js +12 -3
  51. package/src/constants/style_constants.d.ts +11 -0
  52. package/src/constants/style_constants.js +3 -1
  53. package/dist/src/apps/checkout/pages/payment/sub-pages/payment-amount/PaymentAmount_old.js +0 -49322
  54. package/src/.DS_Store +0 -0
  55. package/src/components/.DS_Store +0 -0
  56. package/src/components/atoms/.DS_Store +0 -0
  57. package/src/components/atoms/icons/.DS_Store +0 -0
@@ -0,0 +1,32 @@
1
+ import React from "react";
2
+ import { number, text } from "@storybook/addon-knobs";
3
+ import Pagination from "./Pagination";
4
+ import page from "../../../../.storybook/page";
5
+
6
+ export const pagination = () => (
7
+ <Pagination
8
+ activeBorderWidth={text("activeBorderWidth", "3px", "props")}
9
+ ariaLabel={text("ariaLabel", "Aria Label", "props")}
10
+ arrowColor={text("arrowColor", "#FFFFFF", "props")}
11
+ borderRadius={text("borderRadius", "3px", "props")}
12
+ buttonHeight={text("buttonHeight", "44px", "props")}
13
+ buttonWidth={text("buttonWidth", "44px", "props")}
14
+ childGap={text("childGap", "24px", "props")}
15
+ currentPage={number("currentPage", 2)}
16
+ fontSize={text("fontSize", "17px", "props")}
17
+ fontWeight={text("fontWeight", "900", "props")}
18
+ numberColor={text("numberColor", "#15749D", "props")}
19
+ pageCount={number("pageCount", 3)}
20
+ pageNext={() => {}}
21
+ pagePrevious={() => {}}
22
+ setCurrentPage={() => {}}
23
+ // themeValues
24
+ />
25
+ );
26
+
27
+ const story = page({
28
+ title: "Components|Molecules/Pagination",
29
+ Component: Pagination
30
+ });
31
+
32
+ export default story;
@@ -1,8 +1,7 @@
1
1
  import {
2
2
  WHITE,
3
3
  MATISSE_BLUE,
4
- ALABASTER_WHITE,
5
- STORM_GREY
4
+ ALABASTER_WHITE
6
5
  } from "../../../constants/colors";
7
6
 
8
7
  const arrowColor = WHITE;
@@ -35,8 +35,8 @@ const TabSidebar = ({ links, isMobile, themeValues }) => (
35
35
  <InternalLink
36
36
  to={route}
37
37
  key={`${route}-${index}`}
38
- extraStyles={`&:hover {
39
- text-decoration: none;
38
+ extraStyles={`text-decoration: none;
39
+ &:hover {
40
40
  ${
41
41
  active
42
42
  ? `> * {
@@ -53,6 +53,7 @@ const TermsAndConditionsModal = ({
53
53
  color={themeValues.linkColor}
54
54
  weight={themeValues.fontWeight}
55
55
  hoverStyles={themeValues.modalLinkHoverFocus}
56
+ textDecoration={themeValues.modalLinkTextDecoration}
56
57
  extraStyles={`display: inline-block; width: fit-content; cursor: pointer`}
57
58
  role="button" // This should always be a "button" since it opens a modal
58
59
  className="modal-trigger"
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  FONT_WEIGHT_REGULAR,
3
- FONT_WEIGHT_SEMIBOLD
3
+ FONT_WEIGHT_SEMIBOLD,
4
+ LINK_TEXT_DECORATION
4
5
  } from "../../../constants/style_constants";
5
6
 
6
7
  const backgroundColor = { default: "#ffffff", footer: "#ffffff" };
@@ -22,11 +23,17 @@ const standardInteractionStyles = `
22
23
  outline-offset: 2px;
23
24
  }
24
25
  `;
26
+
25
27
  const modalLinkHoverFocus = {
26
28
  default: standardInteractionStyles,
27
29
  footer: standardInteractionStyles
28
30
  };
29
31
 
32
+ const modalLinkTextDecoration = {
33
+ default: LINK_TEXT_DECORATION,
34
+ footer: "none"
35
+ };
36
+
30
37
  export const fallbackValues = {
31
38
  backgroundColor,
32
39
  linkColor,
@@ -34,5 +41,6 @@ export const fallbackValues = {
34
41
  fontSize,
35
42
  lineHeight,
36
43
  fontWeight,
37
- modalLinkHoverFocus
44
+ modalLinkHoverFocus,
45
+ modalLinkTextDecoration
38
46
  };
@@ -15,7 +15,8 @@ const CenterSingle = ({
15
15
  themeValues,
16
16
  maxWidth = "75rem",
17
17
  gutters = "2rem",
18
- fillPageVertical = false
18
+ fillPageVertical = false,
19
+ background = COOL_GREY_05
19
20
  }) => {
20
21
  const themeContext = useContext(ThemeContext);
21
22
  const { isMobile } = themeContext;
@@ -24,7 +25,7 @@ const CenterSingle = ({
24
25
  <Box
25
26
  padding="0"
26
27
  minWidth="100%"
27
- background={COOL_GREY_05}
28
+ background={background}
28
29
  extraStyles="flex-grow: 1;"
29
30
  >
30
31
  <Cover
@@ -1,3 +1,4 @@
1
1
  import * as colors from "./colors";
2
+ import * as styleConstants from "./style_constants";
2
3
 
3
- export { colors };
4
+ export { colors, styleConstants };
@@ -1,4 +1,13 @@
1
- import * as colors from "./colors";
2
- import * as fontWeights from "./style_constants";
1
+ export * as colors from "./colors";
2
+ export * as general from "./general";
3
+ export * as regexConstants from "./regex_constants";
4
+ export * as styleConstants from "./style_constants";
3
5
 
4
- export { colors, fontWeights };
6
+ /**
7
+ * This export is named "fontWeights" and referenced as such in much existing code.
8
+ * Navigate Frontend is one example that uses this particular export. However, new
9
+ * usage of style constants should reference the `styleConstants` export instead.
10
+ *
11
+ * @deprecated
12
+ */
13
+ export * as fontWeights from "./style_constants";
@@ -0,0 +1,11 @@
1
+ type StyleDeclaration = string;
2
+
3
+ export const HEADER_HEIGHT: StyleDeclaration;
4
+ export const FOOTER_HEIGHT: StyleDeclaration;
5
+ export const SPACER_HEIGHT: StyleDeclaration;
6
+ export const JUMBO_HEIGHT: StyleDeclaration;
7
+ export const COMPACT_JUMBO_HEIGHT: StyleDeclaration;
8
+ export const FONT_WEIGHT_REGULAR: StyleDeclaration;
9
+ export const FONT_WEIGHT_BOLD: StyleDeclaration;
10
+ export const FONT_WEIGHT_SEMIBOLD: StyleDeclaration;
11
+ export const LINK_TEXT_DECORATION: StyleDeclaration;
@@ -8,6 +8,7 @@ const COMPACT_JUMBO_HEIGHT = "65px";
8
8
  const FONT_WEIGHT_REGULAR = "400";
9
9
  const FONT_WEIGHT_BOLD = "700";
10
10
  const FONT_WEIGHT_SEMIBOLD = "600";
11
+ const LINK_TEXT_DECORATION = "underline solid 1px";
11
12
 
12
13
  export {
13
14
  HEADER_HEIGHT,
@@ -17,5 +18,6 @@ export {
17
18
  COMPACT_JUMBO_HEIGHT,
18
19
  FONT_WEIGHT_REGULAR,
19
20
  FONT_WEIGHT_BOLD,
20
- FONT_WEIGHT_SEMIBOLD
21
+ FONT_WEIGHT_SEMIBOLD,
22
+ LINK_TEXT_DECORATION
21
23
  };