@thecb/components 3.5.18 → 3.6.0-beta.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 (75) hide show
  1. package/.storybook/main.js +1 -1
  2. package/.storybook/page.js +0 -2
  3. package/dist/index.cjs.js +426 -459
  4. package/package.json +2 -2
  5. package/src/components/atoms/alert/Alert.js +34 -50
  6. package/src/components/atoms/breadcrumb/Breadcrumb.js +1 -4
  7. package/src/components/atoms/button-with-action/ButtonWithAction.js +2 -2
  8. package/src/components/atoms/checkbox/Checkbox.js +0 -1
  9. package/src/components/atoms/checkbox-list/CheckboxList.js +1 -3
  10. package/src/components/atoms/display-card/DisplayCard.js +2 -4
  11. package/src/components/atoms/dropdown/Dropdown.js +4 -4
  12. package/src/components/atoms/dropdown/Dropdown.stories.js +33 -10
  13. package/src/components/atoms/form-layouts/FormInput.js +7 -27
  14. package/src/components/atoms/form-layouts/FormLayouts.stories.js +5 -5
  15. package/src/components/atoms/hamburger-button/HamburgerButton.js +3 -4
  16. package/src/components/atoms/icons/AccountsIconSmall.js +13 -6
  17. package/src/components/atoms/icons/icons.stories.js +1 -1
  18. package/src/components/atoms/layouts/Box.styled.js +0 -1
  19. package/src/components/atoms/layouts/Cluster.styled.js +1 -5
  20. package/src/components/atoms/layouts/Cover.styled.js +1 -0
  21. package/src/components/atoms/layouts/Imposter.styled.js +1 -0
  22. package/src/components/atoms/layouts/Sidebar.js +2 -2
  23. package/src/components/atoms/layouts/Sidebar.styled.js +3 -9
  24. package/src/components/atoms/radio-button/RadioButton.js +0 -1
  25. package/src/components/atoms/radio-button/RadioButton.stories.js +61 -26
  26. package/src/components/atoms/toggle-switch/ToggleSwitch.js +0 -1
  27. package/src/components/atoms/toggle-switch/ToggleSwitch.stories.js +51 -10
  28. package/src/components/molecules/content/Content.js +20 -0
  29. package/src/components/molecules/content/Content.theme.js +60 -0
  30. package/src/components/molecules/content/blocks/accordion-block/AccordionBlock.js +108 -0
  31. package/src/components/molecules/content/blocks/accordion-block/index.js +3 -0
  32. package/src/components/molecules/content/blocks/article-block/ArticleBlock.js +58 -0
  33. package/src/components/molecules/content/blocks/article-block/index.js +3 -0
  34. package/src/components/molecules/content/blocks/attached-file-block/AttachedFileBlock.js +60 -0
  35. package/src/components/molecules/content/blocks/attached-file-block/index.js +3 -0
  36. package/src/components/molecules/content/blocks/featured-content-block/FeaturedContentBlock.js +0 -0
  37. package/src/components/molecules/content/blocks/featured-content-block/index.js +0 -0
  38. package/src/components/molecules/content/blocks/hero-block/HeroBlock.js +54 -0
  39. package/src/components/molecules/content/blocks/hero-block/index.js +3 -0
  40. package/src/components/molecules/content/blocks/highlight-block/HighlightBlock.js +42 -0
  41. package/src/components/molecules/content/blocks/highlight-block/index.js +3 -0
  42. package/src/components/molecules/content/blocks/index.js +33 -0
  43. package/src/components/molecules/content/blocks/info-block/InfoBlock.js +15 -0
  44. package/src/components/molecules/content/blocks/info-block/index.js +3 -0
  45. package/src/components/molecules/content/blocks/location-block/LocationBlock.js +228 -0
  46. package/src/components/molecules/content/blocks/location-block/index.js +3 -0
  47. package/src/components/molecules/content/blocks/related-links-block/RelatedLinksBlock.js +35 -0
  48. package/src/components/molecules/content/blocks/related-links-block/index.js +3 -0
  49. package/src/components/molecules/content/blocks/screendoor-block/ScreendoorBlock.js +57 -0
  50. package/src/components/molecules/content/blocks/screendoor-block/ScreendoorForm.styled.js +314 -0
  51. package/src/components/molecules/content/blocks/screendoor-block/index.js +3 -0
  52. package/src/components/molecules/content/blocks/tagline-block/TaglineBlock.js +45 -0
  53. package/src/components/molecules/content/blocks/tagline-block/index.js +3 -0
  54. package/src/components/molecules/content/blocks/task-block/TaskBlock.js +40 -0
  55. package/src/components/molecules/content/blocks/task-block/index.js +3 -0
  56. package/src/components/molecules/content/blocks/text-block/TextBlock.js +40 -0
  57. package/src/components/molecules/content/blocks/text-block/index.js +3 -0
  58. package/src/components/molecules/content/header/Header.js +283 -0
  59. package/src/components/molecules/content/header/Header.theme.js +11 -0
  60. package/src/components/molecules/content/header/index.js +3 -0
  61. package/src/components/molecules/content/index.js +3 -0
  62. package/src/components/molecules/editable-list/EditableList.js +8 -11
  63. package/src/components/molecules/nav-menu/NavMenuDesktop.js +1 -2
  64. package/src/components/molecules/nav-menu/NavMenuMobile.js +1 -7
  65. package/src/components/molecules/obligation/Obligation.js +7 -9
  66. package/src/components/molecules/obligation/modules/PaymentDetailsActions.js +23 -23
  67. package/src/components/molecules/radio-section/RadioSection.js +6 -15
  68. package/src/components/molecules/workflow-tile/WorkflowTile.js +3 -4
  69. package/src/deprecated/components/radio-button/radio-button.js +1 -5
  70. package/src/deprecated/icons/AlertSuccessIcon.js +3 -3
  71. package/src/deprecated/icons/IconInvalid.js +31 -7
  72. package/src/deprecated/icons/IconNeutral.js +4 -5
  73. package/src/deprecated/icons/IconValid.js +33 -8
  74. package/src/util/general.js +1 -10
  75. package/.tool-versions +0 -1
