@openfin/ui-library 0.8.0 → 0.9.0-alpha.1672939977

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.
@@ -1,11 +1,9 @@
1
1
  import { ButtonHTMLAttributes, FC, ReactNode } from 'react';
2
2
  import { ButtonShape, ButtonSize, ButtonKind, ButtonLayout } from './button.variants';
3
3
  declare type ButtonPropsWithLabel = {
4
- label: string;
5
4
  children?: never;
6
5
  };
7
6
  declare type ButtonPropsWithChildren = {
8
- label?: never;
9
7
  children: ReactNode;
10
8
  };
11
9
  export declare type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & (ButtonPropsWithLabel | ButtonPropsWithChildren) & {
@@ -0,0 +1,4 @@
1
+ export declare enum ExpandDirection {
2
+ Up = 0,
3
+ Down = 1
4
+ }
@@ -0,0 +1,14 @@
1
+ import React from 'react';
2
+ import { ButtonProps } from '../Button';
3
+ import { ExpandDirection } from './expandDirection';
4
+ export declare type SecondaryButtonProps = {
5
+ title: string;
6
+ disabled?: boolean;
7
+ onClick: (event: React.MouseEvent, closeSecondaryButtonsPanel?: () => void) => void;
8
+ };
9
+ export declare type ExpandableButtonProps = Omit<ButtonProps, "shape"> & {
10
+ secondaryButtons?: SecondaryButtonProps[];
11
+ closePanelOnSecondaryButtonClick?: boolean;
12
+ expandDirection?: ExpandDirection;
13
+ };
14
+ export declare const ExpandableButton: (props: ExpandableButtonProps) => JSX.Element;
@@ -0,0 +1,12 @@
1
+ import { SecondaryButtonProps } from './expandableButton';
2
+ import { ButtonSizeType } from '../Button';
3
+ import { ExpandDirection } from './expandDirection';
4
+ export declare type ExpandablePanelProps = {
5
+ secondaryButtons: SecondaryButtonProps[];
6
+ onCollapseRequest: () => void;
7
+ closePanelOnSecondaryButtonClick?: boolean;
8
+ buttonSize?: ButtonSizeType;
9
+ expandDirection: ExpandDirection;
10
+ panelId?: string;
11
+ };
12
+ export declare const ExpandablePanel: (props: ExpandablePanelProps) => JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { ExpandDirection } from './expandDirection';
2
+ export declare const setupExpandablePanel: (node: HTMLDivElement, expandDirection: ExpandDirection) => void;
@@ -0,0 +1,2 @@
1
+ export * from './expandableButton';
2
+ export * from './expandDirection';
@@ -23,7 +23,7 @@ export declare const Color: {
23
23
  readonly darkGray6: "#111214";
24
24
  readonly openFinDarkest: "#3D39CD";
25
25
  readonly openFinDarker: "#4642E0";
26
- readonly openFin: "#0A76D3";
26
+ readonly openFin: "#504CFF";
27
27
  readonly openFinLight: "#5254FB";
28
28
  readonly openFinLighter: "#5C5EFE";
29
29
  readonly openFinLightest: "#6864FF";
@@ -114,7 +114,7 @@ export declare const Unit: {
114
114
  /**
115
115
  * UnitPx / "px" --
116
116
  * Design System works on a 4px Grid
117
- * UnitPx includes the px suffix for convienence in Styled Components
117
+ * UnitPx includes the px suffix for convenience in Styled Components
118
118
  */
119
119
  export declare const UnitPx: {
120
120
  readonly xsmall: "4px";
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export * from './components/controls/Button';
2
+ export * from './components/controls/ExpandableButton';
2
3
  export * from './components/controls/Toggle';
3
4
  export * from './components/elements/Badge';
4
5
  export * from './components/elements/Icon';