@openfin/ui-library 0.12.0-alpha.1678961199 → 0.12.0
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/dist/components/controls/Button/button.d.ts +3 -3
- package/dist/components/controls/Button/button.variants.d.ts +4 -4
- package/dist/components/controls/ExpandableButton/expandableButton.d.ts +2 -2
- package/dist/components/controls/ExpandableButton/expandablePanel.d.ts +1 -1
- package/dist/components/controls/Toggle/toggle.d.ts +2 -2
- package/dist/components/elements/Badge/badge.d.ts +1 -1
- package/dist/components/elements/DropdownMenu/dropdownMenu.d.ts +6 -5
- package/dist/components/elements/DropdownMenu/{optionTitle.d.ts → dropdownOptionTitle.d.ts} +2 -2
- package/dist/components/elements/DropdownMenu/dropdownOptionsMenu.d.ts +24 -0
- package/dist/components/elements/DropdownMenu/index.d.ts +0 -1
- package/dist/components/elements/Icon/icon.d.ts +4 -4
- package/dist/components/elements/IconWithBadge/iconWithBadge.d.ts +1 -1
- package/dist/components/elements/Loader/loader.d.ts +1 -1
- package/dist/components/elements/Loader/openfinLoader.d.ts +1 -1
- package/dist/components/input/BaseInput/baseInput.d.ts +1 -1
- package/dist/components/input/Checkbox/checkbox.d.ts +1 -1
- package/dist/components/input/RadioGroup/radioGroup.d.ts +2 -2
- package/dist/components/input/RadioInput/radioInput.d.ts +2 -2
- package/dist/components/input/TextInput/textInput.d.ts +1 -1
- package/dist/components/layout/Box/box.d.ts +1 -1
- package/dist/components/layout/Box/types.d.ts +7 -7
- package/dist/components/system/HOC/index.d.ts +2 -2
- package/dist/components/system/ThemeProvider/lib/config.d.ts +3 -3
- package/dist/components/system/ThemeProvider/lib/constants.d.ts +0 -1
- package/dist/components/system/ThemeProvider/lib/helpers.d.ts +1 -1
- package/dist/components/system/ThemeProvider/lib/palette.d.ts +0 -1
- package/dist/components/system/ThemeProvider/lib/types.d.ts +20 -20
- package/dist/components/system/ThemeProvider/themeProvider.d.ts +1 -1
- package/dist/components/typography/Heading/heading.d.ts +105 -111
- package/dist/components/typography/Text/text.d.ts +1 -1
- package/dist/hooks/useColorScheme.d.ts +2 -2
- package/dist/index.d.ts +0 -3
- package/dist/index.js +89 -229
- package/dist/index.js.LICENSE.txt +2 -2
- package/package.json +4 -11
- package/dist/components/elements/Calendar/calendar.d.ts +0 -7
- package/dist/components/elements/Calendar/index.d.ts +0 -1
- package/dist/components/elements/DropdownMenu/menu.d.ts +0 -62
- package/dist/components/input/DateInput/dateInput.d.ts +0 -12
- package/dist/components/input/DateInput/index.d.ts +0 -1
- package/dist/hooks/useDropdownKeyboardNavigation.d.ts +0 -16
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, FC, ReactNode } from 'react';
|
|
2
2
|
import { ButtonShape, ButtonSize, ButtonKind, ButtonLayout } from './button.variants';
|
|
3
|
-
type ButtonPropsWithLabel = {
|
|
3
|
+
declare type ButtonPropsWithLabel = {
|
|
4
4
|
children?: never;
|
|
5
5
|
};
|
|
6
|
-
type ButtonPropsWithChildren = {
|
|
6
|
+
declare type ButtonPropsWithChildren = {
|
|
7
7
|
children: ReactNode;
|
|
8
8
|
};
|
|
9
|
-
export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & (ButtonPropsWithLabel | ButtonPropsWithChildren) & {
|
|
9
|
+
export declare type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & (ButtonPropsWithLabel | ButtonPropsWithChildren) & {
|
|
10
10
|
label?: string;
|
|
11
11
|
href?: string;
|
|
12
12
|
size?: keyof typeof ButtonSize;
|
|
@@ -16,7 +16,7 @@ export declare const ButtonKind: {
|
|
|
16
16
|
readonly secondary: "secondary";
|
|
17
17
|
readonly textOnly: "textOnly";
|
|
18
18
|
};
|
|
19
|
-
export type ButtonKindType = keyof typeof ButtonKind;
|
|
19
|
+
export declare type ButtonKindType = keyof typeof ButtonKind;
|
|
20
20
|
/**
|
|
21
21
|
* Button Size
|
|
22
22
|
*/
|
|
@@ -25,7 +25,7 @@ export declare const ButtonSize: {
|
|
|
25
25
|
readonly base: "base";
|
|
26
26
|
readonly large: "large";
|
|
27
27
|
};
|
|
28
|
-
export type ButtonSizeType = keyof typeof ButtonSize;
|
|
28
|
+
export declare type ButtonSizeType = keyof typeof ButtonSize;
|
|
29
29
|
/**
|
|
30
30
|
* Button Width
|
|
31
31
|
*/
|
|
@@ -33,7 +33,7 @@ export declare const ButtonLayout: {
|
|
|
33
33
|
readonly fit: "fit";
|
|
34
34
|
readonly full: "full";
|
|
35
35
|
};
|
|
36
|
-
export type ButtonLayoutType = keyof typeof ButtonLayout;
|
|
36
|
+
export declare type ButtonLayoutType = keyof typeof ButtonLayout;
|
|
37
37
|
/**
|
|
38
38
|
* Button Shape
|
|
39
39
|
*/
|
|
@@ -41,7 +41,7 @@ export declare const ButtonShape: {
|
|
|
41
41
|
readonly square: "square";
|
|
42
42
|
readonly pill: "pill";
|
|
43
43
|
};
|
|
44
|
-
export type ButtonShapeType = keyof typeof ButtonShape;
|
|
44
|
+
export declare type ButtonShapeType = keyof typeof ButtonShape;
|
|
45
45
|
export declare const variants: {
|
|
46
46
|
readonly size: {
|
|
47
47
|
readonly base: import("styled-components").FlattenInterpolation<import("styled-components").ThemeProps<import("styled-components").DefaultTheme>>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ButtonProps } from '../Button';
|
|
3
3
|
import { ExpandDirection } from './expandDirection';
|
|
4
|
-
export type SecondaryButtonProps = {
|
|
4
|
+
export declare type SecondaryButtonProps = {
|
|
5
5
|
title: string;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
onClick: (event: React.MouseEvent, closeSecondaryButtonsPanel?: () => void) => void;
|
|
8
8
|
};
|
|
9
|
-
export type ExpandableButtonProps = Omit<ButtonProps, 'shape'> & {
|
|
9
|
+
export declare type ExpandableButtonProps = Omit<ButtonProps, 'shape'> & {
|
|
10
10
|
secondaryButtons?: SecondaryButtonProps[];
|
|
11
11
|
closePanelOnSecondaryButtonClick?: boolean;
|
|
12
12
|
expandDirection?: ExpandDirection;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { SecondaryButtonProps } from './expandableButton';
|
|
2
2
|
import { ButtonSizeType } from '../Button';
|
|
3
3
|
import { ExpandDirection } from './expandDirection';
|
|
4
|
-
export type ExpandablePanelProps = {
|
|
4
|
+
export declare type ExpandablePanelProps = {
|
|
5
5
|
secondaryButtons: SecondaryButtonProps[];
|
|
6
6
|
onCollapseRequest: () => void;
|
|
7
7
|
closePanelOnSecondaryButtonClick?: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { FC, InputHTMLAttributes } from 'react';
|
|
2
|
-
export type LabelSideType = 'left' | 'right';
|
|
3
|
-
export type ToggleProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
2
|
+
export declare type LabelSideType = 'left' | 'right';
|
|
3
|
+
export declare type ToggleProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
4
4
|
label?: string;
|
|
5
5
|
labelSide?: LabelSideType;
|
|
6
6
|
type?: 'checkbox' | 'radio';
|
|
@@ -14,5 +14,5 @@ export interface BadgeCountProps {
|
|
|
14
14
|
*/
|
|
15
15
|
max?: number;
|
|
16
16
|
}
|
|
17
|
-
export type BadgeProps = BadgeCountProps & React.HTMLAttributes<HTMLDivElement>;
|
|
17
|
+
export declare type BadgeProps = BadgeCountProps & React.HTMLAttributes<HTMLDivElement>;
|
|
18
18
|
export declare const Badge: React.FC<BadgeProps>;
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { FC, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { DropdownOption } from './dropdownOptionsMenu';
|
|
3
3
|
export interface DropdownMenuProps {
|
|
4
4
|
label?: string;
|
|
5
|
-
selected?:
|
|
6
|
-
options?:
|
|
7
|
-
onChange: (value:
|
|
5
|
+
selected?: DropdownOption;
|
|
6
|
+
options?: DropdownOption[];
|
|
7
|
+
onChange: (value: DropdownOption) => void;
|
|
8
8
|
onOptionHover?: (value?: unknown) => void;
|
|
9
9
|
placeholder?: string;
|
|
10
|
-
renderLabel?: (option:
|
|
10
|
+
renderLabel?: (option: DropdownOption, isOpen: boolean, onClick: () => void) => ReactNode;
|
|
11
11
|
fitContent?: boolean;
|
|
12
12
|
}
|
|
13
13
|
export declare const DropdownMenu: FC<DropdownMenuProps>;
|
|
14
|
+
export declare const ButtonImage: import("styled-components").StyledComponent<"img", import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import React, { FC } from 'react';
|
|
2
2
|
import { TextProps } from '../../typography/Text';
|
|
3
|
-
interface
|
|
3
|
+
interface DropdownOptionTitleProps extends Omit<TextProps, 'children'> {
|
|
4
4
|
children?: string;
|
|
5
5
|
}
|
|
6
6
|
/**
|
|
7
7
|
* A single line of Text that will overflow with ellipsis. When overflown mousing over the text will display a tooltip with the text content.
|
|
8
8
|
*/
|
|
9
|
-
export declare const
|
|
9
|
+
export declare const DropdownOptionTitle: FC<DropdownOptionTitleProps>;
|
|
10
10
|
/**
|
|
11
11
|
* Checks if a element's content is overflown.
|
|
12
12
|
*/
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React, { Dispatch, SetStateAction } from 'react';
|
|
2
|
+
export interface DropdownOption {
|
|
3
|
+
title: string;
|
|
4
|
+
value: unknown;
|
|
5
|
+
iconUrl?: string;
|
|
6
|
+
}
|
|
7
|
+
export interface DropdownOptionsMenuProps {
|
|
8
|
+
options: DropdownOption[];
|
|
9
|
+
selected?: DropdownOption;
|
|
10
|
+
expandMenu: {
|
|
11
|
+
show: boolean;
|
|
12
|
+
requestedByCollapse: boolean;
|
|
13
|
+
};
|
|
14
|
+
dropdownMenuId?: string;
|
|
15
|
+
setExpandMenu?: Dispatch<SetStateAction<{
|
|
16
|
+
show: boolean;
|
|
17
|
+
requestedByCollapse: boolean;
|
|
18
|
+
}>>;
|
|
19
|
+
onOptionHover?: (value?: unknown) => void;
|
|
20
|
+
onChange: (value: DropdownOption) => void;
|
|
21
|
+
onCollapseRequest: () => void;
|
|
22
|
+
fitContent?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare const DropdownOptionsMenu: React.FC<DropdownOptionsMenuProps>;
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { IconSizeType, IconType } from '../../system/ThemeProvider/lib/types';
|
|
3
|
-
export type PropsWithIcon = {
|
|
3
|
+
export declare type PropsWithIcon = {
|
|
4
4
|
icon: IconType;
|
|
5
5
|
children?: never;
|
|
6
6
|
};
|
|
7
|
-
export type PropsWithChild = {
|
|
7
|
+
export declare type PropsWithChild = {
|
|
8
8
|
icon?: never;
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
};
|
|
11
|
-
export type IconSizeProps = {
|
|
11
|
+
export declare type IconSizeProps = {
|
|
12
12
|
size?: IconSizeType;
|
|
13
13
|
containerSize?: IconSizeType;
|
|
14
14
|
};
|
|
15
|
-
export type IconProps = HTMLAttributes<HTMLDivElement> & (PropsWithIcon | PropsWithChild) & IconSizeProps;
|
|
15
|
+
export declare type IconProps = HTMLAttributes<HTMLDivElement> & (PropsWithIcon | PropsWithChild) & IconSizeProps;
|
|
16
16
|
export declare const Icon: import("styled-components").StyledComponent<({ icon, children, size, containerSize, ...props }: IconProps) => JSX.Element, import("styled-components").DefaultTheme, {}, never>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { IconProps } from '../Icon/icon';
|
|
3
3
|
import { BadgeCountProps } from '../Badge';
|
|
4
|
-
export type IconWithBadgeProps = IconProps & BadgeCountProps;
|
|
4
|
+
export declare type IconWithBadgeProps = IconProps & BadgeCountProps;
|
|
5
5
|
export declare const IconWithBadge: React.FC<IconWithBadgeProps>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { IconSizeProps } from '../Icon';
|
|
3
|
-
export type LoaderProps = IconSizeProps & HTMLAttributes<HTMLDivElement>;
|
|
3
|
+
export declare type LoaderProps = IconSizeProps & HTMLAttributes<HTMLDivElement>;
|
|
4
4
|
export declare const Loader: import("styled-components").StyledComponent<({ ...props }: LoaderProps) => JSX.Element, import("styled-components").DefaultTheme, IconSizeProps & HTMLAttributes<HTMLDivElement>, never>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { IconSizeProps } from '../Icon';
|
|
3
|
-
export type OpenfinLoaderProps = IconSizeProps & HTMLAttributes<HTMLDivElement>;
|
|
3
|
+
export declare type OpenfinLoaderProps = IconSizeProps & HTMLAttributes<HTMLDivElement>;
|
|
4
4
|
export declare const OpenfinLoader: import("styled-components").StyledComponent<({ ...props }: OpenfinLoaderProps) => JSX.Element, import("styled-components").DefaultTheme, IconSizeProps & HTMLAttributes<HTMLDivElement>, never>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InputHTMLAttributes } from 'react';
|
|
2
2
|
import { WithStatusProps } from '../../system/HOC';
|
|
3
|
-
export type BaseInputProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
3
|
+
export declare type BaseInputProps = InputHTMLAttributes<HTMLInputElement> & {
|
|
4
4
|
message?: string;
|
|
5
5
|
label?: string;
|
|
6
6
|
type?: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { BaseInputProps } from '../BaseInput';
|
|
3
3
|
import { WithStatusProps } from '../../system/HOC';
|
|
4
|
-
export type CheckboxProps = BaseInputProps;
|
|
4
|
+
export declare type CheckboxProps = BaseInputProps;
|
|
5
5
|
export declare const Checkbox: React.ForwardRefExoticComponent<React.InputHTMLAttributes<HTMLInputElement> & {
|
|
6
6
|
message?: string | undefined;
|
|
7
7
|
label?: string | undefined;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { UnitPxType } from '../../system/ThemeProvider';
|
|
3
3
|
import { RadioLabelSideType } from '../RadioInput/radioInput';
|
|
4
|
-
type RadioDirectionType = 'row' | 'column';
|
|
5
|
-
export type RadioGroupProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
4
|
+
declare type RadioDirectionType = 'row' | 'column';
|
|
5
|
+
export declare type RadioGroupProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
6
6
|
direction?: RadioDirectionType;
|
|
7
7
|
gap?: UnitPxType;
|
|
8
8
|
labelSide?: RadioLabelSideType;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { LabelSideType } from '../../controls/Toggle';
|
|
3
|
-
export type RadioLabelSideType = LabelSideType | 'top' | 'bottom';
|
|
4
|
-
export type RadioProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
3
|
+
export declare type RadioLabelSideType = LabelSideType | 'top' | 'bottom';
|
|
4
|
+
export declare type RadioProps = React.InputHTMLAttributes<HTMLInputElement> & {
|
|
5
5
|
label?: string;
|
|
6
6
|
labelSide?: RadioLabelSideType;
|
|
7
7
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import { BaseInputProps } from '../BaseInput';
|
|
3
|
-
export type TextInputProps = BaseInputProps;
|
|
3
|
+
export declare type TextInputProps = BaseInputProps;
|
|
4
4
|
export declare const TextInput: import("react").ForwardRefExoticComponent<import("react").InputHTMLAttributes<HTMLInputElement> & {
|
|
5
5
|
message?: string | undefined;
|
|
6
6
|
label?: string | undefined;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HTMLAttributes } from 'react';
|
|
2
2
|
import { UnitPxType } from '../../system/ThemeProvider/lib/types';
|
|
3
3
|
import * as BoxTypes from './types';
|
|
4
|
-
export type BoxProps = HTMLAttributes<HTMLDivElement> & {
|
|
4
|
+
export declare type BoxProps = HTMLAttributes<HTMLDivElement> & {
|
|
5
5
|
alignItems?: BoxTypes.AlignItems;
|
|
6
6
|
display?: BoxTypes.Display;
|
|
7
7
|
flexDirection?: BoxTypes.FlexDirection;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export type AlignItems = 'stretch' | 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'first baseline' | 'last baseline' | 'start' | 'end' | 'self-start' | 'self-end';
|
|
2
|
-
export type Display = 'flex' | 'inline-flex';
|
|
3
|
-
export type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
4
|
-
export type FlexWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
5
|
-
export type JustifyContent = 'stretch' | 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly' | 'start' | 'end' | 'left' | 'right';
|
|
6
|
-
export type AlignSelf = 'auto' | 'flex-start' | ' flex-end' | 'center' | 'baseline' | 'stretch';
|
|
7
|
-
export type BackgroundLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
1
|
+
export declare type AlignItems = 'stretch' | 'flex-start' | 'flex-end' | 'center' | 'baseline' | 'first baseline' | 'last baseline' | 'start' | 'end' | 'self-start' | 'self-end';
|
|
2
|
+
export declare type Display = 'flex' | 'inline-flex';
|
|
3
|
+
export declare type FlexDirection = 'row' | 'row-reverse' | 'column' | 'column-reverse';
|
|
4
|
+
export declare type FlexWrap = 'nowrap' | 'wrap' | 'wrap-reverse';
|
|
5
|
+
export declare type JustifyContent = 'stretch' | 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly' | 'start' | 'end' | 'left' | 'right';
|
|
6
|
+
export declare type AlignSelf = 'auto' | 'flex-start' | ' flex-end' | 'center' | 'baseline' | 'stretch';
|
|
7
|
+
export declare type BackgroundLevel = 1 | 2 | 3 | 4 | 5 | 6;
|
|
@@ -2,18 +2,18 @@ import { FlattenSimpleInterpolation } from 'styled-components';
|
|
|
2
2
|
/**
|
|
3
3
|
* ThemeProvider Configuration
|
|
4
4
|
*/
|
|
5
|
-
export type ConfigurationType = CDNFontConfig | ImportFontConfig;
|
|
5
|
+
export declare type ConfigurationType = CDNFontConfig | ImportFontConfig;
|
|
6
6
|
/**
|
|
7
7
|
* Custom import and handling for font loading.
|
|
8
8
|
*/
|
|
9
|
-
export type ImportFontConfig = {
|
|
9
|
+
export declare type ImportFontConfig = {
|
|
10
10
|
fontLoading: 'import';
|
|
11
11
|
fontCss: FlattenSimpleInterpolation;
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* Use fonts from the Openfin CDN.
|
|
15
15
|
*/
|
|
16
|
-
export type CDNFontConfig = {
|
|
16
|
+
export declare type CDNFontConfig = {
|
|
17
17
|
fontLoading: 'cdn';
|
|
18
18
|
};
|
|
19
19
|
export declare const Configuration: ConfigurationType;
|
|
@@ -15,7 +15,6 @@ export declare const Color: {
|
|
|
15
15
|
readonly lightGray5: "#C9CBD2";
|
|
16
16
|
readonly neutralGray: "#7D808A";
|
|
17
17
|
readonly neutralGray80: "rgba(125,128,138,0.8)";
|
|
18
|
-
readonly silverGray: "#C0C1C2";
|
|
19
18
|
readonly darkGray1: "#53565F";
|
|
20
19
|
readonly darkGray2: "#383A40";
|
|
21
20
|
readonly darkGray3: "#2F3136";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DefaultTheme, StyledProps } from 'styled-components';
|
|
2
2
|
import { StatusType } from '../../HOC';
|
|
3
3
|
import { Palette } from './palette';
|
|
4
|
-
export type ComponentVariants = {
|
|
4
|
+
export declare type ComponentVariants = {
|
|
5
5
|
[key: string]: {
|
|
6
6
|
[key: string]: any;
|
|
7
7
|
};
|
|
@@ -30,7 +30,6 @@ export declare const Palette: {
|
|
|
30
30
|
readonly textDefault: "textDefault";
|
|
31
31
|
readonly textHelp: "textHelp";
|
|
32
32
|
readonly textInactive: "textInactive";
|
|
33
|
-
readonly borderNeutral: "borderNeutral";
|
|
34
33
|
readonly contentBackground1: "contentBackground1";
|
|
35
34
|
readonly contentBackground2: "contentBackground2";
|
|
36
35
|
readonly contentBackground3: "contentBackground3";
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import { DefaultTheme } from 'styled-components';
|
|
2
2
|
import { Color, FontSize, FontStack, FontWeight, IconSet, IconSize, LineHeight, Radius, Shadow, Size, Transition, Typography, Unit, UnitPx } from './constants';
|
|
3
3
|
import { Palette } from './palette';
|
|
4
|
-
export type ColorType = keyof typeof Color;
|
|
5
|
-
export type FontSizeType = keyof typeof FontSize;
|
|
6
|
-
export type FontStackType = keyof typeof FontStack;
|
|
7
|
-
export type FontWeightType = keyof typeof FontWeight;
|
|
8
|
-
export type IconSizeType = keyof typeof IconSize;
|
|
9
|
-
export type IconType = keyof typeof IconSet;
|
|
10
|
-
export type LineHeightType = keyof typeof LineHeight;
|
|
11
|
-
export type RadiusType = keyof typeof Radius;
|
|
12
|
-
export type ShadowType = keyof typeof Shadow;
|
|
13
|
-
export type SizeType = keyof typeof Size;
|
|
14
|
-
export type TransitionType = keyof typeof Transition;
|
|
15
|
-
export type TypographyType = keyof typeof Typography;
|
|
16
|
-
export type UnitPxType = keyof typeof UnitPx;
|
|
17
|
-
export type UnitType = keyof typeof Unit;
|
|
18
|
-
export type ThemeSet = {
|
|
4
|
+
export declare type ColorType = keyof typeof Color;
|
|
5
|
+
export declare type FontSizeType = keyof typeof FontSize;
|
|
6
|
+
export declare type FontStackType = keyof typeof FontStack;
|
|
7
|
+
export declare type FontWeightType = keyof typeof FontWeight;
|
|
8
|
+
export declare type IconSizeType = keyof typeof IconSize;
|
|
9
|
+
export declare type IconType = keyof typeof IconSet;
|
|
10
|
+
export declare type LineHeightType = keyof typeof LineHeight;
|
|
11
|
+
export declare type RadiusType = keyof typeof Radius;
|
|
12
|
+
export declare type ShadowType = keyof typeof Shadow;
|
|
13
|
+
export declare type SizeType = keyof typeof Size;
|
|
14
|
+
export declare type TransitionType = keyof typeof Transition;
|
|
15
|
+
export declare type TypographyType = keyof typeof Typography;
|
|
16
|
+
export declare type UnitPxType = keyof typeof UnitPx;
|
|
17
|
+
export declare type UnitType = keyof typeof Unit;
|
|
18
|
+
export declare type ThemeSet = {
|
|
19
19
|
light: DefaultTheme;
|
|
20
20
|
dark: DefaultTheme;
|
|
21
21
|
};
|
|
22
|
-
export type PaletteKeyType = keyof typeof Palette;
|
|
23
|
-
export type PaletteType = Record<keyof typeof Palette, string>;
|
|
24
|
-
export type ThemePaletteSet = {
|
|
22
|
+
export declare type PaletteKeyType = keyof typeof Palette;
|
|
23
|
+
export declare type PaletteType = Record<keyof typeof Palette, string>;
|
|
24
|
+
export declare type ThemePaletteSet = {
|
|
25
25
|
light: {
|
|
26
26
|
palette: PaletteType;
|
|
27
27
|
};
|
|
@@ -40,7 +40,7 @@ export type ThemePaletteSet = {
|
|
|
40
40
|
* @example ValueOf<typeof someObject>
|
|
41
41
|
* @link https://stackoverflow.com/questions/49285864/is-there-a-valueof-similar-to-keyof-in-typescript
|
|
42
42
|
*/
|
|
43
|
-
export type ValueOf<T> = T[keyof T];
|
|
43
|
+
export declare type ValueOf<T> = T[keyof T];
|
|
44
44
|
/**
|
|
45
45
|
* Join a string tuple to a string with a separator.
|
|
46
46
|
* @example
|
|
@@ -48,4 +48,4 @@ export type ValueOf<T> = T[keyof T];
|
|
|
48
48
|
* type MyArrayString = StringTupleJoin<typeof array, ', '>;
|
|
49
49
|
* const str: MyArrayString = "hello, world";
|
|
50
50
|
*/
|
|
51
|
-
export type StringTupleJoin<T extends readonly string[], Separator extends string> = T extends readonly [string, ...infer Tail] ? Tail extends [string, ...string[]] ? `${T[0]}${Separator}${StringTupleJoin<Tail, Separator>}` : `${T[0]}` : never;
|
|
51
|
+
export declare type StringTupleJoin<T extends readonly string[], Separator extends string> = T extends readonly [string, ...infer Tail] ? Tail extends [string, ...string[]] ? `${T[0]}${Separator}${StringTupleJoin<Tail, Separator>}` : `${T[0]}` : never;
|
|
@@ -2,7 +2,7 @@ import { FC, ReactNode } from 'react';
|
|
|
2
2
|
import { ColorScheme } from '../../../hooks/useColorScheme';
|
|
3
3
|
import { ConfigurationType } from './lib/config';
|
|
4
4
|
import { ThemePaletteSet } from './lib/types';
|
|
5
|
-
export type ThemeProviderProps = {
|
|
5
|
+
export declare type ThemeProviderProps = {
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
themes?: ThemePaletteSet;
|
|
8
8
|
scheme?: keyof typeof ColorScheme;
|