@atlaskit/form 8.11.3 → 8.11.5

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,17 @@
1
1
  # @atlaskit/form
2
2
 
3
+ ## 8.11.5
4
+
5
+ ### Patch Changes
6
+
7
+ - [`b1bdec7cce2`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b1bdec7cce2) - Internal change to enforce token usage for spacing properties. There is no expected visual or behaviour change.
8
+
9
+ ## 8.11.4
10
+
11
+ ### Patch Changes
12
+
13
+ - [`49b08bfdf5f`](https://bitbucket.org/atlassian/atlassian-frontend/commits/49b08bfdf5f) - Migrated use of `gridSize` to space tokens where possible. There is no expected visual or behaviour change.
14
+
3
15
  ## 8.11.3
4
16
 
5
17
  ### Patch Changes
package/dist/cjs/field.js CHANGED
@@ -13,15 +13,13 @@ var _react = require("react");
13
13
  var _react2 = require("@emotion/react");
14
14
  var _reactUid = require("react-uid");
15
15
  var _tinyInvariant = _interopRequireDefault(require("tiny-invariant"));
16
- var _constants = require("@atlaskit/theme/constants");
17
16
  var _form = require("./form");
18
17
  var _label = _interopRequireDefault(require("./label"));
19
18
  var _requiredAsterisk = _interopRequireDefault(require("./required-asterisk"));
20
19
  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; }
21
20
  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; } /** @jsx jsx */
22
- var gridSize = (0, _constants.gridSize)();
23
21
  var fieldWrapperStyles = (0, _react2.css)({
24
- marginTop: gridSize
22
+ marginTop: "var(--ds-space-100, 8px)"
25
23
  });
