@sebgroup/green-core 3.25.2-rc.20260929143124544 → 3.26.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (432) hide show
  1. package/components/checkbox/checkbox-group/checkbox-group.component.js +4 -2
  2. package/components/checkbox/checkbox.component.js +11 -0
  3. package/components/datepicker/date-part-spinner.d.ts +4 -0
  4. package/components/datepicker/date-part-spinner.js +6 -0
  5. package/components/datepicker/datepicker.component.d.ts +1 -0
  6. package/components/datepicker/datepicker.component.js +92 -57
  7. package/components/datepicker/datepicker.styles.js +4 -0
  8. package/components/dropdown/dropdown.component.js +13 -1
  9. package/components/dropdown/option.component.js +1 -0
  10. package/components/filter-chips/filter-chips.component.js +1 -0
  11. package/components/form/form-control.d.ts +5 -0
  12. package/components/form/form-control.js +7 -0
  13. package/components/input/input.component.js +7 -2
  14. package/components/radio/radio-group/radio-group.component.js +8 -2
  15. package/components/radio/radio.component.d.ts +9 -0
  16. package/components/radio/radio.component.js +9 -3
  17. package/components/select/select.component.js +40 -13
  18. package/components/select/select.styles.js +4 -0
  19. package/components/switch/switch.component.js +22 -4
  20. package/components/switch/switch.styles.js +34 -0
  21. package/components/table/table.component.js +2 -1
  22. package/components/textarea/textarea.component.js +6 -1
  23. package/custom-elements.json +27116 -26611
  24. package/gds-element.js +1 -1
  25. package/generated/mcp/button/api.md +1 -0
  26. package/generated/mcp/checkbox/api.md +1 -0
  27. package/generated/mcp/checkbox-group/api.md +1 -0
  28. package/generated/mcp/components.json +1 -1
  29. package/generated/mcp/datepicker/api.md +1 -0
  30. package/generated/mcp/dropdown/api.md +1 -0
  31. package/generated/mcp/fab/api.md +1 -0
  32. package/generated/mcp/filter-chips/api.md +1 -0
  33. package/generated/mcp/icons.json +1 -1
  34. package/generated/mcp/index.json +1 -1
  35. package/generated/mcp/input/api.md +1 -0
  36. package/generated/mcp/radio/api.md +1 -0
  37. package/generated/mcp/radio-group/api.md +1 -0
  38. package/generated/mcp/switch/api.md +1 -0
  39. package/generated/mcp/textarea/api.md +1 -0
  40. package/generated/mcp/tokens.json +1 -1
  41. package/generated/react/alert/index.d.ts +2 -2
  42. package/generated/react/avatar/index.d.ts +2 -2
  43. package/generated/react/avatar-group/index.d.ts +2 -2
  44. package/generated/react/backdrop/index.d.ts +2 -2
  45. package/generated/react/badge/index.d.ts +2 -2
  46. package/generated/react/blur/index.d.ts +2 -2
  47. package/generated/react/breadcrumb/index.d.ts +2 -2
  48. package/generated/react/breadcrumbs/index.d.ts +2 -2
  49. package/generated/react/button/index.d.ts +3 -2
  50. package/generated/react/calendar/index.d.ts +2 -2
  51. package/generated/react/card/index.d.ts +2 -2
  52. package/generated/react/card-linked/index.d.ts +2 -2
  53. package/generated/react/card-pattern-01/index.d.ts +2 -2
  54. package/generated/react/checkbox/index.d.ts +3 -2
  55. package/generated/react/checkbox-group/index.d.ts +3 -2
  56. package/generated/react/coachmark/index.d.ts +2 -2
  57. package/generated/react/context-menu/index.d.ts +2 -2
  58. package/generated/react/datepicker/index.d.ts +3 -2
  59. package/generated/react/details/index.d.ts +2 -2
  60. package/generated/react/dialog/index.d.ts +2 -2
  61. package/generated/react/div/index.d.ts +2 -2
  62. package/generated/react/divider/index.d.ts +2 -2
  63. package/generated/react/dropdown/index.d.ts +3 -2
  64. package/generated/react/fab/index.d.ts +3 -2
  65. package/generated/react/filter-chip/index.d.ts +2 -2
  66. package/generated/react/filter-chips/index.d.ts +3 -2
  67. package/generated/react/flex/index.d.ts +2 -2
  68. package/generated/react/form-summary/index.d.ts +2 -2
  69. package/generated/react/formatted-account/index.d.ts +2 -2
  70. package/generated/react/formatted-date/index.d.ts +2 -2
  71. package/generated/react/formatted-number/index.d.ts +2 -2
  72. package/generated/react/grid/index.d.ts +2 -2
  73. package/generated/react/grouped-list/index.d.ts +2 -2
  74. package/generated/react/icons/icon-ai/index.d.ts +2 -2
  75. package/generated/react/icons/icon-airplane-up/index.d.ts +2 -2
  76. package/generated/react/icons/icon-archive/index.d.ts +2 -2
  77. package/generated/react/icons/icon-arrow/index.d.ts +2 -2
  78. package/generated/react/icons/icon-arrow-bottom-top/index.d.ts +2 -2
  79. package/generated/react/icons/icon-arrow-box-left/index.d.ts +2 -2
  80. package/generated/react/icons/icon-arrow-box-left-alt/index.d.ts +2 -2
  81. package/generated/react/icons/icon-arrow-box-right/index.d.ts +2 -2
  82. package/generated/react/icons/icon-arrow-down/index.d.ts +2 -2
  83. package/generated/react/icons/icon-arrow-inbox/index.d.ts +2 -2
  84. package/generated/react/icons/icon-arrow-left/index.d.ts +2 -2
  85. package/generated/react/icons/icon-arrow-left-right/index.d.ts +2 -2
  86. package/generated/react/icons/icon-arrow-out-of-box/index.d.ts +2 -2
  87. package/generated/react/icons/icon-arrow-right/index.d.ts +2 -2
  88. package/generated/react/icons/icon-arrow-right-circle/index.d.ts +2 -2
  89. package/generated/react/icons/icon-arrow-right-down-circle/index.d.ts +2 -2
  90. package/generated/react/icons/icon-arrow-right-up-circle/index.d.ts +2 -2
  91. package/generated/react/icons/icon-arrow-rotate-clockwise/index.d.ts +2 -2
  92. package/generated/react/icons/icon-arrow-rotate-counter-clockwise/index.d.ts +2 -2
  93. package/generated/react/icons/icon-arrow-rotate-left-right/index.d.ts +2 -2
  94. package/generated/react/icons/icon-arrow-rotate-right-left/index.d.ts +2 -2
  95. package/generated/react/icons/icon-arrow-share-left/index.d.ts +2 -2
  96. package/generated/react/icons/icon-arrow-share-right/index.d.ts +2 -2
  97. package/generated/react/icons/icon-arrow-split/index.d.ts +2 -2
  98. package/generated/react/icons/icon-arrow-up/index.d.ts +2 -2
  99. package/generated/react/icons/icon-arrow-wall-down/index.d.ts +2 -2
  100. package/generated/react/icons/icon-arrow-wall-left/index.d.ts +2 -2
  101. package/generated/react/icons/icon-arrow-wall-right/index.d.ts +2 -2
  102. package/generated/react/icons/icon-arrow-wall-up/index.d.ts +2 -2
  103. package/generated/react/icons/icon-arrows-repeat-right/index.d.ts +2 -2
  104. package/generated/react/icons/icon-asterisk/index.d.ts +2 -2
  105. package/generated/react/icons/icon-at/index.d.ts +2 -2
  106. package/generated/react/icons/icon-back/index.d.ts +2 -2
  107. package/generated/react/icons/icon-backward/index.d.ts +2 -2
  108. package/generated/react/icons/icon-bag/index.d.ts +2 -2
  109. package/generated/react/icons/icon-bank/index.d.ts +2 -2
  110. package/generated/react/icons/icon-banknote/index.d.ts +2 -2
  111. package/generated/react/icons/icon-banknote-2/index.d.ts +2 -2
  112. package/generated/react/icons/icon-barcode/index.d.ts +2 -2
  113. package/generated/react/icons/icon-bars-three/index.d.ts +2 -2
  114. package/generated/react/icons/icon-bars-two/index.d.ts +2 -2
  115. package/generated/react/icons/icon-basket/index.d.ts +2 -2
  116. package/generated/react/icons/icon-battery-loading/index.d.ts +2 -2
  117. package/generated/react/icons/icon-bell/index.d.ts +2 -2
  118. package/generated/react/icons/icon-block/index.d.ts +2 -2
  119. package/generated/react/icons/icon-book/index.d.ts +2 -2
  120. package/generated/react/icons/icon-bookmark/index.d.ts +2 -2
  121. package/generated/react/icons/icon-bookmark-check/index.d.ts +2 -2
  122. package/generated/react/icons/icon-bookmark-delete/index.d.ts +2 -2
  123. package/generated/react/icons/icon-bookmark-plus/index.d.ts +2 -2
  124. package/generated/react/icons/icon-bookmark-remove/index.d.ts +2 -2
  125. package/generated/react/icons/icon-books/index.d.ts +2 -2
  126. package/generated/react/icons/icon-brand-app-store/index.d.ts +2 -2
  127. package/generated/react/icons/icon-brand-apple-music/index.d.ts +2 -2
  128. package/generated/react/icons/icon-brand-bankid/index.d.ts +2 -2
  129. package/generated/react/icons/icon-brand-chrome/index.d.ts +2 -2
  130. package/generated/react/icons/icon-brand-facebook/index.d.ts +2 -2
  131. package/generated/react/icons/icon-brand-figma/index.d.ts +2 -2
  132. package/generated/react/icons/icon-brand-firefox/index.d.ts +2 -2
  133. package/generated/react/icons/icon-brand-github/index.d.ts +2 -2
  134. package/generated/react/icons/icon-brand-green/index.d.ts +2 -2
  135. package/generated/react/icons/icon-brand-instagram/index.d.ts +2 -2
  136. package/generated/react/icons/icon-brand-linkedin/index.d.ts +2 -2
  137. package/generated/react/icons/icon-brand-play-store/index.d.ts +2 -2
  138. package/generated/react/icons/icon-brand-rss-feed/index.d.ts +2 -2
  139. package/generated/react/icons/icon-brand-seb/index.d.ts +2 -2
  140. package/generated/react/icons/icon-brand-spotify/index.d.ts +2 -2
  141. package/generated/react/icons/icon-brand-storybook/index.d.ts +2 -2
  142. package/generated/react/icons/icon-brand-swish-word/index.d.ts +2 -2
  143. package/generated/react/icons/icon-brand-x/index.d.ts +2 -2
  144. package/generated/react/icons/icon-brush/index.d.ts +2 -2
  145. package/generated/react/icons/icon-bubble-annotation/index.d.ts +2 -2
  146. package/generated/react/icons/icon-bubbles/index.d.ts +2 -2
  147. package/generated/react/icons/icon-buildings/index.d.ts +2 -2
  148. package/generated/react/icons/icon-bullet-list/index.d.ts +2 -2
  149. package/generated/react/icons/icon-calculator/index.d.ts +2 -2
  150. package/generated/react/icons/icon-calendar/index.d.ts +2 -2
  151. package/generated/react/icons/icon-calendar-check/index.d.ts +2 -2
  152. package/generated/react/icons/icon-calendar-repeat/index.d.ts +2 -2
  153. package/generated/react/icons/icon-calender-add/index.d.ts +2 -2
  154. package/generated/react/icons/icon-call/index.d.ts +2 -2
  155. package/generated/react/icons/icon-car/index.d.ts +2 -2
  156. package/generated/react/icons/icon-carussel/index.d.ts +2 -2
  157. package/generated/react/icons/icon-chain-link/index.d.ts +2 -2
  158. package/generated/react/icons/icon-chain-link-broken/index.d.ts +2 -2
  159. package/generated/react/icons/icon-chart-two/index.d.ts +2 -2
  160. package/generated/react/icons/icon-checklist/index.d.ts +2 -2
  161. package/generated/react/icons/icon-checkmark/index.d.ts +2 -2
  162. package/generated/react/icons/icon-chevron-bottom/index.d.ts +2 -2
  163. package/generated/react/icons/icon-chevron-double-down/index.d.ts +2 -2
  164. package/generated/react/icons/icon-chevron-double-left/index.d.ts +2 -2
  165. package/generated/react/icons/icon-chevron-double-right/index.d.ts +2 -2
  166. package/generated/react/icons/icon-chevron-double-up/index.d.ts +2 -2
  167. package/generated/react/icons/icon-chevron-down-small/index.d.ts +2 -2
  168. package/generated/react/icons/icon-chevron-grabber-vertical/index.d.ts +2 -2
  169. package/generated/react/icons/icon-chevron-grabber-vertical-reversed/index.d.ts +2 -2
  170. package/generated/react/icons/icon-chevron-left/index.d.ts +2 -2
  171. package/generated/react/icons/icon-chevron-left-small/index.d.ts +2 -2
  172. package/generated/react/icons/icon-chevron-right/index.d.ts +2 -2
  173. package/generated/react/icons/icon-chevron-right-small/index.d.ts +2 -2
  174. package/generated/react/icons/icon-chevron-top/index.d.ts +2 -2
  175. package/generated/react/icons/icon-chevron-top-small/index.d.ts +2 -2
  176. package/generated/react/icons/icon-circle-ban/index.d.ts +2 -2
  177. package/generated/react/icons/icon-circle-check/index.d.ts +2 -2
  178. package/generated/react/icons/icon-circle-dots/index.d.ts +2 -2
  179. package/generated/react/icons/icon-circle-info/index.d.ts +2 -2
  180. package/generated/react/icons/icon-circle-minus/index.d.ts +2 -2
  181. package/generated/react/icons/icon-circle-placeholder-on/index.d.ts +2 -2
  182. package/generated/react/icons/icon-circle-plus/index.d.ts +2 -2
  183. package/generated/react/icons/icon-circle-questionmark/index.d.ts +2 -2
  184. package/generated/react/icons/icon-circle-x/index.d.ts +2 -2
  185. package/generated/react/icons/icon-circles-three/index.d.ts +2 -2
  186. package/generated/react/icons/icon-clock/index.d.ts +2 -2
  187. package/generated/react/icons/icon-cloud-download/index.d.ts +2 -2
  188. package/generated/react/icons/icon-cloud-upload/index.d.ts +2 -2
  189. package/generated/react/icons/icon-cloudy-sun/index.d.ts +2 -2
  190. package/generated/react/icons/icon-code/index.d.ts +2 -2
  191. package/generated/react/icons/icon-code-brackets/index.d.ts +2 -2
  192. package/generated/react/icons/icon-compass-round/index.d.ts +2 -2
  193. package/generated/react/icons/icon-cookies/index.d.ts +2 -2
  194. package/generated/react/icons/icon-copy/index.d.ts +2 -2
  195. package/generated/react/icons/icon-credit-card/index.d.ts +2 -2
  196. package/generated/react/icons/icon-credit-card-add/index.d.ts +2 -2
  197. package/generated/react/icons/icon-cross-large/index.d.ts +2 -2
  198. package/generated/react/icons/icon-cross-small/index.d.ts +2 -2
  199. package/generated/react/icons/icon-cup-hot/index.d.ts +2 -2
  200. package/generated/react/icons/icon-cursor/index.d.ts +2 -2
  201. package/generated/react/icons/icon-details/index.d.ts +2 -2
  202. package/generated/react/icons/icon-devices/index.d.ts +2 -2
  203. package/generated/react/icons/icon-direction/index.d.ts +2 -2
  204. package/generated/react/icons/icon-dollar/index.d.ts +2 -2
  205. package/generated/react/icons/icon-dot-grid-one-horizontal/index.d.ts +2 -2
  206. package/generated/react/icons/icon-dot-grid-one-vertical/index.d.ts +2 -2
  207. package/generated/react/icons/icon-dot-grid-three/index.d.ts +2 -2
  208. package/generated/react/icons/icon-dot-grid-two/index.d.ts +2 -2
  209. package/generated/react/icons/icon-email/index.d.ts +2 -2
  210. package/generated/react/icons/icon-emoji-angry/index.d.ts +2 -2
  211. package/generated/react/icons/icon-emoji-neutral/index.d.ts +2 -2
  212. package/generated/react/icons/icon-emoji-sad/index.d.ts +2 -2
  213. package/generated/react/icons/icon-emoji-smile/index.d.ts +2 -2
  214. package/generated/react/icons/icon-emoji-smiley/index.d.ts +2 -2
  215. package/generated/react/icons/icon-euro/index.d.ts +2 -2
  216. package/generated/react/icons/icon-expand/index.d.ts +2 -2
  217. package/generated/react/icons/icon-eye-open/index.d.ts +2 -2
  218. package/generated/react/icons/icon-eye-slash/index.d.ts +2 -2
  219. package/generated/react/icons/icon-fashion/index.d.ts +2 -2
  220. package/generated/react/icons/icon-fast-forward/index.d.ts +2 -2
  221. package/generated/react/icons/icon-file-bend/index.d.ts +2 -2
  222. package/generated/react/icons/icon-file-chart/index.d.ts +2 -2
  223. package/generated/react/icons/icon-file-text/index.d.ts +2 -2
  224. package/generated/react/icons/icon-files/index.d.ts +2 -2
  225. package/generated/react/icons/icon-filter/index.d.ts +2 -2
  226. package/generated/react/icons/icon-flag/index.d.ts +2 -2
  227. package/generated/react/icons/icon-floppy-disk/index.d.ts +2 -2
  228. package/generated/react/icons/icon-focus/index.d.ts +2 -2
  229. package/generated/react/icons/icon-folder/index.d.ts +2 -2
  230. package/generated/react/icons/icon-folder-add-right/index.d.ts +2 -2
  231. package/generated/react/icons/icon-fullscreen/index.d.ts +2 -2
  232. package/generated/react/icons/icon-gift/index.d.ts +2 -2
  233. package/generated/react/icons/icon-globus/index.d.ts +2 -2
  234. package/generated/react/icons/icon-graduate-cap/index.d.ts +2 -2
  235. package/generated/react/icons/icon-green-power/index.d.ts +2 -2
  236. package/generated/react/icons/icon-group/index.d.ts +2 -2
  237. package/generated/react/icons/icon-growth/index.d.ts +2 -2
  238. package/generated/react/icons/icon-headphones/index.d.ts +2 -2
  239. package/generated/react/icons/icon-heart/index.d.ts +2 -2
  240. package/generated/react/icons/icon-heart-beat/index.d.ts +2 -2
  241. package/generated/react/icons/icon-history/index.d.ts +2 -2
  242. package/generated/react/icons/icon-home-energy-one/index.d.ts +2 -2
  243. package/generated/react/icons/icon-home-energy-two/index.d.ts +2 -2
  244. package/generated/react/icons/icon-home-open/index.d.ts +2 -2
  245. package/generated/react/icons/icon-home-roof/index.d.ts +2 -2
  246. package/generated/react/icons/icon-horizontal-alignment-bottom/index.d.ts +2 -2
  247. package/generated/react/icons/icon-hourglass/index.d.ts +2 -2
  248. package/generated/react/icons/icon-images/index.d.ts +2 -2
  249. package/generated/react/icons/icon-inbox-empty/index.d.ts +2 -2
  250. package/generated/react/icons/icon-industry/index.d.ts +2 -2
  251. package/generated/react/icons/icon-jpg/index.d.ts +2 -2
  252. package/generated/react/icons/icon-key/index.d.ts +2 -2
  253. package/generated/react/icons/icon-knife-spoon/index.d.ts +2 -2
  254. package/generated/react/icons/icon-lab/index.d.ts +2 -2
  255. package/generated/react/icons/icon-law/index.d.ts +2 -2
  256. package/generated/react/icons/icon-leisure/index.d.ts +2 -2
  257. package/generated/react/icons/icon-light-bulb-simple/index.d.ts +2 -2
  258. package/generated/react/icons/icon-lightning/index.d.ts +2 -2
  259. package/generated/react/icons/icon-line-chart-four/index.d.ts +2 -2
  260. package/generated/react/icons/icon-line-chart-one/index.d.ts +2 -2
  261. package/generated/react/icons/icon-line-chart-three/index.d.ts +2 -2
  262. package/generated/react/icons/icon-line-chart-two/index.d.ts +2 -2
  263. package/generated/react/icons/icon-lock/index.d.ts +2 -2
  264. package/generated/react/icons/icon-macbook-air/index.d.ts +2 -2
  265. package/generated/react/icons/icon-magnifying-glass/index.d.ts +2 -2
  266. package/generated/react/icons/icon-map-pin/index.d.ts +2 -2
  267. package/generated/react/icons/icon-megaphone/index.d.ts +2 -2
  268. package/generated/react/icons/icon-menu-sidebar/index.d.ts +2 -2
  269. package/generated/react/icons/icon-mic-off/index.d.ts +2 -2
  270. package/generated/react/icons/icon-mic-on/index.d.ts +2 -2
  271. package/generated/react/icons/icon-minimize/index.d.ts +2 -2
  272. package/generated/react/icons/icon-minus-large/index.d.ts +2 -2
  273. package/generated/react/icons/icon-minus-small/index.d.ts +2 -2
  274. package/generated/react/icons/icon-money-hand/index.d.ts +2 -2
  275. package/generated/react/icons/icon-moneybag/index.d.ts +2 -2
  276. package/generated/react/icons/icon-moon/index.d.ts +2 -2
  277. package/generated/react/icons/icon-mute/index.d.ts +2 -2
  278. package/generated/react/icons/icon-newspaper/index.d.ts +2 -2
  279. package/generated/react/icons/icon-office/index.d.ts +2 -2
  280. package/generated/react/icons/icon-page-add/index.d.ts +2 -2
  281. package/generated/react/icons/icon-paper-plane-top-right/index.d.ts +2 -2
  282. package/generated/react/icons/icon-paperclip/index.d.ts +2 -2
  283. package/generated/react/icons/icon-pause/index.d.ts +2 -2
  284. package/generated/react/icons/icon-pdf/index.d.ts +2 -2
  285. package/generated/react/icons/icon-pencil-sign/index.d.ts +2 -2
  286. package/generated/react/icons/icon-pencil-sparkle/index.d.ts +2 -2
  287. package/generated/react/icons/icon-pencil-wave/index.d.ts +2 -2
  288. package/generated/react/icons/icon-pension/index.d.ts +2 -2
  289. package/generated/react/icons/icon-people/index.d.ts +2 -2
  290. package/generated/react/icons/icon-people-a11y/index.d.ts +2 -2
  291. package/generated/react/icons/icon-people-add/index.d.ts +2 -2
  292. package/generated/react/icons/icon-people-added/index.d.ts +2 -2
  293. package/generated/react/icons/icon-people-circle/index.d.ts +2 -2
  294. package/generated/react/icons/icon-people-copy/index.d.ts +2 -2
  295. package/generated/react/icons/icon-people-profile/index.d.ts +2 -2
  296. package/generated/react/icons/icon-people-remove/index.d.ts +2 -2
  297. package/generated/react/icons/icon-percent/index.d.ts +2 -2
  298. package/generated/react/icons/icon-phone/index.d.ts +2 -2
  299. package/generated/react/icons/icon-pie-chart/index.d.ts +2 -2
  300. package/generated/react/icons/icon-piggy-bank/index.d.ts +2 -2
  301. package/generated/react/icons/icon-pin/index.d.ts +2 -2
  302. package/generated/react/icons/icon-pinch/index.d.ts +2 -2
  303. package/generated/react/icons/icon-play/index.d.ts +2 -2
  304. package/generated/react/icons/icon-play-circle/index.d.ts +2 -2
  305. package/generated/react/icons/icon-plus-large/index.d.ts +2 -2
  306. package/generated/react/icons/icon-plus-small/index.d.ts +2 -2
  307. package/generated/react/icons/icon-png/index.d.ts +2 -2
  308. package/generated/react/icons/icon-poop/index.d.ts +2 -2
  309. package/generated/react/icons/icon-postcard/index.d.ts +2 -2
  310. package/generated/react/icons/icon-pound/index.d.ts +2 -2
  311. package/generated/react/icons/icon-power/index.d.ts +2 -2
  312. package/generated/react/icons/icon-power-plant/index.d.ts +2 -2
  313. package/generated/react/icons/icon-printer/index.d.ts +2 -2
  314. package/generated/react/icons/icon-push/index.d.ts +2 -2
  315. package/generated/react/icons/icon-qr-code/index.d.ts +2 -2
  316. package/generated/react/icons/icon-rainy/index.d.ts +2 -2
  317. package/generated/react/icons/icon-raising-hand/index.d.ts +2 -2
  318. package/generated/react/icons/icon-reading-list/index.d.ts +2 -2
  319. package/generated/react/icons/icon-receipt-bill/index.d.ts +2 -2
  320. package/generated/react/icons/icon-receiption-bell/index.d.ts +2 -2
  321. package/generated/react/icons/icon-record/index.d.ts +2 -2
  322. package/generated/react/icons/icon-refund/index.d.ts +2 -2
  323. package/generated/react/icons/icon-robot/index.d.ts +2 -2
  324. package/generated/react/icons/icon-rocket/index.d.ts +2 -2
  325. package/generated/react/icons/icon-run-shortcut/index.d.ts +2 -2
  326. package/generated/react/icons/icon-safari/index.d.ts +2 -2
  327. package/generated/react/icons/icon-satellite/index.d.ts +2 -2
  328. package/generated/react/icons/icon-school/index.d.ts +2 -2
  329. package/generated/react/icons/icon-scissors/index.d.ts +2 -2
  330. package/generated/react/icons/icon-search-menu/index.d.ts +2 -2
  331. package/generated/react/icons/icon-settings-gear/index.d.ts +2 -2
  332. package/generated/react/icons/icon-settings-slider-hor/index.d.ts +2 -2
  333. package/generated/react/icons/icon-settings-slider-ver/index.d.ts +2 -2
  334. package/generated/react/icons/icon-shapes/index.d.ts +2 -2
  335. package/generated/react/icons/icon-share/index.d.ts +2 -2
  336. package/generated/react/icons/icon-shield/index.d.ts +2 -2
  337. package/generated/react/icons/icon-shield-checked/index.d.ts +2 -2
  338. package/generated/react/icons/icon-shield-crossed/index.d.ts +2 -2
  339. package/generated/react/icons/icon-shopping-bag/index.d.ts +2 -2
  340. package/generated/react/icons/icon-signature/index.d.ts +2 -2
  341. package/generated/react/icons/icon-smartwatch/index.d.ts +2 -2
  342. package/generated/react/icons/icon-solar/index.d.ts +2 -2
  343. package/generated/react/icons/icon-sort/index.d.ts +2 -2
  344. package/generated/react/icons/icon-sort-ascending/index.d.ts +2 -2
  345. package/generated/react/icons/icon-sort-descending/index.d.ts +2 -2
  346. package/generated/react/icons/icon-sort-down/index.d.ts +2 -2
  347. package/generated/react/icons/icon-sort-up/index.d.ts +2 -2
  348. package/generated/react/icons/icon-square-arrow-top-right/index.d.ts +2 -2
  349. package/generated/react/icons/icon-square-behind-square/index.d.ts +2 -2
  350. package/generated/react/icons/icon-square-grid-circle/index.d.ts +2 -2
  351. package/generated/react/icons/icon-square-placeholder/index.d.ts +2 -2
  352. package/generated/react/icons/icon-star/index.d.ts +2 -2
  353. package/generated/react/icons/icon-store/index.d.ts +2 -2
  354. package/generated/react/icons/icon-sun/index.d.ts +2 -2
  355. package/generated/react/icons/icon-sunset-arrow-down/index.d.ts +2 -2
  356. package/generated/react/icons/icon-tag/index.d.ts +2 -2
  357. package/generated/react/icons/icon-target-arrow/index.d.ts +2 -2
  358. package/generated/react/icons/icon-television/index.d.ts +2 -2
  359. package/generated/react/icons/icon-tennis/index.d.ts +2 -2
  360. package/generated/react/icons/icon-text-edit/index.d.ts +2 -2
  361. package/generated/react/icons/icon-thermostat/index.d.ts +2 -2
  362. package/generated/react/icons/icon-thumbs-down/index.d.ts +2 -2
  363. package/generated/react/icons/icon-thumbs-up/index.d.ts +2 -2
  364. package/generated/react/icons/icon-ticket/index.d.ts +2 -2
  365. package/generated/react/icons/icon-trading-view-candles/index.d.ts +2 -2
  366. package/generated/react/icons/icon-trash-can/index.d.ts +2 -2
  367. package/generated/react/icons/icon-tree/index.d.ts +2 -2
  368. package/generated/react/icons/icon-trending-five/index.d.ts +2 -2
  369. package/generated/react/icons/icon-trending-four/index.d.ts +2 -2
  370. package/generated/react/icons/icon-trending-one/index.d.ts +2 -2
  371. package/generated/react/icons/icon-trending-three/index.d.ts +2 -2
  372. package/generated/react/icons/icon-trending-two/index.d.ts +2 -2
  373. package/generated/react/icons/icon-triangle-exclamation/index.d.ts +2 -2
  374. package/generated/react/icons/icon-truck/index.d.ts +2 -2
  375. package/generated/react/icons/icon-umbrella-security/index.d.ts +2 -2
  376. package/generated/react/icons/icon-unlocked/index.d.ts +2 -2
  377. package/generated/react/icons/icon-volume-full/index.d.ts +2 -2
  378. package/generated/react/icons/icon-volume-half/index.d.ts +2 -2
  379. package/generated/react/icons/icon-volume-off/index.d.ts +2 -2
  380. package/generated/react/icons/icon-wallet/index.d.ts +2 -2
  381. package/generated/react/icons/icon-warning-sign/index.d.ts +2 -2
  382. package/generated/react/icons/icon-wifi-full/index.d.ts +2 -2
  383. package/generated/react/icons/icon-youtube/index.d.ts +2 -2
  384. package/generated/react/icons/icon-zap/index.d.ts +2 -2
  385. package/generated/react/icons/icon-zoom-in/index.d.ts +2 -2
  386. package/generated/react/icons/icon-zoom-out/index.d.ts +2 -2
  387. package/generated/react/img/index.d.ts +2 -2
  388. package/generated/react/index.d.ts +7 -7
  389. package/generated/react/index.js +7 -7
  390. package/generated/react/input/index.d.ts +3 -2
  391. package/generated/react/link/index.d.ts +2 -2
  392. package/generated/react/list/index.d.ts +2 -2
  393. package/generated/react/list-item/index.d.ts +2 -2
  394. package/generated/react/list-item-pattern-01/index.d.ts +2 -2
  395. package/generated/react/mask/index.d.ts +2 -2
  396. package/generated/react/menu-button/index.d.ts +2 -2
  397. package/generated/react/menu-heading/index.d.ts +2 -2
  398. package/generated/react/menu-item/index.d.ts +2 -2
  399. package/generated/react/option/index.d.ts +2 -2
  400. package/generated/react/pagination/index.d.ts +2 -2
  401. package/generated/react/popover/index.d.ts +2 -2
  402. package/generated/react/radio/index.d.ts +3 -2
  403. package/generated/react/radio-group/index.d.ts +3 -2
  404. package/generated/react/rich-text/index.d.ts +2 -2
  405. package/generated/react/segment/index.d.ts +2 -2
  406. package/generated/react/segmented-control/index.d.ts +2 -2
  407. package/generated/react/select/index.d.ts +3 -2
  408. package/generated/react/sensitive-account/index.d.ts +2 -2
  409. package/generated/react/sensitive-date/index.d.ts +2 -2
  410. package/generated/react/sensitive-number/index.d.ts +2 -2
  411. package/generated/react/signal/index.d.ts +2 -2
  412. package/generated/react/slider/index.d.ts +2 -2
  413. package/generated/react/spinner/index.d.ts +2 -2
  414. package/generated/react/switch/index.d.ts +3 -2
  415. package/generated/react/tab/index.d.ts +2 -2
  416. package/generated/react/tab-panel/index.d.ts +2 -2
  417. package/generated/react/table/index.d.ts +2 -2
  418. package/generated/react/tabs/index.d.ts +2 -2
  419. package/generated/react/text/index.d.ts +2 -2
  420. package/generated/react/textarea/index.d.ts +3 -2
  421. package/generated/react/theme/index.d.ts +2 -2
  422. package/generated/react/video/index.d.ts +2 -2
  423. package/package.json +1 -1
  424. package/patterns/list-item-pattern-01/list-item-pattern-01.component.js +1 -0
  425. package/primitives/field-base/field-base.component.d.ts +4 -0
  426. package/primitives/field-base/field-base.component.js +40 -8
  427. package/primitives/field-base/field-base.styles.js +6 -1
  428. package/primitives/field-base/field-base.trans.styles.scss.js +1 -1
  429. package/shared-styles/rbcb-toggle.style.js +25 -3
  430. package/shared-styles/rbcb-toggle.template.d.ts +1 -0
  431. package/shared-styles/rbcb-toggle.template.js +2 -1
  432. package/utils/helpers/custom-element-scoping.js +1 -1
