@elliemae/ds-accessibility 3.4.3-rc.1 → 3.5.0-rc.10

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 (37) hide show
  1. package/dist/cjs/index.js +4 -1
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/live-region/DSLiveRegion.js +16 -8
  4. package/dist/cjs/live-region/DSLiveRegion.js.map +2 -2
  5. package/dist/cjs/live-region/index.js +4 -1
  6. package/dist/cjs/live-region/index.js.map +1 -1
  7. package/dist/cjs/live-region/propTypes.js +4 -1
  8. package/dist/cjs/live-region/propTypes.js.map +1 -1
  9. package/dist/cjs/live-region/styles.js +4 -1
  10. package/dist/cjs/live-region/styles.js.map +1 -1
  11. package/dist/cjs/live-region/useLiveRegion.js +48 -34
  12. package/dist/cjs/live-region/useLiveRegion.js.map +2 -2
  13. package/dist/cjs/skip-to/DSSkipTo.js +10 -5
  14. package/dist/cjs/skip-to/DSSkipTo.js.map +1 -1
  15. package/dist/cjs/skip-to/index.d.js +4 -1
  16. package/dist/cjs/skip-to/index.d.js.map +1 -1
  17. package/dist/cjs/skip-to/index.js +4 -1
  18. package/dist/cjs/skip-to/index.js.map +1 -1
  19. package/dist/cjs/skip-to/propTypes.js +4 -1
  20. package/dist/cjs/skip-to/propTypes.js.map +1 -1
  21. package/dist/cjs/skip-to/styles.js +4 -1
  22. package/dist/cjs/skip-to/styles.js.map +1 -1
  23. package/dist/esm/index.js.map +1 -1
  24. package/dist/esm/live-region/DSLiveRegion.js +12 -7
  25. package/dist/esm/live-region/DSLiveRegion.js.map +1 -1
  26. package/dist/esm/live-region/index.js.map +1 -1
  27. package/dist/esm/live-region/propTypes.js.map +1 -1
  28. package/dist/esm/live-region/styles.js.map +1 -1
  29. package/dist/esm/live-region/useLiveRegion.js +44 -33
  30. package/dist/esm/live-region/useLiveRegion.js.map +1 -1
  31. package/dist/esm/skip-to/DSSkipTo.js +6 -4
  32. package/dist/esm/skip-to/DSSkipTo.js.map +1 -1
  33. package/dist/esm/skip-to/index.d.js.map +1 -1
  34. package/dist/esm/skip-to/index.js.map +1 -1
  35. package/dist/esm/skip-to/propTypes.js.map +1 -1
  36. package/dist/esm/skip-to/styles.js.map +1 -1
  37. package/package.json +3 -3
package/dist/cjs/index.js CHANGED
@@ -14,7 +14,10 @@ var __copyProps = (to, from, except, desc) => {
14
14
  return to;
15
15
  };
16
16
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
17
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
19
+ mod
20
+ ));
18
21
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
22
  var src_exports = {};
20
23
  module.exports = __toCommonJS(src_exports);
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../src/index.tsx", "../../../../scripts/build/transpile/react-shim.js"],
4
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;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,wBAAc,sBAAd;AACA,wBAAc,0BADd;",
6
6
  "names": []
7
7
  }
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  }
18
18
  return to;
19
19
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
21
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
25
  var DSLiveRegion_exports = {};
