@elliemae/ds-accessibility 3.16.0-rc.4 → 3.16.0-rc.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 (46) hide show
  1. package/dist/cjs/index.js +6 -2
  2. package/dist/cjs/index.js.map +2 -2
  3. package/dist/cjs/live-region/DSLiveRegion.js +6 -2
  4. package/dist/cjs/live-region/DSLiveRegion.js.map +2 -2
  5. package/dist/cjs/live-region/index.js +5 -1
  6. package/dist/cjs/live-region/index.js.map +2 -2
  7. package/dist/cjs/live-region/propTypes.js +4 -0
  8. package/dist/cjs/live-region/propTypes.js.map +1 -1
  9. package/dist/cjs/live-region/styles.js +4 -0
  10. package/dist/cjs/live-region/styles.js.map +1 -1
  11. package/dist/cjs/live-region/useLiveRegion.js +6 -2
  12. package/dist/cjs/live-region/useLiveRegion.js.map +2 -2
  13. package/dist/cjs/package.json +7 -0
  14. package/dist/cjs/skip-to/DSSkipTo.js +6 -2
  15. package/dist/cjs/skip-to/DSSkipTo.js.map +2 -2
  16. package/dist/cjs/skip-to/index.d.js +4 -0
  17. package/dist/cjs/skip-to/index.d.js.map +1 -1
  18. package/dist/cjs/skip-to/index.js +5 -1
  19. package/dist/cjs/skip-to/index.js.map +2 -2
  20. package/dist/cjs/skip-to/propTypes.js +4 -0
  21. package/dist/cjs/skip-to/propTypes.js.map +1 -1
  22. package/dist/cjs/skip-to/styles.js +4 -0
  23. package/dist/cjs/skip-to/styles.js.map +1 -1
  24. package/dist/esm/index.js +2 -2
  25. package/dist/esm/index.js.map +1 -1
  26. package/dist/esm/live-region/DSLiveRegion.js +2 -2
  27. package/dist/esm/live-region/DSLiveRegion.js.map +2 -2
  28. package/dist/esm/live-region/index.js +1 -1
  29. package/dist/esm/live-region/index.js.map +1 -1
  30. package/dist/esm/live-region/useLiveRegion.js +2 -2
  31. package/dist/esm/live-region/useLiveRegion.js.map +1 -1
  32. package/dist/esm/package.json +7 -0
  33. package/dist/esm/skip-to/DSSkipTo.js +2 -2
  34. package/dist/esm/skip-to/DSSkipTo.js.map +1 -1
  35. package/dist/esm/skip-to/index.js +1 -1
  36. package/dist/esm/skip-to/index.js.map +1 -1
  37. package/dist/esm/skip-to/styles.js.map +1 -1
  38. package/dist/types/index.d.ts +2 -2
  39. package/dist/types/live-region/DSLiveRegion.d.ts +2 -2
  40. package/dist/types/live-region/index.d.ts +1 -1
  41. package/dist/types/live-region/styles.d.ts +1 -0
  42. package/dist/types/live-region/useLiveRegion.d.ts +2 -2
  43. package/dist/types/skip-to/DSSkipTo.d.ts +1 -1
  44. package/dist/types/skip-to/index.d.ts +1 -1
  45. package/dist/types/skip-to/styles.d.ts +1 -0
  46. package/package.json +6 -6
package/dist/cjs/index.js CHANGED
@@ -15,6 +15,10 @@ var __copyProps = (to, from, except, desc) => {
15
15
  };
16
16
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
17
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
+ // If the importer is in node compatibility mode or this is not an ESM
19
+ // file that has been converted to a CommonJS file using a Babel-
20
+ // compatible transform (i.e. "__esModule" has not been set), then set
21
+ // "default" to the CommonJS "module.exports" for node compatibility.
18
22
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
19
23
  mod
20
24
  ));
@@ -22,6 +26,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
22
26
  var src_exports = {};
23
27
  module.exports = __toCommonJS(src_exports);
24
28
  var React = __toESM(require("react"));
