@luftborn/custom-elements 2.13.0 → 2.13.2

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.
Files changed (73) hide show
  1. package/assets/style.css +10 -10
  2. package/demo/index.js +64 -44
  3. package/demo/index.min.js +63 -43
  4. package/demo/index.min.js.map +1 -1
  5. package/dist/elements/Address/AddressElement.js +1 -1
  6. package/dist/elements/Address/AddressElement.js.map +1 -1
  7. package/dist/elements/BankField/BankFieldElement.js +1 -1
  8. package/dist/elements/BankField/BankFieldElement.js.map +1 -1
  9. package/dist/elements/CPRElement/CPRElement.js +1 -1
  10. package/dist/elements/CPRElement/CPRElement.js.map +1 -1
  11. package/dist/elements/CVRElement/CVRElement.js +1 -1
  12. package/dist/elements/CVRElement/CVRElement.js.map +1 -1
  13. package/dist/elements/CheckBoxElement/CheckBoxElement.js +1 -1
  14. package/dist/elements/CheckBoxElement/CheckBoxElement.js.map +1 -1
  15. package/dist/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepicker.js +16 -13
  16. package/dist/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepicker.js.map +1 -1
  17. package/dist/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepickerStyles.d.ts +1 -1
  18. package/dist/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepickerStyles.js +1 -1
  19. package/dist/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepickerStyles.js.map +1 -1
  20. package/dist/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.js +2 -2
  21. package/dist/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.js.map +1 -1
  22. package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.js +1 -1
  23. package/dist/elements/CustomRegularExpression/CustomRegularExpressionElement.js.map +1 -1
  24. package/dist/elements/DateField/DateFieldElement.js +1 -1
  25. package/dist/elements/DateField/DateFieldElement.js.map +1 -1
  26. package/dist/elements/DropDownList/DropDownListElement.js +1 -1
  27. package/dist/elements/DropDownList/DropDownListElement.js.map +1 -1
  28. package/dist/elements/EmailField/EmailFieldElement.js +1 -1
  29. package/dist/elements/EmailField/EmailFieldElement.js.map +1 -1
  30. package/dist/elements/FileField/FileFieldElement.js +1 -1
  31. package/dist/elements/FileField/FileFieldElement.js.map +1 -1
  32. package/dist/elements/IdentificationElement/IdentificationElement.js +1 -1
  33. package/dist/elements/IdentificationElement/IdentificationElement.js.map +1 -1
  34. package/dist/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.js +1 -1
  35. package/dist/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.js.map +1 -1
  36. package/dist/elements/NumericField/NumericFieldElement.js +1 -1
  37. package/dist/elements/NumericField/NumericFieldElement.js.map +1 -1
  38. package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js +1 -1
  39. package/dist/elements/RadioButtonGroup/RadioButtonGroupElement.js.map +1 -1
  40. package/dist/elements/SECompanyRegistrationElement/SECompanyRegistrationElement.js +1 -1
  41. package/dist/elements/SECompanyRegistrationElement/SECompanyRegistrationElement.js.map +1 -1
  42. package/dist/elements/SEPersonalNumberElement/SEPersonalNumberElement.js +1 -1
  43. package/dist/elements/SEPersonalNumberElement/SEPersonalNumberElement.js.map +1 -1
  44. package/dist/elements/TextAreaElement/TextAreaElement.js +1 -1
  45. package/dist/elements/TextAreaElement/TextAreaElement.js.map +1 -1
  46. package/dist/elements/TextField/TextFieldElement.js +1 -1
  47. package/dist/elements/TextField/TextFieldElement.js.map +1 -1
  48. package/dist/elements/TypeAhead/TypeAheadElement.d.ts +3 -0
  49. package/dist/elements/TypeAhead/TypeAheadElement.js +26 -9
  50. package/dist/elements/TypeAhead/TypeAheadElement.js.map +1 -1
  51. package/package.json +1 -1
  52. package/src/elements/Address/AddressElement.ts +1 -1
  53. package/src/elements/BankField/BankFieldElement.ts +1 -1
  54. package/src/elements/CPRElement/CPRElement.ts +1 -1
  55. package/src/elements/CVRElement/CVRElement.ts +1 -1
  56. package/src/elements/CheckBoxElement/CheckBoxElement.ts +13 -5
  57. package/src/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepicker.ts +16 -13
  58. package/src/elements/CustomFormatDateFieldElement/CustomDatepicker/CustomDatepickerStyles.ts +18 -18
  59. package/src/elements/CustomFormatDateFieldElement/CustomFormatDateFieldElement.ts +16 -7
  60. package/src/elements/CustomRegularExpression/CustomRegularExpressionElement.ts +1 -1
  61. package/src/elements/DateField/DateFieldElement.ts +1 -1
  62. package/src/elements/DropDownList/DropDownListElement.ts +2 -2
  63. package/src/elements/EmailField/EmailFieldElement.ts +1 -1
  64. package/src/elements/FileField/FileFieldElement.ts +1 -1
  65. package/src/elements/IdentificationElement/IdentificationElement.ts +1 -1
  66. package/src/elements/InternationaPhoneNumber/InternationaPhoneNumberElement.ts +1 -1
  67. package/src/elements/NumericField/NumericFieldElement.ts +1 -1
  68. package/src/elements/RadioButtonGroup/RadioButtonGroupElement.ts +10 -5
  69. package/src/elements/SECompanyRegistrationElement/SECompanyRegistrationElement.ts +1 -1
  70. package/src/elements/SEPersonalNumberElement/SEPersonalNumberElement.ts +1 -1
  71. package/src/elements/TextAreaElement/TextAreaElement.ts +1 -1
  72. package/src/elements/TextField/TextFieldElement.ts +1 -1
  73. package/src/elements/TypeAhead/TypeAheadElement.ts +44 -22
