@scania/tegel 1.36.0 → 1.37.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.
Files changed (136) hide show
  1. package/dist/cjs/index-ca8040ad.js +4 -0
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/tds-breadcrumbs.cjs.entry.js +1 -6
  4. package/dist/cjs/tds-button.cjs.entry.js +12 -7
  5. package/dist/cjs/tds-checkbox.cjs.entry.js +2 -7
  6. package/dist/cjs/tds-chip.cjs.entry.js +1 -6
  7. package/dist/cjs/tds-datetime.cjs.entry.js +3 -8
  8. package/dist/cjs/tds-dropdown_2.cjs.entry.js +6 -16
  9. package/dist/cjs/tds-header-dropdown.cjs.entry.js +3 -10
  10. package/dist/cjs/tds-header-hamburger.cjs.entry.js +1 -6
  11. package/dist/cjs/tds-header-launcher.cjs.entry.js +2 -7
  12. package/dist/cjs/tds-popover-menu.cjs.entry.js +5 -2
  13. package/dist/cjs/tds-table-body-row.cjs.entry.js +1 -1
  14. package/dist/cjs/tds-tag.cjs.entry.js +30 -0
  15. package/dist/cjs/tds-text-field.cjs.entry.js +6 -11
  16. package/dist/cjs/tds-textarea.cjs.entry.js +3 -8
  17. package/dist/cjs/tds-toast.cjs.entry.js +3 -3
  18. package/dist/cjs/tds-toggle.cjs.entry.js +4 -7
  19. package/dist/cjs/tds-tooltip.cjs.entry.js +2 -2
  20. package/dist/cjs/tegel.cjs.js +1 -1
  21. package/dist/collection/collection-manifest.json +1 -0
  22. package/dist/collection/components/breadcrumbs/breadcrumbs.js +1 -6
  23. package/dist/collection/components/button/button.css +3 -3
  24. package/dist/collection/components/button/button.js +26 -6
  25. package/dist/collection/components/checkbox/checkbox.js +2 -7
  26. package/dist/collection/components/chip/chip.js +1 -6
  27. package/dist/collection/components/datetime/datetime.js +3 -8
  28. package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +1 -6
  29. package/dist/collection/components/dropdown/dropdown.js +5 -10
  30. package/dist/collection/components/header/header-dropdown/header-dropdown.js +3 -10
  31. package/dist/collection/components/header/header-hamburger/header-hamburger.js +1 -6
  32. package/dist/collection/components/header/header-launcher/header-launcher.js +2 -7
  33. package/dist/collection/components/popover-menu/popover-menu.js +23 -2
  34. package/dist/collection/components/table/table-body-row/table-body-row.css +4 -0
  35. package/dist/collection/components/tag/tag.css +50 -0
  36. package/dist/collection/components/tag/tag.js +90 -0
  37. package/dist/collection/components/text-field/text-field.css +5 -32
  38. package/dist/collection/components/text-field/text-field.js +5 -10
  39. package/dist/collection/components/textarea/textarea.js +3 -8
  40. package/dist/collection/components/toast/toast.js +3 -3
  41. package/dist/collection/components/toggle/toggle.js +4 -7
  42. package/dist/collection/components/tooltip/tooltip.js +2 -2
  43. package/dist/components/{p-9cee9d7f.js → p-40253725.js} +2 -2
  44. package/dist/components/{p-23aab3b9.js → p-44f5b5e1.js} +2 -7
  45. package/dist/components/{p-ffbaebb1.js → p-94bfc9f4.js} +5 -10
  46. package/dist/components/{p-19edd11a.js → p-d64878cb.js} +2 -7
  47. package/dist/components/tds-breadcrumbs.js +1 -6
  48. package/dist/components/tds-button.js +13 -8
  49. package/dist/components/tds-checkbox.js +1 -1
  50. package/dist/components/tds-chip.js +1 -6
  51. package/dist/components/tds-datetime.js +3 -8
  52. package/dist/components/tds-dropdown-option.js +1 -1
  53. package/dist/components/tds-dropdown.js +1 -1
  54. package/dist/components/tds-header-dropdown.js +3 -10
  55. package/dist/components/tds-header-hamburger.js +1 -6
  56. package/dist/components/tds-header-launcher.js +2 -7
  57. package/dist/components/tds-popover-menu.js +6 -2
  58. package/dist/components/tds-table-body-row.js +2 -2
  59. package/dist/components/tds-table-footer.js +3 -3
  60. package/dist/components/tds-table-header.js +1 -1
  61. package/dist/components/tds-tag.d.ts +11 -0
  62. package/dist/components/tds-tag.js +48 -0
  63. package/dist/components/tds-text-field.js +7 -12
  64. package/dist/components/tds-textarea.js +4 -9
  65. package/dist/components/tds-toast.js +3 -3
  66. package/dist/components/tds-toggle.js +4 -7
  67. package/dist/components/tds-tooltip.js +1 -1
  68. package/dist/esm/index-51d04e39.js +4 -0
  69. package/dist/esm/loader.js +1 -1
  70. package/dist/esm/tds-breadcrumbs.entry.js +1 -6
  71. package/dist/esm/tds-button.entry.js +12 -7
  72. package/dist/esm/tds-checkbox.entry.js +2 -7
  73. package/dist/esm/tds-chip.entry.js +1 -6
  74. package/dist/esm/tds-datetime.entry.js +3 -8
  75. package/dist/esm/tds-dropdown_2.entry.js +6 -16
  76. package/dist/esm/tds-header-dropdown.entry.js +3 -10
  77. package/dist/esm/tds-header-hamburger.entry.js +1 -6
  78. package/dist/esm/tds-header-launcher.entry.js +2 -7
  79. package/dist/esm/tds-popover-menu.entry.js +5 -2
  80. package/dist/esm/tds-table-body-row.entry.js +1 -1
  81. package/dist/esm/tds-tag.entry.js +26 -0
  82. package/dist/esm/tds-text-field.entry.js +6 -11
  83. package/dist/esm/tds-textarea.entry.js +3 -8
  84. package/dist/esm/tds-toast.entry.js +3 -3
  85. package/dist/esm/tds-toggle.entry.js +4 -7
  86. package/dist/esm/tds-tooltip.entry.js +2 -2
  87. package/dist/esm/tegel.js +1 -1
  88. package/dist/tegel/p-1b471db7.entry.js +1 -0
  89. package/dist/tegel/{p-67b4b2cf.entry.js → p-23fb4dee.entry.js} +1 -1
  90. package/dist/tegel/p-3022d31d.entry.js +1 -0
  91. package/dist/tegel/p-303acf88.entry.js +1 -0
  92. package/dist/tegel/p-397c8969.entry.js +1 -0
  93. package/dist/tegel/p-3ebe93ff.entry.js +1 -0
  94. package/dist/tegel/{p-4274d329.entry.js → p-49364819.entry.js} +1 -1
  95. package/dist/tegel/p-704682d6.entry.js +1 -0
  96. package/dist/tegel/p-8c2695af.entry.js +1 -0
  97. package/dist/tegel/p-9b0c886e.entry.js +1 -0
  98. package/dist/tegel/p-a6238890.entry.js +1 -0
  99. package/dist/tegel/p-a74cb560.entry.js +1 -0
  100. package/dist/tegel/p-a98767ea.entry.js +1 -0
  101. package/dist/tegel/p-c15eba7d.entry.js +1 -0
  102. package/dist/tegel/p-cd5103e3.entry.js +1 -0
  103. package/dist/tegel/{p-614cc097.entry.js → p-d0f09796.entry.js} +1 -1
  104. package/dist/tegel/p-f9c17612.entry.js +1 -0
  105. package/dist/tegel/tegel.css +4 -4
  106. package/dist/tegel/tegel.esm.js +1 -1
  107. package/dist/types/components/breadcrumbs/breadcrumbs.d.ts +0 -1
  108. package/dist/types/components/button/button.d.ts +2 -1
  109. package/dist/types/components/checkbox/checkbox.d.ts +0 -1
  110. package/dist/types/components/chip/chip.d.ts +0 -1
  111. package/dist/types/components/datetime/datetime.d.ts +0 -1
  112. package/dist/types/components/dropdown/dropdown-option/dropdown-option.d.ts +0 -1
  113. package/dist/types/components/dropdown/dropdown.d.ts +0 -1
  114. package/dist/types/components/header/header-dropdown/header-dropdown.d.ts +0 -1
  115. package/dist/types/components/header/header-hamburger/header-hamburger.d.ts +0 -1
  116. package/dist/types/components/header/header-launcher/header-launcher.d.ts +0 -1
  117. package/dist/types/components/popover-menu/popover-menu.d.ts +2 -0
  118. package/dist/types/components/tag/tag.d.ts +14 -0
  119. package/dist/types/components/text-field/text-field.d.ts +0 -1
  120. package/dist/types/components/textarea/textarea.d.ts +0 -1
  121. package/dist/types/components/toggle/toggle.d.ts +0 -1
  122. package/dist/types/components.d.ts +45 -0
  123. package/package.json +5 -1
  124. package/dist/tegel/p-23ea1922.entry.js +0 -1
  125. package/dist/tegel/p-29170339.entry.js +0 -1
  126. package/dist/tegel/p-2c56421f.entry.js +0 -1
  127. package/dist/tegel/p-5020a688.entry.js +0 -1
  128. package/dist/tegel/p-618d6b4f.entry.js +0 -1
  129. package/dist/tegel/p-83831252.entry.js +0 -1
  130. package/dist/tegel/p-942abc1e.entry.js +0 -1
  131. package/dist/tegel/p-9fe97da7.entry.js +0 -1
  132. package/dist/tegel/p-ab103d0c.entry.js +0 -1
  133. package/dist/tegel/p-b58194f9.entry.js +0 -1
  134. package/dist/tegel/p-b8a33966.entry.js +0 -1
  135. package/dist/tegel/p-cf1413f0.entry.js +0 -1
  136. package/dist/tegel/p-fe8a4544.entry.js +0 -1
