@atlaskit/visually-hidden 3.0.5 → 4.0.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,34 @@
1
1
  # @atlaskit/visually-hidden
2
2
 
3
+ ## 4.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`f2dc9097319f0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f2dc9097319f0) - ###
8
+ Dropped support for _legacy_ Typescript 4 types. **Typescript 5 is now the new minimum**.
9
+
10
+ Removes the `typesVersions` property and `dist/types-ts4.5` directory from the dist.
11
+
12
+ Types are now exclusively via the `"types": "dist/types/index.d.ts"` property.
13
+
14
+ ```diff
15
+ - "typesVersions": {
16
+ - ">=4.5 <4.9": {
17
+ - "*": [
18
+ - "dist/types-ts4.5/*",
19
+ - "dist/types-ts4.5/index.d.ts"
20
+ - ]
21
+ - }
22
+ - },
23
+ ```
24
+
25
+ ## 3.1.0
26
+
27
+ ### Minor Changes
28
+
29
+ - [`aef119573f01b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/aef119573f01b) -
30
+ Autofix: add explicit package exports (barrel removal)
31
+
3
32
  ## 3.0.5
4
33
 
5
34
  ### Patch Changes
@@ -0,0 +1 @@
1
+ "use strict";
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ Object.defineProperty(exports, "default", {
8
+ enumerable: true,
9
+ get: function get() {
10
+ return _visuallyHidden.default;
11
+ }
12
+ });
13
+ var _visuallyHidden = _interopRequireDefault(require("../visually-hidden"));
File without changes
@@ -0,0 +1 @@
1
+ export { default } from '../visually-hidden';
File without changes
@@ -0,0 +1 @@
1
+ export { default } from '../visually-hidden';
@@ -0,0 +1 @@
1
+ export type { VisuallyHiddenProps } from '../types';
@@ -0,0 +1 @@
1
+ export { default } from '../visually-hidden';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/visually-hidden",
3
- "version": "3.0.5",
3
+ "version": "4.0.0",
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/"
@@ -41,16 +41,17 @@
41
41
  "@af/accessibility-testing": "workspace:^",
42
42
  "@af/integration-testing": "workspace:^",
43
43
  "@af/visual-regression": "workspace:^",
44
- "@atlaskit/button": "^23.10.0",
45
- "@atlaskit/docs": "^11.7.0",
46
- "@atlaskit/link": "^3.3.0",
47
- "@atlaskit/section-message": "^8.12.0",
48
- "@atlaskit/toggle": "^15.2.0",
49
- "@atlaskit/tokens": "^11.4.0",
44
+ "@atlaskit/button": "^24.0.0",
45
+ "@atlaskit/docs": "^12.0.0",
46
+ "@atlaskit/link": "^4.0.0",
47
+ "@atlaskit/section-message": "^9.0.0",
48
+ "@atlaskit/toggle": "^17.0.0",
49
+ "@atlaskit/tokens": "^14.0.0",
50
50
  "@atlassian/react-compiler-gating": "workspace:^",
51
51
  "@atlassian/ssr-tests": "workspace:^",
52
52
  "@atlassian/structured-docs-types": "workspace:^",
53
53
  "@testing-library/react": "^16.3.0",
54
+ "react": "^18.2.0",
54
55
  "react-dom": "^18.2.0"
55
56
  },
56
57
  "techstack": {
@@ -74,13 +75,5 @@
74
75
  "deprecation": "no-deprecated-imports"
75
76
  }
76
77
  },
77
- "typesVersions": {
78
- ">=4.5 <4.9": {
79
- "*": [
80
- "dist/types-ts4.5/*",
81
- "dist/types-ts4.5/index.d.ts"
82
- ]
83
- }
84
- },
85
78
  "homepage": "https://atlassian.design/components/visually-hidden/"
86
79
  }
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@atlaskit/visually-hidden/types",
3
+ "main": "../dist/cjs/entry-points/types.js",
4
+ "module": "../dist/esm/entry-points/types.js",
5
+ "module:es2019": "../dist/es2019/entry-points/types.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../dist/types/entry-points/types.d.ts"
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@atlaskit/visually-hidden/visually-hidden",
3
+ "main": "../dist/cjs/entry-points/visually-hidden.js",
4
+ "module": "../dist/esm/entry-points/visually-hidden.js",
5
+ "module:es2019": "../dist/es2019/entry-points/visually-hidden.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../dist/types/entry-points/visually-hidden.d.ts"
10
+ }
@@ -1,46 +1,48 @@
1
1
  import path from 'path';
2
2
 
3
- import type { ComponentStructuredContentSource } from '@atlassian/structured-docs-types';
3
+ import type { StructuredContentSource } from '@atlassian/structured-docs-types/types';
4
4
 
5
- const documentation: ComponentStructuredContentSource[] = [
6
- {
7
- name: 'VisuallyHidden',
8
- description:
9
- 'Content hidden from sight but available to screen readers. Use when meaning is clear visually but not to assistive technology.',
10
- status: 'general-availability',
11
- import: {
5
+ const documentation: StructuredContentSource = {
6
+ components: [
7
+ {
12
8
  name: 'VisuallyHidden',
13
- package: '@atlaskit/visually-hidden',
14
- type: 'default',
15
- packagePath: path.resolve(__dirname),
16
- packageJson: require('./package.json'),
17
- },
18
- usageGuidelines: [
19
- 'Use when meaning is clear visually but not to assistive technology',
20
- 'Avoid clutter—verbose screen-reader-only text can be more harmful than helpful',
21
- 'Use the role prop for semantic meaning when needed',
22
- ],
23
- contentGuidelines: [
24
- 'Use clear, descriptive hidden content',
25
- 'Ensure content adds value for screen readers',
26
- 'Keep content concise but meaningful',
27
- ],
28
- accessibilityGuidelines: [
29
- 'Use for screen reader only content when visual context is insufficient for AT',
30
- 'Use role prop for semantic meaning when appropriate',
31
- 'Balance clarity with brevity—avoid overwhelming screen reader users',
32
- 'Prefer over aria-label in some cases when screen readers need to translate or announce full phrasing',
33
- ],
34
- examples: [
35
- {
36
- name: '00 Basic',
37
- description: '00 Basic example',
38
- source: path.resolve(__dirname, './examples/00-basic.tsx'),
9
+ description:
10
+ 'Content hidden from sight but available to screen readers. Use when meaning is clear visually but not to assistive technology.',
11
+ status: 'general-availability',
12
+ import: {
13
+ name: 'VisuallyHidden',
14
+ package: '@atlaskit/visually-hidden',
15
+ type: 'default',
16
+ packagePath: path.resolve(__dirname),
17
+ packageJson: require('./package.json'),
39
18
  },
40
- ],
41
- keywords: ['hidden', 'accessibility', 'screen-reader', 'aria', 'utility'],
42
- categories: ['utility'],
43
- },
44
- ];
19
+ usageGuidelines: [
20
+ 'Use when meaning is clear visually but not to assistive technology',
21
+ 'Avoid clutter—verbose screen-reader-only text can be more harmful than helpful',
22
+ 'Use the role prop for semantic meaning when needed',
23
+ ],
24
+ contentGuidelines: [
25
+ 'Use clear, descriptive hidden content',
26
+ 'Ensure content adds value for screen readers',
27
+ 'Keep content concise but meaningful',
28
+ ],
29
+ accessibilityGuidelines: [
30
+ 'Use for screen reader only content when visual context is insufficient for AT',
31
+ 'Use role prop for semantic meaning when appropriate',
32
+ 'Balance clarity with brevity—avoid overwhelming screen reader users',
33
+ 'Prefer over aria-label in some cases when screen readers need to translate or announce full phrasing',
34
+ ],
35
+ examples: [
36
+ {
37
+ name: '00 Basic',
38
+ description: '00 Basic example',
39
+ source: path.resolve(__dirname, './examples/00-basic.tsx'),
40
+ },
41
+ ],
42
+ keywords: ['hidden', 'accessibility', 'screen-reader', 'aria', 'utility'],
43
+ categories: ['utility'],
44
+ },
45
+ ],
46
+ };
45
47
 
46
48
  export default documentation;
@@ -1,2 +0,0 @@
1
- export { default } from './visually-hidden';
2
- export type { VisuallyHiddenProps } from './types';
@@ -1,22 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- export type VisuallyHiddenProps = {
3
- /**
4
- * The element or elements that should be hidden.
5
- */
6
- children: ReactNode;
7
- /**
8
- * An ARIA role attribute to aid screen readers.
9
- */
10
- role?: string;
11
- /**
12
- * An id may be appropriate for this component if used in conjunction with `aria-describedby`
13
- * on a paired element.
14
- */
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
- };
@@ -1,26 +0,0 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
- import { type FC } from 'react';
6
- import type { VisuallyHiddenProps } from './types';
7
- /**
8
- * __Visually hidden__
9
- *
10
- * A composable element to apply a visually hidden effect to children.
11
- * Useful for accessibility compliance.
12
- *
13
- * @example
14
- * ```jsx
15
- * import VisuallyHidden from '@atlaskit/visually-hidden';
16
- *
17
- * export default () => (
18
- * <div style={{ border: '1px solid black' }}>
19
- * There is text hidden between the brackets [
20
- * <VisuallyHidden>Can't see me!</VisuallyHidden>]
21
- * </div>
22
- * );
23
- * ```
24
- */
25
- declare const VisuallyHidden: FC<VisuallyHiddenProps>;
26
- export default VisuallyHidden;
package/offerings.json DELETED
@@ -1,34 +0,0 @@
1
- [
2
- {
3
- "name": "VisuallyHidden",
4
- "package": "@atlaskit/visually-hidden",
5
- "import": {
6
- "name": "VisuallyHidden",
7
- "package": "@atlaskit/visually-hidden",
8
- "type": "default"
9
- },
10
- "keywords": ["hidden", "accessibility", "screen-reader", "aria", "utility"],
11
- "categories": ["utility"],
12
- "shortDescription": "A utility component for accessibility.",
13
- "status": "general-availability",
14
- "accessibilityGuidelines": [
15
- "Use for screen reader only content",
16
- "Ensure content is meaningful for assistive technology",
17
- "Use appropriate ARIA roles when needed",
18
- "Consider content context and purpose"
19
- ],
20
- "usageGuidelines": [
21
- "Use for screen reader only content",
22
- "Provide meaningful hidden content",
23
- "Use for accessibility enhancements",
24
- "Consider content context and purpose"
25
- ],
26
- "contentGuidelines": [
27
- "Use clear, descriptive hidden content",
28
- "Ensure content adds value for screen readers",
29
- "Use appropriate language and tone",
30
- "Keep content concise but meaningful"
31
- ],
32
- "examples": ["./examples/00-basic.tsx"]
33
- }
34
- ]