@kvdbil/components 16.0.2 → 16.0.3
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/cjs/components/Badge/index.js +1 -1
- package/cjs/components/Breadcrumbs/BreadcrumbsItem.js +1 -1
- package/cjs/components/Button/index.js +1 -1
- package/cjs/components/Button/styles.js +1 -1
- package/cjs/components/Card/index.js +8 -8
- package/cjs/components/CheckBox/index.js +12 -11
- package/cjs/components/DayPicker/index.js +2 -2
- package/cjs/components/ErrorMessage/index.js +2 -2
- package/cjs/components/FieldLabel.js +4 -4
- package/cjs/components/IconButton.js +15 -16
- package/cjs/components/RadioButton/index.js +24 -23
- package/cjs/components/Select/index.js +9 -9
- package/cjs/components/Snackbar/index.js +6 -5
- package/cjs/components/Spinner/index.js +1 -1
- package/cjs/components/Stamp/index.js +1 -1
- package/cjs/components/Stepper/index.js +15 -14
- package/cjs/components/StepperAccordion/index.js +13 -13
- package/cjs/components/Switcher/index.js +2 -2
- package/cjs/components/Tabs/Tab.js +5 -5
- package/cjs/components/Tabs/Tabs.js +3 -3
- package/cjs/components/TextArea/index.js +4 -4
- package/cjs/components/Toggle/index.js +6 -6
- package/cjs/components/ValuationRange/index.js +15 -15
- package/cjs/index.js +1 -1
- package/cjs/utils/utils.js +2 -2
- package/esm/components/Badge/index.js +1 -1
- package/esm/components/Breadcrumbs/BreadcrumbsItem.js +3 -3
- package/esm/components/Button/index.js +5 -5
- package/esm/components/Button/styles.js +23 -23
- package/esm/components/Card/index.js +9 -9
- package/esm/components/CheckBox/index.js +19 -18
- package/esm/components/DayPicker/index.js +2 -2
- package/esm/components/ErrorMessage/index.js +4 -4
- package/esm/components/FieldLabel.js +16 -16
- package/esm/components/IconButton.js +12 -13
- package/esm/components/RadioButton/index.js +28 -27
- package/esm/components/Select/index.js +4 -4
- package/esm/components/Snackbar/index.js +16 -15
- package/esm/components/Spinner/index.js +3 -3
- package/esm/components/Stamp/index.js +1 -1
- package/esm/components/Stepper/index.js +33 -32
- package/esm/components/StepperAccordion/index.js +21 -21
- package/esm/components/Switcher/index.js +4 -4
- package/esm/components/Tabs/Tab.js +5 -5
- package/esm/components/Tabs/Tabs.js +8 -8
- package/esm/components/TextArea/index.js +2 -2
- package/esm/components/Toggle/index.js +6 -6
- package/esm/components/ValuationRange/index.js +15 -15
- package/esm/index.js +1 -1
- package/esm/utils/utils.js +2 -2
- package/package.json +1 -1
- package/package.json.tmp +1 -1
- package/types/components/Button/styles.d.ts +2 -2
- package/types/components/Card/index.d.ts +4 -1
- package/types/components/CheckBox/index.d.ts +3 -2
- package/types/components/DayPicker/index.d.ts +3 -2
- package/types/components/IconButton.d.ts +5 -3
- package/types/components/RadioButton/index.d.ts +3 -2
- package/types/components/Select/index.d.ts +3 -2
- package/types/components/Stamp/index.d.ts +3 -2
- package/types/components/Stepper/index.d.ts +3 -2
- package/types/components/StepperAccordion/index.d.ts +2 -1
- package/types/components/Switcher/index.d.ts +3 -2
- package/types/components/Tabs/Tab.d.ts +2 -1
- package/types/components/Tabs/Tabs.d.ts +3 -2
- package/types/components/Toggle/index.d.ts +3 -2
- package/types/components/ValuationRange/index.d.ts +3 -2
- package/types/index.d.ts +1 -1
- package/types/utils/utils.d.ts +9 -1
package/esm/utils/utils.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{css as
|
|
1
|
+
import{css as s}from"styled-components";const i=e=>{let t=0,a=0,r=0;return e.length===4?(t=parseInt("0x"+e[1]+e[1]),a=parseInt("0x"+e[2]+e[2]),r=parseInt("0x"+e[3]+e[3])):e.length===7&&(t=parseInt("0x"+e[1]+e[2]),a=parseInt("0x"+e[3]+e[4]),r=parseInt("0x"+e[5]+e[6])),(Math.max(Number(t/255),Number(a/255),Number(r/255))+Math.min(Number(t/255),Number(a/255),Number(r/255)))/2*100},c=(e,t=1)=>{const a=parseInt(e.slice(1,3),16),r=parseInt(e.slice(3,5),16),l=parseInt(e.slice(5,7),16);return`rgba(${a}, ${r}, ${l}, ${t})`},g=s`
|
|
2
2
|
appearance: none;
|
|
3
3
|
background-color: transparent;
|
|
4
4
|
border: 0;
|
|
@@ -6,4 +6,4 @@ import{css as l}from"styled-components";const s=e=>{let a=0,r=0,t=0;return e.len
|
|
|
6
6
|
font-family: inherit;
|
|
7
7
|
outline: none;
|
|
8
8
|
padding: 0;
|
|
9
|
-
`,
|
|
9
|
+
`,o=e=>({darker:e.colors.grayscaleNeutral.dark1,dark:e.colors.grayscaleNeutral.dark1,mainAlt:e.colors.grayscaleToned.dark1,main:e.colors.grayscaleToned.dark1,light:e.colors.grayscaleToned.light1,lighter:e.colors.grayscaleToned.light2,lighter2:e.colors.grayscaleToned.light3,lighter3:e.colors.grayscaleToned.light4}),h=(e,t)=>t==="neutral"?o(e):e.colors[t],n=["darker","dark","mainAlt","main","light","lighter","lighter2","lighter3"],d=e=>{const t=n.indexOf(e);return t>=0&&t<n.length-1?n[t+1]:e},u=e=>{const t=n.indexOf(e);return t>0?n[t-1]:e};export{u as getDarkerShade,d as getLighterShade,i as getLuminosity,c as hexToRGB,o as neutralColorSwap,g as resetButtonStyle,h as resolveColorWithNeutral};
|
package/package.json
CHANGED
package/package.json.tmp
CHANGED
|
@@ -17,7 +17,7 @@ export declare const largeSizeStyles: () => string;
|
|
|
17
17
|
export declare const disabledColorStyles: (theme: Theme, variant: Variant) => string;
|
|
18
18
|
export declare const colorStyles: {
|
|
19
19
|
solid: ({ theme, $color, $colorShade }: ColorStylesProp) => string;
|
|
20
|
-
outline: ({ theme, $color }: ColorStylesProp) => string;
|
|
21
|
-
flat: ({ theme, $color }: ColorStylesProp) => string;
|
|
20
|
+
outline: ({ theme, $color, $colorShade, }: ColorStylesProp) => string;
|
|
21
|
+
flat: ({ theme, $color, $colorShade }: ColorStylesProp) => string;
|
|
22
22
|
};
|
|
23
23
|
export {};
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { Color, ColorShade } from '../../Types';
|
|
2
3
|
export interface CardProps {
|
|
3
4
|
children: ReactNode;
|
|
4
5
|
topBorder?: string;
|
|
6
|
+
topBorderColor?: Color;
|
|
7
|
+
topBorderColorShade?: ColorShade;
|
|
5
8
|
noFrame?: boolean;
|
|
6
9
|
lineBorder?: boolean;
|
|
7
10
|
as?: keyof JSX.IntrinsicElements;
|
|
8
11
|
}
|
|
9
|
-
export declare const Card: ({ children, topBorder, noFrame, lineBorder, as: element, }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const Card: ({ children, topBorder, topBorderColor, topBorderColorShade, noFrame, lineBorder, as: element, }: CardProps) => import("react/jsx-runtime").JSX.Element;
|
|
10
13
|
export default Card;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
-
import { CheckboxSize, Color } from '../../Types';
|
|
2
|
+
import { CheckboxSize, Color, ColorShade } from '../../Types';
|
|
3
3
|
type ComponentPropsWithoutSize = Omit<ComponentPropsWithoutRef<'input'>, 'size'>;
|
|
4
4
|
export interface CheckBoxProps extends ComponentPropsWithoutSize {
|
|
5
5
|
name?: string;
|
|
6
6
|
size?: CheckboxSize;
|
|
7
7
|
color?: Color;
|
|
8
|
+
colorShade?: ColorShade;
|
|
8
9
|
checked?: boolean;
|
|
9
10
|
isDisabled?: boolean;
|
|
10
11
|
hasError?: boolean;
|
|
11
12
|
label?: ReactNode;
|
|
12
13
|
}
|
|
13
|
-
export declare const CheckBox: ({ name, isDisabled, size, checked, color, hasError, label, ...rest }: CheckBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const CheckBox: ({ name, isDisabled, size, checked, color, colorShade, hasError, label, ...rest }: CheckBoxProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
export default CheckBox;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { PropsBase } from 'react-day-picker';
|
|
2
2
|
import { Locale } from '../../Types';
|
|
3
|
-
import { Color } from '../../Types';
|
|
3
|
+
import { Color, ColorShade } from '../../Types';
|
|
4
4
|
export interface DayPickerProps extends Omit<PropsBase, 'locale'> {
|
|
5
5
|
locale?: Locale;
|
|
6
6
|
color?: Color;
|
|
7
7
|
selectedDay?: Date;
|
|
8
8
|
disabledDays?: Date[];
|
|
9
|
+
colorShade?: ColorShade;
|
|
9
10
|
}
|
|
10
|
-
export declare const DayPicker: ({ locale, color, selectedDay, disabledDays, ...props }: DayPickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export declare const DayPicker: ({ locale, color, colorShade, selectedDay, disabledDays, ...props }: DayPickerProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
12
|
export default DayPicker;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import { KeyboardEvent, MouseEvent, ReactNode } from 'react';
|
|
2
|
-
import { ColorWithNeutral } from '../Types';
|
|
2
|
+
import { ColorShade, ColorWithNeutral } from '../Types';
|
|
3
3
|
export declare const BackgroundStyles: import("styled-components").RuleSet<{
|
|
4
|
-
color: ColorWithNeutral;
|
|
4
|
+
$color: ColorWithNeutral;
|
|
5
|
+
$colorShade: ColorShade;
|
|
5
6
|
isDisabled: boolean;
|
|
6
7
|
}>;
|
|
7
8
|
interface Props {
|
|
8
9
|
color: ColorWithNeutral;
|
|
10
|
+
colorShade?: ColorShade;
|
|
9
11
|
children: ReactNode;
|
|
10
12
|
isActive: boolean;
|
|
11
13
|
isDisabled: boolean;
|
|
12
14
|
noTabIndex?: boolean;
|
|
13
15
|
onClick?(event: MouseEvent<HTMLDivElement> | KeyboardEvent<HTMLDivElement>): void;
|
|
14
16
|
}
|
|
15
|
-
declare const IconButton: ({ children, isActive, isDisabled, onClick, noTabIndex, color, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare const IconButton: ({ children, isActive, isDisabled, onClick, noTabIndex, color, colorShade, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
16
18
|
export default IconButton;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
-
import { RadioButtonSize, Color } from '../../Types';
|
|
2
|
+
import { RadioButtonSize, Color, ColorShade } from '../../Types';
|
|
3
3
|
type ComponentPropsWithoutSize = Omit<ComponentPropsWithoutRef<'input'>, 'size' | 'type'>;
|
|
4
4
|
export interface RadioButtonProps extends ComponentPropsWithoutSize {
|
|
5
5
|
name?: string;
|
|
6
6
|
color?: Color;
|
|
7
7
|
size?: RadioButtonSize;
|
|
8
|
+
colorShade?: ColorShade;
|
|
8
9
|
checked?: boolean;
|
|
9
10
|
isDisabled?: boolean;
|
|
10
11
|
label?: ReactNode;
|
|
11
12
|
hasError?: boolean;
|
|
12
13
|
}
|
|
13
|
-
export declare const RadioButton: ({ name, size, checked, isDisabled, color, label, hasError, ...props }: RadioButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
export declare const RadioButton: ({ name, size, checked, isDisabled, color, colorShade, label, hasError, ...props }: RadioButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
15
|
export default RadioButton;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode, RefObject } from 'react';
|
|
2
2
|
import { ActionMeta, GroupBase, Props, SelectInstance, DropdownIndicatorProps as SelectDropdownIndicatorProps, OnChangeValue } from 'react-select';
|
|
3
|
-
import { Color } from '../../Types';
|
|
3
|
+
import { Color, ColorShade } from '../../Types';
|
|
4
4
|
export interface DropdownIndicatorProps extends SelectDropdownIndicatorProps {
|
|
5
5
|
isFocused: boolean;
|
|
6
6
|
isDisabled: boolean;
|
|
@@ -13,6 +13,7 @@ export interface SelectProps<Option = OptionType, IsMulti extends boolean = fals
|
|
|
13
13
|
autoFocus?: boolean;
|
|
14
14
|
className?: string;
|
|
15
15
|
color?: Color;
|
|
16
|
+
colorShade?: ColorShade;
|
|
16
17
|
forwardRef?: RefObject<SelectInstance<Option, IsMulti, Group>>;
|
|
17
18
|
hasError?: boolean;
|
|
18
19
|
height?: number;
|
|
@@ -48,5 +49,5 @@ export interface SelectProps<Option = OptionType, IsMulti extends boolean = fals
|
|
|
48
49
|
* );
|
|
49
50
|
* };
|
|
50
51
|
*/
|
|
51
|
-
export declare function Select<Option = OptionType, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ className, color, forwardRef, hasError, height, helperText, isDisabled, onBlur, onFocus, onInputChange, placeholder, name, ...props }: SelectProps<Option, IsMulti, Group>): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
export declare function Select<Option = OptionType, IsMulti extends boolean = false, Group extends GroupBase<Option> = GroupBase<Option>>({ className, color, colorShade, forwardRef, hasError, height, helperText, isDisabled, onBlur, onFocus, onInputChange, placeholder, name, ...props }: SelectProps<Option, IsMulti, Group>): import("react/jsx-runtime").JSX.Element;
|
|
52
53
|
export default Select;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { Color, Locale, StampType, Variant } from '../../Types';
|
|
1
|
+
import { Color, ColorShade, Locale, StampType, Variant } from '../../Types';
|
|
2
2
|
export interface Props {
|
|
3
3
|
color: Color;
|
|
4
|
+
colorShade?: ColorShade;
|
|
4
5
|
appearance: Exclude<Variant, 'flat'>;
|
|
5
6
|
locale: Locale;
|
|
6
7
|
type: StampType;
|
|
7
8
|
size?: number;
|
|
8
9
|
}
|
|
9
|
-
declare const Stamp: ({ color, appearance, locale, type, size }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare const Stamp: ({ color, appearance, locale, type, size, colorShade, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
10
11
|
export default Stamp;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef, ReactNode } from 'react';
|
|
2
|
-
import { Color } from '../../Types';
|
|
2
|
+
import { Color, ColorShade } from '../../Types';
|
|
3
3
|
export interface StepperProps extends ComponentPropsWithoutRef<'div'> {
|
|
4
4
|
children: ReactNode[];
|
|
5
5
|
orientation?: 'horizontal' | 'vertical';
|
|
6
6
|
variant?: 'solid' | 'outline';
|
|
7
7
|
color?: Color;
|
|
8
|
+
colorShade?: ColorShade;
|
|
8
9
|
size?: number;
|
|
9
10
|
activeStep?: number;
|
|
10
11
|
}
|
|
11
|
-
export declare const Stepper: ({ children, orientation, variant, color, size, activeStep, ...props }: StepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const Stepper: ({ children, orientation, variant, color, colorShade, size, activeStep, ...props }: StepperProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { ComponentProps, ReactNode, RefObject } from 'react';
|
|
2
|
-
import { Color } from '../../Types';
|
|
2
|
+
import { Color, ColorShade } from '../../Types';
|
|
3
3
|
export interface StepperAccordionProps extends ComponentProps<'div'> {
|
|
4
4
|
step: number;
|
|
5
5
|
color?: Color;
|
|
6
|
+
colorShade?: ColorShade;
|
|
6
7
|
isComplete?: boolean;
|
|
7
8
|
isExpanded?: boolean;
|
|
8
9
|
isDisabled?: boolean;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Color } from '../../Types';
|
|
1
|
+
import { Color, ColorShade } from '../../Types';
|
|
2
2
|
export interface Props {
|
|
3
3
|
selected?: boolean;
|
|
4
4
|
disabled?: boolean;
|
|
5
5
|
onToggle(selected: boolean): void;
|
|
6
6
|
color?: Color;
|
|
7
|
+
colorShade?: ColorShade;
|
|
7
8
|
}
|
|
8
|
-
export declare const Switcher: ({ selected, disabled, onToggle, color, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export declare const Switcher: ({ selected, disabled, onToggle, color, colorShade, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export default Switcher;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Color } from '../../Types';
|
|
2
|
+
import { Color, ColorShade } from '../../Types';
|
|
3
3
|
import { ReactNode } from 'react';
|
|
4
4
|
export interface TabProps {
|
|
5
5
|
label: ReactNode;
|
|
6
6
|
isDisabled?: boolean;
|
|
7
7
|
isActive?: boolean;
|
|
8
8
|
activeColor?: Color;
|
|
9
|
+
activeColorShade?: ColorShade;
|
|
9
10
|
index?: number;
|
|
10
11
|
id?: number;
|
|
11
12
|
children?: ReactNode;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { Color } from '../../Types';
|
|
2
|
+
import { Color, ColorShade } from '../../Types';
|
|
3
3
|
import { ReactElement } from 'react';
|
|
4
4
|
import { TabProps } from './Tab';
|
|
5
5
|
import { CSSProperties } from 'styled-components';
|
|
@@ -7,6 +7,7 @@ import theme from '../../theme';
|
|
|
7
7
|
type TabElement = ReactElement<TabProps>;
|
|
8
8
|
export interface TabsProps {
|
|
9
9
|
activeColor?: Color;
|
|
10
|
+
activeColorShade?: ColorShade;
|
|
10
11
|
justify?: CSSProperties['justifyContent'];
|
|
11
12
|
activeIndex?: number;
|
|
12
13
|
initalActive?: number;
|
|
@@ -17,5 +18,5 @@ export interface TabsProps {
|
|
|
17
18
|
borderColor?: keyof typeof theme.colors.grayscaleToned;
|
|
18
19
|
headline?: string;
|
|
19
20
|
}
|
|
20
|
-
export declare const Tabs: ({ activeColor, justify, activeIndex, initalActive, children, kbNavAutoOpen, onTabClick, fullWidthBorder, borderColor, headline, }: TabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export declare const Tabs: ({ activeColor, activeColorShade, justify, activeIndex, initalActive, children, kbNavAutoOpen, onTabClick, fullWidthBorder, borderColor, headline, }: TabsProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
22
|
export default Tabs;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import { Color } from '../../Types';
|
|
2
|
+
import { Color, ColorShade } from '../../Types';
|
|
3
3
|
type LeftOrRight = 'LEFT' | 'RIGHT';
|
|
4
4
|
export interface ToggleProps {
|
|
5
5
|
color: Color;
|
|
6
|
+
colorShade?: ColorShade;
|
|
6
7
|
active?: LeftOrRight;
|
|
7
8
|
left: ReactNode;
|
|
8
9
|
right: ReactNode;
|
|
9
10
|
onChange(value: LeftOrRight): void;
|
|
10
11
|
}
|
|
11
|
-
export declare const Toggle: ({ onChange, ...props }: ToggleProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
export declare const Toggle: ({ onChange, color, colorShade, ...props }: ToggleProps) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { Color } from '../../Types';
|
|
1
|
+
import { Color, ColorShade } from '../../Types';
|
|
2
2
|
export interface Props {
|
|
3
3
|
intervalMin?: number;
|
|
4
4
|
intervalMax?: number;
|
|
5
5
|
value?: number;
|
|
6
6
|
color?: Color;
|
|
7
|
+
colorShade?: ColorShade;
|
|
7
8
|
noApproximateSymbol?: boolean;
|
|
8
9
|
isDisabled?: boolean;
|
|
9
10
|
manualValuationText?: string;
|
|
10
11
|
}
|
|
11
|
-
declare const ValuationRange: ({ intervalMin, intervalMax, value, color, noApproximateSymbol, isDisabled, manualValuationText, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
declare const ValuationRange: ({ intervalMin, intervalMax, value, color, colorShade, noApproximateSymbol, isDisabled, manualValuationText, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
12
13
|
export default ValuationRange;
|
package/types/index.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export { useDynamicScript } from './hooks/useDynamicScript';
|
|
|
46
46
|
export { Title, Subtitle, Headline, Display1, Display2, Display3, TinyTitleRegular, TinyTitleBold, } from './typography/Heading';
|
|
47
47
|
export { Quote, Status, BodyLink, BodyText, Caption, CaptionLink, } from './typography/BodyText';
|
|
48
48
|
export { Button as ButtonRegularText, ButtonLarge as ButtonLargeText, ButtonSmall as ButtonSmallText, } from './typography/ButtonText';
|
|
49
|
-
export { hexToRGB, resolveColorWithNeutral } from './utils/utils';
|
|
49
|
+
export { hexToRGB, resolveColorWithNeutral, getLighterShade, getDarkerShade, } from './utils/utils';
|
|
50
50
|
export { resetButtonStyle } from './utils/utils';
|
|
51
51
|
export { ButtonLargeTextStyle, ButtonRegularTextStyle, ButtonSmallTextStyle, } from './typography/ButtonText';
|
|
52
52
|
export { Display3Style, Display2Style, Display1Style, HeadlineStyle, TitleStyle, SubtitleStyle, TinyTitleRegularStyle, TinyTitleBoldStyle, } from './typography/Heading';
|
package/types/utils/utils.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Theme } from '../theme';
|
|
2
|
-
import { ColorWithNeutral } from '../Types';
|
|
2
|
+
import { ColorShade, ColorWithNeutral } from '../Types';
|
|
3
3
|
export declare const getLuminosity: (hexColor: string) => number;
|
|
4
4
|
export declare const hexToRGB: (hex: string, alpha?: number) => string;
|
|
5
5
|
export declare const resetButtonStyle: import("styled-components").RuleSet<object>;
|
|
@@ -9,6 +9,9 @@ export declare const neutralColorSwap: (theme: Theme) => {
|
|
|
9
9
|
mainAlt: "#1a2030";
|
|
10
10
|
main: "#1a2030";
|
|
11
11
|
light: "#8d8f97";
|
|
12
|
+
lighter: "#a4a6ac";
|
|
13
|
+
lighter2: "#babcc2";
|
|
14
|
+
lighter3: "#d1d2d6";
|
|
12
15
|
};
|
|
13
16
|
export declare const resolveColorWithNeutral: (theme: Theme, color: ColorWithNeutral) => {
|
|
14
17
|
darker: "#c48900";
|
|
@@ -79,4 +82,9 @@ export declare const resolveColorWithNeutral: (theme: Theme, color: ColorWithNeu
|
|
|
79
82
|
mainAlt: "#1a2030";
|
|
80
83
|
main: "#1a2030";
|
|
81
84
|
light: "#8d8f97";
|
|
85
|
+
lighter: "#a4a6ac";
|
|
86
|
+
lighter2: "#babcc2";
|
|
87
|
+
lighter3: "#d1d2d6";
|
|
82
88
|
};
|
|
89
|
+
export declare const getLighterShade: (currentShade: ColorShade) => ColorShade;
|
|
90
|
+
export declare const getDarkerShade: (currentShade: ColorShade) => ColorShade;
|