@equisoft/design-elements-react 3.5.1-snapshot.20220104194038 → 3.5.1-snapshot.20220107151519

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,2 +1,7 @@
1
- declare const Card: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
2
- export { Card };
1
+ import { FunctionComponent } from 'react';
2
+ interface Props {
3
+ className?: string;
4
+ noPadding?: boolean;
5
+ }
6
+ export declare const Card: FunctionComponent<Props>;
7
+ export {};
@@ -1,5 +1,6 @@
1
1
  import { FocusEvent } from 'react';
2
2
  import { DayOfWeek, SupportedLocale } from './utils/datepicker-utils';
3
+ import { TooltipProps } from '../tooltip/tooltip';
3
4
  export interface DatepickerHandles {
4
5
  reset(): void;
5
6
  setDate(date: Date): void;
@@ -16,6 +17,7 @@ interface DatepickerProps {
16
17
  id?: string;
17
18
  /** Sets input label */
18
19
  label?: string;
20
+ tooltip?: TooltipProps;
19
21
  /**
20
22
  * Sets localization
21
23
  * @default en-CA
@@ -1,4 +1,5 @@
1
1
  import { ReactElement, ReactNode } from 'react';
2
+ import { TooltipProps } from '../tooltip/tooltip';
2
3
  export interface FieldContainerProps {
3
4
  className?: string;
4
5
  children: ReactNode;
@@ -8,5 +9,6 @@ export interface FieldContainerProps {
8
9
  valid: boolean;
9
10
  validationErrorMessage: string;
10
11
  hint?: string;
12
+ tooltip?: TooltipProps;
11
13
  }
12
- export declare function FieldContainer({ className, children, fieldId, label, valid, validationErrorMessage, hint, noMargin, ...props }: FieldContainerProps): ReactElement;
14
+ export declare function FieldContainer({ className, children, fieldId, label, valid, validationErrorMessage, hint, noMargin, tooltip, ...props }: FieldContainerProps): ReactElement;
@@ -1,8 +1,10 @@
1
1
  import { ReactElement, ReactNode } from 'react';
2
+ import { TooltipProps } from '../tooltip/tooltip';
2
3
  interface LabelProps {
3
4
  className?: string;
4
5
  children: ReactNode;
5
6
  forId: string;
7
+ tooltip?: TooltipProps;
6
8
  }
7
- declare function Label({ className, children, forId }: LabelProps): ReactElement;
9
+ declare function Label({ className, children, forId, tooltip, }: LabelProps): ReactElement;
8
10
  export { Label };
@@ -1,5 +1,6 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { ListboxOption } from '../listbox/listbox';
3
+ import { TooltipProps } from '../tooltip/tooltip';
3
4
  export interface Option extends ListboxOption {
4
5
  label: string;
5
6
  }
@@ -48,6 +49,7 @@ interface SelectProps {
48
49
  label: string;
49
50
  value?: string;
50
51
  };
52
+ tooltip?: TooltipProps;
51
53
  /**
52
54
  * Sets input validity
53
55
  */
@@ -67,5 +69,5 @@ interface SelectProps {
67
69
  */
68
70
  onChange?(option: Option): void;
69
71
  }
70
- export declare function Select({ ariaLabel, className, defaultOpen, defaultValue, disabled, noMargin, id, label, onChange, options, name, numberOfItemsVisible, placeholder, required, searchable, skipOption, valid, validationErrorMessage, value, hint, }: SelectProps): ReactElement;
72
+ export declare function Select({ ariaLabel, className, defaultOpen, defaultValue, disabled, noMargin, id, label, onChange, options, name, numberOfItemsVisible, placeholder, required, searchable, skipOption, tooltip, valid, validationErrorMessage, value, hint, }: SelectProps): ReactElement;
71
73
  export {};
@@ -1,4 +1,5 @@
1
1
  import { DetailedHTMLProps, InputHTMLAttributes, ReactElement } from 'react';
2
+ import { TooltipProps } from '../tooltip/tooltip';
2
3
  declare type PartialStepperInputProps = Pick<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, 'disabled' | 'onFocus' | 'onBlur' | 'step'>;
3
4
  declare type Value = undefined | number | null;
4
5
  interface StepperInputProps extends PartialStepperInputProps {
@@ -9,10 +10,11 @@ interface StepperInputProps extends PartialStepperInputProps {
9
10
  max?: number;
10
11
  min?: number;
11
12
  noMargin?: boolean;
13
+ tooltip?: TooltipProps;
12
14
  valid?: boolean;
13
15
  validationErrorMessage?: string;
14
16
  value?: Value;
15
17
  onChange?(value: Value): void;
16
18
  }
17
- export declare function StepperInput({ defaultValue, disabled, hint, id, label, max, min, noMargin, step, valid, validationErrorMessage, value, onBlur, onChange, onFocus, }: StepperInputProps): ReactElement;
19
+ export declare function StepperInput({ defaultValue, disabled, hint, id, label, max, min, noMargin, step, tooltip, valid, validationErrorMessage, value, onBlur, onChange, onFocus, }: StepperInputProps): ReactElement;
18
20
  export {};
@@ -1,9 +1,10 @@
1
1
  import { KeyboardEvent } from 'react';
2
2
  import { IconName } from '../icon/icon';
3
3
  interface TabButtonProps {
4
+ global?: boolean;
4
5
  id: string;
5
- panelId: string;
6
6
  children: string;
7
+ panelId: string;
7
8
  leftIcon?: IconName;
8
9
  rightIcon?: IconName;
9
10
  isSelected: boolean;
@@ -1,9 +1,10 @@
1
1
  import { ReactElement, ReactNode } from 'react';
2
2
  interface TabPanelProps {
3
- id: string;
4
3
  buttonId: string;
5
- hidden: boolean;
6
4
  children: ReactNode;
5
+ contained?: boolean;
6
+ hidden: boolean;
7
+ id: string;
7
8
  }
8
- export declare function TabPanel({ id, buttonId, hidden, children, }: TabPanelProps): ReactElement;
9
+ export declare function TabPanel({ buttonId, children, contained, hidden, id, }: TabPanelProps): ReactElement;
9
10
  export {};
@@ -8,7 +8,10 @@ export interface Tab {
8
8
  }
9
9
  interface Props {
10
10
  className?: string;
11
+ /** Not available in global mode */
12
+ contained?: boolean;
11
13
  forceRenderTabPanels?: boolean;
14
+ global?: boolean;
12
15
  tabs: Tab[];
13
16
  }
14
17
  export declare const Tabs: VoidFunctionComponent<Props>;
@@ -1,7 +1,9 @@
1
1
  import { ChangeEvent, FocusEvent, ReactElement } from 'react';
2
+ import { TooltipProps } from '../tooltip/tooltip';
2
3
  export interface TextAreaProps {
3
4
  className?: string;
4
5
  label: string;
6
+ tooltip?: TooltipProps;
5
7
  defaultValue?: string;
6
8
  disabled?: boolean;
7
9
  /** Disables default margin */
@@ -21,4 +23,4 @@ export interface TextAreaProps {
21
23
  onChange?(event: ChangeEvent<HTMLTextAreaElement>): void;
22
24
  onFocus?(event: FocusEvent<HTMLTextAreaElement>): void;
23
25
  }
24
- export declare function TextArea({ className, noMargin, onBlur, onChange, onFocus, hint, defaultValue, disabled, label, placeholder, required, validationErrorMessage, value, maxLength, }: TextAreaProps): ReactElement;
26
+ export declare function TextArea({ className, noMargin, onBlur, onChange, onFocus, hint, defaultValue, disabled, label, placeholder, required, tooltip, validationErrorMessage, value, maxLength, }: TextAreaProps): ReactElement;
@@ -1,4 +1,5 @@
1
1
  import { ChangeEvent, DetailedHTMLProps, FocusEvent, InputHTMLAttributes, KeyboardEvent, MouseEvent } from 'react';
2
+ import { TooltipProps } from '../tooltip/tooltip';
2
3
  declare type PartialInputProps = Pick<DetailedHTMLProps<InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, 'inputMode' | 'name' | 'value' | 'autoComplete'>;
3
4
  interface TextInputProps extends PartialInputProps {
4
5
  className?: string;
@@ -8,6 +9,7 @@ interface TextInputProps extends PartialInputProps {
8
9
  noMargin?: boolean;
9
10
  id?: string;
10
11
  label?: string;
12
+ tooltip?: TooltipProps;
11
13
  pattern?: string;
12
14
  placeholder?: string;
13
15
  required?: boolean;
@@ -1,6 +1,6 @@
1
1
  import { FunctionComponent } from 'react';
2
2
  export declare type TooltipPlacement = 'top' | 'right' | 'bottom' | 'left';
3
- interface TooltipProps {
3
+ export interface TooltipProps {
4
4
  className?: string;
5
5
  /** Set tooltip open by default */
6
6
  defaultOpen?: boolean;
@@ -16,4 +16,3 @@ interface TooltipProps {
16
16
  label: string;
17
17
  }
18
18
  export declare const Tooltip: FunctionComponent<TooltipProps>;
19
- export {};
package/dist/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- export { AddButton } from './components/buttons/add-button';
2
1
  export { Button } from './components/buttons/button';
3
2
  export { IconButton } from './components/buttons/icon-button';
4
3
  export { NavMenuOption } from './components/nav-menu/nav-menu-option';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equisoft/design-elements-react",
3
- "version": "3.5.1-snapshot.20220104194038",
3
+ "version": "3.5.1-snapshot.20220107151519",
4
4
  "description": "React implementation of the Equisoft design system.",
5
5
  "license": "UNLICENSED",
6
6
  "main": "dist/bundle.js",
@@ -1,18 +0,0 @@
1
- import { MouseEvent, ReactElement } from 'react';
2
- declare type ButtonType = 'primary' | 'secondary' | 'tertiary' | 'destructive';
3
- declare type Type = 'submit' | 'button' | 'reset';
4
- interface ButtonProps {
5
- /**
6
- * Visual style
7
- * @default primary
8
- */
9
- buttonType: ButtonType;
10
- className?: string;
11
- disabled?: boolean;
12
- inverted?: boolean;
13
- label?: string;
14
- type?: Type;
15
- onClick?(event: MouseEvent<HTMLButtonElement>): void;
16
- }
17
- export declare function AddButton({ className, type, buttonType, disabled, inverted, label, onClick, }: ButtonProps): ReactElement;
18
- export {};