@sebgroup/green-core 3.21.0 → 3.21.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 (430) hide show
  1. package/components/context-menu/context-menu.component.js +3 -10
  2. package/components/context-menu/context-menu.trans.styles.js +6 -2
  3. package/components/dropdown/dropdown.component.d.ts +26 -4
  4. package/components/dropdown/dropdown.component.js +150 -67
  5. package/components/dropdown/dropdown.trans.styles.js +7 -2
  6. package/{primitives/listbox/listbox.trans.styles.scss.js → components/dropdown/dropdown.trans.styles.scss.js} +1 -1
  7. package/components/dropdown/index.d.ts +1 -1
  8. package/components/dropdown/index.js +1 -1
  9. package/{primitives/listbox → components/dropdown}/option.component.d.ts +1 -1
  10. package/{primitives/listbox → components/dropdown}/option.component.js +10 -4
  11. package/components/index.d.ts +1 -1
  12. package/components/index.js +1 -1
  13. package/custom-elements.json +35687 -35615
  14. package/gds-element.js +1 -1
  15. package/generated/mcp/components.json +1 -1
  16. package/generated/mcp/dropdown/api.md +1 -1
  17. package/generated/mcp/icons.json +1 -1
  18. package/generated/mcp/index.json +1 -1
  19. package/generated/mcp/tokens.json +1 -1
  20. package/generated/react/alert/index.d.ts +7 -7
  21. package/generated/react/avatar/index.d.ts +7 -7
  22. package/generated/react/avatar-group/index.d.ts +7 -7
  23. package/generated/react/backdrop/index.d.ts +7 -7
  24. package/generated/react/badge/index.d.ts +7 -7
  25. package/generated/react/blur/index.d.ts +7 -7
  26. package/generated/react/breadcrumb/index.d.ts +7 -7
  27. package/generated/react/breadcrumbs/index.d.ts +7 -7
  28. package/generated/react/button/index.d.ts +7 -7
  29. package/generated/react/calendar/index.d.ts +7 -7
  30. package/generated/react/card/index.d.ts +7 -7
  31. package/generated/react/card-linked/index.d.ts +7 -7
  32. package/generated/react/card-pattern-01/index.d.ts +7 -7
  33. package/generated/react/checkbox/index.d.ts +7 -7
  34. package/generated/react/checkbox-group/index.d.ts +7 -7
  35. package/generated/react/coachmark/index.d.ts +7 -7
  36. package/generated/react/context-menu/index.d.ts +7 -7
  37. package/generated/react/datepicker/index.d.ts +7 -7
  38. package/generated/react/details/index.d.ts +7 -7
  39. package/generated/react/dialog/index.d.ts +7 -7
  40. package/generated/react/div/index.d.ts +7 -7
  41. package/generated/react/divider/index.d.ts +7 -7
  42. package/generated/react/dropdown/index.d.ts +12 -11
  43. package/generated/react/fab/index.d.ts +7 -7
  44. package/generated/react/filter-chip/index.d.ts +7 -7
  45. package/generated/react/filter-chips/index.d.ts +7 -7
  46. package/generated/react/flex/index.d.ts +7 -7
  47. package/generated/react/form-summary/index.d.ts +7 -7
  48. package/generated/react/formatted-account/index.d.ts +7 -7
  49. package/generated/react/formatted-date/index.d.ts +7 -7
  50. package/generated/react/formatted-number/index.d.ts +7 -7
  51. package/generated/react/grid/index.d.ts +7 -7
  52. package/generated/react/grouped-list/index.d.ts +7 -7
  53. package/generated/react/icons/icon-ai/index.d.ts +7 -7
  54. package/generated/react/icons/icon-airplane-up/index.d.ts +7 -7
  55. package/generated/react/icons/icon-archive/index.d.ts +7 -7
  56. package/generated/react/icons/icon-arrow/index.d.ts +7 -7
  57. package/generated/react/icons/icon-arrow-bottom-top/index.d.ts +7 -7
  58. package/generated/react/icons/icon-arrow-box-left/index.d.ts +7 -7
  59. package/generated/react/icons/icon-arrow-box-left-alt/index.d.ts +7 -7
  60. package/generated/react/icons/icon-arrow-box-right/index.d.ts +7 -7
  61. package/generated/react/icons/icon-arrow-down/index.d.ts +7 -7
  62. package/generated/react/icons/icon-arrow-inbox/index.d.ts +7 -7
  63. package/generated/react/icons/icon-arrow-left/index.d.ts +7 -7
  64. package/generated/react/icons/icon-arrow-left-right/index.d.ts +7 -7
  65. package/generated/react/icons/icon-arrow-out-of-box/index.d.ts +7 -7
  66. package/generated/react/icons/icon-arrow-right/index.d.ts +7 -7
  67. package/generated/react/icons/icon-arrow-right-circle/index.d.ts +7 -7
  68. package/generated/react/icons/icon-arrow-right-down-circle/index.d.ts +7 -7
  69. package/generated/react/icons/icon-arrow-right-up-circle/index.d.ts +7 -7
  70. package/generated/react/icons/icon-arrow-rotate-clockwise/index.d.ts +7 -7
  71. package/generated/react/icons/icon-arrow-rotate-counter-clockwise/index.d.ts +7 -7
  72. package/generated/react/icons/icon-arrow-rotate-left-right/index.d.ts +7 -7
  73. package/generated/react/icons/icon-arrow-rotate-right-left/index.d.ts +7 -7
  74. package/generated/react/icons/icon-arrow-share-left/index.d.ts +7 -7
  75. package/generated/react/icons/icon-arrow-share-right/index.d.ts +7 -7
  76. package/generated/react/icons/icon-arrow-split/index.d.ts +7 -7
  77. package/generated/react/icons/icon-arrow-up/index.d.ts +7 -7
  78. package/generated/react/icons/icon-arrow-wall-down/index.d.ts +7 -7
  79. package/generated/react/icons/icon-arrow-wall-left/index.d.ts +7 -7
  80. package/generated/react/icons/icon-arrow-wall-right/index.d.ts +7 -7
  81. package/generated/react/icons/icon-arrow-wall-up/index.d.ts +7 -7
  82. package/generated/react/icons/icon-arrows-repeat-right/index.d.ts +7 -7
  83. package/generated/react/icons/icon-asterisk/index.d.ts +7 -7
  84. package/generated/react/icons/icon-at/index.d.ts +7 -7
  85. package/generated/react/icons/icon-back/index.d.ts +7 -7
  86. package/generated/react/icons/icon-backward/index.d.ts +7 -7
  87. package/generated/react/icons/icon-bag/index.d.ts +7 -7
  88. package/generated/react/icons/icon-bank/index.d.ts +7 -7
  89. package/generated/react/icons/icon-banknote/index.d.ts +7 -7
  90. package/generated/react/icons/icon-banknote-2/index.d.ts +7 -7
  91. package/generated/react/icons/icon-barcode/index.d.ts +7 -7
  92. package/generated/react/icons/icon-bars-three/index.d.ts +7 -7
  93. package/generated/react/icons/icon-bars-two/index.d.ts +7 -7
  94. package/generated/react/icons/icon-basket/index.d.ts +7 -7
  95. package/generated/react/icons/icon-battery-loading/index.d.ts +7 -7
  96. package/generated/react/icons/icon-bell/index.d.ts +7 -7
  97. package/generated/react/icons/icon-block/index.d.ts +7 -7
  98. package/generated/react/icons/icon-book/index.d.ts +7 -7
  99. package/generated/react/icons/icon-bookmark/index.d.ts +7 -7
  100. package/generated/react/icons/icon-bookmark-check/index.d.ts +7 -7
  101. package/generated/react/icons/icon-bookmark-delete/index.d.ts +7 -7
  102. package/generated/react/icons/icon-bookmark-plus/index.d.ts +7 -7
  103. package/generated/react/icons/icon-bookmark-remove/index.d.ts +7 -7
  104. package/generated/react/icons/icon-books/index.d.ts +7 -7
  105. package/generated/react/icons/icon-brand-app-store/index.d.ts +7 -7
  106. package/generated/react/icons/icon-brand-apple-music/index.d.ts +7 -7
  107. package/generated/react/icons/icon-brand-bankid/index.d.ts +7 -7
  108. package/generated/react/icons/icon-brand-chrome/index.d.ts +7 -7
  109. package/generated/react/icons/icon-brand-facebook/index.d.ts +7 -7
  110. package/generated/react/icons/icon-brand-figma/index.d.ts +7 -7
  111. package/generated/react/icons/icon-brand-firefox/index.d.ts +7 -7
  112. package/generated/react/icons/icon-brand-github/index.d.ts +7 -7
  113. package/generated/react/icons/icon-brand-green/index.d.ts +7 -7
  114. package/generated/react/icons/icon-brand-instagram/index.d.ts +7 -7
  115. package/generated/react/icons/icon-brand-linkedin/index.d.ts +7 -7
  116. package/generated/react/icons/icon-brand-play-store/index.d.ts +7 -7
  117. package/generated/react/icons/icon-brand-rss-feed/index.d.ts +7 -7
  118. package/generated/react/icons/icon-brand-seb/index.d.ts +7 -7
  119. package/generated/react/icons/icon-brand-spotify/index.d.ts +7 -7
  120. package/generated/react/icons/icon-brand-storybook/index.d.ts +7 -7
  121. package/generated/react/icons/icon-brand-swish-word/index.d.ts +7 -7
  122. package/generated/react/icons/icon-brand-x/index.d.ts +7 -7
  123. package/generated/react/icons/icon-brush/index.d.ts +7 -7
  124. package/generated/react/icons/icon-bubble-annotation/index.d.ts +7 -7
  125. package/generated/react/icons/icon-bubbles/index.d.ts +7 -7
  126. package/generated/react/icons/icon-buildings/index.d.ts +7 -7
  127. package/generated/react/icons/icon-bullet-list/index.d.ts +7 -7
  128. package/generated/react/icons/icon-calculator/index.d.ts +7 -7
  129. package/generated/react/icons/icon-calendar/index.d.ts +7 -7
  130. package/generated/react/icons/icon-calendar-check/index.d.ts +7 -7
  131. package/generated/react/icons/icon-calendar-repeat/index.d.ts +7 -7
  132. package/generated/react/icons/icon-calender-add/index.d.ts +7 -7
  133. package/generated/react/icons/icon-call/index.d.ts +7 -7
  134. package/generated/react/icons/icon-car/index.d.ts +7 -7
  135. package/generated/react/icons/icon-carussel/index.d.ts +7 -7
  136. package/generated/react/icons/icon-chain-link/index.d.ts +7 -7
  137. package/generated/react/icons/icon-chain-link-broken/index.d.ts +7 -7
  138. package/generated/react/icons/icon-chart-two/index.d.ts +7 -7
  139. package/generated/react/icons/icon-checklist/index.d.ts +7 -7
  140. package/generated/react/icons/icon-checkmark/index.d.ts +7 -7
  141. package/generated/react/icons/icon-chevron-bottom/index.d.ts +7 -7
  142. package/generated/react/icons/icon-chevron-double-down/index.d.ts +7 -7
  143. package/generated/react/icons/icon-chevron-double-left/index.d.ts +7 -7
  144. package/generated/react/icons/icon-chevron-double-right/index.d.ts +7 -7
  145. package/generated/react/icons/icon-chevron-double-up/index.d.ts +7 -7
  146. package/generated/react/icons/icon-chevron-down-small/index.d.ts +7 -7
  147. package/generated/react/icons/icon-chevron-grabber-vertical/index.d.ts +7 -7
  148. package/generated/react/icons/icon-chevron-grabber-vertical-reversed/index.d.ts +7 -7
  149. package/generated/react/icons/icon-chevron-left/index.d.ts +7 -7
  150. package/generated/react/icons/icon-chevron-left-small/index.d.ts +7 -7
  151. package/generated/react/icons/icon-chevron-right/index.d.ts +7 -7
  152. package/generated/react/icons/icon-chevron-right-small/index.d.ts +7 -7
  153. package/generated/react/icons/icon-chevron-top/index.d.ts +7 -7
  154. package/generated/react/icons/icon-chevron-top-small/index.d.ts +7 -7
  155. package/generated/react/icons/icon-circle-ban/index.d.ts +7 -7
  156. package/generated/react/icons/icon-circle-check/index.d.ts +7 -7
  157. package/generated/react/icons/icon-circle-dots/index.d.ts +7 -7
  158. package/generated/react/icons/icon-circle-info/index.d.ts +7 -7
  159. package/generated/react/icons/icon-circle-minus/index.d.ts +7 -7
  160. package/generated/react/icons/icon-circle-placeholder-on/index.d.ts +7 -7
  161. package/generated/react/icons/icon-circle-plus/index.d.ts +7 -7
  162. package/generated/react/icons/icon-circle-questionmark/index.d.ts +7 -7
  163. package/generated/react/icons/icon-circle-x/index.d.ts +7 -7
  164. package/generated/react/icons/icon-circles-three/index.d.ts +7 -7
  165. package/generated/react/icons/icon-clock/index.d.ts +7 -7
  166. package/generated/react/icons/icon-cloud-download/index.d.ts +7 -7
  167. package/generated/react/icons/icon-cloud-upload/index.d.ts +7 -7
  168. package/generated/react/icons/icon-cloudy-sun/index.d.ts +7 -7
  169. package/generated/react/icons/icon-code/index.d.ts +7 -7
  170. package/generated/react/icons/icon-code-brackets/index.d.ts +7 -7
  171. package/generated/react/icons/icon-compass-round/index.d.ts +7 -7
  172. package/generated/react/icons/icon-cookies/index.d.ts +7 -7
  173. package/generated/react/icons/icon-copy/index.d.ts +7 -7
  174. package/generated/react/icons/icon-credit-card/index.d.ts +7 -7
  175. package/generated/react/icons/icon-credit-card-add/index.d.ts +7 -7
  176. package/generated/react/icons/icon-cross-large/index.d.ts +7 -7
  177. package/generated/react/icons/icon-cross-small/index.d.ts +7 -7
  178. package/generated/react/icons/icon-cup-hot/index.d.ts +7 -7
  179. package/generated/react/icons/icon-cursor/index.d.ts +7 -7
  180. package/generated/react/icons/icon-details/index.d.ts +7 -7
  181. package/generated/react/icons/icon-devices/index.d.ts +7 -7
  182. package/generated/react/icons/icon-direction/index.d.ts +7 -7
  183. package/generated/react/icons/icon-dollar/index.d.ts +7 -7
  184. package/generated/react/icons/icon-dot-grid-one-horizontal/index.d.ts +7 -7
  185. package/generated/react/icons/icon-dot-grid-one-vertical/index.d.ts +7 -7
  186. package/generated/react/icons/icon-dot-grid-three/index.d.ts +7 -7
  187. package/generated/react/icons/icon-dot-grid-two/index.d.ts +7 -7
  188. package/generated/react/icons/icon-email/index.d.ts +7 -7
  189. package/generated/react/icons/icon-emoji-angry/index.d.ts +7 -7
  190. package/generated/react/icons/icon-emoji-neutral/index.d.ts +7 -7
  191. package/generated/react/icons/icon-emoji-sad/index.d.ts +7 -7
  192. package/generated/react/icons/icon-emoji-smile/index.d.ts +7 -7
  193. package/generated/react/icons/icon-emoji-smiley/index.d.ts +7 -7
  194. package/generated/react/icons/icon-euro/index.d.ts +7 -7
  195. package/generated/react/icons/icon-expand/index.d.ts +7 -7
  196. package/generated/react/icons/icon-eye-open/index.d.ts +7 -7
  197. package/generated/react/icons/icon-eye-slash/index.d.ts +7 -7
  198. package/generated/react/icons/icon-fashion/index.d.ts +7 -7
  199. package/generated/react/icons/icon-fast-forward/index.d.ts +7 -7
  200. package/generated/react/icons/icon-file-bend/index.d.ts +7 -7
  201. package/generated/react/icons/icon-file-chart/index.d.ts +7 -7
  202. package/generated/react/icons/icon-file-text/index.d.ts +7 -7
  203. package/generated/react/icons/icon-files/index.d.ts +7 -7
  204. package/generated/react/icons/icon-filter/index.d.ts +7 -7
  205. package/generated/react/icons/icon-flag/index.d.ts +7 -7
  206. package/generated/react/icons/icon-floppy-disk/index.d.ts +7 -7
  207. package/generated/react/icons/icon-focus/index.d.ts +7 -7
  208. package/generated/react/icons/icon-folder/index.d.ts +7 -7
  209. package/generated/react/icons/icon-folder-add-right/index.d.ts +7 -7
  210. package/generated/react/icons/icon-fullscreen/index.d.ts +7 -7
  211. package/generated/react/icons/icon-gift/index.d.ts +7 -7
  212. package/generated/react/icons/icon-globus/index.d.ts +7 -7
  213. package/generated/react/icons/icon-graduate-cap/index.d.ts +7 -7
  214. package/generated/react/icons/icon-green-power/index.d.ts +7 -7
  215. package/generated/react/icons/icon-group/index.d.ts +7 -7
  216. package/generated/react/icons/icon-growth/index.d.ts +7 -7
  217. package/generated/react/icons/icon-headphones/index.d.ts +7 -7
  218. package/generated/react/icons/icon-heart/index.d.ts +7 -7
  219. package/generated/react/icons/icon-heart-beat/index.d.ts +7 -7
  220. package/generated/react/icons/icon-history/index.d.ts +7 -7
  221. package/generated/react/icons/icon-home-energy-one/index.d.ts +7 -7
  222. package/generated/react/icons/icon-home-energy-two/index.d.ts +7 -7
  223. package/generated/react/icons/icon-home-open/index.d.ts +7 -7
  224. package/generated/react/icons/icon-home-roof/index.d.ts +7 -7
  225. package/generated/react/icons/icon-horizontal-alignment-bottom/index.d.ts +7 -7
  226. package/generated/react/icons/icon-hourglass/index.d.ts +7 -7
  227. package/generated/react/icons/icon-images/index.d.ts +7 -7
  228. package/generated/react/icons/icon-inbox-empty/index.d.ts +7 -7
  229. package/generated/react/icons/icon-industry/index.d.ts +7 -7
  230. package/generated/react/icons/icon-jpg/index.d.ts +7 -7
  231. package/generated/react/icons/icon-key/index.d.ts +7 -7
  232. package/generated/react/icons/icon-knife-spoon/index.d.ts +7 -7
  233. package/generated/react/icons/icon-lab/index.d.ts +7 -7
  234. package/generated/react/icons/icon-law/index.d.ts +7 -7
  235. package/generated/react/icons/icon-leisure/index.d.ts +7 -7
  236. package/generated/react/icons/icon-light-bulb-simple/index.d.ts +7 -7
  237. package/generated/react/icons/icon-lightning/index.d.ts +7 -7
  238. package/generated/react/icons/icon-line-chart-four/index.d.ts +7 -7
  239. package/generated/react/icons/icon-line-chart-one/index.d.ts +7 -7
  240. package/generated/react/icons/icon-line-chart-three/index.d.ts +7 -7
  241. package/generated/react/icons/icon-line-chart-two/index.d.ts +7 -7
  242. package/generated/react/icons/icon-lock/index.d.ts +7 -7
  243. package/generated/react/icons/icon-macbook-air/index.d.ts +7 -7
  244. package/generated/react/icons/icon-magnifying-glass/index.d.ts +7 -7
  245. package/generated/react/icons/icon-map-pin/index.d.ts +7 -7
  246. package/generated/react/icons/icon-megaphone/index.d.ts +7 -7
  247. package/generated/react/icons/icon-menu-sidebar/index.d.ts +7 -7
  248. package/generated/react/icons/icon-mic-off/index.d.ts +7 -7
  249. package/generated/react/icons/icon-mic-on/index.d.ts +7 -7
  250. package/generated/react/icons/icon-minimize/index.d.ts +7 -7
  251. package/generated/react/icons/icon-minus-large/index.d.ts +7 -7
  252. package/generated/react/icons/icon-minus-small/index.d.ts +7 -7
  253. package/generated/react/icons/icon-money-hand/index.d.ts +7 -7
  254. package/generated/react/icons/icon-moneybag/index.d.ts +7 -7
  255. package/generated/react/icons/icon-moon/index.d.ts +7 -7
  256. package/generated/react/icons/icon-mute/index.d.ts +7 -7
  257. package/generated/react/icons/icon-newspaper/index.d.ts +7 -7
  258. package/generated/react/icons/icon-office/index.d.ts +7 -7
  259. package/generated/react/icons/icon-page-add/index.d.ts +7 -7
  260. package/generated/react/icons/icon-paper-plane-top-right/index.d.ts +7 -7
  261. package/generated/react/icons/icon-paperclip/index.d.ts +7 -7
  262. package/generated/react/icons/icon-pause/index.d.ts +7 -7
  263. package/generated/react/icons/icon-pdf/index.d.ts +7 -7
  264. package/generated/react/icons/icon-pencil-sign/index.d.ts +7 -7
  265. package/generated/react/icons/icon-pencil-sparkle/index.d.ts +7 -7
  266. package/generated/react/icons/icon-pencil-wave/index.d.ts +7 -7
  267. package/generated/react/icons/icon-pension/index.d.ts +7 -7
  268. package/generated/react/icons/icon-people/index.d.ts +7 -7
  269. package/generated/react/icons/icon-people-a11y/index.d.ts +7 -7
  270. package/generated/react/icons/icon-people-add/index.d.ts +7 -7
  271. package/generated/react/icons/icon-people-added/index.d.ts +7 -7
  272. package/generated/react/icons/icon-people-circle/index.d.ts +7 -7
  273. package/generated/react/icons/icon-people-copy/index.d.ts +7 -7
  274. package/generated/react/icons/icon-people-profile/index.d.ts +7 -7
  275. package/generated/react/icons/icon-people-remove/index.d.ts +7 -7
  276. package/generated/react/icons/icon-percent/index.d.ts +7 -7
  277. package/generated/react/icons/icon-phone/index.d.ts +7 -7
  278. package/generated/react/icons/icon-pie-chart/index.d.ts +7 -7
  279. package/generated/react/icons/icon-piggy-bank/index.d.ts +7 -7
  280. package/generated/react/icons/icon-pin/index.d.ts +7 -7
  281. package/generated/react/icons/icon-pinch/index.d.ts +7 -7
  282. package/generated/react/icons/icon-play/index.d.ts +7 -7
  283. package/generated/react/icons/icon-play-circle/index.d.ts +7 -7
  284. package/generated/react/icons/icon-plus-large/index.d.ts +7 -7
  285. package/generated/react/icons/icon-plus-small/index.d.ts +7 -7
  286. package/generated/react/icons/icon-png/index.d.ts +7 -7
  287. package/generated/react/icons/icon-poop/index.d.ts +7 -7
  288. package/generated/react/icons/icon-postcard/index.d.ts +7 -7
  289. package/generated/react/icons/icon-pound/index.d.ts +7 -7
  290. package/generated/react/icons/icon-power/index.d.ts +7 -7
  291. package/generated/react/icons/icon-power-plant/index.d.ts +7 -7
  292. package/generated/react/icons/icon-printer/index.d.ts +7 -7
  293. package/generated/react/icons/icon-push/index.d.ts +7 -7
  294. package/generated/react/icons/icon-qr-code/index.d.ts +7 -7
  295. package/generated/react/icons/icon-rainy/index.d.ts +7 -7
  296. package/generated/react/icons/icon-raising-hand/index.d.ts +7 -7
  297. package/generated/react/icons/icon-reading-list/index.d.ts +7 -7
  298. package/generated/react/icons/icon-receipt-bill/index.d.ts +7 -7
  299. package/generated/react/icons/icon-receiption-bell/index.d.ts +7 -7
  300. package/generated/react/icons/icon-record/index.d.ts +7 -7
  301. package/generated/react/icons/icon-refund/index.d.ts +7 -7
  302. package/generated/react/icons/icon-robot/index.d.ts +7 -7
  303. package/generated/react/icons/icon-rocket/index.d.ts +7 -7
  304. package/generated/react/icons/icon-run-shortcut/index.d.ts +7 -7
  305. package/generated/react/icons/icon-safari/index.d.ts +7 -7
  306. package/generated/react/icons/icon-school/index.d.ts +7 -7
  307. package/generated/react/icons/icon-scissors/index.d.ts +7 -7
  308. package/generated/react/icons/icon-search-menu/index.d.ts +7 -7
  309. package/generated/react/icons/icon-settings-gear/index.d.ts +7 -7
  310. package/generated/react/icons/icon-settings-slider-hor/index.d.ts +7 -7
  311. package/generated/react/icons/icon-settings-slider-ver/index.d.ts +7 -7
  312. package/generated/react/icons/icon-shapes/index.d.ts +7 -7
  313. package/generated/react/icons/icon-share/index.d.ts +7 -7
  314. package/generated/react/icons/icon-shield/index.d.ts +7 -7
  315. package/generated/react/icons/icon-shield-checked/index.d.ts +7 -7
  316. package/generated/react/icons/icon-shield-crossed/index.d.ts +7 -7
  317. package/generated/react/icons/icon-shopping-bag/index.d.ts +7 -7
  318. package/generated/react/icons/icon-signature/index.d.ts +7 -7
  319. package/generated/react/icons/icon-smartwatch/index.d.ts +7 -7
  320. package/generated/react/icons/icon-solar/index.d.ts +7 -7
  321. package/generated/react/icons/icon-sort/index.d.ts +7 -7
  322. package/generated/react/icons/icon-sort-ascending/index.d.ts +7 -7
  323. package/generated/react/icons/icon-sort-descending/index.d.ts +7 -7
  324. package/generated/react/icons/icon-sort-down/index.d.ts +7 -7
  325. package/generated/react/icons/icon-sort-up/index.d.ts +7 -7
  326. package/generated/react/icons/icon-square-arrow-top-right/index.d.ts +7 -7
  327. package/generated/react/icons/icon-square-behind-square/index.d.ts +7 -7
  328. package/generated/react/icons/icon-square-grid-circle/index.d.ts +7 -7
  329. package/generated/react/icons/icon-square-placeholder/index.d.ts +7 -7
  330. package/generated/react/icons/icon-star/index.d.ts +7 -7
  331. package/generated/react/icons/icon-store/index.d.ts +7 -7
  332. package/generated/react/icons/icon-sun/index.d.ts +7 -7
  333. package/generated/react/icons/icon-sunset-arrow-down/index.d.ts +7 -7
  334. package/generated/react/icons/icon-tag/index.d.ts +7 -7
  335. package/generated/react/icons/icon-target-arrow/index.d.ts +7 -7
  336. package/generated/react/icons/icon-television/index.d.ts +7 -7
  337. package/generated/react/icons/icon-tennis/index.d.ts +7 -7
  338. package/generated/react/icons/icon-text-edit/index.d.ts +7 -7
  339. package/generated/react/icons/icon-thermostat/index.d.ts +7 -7
  340. package/generated/react/icons/icon-thumbs-down/index.d.ts +7 -7
  341. package/generated/react/icons/icon-thumbs-up/index.d.ts +7 -7
  342. package/generated/react/icons/icon-ticket/index.d.ts +7 -7
  343. package/generated/react/icons/icon-trading-view-candles/index.d.ts +7 -7
  344. package/generated/react/icons/icon-trash-can/index.d.ts +7 -7
  345. package/generated/react/icons/icon-tree/index.d.ts +7 -7
  346. package/generated/react/icons/icon-trending-five/index.d.ts +7 -7
  347. package/generated/react/icons/icon-trending-four/index.d.ts +7 -7
  348. package/generated/react/icons/icon-trending-one/index.d.ts +7 -7
  349. package/generated/react/icons/icon-trending-three/index.d.ts +7 -7
  350. package/generated/react/icons/icon-trending-two/index.d.ts +7 -7
  351. package/generated/react/icons/icon-triangle-exclamation/index.d.ts +7 -7
  352. package/generated/react/icons/icon-truck/index.d.ts +7 -7
  353. package/generated/react/icons/icon-umbrella-security/index.d.ts +7 -7
  354. package/generated/react/icons/icon-unlocked/index.d.ts +7 -7
  355. package/generated/react/icons/icon-volume-full/index.d.ts +7 -7
  356. package/generated/react/icons/icon-volume-half/index.d.ts +7 -7
  357. package/generated/react/icons/icon-volume-off/index.d.ts +7 -7
  358. package/generated/react/icons/icon-wallet/index.d.ts +7 -7
  359. package/generated/react/icons/icon-warning-sign/index.d.ts +7 -7
  360. package/generated/react/icons/icon-wifi-full/index.d.ts +7 -7
  361. package/generated/react/icons/icon-youtube/index.d.ts +7 -7
  362. package/generated/react/icons/icon-zap/index.d.ts +7 -7
  363. package/generated/react/icons/icon-zoom-in/index.d.ts +7 -7
  364. package/generated/react/icons/icon-zoom-out/index.d.ts +7 -7
  365. package/generated/react/img/index.d.ts +7 -7
  366. package/generated/react/index.d.ts +9 -9
  367. package/generated/react/index.js +9 -9
  368. package/generated/react/input/index.d.ts +7 -7
  369. package/generated/react/link/index.d.ts +7 -7
  370. package/generated/react/list/index.d.ts +7 -7
  371. package/generated/react/list-item/index.d.ts +7 -7
  372. package/generated/react/list-item-pattern-01/index.d.ts +7 -7
  373. package/generated/react/mask/index.d.ts +7 -7
  374. package/generated/react/menu-button/index.d.ts +7 -7
  375. package/generated/react/menu-heading/index.d.ts +7 -7
  376. package/generated/react/menu-item/index.d.ts +7 -7
  377. package/generated/react/option/index.d.ts +9 -9
  378. package/generated/react/option/index.js +1 -1
  379. package/generated/react/pagination/index.d.ts +7 -7
  380. package/generated/react/popover/index.d.ts +7 -7
  381. package/generated/react/radio/index.d.ts +7 -7
  382. package/generated/react/radio-group/index.d.ts +7 -7
  383. package/generated/react/rich-text/index.d.ts +7 -7
  384. package/generated/react/segment/index.d.ts +7 -7
  385. package/generated/react/segmented-control/index.d.ts +7 -7
  386. package/generated/react/select/index.d.ts +7 -7
  387. package/generated/react/sensitive-account/index.d.ts +7 -7
  388. package/generated/react/sensitive-date/index.d.ts +7 -7
  389. package/generated/react/sensitive-number/index.d.ts +7 -7
  390. package/generated/react/signal/index.d.ts +7 -7
  391. package/generated/react/spinner/index.d.ts +7 -7
  392. package/generated/react/switch/index.d.ts +7 -7
  393. package/generated/react/tab/index.d.ts +7 -7
  394. package/generated/react/tab-panel/index.d.ts +7 -7
  395. package/generated/react/table/index.d.ts +7 -7
  396. package/generated/react/tabs/index.d.ts +7 -7
  397. package/generated/react/text/index.d.ts +7 -7
  398. package/generated/react/textarea/index.d.ts +7 -7
  399. package/generated/react/theme/index.d.ts +8 -8
  400. package/generated/react/video/index.d.ts +7 -7
  401. package/package.json +2 -4
  402. package/primitives/menu/menu-heading.trans.styles.js +14 -0
  403. package/primitives/menu/menu-item.component.js +1 -1
  404. package/primitives/menu/menu.component.js +2 -1
  405. package/pure.d.ts +1 -1
  406. package/pure.js +1 -1
  407. package/{primitives/listbox/option.styles.js → shared-styles/menu-listbox-item.style.js} +3 -3
  408. package/shared-styles/menu-listbox-item.trans.style.d.ts +2 -0
  409. package/shared-styles/menu-listbox-item.trans.style.js +15 -0
  410. package/shared-styles/menu-listbox.style.d.ts +11 -0
  411. package/{primitives/listbox/listbox.styles.js → shared-styles/menu-listbox.style.js} +5 -5
  412. package/shared-styles/menu-listbox.trans.style.d.ts +3 -0
  413. package/shared-styles/menu-listbox.trans.style.js +16 -0
  414. package/shared-styles/menu-listbox.trans.style.scss.js +2 -0
  415. package/utils/helpers/custom-element-scoping.js +1 -1
  416. package/utils/transitional-styles/transitional-styles.d.ts +7 -0
  417. package/utils/transitional-styles/transitional-styles.js +67 -35
  418. package/primitives/listbox/index.d.ts +0 -1
  419. package/primitives/listbox/index.js +0 -1
  420. package/primitives/listbox/listbox.component.d.ts +0 -59
  421. package/primitives/listbox/listbox.component.js +0 -129
  422. package/primitives/listbox/listbox.d.ts +0 -2
  423. package/primitives/listbox/listbox.js +0 -6
  424. package/primitives/listbox/listbox.trans.styles.js +0 -22
  425. package/primitives/listbox/option.styles.d.ts +0 -2
  426. /package/{primitives/listbox → components/dropdown}/option.d.ts +0 -0
  427. /package/{primitives/listbox → components/dropdown}/option.js +0 -0
  428. /package/primitives/{listbox/listbox.trans.styles.d.ts → menu/menu-heading.trans.styles.d.ts} +0 -0
  429. /package/{primitives/listbox/listbox.styles.d.ts → shared-styles/menu-listbox-item.style.d.ts} +0 -0
  430. /package/{primitives/listbox/option.trans.styles.scss.js → shared-styles/menu-listbox-item.trans.style.scss.js} +0 -0
