@codacy/ui-components 0.66.61 → 0.66.63

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 (155) hide show
  1. package/lib/Avatar/Avatar.js +1 -1
  2. package/lib/Banner/Banner.js +1 -1
  3. package/lib/Banner/Banner.styles.d.ts +1 -1
  4. package/lib/Banner/Banner.styles.js +1 -2
  5. package/lib/Banner/Banner.types.d.ts +1 -1
  6. package/lib/Bannerol/Bannerol.js +1 -1
  7. package/lib/Bannerol/Bannerol.styles.d.ts +1 -1
  8. package/lib/Bannerol/Bannerol.types.d.ts +2 -2
  9. package/lib/BigTabs/BigTabs.d.ts +1 -1
  10. package/lib/BigTabs/BigTabs.js +1 -1
  11. package/lib/BigTabs/BigTabs.styles.d.ts +3 -3
  12. package/lib/Button/Button.js +1 -1
  13. package/lib/Button/styles.d.ts +3 -3
  14. package/lib/Button/types.d.ts +4 -4
  15. package/lib/Checkbox/Checkbox.js +1 -1
  16. package/lib/Checkbox/CheckboxFilterList.js +2 -2
  17. package/lib/Checkbox/styles.d.ts +5 -5
  18. package/lib/Checkbox/styles.js +1 -2
  19. package/lib/CloseButton/index.js +1 -1
  20. package/lib/Divider/Divider.js +1 -1
  21. package/lib/Divider/Divider.styles.d.ts +2 -2
  22. package/lib/Dropdown/Content/DropdownInput.js +1 -1
  23. package/lib/Dropdown/Content/DropdownItem.js +1 -1
  24. package/lib/Dropdown/Dropdown.js +1 -1
  25. package/lib/Dropdown/Dropdown.styles.d.ts +7 -7
  26. package/lib/Dropdown/Dropdown.types.d.ts +2 -2
  27. package/lib/Dropdown/Triggers/DropdownButtonTrigger.js +1 -1
  28. package/lib/Dropdown/Triggers/DropdownItemTrigger.js +1 -1
  29. package/lib/Dropdown/Triggers/FilterTrigger.js +1 -1
  30. package/lib/Dropdown/Triggers/InputTrigger.js +1 -1
  31. package/lib/Dropdown/Triggers/SelectTrigger.js +1 -1
  32. package/lib/ExpandableBox/ExpandableBox.styles.d.ts +2 -2
  33. package/lib/Flexbox/Flexbox.d.ts +8 -8
  34. package/lib/Group/Group.styles.d.ts +1 -1
  35. package/lib/Icon/Icon.js +1 -1
  36. package/lib/Icon/Icon.styles.d.ts +1 -1
  37. package/lib/Icon/Icon.styles.js +1 -2
  38. package/lib/Icon/Icon.types.d.ts +2 -2
  39. package/lib/IconAndText/IconAndText.js +1 -1
  40. package/lib/IconAndText/IconAndText.styles.d.ts +1 -1
  41. package/lib/Icons/Chevrons.d.ts +5 -5
  42. package/lib/Icons/CodacyIcon.d.ts +2 -2
  43. package/lib/Icons/Ellipsis.d.ts +2 -2
  44. package/lib/Icons/Messages.js +1 -1
  45. package/lib/Icons/Search.d.ts +2 -2
  46. package/lib/Icons/Severities.d.ts +5 -5
  47. package/lib/Icons/Sorting.d.ts +3 -3
  48. package/lib/Icons/Spinner.d.ts +2 -2
  49. package/lib/Icons/Symbols.d.ts +4 -4
  50. package/lib/Img/Img.js +1 -1
  51. package/lib/Img/Img.styles.d.ts +2 -2
  52. package/lib/Img/Img.styles.js +2 -4
  53. package/lib/Img/Img.types.d.ts +1 -1
  54. package/lib/InlineMessage/InlineMessage.js +1 -1
  55. package/lib/InlineMessage/types.d.ts +1 -1
  56. package/lib/Input/Input.js +1 -1
  57. package/lib/Input/styles.d.ts +8 -8
  58. package/lib/Input/styles.js +1 -2
  59. package/lib/Input/types.d.ts +1 -1
  60. package/lib/Labeled/Labeled.js +1 -1
  61. package/lib/Labeled/styles.d.ts +3 -3
  62. package/lib/LeftMenu/LeftMenu.js +1 -1
  63. package/lib/LeftMenu/LeftMenu.styles.d.ts +1 -1
  64. package/lib/Link/Link.js +1 -1
  65. package/lib/Link/Link.styles.d.ts +2 -2
  66. package/lib/Link/Link.types.d.ts +1 -1
  67. package/lib/Message/Message.js +1 -1
  68. package/lib/Message/Message.styles.d.ts +1 -1
  69. package/lib/Message/Message.styles.js +5 -10
  70. package/lib/Message/Message.types.d.ts +1 -1
  71. package/lib/Modal/ConfirmationModal.js +1 -1
  72. package/lib/Modal/Modal.js +4 -1
  73. package/lib/Modal/styles.d.ts +6 -6
  74. package/lib/Modal/styles.js +7 -14
  75. package/lib/Modal/types.d.ts +1 -1
  76. package/lib/MoreInfo/MoreInfo.js +1 -1
  77. package/lib/MultiSlider/MultiSlider.js +1 -1
  78. package/lib/MultiSlider/styles.d.ts +2 -2
  79. package/lib/Orb/Orb.js +1 -1
  80. package/lib/Orb/styles.d.ts +1 -1
  81. package/lib/Orb/types.d.ts +1 -1
  82. package/lib/Panel/Panel.js +1 -1
  83. package/lib/Panel/Panel.styles.d.ts +1 -1
  84. package/lib/PillLabel/PillLabel.js +1 -1
  85. package/lib/PillLabel/PillLabel.styles.d.ts +1 -1
  86. package/lib/PillLabel/PillLabel.types.d.ts +1 -1
  87. package/lib/Popup/Popup.js +1 -1
  88. package/lib/Popup/styles.d.ts +2 -2
  89. package/lib/ProgressBar/ProgressBar.js +1 -1
  90. package/lib/ProgressBar/styles.d.ts +3 -3
  91. package/lib/ProgressBar/types.d.ts +1 -1
  92. package/lib/Radio/Radio.js +1 -1
  93. package/lib/Radio/styles.d.ts +4 -4
  94. package/lib/ScrollableContent/ScrollableContent.js +1 -1
  95. package/lib/ScrollableContent/ScrollableContent.styles.d.ts +1 -1
  96. package/lib/Skeleton/Skeleton.js +1 -1
  97. package/lib/Skeleton/Skeleton.styles.d.ts +1 -1
  98. package/lib/Skeleton/Skeleton.types.d.ts +1 -1
  99. package/lib/Slider/styles.d.ts +5 -5
  100. package/lib/Slider/styles.js +2 -4
  101. package/lib/StepNumber/StepNumber.js +1 -1
  102. package/lib/StepNumber/styles.d.ts +1 -1
  103. package/lib/Stepper/Stepper.js +2 -2
  104. package/lib/Stepper/Stepper.styles.d.ts +4 -4
  105. package/lib/Stepper/Stepper.types.d.ts +1 -1
  106. package/lib/Switcher/Switcher.js +1 -1
  107. package/lib/Switcher/Switcher.styles.d.ts +2 -2
  108. package/lib/Tab/Tab.d.ts +2 -2
  109. package/lib/Tab/Tab.js +1 -1
  110. package/lib/Tab/Tab.styles.d.ts +2 -2
  111. package/lib/Table/NewSelectableTable.js +1 -1
  112. package/lib/Table/SelectableTable.d.ts +2 -2
  113. package/lib/Table/SelectableTable.js +1 -1
  114. package/lib/Table/Table.js +2 -2
  115. package/lib/Table/Table.styles.d.ts +7 -7
  116. package/lib/Table/Table.styles.js +1 -2
  117. package/lib/Table/Table.types.d.ts +3 -3
  118. package/lib/TagsInput/TagsInput.js +1 -1
  119. package/lib/TagsInput/style.d.ts +2 -2
  120. package/lib/TagsInput/types.d.ts +1 -1
  121. package/lib/Textarea/Textarea.js +1 -1
  122. package/lib/Textarea/Textarea.styles.d.ts +4 -4
  123. package/lib/ThemeProvider/ThemeProvider.d.ts +1 -1
  124. package/lib/Toast/Toast.d.ts +2 -2
  125. package/lib/Toast/Toast.js +1 -1
  126. package/lib/Toast/styles.d.ts +1 -1
  127. package/lib/Toast/types.d.ts +2 -2
  128. package/lib/Toggle/Toggle.js +1 -1
  129. package/lib/Toggle/styles.d.ts +4 -4
  130. package/lib/Toggle/styles.js +1 -2
  131. package/lib/Tooltip/Tooltip.js +1 -1
  132. package/lib/Tooltip/styles.d.ts +3 -3
  133. package/lib/Tooltip/styles.js +1 -2
  134. package/lib/Tooltip/types.d.ts +2 -2
  135. package/lib/Typography/Typography.js +1 -1
  136. package/lib/Typography/Typography.styles.d.ts +7 -7
  137. package/lib/Typography/Typography.types.d.ts +5 -5
  138. package/lib/theme/ColorSchemes/components/issues.d.ts +4 -4
  139. package/lib/theme/ColorSchemes/components/utils.d.ts +1 -1
  140. package/lib/theme/ColorSchemes/light/index.d.ts +4 -4
  141. package/lib/theme/ColorSchemes/primitives/blue.d.ts +3 -3
  142. package/lib/theme/ColorSchemes/primitives/green.d.ts +3 -3
  143. package/lib/theme/ColorSchemes/primitives/grey.d.ts +3 -3
  144. package/lib/theme/ColorSchemes/primitives/index.d.ts +2 -2
  145. package/lib/theme/ColorSchemes/primitives/magenta.d.ts +3 -3
  146. package/lib/theme/ColorSchemes/primitives/orange.d.ts +3 -3
  147. package/lib/theme/ColorSchemes/primitives/purple.d.ts +3 -3
  148. package/lib/theme/ColorSchemes/primitives/red.d.ts +3 -3
  149. package/lib/theme/ColorSchemes/primitives/teal.d.ts +3 -3
  150. package/lib/theme/ColorSchemes/primitives/yellow.d.ts +3 -3
  151. package/lib/theme/ColorSchemes/semantics.d.ts +3 -3
  152. package/lib/theme/theme.d.ts +7 -7
  153. package/lib/types.d.ts +1 -1
  154. package/lib/utils/reactNodeToText.js +2 -2
  155. package/package.json +4 -3
