@thecb/components 3.3.8-beta.0 → 3.3.10

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 (51) hide show
  1. package/.tool-versions +1 -0
  2. package/dist/index.cjs.js +15792 -14182
  3. package/package.json +3 -3
  4. package/src/components/atoms/add-obligation/AddObligation.js +64 -0
  5. package/src/components/atoms/add-obligation/AddObligation.stories.js +18 -0
  6. package/src/components/atoms/add-obligation/AddObligation.theme.js +9 -0
  7. package/src/components/atoms/add-obligation/index.js +3 -0
  8. package/src/components/atoms/button-with-link/ButtonWithLink.js +1 -1
  9. package/src/components/atoms/form-layouts/FormInput.js +1 -0
  10. package/src/components/atoms/heading/Heading.js +2 -0
  11. package/src/components/atoms/icons/IconAdd.js +36 -0
  12. package/src/components/atoms/icons/index.js +3 -1
  13. package/src/components/atoms/index.js +1 -0
  14. package/src/components/atoms/layouts/Cover.js +1 -1
  15. package/src/components/atoms/layouts/Cover.styled.js +0 -1
  16. package/src/components/atoms/layouts/Imposter.styled.js +0 -1
  17. package/src/components/atoms/paragraph/Paragraph.js +2 -0
  18. package/src/components/atoms/placeholder/Placeholder.js +77 -60
  19. package/src/components/molecules/email-form/EmailForm.js +1 -14
  20. package/src/components/molecules/email-form/EmailForm.state.js +1 -9
  21. package/src/components/molecules/nav-menu/NavMenu.theme.js +3 -1
  22. package/src/components/molecules/nav-menu/NavMenuDesktop.js +1 -1
  23. package/src/components/molecules/obligation/icons/AccountBillIcon.js +2 -2
  24. package/src/components/molecules/obligation/icons/AccountConstructionIcon.js +2 -2
  25. package/src/components/molecules/obligation/icons/AccountDentalIcon.js +2 -2
  26. package/src/components/molecules/obligation/icons/AccountElectricIcon.js +2 -2
  27. package/src/components/molecules/obligation/icons/AccountGarbageIcon.js +2 -2
  28. package/src/components/molecules/obligation/icons/AccountGasIcon.js +2 -2
  29. package/src/components/molecules/obligation/icons/AccountGenericIcon.js +2 -2
  30. package/src/components/molecules/obligation/icons/AccountMedicalIcon.js +2 -2
  31. package/src/components/molecules/obligation/icons/AccountWaterIcon.js +2 -2
  32. package/src/components/molecules/obligation/icons/PropertyApartmentIcon.js +2 -2
  33. package/src/components/molecules/obligation/icons/PropertyBusinessIcon.js +2 -2
  34. package/src/components/molecules/obligation/icons/PropertyCarIcon.js +2 -2
  35. package/src/components/molecules/obligation/icons/PropertyCommercialVehicleIcon.js +2 -2
  36. package/src/components/molecules/obligation/icons/PropertyGarageIcon.js +2 -2
  37. package/src/components/molecules/obligation/icons/PropertyLandIcon.js +2 -2
  38. package/src/components/molecules/obligation/icons/PropertyMotorcycleIcon.js +2 -2
  39. package/src/components/molecules/obligation/icons/PropertyPersonalIcon.js +2 -2
  40. package/src/components/molecules/obligation/icons/PropertyStorefrontIcon.js +2 -2
  41. package/src/components/molecules/partial-amount-form/PartialAmountForm.state.js +2 -1
  42. package/src/components/molecules/radio-section/RadioSection.js +2 -1
  43. package/src/components/templates/center-single/CenterSingle.js +7 -5
  44. package/src/components/templates/center-stack/CenterStack.js +7 -2
  45. package/src/components/templates/default-page-template/DefaultPageTemplate.js +7 -2
  46. package/src/components/templates/sidebar-single-content/SidebarSingleContent.js +7 -2
  47. package/src/components/templates/sidebar-stack-content/SidebarStackContent.js +2 -5
  48. package/src/deprecated/icons/IconQuit.js +5 -5
  49. package/src/deprecated/icons/index.js +0 -2
  50. package/src/util/index.js +2 -1
  51. package/src/deprecated/icons/IconAdd.js +0 -44
@@ -2,8 +2,8 @@ import React from "react";
2
2
 
