@codacy/ui-components 0.64.16 → 0.64.17

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 (223) hide show
  1. package/lib/Avatar/Avatar.js +25 -19
  2. package/lib/Avatar/Avatar.types.js +5 -1
  3. package/lib/Avatar/gravatar.js +17 -13
  4. package/lib/Avatar/index.js +16 -1
  5. package/lib/Banner/Banner.js +45 -32
  6. package/lib/Banner/Banner.styles.d.ts +11 -12
  7. package/lib/Banner/Banner.styles.js +26 -15
  8. package/lib/Banner/Banner.types.js +5 -1
  9. package/lib/Banner/index.js +27 -2
  10. package/lib/Button/Button.js +54 -51
  11. package/lib/Button/index.js +27 -2
  12. package/lib/Button/styles.d.ts +16 -12
  13. package/lib/Button/styles.js +58 -44
  14. package/lib/Button/types.js +5 -1
  15. package/lib/Checkbox/Checkbox.js +63 -54
  16. package/lib/Checkbox/CheckboxFilterList.js +46 -32
  17. package/lib/Checkbox/index.js +38 -3
  18. package/lib/Checkbox/styles.d.ts +25 -22
  19. package/lib/Checkbox/styles.js +52 -37
  20. package/lib/Checkbox/types.js +5 -1
  21. package/lib/CloseButton/index.js +27 -16
  22. package/lib/Divider/Divider.js +23 -13
  23. package/lib/Divider/Divider.styles.d.ts +16 -19
  24. package/lib/Divider/Divider.styles.js +24 -11
  25. package/lib/Divider/Divider.types.js +5 -1
  26. package/lib/Divider/index.js +16 -1
  27. package/lib/Dropdown/Content/DropdownInput.js +20 -8
  28. package/lib/Dropdown/Content/DropdownItem.js +29 -21
  29. package/lib/Dropdown/Content/DropdownSeparator.js +19 -7
  30. package/lib/Dropdown/Content/index.js +38 -3
  31. package/lib/Dropdown/Dropdown.js +89 -85
  32. package/lib/Dropdown/Dropdown.styles.d.ts +37 -34
  33. package/lib/Dropdown/Dropdown.styles.js +62 -43
  34. package/lib/Dropdown/Dropdown.types.js +5 -1
  35. package/lib/Dropdown/Triggers/DropdownButtonTrigger.js +30 -20
  36. package/lib/Dropdown/Triggers/DropdownLinkTrigger.js +29 -19
  37. package/lib/Dropdown/Triggers/InputTrigger.js +18 -10
  38. package/lib/Dropdown/Triggers/SelectTrigger.js +19 -12
  39. package/lib/Dropdown/Triggers/hooks.js +18 -14
  40. package/lib/Dropdown/Triggers/index.js +60 -5
  41. package/lib/Dropdown/Triggers/types.js +5 -1
  42. package/lib/Dropdown/index.js +49 -4
  43. package/lib/Flexbox/Flexbox.d.ts +31 -17
  44. package/lib/Flexbox/Flexbox.js +36 -16
  45. package/lib/Flexbox/index.js +16 -1
  46. package/lib/Group/Group.js +17 -8
  47. package/lib/Group/Group.styles.d.ts +8 -10
  48. package/lib/Group/Group.styles.js +17 -7
  49. package/lib/Group/Group.types.js +5 -1
  50. package/lib/Group/index.js +16 -1
  51. package/lib/Icon/Icon.js +24 -14
  52. package/lib/Icon/Icon.styles.d.ts +9 -11
  53. package/lib/Icon/Icon.styles.js +39 -44
  54. package/lib/Icon/Icon.types.js +5 -1
  55. package/lib/Icon/index.js +16 -1
  56. package/lib/IconAndText/IconAndText.js +33 -21
  57. package/lib/IconAndText/IconAndText.styles.d.ts +8 -10
  58. package/lib/IconAndText/IconAndText.styles.js +20 -10
  59. package/lib/IconAndText/IconAndText.types.js +5 -1
  60. package/lib/IconAndText/index.js +16 -1
  61. package/lib/Icons/Chevrons.js +53 -41
  62. package/lib/Icons/CodacyIcon.js +17 -8
  63. package/lib/Icons/Messages.js +54 -35
  64. package/lib/Icons/Search.js +16 -7
  65. package/lib/Icons/Severities.js +117 -106
  66. package/lib/Icons/Sorting.js +23 -13
  67. package/lib/Icons/Spinner.js +19 -10
  68. package/lib/Icons/Symbols.js +73 -58
  69. package/lib/Icons/index.js +93 -8
  70. package/lib/Img/Img.js +44 -37
  71. package/lib/Img/Img.styles.d.ts +12 -11
  72. package/lib/Img/Img.styles.js +37 -32
  73. package/lib/Img/Img.types.js +5 -1
  74. package/lib/Img/index.js +16 -1
  75. package/lib/InlineMessage/InlineMessage.js +47 -34
  76. package/lib/InlineMessage/index.js +16 -1
  77. package/lib/InlineMessage/types.js +5 -1
  78. package/lib/Input/Input.js +148 -126
  79. package/lib/Input/hooks.js +149 -178
  80. package/lib/Input/index.js +27 -2
  81. package/lib/Input/styles.d.ts +55 -104
  82. package/lib/Input/styles.js +85 -54
  83. package/lib/Input/types.js +5 -1
  84. package/lib/Labeled/Labeled.js +34 -22
  85. package/lib/Labeled/index.js +16 -1
  86. package/lib/Labeled/styles.d.ts +16 -12
  87. package/lib/Labeled/styles.js +27 -11
  88. package/lib/Labeled/types.js +5 -1
  89. package/lib/LeftMenu/LeftMenu.js +20 -11
  90. package/lib/LeftMenu/LeftMenu.styles.d.ts +8 -10
  91. package/lib/LeftMenu/LeftMenu.styles.js +20 -10
  92. package/lib/LeftMenu/LeftMenu.types.js +5 -1
  93. package/lib/LeftMenu/index.js +16 -1
  94. package/lib/Link/Link.js +43 -33
  95. package/lib/Link/Link.styles.d.ts +4 -1
  96. package/lib/Link/Link.styles.js +21 -11
  97. package/lib/Link/Link.types.js +5 -1
  98. package/lib/Link/index.js +38 -3
  99. package/lib/Message/Message.js +32 -24
  100. package/lib/Message/Message.styles.d.ts +8 -10
  101. package/lib/Message/Message.styles.js +17 -7
  102. package/lib/Message/Message.types.js +5 -1
  103. package/lib/Message/index.js +16 -1
  104. package/lib/Modal/ConfirmationModal.js +64 -40
  105. package/lib/Modal/Modal.js +120 -107
  106. package/lib/Modal/index.js +27 -2
  107. package/lib/Modal/styles.d.ts +44 -61
  108. package/lib/Modal/styles.js +97 -85
  109. package/lib/Modal/types.js +5 -1
  110. package/lib/MoreInfo/MoreInfo.js +45 -39
  111. package/lib/MoreInfo/index.js +16 -1
  112. package/lib/MoreInfo/types.js +5 -1
  113. package/lib/Panel/Panel.js +18 -9
  114. package/lib/Panel/Panel.styles.d.ts +8 -11
  115. package/lib/Panel/Panel.styles.js +15 -5
  116. package/lib/Panel/Panel.types.js +5 -1
  117. package/lib/Panel/index.js +27 -2
  118. package/lib/PillLabel/PillLabel.js +28 -21
  119. package/lib/PillLabel/PillLabel.styles.d.ts +8 -10
  120. package/lib/PillLabel/PillLabel.styles.js +25 -16
  121. package/lib/PillLabel/PillLabel.types.js +5 -1
  122. package/lib/PillLabel/index.js +16 -1
  123. package/lib/Popup/Popup.js +55 -45
  124. package/lib/Popup/index.js +16 -1
  125. package/lib/Popup/styles.d.ts +12 -11
  126. package/lib/Popup/styles.js +21 -8
  127. package/lib/Popup/types.js +5 -1
  128. package/lib/ProgressBar/ProgressBar.js +30 -20
  129. package/lib/ProgressBar/index.js +27 -2
  130. package/lib/ProgressBar/styles.d.ts +24 -28
  131. package/lib/ProgressBar/styles.js +30 -14
  132. package/lib/ProgressBar/types.js +5 -1
  133. package/lib/Radio/Radio.js +53 -48
  134. package/lib/Radio/index.js +16 -1
  135. package/lib/Radio/styles.d.ts +25 -22
  136. package/lib/Radio/styles.js +49 -30
  137. package/lib/Radio/types.js +5 -1
  138. package/lib/ScrollableContent/ScrollableContent.js +35 -24
  139. package/lib/ScrollableContent/ScrollableContent.styles.d.ts +9 -11
  140. package/lib/ScrollableContent/ScrollableContent.styles.js +23 -13
  141. package/lib/ScrollableContent/ScrollableContent.types.js +5 -1
  142. package/lib/ScrollableContent/index.js +27 -2
  143. package/lib/ScrollableContent/useScrollContainer.js +29 -24
  144. package/lib/Select/Select.js +31 -20
  145. package/lib/Select/index.js +16 -1
  146. package/lib/Select/types.js +5 -1
  147. package/lib/Skeleton/Skeleton.js +30 -25
  148. package/lib/Skeleton/Skeleton.styles.d.ts +8 -10
  149. package/lib/Skeleton/Skeleton.styles.js +21 -14
  150. package/lib/Skeleton/Skeleton.types.js +5 -1
  151. package/lib/Skeleton/index.js +20 -2
  152. package/lib/Stepper/Stepper.js +49 -40
  153. package/lib/Stepper/Stepper.styles.d.ts +24 -29
  154. package/lib/Stepper/Stepper.styles.js +35 -19
  155. package/lib/Stepper/Stepper.types.js +5 -1
  156. package/lib/Stepper/index.js +16 -1
  157. package/lib/Switcher/Switcher.js +32 -23
  158. package/lib/Switcher/Switcher.styles.d.ts +13 -13
  159. package/lib/Switcher/Switcher.styles.js +27 -15
  160. package/lib/Switcher/Switcher.types.js +5 -1
  161. package/lib/Switcher/index.js +16 -1
  162. package/lib/Tab/Tab.js +31 -23
  163. package/lib/Tab/Tab.styles.d.ts +13 -12
  164. package/lib/Tab/Tab.styles.js +30 -21
  165. package/lib/Tab/Tab.types.js +5 -1
  166. package/lib/Tab/index.js +16 -1
  167. package/lib/Table/NewSelectableTable.js +77 -56
  168. package/lib/Table/SelectableTable.js +138 -118
  169. package/lib/Table/Table.js +126 -111
  170. package/lib/Table/Table.styles.d.ts +32 -16
  171. package/lib/Table/Table.styles.js +79 -59
  172. package/lib/Table/Table.types.js +5 -1
  173. package/lib/Table/index.js +27 -2
  174. package/lib/TagsInput/TagsInput.js +44 -33
  175. package/lib/TagsInput/index.js +16 -1
  176. package/lib/TagsInput/style.d.ts +16 -19
  177. package/lib/TagsInput/style.js +22 -9
  178. package/lib/TagsInput/types.js +5 -1
  179. package/lib/Textarea/Textarea.js +75 -58
  180. package/lib/Textarea/Textarea.styles.d.ts +28 -22
  181. package/lib/Textarea/Textarea.styles.js +55 -32
  182. package/lib/Textarea/Textarea.types.js +5 -1
  183. package/lib/Textarea/index.js +16 -1
  184. package/lib/ThemeProvider/ThemeProvider.d.ts +5 -2
  185. package/lib/ThemeProvider/ThemeProvider.js +48 -30
  186. package/lib/ThemeProvider/index.js +16 -1
  187. package/lib/Toast/Toast.js +56 -53
  188. package/lib/Toast/index.js +16 -1
  189. package/lib/Toast/styles.d.ts +4 -2
  190. package/lib/Toast/styles.js +13 -3
  191. package/lib/Toast/types.js +5 -1
  192. package/lib/Toggle/Toggle.js +59 -50
  193. package/lib/Toggle/index.js +16 -1
  194. package/lib/Toggle/styles.d.ts +21 -14
  195. package/lib/Toggle/styles.js +51 -34
  196. package/lib/Toggle/types.js +5 -1
  197. package/lib/Tooltip/Tooltip.js +100 -102
  198. package/lib/Tooltip/index.js +16 -1
  199. package/lib/Tooltip/styles.d.ts +14 -8
  200. package/lib/Tooltip/styles.js +33 -25
  201. package/lib/Tooltip/types.js +5 -1
  202. package/lib/Typography/Typography.js +96 -85
  203. package/lib/Typography/Typography.styles.d.ts +48 -54
  204. package/lib/Typography/Typography.styles.js +70 -45
  205. package/lib/Typography/Typography.types.js +5 -1
  206. package/lib/Typography/index.js +38 -3
  207. package/lib/emotion.d.js +3 -0
  208. package/lib/hooks/index.js +38 -3
  209. package/lib/hooks/useForwardedRef.js +11 -6
  210. package/lib/hooks/useInfiniteScroll.js +24 -20
  211. package/lib/hooks/useStatefulRef.js +18 -14
  212. package/lib/index.js +489 -44
  213. package/lib/system-props/color.js +8 -2
  214. package/lib/system-props/index.js +27 -2
  215. package/lib/system-props/types.js +5 -1
  216. package/lib/theme/ColorSchemes/codacy.js +11 -4
  217. package/lib/theme/ColorSchemes/pulse.js +17 -9
  218. package/lib/theme/index.js +38 -3
  219. package/lib/theme/theme.js +42 -69
  220. package/lib/types.js +5 -1
  221. package/lib/utils/hash.js +8 -6
  222. package/lib/utils/reactNodeToText.js +13 -14
  223. package/package.json +32 -32