@@ -1,4 +1,4 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
1
+ function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
2
2
  import React from 'react';
3
3
  import numeral from 'numeral';
4
4
  import { StyledTitle, StyledSubheader, StyledParagraph, StyledCaption, StyledList, StyledDataPoint } from './Typography.styles';
@@ -1,10 +1,10 @@
1
1
  /// <reference types="react" />
2
2
  import { CodacyTheme, AllColorsKeys, FontWeights, Size } from '../theme';
3
3
  import { TitleProps, SubheaderProps, ParagraphProps, CaptionProps, ListProps, TextSize, TextColor, DataPointProps, TitleSize, DataPointTextSize } from './Typography.types';
4
- export declare const BaseTextStyle: (theme: CodacyTheme, size: TextSize, color: TextColor | AllColorsKeys) => import("@emotion/utils").SerializedStyles;
4
+ export declare const BaseTextStyle: (theme: CodacyTheme, size: TextSize, color: TextColor | AllColorsKeys) => import("@emotion/react").SerializedStyles;
5
5
  export declare const StyledTitle: import("@emotion/styled").StyledComponent<{
6
6
  theme?: import("@emotion/react").Theme | undefined;
7
- as?: import("react").ElementType<any> | undefined;
7
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
8
8
  } & import("..").ColorProps & Omit<import("..").LayoutProps, "size"> & import("..").SpaceProps & import("..").BorderProps & import("..").PositionProps & import("..").ShadowProps & import("..").TextAlignProps & Omit<import("..").TypographyProps, "fontWeight"> & import("../Flexbox").As & {
9
9
  fontWeight?: import("styled-system").ResponsiveValue<number | FontWeights, CodacyTheme> | undefined;
10
10
  } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
