@sebgroup/green-core 1.64.0 → 1.65.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 (155) hide show
  1. package/chunks/{chunk.UDMQ6ZPV.js → chunk.25ME3RJJ.js} +1 -1
  2. package/chunks/{chunk.YYLPMTLX.js → chunk.2NIJ42AV.js} +2 -2
  3. package/chunks/{chunk.DPXMDOM6.js → chunk.3CV43MWE.js} +1 -1
  4. package/chunks/{chunk.ECUZICLN.js → chunk.4V2MDCOG.js} +1 -1
  5. package/chunks/{chunk.6OBCHB45.js → chunk.5GKJYSBV.js} +1 -1
  6. package/chunks/{chunk.CJPQT2NX.js → chunk.76CTWWTO.js} +19 -4
  7. package/chunks/{chunk.UBQF2XNY.js → chunk.7C7Y6WAE.js} +2 -2
  8. package/chunks/{chunk.GHQJQMIT.js → chunk.7E76OQO4.js} +2 -2
  9. package/chunks/{chunk.FKS2NX4H.js → chunk.7IJ45CPT.js} +2 -2
  10. package/chunks/{chunk.RZ7ZIX2E.js → chunk.AYJHEQ2T.js} +2 -2
  11. package/chunks/{chunk.XCRRXI2A.js → chunk.BIWJJ7RK.js} +2 -2
  12. package/chunks/{chunk.C2QMTTFS.js → chunk.C3QNLD2U.js} +1 -1
  13. package/chunks/{chunk.AXMGASII.js → chunk.CIUHRMH7.js} +1 -1
  14. package/chunks/{chunk.YXUQ3IEC.js → chunk.CPR6XAI3.js} +1 -1
  15. package/chunks/chunk.DO27JKTH.js +324 -0
  16. package/chunks/{chunk.EXH47S7D.js → chunk.G4HNP6TT.js} +28 -17
  17. package/chunks/{chunk.KPFSHDJT.js → chunk.GXBOA37S.js} +33 -21
  18. package/chunks/{chunk.G5EFP65Y.js → chunk.H2TXX4BQ.js} +1 -1
  19. package/chunks/{chunk.DW7XJE5K.js → chunk.HBUJSVUI.js} +11 -3
  20. package/chunks/{chunk.CGNUY4TK.js → chunk.IEWLS75F.js} +11 -10
  21. package/chunks/{chunk.RCJ3EMRO.js → chunk.KX63CZJW.js} +2 -2
  22. package/chunks/{chunk.K42R2T2R.js → chunk.LGGFMOPA.js} +1 -1
  23. package/chunks/{chunk.2XGJAHBM.js → chunk.LVFKJRDS.js} +6 -6
  24. package/chunks/{chunk.XUBBC66D.js → chunk.MU7FX7GD.js} +2 -2
  25. package/chunks/{chunk.K43RWIGA.js → chunk.N4MSKSFX.js} +1 -1
  26. package/chunks/{chunk.PJ4D723J.js → chunk.NBJT3RI4.js} +2 -2
  27. package/chunks/{chunk.G37OJWBW.js → chunk.NJWYS5RK.js} +1 -1
  28. package/chunks/{chunk.PH5ZZ7S2.js → chunk.NPHFPYPG.js} +1 -1
  29. package/chunks/{chunk.6OI7CI4L.js → chunk.NVBMHHKJ.js} +2 -2
  30. package/chunks/{chunk.PV5HHD5H.js → chunk.OGJ5JQNK.js} +1 -1
  31. package/chunks/{chunk.WIDAWXQ5.js → chunk.OTZMBHF7.js} +1 -1
  32. package/chunks/{chunk.TEIDKRJE.js → chunk.PKEO2IHM.js} +2 -2
  33. package/chunks/chunk.QK3R23GV.js +1 -1
  34. package/chunks/{chunk.HFKLQGPX.js → chunk.RADBGM4I.js} +1 -1
  35. package/chunks/{chunk.N72WEGLV.js → chunk.S3JQFYLY.js} +5 -5
  36. package/chunks/{chunk.EIN6QN27.js → chunk.SITEZ5J3.js} +1 -1
  37. package/chunks/{chunk.JWJA3C3S.js → chunk.TBVNQQGU.js} +5 -5
  38. package/chunks/{chunk.GBHL22GY.js → chunk.UOPJZ7LB.js} +1 -1
  39. package/chunks/{chunk.TURR45PB.js → chunk.VA6TUMR2.js} +9 -2
  40. package/chunks/{chunk.XB56TT52.js → chunk.VH2KPU5O.js} +1 -1
  41. package/chunks/{chunk.4RXC5LFK.js → chunk.ZCQDR3BZ.js} +1 -1
  42. package/chunks/{chunk.3V65T2OH.js → chunk.ZSHEAGDL.js} +1 -1
  43. package/components/badge/badge.js +4 -4
  44. package/components/badge/index.js +4 -4
  45. package/components/button/button.js +5 -5
  46. package/components/button/button.trans.styles.js +2 -2
  47. package/components/button/index.js +5 -5
  48. package/components/calendar/calendar.js +3 -3
  49. package/components/calendar/calendar.trans.styles.js +2 -2
  50. package/components/calendar/index.js +3 -3
  51. package/components/card/card.js +3 -3
  52. package/components/card/index.js +3 -3
  53. package/components/container/container.js +2 -2
  54. package/components/container/index.js +2 -2
  55. package/components/context-menu/context-menu.js +6 -6
  56. package/components/context-menu/context-menu.trans.styles.js +2 -2
  57. package/components/context-menu/index.js +7 -7
  58. package/components/datepicker/datepicker.d.ts +2 -1
  59. package/components/datepicker/datepicker.js +18 -18
  60. package/components/datepicker/datepicker.trans.styles.js +3 -3
  61. package/components/datepicker/index.js +18 -18
  62. package/components/dialog/dialog.js +9 -9
  63. package/components/dialog/index.js +9 -9
  64. package/components/divider/divider.js +2 -2
  65. package/components/divider/index.js +2 -2
  66. package/components/dropdown/dropdown.js +15 -15
  67. package/components/dropdown/dropdown.trans.styles.js +3 -3
  68. package/components/dropdown/index.js +16 -16
  69. package/components/fab/fab.js +6 -6
  70. package/components/fab/index.js +6 -6
  71. package/components/filter-chips/filter-chip/filter-chip.js +6 -6
  72. package/components/filter-chips/filter-chip/filter-chip.trans.styles.js +3 -3
  73. package/components/filter-chips/filter-chip/index.js +6 -6
  74. package/components/filter-chips/filter-chips.d.ts +2 -1
  75. package/components/filter-chips/filter-chips.js +7 -7
  76. package/components/filter-chips/filter-chips.trans.styles.js +3 -3
  77. package/components/filter-chips/index.js +7 -7
  78. package/components/flex/flex.js +3 -3
  79. package/components/flex/index.js +3 -3
  80. package/components/form/form-control.d.ts +3 -1
  81. package/components/form/form-control.js +1 -1
  82. package/components/form/index.js +5 -5
  83. package/components/form/summary/index.js +5 -5
  84. package/components/form/summary/summary.js +5 -5
  85. package/components/grid/grid.js +3 -3
  86. package/components/grid/index.js +3 -3
  87. package/components/grouped-list/grouped-list.js +3 -3
  88. package/components/grouped-list/grouped-list.trans.styles.js +3 -3
  89. package/components/grouped-list/index.js +3 -3
  90. package/components/icon/icons/index.js +3 -3
  91. package/components/img/img.js +2 -2
  92. package/components/img/index.js +2 -2
  93. package/components/index.d.ts +1 -0
  94. package/components/index.js +48 -43
  95. package/components/input/index.js +13 -13
  96. package/components/input/input.d.ts +6 -2
  97. package/components/input/input.js +13 -13
  98. package/components/input/input.trans.styles.js +3 -3
  99. package/components/link/index.js +2 -2
  100. package/components/link/link.js +2 -2
  101. package/components/mask/index.js +4 -4
  102. package/components/mask/mask.js +4 -4
  103. package/components/menu-button/index.js +2 -2
  104. package/components/menu-button/menu-button.js +2 -2
  105. package/components/popover/index.js +3 -3
  106. package/components/popover/popover.js +3 -3
  107. package/components/popover/popover.trans.styles.js +2 -2
  108. package/components/rich-text/index.js +2 -2
  109. package/components/rich-text/rich-text.js +2 -2
  110. package/components/segmented-control/index.js +4 -4
  111. package/components/segmented-control/segment/index.js +3 -3
  112. package/components/segmented-control/segment/segment.js +3 -3
  113. package/components/segmented-control/segment/segment.trans.styles.js +3 -3
  114. package/components/segmented-control/segmented-control.js +4 -4
  115. package/components/segmented-control/segmented-control.trans.styles.js +3 -3
  116. package/components/select/index.d.ts +1 -0
  117. package/components/select/index.js +39 -0
  118. package/components/select/select.d.ts +77 -0
  119. package/components/select/select.js +39 -0
  120. package/components/select/select.styles.d.ts +1 -0
  121. package/components/select/select.trans.styles.d.ts +2 -0
  122. package/components/select/select.trans.styles.js +30 -0
  123. package/components/signal/index.js +2 -2
  124. package/components/signal/signal.js +2 -2
  125. package/components/spacer/index.js +2 -2
  126. package/components/spacer/spacer.js +2 -2
  127. package/components/text/index.js +3 -3
  128. package/components/text/text.js +3 -3
  129. package/components/textarea/index.js +13 -13
  130. package/components/textarea/textarea.d.ts +1 -1
  131. package/components/textarea/textarea.js +13 -13
  132. package/components/theme/index.js +3 -3
  133. package/components/theme/theme.js +3 -3
  134. package/components/theme/theme.trans.styles.js +3 -3
  135. package/components/video/index.js +2 -2
  136. package/components/video/video.js +2 -2
  137. package/index.js +48 -43
  138. package/package.json +1 -1
  139. package/primitives/field-base/field-base.js +3 -3
  140. package/primitives/field-base/index.js +3 -3
  141. package/primitives/form-control-footer/form-control-footer.js +4 -4
  142. package/primitives/form-control-footer/index.js +4 -4
  143. package/primitives/form-control-header/form-control-header.js +7 -7
  144. package/primitives/form-control-header/index.js +7 -7
  145. package/primitives/listbox/index.js +4 -4
  146. package/primitives/listbox/listbox.js +4 -4
  147. package/primitives/listbox/option.js +3 -3
  148. package/primitives/menu/index.js +4 -4
  149. package/primitives/menu/menu-heading.js +3 -3
  150. package/primitives/menu/menu-item.js +3 -3
  151. package/primitives/menu/menu.js +4 -4
  152. package/primitives/ripple/index.js +2 -2
  153. package/primitives/ripple/ripple.js +2 -2
  154. package/transitional-styles.js +2 -2
  155. /package/chunks/{chunk.4EWOQKZC.js → chunk.OE2OJVFW.js} +0 -0
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.WM7HBMMV.js";
4
4
  import {
5
5
  TransitionalStyles
6
- } from "./chunk.CGNUY4TK.js";
6
+ } from "./chunk.IEWLS75F.js";
7
7
  import {
8
8
  watch
9
9
  } from "./chunk.TYGMNHNO.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  GdsContainer