@@ -7,12 +7,12 @@ import {
7
7
  } from "../../chunks/chunk.CAV4X6PU.js";
8
8
  var _elTriggerBtn, _setupButton, _handleTriggerSlotChange, _renderPopover, _handleItemClick, handleItemClick_fn, _calcMaxHeight;
9
9
  import { localized, msg } from "@lit/localize";
10
- import { css } from "lit";
11
10
  import { property, query } from "lit/decorators.js";
12
11
  import { when } from "lit/directives/when.js";
13
12
  import { GdsElement } from "../../gds-element.js";
14
13
  import { GdsMenuItem } from "../../primitives/menu/menu-item.component.js";
15
14
  import { GdsMenu } from "../../primitives/menu/menu.component.js";
15
+ import menuListboxStyle from "../../shared-styles/menu-listbox.style.js";
16
16
  import { tokens } from "../../tokens.style.js";
17
17
  import { TransitionalStyles } from "../../transitional-styles.js";
18
18
  import { ariaForwarding } from "../../utils/decorators/aria-forwarding.js";
@@ -87,7 +87,7 @@ let GdsContextMenu = class extends withMarginProps(
87
87
  @gds-ui-state=${(e) => this.open = e.detail.open}
88
88
  >
89
89
  <gds-menu
90
- class="menu"
90
+ class="menu-listbox"
91
91
  aria-label=${this.label ?? this.buttonLabel}
92
92
  @gds-menu-item-click=${__privateMethod(this, _handleItemClick, handleItemClick_fn)}
93
93
  >
@@ -144,14 +144,7 @@ handleItemClick_fn = function() {
144
144
  this.open = false;
145
145
  };
146
146
  _calcMaxHeight = new WeakMap();
147
- GdsContextMenu.styles = [
148
- tokens,
149
- css`
150
- .menu {
151
- overflow: auto;
152
- }
153
- `
154
- ];
147
+ GdsContextMenu.styles = [tokens, menuListboxStyle];
155
148
  GdsContextMenu.shadowRootOptions = {
156
149
  mode: "open",
157
150
  delegatesFocus: true
@@ -1,5 +1,7 @@
1
1
  import "../../chunks/chunk.CAV4X6PU.js";
2
- import * as Listbox from "../../primitives/listbox/listbox.trans.styles.js";
2
+ import * as MenuHeading from "../../primitives/menu/menu-heading.trans.styles.js";
3
+ import * as MenuListboxItem from "../../shared-styles/menu-listbox-item.trans.style.js";
4
+ import * as MenuListbox from "../../shared-styles/menu-listbox.trans.style.js";
3
5
  import { TransitionalStyles } from "../../utils/transitional-styles/transitional-styles.js";
4
6
  import * as Button from "../button/button.trans.styles.js";
5
7
  import * as Popover from "../popover/popover.trans.styles.js";
@@ -7,7 +9,9 @@ import styles from "./context-menu.trans.styles.scss.js";
7
9
  function register() {
8
10
  TransitionalStyles.instance.register("gds-context-menu", styles.toString());
9
11
  Popover.register();
10
- Listbox.register();
12
+ MenuListbox.register();
13
+ MenuListboxItem.register();
14
+ MenuHeading.register();
11
15
  Button.register();
12
16
  }
13
17
  var context_menu_trans_styles_default = register;
@@ -1,9 +1,12 @@
1
+ import { ListboxKbNavigation } from '../../utils/controllers/listbox-kb-nav-controller';
1
2
  import { GdsFormControlElement } from '../form/form-control';
2
- import type { GdsOption, OptionsContainer } from '../../primitives/listbox/option.component';
3
- export * from '../../primitives/listbox/option.component';
4
- declare class Dropdown extends GdsFormControlElement implements OptionsContainer {
3
+ import { GdsOption } from './option.component';
4
+ import type { OptionsContainer } from './option.component';
5
+ export * from './option.component';
6
+ declare class Dropdown extends GdsFormControlElement implements OptionsContainer, ListboxKbNavigation {
5
7
  #private;
6
8
  static styles: (import("lit").CSSResult | import("lit").CSSResult[])[];
9
+ constructor();
7
10
  get type(): string;
8
11
  /**
9
12
  * The supporting text displayed between the label and the field itself.
@@ -122,8 +125,12 @@ declare class Dropdown extends GdsFormControlElement implements OptionsContainer
122
125
  * Intended for use in integration tests.
123
126
  */
124
127
  test_getFieldElement(): Element | null | undefined;
128
+ /**
129
+ * The options that keyboard navigation can move between.
130
+ * @internal
131
+ */
132
+ get navigableItems(): GdsOption[];
125
133
  private _elTriggerBtn;
126
- private _elListbox;
127
134
  private _elSearchInput;
128
135
  connectedCallback(): void;
129
136
  disconnectedCallback(): void;
@@ -131,8 +138,23 @@ declare class Dropdown extends GdsFormControlElement implements OptionsContainer
131
138
  protected _getValidityAnchor(): HTMLElement;
132
139
  /**
133
140
  * Update value assignment and request update when the light DOM changes.
141
+ *
142
+ * `attributeFilter` deliberately excludes `aria-selected`, which the dropdown itself writes to the
143
+ * options. Observing it would turn every selection into another mutation record.
134
144
  */
135
145
  private _handleLightDOMChange;
146
+ protected updated(): void;
147
+ /**
148
+ * Options render a checkbox toggle in multiple mode, and read that off their parent.
149
+ */
150
+ private _handleMultipleChange;
151
+ get value(): any;
152
+ /**
153
+ * Writes that land while a selection is being dispatched are ignored. Such a write can only have
154
+ * observed pre-commit state, so honouring it would let a `change` listener anywhere in the
155
+ * ancestor chain replace the selection before the consumer's own handler reads it.
156
+ */
157
+ set value(value: any);
136
158
  /**
137
159
  * Emits `gds-ui-state`event and does some other house-keeping when the open state changes.
138
160
  */
@@ -5,21 +5,24 @@ import {
5
5
  __privateMethod,
6
6
  __privateSet
7
7
  } from "../../chunks/chunk.CAV4X6PU.js";
8
- var _optionElements, _shouldShowFooter, shouldShowFooter_fn, _renderCombobox, _renderTriggerButton, _handleBlur, _calcMaxHeight, _dispatchUISateEvent, _handlePopoverStateChange, _handleClearButton, _handleSearchFieldInput, _handleSearchFieldKeyDown, _handleListboxKeyDown, _handleOptionFocusChange, _handleSelectionChange, handleSelectionChange_fn, _dispatchInputEvent, _dispatchChangeEvent, _registerAutoCloseListener, registerAutoCloseListener_fn, _unregisterAutoCloseListener, unregisterAutoCloseListener_fn, _blurCloseListener, _tabCloseListener;
8
+ var _optionElements, _shouldShowFooter, shouldShowFooter_fn, _renderCombobox, _renderTriggerButton, _handleBlur, _calcMaxHeight, _dispatchUISateEvent, _handlePopoverStateChange, _handleClearButton, _handleSearchFieldInput, _handleSearchFieldKeyDown, _handleListboxKeyDown, _handleOptionFocusChange, _handleOptionSelect, _toggleOptionValue, toggleOptionValue_fn, _syncOptionSelection, syncOptionSelection_fn, _focusListbox, _isCommitting, _commitSelection, commitSelection_fn, _registerAutoCloseListener, registerAutoCloseListener_fn, _unregisterAutoCloseListener, unregisterAutoCloseListener_fn, _blurCloseListener, _tabCloseListener;
9
9
  import { localized, msg, str } from "@lit/localize";
10
10
  import { nothing } from "lit";
11
- import { property, query, queryAsync } from "lit/decorators.js";
12
- import { ifDefined } from "lit/directives/if-defined.js";
11
+ import { property, query } from "lit/decorators.js";
13
12
  import { unsafeHTML } from "lit/directives/unsafe-html.js";
14
13
  import { when } from "lit/directives/when.js";
15
14
  import { flip, offset } from "@floating-ui/dom";
16
15
  import { GdsFieldBase } from "../../primitives/field-base/field-base.component.js";
17
16
  import { GdsFormControlFooter } from "../../primitives/form-control-footer/form-control-footer.component.js";
18
17
  import { GdsFormControlHeader } from "../../primitives/form-control-header/form-control-header.component.js";
19
- import { GdsListbox } from "../../primitives/listbox/listbox.component.js";
20
18
  import { gdsCustomElement, html } from "../../scoping.js";
21
19
  import formControlHostStyle from "../../shared-styles/form-control-host.style.js";
20
+ import menuListboxStyle from "../../shared-styles/menu-listbox.style.js";
22
21
  import { tokens } from "../../tokens.style.js";
22
+ import { TransitionalStyles } from "../../transitional-styles.js";
23
+ import {
24
+ ListboxKbNavController
25
+ } from "../../utils/controllers/listbox-kb-nav-controller.js";
23
26
  import { ariaForwarding } from "../../utils/decorators/aria-forwarding.js";
24
27
  import { observeLightDOM } from "../../utils/decorators/observe-light-dom.js";
25
28
  import { watch } from "../../utils/decorators/watch.js";
@@ -34,12 +37,27 @@ import { IconChevronBottom } from "../icon/icons/chevron-bottom.component.js";
34
37
  import { IconCrossSmall } from "../icon/icons/cross-small.component.js";
35
38
  import { GdsPopover } from "../popover/popover.component.js";
36
39
  import DropdownStyles from "./dropdown.styles.js";
37
- export * from "../../primitives/listbox/option.component.js";
40
+ import { GdsOption } from "./option.component.js";
41
+ export * from "./option.component.js";
38
42
  let Dropdown = class extends GdsFormControlElement {
39
43
  constructor() {
40
- super(...arguments);
44
+ super();
41
45
  __privateAdd(this, _shouldShowFooter);
42
- __privateAdd(this, _handleSelectionChange);
46
+ /**
47
+ * Derives the next multi-select value from the current value rather than from the DOM, so that
48
+ * `value` stays the only source of truth. Options are listed in DOM order.
49
+ */
50
+ __privateAdd(this, _toggleOptionValue);
51
+ /**
52
+ * Pushes `value` onto the options. This is one-way on purpose: the selected state of an option is
53
+ * a projection of `value`, never a source it is read back from.
54
+ */
55
+ __privateAdd(this, _syncOptionSelection);
56
+ /**
57
+ * Commits a user initiated value change as one synchronous step, so that no re-render or foreign
58
+ * listener can land between the new value and the events that report it.
59
+ */
60
+ __privateAdd(this, _commitSelection);
43
61
  __privateAdd(this, _registerAutoCloseListener);
44
62
  __privateAdd(this, _unregisterAutoCloseListener);
45
63
  this.supportingText = "";
@@ -80,8 +98,9 @@ let Dropdown = class extends GdsFormControlElement {
80
98
  e.stopImmediatePropagation();
81
99
  }}
82
100
  @input=${(e) => {
83
- this.value = e.target.value;
84
- __privateGet(this, _dispatchInputEvent).call(this);
101
+ __privateMethod(this, _commitSelection, commitSelection_fn).call(this, e.target.value, {
102
+ emitChange: false
103
+ });
85
104
  __privateGet(this, _handleSearchFieldInput).call(this, e);
86
105
  __privateGet(this, _dispatchUISateEvent).call(this, true, "show") && (this.open = true);
87
106
  }}
@@ -89,10 +108,10 @@ let Dropdown = class extends GdsFormControlElement {
89
108
  if (e.key === "ArrowDown") {
90
109
  e.preventDefault();
91
110
  __privateGet(this, _dispatchUISateEvent).call(this, true, "show") && (this.open = true);
92
- this._elListbox.then((listbox) => listbox.focus());
111
+ this.updateComplete.then(() => __privateGet(this, _focusListbox).call(this));
93
112
  }
94
113
  if (e.key === "Enter") {
95
- __privateGet(this, _dispatchChangeEvent).call(this);
114
+ __privateMethod(this, _commitSelection, commitSelection_fn).call(this, this.value, { emitInput: false });
96
115
  }
97
116
  }}
98
117
  />
@@ -157,13 +176,12 @@ let Dropdown = class extends GdsFormControlElement {
157
176
  __privateAdd(this, _handleClearButton, (e) => {
158
177
  e.preventDefault();
159
178
  e.stopPropagation();
160
- this.value = void 0;
161
- this.dispatchCustomEvent("gds-input-cleared", {
162
- bubbles: true,
163
- composed: true
179
+ __privateMethod(this, _commitSelection, commitSelection_fn).call(this, void 0, {
180
+ beforeDispatch: () => this.dispatchCustomEvent("gds-input-cleared", {
181
+ bubbles: true,
182
+ composed: true
183
+ })
164
184
  });
165
- __privateGet(this, _dispatchInputEvent).call(this);
166
- __privateGet(this, _dispatchChangeEvent).call(this);
167
185
  });
168
186
  /**
169
187
  * Event handler for filtering the options in the dropdown.
@@ -191,13 +209,10 @@ let Dropdown = class extends GdsFormControlElement {
191
209
  * If found, focus should be moved to the listbox.
192
210
  */
193
211
  __privateAdd(this, _handleSearchFieldKeyDown, (e) => {
194
- this._elListbox?.then((listbox) => {
195
- if (e.key === "ArrowDown" || e.key === "Tab") {
196
- e.preventDefault();
197
- listbox.focus();
198
- return;
199
- }
200
- });
212
+ if (e.key === "ArrowDown" || e.key === "Tab") {
213
+ e.preventDefault();
214
+ __privateGet(this, _focusListbox).call(this);
215
+ }
201
216
  });
202
217
  /**
203
218
  * Check for Tab in the listbox.
@@ -215,23 +230,35 @@ let Dropdown = class extends GdsFormControlElement {
215
230
  if (triggerButton)
216
231
  triggerButton.ariaActiveDescendantElement = e.target;
217
232
  });
218
- __privateAdd(this, _dispatchInputEvent, () => {
219
- this.updateComplete.then(
220
- () => this.dispatchStandardEvent("input", {
221
- bubbles: true,
222
- composed: true
223
- })
224
- );
233
+ __privateAdd(this, _handleOptionSelect, (e) => {
234
+ const option = e.target;
235
+ if (!this.options.includes(option))
236
+ return;
237
+ if (this.multiple) {
238
+ __privateMethod(this, _commitSelection, commitSelection_fn).call(this, __privateMethod(this, _toggleOptionValue, toggleOptionValue_fn).call(this, option));
239
+ } else {
240
+ __privateMethod(this, _commitSelection, commitSelection_fn).call(this, option.value, {
241
+ beforeDispatch: () => {
242
+ if (__privateGet(this, _dispatchUISateEvent).call(this, false, "close")) {
243
+ this.open = false;
244
+ setTimeout(() => this._elTriggerBtn?.focus(), 0);
245
+ }
246
+ }
247
+ });
248
+ }
225
249
  });
226
- __privateAdd(this, _dispatchChangeEvent, () => {
227
- this.updateComplete.then(
228
- () => this.dispatchCustomEvent("change", {
229
- detail: { value: this.value },
230
- bubbles: true,
231
- composed: true
232
- })
233
- );
250
+ /**
251
+ * The listbox container is the popover's first slotted child, so it receives programmatic focus
252
+ * and hands it on to an option. Deferred because the popover can open before the dropdown has
253
+ * rendered the open state, which is what un-hides the options.
254
+ */
255
+ __privateAdd(this, _focusListbox, () => {
256
+ this.updateComplete.then(() => {
257
+ const items = this.navigableItems;
258
+ (items.find((o) => o.selected) || items[0])?.focus();
259
+ });
234
260
  });
261
+ __privateAdd(this, _isCommitting, false);
235
262
  /**
236
263
  * A listener to close the dropdown when any other element is focused.
237
264
  */
@@ -247,6 +274,7 @@ let Dropdown = class extends GdsFormControlElement {
247
274
  this._elTriggerBtn?.focus();
248
275
  }
249
276
  });
277
+ new ListboxKbNavController(this);
250
278
  }
251
279
  get type() {
252
280
  return "gds-dropdown";
@@ -307,9 +335,17 @@ let Dropdown = class extends GdsFormControlElement {
307
335
  test_getFieldElement() {
308
336
  return this.shadowRoot?.querySelector("#field");
309
337
  }
338
+ /**
339
+ * The options that keyboard navigation can move between.
340
+ * @internal
341
+ */
342
+ get navigableItems() {
343
+ return this.options.filter((o) => !o.hidden);
344
+ }
310
345
  connectedCallback() {
311
346
  super.connectedCallback();
312
347
  this.addEventListener("blur", __privateGet(this, _handleBlur));
348
+ TransitionalStyles.instance.applyScoped(this, "gds-dropdown", "t-listbox");
313
349
  this.updateComplete.then(() => {
314
350
  this._handleLightDOMChange();
315
351
  this._handleOpenChange();
@@ -412,17 +448,19 @@ let Dropdown = class extends GdsFormControlElement {
412
448
  @input=${__privateGet(this, _handleSearchFieldInput)}
413
449
  />`
414
450
  )}
415
- <gds-listbox
451
+ <div
416
452
  id="listbox"
417
- .multiple="${ifDefined(this.multiple)}"
418
- .compareWith="${this.compareWith}"
419
- .selection="${this.multiple ? this.value : [this.value]}"
420
- @change="${__privateMethod(this, _handleSelectionChange, handleSelectionChange_fn)}"
453
+ class="menu-listbox"
454
+ role="listbox"
455
+ aria-multiselectable="${this.multiple}"
456
+ tabindex="-1"
457
+ @focus="${__privateGet(this, _focusListbox)}"
458
+ @gds-select="${__privateGet(this, _handleOptionSelect)}"
421
459
  @gds-focus="${__privateGet(this, _handleOptionFocusChange)}"
422
460
  @keydown=${__privateGet(this, _handleListboxKeyDown)}
423
461
  >
424
462
  <slot></slot>
425
- </gds-listbox>
463
+ </div>
426
464
  </gds-popover>
427
465
 
428
466
  ${when(
@@ -453,16 +491,37 @@ let Dropdown = class extends GdsFormControlElement {
453
491
  if (this.multiple) {
454
492
  return;
455
493
  }
494
+ if (this.options.length === 0 && !this.placeholder) {
495
+ return;
496
+ }
456
497
  if (this.value === void 0) {
457
498
  if (this.placeholder)
458
499
  this.value = this.placeholder.value;
459
500
  else
460
501
  this.value = this.options[0]?.value;
461
502
  } else if (!this.combobox && !this.placeholder && this.options.find((o) => this.compareWith(o.value, this.value)) === void 0) {
462
- this.options[0] && (this.options[0].selected = true);
463
503
  this.value = this.options[0]?.value;
464
504
  }
465
505
  }
506
+ updated() {
507
+ __privateMethod(this, _syncOptionSelection, syncOptionSelection_fn).call(this);
508
+ }
509
+ _handleMultipleChange() {
510
+ this.options.forEach((o) => o.requestUpdate());
511
+ }
512
+ get value() {
513
+ return super.value;
514
+ }
515
+ /**
516
+ * Writes that land while a selection is being dispatched are ignored. Such a write can only have
517
+ * observed pre-commit state, so honouring it would let a `change` listener anywhere in the
518
+ * ancestor chain replace the selection before the consumer's own handler reads it.
519
+ */
520
+ set value(value) {
521
+ if (__privateGet(this, _isCommitting))
522
+ return;
523
+ super.value = value;
524
+ }
466
525
  _handleOpenChange() {
467
526
  const open = this.open;
468
527
  this.options.forEach((o) => o.hidden = !open);
@@ -497,24 +556,42 @@ _handleSearchFieldInput = new WeakMap();
497
556
  _handleSearchFieldKeyDown = new WeakMap();
498
557
  _handleListboxKeyDown = new WeakMap();
499
558
  _handleOptionFocusChange = new WeakMap();
500
- _handleSelectionChange = new WeakSet();
501
- handleSelectionChange_fn = function() {
502
- this._elListbox.then((listbox) => {
503
- if (this.multiple)
504
- this.value = listbox.selection.map((s) => s.value);
505
- else {
506
- this.value = listbox.selection[0]?.value;
507
- if (__privateGet(this, _dispatchUISateEvent).call(this, false, "close")) {
508
- this.open = false;
509
- setTimeout(() => this._elTriggerBtn?.focus(), 0);
510
- }
511
- }
512
- __privateGet(this, _dispatchInputEvent).call(this);
513
- __privateGet(this, _dispatchChangeEvent).call(this);
559
+ _handleOptionSelect = new WeakMap();
560
+ _toggleOptionValue = new WeakSet();
561
+ toggleOptionValue_fn = function(option) {
562
+ const current = Array.isArray(this.value) ? this.value : [];
563
+ const isSelected = (v) => current.some((c) => this.compareWith(c, v));
564
+ const select = !isSelected(option.value);
565
+ return this.options.filter((o) => o === option ? select : isSelected(o.value)).map((o) => o.value);
566
+ };
567
+ _syncOptionSelection = new WeakSet();
568
+ syncOptionSelection_fn = function() {
569
+ const values = this.multiple ? Array.isArray(this.value) ? this.value : [] : [this.value];
570
+ this.options.forEach((o) => {
571
+ o.selected = values.some((v) => this.compareWith(v, o.value));
514
572
  });
515
573
  };
516
- _dispatchInputEvent = new WeakMap();
517
- _dispatchChangeEvent = new WeakMap();
574
+ _focusListbox = new WeakMap();
575
+ _isCommitting = new WeakMap();
576
+ _commitSelection = new WeakSet();
577
+ commitSelection_fn = function(value, options = {}) {
578
+ const { emitInput = true, emitChange = true, beforeDispatch } = options;
579
+ this.value = value;
580
+ __privateSet(this, _isCommitting, true);
581
+ try {
582
+ beforeDispatch?.();
583
+ if (emitInput)
584
+ this.dispatchStandardEvent("input", { bubbles: true, composed: true });
585
+ if (emitChange)
586
+ this.dispatchCustomEvent("change", {
587
+ detail: { value },
588
+ bubbles: true,
589
+ composed: true
590
+ });
591
+ } finally {
592
+ __privateSet(this, _isCommitting, false);
593
+ }
594
+ };
518
595
  _registerAutoCloseListener = new WeakSet();
519
596
  registerAutoCloseListener_fn = function() {
520
597
  this.addEventListener("blur", __privateGet(this, _blurCloseListener));
@@ -529,7 +606,12 @@ unregisterAutoCloseListener_fn = function() {
529
606
  };
530
607
  _blurCloseListener = new WeakMap();
531
608
  _tabCloseListener = new WeakMap();
532
- Dropdown.styles = [tokens, formControlHostStyle, DropdownStyles];
609
+ Dropdown.styles = [
610
+ tokens,
611
+ formControlHostStyle,
612
+ menuListboxStyle,
613
+ DropdownStyles
614
+ ];
533
615
  __decorateClass([
534
616
  property({ attribute: "supporting-text" })
535
617
  ], Dropdown.prototype, "supportingText", 2);
@@ -582,20 +664,21 @@ __decorateClass([
582
664
  __decorateClass([
583
665
  query("#trigger")
584
666
  ], Dropdown.prototype, "_elTriggerBtn", 2);
585
- __decorateClass([
586
- queryAsync("#listbox")
587
- ], Dropdown.prototype, "_elListbox", 2);
588
667
  __decorateClass([
589
668
  query("#searchinput")
590
669
  ], Dropdown.prototype, "_elSearchInput", 2);
591
670
  __decorateClass([
592
671
  observeLightDOM({
593
672
  attributes: true,
673
+ attributeFilter: ["gds-element", "value", "isplaceholder"],
594
674
  childList: true,
595
675
  subtree: true,
596
676
  characterData: true
597
677
  })
598
678
  ], Dropdown.prototype, "_handleLightDOMChange", 1);
679
+ __decorateClass([
680
+ watch("multiple")
681
+ ], Dropdown.prototype, "_handleMultipleChange", 1);
599
682
  __decorateClass([
600
683
  watch("open")
601
684
  ], Dropdown.prototype, "_handleOpenChange", 1);
@@ -617,7 +700,7 @@ GdsDropdown = __decorateClass([
617
700
  GdsFormControlHeader,
618
701
  GdsFormControlFooter,
619
702
  GdsFieldBase,
620
- GdsListbox,
703
+ GdsOption,
621
704
  GdsPopover,
622
705
  IconCheckmark,
623
706
  IconChevronBottom,
@@ -1,10 +1,15 @@
1
1
  import "../../chunks/chunk.CAV4X6PU.js";
2
2
  import * as FieldBase from "../../primitives/field-base/field-base.trans.styles.js";
3
- import * as Listbox from "../../primitives/listbox/listbox.trans.styles.js";
3
+ import * as MenuHeading from "../../primitives/menu/menu-heading.trans.styles.js";
4
+ import * as MenuListboxItem from "../../shared-styles/menu-listbox-item.trans.style.js";
5
+ import { TransitionalStyles } from "../../utils/transitional-styles/transitional-styles.js";
4
6
  import * as Button from "../button/button.trans.styles.js";
5
7
  import * as Popover from "../popover/popover.trans.styles.js";
8
+ import styles from "./dropdown.trans.styles.scss.js";
6
9
  function register() {
7
- Listbox.register();
10
+ TransitionalStyles.instance.register("gds-dropdown", styles.toString());
11
+ MenuListboxItem.register();
12
+ MenuHeading.register();
8
13
  Popover.register();
9
14
  Button.register();
10
15
  FieldBase.register();
@@ -1,2 +1,2 @@
1
- const styles = "/* stylelint-disable max-nesting-depth */\n/**\n * Assert that a map is in ascending order\n * @mixin assert-ascending\n * @param {Map} $map - The map to check\n * @param {String} $map-name - The name of the map\n */\n/**\n * Assert that the first breakpoint in a map starts at zero\n * @mixin assert-starts-at-zero\n * @param {Map} $map - The map to check\n * @param {String} $map-name - The name of the map\n */\n/**\n * Check if a value is important\n * @function is-important\n * @param {Boolean} $important - Whether the value is important\n * @return {String} - \"!important\" if true, otherwise an empty string\n */\n/**\n * Replace a substring in a string\n * @function str-replace\n * @param {String} $string - The original string\n * @param {String} $search - The substring to replace\n * @param {String} $replace - The replacement string\n * @return {String} - The updated string\n */\n/**\n * Convert a map to its negative variant\n * @function negativify-map\n * @param {Map} $map - The map to convert\n * @return {Map} - The negative variant of the map\n */\n/**\n * Generate utility classes\n * @mixin generate-utility\n * @param {Map} $utility - Utility map\n * @param {String} $infix - Infix for class names\n * @param {Boolean} $is-rfs-media-query - Whether to use RFS media query\n */\n/* stylelint-enable max-nesting-depth */\n/**\n * Calculate the luminance for a color.\n * @function luminance\n * @param {Color} $color - The color to calculate luminance for\n * @return {Number} - The luminance value\n */\n/**\n * Calculate the contrast ratio between two colors.\n * @function color-contrast\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @return {Number} - The contrast ratio\n */\n/**\n * Remove the unit of a length\n * @function strip-unit\n * @param {Number} $number - Number to remove unit from\n * @return {Number} - Unitless number\n */\n/**\n * Validate font size\n * @function validate-font-size\n * @param {Number} $size - Font size to validate\n * @return {Number} - Validated font size in pixels\n */\n/**\n * Get ratio for WCAG level\n * @function get-ratio\n * @param {String} $level - WCAG level\n * @param {Number} $size - Font size\n * @param {Boolean} $bold - Is bold\n * @param {Boolean} $graphic - Is graphic\n * @return {Number} - Ratio value\n */\n/**\n * Determine if a color is light or dark\n * @function light-or-dark\n * @param {Color} $color - The color to check\n * @return {String} - \"light\" or \"dark\"\n */\n/**\n * Get the most legible color (black or white) for a given background color\n * @function most-legible-color\n * @param {Color} $color - The background color\n * @return {Color} - The most legible color\n */\n/**\n * Get the desired color combination for foreground and background colors\n * @function desired-color-combination\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Number} $offsetThreshold - Offset threshold\n * @param {Number} $ratio - Contrast ratio\n * @return {List} - List containing background and foreground colors\n */\n/**\n * @mixin desired-color-combination\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Number} $offsetThreshold - Offset threshold\n * @param {Number} $ratio - Contrast ratio\n */\n/**\n * Get an accessible color for a given foreground and background color\n * @function a11y-color\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {String} $level - WCAG level\n * @param {Number} $size - Font size\n * @param {Boolean} $bold - Is bold\n * @param {Boolean} $graphic - Is graphic\n * @param {Number} $maxOffset - Maximum offset\n * @param {Boolean} $darkMode - Is dark mode\n * @param {Number} $ratio - Contrast ratio\n * @return {Color} - Accessible color\n */\n/**\n * Get the maximum contrast color\n * @function max-contrast\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Color} $max - Maximum contrast color\n * @return {Color} - Maximum contrast color\n */\n/**\n * Get the RGB values of a color as a string\n * @function stripped-rgb\n * @param {Color} $color - The color\n * @return {String} - RGB values as a string\n */\n/**\n * Get the HSL values of a color as a string\n * @function stripped-hsl\n * @param {Color} $color - The color\n * @return {String} - HSL values as a string\n */\n/**\n * Convert a map of colors to a map of HSL values\n * @function hsl-map\n * @param {Map} $colors - Map of colors\n * @return {Map} - Map of HSL values\n */\n/**\n* @deprecated\n* Use `add-focus` instead\n*/\n/** add background color, color and border-color to element when it has focus-visible i.e. tab focus */\n/**\n * Breakpoint viewport sizes and media queries.\n *\n * Breakpoints are defined as a map of (name: minimum width), order from small to large:\n *\n * (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)\n *\n * The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.\n */\n/**\n * Name of the next breakpoint, or null for the last breakpoint.\n *\n * >> breakpoint-next(sm)\n * md\n * >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * md\n * >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))\n * md\n */\n/**\n * Minimum breakpoint width. Null for the smallest (first) breakpoint.\n *\n * >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * 576px\n */\n/**\n * Maximum breakpoint width.\n * The maximum value is reduced by 0.02px to work around the limitations of\n * `min-` and `max-` prefixes and viewports with fractional widths.\n * See https://www.w3.org/TR/mediaqueries-4/#mq-min-max\n * Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.\n * See https://bugs.webkit.org/show_bug.cgi?id=178261\n *\n * >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * 767.98px\n */\n/**\n * Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.\n * Useful for making responsive utilities.\n *\n * >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * \"\" (Returns a blank string)\n * >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * \"-sm\"\n */\n/**\n * Media of at least the minimum breakpoint width. No query for the smallest breakpoint.\n * Makes the @content apply to the given breakpoint and wider.\n */\n/**\n * Media of at most the maximum breakpoint width. No query for the largest breakpoint.\n * Makes the @content apply to the given breakpoint and narrower.\n */\n/**\n * Media that spans multiple breakpoint widths.\n * Makes the @content apply between the min and max breakpoints\n */\n/**\n * Media between the breakpoint's minimum and maximum widths.\n * No minimum for the smallest breakpoint, and no maximum for the largest one.\n * Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.\n */\n/** \n * @deprecated in favor of Grouped list component\n */\n/** \n * @deprecated in favor of Grouped list component\n */\n@layer base, reset, transitional-styles;\n@layer transitional-styles {\n :host {\n padding-left: 0;\n margin-bottom: 0;\n margin-top: 0;\n display: flex;\n flex-direction: column;\n list-style: none;\n }\n :host > li {\n padding-bottom: 0.5rem;\n padding-top: 0.5rem;\n border: 0;\n display: block;\n position: relative;\n }\n :host > li::before {\n font-weight: 500;\n display: inline-block;\n left: 0;\n position: absolute;\n text-align: center;\n }\n :host {\n overflow-y: auto;\n }\n}";
1
+ const styles = "/* stylelint-disable max-nesting-depth */\n/**\n * Assert that a map is in ascending order\n * @mixin assert-ascending\n * @param {Map} $map - The map to check\n * @param {String} $map-name - The name of the map\n */\n/**\n * Assert that the first breakpoint in a map starts at zero\n * @mixin assert-starts-at-zero\n * @param {Map} $map - The map to check\n * @param {String} $map-name - The name of the map\n */\n/**\n * Check if a value is important\n * @function is-important\n * @param {Boolean} $important - Whether the value is important\n * @return {String} - \"!important\" if true, otherwise an empty string\n */\n/**\n * Replace a substring in a string\n * @function str-replace\n * @param {String} $string - The original string\n * @param {String} $search - The substring to replace\n * @param {String} $replace - The replacement string\n * @return {String} - The updated string\n */\n/**\n * Convert a map to its negative variant\n * @function negativify-map\n * @param {Map} $map - The map to convert\n * @return {Map} - The negative variant of the map\n */\n/**\n * Generate utility classes\n * @mixin generate-utility\n * @param {Map} $utility - Utility map\n * @param {String} $infix - Infix for class names\n * @param {Boolean} $is-rfs-media-query - Whether to use RFS media query\n */\n/* stylelint-enable max-nesting-depth */\n/**\n * Calculate the luminance for a color.\n * @function luminance\n * @param {Color} $color - The color to calculate luminance for\n * @return {Number} - The luminance value\n */\n/**\n * Calculate the contrast ratio between two colors.\n * @function color-contrast\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @return {Number} - The contrast ratio\n */\n/**\n * Remove the unit of a length\n * @function strip-unit\n * @param {Number} $number - Number to remove unit from\n * @return {Number} - Unitless number\n */\n/**\n * Validate font size\n * @function validate-font-size\n * @param {Number} $size - Font size to validate\n * @return {Number} - Validated font size in pixels\n */\n/**\n * Get ratio for WCAG level\n * @function get-ratio\n * @param {String} $level - WCAG level\n * @param {Number} $size - Font size\n * @param {Boolean} $bold - Is bold\n * @param {Boolean} $graphic - Is graphic\n * @return {Number} - Ratio value\n */\n/**\n * Determine if a color is light or dark\n * @function light-or-dark\n * @param {Color} $color - The color to check\n * @return {String} - \"light\" or \"dark\"\n */\n/**\n * Get the most legible color (black or white) for a given background color\n * @function most-legible-color\n * @param {Color} $color - The background color\n * @return {Color} - The most legible color\n */\n/**\n * Get the desired color combination for foreground and background colors\n * @function desired-color-combination\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Number} $offsetThreshold - Offset threshold\n * @param {Number} $ratio - Contrast ratio\n * @return {List} - List containing background and foreground colors\n */\n/**\n * @mixin desired-color-combination\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Number} $offsetThreshold - Offset threshold\n * @param {Number} $ratio - Contrast ratio\n */\n/**\n * Get an accessible color for a given foreground and background color\n * @function a11y-color\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {String} $level - WCAG level\n * @param {Number} $size - Font size\n * @param {Boolean} $bold - Is bold\n * @param {Boolean} $graphic - Is graphic\n * @param {Number} $maxOffset - Maximum offset\n * @param {Boolean} $darkMode - Is dark mode\n * @param {Number} $ratio - Contrast ratio\n * @return {Color} - Accessible color\n */\n/**\n * Get the maximum contrast color\n * @function max-contrast\n * @param {Color} $fg - Foreground color\n * @param {Color} $bg - Background color\n * @param {Color} $max - Maximum contrast color\n * @return {Color} - Maximum contrast color\n */\n/**\n * Get the RGB values of a color as a string\n * @function stripped-rgb\n * @param {Color} $color - The color\n * @return {String} - RGB values as a string\n */\n/**\n * Get the HSL values of a color as a string\n * @function stripped-hsl\n * @param {Color} $color - The color\n * @return {String} - HSL values as a string\n */\n/**\n * Convert a map of colors to a map of HSL values\n * @function hsl-map\n * @param {Map} $colors - Map of colors\n * @return {Map} - Map of HSL values\n */\n/**\n* @deprecated\n* Use `add-focus` instead\n*/\n/** add background color, color and border-color to element when it has focus-visible i.e. tab focus */\n/**\n * Breakpoint viewport sizes and media queries.\n *\n * Breakpoints are defined as a map of (name: minimum width), order from small to large:\n *\n * (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)\n *\n * The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.\n */\n/**\n * Name of the next breakpoint, or null for the last breakpoint.\n *\n * >> breakpoint-next(sm)\n * md\n * >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * md\n * >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))\n * md\n */\n/**\n * Minimum breakpoint width. Null for the smallest (first) breakpoint.\n *\n * >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * 576px\n */\n/**\n * Maximum breakpoint width.\n * The maximum value is reduced by 0.02px to work around the limitations of\n * `min-` and `max-` prefixes and viewports with fractional widths.\n * See https://www.w3.org/TR/mediaqueries-4/#mq-min-max\n * Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.\n * See https://bugs.webkit.org/show_bug.cgi?id=178261\n *\n * >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * 767.98px\n */\n/**\n * Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.\n * Useful for making responsive utilities.\n *\n * >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * \"\" (Returns a blank string)\n * >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n * \"-sm\"\n */\n/**\n * Media of at least the minimum breakpoint width. No query for the smallest breakpoint.\n * Makes the @content apply to the given breakpoint and wider.\n */\n/**\n * Media of at most the maximum breakpoint width. No query for the largest breakpoint.\n * Makes the @content apply to the given breakpoint and narrower.\n */\n/**\n * Media that spans multiple breakpoint widths.\n * Makes the @content apply between the min and max breakpoints\n */\n/**\n * Media between the breakpoint's minimum and maximum widths.\n * No minimum for the smallest breakpoint, and no maximum for the largest one.\n * Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.\n */\n/** \n * @deprecated in favor of Grouped list component\n */\n/** \n * @deprecated in favor of Grouped list component\n */\n@layer base, reset, transitional-styles;\n@layer transitional-styles {\n #listbox {\n padding-left: 0;\n margin-bottom: 0;\n margin-top: 0;\n display: flex;\n flex-direction: column;\n list-style: none;\n }\n #listbox > li {\n padding-bottom: 0.5rem;\n padding-top: 0.5rem;\n border: 0;\n display: block;\n position: relative;\n }\n #listbox > li::before {\n font-weight: 500;\n display: inline-block;\n left: 0;\n position: absolute;\n text-align: center;\n }\n #listbox {\n overflow-y: auto;\n }\n}";
2
2
  export default styles;
@@ -1,3 +1,3 @@
1
1
  export * from './dropdown';
2
- export * from '../../primitives/listbox/option';
2
+ export * from './option';
3
3
  export * from '../../primitives/menu/menu-heading';
@@ -1,3 +1,3 @@
1
1
  export * from "./dropdown.js";
2
- export * from "../../primitives/listbox/option.js";
2
+ export * from "./option.js";
3
3
  export * from "../../primitives/menu/menu-heading.js";
@@ -10,7 +10,7 @@ declare const GdsOption_base: (new (...args: any[]) => import("lit").LitElement)
10
10
  * A listbox option is an option in a listbox widget.
11
11
  * This primitive corresponds to the aria `option` role: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/option_role
12
12
  *
13
- * Can be used together with the `gds-listbox` primitive.
13
+ * Can be used together with the `gds-dropdown` component.
14
14
  *
15
15
  * @slot - The default slot. Custom content can be used to display the option.
16
16
  *
@@ -8,16 +8,16 @@ import {
8
8
  var _hidden, _emitSelect, emitSelect_fn;
9
9
  import { property } from "lit/decorators.js";
10
10
  import { when } from "lit/directives/when.js";
11
- import { IconCheckmark } from "../../components/icon/icons/checkmark.component.js";
12
11
  import { GdsElement } from "../../gds-element.js";
13
12
  import { gdsCustomElement, html } from "../../scoping.js";
13
+ import menuListboxItemStyles from "../../shared-styles/menu-listbox-item.style.js";
14
14
  import rbcbToggleStyles from "../../shared-styles/rbcb-toggle.style.js";
15
15
  import { checkboxToggle } from "../../shared-styles/rbcb-toggle.template.js";
16
16
  import { tokens } from "../../tokens.style.js";
17
17
  import { TransitionalStyles } from "../../transitional-styles.js";
18
18
  import { watch } from "../../utils/decorators/index.js";
19
19
  import { Focusable } from "../../utils/mixins/focusable.js";
20
- import OptionStyles from "./option.styles.js";
20
+ import { IconCheckmark } from "../icon/icons/checkmark.component.js";
21
21
  let GdsOption = class extends Focusable(GdsElement) {
22
22
  constructor() {
23
23
  super();
@@ -94,7 +94,7 @@ emitSelect_fn = function(e) {
94
94
  }
95
95
  });
96
96
  };
97
- GdsOption.styles = [tokens, rbcbToggleStyles, OptionStyles];
97
+ GdsOption.styles = [tokens, rbcbToggleStyles, menuListboxItemStyles];
98
98
  __decorateClass([
99
99
  property()
100
100
  ], GdsOption.prototype, "value", 2);
@@ -107,7 +107,13 @@ __decorateClass([
107
107
  __decorateClass([
108
108
  property({
109
109
  attribute: "aria-selected",
110
- reflect: true
110
+ reflect: true,
111
+ // `aria-selected` is an enumerated attribute, not a boolean one: it is authored as the literal
112
+ // strings "true" and "false", and has to stay present in both states.
113
+ converter: {
114
+ fromAttribute: (value) => value === "true",
115
+ toAttribute: (value) => value ? "true" : "false"
116
+ }
111
117
  })
112
118
  ], GdsOption.prototype, "selected", 2);
113
119
  __decorateClass([
@@ -1,4 +1,4 @@
1
- export * from '../primitives/listbox/option';
1
+ export * from './dropdown/option';
2
2
  export * from '../primitives/menu/menu-heading';
3
3
  export * from '../primitives/menu/menu-item';
4
4
  export * from './alert';
@@ -1,4 +1,4 @@
1
- export * from "../primitives/listbox/option.js";
1
+ export * from "./dropdown/option.js";
2
2
  export * from "../primitives/menu/menu-heading.js";
3
3
  export * from "../primitives/menu/menu-item.js";
4
4
  export * from "./alert/index.js";