@openfin/ui-library 0.12.0-alpha.1677874224 → 0.12.0-alpha.1678397162
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/Calendar/calendar.d.ts +7 -0
- package/dist/components/elements/Calendar/index.d.ts +1 -0
- 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/helpers.d.ts +1 -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 +111 -105
- package/dist/components/typography/Text/text.d.ts +1 -1
- package/dist/hooks/useColorScheme.d.ts +2 -2
- package/dist/index.d.ts +1 -0
- package/dist/index.js +217 -77
- package/dist/index.js.LICENSE.txt +2 -2
- package/package.json +8 -4
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, FC, ReactNode } from 'react';
|
|
2
2
|
import { ButtonShape, ButtonSize, ButtonKind, ButtonLayout } from './button.variants';
|
|
3
|
-
|
|
3
|
+
type ButtonPropsWithLabel = {
|
|
4
4
|
children?: never;
|
|
5
5
|
};
|
|
6
|
-
|
|
6
|
+
type ButtonPropsWithChildren = {
|
|
7
7
|
children: ReactNode;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export 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
|
|
19
|
+
export 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
|
|
28
|
+
export 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
|
|
36
|
+
export 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
|
|
44
|
+
export 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
|
|
4
|
+
export type SecondaryButtonProps = {
|
|
5
5
|
title: string;
|
|
6
6
|
disabled?: boolean;
|
|
7
7
|
onClick: (event: React.MouseEvent, closeSecondaryButtonsPanel?: () => void) => void;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export 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
|
|
4
|
+
export 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
|
|
3
|
-
export
|
|
2
|
+
export type LabelSideType = 'left' | 'right';
|
|
3
|
+
export 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
|
|
17
|
+
export type BadgeProps = BadgeCountProps & React.HTMLAttributes<HTMLDivElement>;
|
|
18
18
|
export declare const Badge: React.FC<BadgeProps>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './calendar';
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { IconSizeType, IconType } from '../../system/ThemeProvider/lib/types';
|
|
3
|
-
export
|
|
3
|
+
export type PropsWithIcon = {
|
|
4
4
|
icon: IconType;
|
|
5
5
|
children?: never;
|
|
6
6
|
};
|
|
7
|
-
export
|
|
7
|
+
export type PropsWithChild = {
|
|
8
8
|
icon?: never;
|
|
9
9
|
children: ReactNode;
|
|
10
10
|
};
|
|
11
|
-
export
|
|
11
|
+
export type IconSizeProps = {
|
|
12
12
|
size?: IconSizeType;
|
|
13
13
|
containerSize?: IconSizeType;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export 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
|
|
4
|
+
export 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
|
|
3
|
+
export 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
|
|
3
|
+
export 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
|
|
3
|
+
export 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
|
|
4
|
+
export 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
|
-
|
|
5
|
-
export
|
|
4
|
+
type RadioDirectionType = 'row' | 'column';
|
|
5
|
+
export 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
|
|
4
|
-
export
|
|
3
|
+
export type RadioLabelSideType = LabelSideType | 'top' | 'bottom';
|
|
4
|
+
export 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
|
|
3
|
+
export 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
|
|
4
|
+
export 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
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
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;
|
|
@@ -2,18 +2,18 @@ import { FlattenSimpleInterpolation } from 'styled-components';
|
|
|
2
2
|
/**
|
|
3
3
|
* ThemeProvider Configuration
|
|
4
4
|
*/
|
|
5
|
-
export
|
|
5
|
+
export type ConfigurationType = CDNFontConfig | ImportFontConfig;
|
|
6
6
|
/**
|
|
7
7
|
* Custom import and handling for font loading.
|
|
8
8
|
*/
|
|
9
|
-
export
|
|
9
|
+
export 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
|
|
16
|
+
export type CDNFontConfig = {
|
|
17
17
|
fontLoading: 'cdn';
|
|
18
18
|
};
|
|
19
19
|
export declare const Configuration: ConfigurationType;
|
|
@@ -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
|
|
4
|
+
export type ComponentVariants = {
|
|
5
5
|
[key: string]: {
|
|
6
6
|
[key: string]: any;
|
|
7
7
|
};
|
|
@@ -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
|
|
5
|
-
export
|
|
6
|
-
export
|
|
7
|
-
export
|
|
8
|
-
export
|
|
9
|
-
export
|
|
10
|
-
export
|
|
11
|
-
export
|
|
12
|
-
export
|
|
13
|
-
export
|
|
14
|
-
export
|
|
15
|
-
export
|
|
16
|
-
export
|
|
17
|
-
export
|
|
18
|
-
export
|
|
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 = {
|
|
19
19
|
light: DefaultTheme;
|
|
20
20
|
dark: DefaultTheme;
|
|
21
21
|
};
|
|
22
|
-
export
|
|
23
|
-
export
|
|
24
|
-
export
|
|
22
|
+
export type PaletteKeyType = keyof typeof Palette;
|
|
23
|
+
export type PaletteType = Record<keyof typeof Palette, string>;
|
|
24
|
+
export type ThemePaletteSet = {
|
|
25
25
|
light: {
|
|
26
26
|
palette: PaletteType;
|
|
27
27
|
};
|
|
@@ -40,7 +40,7 @@ export declare 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
|
|
43
|
+
export 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 declare type ValueOf<T> = T[keyof T];
|
|
|
48
48
|
* type MyArrayString = StringTupleJoin<typeof array, ', '>;
|
|
49
49
|
* const str: MyArrayString = "hello, world";
|
|
50
50
|
*/
|
|
51
|
-
export
|
|
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;
|
|
@@ -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
|
|
5
|
+
export type ThemeProviderProps = {
|
|
6
6
|
children: ReactNode;
|
|
7
7
|
themes?: ThemePaletteSet;
|
|
8
8
|
scheme?: keyof typeof ColorScheme;
|