3
- } from "./chunk.AXMGASII.js";
3
+ } from "./chunk.CIUHRMH7.js";
4
4
  import {
5
5
  styleExpressionProperty
6
6
  } from "./chunk.K4KPKUH4.js";
7
7
  import {
8
8
  tokens
9
- } from "./chunk.2XGJAHBM.js";
9
+ } from "./chunk.LVFKJRDS.js";
10
10
  import {
11
11
  gdsCustomElement,
12
12
  html
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.K4KPKUH4.js";
4
4
  import {
5
5
  tokens
6
- } from "./chunk.2XGJAHBM.js";
6
+ } from "./chunk.LVFKJRDS.js";
7
7
  import {
8
8
  GdsElement
9
9
  } from "./chunk.TMEWQZER.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TransitionalStyles
3
- } from "./chunk.CGNUY4TK.js";
3
+ } from "./chunk.IEWLS75F.js";
4
4
  import {
5
5
  GdsElement
6
6
  } from "./chunk.TMEWQZER.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  tokens
3
- } from "./chunk.2XGJAHBM.js";
3
+ } from "./chunk.LVFKJRDS.js";
4
4
  import {
5
5
  gdsCustomElement
6
6
  } from "./chunk.QK3R23GV.js";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  GdsFormControlElement
3
- } from "./chunk.TURR45PB.js";
3
+ } from "./chunk.VA6TUMR2.js";
4
4
  import {
5
5
  observeLightDOM
6
6
  } from "./chunk.WM7HBMMV.js";
