@atlaskit/visually-hidden 1.1.2 → 1.2.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,11 @@
1
1
  # @atlaskit/visually-hidden
2
2
 
3
+ ## 1.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`56507598609`](https://bitbucket.org/atlassian/atlassian-frontend/commits/56507598609) - Skip minor dependency bump
8
+
3
9
  ## 1.1.2
4
10
 
5
11
  ### Patch Changes
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Visually hidden
2
2
 
3
- A composable element that hides elements from the screen while keeping them accessible.
3
+ A utility that hides content from the screen while retaining readability by screen readers for accessibility.
4
4
 
5
5
  ## Installation
6
6
 
@@ -10,13 +10,4 @@ yarn add @atlaskit/visually-hidden
10
10
 
11
11
  ## Usage
12
12
 
13
- ```jsx
14
- import VisuallyHidden from '@atlaskit/visually-hidden';
15
-
16
- export default () => (
17
- <div style={{ border: '1px solid black' }}>
18
- There is text hidden between the brackets [
19
- <VisuallyHidden>Can't see me!</VisuallyHidden>]
20
- </div>
21
- );
22
- ```
13
+ [View documentation](https://atlassian.design/components/visually-hidden/).
package/dist/cjs/index.js CHANGED
@@ -1,7 +1,6 @@
1
1
  "use strict";
2
2
 
3
3
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
-
5
4
  Object.defineProperty(exports, "__esModule", {
6
5
  value: true
7
6
  });
@@ -11,5 +10,4 @@ Object.defineProperty(exports, "default", {
11
10
  return _visuallyHidden.default;
12
11
  }
13
12
  });
14
-
15
13
  var _visuallyHidden = _interopRequireDefault(require("./visually-hidden"));
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/visually-hidden",
3
- "version": "1.1.2",
3
+ "version": "1.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -4,10 +4,9 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.default = void 0;
7
-
8
7
  var _react = require("@emotion/react");
9
-
10
8
  /** @jsx jsx */
9
+
11
10
  // eslint-disable-next-line @atlaskit/design-system/use-visually-hidden