package/demo/index.min.js CHANGED
@@ -3649,7 +3649,7 @@ var AddressElement = /** @class */ (function (_super) {
3649
3649
  (0, custom_element_decorator_1.default)({
3650
3650
  selector: 'address-element',
3651
3651
  template: "\n\t\t\t<div class=\"address-wrapper\">\n\t\t\t\t<input class='address-part' id='address' type=\"text\" placeholder='Address'/>\n\t\t\t\t<input class='address-part' id='zip' type=\"text\" placeholder='Zip'/>\n\t\t\t\t<input class='address-part' id='city' type=\"text\" placeholder='City'/>\n\t\t\t\t<input class='address-part' id='country' type=\"text\" placeholder='Country'/>\n\t\t\t</div>",
3652
- style: ".address-wrapper{\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-wrap: nowrap;\n\t\t\t}\n\t\t\tinput.address-part{\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tborder: none;\n\t\t\t\tbackground-color: #f1f4ff;\n\t\t\t\tmargin: 2px;\n\t\t\t\tresize: none;\n\t\t\t\twidth:33% !important;\n\t\t\t}\n\t\t",
3652
+ style: ".address-wrapper{\n\t\t\t\tdisplay: flex;\n\t\t\t\tflex-wrap: nowrap;\n\t\t\t}\n\t\t\tinput.address-part{\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\tborder: none;\n\t\t\t\tbackground-color: #f1f4ff;\n\t\t\t\tmargin: 0.125rem;\n\t\t\t\tresize: none;\n\t\t\t\twidth:33% !important;\n\t\t\t}\n\t\t",
3653
3653
  templatePath: './html.html',
3654
3654
  useShadow: true,
3655
3655
  })
@@ -3782,7 +3782,7 @@ var BankFieldElement = /** @class */ (function (_super) {
3782
3782
  (0, custom_element_decorator_1.default)({
3783
3783
  selector: 'bank-element',
3784
3784
  template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='reg-number-field' placeholder='Bank Account Registration Number'/>\n\t\t\t\t<input type=\"text\" id='account-field' placeholder='Bank Account'/>\n\t\t\t</div>",
3785
- style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 2px;\n resize: none;\n }\n ",
3785
+ style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 0.125rem;\n resize: none;\n }\n ",
3786
3786
  useShadow: true,
3787
3787
  })
3788
3788
  ], BankFieldElement);
@@ -3872,7 +3872,7 @@ var CPRElement = /** @class */ (function (_super) {
3872
3872
  (0, custom_element_decorator_1.default)({
3873
3873
  selector: 'cpr-element',
3874
3874
  template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='cpr-field' placeholder='DDMMYY-SSSS'/>\n\t\t\t</div>",
3875
- style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 2px;\n resize: none;\n }\n ",
3875
+ style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 0.125rem;\n resize: none;\n }\n ",
3876
3876
  useShadow: true,
3877
3877
  })
3878
3878
  ], CPRElement);
@@ -3962,7 +3962,7 @@ var CVRElement = /** @class */ (function (_super) {
3962
3962
  (0, custom_element_decorator_1.default)({
3963
3963
  selector: 'cvr-element',
3964
3964
  template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='cvr-field' placeholder='SSSSSSSS'/>\n\t\t\t</div>",
3965
- style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 2px;\n resize: none;\n }\n ",
3965
+ style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 0.125rem;\n resize: none;\n }\n ",
3966
3966
  useShadow: true,
3967
3967
  })
3968
3968
  ], CVRElement);
@@ -4064,7 +4064,7 @@ var CheckBoxElement = /** @class */ (function (_super) {
4064
4064
  (0, custom_element_decorator_1.default)({
4065
4065
  selector: 'checkbox-element',
4066
4066
  template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<fieldset></fieldset>\n\t\t\t</div>",
4067
- style: "\n\t\t\t:host{\n\t\t\t\twidth:100%;\n\t\t\t}\n\t\t\t.checkbox {\n\t\t\t\twidth: auto;\n\t\t\t\tmargin: auto 3px;\n\t\t\t\tcolor: rgba(72, 72, 72, 0.75);\n\t\t\t\tfont-size: 13px;\n\t\t\t}\n\t\t\tinput[type='checkbox']{\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: auto !important;\n\t\t\t\tborder: none;\n\t\t\t\tbackground-color: #f1f4ff;\n\t\t\t\tmargin: 2px;\n\t\t\t\tresize: none;\n\t\t\t}\n\t\t\t.sr-only:not(:focus):not(:active) {\n\t\t\t\tclip: rect(0 0 0 0); \n\t\t\t\tclip-path: inset(50%);\n\t\t\t\theight: 1px;\n\t\t\t\toverflow: hidden;\n\t\t\t\tposition: absolute;\n\t\t\t\twhite-space: nowrap; \n\t\t\t\twidth: 1px;\n\t\t\t}\n\t\t",
4067
+ style: "\n\t\t\t:host{\n\t\t\t\twidth:100%;\n\t\t\t}\n\t\t\t.checkbox {\n\t\t\t\twidth: auto;\n\t\t\t\tmargin: auto 0.188rem;\n\t\t\t\tcolor: rgba(72, 72, 72, 0.75);\n\t\t\t\tfont-size: 0.813rem;\n\t\t\t\tmargin-top: 0.25rem;\n\t\t\t}\n\t\t\t.checkbox:first-of-type {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t\tinput[type='checkbox']{\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: auto !important;\n\t\t\t\tborder: none;\n\t\t\t\tbackground-color: #f1f4ff;\n\t\t\t\tmargin: 0.125rem;\n\t\t\t\tresize: none;\n\t\t\t}\n\t\t\t.sr-only:not(:focus):not(:active) {\n\t\t\t\tclip: rect(0 0 0 0); \n\t\t\t\tclip-path: inset(50%);\n\t\t\t\theight: 0.063rem;\n\t\t\t\toverflow: hidden;\n\t\t\t\tposition: absolute;\n\t\t\t\twhite-space: nowrap; \n\t\t\t\twidth: 0.063rem;\n\t\t\t}\n\t\t\tfieldset {\n\t\t\t\tborder: none;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t",
4068
4068
  useShadow: true,
4069
4069
  })
4070
4070
  ], CheckBoxElement);
