@haiilo/catalyst 6.4.6 → 6.5.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/dist/catalyst/catalyst.css +3 -1
- package/dist/catalyst/catalyst.esm.js +1 -1
- package/dist/catalyst/catalyst.esm.js.map +1 -1
- package/dist/catalyst/index.esm.js +1 -1
- package/dist/catalyst/index.esm.js.map +1 -1
- package/dist/catalyst/p-19fad7af.js +2 -0
- package/dist/catalyst/p-19fad7af.js.map +1 -0
- package/dist/catalyst/p-376b504c.js +3 -0
- package/dist/catalyst/p-376b504c.js.map +1 -0
- package/dist/catalyst/p-d303131e.entry.js +10 -0
- package/dist/catalyst/p-d303131e.entry.js.map +1 -0
- package/dist/catalyst/scss/core/_dialog.scss +2 -0
- package/dist/cjs/cat-alert_26.cjs.entry.js +121 -54
- package/dist/cjs/cat-alert_26.cjs.entry.js.map +1 -1
- package/dist/cjs/catalyst.cjs.js +3 -3
- package/dist/cjs/catalyst.cjs.js.map +1 -1
- package/dist/cjs/{index-6ec4ef6d.js → index-329a3380.js} +111 -29
- package/dist/cjs/index-329a3380.js.map +1 -0
- package/dist/cjs/index.cjs.js +1 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{of-eda6baf8.js → of-8545b523.js} +2 -2
- package/dist/cjs/of-8545b523.js.map +1 -0
- package/dist/collection/collection-manifest.json +2 -2
- package/dist/collection/components/cat-alert/cat-alert.css +10 -20
- package/dist/collection/components/cat-avatar/cat-avatar.css +2 -2
- package/dist/collection/components/cat-badge/cat-badge.css +6 -11
- package/dist/collection/components/cat-checkbox/cat-checkbox.js +4 -1
- package/dist/collection/components/cat-checkbox/cat-checkbox.js.map +1 -1
- package/dist/collection/components/cat-datepicker/cat-datepicker.config.js +1 -0
- package/dist/collection/components/cat-datepicker/cat-datepicker.config.js.map +1 -1
- package/dist/collection/components/cat-datepicker/cat-datepicker.format.js +3 -2
- package/dist/collection/components/cat-datepicker/cat-datepicker.format.js.map +1 -1
- package/dist/collection/components/cat-dropdown/cat-dropdown.js +2 -4
- package/dist/collection/components/cat-dropdown/cat-dropdown.js.map +1 -1
- package/dist/collection/components/cat-form-hint/cat-form-hint.js +1 -1
- package/dist/collection/components/cat-form-hint/cat-form-hint.js.map +1 -1
- package/dist/collection/components/cat-form-hint/cat-form-hint.spec.js +1 -1
- package/dist/collection/components/cat-form-hint/cat-form-hint.spec.js.map +1 -1
- package/dist/collection/components/cat-i18n/cat-i18n-registry.js +1 -1
- package/dist/collection/components/cat-i18n/cat-i18n-registry.js.map +1 -1
- package/dist/collection/components/cat-input/cat-input.js +20 -4
- package/dist/collection/components/cat-input/cat-input.js.map +1 -1
- package/dist/collection/components/cat-notification/cat-notification.js +1 -2
- package/dist/collection/components/cat-notification/cat-notification.js.map +1 -1
- package/dist/collection/components/cat-radio/cat-radio.js +4 -1
- package/dist/collection/components/cat-radio/cat-radio.js.map +1 -1
- package/dist/collection/components/cat-scrollable/cat-scrollable.js +1 -3
- package/dist/collection/components/cat-scrollable/cat-scrollable.js.map +1 -1
- package/dist/collection/components/cat-select/cat-select.css +3 -0
- package/dist/collection/components/cat-select/cat-select.js +13 -8
- package/dist/collection/components/cat-select/cat-select.js.map +1 -1
- package/dist/collection/components/cat-textarea/cat-textarea.js +5 -2
- package/dist/collection/components/cat-textarea/cat-textarea.js.map +1 -1
- package/dist/collection/components/cat-toggle/cat-toggle.js +4 -1
- package/dist/collection/components/cat-toggle/cat-toggle.js.map +1 -1
- package/dist/collection/components/cat-tooltip/cat-tooltip.js +2 -4
- package/dist/collection/components/cat-tooltip/cat-tooltip.js.map +1 -1
- package/dist/collection/scss/core/_dialog.scss +2 -0
- package/dist/components/cat-alert.js +1 -1
- package/dist/components/cat-alert.js.map +1 -1
- package/dist/components/cat-avatar2.js +3 -1
- package/dist/components/cat-avatar2.js.map +1 -1
- package/dist/components/cat-badge.js +1 -1
- package/dist/components/cat-badge.js.map +1 -1
- package/dist/components/cat-button2.js +3 -1
- package/dist/components/cat-button2.js.map +1 -1
- package/dist/components/cat-checkbox2.js +4 -1
- package/dist/components/cat-checkbox2.js.map +1 -1
- package/dist/components/cat-datepicker-inline.js +4 -0
- package/dist/components/cat-datepicker-inline.js.map +1 -1
- package/dist/components/cat-datepicker.js +6 -0
- package/dist/components/cat-datepicker.js.map +1 -1
- package/dist/components/cat-datepicker.locale.js +4 -2
- package/dist/components/cat-datepicker.locale.js.map +1 -1
- package/dist/components/cat-dropdown2.js +44 -25
- package/dist/components/cat-dropdown2.js.map +1 -1
- package/dist/components/cat-form-group.js +3 -0
- package/dist/components/cat-form-group.js.map +1 -1
- package/dist/components/cat-form-hint.js +1 -1
- package/dist/components/cat-form-hint.js.map +1 -1
- package/dist/components/cat-i18n-registry.js +1 -1
- package/dist/components/cat-i18n-registry.js.map +1 -1
- package/dist/components/cat-input2.js +22 -4
- package/dist/components/cat-input2.js.map +1 -1
- package/dist/components/cat-radio-group.js +6 -1
- package/dist/components/cat-radio-group.js.map +1 -1
- package/dist/components/cat-radio.js +4 -1
- package/dist/components/cat-radio.js.map +1 -1
- package/dist/components/cat-select2.js +18 -6
- package/dist/components/cat-select2.js.map +1 -1
- package/dist/components/cat-tabs.js +3 -1
- package/dist/components/cat-tabs.js.map +1 -1
- package/dist/components/cat-textarea.js +7 -2
- package/dist/components/cat-textarea.js.map +1 -1
- package/dist/components/cat-toggle.js +4 -1
- package/dist/components/cat-toggle.js.map +1 -1
- package/dist/components/floating-ui.dom.esm.js +16 -5
- package/dist/components/floating-ui.dom.esm.js.map +1 -1
- package/dist/components/index.d.ts +6 -0
- package/dist/components/index.js +1 -1
- package/dist/components/index.js.map +1 -1
- package/dist/esm/cat-alert_26.entry.js +121 -54
- package/dist/esm/cat-alert_26.entry.js.map +1 -1
- package/dist/esm/catalyst.js +4 -4
- package/dist/esm/catalyst.js.map +1 -1
- package/dist/esm/{index-b424aa97.js → index-6af09649.js} +111 -29
- package/dist/esm/index-6af09649.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{of-246f9b35.js → of-a965d8fb.js} +2 -2
- package/dist/esm/of-a965d8fb.js.map +1 -0
- package/dist/types/components/cat-checkbox/cat-checkbox.d.ts +1 -0
- package/dist/types/components/cat-i18n/cat-i18n-registry.d.ts +1 -0
- package/dist/types/components/cat-input/cat-input.d.ts +2 -0
- package/dist/types/components/cat-radio/cat-radio.d.ts +1 -0
- package/dist/types/components/cat-select/cat-select.d.ts +1 -0
- package/dist/types/components/cat-textarea/cat-textarea.d.ts +1 -0
- package/dist/types/components/cat-toggle/cat-toggle.d.ts +1 -0
- package/dist/types/stencil-public-runtime.d.ts +5 -3
- package/package.json +18 -18
- package/dist/catalyst/p-8929f28a.js +0 -2
- package/dist/catalyst/p-8929f28a.js.map +0 -1
- package/dist/catalyst/p-e7e1f61e.entry.js +0 -10
- package/dist/catalyst/p-e7e1f61e.entry.js.map +0 -1
- package/dist/catalyst/p-f0bcebed.js +0 -3
- package/dist/catalyst/p-f0bcebed.js.map +0 -1
- package/dist/cjs/index-6ec4ef6d.js.map +0 -1
- package/dist/cjs/of-eda6baf8.js.map +0 -1
- package/dist/esm/index-b424aa97.js.map +0 -1
- package/dist/esm/of-246f9b35.js.map +0 -1
|
@@ -576,30 +576,30 @@ var isFocusable = function isFocusable(node, options) {
|
|
|
576
576
|
};
|
|
577
577
|
|
|
578
578
|
/*!
|
|
579
|
-
* focus-trap 7.5.
|
|
579
|
+
* focus-trap 7.5.4
|
|
580
580
|
* @license MIT, https://github.com/focus-trap/focus-trap/blob/master/LICENSE
|
|
581
581
|
*/
|
|
582
582
|
|
|
583
|
-
function ownKeys(
|
|
584
|
-
var
|
|
583
|
+
function ownKeys(e, r) {
|
|
584
|
+
var t = Object.keys(e);
|
|
585
585
|
if (Object.getOwnPropertySymbols) {
|
|
586
|
-
var
|
|
587
|
-
|
|
588
|
-
return Object.getOwnPropertyDescriptor(
|
|
589
|
-
})),
|
|
586
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
587
|
+
r && (o = o.filter(function (r) {
|
|
588
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
589
|
+
})), t.push.apply(t, o);
|
|
590
590
|
}
|
|
591
|
-
return
|
|
591
|
+
return t;
|
|
592
592
|
}
|
|
593
|
-
function _objectSpread2(
|
|
594
|
-
for (var
|
|
595
|
-
var
|
|
596
|
-
|
|
597
|
-
_defineProperty(
|
|
598
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(
|
|
599
|
-
Object.defineProperty(
|
|
593
|
+
function _objectSpread2(e) {
|
|
594
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
595
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
596
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
597
|
+
_defineProperty(e, r, t[r]);
|
|
598
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
599
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
600
600
|
});
|
|
601
601
|
}
|
|
602
|
-
return
|
|
602
|
+
return e;
|
|
603
603
|
}
|
|
604
604
|
function _defineProperty(obj, key, value) {
|
|
605
605
|
key = _toPropertyKey(key);
|
|
@@ -976,11 +976,30 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
976
976
|
throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.");
|
|
977
977
|
}
|
|
978
978
|
};
|
|
979
|
+
|
|
980
|
+
/**
|
|
981
|
+
* Gets the current activeElement. If it's a web-component and has open shadow-root
|
|
982
|
+
* it will recursively search inside shadow roots for the "true" activeElement.
|
|
983
|
+
*
|
|
984
|
+
* @param {Document | ShadowRoot} el
|
|
985
|
+
*
|
|
986
|
+
* @returns {HTMLElement} The element that currently has the focus
|
|
987
|
+
**/
|
|
988
|
+
var getActiveElement = function getActiveElement(el) {
|
|
989
|
+
var activeElement = el.activeElement;
|
|
990
|
+
if (!activeElement) {
|
|
991
|
+
return;
|
|
992
|
+
}
|
|
993
|
+
if (activeElement.shadowRoot && activeElement.shadowRoot.activeElement !== null) {
|
|
994
|
+
return getActiveElement(activeElement.shadowRoot);
|
|
995
|
+
}
|
|
996
|
+
return activeElement;
|
|
997
|
+
};
|
|
979
998
|
var tryFocus = function tryFocus(node) {
|
|
980
999
|
if (node === false) {
|
|
981
1000
|
return;
|
|
982
1001
|
}
|
|
983
|
-
if (node ===
|
|
1002
|
+
if (node === getActiveElement(document)) {
|
|
984
1003
|
return;
|
|
985
1004
|
}
|
|
986
1005
|
if (!node || !node.focus) {
|
|
@@ -1394,14 +1413,14 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
1394
1413
|
state.active = true;
|
|
1395
1414
|
state.paused = false;
|
|
1396
1415
|
state.nodeFocusedBeforeActivation = doc.activeElement;
|
|
1397
|
-
onActivate === null || onActivate === void 0
|
|
1416
|
+
onActivate === null || onActivate === void 0 || onActivate();
|
|
1398
1417
|
var finishActivation = function finishActivation() {
|
|
1399
1418
|
if (checkCanFocusTrap) {
|
|
1400
1419
|
updateTabbableNodes();
|
|
1401
1420
|
}
|
|
1402
1421
|
addListeners();
|
|
1403
1422
|
updateObservedNodes();
|
|
1404
|
-
onPostActivate === null || onPostActivate === void 0
|
|
1423
|
+
onPostActivate === null || onPostActivate === void 0 || onPostActivate();
|
|
1405
1424
|
};
|
|
1406
1425
|
if (checkCanFocusTrap) {
|
|
1407
1426
|
checkCanFocusTrap(state.containers.concat()).then(finishActivation, finishActivation);
|
|
@@ -1430,13 +1449,13 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
1430
1449
|
var onPostDeactivate = getOption(options, 'onPostDeactivate');
|
|
1431
1450
|
var checkCanReturnFocus = getOption(options, 'checkCanReturnFocus');
|
|
1432
1451
|
var returnFocus = getOption(options, 'returnFocus', 'returnFocusOnDeactivate');
|
|
1433
|
-
onDeactivate === null || onDeactivate === void 0
|
|
1452
|
+
onDeactivate === null || onDeactivate === void 0 || onDeactivate();
|
|
1434
1453
|
var finishDeactivation = function finishDeactivation() {
|
|
1435
1454
|
delay(function () {
|
|
1436
1455
|
if (returnFocus) {
|
|
1437
1456
|
tryFocus(getReturnFocusNode(state.nodeFocusedBeforeActivation));
|
|
1438
1457
|
}
|
|
1439
|
-
onPostDeactivate === null || onPostDeactivate === void 0
|
|
1458
|
+
onPostDeactivate === null || onPostDeactivate === void 0 || onPostDeactivate();
|
|
1440
1459
|
});
|
|
1441
1460
|
};
|
|
1442
1461
|
if (returnFocus && checkCanReturnFocus) {
|
|
@@ -1453,10 +1472,10 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
1453
1472
|
var onPause = getOption(pauseOptions, 'onPause');
|
|
1454
1473
|
var onPostPause = getOption(pauseOptions, 'onPostPause');
|
|
1455
1474
|
state.paused = true;
|
|
1456
|
-
onPause === null || onPause === void 0
|
|
1475
|
+
onPause === null || onPause === void 0 || onPause();
|
|
1457
1476
|
removeListeners();
|
|
1458
1477
|
updateObservedNodes();
|
|
1459
|
-
onPostPause === null || onPostPause === void 0
|
|
1478
|
+
onPostPause === null || onPostPause === void 0 || onPostPause();
|
|
1460
1479
|
return this;
|
|
1461
1480
|
},
|
|
1462
1481
|
unpause: function unpause(unpauseOptions) {
|
|
@@ -1466,11 +1485,11 @@ var createFocusTrap = function createFocusTrap(elements, userOptions) {
|
|
|
1466
1485
|
var onUnpause = getOption(unpauseOptions, 'onUnpause');
|
|
1467
1486
|
var onPostUnpause = getOption(unpauseOptions, 'onPostUnpause');
|
|
1468
1487
|
state.paused = false;
|
|
1469
|
-
onUnpause === null || onUnpause === void 0
|
|
1488
|
+
onUnpause === null || onUnpause === void 0 || onUnpause();
|
|
1470
1489
|
updateTabbableNodes();
|
|
1471
1490
|
addListeners();
|
|
1472
1491
|
updateObservedNodes();
|
|
1473
|
-
onPostUnpause === null || onPostUnpause === void 0
|
|
1492
|
+
onPostUnpause === null || onPostUnpause === void 0 || onPostUnpause();
|
|
1474
1493
|
return this;
|
|
1475
1494
|
},
|
|
1476
1495
|
updateContainerElements: function updateContainerElements(containerElements) {
|