@descope/web-components-ui 1.37.0 → 1.39.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.
@@ -1435,26 +1435,10 @@ const createStyleMixin$1 =
1435
1435
 
1436
1436
  const draggableMixin$1 = (superclass) =>
1437
1437
  class DraggableMixinClass extends superclass {
1438
- #styleEle = null;
1439
-
1440
- static get observedAttributes() {
1441
- const superAttrs = superclass.observedAttributes || [];
1442
- return [...superAttrs, 'draggable'];
1443
- }
1444
-
1445
1438
  constructor() {
1446
1439
  super();
1447
1440
 
1448
- this.#styleEle = document.createElement('style');
1449
- this.#styleEle.innerText = `* { cursor: inherit!important }`;
1450
- }
1451
-
1452
- #handleDraggableStyle(isDraggable) {
1453
- if (isDraggable) {
1454
- this.shadowRoot.appendChild(this.#styleEle);
1455
- } else {
1456
- this.#styleEle.remove();
1457
- }
1441
+ injectStyle(`:host([draggable="true"]) * { cursor: inherit!important }`, this);
1458
1442
  }
1459
1443
 
1460
1444
  get isDraggable() {
@@ -1472,9 +1456,8 @@ const draggableMixin$1 = (superclass) =>
1472
1456
  this.baseElement.setAttribute('tabindex', '-1');
1473
1457
 
1474
1458
  const onComplete = () => {
1475
- prevTabIndex
1476
- ? this.baseElement.setAttribute('tabindex', prevTabIndex)
1477
- : this.baseElement.removeAttribute('tabindex');
1459
+ if (prevTabIndex) this.baseElement.setAttribute('tabindex', prevTabIndex);
1460
+ else this.baseElement.removeAttribute('tabindex');
1478
1461
 
1479
1462
  e.target.removeEventListener('mouseup', onComplete);
1480
1463
  e.target.removeEventListener('dragend', onComplete);
@@ -1487,13 +1470,6 @@ const draggableMixin$1 = (superclass) =>
1487
1470
 
1488
1471
  super.init?.();
1489
1472
  }
1490
-
1491
- attributeChangedCallback(attrName, oldValue, newValue) {
1492
- super.attributeChangedCallback?.(attrName, oldValue, newValue);
1493
- if (attrName === 'draggable') {
1494
- this.#handleDraggableStyle(newValue === 'true');
1495
- }
1496
- }
1497
1473
  };
1498
1474
 
1499
1475
  const componentNameValidationMixin$1 = (superclass) =>
@@ -3216,25 +3192,10 @@ const createStyleMixin =
3216
3192
 
3217
3193
  const draggableMixin = (superclass) =>
3218
3194
  class DraggableMixinClass extends superclass {
3219
- #styleEle = null;
3220
-
3221
- static get observedAttributes() {
3222
- const superAttrs = superclass.observedAttributes || [];
3223
- return [...superAttrs, 'draggable'];
3224
- }
3225
-
3226
3195
  constructor() {
3227
3196
  super();
3228
3197
 
3229
- injectStyle(`* { cursor: inherit!important }`, this);
3230
- }
3231
-
3232
- #handleDraggableStyle(isDraggable) {
3233
- if (isDraggable) {
3234
- this.shadowRoot.appendChild(this.#styleEle);
3235
- } else {
3236
- this.#styleEle.remove();
3237
- }
3198
+ injectStyle(`:host([draggable="true"]) * { cursor: inherit!important }`, this);
3238
3199
  }
3239
3200
 
3240
3201
  get isDraggable() {
@@ -3267,13 +3228,6 @@ const draggableMixin = (superclass) =>
3267
3228
 
3268
3229
  super.init?.();
3269
3230
  }
3270
-
3271
- attributeChangedCallback(attrName, oldValue, newValue) {
3272
- super.attributeChangedCallback?.(attrName, oldValue, newValue);
3273
- if (attrName === 'draggable') {
3274
- this.#handleDraggableStyle(newValue === 'true');
3275
- }
3276
- }
3277
3231
  };
3278
3232
 
3279
3233
  const componentNameValidationMixin = (superclass) =>
@@ -19351,11 +19305,12 @@ const AutocompleteFieldClass = compose(
19351
19305
  }
19352
19306
 
19353
19307
  descope-autocomplete-field-internal {
19354
- display: inline-block;
19355
- box-sizing: border-box;
19356
- user-select: none;
19357
- max-width: 100%;
19358
- }
19308
+ display: inline-block;
19309
+ box-sizing: border-box;
19310
+ user-select: none;
19311
+ width: 100%;
19312
+ max-width: 100%;
19313
+ }
19359
19314
 
19360
19315
  descope-autocomplete-field-internal ::slotted {
19361
19316
  padding: 0;
@@ -19853,6 +19808,7 @@ const AddressFieldClass = compose(
19853
19808
  display: inline-block;
19854
19809
  box-sizing: border-box;
19855
19810
  user-select: none;
19811
+ width: 100%;
19856
19812
  max-width: 100%;
19857
19813
  }
19858
19814