@sebgroup/green-core 1.61.0 → 1.62.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/README.md +1 -1
  2. package/chunks/{chunk.5L6LO6VX.js → chunk.23CV5ZVX.js} +1 -1
  3. package/chunks/{chunk.PBUUPCPL.js → chunk.2HRS24DL.js} +1 -1
  4. package/chunks/{chunk.SGFAP56K.js → chunk.33C4K67P.js} +1 -1
  5. package/chunks/{chunk.IS6GBDKU.js → chunk.5GGONGQJ.js} +1 -1
  6. package/chunks/{chunk.P2BOEVHE.js → chunk.5KE6BA6W.js} +2 -2
  7. package/chunks/{chunk.KTCN5HJV.js → chunk.62GGLEJC.js} +1 -1
  8. package/chunks/{chunk.27SYD4ZG.js → chunk.6XEAE7T2.js} +2 -2
  9. package/chunks/{chunk.S4DOMLSN.js → chunk.ADUUHJPG.js} +2 -2
  10. package/chunks/{chunk.HJBA7FLT.js → chunk.AMLIYQDY.js} +119 -118
  11. package/chunks/{chunk.M6S3B5GI.js → chunk.B6XZXYOU.js} +1 -1
  12. package/chunks/{chunk.B7X4UWIN.js → chunk.DEX5KV5V.js} +1 -1
  13. package/chunks/{chunk.KEPXMMGX.js → chunk.EPD6KSQZ.js} +1 -1
  14. package/chunks/{chunk.U44LH2CF.js → chunk.GOUYG42B.js} +149 -680
  15. package/chunks/{chunk.KMMI2BYQ.js → chunk.GPJ5MI3W.js} +1 -1
  16. package/chunks/{chunk.YRHYEHLO.js → chunk.I7GG3Q33.js} +1 -1
  17. package/chunks/{chunk.77RJTA43.js → chunk.IAXS24PX.js} +5 -1
  18. package/chunks/{chunk.QN5HFZCH.js → chunk.IGDBUU5K.js} +1 -1
  19. package/chunks/{chunk.NCZAYYNU.js → chunk.LI5LIVRH.js} +1 -1
  20. package/chunks/{chunk.RTE75ZOU.js → chunk.LQ4K7EOR.js} +118 -173
  21. package/chunks/{chunk.A2VYZXDP.js → chunk.M76HAN5Y.js} +57 -141
  22. package/chunks/chunk.MLXMQIEV.js +1 -1
  23. package/chunks/{chunk.UWI652VF.js → chunk.NCKHK5PG.js} +9 -7
  24. package/chunks/{chunk.BWVUFYGS.js → chunk.NRNM3BUT.js} +3 -1
  25. package/chunks/{chunk.OSIUU4NF.js → chunk.P754QIXB.js} +110 -197
  26. package/chunks/{chunk.WXBRUX3Q.js → chunk.QP3MOA3X.js} +8 -4
  27. package/chunks/{chunk.C3ZGNKY3.js → chunk.QYPIOUAZ.js} +2 -2
  28. package/chunks/{chunk.DBFF5KCR.js → chunk.RD5FN7GV.js} +1 -1
  29. package/chunks/{chunk.HOH7FXB5.js → chunk.S6M5XLHO.js} +2 -2
  30. package/chunks/{chunk.W6E54X7P.js → chunk.URGSIQTY.js} +1 -1
  31. package/chunks/{chunk.BYYROY6X.js → chunk.V2ZK6TAZ.js} +6 -6
  32. package/chunks/{chunk.Z3MHP5MN.js → chunk.V56VPSWH.js} +8 -1
  33. package/chunks/{chunk.H26SOC3M.js → chunk.VAZZUDR7.js} +2 -2
  34. package/chunks/{chunk.Z334YLO4.js → chunk.VN6UVCYW.js} +1 -1
  35. package/chunks/chunk.VZTV63IQ.js +0 -0
  36. package/chunks/{chunk.QIE6QJ5O.js → chunk.WFUIEWFH.js} +2 -2
  37. package/chunks/{chunk.RL2KSWKV.js → chunk.WLLP7PGV.js} +1 -1
  38. package/chunks/{chunk.YAPDYZK6.js → chunk.XLX3E2IF.js} +1 -1
  39. package/chunks/{chunk.3HGZ5B5Q.js → chunk.XMAA7CU5.js} +1 -1
  40. package/chunks/{chunk.FCB5VT3N.js → chunk.Y4CTMGFE.js} +3 -3
  41. package/chunks/{chunk.WV7BXKV6.js → chunk.YBNYFV2B.js} +2 -2
  42. package/chunks/{chunk.ZTRXED5A.js → chunk.YQOODS7V.js} +1 -1
  43. package/chunks/chunk.YZXHLCSN.js +301 -0
  44. package/chunks/{chunk.BHWBJIPJ.js → chunk.ZGC7DBIY.js} +4 -3
  45. package/chunks/{chunk.43JUKB53.js → chunk.ZRKILGXZ.js} +1 -7
  46. package/chunks/{chunk.MSDETVDW.js → chunk.ZTGI6G25.js} +1 -1
  47. package/components/badge/badge.js +5 -5
  48. package/components/badge/index.js +5 -5
  49. package/components/button/button.js +6 -6
  50. package/components/button/button.trans.styles.js +3 -1
  51. package/components/button/index.js +6 -6
  52. package/components/calendar/calendar.js +4 -4
  53. package/components/calendar/calendar.trans.styles.js +3 -1
  54. package/components/calendar/index.js +4 -4
  55. package/components/card/card.js +3 -3
  56. package/components/card/index.js +3 -3
  57. package/components/container/container.js +2 -2
  58. package/components/container/index.js +2 -2
  59. package/components/context-menu/context-menu.js +8 -6
  60. package/components/context-menu/context-menu.trans.styles.js +3 -1
  61. package/components/context-menu/index.js +9 -7
  62. package/components/datepicker/datepicker.d.ts +16 -13
  63. package/components/datepicker/datepicker.js +32 -14
  64. package/components/datepicker/datepicker.trans.styles.js +3 -1
  65. package/components/datepicker/index.js +32 -14
  66. package/components/dialog/dialog.js +9 -9
  67. package/components/dialog/index.js +9 -9
  68. package/components/divider/divider.js +2 -2
  69. package/components/divider/index.js +2 -2
  70. package/components/dropdown/dropdown.d.ts +22 -10
  71. package/components/dropdown/dropdown.js +28 -11
  72. package/components/dropdown/dropdown.trans.styles.js +3 -1
  73. package/components/dropdown/index.js +29 -12
  74. package/components/fab/fab.js +7 -7
  75. package/components/fab/index.js +7 -7
  76. package/components/filter-chips/filter-chip/filter-chip.js +7 -7
  77. package/components/filter-chips/filter-chip/filter-chip.trans.styles.js +3 -1
  78. package/components/filter-chips/filter-chip/index.js +7 -7
  79. package/components/filter-chips/filter-chips.js +8 -8
  80. package/components/filter-chips/filter-chips.trans.styles.js +3 -1
  81. package/components/filter-chips/index.js +8 -8
  82. package/components/flex/flex.js +3 -3
  83. package/components/flex/index.js +3 -3
  84. package/components/form/form-control.d.ts +4 -0
  85. package/components/form/form-control.js +1 -1
  86. package/components/form/index.js +6 -6
  87. package/components/form/summary/index.js +6 -6
  88. package/components/form/summary/summary.js +6 -6
  89. package/components/grid/grid.js +3 -3
  90. package/components/grid/index.js +3 -3
  91. package/components/grouped-list/grouped-list.js +4 -2
  92. package/components/grouped-list/grouped-list.trans.styles.js +3 -1
  93. package/components/grouped-list/index.js +4 -2
  94. package/components/icon/icons/index.js +9 -9
  95. package/components/img/img.js +2 -2
  96. package/components/img/index.js +2 -2
  97. package/components/index.js +48 -45
  98. package/components/input/index.js +15 -13
  99. package/components/input/input.d.ts +13 -12
  100. package/components/input/input.js +15 -13
  101. package/components/input/input.trans.styles.d.ts +2 -0
  102. package/components/input/input.trans.styles.js +13 -0
  103. package/components/link/index.js +3 -3
  104. package/components/link/link.js +3 -3
  105. package/components/mask/index.js +4 -4
  106. package/components/mask/mask.js +4 -4
  107. package/components/menu-button/index.js +3 -3
  108. package/components/menu-button/menu-button.js +3 -3
  109. package/components/popover/index.js +4 -2
  110. package/components/popover/popover.js +4 -2
  111. package/components/popover/popover.trans.styles.js +3 -1
  112. package/components/rich-text/index.js +3 -3
  113. package/components/rich-text/rich-text.js +3 -3
  114. package/components/segmented-control/index.js +5 -5
  115. package/components/segmented-control/segment/index.js +4 -4
  116. package/components/segmented-control/segment/segment.js +4 -4
  117. package/components/segmented-control/segment/segment.trans.styles.js +4 -2
  118. package/components/segmented-control/segmented-control.js +5 -5
  119. package/components/segmented-control/segmented-control.trans.styles.js +4 -2
  120. package/components/signal/index.js +2 -2
  121. package/components/signal/signal.js +2 -2
  122. package/components/spacer/index.js +2 -2
  123. package/components/spacer/spacer.js +2 -2
  124. package/components/text/index.js +2 -2
  125. package/components/text/text.js +2 -2
  126. package/components/textarea/index.js +15 -13
  127. package/components/textarea/textarea.d.ts +13 -17
  128. package/components/textarea/textarea.js +15 -13
  129. package/components/theme/index.js +4 -4
  130. package/components/theme/theme.js +4 -4
  131. package/components/theme/theme.trans.styles.js +4 -2
  132. package/components/video/index.js +2 -2
  133. package/components/video/video.js +2 -2
  134. package/index.js +48 -45
  135. package/package.json +1 -1
  136. package/primitives/field-base/field-base.d.ts +41 -0
  137. package/primitives/field-base/field-base.js +15 -0
  138. package/primitives/field-base/field-base.styles.d.ts +1 -0
  139. package/primitives/field-base/field-base.trans.styles.d.ts +2 -0
  140. package/primitives/field-base/index.d.ts +1 -0
  141. package/primitives/field-base/index.js +16 -0
  142. package/primitives/form-control-footer/form-control-footer.js +6 -6
  143. package/primitives/form-control-footer/index.js +6 -6
  144. package/primitives/form-control-header/form-control-header.js +9 -9
  145. package/primitives/form-control-header/index.js +9 -9
  146. package/primitives/listbox/index.js +6 -6
  147. package/primitives/listbox/listbox.js +6 -6
  148. package/primitives/listbox/option.js +5 -5
  149. package/primitives/menu/index.js +6 -4
  150. package/primitives/menu/menu-heading.js +4 -2
  151. package/primitives/menu/menu-item.js +5 -3
  152. package/primitives/menu/menu.js +6 -4
  153. package/primitives/ripple/index.js +3 -3
  154. package/primitives/ripple/ripple.js +3 -3
  155. package/transitional-styles.js +3 -1