@@ -4258,9 +4258,9 @@ var CustomDatepicker = /** @class */ (function () {
4258
4258
  var _this = this;
4259
4259
  var tempCurrentYear = this.currentYear;
4260
4260
  this.selectMonthYear.style.display = 'none';
4261
- this.selectMonthYear.style.height = '200px';
4261
+ this.selectMonthYear.style.height = '12.5rem';
4262
4262
  if ((0, CustomDatepickerUtils_1.isMobileDevice)()) {
4263
- this.selectMonthYear.style.height = '300px';
4263
+ this.selectMonthYear.style.height = '18.75rem';
4264
4264
  }
4265
4265
  this.selectMonthYear.innerHTML = '';
4266
4266
  var monthsContainer = document.createElement('div');
@@ -4370,33 +4370,33 @@ var CustomDatepicker = /** @class */ (function () {
4370
4370
  this.datepicker.style.position = 'fixed';
4371
4371
  var datepickerHeight = 250;
4372
4372
  if ((0, CustomDatepickerUtils_1.isMobileDevice)()) {
4373
- this.datepicker.style.height = '400px';
4373
+ this.datepicker.style.height = '25rem';
4374
4374
  this.datepicker.style.top = '50%';
4375
4375
  this.datepicker.style.left = '50%';
4376
4376
  this.datepicker.style.transform = 'translate(-50%, -50%)';
4377
4377
  this.datepicker.style.width = '90%';
4378
- this.datepicker.style.maxWidth = '300px';
4379
- this.datepicker.style.fontSize = '16px';
4380
- this.datepicker.style.padding = '30px';
4381
- this.header.style.marginBottom = '20px';
4378
+ this.datepicker.style.maxWidth = '18.75rem';
4379
+ this.datepicker.style.fontSize = '1rem';
4380
+ this.datepicker.style.padding = '1.875rem';
4381
+ this.header.style.marginBottom = '1.25rem';
4382
4382
  var weekdaysSpans = this.weekdays.querySelectorAll('span');
4383
4383
  var daysSpans = this.days.querySelectorAll('span');
4384
- weekdaysSpans.forEach(function (span) { return span.style.marginBottom = '10px'; });
4385
- daysSpans.forEach(function (span) { return span.style.marginBottom = '10px'; });
4384
+ weekdaysSpans.forEach(function (span) { return span.style.marginBottom = '0.625rem'; });
4385
+ daysSpans.forEach(function (span) { return span.style.marginBottom = '0.625rem'; });
4386
4386
  }
4387
4387
  else {
4388
- this.datepicker.style.height = datepickerHeight + 'px';
4388
+ this.datepicker.style.height = datepickerHeight / 16.0 + 'rem';
4389
4389
  var dateInputRect = this.input.getBoundingClientRect();
4390
4390
  datepickerHeight += 20;
4391
4391
  if (window.innerHeight - dateInputRect.bottom < datepickerHeight) {
4392
4392
  this.datepicker.style.top = 'auto';
4393
- this.datepicker.style.bottom = window.innerHeight - dateInputRect.top + 'px';
4393
+ this.datepicker.style.bottom = (window.innerHeight - dateInputRect.top) / 16.0 + 'rem';
4394
4394
  }
4395
4395
  else {
4396
4396
  this.datepicker.style.bottom = 'auto';
4397
- this.datepicker.style.top = dateInputRect.bottom + 'px';
4397
+ this.datepicker.style.top = dateInputRect.bottom / 16.0 + 'rem';
4398
4398
  }
4399
- this.datepicker.style.left = dateInputRect.left + 'px';
4399
+ this.datepicker.style.left = dateInputRect.left / 16.0 + 'rem';
4400
4400
  }
4401
4401
  };
4402
4402
  CustomDatepicker.prototype.setDateForToday = function () {
@@ -4435,6 +4435,9 @@ var CustomDatepicker = /** @class */ (function () {
4435
4435
  if (event.key === 'Enter') {
4436
4436
  _this.setDateUsingInputValue();
4437
4437
  }
4438
+ if (event.key === 'Escape' || event.key === 'Tab') {
4439
+ _this.showPicker(false);
4440
+ }
4438
4441
  });
4439
4442
  this.otherTriggers.forEach(function (trigger) {
4440
4443
  trigger.addEventListener('click', function () { return _this.showPicker(true); });
@@ -4468,7 +4471,7 @@ exports.default = CustomDatepicker;
4468
4471
  "use strict";
4469
4472
  Object.defineProperty(exports, "__esModule", { value: true });
4470
4473
  exports.CustomDatepickerStyles = void 0;
4471
- exports.CustomDatepickerStyles = "\n .custom-datepicker {\n position: fixed;\n background-color: #fff;\n display: none;\n width: 200px;\n border: 1px solid #ccc;\n border-radius: 5px;\n padding: 10px;\n margin: 0 auto;\n box-shadow: 0 0 10px 0 #ccc;\n font: 12px Arial, sans-serif;\n }\n\n .custom-datepicker .custom-datepicer-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 10px;\n }\n .custom-datepicker .weekdays {\n display: flex;\n justify-content: space-between;\n }\n .custom-datepicker .weekdays span {\n width: 14.28%;\n text-align: center;\n padding: 5px 0;\n }\n .custom-datepicker .days {\n display: flex;\n flex-wrap: wrap;\n }\n .custom-datepicker .days span {\n width: 14.28%;\n text-align: center;\n padding: 5px 0;\n }\n .custom-datepicker .days span:hover {\n background-color: #B2d5ff;\n cursor: pointer;\n }\n .custom-datepicker .days span.today {\n border: 1px solid #000;\n }\n .custom-datepicker .days span.selected-day {\n background-color: #0075ff;\n color: #fff;\n }\n .custom-datepicker .prev-month, .next-month {\n cursor: pointer;\n }\n .custom-datepicker .month-year {\n font-weight: bold;\n }\n .custom-datepicker .month-year:hover {\n cursor: pointer;\n }\n .custom-datepicker .select-month-year {\n display: none;\n width: 100%;\n overflow-y: auto;\n }\n .custom-datepicker .select-month-year .year {\n text-align: center;\n background-color: #f0f0f0;\n border-bottom: 1px solid #3f3d3d;\n padding: 5px 0;\n cursor: pointer;\n }\n .custom-datepicker .select-month-year .year .months {\n display: flex;\n flex-wrap: wrap;\n }\n .custom-datepicker .select-month-year .year .months span {\n width: 25%;\n text-align: center;\n padding: 10px 0;\n background-color: #fff;\n }\n .custom-datepicker .select-month-year .year .months span:hover {\n background-color: #B2d5ff;\n cursor: pointer;\n }\n .custom-datepicker .actions {\n display: flex;\n justify-content: space-between;\n margin-top: 10px;\n }\n .custom-datepicker .actions input {\n color: #0075ff;\n border: none;\n background-color: transparent;\n padding: 5px;\n border: 1px solid transparent;\n }\n .custom-datepicker .actions input:hover {\n background-color: #B2d5ff;\n border-color: #000;\n }\n";
4474
+ exports.CustomDatepickerStyles = "\n .custom-datepicker {\n position: fixed;\n background-color: #fff;\n display: none;\n width: 12.5rem;\n border: 0.063rem solid #ccc;\n border-radius: 0.313rem;\n padding: 0.625rem;\n margin: 0 auto;\n box-shadow: 0 0 0.625rem 0 #ccc;\n font: 0.75rem Arial, sans-serif;\n }\n\n .custom-datepicker .custom-datepicer-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin-bottom: 0.625rem;\n }\n .custom-datepicker .weekdays {\n display: flex;\n justify-content: space-between;\n }\n .custom-datepicker .weekdays span {\n width: 14.28%;\n text-align: center;\n padding: 0.313rem 0;\n }\n .custom-datepicker .days {\n display: flex;\n flex-wrap: wrap;\n }\n .custom-datepicker .days span {\n width: 14.28%;\n text-align: center;\n padding: 0.313rem 0;\n }\n .custom-datepicker .days span:hover {\n background-color: #B2d5ff;\n cursor: pointer;\n }\n .custom-datepicker .days span.today {\n border: 0.063rem solid #000;\n }\n .custom-datepicker .days span.selected-day {\n background-color: #0070F0;\n color: #fff;\n }\n .custom-datepicker .prev-month, .next-month {\n cursor: pointer;\n }\n .custom-datepicker .month-year {\n font-weight: bold;\n }\n .custom-datepicker .month-year:hover {\n cursor: pointer;\n }\n .custom-datepicker .select-month-year {\n display: none;\n width: 100%;\n overflow-y: auto;\n }\n .custom-datepicker .select-month-year .year {\n text-align: center;\n background-color: #f0f0f0;\n border-bottom: 0.063rem solid #3f3d3d;\n padding: 0.313rem 0;\n cursor: pointer;\n }\n .custom-datepicker .select-month-year .year .months {\n display: flex;\n flex-wrap: wrap;\n }\n .custom-datepicker .select-month-year .year .months span {\n width: 25%;\n text-align: center;\n padding: 0.625rem 0;\n background-color: #fff;\n }\n .custom-datepicker .select-month-year .year .months span:hover {\n background-color: #B2d5ff;\n cursor: pointer;\n }\n .custom-datepicker .actions {\n display: flex;\n justify-content: space-between;\n margin-top: 0.625rem;\n }\n .custom-datepicker .actions input {\n color: #0070F0;\n border: none;\n background-color: transparent;\n padding: 0.313rem;\n border: 0.063rem solid transparent;\n }\n .custom-datepicker .actions input:hover {\n background-color: #B2d5ff;\n border-color: #000;\n }\n";
4472
4475
 
4473
4476
  },{}],18:[function(require,module,exports){
4474
4477
  "use strict";
@@ -5017,8 +5020,8 @@ var CustomFormatDateFieldElement = /** @class */ (function (_super) {
5017
5020
  CustomFormatDateFieldElement = __decorate([
5018
5021
  (0, custom_element_decorator_1.default)({
5019
5022
  selector: 'custom-format-date-element',
5020
- template: "\n\t\t<div class=\"wrapper\">\n\t\t\t<input type=\"text\" id=\"date-field\" />\n\t\t\t<svg id=\"picker-trigger\" data-toggle viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"2\" y=\"4\" width=\"20\" height=\"18\" rx=\"1\" fill=\"#000\"/><rect x=\"4\" y=\"8\" width=\"16\" height=\"12\" fill=\"white\"/><path d=\"M4 10H20\" stroke=\"#000\" stroke-width=\"1\"/><circle cx=\"16\" cy=\"14\" r=\"2\" fill=\"#F44336\"/><rect x=\"6\" y=\"2\" width=\"3\" height=\"4\" rx=\".5\" fill=\"#000\"/><rect x=\"15\" y=\"2\" width=\"3\" height=\"4\" rx=\".5\" fill=\"#000\"/></svg>\n\t\t</div>",
5021
- style: "\n\t\t:host{\n\t\t\twidth:100%;\n\t\t}\n\t\t* {\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.wrapper{\n\t\t\tdisplay:flex;\n\t\t\tposition: relative;\n\t\t}\n\t\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\t}\n\t\t#date-field::after {\n\t\t\tcontent: url('path/to/datepicker-icon.png'); /* Path to your datepicker icon */\n\t\t\tcursor: pointer;\n\t\t\tright: 10px;\n\t\t}\n\t\t#picker-trigger {\n\t\t\tcursor: pointer;\n\t\t\twidth: 15px;\n\t\t\theight: 15px;\n\t\t\tposition:absolute;\n\t\t\tright: 2px;\n\t\t\ttop: 15%;\n\t\t}\n\t",
5023
+ template: "\n\t\t<div class=\"wrapper\">\n\t\t\t<input type=\"text\" id=\"date-field\">\n\t\t\t<button id=\"picker-trigger\" aria-label=\"Open date picker\">\n\t\t\t\t<svg class=\"svg-picker\" data-toggle viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><rect x=\"2\" y=\"4\" width=\"20\" height=\"18\" rx=\"1\" fill=\"#000\"/><rect x=\"4\" y=\"8\" width=\"16\" height=\"12\" fill=\"white\"/><path d=\"M4 10H20\" stroke=\"#000\" stroke-width=\"1\"/><circle cx=\"16\" cy=\"14\" r=\"2\" fill=\"#F44336\"/><rect x=\"6\" y=\"2\" width=\"3\" height=\"4\" rx=\".5\" fill=\"#000\"/><rect x=\"15\" y=\"2\" width=\"3\" height=\"4\" rx=\".5\" fill=\"#000\"/></svg>\n\t\t\t</button>\n\t\t</div>",
5024
+ style: "\n\t\t:host{\n\t\t\twidth:100%;\n\t\t}\n\t\t* {\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.wrapper{\n\t\t\tdisplay:flex;\n\t\t\tposition: relative;\n\t\t}\n\t\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: 0.125rem;\n\t\t\tresize: none;\n\t\t}\n\t\t#date-field::after {\n\t\t\tcontent: url('path/to/datepicker-icon.png'); /* Path to your datepicker icon */\n\t\t\tcursor: pointer;\n\t\t\tright: 0.625rem;\n\t\t}\n\t\t.svg-picker {\n\t\t\twidth: 0.938rem;\n\t\t\theight: 0.938rem;\n\t\t}\n\t\t#picker-trigger {\n\t\t\tcursor: pointer;\n\t\t\tbackground-color: transparent;\n\t\t\tborder: none;\n\t\t\twidth: 0.938rem;\n\t\t\theight: 0.938rem;\n\t\t\tposition:absolute;\n\t\t\tright: 0.125rem;\n\t\t\ttop: 15%;\n\t\t\tpadding: 0;\n\t\t}\n\t",
5022
5025
  useShadow: true,
5023
5026
  })
5024
5027
  ], CustomFormatDateFieldElement);
@@ -5114,7 +5117,7 @@ var CustomRegularExpressionElement = /** @class */ (function (_super) {
5114
5117
  (0, custom_element_decorator_1.default)({
5115
5118
  selector: 'regex-element',
5116
5119
  template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='regex-field'/>\n\t\t\t</div>",
5117
- style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 2px;\n resize: none;\n }\n ",
5120
+ style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 0.125rem;\n resize: none;\n }\n ",
5118
5121
  useShadow: true,
5119
5122
  })
5120
5123
  ], CustomRegularExpressionElement);
@@ -5207,7 +5210,7 @@ var DateFieldElement = /** @class */ (function (_super) {
5207
5210
  (0, custom_element_decorator_1.default)({
5208
5211
  selector: 'date-element',
5209
5212
  template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"date\" id='date-field'/>\n\t\t\t</div>",
5210
- style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 2px;\n resize: none;\n }\n ",
5213
+ style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 0.125rem;\n resize: none;\n }\n ",
5211
5214
  useShadow: true,
5212
5215
  })
5213
5216
  ], DateFieldElement);
@@ -5317,7 +5320,7 @@ var DropDownListElement = /** @class */ (function (_super) {
5317
5320
  (0, custom_element_decorator_1.default)({
5318
5321
  selector: 'drop-down-element',
5319
5322
  template: "\n\t\t\t<div class=\"wrapper\">\n <select id='select-list'>\n\t\t\t <option selected disabled>-</option>\n </select>\n\t\t\t</div>",
5320
- style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n justify-content: center;\n }\n .radio-button {\n width: auto;\n margin: auto 3px;\n display: flex;\n flex-grow: 0.1;\n justify-content: space-around;\n }\n select{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 2px;\n resize: none;\n }\n ",
5323
+ style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n justify-content: center;\n }\n .radio-button {\n width: auto;\n margin: auto 0.188rem;\n display: flex;\n flex-grow: 0.1;\n justify-content: space-around;\n }\n select{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 0.125rem;\n resize: none;\n }\n ",
5321
5324
  useShadow: true,
5322
5325
  })
5323
5326
  ], DropDownListElement);
@@ -5456,7 +5459,7 @@ var EmailFieldElement = /** @class */ (function (_super) {
5456
5459
  (0, custom_element_decorator_1.default)({
5457
5460
  selector: 'email-element',
5458
5461
  template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='email-field'/>\n\t\t\t</div>",
5459
- style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 2px;\n resize: none;\n }\n ",
5462
+ style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 0.125rem;\n resize: none;\n }\n ",
5460
5463
  useShadow: true,
5461
5464
  })
5462
5465
  ], EmailFieldElement);
