@atlaskit/progress-indicator 12.0.17 → 12.0.19
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 +15 -0
- package/dist/cjs/components/{indicator.js → button-indicator.js} +15 -29
- package/dist/cjs/components/presentational-indicator.compiled.css +13 -0
- package/dist/cjs/components/presentational-indicator.js +54 -0
- package/dist/cjs/components/progress-dots.js +4 -3
- package/dist/es2019/components/{indicator.js → button-indicator.js} +10 -25
- package/dist/es2019/components/presentational-indicator.compiled.css +13 -0
- package/dist/es2019/components/presentational-indicator.js +47 -0
- package/dist/es2019/components/progress-dots.js +2 -1
- package/dist/esm/components/{indicator.js → button-indicator.js} +15 -29
- package/dist/esm/components/presentational-indicator.compiled.css +13 -0
- package/dist/esm/components/presentational-indicator.js +46 -0
- package/dist/esm/components/progress-dots.js +2 -1
- package/dist/types/components/button-indicator.d.ts +34 -0
- package/dist/types/components/presentational-indicator.d.ts +12 -0
- package/dist/types-ts4.5/components/button-indicator.d.ts +34 -0
- package/dist/types-ts4.5/components/presentational-indicator.d.ts +12 -0
- package/package.json +13 -5
- package/dist/types/components/indicator.d.ts +0 -28
- package/dist/types-ts4.5/components/indicator.d.ts +0 -28
- /package/dist/cjs/components/{indicator.compiled.css → button-indicator.compiled.css} +0 -0
- /package/dist/es2019/components/{indicator.compiled.css → button-indicator.compiled.css} +0 -0
- /package/dist/esm/components/{indicator.compiled.css → button-indicator.compiled.css} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/progress-indicator
|
|
2
2
|
|
|
3
|
+
## 12.0.19
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 12.0.18
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`02483200273ec`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/02483200273ec) -
|
|
14
|
+
Enrol all Design System UI packages into the React Compiler with platform gating via
|
|
15
|
+
isReactCompilerActivePlatform.
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
|
|
3
18
|
## 12.0.17
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* indicator.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
1
|
+
/* button-indicator.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
2
|
"use strict";
|
|
3
3
|
|
|
4
4
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
@@ -6,8 +6,8 @@ var _typeof = require("@babel/runtime/helpers/typeof");
|
|
|
6
6
|
Object.defineProperty(exports, "__esModule", {
|
|
7
7
|
value: true
|
|
8
8
|
});
|
|
9
|
-
exports.
|
|
10
|
-
require("./indicator.compiled.css");
|
|
9
|
+
exports.ButtonIndicator = void 0;
|
|
10
|
+
require("./button-indicator.compiled.css");
|
|
11
11
|
var React = _interopRequireWildcard(require("react"));
|
|
12
12
|
var _runtime = require("@compiled/react/runtime");
|
|
13
13
|
var _react2 = require("@compiled/react");
|
|
@@ -42,38 +42,24 @@ var backgroundColor = function backgroundColor(isSelected) {
|
|
|
42
42
|
primary: "var(--ds-icon-brand, #1868DB)"
|
|
43
43
|
};
|
|
44
44
|
};
|
|
45
|
-
|
|
45
|
+
// TODO: Fill in the component {description} and ensure links point to the correct {packageName} location.
|
|
46
|
+
// Remove links that the component does not have (such as usage). If there are no links remove them all.
|
|
46
47
|
/**
|
|
47
|
-
*
|
|
48
|
+
* __Button indicator__
|
|
49
|
+
*
|
|
50
|
+
* A button indicator {description}.
|
|
48
51
|
*
|
|
49
|
-
*
|
|
52
|
+
* - [Examples](https://atlassian.design/components/{packageName}/examples)
|
|
53
|
+
* - [Code](https://atlassian.design/components/{packageName}/code)
|
|
54
|
+
* - [Usage](https://atlassian.design/components/{packageName}/usage)
|
|
50
55
|
*/
|
|
51
|
-
var
|
|
56
|
+
var ButtonIndicator = exports.ButtonIndicator = function ButtonIndicator(_ref) {
|
|
52
57
|
var appearance = _ref.appearance,
|
|
58
|
+
panelId = _ref.panelId,
|
|
59
|
+
tabId = _ref.tabId,
|
|
53
60
|
isSelected = _ref.isSelected,
|
|
61
|
+
onClick = _ref.onClick,
|
|
54
62
|
testId = _ref.testId;
|
|
55
|
-
return /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
56
|
-
testId: testId
|
|
57
|
-
// here we set it dynamic because that backgroundColor and xcss don't support the colors we need here eg. token('color.icon')
|
|
58
|
-
,
|
|
59
|
-
style: {
|
|
60
|
-
backgroundColor: backgroundColor(isSelected)[appearance]
|
|
61
|
-
},
|
|
62
|
-
xcss: (0, _react2.cx)(commonStyles.common, colorBorderMap[appearance])
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
/**
|
|
66
|
-
* __Button indicator__
|
|
67
|
-
*
|
|
68
|
-
* An interactive indicator.
|
|
69
|
-
*/
|
|
70
|
-
var ButtonIndicator = exports.ButtonIndicator = function ButtonIndicator(_ref2) {
|
|
71
|
-
var appearance = _ref2.appearance,
|
|
72
|
-
panelId = _ref2.panelId,
|
|
73
|
-
tabId = _ref2.tabId,
|
|
74
|
-
isSelected = _ref2.isSelected,
|
|
75
|
-
onClick = _ref2.onClick,
|
|
76
|
-
testId = _ref2.testId;
|
|
77
63
|
return /*#__PURE__*/React.createElement(_compiled.Pressable, {
|
|
78
64
|
role: "tab",
|
|
79
65
|
style: {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
._19it1axi{border:var(--ds-border-width,1px) solid var(--ds-border-bold,#7d818a)}
|
|
2
|
+
._19it1ps9{border:var(--ds-border-width,1px) solid var(--ds-border-inverse,#fff)}
|
|
3
|
+
._2rko1rr0{border-radius:var(--ds-radius-full,9999px)}
|
|
4
|
+
._1bsbg7kr{width:var(--ds-dots-size)}
|
|
5
|
+
._1cs8stnw:before{position:absolute}
|
|
6
|
+
._1kt9b3bt:before{content:""}
|
|
7
|
+
._1mp41th6:before{width:calc(var(--ds-dots-size) + var(--ds-dots-margin))}
|
|
8
|
+
._4t3ig7kr{height:var(--ds-dots-size)}
|
|
9
|
+
._cfu11ule:before{display:block}
|
|
10
|
+
._iajm1yh4:before{inset-block-start:calc(var(--ds-dots-margin)*-1/2)}
|
|
11
|
+
._kfgt1th6:before{height:calc(var(--ds-dots-size) + var(--ds-dots-margin))}
|
|
12
|
+
._kqswh2mm{position:relative}
|
|
13
|
+
._z5wt1yh4:before{inset-inline-start:calc(var(--ds-dots-margin)*-1/2)}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/* presentational-indicator.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
3
|
+
"use strict";
|
|
4
|
+
|
|
5
|
+
var _typeof = require("@babel/runtime/helpers/typeof");
|
|
6
|
+
Object.defineProperty(exports, "__esModule", {
|
|
7
|
+
value: true
|
|
8
|
+
});
|
|
9
|
+
exports.PresentationalIndicator = void 0;
|
|
10
|
+
require("./presentational-indicator.compiled.css");
|
|
11
|
+
var React = _interopRequireWildcard(require("react"));
|
|
12
|
+
var _runtime = require("@compiled/react/runtime");
|
|
13
|
+
var _react2 = require("@compiled/react");
|
|
14
|
+
var _compiled = require("@atlaskit/primitives/compiled");
|
|
15
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
16
|
+
var commonStyles = {
|
|
17
|
+
common: "_2rko1rr0 _1bsbg7kr _4t3ig7kr _kqswh2mm _cfu11ule _1mp41th6 _kfgt1th6 _1cs8stnw _1kt9b3bt _iajm1yh4 _z5wt1yh4"
|
|
18
|
+
};
|
|
19
|
+
var colorBorderMap = {
|
|
20
|
+
default: "_19it1axi",
|
|
21
|
+
help: "_19it1axi",
|
|
22
|
+
inverted: "_19it1ps9",
|
|
23
|
+
primary: "_19it1axi"
|
|
24
|
+
};
|
|
25
|
+
var backgroundColor = function backgroundColor(isSelected) {
|
|
26
|
+
if (!isSelected) {
|
|
27
|
+
return {
|
|
28
|
+
default: "var(--ds-surface, #FFFFFF)",
|
|
29
|
+
help: "var(--ds-surface, #FFFFFF)",
|
|
30
|
+
inverted: "var(--ds-background-neutral-subtle, #00000000)",
|
|
31
|
+
primary: "var(--ds-surface, #FFFFFF)"
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
return {
|
|
35
|
+
default: "var(--ds-icon, #292A2E)",
|
|
36
|
+
help: "var(--ds-icon-discovery, #AF59E1)",
|
|
37
|
+
inverted: "var(--ds-icon-inverse, #FFFFFF)",
|
|
38
|
+
primary: "var(--ds-icon-brand, #1868DB)"
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
var PresentationalIndicator = exports.PresentationalIndicator = function PresentationalIndicator(_ref) {
|
|
42
|
+
var appearance = _ref.appearance,
|
|
43
|
+
isSelected = _ref.isSelected,
|
|
44
|
+
testId = _ref.testId;
|
|
45
|
+
return /*#__PURE__*/React.createElement(_compiled.Box, {
|
|
46
|
+
testId: testId
|
|
47
|
+
// here we set it dynamic because that backgroundColor and xcss don't support the colors we need here eg. token('color.icon')
|
|
48
|
+
,
|
|
49
|
+
style: {
|
|
50
|
+
backgroundColor: backgroundColor(isSelected)[appearance]
|
|
51
|
+
},
|
|
52
|
+
xcss: (0, _react2.cx)(commonStyles.common, colorBorderMap[appearance])
|
|
53
|
+
});
|
|
54
|
+
};
|
|
@@ -12,7 +12,8 @@ var _bindEventListener = require("bind-event-listener");
|
|
|
12
12
|
var _analyticsNext = require("@atlaskit/analytics-next");
|
|
13
13
|
var _noop = _interopRequireDefault(require("@atlaskit/ds-lib/noop"));
|
|
14
14
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
15
|
-
var
|
|
15
|
+
var _buttonIndicator = require("./button-indicator");
|
|
16
|
+
var _presentationalIndicator = require("./presentational-indicator");
|
|
16
17
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
17
18
|
var packageName = "@atlaskit/progress-indicator";
|
|
18
19
|
var packageVersion = "0.0.0-development";
|
|
@@ -127,7 +128,7 @@ var ProgressDots = function ProgressDots(_ref) {
|
|
|
127
128
|
var tabId = "".concat(ariaLabel).concat(index);
|
|
128
129
|
var panelId = "".concat(ariaControls).concat(index);
|
|
129
130
|
var indicatorTestId = testId && "".concat(testId, "-ind-").concat(index);
|
|
130
|
-
return onSelect ? /*#__PURE__*/_react.default.createElement(
|
|
131
|
+
return onSelect ? /*#__PURE__*/_react.default.createElement(_buttonIndicator.ButtonIndicator, {
|
|
131
132
|
key: index,
|
|
132
133
|
testId: indicatorTestId,
|
|
133
134
|
appearance: appearance,
|
|
@@ -140,7 +141,7 @@ var ProgressDots = function ProgressDots(_ref) {
|
|
|
140
141
|
index: index
|
|
141
142
|
});
|
|
142
143
|
}
|
|
143
|
-
}) : /*#__PURE__*/_react.default.createElement(
|
|
144
|
+
}) : /*#__PURE__*/_react.default.createElement(_presentationalIndicator.PresentationalIndicator, {
|
|
144
145
|
key: index,
|
|
145
146
|
testId: indicatorTestId,
|
|
146
147
|
appearance: appearance,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* indicator.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
-
import "./indicator.compiled.css";
|
|
1
|
+
/* button-indicator.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import "./button-indicator.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { cx } from '@compiled/react';
|
|
6
|
-
import {
|
|
6
|
+
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
7
7
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
8
8
|
const commonStyles = {
|
|
9
9
|
common: "_2rko1rr0 _1bsbg7kr _4t3ig7kr _kqswh2mm _cfu11ule _1mp41th6 _kfgt1th6 _1cs8stnw _1kt9b3bt _iajm1yh4 _z5wt1yh4"
|
|
@@ -33,31 +33,16 @@ const backgroundColor = isSelected => {
|
|
|
33
33
|
primary: "var(--ds-icon-brand, #1868DB)"
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
* __Presentational indicator__
|
|
39
|
-
*
|
|
40
|
-
* A presentational indicator with no interactivity
|
|
41
|
-
*/
|
|
42
|
-
export const PresentationalIndicator = ({
|
|
43
|
-
appearance,
|
|
44
|
-
isSelected,
|
|
45
|
-
testId
|
|
46
|
-
}) => {
|
|
47
|
-
return /*#__PURE__*/React.createElement(Box, {
|
|
48
|
-
testId: testId
|
|
49
|
-
// here we set it dynamic because that backgroundColor and xcss don't support the colors we need here eg. token('color.icon')
|
|
50
|
-
,
|
|
51
|
-
style: {
|
|
52
|
-
backgroundColor: backgroundColor(isSelected)[appearance]
|
|
53
|
-
},
|
|
54
|
-
xcss: cx(commonStyles.common, colorBorderMap[appearance])
|
|
55
|
-
});
|
|
56
|
-
};
|
|
36
|
+
// TODO: Fill in the component {description} and ensure links point to the correct {packageName} location.
|
|
37
|
+
// Remove links that the component does not have (such as usage). If there are no links remove them all.
|
|
57
38
|
/**
|
|
58
39
|
* __Button indicator__
|
|
59
40
|
*
|
|
60
|
-
*
|
|
41
|
+
* A button indicator {description}.
|
|
42
|
+
*
|
|
43
|
+
* - [Examples](https://atlassian.design/components/{packageName}/examples)
|
|
44
|
+
* - [Code](https://atlassian.design/components/{packageName}/code)
|
|
45
|
+
* - [Usage](https://atlassian.design/components/{packageName}/usage)
|
|
61
46
|
*/
|
|
62
47
|
export const ButtonIndicator = ({
|
|
63
48
|
appearance,
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
._19it1axi{border:var(--ds-border-width,1px) solid var(--ds-border-bold,#7d818a)}
|
|
2
|
+
._19it1ps9{border:var(--ds-border-width,1px) solid var(--ds-border-inverse,#fff)}
|
|
3
|
+
._2rko1rr0{border-radius:var(--ds-radius-full,9999px)}
|
|
4
|
+
._1bsbg7kr{width:var(--ds-dots-size)}
|
|
5
|
+
._1cs8stnw:before{position:absolute}
|
|
6
|
+
._1kt9b3bt:before{content:""}
|
|
7
|
+
._1mp41th6:before{width:calc(var(--ds-dots-size) + var(--ds-dots-margin))}
|
|
8
|
+
._4t3ig7kr{height:var(--ds-dots-size)}
|
|
9
|
+
._cfu11ule:before{display:block}
|
|
10
|
+
._iajm1yh4:before{inset-block-start:calc(var(--ds-dots-margin)*-1/2)}
|
|
11
|
+
._kfgt1th6:before{height:calc(var(--ds-dots-size) + var(--ds-dots-margin))}
|
|
12
|
+
._kqswh2mm{position:relative}
|
|
13
|
+
._z5wt1yh4:before{inset-inline-start:calc(var(--ds-dots-margin)*-1/2)}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/* presentational-indicator.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
3
|
+
import "./presentational-indicator.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import { cx } from '@compiled/react';
|
|
7
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
|
+
const commonStyles = {
|
|
9
|
+
common: "_2rko1rr0 _1bsbg7kr _4t3ig7kr _kqswh2mm _cfu11ule _1mp41th6 _kfgt1th6 _1cs8stnw _1kt9b3bt _iajm1yh4 _z5wt1yh4"
|
|
10
|
+
};
|
|
11
|
+
const colorBorderMap = {
|
|
12
|
+
default: "_19it1axi",
|
|
13
|
+
help: "_19it1axi",
|
|
14
|
+
inverted: "_19it1ps9",
|
|
15
|
+
primary: "_19it1axi"
|
|
16
|
+
};
|
|
17
|
+
const backgroundColor = isSelected => {
|
|
18
|
+
if (!isSelected) {
|
|
19
|
+
return {
|
|
20
|
+
default: "var(--ds-surface, #FFFFFF)",
|
|
21
|
+
help: "var(--ds-surface, #FFFFFF)",
|
|
22
|
+
inverted: "var(--ds-background-neutral-subtle, #00000000)",
|
|
23
|
+
primary: "var(--ds-surface, #FFFFFF)"
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
default: "var(--ds-icon, #292A2E)",
|
|
28
|
+
help: "var(--ds-icon-discovery, #AF59E1)",
|
|
29
|
+
inverted: "var(--ds-icon-inverse, #FFFFFF)",
|
|
30
|
+
primary: "var(--ds-icon-brand, #1868DB)"
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export const PresentationalIndicator = ({
|
|
34
|
+
appearance,
|
|
35
|
+
isSelected,
|
|
36
|
+
testId
|
|
37
|
+
}) => {
|
|
38
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
39
|
+
testId: testId
|
|
40
|
+
// here we set it dynamic because that backgroundColor and xcss don't support the colors we need here eg. token('color.icon')
|
|
41
|
+
,
|
|
42
|
+
style: {
|
|
43
|
+
backgroundColor: backgroundColor(isSelected)[appearance]
|
|
44
|
+
},
|
|
45
|
+
xcss: cx(commonStyles.common, colorBorderMap[appearance])
|
|
46
|
+
});
|
|
47
|
+
};
|
|
@@ -3,7 +3,8 @@ import { bind } from 'bind-event-listener';
|
|
|
3
3
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
4
4
|
import noop from '@atlaskit/ds-lib/noop';
|
|
5
5
|
import { Box, Inline } from '@atlaskit/primitives/compiled';
|
|
6
|
-
import { ButtonIndicator
|
|
6
|
+
import { ButtonIndicator } from './button-indicator';
|
|
7
|
+
import { PresentationalIndicator } from './presentational-indicator';
|
|
7
8
|
const packageName = "@atlaskit/progress-indicator";
|
|
8
9
|
const packageVersion = "0.0.0-development";
|
|
9
10
|
const progressIndicatorGapMap = {
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/* indicator.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
-
import "./indicator.compiled.css";
|
|
1
|
+
/* button-indicator.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
import "./button-indicator.compiled.css";
|
|
3
3
|
import * as React from 'react';
|
|
4
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
5
|
import { cx } from '@compiled/react';
|
|
6
|
-
import {
|
|
6
|
+
import { Pressable } from '@atlaskit/primitives/compiled';
|
|
7
7
|
import VisuallyHidden from '@atlaskit/visually-hidden';
|
|
8
8
|
var commonStyles = {
|
|
9
9
|
common: "_2rko1rr0 _1bsbg7kr _4t3ig7kr _kqswh2mm _cfu11ule _1mp41th6 _kfgt1th6 _1cs8stnw _1kt9b3bt _iajm1yh4 _z5wt1yh4"
|
|
@@ -33,38 +33,24 @@ var backgroundColor = function backgroundColor(isSelected) {
|
|
|
33
33
|
primary: "var(--ds-icon-brand, #1868DB)"
|
|
34
34
|
};
|
|
35
35
|
};
|
|
36
|
-
|
|
36
|
+
// TODO: Fill in the component {description} and ensure links point to the correct {packageName} location.
|
|
37
|
+
// Remove links that the component does not have (such as usage). If there are no links remove them all.
|
|
37
38
|
/**
|
|
38
|
-
*
|
|
39
|
+
* __Button indicator__
|
|
40
|
+
*
|
|
41
|
+
* A button indicator {description}.
|
|
39
42
|
*
|
|
40
|
-
*
|
|
43
|
+
* - [Examples](https://atlassian.design/components/{packageName}/examples)
|
|
44
|
+
* - [Code](https://atlassian.design/components/{packageName}/code)
|
|
45
|
+
* - [Usage](https://atlassian.design/components/{packageName}/usage)
|
|
41
46
|
*/
|
|
42
|
-
export var
|
|
47
|
+
export var ButtonIndicator = function ButtonIndicator(_ref) {
|
|
43
48
|
var appearance = _ref.appearance,
|
|
49
|
+
panelId = _ref.panelId,
|
|
50
|
+
tabId = _ref.tabId,
|
|
44
51
|
isSelected = _ref.isSelected,
|
|
52
|
+
onClick = _ref.onClick,
|
|
45
53
|
testId = _ref.testId;
|
|
46
|
-
return /*#__PURE__*/React.createElement(Box, {
|
|
47
|
-
testId: testId
|
|
48
|
-
// here we set it dynamic because that backgroundColor and xcss don't support the colors we need here eg. token('color.icon')
|
|
49
|
-
,
|
|
50
|
-
style: {
|
|
51
|
-
backgroundColor: backgroundColor(isSelected)[appearance]
|
|
52
|
-
},
|
|
53
|
-
xcss: cx(commonStyles.common, colorBorderMap[appearance])
|
|
54
|
-
});
|
|
55
|
-
};
|
|
56
|
-
/**
|
|
57
|
-
* __Button indicator__
|
|
58
|
-
*
|
|
59
|
-
* An interactive indicator.
|
|
60
|
-
*/
|
|
61
|
-
export var ButtonIndicator = function ButtonIndicator(_ref2) {
|
|
62
|
-
var appearance = _ref2.appearance,
|
|
63
|
-
panelId = _ref2.panelId,
|
|
64
|
-
tabId = _ref2.tabId,
|
|
65
|
-
isSelected = _ref2.isSelected,
|
|
66
|
-
onClick = _ref2.onClick,
|
|
67
|
-
testId = _ref2.testId;
|
|
68
54
|
return /*#__PURE__*/React.createElement(Pressable, {
|
|
69
55
|
role: "tab",
|
|
70
56
|
style: {
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
._19it1axi{border:var(--ds-border-width,1px) solid var(--ds-border-bold,#7d818a)}
|
|
2
|
+
._19it1ps9{border:var(--ds-border-width,1px) solid var(--ds-border-inverse,#fff)}
|
|
3
|
+
._2rko1rr0{border-radius:var(--ds-radius-full,9999px)}
|
|
4
|
+
._1bsbg7kr{width:var(--ds-dots-size)}
|
|
5
|
+
._1cs8stnw:before{position:absolute}
|
|
6
|
+
._1kt9b3bt:before{content:""}
|
|
7
|
+
._1mp41th6:before{width:calc(var(--ds-dots-size) + var(--ds-dots-margin))}
|
|
8
|
+
._4t3ig7kr{height:var(--ds-dots-size)}
|
|
9
|
+
._cfu11ule:before{display:block}
|
|
10
|
+
._iajm1yh4:before{inset-block-start:calc(var(--ds-dots-margin)*-1/2)}
|
|
11
|
+
._kfgt1th6:before{height:calc(var(--ds-dots-size) + var(--ds-dots-margin))}
|
|
12
|
+
._kqswh2mm{position:relative}
|
|
13
|
+
._z5wt1yh4:before{inset-inline-start:calc(var(--ds-dots-margin)*-1/2)}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* presentational-indicator.tsx generated by @compiled/babel-plugin v0.39.1 */
|
|
2
|
+
/* eslint-disable @repo/internal/react/require-jsdoc */
|
|
3
|
+
import "./presentational-indicator.compiled.css";
|
|
4
|
+
import * as React from 'react';
|
|
5
|
+
import { ax, ix } from "@compiled/react/runtime";
|
|
6
|
+
import { cx } from '@compiled/react';
|
|
7
|
+
import { Box } from '@atlaskit/primitives/compiled';
|
|
8
|
+
var commonStyles = {
|
|
9
|
+
common: "_2rko1rr0 _1bsbg7kr _4t3ig7kr _kqswh2mm _cfu11ule _1mp41th6 _kfgt1th6 _1cs8stnw _1kt9b3bt _iajm1yh4 _z5wt1yh4"
|
|
10
|
+
};
|
|
11
|
+
var colorBorderMap = {
|
|
12
|
+
default: "_19it1axi",
|
|
13
|
+
help: "_19it1axi",
|
|
14
|
+
inverted: "_19it1ps9",
|
|
15
|
+
primary: "_19it1axi"
|
|
16
|
+
};
|
|
17
|
+
var backgroundColor = function backgroundColor(isSelected) {
|
|
18
|
+
if (!isSelected) {
|
|
19
|
+
return {
|
|
20
|
+
default: "var(--ds-surface, #FFFFFF)",
|
|
21
|
+
help: "var(--ds-surface, #FFFFFF)",
|
|
22
|
+
inverted: "var(--ds-background-neutral-subtle, #00000000)",
|
|
23
|
+
primary: "var(--ds-surface, #FFFFFF)"
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
return {
|
|
27
|
+
default: "var(--ds-icon, #292A2E)",
|
|
28
|
+
help: "var(--ds-icon-discovery, #AF59E1)",
|
|
29
|
+
inverted: "var(--ds-icon-inverse, #FFFFFF)",
|
|
30
|
+
primary: "var(--ds-icon-brand, #1868DB)"
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
export var PresentationalIndicator = function PresentationalIndicator(_ref) {
|
|
34
|
+
var appearance = _ref.appearance,
|
|
35
|
+
isSelected = _ref.isSelected,
|
|
36
|
+
testId = _ref.testId;
|
|
37
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
38
|
+
testId: testId
|
|
39
|
+
// here we set it dynamic because that backgroundColor and xcss don't support the colors we need here eg. token('color.icon')
|
|
40
|
+
,
|
|
41
|
+
style: {
|
|
42
|
+
backgroundColor: backgroundColor(isSelected)[appearance]
|
|
43
|
+
},
|
|
44
|
+
xcss: cx(commonStyles.common, colorBorderMap[appearance])
|
|
45
|
+
});
|
|
46
|
+
};
|
|
@@ -4,7 +4,8 @@ import { bind } from 'bind-event-listener';
|
|
|
4
4
|
import { usePlatformLeafEventHandler } from '@atlaskit/analytics-next';
|
|
5
5
|
import noop from '@atlaskit/ds-lib/noop';
|
|
6
6
|
import { Box, Inline } from '@atlaskit/primitives/compiled';
|
|
7
|
-
import { ButtonIndicator
|
|
7
|
+
import { ButtonIndicator } from './button-indicator';
|
|
8
|
+
import { PresentationalIndicator } from './presentational-indicator';
|
|
8
9
|
var packageName = "@atlaskit/progress-indicator";
|
|
9
10
|
var packageVersion = "0.0.0-development";
|
|
10
11
|
var progressIndicatorGapMap = {
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import type { DotsAppearance } from './types';
|
|
6
|
+
type ButtonIndicatorProps = {
|
|
7
|
+
panelId: string;
|
|
8
|
+
tabId: string;
|
|
9
|
+
appearance: DotsAppearance;
|
|
10
|
+
isSelected: boolean;
|
|
11
|
+
testId?: string;
|
|
12
|
+
onClick(e: React.MouseEvent<HTMLButtonElement>): void;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* __Button indicator__
|
|
16
|
+
*
|
|
17
|
+
* A button indicator {description}.
|
|
18
|
+
*
|
|
19
|
+
* - [Examples](https://atlassian.design/components/{packageName}/examples)
|
|
20
|
+
* - [Code](https://atlassian.design/components/{packageName}/code)
|
|
21
|
+
* - [Usage](https://atlassian.design/components/{packageName}/usage)
|
|
22
|
+
*/
|
|
23
|
+
export declare const ButtonIndicator: ({
|
|
24
|
+
/**
|
|
25
|
+
* __Button indicator__
|
|
26
|
+
*
|
|
27
|
+
* A button indicator {description}.
|
|
28
|
+
*
|
|
29
|
+
* - [Examples](https://atlassian.design/components/{packageName}/examples)
|
|
30
|
+
* - [Code](https://atlassian.design/components/{packageName}/code)
|
|
31
|
+
* - [Usage](https://atlassian.design/components/{packageName}/usage)
|
|
32
|
+
*/
|
|
33
|
+
appearance, panelId, tabId, isSelected, onClick, testId, }: ButtonIndicatorProps) => JSX.Element;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import type { DotsAppearance } from './types';
|
|
6
|
+
type PresentationalIndicatorProps = {
|
|
7
|
+
appearance: DotsAppearance;
|
|
8
|
+
isSelected: boolean;
|
|
9
|
+
testId?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const PresentationalIndicator: ({ appearance, isSelected, testId, }: PresentationalIndicatorProps) => JSX.Element;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import type { DotsAppearance } from './types';
|
|
6
|
+
type ButtonIndicatorProps = {
|
|
7
|
+
panelId: string;
|
|
8
|
+
tabId: string;
|
|
9
|
+
appearance: DotsAppearance;
|
|
10
|
+
isSelected: boolean;
|
|
11
|
+
testId?: string;
|
|
12
|
+
onClick(e: React.MouseEvent<HTMLButtonElement>): void;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* __Button indicator__
|
|
16
|
+
*
|
|
17
|
+
* A button indicator {description}.
|
|
18
|
+
*
|
|
19
|
+
* - [Examples](https://atlassian.design/components/{packageName}/examples)
|
|
20
|
+
* - [Code](https://atlassian.design/components/{packageName}/code)
|
|
21
|
+
* - [Usage](https://atlassian.design/components/{packageName}/usage)
|
|
22
|
+
*/
|
|
23
|
+
export declare const ButtonIndicator: ({
|
|
24
|
+
/**
|
|
25
|
+
* __Button indicator__
|
|
26
|
+
*
|
|
27
|
+
* A button indicator {description}.
|
|
28
|
+
*
|
|
29
|
+
* - [Examples](https://atlassian.design/components/{packageName}/examples)
|
|
30
|
+
* - [Code](https://atlassian.design/components/{packageName}/code)
|
|
31
|
+
* - [Usage](https://atlassian.design/components/{packageName}/usage)
|
|
32
|
+
*/
|
|
33
|
+
appearance, panelId, tabId, isSelected, onClick, testId, }: ButtonIndicatorProps) => JSX.Element;
|
|
34
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @jsxRuntime classic
|
|
3
|
+
* @jsx jsx
|
|
4
|
+
*/
|
|
5
|
+
import type { DotsAppearance } from './types';
|
|
6
|
+
type PresentationalIndicatorProps = {
|
|
7
|
+
appearance: DotsAppearance;
|
|
8
|
+
isSelected: boolean;
|
|
9
|
+
testId?: string;
|
|
10
|
+
};
|
|
11
|
+
export declare const PresentationalIndicator: ({ appearance, isSelected, testId, }: PresentationalIndicatorProps) => JSX.Element;
|
|
12
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/progress-indicator",
|
|
3
|
-
"version": "12.0.
|
|
3
|
+
"version": "12.0.19",
|
|
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/"
|
|
@@ -17,6 +17,13 @@
|
|
|
17
17
|
],
|
|
18
18
|
"atlaskit:src": "src/index.tsx",
|
|
19
19
|
"atlassian": {
|
|
20
|
+
"react-compiler": {
|
|
21
|
+
"enabled": true,
|
|
22
|
+
"gating": {
|
|
23
|
+
"source": "@atlassian/react-compiler-gating",
|
|
24
|
+
"importSpecifierName": "isReactCompilerActivePlatform"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
20
27
|
"team": "Design System Team",
|
|
21
28
|
"website": {
|
|
22
29
|
"name": "Progress indicator",
|
|
@@ -25,9 +32,9 @@
|
|
|
25
32
|
},
|
|
26
33
|
"dependencies": {
|
|
27
34
|
"@atlaskit/analytics-next": "^11.2.0",
|
|
28
|
-
"@atlaskit/ds-lib": "^
|
|
35
|
+
"@atlaskit/ds-lib": "^7.0.0",
|
|
29
36
|
"@atlaskit/primitives": "^18.1.0",
|
|
30
|
-
"@atlaskit/tokens": "^
|
|
37
|
+
"@atlaskit/tokens": "^12.0.0",
|
|
31
38
|
"@atlaskit/visually-hidden": "^3.0.0",
|
|
32
39
|
"@babel/runtime": "^7.0.0",
|
|
33
40
|
"@compiled/react": "^0.20.0",
|
|
@@ -40,11 +47,12 @@
|
|
|
40
47
|
"@af/accessibility-testing": "workspace:^",
|
|
41
48
|
"@af/integration-testing": "workspace:^",
|
|
42
49
|
"@af/visual-regression": "workspace:^",
|
|
43
|
-
"@atlaskit/button": "^23.
|
|
50
|
+
"@atlaskit/button": "^23.11.0",
|
|
44
51
|
"@atlaskit/css": "^0.19.0",
|
|
45
52
|
"@atlaskit/docs": "^11.7.0",
|
|
46
|
-
"@atlaskit/link": "^3.
|
|
53
|
+
"@atlaskit/link": "^3.4.0",
|
|
47
54
|
"@atlaskit/section-message": "^8.12.0",
|
|
55
|
+
"@atlassian/react-compiler-gating": "workspace:^",
|
|
48
56
|
"@atlassian/ssr-tests": "workspace:^",
|
|
49
57
|
"@atlassian/structured-docs-types": "workspace:^",
|
|
50
58
|
"@testing-library/react": "^16.3.0",
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
type DotsAppearance = 'default' | 'help' | 'inverted' | 'primary';
|
|
6
|
-
type CommonProps = {
|
|
7
|
-
appearance: DotsAppearance;
|
|
8
|
-
isSelected: boolean;
|
|
9
|
-
testId?: string;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* __Presentational indicator__
|
|
13
|
-
*
|
|
14
|
-
* A presentational indicator with no interactivity
|
|
15
|
-
*/
|
|
16
|
-
export declare const PresentationalIndicator: ({ appearance, isSelected, testId, }: CommonProps) => JSX.Element;
|
|
17
|
-
type ButtonIndicatorProps = {
|
|
18
|
-
panelId: string;
|
|
19
|
-
tabId: string;
|
|
20
|
-
onClick(e: React.MouseEvent<HTMLButtonElement>): void;
|
|
21
|
-
} & CommonProps;
|
|
22
|
-
/**
|
|
23
|
-
* __Button indicator__
|
|
24
|
-
*
|
|
25
|
-
* An interactive indicator.
|
|
26
|
-
*/
|
|
27
|
-
export declare const ButtonIndicator: ({ appearance, panelId, tabId, isSelected, onClick, testId, }: ButtonIndicatorProps) => JSX.Element;
|
|
28
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @jsxRuntime classic
|
|
3
|
-
* @jsx jsx
|
|
4
|
-
*/
|
|
5
|
-
type DotsAppearance = 'default' | 'help' | 'inverted' | 'primary';
|
|
6
|
-
type CommonProps = {
|
|
7
|
-
appearance: DotsAppearance;
|
|
8
|
-
isSelected: boolean;
|
|
9
|
-
testId?: string;
|
|
10
|
-
};
|
|
11
|
-
/**
|
|
12
|
-
* __Presentational indicator__
|
|
13
|
-
*
|
|
14
|
-
* A presentational indicator with no interactivity
|
|
15
|
-
*/
|
|
16
|
-
export declare const PresentationalIndicator: ({ appearance, isSelected, testId, }: CommonProps) => JSX.Element;
|
|
17
|
-
type ButtonIndicatorProps = {
|
|
18
|
-
panelId: string;
|
|
19
|
-
tabId: string;
|
|
20
|
-
onClick(e: React.MouseEvent<HTMLButtonElement>): void;
|
|
21
|
-
} & CommonProps;
|
|
22
|
-
/**
|
|
23
|
-
* __Button indicator__
|
|
24
|
-
*
|
|
25
|
-
* An interactive indicator.
|
|
26
|
-
*/
|
|
27
|
-
export declare const ButtonIndicator: ({ appearance, panelId, tabId, isSelected, onClick, testId, }: ButtonIndicatorProps) => JSX.Element;
|
|
28
|
-
export {};
|
|
File without changes
|
|
File without changes
|
|
File without changes
|