@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
@@ -429,18 +429,13 @@ export declare const GdsVideo: {
429
429
  tabIndex?: number | undefined;
430
430
  blur?: (() => void) | undefined;
431
431
  focus?: ((options?: FocusOptions) => void) | undefined;
432
- }, "dir" | "slot" | "style" | "title" | "role" | "aria-label" | "property" | "content" | "color" | "accessKey" | "draggable" | "hidden" | "inert" | "lang" | "popover" | "translate" | "className" | "id" | "prefix" | "contentEditable" | "enterKeyHint" | "inputMode" | "nonce" | "tabIndex" | "aria-selected" | "defaultChecked" | "defaultValue" | "popoverTargetAction" | "aria-haspopup" | "aria-expanded" | "rel" | "aria-multiselectable" | "aria-valuemin" | "aria-valuemax" | "aria-valuetext" | "aria-checked" | "aria-disabled" | "aria-description" | "aria-invalid" | "aria-describedby" | "aria-live" | "onToggle" | "resource" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "autoCapitalize" | "autoFocus" | "contextMenu" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popoverTarget" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-details" | "aria-dropeffect" | "aria-errormessage" | "aria-flowto" | "aria-grabbed" | "aria-hidden" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-modal" | "aria-multiline" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-setsize" | "aria-sort" | "aria-valuenow" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture">, "children"> & {
432
+ }, "dir" | "slot" | "style" | "title" | "accessKey" | "draggable" | "hidden" | "inert" | "lang" | "popover" | "translate" | "className" | "id" | "prefix" | "role" | "contentEditable" | "enterKeyHint" | "inputMode" | "nonce" | "tabIndex" | "aria-label" | "property" | "content" | "color" | "aria-selected" | "defaultChecked" | "defaultValue" | "popoverTargetAction" | "aria-haspopup" | "aria-expanded" | "rel" | "aria-valuemin" | "aria-valuemax" | "aria-valuetext" | "aria-checked" | "aria-disabled" | "aria-description" | "aria-invalid" | "aria-describedby" | "aria-live" | "onToggle" | "resource" | "suppressContentEditableWarning" | "suppressHydrationWarning" | "autoCapitalize" | "autoFocus" | "contextMenu" | "spellCheck" | "radioGroup" | "about" | "datatype" | "inlist" | "rev" | "typeof" | "vocab" | "autoCorrect" | "autoSave" | "itemProp" | "itemScope" | "itemType" | "itemID" | "itemRef" | "results" | "security" | "unselectable" | "popoverTarget" | "is" | "aria-activedescendant" | "aria-atomic" | "aria-autocomplete" | "aria-braillelabel" | "aria-brailleroledescription" | "aria-busy" | "aria-colcount" | "aria-colindex" | "aria-colindextext" | "aria-colspan" | "aria-controls" | "aria-current" | "aria-details" | "aria-dropeffect" | "aria-errormessage" | "aria-flowto" | "aria-grabbed" | "aria-hidden" | "aria-keyshortcuts" | "aria-labelledby" | "aria-level" | "aria-modal" | "aria-multiline" | "aria-multiselectable" | "aria-orientation" | "aria-owns" | "aria-placeholder" | "aria-posinset" | "aria-pressed" | "aria-readonly" | "aria-relevant" | "aria-required" | "aria-roledescription" | "aria-rowcount" | "aria-rowindex" | "aria-rowindextext" | "aria-rowspan" | "aria-setsize" | "aria-sort" | "aria-valuenow" | "dangerouslySetInnerHTML" | "onCopy" | "onCopyCapture" | "onCut" | "onCutCapture" | "onPaste" | "onPasteCapture" | "onCompositionEnd" | "onCompositionEndCapture" | "onCompositionStart" | "onCompositionStartCapture" | "onCompositionUpdate" | "onCompositionUpdateCapture" | "onFocus" | "onFocusCapture" | "onBlur" | "onBlurCapture" | "onChange" | "onChangeCapture" | "onBeforeInput" | "onBeforeInputCapture" | "onInput" | "onInputCapture" | "onReset" | "onResetCapture" | "onSubmit" | "onSubmitCapture" | "onInvalid" | "onInvalidCapture" | "onLoad" | "onLoadCapture" | "onError" | "onErrorCapture" | "onKeyDown" | "onKeyDownCapture" | "onKeyPress" | "onKeyPressCapture" | "onKeyUp" | "onKeyUpCapture" | "onAbort" | "onAbortCapture" | "onCanPlay" | "onCanPlayCapture" | "onCanPlayThrough" | "onCanPlayThroughCapture" | "onDurationChange" | "onDurationChangeCapture" | "onEmptied" | "onEmptiedCapture" | "onEncrypted" | "onEncryptedCapture" | "onEnded" | "onEndedCapture" | "onLoadedData" | "onLoadedDataCapture" | "onLoadedMetadata" | "onLoadedMetadataCapture" | "onLoadStart" | "onLoadStartCapture" | "onPause" | "onPauseCapture" | "onPlay" | "onPlayCapture" | "onPlaying" | "onPlayingCapture" | "onProgress" | "onProgressCapture" | "onRateChange" | "onRateChangeCapture" | "onResize" | "onResizeCapture" | "onSeeked" | "onSeekedCapture" | "onSeeking" | "onSeekingCapture" | "onStalled" | "onStalledCapture" | "onSuspend" | "onSuspendCapture" | "onTimeUpdate" | "onTimeUpdateCapture" | "onVolumeChange" | "onVolumeChangeCapture" | "onWaiting" | "onWaitingCapture" | "onAuxClick" | "onAuxClickCapture" | "onClick" | "onClickCapture" | "onContextMenu" | "onContextMenuCapture" | "onDoubleClick" | "onDoubleClickCapture" | "onDrag" | "onDragCapture" | "onDragEnd" | "onDragEndCapture" | "onDragEnter" | "onDragEnterCapture" | "onDragExit" | "onDragExitCapture" | "onDragLeave" | "onDragLeaveCapture" | "onDragOver" | "onDragOverCapture" | "onDragStart" | "onDragStartCapture" | "onDrop" | "onDropCapture" | "onMouseDown" | "onMouseDownCapture" | "onMouseEnter" | "onMouseLeave" | "onMouseMove" | "onMouseMoveCapture" | "onMouseOut" | "onMouseOutCapture" | "onMouseOver" | "onMouseOverCapture" | "onMouseUp" | "onMouseUpCapture" | "onSelect" | "onSelectCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerEnter" | "onPointerLeave" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onScroll" | "onScrollCapture" | "onWheel" | "onWheelCapture" | "onAnimationStart" | "onAnimationStartCapture" | "onAnimationEnd" | "onAnimationEndCapture" | "onAnimationIteration" | "onAnimationIterationCapture" | "onBeforeToggle" | "onTransitionCancel" | "onTransitionCancelCapture" | "onTransitionEnd" | "onTransitionEndCapture" | "onTransitionRun" | "onTransitionRunCapture" | "onTransitionStart" | "onTransitionStartCapture">, "children"> & {
433
433
  children?: React.ReactNode;
