@scania/tegel 1.37.1 → 1.38.0-feat-text-field-add-types-and-props-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 (105) hide show
  1. package/dist/cjs/index-ca8040ad.js +4 -4
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/tds-core-header-item_2.cjs.entry.js +1 -1
  4. package/dist/cjs/tds-dropdown_2.cjs.entry.js +55 -22
  5. package/dist/cjs/tds-folder-tab.cjs.entry.js +1 -1
  6. package/dist/cjs/tds-folder-tabs.cjs.entry.js +1 -1
  7. package/dist/cjs/tds-inline-tab.cjs.entry.js +1 -1
  8. package/dist/cjs/tds-message.cjs.entry.js +3 -4
  9. package/dist/cjs/tds-navigation-tab.cjs.entry.js +1 -1
  10. package/dist/cjs/tds-navigation-tabs.cjs.entry.js +1 -1
  11. package/dist/cjs/tds-side-menu-collapse-button.cjs.entry.js +4 -6
  12. package/dist/cjs/tds-side-menu-dropdown-list-item.cjs.entry.js +1 -1
  13. package/dist/cjs/tds-side-menu-item.cjs.entry.js +1 -1
  14. package/dist/cjs/tds-slider.cjs.entry.js +39 -10
  15. package/dist/cjs/tds-text-field.cjs.entry.js +7 -5
  16. package/dist/cjs/tegel.cjs.js +1 -1
  17. package/dist/collection/components/dropdown/dropdown-option/dropdown-option.js +13 -3
  18. package/dist/collection/components/dropdown/dropdown.js +56 -20
  19. package/dist/collection/components/header/header-item/header-item.css +3 -3
  20. package/dist/collection/components/message/message.css +0 -20
  21. package/dist/collection/components/message/message.js +2 -3
  22. package/dist/collection/components/side-menu/side-menu-collapse-button/side-menu-collapse-button.js +4 -6
  23. package/dist/collection/components/side-menu/side-menu-dropdown-list-item/side-menu-dropdown-list-item.css +84 -6
  24. package/dist/collection/components/side-menu/side-menu-item/side-menu-item.css +82 -6
  25. package/dist/collection/components/slider/slider.css +24 -28
  26. package/dist/collection/components/slider/slider.js +38 -9
  27. package/dist/collection/components/tabs/folder-tabs/folder-tab/folder-tab.css +34 -8
  28. package/dist/collection/components/tabs/folder-tabs/folder-tabs.css +12 -2
  29. package/dist/collection/components/tabs/inline-tabs/inline-tab/inline-tab.css +14 -9
  30. package/dist/collection/components/tabs/navigation-tabs/navigation-tab/navigation-tab.css +16 -10
  31. package/dist/collection/components/tabs/navigation-tabs/navigation-tabs.css +12 -2
  32. package/dist/collection/components/text-field/text-field.js +45 -7
  33. package/dist/components/{p-63437b77.js → p-072bf53a.js} +1 -1
  34. package/dist/components/p-5e6035ad.js +191 -0
  35. package/dist/components/{p-ea381f94.js → p-92c2da85.js} +1 -1
  36. package/dist/components/{p-6adb1ce3.js → p-ad6babcd.js} +1 -1
  37. package/dist/components/{p-d64878cb.js → p-c4318e35.js} +13 -3
  38. package/dist/components/{p-94bfc9f4.js → p-de36fc8a.js} +44 -20
  39. package/dist/components/tds-dropdown-option.js +1 -1
  40. package/dist/components/tds-dropdown.js +1 -1
  41. package/dist/components/tds-folder-tab.js +1 -1
  42. package/dist/components/tds-folder-tabs.js +1 -1
  43. package/dist/components/tds-header-brand-symbol.js +1 -1
  44. package/dist/components/tds-header-dropdown.js +1 -1
  45. package/dist/components/tds-header-hamburger.js +1 -1
  46. package/dist/components/tds-header-item.js +1 -1
  47. package/dist/components/tds-header-launcher-button.js +1 -1
  48. package/dist/components/tds-header-launcher.js +2 -2
  49. package/dist/components/tds-inline-tab.js +1 -1
  50. package/dist/components/tds-message.js +3 -4
  51. package/dist/components/tds-navigation-tab.js +1 -1
  52. package/dist/components/tds-navigation-tabs.js +1 -1
  53. package/dist/components/tds-side-menu-collapse-button.js +5 -7
  54. package/dist/components/tds-side-menu-dropdown-list-item.js +1 -1
  55. package/dist/components/tds-side-menu-dropdown.js +1 -1
  56. package/dist/components/tds-side-menu-item.js +1 -1
  57. package/dist/components/tds-slider.js +59 -12
  58. package/dist/components/tds-table-footer.js +2 -2
  59. package/dist/components/tds-text-field.js +1 -185
  60. package/dist/esm/index-51d04e39.js +4 -4
  61. package/dist/esm/loader.js +1 -1
  62. package/dist/esm/tds-core-header-item_2.entry.js +1 -1
  63. package/dist/esm/tds-dropdown_2.entry.js +55 -22
  64. package/dist/esm/tds-folder-tab.entry.js +1 -1
  65. package/dist/esm/tds-folder-tabs.entry.js +1 -1
  66. package/dist/esm/tds-inline-tab.entry.js +1 -1
  67. package/dist/esm/tds-message.entry.js +3 -4
  68. package/dist/esm/tds-navigation-tab.entry.js +1 -1
  69. package/dist/esm/tds-navigation-tabs.entry.js +1 -1
  70. package/dist/esm/tds-side-menu-collapse-button.entry.js +4 -6
  71. package/dist/esm/tds-side-menu-dropdown-list-item.entry.js +1 -1
  72. package/dist/esm/tds-side-menu-item.entry.js +1 -1
  73. package/dist/esm/tds-slider.entry.js +39 -10
  74. package/dist/esm/tds-text-field.entry.js +7 -5
  75. package/dist/esm/tegel.js +1 -1
  76. package/dist/tegel/{p-c0b26507.entry.js → p-25f4b4ca.entry.js} +1 -1
  77. package/dist/tegel/p-2c9ea0be.entry.js +1 -0
  78. package/dist/tegel/p-2f9b15f6.entry.js +1 -0
  79. package/dist/tegel/p-336f2de3.entry.js +1 -0
  80. package/dist/tegel/p-56ff5780.entry.js +1 -0
  81. package/dist/tegel/p-628dc7f7.entry.js +1 -0
  82. package/dist/tegel/p-8ae4e03c.entry.js +1 -0
  83. package/dist/tegel/p-b2b9561f.entry.js +1 -0
  84. package/dist/tegel/{p-52adc30c.entry.js → p-bb9445ff.entry.js} +1 -1
  85. package/dist/tegel/p-c465f9b8.entry.js +1 -0
  86. package/dist/tegel/p-c4f701f6.entry.js +1 -0
  87. package/dist/tegel/{p-8c841698.entry.js → p-d184a3f0.entry.js} +1 -1
  88. package/dist/tegel/p-ecb34850.entry.js +1 -0
  89. package/dist/tegel/tegel.css +1 -1
  90. package/dist/tegel/tegel.esm.js +1 -1
  91. package/dist/types/components/dropdown/dropdown.d.ts +4 -0
  92. package/dist/types/components/slider/slider.d.ts +2 -0
  93. package/dist/types/components/text-field/text-field.d.ts +5 -1
  94. package/dist/types/components.d.ts +18 -2
  95. package/package.json +1 -1
  96. package/dist/tegel/p-06d3490c.entry.js +0 -1
  97. package/dist/tegel/p-106e048d.entry.js +0 -1
  98. package/dist/tegel/p-397c8969.entry.js +0 -1
  99. package/dist/tegel/p-5c077bb9.entry.js +0 -1
  100. package/dist/tegel/p-61a1dc59.entry.js +0 -1
  101. package/dist/tegel/p-a0591e58.entry.js +0 -1
  102. package/dist/tegel/p-a98767ea.entry.js +0 -1
  103. package/dist/tegel/p-ae438c2e.entry.js +0 -1
  104. package/dist/tegel/p-dc375d3e.entry.js +0 -1
  105. package/dist/tegel/p-e3c2b6b4.entry.js +0 -1