23
26
  __export(DSLiveRegion_exports, {
@@ -26,8 +29,9 @@ __export(DSLiveRegion_exports, {
26
29
  });
27
30
  module.exports = __toCommonJS(DSLiveRegion_exports);
28
31
  var React = __toESM(require("react"));
32
+ var import_jsx_runtime = require("react/jsx-runtime");
29
33
  var import_react_dom = __toESM(require("react-dom"));
30
- var import_react = __toESM(require("react"));
34
+ var import_react = require("react");
31
35
  var import_ds_utilities = require("@elliemae/ds-utilities");
32
36
  var import_styles = require("./styles");
33
37
  var import_propTypes = require("./propTypes");
@@ -40,12 +44,16 @@ const DSLiveRegion = (0, import_react.memo)((props) => {
40
44
  }, [props.methods]);
41
45
  if (text === "")
42
46
  return null;
43
- return import_react_dom.default.createPortal(/* @__PURE__ */ import_react.default.createElement(import_styles.StyledContainer, {
44
- "aria-atomic": true,
45
- id: props.id,
46
- role: props.role,
47
- "aria-live": props["aria-live"] || "polite"
48
- }, text), props.portal?.current || document.body);
47
+ return import_react_dom.default.createPortal(
48
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledContainer, {
49
+ "aria-atomic": true,
50
+ id: props.id,
51
+ role: props.role,
52
+ "aria-live": props["aria-live"] || "polite",
53
+ children: text
54
+ }),
55
+ props.portal?.current || document.body
56
+ );
49
57
  });
50
58
  DSLiveRegion.propTypes = import_propTypes.propTypes;
51
59
  DSLiveRegion.displayName = "DSLiveRegion";
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/live-region/DSLiveRegion.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import ReactDOM from 'react-dom';\nimport React, { memo, useEffect, useState } from 'react';\nimport { describe } from '@elliemae/ds-utilities';\nimport { StyledContainer } from './styles';\nimport { propTypes } from './propTypes';\nimport type { DSLiveRegionT } from './propTypes';\n\nconst DSLiveRegion = memo((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 = propTypes;\nDSLiveRegion.displayName = 'DSLiveRegion';\nconst DSLiveRegionWithSchema = describe(DSLiveRegion);\nDSLiveRegionWithSchema.propTypes = propTypes;\n\nexport { DSLiveRegion, DSLiveRegionWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,uBAAqB;AACrB,mBAAiD;AACjD,0BAAyB;AACzB,oBAAgC;AAChC,uBAA0B;AAG1B,MAAM,eAAe,uBAAK,CAAC,UAAmD;AAC5E,QAAM,CAAC,MAAM,WAAW,2BAAS,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,yBAAS,aACd,mDAAC;AAAA,IAAgB,eAAW;AAAA,IAAC,IAAI,MAAM;AAAA,IAAI,MAAM,MAAM;AAAA,IAAM,aAAW,MAAM,gBAAgB;AAAA,KAC3F,IACH,GACA,MAAM,QAAQ,WAAW,SAAS,IACpC;AACF,CAAC;AAED,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,yBAAyB,kCAAS,YAAY;AACpD,uBAAuB,YAAY;",
6
- "names": []
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAAA,uBAAqB;AACrB,mBAAiD;AACjD,0BAAyB;AACzB,oBAAgC;AAChC,uBAA0B;AAG1B,MAAM,mBAAe,mBAAK,CAAC,UAAmD;AAC5E,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;AAAA,MAAgB,eAAW;AAAA,MAAC,IAAI,MAAM;AAAA,MAAI,MAAM,MAAM;AAAA,MAAM,aAAW,MAAM,gBAAgB;AAAA,MAC3F;AAAA,KACH;AAAA,IACA,MAAM,QAAQ,WAAW,SAAS;AAAA,EACpC;AACF,CAAC;AAED,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,6BAAyB,8BAAS,YAAY;AACpD,uBAAuB,YAAY;",
6
+ "names": ["ReactDOM"]
7
7
  }
@@ -14,7 +14,10 @@ var __copyProps = (to, from, except, desc) => {
14
14
  return to;
15
15
  };
16
16
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
17
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
19
+ mod
20
+ ));
18
21
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
22
  var live_region_exports = {};
20
23
  module.exports = __toCommonJS(live_region_exports);
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/live-region/index.ts", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export * from './useLiveRegion';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,gCAAc,4BAAd;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,gCAAc,4BAAd;",
6
6
  "names": []
7
7
  }
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  }
18
18
  return to;
19
19
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
21
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
25
  var propTypes_exports = {};
23
26
  __export(propTypes_exports, {
@@ -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 type React from 'react';\n\nexport declare namespace UseLiveRegionT {\n export interface Props {\n id?: string;\n portal?: React.MutableRefObject<HTMLElement>;\n }\n}\n\nexport const propTypes = {};\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADShB,MAAM,YAAY,CAAC;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADShB,MAAM,YAAY,CAAC;",
6
6
  "names": []
7
7
  }
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  }
18
18
  return to;
