@atlaskit/atlassian-navigation 2.2.3 → 2.2.6
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 +20 -0
- package/dist/cjs/components/AppSwitcher/index.js +10 -0
- package/dist/cjs/components/AtlassianNavigation/index.js +10 -1
- package/dist/cjs/components/AtlassianNavigation/skeleton.js +13 -0
- package/dist/cjs/components/BadgeContainer/index.js +2 -1
- package/dist/cjs/components/Create/index.js +14 -2
- package/dist/cjs/components/Create/skeleton.js +2 -1
- package/dist/cjs/components/Help/index.js +9 -0
- package/dist/cjs/components/IconButton/index.js +11 -1
- package/dist/cjs/components/IconButton/skeleton.js +2 -1
- package/dist/cjs/components/Notifications/index.js +10 -0
- package/dist/cjs/components/PrimaryButton/index.js +12 -1
- package/dist/cjs/components/PrimaryButton/skeleton.js +6 -8
- package/dist/cjs/components/PrimaryDropdownButton/index.js +10 -0
- package/dist/cjs/components/PrimaryItemsContainer/index.js +2 -1
- package/dist/cjs/components/PrimaryItemsContainer/skeleton.js +2 -1
- package/dist/cjs/components/ProductHome/custom-product-home.js +10 -1
- package/dist/cjs/components/ProductHome/product-home.js +17 -2
- package/dist/cjs/components/ProductHome/skeleton.js +2 -1
- package/dist/cjs/components/Profile/index.js +10 -0
- package/dist/cjs/components/Profile/skeleton.js +2 -0
- package/dist/cjs/components/Search/index.js +11 -1
- package/dist/cjs/components/Search/skeleton.js +2 -1
- package/dist/cjs/components/Settings/index.js +8 -0
- package/dist/cjs/components/SignIn/index.js +10 -1
- package/dist/cjs/components/SignIn/skeleton.js +2 -0
- package/dist/cjs/components/SkeletonCreateButton/index.js +12 -1
- package/dist/cjs/components/SkeletonIconButton/index.js +12 -1
- package/dist/cjs/components/SkeletonPrimaryButton/index.js +11 -0
- package/dist/cjs/controllers/overflow/index.js +14 -5
- package/dist/cjs/skeleton-help-button.js +10 -0
- package/dist/cjs/skeleton-notification-button.js +10 -0
- package/dist/cjs/skeleton-settings-button.js +10 -0
- package/dist/cjs/skeleton-switcher-button.js +10 -0
- package/dist/cjs/theme/{defaultTheme.js → default-theme.js} +1 -1
- package/dist/cjs/theme/index.js +5 -5
- package/dist/cjs/theme/{themeGenerator.js → theme-generator.js} +4 -3
- package/dist/cjs/theme/{themeHelpers.js → theme-helpers.js} +0 -0
- package/dist/cjs/theme/{ThemeProvider.js → theme-provider.js} +8 -0
- package/dist/cjs/theme/themes.js +2 -2
- package/dist/cjs/theme/{useTheme.js → use-theme.js} +2 -2
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/components/AppSwitcher/index.js +11 -0
- package/dist/es2019/components/AtlassianNavigation/index.js +11 -1
- package/dist/es2019/components/AtlassianNavigation/skeleton.js +14 -0
- package/dist/es2019/components/BadgeContainer/index.js +3 -1
- package/dist/es2019/components/Create/index.js +14 -2
- package/dist/es2019/components/Create/skeleton.js +3 -1
- package/dist/es2019/components/Help/index.js +9 -0
- package/dist/es2019/components/IconButton/index.js +12 -1
- package/dist/es2019/components/IconButton/skeleton.js +3 -1
- package/dist/es2019/components/Notifications/index.js +10 -0
- package/dist/es2019/components/PrimaryButton/index.js +12 -1
- package/dist/es2019/components/PrimaryButton/skeleton.js +7 -6
- package/dist/es2019/components/PrimaryDropdownButton/index.js +10 -0
- package/dist/es2019/components/PrimaryItemsContainer/index.js +3 -1
- package/dist/es2019/components/PrimaryItemsContainer/skeleton.js +3 -1
- package/dist/es2019/components/ProductHome/custom-product-home.js +10 -1
- package/dist/es2019/components/ProductHome/product-home.js +17 -2
- package/dist/es2019/components/ProductHome/skeleton.js +3 -1
- package/dist/es2019/components/Profile/index.js +11 -0
- package/dist/es2019/components/Profile/skeleton.js +3 -1
- package/dist/es2019/components/Search/index.js +11 -1
- package/dist/es2019/components/Search/skeleton.js +3 -1
- package/dist/es2019/components/Settings/index.js +9 -0
- package/dist/es2019/components/SignIn/index.js +11 -1
- package/dist/es2019/components/SignIn/skeleton.js +3 -1
- package/dist/es2019/components/SkeletonCreateButton/index.js +13 -1
- package/dist/es2019/components/SkeletonIconButton/index.js +13 -1
- package/dist/es2019/components/SkeletonPrimaryButton/index.js +12 -0
- package/dist/es2019/controllers/overflow/index.js +12 -3
- package/dist/es2019/skeleton-help-button.js +11 -0
- package/dist/es2019/skeleton-notification-button.js +11 -0
- package/dist/es2019/skeleton-settings-button.js +11 -0
- package/dist/es2019/skeleton-switcher-button.js +11 -0
- package/dist/es2019/theme/{defaultTheme.js → default-theme.js} +1 -1
- package/dist/es2019/theme/index.js +4 -4
- package/dist/es2019/theme/{themeGenerator.js → theme-generator.js} +4 -3
- package/dist/es2019/theme/{themeHelpers.js → theme-helpers.js} +0 -0
- package/dist/es2019/theme/theme-provider.js +12 -0
- package/dist/es2019/theme/themes.js +2 -2
- package/dist/es2019/theme/use-theme.js +3 -0
- package/dist/es2019/version.json +1 -1
- package/dist/esm/components/AppSwitcher/index.js +11 -0
- package/dist/esm/components/AtlassianNavigation/index.js +11 -1
- package/dist/esm/components/AtlassianNavigation/skeleton.js +14 -0
- package/dist/esm/components/BadgeContainer/index.js +3 -1
- package/dist/esm/components/Create/index.js +14 -2
- package/dist/esm/components/Create/skeleton.js +3 -1
- package/dist/esm/components/Help/index.js +9 -0
- package/dist/esm/components/IconButton/index.js +12 -1
- package/dist/esm/components/IconButton/skeleton.js +3 -1
- package/dist/esm/components/Notifications/index.js +10 -0
- package/dist/esm/components/PrimaryButton/index.js +12 -1
- package/dist/esm/components/PrimaryButton/skeleton.js +7 -6
- package/dist/esm/components/PrimaryDropdownButton/index.js +10 -0
- package/dist/esm/components/PrimaryItemsContainer/index.js +3 -1
- package/dist/esm/components/PrimaryItemsContainer/skeleton.js +3 -1
- package/dist/esm/components/ProductHome/custom-product-home.js +10 -1
- package/dist/esm/components/ProductHome/product-home.js +17 -2
- package/dist/esm/components/ProductHome/skeleton.js +3 -1
- package/dist/esm/components/Profile/index.js +11 -0
- package/dist/esm/components/Profile/skeleton.js +3 -1
- package/dist/esm/components/Search/index.js +11 -1
- package/dist/esm/components/Search/skeleton.js +3 -1
- package/dist/esm/components/Settings/index.js +9 -0
- package/dist/esm/components/SignIn/index.js +11 -1
- package/dist/esm/components/SignIn/skeleton.js +3 -1
- package/dist/esm/components/SkeletonCreateButton/index.js +13 -1
- package/dist/esm/components/SkeletonIconButton/index.js +13 -1
- package/dist/esm/components/SkeletonPrimaryButton/index.js +12 -0
- package/dist/esm/controllers/overflow/index.js +12 -3
- package/dist/esm/skeleton-help-button.js +11 -0
- package/dist/esm/skeleton-notification-button.js +11 -0
- package/dist/esm/skeleton-settings-button.js +11 -0
- package/dist/esm/skeleton-switcher-button.js +11 -0
- package/dist/esm/theme/{defaultTheme.js → default-theme.js} +1 -1
- package/dist/esm/theme/index.js +4 -4
- package/dist/esm/theme/{themeGenerator.js → theme-generator.js} +4 -3
- package/dist/esm/theme/{themeHelpers.js → theme-helpers.js} +0 -0
- package/dist/esm/theme/theme-provider.js +12 -0
- package/dist/esm/theme/themes.js +2 -2
- package/dist/esm/theme/{useTheme.js → use-theme.js} +1 -1
- package/dist/esm/version.json +1 -1
- package/dist/types/components/AppSwitcher/index.d.ts +9 -0
- package/dist/types/components/AtlassianNavigation/index.d.ts +8 -0
- package/dist/types/components/AtlassianNavigation/skeleton.d.ts +13 -0
- package/dist/types/components/Create/index.d.ts +9 -0
- package/dist/types/components/Create/types.d.ts +2 -2
- package/dist/types/components/Help/index.d.ts +8 -0
- package/dist/types/components/IconButton/index.d.ts +9 -0
- package/dist/types/components/IconButton/types.d.ts +14 -14
- package/dist/types/components/Notifications/index.d.ts +9 -0
- package/dist/types/components/PrimaryButton/index.d.ts +9 -0
- package/dist/types/components/PrimaryButton/types.d.ts +14 -14
- package/dist/types/components/PrimaryDropdownButton/index.d.ts +9 -0
- package/dist/types/components/ProductHome/custom-product-home.d.ts +8 -0
- package/dist/types/components/ProductHome/product-home.d.ts +11 -0
- package/dist/types/components/Profile/index.d.ts +9 -0
- package/dist/types/components/Search/index.d.ts +8 -0
- package/dist/types/components/Settings/index.d.ts +8 -0
- package/dist/types/components/SignIn/index.d.ts +8 -0
- package/dist/types/components/SkeletonCreateButton/index.d.ts +10 -0
- package/dist/types/components/SkeletonIconButton/index.d.ts +10 -0
- package/dist/types/components/SkeletonPrimaryButton/index.d.ts +10 -0
- package/dist/types/controllers/overflow/index.d.ts +17 -4
- package/dist/types/skeleton-help-button.d.ts +10 -0
- package/dist/types/skeleton-notification-button.d.ts +10 -0
- package/dist/types/skeleton-settings-button.d.ts +10 -0
- package/dist/types/skeleton-switcher-button.d.ts +10 -0
- package/dist/types/theme/{defaultTheme.d.ts → default-theme.d.ts} +0 -0
- package/dist/types/theme/index.d.ts +4 -4
- package/dist/types/theme/{themeGenerator.d.ts → theme-generator.d.ts} +0 -0
- package/dist/types/theme/{themeHelpers.d.ts → theme-helpers.d.ts} +0 -0
- package/dist/types/theme/{ThemeProvider.d.ts → theme-provider.d.ts} +5 -0
- package/dist/types/theme/{useTheme.d.ts → use-theme.d.ts} +0 -0
- package/docs/01-intro.tsx +2 -2
- package/docs/02-atlassian-navigation.tsx +2 -2
- package/docs/03-product-home.tsx +4 -4
- package/docs/04-app-switcher.tsx +2 -2
- package/docs/05-create.tsx +4 -4
- package/docs/06-primary-actions.tsx +4 -4
- package/docs/07-secondary-actions.tsx +2 -2
- package/docs/97-theming.tsx +1 -1
- package/package.json +9 -5
- package/report.api.md +637 -0
- package/dist/es2019/theme/ThemeProvider.js +0 -4
- package/dist/es2019/theme/useTheme.js +0 -3
- package/dist/esm/theme/ThemeProvider.js +0 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @atlaskit/atlassian-navigation
|
|
2
2
|
|
|
3
|
+
## 2.2.6
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`95c1a5e91d1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/95c1a5e91d1) - Internal code change turning on new linting rules.
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
10
|
+
## 2.2.5
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- [`deeaf03eb21`](https://bitbucket.org/atlassian/atlassian-frontend/commits/deeaf03eb21) - Fix an issue where ProductHome rendered incorrectly in Safari
|
|
15
|
+
|
|
16
|
+
## 2.2.4
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- [`416570be6bf`](https://bitbucket.org/atlassian/atlassian-frontend/commits/416570be6bf) - Small update to styles to account for change in `@atlaskit/logo`.
|
|
21
|
+
- Updated dependencies
|
|
22
|
+
|
|
3
23
|
## 2.2.3
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
|
@@ -25,6 +25,15 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* _App switcher__
|
|
30
|
+
*
|
|
31
|
+
* An AppSwitcher button that can be passed into `AtlassianNavigation`'s
|
|
32
|
+
* `renderAppSwitcher` prop.
|
|
33
|
+
*
|
|
34
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#app-switcher)
|
|
35
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
36
|
+
*/
|
|
28
37
|
var AppSwitcher = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
29
38
|
var tooltip = props.tooltip,
|
|
30
39
|
iconButtonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
@@ -36,6 +45,7 @@ var AppSwitcher = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
36
45
|
ref: ref
|
|
37
46
|
}, iconButtonProps));
|
|
38
47
|
}); // exists only to extract props
|
|
48
|
+
// eslint-disable-next-line @repo/internal/react/use-noop
|
|
39
49
|
|
|
40
50
|
exports.AppSwitcher = AppSwitcher;
|
|
41
51
|
|
|
@@ -77,6 +77,14 @@ var analyticsData = {
|
|
|
77
77
|
},
|
|
78
78
|
componentName: 'atlassianNavigation'
|
|
79
79
|
};
|
|
80
|
+
/**
|
|
81
|
+
* __Atlassian navigation__
|
|
82
|
+
*
|
|
83
|
+
* The horizontal navigation component for Atlassian products.
|
|
84
|
+
*
|
|
85
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples)
|
|
86
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/examples)
|
|
87
|
+
*/
|
|
80
88
|
|
|
81
89
|
var AtlassianNavigation = function AtlassianNavigation(props) {
|
|
82
90
|
var label = props.label,
|
|
@@ -112,7 +120,8 @@ var AtlassianNavigation = function AtlassianNavigation(props) {
|
|
|
112
120
|
testId: testId,
|
|
113
121
|
moreLabel: moreLabel,
|
|
114
122
|
items: primaryItems,
|
|
115
|
-
create: create
|
|
123
|
+
create: create // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
124
|
+
,
|
|
116
125
|
theme: theme
|
|
117
126
|
})), (0, _core.jsx)("div", {
|
|
118
127
|
css: rightStyles,
|
|
@@ -77,6 +77,19 @@ var rightStyles = (0, _core.css)({
|
|
|
77
77
|
flexShrink: 0
|
|
78
78
|
}
|
|
79
79
|
});
|
|
80
|
+
/**
|
|
81
|
+
* __Navigation skeleton__
|
|
82
|
+
*
|
|
83
|
+
* Use loading skeletons to reduce the perceived loading time of heavier
|
|
84
|
+
* full-page experiences. This should only be used when the whole navigation is
|
|
85
|
+
* delayed; if there are only certain dynamically loaded navigation items that
|
|
86
|
+
* slow down the page, you should look into using
|
|
87
|
+
* [skeleton buttons](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
88
|
+
* instead.
|
|
89
|
+
*
|
|
90
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-loader)
|
|
91
|
+
* - [Code](https://atlassian.design/components/{packageName}/code)
|
|
92
|
+
*/
|
|
80
93
|
|
|
81
94
|
var NavigationSkeleton = function NavigationSkeleton(_ref) {
|
|
82
95
|
var _ref$primaryItemsCoun = _ref.primaryItemsCount,
|
|
@@ -16,7 +16,8 @@ var badgeContainerStyles = (0, _core.css)({
|
|
|
16
16
|
});
|
|
17
17
|
var containerStyles = (0, _core.css)({
|
|
18
18
|
position: 'relative'
|
|
19
|
-
});
|
|
19
|
+
}); // Not exported to consumers
|
|
20
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
20
21
|
|
|
21
22
|
var BadgeContainer = function BadgeContainer(props) {
|
|
22
23
|
var badgeId = props.id,
|
|
@@ -53,6 +53,16 @@ var TooltipSwitch = function TooltipSwitch(_ref) {
|
|
|
53
53
|
hideTooltipOnClick: true
|
|
54
54
|
}, children) : (0, _core.jsx)(_react.Fragment, null, children);
|
|
55
55
|
};
|
|
56
|
+
/**
|
|
57
|
+
* _Create__
|
|
58
|
+
*
|
|
59
|
+
* A call to action button that can be passed into `AtlassianNavigation`'s
|
|
60
|
+
* `renderCreate` prop. It is shown after all other primary buttons.
|
|
61
|
+
*
|
|
62
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#create)
|
|
63
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
64
|
+
*/
|
|
65
|
+
|
|
56
66
|
|
|
57
67
|
var Create = function Create(_ref2) {
|
|
58
68
|
var onClick = _ref2.onClick,
|
|
@@ -70,7 +80,8 @@ var Create = function Create(_ref2) {
|
|
|
70
80
|
}, (0, _core.jsx)(_customThemeButton.default, {
|
|
71
81
|
id: "createGlobalItem",
|
|
72
82
|
onClick: onClick,
|
|
73
|
-
href: href
|
|
83
|
+
href: href // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
84
|
+
,
|
|
74
85
|
theme: (0, _styles.getCreateButtonTheme)(theme),
|
|
75
86
|
testId: testId && "".concat(testId, "-button"),
|
|
76
87
|
"data-hide-on-smallscreens": true
|
|
@@ -82,7 +93,8 @@ var Create = function Create(_ref2) {
|
|
|
82
93
|
}),
|
|
83
94
|
onClick: onClick,
|
|
84
95
|
href: href,
|
|
85
|
-
tooltip: iconButtonTooltip
|
|
96
|
+
tooltip: iconButtonTooltip // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
97
|
+
,
|
|
86
98
|
theme: (0, _styles.getCreateButtonTheme)(theme),
|
|
87
99
|
"aria-label": text,
|
|
88
100
|
"data-hide-on-largescreens": true
|
|
@@ -30,7 +30,8 @@ var skeletonStyles = (0, _core.css)({
|
|
|
30
30
|
});
|
|
31
31
|
var mobileStyles = (0, _core.css)((0, _defineProperty2.default)({}, "@media (max-width: ".concat(_constants.CREATE_BREAKPOINT - 1, "px)"), {
|
|
32
32
|
display: 'none !important'
|
|
33
|
-
}));
|
|
33
|
+
})); // Not exported to consumers, only used in NavigationSkeleton
|
|
34
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
34
35
|
|
|
35
36
|
var CreateSkeleton = function CreateSkeleton() {
|
|
36
37
|
var theme = (0, _theme.useTheme)();
|
|
@@ -30,6 +30,15 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
30
30
|
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; }
|
|
31
31
|
|
|
32
32
|
var HELP_NOTIFICATION_BADGE_ID = 'atlassian-navigation-help-notification-count';
|
|
33
|
+
/**
|
|
34
|
+
* __Help__
|
|
35
|
+
*
|
|
36
|
+
* A help button that can be passed into `AtlassianNavigation`'s `renderHelp` prop.
|
|
37
|
+
*
|
|
38
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#help)
|
|
39
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
40
|
+
*/
|
|
41
|
+
|
|
33
42
|
var Help = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
34
43
|
var badge = props.badge,
|
|
35
44
|
tooltip = props.tooltip,
|
|
@@ -29,6 +29,15 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
29
29
|
|
|
30
30
|
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; }
|
|
31
31
|
|
|
32
|
+
/**
|
|
33
|
+
* __Icon button__
|
|
34
|
+
*
|
|
35
|
+
* An icon button is used to create navigation items such as Help, Settings
|
|
36
|
+
* and Notifications. You can use this component to create your own items to
|
|
37
|
+
* pass into `AtlassianNavigation`'s render props, but where possible you should
|
|
38
|
+
* rely on the defaults.
|
|
39
|
+
*
|
|
40
|
+
*/
|
|
32
41
|
var IconButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
33
42
|
var icon = props.icon,
|
|
34
43
|
testId = props.testId,
|
|
@@ -40,7 +49,8 @@ var IconButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
40
49
|
appearance: "primary",
|
|
41
50
|
testId: testId,
|
|
42
51
|
iconBefore: icon,
|
|
43
|
-
ref: ref
|
|
52
|
+
ref: ref // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
53
|
+
,
|
|
44
54
|
theme: (0, _styles.getIconButtonTheme)(theme)
|
|
45
55
|
}, buttonProps));
|
|
46
56
|
|
|
@@ -23,7 +23,8 @@ var buttonHeight = _constants.gridSize * 4;
|
|
|
23
23
|
var skeletonStyles = (0, _core.css)({
|
|
24
24
|
borderRadius: '50%',
|
|
25
25
|
opacity: 0.15
|
|
26
|
-
});
|
|
26
|
+
}); // Not exported to consumers, only used in NavigationSkeleton
|
|
27
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
27
28
|
|
|
28
29
|
var IconButtonSkeleton = function IconButtonSkeleton(_ref) {
|
|
29
30
|
var className = _ref.className,
|
|
@@ -28,6 +28,16 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
28
28
|
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; }
|
|
29
29
|
|
|
30
30
|
var NOTIFICATIONS_BADGE_ID = 'atlassian-navigation-notification-count';
|
|
31
|
+
/**
|
|
32
|
+
* __Notifications__
|
|
33
|
+
*
|
|
34
|
+
* A notifications button that can be passed into `AtlassianNavigation`'s
|
|
35
|
+
* `renderNotifications` prop.
|
|
36
|
+
*
|
|
37
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#notifications)
|
|
38
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
39
|
+
*/
|
|
40
|
+
|
|
31
41
|
var Notifications = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
32
42
|
var badge = props.badge,
|
|
33
43
|
tooltip = props.tooltip,
|
|
@@ -55,6 +55,16 @@ var buttonHighlightedStyles = (0, _core.css)({
|
|
|
55
55
|
content: '""'
|
|
56
56
|
}
|
|
57
57
|
});
|
|
58
|
+
/**
|
|
59
|
+
* __Primary button__
|
|
60
|
+
*
|
|
61
|
+
* A primary button allows you to add top-level navigation items.
|
|
62
|
+
* Should be passed into `AtlassianNavigation`'s `primaryItems` prop.
|
|
63
|
+
*
|
|
64
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#dropdown-menu)
|
|
65
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
66
|
+
*/
|
|
67
|
+
|
|
58
68
|
var PrimaryButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
59
69
|
var _ref;
|
|
60
70
|
|
|
@@ -72,7 +82,8 @@ var PrimaryButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
72
82
|
appearance: "primary",
|
|
73
83
|
testId: testId,
|
|
74
84
|
ref: ref,
|
|
75
|
-
isSelected: isSelected
|
|
85
|
+
isSelected: isSelected // eslint-disable-next-line @repo/internal/react/no-unsafe-overrides
|
|
86
|
+
,
|
|
76
87
|
theme: (0, _styles.getPrimaryButtonTheme)(theme)
|
|
77
88
|
}, buttonProps), children));
|
|
78
89
|
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.PrimaryButtonSkeleton = void 0;
|
|
9
7
|
|
|
10
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
11
|
-
|
|
12
8
|
var _core = require("@emotion/core");
|
|
13
9
|
|
|
14
10
|
var _constants = require("../../common/constants");
|
|
@@ -23,14 +19,16 @@ var skeletonStyles = (0, _core.css)({
|
|
|
23
19
|
height: "".concat(_constants.buttonHeight - paddingAll * 2.5, "px"),
|
|
24
20
|
borderRadius: "".concat(_constants.gridSize / 2, "px"),
|
|
25
21
|
opacity: 0.15
|
|
26
|
-
});
|
|
22
|
+
}); // Not exported to consumers, only used in NavigationSkeleton
|
|
23
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
27
24
|
|
|
28
25
|
var PrimaryButtonSkeleton = function PrimaryButtonSkeleton(props) {
|
|
29
26
|
var theme = (0, _theme.useTheme)();
|
|
30
|
-
return (0, _core.jsx)("div",
|
|
27
|
+
return (0, _core.jsx)("div", {
|
|
31
28
|
style: theme.mode.skeleton,
|
|
32
|
-
css: skeletonStyles
|
|
33
|
-
|
|
29
|
+
css: skeletonStyles,
|
|
30
|
+
className: props.className
|
|
31
|
+
});
|
|
34
32
|
};
|
|
35
33
|
|
|
36
34
|
exports.PrimaryButtonSkeleton = PrimaryButtonSkeleton;
|
|
@@ -23,6 +23,16 @@ var chevronIconStyles = (0, _core.css)({
|
|
|
23
23
|
marginLeft: '-8px',
|
|
24
24
|
opacity: 0.51
|
|
25
25
|
});
|
|
26
|
+
/**
|
|
27
|
+
* __Primary dropdown button__
|
|
28
|
+
*
|
|
29
|
+
* A primary dropdown button allows you to add dropdown menus to the navigation.
|
|
30
|
+
* Should be passed into `AtlassianNavigation`'s `primaryItems` prop.
|
|
31
|
+
*
|
|
32
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#button)
|
|
33
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
34
|
+
*/
|
|
35
|
+
|
|
26
36
|
var PrimaryDropdownButton = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
27
37
|
return (0, _core.jsx)(_PrimaryButton.PrimaryButton, (0, _extends2.default)({
|
|
28
38
|
iconAfter: (0, _core.jsx)("span", {
|
|
@@ -46,7 +46,8 @@ var widthObserverContainerStyles = (0, _core.css)({
|
|
|
46
46
|
margin: '0px',
|
|
47
47
|
position: 'relative',
|
|
48
48
|
flexShrink: 1
|
|
49
|
-
});
|
|
49
|
+
}); // Internal only
|
|
50
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
50
51
|
|
|
51
52
|
var PrimaryItemsContainer = function PrimaryItemsContainer(_ref) {
|
|
52
53
|
var moreLabel = _ref.moreLabel,
|
|
@@ -17,7 +17,8 @@ var _skeleton = require("../PrimaryButton/skeleton");
|
|
|
17
17
|
var primaryButtonSkeletonStyles = (0, _core.css)({
|
|
18
18
|
marginRight: _constants.gridSize * 1.5,
|
|
19
19
|
marginLeft: _constants.gridSize * 1.5
|
|
20
|
-
});
|
|
20
|
+
}); // Internal only
|
|
21
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
21
22
|
|
|
22
23
|
var PrimaryItemsContainerSkeleton = function PrimaryItemsContainerSkeleton(_ref) {
|
|
23
24
|
var count = _ref.count;
|
|
@@ -100,6 +100,14 @@ var siteTitleStyles = (0, _core.css)({
|
|
|
100
100
|
paddingRight: _constants.gridSize * 2,
|
|
101
101
|
alignItems: 'center'
|
|
102
102
|
});
|
|
103
|
+
/**
|
|
104
|
+
* __Custom product home__
|
|
105
|
+
*
|
|
106
|
+
* Use `CustomProductHome` to provide a custom logo and icon with URLs.
|
|
107
|
+
*
|
|
108
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#custom-product-home)
|
|
109
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
110
|
+
*/
|
|
103
111
|
|
|
104
112
|
var CustomProductHome = function CustomProductHome(props) {
|
|
105
113
|
var _productHomeButtonDyn;
|
|
@@ -132,7 +140,8 @@ var CustomProductHome = function CustomProductHome(props) {
|
|
|
132
140
|
css: productHomeButtonStyles,
|
|
133
141
|
onClick: onClick,
|
|
134
142
|
onMouseDown: preventFocusRing,
|
|
135
|
-
"data-testid": testId && "".concat(testId, "-container")
|
|
143
|
+
"data-testid": testId && "".concat(testId, "-container") // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
144
|
+
|
|
136
145
|
}, rest), logoUrl && (0, _core.jsx)("img", {
|
|
137
146
|
style: {
|
|
138
147
|
maxWidth: logoMaxWidth
|
|
@@ -84,8 +84,11 @@ var productLogoStyles = (0, _core.css)((0, _defineProperty2.default)({
|
|
|
84
84
|
maxWidth: "var(".concat(VAR_LOGO_MAX_WIDTH, ")"),
|
|
85
85
|
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
86
86
|
'& > *': {
|
|
87
|
-
maxWidth: "var(".concat(VAR_LOGO_MAX_WIDTH, ")"),
|
|
88
87
|
maxHeight: 24
|
|
88
|
+
},
|
|
89
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
90
|
+
'& > span > svg': {
|
|
91
|
+
maxWidth: "var(".concat(VAR_LOGO_MAX_WIDTH, ")")
|
|
89
92
|
}
|
|
90
93
|
}, "@media (max-width: ".concat(_constants.PRODUCT_HOME_BREAKPOINT - 0.1, "px)"), {
|
|
91
94
|
display: 'none'
|
|
@@ -111,6 +114,17 @@ var siteTitleStyles = (0, _core.css)({
|
|
|
111
114
|
paddingRight: _constants.gridSize * 2,
|
|
112
115
|
alignItems: 'center'
|
|
113
116
|
});
|
|
117
|
+
/**
|
|
118
|
+
* __Product home__
|
|
119
|
+
*
|
|
120
|
+
* The ProductHome component displays the product visual identity composed of:
|
|
121
|
+
* logo, icon, and optional text. Values for logo and icon are never displayed
|
|
122
|
+
* at the same time, where icon is used only when space is restricted. Should be
|
|
123
|
+
* passed into `AtlassianNavigation`'s `renderProductHome` prop.
|
|
124
|
+
*
|
|
125
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#product-home)
|
|
126
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
127
|
+
*/
|
|
114
128
|
|
|
115
129
|
var ProductHome = function ProductHome(_ref) {
|
|
116
130
|
var _productHomeButtonDyn;
|
|
@@ -150,7 +164,8 @@ var ProductHome = function ProductHome(_ref) {
|
|
|
150
164
|
href: href,
|
|
151
165
|
onClick: onClick,
|
|
152
166
|
onMouseDown: preventFocusRing,
|
|
153
|
-
"data-testid": testId && "".concat(testId, "-container")
|
|
167
|
+
"data-testid": testId && "".concat(testId, "-container") // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
168
|
+
|
|
154
169
|
}, rest), (0, _core.jsx)("div", {
|
|
155
170
|
css: [customMaxHeightStyles, productLogoStyles],
|
|
156
171
|
"data-testid": testId && "".concat(testId, "-logo")
|
|
@@ -111,7 +111,8 @@ var siteTitleStyles = (0, _core.css)({
|
|
|
111
111
|
borderRadius: 4,
|
|
112
112
|
content: '""'
|
|
113
113
|
}
|
|
114
|
-
});
|
|
114
|
+
}); // Not exported to consumers, only used in NavigationSkeleton
|
|
115
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
115
116
|
|
|
116
117
|
var ProductHomeSkeleton = function ProductHomeSkeleton(_ref) {
|
|
117
118
|
var _productHomeButtonDyn;
|
|
@@ -7,7 +7,17 @@ exports.default = exports.Profile = void 0;
|
|
|
7
7
|
|
|
8
8
|
var _IconButton = require("../IconButton");
|
|
9
9
|
|
|
10
|
+
/**
|
|
11
|
+
* __Profile__
|
|
12
|
+
*
|
|
13
|
+
* A profile button which takes an icon/avatar component can be that can be
|
|
14
|
+
* passed into `AtlassianNavigation`'s `renderProfile` prop.
|
|
15
|
+
*
|
|
16
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#profile)
|
|
17
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
18
|
+
*/
|
|
10
19
|
var Profile = _IconButton.IconButton; // This exists only to extract props.
|
|
20
|
+
// eslint-disable-next-line @repo/internal/react/use-noop
|
|
11
21
|
|
|
12
22
|
exports.Profile = Profile;
|
|
13
23
|
|
|
@@ -13,6 +13,8 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
13
13
|
|
|
14
14
|
var _skeleton = require("../IconButton/skeleton");
|
|
15
15
|
|
|
16
|
+
// Not exported to consumers, only used in NavigationSkeleton
|
|
17
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
16
18
|
var ProfileSkeleton = function ProfileSkeleton() {
|
|
17
19
|
return /*#__PURE__*/_react.default.createElement(_skeleton.IconButtonSkeleton, {
|
|
18
20
|
marginLeft: 6,
|
|
@@ -102,6 +102,15 @@ var SearchComponent = function SearchComponent(props) {
|
|
|
102
102
|
value: value
|
|
103
103
|
}));
|
|
104
104
|
};
|
|
105
|
+
/**
|
|
106
|
+
* __Search__
|
|
107
|
+
*
|
|
108
|
+
* A search input that can be passed into `AtlassianNavigation`'s `renderSearch` prop.
|
|
109
|
+
*
|
|
110
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#search)
|
|
111
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
112
|
+
*/
|
|
113
|
+
|
|
105
114
|
|
|
106
115
|
var Search = function Search(props) {
|
|
107
116
|
var placeholder = props.placeholder,
|
|
@@ -119,7 +128,8 @@ var Search = function Search(props) {
|
|
|
119
128
|
icon: (0, _core.jsx)(_search.default, {
|
|
120
129
|
label: label
|
|
121
130
|
}),
|
|
122
|
-
tooltip: tooltip
|
|
131
|
+
tooltip: tooltip // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
132
|
+
|
|
123
133
|
}, iconButtonProps)));
|
|
124
134
|
};
|
|
125
135
|
|
|
@@ -37,7 +37,8 @@ var searchInputSkeletonStyles = (0, _core.css)({
|
|
|
37
37
|
});
|
|
38
38
|
var searchIconStyles = (0, _core.css)((0, _defineProperty2.default)({}, "@media (min-width: ".concat(_constants.CREATE_BREAKPOINT, "px)"), {
|
|
39
39
|
display: 'none !important'
|
|
40
|
-
}));
|
|
40
|
+
})); // Not exported to consumers, only used in NavigationSkeleton
|
|
41
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
41
42
|
|
|
42
43
|
var SearchSkeleton = function SearchSkeleton() {
|
|
43
44
|
var theme = (0, _theme.useTheme)();
|
|
@@ -25,6 +25,14 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
|
|
|
25
25
|
|
|
26
26
|
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; }
|
|
27
27
|
|
|
28
|
+
/**
|
|
29
|
+
* __Settings__
|
|
30
|
+
*
|
|
31
|
+
* A settings button that can be passed into `AtlassianNavigation`'s `renderSettings` prop.
|
|
32
|
+
*
|
|
33
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#settings)
|
|
34
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
35
|
+
*/
|
|
28
36
|
var Settings = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
29
37
|
var tooltip = props.tooltip,
|
|
30
38
|
iconButtonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
@@ -19,6 +19,14 @@ var _IconButton = require("../IconButton");
|
|
|
19
19
|
|
|
20
20
|
var _excluded = ["tooltip"];
|
|
21
21
|
|
|
22
|
+
/**
|
|
23
|
+
* __Sign in__
|
|
24
|
+
*
|
|
25
|
+
* A sign-in button that can be passed into `AtlassianNavigation`'s `renderSignIn` prop.
|
|
26
|
+
*
|
|
27
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#sign-in)
|
|
28
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
29
|
+
*/
|
|
22
30
|
var SignIn = function SignIn(props) {
|
|
23
31
|
var tooltip = props.tooltip,
|
|
24
32
|
iconButtonProps = (0, _objectWithoutProperties2.default)(props, _excluded);
|
|
@@ -26,7 +34,8 @@ var SignIn = function SignIn(props) {
|
|
|
26
34
|
icon: /*#__PURE__*/_react.default.createElement(_signIn.default, {
|
|
27
35
|
label: typeof tooltip === 'string' ? tooltip : 'Sign-in Icon'
|
|
28
36
|
}),
|
|
29
|
-
tooltip: tooltip
|
|
37
|
+
tooltip: tooltip // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
|
|
38
|
+
|
|
30
39
|
}, iconButtonProps));
|
|
31
40
|
};
|
|
32
41
|
|
|
@@ -13,6 +13,8 @@ var _constants = require("@atlaskit/theme/constants");
|
|
|
13
13
|
|
|
14
14
|
var _skeleton = require("../IconButton/skeleton");
|
|
15
15
|
|
|
16
|
+
// Not exported to consumers, only used in NavigationSkeleton
|
|
17
|
+
// eslint-disable-next-line @repo/internal/react/require-jsdoc
|
|
16
18
|
var SignInSkeleton = function SignInSkeleton() {
|
|
17
19
|
return /*#__PURE__*/_react.default.createElement(_skeleton.IconButtonSkeleton, {
|
|
18
20
|
marginLeft: 6,
|
|
@@ -30,6 +30,16 @@ var skeletonCreateButtonStyles = (0, _core.css)({
|
|
|
30
30
|
marginLeft: 12
|
|
31
31
|
}
|
|
32
32
|
});
|
|
33
|
+
/**
|
|
34
|
+
* __Skeleton create button__
|
|
35
|
+
*
|
|
36
|
+
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
37
|
+
* their heavier interactive counterparts, for use when elements of the
|
|
38
|
+
* navigation are loaded dynamically. This one represents the Create button.
|
|
39
|
+
*
|
|
40
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
41
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
42
|
+
*/
|
|
33
43
|
|
|
34
44
|
var SkeletonCreateButton = function SkeletonCreateButton(_ref) {
|
|
35
45
|
var text = _ref.text,
|
|
@@ -38,7 +48,8 @@ var SkeletonCreateButton = function SkeletonCreateButton(_ref) {
|
|
|
38
48
|
return (0, _core.jsx)("button", {
|
|
39
49
|
style: theme.mode.create.default,
|
|
40
50
|
css: skeletonCreateButtonStyles,
|
|
41
|
-
"data-testid": testId
|
|
51
|
+
"data-testid": testId,
|
|
52
|
+
type: "button"
|
|
42
53
|
}, text);
|
|
43
54
|
};
|
|
44
55
|
|
|
@@ -37,6 +37,16 @@ var skeletonIconButtonStyles = (0, _core.css)({
|
|
|
37
37
|
verticalAlign: 'middle'
|
|
38
38
|
}
|
|
39
39
|
});
|
|
40
|
+
/**
|
|
41
|
+
* __Skeleton icon button__
|
|
42
|
+
*
|
|
43
|
+
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
44
|
+
* their heavier interactive counterparts, for use when elements of the
|
|
45
|
+
* navigation are loaded dynamically. This one represents a generic icon button.
|
|
46
|
+
*
|
|
47
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
48
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
49
|
+
*/
|
|
40
50
|
|
|
41
51
|
var SkeletonIconButton = function SkeletonIconButton(_ref) {
|
|
42
52
|
var children = _ref.children,
|
|
@@ -45,7 +55,8 @@ var SkeletonIconButton = function SkeletonIconButton(_ref) {
|
|
|
45
55
|
return (0, _core.jsx)("button", {
|
|
46
56
|
style: theme.mode.iconButton.default,
|
|
47
57
|
"data-testid": testId,
|
|
48
|
-
css: skeletonIconButtonStyles
|
|
58
|
+
css: skeletonIconButtonStyles,
|
|
59
|
+
type: "button"
|
|
49
60
|
}, children);
|
|
50
61
|
};
|
|
51
62
|
|
|
@@ -80,6 +80,16 @@ var isDropdownButtonStyles = (0, _core.css)({
|
|
|
80
80
|
verticalAlign: 'middle'
|
|
81
81
|
}
|
|
82
82
|
});
|
|
83
|
+
/**
|
|
84
|
+
* __Skeleton primary button__
|
|
85
|
+
*
|
|
86
|
+
* Skeleton buttons are lightweight HTML button elements with CSS that represent
|
|
87
|
+
* their heavier interactive counterparts, for use when elements of the
|
|
88
|
+
* navigation are loaded dynamically. This one represents a primary button.
|
|
89
|
+
*
|
|
90
|
+
* - [Examples](https://atlassian.design/components/atlassian-navigation/examples#skeleton-button)
|
|
91
|
+
* - [Code](https://atlassian.design/components/atlassian-navigation/code)
|
|
92
|
+
*/
|
|
83
93
|
|
|
84
94
|
var SkeletonPrimaryButton = function SkeletonPrimaryButton(_ref) {
|
|
85
95
|
var _objectSpread2;
|
|
@@ -99,6 +109,7 @@ var SkeletonPrimaryButton = function SkeletonPrimaryButton(_ref) {
|
|
|
99
109
|
}), {}, (_objectSpread2 = {}, (0, _defineProperty2.default)(_objectSpread2, VAR_PRIMARY_BUTTON_BEFORE_HIGHLIGHTED_BACKGROUND_COLOR, primaryButton.selected.borderColor), (0, _defineProperty2.default)(_objectSpread2, VAR_PRIMARY_BUTTON_AFTER_DROPDOWN_BORDER_COLOR, isHighlighted ? primaryButton.default.borderColor : primaryButton.default.color), _objectSpread2));
|
|
100
110
|
|
|
101
111
|
return (0, _core.jsx)("button", {
|
|
112
|
+
type: "button",
|
|
102
113
|
style: dynamicStyles,
|
|
103
114
|
css: [primaryButtonSkeletonStyles, isHighlighted && isHighlightedStyles, isDropdownButton && isDropdownButtonStyles, isHighlighted && (isDropdownButton ? isHighlightedAndDropdownButtonStyles : isHighlightedNotDropdownButtonStyles)],
|
|
104
115
|
"data-testid": testId
|