@@ -58,17 +58,12 @@ export class TdsCheckbox {
58
58
  this.indeterminate = false;
59
59
  }
60
60
  }
61
- connectedCallback() {
62
- if (!this.tdsAriaLabel) {
63
- console.warn('Tegel Checkbox component: tdsAriaLabel prop is missing');
64
- }
65
- }
66
61
  render() {
67
- return (h("div", { key: '97afce57b6f6ce0d66dabd227f7271b5dc8fe707', class: "tds-checkbox" }, h("input", { key: '18b283a21ff649b9a4935a7b3e6f489cde16073d',
62
+ return (h("div", { key: '87d4e8620e183b5fb8a885dca8081424c7497b21', class: "tds-checkbox" }, h("input", { key: 'fa5d4c8e9a33a7a88d1348f6eb66b474e94c0ad1',
68
63
  // eslint-disable-next-line no-return-assign
69
64
  ref: (inputElement) => (this.inputElement = inputElement), indeterminate: this.indeterminate, "aria-checked": this.checked, "aria-required": this.required, "aria-label": this.tdsAriaLabel, "aria-describedby": this.tdsAriaDescribedby, required: this.required, type: "checkbox", name: this.name, value: this.value, id: this.checkboxId, checked: this.checked, disabled: this.disabled, onFocus: (event) => this.handleFocus(event), onBlur: (event) => this.handleBlur(event), onChange: () => {
70
65
  this.handleChange();
71
- } }), h("label", { key: '51d15b0eea1fd0f7517ca8d0f669bc02ac59781c', htmlFor: this.checkboxId }, h("slot", { key: 'bb10126c57b177f825ef8cd75da505465b2d6ae3', name: "label" }))));
66
+ } }), h("label", { key: '82545f01ad68fae4d613b58d82a770a0c1bce79e', htmlFor: this.checkboxId }, h("slot", { key: '99892e112b596a7f8517427cc42f75e90140c315', name: "label" }))));
72
67
  }
73
68
  static get is() { return "tds-checkbox"; }
74
69
  static get encapsulation() { return "scoped"; }
@@ -68,11 +68,6 @@ export class TdsChip {
68
68
  }
69
69
  return Object.assign(Object.assign({}, commonAttributes), { onClick: () => this.handleClick() });
70
70
  }
71
- connectedCallback() {
72
- if (!this.tdsAriaLabel) {
73
- console.warn('Tegel Chip component: tdsAriaLabel prop is missing');
74
- }
75
- }
76
71
  render() {
77
72
  const inputAttributes = this.renderInputAttributes();
78
73
  const hasPrefixSlot = hasSlot('prefix', this.host);
@@ -86,7 +81,7 @@ export class TdsChip {
86
81
  'suffix': hasSuffixSlot,
87
82
  'disabled': this.disabled,
88
83
  };
89
- return (h(Host, { key: 'bec32d74f1e0a42f98fb431d5988ba1d78c57b43' }, h("div", { key: 'af67d86bbf22be341cc816d72dad135cf04a9002', class: "component" }, h("div", { key: 'ee91bc58ca35ba6307e270f63bbb3da65e16b4f9', class: chipClasses }, h("input", Object.assign({ key: 'a5e723793a8f8c749f6d54937bbde888788115e0', type: this.type, id: this.chipId, "aria-checked": this.type === 'button' ? undefined : String(this.checked), role: this.type, "aria-label": this.tdsAriaLabel }, inputAttributes)), h("label", { key: 'f0a219c8f5c462e3ec626551aeea054ead479d2b', onClick: (event) => event.stopPropagation(), htmlFor: this.chipId }, hasPrefixSlot && h("slot", { key: '9169b3a496fa6648873811a3ca9eb5d51d110a6f', name: "prefix" }), hasLabelSlot && h("slot", { key: '932e06fe8be85d7588d11024ebc87000c887e9c0', name: "label" }), hasSuffixSlot && h("slot", { key: '3f159f17de790ec17b64a596b9f88dbbda7d1429', name: "suffix" }))))));
84
+ return (h(Host, { key: '4a498e81dbdd096e01d502a1bc378bfa9f7ea61d' }, h("div", { key: '441e76b25ec9fb91485f3394e6df08fa2ac0363f', class: "component" }, h("div", { key: '88658da3bae225792261b6b3b7796c514d76e665', class: chipClasses }, h("input", Object.assign({ key: '1e495bd583136ba481b7f11891f008c8584b0b38', type: this.type, id: this.chipId, "aria-checked": this.type === 'button' ? undefined : String(this.checked), role: this.type, "aria-label": this.tdsAriaLabel }, inputAttributes)), h("label", { key: 'ffaff7dd33befe64eb69fc6f786efd38eb654628', onClick: (event) => event.stopPropagation(), htmlFor: this.chipId }, hasPrefixSlot && h("slot", { key: '95a6bf9c4d337a9d9caaf66b598615af657045c3', name: "prefix" }), hasLabelSlot && h("slot", { key: '2e732390348814bbeea2bb0c4c5fa0b9206a6578', name: "label" }), hasSuffixSlot && h("slot", { key: '716254ff0b5995b2d2a99dcd2aaa2f94613255d0', name: "suffix" }))))));
90
85
  }
91
86
  static get is() { return "tds-chip"; }
92
87
  static get encapsulation() { return "scoped"; }
@@ -103,11 +103,6 @@ export class TdsDatetime {
103
103
  }
104
104
  this.value = value;
105
105
  }