@@ -14,7 +14,7 @@ export declare const StyledTitle: import("@emotion/styled").StyledComponent<{
14
14
  }, {}, {}>;
15
15
  export declare const StyledSubheader: import("@emotion/styled").StyledComponent<{
16
16
  theme?: import("@emotion/react").Theme | undefined;
17
- as?: import("react").ElementType<any> | undefined;
17
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
18
18
  } & import("..").ColorProps & Omit<import("..").LayoutProps, "size"> & import("..").SpaceProps & import("..").BorderProps & import("..").PositionProps & import("..").ShadowProps & import("..").TextAlignProps & Omit<import("..").TypographyProps, "fontWeight"> & import("../Flexbox").As & {
19
19
  fontWeight?: import("styled-system").ResponsiveValue<number | FontWeights, CodacyTheme> | undefined;
20
20
  } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
@@ -24,7 +24,7 @@ export declare const StyledSubheader: import("@emotion/styled").StyledComponent<
24
24
  }, {}, {}>;
25
25
  export declare const StyledParagraph: import("@emotion/styled").StyledComponent<{
26
26
  theme?: import("@emotion/react").Theme | undefined;
27
- as?: import("react").ElementType<any> | undefined;
27
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
28
28
  } & import("..").ColorProps & Omit<import("..").LayoutProps, "size"> & import("..").SpaceProps & import("..").BorderProps & import("..").PositionProps & import("..").ShadowProps & import("..").TextAlignProps & Omit<import("..").TypographyProps, "fontWeight"> & import("../Flexbox").As & {
29
29
  fontWeight?: import("styled-system").ResponsiveValue<number | FontWeights, CodacyTheme> | undefined;
30
30
  } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
