@atlaskit/atlassian-navigation 2.8.0 → 2.9.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 +81 -71
- package/dist/cjs/common/constants.js +9 -18
- package/dist/cjs/common/styles.js +3 -5
- package/dist/cjs/components/AppSwitcher/index.js +2 -4
- package/dist/cjs/components/AtlassianNavigation/index.js +2 -4
- package/dist/cjs/components/AtlassianNavigation/skeleton.js +2 -4
- package/dist/cjs/components/BadgeContainer/index.js +2 -3
- package/dist/cjs/components/Create/index.js +2 -4
- package/dist/cjs/components/Create/skeleton.js +2 -3
- package/dist/cjs/components/Create/styles.js +2 -3
- package/dist/cjs/components/Help/index.js +2 -4
- package/dist/cjs/components/IconButton/index.js +2 -3
- package/dist/cjs/components/IconButton/skeleton.js +2 -3
- package/dist/cjs/components/IconButton/styles.js +2 -3
- package/dist/cjs/components/Notifications/index.js +2 -4
- package/dist/cjs/components/PrimaryButton/index.js +8 -10
- package/dist/cjs/components/PrimaryButton/skeleton.js +2 -3
- package/dist/cjs/components/PrimaryButton/styles.js +2 -3
- package/dist/cjs/components/PrimaryDropdownButton/index.js +2 -4
- package/dist/cjs/components/PrimaryItemsContainer/index.js +2 -3
- package/dist/cjs/components/PrimaryItemsContainer/skeleton.js +2 -3
- package/dist/cjs/components/PrimaryItemsContainerV2/index.js +2 -3
- package/dist/cjs/components/PrimarySplitButton/index.js +57 -0
- package/dist/cjs/components/ProductHome/custom-product-home.js +1 -2
- package/dist/cjs/components/ProductHome/product-home.js +1 -2
- package/dist/cjs/components/ProductHome/skeleton.js +2 -3
- package/dist/cjs/components/ProductHome/utils.js +2 -3
- package/dist/cjs/components/Profile/index.js +2 -4
- package/dist/cjs/components/Profile/skeleton.js +2 -3
- package/dist/cjs/components/Search/index.js +2 -4
- package/dist/cjs/components/Search/skeleton.js +2 -3
- package/dist/cjs/components/Settings/index.js +2 -4
- package/dist/cjs/components/SignIn/index.js +2 -4
- package/dist/cjs/components/SignIn/skeleton.js +2 -3
- package/dist/cjs/components/SkeletonCreateButton/index.js +2 -3
- package/dist/cjs/components/SkeletonIconButton/index.js +2 -3
- package/dist/cjs/components/SkeletonPrimaryButton/index.js +2 -3
- package/dist/cjs/controllers/overflow/index.js +4 -8
- package/dist/cjs/index.js +7 -0
- package/dist/cjs/skeleton-help-button.js +2 -3
- package/dist/cjs/skeleton-notification-button.js +2 -3
- package/dist/cjs/skeleton-settings-button.js +2 -3
- package/dist/cjs/skeleton-switcher-button.js +2 -3
- package/dist/cjs/theme/default-theme.js +2 -4
- package/dist/cjs/theme/theme-generator.js +2 -4
- package/dist/cjs/theme/theme-helpers.js +6 -11
- package/dist/cjs/theme/theme-provider.js +2 -4
- package/dist/cjs/theme/themes.js +2 -4
- package/dist/cjs/theme/use-theme.js +2 -3
- package/dist/es2019/components/PrimaryButton/index.js +6 -6
- package/dist/es2019/components/PrimarySplitButton/index.js +52 -0
- package/dist/es2019/index.js +1 -0
- package/dist/esm/components/PrimaryButton/index.js +6 -6
- package/dist/esm/components/PrimarySplitButton/index.js +51 -0
- package/dist/esm/index.js +1 -0
- package/dist/types/components/PrimarySplitButton/index.d.ts +12 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types-ts4.5/components/PrimarySplitButton/index.d.ts +12 -0
- package/dist/types-ts4.5/index.d.ts +1 -0
- package/package.json +5 -4
- package/report.api.md +12 -0
- package/tmp/api-report-tmp.d.ts +9 -0
|
@@ -23,7 +23,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
23
23
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#app-switcher)
|
|
24
24
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
25
25
|
*/
|
|
26
|
-
var AppSwitcher = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
26
|
+
var AppSwitcher = exports.AppSwitcher = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
27
27
|
var tooltip = props.tooltip,
|
|
28
28
|
iconButtonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
29
29
|
return /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, (0, _extends2.default)({
|
|
@@ -37,6 +37,4 @@ var AppSwitcher = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
37
37
|
|
|
38
38
|
// exists only to extract props
|
|
39
39
|
// eslint-disable-next-line @repo/internal/react/use-noop
|
|
40
|
-
exports.
|
|
41
|
-
var _default = function _default(props) {};
|
|
42
|
-
exports.default = _default;
|
|
40
|
+
var _default = exports.default = function _default(props) {};
|
|
@@ -62,7 +62,7 @@ var analyticsData = {
|
|
|
62
62
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples)
|
|
63
63
|
* - [Code](https://atlassian.design/components/atlassian-navigation/examples)
|
|
64
64
|
*/
|
|
65
|
-
var AtlassianNavigation = function AtlassianNavigation(props) {
|
|
65
|
+
var AtlassianNavigation = exports.AtlassianNavigation = function AtlassianNavigation(props) {
|
|
66
66
|
var label = props.label,
|
|
67
67
|
_props$primaryItems = props.primaryItems,
|
|
68
68
|
primaryItems = _props$primaryItems === void 0 ? [] : _props$primaryItems,
|
|
@@ -113,6 +113,4 @@ var AtlassianNavigation = function AtlassianNavigation(props) {
|
|
|
113
113
|
"data-testid": testId && "".concat(testId, "-secondary-actions")
|
|
114
114
|
}, Search && (0, _react.jsx)(Search, null), 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
115
|
};
|
|
116
|
-
exports.
|
|
117
|
-
var _default = AtlassianNavigation;
|
|
118
|
-
exports.default = _default;
|
|
116
|
+
var _default = exports.default = AtlassianNavigation;
|
|
@@ -62,7 +62,7 @@ var rightStyles = (0, _react.css)({
|
|
|
62
62
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-loader)
|
|
63
63
|
* - [Code](https://atlassian.design/components/{packageName}/code)
|
|
64
64
|
*/
|
|
65
|
-
var NavigationSkeleton = function NavigationSkeleton(_ref) {
|
|
65
|
+
var NavigationSkeleton = exports.NavigationSkeleton = function NavigationSkeleton(_ref) {
|
|
66
66
|
var _ref$primaryItemsCoun = _ref.primaryItemsCount,
|
|
67
67
|
primaryItemsCount = _ref$primaryItemsCoun === void 0 ? 4 : _ref$primaryItemsCoun,
|
|
68
68
|
_ref$secondaryItemsCo = _ref.secondaryItemsCount,
|
|
@@ -103,6 +103,4 @@ var NavigationSkeleton = function NavigationSkeleton(_ref) {
|
|
|
103
103
|
});
|
|
104
104
|
}), (0, _react.jsx)(_skeleton4.ProfileSkeleton, null))));
|
|
105
105
|
};
|
|
106
|
-
exports.
|
|
107
|
-
var _default = NavigationSkeleton;
|
|
108
|
-
exports.default = _default;
|
|
106
|
+
var _default = exports.default = NavigationSkeleton;
|
|
@@ -19,7 +19,7 @@ var containerStyles = (0, _react.css)({
|
|
|
19
19
|
|
|
20
20
|
// Not exported to consumers
|
|
21
21
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
22
|
-
var BadgeContainer = function BadgeContainer(props) {
|
|
22
|
+
var BadgeContainer = exports.BadgeContainer = function BadgeContainer(props) {
|
|
23
23
|
var badgeId = props.id,
|
|
24
24
|
Badge = props.badge,
|
|
25
25
|
children = props.children;
|
|
@@ -30,5 +30,4 @@ var BadgeContainer = function BadgeContainer(props) {
|
|
|
30
30
|
id: badgeId,
|
|
31
31
|
"aria-hidden": true
|
|
32
32
|
}, (0, _react.jsx)(Badge, null)));
|
|
33
|
-
};
|
|
34
|
-
exports.BadgeContainer = BadgeContainer;
|
|
33
|
+
};
|
|
@@ -51,7 +51,7 @@ var TooltipSwitch = function TooltipSwitch(_ref) {
|
|
|
51
51
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#create)
|
|
52
52
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
53
53
|
*/
|
|
54
|
-
var Create = function Create(_ref2) {
|
|
54
|
+
var Create = exports.Create = function Create(_ref2) {
|
|
55
55
|
var onClick = _ref2.onClick,
|
|
56
56
|
href = _ref2.href,
|
|
57
57
|
text = _ref2.text,
|
|
@@ -89,6 +89,4 @@ var Create = function Create(_ref2) {
|
|
|
89
89
|
"data-hide-on-largescreens": true
|
|
90
90
|
}));
|
|
91
91
|
};
|
|
92
|
-
exports.
|
|
93
|
-
var _default = Create;
|
|
94
|
-
exports.default = _default;
|
|
92
|
+
var _default = exports.default = Create;
|
|
@@ -27,7 +27,7 @@ var mobileStyles = (0, _react2.css)((0, _defineProperty2.default)({}, "@media (m
|
|
|
27
27
|
|
|
28
28
|
// Not exported to consumers, only used in NavigationSkeleton
|
|
29
29
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
30
|
-
var CreateSkeleton = function CreateSkeleton() {
|
|
30
|
+
var CreateSkeleton = exports.CreateSkeleton = function CreateSkeleton() {
|
|
31
31
|
var theme = (0, _theme.useTheme)();
|
|
32
32
|
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("div", {
|
|
33
33
|
style: theme.mode.skeleton,
|
|
@@ -36,5 +36,4 @@ var CreateSkeleton = function CreateSkeleton() {
|
|
|
36
36
|
css: mobileStyles,
|
|
37
37
|
size: 26
|
|
38
38
|
}));
|
|
39
|
-
};
|
|
40
|
-
exports.CreateSkeleton = CreateSkeleton;
|
|
39
|
+
};
|
|
@@ -8,7 +8,7 @@ exports.getCreateButtonTheme = void 0;
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
10
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
|
-
var getCreateButtonTheme = function getCreateButtonTheme(_ref) {
|
|
11
|
+
var getCreateButtonTheme = exports.getCreateButtonTheme = function getCreateButtonTheme(_ref) {
|
|
12
12
|
var create = _ref.mode.create;
|
|
13
13
|
return function (current, props) {
|
|
14
14
|
var _current = current(props),
|
|
@@ -30,5 +30,4 @@ var getCreateButtonTheme = function getCreateButtonTheme(_ref) {
|
|
|
30
30
|
spinnerStyles: spinnerStyles
|
|
31
31
|
};
|
|
32
32
|
};
|
|
33
|
-
};
|
|
34
|
-
exports.getCreateButtonTheme = getCreateButtonTheme;
|
|
33
|
+
};
|
|
@@ -26,7 +26,7 @@ var HELP_NOTIFICATION_BADGE_ID = 'atlassian-navigation-help-notification-count';
|
|
|
26
26
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#help)
|
|
27
27
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
28
28
|
*/
|
|
29
|
-
var Help = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
29
|
+
var Help = exports.Help = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
30
30
|
var badge = props.badge,
|
|
31
31
|
tooltip = props.tooltip,
|
|
32
32
|
iconButtonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
@@ -45,6 +45,4 @@ var Help = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
45
45
|
badge: badge
|
|
46
46
|
}, button) : button;
|
|
47
47
|
});
|
|
48
|
-
exports.
|
|
49
|
-
var _default = Help;
|
|
50
|
-
exports.default = _default;
|
|
48
|
+
var _default = exports.default = Help;
|
|
@@ -25,7 +25,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
25
25
|
* rely on the defaults.
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
|
-
var IconButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
28
|
+
var IconButton = exports.IconButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
29
29
|
var icon = props.icon,
|
|
30
30
|
testId = props.testId,
|
|
31
31
|
tooltip = props.tooltip,
|
|
@@ -47,5 +47,4 @@ var IconButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
47
47
|
}, button);
|
|
48
48
|
}
|
|
49
49
|
return button;
|
|
50
|
-
});
|
|
51
|
-
exports.IconButton = IconButton;
|
|
50
|
+
});
|
|
@@ -18,7 +18,7 @@ var skeletonStyles = (0, _react.css)({
|
|
|
18
18
|
|
|
19
19
|
// Not exported to consumers, only used in NavigationSkeleton
|
|
20
20
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
21
|
-
var IconButtonSkeleton = function IconButtonSkeleton(_ref) {
|
|
21
|
+
var IconButtonSkeleton = exports.IconButtonSkeleton = function IconButtonSkeleton(_ref) {
|
|
22
22
|
var className = _ref.className,
|
|
23
23
|
marginLeft = _ref.marginLeft,
|
|
24
24
|
marginRight = _ref.marginRight,
|
|
@@ -35,5 +35,4 @@ var IconButtonSkeleton = function IconButtonSkeleton(_ref) {
|
|
|
35
35
|
style: dynamicStyles,
|
|
36
36
|
css: skeletonStyles
|
|
37
37
|
});
|
|
38
|
-
};
|
|
39
|
-
exports.IconButtonSkeleton = IconButtonSkeleton;
|
|
38
|
+
};
|
|
@@ -8,7 +8,7 @@ exports.getIconButtonTheme = void 0;
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
10
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
|
-
var getIconButtonTheme = function getIconButtonTheme(_ref) {
|
|
11
|
+
var getIconButtonTheme = exports.getIconButtonTheme = function getIconButtonTheme(_ref) {
|
|
12
12
|
var iconButton = _ref.mode.iconButton;
|
|
13
13
|
return function (current, props) {
|
|
14
14
|
var _current = current(props),
|
|
@@ -40,5 +40,4 @@ var getIconButtonTheme = function getIconButtonTheme(_ref) {
|
|
|
40
40
|
spinnerStyles: spinnerStyles
|
|
41
41
|
};
|
|
42
42
|
};
|
|
43
|
-
};
|
|
44
|
-
exports.getIconButtonTheme = getIconButtonTheme;
|
|
43
|
+
};
|
|
@@ -26,7 +26,7 @@ var NOTIFICATIONS_BADGE_ID = 'atlassian-navigation-notification-count';
|
|
|
26
26
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#notifications)
|
|
27
27
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
28
28
|
*/
|
|
29
|
-
var Notifications = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
29
|
+
var Notifications = exports.Notifications = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
30
30
|
var badge = props.badge,
|
|
31
31
|
tooltip = props.tooltip,
|
|
32
32
|
iconButtonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
@@ -42,6 +42,4 @@ var Notifications = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
42
42
|
"aria-describedby": NOTIFICATIONS_BADGE_ID
|
|
43
43
|
}, iconButtonProps)));
|
|
44
44
|
});
|
|
45
|
-
exports.
|
|
46
|
-
var _default = Notifications;
|
|
47
|
-
exports.default = _default;
|
|
45
|
+
var _default = exports.default = Notifications;
|
|
@@ -34,13 +34,13 @@ var buttonHighlightedStyles = (0, _react2.css)({
|
|
|
34
34
|
'&:after': {
|
|
35
35
|
height: 3,
|
|
36
36
|
position: 'absolute',
|
|
37
|
-
right: "var(--ds-space-050, 4px)",
|
|
38
|
-
bottom: 0,
|
|
39
|
-
left: "var(--ds-space-050, 4px)",
|
|
40
37
|
backgroundColor: "var(".concat(VAR_BUTTON_SELECTED_BORDER_COLOR, ")"),
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
content: '""'
|
|
38
|
+
borderStartEndRadius: "var(--ds-border-radius-050, 1px)",
|
|
39
|
+
borderStartStartRadius: "var(--ds-border-radius-050, 1px)",
|
|
40
|
+
content: '""',
|
|
41
|
+
insetBlockEnd: 0,
|
|
42
|
+
insetInlineEnd: "var(--ds-space-050, 4px)",
|
|
43
|
+
insetInlineStart: "var(--ds-space-050, 4px)"
|
|
44
44
|
}
|
|
45
45
|
});
|
|
46
46
|
|
|
@@ -53,7 +53,7 @@ var buttonHighlightedStyles = (0, _react2.css)({
|
|
|
53
53
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#dropdown-menu)
|
|
54
54
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
55
55
|
*/
|
|
56
|
-
var PrimaryButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
56
|
+
var PrimaryButton = exports.PrimaryButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
57
57
|
var _ref;
|
|
58
58
|
var children = props.children,
|
|
59
59
|
testId = props.testId,
|
|
@@ -82,6 +82,4 @@ var PrimaryButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
82
82
|
}
|
|
83
83
|
return button;
|
|
84
84
|
});
|
|
85
|
-
exports.
|
|
86
|
-
var _default = PrimaryButton;
|
|
87
|
-
exports.default = _default;
|
|
85
|
+
var _default = exports.default = PrimaryButton;
|
|
@@ -20,12 +20,11 @@ var skeletonStyles = (0, _react.css)({
|
|
|
20
20
|
|
|
21
21
|
// Not exported to consumers, only used in NavigationSkeleton
|
|
22
22
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
23
|
-
var PrimaryButtonSkeleton = function PrimaryButtonSkeleton(props) {
|
|
23
|
+
var PrimaryButtonSkeleton = exports.PrimaryButtonSkeleton = function PrimaryButtonSkeleton(props) {
|
|
24
24
|
var theme = (0, _theme.useTheme)();
|
|
25
25
|
return (0, _react.jsx)("div", {
|
|
26
26
|
style: theme.mode.skeleton,
|
|
27
27
|
css: skeletonStyles,
|
|
28
28
|
className: props.className
|
|
29
29
|
});
|
|
30
|
-
};
|
|
31
|
-
exports.PrimaryButtonSkeleton = PrimaryButtonSkeleton;
|
|
30
|
+
};
|
|
@@ -8,7 +8,7 @@ exports.getPrimaryButtonTheme = void 0;
|
|
|
8
8
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
9
9
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
10
10
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
11
|
-
var getPrimaryButtonTheme = function getPrimaryButtonTheme(_ref) {
|
|
11
|
+
var getPrimaryButtonTheme = exports.getPrimaryButtonTheme = function getPrimaryButtonTheme(_ref) {
|
|
12
12
|
var primaryButton = _ref.mode.primaryButton;
|
|
13
13
|
return function (current, props) {
|
|
14
14
|
var _current = current(props),
|
|
@@ -32,5 +32,4 @@ var getPrimaryButtonTheme = function getPrimaryButtonTheme(_ref) {
|
|
|
32
32
|
spinnerStyles: spinnerStyles
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
-
};
|
|
36
|
-
exports.getPrimaryButtonTheme = getPrimaryButtonTheme;
|
|
35
|
+
};
|
|
@@ -31,7 +31,7 @@ var chevronIconStylesWithSpacingFixStyles = (0, _primitives.xcss)({
|
|
|
31
31
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#button)
|
|
32
32
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
33
33
|
*/
|
|
34
|
-
var PrimaryDropdownButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
34
|
+
var PrimaryDropdownButton = exports.PrimaryDropdownButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
35
35
|
return (0, _react2.jsx)(_PrimaryButton.PrimaryButton, (0, _extends2.default)({
|
|
36
36
|
iconAfter: (0, _react2.jsx)(_primitives.Bleed, {
|
|
37
37
|
xcss: (0, _platformFeatureFlags.getBooleanFF)('platform.design-system-team.icon-button-spacing-fix_o1zc5') ? chevronIconStylesWithSpacingFixStyles : chevronIconStyles,
|
|
@@ -42,6 +42,4 @@ var PrimaryDropdownButton = /*#__PURE__*/(0, _react.forwardRef)(function (props,
|
|
|
42
42
|
ref: ref
|
|
43
43
|
}, props));
|
|
44
44
|
});
|
|
45
|
-
exports.
|
|
46
|
-
var _default = PrimaryDropdownButton;
|
|
47
|
-
exports.default = _default;
|
|
45
|
+
var _default = exports.default = PrimaryDropdownButton;
|
|
@@ -39,7 +39,7 @@ var widthObserverContainerStyles = (0, _react2.css)({
|
|
|
39
39
|
|
|
40
40
|
// Internal only
|
|
41
41
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
42
|
-
var PrimaryItemsContainer = function PrimaryItemsContainer(_ref) {
|
|
42
|
+
var PrimaryItemsContainer = exports.PrimaryItemsContainer = function PrimaryItemsContainer(_ref) {
|
|
43
43
|
var moreLabel = _ref.moreLabel,
|
|
44
44
|
items = _ref.items,
|
|
45
45
|
Create = _ref.create,
|
|
@@ -100,5 +100,4 @@ var PrimaryItemsContainer = function PrimaryItemsContainer(_ref) {
|
|
|
100
100
|
offscreen: true,
|
|
101
101
|
setWidth: updateWidth
|
|
102
102
|
})));
|
|
103
|
-
};
|
|
104
|
-
exports.PrimaryItemsContainer = PrimaryItemsContainer;
|
|
103
|
+
};
|
|
@@ -16,7 +16,7 @@ var primaryButtonSkeletonStyles = (0, _react2.css)({
|
|
|
16
16
|
|
|
17
17
|
// Internal only
|
|
18
18
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
19
|
-
var PrimaryItemsContainerSkeleton = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
19
|
+
var PrimaryItemsContainerSkeleton = exports.PrimaryItemsContainerSkeleton = /*#__PURE__*/(0, _react.memo)(function (_ref) {
|
|
20
20
|
var count = _ref.count;
|
|
21
21
|
return (0, _react2.jsx)(_react.Fragment, null, Array.from({
|
|
22
22
|
length: count
|
|
@@ -26,5 +26,4 @@ var PrimaryItemsContainerSkeleton = /*#__PURE__*/(0, _react.memo)(function (_ref
|
|
|
26
26
|
css: primaryButtonSkeletonStyles
|
|
27
27
|
});
|
|
28
28
|
}));
|
|
29
|
-
});
|
|
30
|
-
exports.PrimaryItemsContainerSkeleton = PrimaryItemsContainerSkeleton;
|
|
29
|
+
});
|
|
@@ -84,7 +84,7 @@ var MoreItemsPopup = function MoreItemsPopup(_ref) {
|
|
|
84
84
|
|
|
85
85
|
// Internal only
|
|
86
86
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
87
|
-
var PrimaryItemsContainer = /*#__PURE__*/(0, _react.memo)(function (_ref2) {
|
|
87
|
+
var PrimaryItemsContainer = exports.PrimaryItemsContainer = /*#__PURE__*/(0, _react.memo)(function (_ref2) {
|
|
88
88
|
var moreLabel = _ref2.moreLabel,
|
|
89
89
|
items = _ref2.items,
|
|
90
90
|
Create = _ref2.create,
|
|
@@ -185,5 +185,4 @@ var PrimaryItemsContainer = /*#__PURE__*/(0, _react.memo)(function (_ref2) {
|
|
|
185
185
|
moreLabel: moreLabel,
|
|
186
186
|
testId: testId
|
|
187
187
|
}))), Create && /*#__PURE__*/_react.default.createElement(Create, null));
|
|
188
|
-
});
|
|
189
|
-
exports.PrimaryItemsContainer = PrimaryItemsContainer;
|
|
188
|
+
});
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PrimarySplitButton = void 0;
|
|
7
|
+
var _react = require("@emotion/react");
|
|
8
|
+
var _unsafe = require("@atlaskit/button/unsafe");
|
|
9
|
+
/** @jsx jsx */
|
|
10
|
+
|
|
11
|
+
// Copied from packages/design-system/atlassian-navigation/src/components/PrimaryButton/index.tsx
|
|
12
|
+
var buttonBaseStyles = (0, _react.css)({
|
|
13
|
+
display: 'flex',
|
|
14
|
+
height: '100%',
|
|
15
|
+
position: 'relative',
|
|
16
|
+
alignItems: 'center',
|
|
17
|
+
justifyContent: 'center',
|
|
18
|
+
flexDirection: 'column'
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
// Mostly copied from packages/design-system/atlassian-navigation/src/components/PrimaryButton/index.tsx
|
|
22
|
+
var buttonHighlightedStyles = (0, _react.css)({
|
|
23
|
+
'&:after': {
|
|
24
|
+
height: 3,
|
|
25
|
+
position: 'absolute',
|
|
26
|
+
backgroundColor: "var(--ds-border-selected, #0052cc)",
|
|
27
|
+
borderStartEndRadius: "var(--ds-border-radius-050, 1px)",
|
|
28
|
+
borderStartStartRadius: "var(--ds-border-radius-050, 1px)",
|
|
29
|
+
content: '""',
|
|
30
|
+
insetBlockEnd: 0,
|
|
31
|
+
insetInlineEnd: "var(--ds-space-050, 4px)",
|
|
32
|
+
insetInlineStart: "var(--ds-space-050, 4px)"
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
/**
|
|
36
|
+
* TODO: Add JSDoc
|
|
37
|
+
*/
|
|
38
|
+
var PrimarySplitButton = exports.PrimarySplitButton = function PrimarySplitButton(_ref) {
|
|
39
|
+
var children = _ref.children,
|
|
40
|
+
_ref$isHighlighted = _ref.isHighlighted,
|
|
41
|
+
isHighlighted = _ref$isHighlighted === void 0 ? false : _ref$isHighlighted;
|
|
42
|
+
var _getActions = (0, _unsafe.UNSAFE_GET_ACTIONS)(children),
|
|
43
|
+
PrimaryAction = _getActions.PrimaryAction,
|
|
44
|
+
SecondaryAction = _getActions.SecondaryAction;
|
|
45
|
+
return (0, _react.jsx)("div", {
|
|
46
|
+
css: [buttonBaseStyles, isHighlighted && buttonHighlightedStyles]
|
|
47
|
+
}, (0, _react.jsx)(_unsafe.UNSAFE_SPLIT_BUTTON_CONTAINER, null, (0, _react.jsx)(_unsafe.UNSAFE_SPLIT_BUTTON_CONTEXT.Provider, {
|
|
48
|
+
value: {
|
|
49
|
+
appearance: 'navigation',
|
|
50
|
+
isHighlighted: isHighlighted
|
|
51
|
+
}
|
|
52
|
+
}, PrimaryAction, (0, _react.jsx)(_unsafe.UNSAFE_DIVIDER, {
|
|
53
|
+
appearance: "navigation",
|
|
54
|
+
spacing: "default",
|
|
55
|
+
isDisabled: false
|
|
56
|
+
}), SecondaryAction)));
|
|
57
|
+
};
|
|
@@ -156,5 +156,4 @@ var CustomProductHome = function CustomProductHome(props) {
|
|
|
156
156
|
"data-testid": testId && "".concat(testId, "-site-title")
|
|
157
157
|
}, siteTitle));
|
|
158
158
|
};
|
|
159
|
-
var _default = CustomProductHome;
|
|
160
|
-
exports.default = _default;
|
|
159
|
+
var _default = exports.default = CustomProductHome;
|
|
@@ -108,7 +108,7 @@ var siteTitleStyles = (0, _react2.css)({
|
|
|
108
108
|
|
|
109
109
|
// Not exported to consumers, only used in NavigationSkeleton
|
|
110
110
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
111
|
-
var ProductHomeSkeleton = function ProductHomeSkeleton(_ref) {
|
|
111
|
+
var ProductHomeSkeleton = exports.ProductHomeSkeleton = function ProductHomeSkeleton(_ref) {
|
|
112
112
|
var _productHomeButtonDyn;
|
|
113
113
|
var showSiteName = _ref.showSiteName;
|
|
114
114
|
var theme = (0, _theme.useTheme)();
|
|
@@ -131,5 +131,4 @@ var ProductHomeSkeleton = function ProductHomeSkeleton(_ref) {
|
|
|
131
131
|
style: siteTitleDynamicStyles,
|
|
132
132
|
css: siteTitleStyles
|
|
133
133
|
}));
|
|
134
|
-
};
|
|
135
|
-
exports.ProductHomeSkeleton = ProductHomeSkeleton;
|
|
134
|
+
};
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.getTag = void 0;
|
|
7
|
-
var getTag = function getTag(onClick, href) {
|
|
7
|
+
var getTag = exports.getTag = function getTag(onClick, href) {
|
|
8
8
|
if (href) {
|
|
9
9
|
return 'a';
|
|
10
10
|
}
|
|
@@ -12,5 +12,4 @@ var getTag = function getTag(onClick, href) {
|
|
|
12
12
|
return 'button';
|
|
13
13
|
}
|
|
14
14
|
return 'div';
|
|
15
|
-
};
|
|
16
|
-
exports.getTag = getTag;
|
|
15
|
+
};
|
|
@@ -14,10 +14,8 @@ var _IconButton = require("../IconButton");
|
|
|
14
14
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#profile)
|
|
15
15
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
16
16
|
*/
|
|
17
|
-
var Profile = _IconButton.IconButton;
|
|
17
|
+
var Profile = exports.Profile = _IconButton.IconButton;
|
|
18
18
|
|
|
19
19
|
// This exists only to extract props.
|
|
20
20
|
// eslint-disable-next-line @repo/internal/react/use-noop
|
|
21
|
-
exports.
|
|
22
|
-
var _default = function _default(props) {};
|
|
23
|
-
exports.default = _default;
|
|
21
|
+
var _default = exports.default = function _default(props) {};
|
|
@@ -9,11 +9,10 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _skeleton = require("../IconButton/skeleton");
|
|
10
10
|
// Not exported to consumers, only used in NavigationSkeleton
|
|
11
11
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
12
|
-
var ProfileSkeleton = function ProfileSkeleton() {
|
|
12
|
+
var ProfileSkeleton = exports.ProfileSkeleton = function ProfileSkeleton() {
|
|
13
13
|
return /*#__PURE__*/_react.default.createElement(_skeleton.IconButtonSkeleton, {
|
|
14
14
|
marginLeft: 6,
|
|
15
15
|
marginRight: 6,
|
|
16
16
|
size: 26
|
|
17
17
|
});
|
|
18
|
-
};
|
|
19
|
-
exports.ProfileSkeleton = ProfileSkeleton;
|
|
18
|
+
};
|
|
@@ -103,7 +103,7 @@ var SearchComponent = function SearchComponent(props) {
|
|
|
103
103
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#search)
|
|
104
104
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
105
105
|
*/
|
|
106
|
-
var Search = function Search(props) {
|
|
106
|
+
var Search = exports.Search = function Search(props) {
|
|
107
107
|
var placeholder = props.placeholder,
|
|
108
108
|
tooltip = props.tooltip,
|
|
109
109
|
label = props.label,
|
|
@@ -125,6 +125,4 @@ var Search = function Search(props) {
|
|
|
125
125
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
126
126
|
}, iconButtonProps)));
|
|
127
127
|
};
|
|
128
|
-
exports.
|
|
129
|
-
var _default = Search;
|
|
130
|
-
exports.default = _default;
|
|
128
|
+
var _default = exports.default = Search;
|
|
@@ -34,7 +34,7 @@ var searchIconStyles = (0, _react2.css)((0, _defineProperty2.default)({}, "@medi
|
|
|
34
34
|
|
|
35
35
|
// Not exported to consumers, only used in NavigationSkeleton
|
|
36
36
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
37
|
-
var SearchSkeleton = function SearchSkeleton() {
|
|
37
|
+
var SearchSkeleton = exports.SearchSkeleton = function SearchSkeleton() {
|
|
38
38
|
var theme = (0, _theme.useTheme)();
|
|
39
39
|
return (0, _react2.jsx)(_react.Fragment, null, (0, _react2.jsx)("div", {
|
|
40
40
|
css: searchInputContainerStyles
|
|
@@ -46,5 +46,4 @@ var SearchSkeleton = function SearchSkeleton() {
|
|
|
46
46
|
marginRight: 5,
|
|
47
47
|
size: 26
|
|
48
48
|
}));
|
|
49
|
-
};
|
|
50
|
-
exports.SearchSkeleton = SearchSkeleton;
|
|
49
|
+
};
|
|
@@ -22,7 +22,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
22
22
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#settings)
|
|
23
23
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
24
24
|
*/
|
|
25
|
-
var Settings = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
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
28
|
return /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, (0, _extends2.default)({
|
|
@@ -33,6 +33,4 @@ var Settings = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
33
33
|
tooltip: tooltip
|
|
34
34
|
}, iconButtonProps));
|
|
35
35
|
});
|
|
36
|
-
exports.
|
|
37
|
-
var _default = Settings;
|
|
38
|
-
exports.default = _default;
|
|
36
|
+
var _default = exports.default = Settings;
|
|
@@ -19,7 +19,7 @@ var _excluded = ["tooltip"];
|
|
|
19
19
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#sign-in)
|
|
20
20
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
21
21
|
*/
|
|
22
|
-
var SignIn = function SignIn(props) {
|
|
22
|
+
var SignIn = exports.SignIn = function SignIn(props) {
|
|
23
23
|
var tooltip = props.tooltip,
|
|
24
24
|
iconButtonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
25
25
|
return /*#__PURE__*/_react.default.createElement(_IconButton.IconButton, (0, _extends2.default)({
|
|
@@ -30,6 +30,4 @@ var SignIn = function SignIn(props) {
|
|
|
30
30
|
// eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
31
31
|
}, iconButtonProps));
|
|
32
32
|
};
|
|
33
|
-
exports.
|
|
34
|
-
var _default = SignIn;
|
|
35
|
-
exports.default = _default;
|
|
33
|
+
var _default = exports.default = SignIn;
|
|
@@ -9,11 +9,10 @@ var _react = _interopRequireDefault(require("react"));
|
|
|
9
9
|
var _skeleton = require("../IconButton/skeleton");
|
|
10
10
|
// Not exported to consumers, only used in NavigationSkeleton
|
|
11
11
|
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
12
|
-
var SignInSkeleton = function SignInSkeleton() {
|
|
12
|
+
var SignInSkeleton = exports.SignInSkeleton = function SignInSkeleton() {
|
|
13
13
|
return /*#__PURE__*/_react.default.createElement(_skeleton.IconButtonSkeleton, {
|
|
14
14
|
marginLeft: 6,
|
|
15
15
|
marginRight: 6,
|
|
16
16
|
size: 38
|
|
17
17
|
});
|
|
18
|
-
};
|
|
19
|
-
exports.SignInSkeleton = SignInSkeleton;
|
|
18
|
+
};
|
|
@@ -39,7 +39,7 @@ var skeletonCreateButtonStyles = (0, _react.css)({
|
|
|
39
39
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
40
40
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
41
41
|
*/
|
|
42
|
-
var SkeletonCreateButton = function SkeletonCreateButton(_ref) {
|
|
42
|
+
var SkeletonCreateButton = exports.SkeletonCreateButton = function SkeletonCreateButton(_ref) {
|
|
43
43
|
var text = _ref.text,
|
|
44
44
|
testId = _ref.testId;
|
|
45
45
|
var theme = (0, _theme.useTheme)();
|
|
@@ -49,5 +49,4 @@ var SkeletonCreateButton = function SkeletonCreateButton(_ref) {
|
|
|
49
49
|
"data-testid": testId,
|
|
50
50
|
type: "button"
|
|
51
51
|
}, text);
|
|
52
|
-
};
|
|
53
|
-
exports.SkeletonCreateButton = SkeletonCreateButton;
|
|
52
|
+
};
|
|
@@ -46,7 +46,7 @@ var skeletonIconButtonStyles = (0, _react.css)({
|
|
|
46
46
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
47
47
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
48
48
|
*/
|
|
49
|
-
var SkeletonIconButton = function SkeletonIconButton(_ref) {
|
|
49
|
+
var SkeletonIconButton = exports.SkeletonIconButton = function SkeletonIconButton(_ref) {
|
|
50
50
|
var children = _ref.children,
|
|
51
51
|
testId = _ref.testId;
|
|
52
52
|
var theme = (0, _theme.useTheme)();
|
|
@@ -56,5 +56,4 @@ var SkeletonIconButton = function SkeletonIconButton(_ref) {
|
|
|
56
56
|
css: skeletonIconButtonStyles,
|
|
57
57
|
type: "button"
|
|
58
58
|
}, children);
|
|
59
|
-
};
|
|
60
|
-
exports.SkeletonIconButton = SkeletonIconButton;
|
|
59
|
+
};
|
|
@@ -86,7 +86,7 @@ var isDropdownButtonStyles = (0, _react.css)({
|
|
|
86
86
|
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
87
87
|
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
88
88
|
*/
|
|
89
|
-
var SkeletonPrimaryButton = function SkeletonPrimaryButton(_ref) {
|
|
89
|
+
var SkeletonPrimaryButton = exports.SkeletonPrimaryButton = function SkeletonPrimaryButton(_ref) {
|
|
90
90
|
var _objectSpread2;
|
|
91
91
|
var _ref$isDropdownButton = _ref.isDropdownButton,
|
|
92
92
|
isDropdownButton = _ref$isDropdownButton === void 0 ? false : _ref$isDropdownButton,
|
|
@@ -106,5 +106,4 @@ var SkeletonPrimaryButton = function SkeletonPrimaryButton(_ref) {
|
|
|
106
106
|
css: [primaryButtonSkeletonStyles, isHighlighted && isHighlightedStyles, isDropdownButton && isDropdownButtonStyles, isHighlighted && (isDropdownButton ? isHighlightedAndDropdownButtonStyles : isHighlightedNotDropdownButtonStyles)],
|
|
107
107
|
"data-testid": testId
|
|
108
108
|
}, text || children);
|
|
109
|
-
};
|
|
110
|
-
exports.SkeletonPrimaryButton = SkeletonPrimaryButton;
|
|
109
|
+
};
|