106
- connectedCallback() {
107
- if (!this.tdsAriaLabel && !this.label) {
108
- console.warn('Tegel Datetime component: provide the label or tdsAriaLabel prop for improved accessibility');
109
- }
110
- }
111
106
  render() {
112
107
  let className = ' tds-datetime-input';
113
108
  if (this.size === 'md') {
@@ -128,7 +123,7 @@ export class TdsDatetime {
128
123
  'tds-datetime-container-label-inside': this.label && this.labelPosition === 'inside' && this.size !== 'sm',
129
124
  };
130
125
  const iphone = navigator.userAgent.toLowerCase().includes('iphone');
131
- return (h("div", { key: '28c414fb800bb7e1411feb93b03b4ec4732e60fb', class: classNames, onKeyDown: (e) => {
126
+ return (h("div", { key: 'f397a4fc034fb7cd4dcb8ed7b0cbf2ab2e51177a', class: classNames, onKeyDown: (e) => {
132
127
  if (e.key === 'Enter') {
133
128
  const browserIsChrome = navigator.userAgent.toLowerCase().includes('chrome');
134
129
  if (browserIsChrome) {
@@ -136,9 +131,9 @@ export class TdsDatetime {
136
131
  this.textInput.showPicker();
137
132
  }
138
133
  }
139
- } }, this.labelPosition === 'outside' && this.label && (h("label", { key: '8498489db26eeffef963d57dd8aaaa27903e3e98', htmlFor: this.name, class: "tds-datetime-label" }, this.label)), h("div", { key: 'e62f09d543d12a3d9578bee5249171c85c7e3f03', onClick: (e) => this.handleFocusClick(e), class: "tds-datetime-container" }, h("div", { key: '0d083993b8f447918d0110ba78f18586d5afac1c', class: `tds-datetime-input-container type-${this.type}` }, h("input", { key: 'cdec8e9e1c8f355858031f34799fac7dd8d03c4b', ref: (inputEl) => {
134
+ } }, this.labelPosition === 'outside' && this.label && (h("label", { key: 'e5dd50563ed2d464983016bc608d81b77c379add', htmlFor: this.name, class: "tds-datetime-label" }, this.label)), h("div", { key: 'b2c01f96bb7d8fa7279ac27048328204cc249547', onClick: (e) => this.handleFocusClick(e), class: "tds-datetime-container" }, h("div", { key: 'e7002fc416e62d2c93c337aee1869aa817997df9', class: `tds-datetime-input-container type-${this.type}` }, h("input", { key: '3fdf8d55b15f5a00d4fb0755d5774fee93f100b9', ref: (inputEl) => {
140
135
  this.textInput = inputEl;
141
- }, class: className, type: this.type, disabled: this.disabled, value: this.value, min: this.min, max: this.max, autofocus: this.autofocus, name: this.name, id: this.name, onInput: (e) => this.handleInput(e), onBlur: (e) => this.handleBlur(e), onChange: (e) => this.handleChange(e), "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label }), this.labelPosition === 'inside' && this.size !== 'sm' && this.label && (h("label", { key: 'f5ab00bd2a3dca4a46981da7e54ff6dcacfb6529', class: `tds-datetime-label-inside ${iphone && 'iphone'}`, htmlFor: this.name }, this.label)), h("div", { key: 'ce7799142c01703e7d3add1bc3d0fb474dec25e3', class: "datetime-icon icon-datetime-local" }, h("tds-icon", { key: '189b60ff034d2e0bc49e9461fc9970846a7e10a2', size: "20px", name: "calendar", svgTitle: "Calendar" })), h("div", { key: '192c46c706e8d8ca8613e832df2f77e981b64e2a', class: "datetime-icon icon-time" }, h("tds-icon", { key: 'e0cb4c98ccd40cb6d5b82d313aa48da8e4564b57', size: "20px", name: "clock", svgTitle: "Clock" }))), h("div", { key: '5a677ae45553060d459e1002741c0bed7ae1cefa', class: "tds-datetime-bar" })), this.helper && (h("div", { key: '0b132b2f580c3dffcfceff2ba8b4c2315ca8cd50', class: "tds-datetime-helper" }, h("div", { key: 'b17e1f96757072c8092e4cbe6e66b45b209a16ae', class: "tds-helper" }, this.state === 'error' && h("tds-icon", { key: '8afde58643e719da112bad1dcdc47f363c85490c', name: "error", size: "16px", svgTitle: "error" }), this.helper)))));
136
+ }, class: className, type: this.type, disabled: this.disabled, value: this.value, min: this.min, max: this.max, autofocus: this.autofocus, name: this.name, id: this.name, onInput: (e) => this.handleInput(e), onBlur: (e) => this.handleBlur(e), onChange: (e) => this.handleChange(e), "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label }), this.labelPosition === 'inside' && this.size !== 'sm' && this.label && (h("label", { key: '48d096356ad9f547bacbf407af12c4411d5dd45f', class: `tds-datetime-label-inside ${iphone && 'iphone'}`, htmlFor: this.name }, this.label)), h("div", { key: '0ea83c4003923ffed9b11ef22131000bb696a80f', class: "datetime-icon icon-datetime-local" }, h("tds-icon", { key: '6ab6fde60c3d8ce0ad212c0d248c597a23cc6ce7', size: "20px", name: "calendar", svgTitle: "Calendar" })), h("div", { key: '4c304db3c9e6159a7827b6a83c6f81d04cbf0d19', class: "datetime-icon icon-time" }, h("tds-icon", { key: '2a91a579dc5307d35ffbd47aa67616e2e692dd1c', size: "20px", name: "clock", svgTitle: "Clock" }))), h("div", { key: '80dec676d32fd856e7a7dcee7b7e6acbb8b66827', class: "tds-datetime-bar" })), this.helper && (h("div", { key: 'ff276d3c174c88c14081d7a5da689c278844422a', class: "tds-datetime-helper" }, h("div", { key: '9401ca569dd8c23e1bcbdccb39d9f8134fc027db', class: "tds-helper" }, this.state === 'error' && h("tds-icon", { key: 'dada47e75f30dac9b132477ffd73720d0e1a7530', name: "error", size: "16px", svgTitle: "error" }), this.helper)))));
142
137
  }
143
138
  static get is() { return "tds-datetime"; }
144
139
  static get encapsulation() { return "scoped"; }
@@ -80,13 +80,8 @@ export class TdsDropdownOption {
80
80
  componentWillLoad() {
81
81
  this.internalValue = convertToString(this.value);
82
82
  }
83
- connectedCallback() {
84
- if (!this.tdsAriaLabel && !this.multiselect) {
85
- console.warn('Tegel Dropdown option component: tdsAriaLabel prop is missing');
86
- }
87
- }
88
83
  render() {
89
- return (h(Host, { key: '52827112a3060a8858978c3e65c284358f923539' }, h("div", { key: 'edf5262e5dbbfadf34ff6faa164e58b7fec1e561', class: `dropdown-option
84
+ return (h(Host, { key: 'd35a3153be292b1656d0efca93f06bfc1357041b' }, h("div", { key: '384353f9868a3fb559ca4140d5cd4f5553e024ad', class: `dropdown-option
90
85
  ${this.size}
91
86
  ${this.selected ? 'selected' : ''}
92
87
  ${this.disabled ? 'disabled' : ''}
@@ -441,11 +441,6 @@ export class TdsDropdown {
441
441
  form.removeEventListener('reset', this.resetInput);
442
442
  }
443
443
  }
444
- connectedCallback() {
445
- if (!this.tdsAriaLabel) {
446
- console.warn('Tegel Dropdown component: tdsAriaLabel prop is missing');
447
- }
448
- }
449
444
  updateDropdownListInertState() {
450
445
  if (this.dropdownList) {
451
446
  if (this.open) {
@@ -461,9 +456,9 @@ export class TdsDropdown {
461
456
  // Generate unique IDs for associating labels and helpers with the input/button
462
457
  const labelId = this.label ? `dropdown-label-${this.name || generateUniqueId()}` : undefined;
463
458
  const helperId = this.helper ? `dropdown-helper-${this.name || generateUniqueId()}` : undefined;
464
- return (h(Host, { key: '676f9d61c5fd8488cedbc949757e992be13e49eb', class: {
459
+ return (h(Host, { key: '69cdc96b6983b9556b4a9133ef8a0d2fa1e9e18e', class: {
465
460
  [`tds-mode-variant-${this.modeVariant}`]: Boolean(this.modeVariant),
466
- } }, this.label && this.labelPosition === 'outside' && (h("div", { key: 'ac4f3c9ca2719acc72f06ae977bf032d05913c6d', id: labelId, class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: 'c9d4142f63e315c73daef5038f266a32b05559a1', class: {
461
+ } }, this.label && this.labelPosition === 'outside' && (h("div", { key: '1cc3f825bc81ca34af7bbe845bd900531f724172', id: labelId, class: `label-outside ${this.disabled ? 'disabled' : ''}` }, this.label)), h("div", { key: '213f3149de4b9bc4c147ab658d6d5199d3360181', class: {
467
462
  'dropdown-select': true,
468
463
  [this.size]: true,
469
464
  'disabled': this.disabled,
@@ -513,7 +508,7 @@ export class TdsDropdown {
513
508
  label-inside-as-placeholder
514
509
  ${this.size}
515
510
  ${this.selectedOptions.length ? 'selected' : ''}
516
- ` }, this.label)), h("div", { class: `placeholder ${this.size}` }, this.selectedOptions.length ? this.getValue() : this.placeholder), h("tds-icon", { "aria-label": "Open/Close dropdown", svgTitle: "Open/Close dropdown", class: `menu-icon ${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))))), h("div", { key: '6de931198040eec79815f83e2617d2646507b6a1', role: "listbox", "aria-label": this.tdsAriaLabel, inert: !this.open, "aria-orientation": "vertical", "aria-multiselectable": this.multiselect, ref: (element) => {
511
+ ` }, this.label)), h("div", { class: `placeholder ${this.size}` }, this.selectedOptions.length ? this.getValue() : this.placeholder), h("tds-icon", { "aria-label": "Open/Close dropdown", svgTitle: "Open/Close dropdown", class: `menu-icon ${this.open ? 'open' : 'closed'}`, name: "chevron_down", size: "16px" }))))), h("div", { key: 'af7815b0cb8b36e37278965094d5198a9ff5aba9', role: "listbox", "aria-label": this.tdsAriaLabel, inert: !this.open, "aria-orientation": "vertical", "aria-multiselectable": this.multiselect, ref: (element) => {
517
512
  this.dropdownList = element;
518
513
  }, class: {
519
514
  'dropdown-list': true,
@@ -524,11 +519,11 @@ export class TdsDropdown {
524
519
  'closed': !this.open,
525
520
  [`animation-enter-${this.animation}`]: this.animation !== 'none' && this.open,
526
521
  [`animation-exit-${this.animation}`]: this.animation !== 'none' && !this.open,
527
- } }, h("slot", { key: '61ab9737181371073b25b95c34dad3311c2995c0', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: 'aca39f881a57a6a23de03da78b5062e5dff55af7', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: '1e4221e58bc16608bfb0f780b7bc8040935eab37', id: helperId, class: {
522
+ } }, h("slot", { key: '736b82b5f716fa818c17ae161341bc6b131d9cf2', onSlotchange: () => this.handleSlotChange() }), this.filterResult === 0 && this.noResultText !== '' && (h("div", { key: 'f1c1471cbec4a6dd8830a8540f54e142c559d539', class: `no-result ${this.size}` }, this.noResultText))), this.helper && (h("div", { key: 'aa138a349c073158785ae1177c0879604f6b8d90', id: helperId, class: {
528
523
  helper: true,
529
524
  error: this.error,
530
525
  disabled: this.disabled,
531
- } }, this.error && h("tds-icon", { key: 'ec946e77add75e7eaf194e2b38e5dd1c548ab32f', name: "error", size: "16px" }), this.helper))));
526
+ } }, this.error && h("tds-icon", { key: '936a8bd7db8a0ed994d6827c26bbb6732420fea4', name: "error", size: "16px" }), this.helper))));
532
527
  }
533
528
  static get is() { return "tds-dropdown"; }
534
529
  static get encapsulation() { return "shadow"; }
@@ -1,6 +1,5 @@
1
1
  import { h, Host } from "@stencil/core";
2
2
  import generateUniqueId from "../../../utils/generateUniqueId";
3
- import hasSlot from "../../../utils/hasSlot";
4
3
  /**
5
4
  * @slot <default> - <b>Unnamed slot.</b> For injecting a dropdown list.
6
5
  * @slot icon - Slot for an Icon in the dropdown button.
@@ -47,20 +46,14 @@ export class TdsHeaderDropdown {
47
46
  });
48
47
  }
49
48
  }
50
- connectedCallback() {
51
- const hasLabelSlot = hasSlot('label', this.host);
52
- if (!this.tdsAriaLabel && !hasLabelSlot) {
53
- console.warn('Tegel Header Dropdown component: use label slot or specify tdsAriaLabel prop');
54
- }
55
- }
56
49
  render() {
57
- return (h(Host, { key: '6ab1d0f1d475d6d0a486e1909cad300d89eb39a0' }, h("div", { key: 'bfe11cdc8c2bf592cec7f3cf8888555071781afe', class: {
50
+ return (h(Host, { key: 'd3f0a943b953783f2fc1c6345563a5adf0ded1dd' }, h("div", { key: 'c7028ceb31b9409d76d3663cd92a1fb3fa68fd7e', class: {
58
51
  'state-open': this.open,
59
- } }, h("tds-header-item", { key: '27b6d2680858443a26d7108b5318386df76db788', class: "button", active: this.open, selected: this.selected }, h("button", { key: '09d0ccb3bc5a31a897af65f5fcf4d47ee8b35192', ref: (el) => {
52
+ } }, h("tds-header-item", { key: 'f1d5fe99ee0b62316dd0b48c9b5bb04439fb9b12', class: "button", active: this.open, selected: this.selected }, h("button", { key: '0e1437b558782c96e984287bfc0b9f301090bdb0', ref: (el) => {
60
53
  this.buttonEl = el;
61
54
  }, "aria-expanded": `${this.open}`, "aria-controls": `launcher-${this.uuid}`, "aria-current": this.selected ? 'location' : 'false', onClick: () => {
62
55
  this.toggleDropdown();
63
- }, "aria-label": this.tdsAriaLabel }, h("slot", { key: '50c872c297116ece9dd5da41398aac3bd88cd529', name: "icon" }), this.label, h("slot", { key: '141a43cdc4c8aeade4d547bbb91a28f62542bb98', name: "label" }), !this.noDropdownIcon && (h("tds-icon", { key: '13f2f8d6b264f09dea45e9b7809adab1b83db683', class: "dropdown-icon", name: "chevron_down", size: "16px", svgTitle: "Dropdown icon" })))), this.buttonEl && (h("tds-popover-canvas", { key: '10b18c15ae1d2c0fbafaa82bed4ae7759c857c54', id: `tds-dropdown-${this.uuid}`, class: "menu", referenceEl: this.buttonEl, placement: "bottom-start", show: this.open, offsetDistance: 0, modifiers: [
56
+ }, "aria-label": this.tdsAriaLabel }, h("slot", { key: 'fc63cfe2414eb2c60fe85e481a3af49af3ce9653', name: "icon" }), this.label, h("slot", { key: 'f302406472c7be0223fa17b76cc2674cb3e148b7', name: "label" }), !this.noDropdownIcon && (h("tds-icon", { key: '32c53b88ffeed4a78f9efc77b5976afe190c86c6', class: "dropdown-icon", name: "chevron_down", size: "16px", svgTitle: "Dropdown icon" })))), this.buttonEl && (h("tds-popover-canvas", { key: '86ed4a3140d80521792b2953bc4acdef9476c3f6', id: `tds-dropdown-${this.uuid}`, class: "menu", referenceEl: this.buttonEl, placement: "bottom-start", show: this.open, offsetDistance: 0, modifiers: [
64
57
  {
65
58
  name: 'flip',
66
59
  options: {
@@ -4,14 +4,9 @@ export class TdsHeaderHamburger {
4
4
  constructor() {
5
5
  this.tdsAriaLabel = undefined;
6
6
  }
7
- connectedCallback() {
8
- if (!this.tdsAriaLabel) {
9
- console.warn('Tegel Header Hamburger component: missing tdsAriaLabel prop');
10
- }
11
- }
12
7
  render() {
13
8
  const inheritedButtonProps = Object.assign({}, inheritAriaAttributes(this.host));
14
- return (h(Host, { key: '5ea87f94483c167f580c26c7914a22cb6caea885' }, h("tds-header-item", { key: 'f2792ffbd859c263165b95b7d2cd9d1c76509c8f' }, h("button", Object.assign({ key: 'd1c44fcf5b7bb9c3cefbbbf09e3217704770f761' }, inheritedButtonProps, { "aria-label": this.tdsAriaLabel }), h("tds-icon", { key: '62ec94113557c7032a3145ad4b6ac22d39d6453c', class: "icon", name: "burger", size: "20px" })))));
9
+ return (h(Host, { key: 'e89db0f35bac2766a531be705b37c1d02e315431' }, h("tds-header-item", { key: '2aba0027ff9ce0516722d9785df5f61cd69aa02e' }, h("button", Object.assign({ key: 'f3b03d5b8a13285972edc9c645effc91c3ec92ad' }, inheritedButtonProps, { "aria-label": this.tdsAriaLabel }), h("tds-icon", { key: '6177dfc5ec0fed7902ecea6bab75b6031099c9c3', class: "icon", name: "burger", size: "20px" })))));
15
10
  }
16
11
  static get is() { return "tds-header-hamburger"; }
17
12
  static get encapsulation() { return "shadow"; }
@@ -41,11 +41,6 @@ export class TdsHeaderLauncher {
41
41
  });
42
42
  }
43
43
  }
44
- connectedCallback() {
45
- if (!this.tdsAriaLabel) {
46
- console.warn('Tegel Header Launcher component: missing tdsAriaLabel prop');
47
- }
48
- }
49
44
  render() {
50
45
  this.ariaAttributes = Object.assign(Object.assign({}, this.ariaAttributes), inheritAriaAttributes(this.host, ['role']));
51
46
  const buttonAttributes = Object.assign(Object.assign({}, this.ariaAttributes), { 'aria-expanded': `${this.open}`, 'aria-controls': `launcher-${this.uuid}`, 'class': 'button', 'active': this.open, 'onClick': () => {
@@ -53,11 +48,11 @@ export class TdsHeaderLauncher {
53
48
  }, 'ref': (el) => {
54
49
  this.buttonEl = el;
55
50
  } });
56
- return (h(Host, { key: 'a1c8cce3e26d57b654700893add3e5e1554e23d0' }, h("div", { key: 'bfc4e2f77d142f4913a4509b0c16b7503c942bf3', class: {
51
+ return (h(Host, { key: 'b62aac321e36b12d139d51c3421a1a9540079c22' }, h("div", { key: '4bb1d8e74ec245d9899870fccd990935488dcf7b', class: {
57
52
  'wrapper': true,
58
53
  'state-open': this.open,
59
54
  'state-list-type-menu': this.hasListTypeMenu,
60
- } }, h("tds-header-launcher-button", Object.assign({ key: 'c30e8b26d73a8d3a5aa5bf476226419b70c26061' }, buttonAttributes, { "tds-aria-label": this.tdsAriaLabel })), this.buttonEl && (h("tds-popover-canvas", { key: '10e13ac7fb52c3123dd51d1f91754262feb56134', id: `tds-launcher-${this.uuid}`, class: "menu", referenceEl: this.buttonEl, placement: "bottom-start", show: this.open, offsetDistance: 0, modifiers: [
55
+ } }, h("tds-header-launcher-button", Object.assign({ key: 'c3b90d64efd2878ffc2b0332538c2877f2b48fec' }, buttonAttributes, { "tds-aria-label": this.tdsAriaLabel })), this.buttonEl && (h("tds-popover-canvas", { key: 'dd41f1e0573ceed07f519813bec503001d02377b', id: `tds-launcher-${this.uuid}`, class: "menu", referenceEl: this.buttonEl, placement: "bottom-start", show: this.open, offsetDistance: 0, modifiers: [
61
56
  {
62
57
  name: 'flip',
63
58
  options: {
@@ -15,6 +15,7 @@ export class TdsPopoverMenu {
15
15
  this.offsetSkidding = 0;
16
16
  this.offsetDistance = 8;
17
17
  this.fluidWidth = false;
18
+ this.modeVariant = null;
18
19
  this.childRef = undefined;
19
20
  }
20
21
  /** Property for closing popover programmatically */
@@ -27,13 +28,15 @@ export class TdsPopoverMenu {
27
28
  }
28
29
  render() {
29
30
  var _a;
30
- return (h(Host, { key: '4f285ba1fb6b12ad66c09bbf3d109aa4cdff82cf' }, h("tds-popover-core", { key: 'bd1fb62cbeb25ec8a0a5bfa580cef36c950e0fa3', class: {
31
+ return (h(Host, { key: '78e4ee3b0d6eb7c41f724582278b3de4b2227502', class: {
32
+ [`tds-mode-variant-${this.modeVariant}`]: Boolean(this.modeVariant),
33
+ } }, h("tds-popover-core", { key: 'f16d1d2d97dfa081fbbc13f1da6eb01f15d3e1e8', class: {
31
34
  'tds-popover-menu': true,
32
35
  [(_a = this.inheritedAttributes.class) !== null && _a !== void 0 ? _a : '']: true,
33
36
  'fluid-width': this.fluidWidth,
34
37
  }, selector: this.selector, referenceEl: this.referenceEl, show: this.show, placement: this.placement, offsetSkidding: this.offsetSkidding, offsetDistance: this.offsetDistance, ref: (el) => {
35
38
  this.childRef = el;
36
- }, defaultShow: this.defaultShow, animation: this.animation }, h("div", { key: 'c79034c0d9f06bc429d30c51e6c5b70edd404052', role: "menu" }, h("slot", { key: '7e10d182c7529d716734317a5cca5087f30c1a9b' })))));
39
+ }, defaultShow: this.defaultShow, animation: this.animation }, h("div", { key: '2c413ca26bb977c971e3206ce7ac79da5107d35e', role: "menu" }, h("slot", { key: 'f9a0da937b2c038ec83e3a8e803fb858a42ab94b' })))));
37
40
  }
38
41
  static get is() { return "tds-popover-menu"; }
39
42
  static get encapsulation() { return "scoped"; }
@@ -217,6 +220,24 @@ export class TdsPopoverMenu {
217
220
  "attribute": "fluid-width",
218
221
  "reflect": false,
219
222
  "defaultValue": "false"
223
+ },
224
+ "modeVariant": {
225
+ "type": "string",
226
+ "mutable": false,
227
+ "complexType": {
228
+ "original": "'primary' | 'secondary'",
229
+ "resolved": "\"primary\" | \"secondary\"",
230
+ "references": {}
231
+ },
232
+ "required": false,
233
+ "optional": false,
234
+ "docs": {
235
+ "tags": [],
236
+ "text": "Mode variant of the component, based on current mode."
237
+ },
238
+ "attribute": "mode-variant",
239
+ "reflect": false,
240
+ "defaultValue": "null"
220
241
  }
221
242
  };
222
243
  }
@@ -15,6 +15,10 @@
15
15
  padding: 0;
16
16
  }
17
17
 
18
+ :host(.tds-table__row:hover) {
19
+ border-bottom: 1px solid var(--tds-table-divider-hover);
20
+ }
21
+
18
22
  :host(.tds-table__row:hover) {
19
23
  background-color: var(--tds-table-body-row-background-hover);
20
24
  }
@@ -0,0 +1,50 @@
1
+ :host {
2
+ box-sizing: border-box;
3
+ display: inline-flex;
4
+ align-items: center;
5
+ border-radius: 4px;
6
+ background-color: var(--tds-tag-neutral-background);
7
+ color: var(--tds-tag-neutral-color);
8
+ gap: 4px;
9
+ }
10
+ :host * {
11
+ box-sizing: border-box;
12
+ }
13
+ :host.lg {
14
+ padding: 4px;
15
+ }
16
+ :host.sm {
17
+ border-radius: 2px;
18
+ padding: 2px 4px;
19
+ font: var(--tds-detail-05);
20
+ }
21
+ :host.success {
22
+ background-color: var(--tds-tag-success-background);
23
+ color: var(--tds-tag-success-color);
24
+ }
25
+ :host.warning {
26
+ background-color: var(--tds-tag-warning-background);
27
+ color: var(--tds-tag-warning-color);
28
+ }
29
+ :host.new {
30
+ background-color: var(--tds-tag-new-background);
31
+ color: var(--tds-tag-new-color);
32
+ }
33
+ :host.neutral {
34
+ background-color: var(--tds-tag-neutral-background);
35
+ color: var(--tds-tag-neutral-color);
36
+ }
37
+ :host.information {
38
+ background-color: var(--tds-tag-information-background);
39
+ color: var(--tds-tag-information-color);
40
+ }
41
+ :host.error {
42
+ background-color: var(--tds-tag-error-background);
43
+ color: var(--tds-tag-error-color);
44
+ }
45
+
46
+ .tds-tag__content {
47
+ display: flex;
48
+ align-items: center;
49
+ gap: inherit;
50
+ }
@@ -0,0 +1,90 @@
1
+ import { h, Host } from "@stencil/core";
2
+ import hasSlot from "../../utils/hasSlot";
3
+ /**
4
+ * @slot prefix - Slot used to display an icon or other content before the tag text.
5
+ */
6
+ export class TdsTag {
7
+ constructor() {
8
+ this.text = undefined;
9
+ this.size = 'lg';
10
+ this.variant = 'Neutral';
11
+ }
12
+ render() {
13
+ const hasPrefixSlot = hasSlot('prefix', this.host);
14
+ const getTagClasses = () => ({
15
+ [`${this.size.toLowerCase()}`]: true,
16
+ [`${this.variant.toLowerCase()}`]: true,
17
+ });
18
+ return (h(Host, { key: '4c7a4553eff385357169275ea607a9a0bcf1a729', class: getTagClasses() }, h("div", { key: 'f1a2c24dcbeef887a3086782573d506b7f31c395', class: "tds-tag__content" }, hasPrefixSlot && h("slot", { key: 'e6e8eb20448f6ebb19c9ee8d6123134c0622feca', name: "prefix" }), h("span", { key: '74cead2674da0305a7366a38fe60a542218867ed' }, this.text))));
19
+ }
20
+ static get is() { return "tds-tag"; }
21
+ static get encapsulation() { return "scoped"; }
22
+ static get originalStyleUrls() {
23
+ return {
24
+ "$": ["tag.scss"]
25
+ };
26
+ }
27
+ static get styleUrls() {
28
+ return {
29
+ "$": ["tag.css"]
30
+ };
31
+ }
32
+ static get properties() {
33
+ return {
34
+ "text": {
35
+ "type": "string",
36
+ "mutable": false,
37
+ "complexType": {
38
+ "original": "string",
39
+ "resolved": "string",
40
+ "references": {}
41
+ },
42
+ "required": true,
43
+ "optional": false,
44
+ "docs": {
45
+ "tags": [],
46
+ "text": "The title text to display in the tag"
47
+ },
48
+ "attribute": "text",
49
+ "reflect": false
50
+ },
51
+ "size": {
52
+ "type": "string",
53
+ "mutable": false,
54
+ "complexType": {
55
+ "original": "'lg' | 'sm'",
56
+ "resolved": "\"lg\" | \"sm\"",
57
+ "references": {}
58
+ },
59
+ "required": false,
60
+ "optional": false,
61
+ "docs": {
62
+ "tags": [],
63
+ "text": "Sets the size of the tag"
64
+ },
65
+ "attribute": "size",
66
+ "reflect": false,
67
+ "defaultValue": "'lg'"
68
+ },
69
+ "variant": {
70
+ "type": "string",
71
+ "mutable": false,
72
+ "complexType": {
73
+ "original": "'Success' | 'Warning' | 'New' | 'Neutral' | 'Information' | 'Error'",
74
+ "resolved": "\"Error\" | \"Information\" | \"Neutral\" | \"New\" | \"Success\" | \"Warning\"",
75
+ "references": {}
76
+ },
77
+ "required": false,
78
+ "optional": false,
79
+ "docs": {
80
+ "tags": [],
81
+ "text": "Sets the variant mode of the tag"
82
+ },
83
+ "attribute": "variant",
84
+ "reflect": false,
85
+ "defaultValue": "'Neutral'"
86
+ }
87
+ };
88
+ }
89
+ static get elementRef() { return "host"; }
90
+ }
@@ -99,6 +99,7 @@
99
99
  box-sizing: border-box;
100
100
  background-color: var(--tds-text-field-background);
101
101
  border-bottom: 1px solid var(--tds-text-field-border-bottom);
102
+ border-top: 1px solid transparent;
102
103
  transition: border-bottom-color 200ms ease;
103
104
  }
104
105
  .text-field-container:hover {
@@ -110,6 +111,10 @@
110
111
  .form-text-field-sm .text-field-container {
111
112
  height: 40px;
112
113
  }
114
+ .text-field-container:focus-within {
115
+ border: 2px solid var(--tds-focus-outline-color);
116
+ margin: 0 -2px;
117
+ }
113
118
 
114
119
  .text-field-input-container {
115
120
  position: relative;
@@ -216,35 +221,6 @@
216
221
  top: 12px;
217
222
  }
218
223
 
219
- .text-field-bar {
220
- position: absolute;
221
- width: 100%;
222
- }
223
- .text-field-bar::before, .text-field-bar::after {
224
- content: "";
225
- height: 2px;
226
- top: 54px;
227
- width: 0;
228
- position: absolute;
229
- background: var(--tds-text-field-bar);
230
- transition: 0.35s ease all;
231
- }
232
- .form-text-field-md .text-field-bar::before, .form-text-field-md .text-field-bar::after {
233
- top: 46px;
234
- }
235
- .form-text-field-sm .text-field-bar::before, .form-text-field-sm .text-field-bar::after {
236
- top: 40px;
237
- }
238
- .text-field-bar::before {
239
- left: 50%;
240
- }
241
- .text-field-bar::after {
242
- right: 50%;
243
- }
244
- .text-field-focus .text-field-bar::before, .text-field-focus .text-field-bar::after {
245
- width: 50%;
246
- }
247
-
248
224
  .text-field-helper {
249
225
  font: var(--tds-detail-05);
250
226
  letter-spacing: var(--tds-detail-05-ls);
@@ -318,9 +294,6 @@
318
294
  .form-text-field-error:not(.form-text-field-readonly) .text-field-container {
319
295
  border-bottom-color: var(--tds-text-field-border-bottom-error);
320
296
  }
321
- .form-text-field-error:not(.form-text-field-readonly) .text-field-bar::before, .form-text-field-error:not(.form-text-field-readonly) .text-field-bar::after {
322
- background: var(--tds-text-field-bar-error);
323
- }
324
297
 
325
298
  .text-field-helper-error-state {
326
299
  display: flex;
@@ -67,16 +67,11 @@ export class TdsTextField {
67
67
  this.textInput.focus();
68
68
  }
69
69
  }
70
- connectedCallback() {
71
- if (!this.tdsAriaLabel) {
72
- console.warn('Tegel Text Field component: prop tdsAriaLabel is missing');
73
- }
74
- }
75
70
  render() {
76
71
  var _a;
77
72
  const usesPrefixSlot = hasSlot('prefix', this.host);
78
73
  const usesSuffixSlot = hasSlot('suffix', this.host);
79
- return (h("div", { key: '985928ef59662762648f2d95d5decad2e3188e05', class: {
74
+ return (h("div", { key: 'b9fa2b03ce2a0b196dc6083614420d6f83675e3d', class: {
80
75
  'form-text-field': true,
81
76
  'form-text-field-nomin': this.noMinWidth,
82
77
  'text-field-focus': this.focusInput && !this.disabled,
@@ -94,12 +89,12 @@ export class TdsTextField {
94
89
  'form-text-field-sm': this.size === 'sm',
95
90
  'form-text-field-error': this.state === 'error',
96
91
  'form-text-field-success': this.state === 'success',
97
- } }, this.labelPosition === 'outside' && (h("div", { key: '7a409b43a1fee8b7b078abc5f96c925ab97bcedc', class: "text-field-label-outside" }, h("label", { key: 'c6bdaab4e6f81a95aa71a4e23a1f02fb1bcef9ec', htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), h("div", { key: '945f7901a92850da22ab84c5fe77e2d97738aaa9', onClick: () => this.textInput.focus(), class: "text-field-container" }, usesPrefixSlot && (h("div", { key: '5d6cb2facb8ff90b7393409b769c2b5e5a860421', class: {
92
+ } }, this.labelPosition === 'outside' && (h("div", { key: '7110b867aba9a9ba62b796f67caeccf22a4a8060', class: "text-field-label-outside" }, h("label", { key: '6b0b6c7d17bb236f1203dfaf793ba0a3bc2d8efb', htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), h("div", { key: '5603d3e78b290a78d7c482a0dac7e1f0efb9af7f', onClick: () => this.textInput.focus(), class: "text-field-container" }, usesPrefixSlot && (h("div", { key: '9accb59dffa061d7947d4392310cb1717a395363', class: {
98
93
  'text-field-slot-wrap-prefix': true,
99
94
  'text-field-error': this.state === 'error',
100
95
  'text-field-success': this.state === 'success',
101
96
  'text-field-default': this.state === 'default',
102
- } }, h("slot", { key: 'b0f0e3ebb96dbd2af021150b68690af566db44b9', name: "prefix" }))), h("div", { key: 'c5b172ee6c561256ab930490113f406b88eae67c', class: "text-field-input-container" }, h("input", { key: '2e0a9070b41bde39a2a0f14b132f474692eb0e04', ref: (inputEl) => {
97
+ } }, h("slot", { key: '739e089cdb9798dc108b68c4858c90bf75e18958', name: "prefix" }))), h("div", { key: 'e4229be4e4bf421319184e798b98afcbaa361413', class: "text-field-input-container" }, h("input", { key: 'f462b4c0d49e4e070090f6a14df52af66b87648d', ref: (inputEl) => {
103
98
  this.textInput = inputEl;
104
99
  }, class: {
105
100
  'text-field-input': true,
@@ -114,13 +109,13 @@ export class TdsTextField {
114
109
  if (!this.readOnly) {
115
110
  this.handleBlur(event);
116
111
  }
117
- }, "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label, "aria-describedby": `text-field-helper-element-${this.uuid}`, "aria-readonly": this.readOnly, id: `text-field-input-element-${this.uuid}` }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { key: 'ffb3bbb84ab718c2259134f32ee6dd0eb348cb9f', class: "text-field-label-inside", htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), h("div", { key: '166da0147311d28064b7e03bbefd1a0ee18db5ca', class: "text-field-bar" }), usesSuffixSlot && (h("div", { key: '4bb21d12957bf65d525931c88a5a89fff49d4eaf', class: {
112
+ }, "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label, "aria-describedby": `text-field-helper-element-${this.uuid}`, "aria-readonly": this.readOnly, id: `text-field-input-element-${this.uuid}` }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { key: 'ac16cff7856d65503fa30f7eb23d2936377e72d4', class: "text-field-label-inside", htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), usesSuffixSlot && (h("div", { key: 'b70453ec36ca62f584b26b0e6dc4b3f0cde2ff54', class: {
118
113
  'text-field-slot-wrap-suffix': true,
119
114
  'text-field-error': this.state === 'error',
120
115
  'text-field-success': this.state === 'success',
121
116
  'text-field-default': this.state === 'default',
122
117
  'tds-u-display-none': this.readOnly,
123
- } }, h("slot", { key: '7e67dbc8f4f67cb0c7d194e01e5787ae18ffab13', name: "suffix" }))), this.readOnly && !this.hideReadOnlyIcon && (h("span", { key: 'd213ec000d837cbd4b711468ef3cfa826cc65ac2', class: "text-field-icon__readonly" }, h("tds-tooltip", { key: 'b89530a2422cdf782e92a124e7c353b4432b9719', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: 'fa2a35bc8514d802152a147d9c17c9a8dbe952c8', id: "readonly-tooltip", name: "edit_inactive", size: "20px" })))), h("div", { key: '902924863a2e58f820647b89f289c4e649dd63a5', "aria-live": "assertive" }, (this.helper || this.maxLength > 0) && (h("div", { key: '6bc81db447e040154a7d35acddbe732d8fbc5134', class: "text-field-helper", id: `text-field-helper-element-${this.uuid}` }, this.state === 'error' && (h("div", { key: '990205934bb31c179478c68cca7a991056678838', class: "text-field-helper-error-state" }, !this.readOnly && h("tds-icon", { key: 'cfc4b7b95164832fcfa4c744a640356187ac41c1', name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, !this.readOnly && this.maxLength > 0 && (h("span", { key: 'bbcaee6e47a36ccce4e05ba672d92211f2612fd1', class: {
118
+ } }, h("slot", { key: '7e50b20d90a68f9af583b8f2ade5c742e2d52351', name: "suffix" }))), this.readOnly && !this.hideReadOnlyIcon && (h("span", { key: '72e2cf4f2872d247ac6f28e935e8185aafef6dec', class: "text-field-icon__readonly" }, h("tds-tooltip", { key: '171bdde8535c6bbd08eec60d87d9aa5bae1f98bd', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: '05e7e8898ee3fcf81fb011aa2141092e8b749e37', id: "readonly-tooltip", name: "edit_inactive", size: "20px" })))), h("div", { key: '0c16d399b376d9aebed2aabf759cb7319c5745cf', "aria-live": "assertive" }, (this.helper || this.maxLength > 0) && (h("div", { key: '280eed9185c8cffa29e3cf62425f1f1f377f3abc', class: "text-field-helper", id: `text-field-helper-element-${this.uuid}` }, this.state === 'error' && (h("div", { key: 'ddf07e469173a574a848cd2ff816bcc535940340', class: "text-field-helper-error-state" }, !this.readOnly && h("tds-icon", { key: 'b5b06dba13fb8911828153341b631facfc016c88', name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, !this.readOnly && this.maxLength > 0 && (h("span", { key: 'a4c41817f19b32e575423d5bbe19c28a38031e6e', class: {
124
119
  'text-field-textcounter-divider': true,
125
120
  'text-field-textcounter-disabled': this.disabled,
126
121
  } }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, " / ", this.maxLength)))))));
@@ -58,14 +58,9 @@ export class TdsTextarea {
58
58
  }
59
59
  return modeVariant;
60
60
  }
61
- connectedCallback() {
62
- if (!this.tdsAriaLabel && !this.label) {
63
- console.warn('Tegel Textarea component: specify label or tdsAriaLabel prop for accessibility');
64
- }
65
- }
66
61
  render() {
67
62
  var _a;
68
- return (h("div", { key: '06fd8ce87614410858a7d9253fac73a6f1cf20ec', class: {
63
+ return (h("div", { key: '873fc5866c777549e56d115e7bce64a62fdd5c0c', class: {
69
64
  'textarea-container': true,
70
65
  'textarea-label-inside': this.labelPosition === 'inside',
71
66
  'textarea-focus': this.focusInput,
@@ -75,7 +70,7 @@ export class TdsTextarea {
75
70
  'textarea-data': this.value !== '',
76
71
  [`textarea-${this.state}`]: this.state === 'error' || this.state === 'success',
77
72
  'no-min-width': this.noMinWidth,
78
- } }, this.labelPosition !== 'no-label' && (h("label", { key: '1a02a333e4164b39fd223c68cc3d27d7c53487fb', htmlFor: `textarea-element-${this.uuid}`, class: 'textarea-label' }, this.label)), h("div", { key: '6d45e8c8427770accc82c7ad9e10fbed016437a4', class: "textarea-wrapper" }, h("textarea", { key: '614c30a5b5077060b1568744cf0800580e746819', id: `textarea-element-${this.uuid}`, class: 'textarea-input', ref: (inputEl) => {
73
+ } }, this.labelPosition !== 'no-label' && (h("label", { key: '09f5df4efb39b7e3eb71d8567adc5cffd374ad66', htmlFor: `textarea-element-${this.uuid}`, class: 'textarea-label' }, this.label)), h("div", { key: '57bd6d6e2e7a1919d668625a675e4a20421af965', class: "textarea-wrapper" }, h("textarea", { key: '69955de378170f86c7a942d5f8101aa2ff9440f4', id: `textarea-element-${this.uuid}`, class: 'textarea-input', ref: (inputEl) => {
79
74
  this.textEl = inputEl;
80
75
  }, disabled: this.disabled, readonly: !this.disabled && this.readOnly, placeholder: this.placeholder, value: this.value, name: this.name, autofocus: this.autofocus, maxlength: this.maxLength, cols: this.cols, rows: this.rows, onFocus: (event) => {
81
76
  if (!this.readOnly) {
@@ -85,7 +80,7 @@ export class TdsTextarea {
85
80
  if (!this.readOnly) {
86
81
  this.handleBlur(event);
87
82
  }
88
- }, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), "aria-invalid": this.state === 'error' ? 'true' : 'false', "aria-readonly": this.readOnly ? 'true' : 'false', "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label, "aria-describedby": `textarea-helper-element-${this.uuid}` }), h("span", { key: 'e0574ae32d1ce9c69156dc2aa52d8d1881b6ff9b', class: "textarea-resizer-icon" }, h("svg", { key: '23e79729cc099b7e4f07192c05aa4a304b91788a', width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '54891720aa51af768f467be5bd8a72fc7adc8d47', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.8536 0.853553C12.0488 0.658291 12.0488 0.341709 11.8536 0.146447C11.6583 -0.0488155 11.3417 -0.0488155 11.1464 0.146447L0.146447 11.1464C-0.0488155 11.3417 -0.0488155 11.6583 0.146447 11.8536C0.341709 12.0488 0.658291 12.0488 0.853553 11.8536L11.8536 0.853553ZM11.8536 4.64645C12.0488 4.84171 12.0488 5.15829 11.8536 5.35355L5.35355 11.8536C5.15829 12.0488 4.84171 12.0488 4.64645 11.8536C4.45118 11.6583 4.45118 11.3417 4.64645 11.1464L11.1464 4.64645C11.3417 4.45118 11.6583 4.45118 11.8536 4.64645ZM11.8536 8.64645C12.0488 8.84171 12.0488 9.15829 11.8536 9.35355L9.35355 11.8536C9.15829 12.0488 8.84171 12.0488 8.64645 11.8536C8.45118 11.6583 8.45118 11.3417 8.64645 11.1464L11.1464 8.64645C11.3417 8.45118 11.6583 8.45118 11.8536 8.64645Z", fill: "currentColor" }))), !this.disabled && !this.hideReadOnlyIcon && this.readOnly && (h("span", { key: '72e3586f1be99460ced66d640392b4596e5b8c2f', class: "textarea-icon__readonly" }, h("tds-tooltip", { key: '9f84391a75b5ae428c71d3b713a9d281c4475a09', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: '55e195bb50d8b707ec3a403c8c62cad74d738919', id: "readonly-tooltip", name: "edit_inactive", svgTitle: "inactive" })))), h("span", { key: 'ff2043a19ebb129178ecfd36126b0d23eacde4d1', class: 'textarea-helper', "aria-live": "assertive", id: `textarea-helper-element-${this.uuid}` }, this.state === 'error' && this.helper && !this.readOnly && (h("tds-icon", { key: '84b0991ef5ddab7f960ba75db22c65762b0b5d20', name: "error", size: "16px" })), this.helper), this.maxLength > 0 && (h("div", { key: '963b3a3bdafeabec6ad2bd3663c07ed0d4a5b3fd', class: 'textarea-textcounter' }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: '8496a0ae44721cdcd9443e09ff6a709b6d3c704f', class: "textfield-textcounter-divider" }, " / "), " ", this.maxLength))));
83
+ }, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), "aria-invalid": this.state === 'error' ? 'true' : 'false', "aria-readonly": this.readOnly ? 'true' : 'false', "aria-label": this.tdsAriaLabel ? this.tdsAriaLabel : this.label, "aria-describedby": `textarea-helper-element-${this.uuid}` }), h("span", { key: '0fded8e72f3f6d8e6f53cb57df94f480df17ce53', class: "textarea-resizer-icon" }, h("svg", { key: '6b41ae06bbedfa5ba88991bc6856f80ca8a4b6f8', width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: 'c4f731e7483bade2d0dbd545302afc278039a122', "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M11.8536 0.853553C12.0488 0.658291 12.0488 0.341709 11.8536 0.146447C11.6583 -0.0488155 11.3417 -0.0488155 11.1464 0.146447L0.146447 11.1464C-0.0488155 11.3417 -0.0488155 11.6583 0.146447 11.8536C0.341709 12.0488 0.658291 12.0488 0.853553 11.8536L11.8536 0.853553ZM11.8536 4.64645C12.0488 4.84171 12.0488 5.15829 11.8536 5.35355L5.35355 11.8536C5.15829 12.0488 4.84171 12.0488 4.64645 11.8536C4.45118 11.6583 4.45118 11.3417 4.64645 11.1464L11.1464 4.64645C11.3417 4.45118 11.6583 4.45118 11.8536 4.64645ZM11.8536 8.64645C12.0488 8.84171 12.0488 9.15829 11.8536 9.35355L9.35355 11.8536C9.15829 12.0488 8.84171 12.0488 8.64645 11.8536C8.45118 11.6583 8.45118 11.3417 8.64645 11.1464L11.1464 8.64645C11.3417 8.45118 11.6583 8.45118 11.8536 8.64645Z", fill: "currentColor" }))), !this.disabled && !this.hideReadOnlyIcon && this.readOnly && (h("span", { key: '94bc8eed69418751ad240087201827a0ef0185b4', class: "textarea-icon__readonly" }, h("tds-tooltip", { key: '231983d3994030724a06358f37dd0e53f91d78d4', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: '9e7f16d10939227a5c8c87f00ddd653a58c094ad', id: "readonly-tooltip", name: "edit_inactive", svgTitle: "inactive" })))), h("span", { key: '67222f0c93979caf49881c591cd99eb4c97ebdc1', class: 'textarea-helper', "aria-live": "assertive", id: `textarea-helper-element-${this.uuid}` }, this.state === 'error' && this.helper && !this.readOnly && (h("tds-icon", { key: 'cbde13084b090f7eea4bd80da47373ec941e1981', name: "error", size: "16px" })), this.helper), this.maxLength > 0 && (h("div", { key: '5895277b2e07f4c8f2990f624eb0797dffd0b1f0', class: 'textarea-textcounter' }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: '97afedbb5aaf02461a38f39643298b6c2650c52f', class: "textfield-textcounter-divider" }, " / "), " ", this.maxLength))));
89
84
  }
90
85
  static get is() { return "tds-textarea"; }
91
86
  static get encapsulation() { return "scoped"; }