@@ -11,8 +11,8 @@ import { classMap } from "lit/directives/class-map.js";
11
11
  import { GdsFormControlFooter } from "../../../primitives/form-control-footer/form-control-footer.component.js";
12
12
  import { GdsFormControlHeader } from "../../../primitives/form-control-header/form-control-header.component.js";
13
13
  import { gdsCustomElement, html } from "../../../scoping.js";
14
- import { ariaForwarding } from "../../../utils/decorators/aria-forwarding.js";
15
14
  import { observeLightDOM } from "../../../utils/decorators/index.js";
15
+ import { ariaForwarding } from "../../../utils/decorators/aria-forwarding.js";
16
16
  import { watch } from "../../../utils/decorators/watch.js";
17
17
  import {
18
18
  withLayoutChildProps,
@@ -34,6 +34,7 @@ let CheckboxGroup = class extends GdsFormControlElement {
34
34
  this.checkboxes.forEach((checkbox) => {
35
35
  checkbox.invalid = this.invalid;
36
36
  checkbox.errorMessage = this.errorMessage;
37
+ checkbox.readonly = this.readonly || checkbox.readonly;
37
38
  });
38
39
  });
39
40
  }
@@ -187,7 +188,8 @@ __decorateClass([
187
188
  ], CheckboxGroup.prototype, "_handleValueChange", 1);