25
- __reExport(src_exports, require("./skip-to"), module.exports);
26
- __reExport(src_exports, require("./live-region"), module.exports);
29
+ __reExport(src_exports, require("./skip-to/index.js"), module.exports);
30
+ __reExport(src_exports, require("./live-region/index.js"), module.exports);
27
31
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export * from './skip-to';\nexport * from './live-region';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,sBAAd;AACA,wBAAc,0BADd;",
4
+ "sourcesContent": ["export * from './skip-to/index.js';\nexport * from './live-region/index.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,+BAAd;AACA,wBAAc,mCADd;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -33,8 +37,8 @@ var import_jsx_runtime = require("react/jsx-runtime");
33
37
  var import_react_dom = __toESM(require("react-dom"));
34
38
  var import_react = require("react");
35
39
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
36
- var import_styles = require("./styles");
37
- var import_propTypes = require("./propTypes");
40
+ var import_styles = require("./styles.js");
41
+ var import_propTypes = require("./propTypes.js");
38
42
  const DSLiveRegion = (props) => {
39
43
  const [text, setText] = (0, import_react.useState)(" ");
40
44
  (0, import_react.useEffect)(() => {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/live-region/DSLiveRegion.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import ReactDOM from 'react-dom';\nimport React, { useEffect, useState } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { StyledContainer } from './styles';\nimport { DSLiveRegionPropTypes } from './propTypes';\nimport type { DSLiveRegionT } from './propTypes';\n\nconst DSLiveRegion = (props: DSLiveRegionT.Props): JSX.Element | null => {\n const [text, setText] = useState(' ');\n\n useEffect(() => {\n if (props.methods && props.methods.current) {\n props.methods.current.read = setText;\n }\n }, [props.methods]);\n\n if (text === '') return null;\n\n return ReactDOM.createPortal(\n <StyledContainer aria-atomic id={props.id} role={props.role} aria-live={props['aria-live'] ?? 'polite'}>\n {text}\n </StyledContainer>,\n props.portal?.current ?? document.body,\n );\n};\n\nDSLiveRegion.propTypes = DSLiveRegionPropTypes;\nDSLiveRegion.displayName = 'DSLiveRegion';\nconst DSLiveRegionWithSchema = describe(DSLiveRegion);\nDSLiveRegionWithSchema.propTypes = DSLiveRegionPropTypes;\n\nexport { DSLiveRegion, DSLiveRegionWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmBnB;AAnBJ,uBAAqB;AACrB,mBAA2C;AAC3C,8BAAyB;AACzB,oBAAgC;AAChC,uBAAsC;AAGtC,MAAM,eAAe,CAAC,UAAmD;AACvE,QAAM,CAAC,MAAM,OAAO,QAAI,uBAAS,GAAG;AAEpC,8BAAU,MAAM;AACd,QAAI,MAAM,WAAW,MAAM,QAAQ,SAAS;AAC1C,YAAM,QAAQ,QAAQ,OAAO;AAAA,IAC/B;AAAA,EACF,GAAG,CAAC,MAAM,OAAO,CAAC;AAElB,MAAI,SAAS;AAAI,WAAO;AAExB,SAAO,iBAAAA,QAAS;AAAA,IACd,4CAAC,iCAAgB,eAAW,MAAC,IAAI,MAAM,IAAI,MAAM,MAAM,MAAM,aAAW,MAAM,gBAAgB,UAC3F,gBACH;AAAA,IACA,MAAM,QAAQ,WAAW,SAAS;AAAA,EACpC;AACF;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,6BAAyB,kCAAS,YAAY;AACpD,uBAAuB,YAAY;",
4
+ "sourcesContent": ["import ReactDOM from 'react-dom';\nimport React, { useEffect, useState } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { StyledContainer } from './styles.js';\nimport { DSLiveRegionPropTypes } from './propTypes.js';\nimport type { DSLiveRegionT } from './propTypes.js';\n\nconst DSLiveRegion = (props: DSLiveRegionT.Props): JSX.Element | null => {\n const [text, setText] = useState(' ');\n\n useEffect(() => {\n if (props.methods && props.methods.current) {\n props.methods.current.read = setText;\n }\n }, [props.methods]);\n\n if (text === '') return null;\n\n return ReactDOM.createPortal(\n <StyledContainer aria-atomic id={props.id} role={props.role} aria-live={props['aria-live'] ?? 'polite'}>\n {text}\n </StyledContainer>,\n props.portal?.current ?? document.body,\n );\n};\n\nDSLiveRegion.propTypes = DSLiveRegionPropTypes;\nDSLiveRegion.displayName = 'DSLiveRegion';\nconst DSLiveRegionWithSchema = describe(DSLiveRegion);\nDSLiveRegionWithSchema.propTypes = DSLiveRegionPropTypes;\n\nexport { DSLiveRegion, DSLiveRegionWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADmBnB;AAnBJ,uBAAqB;AACrB,mBAA2C;AAC3C,8BAAyB;AACzB,oBAAgC;AAChC,uBAAsC;AAGtC,MAAM,eAAe,CAAC,UAAmD;AACvE,QAAM,CAAC,MAAM,OAAO,QAAI,uBAAS,GAAG;AAEpC,8BAAU,MAAM;AACd,QAAI,MAAM,WAAW,MAAM,QAAQ,SAAS;AAC1C,YAAM,QAAQ,QAAQ,OAAO;AAAA,IAC/B;AAAA,EACF,GAAG,CAAC,MAAM,OAAO,CAAC;AAElB,MAAI,SAAS;AAAI,WAAO;AAExB,SAAO,iBAAAA,QAAS;AAAA,IACd,4CAAC,iCAAgB,eAAW,MAAC,IAAI,MAAM,IAAI,MAAM,MAAM,MAAM,aAAW,MAAM,WAAW,KAAK,UAC3F,gBACH;AAAA,IACA,MAAM,QAAQ,WAAW,SAAS;AAAA,EACpC;AACF;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,6BAAyB,kCAAS,YAAY;AACpD,uBAAuB,YAAY;",
6
6
  "names": ["ReactDOM"]
7
7
  }
@@ -15,6 +15,10 @@ var __copyProps = (to, from, except, desc) => {
15
15
  };
16
16
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
17
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
+ // If the importer is in node compatibility mode or this is not an ESM
19
+ // file that has been converted to a CommonJS file using a Babel-
20
+ // compatible transform (i.e. "__esModule" has not been set), then set
21
+ // "default" to the CommonJS "module.exports" for node compatibility.
18
22
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
19
23
  mod
20
24
  ));
@@ -22,5 +26,5 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
22
26
  var live_region_exports = {};
23
27
  module.exports = __toCommonJS(live_region_exports);
24
28
  var React = __toESM(require("react"));
25
- __reExport(live_region_exports, require("./useLiveRegion"), module.exports);
29
+ __reExport(live_region_exports, require("./useLiveRegion.js"), module.exports);
26
30
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/live-region/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export * from './useLiveRegion';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,gCAAc,4BAAd;",
4
+ "sourcesContent": ["export * from './useLiveRegion.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,gCAAc,+BAAd;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/live-region/propTypes.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { PropTypes } from '@elliemae/ds-props-helpers';\nimport type { Dispatch, MutableRefObject, SetStateAction, WeakValidationMap } from 'react';\n\nexport declare namespace UseLiveRegionT {\n export interface Props {\n id?: string;\n portal?: React.MutableRefObject<HTMLElement>;\n }\n}\n\nexport declare namespace DSLiveRegionT {\n export interface Props {\n id?: string;\n portal?: MutableRefObject<HTMLElement>;\n role?: string;\n 'aria-live'?: string;\n methods?: MutableRefObject<{ read?: Dispatch<SetStateAction<string>> }>;\n }\n}\n\nexport const UseLiveRegionPropTypes = {\n id: PropTypes.string.description('Id of the live region'),\n portal: PropTypes.object.description('Portal to render the live region'),\n} as WeakValidationMap<unknown>;\n\nexport const DSLiveRegionPropTypes = {\n id: PropTypes.string.description('Id of the live region'),\n portal: PropTypes.object.description('Portal to render the live region'),\n role: PropTypes.string.description('Role of the live region'),\n 'aria-live': PropTypes.string.description('Aria live attribute'),\n methods: PropTypes.object.description('Methods to read the live region'),\n} as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA0B;AAoBnB,MAAM,yBAAyB;AAAA,EACpC,IAAI,kCAAU,OAAO,YAAY,uBAAuB;AAAA,EACxD,QAAQ,kCAAU,OAAO,YAAY,kCAAkC;AACzE;AAEO,MAAM,wBAAwB;AAAA,EACnC,IAAI,kCAAU,OAAO,YAAY,uBAAuB;AAAA,EACxD,QAAQ,kCAAU,OAAO,YAAY,kCAAkC;AAAA,EACvE,MAAM,kCAAU,OAAO,YAAY,yBAAyB;AAAA,EAC5D,aAAa,kCAAU,OAAO,YAAY,qBAAqB;AAAA,EAC/D,SAAS,kCAAU,OAAO,YAAY,iCAAiC;AACzE;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,8BAA0B;AAoBnB,MAAM,yBAAyB;AAAA,EACpC,IAAI,kCAAU,OAAO,YAAY,uBAAuB;AAAA,EACxD,QAAQ,kCAAU,OAAO,YAAY,kCAAkC;AACzE;AAEO,MAAM,wBAAwB;AAAA,EACnC,IAAI,kCAAU,OAAO,YAAY,uBAAuB;AAAA,EACxD,QAAQ,kCAAU,OAAO,YAAY,kCAAkC;AAAA,EACvE,MAAM,kCAAU,OAAO,YAAY,yBAAyB;AAAA,EAC5D,aAAa,kCAAU,OAAO,YAAY,qBAAqB;AAAA,EAC/D,SAAS,kCAAU,OAAO,YAAY,iCAAiC;AACzE;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/live-region/styles.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { styled } from '@elliemae/ds-system';\n\nexport const StyledContainer = styled.div`\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n border: 0;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n clip-path: inset(100%);\n white-space: nowrap;\n`;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AAEhB,MAAM,kBAAkB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AAEhB,MAAM,kBAAkB,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -34,8 +38,8 @@ var import_react_dom = __toESM(require("react-dom"));
34
38
  var import_react = require("react");
35
39
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
36
40
  var import_uid = require("uid");
37
- var import_styles = require("./styles");
38
- var import_propTypes = require("./propTypes");
41
+ var import_styles = require("./styles.js");
42
+ var import_propTypes = require("./propTypes.js");
39
43
  const DSLiveRegion = (0, import_react.memo)((props) => {
40
44
  const [internalMessage, setInternalMessage] = (0, import_react.useState)("");
41
45
  const [unsafe_emulateAssertiveNVDA, setUnsafe_emulateAssertiveNVDA] = (0, import_react.useState)(false);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/live-region/useLiveRegion.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["/* eslint-disable max-nested-callbacks */\nimport ReactDOM from 'react-dom';\nimport React, { memo, useEffect, useState, useCallback, useRef, useMemo } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport { StyledContainer } from './styles';\nimport { UseLiveRegionPropTypes } from './propTypes';\nimport type { UseLiveRegionT } from './propTypes';\n\ninterface Options {\n assertive?: boolean;\n unsafe_emulateAssertiveNVDA?: boolean;\n delay?: number;\n}\ninterface Methods {\n read?: (message: string, options: Options) => void;\n}\nexport interface Props {\n methods?: React.MutableRefObject<Methods>;\n id?: string;\n portal?: React.MutableRefObject<HTMLElement>;\n}\n\nconst DSLiveRegion = memo((props: Props): JSX.Element | null => {\n const [internalMessage, setInternalMessage] = useState<string>('');\n // eslint-disable-next-line @typescript-eslint/naming-convention\n const [unsafe_emulateAssertiveNVDA, setUnsafe_emulateAssertiveNVDA] = useState(false);\n const [role, setRole] = useState<undefined | string>(undefined);\n const [ariaLive, setAriaLive] = useState('polite');\n const { id, portal } = props || {};\n\n const reset = useCallback(() => {\n setInternalMessage('');\n setUnsafe_emulateAssertiveNVDA(false);\n setAriaLive('polite');\n setRole(undefined);\n }, []);\n\n const configure = useCallback(\n (message: string, options: Options) => {\n reset();\n setTimeout(() => {\n if (options?.unsafe_emulateAssertiveNVDA) setUnsafe_emulateAssertiveNVDA(true);\n setTimeout(() => {\n if (options?.assertive || options?.unsafe_emulateAssertiveNVDA) setAriaLive('assertive');\n if (options?.unsafe_emulateAssertiveNVDA) {\n setRole('alert');\n setUnsafe_emulateAssertiveNVDA(false);\n }\n if (options?.delay) {\n setTimeout(() => {\n setInternalMessage(message);\n }, options?.delay);\n } else {\n setInternalMessage(message);\n }\n });\n });\n },\n [reset],\n );\n\n useEffect(() => {\n if (props.methods) {\n props.methods.current.read = configure;\n }\n }, [configure, props.methods]);\n\n if (unsafe_emulateAssertiveNVDA) return null;\n\n return ReactDOM.createPortal(\n <StyledContainer aria-atomic id={id} role={role} aria-live={ariaLive}>\n {internalMessage}\n </StyledContainer>,\n portal?.current || document.body,\n );\n});\n\nconst useLiveRegion = (props: UseLiveRegionT.Props) => {\n const methods = useRef<Methods>({});\n\n const { id, portal } = props || {};\n\n const instanceUID = useMemo(() => `ds-live-region-${uid(5)}`, []);\n\n const read = useCallback((message: string, options: Options) => methods.current.read?.(message, options), []);\n\n return useMemo(\n () => ({\n LiveRegion: () => <DSLiveRegion methods={methods} id={id ?? instanceUID} portal={portal} />,\n read,\n }),\n [id, instanceUID, portal, read],\n );\n};\n\nuseLiveRegion.displayName = 'useLiveRegion';\nconst UseLiveRegionWithSchema = describe(useLiveRegion);\nUseLiveRegionWithSchema.propTypes = UseLiveRegionPropTypes;\nexport { useLiveRegion, UseLiveRegionWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuEnB;AAtEJ,uBAAqB;AACrB,mBAA+E;AAC/E,8BAAyB;AACzB,iBAAoB;AACpB,oBAAgC;AAChC,uBAAuC;AAiBvC,MAAM,mBAAe,mBAAK,CAAC,UAAqC;AAC9D,QAAM,CAAC,iBAAiB,kBAAkB,QAAI,uBAAiB,EAAE;AAEjE,QAAM,CAAC,6BAA6B,8BAA8B,QAAI,uBAAS,KAAK;AACpF,QAAM,CAAC,MAAM,OAAO,QAAI,uBAA6B,MAAS;AAC9D,QAAM,CAAC,UAAU,WAAW,QAAI,uBAAS,QAAQ;AACjD,QAAM,EAAE,IAAI,OAAO,IAAI,SAAS,CAAC;AAEjC,QAAM,YAAQ,0BAAY,MAAM;AAC9B,uBAAmB,EAAE;AACrB,mCAA+B,KAAK;AACpC,gBAAY,QAAQ;AACpB,YAAQ,MAAS;AAAA,EACnB,GAAG,CAAC,CAAC;AAEL,QAAM,gBAAY;AAAA,IAChB,CAAC,SAAiB,YAAqB;AACrC,YAAM;AACN,iBAAW,MAAM;AACf,YAAI,SAAS;AAA6B,yCAA+B,IAAI;AAC7E,mBAAW,MAAM;AACf,cAAI,SAAS,aAAa,SAAS;AAA6B,wBAAY,WAAW;AACvF,cAAI,SAAS,6BAA6B;AACxC,oBAAQ,OAAO;AACf,2CAA+B,KAAK;AAAA,UACtC;AACA,cAAI,SAAS,OAAO;AAClB,uBAAW,MAAM;AACf,iCAAmB,OAAO;AAAA,YAC5B,GAAG,SAAS,KAAK;AAAA,UACnB,OAAO;AACL,+BAAmB,OAAO;AAAA,UAC5B;AAAA,QACF,CAAC;AAAA,MACH,CAAC;AAAA,IACH;AAAA,IACA,CAAC,KAAK;AAAA,EACR;AAEA,8BAAU,MAAM;AACd,QAAI,MAAM,SAAS;AACjB,YAAM,QAAQ,QAAQ,OAAO;AAAA,IAC/B;AAAA,EACF,GAAG,CAAC,WAAW,MAAM,OAAO,CAAC;AAE7B,MAAI;AAA6B,WAAO;AAExC,SAAO,iBAAAA,QAAS;AAAA,IACd,4CAAC,iCAAgB,eAAW,MAAC,IAAQ,MAAY,aAAW,UACzD,2BACH;AAAA,IACA,QAAQ,WAAW,SAAS;AAAA,EAC9B;AACF,CAAC;AAED,MAAM,gBAAgB,CAAC,UAAgC;AACrD,QAAM,cAAU,qBAAgB,CAAC,CAAC;AAElC,QAAM,EAAE,IAAI,OAAO,IAAI,SAAS,CAAC;AAEjC,QAAM,kBAAc,sBAAQ,MAAM,sBAAkB,gBAAI,CAAC,KAAK,CAAC,CAAC;AAEhE,QAAM,WAAO,0BAAY,CAAC,SAAiB,YAAqB,QAAQ,QAAQ,OAAO,SAAS,OAAO,GAAG,CAAC,CAAC;AAE5G,aAAO;AAAA,IACL,OAAO;AAAA,MACL,YAAY,MAAM,4CAAC,gBAAa,SAAkB,IAAI,MAAM,aAAa,QAAgB;AAAA,MACzF;AAAA,IACF;AAAA,IACA,CAAC,IAAI,aAAa,QAAQ,IAAI;AAAA,EAChC;AACF;AAEA,cAAc,cAAc;AAC5B,MAAM,8BAA0B,kCAAS,aAAa;AACtD,wBAAwB,YAAY;",
4
+ "sourcesContent": ["/* eslint-disable max-nested-callbacks */\nimport ReactDOM from 'react-dom';\nimport React, { memo, useEffect, useState, useCallback, useRef, useMemo } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport { StyledContainer } from './styles.js';\nimport { UseLiveRegionPropTypes } from './propTypes.js';\nimport type { UseLiveRegionT } from './propTypes.js';\n\ninterface Options {\n assertive?: boolean;\n unsafe_emulateAssertiveNVDA?: boolean;\n delay?: number;\n}\ninterface Methods {\n read?: (message: string, options: Options) => void;\n}\nexport interface Props {\n methods?: React.MutableRefObject<Methods>;\n id?: string;\n portal?: React.MutableRefObject<HTMLElement>;\n}\n\nconst DSLiveRegion = memo((props: Props): JSX.Element | null => {\n const [internalMessage, setInternalMessage] = useState<string>('');\n // eslint-disable-next-line @typescript-eslint/naming-convention\n const [unsafe_emulateAssertiveNVDA, setUnsafe_emulateAssertiveNVDA] = useState(false);\n const [role, setRole] = useState<undefined | string>(undefined);\n const [ariaLive, setAriaLive] = useState('polite');\n const { id, portal } = props || {};\n\n const reset = useCallback(() => {\n setInternalMessage('');\n setUnsafe_emulateAssertiveNVDA(false);\n setAriaLive('polite');\n setRole(undefined);\n }, []);\n\n const configure = useCallback(\n (message: string, options: Options) => {\n reset();\n setTimeout(() => {\n if (options?.unsafe_emulateAssertiveNVDA) setUnsafe_emulateAssertiveNVDA(true);\n setTimeout(() => {\n if (options?.assertive || options?.unsafe_emulateAssertiveNVDA) setAriaLive('assertive');\n if (options?.unsafe_emulateAssertiveNVDA) {\n setRole('alert');\n setUnsafe_emulateAssertiveNVDA(false);\n }\n if (options?.delay) {\n setTimeout(() => {\n setInternalMessage(message);\n }, options?.delay);\n } else {\n setInternalMessage(message);\n }\n });\n });\n },\n [reset],\n );\n\n useEffect(() => {\n if (props.methods) {\n props.methods.current.read = configure;\n }\n }, [configure, props.methods]);\n\n if (unsafe_emulateAssertiveNVDA) return null;\n\n return ReactDOM.createPortal(\n <StyledContainer aria-atomic id={id} role={role} aria-live={ariaLive}>\n {internalMessage}\n </StyledContainer>,\n portal?.current || document.body,\n );\n});\n\nconst useLiveRegion = (props: UseLiveRegionT.Props) => {\n const methods = useRef<Methods>({});\n\n const { id, portal } = props || {};\n\n const instanceUID = useMemo(() => `ds-live-region-${uid(5)}`, []);\n\n const read = useCallback((message: string, options: Options) => methods.current.read?.(message, options), []);\n\n return useMemo(\n () => ({\n LiveRegion: () => <DSLiveRegion methods={methods} id={id ?? instanceUID} portal={portal} />,\n read,\n }),\n [id, instanceUID, portal, read],\n );\n};\n\nuseLiveRegion.displayName = 'useLiveRegion';\nconst UseLiveRegionWithSchema = describe(useLiveRegion);\nUseLiveRegionWithSchema.propTypes = UseLiveRegionPropTypes;\nexport { useLiveRegion, UseLiveRegionWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADuEnB;AAtEJ,uBAAqB;AACrB,mBAA+E;AAC/E,8BAAyB;AACzB,iBAAoB;AACpB,oBAAgC;AAChC,uBAAuC;AAiBvC,MAAM,mBAAe,mBAAK,CAAC,UAAqC;AAC9D,QAAM,CAAC,iBAAiB,kBAAkB,QAAI,uBAAiB,EAAE;AAEjE,QAAM,CAAC,6BAA6B,8BAA8B,QAAI,uBAAS,KAAK;AACpF,QAAM,CAAC,MAAM,OAAO,QAAI,uBAA6B,MAAS;AAC9D,QAAM,CAAC,UAAU,WAAW,QAAI,uBAAS,QAAQ;AACjD,QAAM,EAAE,IAAI,OAAO,IAAI,SAAS,CAAC;AAEjC,QAAM,YAAQ,0BAAY,MAAM;AAC9B,uBAAmB,EAAE;AACrB,mCAA+B,KAAK;AACpC,gBAAY,QAAQ;AACpB,YAAQ,MAAS;AAAA,EACnB,GAAG,CAAC,CAAC;AAEL,QAAM,gBAAY;AAAA,IAChB,CAAC,SAAiB,YAAqB;AACrC,YAAM;AACN,iBAAW,MAAM;AACf,YAAI,SAAS;AAA6B,yCAA+B,IAAI;AAC7E,mBAAW,MAAM;AACf,cAAI,SAAS,aAAa,SAAS;AAA6B,wBAAY,WAAW;AACvF,cAAI,SAAS,6BAA6B;AACxC,oBAAQ,OAAO;AACf,2CAA+B,KAAK;AAAA,UACtC;AACA,cAAI,SAAS,OAAO;AAClB,uBAAW,MAAM;AACf,iCAAmB,OAAO;AAAA,YAC5B,GAAG,SAAS,KAAK;AAAA,UACnB,OAAO;AACL,+BAAmB,OAAO;AAAA,UAC5B;AAAA,QACF,CAAC;AAAA,MACH,CAAC;AAAA,IACH;AAAA,IACA,CAAC,KAAK;AAAA,EACR;AAEA,8BAAU,MAAM;AACd,QAAI,MAAM,SAAS;AACjB,YAAM,QAAQ,QAAQ,OAAO;AAAA,IAC/B;AAAA,EACF,GAAG,CAAC,WAAW,MAAM,OAAO,CAAC;AAE7B,MAAI;AAA6B,WAAO;AAExC,SAAO,iBAAAA,QAAS;AAAA,IACd,4CAAC,iCAAgB,eAAW,MAAC,IAAQ,MAAY,aAAW,UACzD,2BACH;AAAA,IACA,QAAQ,WAAW,SAAS;AAAA,EAC9B;AACF,CAAC;AAED,MAAM,gBAAgB,CAAC,UAAgC;AACrD,QAAM,cAAU,qBAAgB,CAAC,CAAC;AAElC,QAAM,EAAE,IAAI,OAAO,IAAI,SAAS,CAAC;AAEjC,QAAM,kBAAc,sBAAQ,MAAM,sBAAkB,gBAAI,CAAC,KAAK,CAAC,CAAC;AAEhE,QAAM,WAAO,0BAAY,CAAC,SAAiB,YAAqB,QAAQ,QAAQ,OAAO,SAAS,OAAO,GAAG,CAAC,CAAC;AAE5G,aAAO;AAAA,IACL,OAAO;AAAA,MACL,YAAY,MAAM,4CAAC,gBAAa,SAAkB,IAAI,MAAM,aAAa,QAAgB;AAAA,MACzF;AAAA,IACF;AAAA,IACA,CAAC,IAAI,aAAa,QAAQ,IAAI;AAAA,EAChC;AACF;AAEA,cAAc,cAAc;AAC5B,MAAM,8BAA0B,kCAAS,aAAa;AACtD,wBAAwB,YAAY;",
6
6
  "names": ["ReactDOM"]
7
7
  }
@@ -0,0 +1,7 @@
1
+ {
2
+ "type": "commonjs",
3
+ "sideEffects": [
4
+ "*.css",
5
+ "*.scss"
6
+ ]
7
+ }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -32,8 +36,8 @@ var React = __toESM(require("react"));
32
36
  var import_jsx_runtime = require("react/jsx-runtime");
33
37
  var import_react = require("react");
34
38
  var import_ds_props_helpers = require("@elliemae/ds-props-helpers");
35
- var import_propTypes = require("./propTypes");
36
- var import_styles = require("./styles");
39
+ var import_propTypes = require("./propTypes.js");
40
+ var import_styles = require("./styles.js");
37
41
  const DSSkipTo = (props) => {
38
42
  const { goTo, message = "Skip to main content" } = props;
39
43
  const handleOnClick = (0, import_react.useCallback)(() => {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/skip-to/DSSkipTo.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["import React, { useCallback } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\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;\nDSSkipTo.displayName = 'DSSkipTo';\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;AAAA;ACAA,YAAuB;ADWd;AAXT,mBAAmC;AACnC,8BAAyB;AACzB,uBAA0B;AAE1B,oBAA6B;AAE7B,MAAM,WAAW,CAAC,UAA8B;AAC9C,QAAM,EAAE,MAAM,UAAU,uBAAuB,IAAI;AACnD,QAAM,oBAAgB,0BAAY,MAAM;AACtC,IAAC,SAAS,eAAe,IAAI,EAAkB,MAAM;AAAA,EACvD,GAAG,CAAC,IAAI,CAAC;AACT,SAAO,4CAAC,8BAAa,SAAS,eAAgB,mBAAQ;AACxD;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,yBAAqB,kCAAS,QAAQ;AAC5C,mBAAmB,YAAY;",
4
+ "sourcesContent": ["import React, { useCallback } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { propTypes } from './propTypes.js';\nimport type { DSSkipToPropsT as Props } from './index.d';\nimport { StyledButton } from './styles.js';\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;\nDSSkipTo.displayName = 'DSSkipTo';\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;AAAA;ACAA,YAAuB;ADWd;AAXT,mBAAmC;AACnC,8BAAyB;AACzB,uBAA0B;AAE1B,oBAA6B;AAE7B,MAAM,WAAW,CAAC,UAA8B;AAC9C,QAAM,EAAE,MAAM,UAAU,uBAAuB,IAAI;AACnD,QAAM,oBAAgB,0BAAY,MAAM;AACtC,IAAC,SAAS,eAAe,IAAI,EAAkB,MAAM;AAAA,EACvD,GAAG,CAAC,IAAI,CAAC;AACT,SAAO,4CAAC,8BAAa,SAAS,eAAgB,mBAAQ;AACxD;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,yBAAqB,kCAAS,QAAQ;AAC5C,mBAAmB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -14,6 +14,10 @@ var __copyProps = (to, from, except, desc) => {
14
14
  return to;
15
15
  };
16
16
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ // If the importer is in node compatibility mode or this is not an ESM
18
+ // file that has been converted to a CommonJS file using a Babel-
19
+ // compatible transform (i.e. "__esModule" has not been set), then set
20
+ // "default" to the CommonJS "module.exports" for node compatibility.
17
21
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
18
22
  mod
19
23
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/skip-to/index.d.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export interface DSSkipToPropsT {\n goTo: string;\n message?: string;\n}\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -29,5 +33,5 @@ __export(skip_to_exports, {
29
33
  });
30
34
  module.exports = __toCommonJS(skip_to_exports);
31
35
  var React = __toESM(require("react"));
32
- var import_DSSkipTo = require("./DSSkipTo");
36
+ var import_DSSkipTo = require("./DSSkipTo.js");
33
37
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/skip-to/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
- "sourcesContent": ["export { DSSkipTo, DSSkipToWithSchema } from './DSSkipTo';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,sBAA6C;",
4
+ "sourcesContent": ["export { DSSkipTo, DSSkipToWithSchema } from './DSSkipTo.js';\n", "import * as React from 'react';\nexport { React };\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,sBAA6C;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/skip-to/propTypes.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import type { WeakValidationMap } from 'react';\nimport { PropTypes } from '@elliemae/ds-props-helpers';\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} as WeakValidationMap<unknown>;\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAA0B;AAEnB,MAAM,YAAY;AAAA,EACvB,MAAM,kCAAU,OAAO,WAAW,YAAY,qDAAqD;AAAA,EACnG,SAAS,kCAAU,OAAO,YAAY,uEAAuE;AAC/G;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADCvB,8BAA0B;AAEnB,MAAM,YAAY;AAAA,EACvB,MAAM,kCAAU,OAAO,WAAW,YAAY,qDAAqD;AAAA,EACnG,SAAS,kCAAU,OAAO,YAAY,uEAAuE;AAC/G;",
6
6
  "names": []
7
7
  }
@@ -18,6 +18,10 @@ var __copyProps = (to, from, except, desc) => {
18
18
  return to;
19
19
  };
20
20
  var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
21
25
  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
26
  mod
23
27
  ));
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/skip-to/styles.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import { styled } from '@elliemae/ds-system';\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;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AAEhB,MAAM,eAAe,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAWtB,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM;AAAA,wBACvB,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAO7C,CAAC,EAAE,MAAM,MAAM,GAAG,MAAM,MAAM,QAAQ,MAAM,MAAM;AAAA;AAAA,wBAEzC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAuB;AAEhB,MAAM,eAAe,wBAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAWtB,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA,wBAC1B,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAOlD,CAAC,EAAE,MAAM,MAAM,GAAG,MAAM,MAAM,QAAQ,MAAM,MAAM;AAAA;AAAA,wBAEzC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
package/dist/esm/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import * as React from "react";
2
- export * from "./skip-to";
3
- export * from "./live-region";
2
+ export * from "./skip-to/index.js";
3
+ export * from "./live-region/index.js";
4
4
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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';\nexport * from './live-region';\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './skip-to/index.js';\nexport * from './live-region/index.js';\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;",
6
6
  "names": []
7
7
  }
@@ -3,8 +3,8 @@ import { jsx } from "react/jsx-runtime";
3
3
  import ReactDOM from "react-dom";
4
4
  import { useEffect, useState } from "react";
5
5
  import { describe } from "@elliemae/ds-props-helpers";
6
- import { StyledContainer } from "./styles";
7
- import { DSLiveRegionPropTypes } from "./propTypes";
6
+ import { StyledContainer } from "./styles.js";
7
+ import { DSLiveRegionPropTypes } from "./propTypes.js";
8
8
  const DSLiveRegion = (props) => {
9
9
  const [text, setText] = useState(" ");
10
10
  useEffect(() => {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/live-region/DSLiveRegion.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import ReactDOM from 'react-dom';\nimport React, { useEffect, useState } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { StyledContainer } from './styles';\nimport { DSLiveRegionPropTypes } from './propTypes';\nimport type { DSLiveRegionT } from './propTypes';\n\nconst DSLiveRegion = (props: DSLiveRegionT.Props): JSX.Element | null => {\n const [text, setText] = useState(' ');\n\n useEffect(() => {\n if (props.methods && props.methods.current) {\n props.methods.current.read = setText;\n }\n }, [props.methods]);\n\n if (text === '') return null;\n\n return ReactDOM.createPortal(\n <StyledContainer aria-atomic id={props.id} role={props.role} aria-live={props['aria-live'] ?? 'polite'}>\n {text}\n </StyledContainer>,\n props.portal?.current ?? document.body,\n );\n};\n\nDSLiveRegion.propTypes = DSLiveRegionPropTypes;\nDSLiveRegion.displayName = 'DSLiveRegion';\nconst DSLiveRegionWithSchema = describe(DSLiveRegion);\nDSLiveRegionWithSchema.propTypes = DSLiveRegionPropTypes;\n\nexport { DSLiveRegion, DSLiveRegionWithSchema };\n"],
5
- "mappings": "AAAA,YAAY,WAAW;ACmBnB;AAnBJ,OAAO,cAAc;AACrB,SAAgB,WAAW,gBAAgB;AAC3C,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAChC,SAAS,6BAA6B;AAGtC,MAAM,eAAe,CAAC,UAAmD;AACvE,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,GAAG;AAEpC,YAAU,MAAM;AACd,QAAI,MAAM,WAAW,MAAM,QAAQ,SAAS;AAC1C,YAAM,QAAQ,QAAQ,OAAO;AAAA,IAC/B;AAAA,EACF,GAAG,CAAC,MAAM,OAAO,CAAC;AAElB,MAAI,SAAS;AAAI,WAAO;AAExB,SAAO,SAAS;AAAA,IACd,oBAAC,mBAAgB,eAAW,MAAC,IAAI,MAAM,IAAI,MAAM,MAAM,MAAM,aAAW,MAAM,gBAAgB,UAC3F,gBACH;AAAA,IACA,MAAM,QAAQ,WAAW,SAAS;AAAA,EACpC;AACF;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;",
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import ReactDOM from 'react-dom';\nimport React, { useEffect, useState } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { StyledContainer } from './styles.js';\nimport { DSLiveRegionPropTypes } from './propTypes.js';\nimport type { DSLiveRegionT } from './propTypes.js';\n\nconst DSLiveRegion = (props: DSLiveRegionT.Props): JSX.Element | null => {\n const [text, setText] = useState(' ');\n\n useEffect(() => {\n if (props.methods && props.methods.current) {\n props.methods.current.read = setText;\n }\n }, [props.methods]);\n\n if (text === '') return null;\n\n return ReactDOM.createPortal(\n <StyledContainer aria-atomic id={props.id} role={props.role} aria-live={props['aria-live'] ?? 'polite'}>\n {text}\n </StyledContainer>,\n props.portal?.current ?? document.body,\n );\n};\n\nDSLiveRegion.propTypes = DSLiveRegionPropTypes;\nDSLiveRegion.displayName = 'DSLiveRegion';\nconst DSLiveRegionWithSchema = describe(DSLiveRegion);\nDSLiveRegionWithSchema.propTypes = DSLiveRegionPropTypes;\n\nexport { DSLiveRegion, DSLiveRegionWithSchema };\n"],
5
+ "mappings": "AAAA,YAAY,WAAW;ACmBnB;AAnBJ,OAAO,cAAc;AACrB,SAAgB,WAAW,gBAAgB;AAC3C,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAChC,SAAS,6BAA6B;AAGtC,MAAM,eAAe,CAAC,UAAmD;AACvE,QAAM,CAAC,MAAM,OAAO,IAAI,SAAS,GAAG;AAEpC,YAAU,MAAM;AACd,QAAI,MAAM,WAAW,MAAM,QAAQ,SAAS;AAC1C,YAAM,QAAQ,QAAQ,OAAO;AAAA,IAC/B;AAAA,EACF,GAAG,CAAC,MAAM,OAAO,CAAC;AAElB,MAAI,SAAS;AAAI,WAAO;AAExB,SAAO,SAAS;AAAA,IACd,oBAAC,mBAAgB,eAAW,MAAC,IAAI,MAAM,IAAI,MAAM,MAAM,MAAM,aAAW,MAAM,WAAW,KAAK,UAC3F,gBACH;AAAA,IACA,MAAM,QAAQ,WAAW,SAAS;AAAA,EACpC;AACF;AAEA,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,3 +1,3 @@
1
1
  import * as React from "react";
2
- export * from "./useLiveRegion";
2
+ export * from "./useLiveRegion.js";
3
3
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/live-region/index.ts"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './useLiveRegion';\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './useLiveRegion.js';\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;",
6
6
  "names": []
7
7
  }
@@ -4,8 +4,8 @@ import ReactDOM from "react-dom";
4
4
  import { memo, useEffect, useState, useCallback, useRef, useMemo } from "react";
5
5
  import { describe } from "@elliemae/ds-props-helpers";
6
6
  import { uid } from "uid";
7
- import { StyledContainer } from "./styles";
8
- import { UseLiveRegionPropTypes } from "./propTypes";
7
+ import { StyledContainer } from "./styles.js";
8
+ import { UseLiveRegionPropTypes } from "./propTypes.js";
9
9
  const DSLiveRegion = memo((props) => {
10
10
  const [internalMessage, setInternalMessage] = useState("");
11
11
  const [unsafe_emulateAssertiveNVDA, setUnsafe_emulateAssertiveNVDA] = useState(false);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/live-region/useLiveRegion.tsx"],
4
- "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-nested-callbacks */\nimport ReactDOM from 'react-dom';\nimport React, { memo, useEffect, useState, useCallback, useRef, useMemo } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport { StyledContainer } from './styles';\nimport { UseLiveRegionPropTypes } from './propTypes';\nimport type { UseLiveRegionT } from './propTypes';\n\ninterface Options {\n assertive?: boolean;\n unsafe_emulateAssertiveNVDA?: boolean;\n delay?: number;\n}\ninterface Methods {\n read?: (message: string, options: Options) => void;\n}\nexport interface Props {\n methods?: React.MutableRefObject<Methods>;\n id?: string;\n portal?: React.MutableRefObject<HTMLElement>;\n}\n\nconst DSLiveRegion = memo((props: Props): JSX.Element | null => {\n const [internalMessage, setInternalMessage] = useState<string>('');\n // eslint-disable-next-line @typescript-eslint/naming-convention\n const [unsafe_emulateAssertiveNVDA, setUnsafe_emulateAssertiveNVDA] = useState(false);\n const [role, setRole] = useState<undefined | string>(undefined);\n const [ariaLive, setAriaLive] = useState('polite');\n const { id, portal } = props || {};\n\n const reset = useCallback(() => {\n setInternalMessage('');\n setUnsafe_emulateAssertiveNVDA(false);\n setAriaLive('polite');\n setRole(undefined);\n }, []);\n\n const configure = useCallback(\n (message: string, options: Options) => {\n reset();\n setTimeout(() => {\n if (options?.unsafe_emulateAssertiveNVDA) setUnsafe_emulateAssertiveNVDA(true);\n setTimeout(() => {\n if (options?.assertive || options?.unsafe_emulateAssertiveNVDA) setAriaLive('assertive');\n if (options?.unsafe_emulateAssertiveNVDA) {\n setRole('alert');\n setUnsafe_emulateAssertiveNVDA(false);\n }\n if (options?.delay) {\n setTimeout(() => {\n setInternalMessage(message);\n }, options?.delay);\n } else {\n setInternalMessage(message);\n }\n });\n });\n },\n [reset],\n );\n\n useEffect(() => {\n if (props.methods) {\n props.methods.current.read = configure;\n }\n }, [configure, props.methods]);\n\n if (unsafe_emulateAssertiveNVDA) return null;\n\n return ReactDOM.createPortal(\n <StyledContainer aria-atomic id={id} role={role} aria-live={ariaLive}>\n {internalMessage}\n </StyledContainer>,\n portal?.current || document.body,\n );\n});\n\nconst useLiveRegion = (props: UseLiveRegionT.Props) => {\n const methods = useRef<Methods>({});\n\n const { id, portal } = props || {};\n\n const instanceUID = useMemo(() => `ds-live-region-${uid(5)}`, []);\n\n const read = useCallback((message: string, options: Options) => methods.current.read?.(message, options), []);\n\n return useMemo(\n () => ({\n LiveRegion: () => <DSLiveRegion methods={methods} id={id ?? instanceUID} portal={portal} />,\n read,\n }),\n [id, instanceUID, portal, read],\n );\n};\n\nuseLiveRegion.displayName = 'useLiveRegion';\nconst UseLiveRegionWithSchema = describe(useLiveRegion);\nUseLiveRegionWithSchema.propTypes = UseLiveRegionPropTypes;\nexport { useLiveRegion, UseLiveRegionWithSchema };\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable max-nested-callbacks */\nimport ReactDOM from 'react-dom';\nimport React, { memo, useEffect, useState, useCallback, useRef, useMemo } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { uid } from 'uid';\nimport { StyledContainer } from './styles.js';\nimport { UseLiveRegionPropTypes } from './propTypes.js';\nimport type { UseLiveRegionT } from './propTypes.js';\n\ninterface Options {\n assertive?: boolean;\n unsafe_emulateAssertiveNVDA?: boolean;\n delay?: number;\n}\ninterface Methods {\n read?: (message: string, options: Options) => void;\n}\nexport interface Props {\n methods?: React.MutableRefObject<Methods>;\n id?: string;\n portal?: React.MutableRefObject<HTMLElement>;\n}\n\nconst DSLiveRegion = memo((props: Props): JSX.Element | null => {\n const [internalMessage, setInternalMessage] = useState<string>('');\n // eslint-disable-next-line @typescript-eslint/naming-convention\n const [unsafe_emulateAssertiveNVDA, setUnsafe_emulateAssertiveNVDA] = useState(false);\n const [role, setRole] = useState<undefined | string>(undefined);\n const [ariaLive, setAriaLive] = useState('polite');\n const { id, portal } = props || {};\n\n const reset = useCallback(() => {\n setInternalMessage('');\n setUnsafe_emulateAssertiveNVDA(false);\n setAriaLive('polite');\n setRole(undefined);\n }, []);\n\n const configure = useCallback(\n (message: string, options: Options) => {\n reset();\n setTimeout(() => {\n if (options?.unsafe_emulateAssertiveNVDA) setUnsafe_emulateAssertiveNVDA(true);\n setTimeout(() => {\n if (options?.assertive || options?.unsafe_emulateAssertiveNVDA) setAriaLive('assertive');\n if (options?.unsafe_emulateAssertiveNVDA) {\n setRole('alert');\n setUnsafe_emulateAssertiveNVDA(false);\n }\n if (options?.delay) {\n setTimeout(() => {\n setInternalMessage(message);\n }, options?.delay);\n } else {\n setInternalMessage(message);\n }\n });\n });\n },\n [reset],\n );\n\n useEffect(() => {\n if (props.methods) {\n props.methods.current.read = configure;\n }\n }, [configure, props.methods]);\n\n if (unsafe_emulateAssertiveNVDA) return null;\n\n return ReactDOM.createPortal(\n <StyledContainer aria-atomic id={id} role={role} aria-live={ariaLive}>\n {internalMessage}\n </StyledContainer>,\n portal?.current || document.body,\n );\n});\n\nconst useLiveRegion = (props: UseLiveRegionT.Props) => {\n const methods = useRef<Methods>({});\n\n const { id, portal } = props || {};\n\n const instanceUID = useMemo(() => `ds-live-region-${uid(5)}`, []);\n\n const read = useCallback((message: string, options: Options) => methods.current.read?.(message, options), []);\n\n return useMemo(\n () => ({\n LiveRegion: () => <DSLiveRegion methods={methods} id={id ?? instanceUID} portal={portal} />,\n read,\n }),\n [id, instanceUID, portal, read],\n );\n};\n\nuseLiveRegion.displayName = 'useLiveRegion';\nconst UseLiveRegionWithSchema = describe(useLiveRegion);\nUseLiveRegionWithSchema.propTypes = UseLiveRegionPropTypes;\nexport { useLiveRegion, UseLiveRegionWithSchema };\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACuEnB;AAtEJ,OAAO,cAAc;AACrB,SAAgB,MAAM,WAAW,UAAU,aAAa,QAAQ,eAAe;AAC/E,SAAS,gBAAgB;AACzB,SAAS,WAAW;AACpB,SAAS,uBAAuB;AAChC,SAAS,8BAA8B;AAiBvC,MAAM,eAAe,KAAK,CAAC,UAAqC;AAC9D,QAAM,CAAC,iBAAiB,kBAAkB,IAAI,SAAiB,EAAE;AAEjE,QAAM,CAAC,6BAA6B,8BAA8B,IAAI,SAAS,KAAK;AACpF,QAAM,CAAC,MAAM,OAAO,IAAI,SAA6B,MAAS;AAC9D,QAAM,CAAC,UAAU,WAAW,IAAI,SAAS,QAAQ;AACjD,QAAM,EAAE,IAAI,OAAO,IAAI,SAAS,CAAC;AAEjC,QAAM,QAAQ,YAAY,MAAM;AAC9B,uBAAmB,EAAE;AACrB,mCAA+B,KAAK;AACpC,gBAAY,QAAQ;AACpB,YAAQ,MAAS;AAAA,EACnB,GAAG,CAAC,CAAC;AAEL,QAAM,YAAY;AAAA,IAChB,CAAC,SAAiB,YAAqB;AACrC,YAAM;AACN,iBAAW,MAAM;AACf,YAAI,SAAS;AAA6B,yCAA+B,IAAI;AAC7E,mBAAW,MAAM;AACf,cAAI,SAAS,aAAa,SAAS;AAA6B,wBAAY,WAAW;AACvF,cAAI,SAAS,6BAA6B;AACxC,oBAAQ,OAAO;AACf,2CAA+B,KAAK;AAAA,UACtC;AACA,cAAI,SAAS,OAAO;AAClB,uBAAW,MAAM;AACf,iCAAmB,OAAO;AAAA,YAC5B,GAAG,SAAS,KAAK;AAAA,UACnB,OAAO;AACL,+BAAmB,OAAO;AAAA,UAC5B;AAAA,QACF,CAAC;AAAA,MACH,CAAC;AAAA,IACH;AAAA,IACA,CAAC,KAAK;AAAA,EACR;AAEA,YAAU,MAAM;AACd,QAAI,MAAM,SAAS;AACjB,YAAM,QAAQ,QAAQ,OAAO;AAAA,IAC/B;AAAA,EACF,GAAG,CAAC,WAAW,MAAM,OAAO,CAAC;AAE7B,MAAI;AAA6B,WAAO;AAExC,SAAO,SAAS;AAAA,IACd,oBAAC,mBAAgB,eAAW,MAAC,IAAQ,MAAY,aAAW,UACzD,2BACH;AAAA,IACA,QAAQ,WAAW,SAAS;AAAA,EAC9B;AACF,CAAC;AAED,MAAM,gBAAgB,CAAC,UAAgC;AACrD,QAAM,UAAU,OAAgB,CAAC,CAAC;AAElC,QAAM,EAAE,IAAI,OAAO,IAAI,SAAS,CAAC;AAEjC,QAAM,cAAc,QAAQ,MAAM,kBAAkB,IAAI,CAAC,KAAK,CAAC,CAAC;AAEhE,QAAM,OAAO,YAAY,CAAC,SAAiB,YAAqB,QAAQ,QAAQ,OAAO,SAAS,OAAO,GAAG,CAAC,CAAC;AAE5G,SAAO;AAAA,IACL,OAAO;AAAA,MACL,YAAY,MAAM,oBAAC,gBAAa,SAAkB,IAAI,MAAM,aAAa,QAAgB;AAAA,MACzF;AAAA,IACF;AAAA,IACA,CAAC,IAAI,aAAa,QAAQ,IAAI;AAAA,EAChC;AACF;AAEA,cAAc,cAAc;AAC5B,MAAM,0BAA0B,SAAS,aAAa;AACtD,wBAAwB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -0,0 +1,7 @@
1
+ {
2
+ "type": "module",
3
+ "sideEffects": [
4
+ "*.css",
5
+ "*.scss"
6
+ ]
7
+ }
@@ -2,8 +2,8 @@ import * as React from "react";
2
2
  import { jsx } from "react/jsx-runtime";
3
3
  import { useCallback } from "react";
4
4
  import { describe } from "@elliemae/ds-props-helpers";
5
- import { propTypes } from "./propTypes";
6
- import { StyledButton } from "./styles";
5
+ import { propTypes } from "./propTypes.js";
6
+ import { StyledButton } from "./styles.js";
7
7
  const DSSkipTo = (props) => {
8
8
  const { goTo, message = "Skip to main content" } = props;
9
9
  const handleOnClick = useCallback(() => {
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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 '@elliemae/ds-props-helpers';\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;\nDSSkipTo.displayName = 'DSSkipTo';\nconst DSSkipToWithSchema = describe(DSSkipTo);\nDSSkipToWithSchema.propTypes = propTypes;\n\nexport { DSSkipTo, DSSkipToWithSchema };\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback } from 'react';\nimport { describe } from '@elliemae/ds-props-helpers';\nimport { propTypes } from './propTypes.js';\nimport type { DSSkipToPropsT as Props } from './index.d';\nimport { StyledButton } from './styles.js';\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;\nDSSkipTo.displayName = 'DSSkipTo';\nconst DSSkipToWithSchema = describe(DSSkipTo);\nDSSkipToWithSchema.propTypes = propTypes;\n\nexport { DSSkipTo, DSSkipToWithSchema };\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACWd;AAXT,SAAgB,mBAAmB;AACnC,SAAS,gBAAgB;AACzB,SAAS,iBAAiB;AAE1B,SAAS,oBAAoB;AAE7B,MAAM,WAAW,CAAC,UAA8B;AAC9C,QAAM,EAAE,MAAM,UAAU,uBAAuB,IAAI;AACnD,QAAM,gBAAgB,YAAY,MAAM;AACtC,IAAC,SAAS,eAAe,IAAI,EAAkB,MAAM;AAAA,EACvD,GAAG,CAAC,IAAI,CAAC;AACT,SAAO,oBAAC,gBAAa,SAAS,eAAgB,mBAAQ;AACxD;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,qBAAqB,SAAS,QAAQ;AAC5C,mBAAmB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { DSSkipTo, DSSkipToWithSchema } from "./DSSkipTo";
2
+ import { DSSkipTo, DSSkipToWithSchema } from "./DSSkipTo.js";
3
3
  export {
4
4
  DSSkipTo,
5
5
  DSSkipToWithSchema
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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 { DSSkipTo, DSSkipToWithSchema } from './DSSkipTo';\n"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export { DSSkipTo, DSSkipToWithSchema } from './DSSkipTo.js';\n"],
5
5
  "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,UAAU,0BAA0B;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/skip-to/styles.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { styled } from '@elliemae/ds-system';\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,YAAY,WAAW;ACAvB,SAAS,cAAc;AAEhB,MAAM,eAAe,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAWtB,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM;AAAA,wBACvB,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAO7C,CAAC,EAAE,MAAM,MAAM,GAAG,MAAM,MAAM,QAAQ,MAAM,MAAM;AAAA;AAAA,wBAEzC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM;AAAA;AAAA;AAAA;AAAA;AAAA;",
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AAEhB,MAAM,eAAe,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,aAWtB,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA,wBAC1B,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,QAAQ,KAAK;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,eAOlD,CAAC,EAAE,MAAM,MAAM,GAAG,MAAM,MAAM,QAAQ,MAAM,MAAM;AAAA;AAAA,wBAEzC,CAAC,EAAE,MAAM,MAAM,MAAM,OAAO,MAAM,GAAG;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,2 +1,2 @@
1
- export * from './skip-to';
2
- export * from './live-region';
1
+ export * from './skip-to/index.js';
2
+ export * from './live-region/index.js';
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import type { DSLiveRegionT } from './propTypes';
2
+ import type { DSLiveRegionT } from './propTypes.js';
3
3
  declare const DSLiveRegion: {
4
4
  (props: DSLiveRegionT.Props): JSX.Element | null;
5
5
  propTypes: React.WeakValidationMap<unknown>;
6
6
  displayName: string;
7
7
  };
8
- declare const DSLiveRegionWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<DSLiveRegionT.Props>;
8
+ declare const DSLiveRegionWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<DSLiveRegionT.Props>;
9
9
  export { DSLiveRegion, DSLiveRegionWithSchema };
@@ -1 +1 @@
1
- export * from './useLiveRegion';
1
+ export * from './useLiveRegion.js';
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const StyledContainer: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & object, never>;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { UseLiveRegionT } from './propTypes';
2
+ import type { UseLiveRegionT } from './propTypes.js';
3
3
  interface Options {
4
4
  assertive?: boolean;
5
5
  unsafe_emulateAssertiveNVDA?: boolean;
@@ -20,5 +20,5 @@ declare const useLiveRegion: {
20
20
  };
21
21
  displayName: string;
22
22
  };
23
- declare const UseLiveRegionWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<UseLiveRegionT.Props>;
23
+ declare const UseLiveRegionWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<UseLiveRegionT.Props>;
24
24
  export { useLiveRegion, UseLiveRegionWithSchema };
@@ -5,5 +5,5 @@ declare const DSSkipTo: {
5
5
  propTypes: React.WeakValidationMap<unknown>;
6
6
  displayName: string;
7
7
  };
8
- declare const DSSkipToWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types").DocumentedReactComponent<Props>;
8
+ declare const DSSkipToWithSchema: import("@elliemae/ds-props-helpers/dist/types/propTypes/types.js").DocumentedReactComponent<Props>;
9
9
  export { DSSkipTo, DSSkipToWithSchema };
@@ -1 +1 @@
1
- export { DSSkipTo, DSSkipToWithSchema } from './DSSkipTo';
1
+ export { DSSkipTo, DSSkipToWithSchema } from './DSSkipTo.js';
@@ -1 +1,2 @@
1
+ /// <reference types="react" />
1
2
  export declare const StyledButton: import("styled-components").StyledComponent<keyof JSX.IntrinsicElements, import("@elliemae/ds-system").Theme, Record<string, unknown> & object, never>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-accessibility",
3
- "version": "3.16.0-rc.4",
3
+ "version": "3.16.0-rc.6",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Accessibility",
6
6
  "files": [
@@ -51,13 +51,13 @@
51
51
  "indent": 4
52
52
  },
53
53
  "dependencies": {
54
- "uid": "~2.0.0",
55
- "@elliemae/ds-props-helpers": "3.16.0-rc.4",
56
- "@elliemae/ds-system": "3.16.0-rc.4",
57
- "@elliemae/ds-utilities": "3.16.0-rc.4"
54
+ "uid": "~2.0.1",
55
+ "@elliemae/ds-props-helpers": "3.16.0-rc.6",
56
+ "@elliemae/ds-system": "3.16.0-rc.6",
57
+ "@elliemae/ds-utilities": "3.16.0-rc.6"
58
58
  },
59
59
  "devDependencies": {
60
- "styled-components": "~5.3.6"
60
+ "styled-components": "~5.3.9"
61
61
  },
62
62
  "peerDependencies": {
63
63
  "react": "^17.0.2",