@atlaskit/atlassian-navigation 2.1.0 → 2.1.3
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 +21 -0
- package/dist/cjs/common/constants.js +10 -1
- package/dist/cjs/components/AtlassianNavigation/index.js +61 -5
- package/dist/cjs/components/AtlassianNavigation/skeleton.js +67 -10
- package/dist/cjs/components/BadgeContainer/index.js +12 -4
- package/dist/cjs/components/Create/index.js +21 -12
- package/dist/cjs/components/Create/skeleton.js +21 -6
- package/dist/cjs/components/Create/styles.js +1 -25
- package/dist/cjs/components/IconButton/skeleton.js +31 -5
- package/dist/cjs/components/IconButton/styles.js +2 -32
- package/dist/cjs/components/PrimaryButton/index.js +35 -1
- package/dist/cjs/components/PrimaryButton/skeleton.js +15 -5
- package/dist/cjs/components/PrimaryButton/styles.js +2 -58
- package/dist/cjs/components/PrimaryDropdownButton/index.js +6 -3
- package/dist/cjs/components/PrimaryItemsContainer/index.js +26 -4
- package/dist/cjs/components/PrimaryItemsContainer/skeleton.js +8 -3
- package/dist/cjs/components/ProductHome/custom-product-home.js +104 -6
- package/dist/cjs/components/ProductHome/product-home.js +104 -6
- package/dist/cjs/components/ProductHome/skeleton.js +117 -6
- package/dist/cjs/components/Search/index.js +50 -6
- package/dist/cjs/components/Search/skeleton.js +29 -7
- package/dist/cjs/components/SkeletonCreateButton/index.js +23 -5
- package/dist/cjs/components/SkeletonIconButton/index.js +30 -5
- package/dist/cjs/components/SkeletonPrimaryButton/index.js +79 -3
- package/dist/cjs/theme/defaultTheme.js +8 -8
- package/dist/cjs/version.json +1 -1
- package/dist/es2019/common/constants.js +4 -0
- package/dist/es2019/components/AtlassianNavigation/index.js +61 -6
- package/dist/es2019/components/AtlassianNavigation/skeleton.js +67 -11
- package/dist/es2019/components/BadgeContainer/index.js +12 -4
- package/dist/es2019/components/Create/index.js +26 -13
- package/dist/es2019/components/Create/skeleton.js +20 -6
- package/dist/es2019/components/Create/styles.js +0 -15
- package/dist/es2019/components/IconButton/skeleton.js +23 -5
- package/dist/es2019/components/IconButton/styles.js +1 -23
- package/dist/es2019/components/PrimaryButton/index.js +35 -3
- package/dist/es2019/components/PrimaryButton/skeleton.js +14 -5
- package/dist/es2019/components/PrimaryButton/styles.js +1 -46
- package/dist/es2019/components/PrimaryDropdownButton/index.js +7 -3
- package/dist/es2019/components/PrimaryItemsContainer/index.js +25 -4
- package/dist/es2019/components/PrimaryItemsContainer/skeleton.js +7 -3
- package/dist/es2019/components/ProductHome/custom-product-home.js +119 -6
- package/dist/es2019/components/ProductHome/product-home.js +119 -6
- package/dist/es2019/components/ProductHome/skeleton.js +129 -6
- package/dist/es2019/components/Search/index.js +47 -6
- package/dist/es2019/components/Search/skeleton.js +30 -7
- package/dist/es2019/components/SkeletonCreateButton/index.js +23 -3
- package/dist/es2019/components/SkeletonIconButton/index.js +30 -3
- package/dist/es2019/components/SkeletonPrimaryButton/index.js +74 -3
- package/dist/es2019/theme/defaultTheme.js +8 -8
- package/dist/es2019/version.json +1 -1
- package/dist/esm/common/constants.js +4 -0
- package/dist/esm/components/AtlassianNavigation/index.js +61 -6
- package/dist/esm/components/AtlassianNavigation/skeleton.js +67 -11
- package/dist/esm/components/BadgeContainer/index.js +12 -4
- package/dist/esm/components/Create/index.js +22 -13
- package/dist/esm/components/Create/skeleton.js +19 -6
- package/dist/esm/components/Create/styles.js +0 -15
- package/dist/esm/components/IconButton/skeleton.js +29 -5
- package/dist/esm/components/IconButton/styles.js +0 -22
- package/dist/esm/components/PrimaryButton/index.js +35 -3
- package/dist/esm/components/PrimaryButton/skeleton.js +14 -5
- package/dist/esm/components/PrimaryButton/styles.js +0 -44
- package/dist/esm/components/PrimaryDropdownButton/index.js +7 -3
- package/dist/esm/components/PrimaryItemsContainer/index.js +25 -4
- package/dist/esm/components/PrimaryItemsContainer/skeleton.js +7 -3
- package/dist/esm/components/ProductHome/custom-product-home.js +102 -6
- package/dist/esm/components/ProductHome/product-home.js +102 -6
- package/dist/esm/components/ProductHome/skeleton.js +117 -6
- package/dist/esm/components/Search/index.js +48 -6
- package/dist/esm/components/Search/skeleton.js +27 -7
- package/dist/esm/components/SkeletonCreateButton/index.js +23 -3
- package/dist/esm/components/SkeletonIconButton/index.js +30 -3
- package/dist/esm/components/SkeletonPrimaryButton/index.js +80 -3
- package/dist/esm/theme/defaultTheme.js +8 -8
- package/dist/esm/version.json +1 -1
- package/dist/types/common/constants.d.ts +3 -0
- package/dist/types/common/styles.d.ts +143 -143
- package/dist/types/components/AtlassianNavigation/skeleton.d.ts +1 -1
- package/dist/types/components/AtlassianNavigation/types.d.ts +1 -0
- package/dist/types/components/Create/styles.d.ts +0 -923
- package/dist/types/components/IconButton/skeleton.d.ts +1 -1
- package/dist/types/components/IconButton/styles.d.ts +0 -915
- package/dist/types/components/PrimaryButton/index.d.ts +1 -1
- package/dist/types/components/PrimaryButton/skeleton.d.ts +1 -0
- package/dist/types/components/PrimaryButton/styles.d.ts +0 -917
- package/dist/types/components/PrimaryDropdownButton/index.d.ts +1 -1
- package/docs/99-migrating-from-navigation-next.tsx +31 -32
- package/package.json +8 -4
- package/dist/cjs/components/AtlassianNavigation/styles.js +0 -82
- package/dist/cjs/components/BadgeContainer/styles.js +0 -17
- package/dist/cjs/components/PrimaryDropdownButton/styles.js +0 -13
- package/dist/cjs/components/PrimaryItemsContainer/styles.js +0 -42
- package/dist/cjs/components/ProductHome/styles.js +0 -152
- package/dist/cjs/components/Search/styles.js +0 -70
- package/dist/cjs/components/SkeletonCreateButton/styles.js +0 -39
- package/dist/cjs/components/SkeletonIconButton/styles.js +0 -46
- package/dist/cjs/components/SkeletonPrimaryButton/styles.js +0 -74
- package/dist/es2019/components/AtlassianNavigation/styles.js +0 -60
- package/dist/es2019/components/BadgeContainer/styles.js +0 -9
- package/dist/es2019/components/PrimaryDropdownButton/styles.js +0 -6
- package/dist/es2019/components/PrimaryItemsContainer/styles.js +0 -30
- package/dist/es2019/components/ProductHome/styles.js +0 -117
- package/dist/es2019/components/Search/styles.js +0 -43
- package/dist/es2019/components/SkeletonCreateButton/styles.js +0 -25
- package/dist/es2019/components/SkeletonIconButton/styles.js +0 -32
- package/dist/es2019/components/SkeletonPrimaryButton/styles.js +0 -60
- package/dist/esm/components/AtlassianNavigation/styles.js +0 -64
- package/dist/esm/components/BadgeContainer/styles.js +0 -9
- package/dist/esm/components/PrimaryDropdownButton/styles.js +0 -6
- package/dist/esm/components/PrimaryItemsContainer/styles.js +0 -29
- package/dist/esm/components/ProductHome/styles.js +0 -114
- package/dist/esm/components/Search/styles.js +0 -47
- package/dist/esm/components/SkeletonCreateButton/styles.js +0 -28
- package/dist/esm/components/SkeletonIconButton/styles.js +0 -35
- package/dist/esm/components/SkeletonPrimaryButton/styles.js +0 -63
- package/dist/types/components/AtlassianNavigation/styles.d.ts +0 -22
- package/dist/types/components/BadgeContainer/styles.d.ts +0 -9
- package/dist/types/components/PrimaryDropdownButton/styles.d.ts +0 -5
- package/dist/types/components/PrimaryItemsContainer/styles.d.ts +0 -9
- package/dist/types/components/ProductHome/styles.d.ts +0 -2791
- package/dist/types/components/Search/styles.d.ts +0 -1842
- package/dist/types/components/SkeletonCreateButton/styles.d.ts +0 -4
- package/dist/types/components/SkeletonIconButton/styles.d.ts +0 -4
- package/dist/types/components/SkeletonPrimaryButton/styles.d.ts +0 -4
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
-
|
|
5
|
-
Object.defineProperty(exports, "__esModule", {
|
|
6
|
-
value: true
|
|
7
|
-
});
|
|
8
|
-
exports.default = void 0;
|
|
9
|
-
|
|
10
|
-
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
11
|
-
|
|
12
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
13
|
-
|
|
14
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
15
|
-
|
|
16
|
-
var _default = function _default(_ref, isDropdownButton, isHighlighted) {
|
|
17
|
-
var primaryButton = _ref.mode.primaryButton;
|
|
18
|
-
return _objectSpread(_objectSpread(_objectSpread({}, primaryButton.default), {}, {
|
|
19
|
-
fontWeight: 500,
|
|
20
|
-
fontSize: 14,
|
|
21
|
-
lineHeight: 1,
|
|
22
|
-
position: 'relative',
|
|
23
|
-
pointerEvents: 'none',
|
|
24
|
-
appearance: 'none',
|
|
25
|
-
border: 0,
|
|
26
|
-
padding: '0 4px',
|
|
27
|
-
margin: '0 6px',
|
|
28
|
-
':focus, :active, :hover': {
|
|
29
|
-
border: 0,
|
|
30
|
-
outline: 0,
|
|
31
|
-
appearance: 'none'
|
|
32
|
-
},
|
|
33
|
-
'::-moz-focus-inner': {
|
|
34
|
-
border: 0
|
|
35
|
-
}
|
|
36
|
-
}, isHighlighted && {
|
|
37
|
-
color: primaryButton.selected.color,
|
|
38
|
-
'&:before': {
|
|
39
|
-
position: 'absolute',
|
|
40
|
-
bottom: 0,
|
|
41
|
-
left: 2,
|
|
42
|
-
right: isDropdownButton ? -10 : 2,
|
|
43
|
-
content: '""',
|
|
44
|
-
height: 3,
|
|
45
|
-
backgroundColor: primaryButton.selected.borderColor,
|
|
46
|
-
borderTopLeftRadius: 1,
|
|
47
|
-
borderTopRightRadius: 1
|
|
48
|
-
}
|
|
49
|
-
}), isDropdownButton && {
|
|
50
|
-
marginRight: 18,
|
|
51
|
-
'&:after': {
|
|
52
|
-
// Using a CSS cheveron to limit the
|
|
53
|
-
// DOM element count and avoid
|
|
54
|
-
// unnecessary dependencies
|
|
55
|
-
content: '""',
|
|
56
|
-
display: 'inline-block',
|
|
57
|
-
width: 4,
|
|
58
|
-
height: 4,
|
|
59
|
-
borderRadius: 1,
|
|
60
|
-
borderBottom: '2px solid',
|
|
61
|
-
borderRight: '2px solid',
|
|
62
|
-
borderColor: isHighlighted ? primaryButton.default.borderColor : primaryButton.default.color,
|
|
63
|
-
transform: 'rotate(45deg) scale(1.05)',
|
|
64
|
-
position: 'absolute',
|
|
65
|
-
top: 'calc(50% - 4px)',
|
|
66
|
-
left: 'calc(100% - 3px)',
|
|
67
|
-
marginLeft: 4,
|
|
68
|
-
verticalAlign: 'middle',
|
|
69
|
-
opacity: 0.51
|
|
70
|
-
}
|
|
71
|
-
});
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
exports.default = _default;
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
import { N30A, N40A, N900 } from '@atlaskit/theme/colors';
|
|
2
|
-
import { gridSize as gridSizeFn } from '@atlaskit/theme/constants';
|
|
3
|
-
import { HORIZONTAL_GLOBAL_NAV_HEIGHT } from '../../common/constants';
|
|
4
|
-
import { hexToRGBA } from '../../theme';
|
|
5
|
-
const gridSize = gridSizeFn();
|
|
6
|
-
export const containerCSS = ({
|
|
7
|
-
mode: {
|
|
8
|
-
navigation
|
|
9
|
-
}
|
|
10
|
-
}) => ({
|
|
11
|
-
alignItems: 'center',
|
|
12
|
-
boxSizing: 'border-box',
|
|
13
|
-
display: 'flex',
|
|
14
|
-
flexShrink: 0,
|
|
15
|
-
justifyContent: 'space-between',
|
|
16
|
-
paddingLeft: gridSize * 1.5,
|
|
17
|
-
paddingRight: gridSize * 1.5,
|
|
18
|
-
height: HORIZONTAL_GLOBAL_NAV_HEIGHT,
|
|
19
|
-
position: 'relative',
|
|
20
|
-
'[data-theme="light"] &, [data-theme="dark"] &': {
|
|
21
|
-
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-design-token-usage
|
|
22
|
-
borderBottom: `1px solid ${"var(--ds-border-neutral, #091E4224)"}`,
|
|
23
|
-
// TODO: (DSP-2087) Remove the below once tokens have launched
|
|
24
|
-
'&::after': {
|
|
25
|
-
content: 'none'
|
|
26
|
-
}
|
|
27
|
-
},
|
|
28
|
-
// TODO: (DSP-2087) Remove the below once tokens have launched
|
|
29
|
-
'&::after': {
|
|
30
|
-
content: '""',
|
|
31
|
-
position: 'absolute',
|
|
32
|
-
left: 0,
|
|
33
|
-
right: 0,
|
|
34
|
-
top: '100%',
|
|
35
|
-
height: gridSize / 2,
|
|
36
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
37
|
-
background: `linear-gradient(180deg, ${N40A} 0, ${N40A} 1px, ${N30A} 1px, ${hexToRGBA( // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
38
|
-
N900, 0)} 4px)`
|
|
39
|
-
},
|
|
40
|
-
...navigation
|
|
41
|
-
});
|
|
42
|
-
export const leftCSS = {
|
|
43
|
-
alignItems: 'center',
|
|
44
|
-
display: 'flex',
|
|
45
|
-
flexGrow: 1,
|
|
46
|
-
minWidth: 0,
|
|
47
|
-
height: 'inherit',
|
|
48
|
-
'& > *': {
|
|
49
|
-
flexShrink: 0
|
|
50
|
-
}
|
|
51
|
-
};
|
|
52
|
-
export const rightCSS = {
|
|
53
|
-
alignItems: 'center',
|
|
54
|
-
display: 'flex',
|
|
55
|
-
flexShrink: 0,
|
|
56
|
-
'& > *': {
|
|
57
|
-
flexShrink: 0,
|
|
58
|
-
marginRight: gridSize / 2
|
|
59
|
-
}
|
|
60
|
-
};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { gridSize } from '@atlaskit/theme/constants';
|
|
2
|
-
const margin = `0 ${gridSize() / 2}px`;
|
|
3
|
-
export const containerCSS = ({
|
|
4
|
-
mode: {
|
|
5
|
-
navigation
|
|
6
|
-
}
|
|
7
|
-
}) => ({
|
|
8
|
-
alignItems: 'stretch',
|
|
9
|
-
display: 'flex',
|
|
10
|
-
flexGrow: 1,
|
|
11
|
-
flexShrink: 0,
|
|
12
|
-
flexBasis: 0,
|
|
13
|
-
height: '100%',
|
|
14
|
-
position: 'relative',
|
|
15
|
-
'& > *': {
|
|
16
|
-
flexShrink: 0,
|
|
17
|
-
margin
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
export const widthObserverContainerStyle = {
|
|
21
|
-
flexShrink: 1,
|
|
22
|
-
minWidth: '1px',
|
|
23
|
-
margin: '0px',
|
|
24
|
-
width: '100%',
|
|
25
|
-
position: 'relative'
|
|
26
|
-
};
|
|
27
|
-
export const primaryButtonSkeletonCSS = {
|
|
28
|
-
marginLeft: `${gridSize() * 1.5}px`,
|
|
29
|
-
marginRight: `${gridSize() * 1.5}px`
|
|
30
|
-
};
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
import { gridSize as gridSizeFn } from '@atlaskit/theme/constants';
|
|
2
|
-
import { PRODUCT_HOME_BREAKPOINT } from '../../common/constants';
|
|
3
|
-
import { skeletonCSS } from '../../common/styles';
|
|
4
|
-
const gridSize = gridSizeFn();
|
|
5
|
-
export const productHomeButtonCSS = ({
|
|
6
|
-
mode: {
|
|
7
|
-
primaryButton
|
|
8
|
-
}
|
|
9
|
-
}) => {
|
|
10
|
-
return {
|
|
11
|
-
alignItems: 'center',
|
|
12
|
-
padding: gridSize / 2,
|
|
13
|
-
borderRadius: 3,
|
|
14
|
-
border: 0,
|
|
15
|
-
background: 'none',
|
|
16
|
-
display: 'flex',
|
|
17
|
-
cursor: 'pointer',
|
|
18
|
-
color: 'inherit',
|
|
19
|
-
'&:first-of-type': {
|
|
20
|
-
marginLeft: 0
|
|
21
|
-
},
|
|
22
|
-
'&::-moz-focus-inner': {
|
|
23
|
-
border: 0
|
|
24
|
-
},
|
|
25
|
-
'&:hover': primaryButton.hover,
|
|
26
|
-
'&:focus': { ...primaryButton.focus,
|
|
27
|
-
outline: 0
|
|
28
|
-
},
|
|
29
|
-
'&:active': primaryButton.active,
|
|
30
|
-
'div&': {
|
|
31
|
-
pointerEvents: 'none'
|
|
32
|
-
},
|
|
33
|
-
[`@media (max-width: ${PRODUCT_HOME_BREAKPOINT - 0.1}px)`]: {
|
|
34
|
-
margin: `0 ${gridSize}px`
|
|
35
|
-
},
|
|
36
|
-
[`@media (min-width: ${PRODUCT_HOME_BREAKPOINT}px)`]: {
|
|
37
|
-
margin: `0 ${gridSize * 2}px`
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
export const productHomeButtonSkeletonCSS = productHomeButtonCSS;
|
|
42
|
-
const iconHeight = 28;
|
|
43
|
-
const heightCSS = {
|
|
44
|
-
maxHeight: `${iconHeight}px`
|
|
45
|
-
};
|
|
46
|
-
export const productIconCSS = {
|
|
47
|
-
// Ensure anything passed into
|
|
48
|
-
// productHome is aligned correctly
|
|
49
|
-
display: 'flex',
|
|
50
|
-
'& > *': {
|
|
51
|
-
maxHeight: 24
|
|
52
|
-
},
|
|
53
|
-
[`@media (min-width: ${PRODUCT_HOME_BREAKPOINT}px)`]: {
|
|
54
|
-
display: 'none'
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
export const productIconSkeletonCSS = theme => ({
|
|
58
|
-
borderRadius: '50%',
|
|
59
|
-
width: `${iconHeight}px`,
|
|
60
|
-
height: `${iconHeight}px`,
|
|
61
|
-
...productIconCSS,
|
|
62
|
-
...skeletonCSS(theme)
|
|
63
|
-
});
|
|
64
|
-
export const customProductIconCSS = { ...heightCSS,
|
|
65
|
-
...productIconCSS
|
|
66
|
-
};
|
|
67
|
-
export const productLogoCSS = logoMaxWidth => ({
|
|
68
|
-
// Ensure anything passed into
|
|
69
|
-
// productHome is aligned correctly
|
|
70
|
-
display: 'flex',
|
|
71
|
-
maxWidth: logoMaxWidth,
|
|
72
|
-
'& > *': {
|
|
73
|
-
maxHeight: 24
|
|
74
|
-
},
|
|
75
|
-
[`@media (max-width: ${PRODUCT_HOME_BREAKPOINT - 0.1}px)`]: {
|
|
76
|
-
display: 'none'
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
export const siteTitleCSS = ({
|
|
80
|
-
mode: {
|
|
81
|
-
navigation: {
|
|
82
|
-
color
|
|
83
|
-
},
|
|
84
|
-
productHome: {
|
|
85
|
-
borderRight
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
}) => ({
|
|
89
|
-
marginLeft: `${gridSize * 0.5}px`,
|
|
90
|
-
display: 'flex',
|
|
91
|
-
alignItems: 'center',
|
|
92
|
-
paddingRight: gridSize * 2,
|
|
93
|
-
marginRight: gridSize / 2,
|
|
94
|
-
borderRight: borderRight
|
|
95
|
-
});
|
|
96
|
-
export const siteTitleSkeletonCSS = theme => ({ ...siteTitleCSS(theme),
|
|
97
|
-
...skeletonCSS(theme),
|
|
98
|
-
width: gridSize * 5,
|
|
99
|
-
backgroundColor: 'transparent',
|
|
100
|
-
'&:after': {
|
|
101
|
-
content: '""',
|
|
102
|
-
width: '100%',
|
|
103
|
-
height: iconHeight / 2,
|
|
104
|
-
backgroundColor: theme.mode.skeleton.backgroundColor,
|
|
105
|
-
borderRadius: 4
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
export const productLogoSkeletonCSS = theme => ({
|
|
109
|
-
width: '120px',
|
|
110
|
-
height: 24,
|
|
111
|
-
...heightCSS,
|
|
112
|
-
...productLogoCSS(120),
|
|
113
|
-
...skeletonCSS(theme)
|
|
114
|
-
});
|
|
115
|
-
export const customProductLogoCSS = logoMaxWidth => ({ ...heightCSS,
|
|
116
|
-
...productLogoCSS(logoMaxWidth)
|
|
117
|
-
});
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { fontSize, gridSize as gridSizeFn } from '@atlaskit/theme/constants';
|
|
2
|
-
import { actionSectionDesktopCSS, actionSectionMobileCSS, skeletonCSS } from '../../common/styles';
|
|
3
|
-
const gridSize = gridSizeFn();
|
|
4
|
-
const searchCommonCSS = {
|
|
5
|
-
borderRadius: 6,
|
|
6
|
-
boxSizing: 'border-box',
|
|
7
|
-
height: `${gridSize * 4}px`,
|
|
8
|
-
padding: `0 ${gridSize}px 0 40px`,
|
|
9
|
-
width: '220px'
|
|
10
|
-
};
|
|
11
|
-
export const searchIconCSS = actionSectionMobileCSS;
|
|
12
|
-
export const searchIconSkeletonCSS = searchIconCSS;
|
|
13
|
-
export const searchInputContainerCSS = {
|
|
14
|
-
marginLeft: '20px',
|
|
15
|
-
marginRight: `${gridSize}px`,
|
|
16
|
-
position: 'relative',
|
|
17
|
-
...actionSectionDesktopCSS
|
|
18
|
-
};
|
|
19
|
-
export const searchInputCSS = ({
|
|
20
|
-
mode: {
|
|
21
|
-
search
|
|
22
|
-
}
|
|
23
|
-
}) => ({ ...searchCommonCSS,
|
|
24
|
-
border: '2px solid',
|
|
25
|
-
fontSize: `${fontSize()}px`,
|
|
26
|
-
outline: 'none',
|
|
27
|
-
'::placeholder': {
|
|
28
|
-
color: 'inherit'
|
|
29
|
-
},
|
|
30
|
-
...search.default,
|
|
31
|
-
':focus': search.focus
|
|
32
|
-
});
|
|
33
|
-
export const searchInputIconCSS = {
|
|
34
|
-
height: '20px',
|
|
35
|
-
left: '10px',
|
|
36
|
-
position: 'absolute',
|
|
37
|
-
pointerEvents: 'none',
|
|
38
|
-
top: '5px',
|
|
39
|
-
width: '20px'
|
|
40
|
-
};
|
|
41
|
-
export const searchInputSkeletonCSS = theme => ({ ...searchCommonCSS,
|
|
42
|
-
...skeletonCSS(theme)
|
|
43
|
-
});
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
export default (({
|
|
2
|
-
mode: {
|
|
3
|
-
create: {
|
|
4
|
-
default: defaultStyles
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
}) => ({ ...defaultStyles,
|
|
8
|
-
border: 0,
|
|
9
|
-
fontWeight: 500,
|
|
10
|
-
fontSize: 14,
|
|
11
|
-
height: 32,
|
|
12
|
-
borderRadius: 3,
|
|
13
|
-
alignSelf: 'center',
|
|
14
|
-
padding: '0 12px',
|
|
15
|
-
pointerEvents: 'none',
|
|
16
|
-
lineHeight: 1,
|
|
17
|
-
':focus, :active, :hover': {
|
|
18
|
-
border: 0,
|
|
19
|
-
outline: 0,
|
|
20
|
-
appearance: 'none'
|
|
21
|
-
},
|
|
22
|
-
'&&': {
|
|
23
|
-
marginLeft: 12
|
|
24
|
-
}
|
|
25
|
-
}));
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
export default (({
|
|
2
|
-
mode: {
|
|
3
|
-
iconButton: {
|
|
4
|
-
default: defaultStyles
|
|
5
|
-
}
|
|
6
|
-
}
|
|
7
|
-
}) => ({ ...defaultStyles,
|
|
8
|
-
border: 0,
|
|
9
|
-
margin: 0,
|
|
10
|
-
marginRight: 4,
|
|
11
|
-
padding: '4px 6px',
|
|
12
|
-
borderRadius: '100%',
|
|
13
|
-
pointerEvents: 'none',
|
|
14
|
-
':focus, :active, :hover': {
|
|
15
|
-
border: 0,
|
|
16
|
-
outline: 0,
|
|
17
|
-
appearance: 'none'
|
|
18
|
-
},
|
|
19
|
-
// targeting the AppSwitcher on the right
|
|
20
|
-
'&:only-of-type': {
|
|
21
|
-
marginRight: 0
|
|
22
|
-
},
|
|
23
|
-
'& > span': {
|
|
24
|
-
lineHeight: 'normal'
|
|
25
|
-
},
|
|
26
|
-
'& > img': {
|
|
27
|
-
borderRadius: '100%',
|
|
28
|
-
height: 24,
|
|
29
|
-
width: 24,
|
|
30
|
-
verticalAlign: 'middle'
|
|
31
|
-
}
|
|
32
|
-
}));
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
export default (({
|
|
2
|
-
mode: {
|
|
3
|
-
primaryButton
|
|
4
|
-
}
|
|
5
|
-
}, isDropdownButton, isHighlighted) => ({ ...primaryButton.default,
|
|
6
|
-
fontWeight: 500,
|
|
7
|
-
fontSize: 14,
|
|
8
|
-
lineHeight: 1,
|
|
9
|
-
position: 'relative',
|
|
10
|
-
pointerEvents: 'none',
|
|
11
|
-
appearance: 'none',
|
|
12
|
-
border: 0,
|
|
13
|
-
padding: '0 4px',
|
|
14
|
-
margin: '0 6px',
|
|
15
|
-
':focus, :active, :hover': {
|
|
16
|
-
border: 0,
|
|
17
|
-
outline: 0,
|
|
18
|
-
appearance: 'none'
|
|
19
|
-
},
|
|
20
|
-
'::-moz-focus-inner': {
|
|
21
|
-
border: 0
|
|
22
|
-
},
|
|
23
|
-
...(isHighlighted && {
|
|
24
|
-
color: primaryButton.selected.color,
|
|
25
|
-
'&:before': {
|
|
26
|
-
position: 'absolute',
|
|
27
|
-
bottom: 0,
|
|
28
|
-
left: 2,
|
|
29
|
-
right: isDropdownButton ? -10 : 2,
|
|
30
|
-
content: '""',
|
|
31
|
-
height: 3,
|
|
32
|
-
backgroundColor: primaryButton.selected.borderColor,
|
|
33
|
-
borderTopLeftRadius: 1,
|
|
34
|
-
borderTopRightRadius: 1
|
|
35
|
-
}
|
|
36
|
-
}),
|
|
37
|
-
...(isDropdownButton && {
|
|
38
|
-
marginRight: 18,
|
|
39
|
-
'&:after': {
|
|
40
|
-
// Using a CSS cheveron to limit the
|
|
41
|
-
// DOM element count and avoid
|
|
42
|
-
// unnecessary dependencies
|
|
43
|
-
content: '""',
|
|
44
|
-
display: 'inline-block',
|
|
45
|
-
width: 4,
|
|
46
|
-
height: 4,
|
|
47
|
-
borderRadius: 1,
|
|
48
|
-
borderBottom: '2px solid',
|
|
49
|
-
borderRight: '2px solid',
|
|
50
|
-
borderColor: isHighlighted ? primaryButton.default.borderColor : primaryButton.default.color,
|
|
51
|
-
transform: 'rotate(45deg) scale(1.05)',
|
|
52
|
-
position: 'absolute',
|
|
53
|
-
top: 'calc(50% - 4px)',
|
|
54
|
-
left: 'calc(100% - 3px)',
|
|
55
|
-
marginLeft: 4,
|
|
56
|
-
verticalAlign: 'middle',
|
|
57
|
-
opacity: 0.51
|
|
58
|
-
}
|
|
59
|
-
})
|
|
60
|
-
}));
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
|
-
|
|
3
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
4
|
-
|
|
5
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
6
|
-
|
|
7
|
-
import { N30A, N40A, N900 } from '@atlaskit/theme/colors';
|
|
8
|
-
import { gridSize as gridSizeFn } from '@atlaskit/theme/constants';
|
|
9
|
-
import { HORIZONTAL_GLOBAL_NAV_HEIGHT } from '../../common/constants';
|
|
10
|
-
import { hexToRGBA } from '../../theme';
|
|
11
|
-
var gridSize = gridSizeFn();
|
|
12
|
-
export var containerCSS = function containerCSS(_ref) {
|
|
13
|
-
var navigation = _ref.mode.navigation;
|
|
14
|
-
return _objectSpread({
|
|
15
|
-
alignItems: 'center',
|
|
16
|
-
boxSizing: 'border-box',
|
|
17
|
-
display: 'flex',
|
|
18
|
-
flexShrink: 0,
|
|
19
|
-
justifyContent: 'space-between',
|
|
20
|
-
paddingLeft: gridSize * 1.5,
|
|
21
|
-
paddingRight: gridSize * 1.5,
|
|
22
|
-
height: HORIZONTAL_GLOBAL_NAV_HEIGHT,
|
|
23
|
-
position: 'relative',
|
|
24
|
-
'[data-theme="light"] &, [data-theme="dark"] &': {
|
|
25
|
-
// eslint-disable-next-line @atlaskit/design-system/no-unsafe-design-token-usage
|
|
26
|
-
borderBottom: "1px solid ".concat("var(--ds-border-neutral, #091E4224)"),
|
|
27
|
-
// TODO: (DSP-2087) Remove the below once tokens have launched
|
|
28
|
-
'&::after': {
|
|
29
|
-
content: 'none'
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
|
-
// TODO: (DSP-2087) Remove the below once tokens have launched
|
|
33
|
-
'&::after': {
|
|
34
|
-
content: '""',
|
|
35
|
-
position: 'absolute',
|
|
36
|
-
left: 0,
|
|
37
|
-
right: 0,
|
|
38
|
-
top: '100%',
|
|
39
|
-
height: gridSize / 2,
|
|
40
|
-
// eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
41
|
-
background: "linear-gradient(180deg, ".concat(N40A, " 0, ").concat(N40A, " 1px, ").concat(N30A, " 1px, ").concat(hexToRGBA( // eslint-disable-next-line @atlaskit/design-system/ensure-design-token-usage
|
|
42
|
-
N900, 0), " 4px)")
|
|
43
|
-
}
|
|
44
|
-
}, navigation);
|
|
45
|
-
};
|
|
46
|
-
export var leftCSS = {
|
|
47
|
-
alignItems: 'center',
|
|
48
|
-
display: 'flex',
|
|
49
|
-
flexGrow: 1,
|
|
50
|
-
minWidth: 0,
|
|
51
|
-
height: 'inherit',
|
|
52
|
-
'& > *': {
|
|
53
|
-
flexShrink: 0
|
|
54
|
-
}
|
|
55
|
-
};
|
|
56
|
-
export var rightCSS = {
|
|
57
|
-
alignItems: 'center',
|
|
58
|
-
display: 'flex',
|
|
59
|
-
flexShrink: 0,
|
|
60
|
-
'& > *': {
|
|
61
|
-
flexShrink: 0,
|
|
62
|
-
marginRight: gridSize / 2
|
|
63
|
-
}
|
|
64
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { gridSize } from '@atlaskit/theme/constants';
|
|
2
|
-
var margin = "0 ".concat(gridSize() / 2, "px");
|
|
3
|
-
export var containerCSS = function containerCSS(_ref) {
|
|
4
|
-
var navigation = _ref.mode.navigation;
|
|
5
|
-
return {
|
|
6
|
-
alignItems: 'stretch',
|
|
7
|
-
display: 'flex',
|
|
8
|
-
flexGrow: 1,
|
|
9
|
-
flexShrink: 0,
|
|
10
|
-
flexBasis: 0,
|
|
11
|
-
height: '100%',
|
|
12
|
-
position: 'relative',
|
|
13
|
-
'& > *': {
|
|
14
|
-
flexShrink: 0,
|
|
15
|
-
margin: margin
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
export var widthObserverContainerStyle = {
|
|
20
|
-
flexShrink: 1,
|
|
21
|
-
minWidth: '1px',
|
|
22
|
-
margin: '0px',
|
|
23
|
-
width: '100%',
|
|
24
|
-
position: 'relative'
|
|
25
|
-
};
|
|
26
|
-
export var primaryButtonSkeletonCSS = {
|
|
27
|
-
marginLeft: "".concat(gridSize() * 1.5, "px"),
|
|
28
|
-
marginRight: "".concat(gridSize() * 1.5, "px")
|
|
29
|
-
};
|