@semcore/feedback-form 5.1.1 → 5.1.2

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 (3) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +65 -80
  3. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  CHANGELOG.md standards are inspired by [keepachangelog.com](https://keepachangelog.com/en/1.0.0/).
4
4
 
5
+ ## [5.1.2] - 2022-07-07
6
+
7
+ ### Changed
8
+
9
+ - Version patch update due to children dependencies update (`@semcore/button` [4.0.6 ~> 4.0.7], `@semcore/utils` [3.33.0 ~> 3.34.0]).
10
+
5
11
  ## [5.1.1] - 2022-06-28
6
12
 
7
13
  ### Fixed
package/README.md CHANGED
@@ -1,82 +1,67 @@
1
- ```js
2
- import React from 'react';
3
- import Link from '@semcore/link';
4
- import Input from '@semcore/input';
5
- import Textarea from '@semcore/textarea';
6
- import Checkbox from '@semcore/checkbox';
7
- import Chat from '@semcore/icon/Chat/m';
8
- import Dropdown from '@semcore/dropdown';
1
+ # @semcore/feedback-form
2
+
3
+ [![version](https://img.shields.io/npm/v/@semcore/feedback-form.svg)](https://www.npmjs.com/@semcore/feedback-form)
4
+ [![downloads](https://img.shields.io/npm/dt/@semcore/feedback-form.svg)](https://www.npmjs.com/package/@semcore/feedback-form)
5
+ [![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://github.com/semrush/intergalactic/blob/master/LICENSE)
6
+
7
+ > This component is part of the Intergalactic design system
8
+
9
+ ### 📖 [Component documentation](https://developer.semrush.com/intergalactic/components/feedback-form/)
10
+
11
+ ### 🏠 [Design system](https://developer.semrush.com/intergalactic/)
12
+
13
+ ## Install
14
+
15
+ ```sh
16
+ npm install @semcore/ui
17
+ ```
18
+
19
+ ## Usage
20
+
21
+ ```jsx
22
+ import FeedbackForm from '@semcore/ui/feedback-form';
23
+ ```
24
+
25
+ <details>
26
+ <summary>Alternative installation and use</summary>
27
+
28
+ **We do not recommend this usage path due to possible dependency and update issues.**
29
+
30
+ ### Install
31
+
32
+ You can only install one package from the design system
33
+
34
+ ```sh
35
+ npm install @semcore/feedback-form @semcore/core
36
+ ```
37
+
38
+ `@semcore/core` - _is the basic package by which we create our components, and it contains all of the common logic
39
+ of the components that is discussed below. There should only be one version of the package in the project._
40
+
41
+ ### Usage
42
+
43
+ You can use the package the same way but without `/ui/` in the import path.
44
+
45
+ </details>
46
+
47
+ ```jsx
9
48
  import FeedbackForm from '@semcore/feedback-form';
10
- import { Box } from '@semcore/flex-box';
11
- import { Small } from '@semcore/typography';
12
-
13
- import If from '@semcore/utils/lib/if';
14
-
15
- class MyFeedback extends React.PureComponent {
16
- render() {
17
- const validateDescription = FeedbackForm.validate.description(
18
- `Your feedback must contain at least 3 words (10 characters).`,
19
- );
20
- const validateEmail = FeedbackForm.validate.email(`Please enter valid email.`);
21
-
22
- return (
23
- <Dropdown>
24
- <Dropdown.Trigger>
25
- <Link before={<Chat />}>Send feedback</Link>
26
- </Dropdown.Trigger>
27
- <Dropdown.Popper>
28
- {({ changeVisible }) => (
29
- <FeedbackForm onSubmit={(data) => console.log(data)}>
30
- {({ submitSucceeded }) => (
31
- <React.Fragment>
32
- <If condition={submitSucceeded}>
33
- <FeedbackForm.Success>Thank you for your feedback!</FeedbackForm.Success>
34
- </If>
35
- <If condition={!submitSucceeded}>
36
- <FeedbackForm.Item
37
- name="feedback"
38
- tag={Textarea}
39
- validate={validateDescription}
40
- fullWidth
41
- autoFocus
42
- placeholder="Please tell us your suggestion or report an issue"
43
- />
44
- <FeedbackForm.Item
45
- name="email"
46
- tag={Input}
47
- type="email"
48
- validate={validateEmail}
49
- placeholder="Reply-to email"
50
- />
51
- <Box mt={-2} mb={4} mx={4}>
52
- <Small>
53
- We will only use this email to respond to you on your feedback.{' '}
54
- <Link href="#">Privacy Policy</Link>
55
- </Small>
56
- </Box>
57
- <FeedbackForm.Item name="needHelp" type="checkbox">
58
- {({ input }) => (
59
- <Checkbox {...input} size="s">
60
- I need help, please contact me
61
- </Checkbox>
62
- )}
63
- </FeedbackForm.Item>
64
- <Box m={4}>
65
- <FeedbackForm.Submit>Send feedback</FeedbackForm.Submit>
66
- <FeedbackForm.Cancel onClick={() => changeVisible(false)}>
67
- Cancel
68
- </FeedbackForm.Cancel>
69
- </Box>
70
- </If>
71
- </React.Fragment>
72
- )}
73
- </FeedbackForm>
74
- )}
75
- </Dropdown.Popper>
76
- </Dropdown>
77
- );
78
- }
79
- }
80
-
81
- export default MyFeedback;
82
49
  ```
50
+
51
+ ## 👤 Author
52
+
53
+ [UI-kit team](https://github.com/semrush/intergalactic/blob/master/MAINTAINERS) and [others ❤️](https://github.com/semrush/intergalactic/graphs/contributors)
54
+
55
+ ## 🤝 Contributing
56
+
57
+ Contributions, issues and feature requests are welcome!
58
+
59
+ Feel free to check [issues page](https://github.com/semrush/intergalactic/issues). You can also take a look at the [contributing guide](https://github.com/semrush/intergalactic/blob/master/CONTRIBUTING.md).
60
+
61
+ ## Show your support
62
+
63
+ Give a ⭐️ if this project helped you!
64
+
65
+ ## 📝 License
66
+
67
+ This project is [MIT](https://github.com/semrush/intergalactic/blob/master/LICENSE) licensed.
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@semcore/feedback-form",
3
3
  "description": "SEMRush Feedback Form Component",
4
- "version": "5.1.1",
4
+ "version": "5.1.2",
5
5
  "main": "lib/cjs/index.js",
6
6
  "module": "lib/es6/index.js",
7
7
  "typings": "lib/types/index.d.ts",
8
8
  "sideEffects": false,
9
- "author": "Roman Lysov <r.lysov@semrush.com>",
9
+ "author": "UI-kit team <ui-kit-team@semrush.com>",
10
10
  "license": "MIT",
11
11
  "scripts": {
12
12
  "build": "build --source=js",