@luftborn/custom-elements 2.15.0 → 2.15.1
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/demo/index.js +10 -1
- package/demo/index.min.js +9 -0
- package/demo/index.min.js.map +1 -1
- package/dist/framework/CustomInputElement.d.ts +1 -0
- package/dist/framework/CustomInputElement.js +9 -0
- package/dist/framework/CustomInputElement.js.map +1 -1
- package/package.json +1 -1
- package/src/framework/CustomInputElement.ts +11 -0
package/demo/index.min.js
CHANGED
|
@@ -7132,6 +7132,7 @@ var CustomInputElement = /** @class */ (function (_super) {
|
|
|
7132
7132
|
_this.onVisibilityChanged = new CustomEvents_1.CustomElementEvent();
|
|
7133
7133
|
_this.allDependenciesMustBeMet = false;
|
|
7134
7134
|
_this.multi = false;
|
|
7135
|
+
_this.hideLabel = false;
|
|
7135
7136
|
_this.compareValues = [];
|
|
7136
7137
|
return _this;
|
|
7137
7138
|
}
|
|
@@ -7220,6 +7221,7 @@ var CustomInputElement = /** @class */ (function (_super) {
|
|
|
7220
7221
|
CustomInputElement.prototype.setAttributes = function () {
|
|
7221
7222
|
this.setAttribute("custom-input", "");
|
|
7222
7223
|
this.setAttribute("name", this.name);
|
|
7224
|
+
this.hideLabel = this.hasAttribute('hide-label') || this.hasAttribute('hideLabel');
|
|
7223
7225
|
};
|
|
7224
7226
|
CustomInputElement.prototype.bindDependencies = function () {
|
|
7225
7227
|
if (this.hasValueDependency && this.hasValueDependency.items.length) {
|
|
@@ -7349,6 +7351,13 @@ var CustomInputElement = /** @class */ (function (_super) {
|
|
|
7349
7351
|
return element.querySelectorAll(selector);
|
|
7350
7352
|
};
|
|
7351
7353
|
CustomInputElement.prototype.addLabel = function (inputField) {
|
|
7354
|
+
if (this.hideLabel) {
|
|
7355
|
+
var fieldLabel = this.shadowRoot.querySelector('.field-label');
|
|
7356
|
+
if (fieldLabel) {
|
|
7357
|
+
fieldLabel.remove();
|
|
7358
|
+
}
|
|
7359
|
+
return;
|
|
7360
|
+
}
|
|
7352
7361
|
if (this.label) {
|
|
7353
7362
|
var randomId = Math.random().toString(36).substring(2, 15);
|
|
7354
7363
|
inputField.id = "text-field-" + randomId;
|