@scania/tegel 1.32.0-debugging-link-potential-breaking-change-beta.0 → 1.32.0-fix-modal-input-fields-background-color-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. package/dist/cjs/loader.cjs.js +1 -1
  2. package/dist/cjs/modeVariantOverride-082658a4.js +34 -0
  3. package/dist/cjs/tds-block.cjs.entry.js +29 -1
  4. package/dist/cjs/tds-checkbox.cjs.entry.js +2 -8
  5. package/dist/cjs/tds-datetime.cjs.entry.js +3 -10
  6. package/dist/cjs/tds-dropdown_2.cjs.entry.js +9 -30
  7. package/dist/cjs/tds-link.cjs.entry.js +2 -3
  8. package/dist/cjs/tds-radio-button.cjs.entry.js +1 -7
  9. package/dist/cjs/tds-text-field.cjs.entry.js +34 -11
  10. package/dist/cjs/tds-textarea.cjs.entry.js +41 -19
  11. package/dist/cjs/tds-toggle.cjs.entry.js +2 -8
  12. package/dist/cjs/tegel.cjs.js +1 -1
  13. package/dist/collection/components/block/block.js +34 -1
  14. package/dist/collection/components/checkbox/checkbox.js +2 -25
  15. package/dist/collection/components/datetime/datetime.js +3 -27
  16. package/dist/collection/components/dropdown/dropdown.js +9 -30
  17. package/dist/collection/components/link/link.js +2 -3
  18. package/dist/collection/components/radio-button/radio-button.js +1 -28
  19. package/dist/collection/components/text-field/text-field.js +36 -12
  20. package/dist/collection/components/textarea/textarea.js +43 -41
  21. package/dist/collection/components/toggle/toggle.js +2 -25
  22. package/dist/collection/utils/modeVariantOverride.js +30 -0
  23. package/dist/components/{p-728ada7e.js → p-1ef7423a.js} +3 -10
  24. package/dist/components/p-76cfa91a.js +32 -0
  25. package/dist/components/{p-7ad1bc2c.js → p-7ee8b262.js} +1 -1
  26. package/dist/components/{p-0f58e26f.js → p-adbf32b9.js} +9 -30
  27. package/dist/components/tds-block.js +31 -2
  28. package/dist/components/tds-checkbox.js +1 -1
  29. package/dist/components/tds-datetime.js +4 -12
  30. package/dist/components/tds-dropdown-option.js +1 -1
  31. package/dist/components/tds-dropdown.js +1 -1
  32. package/dist/components/tds-link.js +2 -3
  33. package/dist/components/tds-radio-button.js +2 -9
  34. package/dist/components/tds-table-body-row.js +1 -1
  35. package/dist/components/tds-table-footer.js +3 -3
  36. package/dist/components/tds-table-header.js +1 -1
  37. package/dist/components/tds-text-field.js +35 -11
  38. package/dist/components/tds-textarea.js +42 -20
  39. package/dist/components/tds-toggle.js +3 -10
  40. package/dist/esm/loader.js +1 -1
  41. package/dist/esm/modeVariantOverride-da8cbcb3.js +32 -0
  42. package/dist/esm/tds-block.entry.js +29 -1
  43. package/dist/esm/tds-checkbox.entry.js +2 -8
  44. package/dist/esm/tds-datetime.entry.js +3 -10
  45. package/dist/esm/tds-dropdown_2.entry.js +9 -30
  46. package/dist/esm/tds-link.entry.js +2 -3
  47. package/dist/esm/tds-radio-button.entry.js +1 -7
  48. package/dist/esm/tds-text-field.entry.js +34 -11
  49. package/dist/esm/tds-textarea.entry.js +42 -20
  50. package/dist/esm/tds-toggle.entry.js +2 -8
  51. package/dist/esm/tegel.js +1 -1
  52. package/dist/tegel/p-1fe7f572.entry.js +1 -0
  53. package/dist/tegel/p-212e1fff.entry.js +1 -0
  54. package/dist/tegel/p-4ca38ba7.entry.js +1 -0
  55. package/dist/tegel/p-503cea9d.entry.js +1 -0
  56. package/dist/tegel/p-5bb01a99.entry.js +1 -0
  57. package/dist/tegel/p-76cfa91a.js +1 -0
  58. package/dist/tegel/p-ae0fed95.entry.js +1 -0
  59. package/dist/tegel/p-b994e7ac.entry.js +1 -0
  60. package/dist/tegel/p-d2951be7.entry.js +1 -0
  61. package/dist/tegel/p-d6d8cb7f.entry.js +1 -0
  62. package/dist/tegel/tegel.esm.js +1 -1
  63. package/dist/types/components/block/block.d.ts +7 -0
  64. package/dist/types/components/checkbox/checkbox.d.ts +0 -2
  65. package/dist/types/components/datetime/datetime.d.ts +0 -2
  66. package/dist/types/components/radio-button/radio-button.d.ts +0 -3
  67. package/dist/types/components/text-field/text-field.d.ts +8 -0
  68. package/dist/types/components/textarea/textarea.d.ts +8 -3
  69. package/dist/types/components/toggle/toggle.d.ts +0 -3
  70. package/dist/types/components.d.ts +0 -20
  71. package/dist/types/utils/modeVariantOverride.d.ts +2 -0
  72. package/package.json +1 -1
  73. package/dist/collection/utils/accessibility.js +0 -30
  74. package/dist/tegel/p-31c657c0.entry.js +0 -1
  75. package/dist/tegel/p-72006dd7.entry.js +0 -1
  76. package/dist/tegel/p-76faaf70.entry.js +0 -1
  77. package/dist/tegel/p-b58194f9.entry.js +0 -1
  78. package/dist/tegel/p-d9040b7f.entry.js +0 -1
  79. package/dist/tegel/p-e83b5572.entry.js +0 -1
  80. package/dist/tegel/p-eb532e35.entry.js +0 -1
  81. package/dist/tegel/p-f71c3fca.entry.js +0 -1
  82. package/dist/tegel/p-f72577c8.entry.js +0 -1
  83. package/dist/types/utils/accessibility.d.ts +0 -14
@@ -1,4 +1,5 @@
1
1
  import { p as proxyCustomElement, H, h } from './p-28ef5186.js';
2
+ import { g as getAdjustedModeVariant } from './p-76cfa91a.js';
2
3
 
3
4
  const blockCss = ".tds-block{box-sizing:border-box;color:var(--tds-block-color);background-color:var(--tds-block-background);border-radius:4px;padding:16px;font:var(--tds-body-01);letter-spacing:var(--tds-body-01-ls)}.tds-block *{box-sizing:border-box}.tds-mode-variant-primary{background-color:var(--tds-block-background-primary)}.tds-mode-variant-secondary{background-color:var(--tds-block-background-secondary)}.tds-block-even{background-color:var(--tds-block-background-even)}.tds-block-odd{background-color:var(--tds-block-background-odd)}";
4
5
  const TdsBlockStyle0 = blockCss;
