@commercetools-uikit/accessible-hidden 0.0.0-canary-2021830134526
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/LICENSE +21 -0
- package/README.md +86 -0
- package/dist/commercetools-uikit-accessible-hidden.cjs.d.ts +2 -0
- package/dist/commercetools-uikit-accessible-hidden.cjs.dev.js +63 -0
- package/dist/commercetools-uikit-accessible-hidden.cjs.js +7 -0
- package/dist/commercetools-uikit-accessible-hidden.cjs.prod.js +53 -0
- package/dist/commercetools-uikit-accessible-hidden.esm.js +46 -0
- package/dist/declarations/src/accessible-hidden.d.ts +9 -0
- package/dist/declarations/src/index.d.ts +2 -0
- package/dist/declarations/src/version.d.ts +2 -0
- package/package.json +44 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 commercetools GmbH
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
<!-- THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -->
|
|
2
|
+
<!-- This file is created by the `yarn generate-readme` script. -->
|
|
3
|
+
|
|
4
|
+
# AccessibleHidden
|
|
5
|
+
|
|
6
|
+
## Description
|
|
7
|
+
|
|
8
|
+
This component is used to hide content offscreen, removing it from sighted users, while keeping it still accessible to screen readers and other assistive technology.
|
|
9
|
+
It can also be useful for testing with tools like react-testing-library and cypress, which requires querying elements through content which might not be intended to be visible on screen, such as querying for a input by its label while the label is visually hidden.
|
|
10
|
+
|
|
11
|
+
It's the logical opposite of [the `aria-hidden` attribute](https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/ARIA_Techniques/Using_the_aria-hidden_attribute).
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```
|
|
16
|
+
yarn add @commercetools-uikit/accessible-hidden
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
npm --save install @commercetools-uikit/accessible-hidden
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Additionally install the peer dependencies (if not present)
|
|
24
|
+
|
|
25
|
+
```
|
|
26
|
+
yarn add react
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
```
|
|
30
|
+
npm --save install react
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Usage
|
|
34
|
+
|
|
35
|
+
```jsx
|
|
36
|
+
import AccessibleHidden from '@commercetools-uikit/accessible-hidden';
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* In this example, we're showing additional text specifically to be read only
|
|
40
|
+
* by screen readers, to make it more contextualized and easier to understand
|
|
41
|
+
* for non-sighted users (as well "translating" the numeronym which might confuse
|
|
42
|
+
* automatic screen-readers).
|
|
43
|
+
*/
|
|
44
|
+
const Example = () => (
|
|
45
|
+
<div>
|
|
46
|
+
<h3>An Article on A11y</h3>
|
|
47
|
+
<p>A summary of the article</p>
|
|
48
|
+
<button>
|
|
49
|
+
Read More
|
|
50
|
+
<AccessibleHidden> from An Article on Accessibility</AccessibleHidden>
|
|
51
|
+
</button>
|
|
52
|
+
</div>
|
|
53
|
+
);
|
|
54
|
+
|
|
55
|
+
export default Example;
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Properties
|
|
59
|
+
|
|
60
|
+
| Props | Type | Required | Default | Description |
|
|
61
|
+
| ---------- | ----------- | :------: | ------- | ----------- |
|
|
62
|
+
| `children` | `ReactNode` | ✅ | | |
|
|
63
|
+
|
|
64
|
+
## Using the component for a11y testing
|
|
65
|
+
|
|
66
|
+
This is an example for when you would want to render an input without visually displaying a label. You still would want a label to be present so it can be used when testing with RTL as well as supporting a11y.
|
|
67
|
+
|
|
68
|
+
```js
|
|
69
|
+
const rendered = render(
|
|
70
|
+
<>
|
|
71
|
+
<AccessibleHidden>
|
|
72
|
+
<label htmlFor="maiden-name-input">Enter your Maiden Name</label>
|
|
73
|
+
</AccessibleHidden>
|
|
74
|
+
<input id="maiden-name-input" type="text"></input>
|
|
75
|
+
</>
|
|
76
|
+
);
|
|
77
|
+
|
|
78
|
+
expect(rendered.getByLabelText('Enter your Maiden Name')).toBeInTheDocument();
|
|
79
|
+
// ✓ True
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
It is a common requirement to show inputs inside tables. In such a case a sighted user should be able to understand the context of the input through the column header. A label element taking space inside the cell is undesirable.
|
|
83
|
+
|
|
84
|
+
## References:
|
|
85
|
+
|
|
86
|
+
- [The A11Y Project - How-to: Hide Content](https://a11yproject.com/posts/how-to-hide-content/)
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
6
|
+
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
7
|
+
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
8
|
+
var _Object$getOwnPropertyDescriptor = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
9
|
+
var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
10
|
+
var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
|
|
11
|
+
var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
12
|
+
var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
13
|
+
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
14
|
+
var _pt = require('prop-types');
|
|
15
|
+
require('react');
|
|
16
|
+
require('@emotion/react');
|
|
17
|
+
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
18
|
+
|
|
19
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
20
|
+
|
|
21
|
+
var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
22
|
+
var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
|
|
23
|
+
var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
|
|
24
|
+
var _Object$getOwnPropertyDescriptor__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptor);
|
|
25
|
+
var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
|
|
26
|
+
var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptors);
|
|
27
|
+
var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
|
|
28
|
+
var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
|
|
29
|
+
var _pt__default = /*#__PURE__*/_interopDefault(_pt);
|
|
30
|
+
|
|
31
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default['default'](object); if (_Object$getOwnPropertySymbols__default['default']) { var symbols = _Object$getOwnPropertySymbols__default['default'](object); if (enumerableOnly) { symbols = _filterInstanceProperty__default['default'](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default['default'](object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
32
|
+
|
|
33
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context; _forEachInstanceProperty__default['default'](_context = ownKeys(Object(source), true)).call(_context, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors__default['default']) { _Object$defineProperties__default['default'](target, _Object$getOwnPropertyDescriptors__default['default'](source)); } else { var _context2; _forEachInstanceProperty__default['default'](_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty__default['default'](target, key, _Object$getOwnPropertyDescriptor__default['default'](source, key)); }); } } return target; }
|
|
34
|
+
|
|
35
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
36
|
+
|
|
37
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
38
|
+
name: "yeifab",
|
|
39
|
+
styles: "clip:rect(0 0 0 0);width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;position:absolute;white-space:nowrap"
|
|
40
|
+
} : {
|
|
41
|
+
name: "a70vxx-AccessibleHidden",
|
|
42
|
+
styles: "clip:rect(0 0 0 0);width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;position:absolute;white-space:nowrap;label:AccessibleHidden;",
|
|
43
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFjY2Vzc2libGUtaGlkZGVuLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFTWSIsImZpbGUiOiJhY2Nlc3NpYmxlLWhpZGRlbi50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbnR5cGUgUHJvcHMgPSB7XG4gIGNoaWxkcmVuOiBSZWFjdE5vZGU7XG59O1xuXG5jb25zdCBBY2Nlc3NpYmxlSGlkZGVuID0gKHByb3BzOiBQcm9wcykgPT4gKFxuICA8ZGl2XG4gICAgY3NzPXtjc3NgXG4gICAgICBjbGlwOiByZWN0KDAgMCAwIDApO1xuICAgICAgd2lkdGg6IDFweDtcbiAgICAgIGhlaWdodDogMXB4O1xuICAgICAgbWFyZ2luOiAtMXB4O1xuICAgICAgYm9yZGVyOiAwO1xuICAgICAgcGFkZGluZzogMDtcbiAgICAgIG92ZXJmbG93OiBoaWRkZW47XG4gICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgICB3aGl0ZS1zcGFjZTogbm93cmFwO1xuICAgIGB9XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcbkFjY2Vzc2libGVIaWRkZW4uZGlzcGxheU5hbWUgPSAnQWNjZXNzaWJsZUhpZGRlbic7XG5cbmV4cG9ydCBkZWZhdWx0IEFjY2Vzc2libGVIaWRkZW47XG4iXX0= */",
|
|
44
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
var AccessibleHidden = function AccessibleHidden(props) {
|
|
48
|
+
return jsxRuntime.jsx("div", _objectSpread({
|
|
49
|
+
css: _ref
|
|
50
|
+
}, props));
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
AccessibleHidden.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
54
|
+
children: _pt__default['default'].node.isRequired
|
|
55
|
+
} : {};
|
|
56
|
+
AccessibleHidden.displayName = 'AccessibleHidden';
|
|
57
|
+
var AccessibleHidden$1 = AccessibleHidden;
|
|
58
|
+
|
|
59
|
+
// NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
|
|
60
|
+
var version = '0.0.0-canary-2021830134526';
|
|
61
|
+
|
|
62
|
+
exports['default'] = AccessibleHidden$1;
|
|
63
|
+
exports.version = version;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var _Object$keys = require('@babel/runtime-corejs3/core-js-stable/object/keys');
|
|
6
|
+
var _Object$getOwnPropertySymbols = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols');
|
|
7
|
+
var _filterInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/filter');
|
|
8
|
+
var _Object$getOwnPropertyDescriptor = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor');
|
|
9
|
+
var _forEachInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/for-each');
|
|
10
|
+
var _Object$getOwnPropertyDescriptors = require('@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors');
|
|
11
|
+
var _Object$defineProperties = require('@babel/runtime-corejs3/core-js-stable/object/define-properties');
|
|
12
|
+
var _Object$defineProperty = require('@babel/runtime-corejs3/core-js-stable/object/define-property');
|
|
13
|
+
var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
|
|
14
|
+
require('prop-types');
|
|
15
|
+
require('react');
|
|
16
|
+
require('@emotion/react');
|
|
17
|
+
var jsxRuntime = require('@emotion/react/jsx-runtime');
|
|
18
|
+
|
|
19
|
+
function _interopDefault (e) { return e && e.__esModule ? e : { 'default': e }; }
|
|
20
|
+
|
|
21
|
+
var _Object$keys__default = /*#__PURE__*/_interopDefault(_Object$keys);
|
|
22
|
+
var _Object$getOwnPropertySymbols__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertySymbols);
|
|
23
|
+
var _filterInstanceProperty__default = /*#__PURE__*/_interopDefault(_filterInstanceProperty);
|
|
24
|
+
var _Object$getOwnPropertyDescriptor__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptor);
|
|
25
|
+
var _forEachInstanceProperty__default = /*#__PURE__*/_interopDefault(_forEachInstanceProperty);
|
|
26
|
+
var _Object$getOwnPropertyDescriptors__default = /*#__PURE__*/_interopDefault(_Object$getOwnPropertyDescriptors);
|
|
27
|
+
var _Object$defineProperties__default = /*#__PURE__*/_interopDefault(_Object$defineProperties);
|
|
28
|
+
var _Object$defineProperty__default = /*#__PURE__*/_interopDefault(_Object$defineProperty);
|
|
29
|
+
|
|
30
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys__default['default'](object); if (_Object$getOwnPropertySymbols__default['default']) { var symbols = _Object$getOwnPropertySymbols__default['default'](object); if (enumerableOnly) { symbols = _filterInstanceProperty__default['default'](symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor__default['default'](object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
31
|
+
|
|
32
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context; _forEachInstanceProperty__default['default'](_context = ownKeys(Object(source), true)).call(_context, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors__default['default']) { _Object$defineProperties__default['default'](target, _Object$getOwnPropertyDescriptors__default['default'](source)); } else { var _context2; _forEachInstanceProperty__default['default'](_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty__default['default'](target, key, _Object$getOwnPropertyDescriptor__default['default'](source, key)); }); } } return target; }
|
|
33
|
+
|
|
34
|
+
var _ref = {
|
|
35
|
+
name: "yeifab",
|
|
36
|
+
styles: "clip:rect(0 0 0 0);width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;position:absolute;white-space:nowrap"
|
|
37
|
+
} ;
|
|
38
|
+
|
|
39
|
+
var AccessibleHidden = function AccessibleHidden(props) {
|
|
40
|
+
return jsxRuntime.jsx("div", _objectSpread({
|
|
41
|
+
css: _ref
|
|
42
|
+
}, props));
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
AccessibleHidden.propTypes = {};
|
|
46
|
+
AccessibleHidden.displayName = 'AccessibleHidden';
|
|
47
|
+
var AccessibleHidden$1 = AccessibleHidden;
|
|
48
|
+
|
|
49
|
+
// NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
|
|
50
|
+
var version = '0.0.0-canary-2021830134526';
|
|
51
|
+
|
|
52
|
+
exports['default'] = AccessibleHidden$1;
|
|
53
|
+
exports.version = version;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import _Object$keys from '@babel/runtime-corejs3/core-js-stable/object/keys';
|
|
2
|
+
import _Object$getOwnPropertySymbols from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols';
|
|
3
|
+
import _filterInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/filter';
|
|
4
|
+
import _Object$getOwnPropertyDescriptor from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor';
|
|
5
|
+
import _forEachInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/for-each';
|
|
6
|
+
import _Object$getOwnPropertyDescriptors from '@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors';
|
|
7
|
+
import _Object$defineProperties from '@babel/runtime-corejs3/core-js-stable/object/define-properties';
|
|
8
|
+
import _Object$defineProperty from '@babel/runtime-corejs3/core-js-stable/object/define-property';
|
|
9
|
+
import _defineProperty from '@babel/runtime-corejs3/helpers/esm/defineProperty';
|
|
10
|
+
import _pt from 'prop-types';
|
|
11
|
+
import 'react';
|
|
12
|
+
import '@emotion/react';
|
|
13
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
14
|
+
|
|
15
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); if (enumerableOnly) { symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }
|
|
16
|
+
|
|
17
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { var _context; _forEachInstanceProperty(_context = ownKeys(Object(source), true)).call(_context, function (key) { _defineProperty(target, key, source[key]); }); } else if (_Object$getOwnPropertyDescriptors) { _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)); } else { var _context2; _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
18
|
+
|
|
19
|
+
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return "You have tried to stringify object returned from `css` function. It isn't supposed to be used directly (e.g. as value of the `className` prop), but rather handed to emotion so it can handle it (e.g. as value of `css` prop)."; }
|
|
20
|
+
|
|
21
|
+
var _ref = process.env.NODE_ENV === "production" ? {
|
|
22
|
+
name: "yeifab",
|
|
23
|
+
styles: "clip:rect(0 0 0 0);width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;position:absolute;white-space:nowrap"
|
|
24
|
+
} : {
|
|
25
|
+
name: "a70vxx-AccessibleHidden",
|
|
26
|
+
styles: "clip:rect(0 0 0 0);width:1px;height:1px;margin:-1px;border:0;padding:0;overflow:hidden;position:absolute;white-space:nowrap;label:AccessibleHidden;",
|
|
27
|
+
map: "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFjY2Vzc2libGUtaGlkZGVuLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFTWSIsImZpbGUiOiJhY2Nlc3NpYmxlLWhpZGRlbi50c3giLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBSZWFjdE5vZGUgfSBmcm9tICdyZWFjdCc7XG5pbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCc7XG5cbnR5cGUgUHJvcHMgPSB7XG4gIGNoaWxkcmVuOiBSZWFjdE5vZGU7XG59O1xuXG5jb25zdCBBY2Nlc3NpYmxlSGlkZGVuID0gKHByb3BzOiBQcm9wcykgPT4gKFxuICA8ZGl2XG4gICAgY3NzPXtjc3NgXG4gICAgICBjbGlwOiByZWN0KDAgMCAwIDApO1xuICAgICAgd2lkdGg6IDFweDtcbiAgICAgIGhlaWdodDogMXB4O1xuICAgICAgbWFyZ2luOiAtMXB4O1xuICAgICAgYm9yZGVyOiAwO1xuICAgICAgcGFkZGluZzogMDtcbiAgICAgIG92ZXJmbG93OiBoaWRkZW47XG4gICAgICBwb3NpdGlvbjogYWJzb2x1dGU7XG4gICAgICB3aGl0ZS1zcGFjZTogbm93cmFwO1xuICAgIGB9XG4gICAgey4uLnByb3BzfVxuICAvPlxuKTtcbkFjY2Vzc2libGVIaWRkZW4uZGlzcGxheU5hbWUgPSAnQWNjZXNzaWJsZUhpZGRlbic7XG5cbmV4cG9ydCBkZWZhdWx0IEFjY2Vzc2libGVIaWRkZW47XG4iXX0= */",
|
|
28
|
+
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
var AccessibleHidden = function AccessibleHidden(props) {
|
|
32
|
+
return jsx("div", _objectSpread({
|
|
33
|
+
css: _ref
|
|
34
|
+
}, props));
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
AccessibleHidden.propTypes = process.env.NODE_ENV !== "production" ? {
|
|
38
|
+
children: _pt.node.isRequired
|
|
39
|
+
} : {};
|
|
40
|
+
AccessibleHidden.displayName = 'AccessibleHidden';
|
|
41
|
+
var AccessibleHidden$1 = AccessibleHidden;
|
|
42
|
+
|
|
43
|
+
// NOTE: This string will be replaced in the `prepare` script by the `scripts/version.js` file.
|
|
44
|
+
var version = '0.0.0-canary-2021830134526';
|
|
45
|
+
|
|
46
|
+
export { AccessibleHidden$1 as default, version };
|
package/package.json
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@commercetools-uikit/accessible-hidden",
|
|
3
|
+
"description": "Component to hide content offscreen while keeping it accessible. This is also helpful for testing purposes.",
|
|
4
|
+
"version": "0.0.0-canary-2021830134526",
|
|
5
|
+
"bugs": "https://github.com/commercetools/ui-kit/issues",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "https://github.com/commercetools/ui-kit.git",
|
|
9
|
+
"directory": "packages/components/accessible-hidden"
|
|
10
|
+
},
|
|
11
|
+
"homepage": "https://uikit.commercetools.com",
|
|
12
|
+
"keywords": [
|
|
13
|
+
"javascript",
|
|
14
|
+
"design system",
|
|
15
|
+
"react",
|
|
16
|
+
"uikit"
|
|
17
|
+
],
|
|
18
|
+
"license": "MIT",
|
|
19
|
+
"private": false,
|
|
20
|
+
"publishConfig": {
|
|
21
|
+
"access": "public"
|
|
22
|
+
},
|
|
23
|
+
"sideEffects": false,
|
|
24
|
+
"main": "dist/commercetools-uikit-accessible-hidden.cjs.js",
|
|
25
|
+
"module": "dist/commercetools-uikit-accessible-hidden.esm.js",
|
|
26
|
+
"files": [
|
|
27
|
+
"dist"
|
|
28
|
+
],
|
|
29
|
+
"scripts": {
|
|
30
|
+
"prepare": "../../../scripts/version.js replace"
|
|
31
|
+
},
|
|
32
|
+
"dependencies": {
|
|
33
|
+
"@babel/runtime": "7.14.8",
|
|
34
|
+
"@babel/runtime-corejs3": "7.14.9",
|
|
35
|
+
"@emotion/react": "^11.4.0",
|
|
36
|
+
"prop-types": "15.7.2"
|
|
37
|
+
},
|
|
38
|
+
"devDependencies": {
|
|
39
|
+
"react": "17.0.2"
|
|
40
|
+
},
|
|
41
|
+
"peerDependencies": {
|
|
42
|
+
"react": "17.x"
|
|
43
|
+
}
|
|
44
|
+
}
|