@elliemae/ds-accessibility 3.0.0-next.2 → 3.0.0-next.6

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.
Files changed (42) hide show
  1. package/dist/cjs/index.js +28 -0
  2. package/dist/cjs/index.js.map +7 -0
  3. package/dist/cjs/skip-to/DSSkipTo.js +51 -0
  4. package/dist/cjs/skip-to/DSSkipTo.js.map +7 -0
  5. package/dist/cjs/skip-to/index.d.js +27 -0
  6. package/dist/cjs/skip-to/index.d.js.map +7 -0
  7. package/dist/cjs/skip-to/index.js +28 -0
  8. package/dist/cjs/skip-to/index.js.map +7 -0
  9. package/dist/cjs/skip-to/propTypes.js +39 -0
  10. package/dist/cjs/skip-to/propTypes.js.map +7 -0
  11. package/dist/cjs/skip-to/styles.js +62 -0
  12. package/dist/cjs/skip-to/styles.js.map +7 -0
  13. package/dist/esm/index.js +3 -0
  14. package/dist/esm/index.js.map +7 -0
  15. package/dist/esm/skip-to/DSSkipTo.js +22 -0
  16. package/dist/esm/skip-to/DSSkipTo.js.map +7 -0
  17. package/dist/esm/skip-to/index.d.js +2 -0
  18. package/dist/esm/skip-to/index.d.js.map +7 -0
  19. package/dist/esm/skip-to/index.js +3 -0
  20. package/dist/esm/skip-to/index.js.map +7 -0
  21. package/{esm → dist/esm}/skip-to/propTypes.js +6 -4
  22. package/dist/esm/skip-to/propTypes.js.map +7 -0
  23. package/dist/esm/skip-to/styles.js +33 -0
  24. package/dist/esm/skip-to/styles.js.map +7 -0
  25. package/package.json +33 -24
  26. package/cjs/index.js +0 -10
  27. package/cjs/skip-to/DSSkipTo.js +0 -32
  28. package/cjs/skip-to/index.d.js +0 -2
  29. package/cjs/skip-to/index.js +0 -10
  30. package/cjs/skip-to/propTypes.js +0 -12
  31. package/cjs/skip-to/styles.js +0 -35
  32. package/esm/index.js +0 -1
  33. package/esm/skip-to/DSSkipTo.js +0 -23
  34. package/esm/skip-to/index.d.js +0 -1
  35. package/esm/skip-to/index.js +0 -1
  36. package/esm/skip-to/styles.js +0 -27
  37. package/types/index.d.ts +0 -1
  38. package/types/skip-to/DSSkipTo.d.ts +0 -21
  39. package/types/skip-to/index.d.d.ts +0 -4
  40. package/types/skip-to/index.d.ts +0 -1
  41. package/types/skip-to/propTypes.d.ts +0 -10
  42. package/types/skip-to/styles.d.ts +0 -1
