@descope/web-components-ui 1.0.200 → 1.0.201

Sign up to get free protection for your applications and to get access to all the features.
@@ -7569,13 +7569,17 @@ class ButtonSelectionGroupInternalClass extends createBaseInputClass({
7569
7569
  return this.getAttribute('size') || 'md';
7570
7570
  }
7571
7571
 
7572
+ get allowDeselect() {
7573
+ return this.getAttribute('allow-deselect') === 'true';
7574
+ }
7575
+
7572
7576
  removeSelected() {
7573
7577
  this.getSelectedNode()?.removeAttribute('selected');
7574
7578
  }
7575
7579
 
7576
7580
  onClick(e) {
7577
7581
  if (!this.isReadonly && e.target !== e.currentTarget) {
7578
- if (e.target === this.getSelectedNode()) {
7582
+ if (e.target === this.getSelectedNode() && this.allowDeselect) {
7579
7583
  this.removeSelected();
7580
7584
  } else {
7581
7585
  this.setSelected(e.target);
@@ -7744,7 +7748,9 @@ const customMixin = (superclass) =>
7744
7748
 
7745
7749
  this.inputElement = this.shadowRoot.querySelector(componentName$2);
7746
7750
 
7747
- forwardAttrs(this, this.inputElement, { includeAttrs: ['size', 'default-value'] });
7751
+ forwardAttrs(this, this.inputElement, {
7752
+ includeAttrs: ['size', 'default-value', 'allow-deselect'],
7753
+ });
7748
7754
 
7749
7755
  this.renderItems();
7750
7756