@atlaskit/side-navigation 3.1.2 → 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,14 @@
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
+
3
12
  ## 3.1.2
4
13
 
5
14
  ### Patch Changes
@@ -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() {
@@ -17,8 +17,8 @@ var _Item = require("../Item");
17
17
 
18
18
  var iconContainerStyles = (0, _primitives.xcss)({
19
19
  display: 'inline-block',
20
- width: 'size.200',
21
- height: 'size.200'
20
+ width: '1.5rem',
21
+ height: '1.5rem'
22
22
  });
23
23
  /**
24
24
  * __Footer__
@@ -42,7 +42,7 @@ var OldFooter = function OldFooter(props) {
42
42
  },
43
43
  '[data-item-title]': {
44
44
  textAlign: 'center',
45
- 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)"
46
46
  },
47
47
  '[data-item-description]': {
48
48
  textAlign: 'center',
@@ -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
  };
@@ -9,8 +9,8 @@ import { Container } from '../Header';
9
9
  import { CustomItem } from '../Item';
10
10
  const iconContainerStyles = xcss({
11
11
  display: 'inline-block',
12
- width: 'size.200',
13
- height: 'size.200'
12
+ width: '1.5rem',
13
+ height: '1.5rem'
14
14
  });
15
15
  /**
16
16
  * __Footer__
@@ -33,7 +33,7 @@ const OldFooter = props => {
33
33
  },
34
34
  '[data-item-title]': {
35
35
  textAlign: 'center',
36
- 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)"
37
37
  },
38
38
  '[data-item-description]': {
39
39
  textAlign: 'center',
@@ -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() {
@@ -9,8 +9,8 @@ import { Container } from '../Header';
9
9
  import { CustomItem } from '../Item';
10
10
  var iconContainerStyles = xcss({
11
11
  display: 'inline-block',
12
- width: 'size.200',
13
- height: 'size.200'
12
+ width: '1.5rem',
13
+ height: '1.5rem'
14
14
  });
15
15
  /**
16
16
  * __Footer__
@@ -34,7 +34,7 @@ var OldFooter = function OldFooter(props) {
34
34
  },
35
35
  '[data-item-title]': {
36
36
  textAlign: 'center',
37
- 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)"
38
38
  },
39
39
  '[data-item-description]': {
40
40
  textAlign: 'center',
@@ -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,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,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.2",
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/"
@@ -31,12 +31,12 @@
31
31
  },
32
32
  "dependencies": {
33
33
  "@atlaskit/ds-lib": "^2.3.0",
34
- "@atlaskit/icon": "^22.2.0",
34
+ "@atlaskit/icon": "^22.3.0",
35
35
  "@atlaskit/menu": "^2.3.0",
36
36
  "@atlaskit/motion": "^1.6.0",
37
- "@atlaskit/primitives": "^6.2.0",
37
+ "@atlaskit/primitives": "^6.3.0",
38
38
  "@atlaskit/theme": "^12.8.0",
39
- "@atlaskit/tokens": "^1.48.0",
39
+ "@atlaskit/tokens": "^1.49.0",
40
40
  "@babel/runtime": "^7.0.0",
41
41
  "@emotion/react": "^11.7.1"
42
42
  },