@@ -0,0 +1,28 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __reExport = (target, module2, copyDefault, desc) => {
9
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
10
+ for (let key of __getOwnPropNames(module2))
11
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
12
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
13
+ }
14
+ return target;
15
+ };
16
+ var __toESM = (module2, isNodeMode) => {
17
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
18
+ };
19
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
20
+ return (module2, temp) => {
21
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
22
+ };
23
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
24
+ var src_exports = {};
25
+ var React = __toESM(require("react"));
26
+ __reExport(src_exports, require("./skip-to"));
27
+ module.exports = __toCommonJS(src_exports);
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export * from './skip-to';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;ADAvB,wBAAc;",
6
+ "names": []
7
+ }
@@ -0,0 +1,51 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var DSSkipTo_exports = {};
29
+ __export(DSSkipTo_exports, {
30
+ DSSkipTo: () => DSSkipTo,
31
+ DSSkipToWithSchema: () => DSSkipToWithSchema
32
+ });
33
+ var React = __toESM(require("react"));
34
+ var import_react = __toESM(require("react"));
35
+ var import_react_desc = require("react-desc");
36
+ var import_propTypes = require("./propTypes");
37
+ var import_styles = require("./styles");
38
+ const DSSkipTo = (props) => {
39
+ const { goTo, message = "Skip to main content" } = props;
40
+ const handleOnClick = (0, import_react.useCallback)(() => {
41
+ document.getElementById(goTo).focus();
42
+ }, [goTo]);
43
+ return /* @__PURE__ */ import_react.default.createElement(import_styles.StyledButton, {
44
+ onClick: handleOnClick
45
+ }, message);
46
+ };
47
+ DSSkipTo.propTypes = import_propTypes.propTypes;
48
+ const DSSkipToWithSchema = (0, import_react_desc.describe)(DSSkipTo);
49
+ DSSkipToWithSchema.propTypes = import_propTypes.propTypes;
50
+ module.exports = __toCommonJS(DSSkipTo_exports);
51
+ //# sourceMappingURL=DSSkipTo.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/skip-to/DSSkipTo.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "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", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,mBAAmC;AACnC,wBAAyB;AACzB,uBAA0B;AAE1B,oBAA6B;AAE7B,MAAM,WAAW,CAAC,UAA8B;AAC9C,QAAM,EAAE,MAAM,UAAU,2BAA2B;AACnD,QAAM,gBAAgB,8BAAY,MAAM;AACtC,IAAC,SAAS,eAAe,MAAsB;AAAA,KAC9C,CAAC;AACJ,SAAO,mDAAC,4BAAD;AAAA,IAAc,SAAS;AAAA,KAAgB;AAAA;AAGhD,SAAS,YAAY;AACrB,MAAM,qBAAqB,gCAAS;AACpC,mBAAmB,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,27 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __reExport = (target, module2, copyDefault, desc) => {
9
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
10
+ for (let key of __getOwnPropNames(module2))
11
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
12
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
13
+ }
14
+ return target;
15
+ };
16
+ var __toESM = (module2, isNodeMode) => {
17
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
18
+ };
19
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
20
+ return (module2, temp) => {
21
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
22
+ };
23
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
24
+ var index_d_exports = {};
25
+ var React = __toESM(require("react"));
26
+ module.exports = __toCommonJS(index_d_exports);
27
+ //# sourceMappingURL=index.d.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/skip-to/index.d.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export interface DSSkipToPropsT {\n goTo: string;\n message?: string;\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;",
6
+ "names": []
7
+ }
@@ -0,0 +1,28 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __reExport = (target, module2, copyDefault, desc) => {
9
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
10
+ for (let key of __getOwnPropNames(module2))
11
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
12
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
13
+ }
14
+ return target;
15
+ };
16
+ var __toESM = (module2, isNodeMode) => {
17
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
18
+ };
19
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
20
+ return (module2, temp) => {
21
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
22
+ };
23
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
24
+ var skip_to_exports = {};
25
+ var React = __toESM(require("react"));
26
+ __reExport(skip_to_exports, require("./DSSkipTo"));
27
+ module.exports = __toCommonJS(skip_to_exports);
28
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/skip-to/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["export * from './DSSkipTo';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;AAAA;ACAA,YAAuB;ADAvB,4BAAc;",
6
+ "names": []
7
+ }
@@ -0,0 +1,39 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var propTypes_exports = {};
29
+ __export(propTypes_exports, {
30
+ propTypes: () => propTypes
31
+ });
32
+ var React = __toESM(require("react"));
33
+ var import_react_desc = require("react-desc");
34
+ const propTypes = {
35
+ goTo: import_react_desc.PropTypes.string.isRequired.description("String containing content's id that you want to go."),
36
+ message: import_react_desc.PropTypes.string.description("Message for the Skip To component, default is 'Skip to main content'.")
37
+ };
38
+ module.exports = __toCommonJS(propTypes_exports);
39
+ //# sourceMappingURL=propTypes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/skip-to/propTypes.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "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", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAA0B;AAEnB,MAAM,YAAY;AAAA,EACvB,MAAM,4BAAU,OAAO,WAAW,YAAY;AAAA,EAC9C,SAAS,4BAAU,OAAO,YAAY;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,62 @@
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __markAsModule = (target) => __defProp(target, "__esModule", { value: true });
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __reExport = (target, module2, copyDefault, desc) => {
13
+ if (module2 && typeof module2 === "object" || typeof module2 === "function") {
14
+ for (let key of __getOwnPropNames(module2))
15
+ if (!__hasOwnProp.call(target, key) && (copyDefault || key !== "default"))
16
+ __defProp(target, key, { get: () => module2[key], enumerable: !(desc = __getOwnPropDesc(module2, key)) || desc.enumerable });
17
+ }
18
+ return target;
19
+ };
20
+ var __toESM = (module2, isNodeMode) => {
21
+ return __reExport(__markAsModule(__defProp(module2 != null ? __create(__getProtoOf(module2)) : {}, "default", !isNodeMode && module2 && module2.__esModule ? { get: () => module2.default, enumerable: true } : { value: module2, enumerable: true })), module2);
22
+ };
23
+ var __toCommonJS = /* @__PURE__ */ ((cache) => {
24
+ return (module2, temp) => {
25
+ return cache && cache.get(module2) || (temp = __reExport(__markAsModule({}), module2, 1), cache && cache.set(module2, temp), temp);
26
+ };
27
+ })(typeof WeakMap !== "undefined" ? /* @__PURE__ */ new WeakMap() : 0);
28
+ var styles_exports = {};
29
+ __export(styles_exports, {
30
+ StyledButton: () => StyledButton
31
+ });
32
+ var React = __toESM(require("react"));
33
+ var import_styled_components = __toESM(require("styled-components"));
34
+ const StyledButton = import_styled_components.default.button`
35
+ left: -999px;
36
+ outline: none;
37
+ position: absolute;
38
+ top: auto;
39
+ width: 1px;
40
+ height: 1px;
41
+ overflow: hidden;
42
+ z-index: -999;
43
+ &:focus,
44
+ &:active {
45
+ color: ${({ theme }) => theme.colors.brand[600]};
46
+ background-color: ${({ theme }) => theme.colors.neutral["000"]};
47
+ text-decoration: underline;
48
+ left: 0;
49
+ top: 0;
50
+ height: auto;
51
+ cursor: pointer;
52
+ width: fit-content;
53
+ padding: ${({ theme }) => `${theme.space.xxxs} ${theme.space.xxs}`};
54
+ border-radius: 2px;
55
+ border: 2px solid ${({ theme }) => theme.colors.brand[700]};
56
+ text-align: center;
57
+ z-index: 999;
58
+ overflow: auto;
59
+ }
60
+ `;
61
+ module.exports = __toCommonJS(styles_exports);
62
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/skip-to/styles.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
+ "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", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,+BAAmB;AAEZ,MAAM,eAAe,iCAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAWtB,CAAC,EAAE,YAAY,MAAM,OAAO,MAAM;AAAA,wBACvB,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAO7C,CAAC,EAAE,YAAY,GAAG,MAAM,MAAM,QAAQ,MAAM,MAAM;AAAA;AAAA,wBAEzC,CAAC,EAAE,YAAY,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,3 @@
1
+ import * as React from "react";
2
+ export * from "./skip-to";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './skip-to';\n"],
5
+ "mappings": "AAAA;ACAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,22 @@
1
+ import * as React from "react";
2
+ import React2, { useCallback } from "react";
3
+ import { describe } from "react-desc";
4
+ import { propTypes } from "./propTypes";
5
+ import { StyledButton } from "./styles";
6
+ const DSSkipTo = (props) => {
7
+ const { goTo, message = "Skip to main content" } = props;
8
+ const handleOnClick = useCallback(() => {
9
+ document.getElementById(goTo).focus();
10
+ }, [goTo]);
11
+ return /* @__PURE__ */ React2.createElement(StyledButton, {
12
+ onClick: handleOnClick
13
+ }, message);
14
+ };
15
+ DSSkipTo.propTypes = propTypes;
16
+ const DSSkipToWithSchema = describe(DSSkipTo);
17
+ DSSkipToWithSchema.propTypes = propTypes;
18
+ export {
19
+ DSSkipTo,
20
+ DSSkipToWithSchema
21
+ };
22
+ //# sourceMappingURL=DSSkipTo.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/skip-to/DSSkipTo.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
+ "mappings": "AAAA;ACAA;AACA;AACA;AAEA;AAEA,MAAM,WAAW,CAAC,UAA8B;AAC9C,QAAM,EAAE,MAAM,UAAU,2BAA2B;AACnD,QAAM,gBAAgB,YAAY,MAAM;AACtC,IAAC,SAAS,eAAe,MAAsB;AAAA,KAC9C,CAAC;AACJ,SAAO,qCAAC,cAAD;AAAA,IAAc,SAAS;AAAA,KAAgB;AAAA;AAGhD,SAAS,YAAY;AACrB,MAAM,qBAAqB,SAAS;AACpC,mBAAmB,YAAY;",
6
+ "names": []
7
+ }
@@ -0,0 +1,2 @@
1
+ import * as React from "react";
2
+ //# sourceMappingURL=index.d.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": "AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,3 @@
1
+ import * as React from "react";
2
+ export * from "./DSSkipTo";
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/skip-to/index.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSSkipTo';\n"],
5
+ "mappings": "AAAA;ACAA;",
6
+ "names": []
7
+ }
@@ -1,8 +1,10 @@
1
- import { PropTypes } from 'react-desc';
2
-
1
+ import * as React from "react";
2
+ import { PropTypes } from "react-desc";
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
-
8
- export { propTypes };
7
+ export {
8
+ propTypes
9
+ };
10
+ //# sourceMappingURL=propTypes.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/skip-to/propTypes.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
+ "mappings": "AAAA;ACAA;AAEO,MAAM,YAAY;AAAA,EACvB,MAAM,UAAU,OAAO,WAAW,YAAY;AAAA,EAC9C,SAAS,UAAU,OAAO,YAAY;AAAA;",
6
+ "names": []
7
+ }
@@ -0,0 +1,33 @@
1
+ import * as React from "react";
2
+ import styled from "styled-components";
3
+ const StyledButton = styled.button`
4
+ left: -999px;
5
+ outline: none;
6
+ position: absolute;
7
+ top: auto;
8
+ width: 1px;
9
+ height: 1px;
10
+ overflow: hidden;
11
+ z-index: -999;
12
+ &:focus,
13
+ &:active {
14
+ color: ${({ theme }) => theme.colors.brand[600]};
15
+ background-color: ${({ theme }) => theme.colors.neutral["000"]};
16
+ text-decoration: underline;
17
+ left: 0;
18
+ top: 0;
19
+ height: auto;
20
+ cursor: pointer;
21
+ width: fit-content;
22
+ padding: ${({ theme }) => `${theme.space.xxxs} ${theme.space.xxs}`};
23
+ border-radius: 2px;
24
+ border: 2px solid ${({ theme }) => theme.colors.brand[700]};
25
+ text-align: center;
26
+ z-index: 999;
27
+ overflow: auto;
28
+ }
29
+ `;
30
+ export {
31
+ StyledButton
32
+ };
33
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/skip-to/styles.tsx"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
+ "mappings": "AAAA;ACAA;AAEO,MAAM,eAAe,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAWtB,CAAC,EAAE,YAAY,MAAM,OAAO,MAAM;AAAA,wBACvB,CAAC,EAAE,YAAY,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAO7C,CAAC,EAAE,YAAY,GAAG,MAAM,MAAM,QAAQ,MAAM,MAAM;AAAA;AAAA,wBAEzC,CAAC,EAAE,YAAY,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,31 +1,34 @@
1
1
  {
2
2
  "name": "@elliemae/ds-accessibility",
3
- "version": "3.0.0-next.2",
3
+ "version": "3.0.0-next.6",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Accessibility",
6
- "module": "./esm/index.js",
7
- "main": "./cjs/index.js",
8
- "types": "./types/index.d.ts",
6
+ "files": [
7
+ "dist"
8
+ ],
9
+ "module": "./dist/esm/index.js",
10
+ "main": "./dist/cjs/index.js",
11
+ "types": "./dist/types/index.d.ts",
9
12
  "exports": {
10
13
  ".": {
11
- "import": "./esm/index.js",
12
- "require": "./cjs/index.js"
14
+ "import": "./dist/esm/index.js",
15
+ "require": "./dist/cjs/index.js"
13
16
  },
14
17
  "./skip-to/styles": {
15
- "import": "./esm/skip-to/styles.js",
16
- "require": "./cjs/skip-to/styles.js"
18
+ "import": "./dist/esm/skip-to/styles.js",
19
+ "require": "./dist/cjs/skip-to/styles.js"
17
20
  },
18
21
  "./skip-to/propTypes": {
19
- "import": "./esm/skip-to/propTypes.js",
20
- "require": "./cjs/skip-to/propTypes.js"
22
+ "import": "./dist/esm/skip-to/propTypes.js",
23
+ "require": "./dist/cjs/skip-to/propTypes.js"
21
24
  },
22
25
  "./skip-to": {
23
- "import": "./esm/skip-to/index.js",
24
- "require": "./cjs/skip-to/index.js"
26
+ "import": "./dist/esm/skip-to/index.js",
27
+ "require": "./dist/cjs/skip-to/index.js"
25
28
  },
26
29
  "./skip-to/DSSkipTo": {
27
- "import": "./esm/skip-to/DSSkipTo.js",
28
- "require": "./cjs/skip-to/DSSkipTo.js"
30
+ "import": "./dist/esm/skip-to/DSSkipTo.js",
31
+ "require": "./dist/cjs/skip-to/DSSkipTo.js"
29
32
  }
30
33
  },
31
34
  "sideEffects": [
@@ -37,18 +40,18 @@
37
40
  "url": "https://git.elliemae.io/platform-ui/dimsum.git"
38
41
  },
39
42
  "engines": {
40
- "npm": ">=7",
41
- "node": ">=14"
43
+ "pnpm": ">=6",
44
+ "node": ">=16"
42
45
  },
43
46
  "author": "ICE MT",
44
- "scripts": {
45
- "dev": "cross-env NODE_ENV=development && node ../../scripts/build/build.js -w",
46
- "prebuild": "exit 0",
47
- "predev": "exit 0",
48
- "build": "node ../../scripts/build/build.js"
47
+ "jestSonar": {
48
+ "sonar56x": true,
49
+ "reportPath": "reports",
50
+ "reportFile": "tests.xml",
51
+ "indent": 4
49
52
  },
50
53
  "dependencies": {
51
- "react-desc": "^4.1.3"
54
+ "react-desc": "~4.1.3"
52
55
  },
53
56
  "devDependencies": {
54
57
  "styled-components": "~5.3.3"
@@ -60,7 +63,13 @@
60
63
  },
61
64
  "publishConfig": {
62
65
  "access": "public",
63
- "directory": "dist",
64
- "generateSubmodules": true
66
+ "typeSafety": false
67
+ },
68
+ "scripts": {
69
+ "dev": "cross-env NODE_ENV=development node ../../scripts/build/build.mjs --watch",
70
+ "test": "node ../../scripts/testing/test.mjs",
71
+ "lint": "node ../../scripts/lint.mjs",
72
+ "dts": "node ../../scripts/dts.mjs",
73
+ "build": "cross-env NODE_ENV=production node ../../scripts/build/build.mjs"
65
74
  }
66
75
  }
package/cjs/index.js DELETED
@@ -1,10 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var DSSkipTo = require('./skip-to/DSSkipTo.js');
6
-
7
-
8
-
9
- exports.DSSkipTo = DSSkipTo.DSSkipTo;
10
- exports.DSSkipToWithSchema = DSSkipTo.DSSkipToWithSchema;
@@ -1,32 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var _jsx = require('@babel/runtime/helpers/jsx');
6
- var react = require('react');
7
- var reactDesc = require('react-desc');
8
- var propTypes = require('./propTypes.js');
9
- var styles = require('./styles.js');
10
-
11
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
12
-
13
- var _jsx__default = /*#__PURE__*/_interopDefaultLegacy(_jsx);
14
-
15
- const DSSkipTo = props => {
16
- const {
17
- goTo,
18
- message = 'Skip to main content'
19
- } = props;
20
- const handleOnClick = react.useCallback(() => {
21
- document.getElementById(goTo).focus();
22
- }, [goTo]);
23
- return /*#__PURE__*/_jsx__default["default"](styles.StyledButton, {
24
- onClick: handleOnClick
25
- }, void 0, message);
26
- };
27
-
28
- const DSSkipToWithSchema = reactDesc.describe(DSSkipTo);
29
- DSSkipToWithSchema.propTypes = propTypes.propTypes;
30
-
31
- exports.DSSkipTo = DSSkipTo;
32
- exports.DSSkipToWithSchema = DSSkipToWithSchema;
@@ -1,2 +0,0 @@
1
- 'use strict';
2
-
@@ -1,10 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var DSSkipTo = require('./DSSkipTo.js');
6
-
7
-
8
-
9
- exports.DSSkipTo = DSSkipTo.DSSkipTo;
10
- exports.DSSkipToWithSchema = DSSkipTo.DSSkipToWithSchema;
@@ -1,12 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var reactDesc = require('react-desc');
6
-
7
- const propTypes = {
8
- goTo: reactDesc.PropTypes.string.isRequired.description("String containing content's id that you want to go."),
9
- message: reactDesc.PropTypes.string.description("Message for the Skip To component, default is 'Skip to main content'.")
10
- };
11
-
12
- exports.propTypes = propTypes;
@@ -1,35 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var styled = require('styled-components');
6
-
7
- function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
8
-
9
- var styled__default = /*#__PURE__*/_interopDefaultLegacy(styled);
10
-
11
- const StyledButton = /*#__PURE__*/styled__default["default"].button.withConfig({
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;}"], _ref => {
14
- let {
15
- theme
16
- } = _ref;
17
- return theme.colors.brand[600];
18
- }, _ref2 => {
19
- let {
20
- theme
21
- } = _ref2;
22
- return theme.colors.neutral['000'];
23
- }, _ref3 => {
24
- let {
25
- theme
26
- } = _ref3;
27
- return "".concat(theme.space.xxxs, " ").concat(theme.space.xxs);
28
- }, _ref4 => {
29
- let {
30
- theme
31
- } = _ref4;
32
- return theme.colors.brand[700];
33
- });
34
-
35
- exports.StyledButton = StyledButton;
package/esm/index.js DELETED
@@ -1 +0,0 @@
1
- export { DSSkipTo, DSSkipToWithSchema } from './skip-to/DSSkipTo.js';
@@ -1,23 +0,0 @@
1
- import _jsx from '@babel/runtime/helpers/esm/jsx';
2
- import { useCallback } from 'react';
3
- import { describe } from 'react-desc';
4
- import { propTypes } from './propTypes.js';
5
- import { StyledButton } from './styles.js';
6
-
7
- const DSSkipTo = props => {
8
- const {
9
- goTo,
10
- message = 'Skip to main content'
11
- } = props;
12
- const handleOnClick = useCallback(() => {
13
- document.getElementById(goTo).focus();
14
- }, [goTo]);
15
- return /*#__PURE__*/_jsx(StyledButton, {
16
- onClick: handleOnClick
17
- }, void 0, message);
18
- };
19
-
20
- const DSSkipToWithSchema = describe(DSSkipTo);
21
- DSSkipToWithSchema.propTypes = propTypes;
22
-
23
- export { DSSkipTo, DSSkipToWithSchema };
@@ -1 +0,0 @@
1
-
@@ -1 +0,0 @@
1
- export { DSSkipTo, DSSkipToWithSchema } from './DSSkipTo.js';
@@ -1,27 +0,0 @@
1
- import styled from 'styled-components';
2
-
3
- const StyledButton = /*#__PURE__*/styled.button.withConfig({
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;}"], _ref => {
6
- let {
7
- theme
8
- } = _ref;
9
- return theme.colors.brand[600];
10
- }, _ref2 => {
11
- let {
12
- theme
13
- } = _ref2;
14
- return theme.colors.neutral['000'];
15
- }, _ref3 => {
16
- let {
17
- theme
18
- } = _ref3;
19
- return "".concat(theme.space.xxxs, " ").concat(theme.space.xxs);
20
- }, _ref4 => {
21
- let {
22
- theme
23
- } = _ref4;
24
- return theme.colors.brand[700];
25
- });
26
-
27
- export { StyledButton };
package/types/index.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './skip-to';
@@ -1,21 +0,0 @@
1
- /// <reference path="../../../../../shared/typings/react-desc.d.ts" />
2
- /// <reference types="react" />
3
- import type { DSSkipToPropsT as Props } from './index.d';
4
- declare const DSSkipTo: {
5
- (props: Props): JSX.Element;
6
- propTypes: {
7
- goTo: any;
8
- message: {
9
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
10
- deprecated: import("react-desc").PropTypesDescValidator;
11
- };
12
- isRequired: import("react-desc").PropTypesDescValue;
13
- };
14
- };
15
- };
16
- declare const DSSkipToWithSchema: {
17
- (props?: Props | undefined): JSX.Element;
18
- propTypes: unknown;
19
- toTypescript: () => import("react-desc").TypescriptSchema;
20
- };
21
- export { DSSkipTo, DSSkipToWithSchema };
@@ -1,4 +0,0 @@
1
- export interface DSSkipToPropsT {
2
- goTo: string;
3
- message?: string;
4
- }
@@ -1 +0,0 @@
1
- export * from './DSSkipTo';
@@ -1,10 +0,0 @@
1
- /// <reference path="../../../../../shared/typings/react-desc.d.ts" />
2
- export declare const propTypes: {
3
- goTo: any;
4
- message: {
5
- defaultValue(arg: import("react-desc").ReactDescPossibleDefaultValues): {
6
- deprecated: import("react-desc").PropTypesDescValidator;
7
- };
8
- isRequired: import("react-desc").PropTypesDescValue;
9
- };
10
- };
@@ -1 +0,0 @@
1
- export declare const StyledButton: import("styled-components").StyledComponent<"button", import("styled-components").DefaultTheme, {}, never>;