@atlaskit/side-navigation 3.1.1 → 3.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 CHANGED
@@ -1,5 +1,22 @@
1
1
  # @atlaskit/side-navigation
2
2
 
3
+ ## 3.1.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#102250](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/102250)
8
+ [`ba7dc54866b9`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ba7dc54866b9) -
9
+ Update footer to use logical property for padding. Internal changes to tokenise typography
10
+ values.
11
+
12
+ ## 3.1.2
13
+
14
+ ### Patch Changes
15
+
16
+ - [#98707](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/98707)
17
+ [`7cce9cbf2f08`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/7cce9cbf2f08) -
18
+ Internal changes to how text is rendered. There is no expected visual change.
19
+
3
20
  ## 3.1.1
4
21
 
5
22
  ### Patch Changes
@@ -18,9 +18,6 @@
18
18
  "../src/**/test.*"
19
19
  ],
20
20
  "references": [
21
- {
22
- "path": "../../ds-explorations/afm-cc/tsconfig.json"
23
- },
24
21
  {
25
22
  "path": "../../ds-lib/afm-cc/tsconfig.json"
26
23
  },
@@ -1,30 +1,35 @@
1
- import SideNavigationProps from '!!extract-react-types-loader!../../src/components/SideNavigation';
2
- import HeaderProps from '!!extract-react-types-loader!../../src/components/Header';
3
- import FooterProps from '!!extract-react-types-loader!../../docs/ert/footer';
4
- import NavigationContentProps from '!!extract-react-types-loader!../../src/components/NavigationContent';
5
- import NestableNavigationContentProps from '!!extract-react-types-loader!../../src/components/NestableNavigationContent';
6
- import SectionProps from '!!extract-react-types-loader!../../src/components/Section';
1
+ ---
2
+ props:
3
+ packageName: '@atlaskit/side-navigation'
4
+ exports:
5
+ - SideNavigation
6
+ - Header
7
+ - Footer
8
+ - NavigationContent
9
+ - NestableNavigationContent
10
+ - Section
11
+ ---
7
12
 
8
13
  ### Navigation props
9
14
 
10
- <PropsTable heading="" props={SideNavigationProps} />
15
+ <TSMorphProps exportName="SideNavigation" packageName="@atlaskit/side-navigation" />
11
16
 
12
17
  ### Header props
13
18
 
14
- <PropsTable heading="" props={HeaderProps} />
19
+ <TSMorphProps exportName="Header" packageName="@atlaskit/side-navigation" />
15
20
 
16
21
  ### Footer props
17
22
 
18
- <PropsTable heading="" props={FooterProps} />
23
+ <TSMorphProps exportName="Footer" packageName="@atlaskit/side-navigation" />
19
24
 
20
25
  ### Content props
21
26
 
22
- <PropsTable heading="" props={NavigationContentProps} />
27
+ <TSMorphProps exportName="NavigationContent" packageName="@atlaskit/side-navigation" />
23
28
 
24
29
  ### Nestable content props
25
30
 
26
- <PropsTable heading="" props={NestableNavigationContentProps} />
31
+ <TSMorphProps exportName="NestableNavigationContent" packageName="@atlaskit/side-navigation" />
27
32
 
28
33
  ### Section props
29
34
 
30
- <PropsTable heading="" props={SectionProps} />
35
+ <TSMorphProps exportName="Section" packageName="@atlaskit/side-navigation" />
@@ -63,8 +63,8 @@ var baseSideNavItemStyle = exports.baseSideNavItemStyle = function baseSideNavIt
63
63
  // See: https://product-fabric.atlassian.net/browse/DSP-1684
64
64
  backgroundColor: "var(--ds-background-neutral-subtle, transparent)"
65
65
  }, !isDisabled && !isSelected && defaultStyles), !isDisabled && isSelected && selectedStyles), {}, (0, _defineProperty2.default)({}, '& [data-item-elem-before]', {
66
- height: "var(--ds-space-300, 24px)",
67
- width: "var(--ds-space-300, 24px)"
66
+ height: '1.5rem',
67
+ width: '1.5rem'
68
68
  }));
69
69
  };
