@descope/web-components-ui 1.0.227 → 1.0.228
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/cjs/index.cjs.js +21 -1
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/index.esm.js +37 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/umd/4803.js +1 -1
- package/dist/umd/boolean-fields-descope-boolean-field-internal-index-js.js +1 -1
- package/dist/umd/boolean-fields-descope-checkbox-index-js.js +1 -1
- package/dist/umd/boolean-fields-descope-switch-toggle-index-js.js +1 -1
- package/dist/umd/descope-grid-index-js.js +1 -1
- package/package.json +1 -1
- package/src/components/boolean-fields/booleanFieldMixin.js +9 -1
- package/src/components/boolean-fields/descope-boolean-field-internal/BooleanFieldInternal.js +16 -0
- package/src/components/boolean-fields/descope-checkbox/CheckboxClass.js +4 -0
- package/src/components/boolean-fields/descope-switch-toggle/SwitchToggleClass.js +8 -0
package/dist/index.esm.js
CHANGED
@@ -1388,6 +1388,10 @@ const forwardAttributes$1 = ['disabled', 'label', 'invalid', 'readonly'];
|
|
1388
1388
|
const BaseInputClass$5 = createBaseInputClass({ componentName: componentName$A, baseSelector: 'div' });
|
1389
1389
|
|
1390
1390
|
class BooleanInputInternal extends BaseInputClass$5 {
|
1391
|
+
static get observedAttributes() {
|
1392
|
+
return ['readonly'];
|
1393
|
+
}
|
1394
|
+
|
1391
1395
|
constructor() {
|
1392
1396
|
super();
|
1393
1397
|
this.innerHTML = `
|
@@ -1430,6 +1434,18 @@ class BooleanInputInternal extends BaseInputClass$5 {
|
|
1430
1434
|
this.handleFocusEventsDispatching([this.checkbox]);
|
1431
1435
|
}
|
1432
1436
|
|
1437
|
+
attributeChangedCallback(attrName, oldValue, newValue) {
|
1438
|
+
super.attributeChangedCallback?.(attrName, oldValue, newValue);
|
1439
|
+
|
1440
|
+
if (attrName === 'readonly') {
|
1441
|
+
this.onReadOnlyChange(newValue !== null);
|
1442
|
+
}
|
1443
|
+
}
|
1444
|
+
|
1445
|
+
onReadOnlyChange(val) {
|
1446
|
+
this.baseElement.setAttribute('inert', val);
|
1447
|
+
}
|
1448
|
+
|
1433
1449
|
getValidity() {
|
1434
1450
|
if (this.isRequired && !this.value) {
|
1435
1451
|
return { valueMissing: true };
|
@@ -1456,7 +1472,15 @@ const booleanFieldMixin = (superclass) =>
|
|
1456
1472
|
this.checkbox = this.inputElement.querySelector('vaadin-checkbox');
|
1457
1473
|
|
1458
1474
|
forwardAttrs(this, this.inputElement, {
|
1459
|
-
includeAttrs: [
|
1475
|
+
includeAttrs: [
|
1476
|
+
'required',
|
1477
|
+
'full-width',
|
1478
|
+
'size',
|
1479
|
+
'label',
|
1480
|
+
'invalid',
|
1481
|
+
'disabled',
|
1482
|
+
'readonly',
|
1483
|
+
],
|
1460
1484
|
});
|
1461
1485
|
|
1462
1486
|
forwardProps(this.inputElement, this, ['checked']);
|
@@ -1710,6 +1734,10 @@ const CheckboxClass = compose(
|
|
1710
1734
|
top: 0;
|
1711
1735
|
left: 0;
|
1712
1736
|
}
|
1737
|
+
|
1738
|
+
vaadin-text-field::part(input-field)::after {
|
1739
|
+
content: none;
|
1740
|
+
}
|
1713
1741
|
`,
|
1714
1742
|
excludeAttrsSync: ['label', 'tabindex'],
|
1715
1743
|
componentName: componentName$z,
|
@@ -1803,6 +1831,14 @@ const SwitchToggleClass = compose(
|
|
1803
1831
|
max-width: 100%;
|
1804
1832
|
}
|
1805
1833
|
|
1834
|
+
vaadin-text-field {
|
1835
|
+
width: 100%;
|
1836
|
+
}
|
1837
|
+
|
1838
|
+
vaadin-text-field::part(input-field)::after {
|
1839
|
+
content: none;
|
1840
|
+
}
|
1841
|
+
|
1806
1842
|
descope-boolean-field-internal {
|
1807
1843
|
padding: 0;
|
1808
1844
|
width: 100%;
|