434
434
  } & {
435
435
  dir?: string | undefined | undefined;
436
436
  slot?: string | undefined | undefined;
437
437
  style?: import("react").CSSProperties | undefined;
438
438
  title?: string | undefined | undefined;
439
- role?: import("react").AriaRole | undefined;
440
- "aria-label"?: string | undefined | undefined;
441
- property?: string | undefined | undefined;
442
- content?: string | undefined | undefined;
443
- color?: string | undefined | undefined;
444
439
  accessKey?: string | undefined | undefined;
445
440
  draggable?: (boolean | "true" | "false") | undefined;
446
441
  hidden?: boolean | undefined | undefined;
@@ -451,11 +446,16 @@ export declare const GdsVideo: {
451
446
  className?: string | undefined | undefined;
452
447
  id?: string | undefined | undefined;
453
448
  prefix?: string | undefined | undefined;
449
+ role?: import("react").AriaRole | undefined;
454
450
  contentEditable?: "inherit" | (boolean | "true" | "false") | "plaintext-only" | undefined;
455
451
  enterKeyHint?: "enter" | "done" | "go" | "next" | "previous" | "search" | "send" | undefined | undefined;
456
452
  inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
457
453
  nonce?: string | undefined | undefined;
458
454
  tabIndex?: number | undefined | undefined;
455
+ "aria-label"?: string | undefined | undefined;
456
+ property?: string | undefined | undefined;
457
+ content?: string | undefined | undefined;
458
+ color?: string | undefined | undefined;
459
459
  "aria-selected"?: (boolean | "true" | "false") | undefined;
460
460
  defaultChecked?: boolean | undefined | undefined;
461
461
  defaultValue?: string | number | readonly string[] | undefined;
@@ -463,7 +463,6 @@ export declare const GdsVideo: {
463
463
  "aria-haspopup"?: boolean | "false" | "true" | "menu" | "listbox" | "tree" | "grid" | "dialog" | undefined | undefined;
464
464
  "aria-expanded"?: (boolean | "true" | "false") | undefined;
465
465
  rel?: string | undefined | undefined;
466
- "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
467
466
  "aria-valuemin"?: number | undefined | undefined;
468
467
  "aria-valuemax"?: number | undefined | undefined;
469
468
  "aria-valuetext"?: string | undefined | undefined;
@@ -523,6 +522,7 @@ export declare const GdsVideo: {
523
522
  "aria-level"?: number | undefined | undefined;
524
523
  "aria-modal"?: (boolean | "true" | "false") | undefined;
525
524
  "aria-multiline"?: (boolean | "true" | "false") | undefined;
525
+ "aria-multiselectable"?: (boolean | "true" | "false") | undefined;
526
526
  "aria-orientation"?: "horizontal" | "vertical" | undefined | undefined;
527
527
  "aria-owns"?: string | undefined | undefined;
528
528
  "aria-placeholder"?: string | undefined | undefined;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sebgroup/green-core",
3
3
  "description": "A carefully crafted set of Web Components, laying the foundation of the Green Design System.",
4
- "version": "3.21.0",
4
+ "version": "3.21.1",
5
5
  "main": "index.js",
6
6
  "module": "index.js",
7
7
  "type": "module",
@@ -473,6 +473,7 @@
473
473
  "./components/filter-chips/filter-chip/filter-chip.js",
474
474
  "./components/fab/index.js",
475
475
  "./components/fab/fab.js",
476
+ "./components/dropdown/option.js",
476
477
  "./components/dropdown/index.js",
477
478
  "./components/dropdown/dropdown.js",
478
479
  "./components/divider/index.js",
@@ -533,9 +534,6 @@
533
534
  "./primitives/menu/menu-item.js",
534
535
  "./primitives/menu/menu-heading.js",
535
536
  "./primitives/menu/index.js",
536
- "./primitives/listbox/option.js",
537
- "./primitives/listbox/listbox.js",
538
- "./primitives/listbox/index.js",
539
537
  "./primitives/form-control-header/index.js",
540
538
  "./primitives/form-control-header/form-control-header.js",
541
539
  "./primitives/form-control-footer/index.js",
@@ -0,0 +1,14 @@
1
+ import "../../chunks/chunk.CAV4X6PU.js";
2
+ import { TransitionalStyles } from "../../utils/transitional-styles/transitional-styles.js";
3
+ import menuHeadingStyles from "./menu-heading.trans.styles.scss.js";
4
+ function register() {
5
+ TransitionalStyles.instance.register(
6
+ "gds-menu-heading",
7
+ menuHeadingStyles.toString()
8
+ );
9
+ }
10
+ var menu_heading_trans_styles_default = register;
11
+ export {
12
+ menu_heading_trans_styles_default as default,
13
+ register
14
+ };
@@ -6,9 +6,9 @@ import {
6
6
  var _handleOnClick;
7
7
  import { GdsElement } from "../../gds-element.js";
8
8
  import { gdsCustomElement, html } from "../../scoping.js";
9
+ import styles from "../../shared-styles/menu-listbox-item.style.js";
9
10
  import { TransitionalStyles } from "../../transitional-styles.js";
10
11
  import { Focusable } from "../../utils/mixins/focusable.js";
11
- import styles from "../listbox/option.styles.js";
12
12
  let GdsMenuItem = class extends Focusable(GdsElement) {
13
13
  constructor() {
14
14
  super(...arguments);
@@ -7,6 +7,7 @@ var _slotRef;
7
7
  import { createRef, ref } from "lit/directives/ref.js";
8
8
  import { GdsElement } from "../../gds-element.js";
9
9
  import { gdsCustomElement, html } from "../../scoping.js";
10
+ import { MENU_LISTBOX_TRANSITIONAL_STYLE_KEY } from "../../shared-styles/menu-listbox.trans.style.js";
10
11
  import { TransitionalStyles } from "../../transitional-styles.js";
11
12
  import {
12
13
  ListboxKbNavController
@@ -22,7 +23,7 @@ let GdsMenu = class extends GdsElement {
22
23
  connectedCallback() {
23
24
  super.connectedCallback();
24
25
  this.setAttribute("role", "menu");
25
- TransitionalStyles.instance.apply(this, "gds-listbox");
26
+ TransitionalStyles.instance.apply(this, MENU_LISTBOX_TRANSITIONAL_STYLE_KEY);
26
27
  }
27
28
  get navigableItems() {
28
29
  if (!__privateGet(this, _slotRef).value)
package/pure.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from './primitives/listbox/option.component';
1
+ export * from './components/dropdown/option.component';
2
2
  export * from './primitives/menu/menu-heading.component';
3
3
  export * from './primitives/menu/menu-item.component';
4
4
  export * from './components/alert/alert.component';
package/pure.js CHANGED
@@ -1,4 +1,4 @@
1
- export * from "./primitives/listbox/option.component.js";
1
+ export * from "./components/dropdown/option.component.js";
2
2
  export * from "./primitives/menu/menu-heading.component.js";
3
3
  export * from "./primitives/menu/menu-item.component.js";
4
4
  export * from "./components/alert/alert.component.js";
@@ -1,4 +1,4 @@
1
- import "../../chunks/chunk.CAV4X6PU.js";
1
+ import "../chunks/chunk.CAV4X6PU.js";
2
2
  import { css } from "lit";
3
3
  const style = css`
4
4
  @layer base, reset;
@@ -66,7 +66,7 @@ const style = css`
66
66
  }
67
67
  }
68
68
  `;
69
- var option_styles_default = style;
69
+ var menu_listbox_item_style_default = style;
70
70
  export {
71
- option_styles_default as default
71
+ menu_listbox_item_style_default as default
72
72
  };
@@ -0,0 +1,2 @@
1
+ export declare function register(): void;
2
+ export default register;
@@ -0,0 +1,15 @@
1
+ import "../chunks/chunk.CAV4X6PU.js";
2
+ import { TransitionalStyles } from "../utils/transitional-styles/transitional-styles.js";
3
+ import itemStyles from "./menu-listbox-item.trans.style.scss.js";
4
+ import rbcbStyles from "./rbcb-toggle.style.js";
5
+ function register() {
6
+ TransitionalStyles.instance.register(
7
+ "gds-option",
8
+ itemStyles.toString() + rbcbStyles.cssText
9
+ );
10
+ }
11
+ var menu_listbox_item_trans_style_default = register;
12
+ export {
13
+ menu_listbox_item_trans_style_default as default,
14
+ register
15
+ };
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Menu listbox
3
+ *
4
+ * The scrollable, vertically stacked container that holds the items of a listbox or a menu.
5
+ * Used by `gds-dropdown` for its options list and by `gds-context-menu` for its menu.
6
+ *
7
+ * Scoped to a class rather than `:host` so it can be applied to a container element inside a
8
+ * component's shadow root.
9
+ */
10
+ declare const _default: import("lit").CSSResult;
11
+ export default _default;
@@ -1,9 +1,10 @@
1
- import "../../chunks/chunk.CAV4X6PU.js";
1
+ import "../chunks/chunk.CAV4X6PU.js";
2
2
  import { css } from "lit";
3
- const style = css`
3
+ var menu_listbox_style_default = css`
4
4
  @layer base, reset, transitional-styles;
5
+
5
6
  @layer base {
6
- :host {
7
+ .menu-listbox {
7
8
  display: flex;
8
9
  flex-direction: column;
9
10
  overflow: auto;
@@ -11,7 +12,6 @@ const style = css`
11
12
  }
12
13
  }
13
14
  `;
14
- var listbox_styles_default = style;
15
15
  export {
16
- listbox_styles_default as default
16
+ menu_listbox_style_default as default
17
17
  };
@@ -0,0 +1,3 @@
1
+ export declare const MENU_LISTBOX_TRANSITIONAL_STYLE_KEY = "gds-menu-listbox";
2
+ export declare function register(): void;
3
+ export default register;
@@ -0,0 +1,16 @@
1
+ import "../chunks/chunk.CAV4X6PU.js";
2
+ import { TransitionalStyles } from "../utils/transitional-styles/transitional-styles.js";
3
+ import styles from "./menu-listbox.trans.style.scss.js";
4
+ const MENU_LISTBOX_TRANSITIONAL_STYLE_KEY = "gds-menu-listbox";
5
+ function register() {
6
+ TransitionalStyles.instance.register(
7
+ MENU_LISTBOX_TRANSITIONAL_STYLE_KEY,
8
+ styles.toString()
9
+ );
10
+ }
11
+ var menu_listbox_trans_style_default = register;
12
+ export {
13
+ MENU_LISTBOX_TRANSITIONAL_STYLE_KEY,
14
+ menu_listbox_trans_style_default as default,
15
+ register
16
+ };
@@ -0,0 +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 .menu-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 :host > li,\n .menu-listbox > 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 .menu-listbox > li::before {\n font-weight: 500;\n display: inline-block;\n left: 0;\n position: absolute;\n text-align: center;\n }\n :host,\n .menu-listbox {\n overflow-y: auto;\n }\n}";
2
+ export default styles;
@@ -1,6 +1,6 @@
1
1
  import "../../chunks/chunk.CAV4X6PU.js";
2
2
  import { html as litHtml } from "lit";
3
- const VER_SUFFIX = "-4d92f4";
3
+ const VER_SUFFIX = "-4b251e";
4
4
  class ScopedElementRegistry {
5
5
  static get instance() {
6
6
  if (!globalThis.__gdsElementLookupTable?.[VER_SUFFIX])
@@ -16,6 +16,13 @@ export declare class TransitionalStyles {
16
16
  #private;
17
17
  static get instance(): TransitionalStyles;
18
18
  apply(element: GdsElement, styleKey: string): void;
19
+ /**
20
+ * Applies transitional styles to a container inside the host's shadow root, leaving the host's own
21
+ * stylesheet in place. Use this when only part of a component has a transitional counterpart, or
22
+ * when the target is a plain element that cannot be a style key owner of its own.
23
+ */
24
+ applyScoped(element: GdsElement, styleKey: string, injectKey: string): void;
25
+ applyScopedToElement(styleKey: string, sheet: string): void;
19
26
  applyToElement(styleKey: string, sheet: string): void;
20
27
  register(name: string, styles: string): void;
21
28
  }
@@ -1,8 +1,9 @@
1
1
  import {
2
2
  __privateAdd,
3
- __privateGet
3
+ __privateGet,
4
+ __privateMethod
4
5
  } from "../../chunks/chunk.CAV4X6PU.js";
5
- var _styles, _elements, _useLegacyStylesheets;
6
+ var _styles, _elements, _scopedElements, _useLegacyStylesheets, _followDesignVersion, followDesignVersion_fn;
6
7
  import { unsafeCSS } from "lit";
7
8
  import * as Button from "../../components/button/button.trans.styles.js";
8
9
  import * as ContextMenu from "../../components/context-menu/context-menu.trans.styles.js";
@@ -28,8 +29,14 @@ const registerTransitionalStyles = () => {
28
29
  };
29
30
  const _TransitionalStyles = class _TransitionalStyles {
30
31
  constructor() {
32
+ /**
33
+ * Runs `applyTransitional` or `clearTransitional` based on the `designVersion` of the closest
34
+ * `gds-theme` ancestor, and keeps following it if that version changes later.
35
+ */
36
+ __privateAdd(this, _followDesignVersion);
31
37
  __privateAdd(this, _styles, /* @__PURE__ */ new Map());
32
38
  __privateAdd(this, _elements, /* @__PURE__ */ new Map());
39
+ __privateAdd(this, _scopedElements, /* @__PURE__ */ new Map());
33
40
  __privateAdd(this, _useLegacyStylesheets, !supportsConstructedStylesheets());
34
41
  }
35
42
  static get instance() {
@@ -49,49 +56,40 @@ const _TransitionalStyles = class _TransitionalStyles {
49
56
  __privateGet(this, _elements).set(styleKey, element);
50
57
  this.applyToElement(styleKey, style);
51
58
  }
59
+ /**
60
+ * Applies transitional styles to a container inside the host's shadow root, leaving the host's own
61
+ * stylesheet in place. Use this when only part of a component has a transitional counterpart, or
62
+ * when the target is a plain element that cannot be a style key owner of its own.
63
+ */
64
+ applyScoped(element, styleKey, injectKey) {
65
+ if (!element.shadowRoot)
66
+ return;
67
+ const style = __privateGet(this, _styles).get(styleKey);
68
+ if (!style)
69
+ return;
70
+ __privateGet(this, _scopedElements).set(styleKey, { element, injectKey });
71
+ this.applyScopedToElement(styleKey, style);
72
+ }
73
+ applyScopedToElement(styleKey, sheet) {
74
+ const scoped = __privateGet(this, _scopedElements).get(styleKey);
75
+ if (!scoped || !scoped.element.shadowRoot)
76
+ return;
77
+ const { element, injectKey } = scoped;
78
+ __privateMethod(this, _followDesignVersion, followDesignVersion_fn).call(this, element, () => element._dynamicStylesController.inject(injectKey, unsafeCSS(sheet)), () => element._dynamicStylesController.clear(injectKey));
79
+ }
52
80
  applyToElement(styleKey, sheet) {
53
81
  const element = __privateGet(this, _elements).get(styleKey);
54
82
  if (!element || !element.shadowRoot)
55
83
  return;
56
- const applyTransitional = () => {
84
+ __privateMethod(this, _followDesignVersion, followDesignVersion_fn).call(this, element, () => {
57
85
  element._dynamicStylesController.clearInitial();
58
86
  element._dynamicStylesController.inject("t-styles", unsafeCSS(sheet));
59
87
  element._isUsingTransitionalStyles = true;
60
- };
61
- const clearTransitional = () => {
88
+ }, () => {
62
89
  element._isUsingTransitionalStyles = false;
63
90
  element._dynamicStylesController.clear("t-styles");
64
91
  element._dynamicStylesController.restoreInitial();
65
- };
66
- const gdsThemeSelector = "[gds-element=gds-theme]";
67
- let currentRoot = element.getRootNode();
68
- let closestGdsTheme = element.closest(gdsThemeSelector);
69
- while (closestGdsTheme === null && currentRoot !== document) {
70
- closestGdsTheme = currentRoot.host?.closest(
71
- gdsThemeSelector
72
- );
73
- currentRoot = currentRoot.host?.getRootNode();
74
- }
75
- if (closestGdsTheme) {
76
- const theme = closestGdsTheme;
77
- const updateStyles = () => {
78
- if (theme.designVersion === "2023") {
79
- clearTransitional();
80
- } else {
81
- applyTransitional();
82
- }
83
- };
84
- theme.addEventListener("gds-design-version-changed", updateStyles);
85
- element.addEventListener(
86
- "gds-element-disconnected",
87
- () => theme.removeEventListener("gds-design-version-changed", updateStyles)
88
- );
89
- if (theme.designVersion === "2023") {
90
- clearTransitional();
91
- return;
92
- }
93
- }
94
- applyTransitional();
92
+ });
95
93
  }
96
94
  register(name, styles) {
97
95
  let preparedStyle = styles;
@@ -105,11 +103,45 @@ const _TransitionalStyles = class _TransitionalStyles {
105
103
  }
106
104
  __privateGet(this, _styles).set(name, preparedStyle);
107
105
  this.applyToElement(name, preparedStyle);
106
+ this.applyScopedToElement(name, preparedStyle);
108
107
  }
109
108
  };
110
109
  _styles = new WeakMap();
111
110
  _elements = new WeakMap();
111
+ _scopedElements = new WeakMap();
112
112
  _useLegacyStylesheets = new WeakMap();
113
+ _followDesignVersion = new WeakSet();
114
+ followDesignVersion_fn = function(element, applyTransitional, clearTransitional) {
115
+ const gdsThemeSelector = "[gds-element=gds-theme]";
116
+ let currentRoot = element.getRootNode();
117
+ let closestGdsTheme = element.closest(gdsThemeSelector);
118
+ while (closestGdsTheme === null && currentRoot !== document) {
119
+ closestGdsTheme = currentRoot.host?.closest(
120
+ gdsThemeSelector
121
+ );
122
+ currentRoot = currentRoot.host?.getRootNode();
123
+ }
124
+ if (closestGdsTheme) {
125
+ const theme = closestGdsTheme;
126
+ const updateStyles = () => {
127
+ if (theme.designVersion === "2023") {
128
+ clearTransitional();
129
+ } else {
130
+ applyTransitional();
131
+ }
132
+ };
133
+ theme.addEventListener("gds-design-version-changed", updateStyles);
134
+ element.addEventListener(
135
+ "gds-element-disconnected",
136
+ () => theme.removeEventListener("gds-design-version-changed", updateStyles)
137
+ );
138
+ if (theme.designVersion === "2023") {
139
+ clearTransitional();
140
+ return;
141
+ }
142
+ }
143
+ applyTransitional();
144
+ };
113
145
  let TransitionalStyles = _TransitionalStyles;
114
146
  export {
115
147
  TransitionalStyles,
@@ -1 +0,0 @@
1
- export * from './listbox';
@@ -1 +0,0 @@
1
- export * from "./listbox.js";
@@ -1,59 +0,0 @@
1
- import { GdsElement } from '../../gds-element';
2
- import { ListboxKbNavigation } from '../../utils/controllers/listbox-kb-nav-controller';
3
- import { GdsOption } from './option.component';
4
- import type { OptionsContainer } from './option.component';
5
- /**
6
- * @element gds-listbox
7
- * @internal
8
- *
9
- * A listbox is a widget that allows the user to select one or more items from a list of choices.
10
- * This primitive corresponds to the aria listbox role: https://developer.mozilla.org/en-US/docs/Web/Accessibility/ARIA/Roles/listbox_role
11
- *
12
- * The listbox handles keyboard navigation and manages focus and selection of options.
13
- *
14
- * Can be used together with the `gds-option` primitive.
15
- *
16
- * @slot - The default slot. Only `gds-option` elements should be used here.
17
- */
18
- export declare class GdsListbox extends GdsElement implements ListboxKbNavigation, OptionsContainer {
19
- #private;
20
- static styles: import("lit").CSSResult;
21
- /**
22
- * Controls whether the listbox allows multiple selection or not.
23
- */
24
- multiple: boolean;
25
- /**
26
- * Delegate function for comparing option values.
27
- */
28
- compareWith: (a: any, b: any) => boolean;
29
- constructor();
30
- get navigableItems(): GdsOption[];
31
- /**
32
- * Returns a list of all `gds-option` elements in the listbox.
33
- */
34
- get options(): GdsOption[];
35
- /**
36
- * Returns a list of all visible `gds-option` elements in the listbox.
37
- */
38
- get visibleOptionElements(): GdsOption[];
39
- /**
40
- * Returns a list of all visible `gds-option` elements in the listbox.
41
- */
42
- get visibleSelectedOptionElements(): GdsOption[];
43
- /**
44
- * Returns a list of all selected `gds-option` elements in the listbox.
45
- */
46
- get selection(): GdsOption[];
47
- set selection(values: any[]);
48
- connectedCallback(): void;
49
- /**
50
- * Focuses the first selected option in the listbox.
51
- * If no option is selected, the first visible option is focused.
52
- */
53
- focus(): void;
54
- render(): any;
55
- /**
56
- * Re-renders all options in the listbox when the `multiple` property changes.
57
- */
58
- private _rerenderOptions;
59
- }
@@ -1,129 +0,0 @@
1
- import {
2
- __decorateClass,
3
- __privateAdd,
4
- __privateGet
5
- } from "../../chunks/chunk.CAV4X6PU.js";
6
- var _slotRef, _handleSelect;
7
- import { property } from "lit/decorators.js";
8
- import { createRef, ref } from "lit/directives/ref.js";
9
- import { GdsElement } from "../../gds-element.js";
10
- import { gdsCustomElement, html } from "../../scoping.js";
11
- import { TransitionalStyles } from "../../transitional-styles.js";
12
- import {
13
- ListboxKbNavController
14
- } from "../../utils/controllers/listbox-kb-nav-controller.js";
15
- import { watch } from "../../utils/decorators/watch.js";
16
- import { unwrap } from "../../utils/helpers/unwrap-slots.js";
17
- import ListboxStyles from "./listbox.styles.js";
18
- import { GdsOption } from "./option.component.js";
19
- let GdsListbox = class extends GdsElement {
20
- constructor() {
21
- super();
22
- this.multiple = false;
23
- this.compareWith = (a, b) => a === b;
24
- __privateAdd(this, _slotRef, createRef());
25
- __privateAdd(this, _handleSelect, (e) => {
26
- const option = e.target;
27
- if (this.multiple)
28
- option.selected = !option.selected;
29
- else {
30
- option.selected = true;
31
- Array.from(this.options).forEach((el) => {
32
- if (el !== option)
33
- el.selected = false;
34
- });
35
- }
36
- ;
37
- this.ariaActiveDescendantElement = option;
38
- this.dispatchCustomEvent("change", {
39
- bubbles: false,
40
- composed: false
41
- });
42
- });
43
- new ListboxKbNavController(this);
44
- }
45
- get navigableItems() {
46
- return this.visibleOptionElements;
47
- }
48
- /**
49
- * Returns a list of all `gds-option` elements in the listbox.
50
- */
51
- get options() {
52
- if (!__privateGet(this, _slotRef).value)
53
- return [];
54
- return unwrap(__privateGet(this, _slotRef).value).assignedElements().filter(
55
- (o) => !o.hasAttribute("isplaceholder") && o.gdsElementName === "gds-option"
56
- ) || [];
57
- }
58
- /**
59
- * Returns a list of all visible `gds-option` elements in the listbox.
60
- */
61
- get visibleOptionElements() {
62
- return this.options.filter((el) => !el.hidden);
63
- }
64
- /**
65
- * Returns a list of all visible `gds-option` elements in the listbox.
66
- */
67
- get visibleSelectedOptionElements() {
68
- return this.options.filter((el) => el.selected && !el.hidden);
69
- }
70
- /**
71
- * Returns a list of all selected `gds-option` elements in the listbox.
72
- */
73
- get selection() {
74
- return this.options.filter((el) => el.selected);
75
- }
76
- set selection(values) {
77
- this.options.forEach((el) => {
78
- el.selected = values.some((v) => this.compareWith(v, el.value));
79
- });
80
- }
81
- connectedCallback() {
82
- super.connectedCallback();
83
- this.setAttribute("role", "listbox");
84
- TransitionalStyles.instance.apply(this, "gds-listbox");
85
- this.addEventListener("gds-select", __privateGet(this, _handleSelect));
86
- }
87
- /**
88
- * Focuses the first selected option in the listbox.
89
- * If no option is selected, the first visible option is focused.
90
- */
91
- focus() {
92
- ;
93
- (this.visibleSelectedOptionElements[0] || this.visibleOptionElements[0])?.focus();
94
- }
95
- render() {
96
- return html`<slot ${ref(__privateGet(this, _slotRef))}></slot>`;
97
- }
98
- _rerenderOptions() {
99
- this.options.forEach((el) => {
100
- el.requestUpdate();
101
- });
102
- }
103
- };
104
- _slotRef = new WeakMap();
105
- _handleSelect = new WeakMap();
106
- GdsListbox.styles = ListboxStyles;
107
- __decorateClass([
108
- property({
109
- type: Boolean,
110
- reflect: true,
111
- attribute: "aria-multiselectable",
112
- converter: {
113
- fromAttribute: Boolean,
114
- toAttribute: (value) => value.toString()
115
- }
116
- })
117
- ], GdsListbox.prototype, "multiple", 2);
118
- __decorateClass([
119
- property()
120
- ], GdsListbox.prototype, "compareWith", 2);
121
- __decorateClass([
122
- watch("multiple")
123
- ], GdsListbox.prototype, "_rerenderOptions", 1);
124
- GdsListbox = __decorateClass([
125
- gdsCustomElement("gds-listbox", { dependsOn: [GdsOption] })
126
- ], GdsListbox);
127
- export {
128
- GdsListbox
129
- };