70
70
  var sectionHeaderSpacingStyles = exports.sectionHeaderSpacingStyles = function sectionHeaderSpacingStyles() {
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _react = _interopRequireDefault(require("react"));
10
- var _text = _interopRequireDefault(require("@atlaskit/ds-explorations/text"));
11
10
  var _warnOnce = _interopRequireDefault(require("@atlaskit/ds-lib/warn-once"));
12
11
  var _primitives = require("@atlaskit/primitives");
13
12
  var _colors = require("@atlaskit/theme/colors");
@@ -18,8 +17,8 @@ var _Item = require("../Item");
18
17
 
19
18
  var iconContainerStyles = (0, _primitives.xcss)({
20
19
  display: 'inline-block',
21
- width: 'size.200',
22
- height: 'size.200'
20
+ width: '1.5rem',
21
+ height: '1.5rem'
23
22
  });
24
23
  /**
25
24
  * __Footer__
@@ -43,7 +42,7 @@ var OldFooter = function OldFooter(props) {
43
42
  },
44
43
  '[data-item-title]': {
45
44
  textAlign: 'center',
46
- fontSize: 12
45
+ font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
47
46
  },
48
47
  '[data-item-description]': {
49
48
  textAlign: 'center',
@@ -106,16 +105,15 @@ var Footer = function Footer(_ref2) {
106
105
  xcss: iconContainerStyles
107
106
  }, iconBefore), /*#__PURE__*/_react.default.createElement(_primitives.Stack, {
108
107
  space: "space.075"
109
- }, /*#__PURE__*/_react.default.createElement(_text.default, {
110
- fontSize: "size.075",
111
- textAlign: "center",
112
- lineHeight: "lineHeight.100"
113
- }, children), description && /*#__PURE__*/_react.default.createElement(_text.default, {
114
- lineHeight: "lineHeight.100",
115
- as: "div",
116
- fontSize: "size.075",
117
- textAlign: "center",
118
- color: "subtlest"
108
+ }, /*#__PURE__*/_react.default.createElement(_primitives.Text, {
109
+ size: "UNSAFE_small",
110
+ align: "center",
111
+ color: "inherit"
112
+ }, children), description && /*#__PURE__*/_react.default.createElement(_primitives.Text, {
113
+ size: "UNSAFE_small",
114
+ as: "p",
115
+ align: "center",
116
+ color: "color.text.subtlest"
119
117
  }, description))));
120
118
  };
121
119
 
@@ -11,7 +11,6 @@ var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/h
11
11
  var _react = require("react");
12
12
  var _react2 = require("@emotion/react");
13
13
  var _colors = require("@atlaskit/theme/colors");
14
- var _typography = require("@atlaskit/theme/typography");
15
14
  var _styles = require("../../common/styles");
16
15
  var _Item = require("../Item");
17
16
  var _excluded = ["children", "data-testid"],
