@skedulo/sked-ui 19.21.0 → 19.22.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/README.md CHANGED
@@ -1,24 +1,34 @@
1
1
  # Skedulo UI
2
2
 
3
- ### Demo (Local)
3
+ Demo https://ui.skedulo.com
4
+
5
+ ## Demo (Local)
4
6
 
5
7
  Run:
6
8
 
7
- yarn storybook
9
+ ```bash
10
+ yarn storybook
11
+ ```
8
12
 
9
13
  ## Development
10
14
 
15
+ Use NodeJS 16 for development
16
+
11
17
  ### Installation
12
18
 
13
19
  Run:
14
20
 
15
- yarn bootstrap
21
+ ```bash
22
+ yarn bootstrap
23
+ ```
16
24
 
17
25
  ### Testing
18
26
 
19
27
  Run:
20
28
 
21
- yarn test
29
+ ```bash
30
+ yarn test
31
+ ```
22
32
 
23
33
  Run with the watch command:
24
34
 
@@ -28,31 +38,41 @@ Run with the watch command:
28
38
 
29
39
  Run:
30
40
 
31
- yarn build
41
+ ```bash
42
+ yarn build
43
+ ```
32
44
 
33
45
  ### Linking between projects
34
46
 
35
47
  If you need to test your changes to the package in another project, you can do so by first building the package:
36
48
 
37
- yarn build:package
49
+ ```bash
50
+ yarn build:package
51
+ ```
38
52
 
39
53
  then allow a link to sked-ui by running:
40
54
 
41
- yarn link
55
+ ```bash
56
+ yarn link
57
+ ```
42
58
 
43
59
  within this projects directory.
44
60
 
45
61
  To use it within another project, navigate to the root folder of that project and run:
46
62
 
47
- yarn link @skedulo/sked-ui
63
+ ```bash
64
+ yarn link @skedulo/sked-ui
65
+ ```
48
66
 
49
67
  Some potentially helpful commands to run if you are making changes to sked are:
50
68
 
51
- yarn package:watch
69
+ ```bash
70
+ yarn package:watch
52
71
 
53
- and
72
+ # and
54
73
 
55
- yarn build:declarations:watch
74
+ yarn build:declarations:watch
75
+ ```
56
76
 
57
77
  ### Merging to master & semantic-release
58
78
 
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { IAvatar } from './Avatar';
2
3
  declare type AvatarDetailGroupSize = 'tiny' | 'small' | 'medium' | 'large';
3
4
  declare type AvatarProps = Pick<IAvatar, 'name' | 'imageUrl'>;
@@ -1,6 +1,7 @@
1
- import * as React from 'react';
1
+ /// <reference types="react" />
2
2
  export declare type BadgeTypes = 'default' | 'primary' | 'important';