package/README.md CHANGED
@@ -65,7 +65,7 @@ In your module:
65
65
 
66
66
  ```ts
67
67
  import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'
68
- import { NggCoreWrapperModule } from '@sebgroup/green-angular'
68
+ import { NggCoreWrapperModule } from '@sebgroup/green-angular/src/lib/shared'
69
69
 
70
70
  @NgModule({
71
71
  // Add the NggCoreWrapperModule to the `imports` array
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TransitionalStyles
3
- } from "./chunk.U44LH2CF.js";
3
+ } from "./chunk.GOUYG42B.js";
4
4
  import {
5
5
  GdsElement
6
6
  } from "./chunk.LQSWYCMZ.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  tokens
3
- } from "./chunk.BYYROY6X.js";
3
+ } from "./chunk.V2ZK6TAZ.js";
4
4
  import {
5
5
  GdsElement
6
6
  } from "./chunk.LQSWYCMZ.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  tokens
3
- } from "./chunk.BYYROY6X.js";
3
+ } from "./chunk.V2ZK6TAZ.js";
4
4
  import {
5
5
  GdsElement
6
6
  } from "./chunk.LQSWYCMZ.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.H2KG3F2S.js";
4
4
  import {
5
5
  tokens
6
- } from "./chunk.BYYROY6X.js";
6
+ } from "./chunk.V2ZK6TAZ.js";
7
7
  import {
8
8
  GdsElement
9
9
  } from "./chunk.LQSWYCMZ.js";
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  Focusable,
3
3
  option_styles_default
4
- } from "./chunk.43JUKB53.js";
4
+ } from "./chunk.ZRKILGXZ.js";
5
5
  import {
6
6
  TransitionalStyles
7
- } from "./chunk.U44LH2CF.js";
7
+ } from "./chunk.GOUYG42B.js";
8
8
  import {
9
9
  GdsElement
10
10
  } from "./chunk.LQSWYCMZ.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk.WM7HBMMV.js";
7
7
  import {
8
8
  tokens
9
- } from "./chunk.BYYROY6X.js";
9
+ } from "./chunk.V2ZK6TAZ.js";
10
10
  import {
11
11
  GdsElement
12
12
  } from "./chunk.LQSWYCMZ.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  TransitionalStyles
3
- } from "./chunk.U44LH2CF.js";
3
+ } from "./chunk.GOUYG42B.js";
4
4
  import {
5
5
  watch
6
6
  } from "./chunk.TYGMNHNO.js";
7
7
  import {
8
8
  tokens
9
- } from "./chunk.BYYROY6X.js";
9
+ } from "./chunk.V2ZK6TAZ.js";
10
10
  import {
11
11
  GdsElement
12
12
  } from "./chunk.LQSWYCMZ.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  GdsFlex
3
- } from "./chunk.WV7BXKV6.js";
3
+ } from "./chunk.YBNYFV2B.js";
4
4
  import {
5
5
  styleExpressionProperty
6
6
  } from "./chunk.H2KG3F2S.js";
7
7
  import {
8
8
  tokens
9
- } from "./chunk.BYYROY6X.js";
9
+ } from "./chunk.V2ZK6TAZ.js";
10
10
  import {
11
11
  gdsCustomElement
12
12
  } from "./chunk.MLXMQIEV.js";
@@ -1,18 +1,15 @@
1
1
  import {
2
2
  GdsFormControlElement
3
- } from "./chunk.Z3MHP5MN.js";
3
+ } from "./chunk.V56VPSWH.js";
4
4
  import {
5
5
  observeLightDOM
6
6
  } from "./chunk.WM7HBMMV.js";
7
- import {
8
- TransitionalStyles
9
- } from "./chunk.U44LH2CF.js";
10
7
  import {
11
8
  watch
12
9
  } from "./chunk.TYGMNHNO.js";
13
10
  import {
14
11
  tokens
15
- } from "./chunk.BYYROY6X.js";
12
+ } from "./chunk.V2ZK6TAZ.js";
16
13
  import {
17
14
  gdsCustomElement,
18
15
  html
@@ -26,9 +23,8 @@ import {
26
23
  } from "./chunk.SEHSDSX2.js";
27
24
 
28
25
  // libs/core/src/components/dropdown/dropdown.ts
29
- import { msg, str, updateWhenLocaleChanges } from "@lit/localize";
26
+ import { localized, msg, str } from "@lit/localize";
30
27
  import { property, query, queryAsync } from "lit/decorators.js";
31
- import { classMap } from "lit/directives/class-map.js";
32
28
  import { ifDefined } from "lit/directives/if-defined.js";
33
29
  import { unsafeHTML } from "lit/directives/unsafe-html.js";
34
30
  import { when } from "lit/directives/when.js";
@@ -42,78 +38,36 @@ var style = css`
42
38
  :host {
43
39
  display: flex;
44
40
  flex-direction: column;
45
- color: var(--gds-color-l3-content-tertiary);
46
- font-family: inherit;
41
+ width: 100%;
42
+ gap: var(--gds-space-xs);
43
+ contain: layout;
44
+ isolation: isolate;
45
+ --_transition: all 368ms cubic-bezier(0.4, 0, 0.2, 1);
47
46
  }