@@ -5788,7 +5791,7 @@ var FileFieldElement = /** @class */ (function (_super) {
5788
5791
  (0, custom_element_decorator_1.default)({
5789
5792
  selector: 'file-element',
5790
5793
  template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"file\" id='file-field' accept=\"image/*,application/pdf\"/>\n\t\t\t</div>",
5791
- style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 2px;\n resize: none;\n }\n ",
5794
+ style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 0.125rem;\n resize: none;\n }\n ",
5792
5795
  useShadow: true,
5793
5796
  })
5794
5797
  ], FileFieldElement);
@@ -5887,7 +5890,7 @@ var IdentificationElement = /** @class */ (function (_super) {
5887
5890
  (0, custom_element_decorator_1.default)({
5888
5891
  selector: 'id-element',
5889
5892
  template: "\n\t\t\t<div class=\"wrapper\">\n <select id='id-type'>\n <option value='cvr'>Danish CVR</option>\n <option value='cpr'>Danish CPR</option>\n <option value='swe'>Sweden Bank Id</option>\n <option value='nor'>Norway Bank Id</option>\n </select>\n\t\t\t\t<input type=\"text\" id='id-field' placeholder=''/>\n\t\t\t</div>",
5890
- style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input, select{\n box-sizing: border-box;\n border: none;\n background-color: #f1f4ff;\n margin: 2px;\n resize: none;\n }\n input{\n width: 75% !important;\n }\n select{\n width: 25% !important;\n }\n ",
5893
+ style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input, select{\n box-sizing: border-box;\n border: none;\n background-color: #f1f4ff;\n margin: 0.125rem;\n resize: none;\n }\n input{\n width: 75% !important;\n }\n select{\n width: 25% !important;\n }\n ",
5891
5894
  useShadow: true,
5892
5895
  })
5893
5896
  ], IdentificationElement);
@@ -6038,7 +6041,7 @@ var IntPhoneFieldElement = /** @class */ (function (_super) {
6038
6041
  (0, custom_element_decorator_1.default)({
6039
6042
  selector: 'int-phone-element',
6040
6043
  template: "\n <link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/16.0.0/css/intlTelInput.css\" >\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"tel\" id=\"phone-field\" />\n\t\t\t</div>",
6041
- style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n .iti {\n width: 100% !important;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 2px;\n resize: none;\n }\n\n @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {\n\t.iti__flag {\n\t background-image: url('https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/16.0.0/img/flags@2x.png'), url(" + (0, Flags2x_1.default)() + ");\n\t}\n }\n ",
6044
+ style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n .iti {\n width: 100% !important;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 0.125rem;\n resize: none;\n }\n\n @media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {\n\t.iti__flag {\n\t background-image: url('https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/16.0.0/img/flags@2x.png'), url(" + (0, Flags2x_1.default)() + ");\n\t}\n }\n ",
6042
6045
  useShadow: true,
6043
6046
  })
6044
6047
  ], IntPhoneFieldElement);
@@ -6140,7 +6143,7 @@ var NumericFieldElement = /** @class */ (function (_super) {
6140
6143
  (0, custom_element_decorator_1.default)({
6141
6144
  selector: 'numeric-element',
6142
6145
  template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"number\" id=\"numeric-field\" step=\"any\" />\n\t\t\t</div>",
6143
- style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 2px;\n resize: none;\n }\n ",
6146
+ style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 0.125rem;\n resize: none;\n }\n ",
6144
6147
  useShadow: true,
6145
6148
  })
6146
6149
  ], NumericFieldElement);
