@atlaskit/atlassian-navigation 3.0.2 → 3.1.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 +12 -0
- package/dist/cjs/components/AtlassianNavigation/index.js +12 -6
- package/dist/cjs/components/BadgeContainer/index.js +6 -4
- package/dist/cjs/components/Create/index.js +2 -1
- package/dist/cjs/components/Help/index.js +5 -2
- package/dist/cjs/components/Notifications/index.js +2 -1
- package/dist/cjs/components/PrimaryButton/index.js +2 -1
- package/dist/cjs/components/PrimaryItemsContainer/index.js +2 -1
- package/dist/cjs/components/PrimaryItemsContainerV2/index.js +11 -2
- package/dist/cjs/components/Profile/index.js +4 -2
- package/dist/cjs/components/Settings/index.js +4 -2
- package/dist/cjs/components/SignIn/index.js +4 -2
- package/dist/cjs/skeleton-help-button.js +1 -1
- package/dist/cjs/skeleton-notification-button.js +1 -1
- package/dist/es2019/components/AtlassianNavigation/index.js +12 -6
- package/dist/es2019/components/BadgeContainer/index.js +6 -4
- package/dist/es2019/components/Create/index.js +2 -1
- package/dist/es2019/components/Help/index.js +5 -2
- package/dist/es2019/components/Notifications/index.js +2 -1
- package/dist/es2019/components/PrimaryButton/index.js +2 -1
- package/dist/es2019/components/PrimaryItemsContainer/index.js +2 -1
- package/dist/es2019/components/PrimaryItemsContainerV2/index.js +12 -3
- package/dist/es2019/components/Profile/index.js +4 -2
- package/dist/es2019/components/Settings/index.js +4 -2
- package/dist/es2019/components/SignIn/index.js +4 -2
- package/dist/es2019/skeleton-help-button.js +1 -1
- package/dist/es2019/skeleton-notification-button.js +1 -1
- package/dist/esm/components/AtlassianNavigation/index.js +12 -6
- package/dist/esm/components/BadgeContainer/index.js +6 -4
- package/dist/esm/components/Create/index.js +2 -1
- package/dist/esm/components/Help/index.js +5 -2
- package/dist/esm/components/Notifications/index.js +2 -1
- package/dist/esm/components/PrimaryButton/index.js +2 -1
- package/dist/esm/components/PrimaryItemsContainer/index.js +2 -1
- package/dist/esm/components/PrimaryItemsContainerV2/index.js +12 -3
- package/dist/esm/components/Profile/index.js +4 -2
- package/dist/esm/components/Settings/index.js +4 -2
- package/dist/esm/components/SignIn/index.js +4 -2
- package/dist/esm/skeleton-help-button.js +1 -1
- package/dist/esm/skeleton-notification-button.js +1 -1
- package/dist/types/components/BadgeContainer/types.d.ts +4 -0
- package/dist/types/components/ProductHome/types.d.ts +3 -3
- package/dist/types/components/Profile/index.d.ts +2 -2
- package/dist/types/components/Search/types.d.ts +2 -2
- package/dist/types/components/SkeletonPrimaryButton/types.d.ts +1 -1
- package/dist/types/skeleton-help-button.d.ts +2 -2
- package/dist/types/skeleton-notification-button.d.ts +2 -2
- package/dist/types/skeleton-settings-button.d.ts +1 -1
- package/dist/types/skeleton-switcher-button.d.ts +1 -1
- package/dist/types-ts4.5/components/BadgeContainer/types.d.ts +4 -0
- package/dist/types-ts4.5/components/ProductHome/types.d.ts +3 -3
- package/dist/types-ts4.5/components/Profile/index.d.ts +2 -2
- package/dist/types-ts4.5/components/Search/types.d.ts +2 -2
- package/dist/types-ts4.5/components/SkeletonPrimaryButton/types.d.ts +1 -1
- package/dist/types-ts4.5/skeleton-help-button.d.ts +2 -2
- package/dist/types-ts4.5/skeleton-notification-button.d.ts +2 -2
- package/dist/types-ts4.5/skeleton-settings-button.d.ts +1 -1
- package/dist/types-ts4.5/skeleton-switcher-button.d.ts +1 -1
- package/package.json +9 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @atlaskit/atlassian-navigation
|
|
2
2
|
|
|
3
|
+
## 3.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#65982](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/65982) [`d36b4575ba4b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d36b4575ba4b) - Accessibility changes: improving semantics for better readability for screen readers.
|
|
8
|
+
|
|
9
|
+
## 3.0.3
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#63677](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/63677) [`f320c8ce5039`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/f320c8ce5039) - This package has been added to the Jira push model.
|
|
14
|
+
|
|
3
15
|
## 3.0.2
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -18,13 +18,13 @@ var containerStyles = (0, _react.css)({
|
|
|
18
18
|
display: 'flex',
|
|
19
19
|
boxSizing: 'border-box',
|
|
20
20
|
height: _constants.HORIZONTAL_GLOBAL_NAV_HEIGHT,
|
|
21
|
-
paddingRight: "var(--ds-space-150, 12px)",
|
|
22
|
-
paddingLeft: "var(--ds-space-150, 12px)",
|
|
23
21
|
position: 'relative',
|
|
24
22
|
alignItems: 'center',
|
|
25
23
|
justifyContent: 'space-between',
|
|
26
24
|
flexShrink: 0,
|
|
27
|
-
|
|
25
|
+
borderBlockEnd: "1px solid ".concat("var(--ds-border, ".concat(_colors.N30, ")")),
|
|
26
|
+
paddingInlineEnd: "var(--ds-space-150, 12px)",
|
|
27
|
+
paddingInlineStart: "var(--ds-space-150, 12px)"
|
|
28
28
|
});
|
|
29
29
|
var leftStyles = (0, _react.css)({
|
|
30
30
|
display: 'flex',
|
|
@@ -43,10 +43,13 @@ var rightStyles = (0, _react.css)({
|
|
|
43
43
|
flexShrink: 0,
|
|
44
44
|
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
45
45
|
'& > *': {
|
|
46
|
-
|
|
47
|
-
|
|
46
|
+
flexShrink: 0,
|
|
47
|
+
marginInlineEnd: "var(--ds-space-050, 4px)"
|
|
48
48
|
}
|
|
49
49
|
});
|
|
50
|
+
var noRightMarginStyles = (0, _react.css)({
|
|
51
|
+
marginInlineEnd: 0
|
|
52
|
+
});
|
|
50
53
|
var analyticsData = {
|
|
51
54
|
attributes: {
|
|
52
55
|
navigationLayer: 'global'
|
|
@@ -111,6 +114,9 @@ var AtlassianNavigation = exports.AtlassianNavigation = function AtlassianNaviga
|
|
|
111
114
|
})), (0, _react.jsx)("div", {
|
|
112
115
|
css: rightStyles,
|
|
113
116
|
"data-testid": testId && "".concat(testId, "-secondary-actions")
|
|
114
|
-
}, Search && (0, _react.jsx)(Search, null),
|
|
117
|
+
}, Search && (0, _react.jsx)(Search, null), (0, _react.jsx)("div", {
|
|
118
|
+
role: "list",
|
|
119
|
+
css: [rightStyles, noRightMarginStyles]
|
|
120
|
+
}, Notifications && (0, _react.jsx)(Notifications, null), Help && (0, _react.jsx)(Help, null), Settings && (0, _react.jsx)(Settings, null), SignIn && (0, _react.jsx)(SignIn, null), Profile && (0, _react.jsx)(Profile, null))))));
|
|
115
121
|
};
|
|
116
122
|
var _default = exports.default = AtlassianNavigation;
|
|
@@ -9,8 +9,8 @@ var _react = require("@emotion/react");
|
|
|
9
9
|
|
|
10
10
|
var badgeContainerStyles = (0, _react.css)({
|
|
11
11
|
position: 'absolute',
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
insetBlockStart: "var(--ds-space-negative-050, -4px)",
|
|
13
|
+
insetInlineEnd: "var(--ds-space-negative-025, -2px)",
|
|
14
14
|
pointerEvents: 'none'
|
|
15
15
|
});
|
|
16
16
|
var containerStyles = (0, _react.css)({
|
|
@@ -22,9 +22,11 @@ var containerStyles = (0, _react.css)({
|
|
|
22
22
|
var BadgeContainer = exports.BadgeContainer = function BadgeContainer(props) {
|
|
23
23
|
var badgeId = props.id,
|
|
24
24
|
Badge = props.badge,
|
|
25
|
-
children = props.children
|
|
25
|
+
children = props.children,
|
|
26
|
+
role = props.role;
|
|
26
27
|
return (0, _react.jsx)("div", {
|
|
27
|
-
css: containerStyles
|
|
28
|
+
css: containerStyles,
|
|
29
|
+
role: role
|
|
28
30
|
}, children, (0, _react.jsx)("div", {
|
|
29
31
|
css: badgeContainerStyles,
|
|
30
32
|
id: badgeId,
|
|
@@ -30,7 +30,7 @@ var wrapperStyles = (0, _react2.css)({
|
|
|
30
30
|
}),
|
|
31
31
|
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
32
32
|
'&&': {
|
|
33
|
-
|
|
33
|
+
marginInlineStart: "var(--ds-space-150, 12px)"
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
var TooltipSwitch = function TooltipSwitch(_ref) {
|
|
@@ -61,6 +61,7 @@ var Create = exports.Create = function Create(_ref2) {
|
|
|
61
61
|
var theme = (0, _theme.useTheme)();
|
|
62
62
|
return (0, _react2.jsx)("div", {
|
|
63
63
|
css: wrapperStyles,
|
|
64
|
+
role: "listitem",
|
|
64
65
|
"data-testid": "create-button-wrapper"
|
|
65
66
|
}, (0, _react2.jsx)(TooltipSwitch, {
|
|
66
67
|
buttonTooltip: buttonTooltip
|
|
@@ -42,7 +42,10 @@ var Help = exports.Help = /*#__PURE__*/(0, _react.forwardRef)(function (props, r
|
|
|
42
42
|
}, iconButtonProps));
|
|
43
43
|
return badge ? /*#__PURE__*/_react.default.createElement(_BadgeContainer.BadgeContainer, {
|
|
44
44
|
id: HELP_NOTIFICATION_BADGE_ID,
|
|
45
|
-
badge: badge
|
|
46
|
-
|
|
45
|
+
badge: badge,
|
|
46
|
+
role: "listitem"
|
|
47
|
+
}, button) : /*#__PURE__*/_react.default.createElement("div", {
|
|
48
|
+
role: "listitem"
|
|
49
|
+
}, button);
|
|
47
50
|
});
|
|
48
51
|
var _default = exports.default = Help;
|
|
@@ -32,7 +32,8 @@ var Notifications = exports.Notifications = /*#__PURE__*/(0, _react.forwardRef)(
|
|
|
32
32
|
iconButtonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
33
33
|
return /*#__PURE__*/_react.default.createElement(_BadgeContainer.BadgeContainer, {
|
|
34
34
|
id: NOTIFICATIONS_BADGE_ID,
|
|
35
|
-
badge: badge
|
|
35
|
+
badge: badge,
|
|
36
|
+
role: "listitem"
|
|
36
37
|
}, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, (0, _extends2.default)({
|
|
37
38
|
icon: /*#__PURE__*/_react.default.createElement(_notification.default, {
|
|
38
39
|
label: typeof tooltip === 'string' ? tooltip : 'Notification Icon'
|
|
@@ -64,7 +64,8 @@ var PrimaryButton = exports.PrimaryButton = /*#__PURE__*/(0, _react.forwardRef)(
|
|
|
64
64
|
var theme = (0, _theme.useTheme)();
|
|
65
65
|
var button = (0, _react2.jsx)("div", {
|
|
66
66
|
style: (_ref = {}, (0, _defineProperty2.default)(_ref, VAR_BUTTON_SELECTED_COLOR, theme.mode.primaryButton.selected.color), (0, _defineProperty2.default)(_ref, VAR_BUTTON_SELECTED_BORDER_COLOR, theme.mode.primaryButton.selected.borderColor), _ref),
|
|
67
|
-
css: [buttonBaseStyles, isHighlighted && buttonHighlightedStyles]
|
|
67
|
+
css: [buttonBaseStyles, isHighlighted && buttonHighlightedStyles],
|
|
68
|
+
role: "listitem"
|
|
68
69
|
}, (0, _react2.jsx)(_customThemeButton.default, (0, _extends2.default)({
|
|
69
70
|
appearance: "primary",
|
|
70
71
|
testId: testId,
|
|
@@ -82,7 +82,8 @@ var PrimaryItemsContainer = exports.PrimaryItemsContainer = function PrimaryItem
|
|
|
82
82
|
[overflowItems.length, openOverflowMenu, onMoreClose]);
|
|
83
83
|
return (0, _react2.jsx)("div", {
|
|
84
84
|
css: containerStyles,
|
|
85
|
-
"data-testid": testId && "".concat(testId, "-primary-actions")
|
|
85
|
+
"data-testid": testId && "".concat(testId, "-primary-actions"),
|
|
86
|
+
role: "list"
|
|
86
87
|
}, (0, _react2.jsx)(_overflow.OverflowProvider, {
|
|
87
88
|
isVisible: true,
|
|
88
89
|
openOverflowMenu: openOverflowMenu,
|
|
@@ -18,6 +18,9 @@ var _PrimaryDropdownButton = require("../PrimaryDropdownButton");
|
|
|
18
18
|
var _xcss2;
|
|
19
19
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
20
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
21
|
+
var containerWrapperStyles = (0, _primitives.xcss)({
|
|
22
|
+
height: '100%'
|
|
23
|
+
});
|
|
21
24
|
var sharedContainerStyles = (0, _primitives.xcss)({
|
|
22
25
|
height: '100%',
|
|
23
26
|
alignItems: 'stretch',
|
|
@@ -159,14 +162,20 @@ var PrimaryItemsContainer = exports.PrimaryItemsContainer = /*#__PURE__*/(0, _re
|
|
|
159
162
|
}
|
|
160
163
|
return navItems.small;
|
|
161
164
|
}, [isAboveLg, isAboveSm, navItems.large, navItems.medium, navItems.small]);
|
|
162
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isClient ? /*#__PURE__*/_react.default.createElement(
|
|
165
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, isClient ? /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
166
|
+
role: "list",
|
|
167
|
+
xcss: containerWrapperStyles
|
|
168
|
+
}, /*#__PURE__*/_react.default.createElement(_primitives.Inline, {
|
|
163
169
|
testId: testId && "".concat(testId, "-primary-actions"),
|
|
164
170
|
xcss: sharedContainerStyles
|
|
165
171
|
}, hydratedNavItems.navBarItems, hydratedNavItems.overflowItems.length > 0 && /*#__PURE__*/_react.default.createElement(MoreItemsPopup, {
|
|
166
172
|
moreLabel: moreLabel,
|
|
167
173
|
items: hydratedNavItems.overflowItems,
|
|
168
174
|
testId: testId
|
|
169
|
-
}))) : /*#__PURE__*/_react.default.createElement(
|
|
175
|
+
}))) : /*#__PURE__*/_react.default.createElement(_primitives.Box, {
|
|
176
|
+
role: "list",
|
|
177
|
+
xcss: containerWrapperStyles
|
|
178
|
+
}, /*#__PURE__*/_react.default.createElement(_primitives.Inline, {
|
|
170
179
|
xcss: [sharedContainerStyles, smallContainerStyles]
|
|
171
180
|
}, filteredItems.length > smallMaxItems &&
|
|
172
181
|
/*#__PURE__*/
|
|
@@ -29,10 +29,12 @@ var Profile = exports.Profile = /*#__PURE__*/(0, _react.forwardRef)(function (pr
|
|
|
29
29
|
// to use explicit props could cause regressions.
|
|
30
30
|
// TODO: Remove these spread props for better static analysis
|
|
31
31
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
32
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
32
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
33
|
+
role: "listitem"
|
|
34
|
+
}, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, (0, _extends2.default)({
|
|
33
35
|
label: label,
|
|
34
36
|
ref: ref
|
|
35
|
-
}, props));
|
|
37
|
+
}, props)));
|
|
36
38
|
});
|
|
37
39
|
|
|
38
40
|
// This exists only to extract props.
|
|
@@ -25,12 +25,14 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
25
25
|
var Settings = exports.Settings = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
26
26
|
var tooltip = props.tooltip,
|
|
27
27
|
iconButtonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
28
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
29
|
+
role: "listitem"
|
|
30
|
+
}, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, (0, _extends2.default)({
|
|
29
31
|
icon: /*#__PURE__*/_react.default.createElement(_settings.default, {
|
|
30
32
|
label: typeof tooltip === 'string' ? tooltip : 'Settings Icon'
|
|
31
33
|
}),
|
|
32
34
|
ref: ref,
|
|
33
35
|
tooltip: tooltip
|
|
34
|
-
}, iconButtonProps));
|
|
36
|
+
}, iconButtonProps)));
|
|
35
37
|
});
|
|
36
38
|
var _default = exports.default = Settings;
|
|
@@ -22,12 +22,14 @@ var _excluded = ["tooltip"];
|
|
|
22
22
|
var SignIn = exports.SignIn = function SignIn(props) {
|
|
23
23
|
var tooltip = props.tooltip,
|
|
24
24
|
iconButtonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
25
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
25
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
26
|
+
role: "listitem"
|
|
27
|
+
}, /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, (0, _extends2.default)({
|
|
26
28
|
icon: /*#__PURE__*/_react.default.createElement(_signIn.default, {
|
|
27
29
|
label: typeof tooltip === 'string' ? tooltip : 'Sign-in Icon'
|
|
28
30
|
}),
|
|
29
31
|
tooltip: tooltip
|
|
30
32
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
31
|
-
}, iconButtonProps));
|
|
33
|
+
}, iconButtonProps)));
|
|
32
34
|
};
|
|
33
35
|
var _default = exports.default = SignIn;
|
|
@@ -10,7 +10,7 @@ var _questionCircle = _interopRequireDefault(require("@atlaskit/icon/glyph/quest
|
|
|
10
10
|
var _SkeletonIconButton = require("./components/SkeletonIconButton");
|
|
11
11
|
var _theme = require("./theme");
|
|
12
12
|
/**
|
|
13
|
-
* __Skeleton
|
|
13
|
+
* __Skeleton notification button__
|
|
14
14
|
*
|
|
15
15
|
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
16
16
|
* their heavier interactive counterparts, for use when elements of the
|
|
@@ -9,7 +9,7 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _notification = _interopRequireDefault(require("@atlaskit/icon/glyph/notification"));
|
|
10
10
|
var _SkeletonIconButton = require("./components/SkeletonIconButton");
|
|
11
11
|
/**
|
|
12
|
-
* __Skeleton
|
|
12
|
+
* __Skeleton notification button__
|
|
13
13
|
*
|
|
14
14
|
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
15
15
|
* their heavier interactive counterparts, for use when elements of the
|
|
@@ -11,13 +11,13 @@ const containerStyles = css({
|
|
|
11
11
|
display: 'flex',
|
|
12
12
|
boxSizing: 'border-box',
|
|
13
13
|
height: HORIZONTAL_GLOBAL_NAV_HEIGHT,
|
|
14
|
-
paddingRight: "var(--ds-space-150, 12px)",
|
|
15
|
-
paddingLeft: "var(--ds-space-150, 12px)",
|
|
16
14
|
position: 'relative',
|
|
17
15
|
alignItems: 'center',
|
|
18
16
|
justifyContent: 'space-between',
|
|
19
17
|
flexShrink: 0,
|
|
20
|
-
|
|
18
|
+
borderBlockEnd: `1px solid ${`var(--ds-border, ${N30})`}`,
|
|
19
|
+
paddingInlineEnd: "var(--ds-space-150, 12px)",
|
|
20
|
+
paddingInlineStart: "var(--ds-space-150, 12px)"
|
|
21
21
|
});
|
|
22
22
|
const leftStyles = css({
|
|
23
23
|
display: 'flex',
|
|
@@ -36,10 +36,13 @@ const rightStyles = css({
|
|
|
36
36
|
flexShrink: 0,
|
|
37
37
|
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
38
38
|
'& > *': {
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
flexShrink: 0,
|
|
40
|
+
marginInlineEnd: "var(--ds-space-050, 4px)"
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
+
const noRightMarginStyles = css({
|
|
44
|
+
marginInlineEnd: 0
|
|
45
|
+
});
|
|
43
46
|
const analyticsData = {
|
|
44
47
|
attributes: {
|
|
45
48
|
navigationLayer: 'global'
|
|
@@ -103,6 +106,9 @@ export const AtlassianNavigation = props => {
|
|
|
103
106
|
})), jsx("div", {
|
|
104
107
|
css: rightStyles,
|
|
105
108
|
"data-testid": testId && `${testId}-secondary-actions`
|
|
106
|
-
}, Search && jsx(Search, null),
|
|
109
|
+
}, Search && jsx(Search, null), jsx("div", {
|
|
110
|
+
role: "list",
|
|
111
|
+
css: [rightStyles, noRightMarginStyles]
|
|
112
|
+
}, Notifications && jsx(Notifications, null), Help && jsx(Help, null), Settings && jsx(Settings, null), SignIn && jsx(SignIn, null), Profile && jsx(Profile, null))))));
|
|
107
113
|
};
|
|
108
114
|
export default AtlassianNavigation;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { css, jsx } from '@emotion/react';
|
|
3
3
|
const badgeContainerStyles = css({
|
|
4
4
|
position: 'absolute',
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
insetBlockStart: `${"var(--ds-space-negative-050, -4px)"}`,
|
|
6
|
+
insetInlineEnd: `${"var(--ds-space-negative-025, -2px)"}`,
|
|
7
7
|
pointerEvents: 'none'
|
|
8
8
|
});
|
|
9
9
|
const containerStyles = css({
|
|
@@ -16,10 +16,12 @@ export const BadgeContainer = props => {
|
|
|
16
16
|
const {
|
|
17
17
|
id: badgeId,
|
|
18
18
|
badge: Badge,
|
|
19
|
-
children
|
|
19
|
+
children,
|
|
20
|
+
role
|
|
20
21
|
} = props;
|
|
21
22
|
return jsx("div", {
|
|
22
|
-
css: containerStyles
|
|
23
|
+
css: containerStyles,
|
|
24
|
+
role: role
|
|
23
25
|
}, children, jsx("div", {
|
|
24
26
|
css: badgeContainerStyles,
|
|
25
27
|
id: badgeId,
|
|
@@ -27,7 +27,7 @@ const wrapperStyles = css({
|
|
|
27
27
|
},
|
|
28
28
|
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
29
29
|
'&&': {
|
|
30
|
-
|
|
30
|
+
marginInlineStart: "var(--ds-space-150, 12px)"
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
33
|
const TooltipSwitch = ({
|
|
@@ -58,6 +58,7 @@ export const Create = ({
|
|
|
58
58
|
const theme = useTheme();
|
|
59
59
|
return jsx("div", {
|
|
60
60
|
css: wrapperStyles,
|
|
61
|
+
role: "listitem",
|
|
61
62
|
"data-testid": "create-button-wrapper"
|
|
62
63
|
}, jsx(TooltipSwitch, {
|
|
63
64
|
buttonTooltip: buttonTooltip
|
|
@@ -35,7 +35,10 @@ export const Help = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
35
35
|
}, iconButtonProps));
|
|
36
36
|
return badge ? /*#__PURE__*/React.createElement(BadgeContainer, {
|
|
37
37
|
id: HELP_NOTIFICATION_BADGE_ID,
|
|
38
|
-
badge: badge
|
|
39
|
-
|
|
38
|
+
badge: badge,
|
|
39
|
+
role: "listitem"
|
|
40
|
+
}, button) : /*#__PURE__*/React.createElement("div", {
|
|
41
|
+
role: "listitem"
|
|
42
|
+
}, button);
|
|
40
43
|
});
|
|
41
44
|
export default Help;
|
|
@@ -22,7 +22,8 @@ export const Notifications = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
22
22
|
} = props;
|
|
23
23
|
return /*#__PURE__*/React.createElement(BadgeContainer, {
|
|
24
24
|
id: NOTIFICATIONS_BADGE_ID,
|
|
25
|
-
badge: badge
|
|
25
|
+
badge: badge,
|
|
26
|
+
role: "listitem"
|
|
26
27
|
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
27
28
|
icon: /*#__PURE__*/React.createElement(NotificationIcon, {
|
|
28
29
|
label: typeof tooltip === 'string' ? tooltip : 'Notification Icon'
|
|
@@ -58,7 +58,8 @@ export const PrimaryButton = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
58
58
|
[VAR_BUTTON_SELECTED_COLOR]: theme.mode.primaryButton.selected.color,
|
|
59
59
|
[VAR_BUTTON_SELECTED_BORDER_COLOR]: theme.mode.primaryButton.selected.borderColor
|
|
60
60
|
},
|
|
61
|
-
css: [buttonBaseStyles, isHighlighted && buttonHighlightedStyles]
|
|
61
|
+
css: [buttonBaseStyles, isHighlighted && buttonHighlightedStyles],
|
|
62
|
+
role: "listitem"
|
|
62
63
|
}, jsx(Button, _extends({
|
|
63
64
|
appearance: "primary",
|
|
64
65
|
testId: testId,
|
|
@@ -68,7 +68,8 @@ export const PrimaryItemsContainer = ({
|
|
|
68
68
|
[overflowItems.length, openOverflowMenu, onMoreClose]);
|
|
69
69
|
return jsx("div", {
|
|
70
70
|
css: containerStyles,
|
|
71
|
-
"data-testid": testId && `${testId}-primary-actions
|
|
71
|
+
"data-testid": testId && `${testId}-primary-actions`,
|
|
72
|
+
role: "list"
|
|
72
73
|
}, jsx(OverflowProvider, {
|
|
73
74
|
isVisible: true,
|
|
74
75
|
openOverflowMenu: openOverflowMenu,
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
import _extends from "@babel/runtime/helpers/extends";
|
|
2
2
|
import React, { memo, useCallback, useEffect, useMemo, useState } from 'react';
|
|
3
3
|
import Popup from '@atlaskit/popup';
|
|
4
|
-
import { Inline, xcss } from '@atlaskit/primitives';
|
|
4
|
+
import { Box, Inline, xcss } from '@atlaskit/primitives';
|
|
5
5
|
import { media, UNSAFE_useMediaQuery as useMediaQuery } from '@atlaskit/primitives/responsive';
|
|
6
6
|
import { OverflowProvider } from '../../controllers/overflow';
|
|
7
7
|
import { PrimaryDropdownButton } from '../PrimaryDropdownButton';
|
|
8
|
+
const containerWrapperStyles = xcss({
|
|
9
|
+
height: '100%'
|
|
10
|
+
});
|
|
8
11
|
const sharedContainerStyles = xcss({
|
|
9
12
|
height: '100%',
|
|
10
13
|
alignItems: 'stretch',
|
|
@@ -121,14 +124,20 @@ export const PrimaryItemsContainer = /*#__PURE__*/memo(({
|
|
|
121
124
|
}
|
|
122
125
|
return navItems.small;
|
|
123
126
|
}, [isAboveLg, isAboveSm, navItems.large, navItems.medium, navItems.small]);
|
|
124
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, isClient ? /*#__PURE__*/React.createElement(
|
|
127
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, isClient ? /*#__PURE__*/React.createElement(Box, {
|
|
128
|
+
role: "list",
|
|
129
|
+
xcss: containerWrapperStyles
|
|
130
|
+
}, /*#__PURE__*/React.createElement(Inline, {
|
|
125
131
|
testId: testId && `${testId}-primary-actions`,
|
|
126
132
|
xcss: sharedContainerStyles
|
|
127
133
|
}, hydratedNavItems.navBarItems, hydratedNavItems.overflowItems.length > 0 && /*#__PURE__*/React.createElement(MoreItemsPopup, {
|
|
128
134
|
moreLabel: moreLabel,
|
|
129
135
|
items: hydratedNavItems.overflowItems,
|
|
130
136
|
testId: testId
|
|
131
|
-
}))) : /*#__PURE__*/React.createElement(
|
|
137
|
+
}))) : /*#__PURE__*/React.createElement(Box, {
|
|
138
|
+
role: "list",
|
|
139
|
+
xcss: containerWrapperStyles
|
|
140
|
+
}, /*#__PURE__*/React.createElement(Inline, {
|
|
132
141
|
xcss: [sharedContainerStyles, smallContainerStyles]
|
|
133
142
|
}, filteredItems.length > smallMaxItems &&
|
|
134
143
|
/*#__PURE__*/
|
|
@@ -21,10 +21,12 @@ export const Profile = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
21
21
|
// to use explicit props could cause regressions.
|
|
22
22
|
// TODO: Remove these spread props for better static analysis
|
|
23
23
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
24
|
-
return /*#__PURE__*/React.createElement(
|
|
24
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
25
|
+
role: "listitem"
|
|
26
|
+
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
25
27
|
label: label,
|
|
26
28
|
ref: ref
|
|
27
|
-
}, props));
|
|
29
|
+
}, props)));
|
|
28
30
|
});
|
|
29
31
|
|
|
30
32
|
// This exists only to extract props.
|
|
@@ -15,12 +15,14 @@ export const Settings = /*#__PURE__*/forwardRef((props, ref) => {
|
|
|
15
15
|
tooltip,
|
|
16
16
|
...iconButtonProps
|
|
17
17
|
} = props;
|
|
18
|
-
return /*#__PURE__*/React.createElement(
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
role: "listitem"
|
|
20
|
+
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
19
21
|
icon: /*#__PURE__*/React.createElement(SettingsIcon, {
|
|
20
22
|
label: typeof tooltip === 'string' ? tooltip : 'Settings Icon'
|
|
21
23
|
}),
|
|
22
24
|
ref: ref,
|
|
23
25
|
tooltip: tooltip
|
|
24
|
-
}, iconButtonProps));
|
|
26
|
+
}, iconButtonProps)));
|
|
25
27
|
});
|
|
26
28
|
export default Settings;
|
|
@@ -15,12 +15,14 @@ export const SignIn = props => {
|
|
|
15
15
|
tooltip,
|
|
16
16
|
...iconButtonProps
|
|
17
17
|
} = props;
|
|
18
|
-
return /*#__PURE__*/React.createElement(
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
role: "listitem"
|
|
20
|
+
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
19
21
|
icon: /*#__PURE__*/React.createElement(SignInIcon, {
|
|
20
22
|
label: typeof tooltip === 'string' ? tooltip : 'Sign-in Icon'
|
|
21
23
|
}),
|
|
22
24
|
tooltip: tooltip
|
|
23
25
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
24
|
-
}, iconButtonProps));
|
|
26
|
+
}, iconButtonProps)));
|
|
25
27
|
};
|
|
26
28
|
export default SignIn;
|
|
@@ -3,7 +3,7 @@ import QuestionCircleIcon from '@atlaskit/icon/glyph/question-circle';
|
|
|
3
3
|
import { SkeletonIconButton } from './components/SkeletonIconButton';
|
|
4
4
|
import { useTheme } from './theme';
|
|
5
5
|
/**
|
|
6
|
-
* __Skeleton
|
|
6
|
+
* __Skeleton notification button__
|
|
7
7
|
*
|
|
8
8
|
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
9
9
|
* their heavier interactive counterparts, for use when elements of the
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import NotificationIcon from '@atlaskit/icon/glyph/notification';
|
|
3
3
|
import { SkeletonIconButton } from './components/SkeletonIconButton';
|
|
4
4
|
/**
|
|
5
|
-
* __Skeleton
|
|
5
|
+
* __Skeleton notification button__
|
|
6
6
|
*
|
|
7
7
|
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
8
8
|
* their heavier interactive counterparts, for use when elements of the
|
|
@@ -11,13 +11,13 @@ var containerStyles = css({
|
|
|
11
11
|
display: 'flex',
|
|
12
12
|
boxSizing: 'border-box',
|
|
13
13
|
height: HORIZONTAL_GLOBAL_NAV_HEIGHT,
|
|
14
|
-
paddingRight: "var(--ds-space-150, 12px)",
|
|
15
|
-
paddingLeft: "var(--ds-space-150, 12px)",
|
|
16
14
|
position: 'relative',
|
|
17
15
|
alignItems: 'center',
|
|
18
16
|
justifyContent: 'space-between',
|
|
19
17
|
flexShrink: 0,
|
|
20
|
-
|
|
18
|
+
borderBlockEnd: "1px solid ".concat("var(--ds-border, ".concat(N30, ")")),
|
|
19
|
+
paddingInlineEnd: "var(--ds-space-150, 12px)",
|
|
20
|
+
paddingInlineStart: "var(--ds-space-150, 12px)"
|
|
21
21
|
});
|
|
22
22
|
var leftStyles = css({
|
|
23
23
|
display: 'flex',
|
|
@@ -36,10 +36,13 @@ var rightStyles = css({
|
|
|
36
36
|
flexShrink: 0,
|
|
37
37
|
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
38
38
|
'& > *': {
|
|
39
|
-
|
|
40
|
-
|
|
39
|
+
flexShrink: 0,
|
|
40
|
+
marginInlineEnd: "var(--ds-space-050, 4px)"
|
|
41
41
|
}
|
|
42
42
|
});
|
|
43
|
+
var noRightMarginStyles = css({
|
|
44
|
+
marginInlineEnd: 0
|
|
45
|
+
});
|
|
43
46
|
var analyticsData = {
|
|
44
47
|
attributes: {
|
|
45
48
|
navigationLayer: 'global'
|
|
@@ -104,6 +107,9 @@ export var AtlassianNavigation = function AtlassianNavigation(props) {
|
|
|
104
107
|
})), jsx("div", {
|
|
105
108
|
css: rightStyles,
|
|
106
109
|
"data-testid": testId && "".concat(testId, "-secondary-actions")
|
|
107
|
-
}, Search && jsx(Search, null),
|
|
110
|
+
}, Search && jsx(Search, null), jsx("div", {
|
|
111
|
+
role: "list",
|
|
112
|
+
css: [rightStyles, noRightMarginStyles]
|
|
113
|
+
}, Notifications && jsx(Notifications, null), Help && jsx(Help, null), Settings && jsx(Settings, null), SignIn && jsx(SignIn, null), Profile && jsx(Profile, null))))));
|
|
108
114
|
};
|
|
109
115
|
export default AtlassianNavigation;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import { css, jsx } from '@emotion/react';
|
|
3
3
|
var badgeContainerStyles = css({
|
|
4
4
|
position: 'absolute',
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
insetBlockStart: "var(--ds-space-negative-050, -4px)",
|
|
6
|
+
insetInlineEnd: "var(--ds-space-negative-025, -2px)",
|
|
7
7
|
pointerEvents: 'none'
|
|
8
8
|
});
|
|
9
9
|
var containerStyles = css({
|
|
@@ -15,9 +15,11 @@ var containerStyles = css({
|
|
|
15
15
|
export var BadgeContainer = function BadgeContainer(props) {
|
|
16
16
|
var badgeId = props.id,
|
|
17
17
|
Badge = props.badge,
|
|
18
|
-
children = props.children
|
|
18
|
+
children = props.children,
|
|
19
|
+
role = props.role;
|
|
19
20
|
return jsx("div", {
|
|
20
|
-
css: containerStyles
|
|
21
|
+
css: containerStyles,
|
|
22
|
+
role: role
|
|
21
23
|
}, children, jsx("div", {
|
|
22
24
|
css: badgeContainerStyles,
|
|
23
25
|
id: badgeId,
|
|
@@ -22,7 +22,7 @@ var wrapperStyles = css({
|
|
|
22
22
|
}),
|
|
23
23
|
// eslint-disable-next-line @atlaskit/design-system/no-nested-styles
|
|
24
24
|
'&&': {
|
|
25
|
-
|
|
25
|
+
marginInlineStart: "var(--ds-space-150, 12px)"
|
|
26
26
|
}
|
|
27
27
|
});
|
|
28
28
|
var TooltipSwitch = function TooltipSwitch(_ref) {
|
|
@@ -53,6 +53,7 @@ export var Create = function Create(_ref2) {
|
|
|
53
53
|
var theme = useTheme();
|
|
54
54
|
return jsx("div", {
|
|
55
55
|
css: wrapperStyles,
|
|
56
|
+
role: "listitem",
|
|
56
57
|
"data-testid": "create-button-wrapper"
|
|
57
58
|
}, jsx(TooltipSwitch, {
|
|
58
59
|
buttonTooltip: buttonTooltip
|
|
@@ -32,7 +32,10 @@ export var Help = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
32
32
|
}, iconButtonProps));
|
|
33
33
|
return badge ? /*#__PURE__*/React.createElement(BadgeContainer, {
|
|
34
34
|
id: HELP_NOTIFICATION_BADGE_ID,
|
|
35
|
-
badge: badge
|
|
36
|
-
|
|
35
|
+
badge: badge,
|
|
36
|
+
role: "listitem"
|
|
37
|
+
}, button) : /*#__PURE__*/React.createElement("div", {
|
|
38
|
+
role: "listitem"
|
|
39
|
+
}, button);
|
|
37
40
|
});
|
|
38
41
|
export default Help;
|
|
@@ -22,7 +22,8 @@ export var Notifications = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
22
22
|
iconButtonProps = _objectWithoutProperties(props, _excluded);
|
|
23
23
|
return /*#__PURE__*/React.createElement(BadgeContainer, {
|
|
24
24
|
id: NOTIFICATIONS_BADGE_ID,
|
|
25
|
-
badge: badge
|
|
25
|
+
badge: badge,
|
|
26
|
+
role: "listitem"
|
|
26
27
|
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
27
28
|
icon: /*#__PURE__*/React.createElement(NotificationIcon, {
|
|
28
29
|
label: typeof tooltip === 'string' ? tooltip : 'Notification Icon'
|
|
@@ -57,7 +57,8 @@ export var PrimaryButton = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
57
57
|
var theme = useTheme();
|
|
58
58
|
var button = jsx("div", {
|
|
59
59
|
style: (_ref = {}, _defineProperty(_ref, VAR_BUTTON_SELECTED_COLOR, theme.mode.primaryButton.selected.color), _defineProperty(_ref, VAR_BUTTON_SELECTED_BORDER_COLOR, theme.mode.primaryButton.selected.borderColor), _ref),
|
|
60
|
-
css: [buttonBaseStyles, isHighlighted && buttonHighlightedStyles]
|
|
60
|
+
css: [buttonBaseStyles, isHighlighted && buttonHighlightedStyles],
|
|
61
|
+
role: "listitem"
|
|
61
62
|
}, jsx(Button, _extends({
|
|
62
63
|
appearance: "primary",
|
|
63
64
|
testId: testId,
|
|
@@ -74,7 +74,8 @@ export var PrimaryItemsContainer = function PrimaryItemsContainer(_ref) {
|
|
|
74
74
|
[overflowItems.length, openOverflowMenu, onMoreClose]);
|
|
75
75
|
return jsx("div", {
|
|
76
76
|
css: containerStyles,
|
|
77
|
-
"data-testid": testId && "".concat(testId, "-primary-actions")
|
|
77
|
+
"data-testid": testId && "".concat(testId, "-primary-actions"),
|
|
78
|
+
role: "list"
|
|
78
79
|
}, jsx(OverflowProvider, {
|
|
79
80
|
isVisible: true,
|
|
80
81
|
openOverflowMenu: openOverflowMenu,
|
|
@@ -4,10 +4,13 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
|
4
4
|
var _xcss2;
|
|
5
5
|
import React, { memo, useCallback, useEffect, useMemo, useState } from 'react';
|
|
6
6
|
import Popup from '@atlaskit/popup';
|
|
7
|
-
import { Inline, xcss } from '@atlaskit/primitives';
|
|
7
|
+
import { Box, Inline, xcss } from '@atlaskit/primitives';
|
|
8
8
|
import { media, UNSAFE_useMediaQuery as useMediaQuery } from '@atlaskit/primitives/responsive';
|
|
9
9
|
import { OverflowProvider } from '../../controllers/overflow';
|
|
10
10
|
import { PrimaryDropdownButton } from '../PrimaryDropdownButton';
|
|
11
|
+
var containerWrapperStyles = xcss({
|
|
12
|
+
height: '100%'
|
|
13
|
+
});
|
|
11
14
|
var sharedContainerStyles = xcss({
|
|
12
15
|
height: '100%',
|
|
13
16
|
alignItems: 'stretch',
|
|
@@ -149,14 +152,20 @@ export var PrimaryItemsContainer = /*#__PURE__*/memo(function (_ref2) {
|
|
|
149
152
|
}
|
|
150
153
|
return navItems.small;
|
|
151
154
|
}, [isAboveLg, isAboveSm, navItems.large, navItems.medium, navItems.small]);
|
|
152
|
-
return /*#__PURE__*/React.createElement(React.Fragment, null, isClient ? /*#__PURE__*/React.createElement(
|
|
155
|
+
return /*#__PURE__*/React.createElement(React.Fragment, null, isClient ? /*#__PURE__*/React.createElement(Box, {
|
|
156
|
+
role: "list",
|
|
157
|
+
xcss: containerWrapperStyles
|
|
158
|
+
}, /*#__PURE__*/React.createElement(Inline, {
|
|
153
159
|
testId: testId && "".concat(testId, "-primary-actions"),
|
|
154
160
|
xcss: sharedContainerStyles
|
|
155
161
|
}, hydratedNavItems.navBarItems, hydratedNavItems.overflowItems.length > 0 && /*#__PURE__*/React.createElement(MoreItemsPopup, {
|
|
156
162
|
moreLabel: moreLabel,
|
|
157
163
|
items: hydratedNavItems.overflowItems,
|
|
158
164
|
testId: testId
|
|
159
|
-
}))) : /*#__PURE__*/React.createElement(
|
|
165
|
+
}))) : /*#__PURE__*/React.createElement(Box, {
|
|
166
|
+
role: "list",
|
|
167
|
+
xcss: containerWrapperStyles
|
|
168
|
+
}, /*#__PURE__*/React.createElement(Inline, {
|
|
160
169
|
xcss: [sharedContainerStyles, smallContainerStyles]
|
|
161
170
|
}, filteredItems.length > smallMaxItems &&
|
|
162
171
|
/*#__PURE__*/
|
|
@@ -19,10 +19,12 @@ export var Profile = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
19
19
|
// to use explicit props could cause regressions.
|
|
20
20
|
// TODO: Remove these spread props for better static analysis
|
|
21
21
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
22
|
-
return /*#__PURE__*/React.createElement(
|
|
22
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
23
|
+
role: "listitem"
|
|
24
|
+
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
23
25
|
label: label,
|
|
24
26
|
ref: ref
|
|
25
|
-
}, props));
|
|
27
|
+
}, props)));
|
|
26
28
|
});
|
|
27
29
|
|
|
28
30
|
// This exists only to extract props.
|
|
@@ -15,12 +15,14 @@ import { IconButton } from '../IconButton';
|
|
|
15
15
|
export var Settings = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
16
16
|
var tooltip = props.tooltip,
|
|
17
17
|
iconButtonProps = _objectWithoutProperties(props, _excluded);
|
|
18
|
-
return /*#__PURE__*/React.createElement(
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
role: "listitem"
|
|
20
|
+
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
19
21
|
icon: /*#__PURE__*/React.createElement(SettingsIcon, {
|
|
20
22
|
label: typeof tooltip === 'string' ? tooltip : 'Settings Icon'
|
|
21
23
|
}),
|
|
22
24
|
ref: ref,
|
|
23
25
|
tooltip: tooltip
|
|
24
|
-
}, iconButtonProps));
|
|
26
|
+
}, iconButtonProps)));
|
|
25
27
|
});
|
|
26
28
|
export default Settings;
|
|
@@ -15,12 +15,14 @@ import { IconButton } from '../IconButton';
|
|
|
15
15
|
export var SignIn = function SignIn(props) {
|
|
16
16
|
var tooltip = props.tooltip,
|
|
17
17
|
iconButtonProps = _objectWithoutProperties(props, _excluded);
|
|
18
|
-
return /*#__PURE__*/React.createElement(
|
|
18
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
19
|
+
role: "listitem"
|
|
20
|
+
}, /*#__PURE__*/React.createElement(IconButton, _extends({
|
|
19
21
|
icon: /*#__PURE__*/React.createElement(SignInIcon, {
|
|
20
22
|
label: typeof tooltip === 'string' ? tooltip : 'Sign-in Icon'
|
|
21
23
|
}),
|
|
22
24
|
tooltip: tooltip
|
|
23
25
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
24
|
-
}, iconButtonProps));
|
|
26
|
+
}, iconButtonProps)));
|
|
25
27
|
};
|
|
26
28
|
export default SignIn;
|
|
@@ -3,7 +3,7 @@ import QuestionCircleIcon from '@atlaskit/icon/glyph/question-circle';
|
|
|
3
3
|
import { SkeletonIconButton } from './components/SkeletonIconButton';
|
|
4
4
|
import { useTheme } from './theme';
|
|
5
5
|
/**
|
|
6
|
-
* __Skeleton
|
|
6
|
+
* __Skeleton notification button__
|
|
7
7
|
*
|
|
8
8
|
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
9
9
|
* their heavier interactive counterparts, for use when elements of the
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import NotificationIcon from '@atlaskit/icon/glyph/notification';
|
|
3
3
|
import { SkeletonIconButton } from './components/SkeletonIconButton';
|
|
4
4
|
/**
|
|
5
|
-
* __Skeleton
|
|
5
|
+
* __Skeleton notification button__
|
|
6
6
|
*
|
|
7
7
|
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
8
8
|
* their heavier interactive counterparts, for use when elements of the
|
|
@@ -3,12 +3,12 @@ import { LogoProps } from '@atlaskit/logo';
|
|
|
3
3
|
export interface ProductHomeProps {
|
|
4
4
|
/**
|
|
5
5
|
* The product icon.
|
|
6
|
-
* Expected to be an Icon from the Atlaskit Logo package. Visible on smaller screen sizes
|
|
6
|
+
* Expected to be an Icon from the Atlaskit Logo package. Visible on smaller screen sizes.
|
|
7
7
|
*/
|
|
8
8
|
icon: ComponentType<Partial<LogoProps>>;
|
|
9
9
|
/**
|
|
10
10
|
* The product logo,
|
|
11
|
-
* visible on larger screen sizes
|
|
11
|
+
* visible on larger screen sizes.
|
|
12
12
|
*/
|
|
13
13
|
logo: ComponentType<Partial<LogoProps>>;
|
|
14
14
|
/**
|
|
@@ -81,7 +81,7 @@ export interface CustomProductHomeProps {
|
|
|
81
81
|
*/
|
|
82
82
|
href?: string;
|
|
83
83
|
/**
|
|
84
|
-
* Name of the site that appears next to the logo
|
|
84
|
+
* Name of the site that appears next to the logo.
|
|
85
85
|
*/
|
|
86
86
|
siteTitle?: string;
|
|
87
87
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ProfileProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* __Profile__
|
|
5
5
|
*
|
|
@@ -13,5 +13,5 @@ export declare const Profile: React.ForwardRefExoticComponent<import("../IconBut
|
|
|
13
13
|
icon: React.ReactChild | undefined;
|
|
14
14
|
theme?: ((current: (props: import("@atlaskit/button").ThemeProps) => import("@atlaskit/button").ThemeTokens, props: import("@atlaskit/button").ThemeProps) => import("@atlaskit/button").ThemeTokens) | undefined;
|
|
15
15
|
} & React.RefAttributes<HTMLElement>>;
|
|
16
|
-
declare const _default: (props:
|
|
16
|
+
declare const _default: (props: ProfileProps) => void;
|
|
17
17
|
export default _default;
|
|
@@ -5,8 +5,8 @@ export type SearchProps = BaseIconButtonProps & {
|
|
|
5
5
|
*/
|
|
6
6
|
placeholder: string;
|
|
7
7
|
/**
|
|
8
|
-
* Used to describe the search icon and text field for
|
|
9
|
-
* page with a screen reader
|
|
8
|
+
* Used to describe the search icon and text field for people viewing the
|
|
9
|
+
* page with a screen reader.
|
|
10
10
|
*/
|
|
11
11
|
label: string;
|
|
12
12
|
/**
|
|
@@ -10,7 +10,7 @@ export type SkeletonPrimaryButtonProps = {
|
|
|
10
10
|
*/
|
|
11
11
|
children?: ReactNode;
|
|
12
12
|
/**
|
|
13
|
-
* Sets the appearance of the skeleton button to look like a dropdown button
|
|
13
|
+
* Sets the appearance of the skeleton button to look like a dropdown button.
|
|
14
14
|
*/
|
|
15
15
|
isDropdownButton?: boolean;
|
|
16
16
|
/**
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
export type SkeletonHelpButtonProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Describes the specific role of this navigation component for users viewing the page with a screen
|
|
5
|
-
* reader.
|
|
5
|
+
* reader. Use this to differentiate the buttons from other navigation buttons on a page.
|
|
6
6
|
*/
|
|
7
7
|
label: string;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
|
-
* __Skeleton
|
|
10
|
+
* __Skeleton notification button__
|
|
11
11
|
*
|
|
12
12
|
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
13
13
|
* their heavier interactive counterparts, for use when elements of the
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
export type SkeletonNotificationButtonProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Describes the specific role of this navigation component for users viewing the page with a screen
|
|
5
|
-
* reader.
|
|
5
|
+
* reader. Use this to differentiate the buttons from other navigation buttons on a page.
|
|
6
6
|
*/
|
|
7
7
|
label: string;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
|
-
* __Skeleton
|
|
10
|
+
* __Skeleton notification button__
|
|
11
11
|
*
|
|
12
12
|
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
13
13
|
* their heavier interactive counterparts, for use when elements of the
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export type SkeletonSettingsButtonProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Describes the specific role of this navigation component for users viewing the page with a screen
|
|
5
|
-
* reader.
|
|
5
|
+
* reader. Use this to differentiate the buttons from other navigation buttons on a page.
|
|
6
6
|
*/
|
|
7
7
|
label: string;
|
|
8
8
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export type SkeletonSwitcherButtonProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Describes the specific role of this navigation component for users viewing the page with a screen
|
|
5
|
-
* reader.
|
|
5
|
+
* reader. Use this to differentiate the buttons from other navigation buttons on a page.
|
|
6
6
|
*/
|
|
7
7
|
label: string;
|
|
8
8
|
};
|
|
@@ -3,12 +3,12 @@ import { LogoProps } from '@atlaskit/logo';
|
|
|
3
3
|
export interface ProductHomeProps {
|
|
4
4
|
/**
|
|
5
5
|
* The product icon.
|
|
6
|
-
* Expected to be an Icon from the Atlaskit Logo package. Visible on smaller screen sizes
|
|
6
|
+
* Expected to be an Icon from the Atlaskit Logo package. Visible on smaller screen sizes.
|
|
7
7
|
*/
|
|
8
8
|
icon: ComponentType<Partial<LogoProps>>;
|
|
9
9
|
/**
|
|
10
10
|
* The product logo,
|
|
11
|
-
* visible on larger screen sizes
|
|
11
|
+
* visible on larger screen sizes.
|
|
12
12
|
*/
|
|
13
13
|
logo: ComponentType<Partial<LogoProps>>;
|
|
14
14
|
/**
|
|
@@ -81,7 +81,7 @@ export interface CustomProductHomeProps {
|
|
|
81
81
|
*/
|
|
82
82
|
href?: string;
|
|
83
83
|
/**
|
|
84
|
-
* Name of the site that appears next to the logo
|
|
84
|
+
* Name of the site that appears next to the logo.
|
|
85
85
|
*/
|
|
86
86
|
siteTitle?: string;
|
|
87
87
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { ProfileProps } from './types';
|
|
3
3
|
/**
|
|
4
4
|
* __Profile__
|
|
5
5
|
*
|
|
@@ -13,5 +13,5 @@ export declare const Profile: React.ForwardRefExoticComponent<import("../IconBut
|
|
|
13
13
|
icon: React.ReactChild | undefined;
|
|
14
14
|
theme?: ((current: (props: import("@atlaskit/button").ThemeProps) => import("@atlaskit/button").ThemeTokens, props: import("@atlaskit/button").ThemeProps) => import("@atlaskit/button").ThemeTokens) | undefined;
|
|
15
15
|
} & React.RefAttributes<HTMLElement>>;
|
|
16
|
-
declare const _default: (props:
|
|
16
|
+
declare const _default: (props: ProfileProps) => void;
|
|
17
17
|
export default _default;
|
|
@@ -5,8 +5,8 @@ export type SearchProps = BaseIconButtonProps & {
|
|
|
5
5
|
*/
|
|
6
6
|
placeholder: string;
|
|
7
7
|
/**
|
|
8
|
-
* Used to describe the search icon and text field for
|
|
9
|
-
* page with a screen reader
|
|
8
|
+
* Used to describe the search icon and text field for people viewing the
|
|
9
|
+
* page with a screen reader.
|
|
10
10
|
*/
|
|
11
11
|
label: string;
|
|
12
12
|
/**
|
|
@@ -10,7 +10,7 @@ export type SkeletonPrimaryButtonProps = {
|
|
|
10
10
|
*/
|
|
11
11
|
children?: ReactNode;
|
|
12
12
|
/**
|
|
13
|
-
* Sets the appearance of the skeleton button to look like a dropdown button
|
|
13
|
+
* Sets the appearance of the skeleton button to look like a dropdown button.
|
|
14
14
|
*/
|
|
15
15
|
isDropdownButton?: boolean;
|
|
16
16
|
/**
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
export type SkeletonHelpButtonProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Describes the specific role of this navigation component for users viewing the page with a screen
|
|
5
|
-
* reader.
|
|
5
|
+
* reader. Use this to differentiate the buttons from other navigation buttons on a page.
|
|
6
6
|
*/
|
|
7
7
|
label: string;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
|
-
* __Skeleton
|
|
10
|
+
* __Skeleton notification button__
|
|
11
11
|
*
|
|
12
12
|
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
13
13
|
* their heavier interactive counterparts, for use when elements of the
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
export type SkeletonNotificationButtonProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Describes the specific role of this navigation component for users viewing the page with a screen
|
|
5
|
-
* reader.
|
|
5
|
+
* reader. Use this to differentiate the buttons from other navigation buttons on a page.
|
|
6
6
|
*/
|
|
7
7
|
label: string;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
10
|
-
* __Skeleton
|
|
10
|
+
* __Skeleton notification button__
|
|
11
11
|
*
|
|
12
12
|
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
13
13
|
* their heavier interactive counterparts, for use when elements of the
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export type SkeletonSettingsButtonProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Describes the specific role of this navigation component for users viewing the page with a screen
|
|
5
|
-
* reader.
|
|
5
|
+
* reader. Use this to differentiate the buttons from other navigation buttons on a page.
|
|
6
6
|
*/
|
|
7
7
|
label: string;
|
|
8
8
|
};
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
export type SkeletonSwitcherButtonProps = {
|
|
3
3
|
/**
|
|
4
4
|
* Describes the specific role of this navigation component for users viewing the page with a screen
|
|
5
|
-
* reader.
|
|
5
|
+
* reader. Use this to differentiate the buttons from other navigation buttons on a page.
|
|
6
6
|
*/
|
|
7
7
|
label: string;
|
|
8
8
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/atlassian-navigation",
|
|
3
|
-
"version": "3.0
|
|
3
|
+
"version": "3.1.0",
|
|
4
4
|
"description": "A horizontal navigation component for Atlassian products.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -26,23 +26,26 @@
|
|
|
26
26
|
"team": "Design System Team",
|
|
27
27
|
"deprecatedAutoEntryPoints": true,
|
|
28
28
|
"releaseModel": "continuous",
|
|
29
|
+
"productPushConsumption": [
|
|
30
|
+
"jira"
|
|
31
|
+
],
|
|
29
32
|
"website": {
|
|
30
33
|
"name": "Atlassian navigation",
|
|
31
34
|
"category": "Components"
|
|
32
35
|
}
|
|
33
36
|
},
|
|
34
37
|
"dependencies": {
|
|
35
|
-
"@atlaskit/analytics-namespaced-context": "^6.
|
|
36
|
-
"@atlaskit/button": "^17.
|
|
38
|
+
"@atlaskit/analytics-namespaced-context": "^6.9.0",
|
|
39
|
+
"@atlaskit/button": "^17.2.0",
|
|
37
40
|
"@atlaskit/ds-lib": "^2.2.0",
|
|
38
41
|
"@atlaskit/icon": "^22.0.0",
|
|
39
42
|
"@atlaskit/logo": "*",
|
|
40
43
|
"@atlaskit/platform-feature-flags": "^0.2.0",
|
|
41
44
|
"@atlaskit/popup": "^1.11.0",
|
|
42
|
-
"@atlaskit/primitives": "^1.
|
|
45
|
+
"@atlaskit/primitives": "^1.18.0",
|
|
43
46
|
"@atlaskit/theme": "^12.6.0",
|
|
44
|
-
"@atlaskit/tokens": "^1.
|
|
45
|
-
"@atlaskit/tooltip": "^18.
|
|
47
|
+
"@atlaskit/tokens": "^1.34.0",
|
|
48
|
+
"@atlaskit/tooltip": "^18.1.0",
|
|
46
49
|
"@atlaskit/width-detector": "^4.1.0",
|
|
47
50
|
"@babel/runtime": "^7.0.0",
|
|
48
51
|
"@emotion/react": "^11.7.1",
|