@qoretechnologies/reqore 0.30.5 → 0.30.6

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 (232) hide show
  1. package/CODE_OF_CONDUCT.md +105 -0
  2. package/CONTRIBUTING.MD +78 -0
  3. package/LICENSE +1 -1
  4. package/README.md +44 -2
  5. package/SECURITY.md +5 -0
  6. package/__tests__/collection.test.tsx +1 -1
  7. package/__tests__/{control_group.test.tsx → control_group.text.tsx} +2 -4
  8. package/__tests__/modal.test.tsx +2 -74
  9. package/__tests__/panel.test.tsx +24 -96
  10. package/__tests__/popover.test.tsx +2 -24
  11. package/__tests__/tabs.test.tsx +0 -75
  12. package/dist/components/Button/index.d.ts +2 -7
  13. package/dist/components/Button/index.d.ts.map +1 -1
  14. package/dist/components/Button/index.js +20 -30
  15. package/dist/components/Button/index.js.map +1 -1
  16. package/dist/components/Checkbox/index.d.ts.map +1 -1
  17. package/dist/components/Checkbox/index.js +3 -6
  18. package/dist/components/Checkbox/index.js.map +1 -1
  19. package/dist/components/Collection/index.d.ts +2 -7
  20. package/dist/components/Collection/index.d.ts.map +1 -1
  21. package/dist/components/Collection/index.js +53 -57
  22. package/dist/components/Collection/index.js.map +1 -1
  23. package/dist/components/Collection/item.d.ts +5 -5
  24. package/dist/components/Collection/item.d.ts.map +1 -1
  25. package/dist/components/Collection/item.js +4 -15
  26. package/dist/components/Collection/item.js.map +1 -1
  27. package/dist/components/Columns/column.d.ts.map +1 -1
  28. package/dist/components/Columns/column.js +1 -1
  29. package/dist/components/Columns/column.js.map +1 -1
  30. package/dist/components/ControlGroup/index.d.ts +4 -21
  31. package/dist/components/ControlGroup/index.d.ts.map +1 -1
  32. package/dist/components/ControlGroup/index.js +55 -250
  33. package/dist/components/ControlGroup/index.js.map +1 -1
  34. package/dist/components/Drawer/index.d.ts +3 -3
  35. package/dist/components/Drawer/index.d.ts.map +1 -1
  36. package/dist/components/Drawer/index.js +16 -27
  37. package/dist/components/Drawer/index.js.map +1 -1
  38. package/dist/components/Dropdown/index.d.ts +0 -1
  39. package/dist/components/Dropdown/index.d.ts.map +1 -1
  40. package/dist/components/Dropdown/index.js +2 -2
  41. package/dist/components/Dropdown/index.js.map +1 -1
  42. package/dist/components/Dropdown/list.d.ts +3 -3
  43. package/dist/components/Dropdown/list.d.ts.map +1 -1
  44. package/dist/components/Effect/index.d.ts +10 -10
  45. package/dist/components/Effect/index.d.ts.map +1 -1
  46. package/dist/components/Effect/index.js +6 -7
  47. package/dist/components/Effect/index.js.map +1 -1
  48. package/dist/components/Icon/index.d.ts +6 -5
  49. package/dist/components/Icon/index.d.ts.map +1 -1
  50. package/dist/components/Icon/index.js +7 -14
  51. package/dist/components/Icon/index.js.map +1 -1
  52. package/dist/components/Input/index.d.ts +0 -2
  53. package/dist/components/Input/index.d.ts.map +1 -1
  54. package/dist/components/Input/index.js +4 -10
  55. package/dist/components/Input/index.js.map +1 -1
  56. package/dist/components/InternalPopover/index.d.ts.map +1 -1
  57. package/dist/components/InternalPopover/index.js +10 -12
  58. package/dist/components/InternalPopover/index.js.map +1 -1
  59. package/dist/components/Menu/index.d.ts.map +1 -1
  60. package/dist/components/Menu/index.js +1 -1
  61. package/dist/components/Menu/index.js.map +1 -1
  62. package/dist/components/Message/index.d.ts +0 -2
  63. package/dist/components/Message/index.d.ts.map +1 -1
  64. package/dist/components/Message/index.js +2 -2
  65. package/dist/components/Message/index.js.map +1 -1
  66. package/dist/components/MultiSelect/index.d.ts +2 -2
  67. package/dist/components/MultiSelect/index.d.ts.map +1 -1
  68. package/dist/components/MultiSelect/index.js +10 -10
  69. package/dist/components/MultiSelect/index.js.map +1 -1
  70. package/dist/components/Notifications/index.d.ts +1 -1
  71. package/dist/components/Notifications/index.d.ts.map +1 -1
  72. package/dist/components/Notifications/notification.d.ts +1 -1
  73. package/dist/components/Notifications/notification.d.ts.map +1 -1
  74. package/dist/components/Panel/index.d.ts +6 -13
  75. package/dist/components/Panel/index.d.ts.map +1 -1
  76. package/dist/components/Panel/index.js +44 -78
  77. package/dist/components/Panel/index.js.map +1 -1
  78. package/dist/components/Popover/index.d.ts +2 -1
  79. package/dist/components/Popover/index.d.ts.map +1 -1
  80. package/dist/components/Popover/index.js +2 -2
  81. package/dist/components/Popover/index.js.map +1 -1
  82. package/dist/components/Spacer/index.d.ts +0 -2
  83. package/dist/components/Spacer/index.d.ts.map +1 -1
  84. package/dist/components/Spacer/index.js +7 -29
  85. package/dist/components/Spacer/index.js.map +1 -1
  86. package/dist/components/Table/header.js +2 -2
  87. package/dist/components/Table/header.js.map +1 -1
  88. package/dist/components/Table/headerCell.js +2 -2
  89. package/dist/components/Table/headerCell.js.map +1 -1
  90. package/dist/components/Table/helpers.d.ts +2 -3
  91. package/dist/components/Table/helpers.d.ts.map +1 -1
  92. package/dist/components/Table/helpers.js +3 -6
  93. package/dist/components/Table/helpers.js.map +1 -1
  94. package/dist/components/Table/index.d.ts +3 -4
  95. package/dist/components/Table/index.d.ts.map +1 -1
  96. package/dist/components/Table/index.js.map +1 -1
  97. package/dist/components/Table/row.d.ts +5 -0
  98. package/dist/components/Table/row.d.ts.map +1 -1
  99. package/dist/components/Table/row.js +7 -3
  100. package/dist/components/Table/row.js.map +1 -1
  101. package/dist/components/Tabs/content.d.ts +1 -3
  102. package/dist/components/Tabs/content.d.ts.map +1 -1
  103. package/dist/components/Tabs/content.js +3 -8
  104. package/dist/components/Tabs/content.js.map +1 -1
  105. package/dist/components/Tabs/index.d.ts +1 -4
  106. package/dist/components/Tabs/index.d.ts.map +1 -1
  107. package/dist/components/Tabs/index.js +4 -12
  108. package/dist/components/Tabs/index.js.map +1 -1
  109. package/dist/components/Tabs/item.d.ts +0 -1
  110. package/dist/components/Tabs/item.d.ts.map +1 -1
  111. package/dist/components/Tabs/item.js +7 -7
  112. package/dist/components/Tabs/item.js.map +1 -1
  113. package/dist/components/Tabs/list.d.ts +1 -1
  114. package/dist/components/Tabs/list.d.ts.map +1 -1
  115. package/dist/components/Tabs/list.js +6 -7
  116. package/dist/components/Tabs/list.js.map +1 -1
  117. package/dist/components/Tag/group.d.ts +2 -2
  118. package/dist/components/Tag/group.d.ts.map +1 -1
  119. package/dist/components/Tag/group.js +8 -7
  120. package/dist/components/Tag/group.js.map +1 -1
  121. package/dist/components/Tag/index.d.ts +2 -6
  122. package/dist/components/Tag/index.d.ts.map +1 -1
  123. package/dist/components/Tag/index.js +12 -24
  124. package/dist/components/Tag/index.js.map +1 -1
  125. package/dist/components/Tree/index.js +1 -1
  126. package/dist/components/Tree/index.js.map +1 -1
  127. package/dist/constants/animations.js +1 -1
  128. package/dist/constants/sizes.d.ts +2 -2
  129. package/dist/constants/sizes.d.ts.map +1 -1
  130. package/dist/constants/sizes.js +10 -10
  131. package/dist/constants/sizes.js.map +1 -1
  132. package/dist/constants/theme.d.ts +1 -1
  133. package/dist/constants/theme.d.ts.map +1 -1
  134. package/dist/containers/PopoverProvider.d.ts.map +1 -1
  135. package/dist/containers/PopoverProvider.js +8 -10
  136. package/dist/containers/PopoverProvider.js.map +1 -1
  137. package/dist/containers/ReqoreProvider.d.ts.map +1 -1
  138. package/dist/containers/ReqoreProvider.js +2 -4
  139. package/dist/containers/ReqoreProvider.js.map +1 -1
  140. package/dist/containers/UIProvider.d.ts +0 -7
  141. package/dist/containers/UIProvider.d.ts.map +1 -1
  142. package/dist/containers/UIProvider.js.map +1 -1
  143. package/dist/context/ReqoreContext.d.ts +0 -2
  144. package/dist/context/ReqoreContext.d.ts.map +1 -1
  145. package/dist/context/ReqoreContext.js.map +1 -1
  146. package/dist/helpers/colors.d.ts +1 -1
  147. package/dist/helpers/colors.d.ts.map +1 -1
  148. package/dist/helpers/colors.js +2 -6
  149. package/dist/helpers/colors.js.map +1 -1
  150. package/dist/helpers/utils.d.ts +0 -3
  151. package/dist/helpers/utils.d.ts.map +1 -1
  152. package/dist/helpers/utils.js +2 -17
  153. package/dist/helpers/utils.js.map +1 -1
  154. package/dist/hooks/useLatestZIndex.js +2 -2
  155. package/dist/hooks/useLatestZIndex.js.map +1 -1
  156. package/dist/hooks/usePopover.d.ts +0 -1
  157. package/dist/hooks/usePopover.d.ts.map +1 -1
  158. package/dist/hooks/usePopover.js +6 -8
  159. package/dist/hooks/usePopover.js.map +1 -1
  160. package/dist/styles.d.ts +0 -1
  161. package/dist/styles.d.ts.map +1 -1
  162. package/dist/styles.js +5 -6
  163. package/dist/styles.js.map +1 -1
  164. package/dist/types/global.d.ts +1 -27
  165. package/dist/types/global.d.ts.map +1 -1
  166. package/dist/types/icons.d.ts +1 -1
  167. package/dist/types/icons.d.ts.map +1 -1
  168. package/package.json +1 -1
  169. package/public/logo-dark.png +0 -0
  170. package/public/logo.png +0 -0
  171. package/public/q-symbol.png +0 -0
  172. package/public/qoreLogo-dark.png +0 -0
  173. package/public/qoreLogo.png +0 -0
  174. package/src/components/Button/index.tsx +34 -79
  175. package/src/components/Checkbox/index.tsx +2 -3
  176. package/src/components/Collection/index.tsx +60 -93
  177. package/src/components/Collection/item.tsx +9 -29
  178. package/src/components/Columns/column.tsx +0 -1
  179. package/src/components/ControlGroup/index.tsx +104 -449
  180. package/src/components/Drawer/index.tsx +27 -28
  181. package/src/components/Dropdown/index.tsx +1 -3
  182. package/src/components/Effect/index.tsx +14 -22
  183. package/src/components/Icon/index.tsx +62 -81
  184. package/src/components/Input/index.tsx +3 -8
  185. package/src/components/InternalPopover/index.tsx +126 -131
  186. package/src/components/Menu/index.tsx +1 -7
  187. package/src/components/Message/index.tsx +1 -9
  188. package/src/components/MultiSelect/index.tsx +188 -180
  189. package/src/components/Panel/index.tsx +100 -227
  190. package/src/components/Popover/index.tsx +3 -1
  191. package/src/components/Spacer/index.tsx +14 -63
  192. package/src/components/Table/header.tsx +2 -2
  193. package/src/components/Table/headerCell.tsx +2 -2
  194. package/src/components/Table/helpers.ts +6 -12
  195. package/src/components/Table/index.tsx +0 -1
  196. package/src/components/Table/row.tsx +7 -2
  197. package/src/components/Tabs/content.tsx +3 -11
  198. package/src/components/Tabs/index.tsx +3 -14
  199. package/src/components/Tabs/item.tsx +5 -28
  200. package/src/components/Tabs/list.tsx +3 -7
  201. package/src/components/Tag/group.tsx +12 -6
  202. package/src/components/Tag/index.tsx +35 -69
  203. package/src/components/Tree/index.tsx +1 -1
  204. package/src/constants/animations.ts +1 -1
  205. package/src/constants/sizes.ts +10 -10
  206. package/src/containers/PopoverProvider.tsx +8 -11
  207. package/src/containers/ReqoreProvider.tsx +35 -40
  208. package/src/containers/UIProvider.tsx +0 -7
  209. package/src/context/ReqoreContext.tsx +0 -2
  210. package/src/helpers/colors.ts +2 -8
  211. package/src/helpers/utils.ts +0 -18
  212. package/src/hooks/useLatestZIndex.ts +2 -2
  213. package/src/hooks/usePopover.tsx +6 -9
  214. package/src/mock/collectionData.tsx +2 -33
  215. package/src/stories/Button/Button.stories.tsx +7 -72
  216. package/src/stories/Checkbox/Checkbox.stories.tsx +3 -6
  217. package/src/stories/Collection/Collection.stories.tsx +2 -18
  218. package/src/stories/ControlGroup/ControlGroup.stories.tsx +33 -282
  219. package/src/stories/Drawer/Drawer.stories.tsx +3 -70
  220. package/src/stories/Dropdown/Dropdown.stories.tsx +3 -13
  221. package/src/stories/Icon/Icon.stories.tsx +0 -1
  222. package/src/stories/Input/Input.stories.tsx +3 -5
  223. package/src/stories/Menu/Menu.stories.tsx +0 -2
  224. package/src/stories/Message/Message.stories.tsx +0 -7
  225. package/src/stories/Panel/Panel.stories.tsx +13 -147
  226. package/src/stories/Popover/Popover.stories.tsx +82 -88
  227. package/src/stories/Tabs/Tabs.stories.tsx +15 -33
  228. package/src/stories/Tag/Tag.stories.tsx +3 -23
  229. package/src/stories/TextArea/TextArea.stories.tsx +3 -3
  230. package/src/styles.ts +0 -6
  231. package/src/types/global.ts +0 -28
  232. package/tests.json +1 -1
