@atlaskit/visually-hidden 2.0.0 → 3.0.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 CHANGED
@@ -1,5 +1,28 @@
1
1
  # @atlaskit/visually-hidden
2
2
 
3
+ ## 3.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#128442](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/128442)
8
+ [`e01d9e5a20367`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/e01d9e5a20367) -
9
+ Update dependencies.
10
+
11
+ ## 3.0.0
12
+
13
+ ### Major Changes
14
+
15
+ - [#121002](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/121002)
16
+ [`9ddb610c46576`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9ddb610c46576) -
17
+ Migrated from `@emotion/react` to `@compiled/react` in order to improve performance, align with
18
+ the rest of the Atlaskit techstack, and support React 18 Streaming SSR.
19
+
20
+ Please note, in order to use this version of `@atlaskit/visually-hidden`, you will need to ensure
21
+ that your bundler is configured to handle `.css` imports correctly. Most bundlers come with
22
+ built-in support for `.css` imports, so you may not need to do anything. If you are using a
23
+ different bundler, please refer to the documentation for that bundler to understand how to handle
24
+ `.css` imports.
25
+
3
26
  ## 2.0.0
4
27
 
5
28
  ### Major Changes
@@ -0,0 +1,12 @@
1
+
2
+ ._19itidpf{border:0}._18m915vq{overflow-y:hidden}
3
+ ._19bvidpf{padding-left:0}
4
+ ._1bsbt94y{width:1px}
5
+ ._1reo15vq{overflow-x:hidden}
6
+ ._4t3it94y{height:1px}
7
+ ._ca0qidpf{padding-top:0}
8
+ ._kqswstnw{position:absolute}
9
+ ._n3tdidpf{padding-bottom:0}
10
+ ._o5721q9c{white-space:nowrap}
11
+ ._ogto7mnp{clip:rect(1px,1px,1px,1px)}
12
+ ._u5f3idpf{padding-right:0}
@@ -1,28 +1,19 @@
1
+ /* visually-hidden.tsx generated by @compiled/babel-plugin v0.36.1 */
2
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
3
+ // eslint-disable-next-line @atlaskit/design-system/use-visually-hidden
1
4
  "use strict";
2
5
 
6
+ var _typeof = require("@babel/runtime/helpers/typeof");
3
7
  Object.defineProperty(exports, "__esModule", {
4
8
  value: true
5
9
  });
6
10
  exports.default = void 0;
7
- var _react = require("@emotion/react");
8
- /**
9
- * @jsxRuntime classic
10
- * @jsx jsx
11
- */
12
-
13
- // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
14
-
15
- // eslint-disable-next-line @atlaskit/design-system/use-visually-hidden
16
- var visuallyHiddenStyles = (0, _react.css)({
17
- width: '1px',
18
- height: '1px',
19
- padding: '0',
20
- position: 'absolute',
21
- border: '0',
22
- clip: 'rect(1px, 1px, 1px, 1px)',
23
- overflow: 'hidden',
24
- whiteSpace: 'nowrap'
25
- });
11
+ require("./visually-hidden.compiled.css");
12
+ var React = _interopRequireWildcard(require("react"));
13
+ var _runtime = require("@compiled/react/runtime");
14
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
15
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
+ var visuallyHiddenStyles = null;
26
17
 
27
18
  /**
28
19
  * __Visually hidden__
@@ -47,11 +38,11 @@ var VisuallyHidden = function VisuallyHidden(_ref) {
47
38
  testId = _ref.testId,
48
39
  role = _ref.role,
49
40
  id = _ref.id;
50
- return (0, _react.jsx)("span", {
41
+ return /*#__PURE__*/React.createElement("span", {
51
42
  id: id,
52
43
  "data-testid": testId,
53
- css: visuallyHiddenStyles,
54
- role: role
44
+ role: role,
45
+ className: (0, _runtime.ax)(["_ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _19itidpf _1reo15vq _18m915vq _1bsbt94y _4t3it94y _kqswstnw _ogto7mnp _o5721q9c"])
55
46
  }, children);
56
47
  };
57
48
  var _default = exports.default = VisuallyHidden;
@@ -0,0 +1,12 @@
1
+
2
+ ._19itidpf{border:0}._18m915vq{overflow-y:hidden}
3
+ ._19bvidpf{padding-left:0}
4
+ ._1bsbt94y{width:1px}
5
+ ._1reo15vq{overflow-x:hidden}
6
+ ._4t3it94y{height:1px}
7
+ ._ca0qidpf{padding-top:0}
8
+ ._kqswstnw{position:absolute}
9
+ ._n3tdidpf{padding-bottom:0}
10
+ ._o5721q9c{white-space:nowrap}
11
+ ._ogto7mnp{clip:rect(1px,1px,1px,1px)}
12
+ ._u5f3idpf{padding-right:0}
@@ -1,21 +1,10 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
-
1
+ /* visually-hidden.tsx generated by @compiled/babel-plugin v0.36.1 */
6
2
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
- import { css, jsx } from '@emotion/react';
8
3
  // eslint-disable-next-line @atlaskit/design-system/use-visually-hidden
