@elliemae/ds-accessibility 3.1.0-next.12 → 3.1.0-next.15
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.
@@ -0,0 +1,53 @@
|
|
1
|
+
var __create = Object.create;
|
2
|
+
var __defProp = Object.defineProperty;
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
5
|
+
var __getProtoOf = Object.getPrototypeOf;
|
6
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
7
|
+
var __export = (target, all) => {
|
8
|
+
for (var name in all)
|
9
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
10
|
+
};
|
11
|
+
var __copyProps = (to, from, except, desc) => {
|
12
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
13
|
+
for (let key of __getOwnPropNames(from))
|
14
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
15
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
16
|
+
}
|
17
|
+
return to;
|
18
|
+
};
|
19
|
+
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 __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
21
|
+
var DSLiveRegion_exports = {};
|
22
|
+
__export(DSLiveRegion_exports, {
|
23
|
+
DSLiveRegion: () => DSLiveRegion,
|
24
|
+
DSLiveRegionWithSchema: () => DSLiveRegionWithSchema
|
25
|
+
});
|
26
|
+
module.exports = __toCommonJS(DSLiveRegion_exports);
|
27
|
+
var React = __toESM(require("react"));
|
28
|
+
var import_react_dom = __toESM(require("react-dom"));
|
29
|
+
var import_react = __toESM(require("react"));
|
30
|
+
var import_ds_utilities = require("@elliemae/ds-utilities");
|
31
|
+
var import_styles = require("./styles");
|
32
|
+
var import_propTypes = require("./propTypes");
|
33
|
+
const DSLiveRegion = (0, import_react.memo)((props) => {
|
34
|
+
const [text, setText] = (0, import_react.useState)(" ");
|
35
|
+
(0, import_react.useEffect)(() => {
|
36
|
+
if (props.methods && props.methods.current) {
|
37
|
+
props.methods.current.read = setText;
|
38
|
+
}
|
39
|
+
}, [props.methods]);
|
40
|
+
if (text === "")
|
41
|
+
return null;
|
42
|
+
return import_react_dom.default.createPortal(/* @__PURE__ */ import_react.default.createElement(import_styles.StyledContainer, {
|
43
|
+
"aria-atomic": true,
|
44
|
+
id: props.id,
|
45
|
+
role: props.role,
|
46
|
+
"aria-live": props["aria-live"] || "polite"
|
47
|
+
}, text), props.portal?.current || document.body);
|
48
|
+
});
|
49
|
+
DSLiveRegion.propTypes = import_propTypes.propTypes;
|
50
|
+
DSLiveRegion.displayName = "DSLiveRegion";
|
51
|
+
const DSLiveRegionWithSchema = (0, import_ds_utilities.describe)(DSLiveRegion);
|
52
|
+
DSLiveRegionWithSchema.propTypes = import_propTypes.propTypes;
|
53
|
+
//# sourceMappingURL=DSLiveRegion.js.map
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
"version": 3,
|
3
|
+
"sources": ["../../../src/live-region/DSLiveRegion.tsx", "../../../../../scripts/build/transpile/react-shim.js"],
|
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": []
|
7
|
+
}
|
@@ -0,0 +1,31 @@
|
|
1
|
+
import * as React from "react";
|
2
|
+
import ReactDOM from "react-dom";
|
3
|
+
import React2, { memo, useEffect, useState } from "react";
|
4
|
+
import { describe } from "@elliemae/ds-utilities";
|
5
|
+
import { StyledContainer } from "./styles";
|
6
|
+
import { propTypes } from "./propTypes";
|
7
|
+
const DSLiveRegion = memo((props) => {
|
8
|
+
const [text, setText] = useState(" ");
|
9
|
+
useEffect(() => {
|
10
|
+
if (props.methods && props.methods.current) {
|
11
|
+
props.methods.current.read = setText;
|
12
|
+
}
|
13
|
+
}, [props.methods]);
|
14
|
+
if (text === "")
|
15
|
+
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);
|
22
|
+
});
|
23
|
+
DSLiveRegion.propTypes = propTypes;
|
24
|
+
DSLiveRegion.displayName = "DSLiveRegion";
|
25
|
+
const DSLiveRegionWithSchema = describe(DSLiveRegion);
|
26
|
+
DSLiveRegionWithSchema.propTypes = propTypes;
|
27
|
+
export {
|
28
|
+
DSLiveRegion,
|
29
|
+
DSLiveRegionWithSchema
|
30
|
+
};
|
31
|
+
//# sourceMappingURL=DSLiveRegion.js.map
|
@@ -0,0 +1,7 @@
|
|
1
|
+
{
|
2
|
+
"version": 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, { 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;",
|
6
|
+
"names": []
|
7
|
+
}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@elliemae/ds-accessibility",
|
3
|
-
"version": "3.1.0-next.
|
3
|
+
"version": "3.1.0-next.15",
|
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.1.0-next.
|
55
|
-
"@elliemae/ds-utilities": "3.1.0-next.
|
54
|
+
"@elliemae/ds-system": "3.1.0-next.15",
|
55
|
+
"@elliemae/ds-utilities": "3.1.0-next.15"
|
56
56
|
},
|
57
57
|
"devDependencies": {
|
58
58
|
"styled-components": "~5.3.3"
|