@@ -11,7 +11,7 @@ export const AlertSuccessIcon = () => (
11
11
  <defs>
12
12
  <path
13
13
  d="M12,24 C18.627417,24 24,18.627417 24,12 C24,5.372583 18.627417,0 12,0 C5.372583,0 0,5.372583 0,12 C0,18.627417 5.372583,24 12,24 Z M16.9497475,7.46446609 L18.363961,8.87867966 L9.87867966,17.363961 L5.63603897,13.1213203 L7.05025253,11.7071068 L9.87803897,14.5354661 L16.9497475,7.46446609 Z"
14
- id="alertSuccess"
14
+ id="path-1"
15
15
  ></path>
16
16
  </defs>
17
17
  <g
@@ -27,13 +27,13 @@ export const AlertSuccessIcon = () => (
27
27
  transform="translate(24.000000, 34.000000)"
28
28
  >
29
29
  <mask id="mask-2" fill="white">
30
- <use xlinkHref="#alertSuccess"></use>
30
+ <use xlinkHref="#path-1"></use>
31
31
  </mask>
32
32
  <use
33
33
  id="background-2"
34
34
  fill="#47B872"
35
35
  fillRule="nonzero"
36
- xlinkHref="#alertSuccess"
36
+ xlinkHref="#path-1"
37
37
  ></use>
38
38
  </g>
39
39
  </g>
@@ -16,23 +16,47 @@ export const IconInvalid = ({
16
16
  xmlns="http://www.w3.org/2000/svg"
17
17
  xmlnsXlink="http://www.w3.org/1999/xlink"
18
18
  style={{ margin }}
19
- aria-label="Invalid"
20
19
  >
21
- <g stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
22
- <g transform="translate(-538.000000, -1064.000000)" fillRule="nonzero">
23
- <g transform="translate(457.000000, 938.000000)">
24
- <g transform="translate(81.000000, 20.000000)">
25
- <g transform="translate(0.000000, 106.000000)">
20
+ <g
21
+ id="icon-invalid-Authentication"
22
+ stroke="none"
23
+ strokeWidth="1"
24
+ fill="none"
25
+ fillRule="evenodd"
26
+ >
27
+ <g
28
+ id="icon-invalid-00.1.0.1---HSS---Register---Already-Exists-Error"
29
+ transform="translate(-538.000000, -1064.000000)"
30
+ fillRule="nonzero"
31
+ >
32
+ <g
33
+ id="icon-invalid-Password-Requirements"
34
+ transform="translate(457.000000, 938.000000)"
35
+ >
36
+ <g
37
+ id="icon-invalid-Group-2"
38
+ transform="translate(81.000000, 20.000000)"
39
+ >
40
+ <g
41
+ id="icon-invalid-PasswordVerification-Error"
42
+ transform="translate(0.000000, 106.000000)"
43
+ >
26
44
  <circle
45
+ id="icon-invalid-Oval"
27
46
  stroke={bgFill}
28
47
  fill={bgFill}
29
48
  cx="9"
30
49
  cy="9"
31
50
  r="8.5"
32
51
  ></circle>
33
- <g transform="translate(2.000000, 2.000000)" fill={iconFill}>
52
+ <g
53
+ id="icon-invalid-Icon/Close"
54
+ transform="translate(2.000000, 2.000000)"
55
+ fill={iconFill}
56
+ >
34
57
  <path
35
58
  d="M7.58333333,7.58333333 L7.58333333,11.6666667 L6.41666667,11.6666667 L6.41666667,7.58333333 L2.33333333,7.58333333 L2.33333333,6.41666667 L6.41666667,6.41666667 L6.41666667,2.33333333 L7.58333333,2.33333333 L7.58333333,6.41666667 L11.6666667,6.41666667 L11.6666667,7.58333333 L7.58333333,7.58333333 Z"
59
+ id="icon-invalid-x"
36
60
  transform="translate(7.000000, 7.000000) rotate(45.000000) translate(-7.000000, -7.000000) "
37
61
  ></path>
38
62
  </g>
@@ -15,12 +15,11 @@ export const IconNeutral = ({
15
15
  xmlns="http://www.w3.org/2000/svg"
16
16
  xmlnsXlink="http://www.w3.org/1999/xlink"
17
17
  style={{ margin }}
18
- aria-label="Neutral"
19
18
  >
20
- <g fill={fill} fillRule="nonzero" stroke={fill}>
21
- <g>
22
- <g>
23
- <circle cx="9" cy="9" r="8.5"></circle>
19
+ <g id="icon-neutral-group" fill={fill} fillRule="nonzero" stroke={fill}>
20
+ <g id="icon-neutral-Group-2">
21
+ <g id="icon-neutral-PasswordVerification-Empty">
22
+ <circle id="icon-neutral-Oval" cx="9" cy="9" r="8.5"></circle>
24
23
  </g>
25
24
  </g>
26
25
  </g>
@@ -16,14 +16,32 @@ export const IconValid = ({
16
16
  xmlns="http://www.w3.org/2000/svg"
17
17
  xmlnsXlink="http://www.w3.org/1999/xlink"
18
18
  style={{ margin }}
19
- aria-label="Valid"
20
19
  >
21
- <g stroke="none" strokeWidth="1" fill="none" fillRule="evenodd">
22
- <g transform="translate(-538.000000, -996.000000)">
23
- <g transform="translate(457.000000, 938.000000)">
24
- <g transform="translate(81.000000, 20.000000)">
25
- <g transform="translate(0.000000, 38.000000)">
20
+ <g
21
+ id="icon-valid-Authentication"
22
+ stroke="none"
23
+ strokeWidth="1"
24
+ fill="none"
25
+ fillRule="evenodd"
26
+ >
27
+ <g
28
+ id="icon-valid-00.1.0.1---HSS---Register---Already-Exists-Error"
29
+ transform="translate(-538.000000, -996.000000)"
30
+ >
31
+ <g
32
+ id="icon-valid-Password-Requirements"
33
+ transform="translate(457.000000, 938.000000)"
34
+ >
35
+ <g
36
+ id="icon-valid-Group-2"
37
+ transform="translate(81.000000, 20.000000)"
38
+ >
39
+ <g
40
+ id="icon-valid-PasswordVerification-Sucess"
41
+ transform="translate(0.000000, 38.000000)"
42
+ >
26
43
  <circle
44
+ id="icon-valid-Oval"
27
45
  stroke={bgFill}
28
46
  fill={bgFill}
29
47
  fillRule="nonzero"
@@ -31,9 +49,16 @@ export const IconValid = ({
31
49
  cy="9"
32
50
  r="8.5"
33
51
  ></circle>
34
- <g transform="translate(2.000000, 2.000000)">
35
- <polygon points="0 0 14 0 14 14 0 14"></polygon>
52
+ <g
53
+ id="icon-valid-baseline-check-24px"
54
+ transform="translate(2.000000, 2.000000)"
55
+ >
36
56
  <polygon
57
+ id="icon-valid-Path"
58
+ points="0 0 14 0 14 14 0 14"
59
+ ></polygon>
60
+ <polygon
61
+ id="icon-valid-Path-2"
37
62
  fill={iconFill}
38
63
  points="5.25 9.4325 2.8175 7 1.98916667 7.8225 5.25 11.0833333 12.25 4.08333333 11.4275 3.26083333"
39
64
  ></polygon>
@@ -1,4 +1,3 @@
1
- import React, { Fragment } from "react";
2
1
  import numeral from "numeral";
3
2
 
4
3
  export const noop = () => {};
@@ -10,17 +9,9 @@ export const displayCurrency = cents =>
10
9
 
11
10
  export const convertCentsToMoneyInt = n => (n / 100).toFixed(0);
12
11
 
13
- const createUniqueId = () =>
14
- "_" +
15
- Math.random()
16
- .toString(36)
17
- .substr(2, 9);
18
-
19
12
  export const safeChildren = (children, replacement = []) => {
20
13
  if (children && children instanceof Array) {
21
- return children.map(child =>
22
- !child ? <Fragment key={createUniqueId()}>{replacement}</Fragment> : child
23
- );
14
+ return children.map(child => (!child ? replacement : child));
24
15
  }
25
16
  return !children ? replacement : children;
26
17
  };
package/.tool-versions DELETED
@@ -1 +0,0 @@
1
- nodejs 10.15.3