@@ -1,2 +1,27 @@
1
- export * from './color';
2
- export * from './types';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _color = require("./color");
7
+ Object.keys(_color).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _color[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function get() {
13
+ return _color[key];
14
+ }
15
+ });
16
+ });
17
+ var _types = require("./types");
18
+ Object.keys(_types).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _types[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function get() {
24
+ return _types[key];
25
+ }
26
+ });
27
+ });
@@ -1 +1,5 @@
1
- export {};
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1,5 +1,12 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
- export var baseColors = {
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.functionalColorsFx = exports.codacyThemeColors = exports.baseColors = void 0;
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
9
+ var baseColors = exports.baseColors = {
3
10
  // BLUE
4
11
  'blue-900': '#0052CC',
5
12
  'blue-800': '#2562EA',
@@ -72,7 +79,7 @@ export var baseColors = {
72
79
  'orange-100': '#FFA101',
73
80
  'orange-50': '#FFF2DF'
74
81
  };
75
- export var functionalColorsFx = function functionalColorsFx(colors) {
82
+ var functionalColorsFx = exports.functionalColorsFx = function functionalColorsFx(colors) {
76
83
  return {
77
84
  'brand-primary': colors['blue-700'],
78
85
  'accent-primary': colors['blue-700'],
@@ -145,4 +152,4 @@ export var functionalColorsFx = function functionalColorsFx(colors) {
145
152
  };
146
153
  };
147
154
  var functionalColors = functionalColorsFx(baseColors);
148
- export var codacyThemeColors = _objectSpread(_objectSpread({}, baseColors), functionalColors);
155
+ var codacyThemeColors = exports.codacyThemeColors = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, baseColors), functionalColors);
@@ -1,10 +1,16 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
- import { baseColors as codacyBaseColors, functionalColorsFx } from './codacy';
1
+ "use strict";
3
2
 
4
- var baseColors = _objectSpread({}, codacyBaseColors);
5
-
6
- var functionalColors = _objectSpread(_objectSpread({}, functionalColorsFx(baseColors)), {}, {
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.pulseThemeColors = void 0;
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
9
+ var _codacy = require("./codacy");
10
+ var baseColors = (0, _objectSpread2["default"])({}, _codacy.baseColors);
11
+ var functionalColors = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, (0, _codacy.functionalColorsFx)(baseColors)), {}, {
7
12
  // UPDATE HERE FUNCTIONAL COLORS
13
+
8
14
  'brand-primary': baseColors['turquoise-500'],
9
15
  'accent-primary': baseColors['turquoise-400'],
10
16
  'accent-primary-hover': baseColors['turquoise-500'],
@@ -16,6 +22,7 @@ var functionalColors = _objectSpread(_objectSpread({}, functionalColorsFx(baseCo
16
22
  // 'accent-subtle-focus': baseColors['black-400'],
17
23
  // 'accent-subtle-active': baseColors['black-500'],
18
24
  // 'accent-subtle-disabled': baseColors['black-100'],
25
+
19
26
  'accent-info': baseColors['turquoise-400'],
20
27
  // 'text-primary': baseColors['black-700'],
21
28
  // 'text-secondary': baseColors['black-400'],
@@ -27,6 +34,7 @@ var functionalColors = _objectSpread(_objectSpread({}, functionalColorsFx(baseCo
27
34
  // 'text-warning': baseColors['orange-200'],
28
35
  // 'text-danger': baseColors['red-400'],
29
36
  // 'text-attention': baseColors['purple-600'],
37
+
30
38
  // 'background-primary': baseColors['white'],
31
39
  // 'background-secondary': baseColors['black-50'],
32
40
  'background-info': baseColors['turquoise-80'],
@@ -35,6 +43,7 @@ var functionalColors = _objectSpread(_objectSpread({}, functionalColorsFx(baseCo
35
43
  // 'background-danger': baseColors['red-50'],
36
44
  // 'background-attention': baseColors['purple-100'],
37
45
  // 'background-neutral': baseColors['black-80'],
46
+
38
47
  'control-border': baseColors['black-200'],
39
48
  //'control-background': baseColors['white'],
40
49
  'control-active-background': baseColors['white'],
@@ -45,10 +54,9 @@ var functionalColors = _objectSpread(_objectSpread({}, functionalColorsFx(baseCo
45
54
  'ui-navbar': baseColors['turquoise-80'],
46
55
  'ui-navbar-text': baseColors['black-500'],
47
56
  'icon-primary': baseColors['black-300'],
48
- 'icon-info': baseColors['turquoise-400'] // 'icon-success': baseColors['green-200'],
57
+ 'icon-info': baseColors['turquoise-400']
58
+ // 'icon-success': baseColors['green-200'],
49
59
  // 'icon-warning': baseColors['orange-100'],
50
60
  // 'icon-danger': baseColors['red-200'],
51
-
52
61
  });
53
-
54
- export var pulseThemeColors = _objectSpread(_objectSpread({}, baseColors), functionalColors);
62
+ var pulseThemeColors = exports.pulseThemeColors = (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, baseColors), functionalColors);
@@ -1,3 +1,38 @@
1
- export * from './ColorSchemes/codacy';
2
- export * from './ColorSchemes/pulse';
3
- export * from './theme';
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _codacy = require("./ColorSchemes/codacy");
7
+ Object.keys(_codacy).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _codacy[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function get() {
13
+ return _codacy[key];
14
+ }
15
+ });
16
+ });
17
+ var _pulse = require("./ColorSchemes/pulse");
18
+ Object.keys(_pulse).forEach(function (key) {
19
+ if (key === "default" || key === "__esModule") return;
20
+ if (key in exports && exports[key] === _pulse[key]) return;
21
+ Object.defineProperty(exports, key, {
22
+ enumerable: true,
23
+ get: function get() {
24
+ return _pulse[key];
25
+ }
26
+ });
27
+ });
28
+ var _theme = require("./theme");
29
+ Object.keys(_theme).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (key in exports && exports[key] === _theme[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function get() {
35
+ return _theme[key];
36
+ }
37
+ });
38
+ });
@@ -1,6 +1,14 @@
1
- import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
2
- import { codacyThemeColors, pulseThemeColors } from './';
3
- import { rgba } from 'polished'; // Types
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault")["default"];
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.transition = exports.theme = exports.pulseTheme = exports.generateTheme = exports.codacyTheme = void 0;
8
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/objectSpread2"));
9
+ var _ = require("./");
10
+ var _polished = require("polished");
11
+ // Types
4
12
 
5
13
  // *** Theme Standard Values ***********************
6
14
  var fontStack = function fontStack(fonts) {
@@ -8,108 +16,71 @@ var fontStack = function fontStack(fonts) {
8
16
  return font.includes(' ') ? "\"".concat(font, "\"") : font;
9
17
  }).join(', ');
10
18
  };
11
-
12
19
  var remScale = 16;
13
- var gridSize = 0.5;
14
- /* rem */
15
-
20
+ var gridSize = 0.5; /* rem */
16
21
  var borderWidths = ['1px', '0.125rem', '0.25rem'];
17
22
  var fonts = {
18
23
  normal: fontStack(['Clear Sans', 'arial', 'system-ui', 'sans-serif']),
19
24
  display: fontStack(['Clear Sans', 'arial', 'system-ui', 'sans-serif']),
20
25
  monospace: fontStack(['ui-monospace', 'monospace'])
21
26
  };
22
- var fontSizes = [
23
- /** fontSize-00 */
24
- '0.625rem', // 10px
25
-
27
+ var fontSizes = [/** fontSize-00 */'0.625rem',
28
+ // 10px
26
29
  /** fontSize-01 */
27
- '0.75rem', // 12px
28
-
30
+ '0.75rem',
31
+ // 12px
29
32
  /** fontSize-02 */
30
- '0.875rem', // 14px
31
-
33
+ '0.875rem',
34
+ // 14px
32
35
  /** fontSize-03 */
33
- '1rem', // 16px
34
-
36
+ '1rem',
37
+ // 16px
35
38
  /** fontSize-04 */
36
- '1.125rem', // 18px
37
-
39
+ '1.125rem',
40
+ // 18px
38
41
  /** fontSize-05 */
39
- '1.3125rem', // 21px
40
-
42
+ '1.3125rem',
43
+ // 21px
41
44
  /** fontSize-06 */
42
- '1.65rem', // 26.4px
43
-
45
+ '1.65rem',
46
+ // 26.4px
44
47
  /** fontSize-07 */
45
48
  '2.25rem' // 36px
46
49
  ];
47
- var space = [
48
- /** space-00 */
49
- '0',
50
- /** space-01 */
51
- "".concat(gridSize * 0.5, "rem"), // 4px
52
-
50
+ var space = [/** space-00 */'0', /** space-01 */"".concat(gridSize * 0.5, "rem"), // 4px
53
51
  /** space-02 */
54
52
  "".concat(gridSize, "rem"), // 8px
55
-
56
53
  /** space-03 */
57
54
  "".concat(gridSize * 1.5, "rem"), // 12px
58
-
59
55
  /** space-04 */
60
56
  "".concat(gridSize * 2, "rem"), // 16px
61
-
62
57
  /** space-05 */
63
58
  "".concat(gridSize * 3, "rem"), // 24px
64
-
65
59
  /** space-06 */
66
60
  "".concat(gridSize * 4, "rem"), // 32px
67
-
68
61
  /** space-07 */
69
62
  "".concat(gridSize * 5, "rem"), // 40px
70
-
71
63
  /** space-08 */
72
64
  "".concat(gridSize * 6, "rem"), // 48px
73
-
74
65
  /** space-09 */
75
66
  "".concat(gridSize * 8, "rem") // 64px
76
67
  ];
77
- var sizes = [
78
- /** size-00 */
79
- "".concat(gridSize * 9, "rem"), // 72px
80
-
68
+ var sizes = [/** size-00 */"".concat(gridSize * 9, "rem"), // 72px
81
69
  /** size-01 */
82
70
  "".concat(gridSize * 19, "rem"), // 152px
83
-
84
71
  /** size-02 */
85
72
  "".concat(gridSize * 31, "rem"), // 248px
86
-
87
73
  /** size-03 */
88
74
  "".concat(gridSize * 44.5, "rem"), // 356px
89
-
90
75
  /** size-04 */
91
76
  "".concat(gridSize * 56.5, "rem") // 452px
92
77
  ];
93
- var radii = ['0.125rem'
94
- /* 2px */
95
- , '0.25rem'
96
- /* 4px */
97
- , '0.5rem'
98
- /* 8px */
99
- ];
100
-
78
+ var radii = ['0.125rem' /* 2px */, '0.25rem' /* 4px */, '0.5rem' /* 8px */];
101
79
  var shadowsFx = function shadowsFx(scheme) {
102
- return ["0 0.0625rem 0.125rem ".concat(rgba(scheme['neutral-600'], 0.2)), "0 0.125rem 0.375rem ".concat(rgba(scheme['neutral-600'], 0.3)), "0 0.125rem 0.375rem ".concat(rgba(scheme['neutral-600'], 0.2), ", 0 0.125rem 0.5rem ").concat(rgba(scheme['neutral-600'], 0.1)), "0 0.25rem 0.5rem ".concat(rgba(scheme['neutral-600'], 0.2), ", 0 0.25rem 0.75rem ").concat(rgba(scheme['neutral-600'], 0.1)), "0 0.75rem 1rem ".concat(rgba(scheme['neutral-600'], 0.2), ", 0 0.75rem 1.5rem ").concat(rgba(scheme['neutral-600'], 0.1))];
80
+ return ["0 0.0625rem 0.125rem ".concat((0, _polished.rgba)(scheme['neutral-600'], 0.2)), "0 0.125rem 0.375rem ".concat((0, _polished.rgba)(scheme['neutral-600'], 0.3)), "0 0.125rem 0.375rem ".concat((0, _polished.rgba)(scheme['neutral-600'], 0.2), ", 0 0.125rem 0.5rem ").concat((0, _polished.rgba)(scheme['neutral-600'], 0.1)), "0 0.25rem 0.5rem ".concat((0, _polished.rgba)(scheme['neutral-600'], 0.2), ", 0 0.25rem 0.75rem ").concat((0, _polished.rgba)(scheme['neutral-600'], 0.1)), "0 0.75rem 1rem ".concat((0, _polished.rgba)(scheme['neutral-600'], 0.2), ", 0 0.75rem 1.5rem ").concat((0, _polished.rgba)(scheme['neutral-600'], 0.1))];
103
81
  };
104
-
105
82
  var transitions = ['0.2s ease-in-out', '0.35s ease-in-out', '0.75s ease-in-out'];
106
- var breakpoints = ['85.1rem'
107
- /* > 1360px */
108
- , '90.1rem'
109
- /* > 1440px */
110
- , '105.1rem'
111
- /* > 1680px */
112
- ];
83
+ var breakpoints = ['85.1rem' /* > 1360px */, '90.1rem' /* > 1440px */, '105.1rem' /* > 1680px */];
113
84
  var zIndices = {
114
85
  inactive: -1,
115
86
  body: 1000,
@@ -159,26 +130,28 @@ var baseTheme = {
159
130
  baseLineHeight: lineHeights[0],
160
131
  borderSize: borderWidths,
161
132
  borderRadius: radii
162
- }; // Helper functions
133
+ };
163
134
 
164
- export var transition = function transition(properties, speed) {
135
+ // Helper functions
136
+ var transition = exports.transition = function transition(properties, speed) {
165
137
  var refTheme = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : baseTheme;
166
138
  return properties.map(function (p) {
167
139
  return "".concat(p, " ").concat(refTheme.transitions[speed || 'normal']);
168
140
  }).join(', ');
169
141
  };
170
- export var generateTheme = function generateTheme(scheme) {
171
- return _objectSpread(_objectSpread({}, baseTheme), {}, {
142
+ var generateTheme = exports.generateTheme = function generateTheme(scheme) {
143
+ return (0, _objectSpread2["default"])((0, _objectSpread2["default"])({}, baseTheme), {}, {
172
144
  colors: scheme,
173
145
  borders: borderWidths.map(function (w) {
174
146
  return "solid ".concat(w, " ").concat(scheme['ui-border']);
175
147
  }),
176
148
  shadows: shadowsFx(scheme)
177
149
  });
178
- }; // Themes
150
+ };
179
151
 
180
- export var codacyTheme = generateTheme(codacyThemeColors);
181
- export var pulseTheme = generateTheme(pulseThemeColors);
182
- /** @deprecated Use codacyTheme instead */
152
+ // Themes
153
+ var codacyTheme = exports.codacyTheme = generateTheme(_.codacyThemeColors);
154
+ var pulseTheme = exports.pulseTheme = generateTheme(_.pulseThemeColors);
183
155
 
184
- export var theme = codacyTheme;
156
+ /** @deprecated Use codacyTheme instead */
157
+ var theme = exports.theme = codacyTheme;
package/lib/types.js CHANGED
@@ -1 +1,5 @@
1
- export {};
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
package/lib/utils/hash.js CHANGED
@@ -1,9 +1,11 @@
1
- export var hash = function hash(s) {
2
- var h = 9;
3
-
4
- for (var i = 0; i < s.length;) {
5
- h = Math.imul(h ^ s.charCodeAt(i++), Math.pow(9, 9));
6
- }
1
+ "use strict";
7
2
 
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.hash = void 0;
7
+ var hash = exports.hash = function hash(s) {
8
+ var h = 9;
9
+ for (var i = 0; i < s.length;) h = Math.imul(h ^ s.charCodeAt(i++), Math.pow(9, 9));
8
10
  return h ^ h >>> 9;
9
11
  };
@@ -1,38 +1,37 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.reactNodeToText = void 0;
7
+ var _react = require("react");
1
8
  // From https://github.com/fernandopasik/react-children-utilities
2
- import { Children, isValidElement } from 'react';
3
9
 
4
10
  var hasChildren = function hasChildren(element) {
5
- return isValidElement(element) && Boolean(element.props.children);
11
+ return /*#__PURE__*/(0, _react.isValidElement)(element) && Boolean(element.props.children);
6
12
  };
7
-
8
13
  var childToString = function childToString(child) {
9
14
  if (typeof child === 'undefined' || child === null || typeof child === 'boolean') {
10
15
  return '';
11
16
  }
12
-
13
17
  if (JSON.stringify(child) === '{}') {
14
18
  return '';
15
19
  }
16
-
17
20
  return child.toString();
18
21
  };
19
-
20
- export var reactNodeToText = function reactNodeToText(children) {
21
- if (!(children instanceof Array) && !isValidElement(children)) {
22
+ var reactNodeToText = exports.reactNodeToText = function reactNodeToText(children) {
23
+ if (!(children instanceof Array) && ! /*#__PURE__*/(0, _react.isValidElement)(children)) {
22
24
  return childToString(children);
23
25
  }
24
-
25
- return Children.toArray(children).reduce(function (text, child) {
26
+ return _react.Children.toArray(children).reduce(function (text, child) {
26
27
  var newText = '';
27
-
28
- if (isValidElement(child) && hasChildren(child)) {
28
+ if ( /*#__PURE__*/(0, _react.isValidElement)(child) && hasChildren(child)) {
29
29
  newText = reactNodeToText(child.props.children);
30
- } else if (isValidElement(child) && !hasChildren(child)) {
30
+ } else if ( /*#__PURE__*/(0, _react.isValidElement)(child) && !hasChildren(child)) {
31
31
  newText = '';
32
32
  } else {
33
33
  newText = childToString(child);
34
34
  }
35
-
36
35
  return text.concat(newText);
37
36
  }, '');
38
37
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/ui-components",
3
- "version": "0.64.16",
3
+ "version": "0.64.17",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",
@@ -11,7 +11,7 @@
11
11
  "sideEffects": false,
12
12
  "scripts": {
13
13
  "build": "rimraf lib && npm run build:types && npm run build:js",
14
- "build-storybook": "build-storybook",
14
+ "build-storybook": "storybook build",
15
15
  "build:js": "NODE_ENV=production babel src -d lib --extensions \".ts,.tsx,.jsx\" --ignore src/jestSetup.ts,src/test-utils,\"src/**/*.spec.ts\",\"src/**/*.test.tsx\"",
16
16
  "build:types": "tsc -p tsconfig.prod.json --emitDeclarationOnly",
17
17
  "check-types": "tsc --noEmit",
@@ -21,13 +21,13 @@
21
21
  "lint": "npm run lint-cmd .",
22
22
  "lint-cmd": "eslint --ignore-path .eslintignore --ext .js,.jsx,.ts,.tsx",
23
23
  "lint-staged": "lint-staged",
24
- "storybook": "start-storybook -p 6006",
24
+ "storybook": "storybook dev -p 6006",
25
25
  "test": "jest",
26
26
  "test:watch": "jest --watch",
27
27
  "test:coverage": "jest --coverage"
28
28
  },
29
29
  "dependencies": {
30
- "@babel/runtime": "^7.12.5",
30
+ "@babel/runtime": "^7.23.6",
31
31
  "@pathofdev/react-tag-input": "github:inesgomas/react-tag-input",
32
32
  "@styled-system/should-forward-prop": "^5.1.5",
33
33
  "autosize": "^4.0.2",
@@ -36,18 +36,22 @@
36
36
  "query-string": "^6.13.7"
37
37
  },
38
38
  "devDependencies": {
39
- "@babel/cli": "^7.12.1",
40
- "@babel/core": "^7.12.3",
41
- "@emotion/core": "^10.3.0",
42
- "@emotion/styled": "^10.3.0",
43
- "@emotion/styled-base": "^10.3.0",
39
+ "@babel/cli": "^7.23.4",
40
+ "@babel/core": "^7.23.6",
41
+ "@babel/plugin-proposal-private-property-in-object": "^7.21.11",
42
+ "@emotion/babel-plugin": "^11.11.0",
43
+ "@emotion/eslint-plugin": "^11.11.0",
44
+ "@emotion/jest": "^11.11.0",
45
+ "@emotion/react": "^11.11.1",
46
+ "@emotion/styled": "^11.11.0",
44
47
  "@mdx-js/react": "^2.0.0",
45
48
  "@popperjs/core": "^2.5.4",
46
- "@storybook/addon-docs": "^6.5.10",
47
- "@storybook/addon-essentials": "^6.5.12",
48
- "@storybook/addons": "^6.5.10",
49
- "@storybook/mdx2-csf": "^0.0.3",
50
- "@storybook/react": "^6.5.10",
49
+ "@storybook/addon-docs": "^7.6.4",
50
+ "@storybook/addon-essentials": "^7.6.4",
51
+ "@storybook/addons": "^7.6.4",
52
+ "@storybook/mdx2-csf": "^1.1.0",
53
+ "@storybook/react": "^7.6.4",
54
+ "@storybook/react-webpack5": "^7.6.4",
51
55
  "@testing-library/dom": "^8.16.0",
52
56
  "@testing-library/jest-dom": "^5.11.6",
53
57
  "@testing-library/react": "^13.3.0",
@@ -60,36 +64,32 @@
60
64
  "@types/react": "^18.0.15",
61
65
  "@types/react-dom": "^18.0.6",
62
66
  "@types/resize-observer-browser": "^0.1.6",
63
- "@types/styled-system": "^5.1.10",
64
- "@types/styled-system__should-forward-prop": "^5.1.2",
65
- "@typescript-eslint/eslint-plugin": "^4.1.1",
66
- "@typescript-eslint/parser": "^4.1.1",
67
- "babel-eslint": "^10.1.0",
68
- "babel-loader": "^8.2.1",
69
- "babel-plugin-emotion": "^10.0.33",
70
- "babel-preset-react-app": "^9.1.2",
67
+ "@types/styled-system": "^5.1.22",
68
+ "@types/styled-system__should-forward-prop": "^5.1.4",
69
+ "@typescript-eslint/eslint-plugin": "^6.13.2",
70
+ "@typescript-eslint/parser": "^6.13.2",
71
+ "babel-loader": "^9.1.3",
72
+ "babel-preset-react-app": "^10.0.1",
71
73
  "copy-to-clipboard": "^3.3.1",
72
74
  "depcheck": "^1.4.2",
73
- "emotion-theming": "^10.3.0",
74
- "eslint": "^6.8.0",
75
- "eslint-config-prettier": "^6.15.0",
75
+ "eslint": "^8.55.0",
76
+ "eslint-config-prettier": "^9.1.0",
76
77
  "eslint-config-react-app": "^5.2.1",
77
- "eslint-plugin-flowtype": "^3.13.0",
78
+ "eslint-plugin-flowtype": "^8.0.3",
78
79
  "eslint-plugin-import": "^2.22.1",
79
80
  "eslint-plugin-jsx-a11y": "^6.4.1",
80
81
  "eslint-plugin-mdx": "^1.16.0",
81
- "eslint-plugin-prettier": "^3.1.4",
82
+ "eslint-plugin-prettier": "^5.0.1",
82
83
  "eslint-plugin-react": "^7.21.5",
83
84
  "eslint-plugin-react-hooks": "^1.7.0",
84
85
  "husky": "^4.3.0",
85
86
  "jest": "^24.9.0",
86
- "jest-emotion": "^10.0.32",
87
87
  "jest-environment-jsdom-fourteen": "1.0.1",
88
88
  "jest-watch-typeahead": "^0.4.2",
89
89
  "lint-staged": "^9.5.0",
90
90
  "lodash": "^4.17.20",
91
91
  "numeral": "^2.0.6",
92
- "prettier": "^1.19.1",
92
+ "prettier": "^3.1.1",
93
93
  "react": "^18.2.0",
94
94
  "react-docgen-typescript-loader": "^3.7.2",
95
95
  "react-dom": "^18.2.0",
@@ -97,14 +97,14 @@
97
97
  "react-toastify": "8.0.2",
98
98
  "reakit": "^1.3.11",
99
99
  "rimraf": "^3.0.2",
100
+ "storybook": "next",
100
101
  "styled-system": "^5.1.5",
101
102
  "typeface-clear-sans": "0.0.44",
102
103
  "typescript": "^4.5.4"
103
104
  },
104
105
  "peerDependencies": {
105
- "@emotion/core": "^10.3.0",
106
- "@emotion/styled": "^10.3.0",
107
- "@emotion/styled-base": "^10.3.0",
106
+ "@emotion/react": "^11.11.1",
107
+ "@emotion/styled": "^11.11.0",
108
108
  "@popperjs/core": "^2.5.4",
109
109
  "lodash": "^4.17.20",
110
110
  "numeral": "^2.0.6",