jamespot-react-components 1.0.9 → 1.0.16

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 (30) hide show
  1. package/.storybook/StorybookContainer/StorybookContainer.css +1 -0
  2. package/babel.config.js +0 -1
  3. package/build/jamespot-react-components.js +224 -221
  4. package/build/jamespot-react-components.js.LICENSE.txt +22 -0
  5. package/build/jamespot-react-components.js.map +1 -1
  6. package/build/src/components/JRCAppContainer/JRCAppContainer.d.ts +1 -0
  7. package/build/src/components/Templates/JRCBase.template.d.ts +9 -0
  8. package/build/src/components/Templates/JRCTemplate.stories.d.ts +13 -0
  9. package/build/src/components/Templates/JRCTwoColumns.template.d.ts +7 -0
  10. package/build/src/index.d.ts +3 -2
  11. package/build/src/styles/theme.d.ts +3 -1
  12. package/build/src/types.d.ts +2 -2
  13. package/externals.json +1 -0
  14. package/package.json +4 -3
  15. package/src/components/JRCAppContainer/JRCAppContainer.tsx +6 -2
  16. package/src/components/JRCAppLeftColumn/JRCAppLeftColumn.styles.tsx +2 -1
  17. package/src/components/JRCAvatar/JRCAvatar.test.tsx +10 -6
  18. package/src/components/JRCAvatar/JRCAvatar.tsx +1 -0
  19. package/src/components/JRCButton/__snapshots__/JRCButton.test.tsx.snap +1 -2
  20. package/src/components/JRCModal/JRCModal.tsx +88 -89
  21. package/src/components/JRCThemeProvider/font.css +1 -1
  22. package/src/components/JRCTypography/__snapshots__/JRCTypography.test.tsx.snap +1 -1
  23. package/src/components/Templates/JRCBase.template.tsx +39 -0
  24. package/src/components/Templates/JRCTemplate.stories.tsx +55 -0
  25. package/src/components/Templates/JRCTwoColumns.template.tsx +20 -0
  26. package/src/index.tsx +8 -3
  27. package/src/styles/theme.tsx +9 -4
  28. package/src/types.ts +4 -2
  29. package/build/src/components/JRCColumnCenterTitle/JRCColumnCenterTitle.d.ts +0 -12
  30. package/src/components/JRCColumnCenterTitle/JRCColumnCenterTitle.tsx +0 -26
@@ -7,6 +7,7 @@ export interface ITheme {
7
7
  }
8
8
 
9
9
  export type ThemeConfigOptions = {
10
+ fontFamily: string;
10
11
  linkColor: string;
11
12
  buttonColor: string;
12
13
  headerColor: string;
@@ -65,8 +66,10 @@ export type Shades =
65
66
  type ThemeConfigShadeType = { [color in Shades]: string };
66
67
 
67
68
  export type FontWeight = {
69
+ light: number;
68
70
  normal: number;
69
71
  medium: number;
72
+ semiBold: number;
70
73
  bold: number;
71
74
  };
72
75
 
@@ -78,7 +81,6 @@ export type ThemeType = {
78
81
  hrefColor: string;
79
82
  size: string;
80
83
  lineHeight: string;
81
- fontWeight: number;
82
84
  weight: FontWeight;
83
85
  };
84
86
  color: ThemeConfigColorType & ThemeConfigShadeType;
@@ -178,16 +180,19 @@ const Theme: ITheme = {
178
180
  dpr: Math.ceil(window?.devicePixelRatio || 2),
179
181
  font: {
180
182
  // Before using these properties, check JRCTypo.tsx
181
- family: "'Poppins',sans-serif",
183
+ family:
184
+ options && options.fontFamily
185
+ ? "'" + options.fontFamily + "', sans-serif"
186
+ : "'Poppins', sans-serif",
182
187
  color: defaultColors.grey5,
183
188
  hrefColor: defaultColors.secondary,
184
189
  size: '16px',
185
190
  lineHeight: '1.5em',
186
- // @deprecated
187
- fontWeight: 400,
188
191
  weight: {
192
+ light: 300,
189
193
  normal: 400,
190
194
  medium: 500,
195
+ semiBold: 600,
191
196
  bold: 700,
192
197
  },
193
198
  },
package/src/types.ts CHANGED
@@ -33,8 +33,6 @@ export { JRCButtonProps };
33
33
  export { JRCButtonDropdownProps } from './components/JRCButtonDropdown/JRCButtonDropdown';
34
34
  import { JRCColumnCenterProps } from './components/JRCColumnCenter/JRCColumnCenter';
35
35
  export { JRCColumnCenterProps };
36
- import { JRCColumnCenterTitleProps } from './components/JRCColumnCenterTitle/JRCColumnCenterTitle';
37
- export { JRCColumnCenterTitleProps };
38
36
  import { JRCColumnLeftProps } from './components/JRCColumnLeft/JRCColumnLeft';
39
37
  export { JRCColumnLeftProps };
40
38
  import { JRCColumnRightProps } from './components/JRCColumnRight/JRCColumnRight';
@@ -79,6 +77,10 @@ import { JRCValueLabelProps } from './components/Form/Common/types';
79
77
  export { JRCValueLabelProps };
80
78
  import { JRCWritableFormInputProps } from './components/Form/Input/JRCFormFieldRender';
81
79
  export { JRCWritableFormInputProps };
80
+
81
+ export { JRCTemplateBaseProps } from './components/Templates/JRCBase.template';
82
+ export { JRCTemplateTwoColumnsProps } from './components/Templates/JRCTwoColumns.template';
83
+
82
84
  import { JRCTypographyProps } from './components/JRCTypography/JRCTypography.d';
83
85
  export { JRCTypographyProps };
84
86
  export { JRCValidationButtonProps } from './components/JRCButton/JRCValidationButton';
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- /**
3
- * Props type for JRCColumnCenterTitle
4
- * @member title string : column title content
5
- * @member children enclosed React component (rendered after the title)
6
- */
7
- export interface JRCColumnCenterTitleProps {
8
- title: string;
9
- children: React.ReactNode;
10
- }
11
- declare const JRCColumnCenterTitle: (props: JRCColumnCenterTitleProps) => JSX.Element;
12
- export default JRCColumnCenterTitle;
@@ -1,26 +0,0 @@
1
- import * as React from 'react';
2
- import styled from 'styled-components';
3
- import { JRCH1 } from '../JRCTypo/JRCTypo';
4
-
5
- /**
6
- * Props type for JRCColumnCenterTitle
7
- * @member title string : column title content
8
- * @member children enclosed React component (rendered after the title)
9
- */
10
- export interface JRCColumnCenterTitleProps {
11
- title: string;
12
- children: React.ReactNode;
13
- }
14
-
15
- const StyledDiv = styled.div`
16
- border-bottom: 1px solid rgba(0, 0, 0, 0.08);
17
- `;
18
-
19
- const JRCColumnCenterTitle = (props: JRCColumnCenterTitleProps) => (
20
- <StyledDiv>
21
- <JRCH1>{props.title}</JRCH1>
22
- {props.children}
23
- </StyledDiv>
24
- );
25
-
26
- export default JRCColumnCenterTitle;