@@ -23,13 +23,16 @@
23
23
  padding: 20px 4px;
24
24
  }
25
25
  :host ::slotted(*:focus-visible)::before {
26
+ outline: 2px solid var(--tds-focus-outline-color);
27
+ box-shadow: 0 0 0 1px var(--tds-white);
28
+ outline-offset: 1px;
29
+ z-index: 1;
26
30
  content: "";
27
31
  position: absolute;
28
32
  left: 0;
29
33
  right: 0;
30
- top: 20px;
31
- bottom: 20px;
32
- outline: 2px solid var(--tds-blue-400);
34
+ top: 3px;
35
+ bottom: 3px;
33
36
  }
34
37
  :host .inline-tab-item:not(.selected)::after {
35
38
  width: 0%;
@@ -42,6 +45,9 @@
42
45
  :host .inline-tab-item:hover {
43
46
  cursor: pointer;
44
47
  }
48
+ :host .inline-tab-item:hover ::slotted(*) {
49
+ color: var(--tds-inline-tabs-tab-color-hover);
50
+ }
45
51
  :host .inline-tab-item:hover::after {
46
52
  width: 100%;
47
53
  }
@@ -65,20 +71,19 @@
65
71
  width: 100%;
66
72
  background-color: var(--tds-inline-tabs-tab-indicator-background-active);
67
73
  }
68
- :host .disabled {
69
- color: var(--tds-inline-tabs-tab-color-disabled);
70
- }
71
- :host .disabled ::slotted(*) {
72
- opacity: var(--tds-inline-tabs-tab-color-opacity-disabled);
73
- }
74
74
  :host .disabled::after {
75
75
  content: none;
76
76
  }
77
+ :host .disabled ::slotted(*) {
78
+ color: var(--tds-inline-tabs-tab-color-disabled);
79
+ }
77
80
  :host .disabled ::slotted(*:hover) {
81
+ color: var(--tds-inline-tabs-tab-color-disabled);
78
82
  cursor: not-allowed;
79
83
  }
80
84
  :host .disabled ::slotted(*:focus-visible) {
81
85
  outline: none;
86
+ box-shadow: none;
82
87
  }
83
88
 
84
89
  :host(.last) {
@@ -10,7 +10,7 @@
10
10
  /* !important is needed here to prevent this from being overwritten by our CSS-reset. */
11
11
  font: var(--tds-headline-07) !important;
12
12
  letter-spacing: var(--tds-headline-07-ls) !important;
13
- color: var(--tds-navigation-tabs-tab-color) !important;
13
+ color: var(--tds-navigation-tabs-tab-color);
14
14
  text-decoration: none;
15
15
  display: block;
16
16
  position: relative;
@@ -19,16 +19,19 @@
19
19
  background-color: transparent;
20
20
  border: 0;
21
21
  width: 100%;
22
- padding: 26px 4px;
22
+ padding: 26px 0;
23
23
  }
24
24
  :host ::slotted(*:focus-visible)::before {
25
25
  content: "";
26
26
  position: absolute;
27
27
  left: 0;
28
28
  right: 0;
29
- top: 26px;
30
- bottom: 26px;
31
- outline: 2px solid var(--tds-blue-400);
29
+ top: 3px;
30
+ bottom: 3px;
31
+ outline: 2px solid var(--tds-focus-outline-color);
32
+ box-shadow: 0 0 0 1px var(--tds-white);
33
+ outline-offset: 1px;
34
+ z-index: 1;
32
35
  }
33
36
  :host .navigation-tab-item:not(.selected)::after {
34
37
  width: 0%;
@@ -36,11 +39,13 @@
36
39
  }