19
19
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
21
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
25
  var styles_exports = {};
23
26
  __export(styles_exports, {
@@ -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
  }
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  }
18
18
  return to;
19
19
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
21
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
25
  var useLiveRegion_exports = {};
23
26
  __export(useLiveRegion_exports, {
@@ -26,8 +29,9 @@ __export(useLiveRegion_exports, {
26
29
  });
27
30
  module.exports = __toCommonJS(useLiveRegion_exports);
28
31
  var React = __toESM(require("react"));
32
+ var import_jsx_runtime = require("react/jsx-runtime");
29
33
  var import_react_dom = __toESM(require("react-dom"));
30
- var import_react = __toESM(require("react"));
34
+ var import_react = require("react");
31
35
  var import_ds_utilities = require("@elliemae/ds-utilities");
32
36
  var import_uid = require("uid");
33
37
  var import_styles = require("./styles");
@@ -44,28 +48,31 @@ const DSLiveRegion = (0, import_react.memo)((props) => {
44
48
  setAriaLive("polite");
45
49
  setRole(void 0);
46
50
  }, []);
47
- const configure = (0, import_react.useCallback)((message, options) => {
48
- reset();
49
- setTimeout(() => {
50
- if (options?.unsafe_emulateAssertiveNVDA)
51
- setUnsafe_emulateAssertiveNVDA(true);
51
+ const configure = (0, import_react.useCallback)(
52
+ (message, options) => {
53
+ reset();
52
54
  setTimeout(() => {
53
- if (options?.assertive || options?.unsafe_emulateAssertiveNVDA)
54
- setAriaLive("assertive");
55
- if (options?.unsafe_emulateAssertiveNVDA) {
56
- setRole("alert");
57
- setUnsafe_emulateAssertiveNVDA(false);
58
- }
59
- if (options?.delay) {
60
- setTimeout(() => {
55
+ if (options?.unsafe_emulateAssertiveNVDA)
56
+ setUnsafe_emulateAssertiveNVDA(true);
57
+ setTimeout(() => {
58
+ if (options?.assertive || options?.unsafe_emulateAssertiveNVDA)
59
+ setAriaLive("assertive");
60
+ if (options?.unsafe_emulateAssertiveNVDA) {
61
+ setRole("alert");
62
+ setUnsafe_emulateAssertiveNVDA(false);
63
+ }
64
+ if (options?.delay) {
65
+ setTimeout(() => {
66
+ setInternalMessage(message);
67
+ }, options?.delay);
68
+ } else {
61
69
  setInternalMessage(message);
62
- }, options?.delay);
63
- } else {
64
- setInternalMessage(message);
65
- }
70
+ }
71
+ });
66
72
  });
67
- });
68
- }, [reset]);
73
+ },
74
+ [reset]
75
+ );
69
76
  (0, import_react.useEffect)(() => {
70
77
  if (props.methods) {
71
78
  props.methods.current.read = configure;
@@ -73,26 +80,33 @@ const DSLiveRegion = (0, import_react.memo)((props) => {
73
80
  }, [configure, props.methods]);
74
81
  if (unsafe_emulateAssertiveNVDA)
75
82
  return null;
76
- return import_react_dom.default.createPortal(/* @__PURE__ */ import_react.default.createElement(import_styles.StyledContainer, {
77
- "aria-atomic": true,
78
- id,
79
- role,
80
- "aria-live": ariaLive
81
- }, internalMessage), portal?.current || document.body);
83
+ return import_react_dom.default.createPortal(
84
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledContainer, {
85
+ "aria-atomic": true,
86
+ id,
87
+ role,
88
+ "aria-live": ariaLive,
89
+ children: internalMessage
90
+ }),
91
+ portal?.current || document.body
92
+ );
82
93
  });
83
94
  const useLiveRegion = (props) => {
84
95
  const methods = (0, import_react.useRef)({});
85
96
  const { id, portal } = props || {};
86
97
  const instanceUID = (0, import_react.useMemo)(() => `ds-live-region-${(0, import_uid.uid)(5)}`, []);
87
98
  const read = (0, import_react.useCallback)((message, options) => methods.current.read?.(message, options), []);
88
- return (0, import_react.useMemo)(() => ({
89
- LiveRegion: () => /* @__PURE__ */ import_react.default.createElement(DSLiveRegion, {
90
- methods,
91
- id: instanceUID || id,
92
- portal
99
+ return (0, import_react.useMemo)(
100
+ () => ({
101
+ LiveRegion: () => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(DSLiveRegion, {
102
+ methods,
103
+ id: instanceUID || id,
104
+ portal
105
+ }),
106
+ read
93
107
  }),
94
- read
95
- }), [id, instanceUID, portal, read]);
108
+ [id, instanceUID, portal, read]
109
+ );
96
110
  };
97
111
  useLiveRegion.displayName = "useLiveRegion";
98
112
  const UseLiveRegionWithSchema = (0, import_ds_utilities.describe)(useLiveRegion);
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/live-region/useLiveRegion.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
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-utilities';\nimport { uid } from 'uid';\nimport { StyledContainer } from './styles';\nimport { propTypes } 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={instanceUID || id} portal={portal} />,\n read,\n }),\n [id, instanceUID, portal, read],\n );\n};\n\nuseLiveRegion.displayName = 'useLiveRegion';\nconst UseLiveRegionWithSchema = describe(useLiveRegion);\nUseLiveRegionWithSchema.propTypes = propTypes;\nexport { useLiveRegion, UseLiveRegionWithSchema };\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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AAAA,QAAkB,IAAI,eAAe;AAAA,QAAI;AAAA,OAAgB;AAAA,MACzF;AAAA,IACF;AAAA,IACA,CAAC,IAAI,aAAa,QAAQ,IAAI;AAAA,EAChC;AACF;AAEA,cAAc,cAAc;AAC5B,MAAM,8BAA0B,8BAAS,aAAa;AACtD,wBAAwB,YAAY;",
6
+ "names": ["ReactDOM"]
7
7
  }
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  }
18
18
  return to;
19
19
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
21
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
25
  var DSSkipTo_exports = {};
23
26
  __export(DSSkipTo_exports, {
@@ -26,7 +29,8 @@ __export(DSSkipTo_exports, {
26
29
  });
27
30
  module.exports = __toCommonJS(DSSkipTo_exports);
28
31
  var React = __toESM(require("react"));
29
- var import_react = __toESM(require("react"));
32
+ var import_jsx_runtime = require("react/jsx-runtime");
33
+ var import_react = require("react");
30
34
  var import_ds_utilities = require("@elliemae/ds-utilities");
31
35
  var import_propTypes = require("./propTypes");
32
36
  var import_styles = require("./styles");
@@ -35,9 +39,10 @@ const DSSkipTo = (props) => {
35
39
  const handleOnClick = (0, import_react.useCallback)(() => {
36
40
  document.getElementById(goTo).focus();
37
41
  }, [goTo]);
38
- return /* @__PURE__ */ import_react.default.createElement(import_styles.StyledButton, {
39
- onClick: handleOnClick
40
- }, message);
42
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_styles.StyledButton, {
43
+ onClick: handleOnClick,
44
+ children: message
45
+ });
41
46
  };
42
47
  DSSkipTo.propTypes = import_propTypes.propTypes;
43
48
  DSSkipTo.displayName = "DSSkipTo";
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/skip-to/DSSkipTo.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import React, { useCallback } from 'react';\nimport { describe } from '@elliemae/ds-utilities';\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;ADAvB,mBAAmC;AACnC,0BAAyB;AACzB,uBAA0B;AAE1B,oBAA6B;AAE7B,MAAM,WAAW,CAAC,UAA8B;AAC9C,QAAM,EAAE,MAAM,UAAU,2BAA2B;AACnD,QAAM,gBAAgB,8BAAY,MAAM;AACtC,IAAC,SAAS,eAAe,IAAI,EAAkB,MAAM;AAAA,EACvD,GAAG,CAAC,IAAI,CAAC;AACT,SAAO,mDAAC;AAAA,IAAa,SAAS;AAAA,KAAgB,OAAQ;AACxD;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,qBAAqB,kCAAS,QAAQ;AAC5C,mBAAmB,YAAY;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB;AAAA,mBAAmC;AACnC,0BAAyB;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;AAAA,IAAa,SAAS;AAAA,IAAgB;AAAA,GAAQ;AACxD;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,yBAAqB,8BAAS,QAAQ;AAC5C,mBAAmB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -13,7 +13,10 @@ var __copyProps = (to, from, except, desc) => {
13
13
  }
14
14
  return to;
15
15
  };
16
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
16
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
17
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
18
+ mod
19
+ ));
17
20
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
21
  var index_d_exports = {};
