@patternfly/react-table 4.89.2 → 4.90.0

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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # 4.90.0 (2022-06-01)
7
+
8
+
9
+ ### Features
10
+
11
+ * **table:** full screen demo for sticky first column ([#7451](https://github.com/patternfly/patternfly-react/issues/7451)) ([f610dd4](https://github.com/patternfly/patternfly-react/commit/f610dd4726b16d73a166f7a57da0fa3588b8201d))
12
+
13
+
14
+
15
+
16
+
6
17
  ## 4.89.2 (2022-05-31)
7
18
 
8
19
  **Note:** Version bump only for package @patternfly/react-table
@@ -130,7 +130,7 @@
130
130
  };
131
131
 
132
132
  /*!
133
- * tabbable 5.3.2
133
+ * tabbable 5.3.3
134
134
  * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
135
135
  */
136
136
  var candidateSelectors = ['input', 'select', 'textarea', 'a[href]', 'button', '[tabindex]:not(slot)', 'audio[controls]', 'video[controls]', '[contenteditable]:not([contenteditable="false"])', 'details>summary:first-of-type', 'details'];
@@ -165,6 +165,12 @@
165
165
  * @returns {ShadowRoot|boolean} ShadowRoot if available or boolean indicating if a shadowRoot is attached but not available.
166
166
  */
167
167
 
168
+ /**
169
+ * @callback ShadowRootFilter
170
+ * @param {Element} shadowHostNode the element which contains shadow content
171
+ * @returns {boolean} true if a shadow root could potentially contain valid candidates.
172
+ */
173
+
168
174
  /**
169
175
  * @typedef {Object} CandidatesScope
170
176
  * @property {Element} scope contains inner candidates
@@ -178,6 +184,7 @@
178
184
  * or a boolean stating if it has an undisclosed shadow root
179
185
  * @property {(node: Element) => boolean} filter filter candidates
180
186
  * @property {boolean} flatten if true then result will flatten any CandidatesScope into the returned list
187
+ * @property {ShadowRootFilter} shadowRootFilter filter shadow roots;
181
188
  */
182
189
 
183
190
  /**
@@ -220,8 +227,9 @@
220
227
 
221
228
  var shadowRoot = element.shadowRoot || // check for an undisclosed shadow
222
229
  typeof options.getShadowRoot === 'function' && options.getShadowRoot(element);
230
+ var validShadowRoot = !options.shadowRootFilter || options.shadowRootFilter(element);
223
231
 
224
- if (shadowRoot) {
232
+ if (shadowRoot && validShadowRoot) {
225
233
  // add shadow dom scope IIF a shadow root node was given; otherwise, an undisclosed
226
234
  // shadow exists, so look at light dom children as fallback BUT create a scope for any
227
235
  // child candidates found because they're likely slotted elements (elements that are
@@ -502,6 +510,18 @@
502
510
 
503
511
  return true;
504
512
  };
513
+
514
+ var isValidShadowRootTabbable = function isValidShadowRootTabbable(shadowHostNode) {
515
+ var tabIndex = parseInt(shadowHostNode.getAttribute('tabindex'), 10);
516
+
517
+ if (isNaN(tabIndex) || tabIndex >= 0) {
518
+ return true;
519
+ } // If a custom element has an explicit negative tabindex,
520
+ // browsers will not allow tab targeting said element's children.
521
+
522
+
523
+ return false;
524
+ };
505
525
  /**
506
526
  * @param {Array.<Element|CandidatesScope>} candidates
507
527
  * @returns Element[]
@@ -543,7 +563,8 @@
543
563
  candidates = getCandidatesIteratively([el], options.includeContainer, {
544
564
  filter: isNodeMatchingSelectorTabbable.bind(null, options),
545
565
  flatten: false,
546
- getShadowRoot: options.getShadowRoot
566
+ getShadowRoot: options.getShadowRoot,
567
+ shadowRootFilter: isValidShadowRootTabbable
547
568
  });
548
569
  } else {
549
570
  candidates = getCandidates(el, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));