@atlaskit/atlassian-navigation 2.0.3 → 2.1.1
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/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 +24 -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 +40 -40
- 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 +29 -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 +40 -40
- 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 +25 -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 +40 -40
- 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/index.d.ts +1 -1
- package/dist/types/components/Create/styles.d.ts +0 -923
- package/dist/types/components/Create/types.d.ts +5 -1
- 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/05-create.tsx +8 -0
- 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
|
@@ -2,10 +2,101 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import { Fragment } from 'react';
|
|
5
|
-
import { jsx } from '@emotion/core';
|
|
5
|
+
import { css, jsx } from '@emotion/core';
|
|
6
|
+
import { gridSize, PRODUCT_HOME_BREAKPOINT } from '../../common/constants';
|
|
6
7
|
import { useTheme } from '../../theme';
|
|
7
|
-
import { customProductIconCSS, customProductLogoCSS, productHomeButtonCSS, siteTitleCSS } from './styles';
|
|
8
8
|
import { getTag } from './utils';
|
|
9
|
+
const VAR_LOGO_MAX_WIDTH = '--logo-max-width';
|
|
10
|
+
const VAR_PRODUCT_HOME_COLOR_ACTIVE = '--product-home-color-active';
|
|
11
|
+
const VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE = '--product-home-bg-color-active';
|
|
12
|
+
const VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE = '--product-home-box-shadow-active';
|
|
13
|
+
const VAR_PRODUCT_HOME_COLOR_FOCUS = '--product-home-color-focus';
|
|
14
|
+
const VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS = '--product-home-bg-color-focus';
|
|
15
|
+
const VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS = '--product-home-box-shadow-focus';
|
|
16
|
+
const VAR_PRODUCT_HOME_COLOR_HOVER = '--product-home-color-hover';
|
|
17
|
+
const VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER = '--product-home-bg-color-hover';
|
|
18
|
+
const VAR_PRODUCT_HOME_BOX_SHADOW_HOVER = '--product-home-box-shadow-hover';
|
|
19
|
+
const productLogoStyles = css({
|
|
20
|
+
// Ensure anything passed into
|
|
21
|
+
// productHome is aligned correctly
|
|
22
|
+
display: 'flex',
|
|
23
|
+
maxWidth: `var(${VAR_LOGO_MAX_WIDTH})`,
|
|
24
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
25
|
+
'& > *': {
|
|
26
|
+
maxHeight: 24
|
|
27
|
+
},
|
|
28
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
29
|
+
[`@media (max-width: ${PRODUCT_HOME_BREAKPOINT - 0.1}px)`]: {
|
|
30
|
+
display: 'none'
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
const customMaxHeightStyles = css({
|
|
34
|
+
maxHeight: 28
|
|
35
|
+
});
|
|
36
|
+
const productIconStyles = css({
|
|
37
|
+
// Ensure anything passed into
|
|
38
|
+
// productHome is aligned correctly
|
|
39
|
+
display: 'flex',
|
|
40
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
41
|
+
'& > *': {
|
|
42
|
+
maxHeight: 24
|
|
43
|
+
},
|
|
44
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
45
|
+
[`@media (min-width: ${PRODUCT_HOME_BREAKPOINT}px)`]: {
|
|
46
|
+
display: 'none'
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
const productHomeButtonStyles = css({
|
|
50
|
+
display: 'flex',
|
|
51
|
+
padding: gridSize / 2,
|
|
52
|
+
alignItems: 'center',
|
|
53
|
+
background: 'none',
|
|
54
|
+
border: 0,
|
|
55
|
+
borderRadius: 3,
|
|
56
|
+
color: 'inherit',
|
|
57
|
+
cursor: 'pointer',
|
|
58
|
+
'&::-moz-focus-inner': {
|
|
59
|
+
border: 0
|
|
60
|
+
},
|
|
61
|
+
'&:first-of-type': {
|
|
62
|
+
marginLeft: 0
|
|
63
|
+
},
|
|
64
|
+
'&:hover': {
|
|
65
|
+
backgroundColor: `var(${VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER})`,
|
|
66
|
+
boxShadow: `var(${VAR_PRODUCT_HOME_BOX_SHADOW_HOVER})`,
|
|
67
|
+
color: `var(${VAR_PRODUCT_HOME_COLOR_HOVER})`
|
|
68
|
+
},
|
|
69
|
+
'&:active': {
|
|
70
|
+
backgroundColor: `var(${VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE})`,
|
|
71
|
+
boxShadow: `var(${VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE})`,
|
|
72
|
+
color: `var(${VAR_PRODUCT_HOME_COLOR_ACTIVE})`
|
|
73
|
+
},
|
|
74
|
+
'&:focus': {
|
|
75
|
+
backgroundColor: `var(${VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS})`,
|
|
76
|
+
boxShadow: `var(${VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS})`,
|
|
77
|
+
color: `var(${VAR_PRODUCT_HOME_COLOR_FOCUS})`,
|
|
78
|
+
outline: 0
|
|
79
|
+
},
|
|
80
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
81
|
+
'div&': {
|
|
82
|
+
pointerEvents: 'none'
|
|
83
|
+
},
|
|
84
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
85
|
+
[`@media (max-width: ${PRODUCT_HOME_BREAKPOINT - 0.1}px)`]: {
|
|
86
|
+
margin: `0 ${gridSize}px`
|
|
87
|
+
},
|
|
88
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
89
|
+
[`@media (min-width: ${PRODUCT_HOME_BREAKPOINT}px)`]: {
|
|
90
|
+
margin: `0 ${gridSize * 2}px`
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
const siteTitleStyles = css({
|
|
94
|
+
display: 'flex',
|
|
95
|
+
marginRight: gridSize / 2,
|
|
96
|
+
marginLeft: gridSize * 0.5,
|
|
97
|
+
paddingRight: gridSize * 2,
|
|
98
|
+
alignItems: 'center'
|
|
99
|
+
});
|
|
9
100
|
|
|
10
101
|
const CustomProductHome = props => {
|
|
11
102
|
const {
|
|
@@ -22,6 +113,7 @@ const CustomProductHome = props => {
|
|
|
22
113
|
...rest
|
|
23
114
|
} = props;
|
|
24
115
|
const theme = useTheme();
|
|
116
|
+
const primaryButton = theme.mode.primaryButton;
|
|
25
117
|
const Tag = getTag(onClick, href);
|
|
26
118
|
|
|
27
119
|
const preventFocusRing = event => {
|
|
@@ -29,24 +121,45 @@ const CustomProductHome = props => {
|
|
|
29
121
|
onMouseDown && onMouseDown(event);
|
|
30
122
|
};
|
|
31
123
|
|
|
124
|
+
const productHomeButtonDynamicStyles = {
|
|
125
|
+
[VAR_PRODUCT_HOME_COLOR_ACTIVE]: primaryButton.active.color,
|
|
126
|
+
[VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE]: primaryButton.active.backgroundColor,
|
|
127
|
+
[VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE]: primaryButton.active.boxShadow,
|
|
128
|
+
[VAR_PRODUCT_HOME_COLOR_FOCUS]: primaryButton.focus.color,
|
|
129
|
+
[VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS]: primaryButton.focus.backgroundColor,
|
|
130
|
+
[VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS]: primaryButton.focus.boxShadow,
|
|
131
|
+
[VAR_PRODUCT_HOME_COLOR_HOVER]: primaryButton.hover.color,
|
|
132
|
+
[VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER]: primaryButton.hover.backgroundColor,
|
|
133
|
+
[VAR_PRODUCT_HOME_BOX_SHADOW_HOVER]: primaryButton.hover.boxShadow
|
|
134
|
+
};
|
|
32
135
|
return jsx(Fragment, null, jsx(Tag, _extends({
|
|
33
136
|
href: href,
|
|
34
|
-
|
|
137
|
+
style: productHomeButtonDynamicStyles,
|
|
138
|
+
css: productHomeButtonStyles,
|
|
35
139
|
onClick: onClick,
|
|
36
140
|
onMouseDown: preventFocusRing,
|
|
37
141
|
"data-testid": testId && `${testId}-container`
|
|
38
142
|
}, rest), logoUrl && jsx("img", {
|
|
39
|
-
|
|
143
|
+
style: {
|
|
144
|
+
[VAR_LOGO_MAX_WIDTH]: logoMaxWidth
|
|
145
|
+
},
|
|
146
|
+
css: [customMaxHeightStyles, productLogoStyles],
|
|
40
147
|
src: logoUrl,
|
|
41
148
|
alt: logoAlt,
|
|
42
149
|
"data-testid": testId && `${testId}-logo`
|
|
43
150
|
}), iconUrl && jsx("img", {
|
|
44
|
-
|
|
151
|
+
style: {
|
|
152
|
+
[VAR_LOGO_MAX_WIDTH]: logoMaxWidth
|
|
153
|
+
},
|
|
154
|
+
css: [customMaxHeightStyles, productIconStyles],
|
|
45
155
|
src: iconUrl,
|
|
46
156
|
alt: iconAlt,
|
|
47
157
|
"data-testid": testId && `${testId}-icon`
|
|
48
158
|
})), siteTitle && jsx("div", {
|
|
49
|
-
|
|
159
|
+
style: {
|
|
160
|
+
borderRight: theme.mode.productHome.borderRight
|
|
161
|
+
},
|
|
162
|
+
css: siteTitleStyles,
|
|
50
163
|
"data-testid": testId && `${testId}-site-title`
|
|
51
164
|
}, siteTitle));
|
|
52
165
|
};
|
|
@@ -2,10 +2,101 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import { Fragment } from 'react';
|
|
5
|
-
import { jsx } from '@emotion/core';
|
|
5
|
+
import { css, jsx } from '@emotion/core';
|
|
6
|
+
import { gridSize, PRODUCT_HOME_BREAKPOINT } from '../../common/constants';
|
|
6
7
|
import { useTheme } from '../../theme';
|
|
7
|
-
import { productHomeButtonCSS, productIconCSS, productLogoCSS, siteTitleCSS } from './styles';
|
|
8
8
|
import { getTag } from './utils';
|
|
9
|
+
const VAR_LOGO_MAX_WIDTH = '--logo-max-width';
|
|
10
|
+
const VAR_PRODUCT_HOME_COLOR_ACTIVE = '--product-home-color-active';
|
|
11
|
+
const VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE = '--product-home-bg-color-active';
|
|
12
|
+
const VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE = '--product-home-box-shadow-active';
|
|
13
|
+
const VAR_PRODUCT_HOME_COLOR_FOCUS = '--product-home-color-focus';
|
|
14
|
+
const VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS = '--product-home-bg-color-focus';
|
|
15
|
+
const VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS = '--product-home-box-shadow-focus';
|
|
16
|
+
const VAR_PRODUCT_HOME_COLOR_HOVER = '--product-home-color-hover';
|
|
17
|
+
const VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER = '--product-home-bg-color-hover';
|
|
18
|
+
const VAR_PRODUCT_HOME_BOX_SHADOW_HOVER = '--product-home-box-shadow-hover';
|
|
19
|
+
const productHomeButtonStyles = css({
|
|
20
|
+
display: 'flex',
|
|
21
|
+
padding: gridSize / 2,
|
|
22
|
+
alignItems: 'center',
|
|
23
|
+
background: 'none',
|
|
24
|
+
border: 0,
|
|
25
|
+
borderRadius: 3,
|
|
26
|
+
color: 'inherit',
|
|
27
|
+
cursor: 'pointer',
|
|
28
|
+
'&::-moz-focus-inner': {
|
|
29
|
+
border: 0
|
|
30
|
+
},
|
|
31
|
+
'&:first-of-type': {
|
|
32
|
+
marginLeft: 0
|
|
33
|
+
},
|
|
34
|
+
'&:hover': {
|
|
35
|
+
backgroundColor: `var(${VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER})`,
|
|
36
|
+
boxShadow: `var(${VAR_PRODUCT_HOME_BOX_SHADOW_HOVER})`,
|
|
37
|
+
color: `var(${VAR_PRODUCT_HOME_COLOR_HOVER})`
|
|
38
|
+
},
|
|
39
|
+
'&:active': {
|
|
40
|
+
backgroundColor: `var(${VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE})`,
|
|
41
|
+
boxShadow: `var(${VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE})`,
|
|
42
|
+
color: `var(${VAR_PRODUCT_HOME_COLOR_ACTIVE})`
|
|
43
|
+
},
|
|
44
|
+
'&:focus': {
|
|
45
|
+
backgroundColor: `var(${VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS})`,
|
|
46
|
+
boxShadow: `var(${VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS})`,
|
|
47
|
+
color: `var(${VAR_PRODUCT_HOME_COLOR_FOCUS})`,
|
|
48
|
+
outline: 0
|
|
49
|
+
},
|
|
50
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
51
|
+
'div&': {
|
|
52
|
+
pointerEvents: 'none'
|
|
53
|
+
},
|
|
54
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
55
|
+
[`@media (max-width: ${PRODUCT_HOME_BREAKPOINT - 0.1}px)`]: {
|
|
56
|
+
margin: `0 ${gridSize}px`
|
|
57
|
+
},
|
|
58
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
59
|
+
[`@media (min-width: ${PRODUCT_HOME_BREAKPOINT}px)`]: {
|
|
60
|
+
margin: `0 ${gridSize * 2}px`
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
const productLogoStyles = css({
|
|
64
|
+
// Ensure anything passed into
|
|
65
|
+
// productHome is aligned correctly
|
|
66
|
+
display: 'flex',
|
|
67
|
+
maxWidth: `var(${VAR_LOGO_MAX_WIDTH})`,
|
|
68
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
69
|
+
'& > *': {
|
|
70
|
+
maxHeight: 24
|
|
71
|
+
},
|
|
72
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
73
|
+
[`@media (max-width: ${PRODUCT_HOME_BREAKPOINT - 0.1}px)`]: {
|
|
74
|
+
display: 'none'
|
|
75
|
+
}
|
|
76
|
+
});
|
|
77
|
+
const customMaxHeightStyles = css({
|
|
78
|
+
maxHeight: 28
|
|
79
|
+
});
|
|
80
|
+
const productIconStyles = css({
|
|
81
|
+
// Ensure anything passed into
|
|
82
|
+
// productHome is aligned correctly
|
|
83
|
+
display: 'flex',
|
|
84
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
85
|
+
'& > *': {
|
|
86
|
+
maxHeight: 24
|
|
87
|
+
},
|
|
88
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
89
|
+
[`@media (min-width: ${PRODUCT_HOME_BREAKPOINT}px)`]: {
|
|
90
|
+
display: 'none'
|
|
91
|
+
}
|
|
92
|
+
});
|
|
93
|
+
const siteTitleStyles = css({
|
|
94
|
+
display: 'flex',
|
|
95
|
+
marginRight: gridSize / 2,
|
|
96
|
+
marginLeft: gridSize * 0.5,
|
|
97
|
+
paddingRight: gridSize * 2,
|
|
98
|
+
alignItems: 'center'
|
|
99
|
+
});
|
|
9
100
|
|
|
10
101
|
const ProductHome = ({
|
|
11
102
|
icon: Icon,
|
|
@@ -19,6 +110,7 @@ const ProductHome = ({
|
|
|
19
110
|
...rest
|
|
20
111
|
}) => {
|
|
21
112
|
const theme = useTheme();
|
|
113
|
+
const primaryButton = theme.mode.primaryButton;
|
|
22
114
|
const {
|
|
23
115
|
iconColor = 'inherit',
|
|
24
116
|
iconGradientStart = 'inherit',
|
|
@@ -32,14 +124,29 @@ const ProductHome = ({
|
|
|
32
124
|
onMouseDown && onMouseDown(e);
|
|
33
125
|
};
|
|
34
126
|
|
|
127
|
+
const productHomeButtonDynamicStyles = {
|
|
128
|
+
[VAR_PRODUCT_HOME_COLOR_ACTIVE]: primaryButton.active.color,
|
|
129
|
+
[VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE]: primaryButton.active.backgroundColor,
|
|
130
|
+
[VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE]: primaryButton.active.boxShadow,
|
|
131
|
+
[VAR_PRODUCT_HOME_COLOR_FOCUS]: primaryButton.focus.color,
|
|
132
|
+
[VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS]: primaryButton.focus.backgroundColor,
|
|
133
|
+
[VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS]: primaryButton.focus.boxShadow,
|
|
134
|
+
[VAR_PRODUCT_HOME_COLOR_HOVER]: primaryButton.hover.color,
|
|
135
|
+
[VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER]: primaryButton.hover.backgroundColor,
|
|
136
|
+
[VAR_PRODUCT_HOME_BOX_SHADOW_HOVER]: primaryButton.hover.boxShadow
|
|
137
|
+
};
|
|
35
138
|
return jsx(Fragment, null, jsx(Tag, _extends({
|
|
36
|
-
|
|
139
|
+
style: productHomeButtonDynamicStyles,
|
|
140
|
+
css: productHomeButtonStyles,
|
|
37
141
|
href: href,
|
|
38
142
|
onClick: onClick,
|
|
39
143
|
onMouseDown: preventFocusRing,
|
|
40
144
|
"data-testid": testId && `${testId}-container`
|
|
41
145
|
}, rest), jsx("div", {
|
|
42
|
-
|
|
146
|
+
style: {
|
|
147
|
+
[VAR_LOGO_MAX_WIDTH]: logoMaxWidth
|
|
148
|
+
},
|
|
149
|
+
css: [customMaxHeightStyles, productLogoStyles],
|
|
43
150
|
"data-testid": testId && `${testId}-logo`
|
|
44
151
|
}, jsx(Logo, {
|
|
45
152
|
iconGradientStart: iconGradientStart,
|
|
@@ -47,14 +154,20 @@ const ProductHome = ({
|
|
|
47
154
|
iconColor: iconColor,
|
|
48
155
|
textColor: textColor
|
|
49
156
|
})), jsx("div", {
|
|
50
|
-
|
|
157
|
+
style: {
|
|
158
|
+
[VAR_LOGO_MAX_WIDTH]: logoMaxWidth
|
|
159
|
+
},
|
|
160
|
+
css: [customMaxHeightStyles, productIconStyles],
|
|
51
161
|
"data-testid": testId && `${testId}-icon`
|
|
52
162
|
}, jsx(Icon, {
|
|
53
163
|
iconGradientStart: iconGradientStart,
|
|
54
164
|
iconGradientStop: iconGradientStop,
|
|
55
165
|
iconColor: iconColor
|
|
56
166
|
}))), siteTitle && jsx("div", {
|
|
57
|
-
|
|
167
|
+
style: {
|
|
168
|
+
borderRight: theme.mode.productHome.borderRight
|
|
169
|
+
},
|
|
170
|
+
css: siteTitleStyles,
|
|
58
171
|
"data-testid": testId && `${testId}-site-title`
|
|
59
172
|
}, siteTitle));
|
|
60
173
|
};
|
|
@@ -1,19 +1,142 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { Fragment } from 'react';
|
|
3
|
-
import { jsx } from '@emotion/core';
|
|
3
|
+
import { css, jsx } from '@emotion/core';
|
|
4
|
+
import { gridSize, PRODUCT_HOME_BREAKPOINT } from '../../common/constants';
|
|
4
5
|
import { useTheme } from '../../theme';
|
|
5
|
-
|
|
6
|
+
const VAR_PRODUCT_HOME_COLOR_ACTIVE = '--product-home-color-active';
|
|
7
|
+
const VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE = '--product-home-bg-color-active';
|
|
8
|
+
const VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE = '--product-home-box-shadow-active';
|
|
9
|
+
const VAR_PRODUCT_HOME_COLOR_FOCUS = '--product-home-color-focus';
|
|
10
|
+
const VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS = '--product-home-bg-color-focus';
|
|
11
|
+
const VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS = '--product-home-box-shadow-focus';
|
|
12
|
+
const VAR_PRODUCT_HOME_COLOR_HOVER = '--product-home-color-hover';
|
|
13
|
+
const VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER = '--product-home-bg-color-hover';
|
|
14
|
+
const VAR_PRODUCT_HOME_BOX_SHADOW_HOVER = '--product-home-box-shadow-hover';
|
|
15
|
+
const VAR_SITE_TITLE_BG_COLOR_AFTER = '--site-title-bg-color-after';
|
|
16
|
+
const productHomeButtonStyles = css({
|
|
17
|
+
display: 'flex',
|
|
18
|
+
padding: gridSize / 2,
|
|
19
|
+
alignItems: 'center',
|
|
20
|
+
background: 'none',
|
|
21
|
+
border: 0,
|
|
22
|
+
borderRadius: 3,
|
|
23
|
+
color: 'inherit',
|
|
24
|
+
cursor: 'pointer',
|
|
25
|
+
'&::-moz-focus-inner': {
|
|
26
|
+
border: 0
|
|
27
|
+
},
|
|
28
|
+
'&:first-of-type': {
|
|
29
|
+
marginLeft: 0
|
|
30
|
+
},
|
|
31
|
+
'&:active': {
|
|
32
|
+
backgroundColor: `var(${VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE})`,
|
|
33
|
+
boxShadow: `var(${VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE})`,
|
|
34
|
+
color: `var(${VAR_PRODUCT_HOME_COLOR_ACTIVE})`
|
|
35
|
+
},
|
|
36
|
+
'&:focus': {
|
|
37
|
+
backgroundColor: `var(${VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS})`,
|
|
38
|
+
boxShadow: `var(${VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS})`,
|
|
39
|
+
color: `var(${VAR_PRODUCT_HOME_COLOR_FOCUS})`,
|
|
40
|
+
outline: 0
|
|
41
|
+
},
|
|
42
|
+
'&:hover': {
|
|
43
|
+
backgroundColor: `var(${VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER})`,
|
|
44
|
+
boxShadow: `var(${VAR_PRODUCT_HOME_BOX_SHADOW_HOVER})`,
|
|
45
|
+
color: `var(${VAR_PRODUCT_HOME_COLOR_HOVER})`
|
|
46
|
+
},
|
|
47
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
48
|
+
'div&': {
|
|
49
|
+
pointerEvents: 'none'
|
|
50
|
+
},
|
|
51
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
52
|
+
[`@media (max-width: ${PRODUCT_HOME_BREAKPOINT - 0.1}px)`]: {
|
|
53
|
+
margin: `0 ${gridSize}px`
|
|
54
|
+
},
|
|
55
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
56
|
+
[`@media (min-width: ${PRODUCT_HOME_BREAKPOINT}px)`]: {
|
|
57
|
+
margin: `0 ${gridSize * 2}px`
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
const productLogoStyles = css({
|
|
61
|
+
display: 'flex',
|
|
62
|
+
width: 120,
|
|
63
|
+
maxWidth: 120,
|
|
64
|
+
height: 24,
|
|
65
|
+
maxHeight: 28,
|
|
66
|
+
opacity: 0.15,
|
|
67
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
68
|
+
'& > *': {
|
|
69
|
+
maxHeight: 24
|
|
70
|
+
},
|
|
71
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
72
|
+
[`@media (max-width: ${PRODUCT_HOME_BREAKPOINT - 0.1}px)`]: {
|
|
73
|
+
display: 'none'
|
|
74
|
+
}
|
|
75
|
+
});
|
|
76
|
+
const productIconStyles = css({
|
|
77
|
+
display: 'flex',
|
|
78
|
+
width: 28,
|
|
79
|
+
height: 28,
|
|
80
|
+
borderRadius: '50%',
|
|
81
|
+
opacity: 0.15,
|
|
82
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
83
|
+
'& > *': {
|
|
84
|
+
maxHeight: 24
|
|
85
|
+
},
|
|
86
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
87
|
+
[`@media (min-width: ${PRODUCT_HOME_BREAKPOINT}px)`]: {
|
|
88
|
+
display: 'none'
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
const siteTitleStyles = css({
|
|
92
|
+
display: 'flex',
|
|
93
|
+
width: gridSize * 5,
|
|
94
|
+
marginRight: gridSize / 2,
|
|
95
|
+
marginLeft: gridSize * 0.5,
|
|
96
|
+
paddingRight: gridSize * 2,
|
|
97
|
+
alignItems: 'center',
|
|
98
|
+
backgroundColor: 'transparent',
|
|
99
|
+
'&:after': {
|
|
100
|
+
width: '100%',
|
|
101
|
+
height: 14,
|
|
102
|
+
backgroundColor: `var(${VAR_SITE_TITLE_BG_COLOR_AFTER})`,
|
|
103
|
+
borderRadius: 4,
|
|
104
|
+
content: '""'
|
|
105
|
+
}
|
|
106
|
+
});
|
|
6
107
|
export const ProductHomeSkeleton = ({
|
|
7
108
|
showSiteName
|
|
8
109
|
}) => {
|
|
9
110
|
const theme = useTheme();
|
|
111
|
+
const primaryButton = theme.mode.primaryButton;
|
|
112
|
+
const productHomeButtonDynamicStyles = {
|
|
113
|
+
[VAR_PRODUCT_HOME_COLOR_ACTIVE]: primaryButton.active.color,
|
|
114
|
+
[VAR_PRODUCT_HOME_BACKGROUND_COLOR_ACTIVE]: primaryButton.active.backgroundColor,
|
|
115
|
+
[VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE]: primaryButton.active.boxShadow,
|
|
116
|
+
[VAR_PRODUCT_HOME_COLOR_FOCUS]: primaryButton.focus.color,
|
|
117
|
+
[VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS]: primaryButton.focus.backgroundColor,
|
|
118
|
+
[VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS]: primaryButton.focus.boxShadow,
|
|
119
|
+
[VAR_PRODUCT_HOME_COLOR_HOVER]: primaryButton.hover.color,
|
|
120
|
+
[VAR_PRODUCT_HOME_BACKGROUND_COLOR_HOVER]: primaryButton.hover.backgroundColor,
|
|
121
|
+
[VAR_PRODUCT_HOME_BOX_SHADOW_HOVER]: primaryButton.hover.boxShadow,
|
|
122
|
+
[VAR_SITE_TITLE_BG_COLOR_AFTER]: theme.mode.skeleton.backgroundColor
|
|
123
|
+
};
|
|
124
|
+
const siteTitleDynamicStyles = {
|
|
125
|
+
borderRight: theme.mode.productHome.borderRight,
|
|
126
|
+
opacity: theme.mode.skeleton.opacity,
|
|
127
|
+
[VAR_SITE_TITLE_BG_COLOR_AFTER]: theme.mode.skeleton.backgroundColor
|
|
128
|
+
};
|
|
10
129
|
return jsx(Fragment, null, jsx("div", {
|
|
11
|
-
|
|
130
|
+
style: productHomeButtonDynamicStyles,
|
|
131
|
+
css: productHomeButtonStyles
|
|
12
132
|
}, jsx("div", {
|
|
13
|
-
|
|
133
|
+
style: theme.mode.skeleton,
|
|
134
|
+
css: productLogoStyles
|
|
14
135
|
}), jsx("div", {
|
|
15
|
-
|
|
136
|
+
style: theme.mode.skeleton,
|
|
137
|
+
css: productIconStyles
|
|
16
138
|
})), showSiteName && jsx("div", {
|
|
17
|
-
|
|
139
|
+
style: siteTitleDynamicStyles,
|
|
140
|
+
css: siteTitleStyles
|
|
18
141
|
}));
|
|
19
142
|
};
|
|
@@ -2,11 +2,47 @@ import _extends from "@babel/runtime/helpers/extends";
|
|
|
2
2
|
|
|
3
3
|
/** @jsx jsx */
|
|
4
4
|
import { Fragment } from 'react';
|
|
5
|
-
import { jsx } from '@emotion/core';
|
|
5
|
+
import { css, jsx } from '@emotion/core';
|
|
6
6
|
import SearchIcon from '@atlaskit/icon/glyph/search';
|
|
7
|
+
import { CREATE_BREAKPOINT, fontSize, gridSize } from '../../common/constants';
|
|
7
8
|
import { useTheme } from '../../theme';
|
|
8
9
|
import { IconButton } from '../IconButton';
|
|
9
|
-
|
|
10
|
+
const searchInputContainerStyles = css({
|
|
11
|
+
marginRight: gridSize,
|
|
12
|
+
marginLeft: 20,
|
|
13
|
+
position: 'relative',
|
|
14
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
15
|
+
[`@media (max-width: ${CREATE_BREAKPOINT - 1}px)`]: {
|
|
16
|
+
display: 'none !important'
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const searchInputIconStyles = css({
|
|
20
|
+
width: '20px',
|
|
21
|
+
height: '20px',
|
|
22
|
+
position: 'absolute',
|
|
23
|
+
top: '5px',
|
|
24
|
+
left: '10px',
|
|
25
|
+
pointerEvents: 'none'
|
|
26
|
+
});
|
|
27
|
+
const searchInputStyles = css({
|
|
28
|
+
boxSizing: 'border-box',
|
|
29
|
+
width: '220px',
|
|
30
|
+
height: `${gridSize * 4}px`,
|
|
31
|
+
padding: `0 ${gridSize}px 0 40px`,
|
|
32
|
+
border: '2px solid',
|
|
33
|
+
borderRadius: 6,
|
|
34
|
+
fontSize: `${fontSize}px`,
|
|
35
|
+
outline: 'none',
|
|
36
|
+
'::placeholder': {
|
|
37
|
+
color: 'inherit'
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
const searchIconStyles = css({
|
|
41
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
42
|
+
[`@media (min-width: ${CREATE_BREAKPOINT}px)`]: {
|
|
43
|
+
display: 'none !important'
|
|
44
|
+
}
|
|
45
|
+
});
|
|
10
46
|
|
|
11
47
|
const SearchComponent = props => {
|
|
12
48
|
const {
|
|
@@ -16,6 +52,7 @@ const SearchComponent = props => {
|
|
|
16
52
|
value
|
|
17
53
|
} = props;
|
|
18
54
|
const theme = useTheme();
|
|
55
|
+
const search = theme.mode.search;
|
|
19
56
|
|
|
20
57
|
const onChange = (...args) => {
|
|
21
58
|
// @ts-ignore
|
|
@@ -27,15 +64,19 @@ const SearchComponent = props => {
|
|
|
27
64
|
onClick && onClick(...args);
|
|
28
65
|
};
|
|
29
66
|
|
|
67
|
+
const searchInputDynamicStyles = { ...search.default,
|
|
68
|
+
':focus': search.focus
|
|
69
|
+
};
|
|
30
70
|
return jsx("div", {
|
|
31
|
-
css:
|
|
71
|
+
css: searchInputContainerStyles,
|
|
32
72
|
role: "search"
|
|
33
73
|
}, jsx("div", {
|
|
34
|
-
css:
|
|
74
|
+
css: searchInputIconStyles
|
|
35
75
|
}, jsx(SearchIcon, {
|
|
36
76
|
label: ""
|
|
37
77
|
})), jsx("input", {
|
|
38
|
-
|
|
78
|
+
style: searchInputDynamicStyles,
|
|
79
|
+
css: searchInputStyles,
|
|
39
80
|
"aria-label": label,
|
|
40
81
|
placeholder: placeholder,
|
|
41
82
|
onChange: onChange,
|
|
@@ -58,7 +99,7 @@ export const Search = props => {
|
|
|
58
99
|
label: label,
|
|
59
100
|
value: value || ''
|
|
60
101
|
}), jsx(IconButton, _extends({
|
|
61
|
-
css:
|
|
102
|
+
css: searchIconStyles,
|
|
62
103
|
icon: jsx(SearchIcon, {
|
|
63
104
|
label: label
|
|
64
105
|
}),
|
|
@@ -1,19 +1,42 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
2
|
import { Fragment } from 'react';
|
|
3
|
-
import { jsx } from '@emotion/core';
|
|
4
|
-
import { gridSize } from '
|
|
3
|
+
import { css, jsx } from '@emotion/core';
|
|
4
|
+
import { CREATE_BREAKPOINT, gridSize } from '../../common/constants';
|
|
5
5
|
import { useTheme } from '../../theme';
|
|
6
6
|
import { IconButtonSkeleton } from '../IconButton/skeleton';
|
|
7
|
-
|
|
7
|
+
const searchInputContainerStyles = css({
|
|
8
|
+
marginRight: gridSize,
|
|
9
|
+
marginLeft: 20,
|
|
10
|
+
position: 'relative',
|
|
11
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
12
|
+
[`@media (max-width: ${CREATE_BREAKPOINT - 1}px)`]: {
|
|
13
|
+
display: 'none !important'
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
const searchInputSkeletonStyles = css({
|
|
17
|
+
boxSizing: 'border-box',
|
|
18
|
+
width: '220px',
|
|
19
|
+
height: `${gridSize * 4}px`,
|
|
20
|
+
padding: `0 ${gridSize}px 0 40px`,
|
|
21
|
+
borderRadius: 6,
|
|
22
|
+
opacity: 0.15
|
|
23
|
+
});
|
|
24
|
+
const searchIconStyles = css({
|
|
25
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
26
|
+
[`@media (min-width: ${CREATE_BREAKPOINT}px)`]: {
|
|
27
|
+
display: 'none !important'
|
|
28
|
+
}
|
|
29
|
+
});
|
|
8
30
|
export const SearchSkeleton = () => {
|
|
9
31
|
const theme = useTheme();
|
|
10
32
|
return jsx(Fragment, null, jsx("div", {
|
|
11
|
-
css:
|
|
33
|
+
css: searchInputContainerStyles
|
|
12
34
|
}, jsx("div", {
|
|
13
|
-
|
|
35
|
+
style: theme.mode.skeleton,
|
|
36
|
+
css: searchInputSkeletonStyles
|
|
14
37
|
})), jsx(IconButtonSkeleton, {
|
|
15
|
-
css:
|
|
38
|
+
css: searchIconStyles,
|
|
16
39
|
marginRight: 5,
|
|
17
|
-
size: gridSize
|
|
40
|
+
size: gridSize * 3.25
|
|
18
41
|
}));
|
|
19
42
|
};
|
|
@@ -1,14 +1,34 @@
|
|
|
1
1
|
/** @jsx jsx */
|
|
2
|
-
import { jsx } from '@emotion/core';
|
|
2
|
+
import { css, jsx } from '@emotion/core';
|
|
3
3
|
import { useTheme } from '../../theme';
|
|
4
|
-
|
|
4
|
+
const skeletonCreateButtonStyles = css({
|
|
5
|
+
height: 32,
|
|
6
|
+
padding: '0 12px',
|
|
7
|
+
alignSelf: 'center',
|
|
8
|
+
border: 0,
|
|
9
|
+
borderRadius: 3,
|
|
10
|
+
fontSize: 14,
|
|
11
|
+
fontWeight: 500,
|
|
12
|
+
lineHeight: 1,
|
|
13
|
+
pointerEvents: 'none',
|
|
14
|
+
':focus, :active, :hover': {
|
|
15
|
+
appearance: 'none',
|
|
16
|
+
border: 0,
|
|
17
|
+
outline: 0
|
|
18
|
+
},
|
|
19
|
+
// eslint-disable-next-line @repo/internal/styles/no-nested-styles
|
|
20
|
+
'&&': {
|
|
21
|
+
marginLeft: 12
|
|
22
|
+
}
|
|
23
|
+
});
|
|
5
24
|
export const SkeletonCreateButton = ({
|
|
6
25
|
text,
|
|
7
26
|
testId
|
|
8
27
|
}) => {
|
|
9
28
|
const theme = useTheme();
|
|
10
29
|
return jsx("button", {
|
|
11
|
-
|
|
30
|
+
style: theme.mode.create.default,
|
|
31
|
+
css: skeletonCreateButtonStyles,
|
|
12
32
|
"data-testid": testId
|
|
13
33
|
}, text);
|
|
14
34
|
};
|