@@ -6247,7 +6250,7 @@ var RadioButtonGroupElement = /** @class */ (function (_super) {
6247
6250
  (0, custom_element_decorator_1.default)({
6248
6251
  selector: 'radio-group-element',
6249
6252
  template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<fieldset></fieldset>\n\t\t\t</div>",
6250
- style: "\n\t\t\t:host{\n\t\t\t\twidth:100%;\n\t\t\t}\n\t\t\t.radio-button {\n\t\t\t\twidth: auto;\n\t\t\t\tmargin: auto 3px;\n\t\t\t\tcolor: rgba(72, 72, 72, 0.75);\n\t\t\t\tfont-size: 13px;\n\t\t\t}\n\t\t\tinput{\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: auto !important;\n\t\t\t\tborder: none;\n\t\t\t\tbackground-color: #f1f4ff;\n\t\t\t\tmargin: 2px;\n\t\t\t\tresize: none;\n\t\t\t}\n\t\t\t.sr-only:not(:focus):not(:active) {\n\t\t\t\tclip: rect(0 0 0 0); \n\t\t\t\tclip-path: inset(50%);\n\t\t\t\theight: 1px;\n\t\t\t\toverflow: hidden;\n\t\t\t\tposition: absolute;\n\t\t\t\twhite-space: nowrap; \n\t\t\t\twidth: 1px;\n\t\t\t}\n\t\t\tfieldset {\n\t\t\t\tborder: none;\n\t\t\t}\n\t\t",
6253
+ style: "\n\t\t\t:host{\n\t\t\t\twidth:100%;\n\t\t\t}\n\t\t\t.radio-button {\n\t\t\t\twidth: auto;\n\t\t\t\tmargin: auto 0.188rem;\n\t\t\t\tcolor: rgba(72, 72, 72, 0.75);\n\t\t\t\tfont-size: 0.813rem;\n\t\t\t\tmargin-top: 0.25rem;\n\t\t\t}\n\t\t\t.radio-button:first-of-type {\n\t\t\t\tmargin-top: 0;\n\t\t\t}\n\t\t\tinput{\n\t\t\t\tbox-sizing: border-box;\n\t\t\t\twidth: auto !important;\n\t\t\t\tborder: none;\n\t\t\t\tbackground-color: #f1f4ff;\n\t\t\t\tmargin: 0.125rem;\n\t\t\t\tresize: none;\n\t\t\t}\n\t\t\t.sr-only:not(:focus):not(:active) {\n\t\t\t\tclip: rect(0 0 0 0); \n\t\t\t\tclip-path: inset(50%);\n\t\t\t\theight: 0.063rem;\n\t\t\t\toverflow: hidden;\n\t\t\t\tposition: absolute;\n\t\t\t\twhite-space: nowrap; \n\t\t\t\twidth: 0.063rem;\n\t\t\t}\n\t\t\tfieldset {\n\t\t\t\tborder: none;\n\t\t\t\tpadding: 0;\n\t\t\t}\n\t\t",
6251
6254
  useShadow: true,
6252
6255
  })
6253
6256
  ], RadioButtonGroupElement);