12
11
  var visuallyHiddenStyles = (0, _react.css)({
13
12
  width: '1px',
@@ -19,6 +18,7 @@ var visuallyHiddenStyles = (0, _react.css)({
19
18
  overflow: 'hidden',
20
19
  whiteSpace: 'nowrap'
21
20
  });
21
+
22
22
  /**
23
23
  * __Visually hidden__
24
24
  *
@@ -37,12 +37,11 @@ var visuallyHiddenStyles = (0, _react.css)({
37
37
  * );
38
38
  * ```
39
39
  */
40
-
41
40
  var VisuallyHidden = function VisuallyHidden(_ref) {
42
41
  var children = _ref.children,
43
- testId = _ref.testId,
44
- role = _ref.role,
45
- id = _ref.id;
42
+ testId = _ref.testId,
43
+ role = _ref.role,
44
+ id = _ref.id;
46
45
  return (0, _react.jsx)("span", {
47
46
  id: id,
48
47
  "data-testid": testId,
@@ -50,6 +49,5 @@ var VisuallyHidden = function VisuallyHidden(_ref) {
50
49
  role: role
51
50
  }, children);
52
51
  };
53
-
54
52
  var _default = VisuallyHidden;
55
53
  exports.default = _default;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/visually-hidden",
3
- "version": "1.1.2",
3
+ "version": "1.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,4 +1,5 @@
1
1
  /** @jsx jsx */
2
+
2
3
  import { css, jsx } from '@emotion/react';
3
4
  // eslint-disable-next-line @atlaskit/design-system/use-visually-hidden
4
5
  const visuallyHiddenStyles = css({
@@ -11,6 +12,7 @@ const visuallyHiddenStyles = css({
11
12
  overflow: 'hidden',
12
13
  whiteSpace: 'nowrap'
13
14
  });
15
+
14
16
  /**
15
17
  * __Visually hidden__
16
18
  *
@@ -29,7 +31,6 @@ const visuallyHiddenStyles = css({
29
31
  * );
30
32
  * ```
31
33
  */
32
-
33
34
  const VisuallyHidden = ({
34
35
  children,
35
36
  testId,
@@ -43,5 +44,4 @@ const VisuallyHidden = ({
43
44
  role: role
44
45
  }, children);
45
46
  };
46
-
47
47
  export default VisuallyHidden;
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/visually-hidden",
3
- "version": "1.1.2",
3
+ "version": "1.2.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1,4 +1,5 @@
1
1
  /** @jsx jsx */
2
+
2
3
  import { css, jsx } from '@emotion/react';
3
4
  // eslint-disable-next-line @atlaskit/design-system/use-visually-hidden
4
5
  var visuallyHiddenStyles = css({
@@ -11,6 +12,7 @@ var visuallyHiddenStyles = css({
11
12
  overflow: 'hidden',
12
13
  whiteSpace: 'nowrap'
13
14
  });
15
+
14
16
  /**
15
17
  * __Visually hidden__
16
18
  *
@@ -29,12 +31,11 @@ var visuallyHiddenStyles = css({
29
31
  * );
30
32
  * ```
31
33
  */
32
-
33
34
  var VisuallyHidden = function VisuallyHidden(_ref) {
34
35
  var children = _ref.children,
35
- testId = _ref.testId,
36
- role = _ref.role,
37
- id = _ref.id;
36
+ testId = _ref.testId,
37
+ role = _ref.role,
38
+ id = _ref.id;
38
39
  return jsx("span", {
39
40
  id: id,
40
41
  "data-testid": testId,
@@ -42,5 +43,4 @@ var VisuallyHidden = function VisuallyHidden(_ref) {
42
43
  role: role
43
44
  }, children);
44
45
  };
45
-
46
46
  export default VisuallyHidden;
@@ -1,17 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
2
  export declare type VisuallyHiddenProps = {
3
- /**
4
- * A `testId` prop is provided for specified elements, which is a unique
5
- * string that appears as a data attribute `data-testid` in the rendered code,
6
- * serving as a hook for automated tests
7
- */
8
- testId?: string;
9
3
  /**
10
4
  * The element or elements that should be hidden.
11
5
  */
12
6
  children: ReactNode;
13
7
  /**
14
- * Role attribute is passed on to the span to aid screen readers.
8
+ * An ARIA role attribute to aid screen readers.
15
9
  */
16
10
  role?: string;
17
11
  /**
@@ -19,4 +13,10 @@ export declare type VisuallyHiddenProps = {
19
13
  * on a paired element.
20
14
  */
21
15
  id?: string;
16
+ /**
17
+ * A `testId` prop is provided for specified elements, which is a unique
18
+ * string that appears as a data attribute `data-testid` in the rendered code,
19
+ * serving as a hook for automated tests.
20
+ */
21
+ testId?: string;
22
22
  };
package/package.json CHANGED
@@ -1,14 +1,13 @@
1
1
  {
2
2
  "name": "@atlaskit/visually-hidden",
3
- "version": "1.1.2",
4
- "description": "A composable element that hides elements from the screen while keeping them accessible.",
3
+ "version": "1.2.0",
4
+ "description": "A utility that hides content from the screen while retaining readability by screen readers for accessibility.",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
7
7
  "publishConfig": {
8
8
  "registry": "https://registry.npmjs.org/"
9
9
  },
10
10
  "atlassian": {
11
- "disableProductCI": true,
12
11
  "team": "Design System Team",
13
12
  "inPublicMirror": true,
14
13
  "releaseModel": "scheduled",
@@ -22,14 +21,6 @@
22
21
  "module": "dist/esm/index.js",
23
22
  "module:es2019": "dist/es2019/index.js",
24
23
  "types": "dist/types/index.d.ts",
25
- "typesVersions": {
26
- ">=4.0 <4.5": {
27
- "*": [
28
- "dist/types-ts4.0/*",
29
- "dist/types-ts4.0/index.d.ts"
30
- ]
31
- }
32
- },
33
24
  "sideEffects": false,
34
25
  "atlaskit:src": "src/index.tsx",
35
26
  "af:exports": {
@@ -43,9 +34,13 @@
43
34
  "react": "^16.8.0"
44
35
  },
45
36
  "devDependencies": {
37
+ "@atlaskit/button": "^16.7.0",
46
38
  "@atlaskit/docs": "*",
47
- "@atlaskit/ds-lib": "^2.0.1",
39
+ "@atlaskit/ds-lib": "^2.2.0",
40
+ "@atlaskit/section-message": "^6.4.0",
48
41
  "@atlaskit/ssr": "*",
42
+ "@atlaskit/toggle": "^12.6.0",
43
+ "@atlaskit/tokens": "^1.3.0",
49
44
  "@atlaskit/visual-regression": "^0.8.0",
50
45
  "@atlaskit/webdriver-runner": "*",
51
46
  "@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
@@ -68,10 +63,12 @@
68
63
  ],
69
64
  "ui-components": "lite-mode",
70
65
  "analytics": "analytics-next",
71
- "theming": "tokens",
66
+ "design-tokens": [
67
+ "color"
68
+ ],
72
69
  "deprecation": "no-deprecated-imports"
73
70
  }
74
71
  },
75
- "homepage": "https://atlaskit.atlassian.com/packages/design-system/visually-hidden",
72
+ "homepage": "https://atlassian.design/components/visually-hidden/",
76
73
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0"
77
74
  }
package/report.api.md CHANGED
@@ -1,55 +1,35 @@
1
- ## API Report File for "@atlaskit/visually-hidden".
1
+ <!-- API Report Version: 2.3 -->
2
2
 
3
- > Do not edit this file. This report is auto-generated by [API Extractor](https://api-extractor.com/).
3
+ ## API Report File for "@atlaskit/visually-hidden"
4
4
 
5
- [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
5
+ > Do not edit this file. This report is auto-generated using [API Extractor](https://api-extractor.com/).
6
+ > [Learn more about API reports](https://hello.atlassian.net/wiki/spaces/UR/pages/1825484529/Package+API+Reports)
6
7
 
7
- ````ts
8
+ ### Table of contents
9
+
10
+ - [Main Entry Types](#main-entry-types)
11
+
12
+ ### Main Entry Types
13
+
14
+ <!--SECTION START: Main Entry Types-->
15
+
16
+ ```ts
8
17
  import { FC } from 'react';
9
18
  import { ReactNode } from 'react';
10
19
 
11
- /**
12
- * __Visually hidden__
13
- *
14
- * A composable element to apply a visually hidden effect to children.
15
- * Useful for accessibility compliance.
16
- *
17
- * @example
18
- * ```jsx
19
- * import VisuallyHidden from '@atlaskit/visually-hidden';
20
- *
21
- * export default () => (
22
- * <div style={{ border: '1px solid black' }}>
23
- * There is text hidden between the brackets [
24
- * <VisuallyHidden>Can't see me!</VisuallyHidden>]
25
- * </div>
26
- * );
27
- * ```
28
- */
29
- declare const VisuallyHidden: FC<VisuallyHiddenProps>;
20
+ // @public
21
+ const VisuallyHidden: FC<VisuallyHiddenProps>;
30
22
  export default VisuallyHidden;
31
23
 
32
- export declare type VisuallyHiddenProps = {
33
- /**
34
- * A `testId` prop is provided for specified elements, which is a unique
35
- * string that appears as a data attribute `data-testid` in the rendered code,
36
- * serving as a hook for automated tests
37
- */
24
+ // @public (undocumented)
25
+ export type VisuallyHiddenProps = {
38
26
  testId?: string;
39
- /**
40
- * The element or elements that should be hidden.
41
- */
42
27
  children: ReactNode;
43
- /**
44
- * Role attribute is passed on to the span to aid screen readers.
45
- */
46
28
  role?: string;
47
- /**
48
- * An id may be appropriate for this component if used in conjunction with `aria-describedby`
49
- * on a paired element.
50
- */
51
29
  id?: string;
52
30
  };
53
31
 
54
- export {};
55
- ````
32
+ // (No @packageDocumentation comment for this package)
33
+ ```
34
+
35
+ <!--SECTION END: Main Entry Types-->
@@ -1,2 +0,0 @@
1
- export { default } from './visually-hidden';
2
- export type { VisuallyHiddenProps } from './types';
@@ -1,22 +0,0 @@
1
- import { ReactNode } from 'react';
2
- export declare type VisuallyHiddenProps = {
3
- /**
4
- * A `testId` prop is provided for specified elements, which is a unique
5
- * string that appears as a data attribute `data-testid` in the rendered code,
6
- * serving as a hook for automated tests
7
- */
8
- testId?: string;
9
- /**
10
- * The element or elements that should be hidden.
11
- */
12
- children: ReactNode;
13
- /**
14
- * Role attribute is passed on to the span to aid screen readers.
15
- */
16
- role?: string;
17
- /**
18
- * An id may be appropriate for this component if used in conjunction with `aria-describedby`
19
- * on a paired element.
20
- */
21
- id?: string;
22
- };
@@ -1,23 +0,0 @@
1
- /** @jsx jsx */
2
- import { FC } from 'react';
3
- import type { VisuallyHiddenProps } from './types';
4
- /**
5
- * __Visually hidden__
6
- *
7
- * A composable element to apply a visually hidden effect to children.
8
- * Useful for accessibility compliance.
9
- *
10
- * @example
11
- * ```jsx
12
- * import VisuallyHidden from '@atlaskit/visually-hidden';
13
- *
14
- * export default () => (
15
- * <div style={{ border: '1px solid black' }}>
16
- * There is text hidden between the brackets [
17
- * <VisuallyHidden>Can't see me!</VisuallyHidden>]
18
- * </div>
19
- * );
20
- * ```
21
- */
22
- declare const VisuallyHidden: FC<VisuallyHiddenProps>;
23
- export default VisuallyHidden;