19
22
  module.exports = __toCommonJS(index_d_exports);
@@ -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
  }
@@ -14,7 +14,10 @@ var __copyProps = (to, from, except, desc) => {
14
14
  return to;
15
15
  };
16
16
  var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "default"), secondTarget && __copyProps(secondTarget, mod, "default"));
17
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
17
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
18
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
19
+ mod
20
+ ));
18
21
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
22
  var skip_to_exports = {};
20
23
  module.exports = __toCommonJS(skip_to_exports);
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../src/skip-to/index.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["export * from './DSSkipTo';\n", "import * as React from 'react';\nexport { React };\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,4BAAc,uBAAd;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;ACAA,YAAuB;ADAvB,4BAAc,uBAAd;",
6
6
  "names": []
7
7
  }
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  }
18
18
  return to;
19
19
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
21
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
25
  var propTypes_exports = {};
23
26
  __export(propTypes_exports, {
@@ -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 { PropTypes } from '@elliemae/ds-utilities';\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;AAAA;ACAA,YAAuB;ADAvB,0BAA0B;AAEnB,MAAM,YAAY;AAAA,EACvB,MAAM,8BAAU,OAAO,WAAW,YAAY,qDAAqD;AAAA,EACnG,SAAS,8BAAU,OAAO,YAAY,uEAAuE;AAC/G;",
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;ACAA,YAAuB;ADAvB,0BAA0B;AAEnB,MAAM,YAAY;AAAA,EACvB,MAAM,8BAAU,OAAO,WAAW,YAAY,qDAAqD;AAAA,EACnG,SAAS,8BAAU,OAAO,YAAY,uEAAuE;AAC/G;",
6
6
  "names": []
7
7
  }
@@ -17,7 +17,10 @@ var __copyProps = (to, from, except, desc) => {
17
17
  }
18
18
  return to;
19
19
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, mod));
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
22
+ mod
23
+ ));
21
24
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
22
25
  var styles_exports = {};