@@ -6337,7 +6340,7 @@ var SECompanyRegistrationElement = /** @class */ (function (_super) {
6337
6340
  (0, custom_element_decorator_1.default)({
6338
6341
  selector: 'se-company-registration-element',
6339
6342
  template: "\n <div class=\"wrapper\">\n <input type=\"text\" id='se-company-registration-field' placeholder='SSSSSSSSSS'/>\n </div>",
6340
- style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 2px;\n resize: none;\n }",
6343
+ style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 0.125rem;\n resize: none;\n }",
6341
6344
  useShadow: true,
6342
6345
  })
6343
6346
  ], SECompanyRegistrationElement);
@@ -6427,7 +6430,7 @@ var SEPersonalNumberElement = /** @class */ (function (_super) {
6427
6430
  (0, custom_element_decorator_1.default)({
6428
6431
  selector: 'se-personal-number-element',
6429
6432
  template: "\n <div class=\"wrapper\">\n <input type=\"text\" id='se-personal-number-field' placeholder='(YY)YYMMDD-SSSS'/>\n </div>",
6430
- style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 2px;\n resize: none;\n }",
6433
+ style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n input{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 0.125rem;\n resize: none;\n }",
6431
6434
  useShadow: true,
6432
6435
  })
6433
6436
  ], SEPersonalNumberElement);
