@keenthemes/ktui 1.0.18 → 1.0.19
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/ktui.js +21 -6
- package/dist/ktui.min.js +1 -1
- package/dist/ktui.min.js.map +1 -1
- package/dist/styles.css +1 -1
- package/lib/cjs/components/select/search.js +5 -2
- package/lib/cjs/components/select/search.js.map +1 -1
- package/lib/cjs/components/select/select.js +5 -3
- package/lib/cjs/components/select/select.js.map +1 -1
- package/lib/cjs/components/toast/toast.js +11 -1
- package/lib/cjs/components/toast/toast.js.map +1 -1
- package/lib/esm/components/select/search.js +5 -2
- package/lib/esm/components/select/search.js.map +1 -1
- package/lib/esm/components/select/select.js +5 -3
- package/lib/esm/components/select/select.js.map +1 -1
- package/lib/esm/components/toast/toast.js +11 -1
- package/lib/esm/components/toast/toast.js.map +1 -1
- package/package.json +1 -1
- package/src/components/select/search.ts +5 -2
- package/src/components/select/select.ts +5 -3
- package/src/components/toast/toast.ts +10 -1
package/dist/ktui.js
CHANGED
|
@@ -9993,8 +9993,11 @@ var KTSelectSearch = /** @class */ (function () {
|
|
|
9993
9993
|
// Clear highlights when an option is selected - ATTACH TO ORIGINAL SELECT (standard 'change' event)
|
|
9994
9994
|
this._select.getElement().addEventListener('change', function () {
|
|
9995
9995
|
_this.clearSearch();
|
|
9996
|
-
// Close dropdown
|
|
9997
|
-
|
|
9996
|
+
// Close dropdown only for single select mode
|
|
9997
|
+
// Keep dropdown open for multiple select mode to allow additional selections
|
|
9998
|
+
if (!_this._select.getConfig().multiple) {
|
|
9999
|
+
_this._select.closeDropdown();
|
|
10000
|
+
}
|
|
9998
10001
|
});
|
|
9999
10002
|
// Consolidated 'dropdown.show' event listener - ATTACH TO WRAPPER
|
|
10000
10003
|
this._select.getWrapperElement().addEventListener('dropdown.show', function () {
|
|
@@ -12408,6 +12411,7 @@ var KTSelect = /** @class */ (function (_super) {
|
|
|
12408
12411
|
// Update option classes without re-rendering the dropdown content
|
|
12409
12412
|
this._updateSelectedOptionClass();
|
|
12410
12413
|
// For single select mode, always close the dropdown after selection
|
|
12414
|
+
// For multiple select mode, keep the dropdown open to allow multiple selections
|
|
12411
12415
|
if (!this._config.multiple) {
|
|
12412
12416
|
if (this._config.debug)
|
|
12413
12417
|
console.log('About to call closeDropdown() for single select mode - always close after selection');
|
|
@@ -12415,8 +12419,8 @@ var KTSelect = /** @class */ (function (_super) {
|
|
|
12415
12419
|
}
|
|
12416
12420
|
else {
|
|
12417
12421
|
if (this._config.debug)
|
|
12418
|
-
console.log('
|
|
12419
|
-
|
|
12422
|
+
console.log('Multiple select mode - keeping dropdown open for additional selections');
|
|
12423
|
+
// Don't close dropdown in multiple select mode to allow multiple selections
|
|
12420
12424
|
}
|
|
12421
12425
|
// Dispatch custom change event with additional data
|
|
12422
12426
|
this._dispatchEvent('change', {
|
|
@@ -12702,7 +12706,8 @@ var KTSelect = /** @class */ (function (_super) {
|
|
|
12702
12706
|
}
|
|
12703
12707
|
// Proceed with selection if not handled above
|
|
12704
12708
|
this.selectFocusedOption();
|
|
12705
|
-
// Close dropdown
|
|
12709
|
+
// Close dropdown only for single select mode (for new selections)
|
|
12710
|
+
// Keep dropdown open for multiple select mode to allow additional selections
|
|
12706
12711
|
if (!this._config.multiple) {
|
|
12707
12712
|
// This will also be true for the case handled above, but closeDropdown is idempotent.
|
|
12708
12713
|
// However, the break above prevents this from being reached for that specific case.
|
|
@@ -15233,12 +15238,22 @@ var KTToast = /** @class */ (function (_super) {
|
|
|
15233
15238
|
/**
|
|
15234
15239
|
* Close and remove all active toasts.
|
|
15235
15240
|
*/
|
|
15236
|
-
KTToast.clearAll = function () {
|
|
15241
|
+
KTToast.clearAll = function (clearContainers) {
|
|
15242
|
+
if (clearContainers === void 0) { clearContainers = false; }
|
|
15237
15243
|
for (var _i = 0, _a = Array.from(this.toasts.keys()); _i < _a.length; _i++) {
|
|
15238
15244
|
var id = _a[_i];
|
|
15239
15245
|
console.log('clearAll:', id);
|
|
15240
15246
|
this.close(id);
|
|
15241
15247
|
}
|
|
15248
|
+
if (clearContainers) {
|
|
15249
|
+
// Remove all containers from the DOM.
|
|
15250
|
+
this.containerMap.forEach(function (container, position) {
|
|
15251
|
+
container.remove();
|
|
15252
|
+
console.log('clearAll: removed container for position', position);
|
|
15253
|
+
});
|
|
15254
|
+
// Clear containerMap to prevent stale references.
|
|
15255
|
+
this.containerMap.clear();
|
|
15256
|
+
}
|
|
15242
15257
|
};
|
|
15243
15258
|
/**
|
|
15244
15259
|
* Close a toast by ID or instance.
|