@purple/phoenix-components 4.24.2 → 4.27.1

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/CHANGELOG.md CHANGED
@@ -2,6 +2,38 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [4.27.1](https://github.com/purple-technology/phoenix-components/compare/v4.27.0...v4.27.1) (2022-06-27)
6
+
7
+
8
+ ### Bug Fixes
9
+
10
+ * **Modal:** close button position fix for rtl languages ([89fecfc](https://github.com/purple-technology/phoenix-components/commit/89fecfc428b3d5a85513e5e747ac38092d2de0cd))
11
+
12
+ ## [4.27.0](https://github.com/purple-technology/phoenix-components/compare/v4.26.0...v4.27.0) (2022-05-31)
13
+
14
+
15
+ ### Features
16
+
17
+ * **Box:** add border props ([40bd27b](https://github.com/purple-technology/phoenix-components/commit/40bd27b63c63fe66a8e8ec628c0e10813671c14e))
18
+ * **FileUpload:** button text on touch devices ([93cdacf](https://github.com/purple-technology/phoenix-components/commit/93cdacfa232598d3ea1c5b03d7482500372e4cdb))
19
+ * **FileUpload:** label for touch devices ([7eaf82e](https://github.com/purple-technology/phoenix-components/commit/7eaf82e283c1dc482a22df40b7ffde802e9993af))
20
+ * **Label:** add padding and margin props ([c3770f4](https://github.com/purple-technology/phoenix-components/commit/c3770f4f74a8c2c46a44e5671cf1ee4bbaf74a6e))
21
+ * **List:** better suport for RTL languages ([eda6704](https://github.com/purple-technology/phoenix-components/commit/eda6704f9414f39a4a70da3a9d6efcfeba69d079))
22
+
23
+ ## [4.26.0](https://github.com/purple-technology/phoenix-components/compare/v4.25.0...v4.26.0) (2022-05-03)
24
+
25
+
26
+ ### Features
27
+
28
+ * disabled button ([e8fdd77](https://github.com/purple-technology/phoenix-components/commit/e8fdd77ccdd5fd7a767b6cd359ced746fe1728df))
29
+
30
+ ## [4.25.0](https://github.com/purple-technology/phoenix-components/compare/v4.24.2...v4.25.0) (2022-05-03)
31
+
32
+
33
+ ### Features
34
+
35
+ * **Menu:** add margin and padding props ([c13da91](https://github.com/purple-technology/phoenix-components/commit/c13da914495083634d7a8be004e70e7344256863))
36
+
5
37
  ### [4.24.2](https://github.com/purple-technology/phoenix-components/compare/v4.24.1...v4.24.2) (2022-04-25)
6
38
 
7
39
 
package/README.md CHANGED
@@ -30,25 +30,27 @@ Phoenix Components takes advantage of some 3rd party libraries to create consist
30
30
 
31
31
  ## Usage
32
32
 
33
- 1. Include Roboto font with weights 400 and 500 into your project. You can use for example Google Fonts. (400 and 500 are default weights for regular and bold fonts. These can be changed in the theme file - `theme.fontWeight.regular` a `theme.fontWeight.bold`.)
33
+ 1. Phoenix components use by default Roboto font with weights 400 and 500. If you want to use this default font, please add it to your project, using for example Google Fonts. (If you want to use different font family and/or different font weights, please refer to the section Customization.)
34
34
 
35
35
  ```html
36
36
  <link rel="preconnect" href="https://fonts.gstatic.com">
37
37
  <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" rel="stylesheet">
38
38
  ```
39
39
 
40
- 2. Import `Theme` from Phoenix Components and wrap the app in `<ThemeProvider>` from `styled-components` providing the `Theme` object. If your repository already contains custom `styled-components` theme, merge both themes together. Merge should be safe as Phoenix Components use only the object with key `$pc`.
40
+ 2. Import `Theme` from Phoenix Components and wrap the app in `<ThemeProvider>` from `styled-components` providing the `Theme` object. If your repository already contains custom `styled-components` theme, merge both themes together. If you're going to use overrides inside `$pc` key (see the Customization section), you need to use deep merge (e.g. `merge` from `lodash`).
41
41
 
42
42
  Also, import `<GlobalStyles>` component which provides styles such as default font and sizes, and include it once in your project.
43
43
 
44
44
  ```typescript
45
+ import merge from 'lodash/merge'
45
46
  import { ThemeProvider } from 'styled-components'
46
- import { GlobalStyles, Theme } from '@purple/phoenix-components'
47
+ import { GlobalStyles, Theme as PhoenixTheme } from '@purple/phoenix-components'
48
+ import { Theme } from './CustomAppTheme'
47
49
  ...
48
50
 
49
51
  function App() {
50
52
  return (
51
- <ThemeProvider theme={Theme}>
53
+ <ThemeProvider theme={merge(PhoenixTheme, Theme)}>
52
54
  <GlobalStyles />
53
55
  { ... your app ... }
54
56
  </ThemeProvider>
@@ -60,7 +62,7 @@ You can optionally include `dir` key in the theme with values either `'ltr'` or
60
62
 
61
63
  ```typescript
62
64
  ...
63
- <ThemeProvider theme={{ dir: 'rtl', ...Theme }}>
65
+ <ThemeProvider theme={merge({ dir: 'rtl' }, Theme)}>
64
66
  ...
65
67
  ```
66
68
 
@@ -84,7 +86,24 @@ const StyledInput = styled(TextInput)`
84
86
  `
85
87
  ```
86
88
 
87
- Or you can modify the provided `Theme` file that you need to supply to the `<ThemeProvider>` and the values inside the `$pc` object. For more information about what's possible to customize please refer directly to the file `src/theme.tsx`.
89
+ Or you can override the default properties inside the `$pc` object. In your own theme file, define the overrides as shown below, deep merge your theme file with the Phoenix theme file, and provide it to `ThemeProvider`.
90
+
91
+ ```typescript
92
+ export const Theme = {
93
+ ...
94
+
95
+ // overriding phoenix components defaults
96
+ $pc: {
97
+ fontFamily: 'Mulish, sans-serif',
98
+ fontWeight: {
99
+ regular: 400,
100
+ bold: 600
101
+ }
102
+ }
103
+ }
104
+ ```
105
+
106
+ For more information about what's possible to customize please refer directly to the file `src/theme.tsx`.
88
107
 
89
108
 
90
109
  ## 🔼 Migration guide from v3 to v4