48
47
 
49
- button {
50
- display: flex;
51
- align-items: center;
52
- justify-content: space-between;
53
- gap: var(--gds-space-m);
54
- height: var(--gds-space-3xl);
55
- border-style: solid;
56
- border-width: var(--gds-space-4xs);
57
- border-radius: var(--gds-space-xs);
58
- padding-inline: var(--gds-space-m);
48
+ #field::part(_base) {
59
49
  cursor: pointer;
60
- box-sizing: border-box;
61
- font-size: var(--gds-space-m);
62
- font-family: inherit;
63
- border-color: var(--gds-color-l3-border-secondary);
64
- color: var(--gds-color-l3-content-tertiary);
65
- background-color: var(--gds-color-l3-background-secondary);
66
- outline-color: transparent;
67
- outline-offset: var(--gds-space-3xs);
68
- outline-style: solid;
69
- outline-width: var(--gds-space-3xs);
70
- transition:
71
- background-color 0.2s,
72
- border-color 0.2s,
73
- color 0.2s;
74
-
75
- &:focus {
76
- outline-color: color-mix(in srgb, currentcolor, #000 100%);
77
-
78
- &:not(:focus-visible) {
79
- outline-color: transparent;
80
- }
81
- }
82
-
83
- &.small {
84
- height: var(--gds-space-xl);
85
- padding: var(--gds-space-s);
86
- padding-right: var(--gds-space-xs);
87
- font-size: calc(var(--gds-space-s) + 2px);
88
-
89
- .icon {
90
- width: var(--gds-space-l);
91
- height: var(--gds-space-l);
92
- }
93
- }
50
+ }
94
51
 
95
- @media (pointer: fine) {
96
- &:hover {
97
- background-color: color-mix(
98
- in srgb,
99
- var(--gds-color-l3-background-secondary),
100
- var(--gds-color-l3-states-light-hover)
101
- );
102
- }
103
- }
52
+ button {
53
+ appearance: none;
54
+ background: transparent;
55
+ border-width: 0;
56
+ font-family: inherit;
57
+ font-size: inherit;
58
+ line-height: inherit;
59
+ color: currentColor;
60
+ cursor: pointer;
61
+ padding: 0;
62
+ text-align: left;
63
+ flex: 0 1 100%;
104
64
 
105
- .icon {
106
- display: flex;
107
- align-items: center;
108
- justify-content: center;
109
- box-sizing: border-box;
110
- height: var(--gds-space-xl);
111
- width: var(--gds-space-xl);
112
- }
65
+ /* This prevents overflow when the text is too long */
66
+ display: grid;
67
+ }
113
68
 
114
- &[aria-expanded='true'] ::part(icon) {
115
- transform: scaleY(-1);
116
- }
69
+ button:focus {
70
+ outline: none;
117
71
  }
118
72
 
119
73
  slot[name='trigger'] > span {
@@ -123,14 +77,6 @@ var style = css`
123
77
  white-space: nowrap;
124
78
  }
125
79
 
126
- label {
127
- font-size: var(--gds-text-size-detail-m);
128
- line-height: var(--gds-text-line-height-detail-m);
129
- font-weight: var(--gds-text-weight-book);
130
- padding-block: var(--gds-space-2xs);
131
- font-family: inherit;
132
- }
133
-
134
80
  input[type='text'] {
135
81
  border-radius: var(--gds-space-xs);
136
82
  border-bottom-left-radius: 0;
@@ -161,6 +107,10 @@ var style = css`
161
107
  color: var(--gds-color-l3-content-disabled);
162
108
  }
163
109
  }
