@elliemae/ds-accessibility 1.57.1 → 2.0.0-alpha.11
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/cjs/index.js +3 -9
- package/cjs/skip-to/DSSkipTo.js +15 -16
- package/cjs/skip-to/index.d.js +0 -1
- package/cjs/skip-to/index.js +3 -9
- package/cjs/skip-to/propTypes.js +1 -2
- package/cjs/skip-to/styles.js +10 -15
- package/esm/index.js +0 -6
- package/esm/skip-to/DSSkipTo.js +11 -12
- package/esm/skip-to/index.d.js +0 -1
- package/esm/skip-to/index.js +0 -6
- package/esm/skip-to/propTypes.js +1 -2
- package/esm/skip-to/styles.js +10 -15
- package/package.json +41 -12
- package/types/index.d.ts +1 -0
- package/types/skip-to/DSSkipTo.d.ts +11 -0
- package/types/skip-to/index.d.d.ts +4 -0
- package/types/skip-to/index.d.ts +1 -0
- package/types/skip-to/propTypes.d.ts +4 -0
- package/types/skip-to/styles.d.ts +1 -0
- package/cjs/index.js.map +0 -1
- package/cjs/skip-to/DSSkipTo.js.map +0 -1
- package/cjs/skip-to/index.d.js.map +0 -1
- package/cjs/skip-to/index.js.map +0 -1
- package/cjs/skip-to/propTypes.js.map +0 -1
- package/cjs/skip-to/styles.js.map +0 -1
- package/esm/index.js.map +0 -1
- package/esm/skip-to/DSSkipTo.js.map +0 -1
- package/esm/skip-to/index.d.js.map +0 -1
- package/esm/skip-to/index.js.map +0 -1
- package/esm/skip-to/propTypes.js.map +0 -1
- package/esm/skip-to/styles.js.map +0 -1
- package/skip-to/DSSkipTo/package.json +0 -10
- package/skip-to/package.json +0 -10
- package/skip-to/propTypes/package.json +0 -10
- package/skip-to/styles/package.json +0 -10
package/cjs/index.js
CHANGED
|
@@ -2,15 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('react');
|
|
7
|
-
require('react-desc');
|
|
8
|
-
require('./skip-to/propTypes.js');
|
|
9
|
-
require('./skip-to/styles.js');
|
|
10
|
-
require('styled-components');
|
|
5
|
+
var DSSkipTo = require('./skip-to/DSSkipTo.js');
|
|
11
6
|
|
|
12
7
|
|
|
13
8
|
|
|
14
|
-
exports.DSSkipTo =
|
|
15
|
-
exports.DSSkipToWithSchema =
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
|
9
|
+
exports.DSSkipTo = DSSkipTo.DSSkipTo;
|
|
10
|
+
exports.DSSkipToWithSchema = DSSkipTo.DSSkipToWithSchema;
|
package/cjs/skip-to/DSSkipTo.js
CHANGED
|
@@ -2,32 +2,31 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
5
|
+
var _jsx = require('@babel/runtime/helpers/jsx');
|
|
6
|
+
var react = require('react');
|
|
6
7
|
var reactDesc = require('react-desc');
|
|
7
|
-
var
|
|
8
|
-
var
|
|
9
|
-
require('styled-components');
|
|
8
|
+
var propTypes = require('./propTypes.js');
|
|
9
|
+
var styles = require('./styles.js');
|
|
10
10
|
|
|
11
11
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
12
12
|
|
|
13
|
-
var
|
|
13
|
+
var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
15
|
+
const DSSkipTo = props => {
|
|
16
|
+
const {
|
|
17
|
+
goTo,
|
|
18
|
+
message = 'Skip to main content'
|
|
19
|
+
} = props;
|
|
20
|
+
const handleOnClick = react.useCallback(() => {
|
|
20
21
|
document.getElementById(goTo).focus();
|
|
21
22
|
}, [goTo]);
|
|
22
|
-
return /*#__PURE__*/
|
|
23
|
+
return /*#__PURE__*/_jsx__default["default"](styles.StyledButton, {
|
|
23
24
|
onClick: handleOnClick
|
|
24
|
-
}, message);
|
|
25
|
+
}, void 0, message);
|
|
25
26
|
};
|
|
26
27
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
DSSkipToWithSchema.propTypes = skipTo_propTypes.propTypes;
|
|
28
|
+
const DSSkipToWithSchema = reactDesc.describe(DSSkipTo);
|
|
29
|
+
DSSkipToWithSchema.propTypes = propTypes.propTypes;
|
|
30
30
|
|
|
31
31
|
exports.DSSkipTo = DSSkipTo;
|
|
32
32
|
exports.DSSkipToWithSchema = DSSkipToWithSchema;
|
|
33
|
-
//# sourceMappingURL=DSSkipTo.js.map
|
package/cjs/skip-to/index.d.js
CHANGED
package/cjs/skip-to/index.js
CHANGED
|
@@ -2,15 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('react');
|
|
7
|
-
require('react-desc');
|
|
8
|
-
require('./propTypes.js');
|
|
9
|
-
require('./styles.js');
|
|
10
|
-
require('styled-components');
|
|
5
|
+
var DSSkipTo = require('./DSSkipTo.js');
|
|
11
6
|
|
|
12
7
|
|
|
13
8
|
|
|
14
|
-
exports.DSSkipTo =
|
|
15
|
-
exports.DSSkipToWithSchema =
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
|
9
|
+
exports.DSSkipTo = DSSkipTo.DSSkipTo;
|
|
10
|
+
exports.DSSkipToWithSchema = DSSkipTo.DSSkipToWithSchema;
|
package/cjs/skip-to/propTypes.js
CHANGED
|
@@ -4,10 +4,9 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var reactDesc = require('react-desc');
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
const propTypes = {
|
|
8
8
|
goTo: reactDesc.PropTypes.string.isRequired.description("String containing content's id that you want to go."),
|
|
9
9
|
message: reactDesc.PropTypes.string.description("Message for the Skip To component, default is 'Skip to main content'.")
|
|
10
10
|
};
|
|
11
11
|
|
|
12
12
|
exports.propTypes = propTypes;
|
|
13
|
-
//# sourceMappingURL=propTypes.js.map
|
package/cjs/skip-to/styles.js
CHANGED
|
@@ -8,21 +8,16 @@ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'defau
|
|
|
8
8
|
|
|
9
9
|
var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
const StyledButton = /*#__PURE__*/styled__default["default"].button.withConfig({
|
|
12
12
|
componentId: "sc-17k27fy-0"
|
|
13
|
-
})(["left:-999px;outline:none;position:absolute;top:auto;width:1px;height:1px;overflow:hidden;z-index:-999;&:focus,&:active{color:", ";background-color:", ";text-decoration:underline;left:0;top:0;height:auto;cursor:pointer;width:fit-content;padding:", ";border-radius:2px;border:2px solid ", ";text-align:center;z-index:999;overflow:auto;}"],
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}, function (_ref4) {
|
|
23
|
-
var theme = _ref4.theme;
|
|
24
|
-
return theme.colors.brand[700];
|
|
25
|
-
});
|
|
13
|
+
})(["left:-999px;outline:none;position:absolute;top:auto;width:1px;height:1px;overflow:hidden;z-index:-999;&:focus,&:active{color:", ";background-color:", ";text-decoration:underline;left:0;top:0;height:auto;cursor:pointer;width:fit-content;padding:", ";border-radius:2px;border:2px solid ", ";text-align:center;z-index:999;overflow:auto;}"], ({
|
|
14
|
+
theme
|
|
15
|
+
}) => theme.colors.brand[600], ({
|
|
16
|
+
theme
|
|
17
|
+
}) => theme.colors.neutral['000'], ({
|
|
18
|
+
theme
|
|
19
|
+
}) => "".concat(theme.space.xxxs, " ").concat(theme.space.xxs), ({
|
|
20
|
+
theme
|
|
21
|
+
}) => theme.colors.brand[700]);
|
|
26
22
|
|
|
27
23
|
exports.StyledButton = StyledButton;
|
|
28
|
-
//# sourceMappingURL=styles.js.map
|
package/esm/index.js
CHANGED
package/esm/skip-to/DSSkipTo.js
CHANGED
|
@@ -1,24 +1,23 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _jsx from '@babel/runtime/helpers/esm/jsx';
|
|
2
|
+
import { useCallback } from 'react';
|
|
2
3
|
import { describe } from 'react-desc';
|
|
3
4
|
import { propTypes } from './propTypes.js';
|
|
4
5
|
import { StyledButton } from './styles.js';
|
|
5
|
-
import 'styled-components';
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
const DSSkipTo = props => {
|
|
8
|
+
const {
|
|
9
|
+
goTo,
|
|
10
|
+
message = 'Skip to main content'
|
|
11
|
+
} = props;
|
|
12
|
+
const handleOnClick = useCallback(() => {
|
|
12
13
|
document.getElementById(goTo).focus();
|
|
13
14
|
}, [goTo]);
|
|
14
|
-
return /*#__PURE__*/
|
|
15
|
+
return /*#__PURE__*/_jsx(StyledButton, {
|
|
15
16
|
onClick: handleOnClick
|
|
16
|
-
}, message);
|
|
17
|
+
}, void 0, message);
|
|
17
18
|
};
|
|
18
19
|
|
|
19
|
-
|
|
20
|
-
var DSSkipToWithSchema = describe(DSSkipTo);
|
|
20
|
+
const DSSkipToWithSchema = describe(DSSkipTo);
|
|
21
21
|
DSSkipToWithSchema.propTypes = propTypes;
|
|
22
22
|
|
|
23
23
|
export { DSSkipTo, DSSkipToWithSchema };
|
|
24
|
-
//# sourceMappingURL=DSSkipTo.js.map
|
package/esm/skip-to/index.d.js
CHANGED
package/esm/skip-to/index.js
CHANGED
package/esm/skip-to/propTypes.js
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { PropTypes } from 'react-desc';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const propTypes = {
|
|
4
4
|
goTo: PropTypes.string.isRequired.description("String containing content's id that you want to go."),
|
|
5
5
|
message: PropTypes.string.description("Message for the Skip To component, default is 'Skip to main content'.")
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
export { propTypes };
|
|
9
|
-
//# sourceMappingURL=propTypes.js.map
|
package/esm/skip-to/styles.js
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
1
1
|
import styled from 'styled-components';
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
const StyledButton = /*#__PURE__*/styled.button.withConfig({
|
|
4
4
|
componentId: "sc-17k27fy-0"
|
|
5
|
-
})(["left:-999px;outline:none;position:absolute;top:auto;width:1px;height:1px;overflow:hidden;z-index:-999;&:focus,&:active{color:", ";background-color:", ";text-decoration:underline;left:0;top:0;height:auto;cursor:pointer;width:fit-content;padding:", ";border-radius:2px;border:2px solid ", ";text-align:center;z-index:999;overflow:auto;}"],
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}, function (_ref4) {
|
|
15
|
-
var theme = _ref4.theme;
|
|
16
|
-
return theme.colors.brand[700];
|
|
17
|
-
});
|
|
5
|
+
})(["left:-999px;outline:none;position:absolute;top:auto;width:1px;height:1px;overflow:hidden;z-index:-999;&:focus,&:active{color:", ";background-color:", ";text-decoration:underline;left:0;top:0;height:auto;cursor:pointer;width:fit-content;padding:", ";border-radius:2px;border:2px solid ", ";text-align:center;z-index:999;overflow:auto;}"], ({
|
|
6
|
+
theme
|
|
7
|
+
}) => theme.colors.brand[600], ({
|
|
8
|
+
theme
|
|
9
|
+
}) => theme.colors.neutral['000'], ({
|
|
10
|
+
theme
|
|
11
|
+
}) => "".concat(theme.space.xxxs, " ").concat(theme.space.xxs), ({
|
|
12
|
+
theme
|
|
13
|
+
}) => theme.colors.brand[700]);
|
|
18
14
|
|
|
19
15
|
export { StyledButton };
|
|
20
|
-
//# sourceMappingURL=styles.js.map
|
package/package.json
CHANGED
|
@@ -1,14 +1,46 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elliemae/ds-accessibility",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-alpha.11",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"description": "
|
|
6
|
-
"module": "esm/index.js",
|
|
7
|
-
"main": "cjs/index.js",
|
|
5
|
+
"description": "ICE MT - Dimsum - Accessibility",
|
|
6
|
+
"module": "./esm/index.js",
|
|
7
|
+
"main": "./cjs/index.js",
|
|
8
|
+
"types": "./types/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./esm/index.js",
|
|
12
|
+
"require": "./cjs/index.js"
|
|
13
|
+
},
|
|
14
|
+
"./skip-to/styles": {
|
|
15
|
+
"import": "./esm/skip-to/styles.js",
|
|
16
|
+
"require": "./cjs/skip-to/styles.js"
|
|
17
|
+
},
|
|
18
|
+
"./skip-to/propTypes": {
|
|
19
|
+
"import": "./esm/skip-to/propTypes.js",
|
|
20
|
+
"require": "./cjs/skip-to/propTypes.js"
|
|
21
|
+
},
|
|
22
|
+
"./skip-to": {
|
|
23
|
+
"import": "./esm/skip-to/index.js",
|
|
24
|
+
"require": "./cjs/skip-to/index.js"
|
|
25
|
+
},
|
|
26
|
+
"./skip-to/DSSkipTo": {
|
|
27
|
+
"import": "./esm/skip-to/DSSkipTo.js",
|
|
28
|
+
"require": "./cjs/skip-to/DSSkipTo.js"
|
|
29
|
+
}
|
|
30
|
+
},
|
|
8
31
|
"sideEffects": [
|
|
9
32
|
"*.css",
|
|
10
33
|
"*.scss"
|
|
11
34
|
],
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "https://git.elliemae.io/platform-ui/dimsum.git"
|
|
38
|
+
},
|
|
39
|
+
"engines": {
|
|
40
|
+
"npm": ">=7",
|
|
41
|
+
"node": ">=14"
|
|
42
|
+
},
|
|
43
|
+
"author": "ICE MT",
|
|
12
44
|
"scripts": {
|
|
13
45
|
"dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w",
|
|
14
46
|
"prebuild": "exit 0",
|
|
@@ -16,18 +48,15 @@
|
|
|
16
48
|
"build": "node ../../scripts/build/build.js"
|
|
17
49
|
},
|
|
18
50
|
"dependencies": {
|
|
19
|
-
"react-desc": "^4.1.
|
|
20
|
-
},
|
|
21
|
-
"devDependencies": {
|
|
22
|
-
"styled-components": "~5.3.0"
|
|
51
|
+
"react-desc": "^4.1.3"
|
|
23
52
|
},
|
|
24
53
|
"peerDependencies": {
|
|
25
|
-
"react": "^17.0.
|
|
26
|
-
"react-dom": "^17.0.
|
|
27
|
-
"styled-components": "^5.3.0"
|
|
54
|
+
"react": "^17.0.2",
|
|
55
|
+
"react-dom": "^17.0.2"
|
|
28
56
|
},
|
|
29
57
|
"publishConfig": {
|
|
30
58
|
"access": "public",
|
|
31
|
-
"directory": "dist"
|
|
59
|
+
"directory": "dist",
|
|
60
|
+
"generateSubmodules": true
|
|
32
61
|
}
|
|
33
62
|
}
|
package/types/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './skip-to';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import type { DSSkipToPropsT as Props } from './index.d';
|
|
3
|
+
declare const DSSkipTo: {
|
|
4
|
+
(props: Props): JSX.Element;
|
|
5
|
+
propTypes: {
|
|
6
|
+
goTo: any;
|
|
7
|
+
message: any;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
declare const DSSkipToWithSchema: any;
|
|
11
|
+
export { DSSkipTo, DSSkipToWithSchema };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './DSSkipTo';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const StyledButton: import("styled-components").StyledComponent<"button", any, {}, never>;
|
package/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DSSkipTo.js","sources":["../../../src/skip-to/DSSkipTo.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport { describe } from 'react-desc';\nimport { propTypes } from './propTypes';\nimport type { DSSkipToPropsT as Props } from './index.d';\nimport { StyledButton } from './styles';\n\nconst DSSkipTo = (props: Props): JSX.Element => {\n const { goTo, message = 'Skip to main content' } = props;\n const handleOnClick = useCallback(() => {\n (document.getElementById(goTo) as HTMLElement).focus();\n }, [goTo]);\n return <StyledButton onClick={handleOnClick}>{message}</StyledButton>;\n};\n\nDSSkipTo.propTypes = propTypes;\nconst DSSkipToWithSchema = describe(DSSkipTo);\nDSSkipToWithSchema.propTypes = propTypes;\n\nexport { DSSkipTo, DSSkipToWithSchema };\n"],"names":["DSSkipTo","props","goTo","message","handleOnClick","useCallback","document","getElementById","focus","React","StyledButton","propTypes","DSSkipToWithSchema","describe"],"mappings":";;;;;;;;;;;;;;IAMMA,QAAQ,GAAG,SAAXA,QAAW,CAACC,KAAD,EAA+B;AAC9C,MAAQC,IAAR,GAAmDD,KAAnD,CAAQC,IAAR;AAAA,uBAAmDD,KAAnD,CAAcE,OAAd;AAAA,MAAcA,OAAd,+BAAwB,sBAAxB;AACA,MAAMC,aAAa,GAAGC,iBAAW,CAAC,YAAM;AACrCC,IAAAA,QAAQ,CAACC,cAAT,CAAwBL,IAAxB,CAAD,CAA+CM,KAA/C;AACD,GAFgC,EAE9B,CAACN,IAAD,CAF8B,CAAjC;AAGA,sBAAOO,wCAACC,0BAAD;AAAc,IAAA,OAAO,EAAEN;AAAvB,KAAuCD,OAAvC,CAAP;AACD;;AAEDH,QAAQ,CAACW,SAAT,GAAqBA,0BAArB;IACMC,kBAAkB,GAAGC,kBAAQ,CAACb,QAAD;AACnCY,kBAAkB,CAACD,SAAnB,GAA+BA,0BAA/B;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;"}
|
package/cjs/skip-to/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"propTypes.js","sources":["../../../src/skip-to/propTypes.tsx"],"sourcesContent":["import { PropTypes } from 'react-desc';\n\nexport const propTypes = {\n goTo: PropTypes.string.isRequired.description(\"String containing content's id that you want to go.\"),\n message: PropTypes.string.description(\"Message for the Skip To component, default is 'Skip to main content'.\"),\n};\n"],"names":["propTypes","goTo","PropTypes","string","isRequired","description","message"],"mappings":";;;;;;IAEaA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAEC,mBAAS,CAACC,MAAV,CAAiBC,UAAjB,CAA4BC,WAA5B,CAAwC,qDAAxC,CADiB;AAEvBC,EAAAA,OAAO,EAAEJ,mBAAS,CAACC,MAAV,CAAiBE,WAAjB,CAA6B,uEAA7B;AAFc;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../src/skip-to/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledButton = styled.button`\n left: -999px;\n outline: none;\n position: absolute;\n top: auto;\n width: 1px;\n height: 1px;\n overflow: hidden;\n z-index: -999;\n &:focus,\n &:active {\n color: ${({ theme }) => theme.colors.brand[600]};\n background-color: ${({ theme }) => theme.colors.neutral['000']};\n text-decoration: underline;\n left: 0;\n top: 0;\n height: auto;\n cursor: pointer;\n width: fit-content;\n padding: ${({ theme }) => `${theme.space.xxxs} ${theme.space.xxs}`};\n border-radius: 2px;\n border: 2px solid ${({ theme }) => theme.colors.brand[700]};\n text-align: center;\n z-index: 999;\n overflow: auto;\n }\n`;\n"],"names":["StyledButton","styled","button","theme","colors","brand","neutral","space","xxxs","xxs"],"mappings":";;;;;;;;;;IAEaA,YAAY,gBAAGC,0BAAM,CAACC,MAAV;AAAA;AAAA,uVAWZ;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaC,KAAb,CAAmB,GAAnB,CAAf;AAAA,CAXY,EAYD;AAAA,MAAGF,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaE,OAAb,CAAqB,KAArB,CAAf;AAAA,CAZC,EAmBV;AAAA,MAAGH,KAAH,SAAGA,KAAH;AAAA,mBAAkBA,KAAK,CAACI,KAAN,CAAYC,IAA9B,cAAsCL,KAAK,CAACI,KAAN,CAAYE,GAAlD;AAAA,CAnBU,EAqBD;AAAA,MAAGN,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaC,KAAb,CAAmB,GAAnB,CAAf;AAAA,CArBC;;;;"}
|
package/esm/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"DSSkipTo.js","sources":["../../../src/skip-to/DSSkipTo.tsx"],"sourcesContent":["import React, { useCallback } from 'react';\nimport { describe } from 'react-desc';\nimport { propTypes } from './propTypes';\nimport type { DSSkipToPropsT as Props } from './index.d';\nimport { StyledButton } from './styles';\n\nconst DSSkipTo = (props: Props): JSX.Element => {\n const { goTo, message = 'Skip to main content' } = props;\n const handleOnClick = useCallback(() => {\n (document.getElementById(goTo) as HTMLElement).focus();\n }, [goTo]);\n return <StyledButton onClick={handleOnClick}>{message}</StyledButton>;\n};\n\nDSSkipTo.propTypes = propTypes;\nconst DSSkipToWithSchema = describe(DSSkipTo);\nDSSkipToWithSchema.propTypes = propTypes;\n\nexport { DSSkipTo, DSSkipToWithSchema };\n"],"names":["DSSkipTo","props","goTo","message","handleOnClick","useCallback","document","getElementById","focus","propTypes","DSSkipToWithSchema","describe"],"mappings":";;;;;;IAMMA,QAAQ,GAAG,SAAXA,QAAW,CAACC,KAAD,EAA+B;AAC9C,MAAQC,IAAR,GAAmDD,KAAnD,CAAQC,IAAR;AAAA,uBAAmDD,KAAnD,CAAcE,OAAd;AAAA,MAAcA,OAAd,+BAAwB,sBAAxB;AACA,MAAMC,aAAa,GAAGC,WAAW,CAAC,YAAM;AACrCC,IAAAA,QAAQ,CAACC,cAAT,CAAwBL,IAAxB,CAAD,CAA+CM,KAA/C;AACD,GAFgC,EAE9B,CAACN,IAAD,CAF8B,CAAjC;AAGA,sBAAO,oBAAC,YAAD;AAAc,IAAA,OAAO,EAAEE;AAAvB,KAAuCD,OAAvC,CAAP;AACD;;AAEDH,QAAQ,CAACS,SAAT,GAAqBA,SAArB;IACMC,kBAAkB,GAAGC,QAAQ,CAACX,QAAD;AACnCU,kBAAkB,CAACD,SAAnB,GAA+BA,SAA/B;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/esm/skip-to/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"propTypes.js","sources":["../../../src/skip-to/propTypes.tsx"],"sourcesContent":["import { PropTypes } from 'react-desc';\n\nexport const propTypes = {\n goTo: PropTypes.string.isRequired.description(\"String containing content's id that you want to go.\"),\n message: PropTypes.string.description(\"Message for the Skip To component, default is 'Skip to main content'.\"),\n};\n"],"names":["propTypes","goTo","PropTypes","string","isRequired","description","message"],"mappings":";;IAEaA,SAAS,GAAG;AACvBC,EAAAA,IAAI,EAAEC,SAAS,CAACC,MAAV,CAAiBC,UAAjB,CAA4BC,WAA5B,CAAwC,qDAAxC,CADiB;AAEvBC,EAAAA,OAAO,EAAEJ,SAAS,CAACC,MAAV,CAAiBE,WAAjB,CAA6B,uEAA7B;AAFc;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"styles.js","sources":["../../../src/skip-to/styles.tsx"],"sourcesContent":["import styled from 'styled-components';\n\nexport const StyledButton = styled.button`\n left: -999px;\n outline: none;\n position: absolute;\n top: auto;\n width: 1px;\n height: 1px;\n overflow: hidden;\n z-index: -999;\n &:focus,\n &:active {\n color: ${({ theme }) => theme.colors.brand[600]};\n background-color: ${({ theme }) => theme.colors.neutral['000']};\n text-decoration: underline;\n left: 0;\n top: 0;\n height: auto;\n cursor: pointer;\n width: fit-content;\n padding: ${({ theme }) => `${theme.space.xxxs} ${theme.space.xxs}`};\n border-radius: 2px;\n border: 2px solid ${({ theme }) => theme.colors.brand[700]};\n text-align: center;\n z-index: 999;\n overflow: auto;\n }\n`;\n"],"names":["StyledButton","styled","button","theme","colors","brand","neutral","space","xxxs","xxs"],"mappings":";;IAEaA,YAAY,gBAAGC,MAAM,CAACC,MAAV;AAAA;AAAA,uVAWZ;AAAA,MAAGC,KAAH,QAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaC,KAAb,CAAmB,GAAnB,CAAf;AAAA,CAXY,EAYD;AAAA,MAAGF,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaE,OAAb,CAAqB,KAArB,CAAf;AAAA,CAZC,EAmBV;AAAA,MAAGH,KAAH,SAAGA,KAAH;AAAA,mBAAkBA,KAAK,CAACI,KAAN,CAAYC,IAA9B,cAAsCL,KAAK,CAACI,KAAN,CAAYE,GAAlD;AAAA,CAnBU,EAqBD;AAAA,MAAGN,KAAH,SAAGA,KAAH;AAAA,SAAeA,KAAK,CAACC,MAAN,CAAaC,KAAb,CAAmB,GAAnB,CAAf;AAAA,CArBC;;;;"}
|
package/skip-to/package.json
DELETED