@haiilo/catalyst 6.0.2 → 6.0.3
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/dist/catalyst/catalyst.css +16 -4
- package/dist/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/index.cdn.js +0 -1
- package/dist/catalyst/{p-60298958.entry.js → p-b218a2b0.entry.js} +5 -5
- package/dist/catalyst/p-b218a2b0.entry.js.map +1 -0
- package/dist/catalyst/scss/core/_typography.scss +0 -4
- package/dist/catalyst/scss/fonts/_fonts-mixins.scss +1 -1
- package/dist/cjs/cat-alert_25.cjs.entry.js +53 -16
- package/dist/cjs/cat-alert_25.cjs.entry.js.map +1 -1
- package/dist/collection/index.cdn.js +0 -1
- package/dist/collection/scss/core/_typography.scss +0 -4
- package/dist/collection/scss/fonts/_fonts-mixins.scss +1 -1
- package/dist/components/cat-dropdown2.js +47 -15
- package/dist/components/cat-dropdown2.js.map +1 -1
- package/dist/components/cat-scrollable2.js +6 -1
- package/dist/components/cat-scrollable2.js.map +1 -1
- package/dist/components/cat-select-demo.js.map +1 -1
- package/dist/components/cat-select2.js.map +1 -1
- package/dist/components/floating-ui.dom.esm.js.map +1 -1
- package/dist/esm/cat-alert_25.entry.js +53 -16
- package/dist/esm/cat-alert_25.entry.js.map +1 -1
- package/package.json +3 -3
- package/dist/catalyst/p-60298958.entry.js.map +0 -1
|
@@ -4729,7 +4729,7 @@ const computePosition = (reference, floating, options) => {
|
|
|
4729
4729
|
const timeTransitionS = 125;
|
|
4730
4730
|
|
|
4731
4731
|
/*!
|
|
4732
|
-
* tabbable 6.
|
|
4732
|
+
* tabbable 6.2.0
|
|
4733
4733
|
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
4734
4734
|
*/
|
|
4735
4735
|
// NOTE: separate `:not()` selectors has broader browser support than the newer
|
|
@@ -4909,7 +4909,27 @@ var getCandidatesIteratively = function getCandidatesIteratively(elements, inclu
|
|
|
4909
4909
|
}
|
|
4910
4910
|
return candidates;
|
|
4911
4911
|
};
|
|
4912
|
-
|
|
4912
|
+
|
|
4913
|
+
/**
|
|
4914
|
+
* @private
|
|
4915
|
+
* Determines if the node has an explicitly specified `tabindex` attribute.
|
|
4916
|
+
* @param {HTMLElement} node
|
|
4917
|
+
* @returns {boolean} True if so; false if not.
|
|
4918
|
+
*/
|
|
4919
|
+
var hasTabIndex = function hasTabIndex(node) {
|
|
4920
|
+
return !isNaN(parseInt(node.getAttribute('tabindex'), 10));
|
|
4921
|
+
};
|
|
4922
|
+
|
|
4923
|
+
/**
|
|
4924
|
+
* Determine the tab index of a given node.
|
|
4925
|
+
* @param {HTMLElement} node
|
|
4926
|
+
* @returns {number} Tab order (negative, 0, or positive number).
|
|
4927
|
+
* @throws {Error} If `node` is falsy.
|
|
4928
|
+
*/
|
|
4929
|
+
var getTabIndex = function getTabIndex(node) {
|
|
4930
|
+
if (!node) {
|
|
4931
|
+
throw new Error('No node provided');
|
|
4932
|
+
}
|
|
4913
4933
|
if (node.tabIndex < 0) {
|
|
4914
4934
|
// in Chrome, <details/>, <audio controls/> and <video controls/> elements get a default
|
|
4915
4935
|
// `tabIndex` of -1 when the 'tabindex' attribute isn't specified in the DOM,
|
|
@@ -4918,16 +4938,28 @@ var getTabindex = function getTabindex(node, isScope) {
|
|
|
4918
4938
|
// order, consider their tab index to be 0.
|
|
4919
4939
|
// Also browsers do not return `tabIndex` correctly for contentEditable nodes;
|
|
4920
4940
|
// so if they don't have a tabindex attribute specifically set, assume it's 0.
|
|
4921
|
-
|
|
4922
|
-
// isScope is positive for custom element with shadow root or slot that by default
|
|
4923
|
-
// have tabIndex -1, but need to be sorted by document order in order for their
|
|
4924
|
-
// content to be inserted in the correct position
|
|
4925
|
-
if ((isScope || /^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && isNaN(parseInt(node.getAttribute('tabindex'), 10))) {
|
|
4941
|
+
if ((/^(AUDIO|VIDEO|DETAILS)$/.test(node.tagName) || isContentEditable(node)) && !hasTabIndex(node)) {
|
|
4926
4942
|
return 0;
|
|
4927
4943
|
}
|
|
4928
4944
|
}
|
|
4929
4945
|
return node.tabIndex;
|
|
4930
4946
|
};
|
|
4947
|
+
|
|
4948
|
+
/**
|
|
4949
|
+
* Determine the tab index of a given node __for sort order purposes__.
|
|
4950
|
+
* @param {HTMLElement} node
|
|
4951
|
+
* @param {boolean} [isScope] True for a custom element with shadow root or slot that, by default,
|
|
4952
|
+
* has tabIndex -1, but needs to be sorted by document order in order for its content to be
|
|
4953
|
+
* inserted into the correct sort position.
|
|
4954
|
+
* @returns {number} Tab order (negative, 0, or positive number).
|
|
4955
|
+
*/
|
|
4956
|
+
var getSortOrderTabIndex = function getSortOrderTabIndex(node, isScope) {
|
|
4957
|
+
var tabIndex = getTabIndex(node);
|
|
4958
|
+
if (tabIndex < 0 && isScope && !hasTabIndex(node)) {
|
|
4959
|
+
return 0;
|
|
4960
|
+
}
|
|
4961
|
+
return tabIndex;
|
|
4962
|
+
};
|
|
4931
4963
|
var sortOrderedTabbables = function sortOrderedTabbables(a, b) {
|
|
4932
4964
|
return a.tabIndex === b.tabIndex ? a.documentOrder - b.documentOrder : a.tabIndex - b.tabIndex;
|
|
4933
4965
|
};
|
|
@@ -5170,7 +5202,7 @@ var isNodeMatchingSelectorFocusable = function isNodeMatchingSelectorFocusable(o
|
|
|
5170
5202
|
return true;
|
|
5171
5203
|
};
|
|
5172
5204
|
var isNodeMatchingSelectorTabbable = function isNodeMatchingSelectorTabbable(options, node) {
|
|
5173
|
-
if (isNonTabbableRadio(node) ||
|
|
5205
|
+
if (isNonTabbableRadio(node) || getTabIndex(node) < 0 || !isNodeMatchingSelectorFocusable(options, node)) {
|
|
5174
5206
|
return false;
|
|
5175
5207
|
}
|
|
5176
5208
|
return true;
|
|
@@ -5195,7 +5227,7 @@ var sortByOrder = function sortByOrder(candidates) {
|
|
|
5195
5227
|
candidates.forEach(function (item, i) {
|
|
5196
5228
|
var isScope = !!item.scopeParent;
|
|
5197
5229
|
var element = isScope ? item.scopeParent : item;
|
|
5198
|
-
var candidateTabindex =
|
|
5230
|
+
var candidateTabindex = getSortOrderTabIndex(element, isScope);
|
|
5199
5231
|
var elements = isScope ? sortByOrder(item.candidates) : element;
|
|
5200
5232
|
if (candidateTabindex === 0) {
|
|
5201
5233
|
isScope ? regularTabbables.push.apply(regularTabbables, elements) : regularTabbables.push(element);
|
|
@@ -5214,32 +5246,32 @@ var sortByOrder = function sortByOrder(candidates) {
|
|
|
5214
5246
|
return acc;
|
|
5215
5247
|
}, []).concat(regularTabbables);
|
|
5216
5248
|
};
|
|
5217
|
-
var tabbable = function tabbable(
|
|
5249
|
+
var tabbable = function tabbable(container, options) {
|
|
5218
5250
|
options = options || {};
|
|
5219
5251
|
var candidates;
|
|
5220
5252
|
if (options.getShadowRoot) {
|
|
5221
|
-
candidates = getCandidatesIteratively([
|
|
5253
|
+
candidates = getCandidatesIteratively([container], options.includeContainer, {
|
|
5222
5254
|
filter: isNodeMatchingSelectorTabbable.bind(null, options),
|
|
5223
5255
|
flatten: false,
|
|
5224
5256
|
getShadowRoot: options.getShadowRoot,
|
|
5225
5257
|
shadowRootFilter: isValidShadowRootTabbable
|
|
5226
5258
|
});
|
|
5227
5259
|
} else {
|
|
5228
|
-
candidates = getCandidates(
|
|
5260
|
+
candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorTabbable.bind(null, options));
|
|
5229
5261
|
}
|
|
5230
5262
|
return sortByOrder(candidates);
|
|
5231
5263
|
};
|
|
5232
|
-
var focusable = function focusable(
|
|
5264
|
+
var focusable = function focusable(container, options) {
|
|
5233
5265
|
options = options || {};
|
|
5234
5266
|
var candidates;
|
|
5235
5267
|
if (options.getShadowRoot) {
|
|
5236
|
-
candidates = getCandidatesIteratively([
|
|
5268
|
+
candidates = getCandidatesIteratively([container], options.includeContainer, {
|
|
5237
5269
|
filter: isNodeMatchingSelectorFocusable.bind(null, options),
|
|
5238
5270
|
flatten: true,
|
|
5239
5271
|
getShadowRoot: options.getShadowRoot
|
|
5240
5272
|
});
|
|
5241
5273
|
} else {
|
|
5242
|
-
candidates = getCandidates(
|
|
5274
|
+
candidates = getCandidates(container, options.includeContainer, isNodeMatchingSelectorFocusable.bind(null, options));
|
|
5243
5275
|
}
|
|
5244
5276
|
return candidates;
|
|
5245
5277
|
};
|
|
@@ -7563,7 +7595,12 @@ function __asyncValues(o) {
|
|
|
7563
7595
|
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
7564
7596
|
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
7565
7597
|
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
|
7566
|
-
}
|
|
7598
|
+
}
|
|
7599
|
+
|
|
7600
|
+
typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
|
|
7601
|
+
var e = new Error(message);
|
|
7602
|
+
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
7603
|
+
};
|
|
7567
7604
|
|
|
7568
7605
|
const isArrayLike = ((x) => x && typeof x.length === 'number' && typeof x !== 'function');
|
|
7569
7606
|
|