9
- const visuallyHiddenStyles = css({
10
- width: '1px',
11
- height: '1px',
12
- padding: '0',
13
- position: 'absolute',
14
- border: '0',
15
- clip: 'rect(1px, 1px, 1px, 1px)',
16
- overflow: 'hidden',
17
- whiteSpace: 'nowrap'
18
- });
4
+ import "./visually-hidden.compiled.css";
5
+ import * as React from 'react';
6
+ import { ax, ix } from "@compiled/react/runtime";
7
+ const visuallyHiddenStyles = null;
19
8
 
20
9
  /**
21
10
  * __Visually hidden__
@@ -41,11 +30,11 @@ const VisuallyHidden = ({
41
30
  role,
42
31
  id
43
32
  }) => {
44
- return jsx("span", {
33
+ return /*#__PURE__*/React.createElement("span", {
45
34
  id: id,
46
35
  "data-testid": testId,
47
- css: visuallyHiddenStyles,
48
- role: role
36
+ role: role,
37
+ className: ax(["_ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _19itidpf _1reo15vq _18m915vq _1bsbt94y _4t3it94y _kqswstnw _ogto7mnp _o5721q9c"])
49
38
  }, children);
50
39
  };
51
40
  export default VisuallyHidden;
@@ -0,0 +1,12 @@
1
+
2
+ ._19itidpf{border:0}._18m915vq{overflow-y:hidden}
3
+ ._19bvidpf{padding-left:0}
4
+ ._1bsbt94y{width:1px}
5
+ ._1reo15vq{overflow-x:hidden}
6
+ ._4t3it94y{height:1px}
7
+ ._ca0qidpf{padding-top:0}
8
+ ._kqswstnw{position:absolute}
9
+ ._n3tdidpf{padding-bottom:0}
10
+ ._o5721q9c{white-space:nowrap}
11
+ ._ogto7mnp{clip:rect(1px,1px,1px,1px)}
12
+ ._u5f3idpf{padding-right:0}
@@ -1,21 +1,10 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
-
1
+ /* visually-hidden.tsx generated by @compiled/babel-plugin v0.36.1 */
6
2
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
7
- import { css, jsx } from '@emotion/react';
8
3
  // eslint-disable-next-line @atlaskit/design-system/use-visually-hidden
9
- var visuallyHiddenStyles = css({
10
- width: '1px',
11
- height: '1px',
12
- padding: '0',
13
- position: 'absolute',
14
- border: '0',
15
- clip: 'rect(1px, 1px, 1px, 1px)',
16
- overflow: 'hidden',
17
- whiteSpace: 'nowrap'
18
- });
4
+ import "./visually-hidden.compiled.css";
5
+ import * as React from 'react';
6
+ import { ax, ix } from "@compiled/react/runtime";
7
+ var visuallyHiddenStyles = null;
19
8
 
20
9
  /**
21
10
  * __Visually hidden__
@@ -40,11 +29,11 @@ var VisuallyHidden = function VisuallyHidden(_ref) {
40
29
  testId = _ref.testId,
41
30
  role = _ref.role,
42
31
  id = _ref.id;
43
- return jsx("span", {
32
+ return /*#__PURE__*/React.createElement("span", {
44
33
  id: id,
45
34
  "data-testid": testId,
46
- css: visuallyHiddenStyles,
47
- role: role
35
+ role: role,
36
+ className: ax(["_ca0qidpf _u5f3idpf _n3tdidpf _19bvidpf _19itidpf _1reo15vq _18m915vq _1bsbt94y _4t3it94y _kqswstnw _ogto7mnp _o5721q9c"])
48
37
  }, children);
49
38
  };
50
39
  export default VisuallyHidden;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/visually-hidden",
3
- "version": "2.0.0",
3
+ "version": "3.0.1",
4
4
  "description": "A utility that hides content from the screen while retaining readability by screen readers for accessibility.",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -26,18 +26,23 @@
26
26
  },
27
27
  "dependencies": {
28
28
  "@babel/runtime": "^7.0.0",
29
- "@emotion/react": "^11.7.1"
29
+ "@compiled/react": "^0.18.2"
30
30
  },
31
31
  "peerDependencies": {
32
32
  "react": "^18.2.0"
33
33
  },
34
34
  "devDependencies": {
35
- "@af/accessibility-testing": "*",
36
- "@af/integration-testing": "*",
35
+ "@af/accessibility-testing": "^2.0.0",
36
+ "@af/integration-testing": "^0.5.0",
37
+ "@af/visual-regression": "^1.3.0",
38
+ "@atlaskit/button": "^21.1.0",
39
+ "@atlaskit/docs": "^10.0.0",
37
40
  "@atlaskit/ds-lib": "^4.0.0",
38
- "@atlaskit/ssr": "*",
41
+ "@atlaskit/link": "^3.0.0",
42
+ "@atlaskit/section-message": "^8.2.0",
43
+ "@atlaskit/ssr": "^0.4.0",
39
44
  "@atlaskit/toggle": "^15.0.0",
40
- "@atlaskit/visual-regression": "^0.10.0",
45
+ "@atlaskit/tokens": "^4.5.0",
41
46
  "@testing-library/react": "^13.4.0",
42
47
  "react-dom": "^18.2.0",
43
48
  "typescript": "~5.4.2"