@via-profit/ui-kit 0.1.0-rc.7 → 0.1.0-rc.9
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/Autocomplete/index.d.ts +2 -2
- package/Button/ButtonAccent.d.ts +3 -8
- package/Button/ButtonAccent.js +23 -24
- package/Button/ButtonBase.d.ts +4 -1
- package/Button/ButtonBase.js +10 -6
- package/Button/ButtonStandard.d.ts +3 -14
- package/Button/ButtonStandard.js +26 -27
- package/Button/components/EndIconWrapper.d.ts +6 -0
- package/Button/components/EndIconWrapper.js +10 -0
- package/Button/components/StartIconWrapper.d.ts +6 -0
- package/Button/components/StartIconWrapper.js +10 -0
- package/Button/components/TextWrapper.d.ts +6 -0
- package/Button/components/TextWrapper.js +12 -0
- package/Button/index.d.ts +1 -1
- package/SelectBox/index.d.ts +2 -2
- package/ThemeProvider/createTheme.d.ts +1 -33
- package/ThemeProvider/index.d.ts +2 -1
- package/color/Color.d.ts +1 -20
- package/package.json +1 -2
- package/index.d.ts +0 -4
- package/index.js +0 -23
package/Autocomplete/index.d.ts
CHANGED
|
@@ -30,11 +30,11 @@ export type AutocompleteRef<T> = Pick<MenuRef<T>, 'scrollToItem' | 'scrollTo' |
|
|
|
30
30
|
readonly blur: () => void;
|
|
31
31
|
readonly clearInput: () => void;
|
|
32
32
|
};
|
|
33
|
-
declare const _default: <T, Multiple extends boolean | undefined = undefined>(props: Pick<MenuProps<T, Multiple>, "zIndex" | "value" | "
|
|
33
|
+
declare const _default: <T, Multiple extends boolean | undefined = undefined>(props: Pick<MenuProps<T, Multiple>, "zIndex" | "value" | "multiple" | "overscanCount" | "isOpen" | "estimatedItemSize" | "items" | "endThreshold" | "getOptionSelected" | "onEndReached" | "onSelectItem" | "renderItem" | "onRequestClose"> & {
|
|
34
34
|
readonly containerRef?: React.Ref<HTMLDivElement> | undefined;
|
|
35
35
|
readonly itemToString: ItemToString<T, Multiple>;
|
|
36
36
|
readonly renderInput: (params: RenderInputProps<T, Multiple>) => React.ReactNode;
|
|
37
|
-
readonly onRequestOpen: (event?: MouseEvent |
|
|
37
|
+
readonly onRequestOpen: (event?: MouseEvent | FocusEvent | KeyboardEvent | React.FocusEvent<Element, Element> | React.KeyboardEvent<Element> | React.MouseEvent<Element, MouseEvent> | undefined) => void;
|
|
38
38
|
readonly onInputChange?: React.ChangeEventHandler<HTMLInputElement> | undefined;
|
|
39
39
|
readonly filterItems?: ((items: readonly T[], data: {
|
|
40
40
|
readonly query: string;
|
package/Button/ButtonAccent.d.ts
CHANGED
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
declare const _default: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
7
|
-
readonly startIcon?: JSX.Element | undefined;
|
|
8
|
-
readonly endIcon?: JSX.Element | undefined;
|
|
9
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
|
2
|
+
import { ButtonBaseProps } from './ButtonBase';
|
|
3
|
+
export type ButtonAccentProps = ButtonBaseProps;
|
|
4
|
+
declare const _default: React.ForwardRefExoticComponent<ButtonBaseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
10
5
|
export default _default;
|
package/Button/ButtonAccent.js
CHANGED
|
@@ -16,33 +16,32 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
const react_1 = __importDefault(require("react"));
|
|
18
18
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
19
|
+
const react_2 = require("@emotion/react");
|
|
19
20
|
const ButtonBase_1 = __importDefault(require("./ButtonBase"));
|
|
20
21
|
const Button = (0, styled_1.default)(ButtonBase_1.default) `
|
|
21
|
-
color: ${({ theme }) =>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
22
|
+
color: ${({ theme, disabled }) => disabled
|
|
23
|
+
? theme.colors.textPrimary.alpha(0.4).toString()
|
|
24
|
+
: theme.colors.accentPrimaryContrast.toString()};
|
|
25
|
+
background-color: ${({ theme, disabled }) => disabled
|
|
26
|
+
? theme.colors.backgroundGrey.darken(30).toString()
|
|
27
|
+
: theme.colors.accentPrimary.toString()};
|
|
28
|
+
|
|
29
|
+
${({ disabled, theme }) => !disabled &&
|
|
30
|
+
(0, react_2.css) `
|
|
31
|
+
box-shadow: 0 2px 12px ${theme.colors.accentPrimary.darken(60).alpha(0.3).toString()};
|
|
32
|
+
&:hover {
|
|
33
|
+
background-color: ${theme.colors.accentPrimary.darken(20).toString()};
|
|
34
|
+
}
|
|
35
|
+
&:active {
|
|
36
|
+
background-color: ${theme.colors.accentPrimary.darken(30).toString()};
|
|
37
|
+
}
|
|
38
|
+
&:focus-visible {
|
|
39
|
+
outline: 2px solid ${theme.colors.accentPrimary.darken(20).toString()};
|
|
40
|
+
}
|
|
41
|
+
`};
|
|
40
42
|
`;
|
|
41
43
|
const ButtonAccent = (props, ref) => {
|
|
42
|
-
const { children
|
|
43
|
-
return (react_1.default.createElement(Button, Object.assign({},
|
|
44
|
-
typeof startIcon !== 'undefined' && startIcon !== null && (react_1.default.createElement(StartIconWrapper, null, startIcon)),
|
|
45
|
-
children,
|
|
46
|
-
typeof endIcon !== 'undefined' && endIcon !== null && (react_1.default.createElement(EndIconWrapper, null, endIcon))));
|
|
44
|
+
const { children } = props, restProps = __rest(props, ["children"]);
|
|
45
|
+
return (react_1.default.createElement(Button, Object.assign({}, restProps, { ref: ref }), children));
|
|
47
46
|
};
|
|
48
47
|
exports.default = react_1.default.forwardRef(ButtonAccent);
|
package/Button/ButtonBase.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
export
|
|
2
|
+
export interface ButtonBaseProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
3
|
+
readonly startIcon?: JSX.Element;
|
|
4
|
+
readonly endIcon?: JSX.Element;
|
|
5
|
+
}
|
|
3
6
|
declare const _default: React.ForwardRefExoticComponent<ButtonBaseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
4
7
|
export default _default;
|
package/Button/ButtonBase.js
CHANGED
|
@@ -16,24 +16,28 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
const react_1 = __importDefault(require("react"));
|
|
18
18
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
19
|
+
const StartIconWrapper_1 = __importDefault(require("./components/StartIconWrapper"));
|
|
20
|
+
const EndIconWrapper_1 = __importDefault(require("./components/EndIconWrapper"));
|
|
21
|
+
const TextWrapper_1 = __importDefault(require("./components/TextWrapper"));
|
|
19
22
|
const Button = styled_1.default.button `
|
|
20
23
|
border-radius: ${({ theme }) => theme.shape.radiusFactor * 2}em;
|
|
21
24
|
padding: 0.8em 1em;
|
|
22
25
|
font-size: 0.8rem;
|
|
23
|
-
cursor: pointer;
|
|
26
|
+
cursor: ${({ disabled }) => (disabled ? 'default' : 'pointer')};
|
|
24
27
|
font-size: 1em;
|
|
25
28
|
border: 0;
|
|
26
29
|
outline: transparent;
|
|
27
30
|
transition: all 180ms ease-out 0s;
|
|
28
31
|
background: none;
|
|
29
32
|
color: currentColor;
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
font-size: 0.86em;
|
|
33
|
+
display: inline-flex;
|
|
34
|
+
align-items: center;
|
|
33
35
|
`;
|
|
34
36
|
const ButtonBase = (props, ref) => {
|
|
35
|
-
const { children } = props, otherProps = __rest(props, ["children"]);
|
|
37
|
+
const { children, startIcon, endIcon } = props, otherProps = __rest(props, ["children", "startIcon", "endIcon"]);
|
|
36
38
|
return (react_1.default.createElement(Button, Object.assign({}, otherProps, { ref: ref }),
|
|
37
|
-
react_1.default.createElement(
|
|
39
|
+
typeof startIcon !== 'undefined' && startIcon !== null && (react_1.default.createElement(StartIconWrapper_1.default, null, startIcon)),
|
|
40
|
+
react_1.default.createElement(TextWrapper_1.default, null, children),
|
|
41
|
+
typeof endIcon !== 'undefined' && endIcon !== null && (react_1.default.createElement(EndIconWrapper_1.default, null, endIcon))));
|
|
38
42
|
};
|
|
39
43
|
exports.default = react_1.default.forwardRef(ButtonBase);
|
|
@@ -1,19 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { ButtonBaseProps } from './ButtonBase';
|
|
2
3
|
/**
|
|
3
4
|
* Standard
|
|
4
5
|
*/
|
|
5
|
-
export type ButtonStandardProps =
|
|
6
|
-
|
|
7
|
-
* Starticon
|
|
8
|
-
*/
|
|
9
|
-
readonly startIcon?: JSX.Element;
|
|
10
|
-
readonly endIcon?: JSX.Element;
|
|
11
|
-
};
|
|
12
|
-
declare const _default: React.ForwardRefExoticComponent<React.ButtonHTMLAttributes<HTMLButtonElement> & {
|
|
13
|
-
/**
|
|
14
|
-
* Starticon
|
|
15
|
-
*/
|
|
16
|
-
readonly startIcon?: JSX.Element | undefined;
|
|
17
|
-
readonly endIcon?: JSX.Element | undefined;
|
|
18
|
-
} & React.RefAttributes<HTMLButtonElement>>;
|
|
6
|
+
export type ButtonStandardProps = ButtonBaseProps;
|
|
7
|
+
declare const _default: React.ForwardRefExoticComponent<ButtonBaseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
19
8
|
export default _default;
|
package/Button/ButtonStandard.js
CHANGED
|
@@ -16,35 +16,34 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
const react_1 = __importDefault(require("react"));
|
|
18
18
|
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
19
|
+
const react_2 = require("@emotion/react");
|
|
19
20
|
const ButtonBase_1 = __importDefault(require("./ButtonBase"));
|
|
20
|
-
const
|
|
21
|
-
color: ${({ theme }) =>
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
21
|
+
const StyledButtonBase = (0, styled_1.default)(ButtonBase_1.default) `
|
|
22
|
+
color: ${({ theme, disabled }) => disabled
|
|
23
|
+
? theme.colors.textPrimary.alpha(0.4).toString()
|
|
24
|
+
: theme.colors.textPrimary.toString()};
|
|
25
|
+
background-color: ${({ theme, disabled }) => disabled
|
|
26
|
+
? theme.colors.backgroundGrey.darken(10).toString()
|
|
27
|
+
: theme.isDark
|
|
28
|
+
? theme.colors.backgroundPrimary.lighten(20).toString()
|
|
29
|
+
: theme.colors.backgroundPrimary.toString()};
|
|
30
|
+
|
|
31
|
+
${({ disabled, theme }) => !disabled &&
|
|
32
|
+
(0, react_2.css) `
|
|
33
|
+
box-shadow: 0 2px 12px ${theme.colors.backgroundPrimary.darken(40).alpha(0.6).toString()};
|
|
34
|
+
&:hover {
|
|
35
|
+
background-color: ${theme.colors.backgroundPrimary.darken(20).toString()};
|
|
36
|
+
}
|
|
37
|
+
&:active {
|
|
38
|
+
background-color: ${theme.colors.backgroundPrimary.darken(40).toString()};
|
|
39
|
+
}
|
|
40
|
+
&:focus-visible {
|
|
41
|
+
outline: 2px solid ${theme.colors.accentPrimary.toString()};
|
|
42
|
+
}
|
|
43
|
+
`}
|
|
42
44
|
`;
|
|
43
45
|
const ButtonStandard = (props, ref) => {
|
|
44
|
-
const { children,
|
|
45
|
-
return (react_1.default.createElement(
|
|
46
|
-
typeof startIcon !== 'undefined' && startIcon !== null && (react_1.default.createElement(StartIconWrapper, null, startIcon)),
|
|
47
|
-
children,
|
|
48
|
-
typeof endIcon !== 'undefined' && endIcon !== null && (react_1.default.createElement(EndIconWrapper, null, endIcon))));
|
|
46
|
+
const { children, disabled } = props, restProps = __rest(props, ["children", "disabled"]);
|
|
47
|
+
return (react_1.default.createElement(StyledButtonBase, Object.assign({ disabled: disabled }, restProps, { ref: ref }), children));
|
|
49
48
|
};
|
|
50
49
|
exports.default = react_1.default.forwardRef(ButtonStandard);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const EndIconWrapper: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
6
|
+
export default EndIconWrapper;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
7
|
+
const EndIconWrapper = styled_1.default.span `
|
|
8
|
+
margin-left: 0.8em;
|
|
9
|
+
`;
|
|
10
|
+
exports.default = EndIconWrapper;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const StartIconWrapper: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
6
|
+
export default StartIconWrapper;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
7
|
+
const StartIconWrapper = styled_1.default.span `
|
|
8
|
+
margin-right: 0.8em;
|
|
9
|
+
`;
|
|
10
|
+
exports.default = StartIconWrapper;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
declare const TextWrapper: import("@emotion/styled").StyledComponent<{
|
|
3
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
4
|
+
as?: import("react").ElementType<any> | undefined;
|
|
5
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
6
|
+
export default TextWrapper;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const styled_1 = __importDefault(require("@emotion/styled"));
|
|
7
|
+
const TextWrapper = styled_1.default.span `
|
|
8
|
+
font-size: 0.86em;
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
`;
|
|
12
|
+
exports.default = TextWrapper;
|
package/Button/index.d.ts
CHANGED
|
@@ -5,5 +5,5 @@ interface BaseProps {
|
|
|
5
5
|
readonly variant?: 'standard' | 'accent';
|
|
6
6
|
}
|
|
7
7
|
export type ButtonProps = (ButtonStandardProps | ButtonAccentProps) & BaseProps;
|
|
8
|
-
declare const _default: React.ForwardRefExoticComponent<
|
|
8
|
+
declare const _default: React.ForwardRefExoticComponent<import("./ButtonBase").ButtonBaseProps & BaseProps & React.RefAttributes<HTMLButtonElement>>;
|
|
9
9
|
export default _default;
|
package/SelectBox/index.d.ts
CHANGED
|
@@ -26,11 +26,11 @@ export type SelectBoxProps<T, Multiple extends boolean | undefined = undefined>
|
|
|
26
26
|
readonly containerRef?: React.Ref<SelectoBoxContainerRef>;
|
|
27
27
|
readonly notSelectedLabel?: React.ReactNode;
|
|
28
28
|
};
|
|
29
|
-
declare const _default: <T, Multiple extends boolean | undefined = false>(props: Pick<MenuProps<T, Multiple>, "zIndex" | "value" | "
|
|
29
|
+
declare const _default: <T, Multiple extends boolean | undefined = false>(props: Pick<MenuProps<T, Multiple>, "zIndex" | "value" | "multiple" | "overscanCount" | "isOpen" | "estimatedItemSize" | "items" | "endThreshold" | "getOptionSelected" | "onEndReached" | "onSelectItem" | "renderItem" | "onRequestClose"> & {
|
|
30
30
|
readonly fullWidth?: boolean | undefined;
|
|
31
31
|
readonly itemToString: ItemToString<T, Multiple>;
|
|
32
32
|
readonly renderInput?: ((params: RenderInputProps<T, Multiple>) => React.ReactNode) | undefined;
|
|
33
|
-
readonly onRequestOpen: (event?: MouseEvent |
|
|
33
|
+
readonly onRequestOpen: (event?: MouseEvent | FocusEvent | KeyboardEvent | React.FocusEvent<Element, Element> | React.KeyboardEvent<Element> | React.MouseEvent<Element, MouseEvent> | undefined) => void;
|
|
34
34
|
} & {
|
|
35
35
|
readonly containerRef?: React.Ref<HTMLButtonElement> | undefined;
|
|
36
36
|
readonly notSelectedLabel?: React.ReactNode;
|
|
@@ -1,35 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export type CreateTheme = (overrides?: UIThemeOverrides) => UITheme;
|
|
3
|
-
export interface UITheme {
|
|
4
|
-
readonly isDark: boolean;
|
|
5
|
-
readonly fontSize: Record<'small' | 'normal' | 'medium' | 'large', number>;
|
|
6
|
-
readonly zIndex: {
|
|
7
|
-
readonly header: number;
|
|
8
|
-
readonly mainDrawer: number;
|
|
9
|
-
readonly modal: number;
|
|
10
|
-
};
|
|
11
|
-
readonly colors: {
|
|
12
|
-
readonly backgroundPrimary: ColorInterface;
|
|
13
|
-
readonly backgroundSecondary: ColorInterface;
|
|
14
|
-
readonly backgroundGrey: ColorInterface;
|
|
15
|
-
readonly textPrimary: ColorInterface;
|
|
16
|
-
readonly textSecondary: ColorInterface;
|
|
17
|
-
readonly accentPrimary: ColorInterface;
|
|
18
|
-
readonly accentPrimaryContrast: ColorInterface;
|
|
19
|
-
readonly accentSecondary: ColorInterface;
|
|
20
|
-
readonly accentSecondaryContrast: ColorInterface;
|
|
21
|
-
readonly error: ColorInterface;
|
|
22
|
-
};
|
|
23
|
-
readonly shape: {
|
|
24
|
-
readonly radiusFactor: 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9 | 1;
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
export interface UIThemeOverrides {
|
|
28
|
-
readonly isDark?: UITheme['isDark'];
|
|
29
|
-
readonly fontSize?: UITheme['fontSize'];
|
|
30
|
-
readonly zIndex?: UITheme['zIndex'];
|
|
31
|
-
readonly colors?: Partial<Record<keyof UITheme['colors'], string>>;
|
|
32
|
-
readonly shape?: UITheme['shape'];
|
|
33
|
-
}
|
|
1
|
+
import type { UITheme, UIThemeOverrides } from '@via-profit/ui-kit';
|
|
34
2
|
declare const createTheme: (overrides?: UIThemeOverrides) => UITheme;
|
|
35
3
|
export default createTheme;
|
package/ThemeProvider/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { UITheme } from '
|
|
2
|
+
import type { UITheme, UIThemeOverrides } from '@via-profit/ui-kit';
|
|
3
|
+
export { UITheme, UIThemeOverrides };
|
|
3
4
|
export interface ThemeProviderProps {
|
|
4
5
|
readonly children: React.ReactNode | readonly React.ReactNode[];
|
|
5
6
|
readonly theme: UITheme;
|
package/color/Color.d.ts
CHANGED
|
@@ -1,23 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
parseColor(value: string | Color): ParsedColor;
|
|
3
|
-
shade(decimal: number): this;
|
|
4
|
-
alpha(decimal: number): this;
|
|
5
|
-
lighten(decimal: number): this;
|
|
6
|
-
darken(decimal: number): this;
|
|
7
|
-
getHextByWebColor(value: string): string;
|
|
8
|
-
rgb(): ParsedColor;
|
|
9
|
-
rgbString(): string;
|
|
10
|
-
hexString(): string;
|
|
11
|
-
toString(): string;
|
|
12
|
-
luminance(): number;
|
|
13
|
-
contrast(rgb2: string | Color): number;
|
|
14
|
-
}
|
|
15
|
-
export type ParsedColor = {
|
|
16
|
-
r: number;
|
|
17
|
-
g: number;
|
|
18
|
-
b: number;
|
|
19
|
-
a: number;
|
|
20
|
-
};
|
|
1
|
+
import type { ColorInterface, ParsedColor } from '@via-profit/ui-kit/color';
|
|
21
2
|
declare class Color implements ColorInterface {
|
|
22
3
|
#private;
|
|
23
4
|
constructor(value: string | Color);
|
package/package.json
CHANGED
package/index.d.ts
DELETED
package/index.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
17
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
18
|
-
};
|
|
19
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
|
-
exports.Button = void 0;
|
|
21
|
-
const Button_1 = __importDefault(require("./Button"));
|
|
22
|
-
exports.Button = Button_1.default;
|
|
23
|
-
__exportStar(require("./Button"), exports);
|