3
3
  const PropertyCommercialVehicleIcon = () => (
4
4
  <svg
5
- width="81px"
6
- height="81px"
5
+ width="51px"
6
+ height="51px"
7
7
  viewBox="0 0 81 81"
8
8
  version="1.1"
9
9
  xmlns="http://www.w3.org/2000/svg"
@@ -2,8 +2,8 @@ import React from "react";
2
2
 
3
3
  const PropertyGarageIcon = () => (
4
4
  <svg
5
- width="81px"
6
- height="81px"
5
+ width="51px"
6
+ height="51px"
7
7
  viewBox="0 0 81 81"
8
8
  version="1.1"
9
9
  xmlns="http://www.w3.org/2000/svg"
@@ -2,8 +2,8 @@ import React from "react";
2
2
 
3
3
  const PropertyLandIcon = () => (
4
4
  <svg
5
- width="81px"
6
- height="81px"
5
+ width="51px"
6
+ height="51px"
7
7
  viewBox="0 0 81 81"
8
8
  version="1.1"
9
9
  xmlns="http://www.w3.org/2000/svg"
@@ -2,8 +2,8 @@ import React from "react";
2
2
 
3
3
  const PropertyMotorcycleIcon = () => (
4
4
  <svg
5
- width="81px"
6
- height="81px"
5
+ width="51px"
6
+ height="51px"
7
7
  viewBox="0 0 81 81"
8
8
  version="1.1"
9
9
  xmlns="http://www.w3.org/2000/svg"
@@ -2,8 +2,8 @@ import React from "react";
2
2
 
3
3
  const PropertyPersonalIcon = () => (
4
4
  <svg
5
- width="81px"
6
- height="81px"
5
+ width="51px"
6
+ height="51px"
7
7
  viewBox="0 0 81 81"
8
8
  version="1.1"
9
9
  xmlns="http://www.w3.org/2000/svg"
@@ -2,8 +2,8 @@ import React from "react";
2
2
 
3
3
  const PropertyStorefrontIcon = () => (
4
4
  <svg
5
- width="81px"
6
- height="81px"
5
+ width="51px"
6
+ height="51px"
7
7
  viewBox="0 0 81 81"
8
8
  version="1.1"
9
9
  xmlns="http://www.w3.org/2000/svg"
@@ -36,7 +36,8 @@ export const createPartialAmountFormState = (
36
36
  ...acc,
37
37
  [item.id]: {
38
38
  validators: validators,
39
- constraints: [onlyNaturals()]
39
+ constraints: [onlyNaturals()],
40
+ defaultValue: String(item.amount)
40
41
  }
41
42
  };
42
43
  }, {});
@@ -146,8 +146,9 @@ const RadioSection = ({
146
146
  justify="space-between"
147
147
  align="center"
148
148
  childGap="0.5rem"
149
+ nowrap
149
150
  >
150
- <Cluster justify="flex-start" align="center">
151
+ <Cluster justify="flex-start" align="center" nowrap>
151
152
  {!section.hideRadioButton && (
152
153
  <Box padding="0">
153
154
  <RadioButton
@@ -20,11 +20,13 @@ const CenterSingle = ({
20
20
  const { isMobile } = themeContext;
21
21
 
22
22
  return (
23
- <Box padding="0" minWidth="100%" background={themeValues.pageBackground}>
24
- <Cover
25
- minHeight="100vh"
26
- centerOverride={isMobile && !centeredMobileContent}
27
- >
23
+ <Box
24
+ padding="0"
25
+ minWidth="100%"
26
+ background={themeValues.pageBackground}
27
+ extraStyles="flex-grow: 1;"
28
+ >
29
+ <Cover centerOverride={isMobile && !centeredMobileContent}>
28
30
  {header ? header : <Box padding="0" />}
29
31
  <Box
30
32
  padding="0"
@@ -20,8 +20,13 @@ const CenterStack = ({
20
20
  const { isMobile } = themeContext;
21
21
 
22
22
  return (
23
- <Box padding="0" minWidth="100%" background={themeValues.pageBackground}>
24
- <Cover minHeight="100vh">
23
+ <Box
24
+ padding="0"
25
+ minWidth="100%"
26
+ background={themeValues.pageBackground}
27
+ extraStyles="flex-grow: 1;"
28
+ >
29
+ <Cover>
25
30
  {header ? header : <Box padding="0" />}
26
31
  <Box padding="0" minWidth="100%" role="main">
27
32
  {subHeader && !(isMobile && hideMobileSubHeader) ? (
@@ -19,8 +19,13 @@ const CenterSingle = ({
19
19
  const { isMobile } = themeContext;
20
20
 
21
21
  return (
22
- <Box padding="0" minWidth="100%" background={themeValues.pageBackground}>
23
- <Cover minHeight="100vh" childGap="0" fillCenter>
22
+ <Box
23
+ padding="0"
24
+ minWidth="100%"
25
+ background={themeValues.pageBackground}
26
+ extraStyles="flex-grow: 1;"
27
+ >
28
+ <Cover childGap="0" fillCenter>
24
29
  {header ? header : <Box padding="0" />}
25
30
  <Box
26
31
  padding="0"
@@ -25,8 +25,13 @@ const SidebarSingleContent = ({
25
25
  const { isMobile } = themeContext;
26
26
 
27
27
  return (
28
- <Box padding="0" minWidth="100%" background={themeValues.pageBackground}>
29
- <Cover minHeight="100vh" centerOverride={!sidebarVerticalCenter}>
28
+ <Box
29
+ padding="0"
30
+ minWidth="100%"
31
+ background={themeValues.pageBackground}
32
+ extraStyles="flex-grow: 1;"
33
+ >
34
+ <Cover centerOverride={!sidebarVerticalCenter}>
30
35
  {header ? header : <Box padding="0" />}
31
36
  <Box padding="0" minWidth="100%" role="main">
32
37
  {subHeader && !(isMobile && hideMobileSubHeader) ? (
@@ -31,12 +31,9 @@ const SidebarStackContent = ({
31
31
  minWidth="100%"
32
32
  background={themeValues.pageBackground}
33
33
  key="page-bg"
34
+ extraStyles="flex-grow: 1;"
34
35
  >
35
- <Cover
36
- minHeight="100vh"
37
- centerOverride={!sidebarVerticalCenter}
38
- key="page-cover"
39
- >
36
+ <Cover centerOverride={!sidebarVerticalCenter} key="page-cover">
40
37
  {header ? header : <Box padding="0" key="header-box" />}
41
38
  <Box padding="0" minWidth="100%" key="content-box" role="main">
42
39
  {subHeader && !(isMobile && hideMobileSubHeader) ? (
@@ -15,16 +15,16 @@ export const IconQuit = ({
15
15
  >
16
16
  <defs>
17
17
  <path
18
- id="a"
18
+ id="quit"
19
19
  d="M18.9999989 6.40999946L17.589999 4.9999997 11.9999993 10.5899995 6.40999946 4.9999997 4.9999997 6.40999946 10.5899995 11.9999993 4.9999997 17.589999 6.40999946 18.9999989 11.9999993 13.409999 17.589999 18.9999989 18.9999989 17.589999 13.409999 11.9999993z"
20
20
  ></path>
21
21
  </defs>
22
22
  <g fill="none" fillRule="evenodd" stroke="none" strokeWidth="1">
23
- <mask id="b" fill="#fff">
24
- <use xlinkHref="#a"></use>
23
+ <mask id="quitMask" fill="#fff">
24
+ <use xlinkHref="#quit"></use>
25
25
  </mask>
26
- <use fill={fill} xlinkHref="#a"></use>
27
- <g fill={fill} mask="url(#b)">
26
+ <use fill={fill} xlinkHref="#quit"></use>
27
+ <g fill={fill} mask="url(#quitMask)">
28
28
  <path d="M0 0H24V24H0z"></path>
29
29
  </g>
30
30
  </g>
@@ -1,4 +1,3 @@
1
- import { IconAdd } from "./IconAdd";
2
1
  import { IconWarn } from "./IconWarn";
3
2
  import { IconCheck } from "./IconCheck";
4
3
  import { IconCheckEmail } from "./IconCheckEmail";
@@ -24,7 +23,6 @@ const AlertIcons = {
24
23
  };
25
24
 
26
25
  export {
27
- IconAdd,
28
26
  IconWarn,
29
27
  IconCheck,
30
28
  IconCheckEmail,
package/src/util/index.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import * as formats from "./formats";
2
2
  import * as general from "./general";
3
+ import * as theme from "./themeUtils";
3
4
 
4
- export { formats, general };
5
+ export { formats, general, theme };
@@ -1,44 +0,0 @@
1
- import React from "react";
2
- import { WHITE, CHARADE_GREY } from "../../constants/colors";
3
-
4
- export const IconAdd = ({ fill = CHARADE_GREY, iconID, isMobile }) => (
5
- <svg
6
- xmlns="http://www.w3.org/2000/svg"
7
- xmlnsXlink="http://www.w3.org/1999/xlink"
8
- width="18"
9
- height="18"
10
- viewBox={isMobile ? "0 -0.25 20 20" : "-0.5 -0.5 18 18"}
11
- id={`icon-add-${iconID}`}
12
- >
13
- <defs>
14
- <path
15
- id="path-1"
16
- d="M9.91666623 6.78508747L6.78508747 6.78508747 6.78508747 9.91666623 5.74122788 9.91666623 5.74122788 6.78508747 2.60964912 6.78508747 2.60964912 5.74122788 5.74122788 5.74122788 5.74122788 2.60964912 6.78508747 2.60964912 6.78508747 5.74122788 9.91666623 5.74122788z"
17
- ></path>
18
- </defs>
19
- <g fill="none" fillRule="evenodd" stroke="none" strokeWidth="1">
20
- <g transform="translate(-383 -15)">
21
- <g transform="translate(384 16)">
22
- <g>
23
- <g transform="translate(1.94 1.858)">
24
- <mask id="mask-2" fill={WHITE}>
25
- <use xlinkHref="#path-1"></use>
26
- </mask>
27
- <use fill="#000" fillRule="evenodd" xlinkHref="#path-1"></use>
28
- <g fill={fill} fillRule="evenodd" mask="url(#mask-2)">
29
- <path d="M0 0H12.526V12.526H0z"></path>
30
- </g>
31
- </g>
32
- <circle
33
- cx="8.155"
34
- cy="8.072"
35
- r="8"
36
- stroke={fill}
37
- strokeWidth="0.644"
38
- ></circle>
39
- </g>
40
- </g>
41
- </g>
42
- </g>
43
- </svg>
44
- );