@@ -8,8 +9,10 @@ const TdsBlock$1 = /*@__PURE__*/ proxyCustomElement(class TdsBlock extends H {
8
9
  super();
9
10
  this.__registerHost();
10
11
  this.__attachShadow();
12
+ this.insideModal = false;
11
13
  this.modeVariant = null;
12
14
  this.componentTag = 'div';
15
+ this.swapModeVariant = false;
13
16
  }
14
17
  getNestingLevel() {
15
18
  let level = 0;
@@ -22,6 +25,31 @@ const TdsBlock$1 = /*@__PURE__*/ proxyCustomElement(class TdsBlock extends H {
22
25
  }
23
26
  return level;
24
27
  }
28
+ checkIfDarkmode() {
29
+ const darkmode = document.body.classList.contains('tds-mode-dark');
30
+ this.swapModeVariant = this.insideModal && darkmode;
31
+ }
32
+ observeClassChanges() {
33
+ this.mutationObserver = new MutationObserver(() => {
34
+ this.checkIfDarkmode();
35
+ });
36
+ this.mutationObserver.observe(document.body, {
37
+ attributes: true,
38
+ attributeFilter: ['class'],
39
+ });
40
+ }
41
+ componentDidLoad() {
42
+ this.insideModal = !!this.host.closest('tds-modal');
43
+ if (this.insideModal) {
44
+ this.observeClassChanges();
45
+ this.checkIfDarkmode();
46
+ }
47
+ }
48
+ disconnectedCallback() {
49
+ if (this.mutationObserver) {
50
+ this.mutationObserver.disconnect();
51
+ }
52
+ }
25
53
  render() {
26
54
  const TagType = this.componentTag;
27
55
  const nestingLevel = this.getNestingLevel();
@@ -34,13 +62,14 @@ const TdsBlock$1 = /*@__PURE__*/ proxyCustomElement(class TdsBlock extends H {
34
62
  evenOddClass = 'tds-block-odd';
35
63
  }
36
64
  }
37
- return (h(TagType, { key: '34385f3ac01d173e6bb568432418304186d261c7', class: `tds-block ${evenOddClass} ${this.modeVariant !== null ? `tds-mode-variant-${this.modeVariant}` : ''}` }, h("slot", { key: '569b04916fb165fb460711ec659ed2dc3e9ebd12' })));
65
+ return (h(TagType, { key: '9db51cafa55a3d41c6df8ed3c6369fb9144b46de', class: `tds-block ${evenOddClass} ${getAdjustedModeVariant(this.modeVariant, this.swapModeVariant)}` }, h("slot", { key: 'b83a0d9e1723096a16e1cc6d3508a9e5e1dee772' })));
38
66
  }
39
67
  get host() { return this; }
40
68
  static get style() { return TdsBlockStyle0; }
41
69
  }, [1, "tds-block", {
42
70
  "modeVariant": [1, "mode-variant"],
43
- "componentTag": [1, "component-tag"]
71
+ "componentTag": [1, "component-tag"],
72
+ "swapModeVariant": [32]
44
73
  }]);
45
74
  function defineCustomElement$1() {
46
75
  if (typeof customElements === "undefined") {
@@ -1,4 +1,4 @@
1
- import { T as TdsCheckbox$1, d as defineCustomElement$1 } from './p-728ada7e.js';
1
+ import { T as TdsCheckbox$1, d as defineCustomElement$1 } from './p-1ef7423a.js';
2
2
 
3
3
  const TdsCheckbox = TdsCheckbox$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -67,13 +67,6 @@ const TdsDatetime$1 = /*@__PURE__*/ proxyCustomElement(class TdsDatetime extends
67
67
  async setValue(newValue) {
68
68
  this.value = newValue;
69
69
  }
70
- /** Method to programmatically focus the datetime element */
71
- async focusElement() {
72
- if (this.textInput) {
73
- this.textInput.focus();
74
- this.focusInput = true;
75
- }
76
- }
77
70
  componentWillLoad() {
78
71
  if (this.defaultValue !== 'none') {
79
72
  this.value = this.getDefaultValue();
@@ -139,7 +132,7 @@ const TdsDatetime$1 = /*@__PURE__*/ proxyCustomElement(class TdsDatetime extends
139
132
  'tds-datetime-container-label-inside': this.label && this.labelPosition === 'inside' && this.size !== 'sm',
140
133
  };
141
134
  const iphone = navigator.userAgent.toLowerCase().includes('iphone');
142
- return (h("div", { key: '28c414fb800bb7e1411feb93b03b4ec4732e60fb', class: classNames, onKeyDown: (e) => {
135
+ return (h("div", { key: '1a55db8de53a69917a0f498ce4e9877136b21766', class: classNames, onKeyDown: (e) => {
143
136
  if (e.key === 'Enter') {
144
137
  const browserIsChrome = navigator.userAgent.toLowerCase().includes('chrome');
145
138
  if (browserIsChrome) {
@@ -147,9 +140,9 @@ const TdsDatetime$1 = /*@__PURE__*/ proxyCustomElement(class TdsDatetime extends
147
140
  this.textInput.showPicker();
148
141
  }
149
142
  }
150
- } }, 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) => {
143
+ } }, this.labelPosition === 'outside' && this.label && (h("label", { key: '83a178f48b465978da70749d5a0a6b06c7a46423', htmlFor: this.name, class: "tds-datetime-label" }, this.label)), h("div", { key: 'd3b8cbc704aee3863a428f6bbc9b89a8894241df', onClick: (e) => this.handleFocusClick(e), class: "tds-datetime-container" }, h("div", { key: 'b398e66d353aeb568024686b591dcf5d9d2288e6', class: `tds-datetime-input-container type-${this.type}` }, h("input", { key: '1d31da2daaa048b46fe9a3023f4342e0daa4cfde', ref: (inputEl) => {
151
144
  this.textInput = inputEl;
152
- }, 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)))));
145
+ }, 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: 'f16d4c77abdc6b1cabb03b8e4beba58704796648', class: `tds-datetime-label-inside ${iphone && 'iphone'}`, htmlFor: this.name }, this.label)), h("div", { key: '168c3c719094c8b39dcc4fa16b4d13b588b9429b', class: "datetime-icon icon-datetime-local" }, h("tds-icon", { key: '6e0794302a5e1792b198c7d1208aa8e59bfb3d5c', size: "20px", name: "calendar", svgTitle: "Calendar" })), h("div", { key: '1a954f5386c136d2cdb88408c9729a68adcd5e58', class: "datetime-icon icon-time" }, h("tds-icon", { key: '67b56f956fc439a71870fdd3ede387d007a69f08', size: "20px", name: "clock", svgTitle: "Clock" }))), h("div", { key: 'c1373d3f3413cdba67911cfc1884f201a326df97', class: "tds-datetime-bar" })), this.helper && (h("div", { key: 'c3d22a5de88ba11154b227ad0d8930cc0768bc99', class: "tds-datetime-helper" }, h("div", { key: '0c5123613944fc44184ab7d489712982b70c183e', class: "tds-helper" }, this.state === 'error' && h("tds-icon", { key: 'a351a589cacb618dbf890e247e98efe14970062b', name: "error", size: "16px", svgTitle: "error" }), this.helper)))));
153
146
  }
154
147
  static get style() { return TdsDatetimeStyle0; }
155
148
  }, [2, "tds-datetime", {
@@ -171,8 +164,7 @@ const TdsDatetime$1 = /*@__PURE__*/ proxyCustomElement(class TdsDatetime extends
171
164
  "tdsAriaLabel": [1, "tds-aria-label"],
172
165
  "focusInput": [32],
173
166
  "reset": [64],
174
- "setValue": [64],
175
- "focusElement": [64]
167
+ "setValue": [64]
176
168
  }, [[0, "focusin", "handleFocusIn"], [0, "focusout", "handleFocusOut"]]]);