110
+
111
+ [aria-expanded='true'] [slot='trail'] {
112
+ transform: scaleY(-1);
113
+ }
164
114
  }
165
115
  `;
166
116
  var dropdown_styles_default = style;
@@ -169,7 +119,7 @@ var dropdown_styles_default = style;
169
119
  var _optionElements, _calcMaxHeight, _handleSearchFieldInput, _handleSearchFieldKeyDown, _handleListboxKeyDown, _handleOptionFocusChange, _handleSelectionChange, handleSelectionChange_fn, _registerAutoCloseListener, registerAutoCloseListener_fn, _unregisterAutoCloseListener, unregisterAutoCloseListener_fn, _blurCloseListener, _tabCloseListener;
170
120
  var GdsDropdown = class extends GdsFormControlElement {
171
121
  constructor() {
172
- super();
122
+ super(...arguments);
173
123
  /**
174
124
  * Selects an option in the dropdown.
175
125
  *
@@ -178,7 +128,7 @@ var GdsDropdown = class extends GdsFormControlElement {
178
128
  __privateAdd(this, _handleSelectionChange);
179
129
  __privateAdd(this, _registerAutoCloseListener);
180
130
  __privateAdd(this, _unregisterAutoCloseListener);
181
- this.label = "";
131
+ this.supportingText = "";
182
132
  this.open = false;
183
133
  this.searchable = false;
184
134
  this.multiple = false;
@@ -265,7 +215,6 @@ var GdsDropdown = class extends GdsFormControlElement {
265
215
  (_a = this._elTriggerBtn) == null ? void 0 : _a.focus();
266
216
  }
267
217
  });
268
- updateWhenLocaleChanges(this);
269
218
  }
270
219
  get type() {
271
220
  return "gds-dropdown";
@@ -311,9 +260,23 @@ var GdsDropdown = class extends GdsFormControlElement {
311
260
  }
312
261
  return displayValue || ((_b = this.placeholder) == null ? void 0 : _b.innerHTML) || "";
313
262
  }
263
+ /**
264
+ * Moves focus to this element.
265
+ */
266
+ focus() {
267
+ this._getValidityAnchor().focus();
268
+ }
269
+ /**
270
+ * A reference to the field element. This does not refer to the trigger button element itself,
271
+ * but the wrapper that makes up the visual field.
272
+ * Intended for use in integration tests.
273
+ */
274
+ test_getFieldElement() {
275
+ var _a;
276
+ return (_a = this.shadowRoot) == null ? void 0 : _a.querySelector("#field");
277
+ }
314
278
  connectedCallback() {
315
279
  super.connectedCallback();
316
- TransitionalStyles.instance.apply(this, "gds-dropdown");
317
280
  this.updateComplete.then(() => {
318
281
  this._handleLightDOMChange();
319
282
  this._handleValueChange();
@@ -322,12 +285,26 @@ var GdsDropdown = class extends GdsFormControlElement {
322
285
  render() {
323
286
  return html`