3
- interface IProps {
3
+ export declare const DEFAULT_BADGE_CLASSES = "sked-badge-min-w sk-text-xxs sk-font-medium sk-tracking-wide sk-h-5 sk-pb-px sk-rounded-full sk-inline-flex sk-items-center sk-justify-center";
4
+ export interface IBadgeProps {
4
5
  /**
5
6
  * Value to be displayed in badge
6
7
  */
@@ -14,5 +15,4 @@ interface IProps {
14
15
  */
15
16
  badgeType?: BadgeTypes;
16
17
  }
17
- export declare const Badge: React.SFC<IProps>;
18
- export {};
18
+ export declare const Badge: ({ count, countLimiter, badgeType }: IBadgeProps) => JSX.Element;
@@ -1 +1,17 @@
1
- export {};
1
+ /// <reference types="react" />
2
+ import { ComponentStory } from '@storybook/react';
3
+ import { IBadgeProps } from './Badge';
4
+ declare const _default: {
5
+ title: string;
6
+ component: (props: IBadgeProps) => JSX.Element;
7
+ argTypes: {
8
+ badgeType: {
9
+ options: string[];
10
+ control: {
11
+ type: string;
12
+ };
13
+ };
14
+ };
15
+ };
16
+ export default _default;
17
+ export declare const Basic: ComponentStory<({ count, countLimiter, badgeType }: IBadgeProps) => JSX.Element>;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { IBaseDateSelectorProps } from './DateSelector';
2
3
  export interface INavigationButtonProps extends IBaseDateSelectorProps {
3
4
  hideTooltipIfDisabled?: boolean;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export interface IDateTimeProps {
2
3
  dateTime?: Date;
3
4
  /**
@@ -1,3 +1,4 @@
1
+ /// <reference types="@emotion/core" />
1
2
  import * as React from 'react';
2
3
  import { ReactDatePickerProps } from 'react-datepicker';
3
4
  import { RangeType } from '../calendar-controls/elements/RangePicker';
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  export declare const TIME_FORMAT = "h:mma";
2
3
  export declare const formatTime: (date: Date | number) => string;
3
4
  export declare const readonlyTimeFormat: ({ value, suffix }: {
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { IFilterItem } from '../interfaces';
2
3
  export interface IFilterListProps<T> {
3
4
  items: T[];
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { ISelectItem, AsyncMultiSearchSelectBox } from './interfaces';
2
3
  export declare const AsyncMultiSearchSelect: <T extends ISelectItem<any>>({ fetchItems, debounceTime, fetchStrategy, useCache, minChars, onSelectedItemsChange, disabled, ...rest }: AsyncMultiSearchSelectBox<T>) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ISelectItem, AsyncSelectBox } from './interfaces';
2
3
  /**
3
4
  * Asynchronous version of SearchSelect for use with remote fetching
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  import { ISelectItem, MultiSearchSelectBox } from './interfaces';
2
3
  export declare const MultiSearchSelect: <T extends ISelectItem<any>>({ initialSelectedItems, items, id, name, placeholder, autoFocus, className, onSelectedItemsChange, disabled, loading, itemToString, ItemRenderer, MenuItemsRenderer, selectAll, onInputValueChange, onMenuToggle, ...rest }: MultiSearchSelectBox<T>) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ /// <reference types="react" />
1
2
  import { ISelectItem, SelectBox } from './interfaces';
2
3
  /**
3
4
  * A searchable select component. Just like it's native counterpart, only a valid listed option is allowed.
@@ -40,6 +40,7 @@ declare const _default: {
40
40
  ellipsisVertical: any;
41
41
  emoji: any;
42
42
  exclamation: any;
43
+ exclamationFill: any;
43
44
  filter: any;
44
45
  filterFunnel: any;
45
46
  filterNew: any;
@@ -1,4 +1,5 @@
1
1
  import * as React from 'react';
2
- export declare const Link: React.FC<{
2
+ export interface ILinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
3
3
  type?: 'primary' | 'secondary';
4
- } & React.AnchorHTMLAttributes<HTMLAnchorElement>>;
4
+ }
5
+ export declare const Link: ({ type, className, children, ...otherProps }: ILinkProps) => JSX.Element;
@@ -1 +1,17 @@
1
- export {};
1
+ /// <reference types="react" />
2
+ import { ComponentStory } from '@storybook/react';
3
+ import { ILinkProps } from './Link';
4
+ declare const _default: {
5
+ title: string;
6
+ component: ({ type, className, children, ...otherProps }: ILinkProps) => JSX.Element;
7
+ argTypes: {
8
+ type: {
9
+ options: string[];
10
+ control: {
11
+ type: string;
12
+ };
13
+ };
14
+ };
15
+ };
16
+ export default _default;
17
+ export declare const Basic: ComponentStory<({ type, className, children, ...otherProps }: ILinkProps) => JSX.Element>;
@@ -9,6 +9,7 @@ export interface IPopOutBase {
9
9
  placement?: PopperJS.Options['placement'];
10
10
  modifiers?: PopperJS.Options['modifiers'];
11
11
  popOutContainer?: (PopperWrappedContent: JSX.Element) => JSX.Element;
12
+ children?: React.ReactNode;
12
13
  }
13
14
  /**
14
15
  * PopOutBase uses react-popper/popperjs under the hood and is a wrapper that sets up the Popperjs Manager, Reference and Popper.
@@ -27,6 +27,7 @@ export interface IRequiredProps {
27
27
  position: Position;
28
28
  }
29
29
  export declare type IInfoWindowProps = IRequiredProps & {
30
+ children?: React.ReactNode;
30
31
  /**
31
32
  * IEvent type used to trigger the info window
32
33
  */
@@ -25,10 +25,13 @@ export declare const adjustContentDisplayCoordinates: (anchor: IAnchorScores, wi
25
25
  display: {
26
26
  left: number;
27
27
  right: number;
28
- bottom: number;
29
28
  height: number;
30
- top: number;
31
29
  width: number;
30
+ x: number;
31
+ y: number;
32
+ bottom: number;
33
+ top: number;
34
+ toJSON(): any;
32
35
  };
33
36
  displayScore: number;
34
37
  distanceScore: number;
@@ -1,5 +1,6 @@
1
1
  import * as React from 'react';
2
2
  interface IProps {
3
+ children?: React.ReactNode;
3
4
  position?: Partial<{
4
5
  left: number;
5
6
  top: number;