@atlaskit/progress-tracker 8.3.0 → 8.3.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @atlaskit/progress-tracker
2
2
 
3
+ ## 8.3.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`8cc2f888c83`](https://bitbucket.org/atlassian/atlassian-frontend/commits/8cc2f888c83) - Upgrade Typescript from `4.3.5` to `4.5.5`
8
+
3
9
  ## 8.3.0
4
10
 
5
11
  ### Minor Changes
@@ -4,5 +4,12 @@
4
4
  "module": "../dist/esm/constants.js",
5
5
  "module:es2019": "../dist/es2019/constants.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/constants.d.ts"
7
+ "types": "../dist/types/constants.d.ts",
8
+ "typesVersions": {
9
+ ">=4.0 <4.5": {
10
+ "*": [
11
+ "../dist/types-ts4.0/constants.d.ts"
12
+ ]
13
+ }
14
+ }
8
15
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/progress-tracker",
3
- "version": "8.3.0",
3
+ "version": "8.3.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/progress-tracker",
3
- "version": "8.3.0",
3
+ "version": "8.3.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/progress-tracker",
3
- "version": "8.3.0",
3
+ "version": "8.3.1",
4
4
  "sideEffects": false
5
5
  }
@@ -0,0 +1,10 @@
1
+ export declare const defaultGridSize: number;
2
+ /**
3
+ * Ideally these are exported by @atlaskit/page
4
+ */
5
+ export declare const spacing: {
6
+ readonly comfortable: number;
7
+ readonly cosy: number;
8
+ readonly compact: number;
9
+ };
10
+ export declare type Spacing = keyof typeof spacing;
@@ -0,0 +1,3 @@
1
+ export { default as ProgressTracker } from './progress-tracker';
2
+ export type { ProgressTrackerProps } from './progress-tracker';
3
+ export type { Stages, Stage } from './types';
@@ -0,0 +1,13 @@
1
+ import { jsx } from '@emotion/react';
2
+ interface StageBarProps {
3
+ testId?: string;
4
+ percentageComplete: number;
5
+ }
6
+ /**
7
+ * __Progress bar__
8
+ *
9
+ * A progress bar describes the horizontal tracking bar that traverses each individual step.
10
+ *
11
+ */
12
+ declare const ProgressBar: ({ percentageComplete, testId }: StageBarProps) => jsx.JSX.Element;
13
+ export default ProgressBar;
@@ -0,0 +1,14 @@
1
+ export declare const TRANSITION_SPEED = 300;
2
+ export declare const LINEAR_TRANSITION_SPEED = 50;
3
+ export declare const ANIMATION_EASE_OUT = "cubic-bezier(0.15,1,0.3,1)";
4
+ export declare const varSpacing = "--ds--pt--sp";
5
+ export declare const varTransitionSpeed = "--ds--pt--ts";
6
+ export declare const varTransitionDelay = "--ds--pt--td";
7
+ export declare const varTransitionEasing = "--ds--pt--te";
8
+ export declare const varMarkerColor = "--ds--pt--mc";
9
+ export declare const varBackgroundColor = "--ds--pt--bg";
10
+ export declare const SEMI_BOLD_FONT_WEIGHT = "600";
11
+ export declare const REGULAR_FONT_WEIGHT = "400";
12
+ export declare const HALF_GRID_SIZE: number;
13
+ export declare const PROGRESS_BAR_HEIGHT: number;
14
+ export declare const LABEL_TOP_SPACING: number;
@@ -0,0 +1,10 @@
1
+ /** @jsx jsx */
2
+ import { FC } from 'react';
3
+ import { Stage } from '../types';
4
+ /**
5
+ * __Progress tracker link__
6
+ */
7
+ declare const Link: FC<Stage & {
8
+ testId?: string;
9
+ }>;
10
+ export default Link;
@@ -0,0 +1,11 @@
1
+ /** @jsx jsx */
2
+ import { FC } from 'react';
3
+ /**
4
+ * __Progress marker__
5
+ *
6
+ * Similar to `@atlaskit/progress-indicator`, a small visual circle marker
7
+ */
8
+ declare const ProgressMarker: FC<{
9
+ testId?: string;
10
+ }>;
11
+ export default ProgressMarker;
@@ -0,0 +1,18 @@
1
+ /** @jsx jsx */
2
+ import { PureComponent } from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ import type { ProgressTrackerStageProps } from './types';
5
+ interface State {
6
+ transitioning: boolean;
7
+ oldMarkerColor?: string;
8
+ oldPercentageComplete: number;
9
+ }
10
+ export type { ProgressTrackerStageProps };
11
+ export default class ProgressTrackerStage extends PureComponent<ProgressTrackerStageProps, State> {
12
+ constructor(props: ProgressTrackerStageProps);
13
+ UNSAFE_componentWillMount(): void;
14
+ UNSAFE_componentWillReceiveProps(): void;
15
+ shouldShowLink(): boolean;
16
+ onEntered: () => void;
17
+ render(): jsx.JSX.Element;
18
+ }
@@ -0,0 +1,27 @@
1
+ import type { ProgressTrackerStageRenderProp, Stage } from '../types';
2
+ export interface ProgressTrackerStageProps {
3
+ /**
4
+ * stage data passed to each `ProgressTrackerStage` component
5
+ */
6
+ item: Stage;
7
+ /**
8
+ * render prop to specify how to render components
9
+ */
10
+ render: ProgressTrackerStageRenderProp;
11
+ /**
12
+ * An internal hook applied to key elements for automated testing
13
+ */
14
+ testId?: string;
15
+ /**
16
+ * delay before transitioning in ms
17
+ */
18
+ transitionDelay: number;
19
+ /**
20
+ * speed at which to transition in ms
21
+ */
22
+ transitionSpeed: number;
23
+ /**
24
+ * interface of easing for transition
25
+ */
26
+ transitionEasing: string;
27
+ }
@@ -0,0 +1,4 @@
1
+ import type { Status } from '../types';
2
+ export declare const getMarkerColor: (status: Status) => "var(--ds-icon-subtle)" | "var(--ds-icon-brand)" | undefined;
3
+ export declare const getTextColor: (status: Status) => "var(--ds-text)" | "var(--ds-text-subtlest)" | "var(--ds-text-brand)" | "var(--ds-text-disabled)" | undefined;
4
+ export declare const getFontWeight: (status: Status) => "600" | "400" | undefined;
@@ -0,0 +1,58 @@
1
+ /** @jsx jsx */
2
+ import { PureComponent } from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ import type { LinkComponentProps, ProgressTrackerStageRenderProp, Spacing, Stages } from './types';
5
+ export interface ProgressTrackerProps {
6
+ /**
7
+ * Ordered list of stage data
8
+ */
9
+ items: Stages;
10
+ /**
11
+ * Margin spacing type between steps
12
+ */
13
+ spacing: Spacing;
14
+ /**
15
+ * Render prop to specify custom implementations of components
16
+ */
17
+ render: ProgressTrackerStageRenderProp;
18
+ /**
19
+ * Turns off transition animations if set to false
20
+ */
21
+ animated: boolean;
22
+ /**
23
+ * A `testId` prop is provided for specified elements, which is a unique string that appears as a data attribute `data-testid` in the rendered code, serving as a hook for automated tests
24
+ */
25
+ testId?: string;
26
+ /**
27
+ * Text to be used as an aria-label of progress tracker
28
+ */
29
+ label?: string;
30
+ }
31
+ interface State {
32
+ prevStages: Stages;
33
+ }
34
+ export default class ProgressTracker extends PureComponent<ProgressTrackerProps, State> {
35
+ static defaultProps: {
36
+ items: never[];
37
+ spacing: string;
38
+ render: {
39
+ link: ({ item }: LinkComponentProps) => jsx.JSX.Element;
40
+ };
41
+ animated: boolean;
42
+ label: string;
43
+ };
44
+ state: {
45
+ prevStages: {
46
+ percentageComplete: number;
47
+ id: string;
48
+ label: string;
49
+ status: import("./types").Status;
50
+ noLink?: boolean | undefined;
51
+ href?: string | undefined;
52
+ onClick?: (() => void) | undefined;
53
+ }[];
54
+ };
55
+ UNSAFE_componentWillReceiveProps(nextProps: ProgressTrackerProps): void;
56
+ render(): jsx.JSX.Element;
57
+ }
58
+ export {};
@@ -0,0 +1,26 @@
1
+ /// <reference types="react" />
2
+ /**
3
+ * Ideally these are exported by @atlaskit/page
4
+ */
5
+ export type { Spacing } from './constants';
6
+ export declare type Status = 'unvisited' | 'visited' | 'current' | 'disabled';
7
+ /**
8
+ * @deprecated
9
+ */
10
+ export declare type StatusType = Status;
11
+ export interface Stage {
12
+ id: string;
13
+ label: string;
14
+ percentageComplete: number;
15
+ status: Status;
16
+ noLink?: boolean;
17
+ href?: string;
18
+ onClick?: () => void;
19
+ }
20
+ export declare type Stages = Stage[];
21
+ export interface LinkComponentProps {
22
+ item: Stage;
23
+ }
24
+ export interface ProgressTrackerStageRenderProp {
25
+ link: (props: LinkComponentProps) => JSX.Element;
26
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/progress-tracker",
3
- "version": "8.3.0",
3
+ "version": "8.3.1",
4
4
  "description": "A progress tracker displays the steps and progress through a journey.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -12,6 +12,13 @@
12
12
  "module": "dist/esm/index.js",
13
13
  "module:es2019": "dist/es2019/index.js",
14
14
  "types": "dist/types/index.d.ts",
15
+ "typesVersions": {
16
+ ">=4.0 <4.5": {
17
+ "*": [
18
+ "dist/types-ts4.0/*"
19
+ ]
20
+ }
21
+ },
15
22
  "sideEffects": false,
16
23
  "atlaskit:src": "src/index.tsx",
17
24
  "atlassian": {
@@ -41,12 +48,12 @@
41
48
  "@atlaskit/ssr": "*",
42
49
  "@atlaskit/visual-regression": "*",
43
50
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
44
- "@testing-library/react": "^8.0.1",
51
+ "@testing-library/react": "^12.1.5",
45
52
  "enzyme": "^3.10.0",
46
53
  "react-dom": "^16.8.0",
47
54
  "react-router-dom": "^4.2.2",
48
55
  "react-test-renderer": "^16.8.0",
49
- "typescript": "4.3.5"
56
+ "typescript": "4.5.5"
50
57
  },
51
58
  "techstack": {
52
59
  "@atlassian/frontend": {
@@ -4,5 +4,12 @@
4
4
  "module": "../dist/esm/types.js",
5
5
  "module:es2019": "../dist/es2019/types.js",
6
6
  "sideEffects": false,
7
- "types": "../dist/types/types.d.ts"
7
+ "types": "../dist/types/types.d.ts",
8
+ "typesVersions": {
9
+ ">=4.0 <4.5": {
10
+ "*": [
11
+ "../dist/types-ts4.0/types.d.ts"
12
+ ]
13
+ }
14
+ }
8
15
  }