23
26
  __export(styles_exports, {
@@ -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,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;",
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;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../scripts/build/transpile/react-shim.js", "../../src/index.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './skip-to';\nexport * from './live-region';\n"],
5
- "mappings": "AAAA;ACAA;AACA;",
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;AACd,cAAc;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,7 @@
1
1
  import * as React from "react";
2
+ import { jsx } from "react/jsx-runtime";
2
3
  import ReactDOM from "react-dom";
3
- import React2, { memo, useEffect, useState } from "react";
4
+ import { memo, useEffect, useState } from "react";
4
5
  import { describe } from "@elliemae/ds-utilities";
5
6
  import { StyledContainer } from "./styles";
6
7
  import { propTypes } from "./propTypes";
@@ -13,12 +14,16 @@ const DSLiveRegion = memo((props) => {
13
14
  }, [props.methods]);
14
15
  if (text === "")
15
16
  return null;
16
- return ReactDOM.createPortal(/* @__PURE__ */ React2.createElement(StyledContainer, {
17
- "aria-atomic": true,
18
- id: props.id,
19
- role: props.role,
20
- "aria-live": props["aria-live"] || "polite"
21
- }, text), props.portal?.current || document.body);
17
+ return ReactDOM.createPortal(
18
+ /* @__PURE__ */ jsx(StyledContainer, {
19
+ "aria-atomic": true,
20
+ id: props.id,
21
+ role: props.role,
22
+ "aria-live": props["aria-live"] || "polite",
23
+ children: text
24
+ }),
25
+ props.portal?.current || document.body
26
+ );
22
27
  });
