| 1 | "use strict";
|
|---|
| 2 |
|
|---|
| 3 | Object.defineProperty(exports, "__esModule", {
|
|---|
| 4 | value: true
|
|---|
| 5 | });
|
|---|
| 6 | exports.default = void 0;
|
|---|
| 7 | var _iterationDecorator = _interopRequireDefault(require("./util/iterationDecorator"));
|
|---|
| 8 | function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|---|
| 9 | function _slicedToArray(r, e) { return _arrayWithHoles(r) || _iterableToArrayLimit(r, e) || _unsupportedIterableToArray(r, e) || _nonIterableRest(); }
|
|---|
| 10 | function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|---|
| 11 | function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|---|
| 12 | function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|---|
| 13 | function _iterableToArrayLimit(r, l) { var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"]; if (null != t) { var e, n, i, u, a = [], f = !0, o = !1; try { if (i = (t = t.call(r)).next, 0 === l) { if (Object(t) !== t) return; f = !1; } else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0); } catch (r) { o = !0, n = r; } finally { try { if (!f && null != t.return && (u = t.return(), Object(u) !== u)) return; } finally { if (o) throw n; } } return a; } }
|
|---|
| 14 | function _arrayWithHoles(r) { if (Array.isArray(r)) return r; }
|
|---|
| 15 | var properties = [['aria-activedescendant', {
|
|---|
| 16 | 'type': 'id'
|
|---|
| 17 | }], ['aria-atomic', {
|
|---|
| 18 | 'type': 'boolean'
|
|---|
| 19 | }], ['aria-autocomplete', {
|
|---|
| 20 | 'type': 'token',
|
|---|
| 21 | 'values': ['inline', 'list', 'both', 'none']
|
|---|
| 22 | }], ['aria-braillelabel', {
|
|---|
| 23 | 'type': 'string'
|
|---|
| 24 | }], ['aria-brailleroledescription', {
|
|---|
| 25 | 'type': 'string'
|
|---|
| 26 | }], ['aria-busy', {
|
|---|
| 27 | 'type': 'boolean'
|
|---|
| 28 | }], ['aria-checked', {
|
|---|
| 29 | 'type': 'tristate'
|
|---|
| 30 | }], ['aria-colcount', {
|
|---|
| 31 | type: 'integer'
|
|---|
| 32 | }], ['aria-colindex', {
|
|---|
| 33 | type: 'integer'
|
|---|
| 34 | }], ['aria-colspan', {
|
|---|
| 35 | type: 'integer'
|
|---|
| 36 | }], ['aria-controls', {
|
|---|
| 37 | 'type': 'idlist'
|
|---|
| 38 | }], ['aria-current', {
|
|---|
| 39 | type: 'token',
|
|---|
| 40 | values: ['page', 'step', 'location', 'date', 'time', true, false]
|
|---|
| 41 | }], ['aria-describedby', {
|
|---|
| 42 | 'type': 'idlist'
|
|---|
| 43 | }], ['aria-description', {
|
|---|
| 44 | 'type': 'string'
|
|---|
| 45 | }], ['aria-details', {
|
|---|
| 46 | 'type': 'id'
|
|---|
| 47 | }], ['aria-disabled', {
|
|---|
| 48 | 'type': 'boolean'
|
|---|
| 49 | }], ['aria-dropeffect', {
|
|---|
| 50 | 'type': 'tokenlist',
|
|---|
| 51 | 'values': ['copy', 'execute', 'link', 'move', 'none', 'popup']
|
|---|
| 52 | }], ['aria-errormessage', {
|
|---|
| 53 | 'type': 'id'
|
|---|
| 54 | }], ['aria-expanded', {
|
|---|
| 55 | 'type': 'boolean',
|
|---|
| 56 | 'allowundefined': true
|
|---|
| 57 | }], ['aria-flowto', {
|
|---|
| 58 | 'type': 'idlist'
|
|---|
| 59 | }], ['aria-grabbed', {
|
|---|
| 60 | 'type': 'boolean',
|
|---|
| 61 | 'allowundefined': true
|
|---|
| 62 | }], ['aria-haspopup', {
|
|---|
| 63 | 'type': 'token',
|
|---|
| 64 | 'values': [false, true, 'menu', 'listbox', 'tree', 'grid', 'dialog']
|
|---|
| 65 | }], ['aria-hidden', {
|
|---|
| 66 | 'type': 'boolean',
|
|---|
| 67 | 'allowundefined': true
|
|---|
| 68 | }], ['aria-invalid', {
|
|---|
| 69 | 'type': 'token',
|
|---|
| 70 | 'values': ['grammar', false, 'spelling', true]
|
|---|
| 71 | }], ['aria-keyshortcuts', {
|
|---|
| 72 | type: 'string'
|
|---|
| 73 | }], ['aria-label', {
|
|---|
| 74 | 'type': 'string'
|
|---|
| 75 | }], ['aria-labelledby', {
|
|---|
| 76 | 'type': 'idlist'
|
|---|
| 77 | }], ['aria-level', {
|
|---|
| 78 | 'type': 'integer'
|
|---|
| 79 | }], ['aria-live', {
|
|---|
| 80 | 'type': 'token',
|
|---|
| 81 | 'values': ['assertive', 'off', 'polite']
|
|---|
| 82 | }], ['aria-modal', {
|
|---|
| 83 | type: 'boolean'
|
|---|
| 84 | }], ['aria-multiline', {
|
|---|
| 85 | 'type': 'boolean'
|
|---|
| 86 | }], ['aria-multiselectable', {
|
|---|
| 87 | 'type': 'boolean'
|
|---|
| 88 | }], ['aria-orientation', {
|
|---|
| 89 | 'type': 'token',
|
|---|
| 90 | 'values': ['vertical', 'undefined', 'horizontal']
|
|---|
| 91 | }], ['aria-owns', {
|
|---|
| 92 | 'type': 'idlist'
|
|---|
| 93 | }], ['aria-placeholder', {
|
|---|
| 94 | type: 'string'
|
|---|
| 95 | }], ['aria-posinset', {
|
|---|
| 96 | 'type': 'integer'
|
|---|
| 97 | }], ['aria-pressed', {
|
|---|
| 98 | 'type': 'tristate'
|
|---|
| 99 | }], ['aria-readonly', {
|
|---|
| 100 | 'type': 'boolean'
|
|---|
| 101 | }], ['aria-relevant', {
|
|---|
| 102 | 'type': 'tokenlist',
|
|---|
| 103 | 'values': ['additions', 'all', 'removals', 'text']
|
|---|
| 104 | }], ['aria-required', {
|
|---|
| 105 | 'type': 'boolean'
|
|---|
| 106 | }], ['aria-roledescription', {
|
|---|
| 107 | type: 'string'
|
|---|
| 108 | }], ['aria-rowcount', {
|
|---|
| 109 | type: 'integer'
|
|---|
| 110 | }], ['aria-rowindex', {
|
|---|
| 111 | type: 'integer'
|
|---|
| 112 | }], ['aria-rowspan', {
|
|---|
| 113 | type: 'integer'
|
|---|
| 114 | }], ['aria-selected', {
|
|---|
| 115 | 'type': 'boolean',
|
|---|
| 116 | 'allowundefined': true
|
|---|
| 117 | }], ['aria-setsize', {
|
|---|
| 118 | 'type': 'integer'
|
|---|
| 119 | }], ['aria-sort', {
|
|---|
| 120 | 'type': 'token',
|
|---|
| 121 | 'values': ['ascending', 'descending', 'none', 'other']
|
|---|
| 122 | }], ['aria-valuemax', {
|
|---|
| 123 | 'type': 'number'
|
|---|
| 124 | }], ['aria-valuemin', {
|
|---|
| 125 | 'type': 'number'
|
|---|
| 126 | }], ['aria-valuenow', {
|
|---|
| 127 | 'type': 'number'
|
|---|
| 128 | }], ['aria-valuetext', {
|
|---|
| 129 | 'type': 'string'
|
|---|
| 130 | }]];
|
|---|
| 131 | var ariaPropsMap = {
|
|---|
| 132 | entries: function entries() {
|
|---|
| 133 | return properties;
|
|---|
| 134 | },
|
|---|
| 135 | forEach: function forEach(fn) {
|
|---|
| 136 | var thisArg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|---|
| 137 | for (var _i = 0, _properties = properties; _i < _properties.length; _i++) {
|
|---|
| 138 | var _properties$_i = _slicedToArray(_properties[_i], 2),
|
|---|
| 139 | key = _properties$_i[0],
|
|---|
| 140 | values = _properties$_i[1];
|
|---|
| 141 | fn.call(thisArg, values, key, properties);
|
|---|
| 142 | }
|
|---|
| 143 | },
|
|---|
| 144 | get: function get(key) {
|
|---|
| 145 | var item = properties.filter(function (tuple) {
|
|---|
| 146 | return tuple[0] === key ? true : false;
|
|---|
| 147 | })[0];
|
|---|
| 148 | return item && item[1];
|
|---|
| 149 | },
|
|---|
| 150 | has: function has(key) {
|
|---|
| 151 | return !!ariaPropsMap.get(key);
|
|---|
| 152 | },
|
|---|
| 153 | keys: function keys() {
|
|---|
| 154 | return properties.map(function (_ref) {
|
|---|
| 155 | var _ref2 = _slicedToArray(_ref, 1),
|
|---|
| 156 | key = _ref2[0];
|
|---|
| 157 | return key;
|
|---|
| 158 | });
|
|---|
| 159 | },
|
|---|
| 160 | values: function values() {
|
|---|
| 161 | return properties.map(function (_ref3) {
|
|---|
| 162 | var _ref4 = _slicedToArray(_ref3, 2),
|
|---|
| 163 | values = _ref4[1];
|
|---|
| 164 | return values;
|
|---|
| 165 | });
|
|---|
| 166 | }
|
|---|
| 167 | };
|
|---|
| 168 | var _default = exports.default = (0, _iterationDecorator.default)(ariaPropsMap, ariaPropsMap.entries()); |
|---|