@@ -0,0 +1,105 @@
1
+ <div align="center">
2
+ <br><br><br>
3
+ <img src="./public/qoreLogo.png" alt="Unstated Logo" width="500">
4
+ <br><br><br>
5
+ </div>
6
+
7
+ # Code of Conduct
8
+
9
+ Qore Technologies use [Contributor Covenant v2.0](https://contributor-covenant.org/version/2/0/code_of_conduct) as their code of conduct. The full text is included [below](#contributor-covenant-code-of-conduct-v20) in English, and [translations](https://www.contributor-covenant.org/translations) are available on the Contributor Covenant website.
10
+
11
+ ## Commitment
12
+
13
+ All recipients of reports commit to:
14
+
15
+ - maintain the confidentiality with regard to the reporter and victim of an incident
16
+
17
+ ## Report an issue in a project
18
+
19
+ 1. To report an issue in one of our projects, please follow the security guidelines from that repository.
20
+
21
+ ## More Info
22
+
23
+ For more information, refer to the full
24
+ [Contributor covenant code of conduct page](https://contributor-covenant.org/version/2/0/code_of_conduct).
25
+
26
+ ---
27
+
28
+ ## Contributor Covenant Code of Conduct v2.0
29
+
30
+ ### Our Pledge
31
+
32
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
33
+
34
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
35
+
36
+ ### Our Standards
37
+
38
+ Examples of behavior that contributes to a positive environment for our community include:
39
+
40
+ * Demonstrating empathy and kindness toward other people
41
+ * Being respectful of differing opinions, viewpoints, and experiences
42
+ * Giving and gracefully accepting constructive feedback
43
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
44
+ * Focusing on what is best not just for us as individuals, but for the overall community
45
+
46
+ Examples of unacceptable behavior include:
47
+
48
+ * The use of sexualized language or imagery, and sexual attention or advances of any kind
49
+ * Trolling, insulting or derogatory comments, and personal or political attacks
50
+ * Public or private harassment
51
+ * Publishing others' private information, such as a physical or email address, without their explicit permission
52
+ * Other conduct which could reasonably be considered inappropriate in a professional setting
53
+
54
+ ### Enforcement Responsibilities
55
+
56
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
57
+
58
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
59
+
60
+ ### Scope
61
+
62
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
63
+
64
+ ### Enforcement
65
+
66
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at the email addresses listed above in the [Reporting](#report-an-issue-in-a-project) and [Escalation](#escalate-an-issue) sections. All complaints will be reviewed and investigated promptly and fairly.
67
+
68
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
69
+
70
+ ### Enforcement Guidelines
71
+
72
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
73
+
74
+ #### 1. Correction
75
+
76
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
77
+
78
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
79
+
80
+ #### 2. Warning
81
+
82
+ **Community Impact**: A violation through a single incident or series of actions.
83
+
84
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
85
+
86
+ #### 3. Temporary Ban
87
+
88
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
89
+
90
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
91
+
92
+ #### 4. Permanent Ban
93
+
94
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
95
+
96
+ **Consequence**: A permanent ban from any sort of public interaction within the project community.
97
+
98
+ ### Attribution
99
+
100
+ This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.0, available at [contributor-covenant.org/version/2/0/code_of_conduct](https://www.contributor-covenant.org/version/2/0/code_of_conduct).
101
+
102
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
103
+
104
+ For answers to common questions about this code of conduct, see the FAQ at
105
+ [contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at [contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).
@@ -0,0 +1,78 @@
1
+ <div align="center">
2
+ <br><br><br>
3
+ <img src="./public/qoreLogo.png" alt="Unstated Logo" width="500">
4
+ <br><br><br>
5
+ </div>
6
+
7
+ # Contributing to Qore Technologies
8
+
9
+ > First off, thanks for taking the time to contribute!
10
+
11
+ Contributions are always welcome. Before contributing please read the
12
+ [code of conduct](CODE_OF_CONDUCT.md) &
13
+ [search the issue tracker](https://github.com/qoretechnologies/qorus-ui/issues) your issue may have already been discussed or fixed in `master`. To contribute,
14
+ [fork](https://help.github.com/articles/fork-a-repo/) QorusToolkit, commit your changes,
15
+ & [send a pull request](https://help.github.com/articles/using-pull-requests/).
16
+
17
+ We put together a set of guidelines for contributing to Qore Technologies and it's packages, which are hosted in the [Qore Technologies Organization](https://github.com/qoretechnologies/reqore) on GitHub. The provided guidelines are not rules but recommendations. Use your best judgement, and feel free to propose changes to this document with a pull request.
18
+
19
+ ## We host our open-source on Github
20
+
21
+ We use github to host our open-source code, to track issues and feature requests, as well as accept pull requests.
22
+
23
+ > We Use [Github Flow](https://guides.github.com/introduction/flow/index.html) for code contributions
24
+
25
+ ## How to contribute
26
+
27
+ Pull requests are the best way to propose changes to the codebase (we use [Github Flow](https://guides.github.com/introduction/flow/index.html)). We actively welcome your pull requests:
28
+
29
+ 1. Fork the repo and create your branch from `develop`.
30
+ 2. If you've added code that should be tested, add tests.
31
+ 3. If you've changed APIs, update the documentation.
32
+ 4. Ensure the test suite passes.
33
+ 5. Make sure your code lints.
34
+ 6. Issue that pull request!
35
+
36
+ ## Any contributions you make will be under the MIT Software License
37
+
38
+ In short, when you submit code changes, your submissions are understood to be under the same [MIT License](http://choosealicense.com/licenses/mit/) that covers the project. Feel free to contact the maintainers if that's a concern.
39
+
40
+ ## Report bugs using Github's issues
41
+
42
+ We use GitHub issues to track public bugs. Report a bug by opening a new issue on <code>github.com/qoretechnologies/qorus-ui/issues</code> it's that easy!
43
+
44
+ ## Write bug reports with detail, background, and sample code
45
+
46
+ **Great Bug Reports** tend to have:
47
+
48
+ - A quick summary and/or background of a bug
49
+ - Steps to reproduce
50
+ - Be specific!
51
+ - Give sample code if you can.
52
+ - Expected behavior according to your understanding
53
+ - Current behavior which includes the bug
54
+ - Notes (includes, your reasoning behind the problem or steps you tried to solve the bug)
55
+
56
+ We _love_ thorough bug reports so that we can act fast on them.
57
+
58
+ ## Use a Consistent Coding Style
59
+
60
+ > Reference [Facebook's Guidelines](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md)
61
+
62
+ - 2 spaces for indentation rather than tabs
63
+ - 100 character line length
64
+ - Run `npm run lint` to conform to our lint rules
65
+
66
+ ## Community
67
+
68
+ - [GitHub Organization](https://github.com/qoretechnologies) for Official open-source projects
69
+ - [Discord](https://discord.gg/MWUwDKRR) for support, discussion, news and latest release updates
70
+ - [Qore Technologies Website](https://www.qoretechnologies.com)
71
+
72
+ ## License
73
+
74
+ By contributing, you agree that your contributions will be licensed under its MIT License.
75
+
76
+ ## References
77
+
78
+ This document was adapted from the open-source contribution guidelines for Reference [Facebook's Guidelines](https://github.com/facebook/draft-js/blob/a9316a723f9e918afde44dea68b5f9f39b7d9b00/CONTRIBUTING.md)
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2020 Qore Technologies, s.r.o.
3
+ Copyright (c) 2023 Qore Technologies, s.r.o.
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,3 +1,45 @@
1
- # reqore
1
+ <div align="center">
2
+ <br><br><br>
3
+ <img src="./public/logo.png" alt="Unstated Logo" width="500">
4
+ <br><br><br>
5
+ </div>
2
6
 
3
- ReQore is a UI library for Qorus connected apps.
7
+ # @qoretechnologies/reqore
8
+
9
+ Reqore is a UI library based on React which can be used with any React project to provide customized UI experience.
10
+
11
+ - Reqore is a comprehensive library of UI components that features our implementation of Qore Technologies design system
12
+
13
+ ## Installation
14
+
15
+ Before installing, [download and install Node.js](https://nodejs.org/en/download/).
16
+ Latest stable Node.js is required.
17
+
18
+ Install the library using
19
+
20
+ ```console
21
+ $ yarn add @qoretechnologies/reqore
22
+ ```
23
+
24
+ ## Features
25
+
26
+ ## Community
27
+
28
+ - [GitHub Organization](https://github.com/qoretechnologies) for Official open-source projects
29
+ - [Discord](https://discord.gg/T7vgS6nh) for support, discussion, news and latest release updates
30
+
31
+ ## Examples
32
+
33
+ ## Contributing
34
+
35
+ The Qorus-Toolkit project welcomes all constructive contributions. Contributions can be of many forms including bug fixes, enhancements, fixes to documentation, additional tests and more!
36
+
37
+ See the [Contributing Guide](CONTRIBUTING.MD) for more technical details on contributing.
38
+
39
+ ### Security Issues
40
+
41
+ If you discover a security vulnerability in Qorus-Toolkit, please see [Security Policies and Procedures](SECURITY.md).
42
+
43
+ ## License
44
+
45
+ [MIT](LICENSE)
package/SECURITY.md ADDED
@@ -0,0 +1,5 @@
1
+
2
+ # Reporting and Fixing Security Issues
3
+
4
+ Please do not open GitHub issues or pull requests - this makes the problem immediately visible to everyone, including malicious actors. Security issues in Qorus Integration Engine UI can be safely reported via email <b>security@qoretechnologies.com</b>
5
+
@@ -13,7 +13,7 @@ test('Renders basic <Collection /> properly', () => {
13
13
  );
14
14
 
15
15
  expect(document.querySelectorAll('.reqore-collection').length).toBe(1);
16
- expect(document.querySelectorAll('.reqore-collection-item').length).toBe(9);
16
+ expect(document.querySelectorAll('.reqore-collection-item').length).toBe(8);
17
17
  });
18
18
 
19
19
  test('<Collection /> items can be filtered', () => {
@@ -9,18 +9,16 @@ import {
9
9
  ReqoreUIProvider,
10
10
  } from '../src';
11
11
 
12
- test('Renders <ControlGroup /> properly', () => {
12
+ test('Renders <Input /> properly', () => {
13
13
  render(
14
14
  <ReqoreUIProvider>
15
15
  <ReqoreLayoutContent>
16
16
  <ReqoreContent>
17
- <ReqoreControlGroup>
17
+ <ReqoreControlGroup minimal>
18
18
  <ReqoreInput minimal />
19
19
  <ReqoreButton>Hello</ReqoreButton>
20
20
  <ReqoreInput disabled />
21
21
  <ReqoreInput size='big' />
22
- <ReqoreButton>Hello</ReqoreButton>
23
- <ReqoreButton>Hello</ReqoreButton>
24
22
  </ReqoreControlGroup>
25
23
  </ReqoreContent>
26
24
  </ReqoreLayoutContent>
@@ -1,5 +1,5 @@
1
1
  import { act, fireEvent, render, screen } from '@testing-library/react';
2
- import React, { useContext, useState } from 'react';
2
+ import React, { useContext } from 'react';
3
3
  import {
4
4
  ReqoreButton,
5
5
  ReqoreContent,
@@ -7,7 +7,6 @@ import {
7
7
  ReqoreLayoutContent,
8
8
  ReqoreModal,
9
9
  ReqoreUIProvider,
10
- useReqore,
11
10
  } from '../src';
12
11
 
13
12
  test('Renders basic <Modal /> properly', () => {
@@ -95,52 +94,13 @@ const ConfirmButton = ({ confirmFn, cancelFn }) => {
95
94
  );
96
95
  };
97
96
 
98
- const ConfirmButtonFromModal = ({ confirmFn, cancelFn }) => {
99
- const { confirmAction } = useReqore();
100
- const [isDialogOpen, setIsDialogOpen] = useState(false);
101
-
102
- return (
103
- <>
104
- <ReqoreButton
105
- id='dialog'
106
- onClick={() => {
107
- setIsDialogOpen(true);
108
- }}
109
- >
110
- Open Dialog
111
- </ReqoreButton>
112
- {isDialogOpen && (
113
- <ReqoreModal
114
- isOpen
115
- id='confirm'
116
- actions={[
117
- {
118
- label: 'Open Confirm',
119
- id: 'open-confirm',
120
- onClick: () => {
121
- confirmAction({
122
- description: 'Do you really wanna do this?',
123
- onConfirm: () => confirmFn(),
124
- onCancel: () => cancelFn(),
125
- });
126
- },
127
- },
128
- ]}
129
- >
130
- Modal
131
- </ReqoreModal>
132
- )}
133
- </>
134
- );
135
- };
136
-
137
97
  test('Renders confirmation <Modal /> ', () => {
138
98
  const confirmFn = jest.fn();
139
99
  const cancelFn = jest.fn();
140
100
 
141
101
  act(() => {
142
102
  render(
143
- <ReqoreUIProvider options={{ animations: { dialogs: false } }}>
103
+ <ReqoreUIProvider>
144
104
  <ReqoreLayoutContent>
145
105
  <ReqoreContent>
146
106
  <ConfirmButton confirmFn={confirmFn} cancelFn={cancelFn} />
@@ -170,35 +130,3 @@ test('Renders confirmation <Modal /> ', () => {
170
130
 
171
131
  expect(cancelFn).toHaveBeenCalledTimes(2);
172
132
  });
173
-
174
- test('Always renders confirmation <Modal /> properly above a normal modal', () => {
175
- const confirmFn = jest.fn();
176
- const cancelFn = jest.fn();
177
-
178
- act(() => {
179
- render(
180
- <ReqoreUIProvider options={{ animations: { dialogs: false } }}>
181
- <ReqoreLayoutContent>
182
- <ReqoreContent>
183
- <ConfirmButtonFromModal confirmFn={confirmFn} cancelFn={cancelFn} />
184
- </ReqoreContent>
185
- </ReqoreLayoutContent>
186
- </ReqoreUIProvider>
187
- );
188
- });
189
-
190
- fireEvent.click(document.getElementById('dialog')!);
191
- expect(document.querySelectorAll('.reqore-modal').length).toBe(1);
192
-
193
- fireEvent.click(screen.getAllByText('Open Confirm')[0]);
194
- expect(document.querySelectorAll('.reqore-modal').length).toBe(2);
195
- expect(document.querySelectorAll('.reqore-confirmation-modal').length).toBe(1);
196
-
197
- // @ts-ignore
198
- const zIndex = document.querySelectorAll('.reqore-modal')[0].style.zIndex;
199
- // @ts-ignore
200
- const zIndexConfirmation = document.querySelectorAll('.reqore-confirmation-modal')[0].style
201
- .zIndex;
202
-
203
- expect(parseInt(zIndexConfirmation)).toBeGreaterThan(parseInt(zIndex));
204
- });
@@ -100,105 +100,33 @@ test('Renders <Panel /> with actions', () => {
100
100
  const fn = jest.fn();
101
101
 
102
102
  render(
103
- <ReqoreUIProvider>
104
- <ReqoreLayoutContent>
105
- <ReqorePanel
106
- label='Test'
107
- onClose={fn}
108
- actions={[
109
- { label: 'Test' },
110
- { actions: [{ label: 'Deep', value: 'deep' }] },
111
- { as: ReqoreInput },
112
- { label: 'hidden', show: false },
113
- ]}
114
- bottomActions={[
115
- { label: 'Test', position: 'left' },
116
- { actions: [{ label: 'Deep', value: 'deep' }], position: 'right' },
117
- { label: 'hidden', show: false },
118
- ]}
119
- >
120
- {' '}
121
- Panel{' '}
122
- </ReqorePanel>
123
- </ReqoreLayoutContent>
124
- </ReqoreUIProvider>
103
+ <div style={{ width: '1000px' }}>
104
+ <ReqoreUIProvider>
105
+ <ReqoreLayoutContent>
106
+ <ReqorePanel
107
+ label='Test'
108
+ onClose={fn}
109
+ actions={[
110
+ { label: 'Test' },
111
+ { actions: [{ label: 'Deep', value: 'deep' }] },
112
+ { as: ReqoreInput },
113
+ { label: 'hidden', show: false },
114
+ ]}
115
+ bottomActions={[
116
+ { label: 'Test', position: 'left' },
117
+ { actions: [{ label: 'Deep', value: 'deep' }], position: 'right' },
118
+ { label: 'hidden', show: false },
119
+ ]}
120
+ >
121
+ {' '}
122
+ Panel{' '}
123
+ </ReqorePanel>
124
+ </ReqoreLayoutContent>
125
+ </ReqoreUIProvider>
126
+ </div>
125
127
  );
126
128
 
127
129
  expect(document.querySelectorAll('.reqore-button').length).toBe(5);
128
130
  expect(document.querySelectorAll('.reqore-dropdown-control').length).toBe(2);
129
131
  expect(document.querySelectorAll('.reqore-input').length).toBe(1);
130
132
  });
131
-
132
- test('Renders <Panel /> without actions group if all actins are not shown', () => {
133
- const fn = jest.fn();
134
-
135
- render(
136
- <ReqoreUIProvider>
137
- <ReqoreLayoutContent>
138
- <ReqorePanel
139
- label='Test'
140
- actions={[
141
- { label: 'Test', show: false },
142
- { actions: [{ label: 'Deep', value: 'deep' }], show: false },
143
- { as: ReqoreInput, show: false },
144
- { label: 'hidden', show: false },
145
- ]}
146
- >
147
- Panel
148
- </ReqorePanel>
149
- </ReqoreLayoutContent>
150
- </ReqoreUIProvider>
151
- );
152
-
153
- expect(document.querySelectorAll('.reqore-control-group').length).toBe(0);
154
- expect(document.querySelectorAll('.reqore-button').length).toBe(0);
155
- expect(document.querySelectorAll('.reqore-dropdown-control').length).toBe(0);
156
- expect(document.querySelectorAll('.reqore-input').length).toBe(0);
157
- });
158
-
159
- test('Renders <Panel /> without title & bottom actions if all actions are not shown, there is no icon, title & is not collapsible', () => {
160
- render(
161
- <ReqoreUIProvider>
162
- <ReqoreLayoutContent>
163
- <ReqorePanel
164
- actions={[
165
- { label: 'Test', show: false },
166
- { actions: [{ label: 'Deep', value: 'deep' }], show: false },
167
- { as: ReqoreInput, show: false },
168
- { label: 'hidden', show: false },
169
- {
170
- group: [
171
- { label: 'Test 2', show: true },
172
- { label: 'Test 3', show: true },
173
- ],
174
- show: false,
175
- },
176
- ]}
177
- bottomActions={[
178
- { label: 'Test', show: false },
179
- { actions: [{ label: 'Deep', value: 'deep' }], show: false },
180
- { as: ReqoreInput, position: 'right', show: false },
181
- { label: 'hidden', show: false },
182
- {
183
- position: 'right',
184
- group: [
185
- { label: 'Test 2', show: true },
186
- { label: 'Test 3', show: true },
187
- ],
188
- show: false,
189
- },
190
- ]}
191
- >
192
- Panel
193
- </ReqorePanel>
194
- </ReqoreLayoutContent>
195
- </ReqoreUIProvider>
196
- );
197
-
198
- expect(document.querySelectorAll('.reqore-control-group').length).toBe(0);
199
- expect(document.querySelectorAll('.reqore-button').length).toBe(0);
200
- expect(document.querySelectorAll('.reqore-dropdown-control').length).toBe(0);
201
- expect(document.querySelectorAll('.reqore-input').length).toBe(0);
202
- expect(document.querySelectorAll('.reqore-panel-title').length).toBe(0);
203
- expect(document.querySelectorAll('.reqore-panel-bottom-actions').length).toBe(0);
204
- });
@@ -109,9 +109,9 @@ test('Runs callback function', async () => {
109
109
  fireEvent.mouseLeave(screen.getByText('Hover me'));
110
110
  });
111
111
 
112
- test('Shows the popover after a local delay, ignoring global delay', async () => {
112
+ test('Shows the popover after a delay', async () => {
113
113
  render(
114
- <ReqoreUIProvider options={{ tooltips: { delay: 1000 } }}>
114
+ <ReqoreUIProvider>
115
115
  <SimpleContent delay={500} />
116
116
  </ReqoreUIProvider>
117
117
  );
@@ -131,28 +131,6 @@ test('Shows the popover after a local delay, ignoring global delay', async () =>
131
131
  expect(document.querySelectorAll('.reqore-popover-content').length).toBe(0);
132
132
  });
133
133
 
134
- test('Shows the popover after a global delay', async () => {
135
- render(
136
- <ReqoreUIProvider options={{ tooltips: { delay: 1000 } }}>
137
- <SimpleContent />
138
- </ReqoreUIProvider>
139
- );
140
-
141
- fireEvent.mouseEnter(screen.getByText('Hover me'));
142
-
143
- jest.advanceTimersByTime(500);
144
-
145
- expect(document.querySelectorAll('.reqore-popover-content').length).toBe(0);
146
-
147
- jest.advanceTimersByTime(500);
148
-
149
- expect(document.querySelectorAll('.reqore-popover-content').length).toBe(1);
150
-
151
- fireEvent.mouseLeave(screen.getByText('Hover me'));
152
-
153
- expect(document.querySelectorAll('.reqore-popover-content').length).toBe(0);
154
- });
155
-
156
134
  test('Does not show the popover with delay if time not reached', async () => {
157
135
  render(
158
136
  <ReqoreUIProvider>
@@ -35,49 +35,6 @@ test('Renders full <Tabs /> properly', () => {
35
35
  });
36
36
 
37
37
  test('Renders shortened <Tabs /> properly', () => {
38
- const fn = jest.fn();
39
- act(() => {
40
- render(
41
- <ReqoreUIProvider>
42
- <ReqoreLayoutContent>
43
- <ReqoreTabs
44
- _testWidth={300}
45
- onTabChange={fn}
46
- tabs={[
47
- { label: 'Tab 1', icon: 'Home3Line', id: 'tab1' },
48
- { label: 'Tab 2', icon: 'Home3Line', id: 'tab2' },
49
- { label: 'Tab 3', icon: 'Home3Line', id: 'tab3' },
50
- { label: 'Tab 4', icon: 'Home3Line', id: 'tab4' },
51
- { label: 'Tab 5', icon: 'Home3Line', id: 'tab5' },
52
- ]}
53
- >
54
- <ReqoreTabsContent tabId='tab1'>Tab 1 content</ReqoreTabsContent>
55
- <ReqoreTabsContent tabId='tab2'>Tab 2 content</ReqoreTabsContent>
56
- <ReqoreTabsContent tabId='tab3'>Tab 3 content</ReqoreTabsContent>
57
- <ReqoreTabsContent tabId='tab4'>Tab 4 content</ReqoreTabsContent>
58
- <ReqoreTabsContent tabId='tab5'>Tab 5 content</ReqoreTabsContent>
59
- </ReqoreTabs>
60
- </ReqoreLayoutContent>
61
- </ReqoreUIProvider>
62
- );
63
- });
64
-
65
- expect(document.querySelectorAll('.reqore-tabs-list-item').length).toBe(2);
66
- expect(document.querySelectorAll('.reqore-tabs-list-item-menu').length).toBe(1);
67
-
68
- fireEvent.mouseEnter(document.querySelector('.reqore-tabs-list-item-menu')!);
69
-
70
- expect(document.querySelectorAll('.reqore-popover-content').length).toBe(1);
71
- expect(document.querySelectorAll('.reqore-menu').length).toBe(1);
72
- expect(document.querySelectorAll('.reqore-menu-item').length).toBe(4);
73
-
74
- fireEvent.click(document.querySelectorAll('.reqore-menu-item')[0]);
75
-
76
- expect(fn).toBeCalledTimes(1);
77
- expect(fn).toBeCalledWith('tab2');
78
- });
79
-
80
- test('Can select hidden <Tabs /> when shortened', () => {
81
38
  act(() => {
82
39
  render(
83
40
  <ReqoreUIProvider>
@@ -206,38 +163,6 @@ test('Does not change tab and run callback when disabled', () => {
206
163
  expect(document.querySelectorAll('.reqore-tabs-list-item-active').length).toBe(1);
207
164
  });
208
165
 
209
- test('Does not change tab when mounted and active tab is set', () => {
210
- const cb = jest.fn();
211
-
212
- act(() => {
213
- render(
214
- <ReqoreUIProvider>
215
- <ReqoreLayoutContent>
216
- <ReqoreTabs
217
- tabs={[
218
- { label: 'Tab 1', icon: 'Home3Line', id: 'tab1' },
219
- { label: 'Tab 2', icon: 'Home3Line', id: 'tab2' },
220
- { label: 'Tab 3', icon: 'Home3Line', id: 'tab3', disabled: true },
221
- { label: 'Tab 4', icon: 'Home3Line', id: 'tab4' },
222
- { label: 'Tab 5', icon: 'Home3Line', id: 'tab5' },
223
- ]}
224
- activeTab={'tab4'}
225
- onTabChange={cb}
226
- >
227
- <ReqoreTabsContent tabId='tab1'>Tab 1 content</ReqoreTabsContent>
228
- <ReqoreTabsContent tabId='tab2'>Tab 2 content</ReqoreTabsContent>
229
- <ReqoreTabsContent tabId='tab3'>Tab 3 content</ReqoreTabsContent>
230
- <ReqoreTabsContent tabId='tab4'>Tab 4 content</ReqoreTabsContent>
231
- <ReqoreTabsContent tabId='tab5'>Tab 5 content</ReqoreTabsContent>
232
- </ReqoreTabs>
233
- </ReqoreLayoutContent>
234
- </ReqoreUIProvider>
235
- );
236
- });
237
-
238
- expect(cb).not.toHaveBeenCalled();
239
- });
240
-
241
166
  test('Changes tab programatically and runs callback', () => {
242
167
  const cb = jest.fn();
243
168
 
@@ -3,9 +3,9 @@ import { TSizes } from '../../constants/sizes';
3
3
  import { IReqoreCustomTheme, IReqoreTheme } from '../../constants/theme';
4
4
  import { IReqoreDisabled, IReqoreIntent, IReqoreReadOnly, IWithReqoreEffect, IWithReqoreSize, TReqoreTooltipProp } from '../../types/global';
5
5
  import { IReqoreIconName } from '../../types/icons';
6
- import { IReqoreEffect, TReqoreEffectColor, TReqoreHexColor } from '../Effect';
6
+ import { TReqoreEffectColor, TReqoreHexColor } from '../Effect';
7
7
  import { IReqoreTagProps } from '../Tag';
8
- export declare type TReqoreBadge = string | number | IReqoreTagProps;
8
+ export type TReqoreBadge = string | number | IReqoreTagProps;
9
9
  export interface IReqoreButtonProps extends React.HTMLAttributes<HTMLButtonElement>, IReqoreDisabled, IReqoreIntent, IReqoreReadOnly, IWithReqoreEffect {
10
10
  icon?: IReqoreIconName;
11
11
  size?: TSizes;
@@ -22,11 +22,6 @@ export interface IReqoreButtonProps extends React.HTMLAttributes<HTMLButtonEleme
22
22
  description?: string | number;
23
23
  maxWidth?: string;
24
24
  textAlign?: 'left' | 'center' | 'right';
25
- iconColor?: TReqoreEffectColor;
26
- leftIconColor?: TReqoreEffectColor;
27
- rightIconColor?: TReqoreEffectColor;
28
- labelEffect?: IReqoreEffect;
29
- descriptionEffect?: IReqoreEffect;
30
25
  }
31
26
  export interface IReqoreButtonStyle extends Omit<IReqoreButtonProps, 'intent'> {
32
27
  theme: IReqoreTheme;