@atlaskit/progress-indicator 9.2.8 → 9.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,21 @@
1
1
  # @atlaskit/progress-indicator
2
2
 
3
+ ## 9.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
+
9
+ ## 9.3.0
10
+
11
+ ### Minor Changes
12
+
13
+ - [`b85b29dd351`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b85b29dd351) - Updates `@emotion/core` to `@emotion/react`; v10 to v11. There is no expected behavior change.
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+
3
19
  ## 9.2.8
4
20
 
5
21
  ### Patch Changes
@@ -9,14 +9,14 @@ exports.PresentationalIndicator = exports.ButtonIndicator = void 0;
9
9
 
10
10
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
11
11
 
12
- var _core = require("@emotion/core");
12
+ var _react = require("@emotion/react");
13
13
 
14
14
  var _focusRing = _interopRequireDefault(require("@atlaskit/focus-ring"));
15
15
 
16
16
  var _constants = require("./constants");
17
17
 
18
18
  /** @jsx jsx */
19
- var commonStyles = (0, _core.css)({
19
+ var commonStyles = (0, _react.css)({
20
20
  width: "var(".concat(_constants.varDotsSize, ")"),
21
21
  height: "var(".concat(_constants.varDotsSize, ")"),
22
22
  position: 'relative',
@@ -31,7 +31,7 @@ var commonStyles = (0, _core.css)({
31
31
  content: '""'
32
32
  }
33
33
  });
34
- var buttonStyles = (0, _core.css)({
34
+ var buttonStyles = (0, _react.css)({
35
35
  padding: 0,
36
36
  border: 0,
37
37
  cursor: 'pointer',
@@ -45,7 +45,7 @@ var buttonStyles = (0, _core.css)({
45
45
 
46
46
  var PresentationalIndicator = function PresentationalIndicator(props // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
47
47
  ) {
48
- return (0, _core.jsx)("div", (0, _extends2.default)({}, props, {
48
+ return (0, _react.jsx)("div", (0, _extends2.default)({}, props, {
49
49
  css: commonStyles,
50
50
  role: "presentation"
51
51
  }));
@@ -60,7 +60,7 @@ var PresentationalIndicator = function PresentationalIndicator(props // eslint-d
60
60
  exports.PresentationalIndicator = PresentationalIndicator;
61
61
 
62
62
  var ButtonIndicator = function ButtonIndicator(props) {
63
- return (0, _core.jsx)(_focusRing.default, null, (0, _core.jsx)("button", (0, _extends2.default)({}, props, {
63
+ return (0, _react.jsx)(_focusRing.default, null, (0, _react.jsx)("button", (0, _extends2.default)({}, props, {
64
64
  role: "tab",
65
65
  type: "button",
66
66
  css: [commonStyles, buttonStyles]
@@ -13,7 +13,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
13
13
 
14
14
  var _react = _interopRequireWildcard(require("react"));
15
15
 
16
- var _core = require("@emotion/core");
16
+ var _react2 = require("@emotion/react");
17
17
 
18
18
  var _bindEventListener = require("bind-event-listener");
19
19
 
@@ -35,8 +35,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
35
35
 
36
36
  /** @jsx jsx */
37
37
  var packageName = "@atlaskit/progress-indicator";
38
- var packageVersion = "9.2.8";
39
- var containerStyles = (0, _core.css)({
38
+ var packageVersion = "9.3.1";
39
+ var containerStyles = (0, _react2.css)({
40
40
  display: 'flex',
41
41
  justifyContent: 'center',
42
42
  gap: "var(".concat(_constants.varDotsMargin, ")")
@@ -122,7 +122,7 @@ var ProgressDots = function ProgressDots(_ref) {
122
122
  });
123
123
  }, [onSelect, handleKeyDown]);
124
124
  var theme = (0, _components.useGlobalTheme)();
125
- return (0, _core.jsx)("div", {
125
+ return (0, _react2.jsx)("div", {
126
126
  "data-testid": testId,
127
127
  css: containerStyles,
128
128
  style: (_ref2 = {}, (0, _defineProperty2.default)(_ref2, _constants.varDotsSize, "".concat(_constants.sizes[size], "px")), (0, _defineProperty2.default)(_ref2, _constants.varDotsMargin, "".concat(_constants.sizes[size] / _constants.spacingDivision[gutter], "px")), _ref2),
@@ -137,7 +137,7 @@ var ProgressDots = function ProgressDots(_ref) {
137
137
  var backgroundColor = (0, _appearances.getBgColor)(appearance, isSelected)({
138
138
  theme: theme
139
139
  });
140
- return onSelect ? (0, _core.jsx)(_indicator.ButtonIndicator, {
140
+ return onSelect ? (0, _react2.jsx)(_indicator.ButtonIndicator, {
141
141
  key: index,
142
142
  style: {
143
143
  backgroundColor: backgroundColor
@@ -154,7 +154,7 @@ var ProgressDots = function ProgressDots(_ref) {
154
154
  },
155
155
  tabIndex: isSelected ? 0 : -1,
156
156
  "data-testid": testId && "".concat(testId, "-ind-").concat(index)
157
- }) : (0, _core.jsx)(_indicator.PresentationalIndicator, {
157
+ }) : (0, _react2.jsx)(_indicator.PresentationalIndicator, {
158
158
  "data-testid": testId && "".concat(testId, "-ind-").concat(index),
159
159
  key: index,
160
160
  style: {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/progress-indicator",
3
- "version": "9.2.8",
3
+ "version": "9.3.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
 
3
3
  /** @jsx jsx */
4
- import { css, jsx } from '@emotion/core';
4
+ import { css, jsx } from '@emotion/react';
5
5
  import FocusRing from '@atlaskit/focus-ring';
6
6
  import { varDotsMargin, varDotsSize } from './constants';
7
7
  const commonStyles = css({
@@ -1,6 +1,6 @@
1
1
  /** @jsx jsx */
2
2
  import React, { useCallback, useEffect, useRef } from 'react';
3
- import { css, jsx } from '@emotion/core';
3
+ import { css, jsx } from '@emotion/react';
4
4
  import { bind } from 'bind-event-listener';
5
5
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
6
6
  import noop from '@atlaskit/ds-lib/noop';
@@ -9,7 +9,7 @@ import { getBgColor } from './appearances';
9
9
  import { sizes, spacingDivision, varDotsMargin, varDotsSize } from './constants';
10
10
  import { ButtonIndicator, PresentationalIndicator } from './indicator';
11
11
  const packageName = "@atlaskit/progress-indicator";
12
- const packageVersion = "9.2.8";
12
+ const packageVersion = "9.3.1";
13
13
  const containerStyles = css({
14
14
  display: 'flex',
15
15
  justifyContent: 'center',
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/progress-indicator",
3
- "version": "9.2.8",
3
+ "version": "9.3.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,7 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
 
3
3
  /** @jsx jsx */
4
- import { css, jsx } from '@emotion/core';
4
+ import { css, jsx } from '@emotion/react';
5
5
  import FocusRing from '@atlaskit/focus-ring';
6
6
  import { varDotsMargin, varDotsSize } from './constants';
7
7
  var commonStyles = css({
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
 
3
3
  /** @jsx jsx */
4
4
  import React, { useCallback, useEffect, useRef } from 'react';
5
- import { css, jsx } from '@emotion/core';
5
+ import { css, jsx } from '@emotion/react';
6
6
  import { bind } from 'bind-event-listener';
7
7
  import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
8
8
  import noop from '@atlaskit/ds-lib/noop';
@@ -11,7 +11,7 @@ import { getBgColor } from './appearances';
11
11
  import { sizes, spacingDivision, varDotsMargin, varDotsSize } from './constants';
12
12
  import { ButtonIndicator, PresentationalIndicator } from './indicator';
13
13
  var packageName = "@atlaskit/progress-indicator";
14
- var packageVersion = "9.2.8";
14
+ var packageVersion = "9.3.1";
15
15
  var containerStyles = css({
16
16
  display: 'flex',
17
17
  justifyContent: 'center',
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/progress-indicator",
3
- "version": "9.2.8",
3
+ "version": "9.3.1",
4
4
  "sideEffects": false
5
5
  }
@@ -1,14 +1,15 @@
1
1
  /** @jsx jsx */
2
2
  import type { HTMLAttributes } from 'react';
3
+ import { jsx } from '@emotion/react';
3
4
  /**
4
5
  * __Presentational indicator__
5
6
  *
6
7
  * A presentational indicator with no interactivity
7
8
  */
8
- export declare const PresentationalIndicator: (props: HTMLAttributes<HTMLDivElement>) => JSX.Element;
9
+ export declare const PresentationalIndicator: (props: HTMLAttributes<HTMLDivElement>) => jsx.JSX.Element;
9
10
  /**
10
11
  * __Button indicator__
11
12
  *
12
13
  * An interactive indicator.
13
14
  */
14
- export declare const ButtonIndicator: (props: HTMLAttributes<HTMLButtonElement>) => JSX.Element;
15
+ export declare const ButtonIndicator: (props: HTMLAttributes<HTMLButtonElement>) => jsx.JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { DotsAppearance } from './types';
2
+ export declare const getBgColor: (appearance: DotsAppearance, isSelected: boolean) => import("@atlaskit/theme").ThemedValue<"var(--ds-background-neutral)"> | import("@atlaskit/theme").ThemedValue<"var(--ds-icon-subtle)"> | import("@atlaskit/theme").ThemedValue<"var(--ds-icon)"> | import("@atlaskit/theme").ThemedValue<"var(--ds-icon-discovery)"> | import("@atlaskit/theme").ThemedValue<"var(--ds-icon-inverse)"> | import("@atlaskit/theme").ThemedValue<"var(--ds-icon-brand)">;
@@ -0,0 +1,12 @@
1
+ export declare const sizes: {
2
+ small: number;
3
+ default: number;
4
+ large: number;
5
+ };
6
+ export declare const spacingDivision: {
7
+ comfortable: number;
8
+ cozy: number;
9
+ compact: number;
10
+ };
11
+ export declare const varDotsSize = "--ds-dots-size";
12
+ export declare const varDotsMargin = "--ds-dots-margin";
@@ -0,0 +1,15 @@
1
+ /** @jsx jsx */
2
+ import type { HTMLAttributes } from 'react';
3
+ import { jsx } from '@emotion/react';
4
+ /**
5
+ * __Presentational indicator__
6
+ *
7
+ * A presentational indicator with no interactivity
8
+ */
9
+ export declare const PresentationalIndicator: (props: HTMLAttributes<HTMLDivElement>) => jsx.JSX.Element;
10
+ /**
11
+ * __Button indicator__
12
+ *
13
+ * An interactive indicator.
14
+ */
15
+ export declare const ButtonIndicator: (props: HTMLAttributes<HTMLButtonElement>) => jsx.JSX.Element;
@@ -0,0 +1,10 @@
1
+ /** @jsx jsx */
2
+ import { FC } from 'react';
3
+ import type { ProgressDotsProps } from '../types';
4
+ /**
5
+ * __ProgressDots__
6
+ *
7
+ * A progress indicator shows the user where they are along the steps of a journey.
8
+ */
9
+ declare const ProgressDots: FC<ProgressDotsProps>;
10
+ export default ProgressDots;
@@ -0,0 +1,3 @@
1
+ export declare type DotsAppearance = 'default' | 'help' | 'inverted' | 'primary';
2
+ export declare type Spacing = 'comfortable' | 'cozy' | 'compact';
3
+ export declare type Size = 'small' | 'default' | 'large';
@@ -0,0 +1,2 @@
1
+ export { default as ProgressIndicator } from './components/progress-dots';
2
+ export type { ProgressDotsProps } from './types';
@@ -0,0 +1,44 @@
1
+ /// <reference types="react" />
2
+ import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
3
+ import type { DotsAppearance, Size, Spacing } from './components/types';
4
+ export interface ProgressDotsProps {
5
+ /**
6
+ * The color of the indicators
7
+ */
8
+ appearance?: DotsAppearance;
9
+ /**
10
+ * The aria-controls text applied to each indicator, appended by the index
11
+ */
12
+ ariaControls?: string;
13
+ /**
14
+ * The aria-label text applied to each indicator, appended by the index
15
+ */
16
+ ariaLabel?: string;
17
+ /**
18
+ * Function called when an indicator is selected
19
+ */
20
+ onSelect?: (eventData: {
21
+ event: React.MouseEvent<HTMLButtonElement>;
22
+ index: number;
23
+ }, analyticsEvent: UIAnalyticsEvent) => void;
24
+ /**
25
+ * Which indicator is currently selected
26
+ */
27
+ selectedIndex: number;
28
+ /**
29
+ * Corresponds to the width & height of each indicator
30
+ */
31
+ size?: Size;
32
+ /**
33
+ * How much of a gutter is desired between indicators
34
+ */
35
+ spacing?: Spacing;
36
+ /**
37
+ * A hook for automated tests.
38
+ */
39
+ testId?: string;
40
+ /**
41
+ * An array of values mapped over to create the indicators
42
+ */
43
+ values: any[];
44
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/progress-indicator",
3
- "version": "9.2.8",
3
+ "version": "9.3.1",
4
4
  "description": "A progress indicator shows the user where they are along the steps of 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": {
@@ -26,10 +33,10 @@
26
33
  "@atlaskit/analytics-next": "^8.0.0",
27
34
  "@atlaskit/ds-lib": "^2.1.0",
28
35
  "@atlaskit/focus-ring": "^1.0.0",
29
- "@atlaskit/theme": "^12.1.0",
36
+ "@atlaskit/theme": "^12.2.0",
30
37
  "@atlaskit/tokens": "^0.10.0",
31
38
  "@babel/runtime": "^7.0.0",
32
- "@emotion/core": "^10.0.9",
39
+ "@emotion/react": "^11.7.1",
33
40
  "bind-event-listener": "^2.1.1"
34
41
  },
35
42
  "peerDependencies": {
@@ -38,18 +45,18 @@
38
45
  "devDependencies": {
39
46
  "@atlaskit/button": "^16.3.0",
40
47
  "@atlaskit/docs": "*",
41
- "@atlaskit/section-message": "^6.0.0",
48
+ "@atlaskit/section-message": "^6.2.0",
42
49
  "@atlaskit/ssr": "*",
43
50
  "@atlaskit/visual-regression": "*",
44
51
  "@atlassian/atlassian-frontend-prettier-config-1.0.1": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.1",
45
- "@testing-library/react": "^8.0.1",
52
+ "@testing-library/react": "^12.1.5",
46
53
  "@types/jscodeshift": "^0.11.0",
47
54
  "enzyme": "^3.10.0",
48
55
  "jscodeshift": "^0.13.0",
49
56
  "react-dom": "^16.8.0",
50
57
  "react-lorem-component": "^0.13.0",
51
58
  "styled-components": "^3.2.6",
52
- "typescript": "4.3.5"
59
+ "typescript": "4.5.5"
53
60
  },
54
61
  "techstack": {
55
62
  "@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
  }