@purple/phoenix-components 4.36.0 → 5.0.0-alpha.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 +17 -30
- package/README.md +111 -2
- package/dist/bundle.cjs.js +1 -1
- package/dist/bundle.cjs.js.map +1 -1
- package/dist/bundle.esm.js +2 -2
- package/dist/bundle.esm.js.map +1 -1
- package/dist/bundle.umd.js +1 -1
- package/dist/bundle.umd.js.map +1 -1
- package/dist/index.d.ts +737 -202
- package/package.json +37 -35
package/CHANGELOG.md
CHANGED
|
@@ -2,47 +2,34 @@
|
|
|
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
|
-
## [
|
|
5
|
+
## [5.0.0-alpha.1](https://github.com/purple-technology/phoenix-components/compare/v5.0.0-alpha.0...v5.0.0-alpha.1) (2023-01-12)
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
### Features
|
|
9
9
|
|
|
10
|
-
* **
|
|
10
|
+
* **Paragraph:** default size sm ([692d444](https://github.com/purple-technology/phoenix-components/commit/692d444c00085c783bbded5db1c42d7fab57c6cd))
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
## [5.0.0-alpha.0](https://github.com/purple-technology/phoenix-components/compare/v4.32.0...v5.0.0-alpha.0) (2023-01-10)
|
|
13
13
|
|
|
14
14
|
|
|
15
|
-
###
|
|
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)
|
|
15
|
+
### ⚠ BREAKING CHANGES
|
|
41
16
|
|
|
17
|
+
* major dependencies update
|
|
18
|
+
* **MenuDivider:** deprecated component removed
|
|
42
19
|
|
|
43
20
|
### Features
|
|
44
21
|
|
|
45
|
-
* **
|
|
22
|
+
* **Button:** outline style ([19c4536](https://github.com/purple-technology/phoenix-components/commit/19c453623464ac8a763f119cd88e808ca4897466))
|
|
23
|
+
* fix input label alignment ([58de05a](https://github.com/purple-technology/phoenix-components/commit/58de05a6d34d33946a5916be8e0d32cf9906e7d6))
|
|
24
|
+
* improved tokens ([4174cc4](https://github.com/purple-technology/phoenix-components/commit/4174cc4d0fdc1c71afdc8926e73dc76e5df9603d))
|
|
25
|
+
* major dependencies update ([103da44](https://github.com/purple-technology/phoenix-components/commit/103da44a94862250cc8c18674e56883b2581f4b9))
|
|
26
|
+
* **MenuDivider:** deprecated component removed ([821f0dc](https://github.com/purple-technology/phoenix-components/commit/821f0dcc2ff347de3aea3dc5a7271955536c8c83))
|
|
27
|
+
* react-tabs reversed to version 4 ([96e8178](https://github.com/purple-technology/phoenix-components/commit/96e8178789d0784bacfb79aa5c72d08f6acc815a))
|
|
28
|
+
* **Tag:** primary and outline style ([6b54b7a](https://github.com/purple-technology/phoenix-components/commit/6b54b7a2ae87a791fcaa65cfa60e5a14dff2d009))
|
|
29
|
+
* update border tokens ([33d46c1](https://github.com/purple-technology/phoenix-components/commit/33d46c1e2596d003eee3822306e8b7bde69cb9e6))
|
|
30
|
+
* update line height ([89e67d4](https://github.com/purple-technology/phoenix-components/commit/89e67d4ca742fc3a4d2e45dc49b362d1739276ca))
|
|
31
|
+
* wip: design tokens ([504825f](https://github.com/purple-technology/phoenix-components/commit/504825ff92e73de81c1b35273fd959cc3d8b2b12))
|
|
32
|
+
* wip: design tokens ([8f66cf2](https://github.com/purple-technology/phoenix-components/commit/8f66cf29f035f3eec74f816eb1f5838b78f44ff0))
|
|
46
33
|
|
|
47
34
|
## [4.32.0](https://github.com/purple-technology/phoenix-components/compare/v4.31.0...v4.32.0) (2022-09-05)
|
|
48
35
|
|
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
|
|
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=
|
|
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,115 @@ 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
|
+
Instead of 3 sizes (small, medium, large), these components now include 4 sizes - xs, sm, md, lg. For Text and Paragraph components, default value is now `sm`. Since there's one more size, original size `small` is now `xs`.
|
|
205
|
+
|
|
206
|
+
> #### What to do?
|
|
207
|
+
> - Search all instances of Text, Paragraph and Heading and replace `colorTheme` with `color`.
|
|
208
|
+
> - Replace `size="small"` with `size="xs"`. (If you already replaced sizing with new sizes, you have to search for `size="sm"`.)
|
|
209
|
+
|
|
210
|
+
### List and ListItem
|
|
211
|
+
|
|
212
|
+
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.
|
|
213
|
+
|
|
214
|
+
> #### What to do?
|
|
215
|
+
> - Search all instances of List and ListItem and replace `colorTheme` with `bulletColor`.
|
|
216
|
+
> - Search for all `bulletColor` props and change `darkest` to `primary`, `dark` to `secondary` etc. (see the section Colors)
|
|
108
217
|
|
|
109
218
|
## 🔼 Migration guide from v3 to v4
|
|
110
219
|
|