324
287
  ${when(
325
- this.label && !this.hideLabel,
326
- () => html`<label for="trigger">${this.label}</label>`
288
+ !this.hideLabel,
289
+ () => html`
290
+ <gds-form-control-header>
291
+ <label id="label" for="trigger" slot="label">${this.label}</label>
292
+ ${when(
293
+ this.supportingText.length > 0,
294
+ () => html`<span slot="supporting-text" id="supporting-text">
295
+ ${this.supportingText}
296
+ </span>`
297
+ )}
298
+ <slot
299
+ id="extended-supporting-text"
300
+ name="extended-supporting-text"
301
+ slot="extended-supporting-text"
302
+ ></slot>
303
+ <!-- @deprecated: use 'supporting-text' slot instead. Remove in 2.0 release. -->
304
+ <slot id="sub-label" name="sub-label" slot="supporting-text"></slot>
305
+ </gds-form-control-header>
306
+ `
327
307
  )}
328
-
329
- <span class="form-info"><slot name="sub-label"></slot></span>
330
-
331
308
  <gds-popover
332
309
  .label=${this.label}
333
310
  .open=${this.open}
@@ -336,26 +313,35 @@ var GdsDropdown = class extends GdsFormControlElement {
336
313
  .disableMobileStyles=${this.disableMobileStyles}
337
314
  @gds-ui-state=${(e) => this.open = e.detail.open}
338
315
  >
339
- <button
340
- id="trigger"
341
- name="trigger"
342
- aria-haspopup="listbox"
316
+ <gds-field-base
317
+ .size=${this.size}
318
+ .disabled=${this.disabled}
319
+ .invalid=${this.invalid}
343
320
  slot="trigger"
344
- role="combobox"
345
- aria-owns="listbox"
346
- aria-controls="listbox"
347
- aria-expanded="${this.open}"
348
- aria-label="${this.label}"
349
- part="trigger"
350
- class=${classMap({ small: this.size === "small" })}
321
+ id="field"
351
322
  >
352
- <slot name="trigger">
353
- <span>${unsafeHTML(this.displayValue)}</span>
354
- </slot>
355
- <div class="icon">
356
- <gds-icon-chevron-bottom></gds-icon-chevron-bottom>
357
- </div>
358
- </button>
323
+ <slot name="lead" slot="lead"></slot>
324
+ <button
325
+ id="trigger"
326
+ role="combobox"
327
+ aria-expanded="${this.open}"
328
+ aria-owns="listbox"
329
+ aria-haspopup="listbox"
330
+ aria-controls="listbox"
331
+ name="trigger"
332
+ aria-label="${this.label} ${this.displayValue}"
333
+ aria-describedby="supporting-text extended-supporting-text sub-label message"
334
+ aria-invalid="${this.invalid}"
335
+ aria-required="${this.required}"
336
+ aria-disabled="${this.disabled}"
337
+ >
338
+ <slot name="trigger">
339
+ <span>${unsafeHTML(this.displayValue)}</span>
340
+ </slot>
341
+ </button>
342
+ <gds-icon-chevron-bottom slot="trail"></gds-icon-chevron-bottom>
343
+ </gds-field-base>
344
+
359
345
  ${when(
360
346
  this.searchable,
361
347
  () => html`<input
@@ -379,9 +365,27 @@ var GdsDropdown = class extends GdsFormControlElement {
379
365
  </gds-listbox>
380
366
  </gds-popover>
381
367
 
382
- <span class="form-info"
383
- ><slot name="message">${this.validationMessage}</slot></span
384
- >
368
+ ${when(
369
+ !this.hideLabel,
370
+ () => html`
371
+ <gds-form-control-footer class="size-${this.size}">
372
+ ${when(
373
+ this.invalid,
374
+ // @deprecated
375
+ // Wrapped in a slot for backwards compatibility with the deprecated message slot
376
+ // Remove for 2.0 release
377
+ () => html`
378
+ <slot id="message" name="message" slot="message">
379
+ <gds-icon-triangle-exclamation
380
+ solid
381
+ ></gds-icon-triangle-exclamation>
382
+ ${this.errorMessage || this.validationMessage}
383
+ </slot>
384
+ `
385
+ )}
386
+ </gds-form-control-footer>
387
+ `
388
+ )}
385
389
  `;
386
390
  }
387
391
  _getValidityAnchor() {
@@ -488,13 +492,9 @@ unregisterAutoCloseListener_fn = function() {
488
492
  _blurCloseListener = new WeakMap();
489
493
  _tabCloseListener = new WeakMap();
490
494
  GdsDropdown.styles = [tokens, dropdown_styles_default];
491
- GdsDropdown.shadowRootOptions = {
492
- mode: "open",
493
- delegatesFocus: true
494
- };
495
495
  __decorateClass([
496
- property()
497
- ], GdsDropdown.prototype, "label", 2);
496
+ property({ attribute: "supporting-text" })
497
+ ], GdsDropdown.prototype, "supportingText", 2);
498
498
  __decorateClass([
499
499
  property({ type: Boolean, reflect: true })
500
500
  ], GdsDropdown.prototype, "open", 2);
@@ -549,7 +549,8 @@ __decorateClass([
549
549
  watch("open")
550
550
  ], GdsDropdown.prototype, "_onOpenChange", 1);
551
551
  GdsDropdown = __decorateClass([
552
- gdsCustomElement("gds-dropdown")
552
+ gdsCustomElement("gds-dropdown"),
553
+ localized()
553
554
  ], GdsDropdown);
554
555
 
555
556
  export {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TransitionalStyles
3
- } from "./chunk.U44LH2CF.js";
3
+ } from "./chunk.GOUYG42B.js";
4
4
  import {
5
5
  GdsElement
6
6
  } from "./chunk.LQSWYCMZ.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk.H2KG3F2S.js";
7
7
  import {
8
8
  tokens
9
- } from "./chunk.BYYROY6X.js";
9
+ } from "./chunk.V2ZK6TAZ.js";
10
10
  import {
11
11
  GdsElement
12
12
  } from "./chunk.LQSWYCMZ.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TransitionalStyles
3
- } from "./chunk.U44LH2CF.js";
3
+ } from "./chunk.GOUYG42B.js";
4
4
  import {
5
5
  GdsElement
6
6
  } from "./chunk.LQSWYCMZ.js";