26
24
  function isEvent(event) {
27
25
  return Boolean(event && event.target);
@@ -12,7 +12,6 @@ var _typography = require("@atlaskit/theme/typography");
12
12
  /** @jsx jsx */
13
13
 
14
14
  var fontFamily = (0, _constants.fontFamily)();
15
- var gridSize = (0, _constants.gridSize)();
16
15
  var fieldsetLabelStyles = (0, _react.css)({
17
16
  display: 'inline-block',
18
17
  marginTop: 0,
@@ -20,7 +19,7 @@ var fieldsetLabelStyles = (0, _react.css)({
20
19
  fontFamily: "".concat(fontFamily)
21
20
  });
22
21
  var fieldSetStyles = (0, _react.css)({
23
- marginTop: "".concat(gridSize, "px")
22
+ marginTop: "var(--ds-space-100, 8px)"
24
23
  });
25
24
 
26
25
  /**
@@ -10,19 +10,18 @@ var _constants = require("@atlaskit/theme/constants");
10
10
  var _typography = require("@atlaskit/theme/typography");
11
11
  /** @jsx jsx */
12
12
 
13
- var gridSize = (0, _constants.gridSize)();
14
13
  var fontFamily = (0, _constants.fontFamily)();
15
14
  var formHeaderContentStyles = (0, _react.css)({
16
15
  minWidth: '100%',
17
- marginTop: "".concat(gridSize, "px")
16
+ marginTop: "var(--ds-space-100, 8px)"
18
17
  });
19
18
  var formHeaderDescriptionStyles = (0, _react.css)({
20
- marginTop: "".concat(gridSize, "px")
19
+ marginTop: "var(--ds-space-100, 8px)"
21
20
  });
22
21
  var formHeaderTitleStyles = (0, _react.css)({
23
22
  marginTop: 0,
24
- marginRight: "".concat(gridSize * 4, "px"),
25
- lineHeight: "".concat(gridSize * 4, "px"),
23
+ marginRight: "var(--ds-space-400, 32px)",
24
+ lineHeight: "var(--ds-font-lineHeight-500, 32px)",
26
25
  overflow: 'hidden',
27
26
  textOverflow: 'ellipsis',
28
27
  whiteSpace: 'nowrap'
package/dist/cjs/label.js CHANGED
@@ -12,11 +12,10 @@ var _typography = require("@atlaskit/theme/typography");
12
12
  /** @jsx jsx */
13
13
 
14
14
  var fontFamily = (0, _constants.fontFamily)();
15
- var gridSize = (0, _constants.gridSize)();
16
15
  var labelStyles = (0, _react.css)({
17
16
  display: 'inline-block',
18
17
  marginTop: 0,
19
- marginBottom: gridSize / 2,
18
+ marginBottom: "var(--ds-space-050, 4px)",
20
19
  fontFamily: fontFamily
21
20
  });
22
21
 
@@ -24,7 +24,6 @@ var _field = require("./field");
24
24
  * Public API of the various message components.
25
25
  */
26
26
 
27
- var gridSize = (0, _constants.gridSize)();
28
27
  var fontFamily = (0, _constants.fontFamily)();
29
28
 
30
29
  // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
@@ -41,7 +40,7 @@ var darkH200Styles = (0, _react2.css)((0, _typography.h200)({
41
40
  }));
42
41
  var messageStyles = (0, _react2.css)({
43
42
  display: 'flex',
44
- marginTop: "".concat(gridSize * 0.5, "px"),
43
+ marginTop: "var(--ds-space-050, 4px)",
45
44
  justifyContent: 'baseline',
46
45
  fontFamily: "".concat(fontFamily),
47
46
  fontWeight: 'normal'
@@ -9,10 +9,9 @@ var _colors = require("@atlaskit/theme/colors");
9
9
  var _constants = require("@atlaskit/theme/constants");
10
10
  /** @jsx jsx */
11
11
 
12
- var gridSize = (0, _constants.gridSize)();
13
12
  var fontFamily = (0, _constants.fontFamily)();
14
13
  var requiredIndicatorStyles = (0, _react.css)({
15
- paddingLeft: "".concat(gridSize / 4, "px"),
14
+ paddingLeft: "var(--ds-space-025, 2px)",
16
15
  color: "var(--ds-text-danger, ".concat(_colors.R400, ")"),
17
16
  fontFamily: fontFamily
18
17
  });
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/form",
3
- "version": "8.11.3",
3
+ "version": "8.11.5",
4
4
  "sideEffects": false
5
5
  }
@@ -3,13 +3,11 @@ import { createContext, useContext, useEffect, useMemo, useRef, useState } from
3
3
  import { css, jsx } from '@emotion/react';
4
4
  import { uid } from 'react-uid';
5
5
  import invariant from 'tiny-invariant';
6
- import { gridSize as getGridSize } from '@atlaskit/theme/constants';
7
6
  import { FormContext, IsDisabledContext } from './form';
8
7
  import Label from './label';
9
8
  import RequiredAsterisk from './required-asterisk';
10
- const gridSize = getGridSize();
11
9
  const fieldWrapperStyles = css({
12
- marginTop: gridSize
10
+ marginTop: "var(--ds-space-100, 8px)"
13
11
  });
14
12
  function isEvent(event) {
15
13
  return Boolean(event && event.target);
@@ -3,10 +3,9 @@
3
3
  import { css, jsx } from '@emotion/react';
4
4
  import { subtleHeading } from '@atlaskit/theme/colors';
5
5
  import { useGlobalTheme } from '@atlaskit/theme/components';
6
- import { fontFamily as getFontFamily, gridSize as getGridSize } from '@atlaskit/theme/constants';
6
+ import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
7
7
  import { h200 } from '@atlaskit/theme/typography';
8
8
  const fontFamily = getFontFamily();
9
- const gridSize = getGridSize();
10
9
  const fieldsetLabelStyles = css({
11
10
  display: 'inline-block',
12
11
  marginTop: 0,
@@ -14,7 +13,7 @@ const fieldsetLabelStyles = css({
14
13
  fontFamily: `${fontFamily}`
15
14
  });
16
15
  const fieldSetStyles = css({
17
- marginTop: `${gridSize}px`
16
+ marginTop: "var(--ds-space-100, 8px)"
18
17
  });
19
18
 
20
19
  /**
@@ -2,21 +2,20 @@
2
2
 
3
3
  import { css, jsx } from '@emotion/react';
4
4
  import { useGlobalTheme } from '@atlaskit/theme/components';
5
- import { fontFamily as getFontFamily, gridSize as getGridSize } from '@atlaskit/theme/constants';
5
+ import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
6
6
  import { h700 } from '@atlaskit/theme/typography';
7
- const gridSize = getGridSize();
8
7
  const fontFamily = getFontFamily();
9
8
  const formHeaderContentStyles = css({
10
9
  minWidth: '100%',
11
- marginTop: `${gridSize}px`
10
+ marginTop: "var(--ds-space-100, 8px)"
12
11
  });
13
12
  const formHeaderDescriptionStyles = css({
14
- marginTop: `${gridSize}px`
13
+ marginTop: "var(--ds-space-100, 8px)"
15
14
  });
16
15
  const formHeaderTitleStyles = css({
17
16
  marginTop: 0,
18
- marginRight: `${gridSize * 4}px`,
19
- lineHeight: `${gridSize * 4}px`,
17
+ marginRight: "var(--ds-space-400, 32px)",
18
+ lineHeight: "var(--ds-font-lineHeight-500, 32px)",
20
19
  overflow: 'hidden',
21
20
  textOverflow: 'ellipsis',
22
21
  whiteSpace: 'nowrap'
@@ -3,14 +3,13 @@
3
3
  import { css, jsx } from '@emotion/react';
4
4
  import { subtleHeading } from '@atlaskit/theme/colors';
5
5
  import { useGlobalTheme } from '@atlaskit/theme/components';
6
- import { fontFamily as getFontFamily, gridSize as getGridSize } from '@atlaskit/theme/constants';
6
+ import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
7
7
  import { h200 } from '@atlaskit/theme/typography';
8
8
  const fontFamily = getFontFamily();
9
- const gridSize = getGridSize();
10
9
  const labelStyles = css({
11
10
  display: 'inline-block',
12
11
  marginTop: 0,
13
- marginBottom: gridSize / 2,
12
+ marginBottom: "var(--ds-space-050, 4px)",
14
13
  fontFamily: fontFamily
15
14
  });
16
15
 
@@ -6,7 +6,7 @@ import SuccessIcon from '@atlaskit/icon/glyph/editor/success';
6
6
  import ErrorIcon from '@atlaskit/icon/glyph/error';
7
7
  import { N200 } from '@atlaskit/theme/colors';
8
8
  import { useGlobalTheme } from '@atlaskit/theme/components';
9
- import { fontFamily as getFontFamily, gridSize as getGridSize } from '@atlaskit/theme/constants';
9
+ import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
10
10
  import { h200 } from '@atlaskit/theme/typography';
11
11
  import { FieldId } from './field';
12
12
 
@@ -18,7 +18,6 @@ import { FieldId } from './field';
18
18
  * Public API of the various message components.
19
19
  */
20
20
 
21
- const gridSize = getGridSize();
22
21
  const fontFamily = getFontFamily();
23
22
 
24
23
  // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
@@ -35,7 +34,7 @@ const darkH200Styles = css(h200({
35
34
  }));
36
35
  const messageStyles = css({
37
36
  display: 'flex',
38
- marginTop: `${gridSize * 0.5}px`,
37
+ marginTop: "var(--ds-space-050, 4px)",
39
38
  justifyContent: 'baseline',
40
39
  fontFamily: `${fontFamily}`,
41
40
  fontWeight: 'normal'
@@ -1,11 +1,10 @@
1
1
  /** @jsx jsx */
2
2
  import { css, jsx } from '@emotion/react';
3
3
  import { R400 } from '@atlaskit/theme/colors';
4
- import { fontFamily as getFontFamily, gridSize as getGridSize } from '@atlaskit/theme/constants';
5
- const gridSize = getGridSize();
4
+ import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
6
5
  const fontFamily = getFontFamily();
7
6
  const requiredIndicatorStyles = css({
8
- paddingLeft: `${gridSize / 4}px`,
7
+ paddingLeft: "var(--ds-space-025, 2px)",
9
8
  color: `var(--ds-text-danger, ${R400})`,
10
9
  fontFamily
11
10
  });
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/form",
3
- "version": "8.11.3",
3
+ "version": "8.11.5",
4
4
  "sideEffects": false
5
5
  }
package/dist/esm/field.js CHANGED
@@ -8,13 +8,11 @@ import { createContext, useContext, useEffect, useMemo, useRef, useState } from
8
8
  import { css, jsx } from '@emotion/react';
9
9
  import { uid } from 'react-uid';
10
10
  import invariant from 'tiny-invariant';
11
- import { gridSize as getGridSize } from '@atlaskit/theme/constants';
12
11
  import { FormContext, IsDisabledContext } from './form';
13
12
  import Label from './label';
14
13
  import RequiredAsterisk from './required-asterisk';
15
- var gridSize = getGridSize();
16
14
  var fieldWrapperStyles = css({
17
- marginTop: gridSize
15
+ marginTop: "var(--ds-space-100, 8px)"
18
16
  });
19
17
  function isEvent(event) {
20
18
  return Boolean(event && event.target);
@@ -3,10 +3,9 @@
3
3
  import { css, jsx } from '@emotion/react';
4
4
  import { subtleHeading } from '@atlaskit/theme/colors';
5
5
  import { useGlobalTheme } from '@atlaskit/theme/components';
6
- import { fontFamily as getFontFamily, gridSize as getGridSize } from '@atlaskit/theme/constants';
6
+ import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
7
7
  import { h200 } from '@atlaskit/theme/typography';
8
8
  var fontFamily = getFontFamily();
9
- var gridSize = getGridSize();
10
9
  var fieldsetLabelStyles = css({
11
10
  display: 'inline-block',
12
11
  marginTop: 0,
@@ -14,7 +13,7 @@ var fieldsetLabelStyles = css({
14
13
  fontFamily: "".concat(fontFamily)
15
14
  });
16
15
  var fieldSetStyles = css({
17
- marginTop: "".concat(gridSize, "px")
16
+ marginTop: "var(--ds-space-100, 8px)"
18
17
  });
19
18
 
20
19
  /**
@@ -2,21 +2,20 @@
2
2
 
3
3
  import { css, jsx } from '@emotion/react';
4
4
  import { useGlobalTheme } from '@atlaskit/theme/components';
5
- import { fontFamily as getFontFamily, gridSize as getGridSize } from '@atlaskit/theme/constants';
5
+ import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
6
6
  import { h700 } from '@atlaskit/theme/typography';
7
- var gridSize = getGridSize();
8
7
  var fontFamily = getFontFamily();
9
8
  var formHeaderContentStyles = css({
10
9
  minWidth: '100%',
11
- marginTop: "".concat(gridSize, "px")
10
+ marginTop: "var(--ds-space-100, 8px)"
12
11
  });
13
12
  var formHeaderDescriptionStyles = css({
14
- marginTop: "".concat(gridSize, "px")
13
+ marginTop: "var(--ds-space-100, 8px)"
15
14
  });
16
15
  var formHeaderTitleStyles = css({
17
16
  marginTop: 0,
18
- marginRight: "".concat(gridSize * 4, "px"),
19
- lineHeight: "".concat(gridSize * 4, "px"),
17
+ marginRight: "var(--ds-space-400, 32px)",
18
+ lineHeight: "var(--ds-font-lineHeight-500, 32px)",
20
19
  overflow: 'hidden',
21
20
  textOverflow: 'ellipsis',
22
21
  whiteSpace: 'nowrap'
package/dist/esm/label.js CHANGED
@@ -3,14 +3,13 @@
3
3
  import { css, jsx } from '@emotion/react';
4
4
  import { subtleHeading } from '@atlaskit/theme/colors';
5
5
  import { useGlobalTheme } from '@atlaskit/theme/components';
6
- import { fontFamily as getFontFamily, gridSize as getGridSize } from '@atlaskit/theme/constants';
6
+ import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
7
7
  import { h200 } from '@atlaskit/theme/typography';
8
8
  var fontFamily = getFontFamily();
9
- var gridSize = getGridSize();
10
9
  var labelStyles = css({
11
10
  display: 'inline-block',
12
11
  marginTop: 0,
13
- marginBottom: gridSize / 2,
12
+ marginBottom: "var(--ds-space-050, 4px)",
14
13
  fontFamily: fontFamily
15
14
  });
16
15
 
@@ -6,7 +6,7 @@ import SuccessIcon from '@atlaskit/icon/glyph/editor/success';
6
6
  import ErrorIcon from '@atlaskit/icon/glyph/error';
7
7
  import { N200 } from '@atlaskit/theme/colors';
8
8
  import { useGlobalTheme } from '@atlaskit/theme/components';
9
- import { fontFamily as getFontFamily, gridSize as getGridSize } from '@atlaskit/theme/constants';
9
+ import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
10
10
  import { h200 } from '@atlaskit/theme/typography';
11
11
  import { FieldId } from './field';
12
12
 
@@ -18,7 +18,6 @@ import { FieldId } from './field';
18
18
  * Public API of the various message components.
19
19
  */
20
20
 
21
- var gridSize = getGridSize();
22
21
  var fontFamily = getFontFamily();
23
22
 
24
23
  // eslint-disable-next-line @repo/internal/react/consistent-css-prop-usage
@@ -35,7 +34,7 @@ var darkH200Styles = css(h200({
35
34
  }));
36
35
  var messageStyles = css({
37
36
  display: 'flex',
38
- marginTop: "".concat(gridSize * 0.5, "px"),
37
+ marginTop: "var(--ds-space-050, 4px)",
39
38
  justifyContent: 'baseline',
40
39
  fontFamily: "".concat(fontFamily),
41
40
  fontWeight: 'normal'
@@ -1,11 +1,10 @@
1
1
  /** @jsx jsx */
2
2
  import { css, jsx } from '@emotion/react';
3
3
  import { R400 } from '@atlaskit/theme/colors';
4
- import { fontFamily as getFontFamily, gridSize as getGridSize } from '@atlaskit/theme/constants';
5
- var gridSize = getGridSize();
4
+ import { fontFamily as getFontFamily } from '@atlaskit/theme/constants';
6
5
  var fontFamily = getFontFamily();
7
6
  var requiredIndicatorStyles = css({
8
- paddingLeft: "".concat(gridSize / 4, "px"),
7
+ paddingLeft: "var(--ds-space-025, 2px)",
9
8
  color: "var(--ds-text-danger, ".concat(R400, ")"),
10
9
  fontFamily: fontFamily
11
10
  });
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/form",
3
- "version": "8.11.3",
3
+ "version": "8.11.5",
4
4
  "sideEffects": false
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/form",
3
- "version": "8.11.3",
3
+ "version": "8.11.5",
4
4
  "description": "A form allows users to input information.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -64,19 +64,19 @@
64
64
  "@atlaskit/button": "^16.7.0",
65
65
  "@atlaskit/calendar": "^13.1.0",
66
66
  "@atlaskit/checkbox": "^12.6.0",
67
- "@atlaskit/datetime-picker": "^12.5.0",
67
+ "@atlaskit/datetime-picker": "^12.6.0",
68
68
  "@atlaskit/docs": "^9.1.0",
69
69
  "@atlaskit/dropdown-menu": "^11.9.0",
70
70
  "@atlaskit/ds-lib": "^2.2.0",
71
71
  "@atlaskit/lozenge": "^11.4.0",
72
72
  "@atlaskit/modal-dialog": "^12.5.0",
73
- "@atlaskit/radio": "^5.5.0",
73
+ "@atlaskit/radio": "^5.6.0",
74
74
  "@atlaskit/range": "^7.1.0",
75
75
  "@atlaskit/section-message": "^6.4.0",
76
- "@atlaskit/select": "^16.2.0",
76
+ "@atlaskit/select": "^16.4.0",
77
77
  "@atlaskit/ssr": "*",
78
- "@atlaskit/textarea": "^4.6.0",
79
- "@atlaskit/textfield": "^5.4.0",
78
+ "@atlaskit/textarea": "^4.7.0",
79
+ "@atlaskit/textfield": "^5.5.0",
80
80
  "@atlaskit/toggle": "^12.6.0",
81
81
  "@atlaskit/tooltip": "^17.8.0",
82
82
  "@atlaskit/visual-regression": "*",
@@ -106,7 +106,8 @@
106
106
  "dom-events": "use-bind-event-listener",
107
107
  "analytics": "analytics-next",
108
108
  "design-tokens": [
109
- "color"
109
+ "color",
110
+ "spacing"
110
111
  ],
111
112
  "theming": [
112
113
  "react-context"