@urbanos/react-discovery-ui 2.1.43 → 2.1.44
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.
|
@@ -23,6 +23,13 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
23
23
|
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
24
24
|
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
25
25
|
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
26
|
+
function extractText(node) {
|
|
27
|
+
if (!node) return '';
|
|
28
|
+
if (typeof node === 'string' || typeof node === 'number') return String(node);
|
|
29
|
+
if (Array.isArray(node)) return node.map(extractText).join(' ').trim();
|
|
30
|
+
if (node.props && node.props.children) return extractText(node.props.children);
|
|
31
|
+
return '';
|
|
32
|
+
}
|
|
26
33
|
var _default = exports.default = /*#__PURE__*/function (_Component) {
|
|
27
34
|
function _default(props) {
|
|
28
35
|
var _this;
|
|
@@ -65,7 +72,7 @@ var _default = exports.default = /*#__PURE__*/function (_Component) {
|
|
|
65
72
|
},
|
|
66
73
|
role: "button",
|
|
67
74
|
tabIndex: "0",
|
|
68
|
-
"aria-label":
|
|
75
|
+
"aria-label": [this.props.title, extractText(this.props.headerHtml)].filter(Boolean).join(': ') || 'collapsable box',
|
|
69
76
|
"aria-pressed": this.state.expanded
|
|
70
77
|
}, /*#__PURE__*/React.createElement("div", {
|
|
71
78
|
className: "header-text-items"
|