@luftborn/custom-elements 2.3.4 → 2.4.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.
- package/demo/index.js +21 -2
- package/demo/index.min.js +20 -1
- package/demo/index.min.js.map +1 -1
- package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.js +3 -0
- package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.js.map +1 -1
- package/dist/elements/EmailField/EmailFieldElement.js +3 -0
- package/dist/elements/EmailField/EmailFieldElement.js.map +1 -1
- package/dist/elements/NumericField/NumericFieldElement.js +3 -0
- package/dist/elements/NumericField/NumericFieldElement.js.map +1 -1
- package/dist/elements/TextAreaElement/TextAreaElement.js +3 -0
- package/dist/elements/TextAreaElement/TextAreaElement.js.map +1 -1
- package/dist/elements/TextField/TextFieldElement.js +4 -1
- package/dist/elements/TextField/TextFieldElement.js.map +1 -1
- package/dist/elements/TypeAhead/TypeAheadElement.js +3 -0
- package/dist/elements/TypeAhead/TypeAheadElement.js.map +1 -1
- package/dist/framework/CustomInputElement.d.ts +1 -0
- package/dist/framework/CustomInputElement.js +1 -0
- package/dist/framework/CustomInputElement.js.map +1 -1
- package/package.json +1 -1
- package/src/elements/CustomRegularExpression/CustomRegularExpressionElement.ts +3 -0
- package/src/elements/EmailField/EmailFieldElement.ts +3 -0
- package/src/elements/NumericField/NumericFieldElement.ts +3 -0
- package/src/elements/TextAreaElement/TextAreaElement.ts +3 -0
- package/src/elements/TextField/TextFieldElement.ts +4 -1
- package/src/elements/TypeAhead/TypeAheadElement.ts +3 -0
- package/src/framework/CustomInputElement.ts +2 -0
package/demo/index.min.js
CHANGED
|
@@ -3032,6 +3032,9 @@ var CustomRegularExpressionElement = /** @class */ (function (_super) {
|
|
|
3032
3032
|
if (this.customValue) {
|
|
3033
3033
|
this.text.setAttribute('pattern', this.customValue);
|
|
3034
3034
|
}
|
|
3035
|
+
if (this.placeholder) {
|
|
3036
|
+
this.text.setAttribute('placeholder', this.placeholder);
|
|
3037
|
+
}
|
|
3035
3038
|
};
|
|
3036
3039
|
// events
|
|
3037
3040
|
CustomRegularExpressionElement.prototype.change = function ($event) {
|
|
@@ -3342,6 +3345,9 @@ var EmailFieldElement = /** @class */ (function (_super) {
|
|
|
3342
3345
|
if (this.required) {
|
|
3343
3346
|
this.email.setAttribute('required', '');
|
|
3344
3347
|
}
|
|
3348
|
+
if (this.placeholder) {
|
|
3349
|
+
this.email.setAttribute('placeholder', this.placeholder);
|
|
3350
|
+
}
|
|
3345
3351
|
};
|
|
3346
3352
|
// events
|
|
3347
3353
|
EmailFieldElement.prototype.change = function ($event) {
|
|
@@ -3780,6 +3786,9 @@ var NumericFieldElement = /** @class */ (function (_super) {
|
|
|
3780
3786
|
if (this.step) {
|
|
3781
3787
|
this.number.setAttribute('step', this.step);
|
|
3782
3788
|
}
|
|
3789
|
+
if (this.placeholder) {
|
|
3790
|
+
this.number.setAttribute('placeholder', this.placeholder);
|
|
3791
|
+
}
|
|
3783
3792
|
};
|
|
3784
3793
|
// events
|
|
3785
3794
|
NumericFieldElement.prototype.change = function ($event) {
|
|
@@ -4130,6 +4139,9 @@ var TextAreaElement = /** @class */ (function (_super) {
|
|
|
4130
4139
|
if (this.required) {
|
|
4131
4140
|
this.text.setAttribute('required', '');
|
|
4132
4141
|
}
|
|
4142
|
+
if (this.placeholder) {
|
|
4143
|
+
this.text.setAttribute('placeholder', this.placeholder);
|
|
4144
|
+
}
|
|
4133
4145
|
};
|
|
4134
4146
|
// events
|
|
4135
4147
|
TextAreaElement.prototype.change = function ($event) {
|
|
@@ -4211,6 +4223,9 @@ var TextFieldElement = /** @class */ (function (_super) {
|
|
|
4211
4223
|
if (this.required) {
|
|
4212
4224
|
this.text.setAttribute('required', '');
|
|
4213
4225
|
}
|
|
4226
|
+
if (this.placeholder) {
|
|
4227
|
+
this.text.setAttribute('placeholder', this.placeholder);
|
|
4228
|
+
}
|
|
4214
4229
|
};
|
|
4215
4230
|
// events
|
|
4216
4231
|
TextFieldElement.prototype.change = function ($event) {
|
|
@@ -4224,7 +4239,7 @@ var TextFieldElement = /** @class */ (function (_super) {
|
|
|
4224
4239
|
TextFieldElement = __decorate([
|
|
4225
4240
|
(0, custom_element_decorator_1.default)({
|
|
4226
4241
|
selector: 'text-element',
|
|
4227
|
-
template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='text-field'/>\n\t\t\t</div>",
|
|
4242
|
+
template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='text-field' />\n\t\t\t</div>",
|
|
4228
4243
|
style: "\n\t:host{\n\t\t\twidth:100%;\n\t}\n\t.wrapper{\n\t\t\tdisplay:flex;\n\t}\n\tinput{\n\t\t\tbox-sizing: border-box;\n\t\t\twidth: 100% !important;\n\t\t\tborder: none;\n\t\t\tbackground-color: #f1f4ff;\n\t\t\tmargin: 2px;\n\t\t\tresize: none;\n\t}\n\t\t",
|
|
4229
4244
|
useShadow: true,
|
|
4230
4245
|
})
|
|
@@ -4322,6 +4337,9 @@ var TypeAheadElement = /** @class */ (function (_super) {
|
|
|
4322
4337
|
if (this.required) {
|
|
4323
4338
|
this.textInputElement.setAttribute('required', '');
|
|
4324
4339
|
}
|
|
4340
|
+
if (this.placeholder) {
|
|
4341
|
+
this.textInputElement.setAttribute('placeholder', this.placeholder);
|
|
4342
|
+
}
|
|
4325
4343
|
this.textInputElement.addEventListener('change', this.change.bind(this));
|
|
4326
4344
|
this.textInputElement.addEventListener('input', function () {
|
|
4327
4345
|
_this.inputEventHandler();
|
|
@@ -4579,6 +4597,7 @@ var CustomInputElement = /** @class */ (function (_super) {
|
|
|
4579
4597
|
this.dependencies = data.dependencies;
|
|
4580
4598
|
this.required = data.required;
|
|
4581
4599
|
this.name = data.name;
|
|
4600
|
+
this.placeholder = data.placeholder;
|
|
4582
4601
|
this.allDependenciesMustBeMet = data.allDependenciesMustBeMet;
|
|
4583
4602
|
this.multi = data.multi;
|
|
4584
4603
|
this.max = data.max;
|