@@ -69,9 +68,9 @@ var Header = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
69
68
  return _ref3 = {
70
69
  userSelect: 'auto'
71
70
  }, (0, _defineProperty2.default)(_ref3, '[data-item-title]', {
72
- fontSize: _typography.headingSizes.h400.size,
71
+ fontSize: '0.875rem',
73
72
  letterSpacing: '-0.003em',
74
- fontWeight: 600,
73
+ fontWeight: "var(--ds-font-weight-semibold, 600)",
75
74
  color: "var(--ds-text, ".concat(_colors.N500, ")")
76
75
  }), (0, _defineProperty2.default)(_ref3, 'div&:hover', {
77
76
  backgroundColor: "var(--ds-background-neutral-subtle, transparent)",
@@ -34,9 +34,9 @@ var SkeletonItem = function SkeletonItem(props) {
34
34
  return _objectSpread(_objectSpread({}, (0, _styles.sectionHeaderSpacingStyles)()), {}, {
35
35
  // This doubles up & to get a higher specificity as well as to not overwite the base styles.
36
36
  '&&::before': {
37
- height: "var(--ds-space-300, 24px)",
37
+ height: '1.5rem',
38
38
  marginRight: "var(--ds-space-200, 16px)",
39
- width: "var(--ds-space-300, 24px)"
39
+ width: '1.5rem'
40
40
  }
41
41
  });
42
42
  }
@@ -11,7 +11,7 @@ var _primitives = require("@atlaskit/primitives");
11
11
  var navigationFooterStyles = (0, _primitives.xcss)({
12
12
  display: 'block',
13
13
  padding: 'space.100',
14
- paddingTop: 'space.300'
14
+ paddingBlockStart: 'space.300'
15
15
  });
16
16
  /**
17
17
  * __Navigation header__
@@ -55,8 +55,8 @@ export const baseSideNavItemStyle = ({
55
55
  // -- END TODO --------------------------------------------------------------
56
56
 
57
57
  ['& [data-item-elem-before]']: {
58
- height: "var(--ds-space-300, 24px)",
59
- width: "var(--ds-space-300, 24px)"
58
+ height: '1.5rem',
59
+ width: '1.5rem'
60
60
  }
61
61
  };
62
62
  };
@@ -1,17 +1,16 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  /* eslint-disable @repo/internal/react/consistent-props-definitions */
3
3
  import React from 'react';
4
- import Text from '@atlaskit/ds-explorations/text';
5
4
  import warnOnce from '@atlaskit/ds-lib/warn-once';
6
- import { Box, Stack, xcss } from '@atlaskit/primitives';
5
+ import { Box, Stack, Text, xcss } from '@atlaskit/primitives';
7
6
  import { N500 } from '@atlaskit/theme/colors';
8
7
  import { overrideStyleFunction } from '../../common/styles';
9
8
  import { Container } from '../Header';
10
9
  import { CustomItem } from '../Item';
11
10
  const iconContainerStyles = xcss({
12
11
  display: 'inline-block',
13
- width: 'size.200',
14
- height: 'size.200'
12
+ width: '1.5rem',
13
+ height: '1.5rem'
15
14
  });
16
15
  /**
17
16
  * __Footer__
@@ -34,7 +33,7 @@ const OldFooter = props => {
34
33
  },
35
34
  '[data-item-title]': {
36
35
  textAlign: 'center',
37
- fontSize: 12
36
+ font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
38
37
  },
39
38
  '[data-item-description]': {
40
39
  textAlign: 'center',
@@ -97,15 +96,14 @@ const Footer = ({
97
96
  }, iconBefore), /*#__PURE__*/React.createElement(Stack, {
98
97
  space: "space.075"
99
98
  }, /*#__PURE__*/React.createElement(Text, {
100
- fontSize: "size.075",
101
- textAlign: "center",
102
- lineHeight: "lineHeight.100"
99
+ size: "UNSAFE_small",
100
+ align: "center",
101
+ color: "inherit"
103
102
  }, children), description && /*#__PURE__*/React.createElement(Text, {
104
- lineHeight: "lineHeight.100",
105
- as: "div",
106
- fontSize: "size.075",
107
- textAlign: "center",
108
- color: "subtlest"
103
+ size: "UNSAFE_small",
104
+ as: "p",
105
+ align: "center",
106
+ color: "color.text.subtlest"
109
107
  }, description))));
110
108
  };
111
109
 
@@ -3,7 +3,6 @@ import _extends from "@babel/runtime/helpers/extends";
3
3
  import { forwardRef } from 'react';
4
4
  import { css, jsx } from '@emotion/react';
5
5
  import { N500 } from '@atlaskit/theme/colors';
6
- import { headingSizes } from '@atlaskit/theme/typography';
7
6
  import { overrideStyleFunction } from '../../common/styles';
8
7
  import { CustomItem } from '../Item';