@@ -6517,7 +6520,7 @@ var TextAreaElement = /** @class */ (function (_super) {
6517
6520
  (0, custom_element_decorator_1.default)({
6518
6521
  selector: 'text-area-element',
6519
6522
  template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<textarea rows=5 id='text-area-field'></textarea>\n\t\t\t</div>",
6520
- style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n textarea{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 2px;\n resize: none;\n }\n ",
6523
+ style: "\n :host{\n width:100%;\n }\n .wrapper{\n display:flex;\n }\n textarea{\n box-sizing: border-box;\n width: 100% !important;\n border: none;\n background-color: #f1f4ff;\n margin: 0.125rem;\n resize: none;\n }\n ",
6521
6524
  useShadow: true,
6522
6525
  })
6523
6526
  ], TextAreaElement);
@@ -6607,7 +6610,7 @@ var TextFieldElement = /** @class */ (function (_super) {
6607
6610
  (0, custom_element_decorator_1.default)({
6608
6611
  selector: 'text-element',
6609
6612
  template: "\n\t\t\t<div class=\"wrapper\">\n\t\t\t\t<input type=\"text\" id='text-field' />\n\t\t\t</div>",
6610
- 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",
6613
+ 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: 0.125rem;\n\t\t\tresize: none;\n\t}\n\t\t",
6611
6614
  useShadow: true,
6612
6615
  })
6613
6616
  ], TextFieldElement);
