@codacy/ui-components 0.66.62 → 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.
- package/lib/Avatar/Avatar.js +1 -1
- package/lib/Banner/Banner.js +1 -1
- package/lib/Banner/Banner.styles.d.ts +1 -1
- package/lib/Banner/Banner.styles.js +1 -2
- package/lib/Banner/Banner.types.d.ts +1 -1
- package/lib/Bannerol/Bannerol.js +1 -1
- package/lib/Bannerol/Bannerol.styles.d.ts +1 -1
- package/lib/Bannerol/Bannerol.types.d.ts +2 -2
- package/lib/BigTabs/BigTabs.d.ts +1 -1
- package/lib/BigTabs/BigTabs.js +1 -1
- package/lib/BigTabs/BigTabs.styles.d.ts +3 -3
- package/lib/Button/Button.js +1 -1
- package/lib/Button/styles.d.ts +3 -3
- package/lib/Button/types.d.ts +4 -4
- package/lib/Checkbox/Checkbox.js +1 -1
- package/lib/Checkbox/CheckboxFilterList.js +2 -2
- package/lib/Checkbox/styles.d.ts +5 -5
- package/lib/Checkbox/styles.js +1 -2
- package/lib/CloseButton/index.js +1 -1
- package/lib/Divider/Divider.js +1 -1
- package/lib/Divider/Divider.styles.d.ts +2 -2
- package/lib/Dropdown/Content/DropdownInput.js +1 -1
- package/lib/Dropdown/Content/DropdownItem.js +1 -1
- package/lib/Dropdown/Dropdown.js +1 -1
- package/lib/Dropdown/Dropdown.styles.d.ts +7 -7
- package/lib/Dropdown/Dropdown.types.d.ts +2 -2
- package/lib/Dropdown/Triggers/DropdownButtonTrigger.js +1 -1
- package/lib/Dropdown/Triggers/DropdownItemTrigger.js +1 -1
- package/lib/Dropdown/Triggers/FilterTrigger.js +1 -1
- package/lib/Dropdown/Triggers/InputTrigger.js +1 -1
- package/lib/Dropdown/Triggers/SelectTrigger.js +1 -1
- package/lib/ExpandableBox/ExpandableBox.styles.d.ts +2 -2
- package/lib/Flexbox/Flexbox.d.ts +8 -8
- package/lib/Group/Group.styles.d.ts +1 -1
- package/lib/Icon/Icon.js +1 -1
- package/lib/Icon/Icon.styles.d.ts +1 -1
- package/lib/Icon/Icon.styles.js +1 -2
- package/lib/Icon/Icon.types.d.ts +2 -2
- package/lib/IconAndText/IconAndText.js +1 -1
- package/lib/IconAndText/IconAndText.styles.d.ts +1 -1
- package/lib/Icons/Chevrons.d.ts +5 -5
- package/lib/Icons/CodacyIcon.d.ts +2 -2
- package/lib/Icons/Ellipsis.d.ts +2 -2
- package/lib/Icons/Search.d.ts +2 -2
- package/lib/Icons/Severities.d.ts +5 -5
- package/lib/Icons/Sorting.d.ts +3 -3
- package/lib/Icons/Spinner.d.ts +2 -2
- package/lib/Icons/Symbols.d.ts +4 -4
- package/lib/Img/Img.js +1 -1
- package/lib/Img/Img.styles.d.ts +2 -2
- package/lib/Img/Img.styles.js +2 -4
- package/lib/Img/Img.types.d.ts +1 -1
- package/lib/InlineMessage/InlineMessage.js +1 -1
- package/lib/InlineMessage/types.d.ts +1 -1
- package/lib/Input/Input.js +1 -1
- package/lib/Input/styles.d.ts +8 -8
- package/lib/Input/styles.js +1 -2
- package/lib/Input/types.d.ts +1 -1
- package/lib/Labeled/Labeled.js +1 -1
- package/lib/Labeled/styles.d.ts +3 -3
- package/lib/LeftMenu/LeftMenu.js +1 -1
- package/lib/LeftMenu/LeftMenu.styles.d.ts +1 -1
- package/lib/Link/Link.js +1 -1
- package/lib/Link/Link.styles.d.ts +2 -2
- package/lib/Link/Link.types.d.ts +1 -1
- package/lib/Message/Message.js +1 -1
- package/lib/Message/Message.styles.d.ts +1 -1
- package/lib/Message/Message.types.d.ts +1 -1
- package/lib/Modal/ConfirmationModal.js +1 -1
- package/lib/Modal/Modal.js +1 -1
- package/lib/Modal/styles.d.ts +6 -6
- package/lib/Modal/styles.js +7 -14
- package/lib/Modal/types.d.ts +1 -1
- package/lib/MoreInfo/MoreInfo.js +1 -1
- package/lib/MultiSlider/MultiSlider.js +1 -1
- package/lib/MultiSlider/styles.d.ts +2 -2
- package/lib/Orb/Orb.js +1 -1
- package/lib/Orb/styles.d.ts +1 -1
- package/lib/Orb/types.d.ts +1 -1
- package/lib/Panel/Panel.js +1 -1
- package/lib/Panel/Panel.styles.d.ts +1 -1
- package/lib/PillLabel/PillLabel.js +1 -1
- package/lib/PillLabel/PillLabel.styles.d.ts +1 -1
- package/lib/PillLabel/PillLabel.types.d.ts +1 -1
- package/lib/Popup/Popup.js +1 -1
- package/lib/Popup/styles.d.ts +2 -2
- package/lib/ProgressBar/ProgressBar.js +1 -1
- package/lib/ProgressBar/styles.d.ts +3 -3
- package/lib/ProgressBar/types.d.ts +1 -1
- package/lib/Radio/Radio.js +1 -1
- package/lib/Radio/styles.d.ts +4 -4
- package/lib/ScrollableContent/ScrollableContent.js +1 -1
- package/lib/ScrollableContent/ScrollableContent.styles.d.ts +1 -1
- package/lib/Skeleton/Skeleton.js +1 -1
- package/lib/Skeleton/Skeleton.styles.d.ts +1 -1
- package/lib/Skeleton/Skeleton.types.d.ts +1 -1
- package/lib/Slider/styles.d.ts +5 -5
- package/lib/Slider/styles.js +2 -4
- package/lib/StepNumber/StepNumber.js +1 -1
- package/lib/StepNumber/styles.d.ts +1 -1
- package/lib/Stepper/Stepper.js +2 -2
- package/lib/Stepper/Stepper.styles.d.ts +4 -4
- package/lib/Stepper/Stepper.types.d.ts +1 -1
- package/lib/Switcher/Switcher.js +1 -1
- package/lib/Switcher/Switcher.styles.d.ts +2 -2
- package/lib/Tab/Tab.d.ts +2 -2
- package/lib/Tab/Tab.js +1 -1
- package/lib/Tab/Tab.styles.d.ts +2 -2
- package/lib/Table/NewSelectableTable.js +1 -1
- package/lib/Table/SelectableTable.d.ts +2 -2
- package/lib/Table/SelectableTable.js +1 -1
- package/lib/Table/Table.js +2 -2
- package/lib/Table/Table.styles.d.ts +7 -7
- package/lib/Table/Table.styles.js +1 -2
- package/lib/Table/Table.types.d.ts +3 -3
- package/lib/TagsInput/TagsInput.js +1 -1
- package/lib/TagsInput/style.d.ts +2 -2
- package/lib/TagsInput/types.d.ts +1 -1
- package/lib/Textarea/Textarea.js +1 -1
- package/lib/Textarea/Textarea.styles.d.ts +4 -4
- package/lib/ThemeProvider/ThemeProvider.d.ts +1 -1
- package/lib/Toast/Toast.d.ts +2 -2
- package/lib/Toast/Toast.js +1 -1
- package/lib/Toast/styles.d.ts +1 -1
- package/lib/Toast/types.d.ts +2 -2
- package/lib/Toggle/Toggle.js +1 -1
- package/lib/Toggle/styles.d.ts +4 -4
- package/lib/Toggle/styles.js +1 -2
- package/lib/Tooltip/Tooltip.js +1 -1
- package/lib/Tooltip/styles.d.ts +3 -3
- package/lib/Tooltip/styles.js +1 -2
- package/lib/Tooltip/types.d.ts +2 -2
- package/lib/Typography/Typography.js +1 -1
- package/lib/Typography/Typography.styles.d.ts +7 -7
- package/lib/Typography/Typography.types.d.ts +5 -5
- package/lib/theme/ColorSchemes/components/issues.d.ts +4 -4
- package/lib/theme/ColorSchemes/components/utils.d.ts +1 -1
- package/lib/theme/ColorSchemes/light/index.d.ts +4 -4
- package/lib/theme/ColorSchemes/primitives/blue.d.ts +3 -3
- package/lib/theme/ColorSchemes/primitives/green.d.ts +3 -3
- package/lib/theme/ColorSchemes/primitives/grey.d.ts +3 -3
- package/lib/theme/ColorSchemes/primitives/index.d.ts +2 -2
- package/lib/theme/ColorSchemes/primitives/magenta.d.ts +3 -3
- package/lib/theme/ColorSchemes/primitives/orange.d.ts +3 -3
- package/lib/theme/ColorSchemes/primitives/purple.d.ts +3 -3
- package/lib/theme/ColorSchemes/primitives/red.d.ts +3 -3
- package/lib/theme/ColorSchemes/primitives/teal.d.ts +3 -3
- package/lib/theme/ColorSchemes/primitives/yellow.d.ts +3 -3
- package/lib/theme/ColorSchemes/semantics.d.ts +3 -3
- package/lib/theme/theme.d.ts +7 -7
- package/lib/types.d.ts +1 -1
- package/lib/utils/reactNodeToText.js +2 -2
- package/package.json +3 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (
|
|
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/
|
|
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
|
|
5
|
-
export
|
|
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
|
|
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
|
|
28
|
-
export
|
|
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
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
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
|
-
|
|
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
|
|
220
|
-
export
|
|
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
|
|
853
|
-
export
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
|
115
|
-
export
|
|
114
|
+
export type PrimitiveColor = keyof typeof primitiveColors;
|
|
115
|
+
export type PrimitiveColorScheme = {
|
|
116
116
|
[key in PrimitiveColor]: string;
|
|
117
117
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
-
|
|
1
|
+
type FunctionalName = 'text' | 'background' | 'border' | 'icon' | 'link';
|
|
2
2
|
declare const semantics: readonly ["danger", "success", "warning", "info", "attention", "critical", "high", "medium", "minor"];
|
|
3
|
-
|
|
4
|
-
|
|
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;
|
package/lib/theme/theme.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { AllColorsKeys, ColorScheme } from './';
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
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
|
|
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 (
|
|
20
|
+
if (/*#__PURE__*/isValidElement(child) && hasChildren(child)) {
|
|
21
21
|
newText = reactNodeToText(child.props.children);
|
|
22
|
-
} else if (
|
|
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.
|
|
3
|
+
"version": "0.66.63",
|
|
4
4
|
"description": "",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"author": "",
|
|
@@ -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
|
}
|