9
8
  const containerStyles = css({
@@ -56,9 +55,9 @@ const Header = /*#__PURE__*/forwardRef((props, ref) => {
56
55
  const cssFn = overrideStyleFunction(() => ({
57
56
  userSelect: 'auto',
58
57
  ['[data-item-title]']: {
59
- fontSize: headingSizes.h400.size,
58
+ fontSize: '0.875rem',
60
59
  letterSpacing: '-0.003em',
61
- fontWeight: 600,
60
+ fontWeight: "var(--ds-font-weight-semibold, 600)",
62
61
  color: `var(--ds-text, ${N500})`
63
62
  },
64
63
  // Will look interactive if the `component` is anything other than a div.
@@ -25,9 +25,9 @@ const SkeletonItem = props => {
25
25
  ...sectionHeaderSpacingStyles(),
26
26
  // This doubles up & to get a higher specificity as well as to not overwite the base styles.
27
27
  '&&::before': {
28
- height: "var(--ds-space-300, 24px)",
28
+ height: '1.5rem',
29
29
  marginRight: "var(--ds-space-200, 16px)",
30
- width: "var(--ds-space-300, 24px)"
30
+ width: '1.5rem'
31
31
  }
32
32
  })
33
33
  // eslint-disable-next-line @repo/internal/react/no-unsafe-spread-props
@@ -4,7 +4,7 @@ import { Box, xcss } from '@atlaskit/primitives';
4
4
  const navigationFooterStyles = xcss({
5
5
  display: 'block',
6
6
  padding: 'space.100',
7
- paddingTop: 'space.300'
7
+ paddingBlockStart: 'space.300'
8
8
  });
9
9
  /**
10
10
  * __Navigation header__
@@ -56,8 +56,8 @@ export var baseSideNavItemStyle = function baseSideNavItemStyle(_ref) {
56
56
  // See: https://product-fabric.atlassian.net/browse/DSP-1684
57
57
  backgroundColor: "var(--ds-background-neutral-subtle, transparent)"
58
58
  }, !isDisabled && !isSelected && defaultStyles), !isDisabled && isSelected && selectedStyles), {}, _defineProperty({}, '& [data-item-elem-before]', {
59
- height: "var(--ds-space-300, 24px)",
60
- width: "var(--ds-space-300, 24px)"
59
+ height: '1.5rem',
60
+ width: '1.5rem'
61
61
  }));
62
62
  };
63
63
  export var sectionHeaderSpacingStyles = function sectionHeaderSpacingStyles() {
@@ -1,17 +1,16 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  /* eslint-disable @repo/internal/react/consistent-props-definitions */
3
3
  import React from 'react';
4
- import Text from '@atlaskit/ds-explorations/text';
5
4
  import warnOnce from '@atlaskit/ds-lib/warn-once';
6
- import { Box, Stack, xcss } from '@atlaskit/primitives';
5
+ import { Box, Stack, Text, xcss } from '@atlaskit/primitives';
7
6
  import { N500 } from '@atlaskit/theme/colors';
8
7
  import { overrideStyleFunction } from '../../common/styles';
9
8
  import { Container } from '../Header';
10
9
  import { CustomItem } from '../Item';
11
10
  var iconContainerStyles = xcss({
12
11
  display: 'inline-block',
13
- width: 'size.200',
14
- height: 'size.200'
12
+ width: '1.5rem',
13
+ height: '1.5rem'
15
14
  });
16
15
  /**
17
16
  * __Footer__
@@ -35,7 +34,7 @@ var OldFooter = function OldFooter(props) {
35
34
  },
36
35
  '[data-item-title]': {
37
36
  textAlign: 'center',
38
- fontSize: 12
37
+ font: "var(--ds-font-body-UNSAFE_small, normal 400 12px/16px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)"
39
38
  },
40
39
  '[data-item-description]': {
41
40
  textAlign: 'center',
@@ -99,15 +98,14 @@ var Footer = function Footer(_ref2) {
99
98
  }, iconBefore), /*#__PURE__*/React.createElement(Stack, {
100
99
  space: "space.075"
101
100
  }, /*#__PURE__*/React.createElement(Text, {
102
- fontSize: "size.075",
103
- textAlign: "center",
104
- lineHeight: "lineHeight.100"
101
+ size: "UNSAFE_small",
102
+ align: "center",
103
+ color: "inherit"
105
104
  }, children), description && /*#__PURE__*/React.createElement(Text, {
106
- lineHeight: "lineHeight.100",
107
- as: "div",
108
- fontSize: "size.075",
109
- textAlign: "center",
110
- color: "subtlest"
105
+ size: "UNSAFE_small",
106
+ as: "p",
107
+ align: "center",
108
+ color: "color.text.subtlest"
111
109
  }, description))));
112
110
  };
113
111
 
@@ -7,7 +7,6 @@ var _excluded = ["children", "data-testid"],
7
7
  import { forwardRef } from 'react';
8
8
  import { css, jsx } from '@emotion/react';
9
9
  import { N500 } from '@atlaskit/theme/colors';
10
- import { headingSizes } from '@atlaskit/theme/typography';
11
10
  import { overrideStyleFunction } from '../../common/styles';
12
11
  import { CustomItem } from '../Item';
13
12
  var containerStyles = css({
@@ -62,9 +61,9 @@ var Header = /*#__PURE__*/forwardRef(function (props, ref) {
62
61
  return _ref3 = {
63
62
  userSelect: 'auto'
64
63
  }, _defineProperty(_ref3, '[data-item-title]', {
65
- fontSize: headingSizes.h400.size,
64
+ fontSize: '0.875rem',
66
65
  letterSpacing: '-0.003em',
67
- fontWeight: 600,
66
+ fontWeight: "var(--ds-font-weight-semibold, 600)",
68
67
  color: "var(--ds-text, ".concat(N500, ")")
69
68
  }), _defineProperty(_ref3, 'div&:hover', {
70
69
  backgroundColor: "var(--ds-background-neutral-subtle, transparent)",
@@ -27,9 +27,9 @@ var SkeletonItem = function SkeletonItem(props) {
27
27
  return _objectSpread(_objectSpread({}, sectionHeaderSpacingStyles()), {}, {
28
28
  // This doubles up & to get a higher specificity as well as to not overwite the base styles.
29
29
  '&&::before': {
30
- height: "var(--ds-space-300, 24px)",
30
+ height: '1.5rem',
31
31
  marginRight: "var(--ds-space-200, 16px)",
32
- width: "var(--ds-space-300, 24px)"
32
+ width: '1.5rem'
33
33
  }
34
34
  });
35
35
  }
@@ -4,7 +4,7 @@ import { Box, xcss } from '@atlaskit/primitives';
4
4
  var navigationFooterStyles = xcss({
5
5
  display: 'block',
6
6
  padding: 'space.100',
7
- paddingTop: 'space.300'
7
+ paddingBlockStart: 'space.300'
8
8
  });
9
9
  /**
10
10
  * __Navigation header__
@@ -1,4 +1,4 @@
1
- import { CSSFn, StatelessCSSFn } from '@atlaskit/menu';
1
+ import { type CSSFn, type StatelessCSSFn } from '@atlaskit/menu';
2
2
  /**
3
3
  * Allows chaining of style functions on top of base style functions
4
4
  * @param baseStyle the base custom cssFn
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { HeaderProps } from '../Header';
2
+ import { type HeaderProps } from '../Header';
3
3
  type NewFooterProps = Omit<HeaderProps, 'cssFn' | 'component' | 'onClick'>;
4
4
  type FooterFacadeProps = (HeaderProps & {
5
5
  /**
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { jsx } from '@emotion/react';
3
- import { CSSFn, CustomItemComponentProps } from '@atlaskit/menu';
3
+ import { type CSSFn, type CustomItemComponentProps } from '@atlaskit/menu';
4
4
  /**
5
5
  * __Container__
6
6
  *
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { SkeletonItemProps } from '@atlaskit/menu';
2
+ import { type SkeletonItemProps } from '@atlaskit/menu';
3
3
  export type { SkeletonItemProps } from '@atlaskit/menu';
4
4
  /**
5
5
  * __Skeleton item__
@@ -1,4 +1,4 @@
1
- import { CSSFn, StatelessCSSFn } from '@atlaskit/menu';
1
+ import { type CSSFn, type StatelessCSSFn } from '@atlaskit/menu';
2
2
  /**
3
3
  * Allows chaining of style functions on top of base style functions
4
4
  * @param baseStyle the base custom cssFn
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { HeaderProps } from '../Header';
2
+ import { type HeaderProps } from '../Header';
3
3
  type NewFooterProps = Omit<HeaderProps, 'cssFn' | 'component' | 'onClick'>;
4
4
  type FooterFacadeProps = (HeaderProps & {
5
5
  /**
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import { jsx } from '@emotion/react';
3
- import { CSSFn, CustomItemComponentProps } from '@atlaskit/menu';
3
+ import { type CSSFn, type CustomItemComponentProps } from '@atlaskit/menu';
4
4
  /**
5
5
  * __Container__
6
6
  *
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import { SkeletonItemProps } from '@atlaskit/menu';
2
+ import { type SkeletonItemProps } from '@atlaskit/menu';
3
3
  export type { SkeletonItemProps } from '@atlaskit/menu';
4
4
  /**
5
5
  * __Skeleton item__
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/side-navigation",
3
- "version": "3.1.1",
3
+ "version": "3.1.3",
4
4
  "description": "A highly composable side navigation component that supports nested views.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -30,14 +30,13 @@
30
30
  "runReact18": true
31
31
  },
32
32
  "dependencies": {
33
- "@atlaskit/ds-explorations": "^3.5.0",
34
33
  "@atlaskit/ds-lib": "^2.3.0",
35
- "@atlaskit/icon": "^22.1.0",
36
- "@atlaskit/menu": "^2.2.0",
37
- "@atlaskit/motion": "^1.5.0",
38
- "@atlaskit/primitives": "^6.0.0",
39
- "@atlaskit/theme": "^12.7.0",
40
- "@atlaskit/tokens": "^1.45.0",
34
+ "@atlaskit/icon": "^22.3.0",
35
+ "@atlaskit/menu": "^2.3.0",
36
+ "@atlaskit/motion": "^1.6.0",
37
+ "@atlaskit/primitives": "^6.3.0",
38
+ "@atlaskit/theme": "^12.8.0",
39
+ "@atlaskit/tokens": "^1.49.0",
41
40
  "@babel/runtime": "^7.0.0",
42
41
  "@emotion/react": "^11.7.1"
43
42
  },