@@ -6699,7 +6702,8 @@ var TypeAheadElement = /** @class */ (function (_super) {
6699
6702
  TypeAheadElement.prototype.initChildInputs = function () {
6700
6703
  var _this = this;
6701
6704
  this.textInputElement = _super.prototype.getChildInput.call(this, '#text-input');
6702
- this.descriptionElement = _super.prototype.getChildInput.call(this, '#description');
6705
+ this.descriptionElement = _super.prototype.getChildElement.call(this, '#description');
6706
+ this.optionsListElement = _super.prototype.getChildElement.call(this, '#options-list');
6703
6707
  this.componentWrapper = _super.prototype.getChildElement.call(this, '.wrapper');
6704
6708
  if (this.required) {
6705
6709
  this.textInputElement.setAttribute('required', '');
@@ -6744,6 +6748,9 @@ var TypeAheadElement = /** @class */ (function (_super) {
6744
6748
  }
6745
6749
  _this.searchResultOptions.push(option);
6746
6750
  var optionsListItem = document.createElement("div");
6751
+ optionsListItem.setAttribute('role', 'option');
6752
+ optionsListItem.setAttribute('id', "option-" + index);
6753
+ optionsListItem.setAttribute('aria-selected', 'false');
6747
6754
  optionsListItem.classList.add('options-list-item');
6748
6755
  optionsListItem.dataset['value'] = option.value;
6749
6756
  optionslist.appendChild(optionsListItem);
@@ -6758,16 +6765,16 @@ var TypeAheadElement = /** @class */ (function (_super) {
6758
6765
  optionsListItem.addEventListener('mousedown', function () {
6759
6766
  _this.optionSelectedHandler(option);
6760
6767
  });
6761
- _this.componentWrapper.appendChild(optionslist);
6768
+ _this.optionsListElement.appendChild(optionsListItem);
6762
6769
  });
6770
+ this.optionsListElement.hidden = false;
6771
+ this.updateAriaAttributes();
6763
6772
  };
6764
6773
  TypeAheadElement.prototype.closeOptionsList = function () {
6765
6774
  this.currentFoucsedIndex = -1;
6766
- var optionsList = _super.prototype.getChildElement.call(this, '.options-list');
6767
- if (!optionsList) {
6768
- return;
6769
- }
6770
- optionsList.remove();
6775
+ this.optionsListElement.innerHTML = '';
6776
+ this.optionsListElement.hidden = true;
6777
+ this.updateAriaAttributes();
6771
6778
  };
6772
6779
  TypeAheadElement.prototype.optionSelectedHandler = function (option) {
6773
6780
  this.value = option.value;
@@ -6786,6 +6793,7 @@ var TypeAheadElement = /** @class */ (function (_super) {
6786
6793
  }
6787
6794
  _this.currentFoucsedIndex = _this.currentFoucsedIndex === _this.searchResultOptions.length - 1 ? 0 : _this.currentFoucsedIndex + 1;
6788
6795
  _this.highlightFocusedSearchResult();
6796
+ _this.scrollToFocusedOption();
6789
6797
  }
6790
6798
  if (event.key === 'ArrowUp') {
6791
6799
  if (!_this.searchHasResults) {
@@ -6793,6 +6801,7 @@ var TypeAheadElement = /** @class */ (function (_super) {
6793
6801
  }
6794
6802
  _this.currentFoucsedIndex = _this.currentFoucsedIndex === 0 ? _this.searchResultOptions.length - 1 : _this.currentFoucsedIndex - 1;
6795
6803
  _this.highlightFocusedSearchResult();
6804
+ _this.scrollToFocusedOption();
6796
6805
  }
6797
6806
  if (event.key === 'Enter') {
6798
6807
  if (_this.currentFoucsedIndex !== -1 && _this.searchHasResults) {
@@ -6802,6 +6811,12 @@ var TypeAheadElement = /** @class */ (function (_super) {
6802
6811
  }
6803
6812
  });
6804
6813
  };
6814
+ TypeAheadElement.prototype.scrollToFocusedOption = function () {
6815
+ var optionListItems = _super.prototype.getChildElements.call(this, '.options-list-item');
6816
+ if (optionListItems && optionListItems[this.currentFoucsedIndex]) {
6817
+ optionListItems[this.currentFoucsedIndex].scrollIntoView({ block: 'nearest' });
6818
+ }
6819
+ };
6805
6820
  TypeAheadElement.prototype.highlightFocusedSearchResult = function () {
6806
6821
  var _this = this;
6807
6822
  var optionListItems = _super.prototype.getChildElements.call(this, '.options-list-item');
@@ -6809,12 +6824,17 @@ var TypeAheadElement = /** @class */ (function (_super) {
6809
6824
  return;
6810
6825
  }
6811
6826
  optionListItems.forEach(function (listItem, index) {
6827
+ listItem.setAttribute('aria-selected', String(index === _this.currentFoucsedIndex));
6812
6828
  listItem.classList.remove('active');
6813
6829
  if (index === _this.currentFoucsedIndex) {
6814
6830
  listItem.classList.add('active');
6831
+ _this.textInputElement.setAttribute('aria-activedescendant', listItem.id);
6815
6832
  }
6816
6833
  });
6817
6834
  };
6835
+ TypeAheadElement.prototype.updateAriaAttributes = function () {
6836
+ this.textInputElement.setAttribute('aria-expanded', String(!this.optionsListElement.hidden));
6837
+ };
6818
6838
  TypeAheadElement.prototype.change = function ($event) {
6819
6839
  this.touched = true;
6820
6840
  this.onChange.emit(new CustomEvents_1.CustomElementEventArgs(this.value, 'change'));
@@ -6826,8 +6846,8 @@ var TypeAheadElement = /** @class */ (function (_super) {
6826
6846
  TypeAheadElement = __decorate([
6827
6847
  (0, custom_element_decorator_1.default)({
6828
6848
  selector: 'type-ahead-element',
6829
- template: "\n\t\t<div class=\"wrapper\">\n\t\t\t<input type=\"text\" id=\"text-input\">\n\t\t\t<div id=\"description\"></div>\n\t\t</div>",
6830
- style: "\n\t\t:host {\n\t\t\twidth:100%;\n\t\t}\n\t\t.wrapper {\n\t\t\tposition: relative;\n\t\t\tdisplay:flex;\n\t\t\tflex-direction: column;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t}\n\t\t#text-input {\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\t}\n\t\t.wrapper #description {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0 2px;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.options-list {\n\t\t\tposition: absolute;\n\t\t\tborder: 1px solid #E8E8E8;\n\t\t\tborder-bottom: none;\n\t\t\tborder-top: none;\n\t\t\tz-index: 3;\n\t\t\ttop: 100%;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tmax-height: 200px;\n\t\t\toverflow-y: auto;\n\t\t}\n\t\t.options-list-item {\n\t\t\tpadding: 10px;\n\t\t\tcursor: pointer;\n\t\t\tbackground-color: #FFFFFF;\n\t\t\tborder-bottom: 1px solid #E8E8E8;\n\t\t}\n\t\t.options-list-item:hover {\n\t\t\tbackground-color: #E8E8E8;\n\t\t}\n\t\t.options-list-item.active {\n\t\t\t/*when navigating through the items using the arrow keys:*/\n\t\t\tbackground-color: #003E64 !important;\n\t\t\tcolor: #FFFFFF;\n\t\t}\n\t\t.options-list-item-title {\n\t\t\tfont-size: 16px;\n\t\t}\n\t\t.options-list-item-description {\n\t\t\tfont-size: 10px;\n\t\t}\n\t",
6849
+ template: "\n\t\t<div class=\"wrapper\" role=\"combobox\" aria-expanded=\"false\" aria-owns=\"options-list\" aria-haspopup=\"listbox\">\n\t\t\t<input type=\"text\" id=\"text-input\" aria-autocomplete=\"list\" aria-controls=\"options-list\" aria-activedescendant=\"\" role=\"textbox\">\n\t\t\t<div id=\"description\" aria-live=\"polite\"></div>\n\t\t\t<div id=\"options-list\" role=\"listbox\" class=\"options-list\" hidden>\n\t\t\t\t<!-- Options will be dynamically added here -->\n\t\t\t</div>\n\t\t</div>",
6850
+ style: "\n\t\t:host {\n\t\t\twidth:100%;\n\t\t}\n\t\t.wrapper {\n\t\t\tposition: relative;\n\t\t\tdisplay:flex;\n\t\t\tflex-direction: column;\n\t\t\tjustify-content: center;\n\t\t\talign-items: center;\n\t\t}\n\t\t#text-input {\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: 0.125rem;\n\t\t\tresize: none;\n\t\t}\n\t\t.wrapper #description {\n\t\t\twidth: 100%;\n\t\t\tpadding: 0 0.125rem;\n\t\t\tbox-sizing: border-box;\n\t\t}\n\t\t.options-list {\n\t\t\tposition: absolute;\n\t\t\tborder: 0.063rem solid #E8E8E8;\n\t\t\tborder-bottom: none;\n\t\t\tborder-top: none;\n\t\t\tz-index: 3;\n\t\t\ttop: 100%;\n\t\t\tleft: 0;\n\t\t\tright: 0;\n\t\t\tmax-height: 12.5rem;\n\t\t\toverflow-y: auto;\n\t\t}\n\t\t.options-list-item {\n\t\t\tpadding: 0.625rem;\n\t\t\tcursor: pointer;\n\t\t\tbackground-color: #FFFFFF;\n\t\t\tborder-bottom: 0.063rem solid #E8E8E8;\n\t\t}\n\t\t.options-list-item:hover {\n\t\t\tbackground-color: #E8E8E8;\n\t\t}\n\t\t.options-list-item.active {\n\t\t\tbackground-color: #003E64 !important;\n\t\t\tcolor: #FFFFFF;\n\t\t}\n\t\t.options-list-item-title {\n\t\t\tfont-size: 1rem;\n\t\t}\n\t\t.options-list-item-description {\n\t\t\tfont-size: 0.625rem;\n\t\t}\n\t",
6831
6851
  useShadow: true,
6832
6852
  })
6833
6853
  ], TypeAheadElement);