23
28
  DSLiveRegion.propTypes = propTypes;
24
29
  DSLiveRegion.displayName = "DSLiveRegion";
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/live-region/DSLiveRegion.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import ReactDOM from 'react-dom';\nimport React, { memo, useEffect, useState } from 'react';\nimport { describe } from '@elliemae/ds-utilities';\nimport { StyledContainer } from './styles';\nimport { propTypes } from './propTypes';\nimport type { DSLiveRegionT } from './propTypes';\n\nconst DSLiveRegion = memo((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 = propTypes;\nDSLiveRegion.displayName = 'DSLiveRegion';\nconst DSLiveRegionWithSchema = describe(DSLiveRegion);\nDSLiveRegionWithSchema.propTypes = propTypes;\n\nexport { DSLiveRegion, DSLiveRegionWithSchema };\n"],
5
- "mappings": "AAAA;ACAA;AACA;AACA;AACA;AACA;AAGA,MAAM,eAAe,KAAK,CAAC,UAAmD;AAC5E,QAAM,CAAC,MAAM,WAAW,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,aACd,qCAAC;AAAA,IAAgB,eAAW;AAAA,IAAC,IAAI,MAAM;AAAA,IAAI,MAAM,MAAM;AAAA,IAAM,aAAW,MAAM,gBAAgB;AAAA,KAC3F,IACH,GACA,MAAM,QAAQ,WAAW,SAAS,IACpC;AACF,CAAC;AAED,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;",
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,OAAO,cAAc;AACrB,SAAgB,MAAM,WAAW,gBAAgB;AACjD,SAAS,gBAAgB;AACzB,SAAS,uBAAuB;AAChC,SAAS,iBAAiB;AAG1B,MAAM,eAAe,KAAK,CAAC,UAAmD;AAC5E,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;AAAA,MAAgB,eAAW;AAAA,MAAC,IAAI,MAAM;AAAA,MAAI,MAAM,MAAM;AAAA,MAAM,aAAW,MAAM,gBAAgB;AAAA,MAC3F;AAAA,KACH;AAAA,IACA,MAAM,QAAQ,WAAW,SAAS;AAAA,EACpC;AACF,CAAC;AAED,aAAa,YAAY;AACzB,aAAa,cAAc;AAC3B,MAAM,yBAAyB,SAAS,YAAY;AACpD,uBAAuB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/live-region/index.ts"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './useLiveRegion';\n"],
5
- "mappings": "AAAA;ACAA;",
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/live-region/propTypes.ts"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import type React from 'react';\n\nexport declare namespace UseLiveRegionT {\n export interface Props {\n id?: string;\n portal?: React.MutableRefObject<HTMLElement>;\n }\n}\n\nexport const propTypes = {};\n"],
5
- "mappings": "AAAA;ACSO,MAAM,YAAY,CAAC;",
5
+ "mappings": "AAAA,YAAY,WAAW;ACShB,MAAM,YAAY,CAAC;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/live-region/styles.ts"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "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"],
5
- "mappings": "AAAA;ACAA;AAEO,MAAM,kBAAkB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,cAAc;AAEhB,MAAM,kBAAkB,OAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;",
6
6
  "names": []
7
7
  }
@@ -1,6 +1,7 @@
1
1
  import * as React from "react";
2
+ import { jsx } from "react/jsx-runtime";
2
3
  import ReactDOM from "react-dom";
3
- import React2, { memo, useEffect, useState, useCallback, useRef, useMemo } from "react";
4
+ import { memo, useEffect, useState, useCallback, useRef, useMemo } from "react";
4
5
  import { describe } from "@elliemae/ds-utilities";
5
6
  import { uid } from "uid";
6
7
  import { StyledContainer } from "./styles";