@@ -34,7 +34,7 @@ export declare const StyledParagraph: import("@emotion/styled").StyledComponent<
34
34
  }, {}, {}>;
35
35
  export declare const StyledCaption: import("@emotion/styled").StyledComponent<{
36
36
  theme?: import("@emotion/react").Theme | undefined;
37
- as?: import("react").ElementType<any> | undefined;
37
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
38
38
  } & import("..").ColorProps & Omit<import("..").LayoutProps, "size"> & import("..").SpaceProps & import("..").BorderProps & import("..").PositionProps & import("..").ShadowProps & import("..").TextAlignProps & Omit<import("..").TypographyProps, "fontWeight"> & import("../Flexbox").As & {
39
39
  fontWeight?: import("styled-system").ResponsiveValue<number | FontWeights, CodacyTheme> | undefined;
40
40
  } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
@@ -44,7 +44,7 @@ export declare const StyledCaption: import("@emotion/styled").StyledComponent<{
44
44
  }, {}, {}>;
45
45
  export declare const StyledList: import("@emotion/styled").StyledComponent<{
46
46
  theme?: import("@emotion/react").Theme | undefined;
47
- as?: import("react").ElementType<any> | undefined;
47
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
48
48
  } & import("..").ColorProps & Omit<import("..").LayoutProps, "size"> & import("..").SpaceProps & import("..").BorderProps & import("..").PositionProps & import("..").ShadowProps & import("..").TextAlignProps & Omit<import("..").TypographyProps, "fontWeight"> & import("../Flexbox").As & {
49
49
  fontWeight?: import("styled-system").ResponsiveValue<number | FontWeights, CodacyTheme> | undefined;
50
50
  } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