177
169
  function defineCustomElement$1() {
178
170
  if (typeof customElements === "undefined") {
@@ -1,4 +1,4 @@
1
- import { T as TdsDropdownOption$1, d as defineCustomElement$1 } from './p-7ad1bc2c.js';
1
+ import { T as TdsDropdownOption$1, d as defineCustomElement$1 } from './p-7ee8b262.js';
2
2
 
3
3
  const TdsDropdownOption = TdsDropdownOption$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -1,4 +1,4 @@
1
- import { T as TdsDropdown$1, d as defineCustomElement$1 } from './p-0f58e26f.js';
1
+ import { T as TdsDropdown$1, d as defineCustomElement$1 } from './p-adbf32b9.js';
2
2
 
3
3
  const TdsDropdown = TdsDropdown$1;
4
4
  const defineCustomElement = defineCustomElement$1;
@@ -13,7 +13,6 @@ const TdsLink$1 = /*@__PURE__*/ proxyCustomElement(class TdsLink extends H {
13
13
  this.standalone = false;
14
14
  }
15
15
  connectedCallback() {
16
- this.host.children[0].classList.add('tds-link-component');
17
16
  const links = this.host.querySelectorAll('a');
18
17
  if (links.length > 1) {
19
18
  console.warn('tds-link is only intended to wrap one <a> tag');
@@ -31,11 +30,11 @@ const TdsLink$1 = /*@__PURE__*/ proxyCustomElement(class TdsLink extends H {
31
30
  }
32
31
  }
33
32
  render() {
34
- return (h("span", { key: '33e88a216202713852367a7af7cd06621aaea591', class: {
33
+ return (h("span", { key: '7f0f25738cc23b6f1cb77be9dd80ea14b9b399bc', class: {
35
34
  'disabled': this.disabled,
36
35
  'no-underline': !this.underline,
37
36
  'standalone': this.standalone,
38
- } }, h("slot", { key: '051cd203d74feabe0a2f45688a60154beb0010ab' })));
37
+ } }, h("slot", { key: '73203886b4064a43a2b3ede33ce650f280ebe9c5' })));
39
38
  }
40
39
  get host() { return this; }
41
40
  static get style() { return TdsLinkStyle0; }
@@ -24,14 +24,8 @@ const TdsRadioButton$1 = /*@__PURE__*/ proxyCustomElement(class TdsRadioButton e
24
24
  this.tdsAriaLabel = undefined;
25
25
  this.tdsTabIndex = undefined;
26
26
  }
27
- /** Method to programmatically focus the radio button element */
28
- async focusElement() {
29
- if (this.inputElement) {
30
- this.inputElement.focus();
31
- }
32
- }
33
27
  render() {
34
- return (h("div", { key: '6f44a40cb5ccf890bdee47d36f47a79d5f8b603c', class: "tds-radio-button" }, h("input", { key: '1da8f9df168c631a634172385c3471a5c6bb03aa', ref: (inputEl) => (this.inputElement = inputEl), "aria-label": this.tdsAriaLabel, class: "tds-form-input", type: "radio", role: "radio", name: this.name, id: this.radioId, value: this.value, checked: this.checked, "aria-checked": this.checked, required: this.required, disabled: this.disabled, onChange: () => this.handleChange(), tabIndex: this.tdsTabIndex }), h("label", { key: '0acf59236ffd3ee0136f2bdef9db8a36afe666ff', htmlFor: this.radioId }, h("slot", { key: 'add4ebdebbb4d5e15126a876c0c0940734b7b068', name: "label" }))));
28
+ return (h("div", { key: 'ca977bcef62ce81be1c0387bc1db7a5bb669f164', class: "tds-radio-button" }, h("input", { key: '939027d597b396cfdab2b47a11465b6e46040036', "aria-label": this.tdsAriaLabel, class: "tds-form-input", type: "radio", role: "radio", name: this.name, id: this.radioId, value: this.value, checked: this.checked, "aria-checked": this.checked, required: this.required, disabled: this.disabled, onChange: () => this.handleChange(), tabIndex: this.tdsTabIndex }), h("label", { key: 'f40293c0fcce1dac843087b71b5e34bdd8e911fa', htmlFor: this.radioId }, h("slot", { key: '4190d41d4e90cd4125c4f997f46cefa44682dae7', name: "label" }))));
35
29
  }
36
30
  get host() { return this; }
37
31
  static get style() { return TdsRadioButtonStyle0; }
@@ -43,8 +37,7 @@ const TdsRadioButton$1 = /*@__PURE__*/ proxyCustomElement(class TdsRadioButton e
43
37
  "required": [4],
44
38
  "disabled": [4],
45
39
  "tdsAriaLabel": [1, "tds-aria-label"],
46
- "tdsTabIndex": [2, "tds-tab-index"],
47
- "focusElement": [64]
40
+ "tdsTabIndex": [2, "tds-tab-index"]
48
41
  }]);
49
42
  function defineCustomElement$1() {
50
43
  if (typeof customElements === "undefined") {
@@ -1,5 +1,5 @@
1
1
  import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-28ef5186.js';
2
- import { d as defineCustomElement$2 } from './p-728ada7e.js';
2
+ import { d as defineCustomElement$2 } from './p-1ef7423a.js';
3
3
 
4
4
  const tableBodyRowCss = ":host(.tds-table__row){box-sizing:border-box;display:table-row;border-bottom:1px solid var(--tds-table-divider);background-color:var(--tds-table-body-row-background);transition:background-color 200ms ease;color:var(--tds-table-color)}:host(.tds-table__row) *{box-sizing:border-box}:host(.tds-table__row) .tds-table__body-cell--checkbox{min-width:48px;width:48px;padding:0}:host(.tds-table__row:hover){background-color:var(--tds-table-body-row-background-hover)}:host(.tds-table__row--selected){background-color:var(--tds-table-body-row-background-selected)}:host(.tds-table__row--selected:hover){background-color:var(--tds-table-body-row-background-selected-hover)}:host(.tds-table__row--hidden){display:none}:host(.tds-table__row--expended){width:100%;background-color:pink}:host .tds-form-label--table{width:100%;height:48px;display:flex;justify-content:center;align-items:center;cursor:pointer}:host(.tds-table__compact) .tds-form-label--table{height:32px}:host(.tds-table--divider) .tds-table__body-cell--checkbox{border-right:1px solid var(--tds-table-divider)}:host(.tds-table__row--clickable){cursor:pointer}:host(.tds-table__row--clickable:focus-visible){outline:var(--focus-outline, 2px solid blue)}";
5
5
  const TdsTableBodyRowStyle0 = tableBodyRowCss;
@@ -1,7 +1,7 @@
1
1
  import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-28ef5186.js';
2
- import { d as defineCustomElement$5 } from './p-728ada7e.js';
3
- import { d as defineCustomElement$4 } from './p-0f58e26f.js';
4
- import { d as defineCustomElement$3 } from './p-7ad1bc2c.js';
2
+ import { d as defineCustomElement$5 } from './p-1ef7423a.js';
3
+ import { d as defineCustomElement$4 } from './p-adbf32b9.js';
4
+ import { d as defineCustomElement$3 } from './p-7ee8b262.js';
5
5
  import { d as defineCustomElement$2 } from './p-c715ab56.js';
6
6
 
7
7
  const tableFooterCss = ":host{box-sizing:border-box;display:table-footer-group;height:var(--tds-spacing-element-48)}:host *{box-sizing:border-box}:host .tds-table__footer-row{background-color:var(--tds-table-footer-background);color:var(--tds-table-color)}:host .tds-table__footer-cell{padding:0 var(--tds-spacing-element-16)}:host .tds-table__footer-cell .tds-table__pagination{height:var(--tds-spacing-element-48);display:flex;align-items:center;justify-content:space-between}:host .tds-table__footer-cell .tds-table__pagination .tds-table__row-selector,:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector{display:flex;align-items:center}:host .tds-table__footer-cell .tds-table__pagination .tds-table__row-selector .rows-per-page,:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector .rows-per-page{display:flex;align-items:center;margin-right:var(--tds-spacing-element-16)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__row-selector .rows-per-page p,:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector .rows-per-page p{margin-right:var(--tds-spacing-element-8)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector-input{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);background-color:var(--tds-table-footer-page-selector-input-background);color:var(--tds-table-color);width:74px;height:30px;border:none;border-radius:var(--tds-spacing-element-4);transition:background-color 250ms ease;margin-right:var(--tds-spacing-element-4);padding-left:var(--tds-spacing-element-16)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector-input:hover{background-color:var(--tds-table-footer-page-selector-input-background-hover)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector-input:disabled{color:var(--tds-table-footer-page-selector-input-color-disabled)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector-input--shake{animation:tds-shake-animation 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;transform:translate3d(0, 0, 0);backface-visibility:hidden;perspective:1000px}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-text{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:1px 8px 0 0}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn{display:flex;justify-content:center;align-items:center;border:none;background-color:transparent;cursor:pointer;height:var(--tds-spacing-element-32);width:var(--tds-spacing-element-32);border-radius:var(--tds-spacing-element-4);transition:background-color 250ms ease;color:var(--tds-table-footer-page-selector-icon)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn:hover{background-color:var(--tds-table-footer-btn-hover)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn:disabled{cursor:default;color:var(--tds-table-footer-page-selector-icon-disabled)}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn:disabled:hover{background-color:transparent}:host .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn-svg{height:var(--tds-spacing-element-20);width:var(--tds-spacing-element-20);fill:var(--tds-table-color)}:host(.tds-table--compact){height:var(--tds-spacing-element-32)}:host(.tds-table--compact) .tds-table__footer-cell .tds-table__pagination{height:var(--tds-spacing-element-32)}:host(.tds-table--compact) .tds-table__footer-cell .tds-table__pagination .tds-table__page-selector-input{height:var(--tds-spacing-element-24)}:host(.tds-table--compact) .tds-table__footer-cell .tds-table__pagination .tds-table__footer-btn{height:28px;width:28px}:host(.footer__horizontal-scroll){display:inline-table;position:absolute;margin-top:10px}@keyframes tds-shake-animation{10%,90%{transform:translate3d(-1px, 0, 0)}20%,80%{transform:translate3d(2px, 0, 0)}30%,50%,70%{transform:translate3d(-4px, 0, 0)}40%,60%{transform:translate3d(4px, 0, 0)}}tds-dropdown:focus-within::after{content:\"\";position:absolute;bottom:0;left:0;height:100%;width:100%;background-color:transparent;border-radius:var(--tds-spacing-element-4);pointer-events:none;outline:2px solid var(--tds-blue-400);outline-offset:-2px}";
@@ -1,5 +1,5 @@
1
1
  import { p as proxyCustomElement, H, d as createEvent, h, c as Host } from './p-28ef5186.js';
2
- import { d as defineCustomElement$2 } from './p-728ada7e.js';
2
+ import { d as defineCustomElement$2 } from './p-1ef7423a.js';
3
3
 
4
4
  const tableHeaderCss = ":host{box-sizing:border-box;display:table-header-group}:host *{box-sizing:border-box}:host .tds-table__header-cell--checkbox{font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);display:table-cell;text-align:left;color:var(--tds-table-color);background-color:var(--tds-table-header-background);border-bottom:1px solid var(--tds-table-divider);height:48px;box-sizing:border-box;overflow:hidden;transition:background-color 200ms ease;min-width:unset;width:48px;padding:0;border-top-left-radius:4px}:host .tds-form-label--table{width:100%;height:48px;display:flex;justify-content:center;align-items:center;cursor:pointer}:host .tds-table__expand-control-container{display:flex;justify-content:center;align-items:center;height:48px;cursor:pointer}:host .tds-table__expand-control-container .tds-table__expand-input{display:none}:host .tds-table__expand-control-container .tds-expandable-row-icon{height:20px;width:20px;transition:transform 200ms ease;transform:rotate(0)}:host .tds-table__expand-control-container .tds-expandable-row-icon--opened{transform:rotate(180deg)}:host ::slotted(tds-header-cell:hover){background-color:var(--tds-table-header-background-hover)}:host(.tds-table--compact) .tds-table__header-cell--checkbox{height:32px}:host(.tds-table--compact) .tds-form-label--table{height:32px}:host(.tds-table--divider) .tds-table__header-cell--checkbox{border-right:1px solid var(--tds-table-divider)}:host(.tds-table--toolbar-available) .tds-table__header-cell--checkbox{border-top-left-radius:0}";
5
5
  const TdsTableHeaderStyle0 = tableHeaderCss;
@@ -1,6 +1,7 @@
1
1
  import { p as proxyCustomElement, H, d as createEvent, h } from './p-28ef5186.js';
2
2
  import { h as hasSlot } from './p-ae110fc2.js';
3
3
  import { g as generateUniqueId } from './p-11648030.js';
4
+ import { g as getAdjustedModeVariant } from './p-76cfa91a.js';
4
5
  import { d as defineCustomElement$2 } from './p-c715ab56.js';
5
6
 
6
7
  const textFieldCss = ".text-field-input-lg.sc-tds-text-field{all:unset;border-radius:4px 4px 0 0;width:100%;box-sizing:border-box;margin:0;border:none;outline:none;height:100%;color:var(--tds-text-field-color);background-color:var(--tds-text-field-background);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:var(--tds-spacing-element-20) var(--tds-spacing-element-16)}.text-field-input-lg.sc-tds-text-field::placeholder{color:var(--tds-text-field-placeholder)}.text-field-input-lg.sc-tds-text-field:disabled{user-select:none;pointer-events:none;background-color:var(--tds-text-field-background-disabled);color:var(--tds-text-field-color-disabled)}.text-field-input-lg.sc-tds-text-field:disabled::placeholder{color:var(--tds-text-field-placeholder-disabled)}.text-field-input-lg.sc-tds-text-field:disabled~.text-field-label-inside.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-input-md.sc-tds-text-field{all:unset;border-radius:4px 4px 0 0;width:100%;box-sizing:border-box;margin:0;border:none;outline:none;height:100%;color:var(--tds-text-field-color);background-color:var(--tds-text-field-background);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:var(--tds-spacing-element-16)}.text-field-input-md.sc-tds-text-field::placeholder{color:var(--tds-text-field-placeholder)}.text-field-input-md.sc-tds-text-field:disabled{user-select:none;pointer-events:none;background-color:var(--tds-text-field-background-disabled);color:var(--tds-text-field-color-disabled)}.text-field-input-md.sc-tds-text-field:disabled::placeholder{color:var(--tds-text-field-placeholder-disabled)}.text-field-input-md.sc-tds-text-field:disabled~.text-field-label-inside.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-input-sm.sc-tds-text-field{all:unset;border-radius:4px 4px 0 0;width:100%;box-sizing:border-box;margin:0;border:none;outline:none;height:100%;color:var(--tds-text-field-color);background-color:var(--tds-text-field-background);font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);padding:var(--tds-spacing-element-16)}.text-field-input-sm.sc-tds-text-field::placeholder{color:var(--tds-text-field-placeholder)}.text-field-input-sm.sc-tds-text-field:disabled{user-select:none;pointer-events:none;background-color:var(--tds-text-field-background-disabled);color:var(--tds-text-field-color-disabled)}.text-field-input-sm.sc-tds-text-field:disabled::placeholder{color:var(--tds-text-field-placeholder-disabled)}.text-field-input-sm.sc-tds-text-field:disabled~.text-field-label-inside.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.text-field-container.sc-tds-text-field{border-radius:4px 4px 0 0;display:flex;position:relative;height:56px;box-sizing:border-box;background-color:var(--tds-text-field-background);border-bottom:1px solid var(--tds-text-field-border-bottom);transition:border-bottom-color 200ms ease}.text-field-container.sc-tds-text-field:hover{border-bottom-color:var(--tds-text-field-border-bottom-hover)}.form-text-field-md.sc-tds-text-field .text-field-container.sc-tds-text-field{height:48px}.form-text-field-sm.sc-tds-text-field .text-field-container.sc-tds-text-field{height:40px}.text-field-input-container.sc-tds-text-field{position:relative;width:100%}.text-field-data.sc-tds-text-field,.text-field-input.sc-tds-text-field{color:var(--tds-text-field-data-color)}.text-field-label-outside.sc-tds-text-field>*.sc-tds-text-field{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);display:block;margin-bottom:var(--tds-spacing-element-8);color:var(--tds-text-field-label-color)}.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);position:absolute;pointer-events:none;color:var(--tds-text-field-label-inside-color);left:16px}.form-text-field.sc-tds-text-field{display:block;min-width:208px}.form-text-field-nomin.sc-tds-text-field{min-width:auto}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field{padding-top:var(--tds-spacing-element-24);padding-bottom:15px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{top:20px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field .sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-lg.sc-tds-text-field:focus::placeholder{transition:color 0.35s ease;color:var(--tds-text-field-placeholder)}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field{padding-top:var(--tds-spacing-element-20);padding-bottom:11px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{top:16px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field .sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-md.sc-tds-text-field:focus::placeholder{transition:color 0.35s ease;color:var(--tds-text-field-placeholder)}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field{padding-top:var(--tds-spacing-element-20);padding-bottom:11px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{top:16px}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field .sc-tds-text-field::placeholder{color:transparent}.form-text-field.text-field-container-label-inside.sc-tds-text-field .text-field-input-sm.sc-tds-text-field:focus::placeholder{transition:color 0.35s ease;color:var(--tds-text-field-placeholder)}.form-text-field.text-field-container-label-inside.text-field-focus.sc-tds-text-field .text-field-input-sm.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field,.form-text-field.text-field-container-label-inside.text-field-data.sc-tds-text-field .text-field-input-sm.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:0.1s ease all;top:8px}.form-text-field.text-field-container-label-inside.text-field-focus.sc-tds-text-field .text-field-input-md.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field,.form-text-field.text-field-container-label-inside.text-field-data.sc-tds-text-field .text-field-input-md.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:0.1s ease all;top:8px}.form-text-field.text-field-container-label-inside.text-field-focus.sc-tds-text-field .text-field-input-lg.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field,.form-text-field.text-field-container-label-inside.text-field-data.sc-tds-text-field .text-field-input-lg.sc-tds-text-field~.text-field-label-inside.sc-tds-text-field{font:var(--tds-detail-07);letter-spacing:var(--tds-detail-07-ls);transition:0.1s ease all;top:12px}.text-field-bar.sc-tds-text-field{position:absolute;width:100%}.text-field-bar.sc-tds-text-field::before,.text-field-bar.sc-tds-text-field::after{content:\"\";height:2px;top:54px;width:0;position:absolute;background:var(--tds-text-field-bar);transition:0.35s ease all}.form-text-field-md.sc-tds-text-field .text-field-bar.sc-tds-text-field::before,.form-text-field-md.sc-tds-text-field .text-field-bar.sc-tds-text-field::after{top:46px}.form-text-field-sm.sc-tds-text-field .text-field-bar.sc-tds-text-field::before,.form-text-field-sm.sc-tds-text-field .text-field-bar.sc-tds-text-field::after{top:40px}.text-field-bar.sc-tds-text-field::before{left:50%}.text-field-bar.sc-tds-text-field::after{right:50%}.text-field-focus.sc-tds-text-field .text-field-bar.sc-tds-text-field::before,.text-field-focus.sc-tds-text-field .text-field-bar.sc-tds-text-field::after{width:50%}.text-field-helper.sc-tds-text-field{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);display:flex;gap:8px;justify-content:space-between;flex-basis:100%;padding-top:var(--tds-spacing-element-4);color:var(--tds-text-field-helper)}.text-field-helper.sc-tds-text-field .text-field-textcounter.sc-tds-text-field{margin-left:auto}.form-text-field-disabled.sc-tds-text-field .text-field-container.sc-tds-text-field{cursor:not-allowed;border-bottom-color:transparent}.form-text-field-disabled.sc-tds-text-field .text-field-slot-wrap-prefix.sc-tds-text-field>*.sc-tds-text-field,.form-text-field-disabled.sc-tds-text-field .text-field-slot-wrap-suffix.sc-tds-text-field>*.sc-tds-text-field{color:var(--tds-text-field-ps-color-disabled)}.form-text-field-disabled.sc-tds-text-field .text-field-label-outside.sc-tds-text-field>*.sc-tds-text-field{color:var(--tds-text-field-label-disabled)}.form-text-field-disabled.sc-tds-text-field .text-field-helper.sc-tds-text-field{color:var(--tds-text-field-helper-disabled)}.text-field-icon__readonly.sc-tds-text-field{display:none;position:absolute;right:18px;top:50%;transform:translateY(-50%);color:var(--tds-text-field-icon-read-only-label-color)}.text-field-icon__readonly-label.sc-tds-text-field{display:none;position:absolute;right:18px;top:48px;font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);padding:8px;white-space:nowrap;border-radius:4px 0 4px 4px;background-color:var(--tds-text-field-icon-read-only-label-background)}.form-text-field-readonly.sc-tds-text-field{user-select:auto;caret-color:transparent;cursor:default}.form-text-field-readonly.sc-tds-text-field .text-field-container.sc-tds-text-field{border-bottom-color:var(--tds-text-field-border-bottom-readonly)}.form-text-field-readonly.sc-tds-text-field .text-field-icon__readonly.sc-tds-text-field{display:block}.form-text-field-readonly.sc-tds-text-field .text-field-icon__readonly.sc-tds-text-field:hover~.text-field-icon__readonly-label.sc-tds-text-field{display:block}.form-text-field-readonly.sc-tds-text-field .text-field-input.sc-tds-text-field{background-color:transparent}.form-text-field-readonly.sc-tds-text-field:has(.text-field-icon__readonly) .text-field-input.sc-tds-text-field{padding-right:54px}.form-text-field-success.sc-tds-text-field:not(.form-text-field-readonly) .text-field-container.sc-tds-text-field{border-bottom-color:var(--tds-text-field-border-bottom-success)}.form-text-field-error.sc-tds-text-field:not(.form-text-field-readonly) .text-field-helper.sc-tds-text-field{color:var(--tds-text-field-helper-error)}.form-text-field-error.sc-tds-text-field:not(.form-text-field-readonly) .text-field-container.sc-tds-text-field{border-bottom-color:var(--tds-text-field-border-bottom-error)}.form-text-field-error.sc-tds-text-field:not(.form-text-field-readonly) .text-field-bar.sc-tds-text-field::before,.form-text-field-error.sc-tds-text-field:not(.form-text-field-readonly) .text-field-bar.sc-tds-text-field::after{background:var(--tds-text-field-bar-error)}.text-field-helper-error-state.sc-tds-text-field{display:flex;gap:8px;flex-wrap:nowrap}.text-field-textcounter-disabled.sc-tds-text-field{color:var(--tds-text-field-textcounter-disabled)}.text-field-textcounter.sc-tds-text-field{font:var(--tds-detail-05);letter-spacing:var(--tds-detail-05-ls);color:var(--tds-text-field-textcounter);float:right}.text-field-textcounter.text-field-textcounter-disabled.sc-tds-text-field{color:var(--tds-text-field-textcounter-disabled)}.text-field-textcounter.text-field-textcounter-divider.sc-tds-text-field{color:var(--tds-text-field-textcounter-divider)}.text-field-textcounter.text-field-textcounter-divider-disabled.sc-tds-text-field{color:var(--tds-text-field-textcounter-divider-disabled)}.text-field-slot-wrap-prefix.sc-tds-text-field,.text-field-slot-wrap-suffix.sc-tds-text-field{align-self:center;font:var(--tds-detail-02);letter-spacing:var(--tds-detail-02-ls);margin:0 0 0 14px;color:var(--tds-text-field-ps-color)}.text-field-slot-wrap-prefix.sc-tds-text-field-s>:not(tds-icon),.text-field-slot-wrap-suffix.sc-tds-text-field-s>:not(tds-icon){margin:0 0 0 2px}.text-field-slot-wrap-prefix.text-field-error.sc-tds-text-field,.text-field-slot-wrap-suffix.text-field-error.sc-tds-text-field{color:var(--tds-text-field-ps-color-error)}.text-field-slot-wrap-suffix.sc-tds-text-field{margin:0 14px 0 0}.text-field-slot-wrap-suffix.sc-tds-text-field-s>:not(tds-icon){margin:0 2px 0 0}";
@@ -15,6 +16,7 @@ const TdsTextField$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextField exten
15
16
  this.tdsFocus = createEvent(this, "tdsFocus", 6);
16
17
  this.tdsBlur = createEvent(this, "tdsBlur", 6);
17
18
  this.uuid = generateUniqueId();
19
+ this.insideModal = false;
18
20
  this.type = 'text';
19
21
  this.labelPosition = 'no-label';
20
22
  this.label = '';
@@ -35,6 +37,7 @@ const TdsTextField$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextField exten
35
37
  this.autofocus = false;
36
38
  this.tdsAriaLabel = undefined;
37
39
  this.focusInput = false;
40
+ this.swapModeVariant = false;
38
41
  }
39
42
  handleChange(event) {
40
43
  this.tdsChange.emit(event);
@@ -79,11 +82,36 @@ const TdsTextField$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextField exten
79
82
  console.warn('Tegel Text Field component: prop tdsAriaLabel is missing');
80
83
  }
81
84
  }
85
+ checkIfDarkmode() {
86
+ const darkmode = document.body.classList.contains('tds-mode-dark');
87
+ this.swapModeVariant = this.insideModal && darkmode;
88
+ }
89
+ observeClassChanges() {
90
+ this.mutationObserver = new MutationObserver(() => {
91
+ this.checkIfDarkmode();
92
+ });
93
+ this.mutationObserver.observe(document.body, {
94
+ attributes: true,
95
+ attributeFilter: ['class'],
96
+ });
97
+ }
98
+ componentDidLoad() {
99
+ this.insideModal = !!this.host.closest('tds-modal');
100
+ if (this.insideModal) {
101
+ this.observeClassChanges();
102
+ this.checkIfDarkmode();
103
+ }
104
+ }
105
+ disconnectedCallback() {
106
+ if (this.mutationObserver) {
107
+ this.mutationObserver.disconnect();
108
+ }
109
+ }
82
110
  render() {
83
111
  var _a;
84
112
  const usesPrefixSlot = hasSlot('prefix', this.host);
85
113
  const usesSuffixSlot = hasSlot('suffix', this.host);
86
- return (h("div", { key: '985928ef59662762648f2d95d5decad2e3188e05', class: {
114
+ return (h("div", { key: '3f334104a79f318559f312c5b0e6e29fc42f75ee', class: {
87
115
  'form-text-field': true,
88
116
  'form-text-field-nomin': this.noMinWidth,
89
117
  'text-field-focus': this.focusInput && !this.disabled,
@@ -91,22 +119,17 @@ const TdsTextField$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextField exten
91
119
  'text-field-container-label-inside': this.labelPosition === 'inside' && this.size !== 'sm',
92
120
  'form-text-field-disabled': this.disabled,
93
121
  'form-text-field-readonly': this.disabled ? false : this.readOnly,
94
- 'tds-mode-variant-primary': this.readOnly
95
- ? this.modeVariant === 'secondary'
96
- : this.modeVariant === 'primary',
97
- 'tds-mode-variant-secondary': this.readOnly
98
- ? this.modeVariant === 'primary'
99
- : this.modeVariant === 'secondary',
122
+ [getAdjustedModeVariant(this.modeVariant, this.swapModeVariant, this.readOnly)]: true,
100
123
  'form-text-field-md': this.size === 'md',
101
124
  'form-text-field-sm': this.size === 'sm',
102
125
  'form-text-field-error': this.state === 'error',
103
126
  'form-text-field-success': this.state === 'success',
104
- } }, 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: {
127
+ } }, this.labelPosition === 'outside' && (h("div", { key: 'bceaded603552ec0845941f5ecdb790c1d1b3886', class: "text-field-label-outside" }, h("label", { key: 'a01149b1e584d0324298efb4fc2f0cfbdfe2d6d2', htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), h("div", { key: '7b3969dfdcc5bba6bd19e73fffb7fd7b06d2eaa1', onClick: () => this.textInput.focus(), class: "text-field-container" }, usesPrefixSlot && (h("div", { key: '62664099f52902ca01fe6f689e470d2b599fd3ca', class: {
105
128
  'text-field-slot-wrap-prefix': true,
106
129
  'text-field-error': this.state === 'error',
107
130
  'text-field-success': this.state === 'success',
108
131
  'text-field-default': this.state === 'default',
109
- } }, h("slot", { key: 'b0f0e3ebb96dbd2af021150b68690af566db44b9', name: "prefix" }))), h("div", { key: 'c5b172ee6c561256ab930490113f406b88eae67c', class: "text-field-input-container" }, h("input", { key: '2e0a9070b41bde39a2a0f14b132f474692eb0e04', ref: (inputEl) => {
132
+ } }, h("slot", { key: '0c6f97b881053c1d4fa35c0f9497251cbd36909e', name: "prefix" }))), h("div", { key: 'e730d994ae00054954201672da3df3a2dea65cd8', class: "text-field-input-container" }, h("input", { key: '7f368363f18aa29c56e03cf428fadbe655b2888c', ref: (inputEl) => {
110
133
  this.textInput = inputEl;
111
134
  }, class: {
112
135
  'text-field-input': true,
@@ -121,13 +144,13 @@ const TdsTextField$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextField exten
121
144
  if (!this.readOnly) {
122
145
  this.handleBlur(event);
123
146
  }
124
- }, "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: {
147
+ }, "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: '41c427a5a0bf58c2a83f58a3b5a045370e5db4b3', class: "text-field-label-inside", htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), h("div", { key: 'a2f5f1a3eb8c1392ba4349d76e065dcbb4f8dde9', class: "text-field-bar" }), usesSuffixSlot && (h("div", { key: 'd6b13341d8f9ee83e5b6f748461e1fad0654dbbd', class: {
125
148
  'text-field-slot-wrap-suffix': true,
126
149
  'text-field-error': this.state === 'error',
127
150
  'text-field-success': this.state === 'success',
128
151
  'text-field-default': this.state === 'default',
129
152
  'tds-u-display-none': this.readOnly,
130
- } }, h("slot", { key: '7e67dbc8f4f67cb0c7d194e01e5787ae18ffab13', name: "suffix" }))), this.readOnly && !this.hideReadOnlyIcon && (h("span", { key: 'd213ec000d837cbd4b711468ef3cfa826cc65ac2', class: "text-field-icon__readonly" }, h("tds-icon", { key: '56b8b76a5771889f9f36ab683dcba6906bff42a6', name: "edit_inactive", size: "20px" }))), h("span", { key: '9e8fa95602a1ce5630f30947b59decc700c06c8b', class: "text-field-icon__readonly-label" }, "This field is non-editable")), h("div", { key: '9e8547e06a25e7da98ff977ac6be1b79d27e4151', "aria-live": "assertive" }, (this.helper || this.maxLength > 0) && (h("div", { key: 'daeea67a48a15d27785f31dfcb69fb75e31ab85b', class: "text-field-helper", id: `text-field-helper-element-${this.uuid}` }, this.state === 'error' && (h("div", { key: '974bad3f97b23d69a20130bf66b6c72ef47f68bc', class: "text-field-helper-error-state" }, !this.readOnly && h("tds-icon", { key: '687cad3cb0451a262f836089851e9a2e08f2c74e', name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, !this.readOnly && this.maxLength > 0 && (h("span", { key: '431709fb793dde8845b20698e722a7c140bb32b6', class: {
153
+ } }, h("slot", { key: '5de22b8fbd8d849f53ba3eeecb213e060f6fa0d7', name: "suffix" }))), this.readOnly && !this.hideReadOnlyIcon && (h("span", { key: 'f2b7bca0b50083547851f87925c81d326031639f', class: "text-field-icon__readonly" }, h("tds-icon", { key: '3b4eec23c95e66bbd0f4aa77daa1ea0122a5e2a9', name: "edit_inactive", size: "20px" }))), h("span", { key: '098d8775f3447537eb1a5d00e845d4222c302827', class: "text-field-icon__readonly-label" }, "This field is non-editable")), h("div", { key: '68caa17dcc66342922171f54e9b21daefbb9fad6', "aria-live": "assertive" }, (this.helper || this.maxLength > 0) && (h("div", { key: '78262f7cbf45be4e25bc6ff2e95f69f8964ae308', class: "text-field-helper", id: `text-field-helper-element-${this.uuid}` }, this.state === 'error' && (h("div", { key: '4e2bf263ef6ba3127ae42bce9eada403825c28e9', class: "text-field-helper-error-state" }, !this.readOnly && h("tds-icon", { key: '85988daade29b03c7ffca789cfe984d6a9e65ed6', name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, !this.readOnly && this.maxLength > 0 && (h("span", { key: '839bd557ac51f77defdca3a32666d0d452a9abca', class: {
131
154
  'text-field-textcounter-divider': true,
132
155
  'text-field-textcounter-disabled': this.disabled,
133
156
  } }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, " / ", this.maxLength)))))));
@@ -155,6 +178,7 @@ const TdsTextField$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextField exten
155
178
  "autofocus": [4],
156
179
  "tdsAriaLabel": [1, "tds-aria-label"],
157
180
  "focusInput": [32],
181
+ "swapModeVariant": [32],
158
182
  "focusElement": [64]
159
183
  }]);
160
184
  function defineCustomElement$1() {
@@ -1,5 +1,6 @@
1
1
  import { p as proxyCustomElement, H, d as createEvent, h } from './p-28ef5186.js';
2
2
  import { g as generateUniqueId } from './p-11648030.js';
3
+ import { g as getAdjustedModeVariant } from './p-76cfa91a.js';
3
4
  import { d as defineCustomElement$4 } from './p-c715ab56.js';
4
5
  import { d as defineCustomElement$3 } from './p-96e83134.js';
5
6
  import { d as defineCustomElement$2 } from './p-69109003.js';
@@ -16,6 +17,7 @@ const TdsTextarea$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextarea extends
16
17
  this.tdsInput = createEvent(this, "tdsInput", 6);
17
18
  this.tdsFocus = createEvent(this, "tdsFocus", 6);
18
19
  this.uuid = generateUniqueId();
20
+ this.insideModal = false;
19
21
  this.label = '';
20
22
  this.name = '';
21
23
  this.helper = undefined;
@@ -34,6 +36,7 @@ const TdsTextarea$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextarea extends
34
36
  this.noMinWidth = false;
35
37
  this.tdsAriaLabel = undefined;
36
38
  this.focusInput = undefined;
39
+ this.swapModeVariant = false;
37
40
  }
38
41
  handleChange(event) {
39
42
  this.tdsChange.emit(event);
@@ -55,40 +58,58 @@ const TdsTextarea$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextarea extends
55
58
  this.focusInput = true;
56
59
  this.tdsFocus.emit(event);
57
60
  }
58
- /** Method to programmatically focus the textarea element */
59
- async focusElement() {
60
- if (this.textEl) {
61
- this.textEl.focus();
62
- this.focusInput = true;
61
+ // setModeVariant(modeVariant: 'primary' | 'secondary'): string | null {
62
+ // if (this.readOnly && modeVariant === 'primary') {
63
+ // return 'secondary';
64
+ // }
65
+ // if (this.readOnly && modeVariant === 'secondary') {
66
+ // return 'primary';
67
+ // }
68
+ // return modeVariant;
69
+ // }
70
+ connectedCallback() {
71
+ if (!this.tdsAriaLabel && !this.label) {
72
+ console.warn('Tegel Textarea component: specify label or tdsAriaLabel prop for accessibility');
63
73
  }
64
74
  }
65
- setModeVariant(modeVariant) {
66
- if (this.readOnly && modeVariant === 'primary') {
67
- return 'secondary';
68
- }
69
- if (this.readOnly && modeVariant === 'secondary') {
70
- return 'primary';
75
+ checkIfDarkmode() {
76
+ const darkmode = document.body.classList.contains('tds-mode-dark');
77
+ this.swapModeVariant = this.insideModal && darkmode;
78
+ }
79
+ observeClassChanges() {
80
+ this.mutationObserver = new MutationObserver(() => {
81
+ this.checkIfDarkmode();
82
+ });
83
+ this.mutationObserver.observe(document.body, {
84
+ attributes: true,
85
+ attributeFilter: ['class'],
86
+ });
87
+ }
88
+ componentDidLoad() {
89
+ this.insideModal = !!this.host.closest('tds-modal');
90
+ if (this.insideModal) {
91
+ this.observeClassChanges();
92
+ this.checkIfDarkmode();
71
93
  }
72
- return modeVariant;
73
94
  }
74
- connectedCallback() {
75
- if (!this.tdsAriaLabel && !this.label) {
76
- console.warn('Tegel Textarea component: specify label or tdsAriaLabel prop for accessibility');
95
+ disconnectedCallback() {
96
+ if (this.mutationObserver) {
97
+ this.mutationObserver.disconnect();
77
98
  }
78
99
  }
79
100
  render() {
80
101
  var _a;
81
- return (h("div", { key: '06fd8ce87614410858a7d9253fac73a6f1cf20ec', class: {
102
+ return (h("div", { key: '1f0f9e42fb01b4ad16e4017fd5045510317c2633', class: {
82
103
  'textarea-container': true,
83
104
  'textarea-label-inside': this.labelPosition === 'inside',
84
105
  'textarea-focus': this.focusInput,
85
106
  'textarea-disabled': this.disabled,
86
107
  'textarea-readonly': !this.disabled && this.readOnly,
87
- [`tds-mode-variant-${this.setModeVariant(this.modeVariant)}`]: true,
108
+ [getAdjustedModeVariant(this.modeVariant, this.swapModeVariant, this.readOnly)]: true,
88
109
  'textarea-data': this.value !== '',
89
110
  [`textarea-${this.state}`]: this.state === 'error' || this.state === 'success',
90
111
  'no-min-width': this.noMinWidth,
91
- } }, 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) => {
112
+ } }, this.labelPosition !== 'no-label' && (h("label", { key: '5a86f34c46a1388c00017fbf3306dedb9624ab15', htmlFor: `textarea-element-${this.uuid}`, class: 'textarea-label' }, this.label)), h("div", { key: 'a1731e87bda333a2fb517cba22b88537f9316eb7', class: "textarea-wrapper" }, h("textarea", { key: '538b4621bd98b804c8a9d7d686d86c88fb2a2769', id: `textarea-element-${this.uuid}`, class: 'textarea-input', ref: (inputEl) => {
92
113
  this.textEl = inputEl;
93
114
  }, 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) => {
94
115
  if (!this.readOnly) {
@@ -98,8 +119,9 @@ const TdsTextarea$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextarea extends
98
119
  if (!this.readOnly) {
99
120
  this.handleBlur(event);
100
121
  }
101
- }, 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))));
122
+ }, 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: '11a0f48f5e8da2ad1a83145133cb42c058446926', class: "textarea-resizer-icon" }, h("svg", { key: '5e1b7c2acc0c0c8bc62d4d4e7605eeefea382075', width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, h("path", { key: '8b210ff6be5cb8e7a6eef276bc62b210e3d98aca', "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: '1b462603139c3ff096b18e61edb7629c804341a0', class: "textarea-icon__readonly" }, h("tds-tooltip", { key: '3c01c797be9021a5907c4a01906ab614f2943c23', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: '8ceffefeba1632397e8f8e4c3b33eaabafb942fe', id: "readonly-tooltip", name: "edit_inactive", svgTitle: "inactive" })))), h("span", { key: 'd21fac62b5709d6b4a9e79c7ba391a17aa9e3e1b', class: 'textarea-helper', "aria-live": "assertive", id: `textarea-helper-element-${this.uuid}` }, this.state === 'error' && this.helper && !this.readOnly && (h("tds-icon", { key: 'c9f959778bb295f786cb8578610150743b77626d', name: "error", size: "16px" })), this.helper), this.maxLength > 0 && (h("div", { key: 'da11bfe7213be04e0c5699a0385be2c63a08a8b2', class: 'textarea-textcounter' }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, h("span", { key: '357b65219a5dfd4c27931d025e183b8bde012345', class: "textfield-textcounter-divider" }, " / "), " ", this.maxLength))));
102
123
  }
124
+ get host() { return this; }
103
125
  static get style() { return TdsTextareaStyle0; }
104
126
  }, [2, "tds-textarea", {
105
127
  "label": [1],
@@ -120,7 +142,7 @@ const TdsTextarea$1 = /*@__PURE__*/ proxyCustomElement(class TdsTextarea extends
120
142
  "noMinWidth": [4, "no-min-width"],
121
143
  "tdsAriaLabel": [1, "tds-aria-label"],
122
144
  "focusInput": [32],
123
- "focusElement": [64]
145
+ "swapModeVariant": [32]
124
146
  }]);
125
147
  function defineCustomElement$1() {
126
148
  if (typeof customElements === "undefined") {
@@ -33,12 +33,6 @@ const TdsToggle$1 = /*@__PURE__*/ proxyCustomElement(class TdsToggle extends H {
33
33
  checked: this.checked,
34
34
  };
35
35
  }
36
- /** Method to programmatically focus the toggle element */
37
- async focusElement() {
38
- if (this.inputElement) {
39
- this.inputElement.focus();
40
- }
41
- }
42
36
  componentWillLoad() {
43
37
  this.labelSlot = this.host.querySelector("[slot='label']");
44
38
  }
@@ -48,10 +42,10 @@ const TdsToggle$1 = /*@__PURE__*/ proxyCustomElement(class TdsToggle extends H {
48
42
  }
49
43
  }
50
44
  render() {
51
- return (h("div", { key: '212a541d06f0cc534855ac872cfb386dc1b2d4ff', class: "tds-toggle" }, this.headline && (h("div", { key: '076c51461d4898d2bfa3c86fadd94ac2ad63c7a8', class: {
45
+ return (h("div", { key: '01d3faf866451cf2e09694d614b1cca9defa1f69', class: "tds-toggle" }, this.headline && (h("div", { key: '2809bf2c3653c20ca6b93280b3391255b2285d8c', class: {
52
46
  'toggle-headline': true,
53
47
  'disabled': this.disabled,
54
- } }, this.headline)), h("input", { key: 'e0e849d7b05b77612fc949894cac8befa5b89370', ref: (inputEl) => (this.inputElement = inputEl), "aria-label": this.tdsAriaLabel, "aria-describedby": this.host.getAttribute('aria-describedby'), "aria-labelledby": this.host.getAttribute('aria-labelledby'), "aria-checked": this.checked, "aria-required": this.required, onChange: () => this.handleToggle(), class: `${this.size}`, checked: this.checked, disabled: this.disabled, required: this.required, type: "checkbox", name: this.name, id: this.toggleId, role: "switch" }), this.labelSlot && (h("label", { key: '4d1dcc70f896695657ca7ca68fd832ee4d13417a', class: { disabled: this.disabled }, htmlFor: this.toggleId }, h("slot", { key: '800ea4ee2760efee8cdfe1ac3aee4b3a6f95f199', name: "label" })))));
48
+ } }, this.headline)), h("input", { key: '52ab62b4d4c506ca74533ffafc68247accae612b', "aria-label": this.tdsAriaLabel, "aria-describedby": this.host.getAttribute('aria-describedby'), "aria-labelledby": this.host.getAttribute('aria-labelledby'), "aria-checked": this.checked, "aria-required": this.required, onChange: () => this.handleToggle(), class: `${this.size}`, checked: this.checked, disabled: this.disabled, required: this.required, type: "checkbox", name: this.name, id: this.toggleId, role: "switch" }), this.labelSlot && (h("label", { key: '73f43d7134ff9a9ecded6b8b153b1590014e2a80', class: { disabled: this.disabled }, htmlFor: this.toggleId }, h("slot", { key: 'efe7c2a3f76f9990a00b1156d66b78c0e26e6411', name: "label" })))));
55
49
  }
56
50
  get host() { return this; }
57
51
  static get style() { return TdsToggleStyle0; }
@@ -64,8 +58,7 @@ const TdsToggle$1 = /*@__PURE__*/ proxyCustomElement(class TdsToggle extends H {
64
58
  "disabled": [4],
65
59
  "toggleId": [1, "toggle-id"],
66
60
  "tdsAriaLabel": [1, "tds-aria-label"],
67
- "toggle": [64],
68
- "focusElement": [64]
61
+ "toggle": [64]
69
62
  }]);
70
63
  function defineCustomElement$1() {
71
64
  if (typeof customElements === "undefined") {