7
7
  import {
8
8
  TransitionalStyles
9
- } from "./chunk.CGNUY4TK.js";
9
+ } from "./chunk.IEWLS75F.js";
10
10
  import {
11
11
  tokens
12
- } from "./chunk.2XGJAHBM.js";
12
+ } from "./chunk.LVFKJRDS.js";
13
13
  import {
14
14
  gdsCustomElement,
15
15
  html
@@ -122,7 +122,7 @@ var button_style_default = `@layer tokens, core, a11y, ranks, sizes, variants, d
122
122
  flex: 1;
123
123
 
124
124
  &:focus {
125
- outline-color: color-mix(in srgb, currentcolor, #000 100%);
125
+ outline-color: var(--gds-color-l3-content-tertiary);
126
126
 
127
127
  &:not(:focus-visible) {
128
128
  outline-color: transparent;
@@ -244,6 +244,14 @@ var button_style_default = `@layer tokens, core, a11y, ranks, sizes, variants, d
244
244
  .positive {
245
245
  background-color: var(--gds-color-l3-background-positive);
246
246
 
247
+ &:focus {
248
+ outline-color: var(--gds-color-l3-content-positive);
249
+
250
+ &:not(:focus-visible) {
251
+ outline-color: transparent;
252
+ }
253
+ }
254
+
247
255
  @media (pointer: fine) {
248
256
  &:hover {
249
257
  background-color: color-mix(
@@ -312,6 +320,13 @@ var button_style_default = `@layer tokens, core, a11y, ranks, sizes, variants, d
312
320
  .negative {
313
321
  background-color: var(--gds-color-l3-background-negative);
314
322
 
323
+ &:focus {
324
+ outline-color: var(--gds-color-l3-content-negative);
325
+ &:not(:focus-visible) {
326
+ outline-color: transparent;
327
+ }
328
+ }
329
+
315
330
  @media (pointer: fine) {
316
331
  &:hover {
317
332
  background-color: color-mix(
@@ -4,13 +4,13 @@ import {
4
4
  } from "./chunk.ZRKILGXZ.js";
5
5
  import {
6
6
  TransitionalStyles
7
- } from "./chunk.CGNUY4TK.js";
7
+ } from "./chunk.IEWLS75F.js";
8
8
  import {
9
9
  watch
10
10
  } from "./chunk.TYGMNHNO.js";
11
11
  import {
12
12
  tokens
13
- } from "./chunk.2XGJAHBM.js";
13
+ } from "./chunk.LVFKJRDS.js";
14
14
  import {
15
15
  GdsElement
16
16
  } from "./chunk.TMEWQZER.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  GdsFlex
3
- } from "./chunk.6OI7CI4L.js";
3
+ } from "./chunk.NVBMHHKJ.js";
4
4
  import {
5
5
  styleExpressionProperty
6
6
  } from "./chunk.K4KPKUH4.js";
7
7
  import {
8
8
  tokens
9
- } from "./chunk.2XGJAHBM.js";
9
+ } from "./chunk.LVFKJRDS.js";
10
10
  import {
11
11
  gdsCustomElement
12
12
  } from "./chunk.QK3R23GV.js";
@@ -3,13 +3,13 @@ import {
3
3
  } from "./chunk.UEJZWDMS.js";
4
4
  import {
5
5
  GdsContainer
6
- } from "./chunk.AXMGASII.js";
6
+ } from "./chunk.CIUHRMH7.js";
7
7
  import {
8
8
  styleExpressionProperty
9
9
  } from "./chunk.K4KPKUH4.js";
10
10
  import {
11
11
  tokens
12
- } from "./chunk.2XGJAHBM.js";
12
+ } from "./chunk.LVFKJRDS.js";
13
13
  import {
14
14
  gdsCustomElement
15
15
  } from "./chunk.QK3R23GV.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  GdsFormControlElement
3
- } from "./chunk.TURR45PB.js";
3
+ } from "./chunk.VA6TUMR2.js";
4
4
  import {
5
5
  observeLightDOM
6
6
  } from "./chunk.WM7HBMMV.js";
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk.TYGMNHNO.js";
10
10
  import {
11
11
  tokens
12
- } from "./chunk.2XGJAHBM.js";
12
+ } from "./chunk.LVFKJRDS.js";
13
13
  import {
14
14
  gdsCustomElement,
15
15
  html
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  TransitionalStyles
3
- } from "./chunk.CGNUY4TK.js";
3
+ } from "./chunk.IEWLS75F.js";
4
4
  import {
5
5
  watch
6
6
  } from "./chunk.TYGMNHNO.js";
7
7
  import {
8
8
  tokens
9
- } from "./chunk.2XGJAHBM.js";
9
+ } from "./chunk.LVFKJRDS.js";
10
10
  import {
11
11
  GdsElement
12
12
  } from "./chunk.TMEWQZER.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TransitionalStyles
3
- } from "./chunk.CGNUY4TK.js";
3
+ } from "./chunk.IEWLS75F.js";
4
4
  import {
5
5
  GdsElement
6
6
  } from "./chunk.TMEWQZER.js";
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk.K4KPKUH4.js";
4
4
  import {
5
5
  tokens
6
- } from "./chunk.2XGJAHBM.js";
6
+ } from "./chunk.LVFKJRDS.js";
7
7
  import {
8
8
  GdsElement
9
9
  } from "./chunk.TMEWQZER.js";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./chunk.E62NOHQC.js";
5
5
  import {
6
6
  TransitionalStyles
7
- } from "./chunk.CGNUY4TK.js";
7
+ } from "./chunk.IEWLS75F.js";
8
8
  import {
9
9
  GdsElement
10
10
  } from "./chunk.TMEWQZER.js";
@@ -0,0 +1,324 @@
1
+ import {
2
+ GdsFormControlElement
3
+ } from "./chunk.VA6TUMR2.js";
4
+ import {
5
+ observeLightDOM
6
+ } from "./chunk.WM7HBMMV.js";
7
+ import {
8
+ watch
9
+ } from "./chunk.TYGMNHNO.js";
10
+ import {
11
+ tokens
12
+ } from "./chunk.LVFKJRDS.js";
13
+ import {
14
+ gdsCustomElement,
15
+ html
16
+ } from "./chunk.QK3R23GV.js";
17
+ import {
18
+ __decorateClass,
19
+ __privateAdd,
20
+ __privateGet,
21
+ __privateMethod,
22
+ __privateSet
23
+ } from "./chunk.SEHSDSX2.js";
24
+
25
+ // libs/core/src/components/select/select.ts
26
+ import { localized } from "@lit/localize";
27
+ import { property, query } from "lit/decorators.js";
28
+ import { classMap } from "lit/directives/class-map.js";
29
+
30
+ // libs/core/src/components/select/select.styles.ts
31
+ import { css } from "lit";
32
+ var styles = css`
33
+ @layer base, reset, transitional-styles;
34
+ @layer base {
35
+ :host {
36
+ display: flex;
37
+ flex-direction: column;
38
+ width: 100%;
39
+ contain: layout;
40
+ isolation: isolate;
41
+ gap: var(--gds-space-xs);
42
+ }
43
+
44
+ .select-container {
45
+ display: contents;
46
+ }
47
+
48
+ select,
49
+ ::slotted(select) {
50
+ appearance: none;
51
+ outline: none;
52
+ border: none;
53
+ font: inherit;
54
+ flex: 1;
55
+ box-sizing: border-box;
56
+ background: transparent;
57
+ height: 100%;
58
+ opacity: 0;
59
+ position: absolute;
60
+ z-index: 1;
61
+ inset: 0;
62
+
63
+ &::-ms-expand {
64
+ display: none;
65
+ }
66
+ }
67
+
68
+ select[multiple] {
69
+ opacity: 1;
70
+ position: relative;
71
+ width: 100%;
72
+ }
73
+
74
+ label {
75
+ flex: 1;
76
+ }
77
+ }
78
+ `;
79
+
80
+ // libs/core/src/components/select/select.ts
81
+ var _isValueInitialized, _handleSelectElementChange, _setValueFromSelectElement, setValueFromSelectElement_fn, _renderFieldContents, renderFieldContents_fn, _renderSlotLead, renderSlotLead_fn, _renderMainLabel, renderMainLabel_fn, _renderMainSlot, renderMainSlot_fn, _renderChevron, renderChevron_fn;
82
+ var GdsSelect = class extends GdsFormControlElement {
83
+ constructor() {
84
+ super(...arguments);
85
+ __privateAdd(this, _setValueFromSelectElement);
86
+ /**
87
+ * Renders the main content area of the select field.
88
+ * Composes the field from various sub-elements.
89
+ */
90
+ __privateAdd(this, _renderFieldContents);
91
+ /**
92
+ * Renders the leading slot content if provided.
93
+ */
94
+ __privateAdd(this, _renderSlotLead);
95
+ /**
96
+ * Renders the main label text for single-select mode.
97
+ * Shows either selected option text or placeholder.
98
+ */
99
+ __privateAdd(this, _renderMainLabel);
100
+ /**
101
+ * Renders the main slot and select container.
102
+ * The select container is where the native select is moved to.
103
+ */
104
+ __privateAdd(this, _renderMainSlot);
105
+ /**
106
+ * Renders the chevron icon button for single-select mode.
107
+ * Provides visual indication of dropdown functionality.
108
+ */
109
+ __privateAdd(this, _renderChevron);
110
+ this.supportingText = "";
111
+ this.size = "large";
112
+ __privateAdd(this, _isValueInitialized, false);
113
+ __privateAdd(this, _handleSelectElementChange, (e) => {
114
+ e.stopPropagation();
115
+ __privateMethod(this, _setValueFromSelectElement, setValueFromSelectElement_fn).call(this);
116
+ requestAnimationFrame(() => {
117
+ this.dispatchEvent(
118
+ new CustomEvent("input", {
119
+ detail: { value: this.value },
120
+ bubbles: true,
121
+ composed: true
122
+ })
123
+ );
124
+ this.dispatchEvent(
125
+ new CustomEvent("change", {
126
+ detail: { value: this.value },
127
+ bubbles: true,
128
+ composed: true
129
+ })
130
+ );
131
+ });
132
+ });
133
+ }
134
+ get value() {
135
+ return this._internalValue;
136
+ }
137
+ set value(value) {
138
+ __privateGet(this, _isValueInitialized) || __privateSet(this, _isValueInitialized, true);
139
+ this._internalValue = value;
140
+ }
141
+ /**
142
+ * Returns the display value for the select component.
143
+ * For single-select mode, this is the selected option text.
144
+ * For multi-select mode, this is a comma-separated list of selected option texts.
145
+ */
146
+ get displayValue() {
147
+ if (!this.selectElement)
148
+ return "";
149
+ return Array.from(this.selectElement.selectedOptions).map((o) => o.text).join(", ");
150
+ }
151
+ /**
152
+ * Wheter the select element is in multiple selection mode.
153
+ */
154
+ get multiple() {
155
+ var _a, _b;
156
+ return (_b = (_a = this.selectElement) == null ? void 0 : _a.multiple) != null ? _b : false;
157
+ }
158
+ connectedCallback() {
159
+ super.connectedCallback();
160
+ this.updateComplete.then(() => {
161
+ this._captureDOM();
162
+ this._handleValueChange();
163
+ });
164
+ }
165
+ render() {
166
+ const CLASSES = {
167
+ multiple: this.multiple
168
+ };
169
+ return html`
170
+ <gds-form-control-header class="size-${this.size}">
171
+ <label for="select" slot="label" id="label-text">${this.label}</label>
172
+ <span slot="supporting-text" id="supporting-text">
173
+ ${this.supportingText}
174
+ </span>
175
+ </gds-form-control-header>
176
+
177
+ <gds-field-base
178
+ .size=${this.size}
179
+ .disabled=${this.disabled}
180
+ .invalid=${this.invalid}
181
+ .multiline=${this.multiple}
182
+ align-items=${this.multiple ? "flex-start" : "center"}
183
+ class=${classMap(CLASSES)}
184
+ >
185
+ ${__privateMethod(this, _renderFieldContents, renderFieldContents_fn).call(this)}
186
+ </gds-field-base>
187
+
188
+ <gds-form-control-footer
189
+ class="size-${this.size}"
190
+ .validationMessage=${this.invalid && (this.errorMessage || this.validationMessage)}
191
+ ></gds-form-control-footer>
192
+ `;
193
+ }
194
+ _captureDOM() {
195
+ if (!this.shadowRoot || this.childNodes.length === 0 || !this._elSelectContainer)
196
+ return;
197
+ const cloned = Array.from(this.children).filter((n) => n.nodeName === "SELECT").map((node) => {
198
+ const clone = node.cloneNode(true);
199
+ clone.addEventListener("change", __privateGet(this, _handleSelectElementChange));
200
+ clone.addEventListener("input", __privateGet(this, _handleSelectElementChange));
201
+ clone.setAttribute(
202
+ "aria-describedby",
203
+ "supporting-text extended-supporting-text sub-label message"
204
+ );
205
+ clone.setAttribute("id", "select");
206
+ if (!__privateGet(this, _isValueInitialized))
207
+ this.value = clone.value;
208
+ return clone;
209
+ });
210
+ this._elSelectContainer.replaceChildren(...cloned);
211
+ }
212
+ /**
213
+ * Handles form reset events by selecting the first option.
214
+ */
215
+ formResetCallback() {
216
+ if (!this.selectElement)
217
+ return;
218
+ if (this.selectElement.multiple) {
219
+ Array.from(this.selectElement.options).forEach((option) => {
220
+ option.selected = false;
221
+ });
222
+ this.value = [];
223
+ } else {
224
+ const firstOption = this.selectElement.options[0];
225
+ if (firstOption) {
226
+ this.value = firstOption.value;
227
+ this.selectElement.value = firstOption.value;
228
+ }
229
+ }
230
+ }
231
+ _getValidityAnchor() {
232
+ return this.selectElement;
233
+ }
234
+ _handleValueChange() {
235
+ if (!this.selectElement)
236
+ return;
237
+ if (this.multiple) {
238
+ const valArr = this.value || [];
239
+ Array.from(this.selectElement.options).forEach((option) => {
240
+ option.selected = valArr.includes(option.value);
241
+ });
242
+ } else
243
+ this.selectElement.value = this.value;
244
+ this.requestUpdate();
245
+ }
246
+ };
247
+ _isValueInitialized = new WeakMap();
248
+ _handleSelectElementChange = new WeakMap();
249
+ _setValueFromSelectElement = new WeakSet();
250
+ setValueFromSelectElement_fn = function() {
251
+ if (!this.selectElement)
252
+ return;
253
+ if (this.multiple) {
254
+ const selectedOptions = Array.from(this.selectElement.selectedOptions);
255
+ this.value = selectedOptions.map((o) => o.value);
256
+ } else {
257
+ this.value = this.selectElement.value;
258
+ }
259
+ };
260
+ _renderFieldContents = new WeakSet();
261
+ renderFieldContents_fn = function() {
262
+ const elements = [
263
+ __privateMethod(this, _renderSlotLead, renderSlotLead_fn).call(this),
264
+ __privateMethod(this, _renderMainSlot, renderMainSlot_fn).call(this),
265
+ __privateMethod(this, _renderMainLabel, renderMainLabel_fn).call(this),
266
+ __privateMethod(this, _renderChevron, renderChevron_fn).call(this)
267
+ ];
268
+ return elements.map((element) => html`${element}`);
269
+ };
270
+ _renderSlotLead = new WeakSet();
271
+ renderSlotLead_fn = function() {
272
+ return html`<slot name="lead" slot="lead"></slot>`;
273
+ };
274
+ _renderMainLabel = new WeakSet();
275
+ renderMainLabel_fn = function() {
276
+ if (!this.multiple) {
277
+ return html`<label id="placeholder">${this.displayValue}</label>`;
278
+ }
279
+ };
280
+ _renderMainSlot = new WeakSet();
281
+ renderMainSlot_fn = function() {
282
+ return html`<div class="select-container"></div>`;
283
+ };
284
+ _renderChevron = new WeakSet();
285
+ renderChevron_fn = function() {
286
+ if (!this.multiple) {
287
+ return html` <gds-icon-chevron-bottom></gds-icon-chevron-bottom> `;
288
+ }
289
+ };
290
+ GdsSelect.styles = [tokens, styles];
291
+ __decorateClass([
292
+ property({ attribute: "supporting-text" })
293
+ ], GdsSelect.prototype, "supportingText", 2);
294
+ __decorateClass([
295
+ property({ type: String })
296
+ ], GdsSelect.prototype, "size", 2);
297
+ __decorateClass([
298
+ query("select")
299
+ ], GdsSelect.prototype, "selectElement", 2);
300
+ __decorateClass([
301
+ property()
302
+ ], GdsSelect.prototype, "value", 1);
303
+ __decorateClass([
304
+ query(".select-container")
305
+ ], GdsSelect.prototype, "_elSelectContainer", 2);
306
+ __decorateClass([
307
+ observeLightDOM({
308
+ childList: true,
309
+ subtree: true,
310
+ attributes: true,
311
+ characterData: true
312
+ })
313
+ ], GdsSelect.prototype, "_captureDOM", 1);
314
+ __decorateClass([
315
+ watch("value")
316
+ ], GdsSelect.prototype, "_handleValueChange", 1);
317
+ GdsSelect = __decorateClass([
318
+ gdsCustomElement("gds-select"),
319
+ localized()
320
+ ], GdsSelect);
321
+
322
+ export {
323
+ GdsSelect
324
+ };
@@ -4,16 +4,16 @@ import {
4
4
  } from "./chunk.C3ECHGX7.js";
5
5
  import {
6
6
  GdsFormControlElement
7
- } from "./chunk.TURR45PB.js";
7
+ } from "./chunk.VA6TUMR2.js";
8
8
  import {
9
9
  TransitionalStyles
10
- } from "./chunk.CGNUY4TK.js";
10
+ } from "./chunk.IEWLS75F.js";
11
11
  import {
12
12
  watch
13
13
  } from "./chunk.TYGMNHNO.js";
14
14
  import {
15
15
  tokens
16
- } from "./chunk.2XGJAHBM.js";
16
+ } from "./chunk.LVFKJRDS.js";
17
17
  import {
18
18
  gdsCustomElement,
19
19
  html
@@ -54,12 +54,18 @@ var styles = css`
54
54
  min-width: 200px;
55
55
  }
56
56
 
57
+ ::part(_button) {
58
+ outline-offset: -1px;
59
+ }
60
+
57
61
  .spinners {
58
62
  display: flex;
59
63
  align-items: center;
60
64
  justify-content: flex-start;
61
- min-width: 10ch;
62
- gap: var(--gds-space-2xs);
65
+ inline-size: 11ch;
66
+ gap: var(--gds-space-4xs);
67
+ font-size: var(--gds-text-size-detail-s);
68
+ font-weight: var(--gds-text-weight-regular);
63
69
  }
64
70
 
65
71
  .spinner {
@@ -69,9 +75,8 @@ var styles = css`
69
75
  text-align: center;
70
76
  height: 100%;
71
77
  box-sizing: border-box;
72
- border-radius: var(--gds-space-2xs);
78
+ /* border-radius: var(--gds-space-2xs); */
73
79
  outline: none;
74
- padding-inline: var(--gds-space-2xs);
75
80
  padding-block: var(--gds-space-3xs);
76
81
  text-transform: uppercase;
77
82
  line-height: 1;
@@ -81,14 +86,6 @@ var styles = css`
81
86
  background-color: var(--gds-color-l3-background-primary);
82
87
  color: var(--gds-color-l3-content-primary);
83
88
  }
84
-
85
- &[data-max-width='4'] {
86
- width: calc(4ch + (var(--gds-space-2xs) * 2));
87
- }
88
-
89
- &[data-max-width='2'] {
90
- width: calc(2ch + (var(--gds-space-2xs) * 2));
91
- }
92
89
  }
93
90
  }
94
91
  `;
@@ -293,6 +290,12 @@ var GdsDatepicker = class extends GdsFormControlElement {
293
290
  get type() {
294
291
  return "gds-datepicker";
295
292
  }
293
+ get value() {
294
+ return this._internalValue;
295
+ }
296
+ set value(value) {
297
+ this._internalValue = value;
298
+ }
296
299
  get dateformat() {
297
300
  return this._dateFormatLayout.layout.map((f) => f.token).join(this._dateFormatLayout.delimiter);
298
301
  }
@@ -391,6 +394,7 @@ var GdsDatepicker = class extends GdsFormControlElement {
391
394
  slot="action"
392
395
  size="${this.size === "small" ? "xs" : "small"}"
393
396
  rank="tertiary"
397
+ variant=${this.invalid ? "negative" : ""}
394
398
  aria-label="${msg("Open calendar modal")}"
395
399
  aria-haspopup="menu"
396
400
  aria-expanded=${this.open}
@@ -398,7 +402,14 @@ var GdsDatepicker = class extends GdsFormControlElement {
398
402
  aria-describedby="label"
399
403
  .disabled=${this.disabled}
400
404
  >
401
- <gds-icon-calender-add></gds-icon-calender-add>
405
+ ${when(
406
+ this.size === "small",
407
+ () => html`<gds-icon-calender-add
408
+ height="16"
409
+ stroke="2"
410
+ ></gds-icon-calender-add>`,
411
+ () => html`<gds-icon-calender-add></gds-icon-calender-add>`
412
+ )}
402
413
  </gds-button>
403
414
  </gds-field-base>
404
415
 
@@ -705,7 +716,7 @@ isValueOutsideRange_get = function() {
705
716
  GdsDatepicker.styles = [tokens, styles];
706
717
  __decorateClass([
707
718
  property({ converter: dateConverter })
708
- ], GdsDatepicker.prototype, "value", 2);
719
+ ], GdsDatepicker.prototype, "value", 1);
709
720
  __decorateClass([
710
721
  property({ converter: dateConverter })
711
722
  ], GdsDatepicker.prototype, "min", 2);