@@ -54,7 +54,7 @@ export declare const StyledList: import("@emotion/styled").StyledComponent<{
54
54
  }, {}, {}>;
55
55
  export declare const StyledDataPoint: import("@emotion/styled").StyledComponent<{
56
56
  theme?: import("@emotion/react").Theme | undefined;
57
- as?: import("react").ElementType<any> | undefined;
57
+ as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
58
58
  } & import("..").ColorProps & Omit<import("..").LayoutProps, "size"> & import("..").SpaceProps & import("..").BorderProps & import("..").PositionProps & import("..").ShadowProps & import("..").TextAlignProps & Omit<import("..").TypographyProps, "fontWeight"> & import("../Flexbox").As & {
59
59
  fontWeight?: import("styled-system").ResponsiveValue<number | FontWeights, CodacyTheme> | undefined;
60
60
  } & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & {
@@ -1,8 +1,8 @@
1
1
  import { ContainerComponentProps } from '../types';
2
2
  import { AllColorsKeys, Size } from '../theme';
3
3
  import { BoxProps } from '../Flexbox';
4
- export declare type TitleSize = 'md' | 'xl';
5
- export declare type TextColor = 'primary' | 'secondary' | 'tertiary' | 'placeholder' | 'inverted' | 'info' | 'success' | 'warning' | 'danger' | 'high' | 'attention';
4
+ export type TitleSize = 'md' | 'xl';
5
+ export type TextColor = 'primary' | 'secondary' | 'tertiary' | 'placeholder' | 'inverted' | 'info' | 'success' | 'warning' | 'danger' | 'high' | 'attention';
6
6
  export interface TitleProps extends ContainerComponentProps, BoxProps {
7
7
  size?: TitleSize;
8
8
  color?: TextColor | AllColorsKeys;
@@ -11,7 +11,7 @@ export interface SubheaderProps extends ContainerComponentProps, BoxProps {
11
11
  size?: Size;
12
12
  color?: TextColor | AllColorsKeys;
13
13
  }
14
- export declare type TextSize = 'lg' | 'md' | 'sm' | 'xs';
14
+ export type TextSize = 'lg' | 'md' | 'sm' | 'xs';
15
15
  export interface BaseTextProps {
16
16
  size?: TextSize;
17
17
  color?: TextColor | AllColorsKeys;
@@ -24,8 +24,8 @@ export interface CaptionProps extends ContainerComponentProps, Omit<BoxProps, 's
24
24
  /** @deprecated Use fontWeight instead */
25
25
  bold?: boolean;
26
26
  }
27
- export declare type DataPointFormatter = '+0' | '+0[,]0' | '+0a' | '+0[.]0a' | '0a' | '0[.]0a' | '0[,]0';
28
- export declare type DataPointTextSize = 'lg' | 'md' | 'sm';
27
+ export type DataPointFormatter = '+0' | '+0[,]0' | '+0a' | '+0[.]0a' | '0a' | '0[.]0a' | '0[,]0';
28
+ export type DataPointTextSize = 'lg' | 'md' | 'sm';
29
29
  export interface DataPointProps extends ContainerComponentProps, Omit<BoxProps, 'size'> {
30
30
  value?: number;
31
31
  showPercentage?: boolean;
@@ -1,8 +1,8 @@
1
1
  import { FunctionalColorScheme } from '../..';
2
- declare type Variant = 'critical' | 'high' | 'medium' | 'minor';
3
- declare type State = 'collapsed' | 'expanded';
4
- declare type Element = 'background' | 'code' | 'linenumber';
5
- export declare type IssueKey = `issues-${Variant}-${Element}-${State}` | `issues-${Variant}-${Element}` | `issues-${Element}-${State}` | `issues-${Element}`;
2
+ type Variant = 'critical' | 'high' | 'medium' | 'minor';
3
+ type State = 'collapsed' | 'expanded';
4
+ type Element = 'background' | 'code' | 'linenumber';
5
+ export type IssueKey = `issues-${Variant}-${Element}-${State}` | `issues-${Variant}-${Element}` | `issues-${Element}-${State}` | `issues-${Element}`;
6
6
  export declare const issues: (colors: FunctionalColorScheme) => {
7
7
  'issues-critical-background-collapsed': string;
8
8
  'issues-critical-background-expanded': string;
@@ -1,4 +1,4 @@
1
- declare type ValidateKeys<K extends string, T> = {
1
+ type ValidateKeys<K extends string, T> = {
2
2
  [P in keyof T]: P extends K ? T[P] : never;
3
3
  };
4
4
  export declare const validateKeys: <K extends string>() => <T extends Record<string, string>>(obj: ValidateKeys<K, T>) => T;
@@ -216,8 +216,8 @@ declare const functionalColors: {
216
216
  'text-high-enabled': string;
217
217
  'text-high-disabled': string;
218
218
  };
219
- export declare type FunctionalColor = keyof typeof functionalColors;
220
- export declare type FunctionalColorScheme = {
219
+ export type FunctionalColor = keyof typeof functionalColors;
220
+ export type FunctionalColorScheme = {
221
221
  [key in FunctionalColor]: string;
222
222
  };
223
223
  declare const colors: {
@@ -849,8 +849,8 @@ declare const colors: {
849
849
  'text-high-enabled': string;
850
850
  'text-high-disabled': string;
851
851
  };
852
- export declare type AllColorsKeys = keyof typeof colors;
853
- export declare type ColorScheme = {
852
+ export type AllColorsKeys = keyof typeof colors;
853
+ export type ColorScheme = {
854
854
  [key in AllColorsKeys]: string;
855
855
  };
856
856
  export declare const codacyThemeColors: ColorScheme;
@@ -1,5 +1,5 @@
1
- declare type ColorName = 'blue';
2
- declare type ColorNumber = '00' | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 95 | 98;
3
- declare type BlueColorType = `${ColorName}-${ColorNumber}`;
1
+ type ColorName = 'blue';
2
+ type ColorNumber = '00' | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 95 | 98;
3
+ type BlueColorType = `${ColorName}-${ColorNumber}`;
4
4
  export declare const blue: Record<BlueColorType, string>;
5
5
  export {};
@@ -1,5 +1,5 @@
1
- declare type ColorName = 'green';
2
- declare type ColorNumber = '00' | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 95 | 98;
3
- declare type GreenColorType = `${ColorName}-${ColorNumber}`;
1
+ type ColorName = 'green';
2
+ type ColorNumber = '00' | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 95 | 98;
3
+ type GreenColorType = `${ColorName}-${ColorNumber}`;
4
4
  export declare const green: Record<GreenColorType, string>;
5
5
  export {};
@@ -1,5 +1,5 @@
1
- declare type ColorName = 'grey';
2
- declare type ColorNumber = '00' | '05' | 10 | 15 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 95 | 98 | 100;
3
- declare type GreyColorType = `${ColorName}-${ColorNumber}`;
1
+ type ColorName = 'grey';
2
+ type ColorNumber = '00' | '05' | 10 | 15 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 95 | 98 | 100;
3
+ type GreyColorType = `${ColorName}-${ColorNumber}`;
4
4
  export declare const grey: Record<GreyColorType, string>;
5
5
  export {};
@@ -111,7 +111,7 @@ export declare const primitiveColors: {
111
111
  "blue-95": string;
112
112
  "blue-98": string;
113
113
  };
114
- export declare type PrimitiveColor = keyof typeof primitiveColors;
115
- export declare type PrimitiveColorScheme = {
114
+ export type PrimitiveColor = keyof typeof primitiveColors;
115
+ export type PrimitiveColorScheme = {
116
116
  [key in PrimitiveColor]: string;
117
117
  };
@@ -1,5 +1,5 @@
1
- declare type ColorName = 'magenta';
2
- declare type ColorNumber = '00' | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 95 | 98;
3
- declare type MagentaColorType = `${ColorName}-${ColorNumber}`;
1
+ type ColorName = 'magenta';
2
+ type ColorNumber = '00' | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 95 | 98;
3
+ type MagentaColorType = `${ColorName}-${ColorNumber}`;
4
4
  export declare const magenta: Record<MagentaColorType, string>;
5
5
  export {};
@@ -1,5 +1,5 @@
1
- declare type ColorName = 'orange';
2
- declare type ColorNumber = '00' | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 95 | 98;
3
- declare type OrangeColorType = `${ColorName}-${ColorNumber}`;
1
+ type ColorName = 'orange';
2
+ type ColorNumber = '00' | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 95 | 98;
3
+ type OrangeColorType = `${ColorName}-${ColorNumber}`;
4
4
  export declare const orange: Record<OrangeColorType, string>;
5
5
  export {};
@@ -1,5 +1,5 @@
1
- declare type ColorName = 'purple';
2
- declare type ColorNumber = '08' | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 95 | 98;
3
- declare type PurpleColorType = `${ColorName}-${ColorNumber}`;
1
+ type ColorName = 'purple';
2
+ type ColorNumber = '08' | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 95 | 98;
3
+ type PurpleColorType = `${ColorName}-${ColorNumber}`;
4
4
  export declare const purple: Record<PurpleColorType, string>;
5
5
  export {};
@@ -1,5 +1,5 @@
1
- declare type ColorName = 'red';
2
- declare type ColorNumber = '00' | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 95 | 98;
3
- declare type RedColorType = `${ColorName}-${ColorNumber}`;
1
+ type ColorName = 'red';
2
+ type ColorNumber = '00' | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 95 | 98;
3
+ type RedColorType = `${ColorName}-${ColorNumber}`;
4
4
  export declare const red: Record<RedColorType, string>;
5
5
  export {};
@@ -1,5 +1,5 @@
1
- declare type ColorName = 'teal';
2
- declare type ColorNumber = '00' | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 95 | 98;
3
- declare type TealColorType = `${ColorName}-${ColorNumber}`;
1
+ type ColorName = 'teal';
2
+ type ColorNumber = '00' | 10 | 20 | 30 | 40 | 50 | 60 | 70 | 80 | 90 | 95 | 98;
3
+ type TealColorType = `${ColorName}-${ColorNumber}`;
4
4
  export declare const teal: Record<TealColorType, string>;
5
5
  export {};
@@ -1,5 +1,5 @@
1
- declare type ColorName = 'yellow';
2
- declare type ColorNumber = '00' | '10' | '20' | '30' | '40' | '50' | '60' | '70' | '80' | '90' | '95' | '98';
3
- declare type YellowColorType = `${ColorName}-${ColorNumber}`;
1
+ type ColorName = 'yellow';
2
+ type ColorNumber = '00' | '10' | '20' | '30' | '40' | '50' | '60' | '70' | '80' | '90' | '95' | '98';
3
+ type YellowColorType = `${ColorName}-${ColorNumber}`;
4
4
  export declare const yellow: Record<YellowColorType, string>;
5
5
  export {};
@@ -1,7 +1,7 @@
1
- declare type FunctionalName = 'text' | 'background' | 'border' | 'icon' | 'link';
1
+ type FunctionalName = 'text' | 'background' | 'border' | 'icon' | 'link';
2
2
  declare const semantics: readonly ["danger", "success", "warning", "info", "attention", "critical", "high", "medium", "minor"];
3
- declare type SemanticName = (typeof semantics)[number];
4
- declare type SemanticType = {
3
+ type SemanticName = (typeof semantics)[number];
4
+ type SemanticType = {
5
5
  [key in `${FunctionalName}-${SemanticName}`]: string;
6
6
  };
7
7
  export declare const semanticFunctionalColorsFx: (prefix: FunctionalName, number: 10 | 40 | 60 | 95) => SemanticType;
@@ -1,11 +1,11 @@
1
1
  import { AllColorsKeys, ColorScheme } from './';
2
- export declare type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
3
- export declare type Speed = 'fast' | 'normal' | 'slow';
4
- export declare type FontSize = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'h' | 'xh';
5
- export declare type Fonts = 'normal' | 'display' | 'monospace';
6
- export declare type FontWeights = 'light' | 'regular' | 'medium' | 'semi-bold';
7
- export declare type Element = 'inactive' | 'body' | 'dropdown' | 'modal' | 'tooltip' | 'content' | 'decoration' | 'table' | 'navbar';
8
- export declare type CodacyTheme = {
2
+ export type Size = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
3
+ export type Speed = 'fast' | 'normal' | 'slow';
4
+ export type FontSize = 'xxs' | 'xs' | 's' | 'm' | 'l' | 'xl' | 'xxl' | 'h' | 'xh';
5
+ export type Fonts = 'normal' | 'display' | 'monospace';
6
+ export type FontWeights = 'light' | 'regular' | 'medium' | 'semi-bold';
7
+ export type Element = 'inactive' | 'body' | 'dropdown' | 'modal' | 'tooltip' | 'content' | 'decoration' | 'table' | 'navbar';
8
+ export type CodacyTheme = {
9
9
  gridSize: number;
10
10
  remScale: number;
11
11
  space: string[];
package/lib/types.d.ts CHANGED
@@ -9,7 +9,7 @@ export interface ContainerComponentProps extends ComponentProps {
9
9
  /** The content to display as the label of the checkbox */
10
10
  children?: React.ReactNode;
11
11
  }
12
- export declare type ControlValueType = string | number | null;
12
+ export type ControlValueType = string | number | null;
13
13
  export interface ControlProps extends ContainerComponentProps {
14
14
  /** Disables the control, disallowing interaction */
15
15
  disabled?: boolean;
@@ -17,9 +17,9 @@ export const reactNodeToText = children => {
17
17
  }
18
18
  return Children.toArray(children).reduce((text, child) => {
19
19
  let newText = '';
20
- if ( /*#__PURE__*/isValidElement(child) && hasChildren(child)) {
20
+ if (/*#__PURE__*/isValidElement(child) && hasChildren(child)) {
21
21
  newText = reactNodeToText(child.props.children);
22
- } else if ( /*#__PURE__*/isValidElement(child) && !hasChildren(child)) {
22
+ } else if (/*#__PURE__*/isValidElement(child) && !hasChildren(child)) {
23
23
  newText = '';
24
24
  } else {
25
25
  newText = childToString(child);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codacy/ui-components",
3
- "version": "0.66.61",
3
+ "version": "0.66.63",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "",
@@ -96,7 +96,7 @@
96
96
  "fontsource-inter": "^4.0.0",
97
97
  "husky": "^4.3.0",
98
98
  "jsdom": "^26.1.0",
99
- "lint-staged": "^12.5.0",
99
+ "lint-staged": "^16.2.7",
100
100
  "lodash": "^4.17.20",
101
101
  "numeral": "^2.0.6",
102
102
  "prettier": "^3.1.1",
@@ -150,6 +150,7 @@
150
150
  "resolutions": {
151
151
  "braces": "^3.0.3",
152
152
  "express": "^4.21.2",
153
- "esbuild": "^0.25.0"
153
+ "esbuild": "^0.25.0",
154
+ "**/qs": "^6.14.1"
154
155
  }
155
156
  }