@purple/phoenix-components 4.36.0 → 5.0.0-alpha.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.
package/CHANGELOG.md CHANGED
@@ -2,47 +2,27 @@
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.36.0](https://github.com/purple-technology/phoenix-components/compare/v4.35.2...v4.36.0) (2023-01-09)
5
+ ## [5.0.0-alpha.0](https://github.com/purple-technology/phoenix-components/compare/v4.32.0...v5.0.0-alpha.0) (2023-01-10)
6
6
 
7
7
 
8
- ### Features
9
-
10
- * **FileUpload:** handle multiple password protected PDFs ([86db270](https://github.com/purple-technology/phoenix-components/commit/86db270fde4e978060c577c967b7e6dda2dc2709))
11
-
12
- ### [4.35.2](https://github.com/purple-technology/phoenix-components/compare/v4.35.1...v4.35.2) (2023-01-04)
13
-
14
-
15
- ### Bug Fixes
16
-
17
- * **Modal:** stop propagation ([fc63c48](https://github.com/purple-technology/phoenix-components/commit/fc63c48da44b2862ff5d10ee9cea313fb223fcec))
18
-
19
- ### [4.35.1](https://github.com/purple-technology/phoenix-components/compare/v4.35.0...v4.35.1) (2022-12-16)
20
-
21
-
22
- ### Bug Fixes
23
-
24
- * **MultiSelect:** add missing export ([98d8704](https://github.com/purple-technology/phoenix-components/commit/98d8704010c03c534a4b67ffa5814fbcf71328ed))
25
-
26
- ## [4.35.0](https://github.com/purple-technology/phoenix-components/compare/v4.34.0...v4.35.0) (2022-12-05)
27
-
28
-
29
- ### Features
30
-
31
- * **FileUpload:** password protected PDFs ([8848161](https://github.com/purple-technology/phoenix-components/commit/8848161234473530b3ae3fa0cd6f23a130d794b8))
32
-
33
- ## [4.34.0](https://github.com/purple-technology/phoenix-components/compare/v4.33.0...v4.34.0) (2022-11-10)
34
-
35
-
36
- ### Features
37
-
38
- * **Tabs:** size prop ([d2d24bb](https://github.com/purple-technology/phoenix-components/commit/d2d24bb3aa8bfa5ca153694a19718139ac11a10d))
39
-
40
- ## [4.33.0](https://github.com/purple-technology/phoenix-components/compare/v4.32.0...v4.33.0) (2022-10-26)
8
+ ### ⚠ BREAKING CHANGES
41
9
 
10
+ * major dependencies update
11
+ * **MenuDivider:** deprecated component removed
42
12
 
43
13
  ### Features
44
14
 
45
- * **DateInput:** new props ([44b066c](https://github.com/purple-technology/phoenix-components/commit/44b066cc3a99258d610a6e14ae48d9224f23b28a))
15
+ * **Button:** outline style ([19c4536](https://github.com/purple-technology/phoenix-components/commit/19c453623464ac8a763f119cd88e808ca4897466))
16
+ * fix input label alignment ([58de05a](https://github.com/purple-technology/phoenix-components/commit/58de05a6d34d33946a5916be8e0d32cf9906e7d6))
17
+ * improved tokens ([4174cc4](https://github.com/purple-technology/phoenix-components/commit/4174cc4d0fdc1c71afdc8926e73dc76e5df9603d))
18
+ * major dependencies update ([103da44](https://github.com/purple-technology/phoenix-components/commit/103da44a94862250cc8c18674e56883b2581f4b9))
19
+ * **MenuDivider:** deprecated component removed ([821f0dc](https://github.com/purple-technology/phoenix-components/commit/821f0dcc2ff347de3aea3dc5a7271955536c8c83))
20
+ * react-tabs reversed to version 4 ([96e8178](https://github.com/purple-technology/phoenix-components/commit/96e8178789d0784bacfb79aa5c72d08f6acc815a))
21
+ * **Tag:** primary and outline style ([6b54b7a](https://github.com/purple-technology/phoenix-components/commit/6b54b7a2ae87a791fcaa65cfa60e5a14dff2d009))
22
+ * update border tokens ([33d46c1](https://github.com/purple-technology/phoenix-components/commit/33d46c1e2596d003eee3822306e8b7bde69cb9e6))
23
+ * update line height ([89e67d4](https://github.com/purple-technology/phoenix-components/commit/89e67d4ca742fc3a4d2e45dc49b362d1739276ca))
24
+ * wip: design tokens ([504825f](https://github.com/purple-technology/phoenix-components/commit/504825ff92e73de81c1b35273fd959cc3d8b2b12))
25
+ * wip: design tokens ([8f66cf2](https://github.com/purple-technology/phoenix-components/commit/8f66cf29f035f3eec74f816eb1f5838b78f44ff0))
46
26
 
47
27
  ## [4.32.0](https://github.com/purple-technology/phoenix-components/compare/v4.31.0...v4.32.0) (2022-09-05)
48
28
 
package/README.md CHANGED
@@ -30,11 +30,11 @@ Phoenix Components takes advantage of some 3rd party libraries to create consist
30
30
 
31
31
  ## Usage
32
32
 
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.)
33
+ 1. Phoenix components use by default Mulish font with weights 400 and 600. 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
- <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500&display=swap" rel="stylesheet">
37
+ <link href="https://fonts.googleapis.com/css2?family=Mulish:wght@400;600&display=swap" rel="stylesheet">
38
38
  ```
39
39
 
40
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`).
@@ -105,6 +105,112 @@ export const Theme = {
105
105
 
106
106
  For more information about what's possible to customize please refer directly to the file `src/theme.tsx`.
107
107
 
108
+ ## 🔼 Migration guide from v4 to v5
109
+
110
+ Phoenix Components ver. 5 transitioned to using Design tokens. This change affected namings of several entities.
111
+
112
+ ### Sizes
113
+
114
+ Sizes of the components have been updated to be more consistent with other sizing and spacing units.
115
+
116
+ | Previous size | **Current size** |
117
+ | -- | -- |
118
+ | tiny | **xs** |
119
+ | small | **sm** |
120
+ | medium | **md** |
121
+ | large | **lg** |
122
+
123
+ These changes affect components `Button`, `ButtonGroup`, `DateInput`, `Heading`, `LinkButton`, `List`, `Modal`, `MultiSelect`, `Pagination`, `Paragraph`, `Tag` and `Text`.
124
+
125
+ > #### What to do?
126
+ >
127
+ > Find all instances of `size="tiny"` and replace with `size="xs"`. Similarly for other sizes. Don't forget that a value can be written also for example `size={'tiny'}` or that value can be calculated so you won't be able to look these instances so easily.
128
+
129
+ Also sizing types have been renamed.
130
+
131
+ | Previous size type | **Current size type** |
132
+ | -- | -- |
133
+ | ComponentSize | **Sizing** |
134
+ | ComponentSizeSmallMedium | **SizingSmMd** |
135
+ | ComponentSizeMediumLarge | **SizingMdLg** |
136
+ | ComponentSizeSmallMediumLarge | **SizingSmMdLg** |
137
+
138
+ > #### What to do?
139
+ >
140
+ > Replace all previous size types with the new ones.
141
+
142
+ ### Colors
143
+
144
+ Text colors were renamed
145
+
146
+ | Previous color | **Current color** |
147
+ | -- | -- |
148
+ | darkest | **primary** |
149
+ | dark | **secondary** |
150
+ | light | **tertiary** |
151
+ | lightest | **quaternary** |
152
+
153
+ These changes affect components `Heading`, `Paragraph` and `Text`.
154
+
155
+ For the `ColorTheme` enum and `colorTheme` props, the color `primary` has been renamed to color **`brand`**. Other colors (`success`, `warning`, `error`, `info`, `neutral`) remain the same.
156
+
157
+ > #### What to do?
158
+ > - Search for all `colorTheme="primary"` and replace with `colorTheme="brand"`
159
+ > - Search for all `color="darkest"` and replace with `color="primary"`. Same for dark, light and lightest.
160
+
161
+ ### Spacings
162
+
163
+ Spacings were also updated to be more consistent with other units. **However, these changes are backwards compatible.** Old values have been deprecated and will be removed in the next major version.
164
+
165
+ | Previous value | **Current value** |
166
+ | -- | -- |
167
+ | xxxs | **3xs** |
168
+ | xxs | **2xs** |
169
+ | xs | **xs** |
170
+ | s | **sm** |
171
+ | m | **md** |
172
+ | l | **lg** |
173
+ | xl | **xl** |
174
+ | xxl | **2xl** |
175
+ | xxxl | **3xl** |
176
+
177
+ > #### What to do?
178
+ > Since these changes are backwards-compatible, you don't have to do anything right now.
179
+
180
+ ### Button and Link Button
181
+
182
+ Both components have now a new style available - outline. This style can be enabled by the prop named `outline`.
183
+
184
+ Minimal style is now available in all color themes. Default style for minimal is now `brand`, instead of `neutral`.
185
+
186
+ > #### What to do?
187
+ > If you want to keep the same styling, add `colorTheme="neutral"` to Buttons with `minimal` prop.
188
+
189
+ ### Checkbox and Radio
190
+
191
+ Components `Checkbox` and `Radio` have now only a single size and prop `size` has been removed.
192
+
193
+ ### Tag
194
+
195
+ Previously, this component had only a single style. Currently, there are 3 styles available that correpond with the styles of the button - primary, secondary and outline. **Default style is now `primary`. Previous style is currently `secondary` and must be explicitly enabled by the prop `secondary`.**
196
+
197
+ > #### What to do?
198
+ > Search for all instances of `Tag` component and add `secondary` prop.
199
+
200
+ ### Heading, Paragraph and Text
201
+
202
+ Prop `colorTheme` has been removed and there's only `color` prop now excepting all text colors (primary, secondary, tertiary, quaternary), color theme colors (brand, success, warning, error, info, neutral) and any valid CSS value.
203
+
204
+ > #### What to do?
205
+ > Search all instances of Text, Paragraph and Heading and replace `colorTheme` with `color`.
206
+
207
+ ### List and ListItem
208
+
209
+ Prop `colorTheme` has been removed and there's only `color` prop now excepting all text colors (primary, secondary, tertiary, quaternary), color theme colors (brand, success, warning, error, info, neutral) and any valid CSS value. Also, `color` prop now affects only text. To change color of the bullet, use `bulletColor` which accepts the same values.
210
+
211
+ > #### What to do?
212
+ > - Search all instances of List and ListItem and replace `colorTheme` with `bulletColor`.
213
+ > - Search for all `bulletColor` props and change `darkest` to `primary`, `dark` to `secondary` etc. (see the section Colors)
108
214
 
109
215
  ## 🔼 Migration guide from v3 to v4
110
216