188
189
  __decorateClass([
189
190
  watch("invalid"),
190
- watch("errorMessage")
191
+ watch("errorMessage"),
192
+ watch("readonly")
191
193
  ], CheckboxGroup.prototype, "_handleGroupInvalidChange", 1);
192
194
  __decorateClass([
193
195
  observeLightDOM({
@@ -28,6 +28,11 @@ let GdsCheckbox = class extends GdsFormControlElement {
28
28
  this.indeterminate = false;
29
29
  this.disabled = false;
30
30
  __privateAdd(this, _handleInputChange, () => {
31
+ if (this.readonly) {
32
+ this._elCheckbox.checked = this.checked;
33
+ this._elCheckbox.indeterminate = this.indeterminate;
34
+ return;
35
+ }
31
36
  if (this.indeterminate) {
32
37
  this.indeterminate = false;
33
38
  this.checked = false;
@@ -62,6 +67,7 @@ let GdsCheckbox = class extends GdsFormControlElement {
62
67
  ?disabled=${this.disabled}
63
68
  .indeterminate=${this.indeterminate}
64
69
  aria-invalid=${this.invalid}
70
+ aria-readonly=${this.readonly}
65
71
  aria-describedby="message supporting-text"
66
72
  id="checkbox-input"
67
73
  @change=${__privateGet(this, _handleInputChange)}
@@ -83,6 +89,7 @@ let GdsCheckbox = class extends GdsFormControlElement {
83
89
  checked: this.checked,
84
90
  indeterminate: this.indeterminate,
85
91
  disabled: this.disabled,
92
+ readonly: this.readonly,
86
93
  invalid: this.invalid
87
94
  })}
88
95
  </gds-toggle-control-base>
@@ -99,6 +106,10 @@ let GdsCheckbox = class extends GdsFormControlElement {
99
106
  _GdsCheckbox_instances = new WeakSet();
100
107
  toggleChecked_fn = function(e) {
101
108
  if (this.disabled || e.target instanceof HTMLLabelElement) return;
109
+ if (this.readonly) {
110
+ this._elCheckbox.focus();
111
+ return;
112
+ }
102
113
  if (this.indeterminate) {
103
114
  this.indeterminate = false;
104
115
  } else {
@@ -12,6 +12,10 @@ export declare class GdsDatePartSpinner extends GdsElement {
12
12
  length: number;
13
13
  min: number;
14
14
  max: number;
15
+ /**
16
+ * Whether the spinner is read-only. Keeps it focusable but blocks value changes.
17
+ */
18
+ readonly: boolean;
15
19
  displayValue: string;
16
20
  protected createRenderRoot(): this;
17
21
  connectedCallback(): void;
@@ -18,6 +18,7 @@ let GdsDatePartSpinner = class extends GdsElement {
18
18
  this.length = 2;
19
19
  this.min = 0;
20
20
  this.max = Number.MAX_SAFE_INTEGER;
21
+ this.readonly = false;
21
22
  this.displayValue = __privateMethod(this, _GdsDatePartSpinner_instances, formatNumber_fn).call(this, this.value, this.length);
22
23
  __privateAdd(this, _inputBuffer, "");
23
24
  __privateAdd(this, _increment, () => {
@@ -51,6 +52,7 @@ let GdsDatePartSpinner = class extends GdsElement {
51
52
  __privateAdd(this, _handleWheel, (e) => {
52
53
  e.stopPropagation();
53
54
  e.preventDefault();
55
+ if (this.readonly) return;
54
56
  if (e.deltaY > 0) {
55
57
  __privateGet(this, _decrement).call(this);
56
58
  } else {
@@ -58,6 +60,7 @@ let GdsDatePartSpinner = class extends GdsElement {
58
60
  }
59
61
  });
60
62
  __privateAdd(this, _handleKeyDown, (e) => {
63
+ if (this.readonly) return;
61
64
  let handled = false;
62
65
  if (e.key === "ArrowUp") {
63
66
  __privateGet(this, _increment).call(this);
@@ -160,6 +163,9 @@ __decorateClass([
160
163
  __decorateClass([
161
164
  property({ type: Number, attribute: "aria-valuemax" })
162
165
  ], GdsDatePartSpinner.prototype, "max", 2);
166
+ __decorateClass([
167
+ property({ type: Boolean, reflect: true })
168
+ ], GdsDatePartSpinner.prototype, "readonly", 2);
163
169
  __decorateClass([
164
170
  state()
165
171
  ], GdsDatePartSpinner.prototype, "displayValue", 2);
@@ -137,6 +137,7 @@ declare class Datepicker extends GdsFormControlElement<Date> {
137
137
  private _elFieldAsync;
138
138
  private _elSpinners;
139
139
  private _elField;
140
+ private _elReadonlyValue?;
140
141
  constructor();
141
142
  connectedCallback(): void;
142
143
  focus(options?: FocusOptions): void;
@@ -5,7 +5,7 @@ import {
5
5
  __privateMethod,
6
6
  __privateSet
7
7
  } from "../../chunks/chunk.H2T4A5YY.js";
8
- var _utcHours, _focusedMonthOverride, _focusedYearOverride, _Datepicker_instances, defaultFocusedDate_get, _valueOnOpen, shouldShowFooter_fn, renderBackToValidRangeButton_fn, updateOutOfRangeAction_fn, normalizeDate_fn, focusDate_fn, isDateSelectable_fn, nearestSelectableDate_fn, shouldShowTodayButton_fn, getSpinnerLabel_fn, getMinSpinnerValue_fn, getMaxSpinnerValue_fn, getLocalizedPlaceholder_fn, getSpinnerValue_fn, dispatchChangeEvent_fn, dispatchInputEvent_fn, _handleSpinnerFocus, _handleClipboardCopy, _handleClipboardPaste, _handleFieldClick, _handleCalendarChange, _handleMonthChange, _handleYearChange, _handleIncrementFocusedMonth, _handleDecrementFocusedMonth, _handleCalendarFocusChange, _handlePopoverStateChange, _handleSpinnerKeydown, parseDateFormat_fn, _handleSpinnerChange, _spinnerState, years_get, isValueOutsideRange_get;
8
+ var _utcHours, _focusedMonthOverride, _focusedYearOverride, _Datepicker_instances, defaultFocusedDate_get, _valueOnOpen, shouldShowFooter_fn, renderReadonlyValue_fn, renderSpinners_fn, renderBackToValidRangeButton_fn, updateOutOfRangeAction_fn, normalizeDate_fn, focusDate_fn, isDateSelectable_fn, nearestSelectableDate_fn, shouldShowTodayButton_fn, getSpinnerLabel_fn, getMinSpinnerValue_fn, getMaxSpinnerValue_fn, getLocalizedPlaceholder_fn, getSpinnerValue_fn, dispatchChangeEvent_fn, dispatchInputEvent_fn, _handleSpinnerFocus, _handleClipboardCopy, _handleClipboardPaste, _handleFieldClick, _handleCalendarChange, _handleMonthChange, _handleYearChange, _handleIncrementFocusedMonth, _handleDecrementFocusedMonth, _handleCalendarFocusChange, formattedDisplayValue_get, _handlePopoverStateChange, _handleSpinnerKeydown, parseDateFormat_fn, _handleSpinnerChange, _spinnerState, years_get, isValueOutsideRange_get;
9
9
  import { localized, msg } from "@lit/localize";
10
10
  import { nothing } from "lit";
11
11
  import { property, query, queryAll, queryAsync, state } from "lit/decorators.js";
@@ -17,6 +17,7 @@ import { addDays, isSameDay, lastDayOfMonth, setHours } from "date-fns";
17
17
  import { GdsButton } from "../../components/button/button.component.js";
18
18
  import { GdsDropdown } from "../../components/dropdown/dropdown.component.js";
19
19
  import { GdsFlex } from "../../components/flex/flex.component.js";
20
+ import { GdsFieldBase } from "../../primitives/field-base/field-base.component.js";
20
21
  import { gdsCustomElement, html } from "../../scoping.js";
21
22
  import formControlHostStyle from "../../shared-styles/form-control-host.style.js";
22
23
  import { tokens } from "../../tokens.style.js";
@@ -79,34 +80,37 @@ let Datepicker = class extends GdsFormControlElement {
79
80
  e.clipboardData?.setData("text/plain", this.displayValue);
80
81
  });
81
82
  __privateAdd(this, _handleClipboardPaste, (e) => {
82
- if (e.currentTarget !== this._elField) return;
83
- e.preventDefault();
84
- const pasted = e.clipboardData?.getData("text/plain");
85
- if (!pasted) return;
86
- let pastedDate = /* @__PURE__ */ new Date("-");
87
- const invalid = "Invalid Date";
88
- const parts = pasted.split(this._dateFormatLayout.delimiter);
89
- if (parts.length === 3) {
90
- const layout = this._dateFormatLayout.layout;
91
- const year = parseInt(parts[layout.findIndex((f) => f.token === "y")]);
92
- const month = parseInt(parts[layout.findIndex((f) => f.token === "m")]) - 1;
93
- const day = parseInt(parts[layout.findIndex((f) => f.token === "d")]);
94
- if (!isNaN(year) && !isNaN(month) && !isNaN(day)) {
95
- pastedDate = /* @__PURE__ */ new Date(`${year}-${month + 1}-${day}`);
83
+ this._elFieldAsync.then((field) => {
84
+ if (e.currentTarget !== field) return;
85
+ e.preventDefault();
86
+ if (this.readonly) return;
87
+ const pasted = e.clipboardData?.getData("text/plain");
88
+ if (!pasted) return;
89
+ let pastedDate = /* @__PURE__ */ new Date("-");
90
+ const invalid = "Invalid Date";
91
+ const parts = pasted.split(this._dateFormatLayout.delimiter);
92
+ if (parts.length === 3) {
93
+ const layout = this._dateFormatLayout.layout;
94
+ const year = parseInt(parts[layout.findIndex((f) => f.token === "y")]);
95
+ const month = parseInt(parts[layout.findIndex((f) => f.token === "m")]) - 1;
96
+ const day = parseInt(parts[layout.findIndex((f) => f.token === "d")]);
97
+ if (!isNaN(year) && !isNaN(month) && !isNaN(day)) {
98
+ pastedDate = /* @__PURE__ */ new Date(`${year}-${month + 1}-${day}`);
99
+ }
96
100
  }
97
- }
98
- if (pastedDate.toString() === invalid) {
99
- pastedDate = new Date(pasted);
100
101
  if (pastedDate.toString() === invalid) {
101
- return;
102
+ pastedDate = new Date(pasted);
103
+ if (pastedDate.toString() === invalid) {
104
+ return;
105
+ }
102
106
  }
103
- }
104
- this.value = pastedDate;
105
- __privateMethod(this, _Datepicker_instances, dispatchChangeEvent_fn).call(this);
106
- __privateMethod(this, _Datepicker_instances, dispatchInputEvent_fn).call(this);
107
+ this.value = pastedDate;
108
+ __privateMethod(this, _Datepicker_instances, dispatchChangeEvent_fn).call(this);
109
+ __privateMethod(this, _Datepicker_instances, dispatchInputEvent_fn).call(this);
110
+ });
107
111
  });
108
112
  __privateAdd(this, _handleFieldClick, (e) => {
109
- this._elSpinners[0]?.focus();
113
+ this._getValidityAnchor()?.focus();
110
114
  });
111
115
  __privateAdd(this, _handleCalendarChange, (e) => {
112
116
  e.stopPropagation();
@@ -150,6 +154,10 @@ let Datepicker = class extends GdsFormControlElement {
150
154
  });
151
155
  __privateAdd(this, _handlePopoverStateChange, async (e) => {
152
156
  if (e.target !== e.currentTarget) return;
157
+ if (this.readonly && e.detail.open) {
158
+ e.preventDefault();
159
+ return;
160
+ }
153
161
  this.open = e.detail.open;
154
162
  if (e.detail.reason === "close") {
155
163
  const calValue = (await this._elCalendar).value;
@@ -248,7 +256,7 @@ let Datepicker = class extends GdsFormControlElement {
248
256
  * Get a string representation of the currently displayed value in the input field. The formatting will match the dateformat attribute.
249
257
  */
250
258
  get displayValue() {
251
- return this._elField.innerText.replace(/\s+/g, "");
259
+ return __privateGet(this, _Datepicker_instances, formattedDisplayValue_get);
252
260
  }
253
261
  /**
254
262
  * A reference to a date cell element (<td>) inside the shadow root of the calendar primitive.
@@ -297,7 +305,12 @@ let Datepicker = class extends GdsFormControlElement {
297
305
  class="size-${this.size}"
298
306
  .showExtendedSupportingText="${this.showExtendedSupportingText}"
299
307
  >
300
- <label id="label" for="spinner-0" slot="label">${this.label}</label>
308
+ <label
309
+ id="label"
310
+ for=${this.readonly ? "datepicker-value" : "spinner-0"}
311
+ slot="label"
312
+ >${this.label}</label
313
+ >
301
314
  ${when(
302
315
  this.supportingText.length > 0,
303
316
  () => html`<span slot="supporting-text" id="supporting-text">
@@ -320,41 +333,14 @@ let Datepicker = class extends GdsFormControlElement {
320
333
  <gds-field-base
321
334
  .size=${this.size}
322
335
  .disabled=${this.disabled}
336
+ .readonly=${this.readonly}
323
337
  .invalid=${this.invalid}
324
338
  @click=${__privateGet(this, _handleFieldClick)}
325
339
  @copy=${__privateGet(this, _handleClipboardCopy)}
326
340
  @paste=${__privateGet(this, _handleClipboardPaste)}
327
341
  id="field"
328
342
  >
329
- <div class="spinners">
330
- ${join(
331
- map(
332
- this._dateFormatLayout.layout,
333
- (f, i) => html`<gds-date-part-spinner
334
- id="spinner-${i}"
335
- aria-invalid="${this.invalid}"
336
- class="spinner"
337
- .length=${f.token === "y" ? 4 : 2}
338
- .value=${__privateMethod(this, _Datepicker_instances, getSpinnerValue_fn).call(this, f.name)}
339
- aria-valuemin=${__privateMethod(this, _Datepicker_instances, getMinSpinnerValue_fn).call(this, f.name)}
340
- aria-valuemax=${__privateMethod(this, _Datepicker_instances, getMaxSpinnerValue_fn).call(this, f.name)}
341
- aria-label=${__privateMethod(this, _Datepicker_instances, getSpinnerLabel_fn).call(this, f.name)}
342
- aria-describedby="supporting-text supporting-text-slot sub-label-slot message"
343
- data-max-width=${__privateMethod(this, _Datepicker_instances, getMaxSpinnerValue_fn).call(this, f.name).toString().length}
344
- @keydown=${__privateGet(this, _handleSpinnerKeydown)}
345
- @change=${(e) => __privateGet(this, _handleSpinnerChange).call(this, e.detail.value, f.name)}
346
- @focus=${__privateGet(this, _handleSpinnerFocus)}
347
- @touchend=${(e) => {
348
- this.open = true;
349
- e.preventDefault();
350
- }}
351
- ></gds-date-part-spinner>`
352
- ),
353
- html`<span class="separator"
354
- >${this._dateFormatLayout.delimiter}</span
355
- >`
356
- )}
357
- </div>
343
+ ${this.readonly ? __privateMethod(this, _Datepicker_instances, renderReadonlyValue_fn).call(this) : __privateMethod(this, _Datepicker_instances, renderSpinners_fn).call(this)}
358
344
  <gds-button
359
345
  id="calendar-button"
360
346
  slot="action"
@@ -366,7 +352,7 @@ let Datepicker = class extends GdsFormControlElement {
366
352
  aria-expanded=${this.open}
367
353
  aria-controls="calendar-popover"
368
354
  aria-describedby="label"
369
- .disabled=${this.disabled}
355
+ .disabled=${this.disabled || this.readonly}
370
356
  >
371
357
  ${when(
372
358
  this.size === "small",
@@ -540,7 +526,7 @@ let Datepicker = class extends GdsFormControlElement {
540
526
  `;
541
527
  }
542
528
  _getValidityAnchor() {
543
- return this._elSpinners[0];
529
+ return this.readonly ? this._elReadonlyValue || this._elField : this._elSpinners[0];
544
530
  }
545
531
  _handleOutOfRangeChange() {
546
532
  __privateMethod(this, _Datepicker_instances, updateOutOfRangeAction_fn).call(this);
@@ -584,6 +570,48 @@ _valueOnOpen = new WeakMap();
584
570
  shouldShowFooter_fn = function() {
585
571
  return !this.plain;
586
572
  };
573
+ renderReadonlyValue_fn = function() {
574
+ return html`<div
575
+ id="datepicker-value"
576
+ class="spinners readonly-value"
577
+ aria-describedby="supporting-text supporting-text-slot sub-label-slot message"
578
+ aria-invalid="${this.invalid}"
579
+ tabindex="0"
580
+ >
581
+ ${__privateGet(this, _Datepicker_instances, formattedDisplayValue_get)}
582
+ </div>`;
583
+ };
584
+ renderSpinners_fn = function() {
585
+ return html`<div class="spinners">
586
+ ${join(
587
+ map(
588
+ this._dateFormatLayout.layout,
589
+ (f, i) => html`<gds-date-part-spinner
590
+ id="spinner-${i}"
591
+ aria-invalid="${this.invalid}"
592
+ class="spinner"
593
+ .length=${f.token === "y" ? 4 : 2}
594
+ .value=${__privateGet(this, _spinnerState)[f.name]}
595
+ aria-valuemin=${__privateMethod(this, _Datepicker_instances, getMinSpinnerValue_fn).call(this, f.name)}
596
+ aria-valuemax=${__privateMethod(this, _Datepicker_instances, getMaxSpinnerValue_fn).call(this, f.name)}
597
+ aria-label=${__privateMethod(this, _Datepicker_instances, getSpinnerLabel_fn).call(this, f.name)}
598
+ aria-describedby="supporting-text supporting-text-slot sub-label-slot message"
599
+ data-max-width=${__privateMethod(this, _Datepicker_instances, getMaxSpinnerValue_fn).call(this, f.name).toString().length}
600
+ @keydown=${__privateGet(this, _handleSpinnerKeydown)}
601
+ @change=${(e) => __privateGet(this, _handleSpinnerChange).call(this, e.detail.value, f.name)}
602
+ @focus=${__privateGet(this, _handleSpinnerFocus)}
603
+ @touchend=${(e) => {
604
+ this.open = true;
605
+ e.preventDefault();
606
+ }}
607
+ ></gds-date-part-spinner>`
608
+ ),
609
+ html`<span class="separator"
610
+ >${this._dateFormatLayout.delimiter}</span
611
+ >`
612
+ )}
613
+ </div>`;
614
+ };
587
615
  renderBackToValidRangeButton_fn = function() {
588
616
  if (!this._outOfRangeAction) return nothing;
589
617
  const isAfterMax = this._outOfRangeAction === "max";
@@ -730,6 +758,9 @@ _handleYearChange = new WeakMap();
730
758
  _handleIncrementFocusedMonth = new WeakMap();
731
759
  _handleDecrementFocusedMonth = new WeakMap();
732
760
  _handleCalendarFocusChange = new WeakMap();
761
+ formattedDisplayValue_get = function() {
762
+ return this._dateFormatLayout.layout.map((part) => __privateGet(this, _spinnerState)[part.name]).join(this._dateFormatLayout.delimiter);
763
+ };
733
764
  _handlePopoverStateChange = new WeakMap();
734
765
  _handleSpinnerKeydown = new WeakMap();
735
766
  /**
@@ -863,6 +894,9 @@ __decorateClass([
863
894
  __decorateClass([
864
895
  query("#field")
865
896
  ], Datepicker.prototype, "_elField", 2);
897
+ __decorateClass([
898
+ query("#datepicker-value")
899
+ ], Datepicker.prototype, "_elReadonlyValue", 2);
866
900
  __decorateClass([
867
901
  watch(["value", "min", "max", "open", "_focusedMonth", "_focusedYear"])
868
902
  ], Datepicker.prototype, "_handleOutOfRangeChange", 1);
@@ -891,6 +925,7 @@ GdsDatepicker = __decorateClass([
891
925
  GdsButton,
892
926
  GdsDropdown,
893
927
  GdsCalendar,
928
+ GdsFieldBase,
894
929
  GdsPopover,
895
930
  IconCalendar,
896
931
  IconCalenderAdd,
@@ -21,6 +21,10 @@ const style = css`
21
21
  font: var(--gds-sys-text-detail-s-regular);
22
22
  }
23
23
 
24
+ .readonly-value {
25
+ outline: none;
26
+ }
27
+
24
28
  .spinner {
25
29
  display: flex;
26
30
  align-items: center;
@@ -9,6 +9,7 @@ var _optionElements, _Dropdown_instances, shouldShowFooter_fn, _renderCombobox,
9
9
  import { localized, msg, str } from "@lit/localize";
10
10
  import { nothing } from "lit";
11
11
  import { property, query } from "lit/decorators.js";
12
+ import { ifDefined } from "lit/directives/if-defined.js";
12
13
  import { unsafeHTML } from "lit/directives/unsafe-html.js";
13
14
  import { when } from "lit/directives/when.js";
14
15
  import { flip, offset } from "@floating-ui/dom";
@@ -77,10 +78,12 @@ let Dropdown = class extends GdsFormControlElement {
77
78
  aria-required="${this.required}"
78
79
  aria-disabled="${this.disabled}"
79
80
  .value=${this.value}
81
+ ?readonly=${this.readonly}
80
82
  @click=${(e) => {
81
83
  e.stopImmediatePropagation();
82
84
  }}
83
85
  @input=${(e) => {
86
+ if (this.readonly) return;
84
87
  __privateMethod(this, _Dropdown_instances, commitSelection_fn).call(this, e.target.value, {
85
88
  emitChange: false
86
89
  });
@@ -88,6 +91,7 @@ let Dropdown = class extends GdsFormControlElement {
88
91
  __privateGet(this, _dispatchUISateEvent).call(this, true, "show") && (this.open = true);
89
92
  }}
90
93
  @keydown=${(e) => {
94
+ if (this.readonly) return;
91
95
  if (e.key === "ArrowDown") {
92
96
  e.preventDefault();
93
97
  __privateGet(this, _dispatchUISateEvent).call(this, true, "show") && (this.open = true);
@@ -116,6 +120,7 @@ let Dropdown = class extends GdsFormControlElement {
116
120
  aria-invalid="${this.invalid}"
117
121
  aria-required="${this.required}"
118
122
  aria-disabled="${this.disabled}"
123
+ aria-readonly="${this.readonly}"
119
124
  >
120
125
  <slot name="trigger">
121
126
  <span>${unsafeHTML(this.displayValue)}</span>
@@ -151,6 +156,10 @@ let Dropdown = class extends GdsFormControlElement {
151
156
  composed: false
152
157
  }));
153
158
  __privateAdd(this, _handlePopoverStateChange, (e) => {
159
+ if (this.readonly && e.detail.open) {
160
+ e.preventDefault();
161
+ return;
162
+ }
154
163
  if (__privateGet(this, _dispatchUISateEvent).call(this, e.detail.open, e.detail.reason)) {
155
164
  this.open = e.detail.open;
156
165
  }
@@ -389,6 +398,7 @@ let Dropdown = class extends GdsFormControlElement {
389
398
  <gds-field-base
390
399
  .size=${this.size}
391
400
  .disabled=${this.disabled}
401
+ .readonly=${this.readonly}
392
402
  .invalid=${this.invalid}
393
403
  slot="trigger"
394
404
  id="field"
@@ -408,7 +418,7 @@ let Dropdown = class extends GdsFormControlElement {
408
418
  >`
409
419
  )}
410
420
  ${when(
411
- this.clearable && !this.disabled && (Array.isArray(this.value) ? this.value.length > 0 : Boolean(this.value)),
421
+ this.clearable && !this.disabled && !this.readonly && (Array.isArray(this.value) ? this.value.length > 0 : Boolean(this.value)),
412
422
  () => html`<gds-button
413
423
  id="clear-btn"
414
424
  rank="tertiary"
@@ -426,6 +436,8 @@ let Dropdown = class extends GdsFormControlElement {
426
436
  () => __privateGet(this, _renderTriggerButton).call(this)
427
437
  )}
428
438
  <gds-icon-chevron-bottom
439
+ class="chevron"
440
+ color=${ifDefined(this.readonly ? "disabled-01" : void 0)}
429
441
  size=${this.size === "small" ? "m" : "l"}
430
442
  slot="action"
431
443
  ></gds-icon-chevron-bottom>
@@ -74,6 +74,7 @@ let GdsOption = class extends Focusable(GdsElement) {
74
74
  checked: this.selected,
75
75
  indeterminate: false,
76
76
  disabled: false,
77
+ readonly: false,
77
78
  invalid: false
78
79
  })
79
80
  )} <slot></slot>
@@ -67,6 +67,7 @@ let GdsFilterChips = class extends GdsFormControlElement {
67
67
  });
68
68
  });
69
69
  __privateAdd(this, _handleChipClick, (event) => {
70
+ if (this.readonly) return;
70
71
  const clickedChip = this.chips.find(
71
72
  (s) => s === event.target || s.contains(event.target)
72
73
  );
@@ -56,6 +56,11 @@ export declare abstract class GdsFormControlElement<ValueT = any> extends GdsEle
56
56
  * If the input is Disabled
57
57
  */
58
58
  disabled: boolean;
59
+ /**
60
+ * If the control is read-only. Unlike `disabled`, a read-only control remains focusable and its
61
+ * value is still submitted with the form, but the user cannot modify it.
62
+ */
63
+ readonly: boolean;
59
64
  /**
60
65
  * The form element that the form control is associated with.
61
66
  */
@@ -18,6 +18,7 @@ class GdsFormControlElement extends GdsElement {
18
18
  this.label = "";
19
19
  this.name = "";
20
20
  this.disabled = false;
21
+ this.readonly = false;
21
22
  try {
22
23
  __privateSet(this, _internals, this.attachInternals());
23
24
  } catch (e) {
@@ -187,6 +188,12 @@ __decorateClass([
187
188
  reflect: true
188
189
  })
189
190
  ], GdsFormControlElement.prototype, "disabled", 2);
191
+ __decorateClass([
192
+ property({
193
+ type: Boolean,
194
+ reflect: true
195
+ })
196
+ ], GdsFormControlElement.prototype, "readonly", 2);
190
197
  __decorateClass([
191
198
  watch("value", { waitUntilFirstUpdate: true })
192
199
  ], GdsFormControlElement.prototype, "__handleValueChange", 1);
@@ -51,10 +51,12 @@ let Input = class extends GdsFormControlElement {
51
51
  __privateAdd(this, _charCounterComputed, this.charCounterCallback(this));
52
52
  __privateAdd(this, _isOpeningFilePicker, false);
53
53
  __privateAdd(this, _handleOnInput, (e) => {
54
+ if (this.readonly) return;
54
55
  const element = e.target;
55
56
  this.value = element.value;
56
57
  });
57
58
  __privateAdd(this, _handleOnChange, (e) => {
59
+ if (this.readonly) return;
58
60
  const element = e.target;
59
61
  this.value = element.value;
60
62
  this.dispatchStandardEvent("change", {
@@ -64,7 +66,7 @@ let Input = class extends GdsFormControlElement {
64
66
  });
65
67
  __privateAdd(this, _handleOnKeyDown, (e) => {
66
68
  if (e.key !== "Enter") return;
67
- if (this.disabled) return;
69
+ if (this.disabled || this.readonly) return;
68
70
  if (e.isComposing) return;
69
71
  if (e.repeat) return;
70
72
  if (this.type === "file") {
@@ -82,6 +84,7 @@ let Input = class extends GdsFormControlElement {
82
84
  });
83
85
  __privateAdd(this, _handleFieldClick, (e) => {
84
86
  if (this.type === "file") {
87
+ if (this.readonly) return;
85
88
  const clickedNativeInput = e.composedPath().includes(this.elInput);
86
89
  if (!clickedNativeInput) {
87
90
  __privateMethod(this, _Input_instances, openFilePickerOnce_fn).call(this);
@@ -215,6 +218,7 @@ let Input = class extends GdsFormControlElement {
215
218
  <gds-field-base
216
219
  .size=${this.size}
217
220
  .disabled=${this.disabled}
221
+ .readonly=${this.readonly}
218
222
  .invalid=${this.invalid}
219
223
  @click=${__privateGet(this, _handleFieldClick)}
220
224
  id="field"
@@ -283,6 +287,7 @@ renderNativeInput_fn = function() {
283
287
  .value=${live(this.value ?? "")}
284
288
  id="input"
285
289
  ?disabled=${this.disabled}
290
+ ?readonly=${this.readonly}
286
291
  aria-describedby="supporting-text extended-supporting-text sub-label message"
287
292
  aria-invalid=${this.invalid}
288
293
  aria-errormessage="message"
@@ -306,7 +311,7 @@ renderNativeInput_fn = function() {
306
311
  `;
307
312
  };
308
313
  renderClearButton_fn = function() {
309
- if (this.clearable && (this.value?.length || 0) > 0)
314
+ if (this.clearable && !this.readonly && (this.value?.length || 0) > 0)
310
315
  return html`<gds-button
311
316
  size="${this.size === "small" ? "xs" : "small"}"
312
317
  rank="tertiary"
@@ -76,6 +76,7 @@ let RadioGroup = class extends GdsFormControlElement {
76
76
  radio.size = this.size;
77
77
  radio.invalid = this.invalid;
78
78
  radio.errorMessage = this.errorMessage;
79
+ radio.readonly = this.readonly || radio.readonly;
79
80
  });
80
81
  }
81
82
  render() {
@@ -91,6 +92,7 @@ let RadioGroup = class extends GdsFormControlElement {
91
92
  aria-labelledby="group-label"
92
93
  aria-describedby="supporting-text extended-supporting-text footer"
93
94
  aria-invalid=${this.invalid}
95
+ aria-readonly=${this.readonly}
94
96
  >
95
97
  ${__privateMethod(this, _RadioGroup_instances, renderRadioGroupContents_fn).call(this)}
96
98
  </div>`;
@@ -137,6 +139,7 @@ dispatchChangeEvents_fn = function() {
137
139
  };
138
140
  handleRadioChange_fn = function(e) {
139
141
  e.stopPropagation();
142
+ if (this.readonly) return;
140
143
  const radio = e.target;
141
144
  this.value = radio.value;
142
145
  this._syncRadioStates();
@@ -144,7 +147,9 @@ handleRadioChange_fn = function(e) {
144
147
  };
145
148
  handleKeyDown_fn = function(e) {
146
149
  if (!this._isConnected) return;
147
- const radios = this.radios.filter((radio) => !radio.disabled);
150
+ const radios = this.radios.filter(
151
+ (radio) => !radio.disabled && !radio.readonly
152
+ );
148
153
  if (radios.length === 0) return;
149
154
  let currentIndex = radios.findIndex(
150
155
  (radio) => document.activeElement === radio
@@ -251,7 +256,8 @@ __decorateClass([
251
256
  ], RadioGroup.prototype, "_handleValueChange", 1);
252
257
  __decorateClass([
253
258
  watch("invalid"),
254
- watch("errorMessage")
259
+ watch("errorMessage"),
260
+ watch("readonly")
255
261
  ], RadioGroup.prototype, "_syncRadioStates", 1);
256
262
  RadioGroup = __decorateClass([
257
263
  ariaForwarding({
@@ -28,6 +28,15 @@ export declare class GdsRadio extends GdsElement {
28
28
  * Whether the radio button is disabled or not.
29
29
  */
30
30
  disabled: boolean;
31
+ /**
32
+ * Whether the radio button is read-only. Unlike `disabled`, the radio button stays
33
+ * focusable, but its checked state cannot be changed by the user.
34
+ *
35
+ * Normally set on the parent `gds-radio-group`, which cascades it down to every radio
36
+ * and excludes read-only radios from arrow-key navigation. Can also be set directly on
37
+ * a standalone radio outside of a group.
38
+ */
39
+ readonly: boolean;
31
40
  /**
32
41
  * Whether the radio button is invalid or not.
33
42
  */