@@ -17,28 +18,31 @@ const DSLiveRegion = memo((props) => {
17
18
  setAriaLive("polite");
18
19
  setRole(void 0);
19
20
  }, []);
20
- const configure = useCallback((message, options) => {
21
- reset();
22
- setTimeout(() => {
23
- if (options?.unsafe_emulateAssertiveNVDA)
24
- setUnsafe_emulateAssertiveNVDA(true);
21
+ const configure = useCallback(
22
+ (message, options) => {
23
+ reset();
25
24
  setTimeout(() => {
26
- if (options?.assertive || options?.unsafe_emulateAssertiveNVDA)
27
- setAriaLive("assertive");
28
- if (options?.unsafe_emulateAssertiveNVDA) {
29
- setRole("alert");
30
- setUnsafe_emulateAssertiveNVDA(false);
31
- }
32
- if (options?.delay) {
33
- setTimeout(() => {
25
+ if (options?.unsafe_emulateAssertiveNVDA)
26
+ setUnsafe_emulateAssertiveNVDA(true);
27
+ setTimeout(() => {
28
+ if (options?.assertive || options?.unsafe_emulateAssertiveNVDA)
29
+ setAriaLive("assertive");
30
+ if (options?.unsafe_emulateAssertiveNVDA) {
31
+ setRole("alert");
32
+ setUnsafe_emulateAssertiveNVDA(false);
33
+ }
34
+ if (options?.delay) {
35
+ setTimeout(() => {
36
+ setInternalMessage(message);
37
+ }, options?.delay);
38
+ } else {
34
39
  setInternalMessage(message);
35
- }, options?.delay);
36
- } else {
37
- setInternalMessage(message);
38
- }
40
+ }
41
+ });
39
42
  });
40
- });
41
- }, [reset]);
43
+ },
44
+ [reset]
45
+ );
42
46
  useEffect(() => {
43
47
  if (props.methods) {
44
48
  props.methods.current.read = configure;
@@ -46,26 +50,33 @@ const DSLiveRegion = memo((props) => {
46
50
  }, [configure, props.methods]);
47
51
  if (unsafe_emulateAssertiveNVDA)
48
52
  return null;
49
- return ReactDOM.createPortal(/* @__PURE__ */ React2.createElement(StyledContainer, {
50
- "aria-atomic": true,
51
- id,
52
- role,
53
- "aria-live": ariaLive
54
- }, internalMessage), portal?.current || document.body);
53
+ return ReactDOM.createPortal(
54
+ /* @__PURE__ */ jsx(StyledContainer, {
55
+ "aria-atomic": true,
56
+ id,
57
+ role,
58
+ "aria-live": ariaLive,
59
+ children: internalMessage
60
+ }),
61
+ portal?.current || document.body
62
+ );
55
63
  });
56
64
  const useLiveRegion = (props) => {
57
65
  const methods = useRef({});
58
66
  const { id, portal } = props || {};
59
67
  const instanceUID = useMemo(() => `ds-live-region-${uid(5)}`, []);
60
68
  const read = useCallback((message, options) => methods.current.read?.(message, options), []);
61
- return useMemo(() => ({
62
- LiveRegion: () => /* @__PURE__ */ React2.createElement(DSLiveRegion, {
63
- methods,
64
- id: instanceUID || id,
65
- portal
69
+ return useMemo(
70
+ () => ({
71
+ LiveRegion: () => /* @__PURE__ */ jsx(DSLiveRegion, {
72
+ methods,
73
+ id: instanceUID || id,
74
+ portal
75
+ }),
76
+ read
66
77
  }),
67
- read
68
- }), [id, instanceUID, portal, read]);
78
+ [id, instanceUID, portal, read]
79
+ );
69
80
  };
70
81
  useLiveRegion.displayName = "useLiveRegion";
71
82
  const UseLiveRegionWithSchema = describe(useLiveRegion);
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/live-region/useLiveRegion.tsx"],
4
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-utilities';\nimport { uid } from 'uid';\nimport { StyledContainer } from './styles';\nimport { propTypes } 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={instanceUID || id} portal={portal} />,\n read,\n }),\n [id, instanceUID, portal, read],\n );\n};\n\nuseLiveRegion.displayName = 'useLiveRegion';\nconst UseLiveRegionWithSchema = describe(useLiveRegion);\nUseLiveRegionWithSchema.propTypes = propTypes;\nexport { useLiveRegion, UseLiveRegionWithSchema };\n"],
5
- "mappings": "AAAA;ACCA;AACA;AACA;AACA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AAc;AAC5B,MAAM,0BAA0B,SAAS,aAAa;AACtD,wBAAwB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -1,5 +1,6 @@
1
1
  import * as React from "react";
2
- import React2, { useCallback } from "react";
2
+ import { jsx } from "react/jsx-runtime";
3
+ import { useCallback } from "react";
3
4
  import { describe } from "@elliemae/ds-utilities";
4
5
  import { propTypes } from "./propTypes";
5
6
  import { StyledButton } from "./styles";
@@ -8,9 +9,10 @@ const DSSkipTo = (props) => {
8
9
  const handleOnClick = useCallback(() => {
9
10
  document.getElementById(goTo).focus();
10
11
  }, [goTo]);
11
- return /* @__PURE__ */ React2.createElement(StyledButton, {
12
- onClick: handleOnClick
13
- }, message);
12
+ return /* @__PURE__ */ jsx(StyledButton, {
13
+ onClick: handleOnClick,
14
+ children: message
15
+ });
14
16
  };
15
17
  DSSkipTo.propTypes = propTypes;
16
18
  DSSkipTo.displayName = "DSSkipTo";
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/skip-to/DSSkipTo.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import React, { useCallback } from 'react';\nimport { describe } from '@elliemae/ds-utilities';\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"],
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,IAAI,EAAkB,MAAM;AAAA,EACvD,GAAG,CAAC,IAAI,CAAC;AACT,SAAO,qCAAC;AAAA,IAAa,SAAS;AAAA,KAAgB,OAAQ;AACxD;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,qBAAqB,SAAS,QAAQ;AAC5C,mBAAmB,YAAY;",
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB;AAAA,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;AAAA,IAAa,SAAS;AAAA,IAAgB;AAAA,GAAQ;AACxD;AAEA,SAAS,YAAY;AACrB,SAAS,cAAc;AACvB,MAAM,qBAAqB,SAAS,QAAQ;AAC5C,mBAAmB,YAAY;",
6
6
  "names": []
7
7
  }
@@ -2,6 +2,6 @@
2
2
  "version": 3,
3
3
  "sources": ["../../../../../scripts/build/transpile/react-shim.js"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n"],
5
- "mappings": "AAAA;",
5
+ "mappings": "AAAA,YAAY,WAAW;",
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/index.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "export * from './DSSkipTo';\n"],
5
- "mappings": "AAAA;ACAA;",
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,cAAc;",
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/propTypes.tsx"],
4
4
  "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "import { PropTypes } from '@elliemae/ds-utilities';\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,qDAAqD;AAAA,EACnG,SAAS,UAAU,OAAO,YAAY,uEAAuE;AAC/G;",
5
+ "mappings": "AAAA,YAAY,WAAW;ACAvB,SAAS,iBAAiB;AAEnB,MAAM,YAAY;AAAA,EACvB,MAAM,UAAU,OAAO,WAAW,YAAY,qDAAqD;AAAA,EACnG,SAAS,UAAU,OAAO,YAAY,uEAAuE;AAC/G;",
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;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;",
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;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-accessibility",
3
- "version": "3.4.3-rc.1",
3
+ "version": "3.5.0-rc.10",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Accessibility",
6
6
  "files": [
@@ -51,8 +51,8 @@
51
51
  "indent": 4
52
52
  },
53
53
  "dependencies": {
54
- "@elliemae/ds-system": "3.4.3-rc.1",
55
- "@elliemae/ds-utilities": "3.4.3-rc.1"
54
+ "@elliemae/ds-system": "3.5.0-rc.10",
55
+ "@elliemae/ds-utilities": "3.5.0-rc.10"
56
56
  },
57
57
  "devDependencies": {
58
58
  "styled-components": "~5.3.5"