37
40
  :host .navigation-tab-item {
38
41
  position: relative;
39
- margin-right: 32px;
40
42
  }
41
43
  :host .navigation-tab-item:hover {
42
44
  cursor: pointer;
43
45
  }
46
+ :host .navigation-tab-item:hover ::slotted(*) {
47
+ color: var(--tds-navigation-tabs-tab-color-hover);
48
+ }
44
49
  :host .navigation-tab-item:hover::after {
45
50
  width: 100%;
46
51
  }
@@ -57,6 +62,9 @@
57
62
  background-color: var(--tds-navigation-tabs-tab-indicator-background-hover);
58
63
  z-index: 1;
59
64
  }
65
+ :host .navigation-tab-item:hover:focus-within::after {
66
+ bottom: 3px;
67
+ }
60
68
  :host .selected ::slotted(*) {
61
69
  color: var(--tds-navigation-tabs-tab-color-selected);
62
70
  }
@@ -64,17 +72,15 @@
64
72
  width: 100%;
65
73
  background-color: var(--tds-navigation-tabs-tab-indicator-background-active);
66
74
  }
67
- :host .disabled {
68
- color: var(--tds-navigation-tabs-tab-color-disabled);
69
- }
70
75
  :host .disabled ::slotted(*) {
71
- opacity: var(--tds-navigation-tabs-tab-color-opacity-disabled);
76
+ color: var(--tds-navigation-tabs-tab-color-disabled);
72
77
  }
73
78
  :host .disabled::after {
74
79
  content: none;
75
80
  }
76
81
  :host .disabled ::slotted(*:hover) {
77
82
  cursor: not-allowed;
83
+ color: var(--tds-navigation-tabs-tab-color-disabled);
78
84
  }
