@atlaskit/atlassian-navigation 2.3.5 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # @atlaskit/atlassian-navigation
2
2
 
3
+ ## 2.4.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`e3fa4437cf5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e3fa4437cf5) - [ux] Updates focus appearance of components using buttons and custom buttons. These states now use an offset outline which is consistent with other applications of focus in Atlassian components.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+
3
13
  ## 2.3.5
4
14
 
5
15
  ### Patch Changes
@@ -66,11 +66,10 @@ var productHomeButtonStyles = (0, _react2.css)((_css3 = {
66
66
  boxShadow: "var(".concat(VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE, ")"),
67
67
  color: "var(".concat(VAR_PRODUCT_HOME_COLOR_ACTIVE, ")")
68
68
  },
69
- '&:focus': {
69
+ '&:focus-visible': {
70
70
  backgroundColor: "var(".concat(VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS, ")"),
71
- boxShadow: "var(".concat(VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS, ")"),
72
71
  color: "var(".concat(VAR_PRODUCT_HOME_COLOR_FOCUS, ")"),
73
- outline: 0
72
+ outline: "2px solid ".concat("var(--ds-border-focused, #4C9AFF)")
74
73
  },
75
74
  // eslint-disable-next-line @repo/internal/styles/no-nested-styles
76
75
  'div&': {
@@ -50,11 +50,10 @@ var productHomeButtonStyles = (0, _react2.css)((_css = {
50
50
  boxShadow: "var(".concat(VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE, ")"),
51
51
  color: "var(".concat(VAR_PRODUCT_HOME_COLOR_ACTIVE, ")")
52
52
  },
53
- '&:focus': {
53
+ '&:focus-visible': {
54
54
  backgroundColor: "var(".concat(VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS, ")"),
55
- boxShadow: "var(".concat(VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS, ")"),
56
55
  color: "var(".concat(VAR_PRODUCT_HOME_COLOR_FOCUS, ")"),
57
- outline: 0
56
+ outline: "2px solid ".concat("var(--ds-border-focused, #4C9AFF)")
58
57
  },
59
58
  // eslint-disable-next-line @repo/internal/styles/no-nested-styles
60
59
  'div&': {
@@ -21,8 +21,8 @@ var defaultTheme = {
21
21
  },
22
22
  focus: {
23
23
  color: "var(--ds-text-inverse, ".concat(_colors.N0, ")"),
24
- backgroundColor: "var(--ds-background-brand-bold, ".concat(_colors.B400, ")"),
25
- boxShadow: "0 0 0 2px ".concat("var(--ds-border-focused, rgb(128,169,230))")
24
+ backgroundColor: '',
25
+ boxShadow: ''
26
26
  },
27
27
  hover: {
28
28
  color: "var(--ds-text-inverse, ".concat(_colors.N0, ")"),
@@ -48,8 +48,8 @@ var defaultTheme = {
48
48
  },
49
49
  focus: {
50
50
  color: "var(--ds-text-subtle, ".concat(_colors.N600, ")"),
51
- backgroundColor: "var(--ds-background-selected-hovered, ".concat((0, _themeHelpers.hexToRGBA)(_colors.B50, 0.5), ")"),
52
- boxShadow: "0 0 0 2px ".concat("var(--ds-border-focused, ".concat(_colors.B200, ")"))
51
+ backgroundColor: '',
52
+ boxShadow: ''
53
53
  },
54
54
  hover: {
55
55
  color: "var(--ds-text-subtle, ".concat(_colors.B400, ")"),
@@ -97,7 +97,7 @@ var defaultTheme = {
97
97
  focus: {
98
98
  color: "var(--ds-text-subtle, ".concat(_colors.N600, ")"),
99
99
  backgroundColor: '',
100
- boxShadow: "0 0 0 2px ".concat("var(--ds-border-focused, ".concat(_colors.B200, ")"))
100
+ boxShadow: ''
101
101
  },
102
102
  hover: {
103
103
  color: "var(--ds-text-subtle, ".concat(_colors.B400, ")"),
@@ -39,7 +39,7 @@ var generateButtonCSSStates = function generateButtonCSSStates(colors, buttonTyp
39
39
  color: color
40
40
  },
41
41
  focus: {
42
- boxShadow: (0, _themeHelpers.getBoxShadow)((0, _themeHelpers.hexToRGBA)(highlightColor, 0.5)),
42
+ boxShadow: 'none',
43
43
  color: color,
44
44
  backgroundColor: backgroundColor
45
45
  },
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/atlassian-navigation",
3
- "version": "2.3.5",
3
+ "version": "2.4.0",
4
4
  "sideEffects": false
5
5
  }
@@ -60,11 +60,10 @@ const productHomeButtonStyles = css({
60
60
  boxShadow: `var(${VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE})`,
61
61
  color: `var(${VAR_PRODUCT_HOME_COLOR_ACTIVE})`
62
62
  },
63
- '&:focus': {
63
+ '&:focus-visible': {
64
64
  backgroundColor: `var(${VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS})`,
65
- boxShadow: `var(${VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS})`,
66
65
  color: `var(${VAR_PRODUCT_HOME_COLOR_FOCUS})`,
67
- outline: 0
66
+ outline: `2px solid ${"var(--ds-border-focused, #4C9AFF)"}`
68
67
  },
69
68
  // eslint-disable-next-line @repo/internal/styles/no-nested-styles
70
69
  'div&': {
@@ -40,11 +40,10 @@ const productHomeButtonStyles = css({
40
40
  boxShadow: `var(${VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE})`,
41
41
  color: `var(${VAR_PRODUCT_HOME_COLOR_ACTIVE})`
42
42
  },
43
- '&:focus': {
43
+ '&:focus-visible': {
44
44
  backgroundColor: `var(${VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS})`,
45
- boxShadow: `var(${VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS})`,
46
45
  color: `var(${VAR_PRODUCT_HOME_COLOR_FOCUS})`,
47
- outline: 0
46
+ outline: `2px solid ${"var(--ds-border-focused, #4C9AFF)"}`
48
47
  },
49
48
  // eslint-disable-next-line @repo/internal/styles/no-nested-styles
50
49
  'div&': {
@@ -15,8 +15,8 @@ const defaultTheme = {
15
15
  },
16
16
  focus: {
17
17
  color: `var(--ds-text-inverse, ${N0})`,
18
- backgroundColor: `var(--ds-background-brand-bold, ${B400})`,
19
- boxShadow: `0 0 0 2px ${"var(--ds-border-focused, rgb(128,169,230))"}`
18
+ backgroundColor: '',
19
+ boxShadow: ''
20
20
  },
21
21
  hover: {
22
22
  color: `var(--ds-text-inverse, ${N0})`,
@@ -42,8 +42,8 @@ const defaultTheme = {
42
42
  },
43
43
  focus: {
44
44
  color: `var(--ds-text-subtle, ${N600})`,
45
- backgroundColor: `var(--ds-background-selected-hovered, ${hexToRGBA(B50, 0.5)})`,
46
- boxShadow: `0 0 0 2px ${`var(--ds-border-focused, ${B200})`}`
45
+ backgroundColor: '',
46
+ boxShadow: ''
47
47
  },
48
48
  hover: {
49
49
  color: `var(--ds-text-subtle, ${B400})`,
@@ -91,7 +91,7 @@ const defaultTheme = {
91
91
  focus: {
92
92
  color: `var(--ds-text-subtle, ${N600})`,
93
93
  backgroundColor: '',
94
- boxShadow: `0 0 0 2px ${`var(--ds-border-focused, ${B200})`}`
94
+ boxShadow: ''
95
95
  },
96
96
  hover: {
97
97
  color: `var(--ds-text-subtle, ${B400})`,
@@ -26,7 +26,7 @@ const generateButtonCSSStates = (colors, buttonType) => {
26
26
  color
27
27
  },
28
28
  focus: {
29
- boxShadow: getBoxShadow(hexToRGBA(highlightColor, 0.5)),
29
+ boxShadow: 'none',
30
30
  color,
31
31
  backgroundColor
32
32
  },
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/atlassian-navigation",
3
- "version": "2.3.5",
3
+ "version": "2.4.0",
4
4
  "sideEffects": false
5
5
  }
@@ -60,11 +60,10 @@ var productHomeButtonStyles = css((_css3 = {
60
60
  boxShadow: "var(".concat(VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE, ")"),
61
61
  color: "var(".concat(VAR_PRODUCT_HOME_COLOR_ACTIVE, ")")
62
62
  },
63
- '&:focus': {
63
+ '&:focus-visible': {
64
64
  backgroundColor: "var(".concat(VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS, ")"),
65
- boxShadow: "var(".concat(VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS, ")"),
66
65
  color: "var(".concat(VAR_PRODUCT_HOME_COLOR_FOCUS, ")"),
67
- outline: 0
66
+ outline: "2px solid ".concat("var(--ds-border-focused, #4C9AFF)")
68
67
  },
69
68
  // eslint-disable-next-line @repo/internal/styles/no-nested-styles
70
69
  'div&': {
@@ -44,11 +44,10 @@ var productHomeButtonStyles = css((_css = {
44
44
  boxShadow: "var(".concat(VAR_PRODUCT_HOME_BOX_SHADOW_ACTIVE, ")"),
45
45
  color: "var(".concat(VAR_PRODUCT_HOME_COLOR_ACTIVE, ")")
46
46
  },
47
- '&:focus': {
47
+ '&:focus-visible': {
48
48
  backgroundColor: "var(".concat(VAR_PRODUCT_HOME_BACKGROUND_COLOR_FOCUS, ")"),
49
- boxShadow: "var(".concat(VAR_PRODUCT_HOME_BOX_SHADOW_FOCUS, ")"),
50
49
  color: "var(".concat(VAR_PRODUCT_HOME_COLOR_FOCUS, ")"),
51
- outline: 0
50
+ outline: "2px solid ".concat("var(--ds-border-focused, #4C9AFF)")
52
51
  },
53
52
  // eslint-disable-next-line @repo/internal/styles/no-nested-styles
54
53
  'div&': {
@@ -15,8 +15,8 @@ var defaultTheme = {
15
15
  },
16
16
  focus: {
17
17
  color: "var(--ds-text-inverse, ".concat(N0, ")"),
18
- backgroundColor: "var(--ds-background-brand-bold, ".concat(B400, ")"),
19
- boxShadow: "0 0 0 2px ".concat("var(--ds-border-focused, rgb(128,169,230))")
18
+ backgroundColor: '',
19
+ boxShadow: ''
20
20
  },
21
21
  hover: {
22
22
  color: "var(--ds-text-inverse, ".concat(N0, ")"),
@@ -42,8 +42,8 @@ var defaultTheme = {
42
42
  },
43
43
  focus: {
44
44
  color: "var(--ds-text-subtle, ".concat(N600, ")"),
45
- backgroundColor: "var(--ds-background-selected-hovered, ".concat(hexToRGBA(B50, 0.5), ")"),
46
- boxShadow: "0 0 0 2px ".concat("var(--ds-border-focused, ".concat(B200, ")"))
45
+ backgroundColor: '',
46
+ boxShadow: ''
47
47
  },
48
48
  hover: {
49
49
  color: "var(--ds-text-subtle, ".concat(B400, ")"),
@@ -91,7 +91,7 @@ var defaultTheme = {
91
91
  focus: {
92
92
  color: "var(--ds-text-subtle, ".concat(N600, ")"),
93
93
  backgroundColor: '',
94
- boxShadow: "0 0 0 2px ".concat("var(--ds-border-focused, ".concat(B200, ")"))
94
+ boxShadow: ''
95
95
  },
96
96
  hover: {
97
97
  color: "var(--ds-text-subtle, ".concat(B400, ")"),
@@ -29,7 +29,7 @@ var generateButtonCSSStates = function generateButtonCSSStates(colors, buttonTyp
29
29
  color: color
30
30
  },
31
31
  focus: {
32
- boxShadow: getBoxShadow(hexToRGBA(highlightColor, 0.5)),
32
+ boxShadow: 'none',
33
33
  color: color,
34
34
  backgroundColor: backgroundColor
35
35
  },
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/atlassian-navigation",
3
- "version": "2.3.5",
3
+ "version": "2.4.0",
4
4
  "sideEffects": false
5
5
  }
@@ -6,15 +6,10 @@ export declare type CSSProperties = CSSObject & {
6
6
  export declare type ButtonCSSProperties = CSSProperties & {
7
7
  boxShadow: string;
8
8
  };
9
- export declare type ButtonFocusCSSProperties = {
10
- boxShadow: string;
11
- color: string;
12
- backgroundColor: string;
13
- };
14
9
  export declare type ButtonCSSContext = {
15
10
  default: ButtonCSSProperties;
16
11
  hover: ButtonCSSProperties;
17
- focus: ButtonFocusCSSProperties;
12
+ focus: ButtonCSSProperties;
18
13
  active: ButtonCSSProperties;
19
14
  selected: ButtonCSSProperties;
20
15
  selectedHover?: ButtonCSSProperties;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/atlassian-navigation",
3
- "version": "2.3.5",
3
+ "version": "2.4.0",
4
4
  "description": "A horizontal navigation component for Atlassian products.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -15,7 +15,6 @@
15
15
  "sideEffects": false,
16
16
  "atlaskit:src": "src/index.tsx",
17
17
  "atlassian": {
18
- "disableProductCI": true,
19
18
  "team": "Design System Team",
20
19
  "deprecatedAutoEntryPoints": true,
21
20
  "releaseModel": "scheduled",
@@ -26,14 +25,14 @@
26
25
  },
27
26
  "dependencies": {
28
27
  "@atlaskit/analytics-namespaced-context": "^6.6.0",
29
- "@atlaskit/button": "^16.5.0",
28
+ "@atlaskit/button": "^16.6.0",
30
29
  "@atlaskit/ds-lib": "^2.1.0",
31
30
  "@atlaskit/icon": "^21.11.0",
32
31
  "@atlaskit/logo": "*",
33
32
  "@atlaskit/popup": "^1.5.0",
34
- "@atlaskit/theme": "^12.2.0",
35
- "@atlaskit/tokens": "^1.0.0",
36
- "@atlaskit/tooltip": "^17.6.0",
33
+ "@atlaskit/theme": "^12.3.0",
34
+ "@atlaskit/tokens": "^1.2.0",
35
+ "@atlaskit/tooltip": "^17.7.0",
37
36
  "@atlaskit/width-detector": "^4.0.0",
38
37
  "@babel/runtime": "^7.0.0",
39
38
  "@emotion/react": "^11.7.1",
@@ -79,7 +78,9 @@
79
78
  "emotion",
80
79
  "static"
81
80
  ],
82
- "theming": "tokens",
81
+ "design-tokens": [
82
+ "color"
83
+ ],
83
84
  "deprecation": "no-deprecated-imports"
84
85
  }
85
86
  },
package/report.api.md CHANGED
@@ -97,7 +97,7 @@ interface BaseIconButtonProps {
97
97
  type ButtonCSSContext = {
98
98
  default: ButtonCSSProperties;
99
99
  hover: ButtonCSSProperties;
100
- focus: ButtonFocusCSSProperties;
100
+ focus: ButtonCSSProperties;
101
101
  active: ButtonCSSProperties;
102
102
  selected: ButtonCSSProperties;
103
103
  selectedHover?: ButtonCSSProperties;
@@ -108,13 +108,6 @@ type ButtonCSSProperties = CSSProperties & {
108
108
  boxShadow: string;
109
109
  };
110
110
 
111
- // @public (undocumented)
112
- type ButtonFocusCSSProperties = {
113
- boxShadow: string;
114
- color: string;
115
- backgroundColor: string;
116
- };
117
-
118
111
  // @public (undocumented)
119
112
  export type Colors = {
120
113
  backgroundColor: string;