scorer-ui-kit 1.9.0-beta.2 → 2.0.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/README.md ADDED
@@ -0,0 +1,101 @@
1
+ # SCORER UI KIT LIBRARY
2
+
3
+ SCORER UI KIT is a UI components library created in react for faster web applications development.
4
+
5
+ ## Version 2
6
+
7
+ Our default branch is Version 2 release but we keep a legacy branch available.
8
+ This version provides dark mode, the newest components and tools as well as been up to date with npm dependencies.
9
+
10
+ You can review online a React project example and test some of the components on storybook in the live page
11
+
12
+ https://future-standard.github.io/scorer-ui-kit
13
+
14
+ ## Enabling Dark and Light theme in your project
15
+ You can read an example about how to configure dark and light theme in the [Dark Light Mode Usage document](../../dark_light_mode_usage.md)
16
+
17
+ ## Development
18
+
19
+ If you want to run the project follow the next steps
20
+
21
+ - Clone repository
22
+ ```
23
+ git clone git@github.com:future-standard/scorer-ui-kit.git
24
+ ```
25
+
26
+ - Install with npm version 8 node 16 or above from the root folder
27
+ ```
28
+ npm install
29
+ ```
30
+
31
+ - Use npm dedupe to fix react-refresh difference between Storybook and Example project
32
+ ```
33
+ npm dedupe
34
+ ```
35
+
36
+ - If you want to run the example project, run library workspace first and then the example workspace in a different terminal
37
+
38
+ ```
39
+ // Terminal 1
40
+
41
+ npm start --workspace=packages/ui-lib
42
+ ```
43
+
44
+ ```
45
+ // Terminal 2
46
+
47
+ npm start --workspace=packages/example
48
+ ```
49
+
50
+ - If you want to run the storybook
51
+
52
+ ```
53
+ // Terminal 3
54
+
55
+ npm start --workspace=packages/storybook
56
+ ```
57
+
58
+ ## Contributing
59
+
60
+ This is an open source project, if you are interested in participating please contact [@atomworks](https://github.com/atomworks) or [@JoshLipps](https://github.com/JoshLipps).
61
+
62
+ Theres a list of issues and we recommend to pick one of the tagged Quick Wins as starter.
63
+
64
+ You can make a branch out the main, we don't have a strong preference in the naming of the branch but when submitting these changes please review the PR template.
65
+
66
+
67
+ ## Icons
68
+
69
+ The icons used in this UI Kit are licensed from [Streamline Icons](https://streamlineicons.com/). We are able to provide a limited set in this kit with as per our license agreement. If you wish to extend the icons included in this kit yourself, we highly recommend checking those out if you want to keep a consistent style.
70
+
71
+ We tend to use the regular weighted icons and process them first to ungroup them. Then we use the above command to process them for inclusion in the UI Kit.
72
+
73
+
74
+ ## Image Credits
75
+
76
+ Some stock photos were used as placeholders in this UI Kit. These were sourced through Unsplash.com and we give credit for the following photographs and their photographers.
77
+
78
+ Photo by [Van Thanh](https://unsplash.com/@vanthanh2608?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText) on [Unsplash](https://unsplash.com/s/photos/cafe?utm_source=unsplash&utm_medium=referral&utm_content=creditCopyText)
79
+
80
+
81
+ ## License
82
+
83
+ The Scorer UI Kit is released under the [MIT license](../../LICENSE.md).
84
+
85
+ Please note however that the icon set included in this software is included under license and remains property of Webalys LLC. These icons can be used only in the context of this open source project. For more information regarding this license, see [Streamline Icons Premium License](https://help.streamlineicons.com/license-premium).
86
+
87
+ ## Release
88
+ 1. Update the version in package.json in this ui-lib folder and commit it. (this can done on a branch and then merged)
89
+ 2. Add a release tag with the following format: vXX.XX.XX or vXX.XX.XX-beta.x(for beta) - this should match the package.json version
90
+ 3. Push the tag to Github (this should cause the release)
91
+
92
+ ```
93
+ // Updating to v1.5.2
94
+
95
+ git commit -m "Bump 1.5.2"
96
+ grep version package.json
97
+ ~ "version": "1.5.2",
98
+ git tag v1.5.2
99
+ git push origin v1.5.2
100
+ ```
101
+
package/dist/index.js CHANGED
@@ -3183,55 +3183,58 @@ var FeedbackMessage = styled__default.div(_templateObject5$5 || (_templateObject
3183
3183
  var theme = _ref2.theme;
3184
3184
  return theme.typography.form.feedback.message;
3185
3185
  });
3186
- var FeedbackIcon = styled__default.div(_templateObject6$3 || (_templateObject6$3 = _taggedTemplateLiteralLoose(["\n flex: 0 0 40px;\n width: 40px;\n display: flex;\n justify-content:center;\n align-items:center;\n"])));
3187
- var StyledInput = styled__default.input(_templateObject7$3 || (_templateObject7$3 = _taggedTemplateLiteralLoose(["\n ", ";\n\n ", ";\n\n height: 100%;\n width: 100%;\n border-radius: 3px;\n\n padding: 0 15px 0 15px;\n box-sizing: border-box;\n outline: none;\n\n ", ";\n"])), removeAutoFillStyle, function (_ref3) {
3188
- var theme = _ref3.theme,
3189
- fieldState = _ref3.fieldState;
3186
+ var FeedbackIcon = styled__default.div(_templateObject6$3 || (_templateObject6$3 = _taggedTemplateLiteralLoose(["\n flex: 0 0 40px;\n width: 40px;\n display: flex;\n justify-content:center;\n align-items:center;\n\n ", " {\n [stroke]{\n stroke: ", ";\n }\n }\n"])), IconWrapper, function (_ref3) {
3187
+ var theme = _ref3.theme;
3188
+ return theme.colors.pureBase;
3189
+ });
3190
+ var StyledInput = styled__default.input(_templateObject7$3 || (_templateObject7$3 = _taggedTemplateLiteralLoose(["\n ", ";\n\n ", ";\n\n height: 100%;\n width: 100%;\n border-radius: 3px;\n\n padding: 0 15px 0 15px;\n box-sizing: border-box;\n outline: none;\n\n ", ";\n"])), removeAutoFillStyle, function (_ref4) {
3191
+ var theme = _ref4.theme,
3192
+ fieldState = _ref4.fieldState;
3190
3193
  return styled.css(_templateObject8$2 || (_templateObject8$2 = _taggedTemplateLiteralLoose(["\n min-height: ", ";\n font-family: ", ";\n border: 1px solid ", ";\n "])), theme.dimensions.form.input.height, theme.fontFamily.data, theme.styles.form.input[fieldState].normal.borderColor);
3191
- }, function (_ref4) {
3192
- var typography = _ref4.theme.typography;
3194
+ }, function (_ref5) {
3195
+ var typography = _ref5.theme.typography;
3193
3196
  return styled.css(_templateObject9$2 || (_templateObject9$2 = _taggedTemplateLiteralLoose(["\n ", ";\n &::placeholder {\n ", ";\n }\n "])), typography.form.input.value.normal, typography.form.input.placeholder.normal);
3194
3197
  });
3195
- var InputContainer = styled__default.div(_templateObject10$2 || (_templateObject10$2 = _taggedTemplateLiteralLoose(["\n\n flex: 1;\n position: relative;\n\n ", "\n\n"])), function (_ref5) {
3196
- var hasAction = _ref5.hasAction;
3198
+ var InputContainer = styled__default.div(_templateObject10$2 || (_templateObject10$2 = _taggedTemplateLiteralLoose(["\n\n flex: 1;\n position: relative;\n\n ", "\n\n"])), function (_ref6) {
3199
+ var hasAction = _ref6.hasAction;
3197
3200
  return hasAction && styled.css(_templateObject11$1 || (_templateObject11$1 = _taggedTemplateLiteralLoose(["\n ", "{\n padding-right: 60px;\n\n // Used to control password manager injection.\n background-position: calc(100% - 50px) 50% !important;\n }\n "])), StyledInput);
3198
3201
  });
3199
- var Container$2 = styled__default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteralLoose(["\n display: flex;\n position: relative;\n\n ", "{\n ", ";\n\n &:focus {}\n\n ", "\n }\n\n ", " {\n background: ", ";\n border-color: ", ";\n\n ", "\n }\n\n &:focus-within ", " {\n ", ";\n }\n\n"])), StyledInput, function (_ref6) {
3200
- var theme = _ref6.theme,
3201
- fieldState = _ref6.fieldState;
3202
+ var Container$2 = styled__default.div(_templateObject12 || (_templateObject12 = _taggedTemplateLiteralLoose(["\n display: flex;\n position: relative;\n\n ", "{\n ", ";\n\n &:focus {}\n\n ", "\n }\n\n ", " {\n background: ", ";\n border-color: ", ";\n\n ", "\n }\n\n &:focus-within ", " {\n ", ";\n }\n\n"])), StyledInput, function (_ref7) {
3203
+ var theme = _ref7.theme,
3204
+ fieldState = _ref7.fieldState;
3202
3205
  return theme.styles.form.input[fieldState].normal;
3203
- }, function (_ref7) {
3204
- var fieldState = _ref7.fieldState;
3206
+ }, function (_ref8) {
3207
+ var fieldState = _ref8.fieldState;
3205
3208
  return ['default', 'disabled'].indexOf(fieldState) === -1 && styled.css(_templateObject13 || (_templateObject13 = _taggedTemplateLiteralLoose(["\n border-top-right-radius: 0px;\n border-bottom-right-radius: 0px;\n "])));
3206
- }, FeedbackContainer, function (_ref8) {
3207
- var theme = _ref8.theme,
3208
- fieldState = _ref8.fieldState;
3209
- return theme.styles.form.input[fieldState].normal.borderColor;
3210
- }, function (_ref9) {
3209
+ }, FeedbackContainer, function (_ref9) {
3211
3210
  var theme = _ref9.theme,
3212
3211
  fieldState = _ref9.fieldState;
3213
3212
  return theme.styles.form.input[fieldState].normal.borderColor;
3214
3213
  }, function (_ref10) {
3215
- var fieldState = _ref10.fieldState;
3214
+ var theme = _ref10.theme,
3215
+ fieldState = _ref10.fieldState;
3216
+ return theme.styles.form.input[fieldState].normal.borderColor;
3217
+ }, function (_ref11) {
3218
+ var fieldState = _ref11.fieldState;
3216
3219
  return ['default', 'disabled'].indexOf(fieldState) !== -1 && styled.css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteralLoose(["\n display:none;\n "])));
3217
- }, StyledInput, function (_ref11) {
3218
- var theme = _ref11.theme,
3219
- fieldState = _ref11.fieldState;
3220
+ }, StyledInput, function (_ref12) {
3221
+ var theme = _ref12.theme,
3222
+ fieldState = _ref12.fieldState;
3220
3223
  return theme.styles.form.input[fieldState].focused;
3221
3224
  });
3222
3225
 
3223
- var Input = function Input(_ref12) {
3224
- var _ref12$type = _ref12.type,
3225
- type = _ref12$type === void 0 ? 'text' : _ref12$type,
3226
- _ref12$placeholder = _ref12.placeholder,
3227
- placeholder = _ref12$placeholder === void 0 ? '' : _ref12$placeholder,
3228
- defaultValue = _ref12.defaultValue,
3229
- _ref12$fieldState = _ref12.fieldState,
3230
- fieldState = _ref12$fieldState === void 0 ? 'default' : _ref12$fieldState,
3231
- feedbackMessage = _ref12.feedbackMessage,
3232
- actionCallback = _ref12.actionCallback,
3233
- actionIcon = _ref12.actionIcon,
3234
- props = _objectWithoutPropertiesLoose(_ref12, _excluded$4);
3226
+ var Input = function Input(_ref13) {
3227
+ var _ref13$type = _ref13.type,
3228
+ type = _ref13$type === void 0 ? 'text' : _ref13$type,
3229
+ _ref13$placeholder = _ref13.placeholder,
3230
+ placeholder = _ref13$placeholder === void 0 ? '' : _ref13$placeholder,
3231
+ defaultValue = _ref13.defaultValue,
3232
+ _ref13$fieldState = _ref13.fieldState,
3233
+ fieldState = _ref13$fieldState === void 0 ? 'default' : _ref13$fieldState,
3234
+ feedbackMessage = _ref13.feedbackMessage,
3235
+ actionCallback = _ref13.actionCallback,
3236
+ actionIcon = _ref13.actionIcon,
3237
+ props = _objectWithoutPropertiesLoose(_ref13, _excluded$4);
3235
3238
 
3236
3239
  var isActionButton = actionCallback !== undefined;
3237
3240
 
@@ -3246,22 +3249,19 @@ var Input = function Input(_ref12) {
3246
3249
  case 'required':
3247
3250
  return React__default.createElement(Icon, {
3248
3251
  icon: 'Required',
3249
- size: 20,
3250
- color: 'inverse'
3252
+ size: 20
3251
3253
  });
3252
3254
 
3253
3255
  case 'valid':
3254
3256
  return React__default.createElement(Icon, {
3255
3257
  icon: 'Success',
3256
- size: 20,
3257
- color: 'inverse'
3258
+ size: 20
3258
3259
  });
3259
3260
 
3260
3261
  case 'invalid':
3261
3262
  return React__default.createElement(Icon, {
3262
3263
  icon: 'Invalid',
3263
- size: 20,
3264
- color: 'inverse'
3264
+ size: 20
3265
3265
  });
3266
3266
 
3267
3267
  case 'processing':