@atlaskit/progress-indicator 9.3.2 → 9.4.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/CHANGELOG.md +16 -0
- package/dist/cjs/components/constants.js +19 -7
- package/dist/cjs/components/indicator.js +2 -1
- package/dist/cjs/components/progress-dots.js +20 -12
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/constants.js +17 -5
- package/dist/es2019/components/indicator.js +2 -1
- package/dist/es2019/components/progress-dots.js +15 -15
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/constants.js +17 -5
- package/dist/esm/components/indicator.js +2 -1
- package/dist/esm/components/progress-dots.js +19 -14
- package/dist/esm/version.json +1 -1
- package/dist/types/components/constants.d.ts +24 -5
- package/package.json +9 -13
- package/report.api.md +17 -40
- package/dist/types-ts4.0/components/appearances.d.ts +0 -2
- package/dist/types-ts4.0/components/constants.d.ts +0 -12
- package/dist/types-ts4.0/components/indicator.d.ts +0 -15
- package/dist/types-ts4.0/components/progress-dots.d.ts +0 -10
- package/dist/types-ts4.0/components/types.d.ts +0 -3
- package/dist/types-ts4.0/index.d.ts +0 -2
- package/dist/types-ts4.0/types.d.ts +0 -44
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/progress-indicator
|
|
2
2
|
|
|
3
|
+
## 9.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`c146611a18c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c146611a18c) - [ux] Migrate progress-indicator package to use spacing primitives to control spacing in both component and examples. Spacing values have been slightly updated depending on indicator size and spacing properties
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 9.3.3
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 9.3.2
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -3,19 +3,31 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.varDotsSize = exports.varDotsMargin = exports.
|
|
6
|
+
exports.varDotsSize = exports.varDotsMargin = exports.sizes = exports.progressIndicatorGapMap = void 0;
|
|
7
|
+
var progressIndicatorGapMap = {
|
|
8
|
+
comfortable: {
|
|
9
|
+
small: ['scale.075', "var(--ds-space-075, 6px)"],
|
|
10
|
+
default: ['scale.100', "var(--ds-space-100, 8px)"],
|
|
11
|
+
large: ['scale.150', "var(--ds-space-150, 12px)"]
|
|
12
|
+
},
|
|
13
|
+
cozy: {
|
|
14
|
+
small: ['scale.050', "var(--ds-space-050, 4px)"],
|
|
15
|
+
default: ['scale.075', "var(--ds-space-075, 6px)"],
|
|
16
|
+
large: ['scale.100', "var(--ds-space-100, 8px)"]
|
|
17
|
+
},
|
|
18
|
+
compact: {
|
|
19
|
+
small: ['scale.025', "var(--ds-space-025, 2px)"],
|
|
20
|
+
default: ['scale.050', "var(--ds-space-050, 4px)"],
|
|
21
|
+
large: ['scale.075', "var(--ds-space-075, 6px)"]
|
|
22
|
+
}
|
|
23
|
+
};
|
|
24
|
+
exports.progressIndicatorGapMap = progressIndicatorGapMap;
|
|
7
25
|
var sizes = {
|
|
8
26
|
small: 4,
|
|
9
27
|
default: 8,
|
|
10
28
|
large: 12
|
|
11
29
|
};
|
|
12
30
|
exports.sizes = sizes;
|
|
13
|
-
var spacingDivision = {
|
|
14
|
-
comfortable: 1,
|
|
15
|
-
cozy: 2,
|
|
16
|
-
compact: 4
|
|
17
|
-
};
|
|
18
|
-
exports.spacingDivision = spacingDivision;
|
|
19
31
|
var varDotsSize = '--ds-dots-size';
|
|
20
32
|
exports.varDotsSize = varDotsSize;
|
|
21
33
|
var varDotsMargin = '--ds-dots-margin';
|
|
@@ -15,6 +15,8 @@ var _focusRing = _interopRequireDefault(require("@atlaskit/focus-ring"));
|
|
|
15
15
|
|
|
16
16
|
var _constants = require("./constants");
|
|
17
17
|
|
|
18
|
+
/* eslint-disable @repo/internal/react/use-primitives */
|
|
19
|
+
|
|
18
20
|
/** @jsx jsx */
|
|
19
21
|
var commonStyles = (0, _react.css)({
|
|
20
22
|
width: "var(".concat(_constants.varDotsSize, ")"),
|
|
@@ -32,7 +34,6 @@ var commonStyles = (0, _react.css)({
|
|
|
32
34
|
}
|
|
33
35
|
});
|
|
34
36
|
var buttonStyles = (0, _react.css)({
|
|
35
|
-
// TODO Delete this comment after verifying spacing token -> previous value `0`
|
|
36
37
|
padding: "var(--ds-scale-0, 0px)",
|
|
37
38
|
border: 0,
|
|
38
39
|
cursor: 'pointer',
|
|
@@ -11,6 +11,8 @@ exports.default = void 0;
|
|
|
11
11
|
|
|
12
12
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
13
13
|
|
|
14
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
15
|
+
|
|
14
16
|
var _react = _interopRequireWildcard(require("react"));
|
|
15
17
|
|
|
16
18
|
var _react2 = require("@emotion/react");
|
|
@@ -19,6 +21,10 @@ var _bindEventListener = require("bind-event-listener");
|
|
|
19
21
|
|
|
20
22
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
21
23
|
|
|
24
|
+
var _box = _interopRequireDefault(require("@atlaskit/ds-explorations/box"));
|
|
25
|
+
|
|
26
|
+
var _inline = _interopRequireDefault(require("@atlaskit/ds-explorations/inline"));
|
|
27
|
+
|
|
22
28
|
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
23
29
|
|
|
24
30
|
var _components = require("@atlaskit/theme/components");
|
|
@@ -35,12 +41,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
35
41
|
|
|
36
42
|
/** @jsx jsx */
|
|
37
43
|
var packageName = "@atlaskit/progress-indicator";
|
|
38
|
-
var packageVersion = "9.
|
|
39
|
-
var containerStyles = (0, _react2.css)({
|
|
40
|
-
display: 'flex',
|
|
41
|
-
justifyContent: 'center',
|
|
42
|
-
gap: "var(".concat(_constants.varDotsMargin, ")")
|
|
43
|
-
});
|
|
44
|
+
var packageVersion = "9.4.0";
|
|
44
45
|
/**
|
|
45
46
|
* __ProgressDots__
|
|
46
47
|
*
|
|
@@ -72,6 +73,11 @@ var ProgressDots = function ProgressDots(_ref) {
|
|
|
72
73
|
packageName: packageName,
|
|
73
74
|
packageVersion: packageVersion
|
|
74
75
|
});
|
|
76
|
+
|
|
77
|
+
var _progressIndicatorGap = (0, _slicedToArray2.default)(_constants.progressIndicatorGapMap[gutter][size], 2),
|
|
78
|
+
inlineGapValue = _progressIndicatorGap[0],
|
|
79
|
+
rawGapValue = _progressIndicatorGap[1];
|
|
80
|
+
|
|
75
81
|
var handleKeyDown = (0, _react.useCallback)(function (event) {
|
|
76
82
|
var indicators = Array.from(tablistRef.current.children); // bail if the target isn't an indicator
|
|
77
83
|
|
|
@@ -122,14 +128,16 @@ var ProgressDots = function ProgressDots(_ref) {
|
|
|
122
128
|
});
|
|
123
129
|
}, [onSelect, handleKeyDown]);
|
|
124
130
|
var theme = (0, _components.useGlobalTheme)();
|
|
125
|
-
return (0, _react2.jsx)(
|
|
126
|
-
"
|
|
127
|
-
|
|
128
|
-
|
|
131
|
+
return (0, _react2.jsx)(_box.default, {
|
|
132
|
+
UNSAFE_style: (_ref2 = {}, (0, _defineProperty2.default)(_ref2, _constants.varDotsSize, "".concat(_constants.sizes[size], "px")), (0, _defineProperty2.default)(_ref2, _constants.varDotsMargin, rawGapValue), _ref2),
|
|
133
|
+
role: "tablist"
|
|
134
|
+
}, (0, _react2.jsx)(_inline.default, {
|
|
135
|
+
testId: testId,
|
|
129
136
|
ref: function ref(r) {
|
|
130
137
|
tablistRef.current = r;
|
|
131
138
|
},
|
|
132
|
-
|
|
139
|
+
justifyContent: "center",
|
|
140
|
+
gap: inlineGapValue
|
|
133
141
|
}, values.map(function (_, index) {
|
|
134
142
|
var isSelected = selectedIndex === index;
|
|
135
143
|
var tabId = "".concat(ariaLabel).concat(index);
|
|
@@ -161,7 +169,7 @@ var ProgressDots = function ProgressDots(_ref) {
|
|
|
161
169
|
backgroundColor: backgroundColor
|
|
162
170
|
}
|
|
163
171
|
});
|
|
164
|
-
}));
|
|
172
|
+
})));
|
|
165
173
|
};
|
|
166
174
|
|
|
167
175
|
var _default = ProgressDots;
|
package/dist/cjs/version.json
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
|
+
export const progressIndicatorGapMap = {
|
|
2
|
+
comfortable: {
|
|
3
|
+
small: ['scale.075', "var(--ds-space-075, 6px)"],
|
|
4
|
+
default: ['scale.100', "var(--ds-space-100, 8px)"],
|
|
5
|
+
large: ['scale.150', "var(--ds-space-150, 12px)"]
|
|
6
|
+
},
|
|
7
|
+
cozy: {
|
|
8
|
+
small: ['scale.050', "var(--ds-space-050, 4px)"],
|
|
9
|
+
default: ['scale.075', "var(--ds-space-075, 6px)"],
|
|
10
|
+
large: ['scale.100', "var(--ds-space-100, 8px)"]
|
|
11
|
+
},
|
|
12
|
+
compact: {
|
|
13
|
+
small: ['scale.025', "var(--ds-space-025, 2px)"],
|
|
14
|
+
default: ['scale.050', "var(--ds-space-050, 4px)"],
|
|
15
|
+
large: ['scale.075', "var(--ds-space-075, 6px)"]
|
|
16
|
+
}
|
|
17
|
+
};
|
|
1
18
|
export const sizes = {
|
|
2
19
|
small: 4,
|
|
3
20
|
default: 8,
|
|
4
21
|
large: 12
|
|
5
22
|
};
|
|
6
|
-
export const spacingDivision = {
|
|
7
|
-
comfortable: 1,
|
|
8
|
-
cozy: 2,
|
|
9
|
-
compact: 4
|
|
10
|
-
};
|
|
11
23
|
export const varDotsSize = '--ds-dots-size';
|
|
12
24
|
export const varDotsMargin = '--ds-dots-margin';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
|
|
3
|
+
/* eslint-disable @repo/internal/react/use-primitives */
|
|
4
|
+
|
|
3
5
|
/** @jsx jsx */
|
|
4
6
|
import { css, jsx } from '@emotion/react';
|
|
5
7
|
import FocusRing from '@atlaskit/focus-ring';
|
|
@@ -20,7 +22,6 @@ const commonStyles = css({
|
|
|
20
22
|
}
|
|
21
23
|
});
|
|
22
24
|
const buttonStyles = css({
|
|
23
|
-
// TODO Delete this comment after verifying spacing token -> previous value `0`
|
|
24
25
|
padding: "var(--ds-scale-0, 0px)",
|
|
25
26
|
border: 0,
|
|
26
27
|
cursor: 'pointer',
|
|
@@ -1,20 +1,17 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import React, { useCallback, useEffect, useRef } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { jsx } from '@emotion/react';
|
|
4
4
|
import { bind } from 'bind-event-listener';
|
|
5
5
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
6
|
+
import Box from '@atlaskit/ds-explorations/box';
|
|
7
|
+
import Inline from '@atlaskit/ds-explorations/inline';
|
|
6
8
|
import noop from '@atlaskit/ds-lib/noop';
|
|
7
9
|
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
8
10
|
import { getBgColor } from './appearances';
|
|
9
|
-
import {
|
|
11
|
+
import { progressIndicatorGapMap, sizes, varDotsMargin, varDotsSize } from './constants';
|
|
10
12
|
import { ButtonIndicator, PresentationalIndicator } from './indicator';
|
|
11
13
|
const packageName = "@atlaskit/progress-indicator";
|
|
12
|
-
const packageVersion = "9.
|
|
13
|
-
const containerStyles = css({
|
|
14
|
-
display: 'flex',
|
|
15
|
-
justifyContent: 'center',
|
|
16
|
-
gap: `var(${varDotsMargin})`
|
|
17
|
-
});
|
|
14
|
+
const packageVersion = "9.4.0";
|
|
18
15
|
/**
|
|
19
16
|
* __ProgressDots__
|
|
20
17
|
*
|
|
@@ -42,6 +39,7 @@ const ProgressDots = ({
|
|
|
42
39
|
packageName,
|
|
43
40
|
packageVersion
|
|
44
41
|
});
|
|
42
|
+
const [inlineGapValue, rawGapValue] = progressIndicatorGapMap[gutter][size];
|
|
45
43
|
const handleKeyDown = useCallback(event => {
|
|
46
44
|
const indicators = Array.from(tablistRef.current.children); // bail if the target isn't an indicator
|
|
47
45
|
|
|
@@ -92,17 +90,19 @@ const ProgressDots = ({
|
|
|
92
90
|
});
|
|
93
91
|
}, [onSelect, handleKeyDown]);
|
|
94
92
|
const theme = useGlobalTheme();
|
|
95
|
-
return jsx(
|
|
96
|
-
|
|
97
|
-
css: containerStyles,
|
|
98
|
-
style: {
|
|
93
|
+
return jsx(Box, {
|
|
94
|
+
UNSAFE_style: {
|
|
99
95
|
[varDotsSize]: `${sizes[size]}px`,
|
|
100
|
-
[varDotsMargin]:
|
|
96
|
+
[varDotsMargin]: rawGapValue
|
|
101
97
|
},
|
|
98
|
+
role: "tablist"
|
|
99
|
+
}, jsx(Inline, {
|
|
100
|
+
testId: testId,
|
|
102
101
|
ref: r => {
|
|
103
102
|
tablistRef.current = r;
|
|
104
103
|
},
|
|
105
|
-
|
|
104
|
+
justifyContent: "center",
|
|
105
|
+
gap: inlineGapValue
|
|
106
106
|
}, values.map((_, index) => {
|
|
107
107
|
const isSelected = selectedIndex === index;
|
|
108
108
|
const tabId = `${ariaLabel}${index}`;
|
|
@@ -132,7 +132,7 @@ const ProgressDots = ({
|
|
|
132
132
|
backgroundColor
|
|
133
133
|
}
|
|
134
134
|
});
|
|
135
|
-
}));
|
|
135
|
+
})));
|
|
136
136
|
};
|
|
137
137
|
|
|
138
138
|
export default ProgressDots;
|
package/dist/es2019/version.json
CHANGED
|
@@ -1,12 +1,24 @@
|
|
|
1
|
+
export var progressIndicatorGapMap = {
|
|
2
|
+
comfortable: {
|
|
3
|
+
small: ['scale.075', "var(--ds-space-075, 6px)"],
|
|
4
|
+
default: ['scale.100', "var(--ds-space-100, 8px)"],
|
|
5
|
+
large: ['scale.150', "var(--ds-space-150, 12px)"]
|
|
6
|
+
},
|
|
7
|
+
cozy: {
|
|
8
|
+
small: ['scale.050', "var(--ds-space-050, 4px)"],
|
|
9
|
+
default: ['scale.075', "var(--ds-space-075, 6px)"],
|
|
10
|
+
large: ['scale.100', "var(--ds-space-100, 8px)"]
|
|
11
|
+
},
|
|
12
|
+
compact: {
|
|
13
|
+
small: ['scale.025', "var(--ds-space-025, 2px)"],
|
|
14
|
+
default: ['scale.050', "var(--ds-space-050, 4px)"],
|
|
15
|
+
large: ['scale.075', "var(--ds-space-075, 6px)"]
|
|
16
|
+
}
|
|
17
|
+
};
|
|
1
18
|
export var sizes = {
|
|
2
19
|
small: 4,
|
|
3
20
|
default: 8,
|
|
4
21
|
large: 12
|
|
5
22
|
};
|
|
6
|
-
export var spacingDivision = {
|
|
7
|
-
comfortable: 1,
|
|
8
|
-
cozy: 2,
|
|
9
|
-
compact: 4
|
|
10
|
-
};
|
|
11
23
|
export var varDotsSize = '--ds-dots-size';
|
|
12
24
|
export var varDotsMargin = '--ds-dots-margin';
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
|
|
3
|
+
/* eslint-disable @repo/internal/react/use-primitives */
|
|
4
|
+
|
|
3
5
|
/** @jsx jsx */
|
|
4
6
|
import { css, jsx } from '@emotion/react';
|
|
5
7
|
import FocusRing from '@atlaskit/focus-ring';
|
|
@@ -20,7 +22,6 @@ var commonStyles = css({
|
|
|
20
22
|
}
|
|
21
23
|
});
|
|
22
24
|
var buttonStyles = css({
|
|
23
|
-
// TODO Delete this comment after verifying spacing token -> previous value `0`
|
|
24
25
|
padding: "var(--ds-scale-0, 0px)",
|
|
25
26
|
border: 0,
|
|
26
27
|
cursor: 'pointer',
|
|
@@ -1,22 +1,20 @@
|
|
|
1
1
|
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
+
import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
|
|
2
3
|
|
|
3
4
|
/** @jsx jsx */
|
|
4
5
|
import React, { useCallback, useEffect, useRef } from 'react';
|
|
5
|
-
import {
|
|
6
|
+
import { jsx } from '@emotion/react';
|
|
6
7
|
import { bind } from 'bind-event-listener';
|
|
7
8
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
9
|
+
import Box from '@atlaskit/ds-explorations/box';
|
|
10
|
+
import Inline from '@atlaskit/ds-explorations/inline';
|
|
8
11
|
import noop from '@atlaskit/ds-lib/noop';
|
|
9
12
|
import { useGlobalTheme } from '@atlaskit/theme/components';
|
|
10
13
|
import { getBgColor } from './appearances';
|
|
11
|
-
import {
|
|
14
|
+
import { progressIndicatorGapMap, sizes, varDotsMargin, varDotsSize } from './constants';
|
|
12
15
|
import { ButtonIndicator, PresentationalIndicator } from './indicator';
|
|
13
16
|
var packageName = "@atlaskit/progress-indicator";
|
|
14
|
-
var packageVersion = "9.
|
|
15
|
-
var containerStyles = css({
|
|
16
|
-
display: 'flex',
|
|
17
|
-
justifyContent: 'center',
|
|
18
|
-
gap: "var(".concat(varDotsMargin, ")")
|
|
19
|
-
});
|
|
17
|
+
var packageVersion = "9.4.0";
|
|
20
18
|
/**
|
|
21
19
|
* __ProgressDots__
|
|
22
20
|
*
|
|
@@ -48,6 +46,11 @@ var ProgressDots = function ProgressDots(_ref) {
|
|
|
48
46
|
packageName: packageName,
|
|
49
47
|
packageVersion: packageVersion
|
|
50
48
|
});
|
|
49
|
+
|
|
50
|
+
var _progressIndicatorGap = _slicedToArray(progressIndicatorGapMap[gutter][size], 2),
|
|
51
|
+
inlineGapValue = _progressIndicatorGap[0],
|
|
52
|
+
rawGapValue = _progressIndicatorGap[1];
|
|
53
|
+
|
|
51
54
|
var handleKeyDown = useCallback(function (event) {
|
|
52
55
|
var indicators = Array.from(tablistRef.current.children); // bail if the target isn't an indicator
|
|
53
56
|
|
|
@@ -98,14 +101,16 @@ var ProgressDots = function ProgressDots(_ref) {
|
|
|
98
101
|
});
|
|
99
102
|
}, [onSelect, handleKeyDown]);
|
|
100
103
|
var theme = useGlobalTheme();
|
|
101
|
-
return jsx(
|
|
102
|
-
"
|
|
103
|
-
|
|
104
|
-
|
|
104
|
+
return jsx(Box, {
|
|
105
|
+
UNSAFE_style: (_ref2 = {}, _defineProperty(_ref2, varDotsSize, "".concat(sizes[size], "px")), _defineProperty(_ref2, varDotsMargin, rawGapValue), _ref2),
|
|
106
|
+
role: "tablist"
|
|
107
|
+
}, jsx(Inline, {
|
|
108
|
+
testId: testId,
|
|
105
109
|
ref: function ref(r) {
|
|
106
110
|
tablistRef.current = r;
|
|
107
111
|
},
|
|
108
|
-
|
|
112
|
+
justifyContent: "center",
|
|
113
|
+
gap: inlineGapValue
|
|
109
114
|
}, values.map(function (_, index) {
|
|
110
115
|
var isSelected = selectedIndex === index;
|
|
111
116
|
var tabId = "".concat(ariaLabel).concat(index);
|
|
@@ -137,7 +142,7 @@ var ProgressDots = function ProgressDots(_ref) {
|
|
|
137
142
|
backgroundColor: backgroundColor
|
|
138
143
|
}
|
|
139
144
|
});
|
|
140
|
-
}));
|
|
145
|
+
})));
|
|
141
146
|
};
|
|
142
147
|
|
|
143
148
|
export default ProgressDots;
|
package/dist/esm/version.json
CHANGED
|
@@ -1,12 +1,31 @@
|
|
|
1
|
+
import type { UNSAFE_InlineProps } from '@atlaskit/ds-explorations';
|
|
2
|
+
import { token } from '@atlaskit/tokens';
|
|
3
|
+
declare type TokenValue = ReturnType<typeof token>;
|
|
4
|
+
declare type ScaleValue = UNSAFE_InlineProps['gap'];
|
|
5
|
+
declare type SpacingTuple = [ScaleValue, TokenValue];
|
|
6
|
+
declare type SpacingPropsToTokensMap = {
|
|
7
|
+
comfortable: {
|
|
8
|
+
small: SpacingTuple;
|
|
9
|
+
default: SpacingTuple;
|
|
10
|
+
large: SpacingTuple;
|
|
11
|
+
};
|
|
12
|
+
cozy: {
|
|
13
|
+
small: SpacingTuple;
|
|
14
|
+
default: SpacingTuple;
|
|
15
|
+
large: SpacingTuple;
|
|
16
|
+
};
|
|
17
|
+
compact: {
|
|
18
|
+
small: SpacingTuple;
|
|
19
|
+
default: SpacingTuple;
|
|
20
|
+
large: SpacingTuple;
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
export declare const progressIndicatorGapMap: SpacingPropsToTokensMap;
|
|
1
24
|
export declare const sizes: {
|
|
2
25
|
small: number;
|
|
3
26
|
default: number;
|
|
4
27
|
large: number;
|
|
5
28
|
};
|
|
6
|
-
export declare const spacingDivision: {
|
|
7
|
-
comfortable: number;
|
|
8
|
-
cozy: number;
|
|
9
|
-
compact: number;
|
|
10
|
-
};
|
|
11
29
|
export declare const varDotsSize = "--ds-dots-size";
|
|
12
30
|
export declare const varDotsMargin = "--ds-dots-margin";
|
|
31
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/progress-indicator",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.4.0",
|
|
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,14 +12,6 @@
|
|
|
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
|
-
"dist/types-ts4.0/index.d.ts"
|
|
20
|
-
]
|
|
21
|
-
}
|
|
22
|
-
},
|
|
23
15
|
"sideEffects": false,
|
|
24
16
|
"atlaskit:src": "src/index.tsx",
|
|
25
17
|
"atlassian": {
|
|
@@ -33,10 +25,11 @@
|
|
|
33
25
|
},
|
|
34
26
|
"dependencies": {
|
|
35
27
|
"@atlaskit/analytics-next": "^8.0.0",
|
|
28
|
+
"@atlaskit/ds-explorations": "^1.5.0",
|
|
36
29
|
"@atlaskit/ds-lib": "^2.1.0",
|
|
37
|
-
"@atlaskit/focus-ring": "^1.
|
|
30
|
+
"@atlaskit/focus-ring": "^1.2.0",
|
|
38
31
|
"@atlaskit/theme": "^12.2.0",
|
|
39
|
-
"@atlaskit/tokens": "^0.
|
|
32
|
+
"@atlaskit/tokens": "^0.11.0",
|
|
40
33
|
"@babel/runtime": "^7.0.0",
|
|
41
34
|
"@emotion/react": "^11.7.1",
|
|
42
35
|
"bind-event-listener": "^2.1.1"
|
|
@@ -45,7 +38,7 @@
|
|
|
45
38
|
"react": "^16.8.0"
|
|
46
39
|
},
|
|
47
40
|
"devDependencies": {
|
|
48
|
-
"@atlaskit/button": "^16.
|
|
41
|
+
"@atlaskit/button": "^16.4.0",
|
|
49
42
|
"@atlaskit/docs": "*",
|
|
50
43
|
"@atlaskit/section-message": "^6.3.0",
|
|
51
44
|
"@atlaskit/ssr": "*",
|
|
@@ -66,7 +59,10 @@
|
|
|
66
59
|
},
|
|
67
60
|
"@repo/internal": {
|
|
68
61
|
"dom-events": "use-bind-event-listener",
|
|
69
|
-
"ui-components":
|
|
62
|
+
"ui-components": [
|
|
63
|
+
"lite-mode",
|
|
64
|
+
"primitives"
|
|
65
|
+
],
|
|
70
66
|
"design-system": "v1",
|
|
71
67
|
"styling": [
|
|
72
68
|
"static",
|
package/report.api.md
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
## API Report File for "@atlaskit/progress-indicator"
|
|
1
|
+
## API Report File for "@atlaskit/progress-indicator"
|
|
2
2
|
|
|
3
|
-
> Do not edit this file.
|
|
3
|
+
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
4
|
+
|
|
5
|
+
<!--
|
|
6
|
+
Generated API Report version: 2.0
|
|
7
|
+
-->
|
|
4
8
|
|
|
5
9
|
[Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
|
|
6
10
|
|
|
@@ -10,24 +14,14 @@
|
|
|
10
14
|
import { FC } from 'react';
|
|
11
15
|
import type { UIAnalyticsEvent } from '@atlaskit/analytics-next';
|
|
12
16
|
|
|
13
|
-
|
|
17
|
+
// @public (undocumented)
|
|
18
|
+
type DotsAppearance = 'default' | 'help' | 'inverted' | 'primary';
|
|
14
19
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* The color of the indicators
|
|
18
|
-
*/
|
|
20
|
+
// @public (undocumented)
|
|
21
|
+
export interface ProgressDotsProps {
|
|
19
22
|
appearance?: DotsAppearance;
|
|
20
|
-
/**
|
|
21
|
-
* The aria-controls text applied to each indicator, appended by the index
|
|
22
|
-
*/
|
|
23
23
|
ariaControls?: string;
|
|
24
|
-
/**
|
|
25
|
-
* The aria-label text applied to each indicator, appended by the index
|
|
26
|
-
*/
|
|
27
24
|
ariaLabel?: string;
|
|
28
|
-
/**
|
|
29
|
-
* Function called when an indicator is selected
|
|
30
|
-
*/
|
|
31
25
|
onSelect?: (
|
|
32
26
|
eventData: {
|
|
33
27
|
event: React.MouseEvent<HTMLButtonElement>;
|
|
@@ -35,38 +29,21 @@ export declare interface ProgressDotsProps {
|
|
|
35
29
|
},
|
|
36
30
|
analyticsEvent: UIAnalyticsEvent,
|
|
37
31
|
) => void;
|
|
38
|
-
/**
|
|
39
|
-
* Which indicator is currently selected
|
|
40
|
-
*/
|
|
41
32
|
selectedIndex: number;
|
|
42
|
-
/**
|
|
43
|
-
* Corresponds to the width & height of each indicator
|
|
44
|
-
*/
|
|
45
33
|
size?: Size;
|
|
46
|
-
/**
|
|
47
|
-
* How much of a gutter is desired between indicators
|
|
48
|
-
*/
|
|
49
34
|
spacing?: Spacing;
|
|
50
|
-
/**
|
|
51
|
-
* A hook for automated tests.
|
|
52
|
-
*/
|
|
53
35
|
testId?: string;
|
|
54
|
-
/**
|
|
55
|
-
* An array of values mapped over to create the indicators
|
|
56
|
-
*/
|
|
57
36
|
values: any[];
|
|
58
37
|
}
|
|
59
38
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
*
|
|
63
|
-
* A progress indicator shows the user where they are along the steps of a journey.
|
|
64
|
-
*/
|
|
65
|
-
export declare const ProgressIndicator: FC<ProgressDotsProps>;
|
|
39
|
+
// @public
|
|
40
|
+
export const ProgressIndicator: FC<ProgressDotsProps>;
|
|
66
41
|
|
|
67
|
-
|
|
42
|
+
// @public (undocumented)
|
|
43
|
+
type Size = 'small' | 'default' | 'large';
|
|
68
44
|
|
|
69
|
-
|
|
45
|
+
// @public (undocumented)
|
|
46
|
+
type Spacing = 'comfortable' | 'cozy' | 'compact';
|
|
70
47
|
|
|
71
|
-
|
|
48
|
+
// (No @packageDocumentation comment for this package)
|
|
72
49
|
```
|
|
@@ -1,2 +0,0 @@
|
|
|
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)">;
|
|
@@ -1,12 +0,0 @@
|
|
|
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";
|
|
@@ -1,15 +0,0 @@
|
|
|
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;
|
|
@@ -1,10 +0,0 @@
|
|
|
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;
|
|
@@ -1,44 +0,0 @@
|
|
|
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
|
-
}
|