79
85
  :host .disabled ::slotted(*:focus-visible) {
80
86
  outline: none;
@@ -65,13 +65,23 @@
65
65
  :host .scroll-left-button:active {
66
66
  background-color: var(--tds-folder-tabs-scroll-btn-background-active);
67
67
  }
68
- :host .scroll-right-button:focus,
69
- :host .scroll-left-button:focus {
68
+ :host .scroll-right-button:focus::before,
69
+ :host .scroll-left-button:focus::before {
70
+ content: "";
71
+ position: absolute;
72
+ left: 3px;
73
+ right: 3px;
74
+ top: 3px;
75
+ bottom: 3px;
70
76
  outline: 2px solid var(--tds-focus-outline-color);
71
77
  box-shadow: 0 0 0 1px var(--tds-white);
72
78
  outline-offset: 1px;
73
79
  z-index: 1;
74
80
  }
81
+ :host .scroll-right-button:focus,
82
+ :host .scroll-left-button:focus {
83
+ outline: 0;
84
+ }
75
85
  :host .scroll-right-button svg,
76
86
  :host .scroll-left-button svg {
77
87
  fill: var(--tds-folder-tabs-scroll-btn-color);
@@ -27,6 +27,8 @@ export class TdsTextField {
27
27
  this.maxLength = undefined;
28
28
  this.autofocus = false;
29
29
  this.tdsAriaLabel = undefined;
30
+ this.required = false;
31
+ this.autocomplete = 'off';
30
32
  this.focusInput = false;
31
33
  }
32
34
  handleChange(event) {
@@ -71,7 +73,7 @@ export class TdsTextField {
71
73
  var _a;
72
74
  const usesPrefixSlot = hasSlot('prefix', this.host);
73
75
  const usesSuffixSlot = hasSlot('suffix', this.host);
74
- return (h("div", { key: 'b9fa2b03ce2a0b196dc6083614420d6f83675e3d', class: {
76
+ return (h("div", { key: '5176142333959937bf50a57083231c904bc904a5', class: {
75
77
  'form-text-field': true,
76
78
  'form-text-field-nomin': this.noMinWidth,
77
79
  'text-field-focus': this.focusInput && !this.disabled,
@@ -89,12 +91,12 @@ export class TdsTextField {
89
91
  'form-text-field-sm': this.size === 'sm',
90
92
  'form-text-field-error': this.state === 'error',
91
93
  'form-text-field-success': this.state === 'success',
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: {
94
+ } }, this.labelPosition === 'outside' && (h("div", { key: 'e2bf45f7635233e9d85edf3bdb8ce11270bc7662', class: "text-field-label-outside" }, h("label", { key: '223b6f56c6367aa1f3350cf5192323353815d7aa', htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), h("div", { key: '15549969c2aad58376b8a4398a189d1adae4ac38', onClick: () => this.textInput.focus(), class: "text-field-container" }, usesPrefixSlot && (h("div", { key: '2317c9f118169e7492016640b8ee16f06ff99c03', class: {
93
95
  'text-field-slot-wrap-prefix': true,
94
96
  'text-field-error': this.state === 'error',
95
97
  'text-field-success': this.state === 'success',
96
98
  'text-field-default': this.state === 'default',
97
- } }, h("slot", { key: '739e089cdb9798dc108b68c4858c90bf75e18958', name: "prefix" }))), h("div", { key: 'e4229be4e4bf421319184e798b98afcbaa361413', class: "text-field-input-container" }, h("input", { key: 'f462b4c0d49e4e070090f6a14df52af66b87648d', ref: (inputEl) => {
99
+ } }, h("slot", { key: '82ed6f444853365bfdba485477c51a224dfe8694', name: "prefix" }))), h("div", { key: '41009c0b3e0037f56c118040dfd1fd8b30046d1b', class: "text-field-input-container" }, h("input", { key: '22873b319a55725e23a1c0f394dc1b287b266610', ref: (inputEl) => {
98
100
  this.textInput = inputEl;
99
101
  }, class: {
100
102
  'text-field-input': true,
@@ -109,13 +111,13 @@ export class TdsTextField {
109
111
  if (!this.readOnly) {
110
112
  this.handleBlur(event);
111
113
  }
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: {
114
+ }, "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}`, required: this.required, autocomplete: this.autocomplete }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { key: '75991eafd96aba94557ab7a049778a3ea97b2ae7', class: "text-field-label-inside", htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), usesSuffixSlot && (h("div", { key: 'fffe2ff86f1e52b8ea8fc2783062c8b0395f237e', class: {
113
115
  'text-field-slot-wrap-suffix': true,
114
116
  'text-field-error': this.state === 'error',
115
117
  'text-field-success': this.state === 'success',
116
118
  'text-field-default': this.state === 'default',
117
119
  'tds-u-display-none': this.readOnly,
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: {
120
+ } }, h("slot", { key: '8f5525e5dea933ec1d592c81cb94d3516944fe36', name: "suffix" }))), this.readOnly && !this.hideReadOnlyIcon && (h("span", { key: 'c6db63da6886396b3185c1c2848ffb02172d8bb7', class: "text-field-icon__readonly" }, h("tds-tooltip", { key: '1c97a0f9a27445bc3db63507954379126935fcfa', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: '7cc3a6788517d70c9dd19206fc20922ecd2e0452', id: "readonly-tooltip", name: "edit_inactive", size: "20px" })))), h("div", { key: '4b55eb60fa52b4323ddafc302c0ad6eacd5ac4a5', "aria-live": "assertive" }, (this.helper || this.maxLength > 0) && (h("div", { key: '988750b05a617a6919548042ade5692d754da6b6', class: "text-field-helper", id: `text-field-helper-element-${this.uuid}` }, this.state === 'error' && (h("div", { key: 'b9f0a3bdbbcd1bac146f4bed21b9998ef436e80b', class: "text-field-helper-error-state" }, !this.readOnly && h("tds-icon", { key: 'b811d4216d615ad6ada5dc2cb88ab8f82dd87b47', name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, !this.readOnly && this.maxLength > 0 && (h("span", { key: 'c0ce5dc118f23327e9746c4d7784a61586913289', class: {
119
121
  'text-field-textcounter-divider': true,
120
122
  'text-field-textcounter-disabled': this.disabled,
121
123
  } }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, " / ", this.maxLength)))))));
@@ -138,8 +140,8 @@ export class TdsTextField {
138
140
  "type": "string",
139
141
  "mutable": false,
140
142
  "complexType": {
141
- "original": "'text' | 'password' | 'number'",
142
- "resolved": "\"number\" | \"password\" | \"text\"",
143
+ "original": "'text' | 'password' | 'number' | 'email' | 'tel'",
144
+ "resolved": "\"email\" | \"number\" | \"password\" | \"tel\" | \"text\"",
143
145
  "references": {}
144
146
  },
145
147
  "required": false,
@@ -470,6 +472,42 @@ export class TdsTextField {
470
472
  },
471
473
  "attribute": "tds-aria-label",
472
474
  "reflect": false
475
+ },
476
+ "required": {
477
+ "type": "boolean",
478
+ "mutable": false,
479
+ "complexType": {
480
+ "original": "boolean",
481
+ "resolved": "boolean",
482
+ "references": {}
483
+ },
484
+ "required": false,
485
+ "optional": false,
486
+ "docs": {
487
+ "tags": [],
488
+ "text": "Makes the text field required"
489
+ },
490
+ "attribute": "required",
491
+ "reflect": false,
492
+ "defaultValue": "false"
493
+ },
494
+ "autocomplete": {
495
+ "type": "string",
496
+ "mutable": false,
497
+ "complexType": {
498
+ "original": "string",
499
+ "resolved": "string",
500
+ "references": {}
501
+ },
502
+ "required": false,
503
+ "optional": false,
504
+ "docs": {
505
+ "tags": [],
506
+ "text": "Value to be used for the text field's autocomplete attribute"
507
+ },
508
+ "attribute": "autocomplete",
509
+ "reflect": false,
510
+ "defaultValue": "'off'"
473
511
  }
474
512
  };
475
513
  }
@@ -1,7 +1,7 @@
1
1
  import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
2
2
  import { i as inheritAriaAttributes } from './p-0bd4c19c.js';
3
3
  import { d as defineCustomElement$3 } from './p-9ad61cb5.js';
4
- import { d as defineCustomElement$2 } from './p-6adb1ce3.js';
4
+ import { d as defineCustomElement$2 } from './p-ad6babcd.js';
5
5
  import { d as defineCustomElement$1 } from './p-b390ece5.js';
6
6
 
7
7
  const headerLauncherButtonCss = ":host{display:block}:host tds-header-item{display:block}:host .icon{position:relative;margin-left:-6px;left:3px;transition:all 0.2s ease-in-out}";
@@ -0,0 +1,191 @@
1
+ import { p as proxyCustomElement, H, d as createEvent, h } from './p-28ef5186.js';
2
+ import { h as hasSlot } from './p-ae110fc2.js';
3
+ import { g as generateUniqueId } from './p-11648030.js';
4
+ import { d as defineCustomElement$3 } from './p-b390ece5.js';
5
+ import { d as defineCustomElement$2 } from './p-d3866be7.js';
6
+ import { d as defineCustomElement$1 } from './p-40253725.js';
7
+
8
+ 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);border-top:1px solid transparent;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-container.sc-tds-text-field:focus-within{border:2px solid var(--tds-focus-outline-color);margin:0 -2px}.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-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.sc-tds-text-field .tds-tooltip.sc-tds-text-field{min-width:150px}.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)}.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}";
9
+ const TdsTextFieldStyle0 = textFieldCss;
10
+
11
+ const TdsTextField = /*@__PURE__*/ proxyCustomElement(class TdsTextField extends H {
12
+ constructor() {
13
+ super();
14
+ this.__registerHost();
15
+ this.tdsChange = createEvent(this, "tdsChange", 6);
16
+ this.tdsInput = createEvent(this, "tdsInput", 6);
17
+ this.tdsFocus = createEvent(this, "tdsFocus", 6);
18
+ this.tdsBlur = createEvent(this, "tdsBlur", 6);
19
+ this.uuid = generateUniqueId();
20
+ this.type = 'text';
21
+ this.labelPosition = 'no-label';
22
+ this.label = '';
23
+ this.min = undefined;
24
+ this.max = undefined;
25
+ this.helper = undefined;
26
+ this.placeholder = '';
27
+ this.value = '';
28
+ this.disabled = false;
29
+ this.readOnly = false;
30
+ this.hideReadOnlyIcon = false;
31
+ this.size = 'lg';
32
+ this.modeVariant = null;
33
+ this.noMinWidth = false;
34
+ this.name = '';
35
+ this.state = 'default';
36
+ this.maxLength = undefined;
37
+ this.autofocus = false;
38
+ this.tdsAriaLabel = undefined;
39
+ this.required = false;
40
+ this.autocomplete = 'off';
41
+ this.focusInput = false;
42
+ }
43
+ handleChange(event) {
44
+ this.tdsChange.emit(event);
45
+ }
46
+ // Data input event in value prop
47
+ handleInput(event) {
48
+ const inputEl = event.target;
49
+ let { value } = inputEl;
50
+ // Custom handling of number inputs when min/max are set
51
+ if (this.type === 'number') {
52
+ const numericValue = Number(value);
53
+ if (this.min !== undefined && numericValue < Number(this.min)) {
54
+ value = String(this.min);
55
+ }
56
+ if (this.max !== undefined && numericValue > Number(this.max)) {
57
+ value = String(this.max);
58
+ }
59
+ inputEl.value = value;
60
+ }
61
+ this.value = value;
62
+ this.tdsInput.emit(event);
63
+ }
64
+ /** Set the input as focus when clicking the whole Text Field with suffix/prefix */
65
+ handleFocus(event) {
66
+ this.textInput.focus();
67
+ this.focusInput = true;
68
+ this.tdsFocus.emit(event);
69
+ }
70
+ /** Set the input as focus when clicking the whole Text Field with suffix/prefix */
71
+ handleBlur(event) {
72
+ this.focusInput = false;
73
+ this.tdsBlur.emit(event);
74
+ }
75
+ /** Method to handle focus */
76
+ async focusElement() {
77
+ if (this.textInput) {
78
+ this.textInput.focus();
79
+ }
80
+ }
81
+ render() {
82
+ var _a;
83
+ const usesPrefixSlot = hasSlot('prefix', this.host);
84
+ const usesSuffixSlot = hasSlot('suffix', this.host);
85
+ return (h("div", { key: '5176142333959937bf50a57083231c904bc904a5', class: {
86
+ 'form-text-field': true,
87
+ 'form-text-field-nomin': this.noMinWidth,
88
+ 'text-field-focus': this.focusInput && !this.disabled,
89
+ 'text-field-data': this.value !== '' && this.value !== null,
90
+ 'text-field-container-label-inside': this.labelPosition === 'inside' && this.size !== 'sm',
91
+ 'form-text-field-disabled': this.disabled,
92
+ 'form-text-field-readonly': this.disabled ? false : this.readOnly,
93
+ 'tds-mode-variant-primary': this.readOnly
94
+ ? this.modeVariant === 'secondary'
95
+ : this.modeVariant === 'primary',
96
+ 'tds-mode-variant-secondary': this.readOnly
97
+ ? this.modeVariant === 'primary'
98
+ : this.modeVariant === 'secondary',
99
+ 'form-text-field-md': this.size === 'md',
100
+ 'form-text-field-sm': this.size === 'sm',
101
+ 'form-text-field-error': this.state === 'error',
102
+ 'form-text-field-success': this.state === 'success',
103
+ } }, this.labelPosition === 'outside' && (h("div", { key: 'e2bf45f7635233e9d85edf3bdb8ce11270bc7662', class: "text-field-label-outside" }, h("label", { key: '223b6f56c6367aa1f3350cf5192323353815d7aa', htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), h("div", { key: '15549969c2aad58376b8a4398a189d1adae4ac38', onClick: () => this.textInput.focus(), class: "text-field-container" }, usesPrefixSlot && (h("div", { key: '2317c9f118169e7492016640b8ee16f06ff99c03', class: {
104
+ 'text-field-slot-wrap-prefix': true,
105
+ 'text-field-error': this.state === 'error',
106
+ 'text-field-success': this.state === 'success',
107
+ 'text-field-default': this.state === 'default',
108
+ } }, h("slot", { key: '82ed6f444853365bfdba485477c51a224dfe8694', name: "prefix" }))), h("div", { key: '41009c0b3e0037f56c118040dfd1fd8b30046d1b', class: "text-field-input-container" }, h("input", { key: '22873b319a55725e23a1c0f394dc1b287b266610', ref: (inputEl) => {
109
+ this.textInput = inputEl;
110
+ }, class: {
111
+ 'text-field-input': true,
112
+ 'text-field-input-sm': this.size === 'sm',
113
+ 'text-field-input-md': this.size === 'md',
114
+ 'text-field-input-lg': this.size === 'lg',
115
+ }, type: this.type, disabled: this.disabled, readonly: this.disabled ? false : this.readOnly, placeholder: this.placeholder, value: this.value, autofocus: this.autofocus, maxlength: this.maxLength, name: this.name, min: this.min, max: this.max, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onFocus: (event) => {
116
+ if (!this.readOnly) {
117
+ this.handleFocus(event);
118
+ }
119
+ }, onBlur: (event) => {
120
+ if (!this.readOnly) {
121
+ this.handleBlur(event);
122
+ }
123
+ }, "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}`, required: this.required, autocomplete: this.autocomplete }), this.labelPosition === 'inside' && this.size !== 'sm' && (h("label", { key: '75991eafd96aba94557ab7a049778a3ea97b2ae7', class: "text-field-label-inside", htmlFor: `text-field-input-element-${this.uuid}` }, this.label))), usesSuffixSlot && (h("div", { key: 'fffe2ff86f1e52b8ea8fc2783062c8b0395f237e', class: {
124
+ 'text-field-slot-wrap-suffix': true,
125
+ 'text-field-error': this.state === 'error',
126
+ 'text-field-success': this.state === 'success',
127
+ 'text-field-default': this.state === 'default',
128
+ 'tds-u-display-none': this.readOnly,
129
+ } }, h("slot", { key: '8f5525e5dea933ec1d592c81cb94d3516944fe36', name: "suffix" }))), this.readOnly && !this.hideReadOnlyIcon && (h("span", { key: 'c6db63da6886396b3185c1c2848ffb02172d8bb7', class: "text-field-icon__readonly" }, h("tds-tooltip", { key: '1c97a0f9a27445bc3db63507954379126935fcfa', placement: "top-end", text: "This field is non-editable", selector: "#readonly-tooltip" }), h("tds-icon", { key: '7cc3a6788517d70c9dd19206fc20922ecd2e0452', id: "readonly-tooltip", name: "edit_inactive", size: "20px" })))), h("div", { key: '4b55eb60fa52b4323ddafc302c0ad6eacd5ac4a5', "aria-live": "assertive" }, (this.helper || this.maxLength > 0) && (h("div", { key: '988750b05a617a6919548042ade5692d754da6b6', class: "text-field-helper", id: `text-field-helper-element-${this.uuid}` }, this.state === 'error' && (h("div", { key: 'b9f0a3bdbbcd1bac146f4bed21b9998ef436e80b', class: "text-field-helper-error-state" }, !this.readOnly && h("tds-icon", { key: 'b811d4216d615ad6ada5dc2cb88ab8f82dd87b47', name: "error", size: "16px" }), this.helper)), this.state !== 'error' && this.helper, !this.readOnly && this.maxLength > 0 && (h("span", { key: 'c0ce5dc118f23327e9746c4d7784a61586913289', class: {
130
+ 'text-field-textcounter-divider': true,
131
+ 'text-field-textcounter-disabled': this.disabled,
132
+ } }, this.value === null ? 0 : (_a = this.value) === null || _a === void 0 ? void 0 : _a.length, " / ", this.maxLength)))))));
133
+ }
134
+ get host() { return this; }
135
+ static get style() { return TdsTextFieldStyle0; }
136
+ }, [6, "tds-text-field", {
137
+ "type": [513],
138
+ "labelPosition": [1, "label-position"],
139
+ "label": [1],
140
+ "min": [8],
141
+ "max": [8],
142
+ "helper": [1],
143
+ "placeholder": [1],
144
+ "value": [513],
145
+ "disabled": [4],
146
+ "readOnly": [4, "read-only"],
147
+ "hideReadOnlyIcon": [4, "hide-read-only-icon"],
148
+ "size": [1],
149
+ "modeVariant": [1, "mode-variant"],
150
+ "noMinWidth": [4, "no-min-width"],
151
+ "name": [1],
152
+ "state": [1],
153
+ "maxLength": [2, "max-length"],
154
+ "autofocus": [4],
155
+ "tdsAriaLabel": [1, "tds-aria-label"],
156
+ "required": [4],
157
+ "autocomplete": [1],
158
+ "focusInput": [32],
159
+ "focusElement": [64]
160
+ }]);
161
+ function defineCustomElement() {
162
+ if (typeof customElements === "undefined") {
163
+ return;
164
+ }
165
+ const components = ["tds-text-field", "tds-icon", "tds-popover-core", "tds-tooltip"];
166
+ components.forEach(tagName => { switch (tagName) {
167
+ case "tds-text-field":
168
+ if (!customElements.get(tagName)) {
169
+ customElements.define(tagName, TdsTextField);
170
+ }
171
+ break;
172
+ case "tds-icon":
173
+ if (!customElements.get(tagName)) {
174
+ defineCustomElement$3();
175
+ }
176
+ break;
177
+ case "tds-popover-core":
178
+ if (!customElements.get(tagName)) {
179
+ defineCustomElement$2();
180
+ }
181
+ break;
182
+ case "tds-tooltip":
183
+ if (!customElements.get(tagName)) {
184
+ defineCustomElement$1();
185
+ }
186
+ break;
187
+ } });
188
+ }
189
+ defineCustomElement();
190
+
191
+ export { TdsTextField as T, defineCustomElement as d };
@@ -1,7 +1,7 @@
1
1
  import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
2
2
  import { d as dfs } from './p-52bf0fdf.js';
3
3
 
4
- const sideMenuItemCss = ":host{display:block}:host .component ::slotted(a),:host .component ::slotted(button){all:unset;box-sizing:border-box;height:68px;width:100%;display:flex;align-items:center;gap:10px;padding:0 22px;border:none;background-color:var(--tds-sidebar-side-menu-background-cover);font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);color:var(--tds-sidebar-side-menu-single-item-color);cursor:pointer}:host .component ::slotted(tds-side-menu-user),:host .component-has-user ::slotted(button){all:unset;box-sizing:border-box;height:68px;width:100%;display:flex;align-items:center;gap:16px;padding:0 22px 0 16px;border:none;background-color:var(--tds-sidebar-side-menu-background-cover);font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);color:var(--tds-sidebar-side-menu-single-item-color);cursor:pointer}:host .component tds-icon{color:red !important}:host .component ::slotted(a:focus-visible),:host .component ::slotted(button:focus-visible){outline:2px solid var(--tds-focus-outline-color);box-shadow:0 0 0 1px var(--tds-white);outline-offset:1px;z-index:1}:host .component:hover ::slotted(a),:host .component:hover ::slotted(button){background-color:var(--tds-sidebar-item-state-hover)}:host .component:active ::slotted(a),:host .component:active ::slotted(button){background-color:var(--tds-sidemenu-item-state-active)}:host .component-collapsed ::slotted(a),:host .component-collapsed ::slotted(button){padding:0;display:flex;justify-content:center;align-items:center;position:relative}:host .component-selected:not(:host .component-active) ::slotted(a),:host .component-selected:not(:host .component-active) ::slotted(button),:host .component-selected:not(:host .component-active) ::slotted(tds-side-menu-user){position:relative;background-color:var(--tds-sidebar-item-state-selected)}:host .component-selected:not(:host .component-active) ::slotted(a)::before,:host .component-selected:not(:host .component-active) ::slotted(button)::before,:host .component-selected:not(:host .component-active) ::slotted(tds-side-menu-user)::before{content:\"\";position:absolute;top:0;left:0;width:4px;height:100%;background-color:var(--tds-sidebar-side-menu-single-subitem-selected-border-color)}@media (min-width: 992px){:host .component.component-collapsed ::slotted(a),:host .component.component-collapsed ::slotted(button){color:rgba(90, 90, 90, 0);overflow:hidden}}";
4
+ const sideMenuItemCss = ":host{display:block}:host .component ::slotted(a),:host .component ::slotted(button){all:unset;box-sizing:border-box;height:68px;width:100%;display:flex;align-items:center;gap:10px;padding:0 22px;border:none;background-color:var(--tds-sidebar-side-menu-background-cover);font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);color:var(--tds-sidebar-side-menu-single-item-color);cursor:pointer}:host .component ::slotted(tds-side-menu-user),:host .component-has-user ::slotted(button){all:unset;box-sizing:border-box;height:68px;width:100%;display:flex;align-items:center;gap:16px;padding:0 22px 0 16px;border:none;background-color:var(--tds-sidebar-side-menu-background-cover);font:var(--tds-headline-07);letter-spacing:var(--tds-headline-07-ls);color:var(--tds-sidebar-side-menu-single-item-color);cursor:pointer}:host .component tds-icon{color:red !important}:host .component ::slotted(a:focus-visible),:host .component ::slotted(button:focus-visible){outline:2px solid var(--tds-focus-outline-color);box-shadow:inset 0 0 0 3px var(--tds-white);outline-offset:-2px}:host .component:hover ::slotted(a),:host .component:hover ::slotted(button),:host .component:hover ::slotted(tds-side-menu-user){background-color:var(--tds-sidebar-item-state-hover);position:relative}:host .component:hover ::slotted(a)::before,:host .component:hover ::slotted(button)::before,:host .component:hover ::slotted(tds-side-menu-user)::before{content:\"\";position:absolute;top:0;left:0;width:4px;height:100%;background-color:var(--tds-side-menu-item-hover-indicator)}:host .component:hover ::slotted(a:focus-visible),:host .component:hover ::slotted(button:focus-visible),:host .component:hover ::slotted(tds-side-menu-user:focus-visible){background-color:var(--tds-sidebar-item-state-hover);position:relative}:host .component:hover ::slotted(a:focus-visible)::before,:host .component:hover ::slotted(button:focus-visible)::before,:host .component:hover ::slotted(tds-side-menu-user:focus-visible)::before{content:\"\";position:absolute;top:3px;left:3px;width:4px;height:calc(100% - 6px);background-color:var(--tds-side-menu-item-hover-indicator)}:host .component:active ::slotted(a),:host .component:active ::slotted(button),:host .component:active ::slotted(tds-side-menu-user){background-color:var(--tds-sidemenu-item-state-active);position:relative}:host .component:active ::slotted(a)::before,:host .component:active ::slotted(button)::before,:host .component:active ::slotted(tds-side-menu-user)::before{content:\"\";position:absolute;top:0;left:0;width:4px;height:100%;background-color:var(--tds-side-menu-item-pressed-indicator)}:host .component:active ::slotted(a:focus-visible),:host .component:active ::slotted(button:focus-visible),:host .component:active ::slotted(tds-side-menu-user:focus-visible){background-color:var(--tds-sidemenu-item-state-active);position:relative}:host .component:active ::slotted(a:focus-visible)::before,:host .component:active ::slotted(button:focus-visible)::before,:host .component:active ::slotted(tds-side-menu-user:focus-visible)::before{content:\"\";position:absolute;top:3px;left:3px;width:4px;height:calc(100% - 6px);background-color:var(--tds-side-menu-item-pressed-indicator)}:host .component-collapsed ::slotted(a),:host .component-collapsed ::slotted(button){padding:0;display:flex;justify-content:center;align-items:center;position:relative}:host .component-selected:not(:host .component-active) ::slotted(a),:host .component-selected:not(:host .component-active) ::slotted(button),:host .component-selected:not(:host .component-active) ::slotted(tds-side-menu-user){background-color:var(--tds-sidebar-item-state-selected);position:relative}:host .component-selected:not(:host .component-active) ::slotted(a)::before,:host .component-selected:not(:host .component-active) ::slotted(button)::before,:host .component-selected:not(:host .component-active) ::slotted(tds-side-menu-user)::before{content:\"\";position:absolute;top:0;left:0;width:4px;height:100%;background-color:var(--tds-sidebar-side-menu-single-subitem-selected-border-color)}:host .component-selected:not(:host .component-active) ::slotted(a:focus-visible),:host .component-selected:not(:host .component-active) ::slotted(button:focus-visible),:host .component-selected:not(:host .component-active) ::slotted(tds-side-menu-user:focus-visible){background-color:var(--tds-sidebar-item-state-selected);position:relative}:host .component-selected:not(:host .component-active) ::slotted(a:focus-visible)::before,:host .component-selected:not(:host .component-active) ::slotted(button:focus-visible)::before,:host .component-selected:not(:host .component-active) ::slotted(tds-side-menu-user:focus-visible)::before{content:\"\";position:absolute;top:3px;left:3px;width:4px;height:calc(100% - 6px);background-color:var(--tds-sidebar-side-menu-single-subitem-selected-border-color)}@media (min-width: 992px){:host .component.component-collapsed ::slotted(a),:host .component.component-collapsed ::slotted(button){color:rgba(90, 90, 90, 0);overflow:hidden}}";
5
5
  const TdsSideMenuItemStyle0 = sideMenuItemCss;
6
6
 
7
7
  const TdsSideMenuItem = /*@__PURE__*/ proxyCustomElement(class TdsSideMenuItem extends H {
@@ -2,7 +2,7 @@ import { p as proxyCustomElement, H, h, c as Host } from './p-28ef5186.js';
2
2
  import { d as dfs } from './p-52bf0fdf.js';
3
3
  import { d as defineCustomElement$1 } from './p-9ad61cb5.js';
4
4
 
5
- const headerItemCss = ":host ::slotted(button),:host ::slotted(a){all:unset;box-sizing:border-box;background-color:var(--tds-header-background);border-right:1px solid var(--tds-header--basic-element-border);width:100%;height:100%;cursor:pointer;padding:0 24px;display:flex;align-items:center;gap:8px}:host ::slotted(button) *,:host ::slotted(a) *{box-sizing:border-box}:host ::slotted(button:hover),:host ::slotted(a:hover){background-color:var(--tds-header-item-hover)}:host ::slotted(button:focus-visible),:host ::slotted(a:focus-visible){outline:2px solid var(--tds-focus-outline-color);box-shadow:0 0 0 1px var(--tds-white);outline-offset:1px;z-index:1}:host .component-active ::slotted(button),:host .component-active ::slotted(a){background-color:var(--tds-header--basic-element-background-open);color:var(--tds-header-nav-item-dropdown-opened-color);border-color:var(--tds-header--basic-element-border-open)}:host .component-selected:not(.component-active) ::slotted(button),:host .component-selected:not(.component-active) ::slotted(a){background-color:var(--tds-header--basic-element-background-selected);padding-top:4px;border-bottom-style:solid;border-bottom-width:4px;border-bottom-color:var(--tds-nav-item-border-color-active)}";
5
+ const headerItemCss = ":host ::slotted(button),:host ::slotted(a){all:unset;box-sizing:border-box;background-color:var(--tds-header-background);border-right:1px solid var(--tds-header--basic-element-border);width:100%;height:100%;cursor:pointer;padding:0 24px;display:flex;align-items:center;gap:8px}:host ::slotted(button) *,:host ::slotted(a) *{box-sizing:border-box}:host ::slotted(button:hover),:host ::slotted(a:hover){background-color:var(--tds-header-item-hover)}:host ::slotted(button:focus-visible),:host ::slotted(a:focus-visible){border:none;outline:2px solid var(--tds-focus-outline-color);box-shadow:inset 0 0 0 3px var(--tds-white);outline-offset:-2px}:host .component-active ::slotted(button),:host .component-active ::slotted(a){background-color:var(--tds-header--basic-element-background-open);color:var(--tds-header-nav-item-dropdown-opened-color);border-color:var(--tds-header--basic-element-border-open)}:host .component-selected:not(.component-active) ::slotted(button),:host .component-selected:not(.component-active) ::slotted(a){background-color:var(--tds-header--basic-element-background-selected);padding-top:4px;border-bottom-style:solid;border-bottom-width:4px;border-bottom-color:var(--tds-nav-item-border-color-active)}";
6
6
  const TdsHeaderItemStyle0 = headerItemCss;
7
7
 
8
8
  const TdsHeaderItem = /*@__PURE__*/ proxyCustomElement(class TdsHeaderItem extends H {
@@ -66,10 +66,18 @@ const TdsDropdownOption = /*@__PURE__*/ proxyCustomElement(class TdsDropdownOpti
66
66
  }
67
67
  };
68
68
  this.handleFocus = (event) => {
69
- this.tdsFocus.emit(event);
69
+ // Focus events are now handled by the parent dropdown component
70
+ // Only emit if this is a standalone option (not within a dropdown)
71
+ if (!this.parentElement) {
72
+ this.tdsFocus.emit(event);
73
+ }
70
74
  };
71
75
  this.handleBlur = (event) => {
72
- this.tdsBlur.emit(event);
76
+ // Blur events are now handled by the parent dropdown component
77
+ // Only emit if this is a standalone option (not within a dropdown)
78
+ if (!this.parentElement) {
79
+ this.tdsBlur.emit(event);
80
+ }
73
81
  };
74
82
  this.value = undefined;
75
83
  this.internalValue = undefined;
@@ -90,7 +98,7 @@ const TdsDropdownOption = /*@__PURE__*/ proxyCustomElement(class TdsDropdownOpti
90
98
  this.internalValue = convertToString(this.value);
91
99
  }
92
100
  render() {
93
- return (h(Host, { key: 'd35a3153be292b1656d0efca93f06bfc1357041b' }, h("div", { key: '384353f9868a3fb559ca4140d5cd4f5553e024ad', class: `dropdown-option
101
+ return (h(Host, { key: '5448be3efbb06ae6d0fa3797f4b724c2d656d7a3' }, h("div", { key: '78945300c0bddb4ce95ab6f8de50eded1383dec7', class: `dropdown-option
94
102
  ${this.size}
95
103
  ${this.selected ? 'selected' : ''}
96
104
  ${this.disabled ? 'disabled' : ''}
@@ -100,6 +108,8 @@ const TdsDropdownOption = /*@__PURE__*/ proxyCustomElement(class TdsDropdownOpti
100
108
  }
101
109
  } }, h("tds-checkbox", { onTdsChange: (event) => {
102
110
  this.handleMultiselect(event);
111
+ }, onTdsBlur: (event) => {
112
+ event.stopPropagation();
103
113
  }, disabled: this.disabled, checked: this.selected, tdsAriaLabel: this.tdsAriaLabel, class: {
104
114
  [this.size]: true,
105
115
  } }, h("div", { slot: "label" }, h("slot", null))))) : (h("button", { role: "option", "aria-disabled": this.disabled, "aria-selected": this.selected, "aria-label": this.tdsAriaLabel, onClick: () => {