@smilodon/core 1.9.1 → 1.9.2

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/index.js CHANGED
@@ -6071,6 +6071,10 @@ class EnhancedSelect extends HTMLElement {
6071
6071
  continue;
6072
6072
  const sourceValue = source[key];
6073
6073
  const targetValue = result[key];
6074
+ // Optional adapter props are commonly forwarded as undefined. Preserve
6075
+ // the existing/default config in that case instead of erasing a section.
6076
+ if (sourceValue === undefined)
6077
+ continue;
6074
6078
  if (sourceValue && typeof sourceValue === 'object' && !Array.isArray(sourceValue)) {
6075
6079
  result[key] = this._mergeConfig(targetValue && typeof targetValue === 'object' ? targetValue : {}, sourceValue);
6076
6080
  }
@@ -6112,8 +6116,9 @@ class EnhancedSelect extends HTMLElement {
6112
6116
  const hasSomethingToClear = (clearSelection && hasSelection) || (clearSearch && hasSearch);
6113
6117
  const hideWhenEmpty = this._config.clearControl.hideWhenEmpty !== false;
6114
6118
  const visible = enabled && (!hideWhenEmpty || hasSomethingToClear);
6115
- this._inputContainer.classList.toggle('has-clear-control', enabled);
6116
- this._arrowContainer.classList.toggle('with-clear-control', enabled);
6119
+ // Reserve the action area only while the clear control is actually visible.
6120
+ this._inputContainer.classList.toggle('has-clear-control', visible);
6121
+ this._arrowContainer.classList.toggle('with-clear-control', visible);
6117
6122
  this._clearControl.hidden = !visible;
6118
6123
  this._clearControl.disabled = !hasSomethingToClear;
6119
6124
  this._clearControl.setAttribute('aria-hidden', String(!visible));