@hashicorp/mds-react 0.9.1 → 0.9.3

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 (358) hide show
  1. package/components/index.js +73 -115
  2. package/components/index.js.map +1 -1
  3. package/index-B9mPJh9w.js +579 -0
  4. package/index-B9mPJh9w.js.map +1 -0
  5. package/index-BHBlMMNF.js +16 -0
  6. package/index-BHBlMMNF.js.map +1 -0
  7. package/index-C4GBbW3N.js +3567 -0
  8. package/index-C4GBbW3N.js.map +1 -0
  9. package/{utils/mds-context/index.js → index-DBjAbGt7.js} +19 -20
  10. package/index-DBjAbGt7.js.map +1 -0
  11. package/index-WkGIywHj.js +767 -0
  12. package/index-WkGIywHj.js.map +1 -0
  13. package/index.js +100 -153
  14. package/index.js.map +1 -1
  15. package/package.json +1 -1
  16. package/patterns/index.js +22 -32
  17. package/patterns/index.js.map +1 -1
  18. package/style.css +1 -0
  19. package/styles/mixins/button.scss +1 -6
  20. package/use-screen-size-BOnkX_K-.js +9 -0
  21. package/use-screen-size-BOnkX_K-.js.map +1 -0
  22. package/utils/index.js +7 -7
  23. package/assets/style-DD7hNwDr.css +0 -1
  24. package/components/accordion/index.js +0 -9
  25. package/components/accordion/index.js.map +0 -1
  26. package/components/accordion/item/button.js +0 -44
  27. package/components/accordion/item/button.js.map +0 -1
  28. package/components/accordion/item/index.js +0 -59
  29. package/components/accordion/item/index.js.map +0 -1
  30. package/components/accordion/style.module.scss.js +0 -24
  31. package/components/accordion/style.module.scss.js.map +0 -1
  32. package/components/alert/alert.module.scss.js +0 -29
  33. package/components/alert/alert.module.scss.js.map +0 -1
  34. package/components/alert/icon.js +0 -34
  35. package/components/alert/icon.js.map +0 -1
  36. package/components/alert/index.js +0 -97
  37. package/components/alert/index.js.map +0 -1
  38. package/components/badge/index.js +0 -53
  39. package/components/badge/index.js.map +0 -1
  40. package/components/badge/style.module.scss.js +0 -22
  41. package/components/badge/style.module.scss.js.map +0 -1
  42. package/components/badge-count/index.js +0 -29
  43. package/components/badge-count/index.js.map +0 -1
  44. package/components/badge-count/style.module.scss.js +0 -15
  45. package/components/badge-count/style.module.scss.js.map +0 -1
  46. package/components/breadcrumbs/index.js +0 -38
  47. package/components/breadcrumbs/index.js.map +0 -1
  48. package/components/breadcrumbs/item/index.js +0 -32
  49. package/components/breadcrumbs/item/index.js.map +0 -1
  50. package/components/breadcrumbs/style.module.scss.js +0 -27
  51. package/components/breadcrumbs/style.module.scss.js.map +0 -1
  52. package/components/breadcrumbs/truncation-button/index.js +0 -25
  53. package/components/breadcrumbs/truncation-button/index.js.map +0 -1
  54. package/components/button/index.js +0 -119
  55. package/components/button/index.js.map +0 -1
  56. package/components/button/styles.module.scss.js +0 -32
  57. package/components/button/styles.module.scss.js.map +0 -1
  58. package/components/card/card-thumbnail/card-thumbnail.module.css.js +0 -8
  59. package/components/card/card-thumbnail/card-thumbnail.module.css.js.map +0 -1
  60. package/components/card/card-thumbnail/index.js +0 -23
  61. package/components/card/card-thumbnail/index.js.map +0 -1
  62. package/components/card/index.js +0 -157
  63. package/components/card/index.js.map +0 -1
  64. package/components/card/styles.module.css.js +0 -29
  65. package/components/card/styles.module.css.js.map +0 -1
  66. package/components/code-block/code-block.module.scss.js +0 -34
  67. package/components/code-block/code-block.module.scss.js.map +0 -1
  68. package/components/code-block/code-lines/index.js +0 -59
  69. package/components/code-block/code-lines/index.js.map +0 -1
  70. package/components/code-block/code-lines/utils/split-html-into-lines.js +0 -19
  71. package/components/code-block/code-lines/utils/split-html-into-lines.js.map +0 -1
  72. package/components/code-block/code-lines/utils/split-jsx-into-lines.js +0 -31
  73. package/components/code-block/code-lines/utils/split-jsx-into-lines.js.map +0 -1
  74. package/components/code-block/hidden-copy-content/index.js +0 -13
  75. package/components/code-block/hidden-copy-content/index.js.map +0 -1
  76. package/components/code-block/index.js +0 -88
  77. package/components/code-block/index.js.map +0 -1
  78. package/components/code-block/utils/parse-highlighted-lines.js +0 -39
  79. package/components/code-block/utils/parse-highlighted-lines.js.map +0 -1
  80. package/components/code-block/utils/process-snippet.js +0 -20
  81. package/components/code-block/utils/process-snippet.js.map +0 -1
  82. package/components/code-block/utils/shellwords.js +0 -33
  83. package/components/code-block/utils/shellwords.js.map +0 -1
  84. package/components/combo-box-primitive/index.js +0 -302
  85. package/components/combo-box-primitive/index.js.map +0 -1
  86. package/components/dialog-primitive/dialog.module.scss.js +0 -12
  87. package/components/dialog-primitive/dialog.module.scss.js.map +0 -1
  88. package/components/dialog-primitive/index.js +0 -15
  89. package/components/dialog-primitive/index.js.map +0 -1
  90. package/components/disclosure-primitive/index.js +0 -57
  91. package/components/disclosure-primitive/index.js.map +0 -1
  92. package/components/disclosure-primitive/styles.module.css.js +0 -7
  93. package/components/disclosure-primitive/styles.module.css.js.map +0 -1
  94. package/components/disclosure-primitive/use-disclosure-primitive.js +0 -17
  95. package/components/disclosure-primitive/use-disclosure-primitive.js.map +0 -1
  96. package/components/dismiss-button/index.js +0 -22
  97. package/components/dismiss-button/index.js.map +0 -1
  98. package/components/dismiss-button/styles.module.scss.js +0 -7
  99. package/components/dismiss-button/styles.module.scss.js.map +0 -1
  100. package/components/dropdown/index.js +0 -79
  101. package/components/dropdown/index.js.map +0 -1
  102. package/components/dropdown/list-item/custom.js +0 -9
  103. package/components/dropdown/list-item/custom.js.map +0 -1
  104. package/components/dropdown/list-item/index.js +0 -14
  105. package/components/dropdown/list-item/index.js.map +0 -1
  106. package/components/dropdown/list-item/interactive.js +0 -49
  107. package/components/dropdown/list-item/interactive.js.map +0 -1
  108. package/components/dropdown/list-item/separator.js +0 -17
  109. package/components/dropdown/list-item/separator.js.map +0 -1
  110. package/components/dropdown/list-item/styles.module.css.js +0 -26
  111. package/components/dropdown/list-item/styles.module.css.js.map +0 -1
  112. package/components/dropdown/list-item/title.js +0 -9
  113. package/components/dropdown/list-item/title.js.map +0 -1
  114. package/components/dropdown/styles.module.css.js +0 -24
  115. package/components/dropdown/styles.module.css.js.map +0 -1
  116. package/components/dropdown/toggle-button/index.js +0 -54
  117. package/components/dropdown/toggle-button/index.js.map +0 -1
  118. package/components/dropdown/toggle-button/styles.module.scss.js +0 -14
  119. package/components/dropdown/toggle-button/styles.module.scss.js.map +0 -1
  120. package/components/flight-icon/flight-icon.module.css.js +0 -12
  121. package/components/flight-icon/flight-icon.module.css.js.map +0 -1
  122. package/components/flight-icon/index.js +0 -58
  123. package/components/flight-icon/index.js.map +0 -1
  124. package/components/form/checkbox/form-checkbox.module.css.js +0 -8
  125. package/components/form/checkbox/form-checkbox.module.css.js.map +0 -1
  126. package/components/form/checkbox/index.js +0 -109
  127. package/components/form/checkbox/index.js.map +0 -1
  128. package/components/form/error/form-error.module.css.js +0 -14
  129. package/components/form/error/form-error.module.css.js.map +0 -1
  130. package/components/form/error/index.js +0 -22
  131. package/components/form/error/index.js.map +0 -1
  132. package/components/form/field/form-field.module.css.js +0 -17
  133. package/components/form/field/form-field.module.css.js.map +0 -1
  134. package/components/form/field/index.js +0 -46
  135. package/components/form/field/index.js.map +0 -1
  136. package/components/form/fieldset/form-fieldset.module.css.js +0 -19
  137. package/components/form/fieldset/form-fieldset.module.css.js.map +0 -1
  138. package/components/form/fieldset/index.js +0 -65
  139. package/components/form/fieldset/index.js.map +0 -1
  140. package/components/form/file-input/form-file-input.module.scss.js +0 -7
  141. package/components/form/file-input/form-file-input.module.scss.js.map +0 -1
  142. package/components/form/file-input/index.js +0 -68
  143. package/components/form/file-input/index.js.map +0 -1
  144. package/components/form/helper-text/form-helper-text.module.css.js +0 -7
  145. package/components/form/helper-text/form-helper-text.module.css.js.map +0 -1
  146. package/components/form/helper-text/index.js +0 -22
  147. package/components/form/helper-text/index.js.map +0 -1
  148. package/components/form/indicator/form-indicator.module.css.js +0 -8
  149. package/components/form/indicator/form-indicator.module.css.js.map +0 -1
  150. package/components/form/indicator/index.js +0 -23
  151. package/components/form/indicator/index.js.map +0 -1
  152. package/components/form/label/form-label.module.css.js +0 -10
  153. package/components/form/label/form-label.module.css.js.map +0 -1
  154. package/components/form/label/index.js +0 -33
  155. package/components/form/label/index.js.map +0 -1
  156. package/components/form/legend/form-legend.module.css.js +0 -10
  157. package/components/form/legend/form-legend.module.css.js.map +0 -1
  158. package/components/form/legend/index.js +0 -19
  159. package/components/form/legend/index.js.map +0 -1
  160. package/components/form/radio/form-radio.module.scss.js +0 -8
  161. package/components/form/radio/form-radio.module.scss.js.map +0 -1
  162. package/components/form/radio/index.js +0 -100
  163. package/components/form/radio/index.js.map +0 -1
  164. package/components/form/radio-card/description.js +0 -10
  165. package/components/form/radio-card/description.js.map +0 -1
  166. package/components/form/radio-card/form-radio-card.module.css.js +0 -30
  167. package/components/form/radio-card/form-radio-card.module.css.js.map +0 -1
  168. package/components/form/radio-card/group.js +0 -31
  169. package/components/form/radio-card/group.js.map +0 -1
  170. package/components/form/radio-card/index.js +0 -67
  171. package/components/form/radio-card/index.js.map +0 -1
  172. package/components/form/radio-card/label.js +0 -10
  173. package/components/form/radio-card/label.js.map +0 -1
  174. package/components/form/select/form-select.module.css.js +0 -14
  175. package/components/form/select/form-select.module.css.js.map +0 -1
  176. package/components/form/select/index.js +0 -79
  177. package/components/form/select/index.js.map +0 -1
  178. package/components/form/super-select/form-super-select.module.css.js +0 -22
  179. package/components/form/super-select/form-super-select.module.css.js.map +0 -1
  180. package/components/form/super-select/index.js +0 -170
  181. package/components/form/super-select/index.js.map +0 -1
  182. package/components/form/text-input/index.js +0 -91
  183. package/components/form/text-input/index.js.map +0 -1
  184. package/components/form/text-input/styles.module.css.js +0 -15
  185. package/components/form/text-input/styles.module.css.js.map +0 -1
  186. package/components/form/textarea/form-textarea.module.css.js +0 -14
  187. package/components/form/textarea/form-textarea.module.css.js.map +0 -1
  188. package/components/form/textarea/index.js +0 -74
  189. package/components/form/textarea/index.js.map +0 -1
  190. package/components/form/toggle/form-toggle.module.scss.js +0 -12
  191. package/components/form/toggle/form-toggle.module.scss.js.map +0 -1
  192. package/components/form/toggle/index.js +0 -102
  193. package/components/form/toggle/index.js.map +0 -1
  194. package/components/hds/wrappers/tooltip.js +0 -51
  195. package/components/hds/wrappers/tooltip.js.map +0 -1
  196. package/components/icon-tile/index.js +0 -50
  197. package/components/icon-tile/index.js.map +0 -1
  198. package/components/icon-tile/style.module.scss.js +0 -29
  199. package/components/icon-tile/style.module.scss.js.map +0 -1
  200. package/components/inline-link/index.js +0 -33
  201. package/components/inline-link/index.js.map +0 -1
  202. package/components/inline-link/inline-link.module.css.js +0 -11
  203. package/components/inline-link/inline-link.module.css.js.map +0 -1
  204. package/components/interactive/index.js +0 -59
  205. package/components/interactive/index.js.map +0 -1
  206. package/components/legacy-button/index.js +0 -65
  207. package/components/legacy-button/index.js.map +0 -1
  208. package/components/legacy-button/utils.js +0 -39
  209. package/components/legacy-button/utils.js.map +0 -1
  210. package/components/menu-primitive/index.js +0 -68
  211. package/components/menu-primitive/index.js.map +0 -1
  212. package/components/menu-primitive/styles.module.css.js +0 -12
  213. package/components/menu-primitive/styles.module.css.js.map +0 -1
  214. package/components/menu-primitive/use-menu-primitive.js +0 -17
  215. package/components/menu-primitive/use-menu-primitive.js.map +0 -1
  216. package/components/modal/index.js +0 -61
  217. package/components/modal/index.js.map +0 -1
  218. package/components/modal/modal.module.css.js +0 -8
  219. package/components/modal/modal.module.css.js.map +0 -1
  220. package/components/modal/use-modal.js +0 -17
  221. package/components/modal/use-modal.js.map +0 -1
  222. package/components/separator/index.js +0 -15
  223. package/components/separator/index.js.map +0 -1
  224. package/components/separator/separator.module.css.js +0 -10
  225. package/components/separator/separator.module.css.js.map +0 -1
  226. package/components/standalone-link/index.js +0 -54
  227. package/components/standalone-link/index.js.map +0 -1
  228. package/components/standalone-link/styles.module.scss.js +0 -17
  229. package/components/standalone-link/styles.module.scss.js.map +0 -1
  230. package/components/table/index.js +0 -52
  231. package/components/table/index.js.map +0 -1
  232. package/components/table/table.module.scss.js +0 -33
  233. package/components/table/table.module.scss.js.map +0 -1
  234. package/components/table/td.js +0 -28
  235. package/components/table/td.js.map +0 -1
  236. package/components/table/th-button-tooltip.js +0 -24
  237. package/components/table/th-button-tooltip.js.map +0 -1
  238. package/components/table/th.js +0 -43
  239. package/components/table/th.js.map +0 -1
  240. package/components/table/tr.js +0 -9
  241. package/components/table/tr.js.map +0 -1
  242. package/components/table/utils.js +0 -28
  243. package/components/table/utils.js.map +0 -1
  244. package/components/tabs/index.js +0 -117
  245. package/components/tabs/index.js.map +0 -1
  246. package/components/tabs/tab-panel.js +0 -35
  247. package/components/tabs/tab-panel.js.map +0 -1
  248. package/components/tabs/tab.js +0 -70
  249. package/components/tabs/tab.js.map +0 -1
  250. package/components/tabs/tabs.module.scss.js +0 -22
  251. package/components/tabs/tabs.module.scss.js.map +0 -1
  252. package/components/tabs/use-tabs-context.js +0 -16
  253. package/components/tabs/use-tabs-context.js.map +0 -1
  254. package/components/text/index.js +0 -112
  255. package/components/text/index.js.map +0 -1
  256. package/components/text/style.module.scss.js +0 -9
  257. package/components/text/style.module.scss.js.map +0 -1
  258. package/components/visualizations/bar-chart/horizontal-chart/dataset-value/index.js +0 -62
  259. package/components/visualizations/bar-chart/horizontal-chart/dataset-value/index.js.map +0 -1
  260. package/components/visualizations/bar-chart/horizontal-chart/dataset-value/style.module.css.js +0 -20
  261. package/components/visualizations/bar-chart/horizontal-chart/dataset-value/style.module.css.js.map +0 -1
  262. package/components/visualizations/bar-chart/horizontal-chart/index.js +0 -104
  263. package/components/visualizations/bar-chart/horizontal-chart/index.js.map +0 -1
  264. package/components/visualizations/bar-chart/horizontal-chart/legend/index.js +0 -13
  265. package/components/visualizations/bar-chart/horizontal-chart/legend/index.js.map +0 -1
  266. package/components/visualizations/bar-chart/horizontal-chart/legend/style.module.css.js +0 -14
  267. package/components/visualizations/bar-chart/horizontal-chart/legend/style.module.css.js.map +0 -1
  268. package/components/visualizations/bar-chart/horizontal-chart/style.module.css.js +0 -28
  269. package/components/visualizations/bar-chart/horizontal-chart/style.module.css.js.map +0 -1
  270. package/components/visualizations/bar-chart/index.js +0 -37
  271. package/components/visualizations/bar-chart/index.js.map +0 -1
  272. package/components/visualizations/bar-chart/style.module.css.js +0 -12
  273. package/components/visualizations/bar-chart/style.module.css.js.map +0 -1
  274. package/components/visualizations/donut-chart/components/arc-tooltip/index.js +0 -14
  275. package/components/visualizations/donut-chart/components/arc-tooltip/index.js.map +0 -1
  276. package/components/visualizations/donut-chart/components/arc-tooltip/styles.module.css.js +0 -10
  277. package/components/visualizations/donut-chart/components/arc-tooltip/styles.module.css.js.map +0 -1
  278. package/components/visualizations/donut-chart/components/external-arc-label/index.js +0 -58
  279. package/components/visualizations/donut-chart/components/external-arc-label/index.js.map +0 -1
  280. package/components/visualizations/donut-chart/components/external-arc-label/styles.module.css.js +0 -16
  281. package/components/visualizations/donut-chart/components/external-arc-label/styles.module.css.js.map +0 -1
  282. package/components/visualizations/donut-chart/components/internal-arc-label/index.js +0 -42
  283. package/components/visualizations/donut-chart/components/internal-arc-label/index.js.map +0 -1
  284. package/components/visualizations/donut-chart/components/internal-arc-label/styles.module.css.js +0 -14
  285. package/components/visualizations/donut-chart/components/internal-arc-label/styles.module.css.js.map +0 -1
  286. package/components/visualizations/donut-chart/index.js +0 -90
  287. package/components/visualizations/donut-chart/index.js.map +0 -1
  288. package/components/visualizations/donut-chart/styles.module.css.js +0 -20
  289. package/components/visualizations/donut-chart/styles.module.css.js.map +0 -1
  290. package/hooks/use-media-query/index.js +0 -16
  291. package/hooks/use-media-query/index.js.map +0 -1
  292. package/patterns/card/newsroom-card/index.js +0 -26
  293. package/patterns/card/newsroom-card/index.js.map +0 -1
  294. package/patterns/card/newsroom-card/style.module.css.js +0 -8
  295. package/patterns/card/newsroom-card/style.module.css.js.map +0 -1
  296. package/patterns/card/partner-card/index.js +0 -42
  297. package/patterns/card/partner-card/index.js.map +0 -1
  298. package/patterns/card/partner-card/style.module.css.js +0 -12
  299. package/patterns/card/partner-card/style.module.css.js.map +0 -1
  300. package/patterns/card/person-card/index.js +0 -52
  301. package/patterns/card/person-card/index.js.map +0 -1
  302. package/patterns/card/person-card/style.module.css.js +0 -12
  303. package/patterns/card/person-card/style.module.css.js.map +0 -1
  304. package/patterns/card/primitives.js +0 -77
  305. package/patterns/card/primitives.js.map +0 -1
  306. package/patterns/card/promo-card/index.js +0 -36
  307. package/patterns/card/promo-card/index.js.map +0 -1
  308. package/patterns/card/resource-card/index.js +0 -26
  309. package/patterns/card/resource-card/index.js.map +0 -1
  310. package/patterns/card/style.module.css.js +0 -30
  311. package/patterns/card/style.module.css.js.map +0 -1
  312. package/patterns/card/thumbnails/index.js +0 -25
  313. package/patterns/card/thumbnails/index.js.map +0 -1
  314. package/patterns/card/unified-card/index.js +0 -37
  315. package/patterns/card/unified-card/index.js.map +0 -1
  316. package/patterns/copy-button/clipboard.js +0 -78
  317. package/patterns/copy-button/clipboard.js.map +0 -1
  318. package/patterns/copy-button/index.js +0 -57
  319. package/patterns/copy-button/index.js.map +0 -1
  320. package/patterns/copy-button/style.module.css.js +0 -13
  321. package/patterns/copy-button/style.module.css.js.map +0 -1
  322. package/patterns/layout/index.js +0 -47
  323. package/patterns/layout/index.js.map +0 -1
  324. package/patterns/layout/layout.module.css.js +0 -20
  325. package/patterns/layout/layout.module.css.js.map +0 -1
  326. package/patterns/product-badge/index.js +0 -22
  327. package/patterns/product-badge/index.js.map +0 -1
  328. package/patterns/product-badge/style.module.css.js +0 -8
  329. package/patterns/product-badge/style.module.css.js.map +0 -1
  330. package/patterns/product-logo/index.js +0 -130
  331. package/patterns/product-logo/index.js.map +0 -1
  332. package/patterns/product-logo/product-logo.module.css.js +0 -13
  333. package/patterns/product-logo/product-logo.module.css.js.map +0 -1
  334. package/patterns/related-content/index.js +0 -65
  335. package/patterns/related-content/index.js.map +0 -1
  336. package/patterns/related-content/style.module.css.js +0 -22
  337. package/patterns/related-content/style.module.css.js.map +0 -1
  338. package/utils/get-contrast-yiq.js +0 -13
  339. package/utils/get-contrast-yiq.js.map +0 -1
  340. package/utils/hooks/use-screen-size.js +0 -10
  341. package/utils/hooks/use-screen-size.js.map +0 -1
  342. package/utils/i18n/constants/index.js +0 -98
  343. package/utils/i18n/constants/index.js.map +0 -1
  344. package/utils/i18n/helpers/locale-provider.js +0 -9
  345. package/utils/i18n/helpers/locale-provider.js.map +0 -1
  346. package/utils/i18n/helpers/to-smart-sentence-case.js +0 -12
  347. package/utils/i18n/helpers/to-smart-sentence-case.js.map +0 -1
  348. package/utils/i18n/helpers/to-smart-title-case.js +0 -10
  349. package/utils/i18n/helpers/to-smart-title-case.js.map +0 -1
  350. package/utils/i18n/helpers/use-locale.js +0 -14
  351. package/utils/i18n/helpers/use-locale.js.map +0 -1
  352. package/utils/i18n/index.js +0 -41
  353. package/utils/i18n/index.js.map +0 -1
  354. package/utils/i18n/index2.js +0 -33
  355. package/utils/i18n/index2.js.map +0 -1
  356. package/utils/make-normalizer/index.js +0 -34
  357. package/utils/make-normalizer/index.js.map +0 -1
  358. package/utils/mds-context/index.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index-C4GBbW3N.js","sources":["../src/components/disclosure-primitive/use-disclosure-primitive.ts","../src/components/disclosure-primitive/index.tsx","../src/components/accordion/item/button.tsx","../src/components/accordion/item/index.tsx","../src/components/accordion/index.tsx","../src/components/badge-count/index.tsx","../src/components/dismiss-button/index.tsx","../src/components/alert/icon.tsx","../src/components/alert/index.tsx","../src/components/menu-primitive/use-menu-primitive.ts","../src/components/menu-primitive/index.tsx","../src/components/breadcrumbs/item/index.tsx","../src/components/breadcrumbs/truncation-button/index.tsx","../src/components/breadcrumbs/index.tsx","../src/components/code-block/utils/parse-highlighted-lines.ts","../src/components/code-block/code-lines/utils/split-jsx-into-lines.ts","../src/components/code-block/code-lines/utils/split-html-into-lines.tsx","../src/components/code-block/code-lines/index.tsx","../src/components/code-block/hidden-copy-content/index.tsx","../src/components/code-block/utils/shellwords.ts","../src/components/code-block/utils/process-snippet.ts","../src/components/code-block/index.tsx","../src/components/dropdown/toggle-button/index.tsx","../src/components/dropdown/list-item/interactive.tsx","../src/components/dropdown/list-item/title.tsx","../src/components/dropdown/list-item/separator.tsx","../src/components/dropdown/list-item/custom.tsx","../src/components/dropdown/list-item/index.tsx","../src/components/dropdown/index.tsx","../../utils/i18n/constants/index.ts","../../utils/i18n/helpers/locale-provider.tsx","../../utils/i18n/helpers/to-smart-sentence-case.ts","../../utils/i18n/helpers/to-smart-title-case.ts","../../utils/i18n/helpers/use-locale.ts","../../utils/i18n/index.ts","../src/utils/i18n/index.ts","../src/components/form/indicator/index.tsx","../src/components/form/label/index.tsx","../src/components/form/helper-text/index.tsx","../src/components/form/error/index.tsx","../src/components/form/field/index.tsx","../src/components/form/legend/index.tsx","../src/components/form/fieldset/index.tsx","../src/components/form/checkbox/index.tsx","../src/components/form/file-input/index.tsx","../src/components/form/radio/index.tsx","../src/components/form/radio-card/group.tsx","../src/components/form/radio-card/label.tsx","../src/components/form/radio-card/description.tsx","../src/components/form/radio-card/index.tsx","../src/components/form/select/index.tsx","../src/components/form/text-input/index.tsx","../src/components/combo-box-primitive/index.tsx","../src/components/form/super-select/index.tsx","../src/components/form/textarea/index.tsx","../src/components/form/toggle/index.tsx","../src/components/icon-tile/index.tsx","../src/components/inline-link/index.tsx","../src/components/legacy-button/utils.tsx","../src/components/legacy-button/index.tsx","../src/components/dialog-primitive/index.tsx","../src/components/modal/use-modal.ts","../src/components/modal/index.tsx","../src/components/separator/index.tsx","../src/components/table/utils.ts","../src/components/table/td.tsx","../src/components/hds/wrappers/tooltip.tsx","../src/components/table/th-button-tooltip.tsx","../src/components/table/th.tsx","../src/components/table/tr.tsx","../src/components/table/index.tsx","../src/components/tabs/use-tabs-context.ts","../src/components/tabs/tab-panel.tsx","../src/components/tabs/tab.tsx","../src/components/tabs/index.tsx","../src/utils/get-contrast-yiq.ts","../src/components/visualizations/bar-chart/horizontal-chart/dataset-value/index.tsx","../src/components/visualizations/bar-chart/horizontal-chart/legend/index.tsx","../src/components/visualizations/bar-chart/horizontal-chart/index.tsx","../src/components/visualizations/bar-chart/index.tsx","../src/components/visualizations/donut-chart/components/arc-tooltip/index.tsx","../src/components/visualizations/donut-chart/components/external-arc-label/index.tsx","../src/components/visualizations/donut-chart/components/internal-arc-label/index.tsx","../src/components/visualizations/donut-chart/index.tsx"],"sourcesContent":["'use client'\n\nimport { createContext, useContext, type MouseEventHandler } from 'react'\n\nexport interface DisclosurePrimitiveContextState {\n\tisOpen: boolean\n\tonClickToggle: MouseEventHandler<HTMLButtonElement>\n\tcloseDisclosure: () => void\n\tcontentId: string\n\tcontainsInteractive: boolean\n\tariaLabel: string\n}\n\nexport const DisclosurePrimitiveContext = createContext<\n\tDisclosurePrimitiveContextState | undefined\n>(undefined)\nDisclosurePrimitiveContext.displayName = 'DisclosurePrimitiveContext'\n\nexport function useDisclosurePrimitive(): DisclosurePrimitiveContextState {\n\tconst context = useContext(DisclosurePrimitiveContext)\n\tif (context === undefined) {\n\t\tthrow new Error(\n\t\t\t'useDisclosurePrimitive must be used within a DisclosurePrimitiveContext.Provider'\n\t\t)\n\t}\n\treturn context\n}\n","'use client'\n\nimport type { PropsWithChildren } from 'react'\nimport {\n\tuseEffect,\n\tuseMemo,\n\tuseState,\n\tuseCallback,\n\tuseId,\n\ttype HTMLAttributes,\n} from 'react'\nimport classNames from 'classnames'\nimport {\n\tDisclosurePrimitiveContext,\n\tuseDisclosurePrimitive,\n\ttype DisclosurePrimitiveContextState,\n} from './use-disclosure-primitive'\nimport s from './styles.module.css'\n\ninterface DisclosurePrimitiveProviderProps\n\textends HTMLAttributes<HTMLDivElement> {\n\t/**\n\t * Callback fired when the disclosure is closed (optional)\n\t */\n\tonClose?: () => void\n\t/**\n\t * Hook into this trackedIsOpen property to access the state of isOpen\n\t * @default false\n\t * */\n\ttrackedIsOpen?: boolean\n\tcontainsInteractive?: boolean\n\tariaLabel?: string\n}\n\nconst Provider = ({\n\tonClose,\n\tchildren,\n\tclassName,\n\ttrackedIsOpen = false,\n\tcontainsInteractive = false,\n\tariaLabel = 'Toggle display',\n\t...rest\n}: DisclosurePrimitiveProviderProps) => {\n\tconst [isOpen, setIsOpen] = useState(trackedIsOpen)\n\tconst contentId = 'content-' + useId()\n\n\t// update the provider state if the trackedIsOpen prop changes\n\tuseEffect(() => {\n\t\tsetIsOpen(trackedIsOpen)\n\t}, [trackedIsOpen])\n\n\tconst closeDisclosure = useCallback(() => {\n\t\tsetIsOpen(false)\n\t\tif (onClose) {\n\t\t\tonClose()\n\t\t}\n\t}, [setIsOpen, onClose])\n\n\tconst onClickToggle = useCallback(() => {\n\t\tsetIsOpen((prevState) => !prevState)\n\t}, [setIsOpen])\n\n\tconst contextValue: DisclosurePrimitiveContextState = useMemo(\n\t\t() => ({\n\t\t\tisOpen,\n\t\t\tonClickToggle,\n\t\t\tcloseDisclosure,\n\t\t\tcontentId,\n\t\t\tcontainsInteractive,\n\t\t\tariaLabel,\n\t\t}),\n\t\t[\n\t\t\tisOpen,\n\t\t\tonClickToggle,\n\t\t\tcloseDisclosure,\n\t\t\tcontentId,\n\t\t\tcontainsInteractive,\n\t\t\tariaLabel,\n\t\t]\n\t)\n\n\treturn (\n\t\t<DisclosurePrimitiveContext.Provider value={contextValue}>\n\t\t\t<div\n\t\t\t\tclassName={classNames(s['disclosure-primitive'], className)}\n\t\t\t\t{...rest}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</DisclosurePrimitiveContext.Provider>\n\t)\n}\n\nconst Content = ({ children }: PropsWithChildren) => {\n\tconst { isOpen } = useDisclosurePrimitive()\n\tif (!isOpen) {\n\t\treturn null\n\t}\n\n\treturn <>{children}</>\n}\n\nconst DisclosurePrimitive = { Provider, Content }\n\nexport { DisclosurePrimitive }\n","'use client'\n\nimport classNames from 'classnames'\nimport { FlightIcon } from '../../flight-icon'\nimport { useDisclosurePrimitive } from '../../disclosure-primitive/use-disclosure-primitive'\nimport s from '../style.module.scss'\nimport type { MouseEventHandler } from 'react'\n\ninterface AccordionButtonProps {\n\tanchorId?: string\n\tupdateUrl?: boolean\n}\n\nconst AccordionButton = ({ anchorId, updateUrl }: AccordionButtonProps) => {\n\tconst {\n\t\tonClickToggle,\n\t\tisOpen,\n\t\tcontentId,\n\t\tcontainsInteractive: parentContainsInteractive,\n\t\tariaLabel,\n\t} = useDisclosurePrimitive()\n\n\tconst handleClick: MouseEventHandler<HTMLButtonElement> = (e) => {\n\t\tonClickToggle(e)\n\n\t\tif (!updateUrl || !anchorId) return\n\n\t\tif (!isOpen) {\n\t\t\thistory.replaceState(null, '', `#${anchorId}`)\n\t\t} else {\n\t\t\thistory.replaceState(null, '', window.location.pathname)\n\t\t}\n\t}\n\n\treturn (\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tclassName={classNames(s['button'], {\n\t\t\t\t[s['parent-contains-interactive']]: parentContainsInteractive,\n\t\t\t\t[s['parent-does-not-contain-interactive']]: !parentContainsInteractive,\n\t\t\t})}\n\t\t\tonClick={handleClick}\n\t\t\taria-controls={contentId}\n\t\t\taria-expanded={isOpen}\n\t\t\taria-label={ariaLabel}\n\t\t>\n\t\t\t<FlightIcon\n\t\t\t\tname=\"chevron-down\"\n\t\t\t\tsize={24}\n\t\t\t\tisInlineBlock={false}\n\t\t\t\tclassName={classNames(s.icon, { [s['icon-rotate']]: isOpen })}\n\t\t\t/>\n\t\t</button>\n\t)\n}\n\nexport { AccordionButton }\n","'use client'\n\nimport classNames from 'classnames'\nimport { DisclosurePrimitive } from '../../disclosure-primitive'\nimport { useDisclosurePrimitive } from '../../disclosure-primitive/use-disclosure-primitive'\nimport type { HTMLAttributes } from 'react'\nimport { AccordionButton } from './button'\nimport s from '../style.module.scss'\nimport { Text } from '../../text'\n\ninterface AccordionItemProps extends HTMLAttributes<HTMLDivElement> {\n\tariaLabel?: string\n\tisOpen?: boolean\n\tcontainsInteractive?: boolean\n}\n\nconst AccordionItem = ({\n\tchildren,\n\tcontainsInteractive,\n\tisOpen,\n\tariaLabel = 'Toggle display',\n\t...rest\n}: AccordionItemProps) => {\n\treturn (\n\t\t<DisclosurePrimitive.Provider\n\t\t\tclassName={classNames(s.item, {\n\t\t\t\t[s['contains-interactive']]: containsInteractive,\n\t\t\t\t[s['does-not-contain-interactive']]: !containsInteractive,\n\t\t\t})}\n\t\t\ttrackedIsOpen={isOpen}\n\t\t\tcontainsInteractive={containsInteractive}\n\t\t\tariaLabel={ariaLabel}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{children}\n\t\t</DisclosurePrimitive.Provider>\n\t)\n}\n\nAccordionItem.displayName = 'AccordionItem'\n\ninterface AccordionToggleProps {\n\tchildren: React.ReactNode\n\tanchorId?: string\n\tupdateUrl?: boolean\n}\nconst AccordionToggle = ({\n\tchildren,\n\tanchorId,\n\tupdateUrl,\n}: AccordionToggleProps) => {\n\treturn (\n\t\t<div className={s.toggle}>\n\t\t\t<AccordionButton anchorId={anchorId ?? ''} updateUrl={updateUrl} />\n\t\t\t<div className={classNames(s['toggle-content'])}>\n\t\t\t\t<Text.Body weight=\"semibold\">{children}</Text.Body>\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n\nAccordionToggle.displayName = 'AccordionToggle'\n\nconst AccordionContent = ({ children }: React.PropsWithChildren) => {\n\tconst { contentId } = useDisclosurePrimitive()\n\n\treturn (\n\t\t<DisclosurePrimitive.Content>\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\ts['content'],\n\t\t\t\t\t'mds-typography-legacy-body-200 mds-foreground-primary'\n\t\t\t\t)}\n\t\t\t\tid={contentId}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</DisclosurePrimitive.Content>\n\t)\n}\n\nAccordionContent.displayName = 'AccordionContent'\n\nexport { AccordionItem, AccordionToggle, AccordionContent }\n","import type { HTMLAttributes } from 'react'\nimport classNames from 'classnames'\nimport s from './style.module.scss'\n\ninterface AccordionProps extends HTMLAttributes<HTMLDivElement> {\n\t/**\n\t * optional class name to add to the accordion\n\t */\n\tclassName?: string\n}\n\nconst Accordion = ({ children, className, ...rest }: AccordionProps) => {\n\treturn (\n\t\t<div className={classNames(s.accordion, className)} {...rest}>\n\t\t\t{children}\n\t\t</div>\n\t)\n}\n\nAccordion.displayName = 'Accordion'\n\nexport { Accordion }\nexport type { AccordionProps }\nexport { AccordionContent, AccordionItem, AccordionToggle } from './item'\n","import classNames from 'classnames'\nimport type { HTMLAttributes } from 'react'\nimport s from './style.module.scss'\n\ninterface BadgeCountProps extends HTMLAttributes<HTMLDivElement> {\n\tsize?: 'small' | 'medium' | 'large'\n\ttype?: 'filled' | 'inverted' | 'outlined'\n\tcolor?: 'neutral' | 'neutral-dark-mode'\n\t/**\n\t * Text value that renders in the Badge Count.\n\t */\n\ttext: string\n}\n\nconst BadgeCount = ({\n\ttext,\n\tsize = 'medium',\n\ttype = 'filled',\n\tcolor = 'neutral',\n\tclassName,\n\t...rest\n}: BadgeCountProps) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(\n\t\t\t\ts['badge-count'],\n\t\t\t\ts[`size-${size}`],\n\t\t\t\ts[`type-${type}`],\n\t\t\t\ts[`color-${color}`],\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{text}\n\t\t</div>\n\t)\n}\n\nBadgeCount.displayName = 'BadgeCount'\n\nexport type { BadgeCountProps }\nexport { BadgeCount }\n","import classNames from 'classnames'\nimport { FlightIcon } from '../flight-icon'\nimport s from './styles.module.scss'\n\ninterface DismissButtonProps {\n\tariaLabel?: string\n\tonClick: React.MouseEventHandler<HTMLButtonElement>\n\tclassName?: string\n}\n\nconst DismissButton = ({\n\tariaLabel = 'Dismiss',\n\tonClick,\n\tclassName,\n}: DismissButtonProps) => {\n\treturn (\n\t\t<button\n\t\t\tclassName={classNames(s['dismiss-button'], className)}\n\t\t\ttype=\"button\"\n\t\t\taria-label={ariaLabel}\n\t\t\tonClick={onClick}\n\t\t>\n\t\t\t<FlightIcon size={16} name=\"x\" />\n\t\t</button>\n\t)\n}\n\nexport type { DismissButtonProps }\nexport { DismissButton }\n","import type { AlertColor, AlertProps } from '.'\nimport type { FlightIconName } from '../flight-icon'\nimport { FlightIcon } from '../flight-icon'\nimport s from './alert.module.scss'\n\nconst ICON_BY_COLOR_AND_TYPE = {\n\tneutral: {\n\t\tcompact: 'info-fill',\n\t\tdefault: 'info',\n\t},\n\thighlight: {\n\t\tcompact: 'info-fill',\n\t\tdefault: 'info',\n\t},\n\tsuccess: {\n\t\tcompact: 'check-circle-fill',\n\t\tdefault: 'check-circle',\n\t},\n\twarning: {\n\t\tcompact: 'alert-triangle-fill',\n\t\tdefault: 'alert-triangle',\n\t},\n\tcritical: {\n\t\tcompact: 'alert-diamond-fill',\n\t\tdefault: 'alert-diamond',\n\t},\n} as const satisfies Record<\n\tAlertColor,\n\tRecord<'compact' | 'default', FlightIconName>\n>\n\ninterface IconProps {\n\ticon?: FlightIconName | false\n\tcolor: AlertColor\n\ttype: AlertProps['type']\n}\n\nconst Icon = ({ icon, type, color }: IconProps) => {\n\tif (icon === false) {\n\t\treturn null\n\t}\n\n\tconst defaultIconName: FlightIconName =\n\t\ttype === 'compact'\n\t\t\t? ICON_BY_COLOR_AND_TYPE[color].compact\n\t\t\t: ICON_BY_COLOR_AND_TYPE[color].default\n\n\tconst iconName = icon ?? defaultIconName\n\n\treturn (\n\t\t<div className={s.icon}>\n\t\t\t<FlightIcon name={iconName} stretched />\n\t\t</div>\n\t)\n}\n\nexport { Icon }\n","import classNames from 'classnames'\nimport { useId } from 'react'\nimport { DismissButton } from '../dismiss-button'\nimport { StandaloneLink, type StandaloneLinkProps } from '../standalone-link'\nimport { Icon } from './icon'\nimport type { HTMLAttributes, PropsWithChildren, ReactNode } from 'react'\nimport type { ButtonProps } from '../button'\nimport { Button } from '../button'\nimport s from './alert.module.scss'\nimport type { FlightIconName } from '../flight-icon'\n\ntype AlertColor = 'neutral' | 'highlight' | 'success' | 'warning' | 'critical'\n\ninterface CommonAlertProps extends HTMLAttributes<HTMLDivElement> {\n\t/**\n\t * Sets the color scheme for `background`, `border`, `title`, and `description`, which cannot be overridden.\n\t * `color` results in a default icon, which can be overridden.\n\t * default: `neutral`\n\t */\n\tcolor?: AlertColor\n\t/**\n\t * The alert can be dismissed by the user. When a function is passed, the \"dismiss\" button is displayed.\n\t */\n\tonDismiss?: () => void\n\t/**\n\t * A string used for the title of the alert.\n\t * Alert must have either a title or a description, or both.\n\t */\n\ttitle?: string\n\t/**\n\t * A plain text string or basic html that is used for the description.\n\t * Alert must have either a title or a description, or both.\n\t */\n\tdescription?: ReactNode\n\t/**\n\t * Role for the alert.\n\t * `alertdialog` should be used when the alert includes interactive elements (<Alert.Actions>).\n\t * `alert` should be used for all other scenarios.\n\t */\n\trole: 'alert' | 'alertdialog'\n}\n\ntype AlertProps =\n\t| (CommonAlertProps & {\n\t\t\t/** compact alerts must specify an icon */\n\t\t\ttype: 'compact'\n\t\t\t/** an icon from the Flight Icon set or false to hide the default icon */\n\t\t\ticon?: FlightIconName\n\t })\n\t| (CommonAlertProps & {\n\t\t\t/** page & inline alerts get an optional icon override */\n\t\t\ttype: 'page' | 'inline'\n\t\t\t/** an icon from the Flight Icon set or false to hide the default icon */\n\t\t\ticon?: FlightIconName | false\n\t })\n\nconst Alert = ({\n\ttype,\n\tcolor = 'neutral',\n\ticon,\n\tonDismiss,\n\ttitle,\n\tdescription,\n\tchildren,\n\trole,\n\tclassName,\n\t...rest\n}: AlertProps) => {\n\tif (!title && !description) {\n\t\tthrow new Error(\n\t\t\t'Alert must include either a title or a description, or both'\n\t\t)\n\t}\n\n\t// `alertdialog` must have an accessible name so we use either the\n\t// title or the description as label for the alert\n\tconst generatedLabelId = useId()\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(\n\t\t\t\ts.alert,\n\t\t\t\ts[`type-${type}`],\n\t\t\t\ts[`color-${color}`],\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\trole={role}\n\t\t\taria-live=\"polite\"\n\t\t\taria-labelledby={generatedLabelId}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<Icon icon={icon} type={type} color={color} />\n\t\t\t<div className={s.content}>\n\t\t\t\t<div\n\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\ts.text,\n\t\t\t\t\t\ttype === 'compact'\n\t\t\t\t\t\t\t? 'mds-typography-legacy-body-100'\n\t\t\t\t\t\t\t: 'mds-typography-legacy-body-200'\n\t\t\t\t\t)}\n\t\t\t\t>\n\t\t\t\t\t{title && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\ts.title,\n\t\t\t\t\t\t\t\t'mds-typography-font-weight-semibold'\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\tid={generatedLabelId}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{title}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t\t{description && (\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\ts.description,\n\t\t\t\t\t\t\t\t'mds-typography-font-weight-regular mds-foreground-primary'\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t\tid={!title ? generatedLabelId : undefined}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{description}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)}\n\t\t\t\t</div>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t\t{onDismiss && (\n\t\t\t\t<div className={s['dismiss-button-wrapper']}>\n\t\t\t\t\t<DismissButton onClick={onDismiss} />\n\t\t\t\t</div>\n\t\t\t)}\n\t\t</div>\n\t)\n}\n\nAlert.displayName = 'Alert'\n\nconst AlertActions = ({ children }: PropsWithChildren) => {\n\treturn <div className={s.actions}>{children}</div>\n}\n\nAlertActions.displayName = 'AlertActions'\n\nconst AlertButton = ({ ...props }: Exclude<ButtonProps, 'size'>) => {\n\treturn <Button size=\"small\" {...props} />\n}\n\nAlertButton.displayName = 'AlertButton'\n\nconst AlertStandaloneLink = ({\n\t...props\n}: Exclude<StandaloneLinkProps, 'size'>) => {\n\treturn <StandaloneLink size=\"small\" {...props} />\n}\n\nAlertStandaloneLink.displayName = 'AlertStandaloneLink'\n\nexport { Alert, AlertActions, AlertButton, AlertStandaloneLink }\nexport type { AlertProps, AlertColor }\n","'use client'\n\nimport {\n\tcreateContext,\n\tuseContext,\n\ttype MouseEventHandler,\n\ttype RefObject,\n} from 'react'\n\nexport interface MenuPrimitiveContextState {\n\tisOpen: boolean\n\tonClickToggle: MouseEventHandler<HTMLButtonElement>\n\ttoggleRef: RefObject<HTMLDivElement>\n\tcloseMenu: () => void\n}\n\nexport const MenuPrimitiveContext = createContext<\n\tMenuPrimitiveContextState | undefined\n>(undefined)\nMenuPrimitiveContext.displayName = 'MenuPrimitiveContext'\n\nexport function useMenuPrimitive(): MenuPrimitiveContextState {\n\tconst context = useContext(MenuPrimitiveContext)\n\tif (context === undefined) {\n\t\tthrow new Error(\n\t\t\t'useMenuPrimitive must be used within a MenuPrimitiveContext.Provider'\n\t\t)\n\t}\n\treturn context\n}\n","'use client'\n\nimport {\n\tuseMemo,\n\tuseState,\n\tuseRef,\n\tuseCallback,\n\ttype ReactNode,\n\ttype FocusEvent,\n\ttype KeyboardEvent,\n\ttype HTMLAttributes,\n} from 'react'\nimport classNames from 'classnames'\nimport {\n\tMenuPrimitiveContext,\n\tuseMenuPrimitive,\n\ttype MenuPrimitiveContextState,\n} from './use-menu-primitive'\nimport s from './styles.module.css'\n\ninterface MenuPrimitiveProps extends HTMLAttributes<HTMLDivElement> {\n\tonClose?: () => void\n\tisFullWidth?: boolean\n\tchildren: ReactNode\n}\n\nconst Provider = ({\n\tonClose,\n\tisFullWidth,\n\tchildren,\n\tclassName,\n\t...rest\n}: MenuPrimitiveProps) => {\n\tconst [isOpen, setIsOpen] = useState(false)\n\tconst menuRef = useRef<HTMLDivElement | null>(null)\n\tconst toggleRef = useRef<HTMLDivElement | null>(null)\n\n\tconst closeMenu = useCallback(() => {\n\t\tsetIsOpen(false)\n\t\tif (onClose) {\n\t\t\tonClose()\n\t\t}\n\t}, [setIsOpen, onClose])\n\n\tconst onClickToggle = useCallback(() => {\n\t\tsetIsOpen((prevState) => !prevState)\n\t\ttoggleRef?.current?.focus()\n\t}, [toggleRef, setIsOpen])\n\n\tconst onFocusOut = useCallback(\n\t\t(event: FocusEvent) => {\n\t\t\tif (\n\t\t\t\t!menuRef?.current?.contains(\n\t\t\t\t\tevent.relatedTarget || document.activeElement\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tcloseMenu()\n\t\t\t}\n\t\t},\n\t\t[closeMenu]\n\t)\n\n\tconst onKeyUp = useCallback(\n\t\t(event: KeyboardEvent) => {\n\t\t\tif (event.key === 'Escape') {\n\t\t\t\tcloseMenu()\n\t\t\t\ttoggleRef?.current?.querySelector('button')?.focus()\n\t\t\t}\n\t\t},\n\t\t[closeMenu]\n\t)\n\n\tconst contextValue: MenuPrimitiveContextState = useMemo(\n\t\t() => ({\n\t\t\tisOpen,\n\t\t\tonClickToggle,\n\t\t\ttoggleRef,\n\t\t\tcloseMenu,\n\t\t}),\n\t\t[isOpen, onClickToggle, toggleRef, closeMenu]\n\t)\n\n\treturn (\n\t\t<MenuPrimitiveContext.Provider value={contextValue}>\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\ts['menu-primitive'],\n\t\t\t\t\t{\n\t\t\t\t\t\t[s['width-full']]: isFullWidth,\n\t\t\t\t\t},\n\t\t\t\t\tclassName\n\t\t\t\t)}\n\t\t\t\tonBlur={onFocusOut}\n\t\t\t\tonKeyUp={onKeyUp}\n\t\t\t\tref={menuRef}\n\t\t\t\t{...rest}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</MenuPrimitiveContext.Provider>\n\t)\n}\n\nconst Toggle = ({ children }: { children: ReactNode }) => {\n\tconst { toggleRef } = useMenuPrimitive()\n\treturn (\n\t\t<div className=\"hds-menu-primitive__toggle\" ref={toggleRef}>\n\t\t\t{children}\n\t\t</div>\n\t)\n}\n\nconst Content = ({ children }: { children: ReactNode }) => {\n\tconst { isOpen } = useMenuPrimitive()\n\treturn (\n\t\t<div className={isOpen ? s.isOpen : s.isClosed} tabIndex={-1}>\n\t\t\t{children}\n\t\t</div>\n\t)\n}\n\nexport { Provider, Toggle, Content }\n","'use client'\n\nimport { useMDSLink } from '../../../utils/mds-context'\nimport type { BreadcrumbItemProps } from '../types'\nimport s from '../style.module.scss'\n\ninterface ItemContentProps {\n\ttext: string\n\t/**\n\t * Use to show an flight icon.\n\t */\n\ticon?: React.ReactNode\n}\n\nconst ItemContent = ({ icon, text }: ItemContentProps) => {\n\treturn (\n\t\t<>\n\t\t\t{icon && <div className={s.icon}>{icon}</div>}\n\n\t\t\t<span className={s.text}>{text}</span>\n\t\t</>\n\t)\n}\n\nexport const Item = ({\n\tmaxWidth,\n\tcurrent,\n\ticon,\n\ttext,\n\turl,\n\t...rest\n}: BreadcrumbItemProps) => {\n\tconst Link = useMDSLink()\n\n\treturn (\n\t\t<li\n\t\t\tclassName={s.item}\n\t\t\tstyle={{\n\t\t\t\t...(maxWidth && { maxWidth }),\n\t\t\t}}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{current ? (\n\t\t\t\t<div className={s.current}>\n\t\t\t\t\t<ItemContent icon={icon} text={text} />\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<Link className={s.link} href={url}>\n\t\t\t\t\t<ItemContent icon={icon} text={text} />\n\t\t\t\t</Link>\n\t\t\t)}\n\t\t</li>\n\t)\n}\n","'use client'\n\nimport { IconMoreHorizontal16 } from '@hashicorp/flight-icons/svg-react/more-horizontal-16'\nimport { useMenuPrimitive } from '../../menu-primitive/use-menu-primitive'\nimport s from '../style.module.scss'\n\nexport const TruncationButton = ({\n\tariaLabel = 'show more',\n}: {\n\tariaLabel?: string\n}) => {\n\tconst { isOpen, onClickToggle } = useMenuPrimitive()\n\n\treturn (\n\t\t<button\n\t\t\ttype=\"button\"\n\t\t\tclassName={s['truncation-button']}\n\t\t\taria-label={ariaLabel}\n\t\t\taria-expanded={isOpen}\n\t\t\tonClick={onClickToggle}\n\t\t>\n\t\t\t<IconMoreHorizontal16 />\n\t\t</button>\n\t)\n}\n","import classNames from 'classnames'\nimport * as MenuPrimitive from '../menu-primitive'\nimport { Item } from './item'\nimport { TruncationButton } from './truncation-button'\nimport type { BreadcrumbProps, BreadcrumbTruncationProps } from './types'\nimport s from './style.module.scss'\n\nconst Root = ({\n\titemsCanWrap = true,\n\tariaLabel = 'breadcrumbs',\n\tchildren,\n\tclassName,\n\t...rest\n}: BreadcrumbProps) => {\n\treturn (\n\t\t<nav\n\t\t\tclassName={classNames(\n\t\t\t\ts.breadcrumbs,\n\t\t\t\t{\n\t\t\t\t\t[s['items-can-wrap']]: itemsCanWrap,\n\t\t\t\t},\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\taria-label={ariaLabel}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<ol className={s.list}>{children}</ol>\n\t\t</nav>\n\t)\n}\n\nconst Truncation = ({\n\tariaLabel,\n\tchildren,\n\t...rest\n}: BreadcrumbTruncationProps) => {\n\treturn (\n\t\t<li className={classNames(s.item, s.truncation)} {...rest}>\n\t\t\t<MenuPrimitive.Provider>\n\t\t\t\t<MenuPrimitive.Toggle>\n\t\t\t\t\t<TruncationButton />\n\t\t\t\t</MenuPrimitive.Toggle>\n\t\t\t\t<MenuPrimitive.Content>\n\t\t\t\t\t<div className={s['truncation-content']}>\n\t\t\t\t\t\t<ol className={s.sublist}>{children}</ol>\n\t\t\t\t\t</div>\n\t\t\t\t</MenuPrimitive.Content>\n\t\t\t</MenuPrimitive.Provider>\n\t\t</li>\n\t)\n}\n\nconst Breadcrumbs = { Root, Item, Truncation }\n\nexport { Breadcrumbs }\n","function parseHighlightedLines(string?: string | boolean) {\n\tif (typeof string == 'undefined' || string === false || string === '') {\n\t\treturn []\n\t}\n\n\tif (typeof string !== 'string') {\n\t\tthrow new Error(\n\t\t\t`The highlight prop must be a string. Received a value of type \"${typeof string}\" instead.`\n\t\t)\n\t}\n\n\tconst hasValidChars = /^[-,0-9\\s]+$/.test(string)\n\tif (!hasValidChars) {\n\t\tthrow new Error(\n\t\t\t`The highlight prop must be a comma-separated list of single integers or ranges with a single dash between two integers. Found invalid characters: \"${string}\".`\n\t\t)\n\t}\n\n\tconst parts = string.split(',')\n\treturn parts.reduce((acc, part) => {\n\t\treturn acc.concat(parsePart(part))\n\t}, [] as number[])\n}\n\nfunction parsePart(string: string): number[] {\n\tconst dashParts = string.split('-')\n\tif (dashParts.length > 2) {\n\t\tthrow new Error(\n\t\t\t`Each comma-separated value in the highlight prop must be either a single integer, or a range with a single dash between two integers. Found a value with multiple dashes: \"${string}\".`\n\t\t)\n\t}\n\t// Single integers are easy, just parse and return\n\tconst isSingle = dashParts.length == 1\n\tif (isSingle) {\n\t\tconst parsedInt = parseInt(string)\n\t\tconst isNaN = parsedInt !== parsedInt\n\t\tif (isNaN) {\n\t\t\tthrow new Error(\n\t\t\t\t`Each comma-separated value in the highlight prop must be either a single integer, or a range with a single dash between two integers. Found a value that parsed to NaN: \"${\n\t\t\t\t\tstring === '' ? '<empty string>' : string\n\t\t\t\t}\".`\n\t\t\t)\n\t\t}\n\t\treturn [parsedInt]\n\t}\n\t// Ranges require a little more logic\n\tconst [startVal, endVal] = dashParts.map((v) => parseInt(v))\n\tconst hasNaNStart = startVal !== startVal\n\tconst hasNaNEnd = endVal !== endVal\n\tif (hasNaNStart || hasNaNEnd) {\n\t\tthrow new Error(\n\t\t\t`Each comma-separated value in the highlight prop must be either a single integer, or a range with a single dash between two integers. Found a range that produced a NaN: \"${string}\".`\n\t\t)\n\t}\n\tconst length = endVal - startVal + 1\n\tconst values = [...Array(length).keys()].map((int) => int + startVal)\n\treturn values\n}\n\nexport default parseHighlightedLines\n","import { Children, type ReactNode } from 'react'\n\n/**\n * Given an array of React children,\n * split the array on newlines, grouping consecutive\n * non-newline tokens in individual line elements,\n * and return an array of React <span> elements,\n * each of which will contain a single line.\n *\n * Note that JSX tokens should not be multi-line,\n * ie, all newline characters should be surfaced\n * to the top level rather than nested in syntax\n * highlighting tokens (otherwise the line-by-line\n * markup we render would be invalid). We have\n * a rehype plugin we include with our markdown defaults\n * to ensure newlines are surfaced in this way.\n *\n * @param {*} codeJsx Array of JSX elements, some of which may be newline strings\n * @returns Array of JSX <span> elements representing individual lines\n */\nfunction splitJsxIntoLines(codeJsx: React.ReactNode | React.ReactNode[]) {\n\tconst linesArray = Children.toArray(codeJsx)\n\t/**\n\t * Many newlines take the form of a literal newline string, `\\n`.\n\t * However, some newlines take different forms. We expect these to be tagged\n\t * with an `empty-line` className by our rehype code plugins.\n\t * Here we detect the latter types of newline, and convert them to the former.\n\t */\n\tconst withNormalizedNewlines = linesArray.map((token) => {\n\t\t// If our token has an `empty-line` className, use a literal newline\n\t\t// rather than the token itself (which would render, but with zero height)\n\t\tif (typeof token === 'object' && 'props' in token) {\n\t\t\tif (token.props.className?.includes('empty-line')) {\n\t\t\t\treturn '\\n'\n\t\t\t}\n\t\t}\n\t\t// Otherwise, return the token unmodified\n\t\treturn token\n\t})\n\t// Filter out any surfaces newlines, that are \"in between\"\n\t// other lines of code. Special exceptions should be made for:\n\t// 1. newlines at start or end of array - should be rendered as blank lines\n\t// 2. consecutive newlines - \"n\" consecutive newlines should be rendered\n\t// as \"n - 1\" blank lines.\n\tconst accumulatedLines = withNormalizedNewlines.reduce(\n\t\t(acc, token, idx) => {\n\t\t\tconst isLastLine = idx === withNormalizedNewlines.length - 1\n\t\t\tconst isNewline = token === '\\n'\n\t\t\tconst isInlineToken = token !== '\\n'\n\t\t\t// For newlines, increment the consecutive newline counter\n\t\t\tif (isNewline) acc.consecutiveNewlines++\n\t\t\t// If this token is an inline token, and we have\n\t\t\t// pending newlines, then start a new line,\n\t\t\t// adding blank lines for consecutive newlines as needed\n\t\t\tconst isFinalNewline = isNewline && isLastLine\n\t\t\tconst hasNewlines = acc.consecutiveNewlines > 0\n\t\t\tconst needsNewlines = (isInlineToken || isFinalNewline) && hasNewlines\n\t\t\tif (needsNewlines) {\n\t\t\t\t// If there are any tokens in the current line, add them as a new line\n\t\t\t\tif (acc.currentLine.length > 0) {\n\t\t\t\t\tacc.lines.push(acc.currentLine)\n\t\t\t\t\tacc.currentLine = []\n\t\t\t\t}\n\t\t\t\t// Add blank lines for each consecutive newline, then reset the counter\n\t\t\t\tfor (let i = 1; i < acc.consecutiveNewlines; i++) {\n\t\t\t\t\tacc.lines.push('')\n\t\t\t\t}\n\t\t\t\tacc.consecutiveNewlines = 0\n\t\t\t}\n\t\t\t// If this token is an inline token,\n\t\t\t// append it to the current line\n\t\t\tif (isInlineToken) {\n\t\t\t\tacc.currentLine.push(token)\n\t\t\t\t// If this is the last line,\n\t\t\t\t// then ensure the current line\n\t\t\t\t// has been pushed to the lines array\n\t\t\t\tif (isLastLine) acc.lines.push(acc.currentLine)\n\t\t\t}\n\t\t\treturn acc\n\t\t},\n\t\t{\n\t\t\tlines: [] as ReactNode[],\n\t\t\tcurrentLine: [] as ReactNode[],\n\t\t\tconsecutiveNewlines: 1, // Start at 1 to handle leading newlines\n\t\t}\n\t)\n\treturn accumulatedLines.lines\n}\n\nexport default splitJsxIntoLines\n","import type { ReactNode } from 'react'\n\nconst SHIKI_BLANK_LINE = '<span class=\"line\"></span>'\n/**\n * Given a string of HTML, split it on newlines,\n * and return an array of React <span> elements,\n * each of which will contain a single line.\n *\n * Note that HTML tokens should not be multi-line,\n * ie, all newline characters should be surfaced\n * to the top level rather than nested in syntax\n * highlighting tokens (otherwise the line-by-line\n * markup we render would be invalid). We have\n * a rehype plugin we use with our highlightString()\n * utility to ensure newlines are surfaced in this way.\n *\n * @param {string} codeHtml String of HTML\n * @returns Array of JSX <span> elements\n */\nfunction splitHtmlIntoLines(codeHtml: string): (ReactNode | null)[] {\n\tconst lineParts = codeHtml.split('\\n')\n\treturn lineParts.map((lineHtml, stableIdx) => {\n\t\t// Cut trailing newlines\n\t\tconst isLastLine = stableIdx == lineParts.length - 1\n\t\tconst isTrailingNewline = isLastLine && lineHtml == ''\n\t\tif (isTrailingNewline) return null\n\t\t// Otherwise, render the line\n\t\treturn (\n\t\t\t<span\n\t\t\t\t// This array is stable, so we can use index as key\n\t\t\t\t// eslint-disable-next-line react/no-array-index-key\n\t\t\t\tkey={stableIdx}\n\t\t\t\tdangerouslySetInnerHTML={{\n\t\t\t\t\t__html:\n\t\t\t\t\t\tlineHtml === '' || lineHtml === SHIKI_BLANK_LINE\n\t\t\t\t\t\t\t? '&nbsp;'\n\t\t\t\t\t\t\t: lineHtml,\n\t\t\t\t}}\n\t\t\t/>\n\t\t)\n\t})\n}\n\nexport default splitHtmlIntoLines\n","'use client'\n\n/**\n * Note: lines of code are expected to be stable. If we need to work with\n * dynamic code blocks in the future, we could assign random unique IDs\n * to each line during the `linesOfCode` `useMemo` function.\n *\n * For now, we disable react/no-array-index key for the entire file.\n */\n/* eslint-disable react/no-array-index-key */\n\nimport { useMemo, type ReactNode } from 'react'\nimport classNames from 'classnames'\nimport parseHighlightedLines from '../utils/parse-highlighted-lines'\nimport splitJsxIntoLines from './utils/split-jsx-into-lines'\nimport splitHtmlIntoLines from './utils/split-html-into-lines'\nimport s from '../code-block.module.scss'\n\ninterface CodeLinesProps {\n\tvalue: ReactNode\n\thasLineNumbers?: boolean\n\thighlightLines?: string\n}\n\n/**\n * Render the provided code into separate line elements,\n * accounting for all provided options.\n */\nconst CodeLines = ({\n\tvalue,\n\thasLineNumbers: lineNumbers,\n\thighlightLines: highlight,\n}: CodeLinesProps) => {\n\t// Parse out an array of integers representing which lines to highlight\n\tconst highlightedLines = parseHighlightedLines(highlight) as number[]\n\n\t/**\n\t * Split the incoming code into lines.\n\t * We need to do this in order to render each line of code in a\n\t * separate element, which is necessary for features such as highlighting\n\t * specific lines and allowing code to wrap.\n\t */\n\tconst linesOfCode = useMemo(() => {\n\t\tconst isHtmlString = typeof value === 'string'\n\t\tconst lineElements = isHtmlString\n\t\t\t? splitHtmlIntoLines(value)\n\t\t\t: splitJsxIntoLines(value)\n\t\treturn lineElements\n\t\t\t.map((children, index) => {\n\t\t\t\tconst number = index + 1\n\t\t\t\tconst highlight = highlightedLines.indexOf(number) !== -1\n\t\t\t\treturn { children, highlight }\n\t\t\t})\n\t\t\t.map(({ highlight, ...rest }, index, lines) => {\n\t\t\t\t// Add properties to help with highlighting adjacent lines of code,\n\t\t\t\t// in which case we want to apply a border to the first and last lines,\n\t\t\t\t// but not the lines in the middle of the group.\n\t\t\t\tconst prevLine = index === 0 ? null : lines[index - 1]\n\t\t\t\tconst nextLine = index === lines.length - 1 ? null : lines[index + 1]\n\t\t\t\treturn {\n\t\t\t\t\t...rest,\n\t\t\t\t\thighlight,\n\t\t\t\t\thighlightIsFirstInGroup: !prevLine || !prevLine.highlight,\n\t\t\t\t\thighlightIsLastInGroup: !nextLine || !nextLine.highlight,\n\t\t\t\t}\n\t\t\t})\n\t}, [value, highlightedLines])\n\n\t/**\n\t * For overflowing code, we use a two-column layout.\n\t * The first column contains line numbers, and is effectively fixed.\n\t * The second column contains the lines themselves, and is an overflow\n\t * container to allow extra long lines to scroll as needed.\n\t */\n\treturn (\n\t\t<>\n\t\t\t{lineNumbers ? (\n\t\t\t\t<span aria-hidden=\"true\" className={s['line-numbers-rows']}>\n\t\t\t\t\t{linesOfCode.map((line, idx) => (\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tkey={idx}\n\t\t\t\t\t\t\tclassName={classNames(s['line-number'], {\n\t\t\t\t\t\t\t\t[s['line-highlight']]: line.highlight,\n\t\t\t\t\t\t\t\t[s['line-highlight-first']]: line.highlightIsFirstInGroup,\n\t\t\t\t\t\t\t\t[s['line-highlight-last']]: line.highlightIsLastInGroup,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t/>\n\t\t\t\t\t))}\n\t\t\t\t</span>\n\t\t\t) : null}\n\t\t\t<span>\n\t\t\t\t{linesOfCode.map((line, idx) => (\n\t\t\t\t\t<span\n\t\t\t\t\t\tkey={idx}\n\t\t\t\t\t\tclassName={classNames(s['line-of-code'], {\n\t\t\t\t\t\t\t[s['line-highlight']]: line.highlight,\n\t\t\t\t\t\t\t[s['line-highlight-first']]: line.highlightIsFirstInGroup,\n\t\t\t\t\t\t\t[s['line-highlight-last']]: line.highlightIsLastInGroup,\n\t\t\t\t\t\t})}\n\t\t\t\t\t>\n\t\t\t\t\t\t{line.children}\n\t\t\t\t\t\t{/* We are _not_ rendering our lines as block elements, so we need\n\t\t\t\t\t\t to add a trailing newline to all lines. As well, trailing\n\t\t\t\t\t\t\t\tnewlines are necessary for some browsers (FireFox)\n\t\t\t\t\t\t to preserve whitespace during select-and-copy of code */}\n\t\t\t\t\t\t{'\\n'}\n\t\t\t\t\t</span>\n\t\t\t\t))}\n\t\t\t</span>\n\t\t</>\n\t)\n}\n\nexport { CodeLines }\n","'use client'\n\nimport { forwardRef, useEffect, useState, type ReactNode } from 'react'\n\n/**\n * This hidden element acts solely as a container\n * that we can fetch textContent to copy to clipboard.\n * This allows to ignore the \"how will we copy this cleanly\"\n * concern when splitting code into lines, and adding\n * line numbers and so on in other parts of code-block.\n */\nconst HiddenCopyContentComponent = (\n\t{ code }: { code: ReactNode },\n\tcopyRef: React.ForwardedRef<HTMLPreElement>\n) => {\n\tconst [isClient, setIsClient] = useState(false)\n\n\tuseEffect(() => {\n\t\tsetIsClient(true)\n\t}, [])\n\n\t/**\n\t * We are avoiding SSR here as this component is only used for the copy-to-clipboard interaction, and so rendering\n\t * the text content of the code introduces duplicate markup and some difficult-to-debug hydration mismatches.\n\t * By the time someone interacts with the copy-to-clipboard functionality, this should be rendered.\n\t */\n\tif (!isClient) return null\n\n\treturn (\n\t\t<pre ref={copyRef} style={{ display: 'none' }}>\n\t\t\t{typeof code === 'string' ? (\n\t\t\t\t<span dangerouslySetInnerHTML={{ __html: code }} />\n\t\t\t) : (\n\t\t\t\tcode\n\t\t\t)}\n\t\t</pre>\n\t)\n}\n\nconst HiddenCopyContent = forwardRef(HiddenCopyContentComponent)\n\nexport { HiddenCopyContent }\n","const scan = (\n\tstring: string,\n\tpattern: RegExp,\n\tcallback: (match: RegExpMatchArray) => void\n) => {\n\tlet result = ''\n\n\twhile (string.length > 0) {\n\t\tconst match = string.match(pattern)\n\n\t\tif (match && match.index != null && match[0] != null) {\n\t\t\tresult += string.slice(0, match.index)\n\t\t\tresult += callback(match)\n\t\t\tstring = string.slice(match.index + match[0].length)\n\t\t} else {\n\t\t\tresult += string\n\t\t\tstring = ''\n\t\t}\n\t}\n\n\treturn result\n}\n\n/**\n * Splits a string into an array of tokens in the same way the UNIX Bourne shell does.\n *\n * @param line A string to split.\n * @returns An array of the split tokens.\n */\nexport const split = (line = '') => {\n\tconst words: string[] = []\n\tlet field = ''\n\tscan(\n\t\tline,\n\t\t/\\s*(?:([^\\s\\\\'\"]+)|'((?:[^'\\\\]|\\\\.)*)'|\"((?:[^\"\\\\]|\\\\.)*)\"|(\\\\.?)|(\\S))(\\s|$)?/,\n\t\t(match) => {\n\t\t\tconst [_raw, word, sq, dq, escape, garbage, separator] = match\n\n\t\t\tif (garbage != null) {\n\t\t\t\tthrow new Error(`Unmatched quote: ${line}`)\n\t\t\t}\n\n\t\t\tif (word) {\n\t\t\t\tfield += word\n\t\t\t} else {\n\t\t\t\tlet addition\n\n\t\t\t\tif (sq) {\n\t\t\t\t\taddition = sq\n\t\t\t\t} else if (dq) {\n\t\t\t\t\taddition = dq\n\t\t\t\t} else if (escape) {\n\t\t\t\t\taddition = escape\n\t\t\t\t}\n\n\t\t\t\tif (addition) {\n\t\t\t\t\tfield += addition.replace(/\\\\(?=.)/, '')\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (separator != null) {\n\t\t\t\twords.push(field)\n\t\t\t\tfield = ''\n\t\t\t}\n\t\t}\n\t)\n\n\tif (field) {\n\t\twords.push(field)\n\t}\n\n\treturn words\n}\n\n/**\n * Escapes a string so that it can be safely used in a Bourne shell command line.\n *\n * @param str A string to escape.\n * @returns The escaped string.\n */\nexport const escape = (str = '') => {\n\treturn str.replace(/([^A-Za-z0-9_\\-.,:/@\\n])/g, '\\\\$1').replace(/\\n/g, \"'\\n'\")\n}\n","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport { escape, split } from './shellwords'\n\n/**\n * Given a snippet of code,\n * process it based on the detected language,\n * returning a modified snippet that has is\n * more suited to direct execution.\n */\nfunction processSnippet(snippet: string): string {\n\tconst isShell = snippet.split('\\n')[0].startsWith('$ ')\n\treturn isShell ? parseShellSnippet(snippet) : snippet\n}\n\n/**\n * Given a snippet of shell code that begins with `$ `,\n * return the snippet with all non-executable shell-symbols removed\n */\nfunction parseShellSnippet(snippet: string): string {\n\tconst lines = snippet.split('\\n')\n\t/**\n\t * Handle multi-line snippets.\n\t *\n\t * TODO: ideally we would detect many multi-line commands throughout\n\t * a snippet. We could potentially build some complex string-based logic to\n\t * do this... but it might be more efficient and effective to instead\n\t * process the `code` passed to `HiddenCopyContent`:\n\t * - We have incoming highlighted HTML or JSX, so we might be able to use\n\t * the highlight token classes (eg \"shell-symbol\") to only copy commands.\n\t * - However, our highlighter currently doesn't distinguish between\n\t * \"commands\" and \"output\" tokens for the \"shell-session\" language...\n\t * So maybe complex string-based logic would be the way to go if\n\t * we want to support multiple multi-line commands in a single snippet?\n\t * - Or maybe just need to look into `shellwords` use here?\n\t * (Full disclosure, I didn't set it up, so am not familiar.\n\t * it seems like it could be part of some solution?)\n\t *\n\t * ref: https://github.com/jimmycuadra/shellwords (really light on docs)\n\t * ref: https://ruby-doc.org/stdlib-1.9.3/libdoc/shellwords/rdoc/Shellwords.html\n\t * (ruby module of same name, seems to have better docs)\n\t *\n\t * Related task:\n\t * https://app.asana.com/0/1100423001970639/1199504357822173/f\n\t *\n\t */\n\tconst firstLine = lines[0]\n\tconst isMultiLineCommand =\n\t\tfirstLine.endsWith('\\\\') || firstLine.endsWith('EOF')\n\tif (isMultiLineCommand) {\n\t\t/**\n\t\t * If this is a multi-line snippet, return it formatted with\n\t\t * shellwords escape & split\n\t\t */\n\t\tconst multiLineFmt = escape(snippet).replace('\\\\$\\\\', '')\n\t\treturn split(multiLineFmt).join(' ')\n\t}\n\t/**\n\t * Otherwise, we return only lines of the shell snippet that start with `$`.\n\t * We remove the `$ ` at the start of each line.\n\t * We lines that don't start with `$ ` - these are assumed to be output lines.\n\t */\n\tconst commandRegex = /^\\$ /\n\treturn lines\n\t\t.filter((line) => line.match(commandRegex))\n\t\t.map((line) => line.replace(commandRegex, ''))\n\t\t.join('\\n')\n}\n\nexport default processSnippet\n","'use client'\n\nimport { useId, useRef, type ReactNode } from 'react'\nimport classNames from 'classnames'\nimport { Text } from '../text'\nimport { CodeLines } from './code-lines'\nimport { HiddenCopyContent } from './hidden-copy-content'\nimport processSnippet from './utils/process-snippet'\nimport { CopyButton } from '../../patterns/copy-button'\nimport s from './code-block.module.scss'\n\n/**\n * ALERT: This component is a combination of logic from the official HashiCorp\n * Design System CodeBlock component and the CodeBlock component written by the\n * Web Presence Team. The official component relies on client-side rendering\n * for the calculation of line-heights for line numbers, but this is something\n * we want to be able to achieve without client-side rendering.\n */\n\ninterface CodeBlockProps {\n\t/**\n\t * The text/code content for the CodeBlock. The component encodes this\n\t * argument before displaying it. Should be a pre-highlighted string\n\t * generated by Prism.js or Shiki.\n\t */\n\tvalue: ReactNode\n\n\t/**\n\t * The coding language to use for syntax highlighting. If you need\n\t * additional languages contact the Design Systems Team.\n\t */\n\tlanguage?: string\n\n\t/**\n\t * Applies rounded borders to the component. When used within another\n\t * component or when the context requires it, you can turn it off.\n\t */\n\tisStandalone?: boolean\n\n\t/**\n\t * Used to control whether a copy button for copying the code/text content\n\t * will be displayed.\n\t */\n\thasCopyButton?: boolean\n\n\t/**\n\t * Used to control display of line numbers.\n\t */\n\thasLineNumbers?: boolean\n\n\t/**\n\t * Accepts a list or range of line numbers to highlight.\n\t * (Examples: `2, 4`,`6-10`)\n\t */\n\thighlightLines?: string\n\n\t/**\n\t * Accepts any valid CSS unit. If the CodeBlock content exceeds the maximum\n\t * height a vertical scrollbar is enabled. This value applies to the code\n\t * content only and does not include the header element (title and/or description).\n\t */\n\tmaxHeight?: string\n\ttitle?: ReactNode\n\tdescription?: ReactNode\n\tclassName?: string\n}\n\nconst CodeBlock = ({\n\ttitle,\n\tdescription,\n\tlanguage,\n\tvalue,\n\tisStandalone = true,\n\thasCopyButton,\n\thasLineNumbers = true,\n\thighlightLines,\n\tmaxHeight = 'auto',\n\tclassName,\n}: CodeBlockProps) => {\n\tconst copyRef = useRef<HTMLPreElement>(null)\n\tconst preCodeId = useId()\n\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(\n\t\t\t\ts['code-block'],\n\t\t\t\ts.dark,\n\t\t\t\t{\n\t\t\t\t\t[s[`language-${language}`]]: language,\n\t\t\t\t\t[s['is-standalone']]: isStandalone,\n\t\t\t\t\t[s['line-numbers']]: hasLineNumbers,\n\t\t\t\t},\n\t\t\t\tclassName\n\t\t\t)}\n\t\t>\n\t\t\t<div className={s.header}>\n\t\t\t\t{title && (\n\t\t\t\t\t<Text.HDSBody\n\t\t\t\t\t\tsize=\"200\"\n\t\t\t\t\t\ttag=\"p\"\n\t\t\t\t\t\tweight=\"semibold\"\n\t\t\t\t\t\tclassName={s.title}\n\t\t\t\t\t>\n\t\t\t\t\t\t{title}\n\t\t\t\t\t</Text.HDSBody>\n\t\t\t\t)}\n\t\t\t\t{description && (\n\t\t\t\t\t<Text.HDSBody tag=\"p\" size=\"100\" className={s.description}>\n\t\t\t\t\t\t{description}\n\t\t\t\t\t</Text.HDSBody>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t<div className={s.body}>\n\t\t\t\t{/**\n\t\t\t\t * NOTE: ideally we'd keep the markup of this component in lockstep\n\t\t\t\t * with the markup of the Helios code block. However, we also need\n\t\t\t\t * to support \"clever\" copying of snippets, parsing out shell\n\t\t\t\t * prompt characters like `$` from output, as this is a common\n\t\t\t\t * practice in our tutorial and documentation content. So, this\n\t\t\t\t * HiddenCopyContent component is one divergence from the markup\n\t\t\t\t * of the Helios code block.\n\t\t\t\t */}\n\t\t\t\t<HiddenCopyContent code={value} ref={copyRef} />\n\t\t\t\t<pre className={s.code} id={preCodeId} style={{ maxHeight }}>\n\t\t\t\t\t<code>\n\t\t\t\t\t\t<CodeLines\n\t\t\t\t\t\t\tvalue={value}\n\t\t\t\t\t\t\thighlightLines={highlightLines}\n\t\t\t\t\t\t\thasLineNumbers={hasLineNumbers}\n\t\t\t\t\t\t/>\n\t\t\t\t\t</code>\n\t\t\t\t</pre>\n\t\t\t\t{hasCopyButton && (\n\t\t\t\t\t<CopyButton\n\t\t\t\t\t\tclassName={s['copy-button']}\n\t\t\t\t\t\taria-describedby={preCodeId}\n\t\t\t\t\t\tgetTextFn={() => {\n\t\t\t\t\t\t\tconst rawSnippet = copyRef.current?.textContent\n\t\t\t\t\t\t\tif (!rawSnippet) {\n\t\t\t\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\t\t\t\"`code-block` - Couldn't find text content to copy.\"\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn processSnippet(rawSnippet)\n\t\t\t\t\t\t}}\n\t\t\t\t\t\ttext=\"Copy\"\n\t\t\t\t\t\tisIconOnly\n\t\t\t\t\t\tsize=\"small\"\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n\nCodeBlock.displayName = 'CodeBlock'\n\nexport type { CodeBlockProps }\nexport { CodeBlock }\n","'use client'\n\nimport classNames from 'classnames'\nimport { Badge } from '../../badge'\nimport { BadgeCount } from '../../badge-count'\nimport { Toggle } from '../../menu-primitive'\nimport { useMenuPrimitive } from '../../menu-primitive/use-menu-primitive'\nimport type { FlightIconName } from '../../flight-icon'\nimport { FlightIcon } from '../../flight-icon'\nimport type { ButtonHTMLAttributes } from 'react'\nimport s from './styles.module.scss'\n\ninterface DropdownToggleButtonProps\n\textends ButtonHTMLAttributes<HTMLButtonElement> {\n\t/**\n\t * Text of the ToggleButton. If no text value is defined, an error will be thrown.\n\t */\n\ttext: string\n\tcolor?: 'primary' | 'secondary'\n\tsize?: 'small' | 'medium'\n\ticon?: string\n\tisFullWidth?: boolean\n\t/**\n\t * Displays an optional count indicator using the Badge Count component.\n\t */\n\tcount?: string\n\t/**\n\t * Displays an optional badge indicator using the Badge component.\n\t */\n\tbadge?: string\n\t/**\n\t * Appends an icon to the optional badge indicator.\n\t */\n\tbadgeIcon?: FlightIconName\n}\n\nconst ToggleButton = ({\n\ttext,\n\tcolor = 'primary',\n\tsize = 'medium',\n\ticon,\n\tisFullWidth,\n\tcount,\n\tbadge,\n\tbadgeIcon,\n\tdisabled,\n\t...rest\n}: DropdownToggleButtonProps) => {\n\tconst { isOpen, onClickToggle } = useMenuPrimitive()\n\tconst badgeType = color === 'primary' || disabled ? 'filled' : 'inverted'\n\tconst iconSize = size === 'small' ? 12 : 16\n\n\treturn (\n\t\t<Toggle>\n\t\t\t<button\n\t\t\t\taria-expanded={isOpen}\n\t\t\t\ttype=\"button\"\n\t\t\t\tclassName={classNames(\n\t\t\t\t\ts['toggle-button'],\n\t\t\t\t\ts[`size-${size}`],\n\t\t\t\t\ts[`color-${color}`],\n\t\t\t\t\t{\n\t\t\t\t\t\t[s['width-full']]: isFullWidth,\n\t\t\t\t\t}\n\t\t\t\t)}\n\t\t\t\tonClick={onClickToggle}\n\t\t\t\tdisabled={disabled}\n\t\t\t\t{...rest}\n\t\t\t>\n\t\t\t\t{icon && <FlightIcon name={icon} size={iconSize} />}\n\t\t\t\t<div className={s.text}>{text}</div>\n\t\t\t\t{count && <BadgeCount text={count} size=\"small\" type={badgeType} />}\n\t\t\t\t{badge && (\n\t\t\t\t\t<Badge text={badge} icon={badgeIcon} size=\"small\" type={badgeType} />\n\t\t\t\t)}\n\t\t\t\t<Chevron />\n\t\t\t</button>\n\t\t</Toggle>\n\t)\n}\n\nToggleButton.displayName = 'Dropdown.ToggleButton'\n\nconst Chevron = () => {\n\treturn <FlightIcon name=\"chevron-down\" isInlineBlock={false} />\n}\n\nexport type { DropdownToggleButtonProps }\nexport { ToggleButton }\n","import classNames from 'classnames'\nimport { FlightIcon } from '../../flight-icon'\nimport { Interactive, type InteractiveProps } from '../../interactive'\nimport s from './styles.module.css'\n\ninterface ListItemInteractiveProps extends Omit<InteractiveProps, 'children'> {\n\t/**\n\t * Text to be used in the item. If no text value is defined, an error will be thrown.\n\t */\n\ttext: string\n\t/**\n\t * Color applied to the text and (optional) icons.\n\t */\n\tcolor?: 'action' | 'critical'\n\t/**\n\t * Leading icon. Acceptable value: any [icon](https://helios.hashicorp.design/icons/library) name.\n\t */\n\ticon?: string\n\t/**\n\t * Trailing icon. Acceptable value: any [icon](https://helios.hashicorp.design/icons/library) name.\n\t */\n\ttrailingIcon?: string\n\t/**\n\t * Controls if the item is in “loading” state. When in this state, the item is not actually interactive, but you can pass the other expected arguments for the item (they’re simply ignored).\n\t */\n\tisLoading?: boolean\n}\n\nconst ListItemInteractive = ({\n\ttext,\n\tcolor = 'action',\n\ticon,\n\tisLoading,\n\ttrailingIcon,\n\t...rest\n}: ListItemInteractiveProps) => {\n\treturn (\n\t\t<li\n\t\t\tclassName={classNames(s['list-item'], s.interactive, s[`color-${color}`])}\n\t\t>\n\t\t\t{isLoading ? (\n\t\t\t\t<div className={s['loading-wrapper']}>\n\t\t\t\t\t<FlightIcon\n\t\t\t\t\t\tname=\"loading\"\n\t\t\t\t\t\tclassName={classNames(s['interactive-icon'], s.leading)}\n\t\t\t\t\t/>\n\t\t\t\t\t<div className={classNames(s['interactive-text'], s['text-regular'])}>\n\t\t\t\t\t\t{text}\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<Interactive {...rest}>\n\t\t\t\t\t{icon && (\n\t\t\t\t\t\t<FlightIcon\n\t\t\t\t\t\t\tname={icon}\n\t\t\t\t\t\t\tclassName={classNames(s['interactive-icon'], s.leading)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t<div className={classNames(s['interactive-text'], s['text-large'])}>\n\t\t\t\t\t\t{text}\n\t\t\t\t\t</div>\n\t\t\t\t\t{trailingIcon && (\n\t\t\t\t\t\t<FlightIcon\n\t\t\t\t\t\t\tname={trailingIcon}\n\t\t\t\t\t\t\tclassName={classNames(s['interactive-icon'], s.trailing)}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t</Interactive>\n\t\t\t)}\n\t\t</li>\n\t)\n}\n\nListItemInteractive.displayName = 'Dropdown.ListItem.Interactive'\n\nexport type { ListItemInteractiveProps }\nexport { ListItemInteractive }\n","import type { HTMLAttributes } from 'react'\nimport classNames from 'classnames'\nimport s from './styles.module.css'\n\ninterface ListItemTitleProps\n\textends Omit<HTMLAttributes<HTMLLIElement>, 'className'> {\n\ttext: string\n}\n\nconst ListItemTitle = ({ text, ...rest }: ListItemTitleProps) => {\n\treturn (\n\t\t<li className={classNames(s['list-item'], s.title)} {...rest}>\n\t\t\t{text}\n\t\t</li>\n\t)\n}\n\nListItemTitle.displayName = 'Dropdown.ListItem.Title'\n\nexport type { ListItemTitleProps }\nexport { ListItemTitle }\n","import type { HTMLAttributes } from 'react'\nimport classNames from 'classnames'\nimport s from './styles.module.css'\n\ntype ListItemSeparatorProps = Omit<\n\tHTMLAttributes<HTMLLIElement>,\n\t'className' | 'aria-hidden' | 'role'\n>\n\nconst ListItemSeparator = (props: ListItemSeparatorProps) => {\n\treturn (\n\t\t<li\n\t\t\tclassName={classNames(s['list-item'], s.separator)}\n\t\t\taria-hidden=\"true\"\n\t\t\trole=\"separator\"\n\t\t\t{...props}\n\t\t></li>\n\t)\n}\n\nListItemSeparator.displayName = 'Dropdown.ListItem.Separator'\n\nexport type { ListItemSeparatorProps }\nexport { ListItemSeparator }\n","import classNames from 'classnames'\nimport type { ReactNode } from 'react'\nimport s from './styles.module.css'\n\ninterface ListItemCustomProps {\n\tchildren: ReactNode\n}\n\nconst ListItemCustom = ({ children }: ListItemCustomProps) => {\n\treturn <li className={classNames(s['list-item'], s.custom)}>{children}</li>\n}\n\nListItemCustom.displayName = 'Dropdown.ListItem.Custom'\n\nexport type { ListItemCustomProps }\nexport { ListItemCustom }\n","import { ListItemInteractive } from './interactive'\nimport { ListItemTitle } from './title'\nimport { ListItemSeparator } from './separator'\nimport { ListItemCustom } from './custom'\n\nconst ListItem = {\n\tInteractive: ListItemInteractive,\n\tTitle: ListItemTitle,\n\tSeparator: ListItemSeparator,\n\tCustom: ListItemCustom,\n}\n\nexport { ListItem }\n","import classNames from 'classnames'\nimport * as MenuPrimitive from '../menu-primitive'\nimport { ToggleButton } from './toggle-button'\nimport type { DropdownToggleButtonProps } from './toggle-button'\nimport { ListItem } from './list-item'\nimport type { HTMLAttributes, ReactNode } from 'react'\nimport s from './styles.module.css'\n\ninterface DropdownProps extends HTMLAttributes<HTMLDivElement> {\n\t/**\n\t * If true, container is given full width styles. (Added by web presence team)\n\t */\n\tisFullWidth?: boolean\n\t/**\n\t * Callback function invoked when the Dropdown is closed, if provided.\n\t */\n\tonClose?: () => void\n}\n\nconst Root = ({\n\tisFullWidth,\n\tonClose,\n\tchildren,\n\tclassName,\n\t...rest\n}: DropdownProps) => {\n\treturn (\n\t\t<MenuPrimitive.Provider\n\t\t\tclassName={classNames(\n\t\t\t\t{\n\t\t\t\t\t[s['width-full']]: isFullWidth,\n\t\t\t\t},\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\tonClose={onClose}\n\t\t\tisFullWidth={isFullWidth}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{children}\n\t\t</MenuPrimitive.Provider>\n\t)\n}\n\ninterface DropdownContentProps {\n\tlistPosition?:\n\t\t| 'right'\n\t\t| 'left'\n\t\t| 'bottom-left'\n\t\t| 'bottom-right'\n\t\t| 'top-left'\n\t\t| 'top-right'\n\twidth?: `${number}px` | `${number}em` | `${number}%`\n\t/**\n\t * If a height prop is provided then the list will have a fixed height.\n\t */\n\theight?: `${number}px` | `${number}em`\n\tchildren: ReactNode\n}\n\nconst Content = ({\n\tlistPosition = 'bottom-right',\n\twidth,\n\theight,\n\tchildren,\n}: DropdownContentProps) => {\n\treturn (\n\t\t<MenuPrimitive.Content>\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\ts.content,\n\t\t\t\t\ts[`content-position-${listPosition}`],\n\t\t\t\t\t{ [s['content-fixed-width']]: !!width }\n\t\t\t\t)}\n\t\t\t\tstyle={{ width, height }}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</MenuPrimitive.Content>\n\t)\n}\n\nconst List = ({ children }: { children: ReactNode }) => {\n\treturn <ul className={s.list}>{children}</ul>\n}\n\ninterface DropdownHeaderFooterProps extends HTMLAttributes<HTMLDivElement> {\n\thasDivider?: boolean\n}\n\nconst Header = ({\n\thasDivider,\n\tchildren,\n\t...rest\n}: DropdownHeaderFooterProps) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(s.header, {\n\t\t\t\t[s['header-with-divider']]: hasDivider,\n\t\t\t})}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t)\n}\n\nconst Footer = ({\n\thasDivider,\n\tchildren,\n\t...rest\n}: DropdownHeaderFooterProps) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(s.footer, {\n\t\t\t\t[s['footer-with-divider']]: hasDivider,\n\t\t\t})}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t)\n}\n\nRoot.displayName = 'Dropdown.Root'\nContent.displayName = 'Dropdown.Content'\nList.displayName = 'Dropdown.List'\nHeader.displayName = 'Dropdown.Header'\nFooter.displayName = 'Dropdown.Footer'\n\nconst Dropdown = { Root, ToggleButton, Content, List, Header, Footer, ListItem }\n\nexport type {\n\tDropdownProps,\n\tDropdownContentProps,\n\tDropdownHeaderFooterProps,\n\tDropdownToggleButtonProps,\n}\nexport { Dropdown }\n","import type { SupportedLocale } from '../types'\n\nexport const DEFAULT_LOCALE = 'en'\n\nexport const LOCALE_LANGUAGE_MAP = {\n\ten: 'English',\n\tfr: 'Français',\n\tde: 'Deutsch',\n\tja: '日本語',\n\tko: '한국어',\n\tpt: 'Português',\n\tes: 'Español',\n\tid: 'Bahasa Indonesia',\n}\n\nexport const SUPPORTED_LOCALES = Object.keys(\n\tLOCALE_LANGUAGE_MAP\n) as SupportedLocale[]\n\nexport const smallWordsByLocale: Record<SupportedLocale, Set<string>> = {\n\ten: new Set([\n\t\t'a',\n\t\t'an',\n\t\t'and',\n\t\t'as',\n\t\t'at',\n\t\t'but',\n\t\t'by',\n\t\t'for',\n\t\t'in',\n\t\t'nor',\n\t\t'of',\n\t\t'on',\n\t\t'or',\n\t\t'so',\n\t\t'the',\n\t\t'to',\n\t\t'up',\n\t\t'yet',\n\t]),\n\tde: new Set(), // Capitalization rules in German don't suppress small words.\n\tes: new Set([\n\t\t'el',\n\t\t'la',\n\t\t'los',\n\t\t'las',\n\t\t'un',\n\t\t'una',\n\t\t'unos',\n\t\t'unas',\n\t\t'y',\n\t\t'o',\n\t\t'pero',\n\t\t'de',\n\t\t'del',\n\t\t'al',\n\t\t'en',\n\t\t'por',\n\t\t'para',\n\t\t'con',\n\t]),\n\tfr: new Set([\n\t\t'le',\n\t\t'la',\n\t\t'les',\n\t\t'un',\n\t\t'une',\n\t\t'et',\n\t\t'de',\n\t\t'du',\n\t\t'des',\n\t\t'en',\n\t\t'à',\n\t\t'au',\n\t\t'aux',\n\t\t'pour',\n\t\t'avec',\n\t]),\n\tja: new Set(), // Japanese doesn't use title casing; characters are not case-sensitive\n\tko: new Set(), // Korean doesn't use casing\n\tpt: new Set([\n\t\t'o',\n\t\t'a',\n\t\t'os',\n\t\t'as',\n\t\t'um',\n\t\t'uma',\n\t\t'uns',\n\t\t'umas',\n\t\t'e',\n\t\t'ou',\n\t\t'mas',\n\t\t'de',\n\t\t'do',\n\t\t'da',\n\t\t'dos',\n\t\t'das',\n\t\t'em',\n\t\t'no',\n\t\t'na',\n\t\t'nos',\n\t\t'nas',\n\t\t'por',\n\t\t'para',\n\t\t'com',\n\t]),\n\tid: new Set(), // ! TODO Determine Indonesian's small word rules, and apply them here\n}\n","'use client'\n\nimport { createContext, type PropsWithChildren } from 'react'\nimport type { SupportedLocale } from '../types'\nimport { isSupportedLocale } from './is-supported-locale'\nimport { DEFAULT_LOCALE } from '../constants'\n\nfunction resolveLocale(input: string): SupportedLocale {\n\treturn isSupportedLocale(input) ? input : DEFAULT_LOCALE\n}\n\ntype LocaleContextValue = {\n\tlocale: SupportedLocale\n}\n\ninterface LocaleProviderProps extends PropsWithChildren {\n\t/**\n\t * Supported locales can be found in `SUPPORTED_LOCALES`.\n\t */\n\tlocale: string\n}\n\nexport const LocaleContext = createContext<LocaleContextValue | undefined>(\n\tundefined\n)\n\nexport const LocaleProvider = ({ locale, children }: LocaleProviderProps) => {\n\tconst resolvedLocale = resolveLocale(locale)\n\n\treturn (\n\t\t<LocaleContext.Provider value={{ locale: resolvedLocale }}>\n\t\t\t{children}\n\t\t</LocaleContext.Provider>\n\t)\n}\n","import type { SupportedLocale } from '../types'\n\nexport function toSmartSentenceCase(\n\ttext: string,\n\tlocale: SupportedLocale\n): string {\n\t// Skip transformation for non-cased languages\n\tif (locale === 'ja' || locale === 'ko') {\n\t\treturn text\n\t}\n\n\tconst match = text.match(/^(\\s*[\\p{P}\\p{Zs}]*)?(\\p{L})(.*)$/u)\n\n\tif (!match) return text // fallback if no match\n\n\tconst [, leading, firstChar, rest] = match\n\n\treturn (\n\t\t(leading ?? '') +\n\t\tfirstChar.toLocaleUpperCase(locale) +\n\t\trest.toLocaleLowerCase(locale)\n\t)\n}\n","import { smallWordsByLocale } from '../constants'\nimport { type SupportedLocale } from '../types'\n\nexport function toSmartTitleCase(\n\ttext: string,\n\tlocale: SupportedLocale\n): string {\n\tconst smallWords = smallWordsByLocale[locale]\n\tconst segments = text.toLocaleLowerCase(locale).split(/([\\s\\-:,.]+)/)\n\n\tlet capitalizeNext = true\n\n\treturn segments\n\t\t.map((segment) => {\n\t\t\tif (/^[\\s\\-:,.]+$/.test(segment)) {\n\t\t\t\t// If punctuation ends a sentence-like clause, capitalize the next word\n\t\t\t\tif (/[:.!?]\\s*$/.test(segment)) {\n\t\t\t\t\tcapitalizeNext = true\n\t\t\t\t}\n\t\t\t\treturn segment\n\t\t\t}\n\n\t\t\t// For non-cased languages (ja, ko), return as-is\n\t\t\tif (!segment.charAt(0).toLocaleUpperCase) return segment\n\n\t\t\tif (capitalizeNext || !smallWords.has(segment)) {\n\t\t\t\tcapitalizeNext = false\n\t\t\t\treturn segment.charAt(0).toLocaleUpperCase(locale) + segment.slice(1)\n\t\t\t} else {\n\t\t\t\treturn segment\n\t\t\t}\n\t\t})\n\t\t.join('')\n}\n","import { useContext } from 'react'\nimport { DEFAULT_LOCALE } from '../constants'\nimport { LocaleContext } from './locale-provider'\nimport type { SupportedLocale } from '../types'\n\nlet hasWarned = false\n\nexport function useLocale(): SupportedLocale {\n\tconst locale = useContext(LocaleContext)?.locale\n\n\tif (!locale && typeof window !== 'undefined' && !hasWarned) {\n\t\thasWarned = true\n\t\tconsole.warn(\n\t\t\t`[@web/utils] No <LocaleProvider> found. Defaulting to \"${DEFAULT_LOCALE}\".`\n\t\t)\n\t}\n\n\treturn locale || DEFAULT_LOCALE\n}\n","import { toSmartSentenceCase, toSmartTitleCase } from './helpers'\nimport type { SupportedLocale } from './types'\n\ntype Capitalization = 'none' | 'lower' | 'sentence' | 'title' | 'upper'\n\ntype DotPrefix<T extends string, U extends string> = `${T}.${U}`\n\ntype NestedKeyOf<ObjectType extends object> = {\n\t[K in keyof ObjectType & string]: ObjectType[K] extends object\n\t\t? DotPrefix<K, NestedKeyOf<ObjectType[K]>>\n\t\t: K\n}[keyof ObjectType & string]\n\nfunction getByDotPath<T extends object, P extends string>(\n\tobj: T,\n\tpath: P\n): unknown {\n\treturn path.split('.').reduce((acc: unknown, part) => {\n\t\tif (typeof acc === 'object' && acc !== null && part in acc) {\n\t\t\treturn (acc as Record<string, unknown>)[part]\n\t\t}\n\t\treturn undefined\n\t}, obj)\n}\n\nexport function createLocalize<Messages extends Record<string, unknown>>(\n\tlocalizations: Record<SupportedLocale, Messages>,\n\tfallbackLocale: SupportedLocale = 'en'\n) {\n\ttype Key = NestedKeyOf<Messages>\n\n\treturn function translate(\n\t\tkey: Key,\n\t\tlocale: SupportedLocale,\n\t\tcapitalization?: Capitalization\n\t): string {\n\t\tconst word =\n\t\t\tgetByDotPath(localizations[locale], key) ??\n\t\t\tgetByDotPath(localizations[fallbackLocale], key)\n\n\t\tif (typeof word !== 'string') return ''\n\n\t\tswitch (capitalization) {\n\t\t\tcase 'title':\n\t\t\t\treturn toSmartTitleCase(word, locale)\n\t\t\tcase 'sentence':\n\t\t\t\treturn toSmartSentenceCase(word, locale)\n\t\t\tcase 'upper':\n\t\t\t\treturn word.toLocaleUpperCase(locale)\n\t\t\tcase 'lower':\n\t\t\t\treturn word.toLocaleLowerCase(locale)\n\t\t\tcase 'none':\n\t\t\tdefault:\n\t\t\t\treturn word\n\t\t}\n\t}\n}\n","import { createLocalize } from '@web/utils/i18n'\n\nexport const localize = createLocalize({\n\tde: {\n\t\toptional: 'optional', // \"optional\" is the same in German\n\t\trequired: 'erforderlich',\n\t},\n\ten: {\n\t\toptional: 'optional',\n\t\trequired: 'required',\n\t},\n\tes: {\n\t\toptional: 'opcional',\n\t\trequired: 'obligatorio',\n\t},\n\tfr: {\n\t\toptional: 'facultatif',\n\t\trequired: 'obligatoire',\n\t},\n\tid: {\n\t\t// ! TODO Translate text to Indonesian\n\t\toptional: 'optional',\n\t\trequired: 'required',\n\t},\n\tja: {\n\t\toptional: '任意',\n\t\trequired: '必須',\n\t},\n\tko: {\n\t\toptional: '선택 사항',\n\t\trequired: '필수',\n\t},\n\tpt: {\n\t\toptional: 'opcional',\n\t\trequired: 'obrigatório',\n\t},\n})\n","import { Badge } from '../../badge'\nimport { localize } from '../../../utils/i18n'\nimport { useLocale } from '@web/utils/i18n/helpers'\nimport s from './form-indicator.module.css'\n\ninterface IndicatorProps {\n\tisOptional?: boolean\n\tisRequired?: boolean\n}\n\nconst Indicator = ({ isOptional, isRequired }: IndicatorProps) => {\n\tconst locale = useLocale()\n\n\tconst className = isOptional ? s.optional : null\n\n\tif (isOptional) {\n\t\treturn (\n\t\t\t<span aria-hidden=\"true\" className={className}>\n\t\t\t\t{`(${localize('optional', locale, 'title')})`}\n\t\t\t</span>\n\t\t)\n\t} else if (isRequired) {\n\t\treturn (\n\t\t\t<Badge\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\tclassName={className}\n\t\t\t\tsize=\"small\"\n\t\t\t\ttext={localize('required', locale, 'title')}\n\t\t\t/>\n\t\t)\n\t}\n\n\treturn null\n}\n\nIndicator.displayName = 'Indicator'\n\nexport { Indicator }\n","import classNames from 'classnames'\nimport { Indicator } from '../indicator'\nimport { Badge } from '../../badge'\nimport type { ReactNode } from 'react'\nimport s from './form-label.module.css'\n\ninterface LabelProps {\n\tbadgeText?: string\n\tclassName?: string\n\tcontrolId: string\n\tchildren: ReactNode\n\tisRequired?: boolean\n\tisOptional?: boolean\n}\n\nconst Label = ({\n\tbadgeText,\n\tclassName,\n\tcontrolId,\n\tchildren,\n\tisRequired,\n\tisOptional,\n\t...rest\n}: LabelProps) => {\n\treturn (\n\t\t<label\n\t\t\tclassName={classNames(s.label, className)}\n\t\t\thtmlFor={controlId}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<span>{children}</span>\n\t\t\t{isOptional || isRequired || badgeText ? (\n\t\t\t\t<span className={s.badges}>\n\t\t\t\t\t{badgeText ? <Badge size=\"small\" text={badgeText} /> : null}\n\t\t\t\t\t<Indicator isRequired={isRequired} isOptional={isOptional} />\n\t\t\t\t</span>\n\t\t\t) : null}\n\t\t</label>\n\t)\n}\n\nLabel.displayName = 'Label'\n\nexport { Label }\n","import classNames from 'classnames'\nimport type { ReactNode } from 'react'\nimport s from './form-helper-text.module.css'\n\ninterface HelperTextProps {\n\tchildren: ReactNode\n\tclassName?: string\n\tcontrolId?: string\n}\n\nconst HelperText = ({\n\tchildren,\n\tclassName,\n\tcontrolId,\n\t...rest\n}: HelperTextProps) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(s['helper-text'], className)}\n\t\t\tid={controlId ? `helper-text-${controlId}` : undefined}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t)\n}\n\nHelperText.displayName = 'HelperText'\n\nexport { HelperText }\n","import classNames from 'classnames'\nimport type { ReactNode } from 'react'\nimport { IconAlertDiamondFill16 } from '@hashicorp/flight-icons/svg-react/alert-diamond-fill-16'\nimport s from './form-error.module.css'\n\ninterface ErrorMessageProps {\n\tchildren: ReactNode\n}\n\nconst ErrorMessage = ({ children, ...rest }: ErrorMessageProps) => {\n\treturn (\n\t\t<p className={s.message} {...rest}>\n\t\t\t{children}\n\t\t</p>\n\t)\n}\n\ninterface ErrorProps {\n\tchildren: ReactNode\n\tclassName?: string\n\tcontrolId?: string\n}\n\nconst Error = ({ children, className, controlId, ...rest }: ErrorProps) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames(s.error, className)}\n\t\t\tid={controlId ? `error-${controlId}` : undefined}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<IconAlertDiamondFill16 className={s.icon} />\n\t\t\t<div className={s.content}>\n\t\t\t\t<ErrorMessage>{children}</ErrorMessage>\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n\nError.displayName = 'Error'\n\nexport type { ErrorProps, ErrorMessageProps }\nexport { Error, ErrorMessage }\n","import classNames from 'classnames'\nimport { Label } from '../label'\nimport { HelperText } from '../helper-text'\nimport { Error } from '../error'\nimport type { ReactNode } from 'react'\nimport s from './form-field.module.css'\n\ninterface FieldProps {\n\tbadgeText?: string\n\tid: string\n\tisRequired?: boolean\n\tisOptional?: boolean\n\tlabel?: ReactNode\n\thelperText?: ReactNode\n\terror?: ReactNode\n\tclassName?: string\n\tlayout?: 'vertical' | 'flag'\n\tchildren: ReactNode\n}\n\nconst Field = ({\n\tbadgeText,\n\tid,\n\tisRequired,\n\tisOptional,\n\tlabel,\n\thelperText,\n\terror,\n\tclassName,\n\tlayout,\n\tchildren,\n\t...rest\n}: FieldProps) => {\n\treturn (\n\t\t<div\n\t\t\tclassName={classNames({ [s[`${layout}`]]: layout }, className)}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{label && (\n\t\t\t\t<Label\n\t\t\t\t\tbadgeText={badgeText}\n\t\t\t\t\tcontrolId={id}\n\t\t\t\t\tisOptional={isOptional}\n\t\t\t\t\tisRequired={isRequired}\n\t\t\t\t\tclassName={s.label}\n\t\t\t\t>\n\t\t\t\t\t{label}\n\t\t\t\t</Label>\n\t\t\t)}\n\t\t\t{helperText && (\n\t\t\t\t<HelperText controlId={id} className={s['helper-text']}>\n\t\t\t\t\t{helperText}\n\t\t\t\t</HelperText>\n\t\t\t)}\n\t\t\t<div className={s.control}>{children}</div>\n\t\t\t{error && (\n\t\t\t\t<Error controlId={id} className={s.error}>\n\t\t\t\t\t{error}\n\t\t\t\t</Error>\n\t\t\t)}\n\t\t</div>\n\t)\n}\n\nField.displayName = 'Field'\n\nexport type { FieldProps }\nexport { Field }\n","import type { ReactNode } from 'react'\nimport classNames from 'classnames'\nimport { Indicator } from '../indicator'\nimport s from './form-legend.module.css'\n\ninterface LegendProps {\n\tclassName?: string\n\tisRequired?: boolean\n\tisOptional?: boolean\n\tchildren: ReactNode\n}\n\nconst Legend = ({\n\tclassName,\n\tisRequired,\n\tisOptional,\n\tchildren,\n\t...rest\n}: LegendProps) => {\n\treturn (\n\t\t<legend className={classNames(s.legend, className)} {...rest}>\n\t\t\t<span>{children}</span>\n\t\t\t{isOptional || isRequired ? (\n\t\t\t\t<span className={s.badge}>\n\t\t\t\t\t<Indicator isRequired={isRequired} isOptional={isOptional} />\n\t\t\t\t</span>\n\t\t\t) : null}\n\t\t</legend>\n\t)\n}\n\nLegend.displayName = 'Legend'\n\nexport { Legend }\n","import classNames from 'classnames'\nimport { useId } from 'react'\nimport { Legend } from '../legend'\nimport { HelperText } from '../helper-text'\nimport { Error } from '../error'\nimport type { ReactNode } from 'react'\nimport s from './form-fieldset.module.css'\n\ninterface FieldsetProps {\n\tisRequired?: boolean\n\tisOptional?: boolean\n\tlegend?: ReactNode\n\thelperText?: ReactNode\n\terror?: ReactNode\n\tclassName?: string\n\tlayout?: 'vertical' | 'horizontal'\n\tchildren: ReactNode\n\tid?: string\n\ttestingKey?: string\n}\n\nconst Fieldset = ({\n\tisRequired,\n\tisOptional,\n\tlegend,\n\thelperText,\n\terror,\n\tclassName,\n\tlayout,\n\tchildren,\n\tid,\n\ttestingKey,\n\t...rest\n}: FieldsetProps) => {\n\tconst generatedId = useId()\n\tconst fieldsetId = id ?? generatedId\n\n\treturn (\n\t\t<fieldset\n\t\t\tclassName={classNames(s.group, layout ? s[layout] : null, className)}\n\t\t\tid={fieldsetId}\n\t\t\tdata-testid={testingKey}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{legend && (\n\t\t\t\t<Legend\n\t\t\t\t\tisOptional={isOptional}\n\t\t\t\t\tisRequired={isRequired}\n\t\t\t\t\tclassName={s.legend}\n\t\t\t\t>\n\t\t\t\t\t{legend}\n\t\t\t\t</Legend>\n\t\t\t)}\n\t\t\t{helperText && (\n\t\t\t\t<HelperText\n\t\t\t\t\tcontrolId={`${fieldsetId}-help`}\n\t\t\t\t\tclassName={s['helper-text']}\n\t\t\t\t>\n\t\t\t\t\t{helperText}\n\t\t\t\t</HelperText>\n\t\t\t)}\n\t\t\t<div\n\t\t\t\tclassName={classNames(s['control-fields-wrapper'], {\n\t\t\t\t\t[s['has-legend']]: legend,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t\t{error && (\n\t\t\t\t<Error controlId={`${fieldsetId}-error`} className={s.error}>\n\t\t\t\t\t{error}\n\t\t\t\t</Error>\n\t\t\t)}\n\t\t</fieldset>\n\t)\n}\n\nFieldset.displayName = 'Fieldset'\n\nexport type { FieldsetProps }\nexport { Fieldset }\n","'use client'\n\nimport {\n\tuseId,\n\ttype ComponentProps,\n\ttype HTMLProps,\n\ttype ReactNode,\n} from 'react'\nimport { Field } from '../field'\nimport { Fieldset } from '../fieldset'\nimport s from './form-checkbox.module.css'\n\ninterface CheckboxBaseProps {\n\tid?: string\n\trequired?: boolean\n\tfield: HTMLProps<HTMLInputElement>\n\ttestingKey?: string\n\terror?: ReactNode\n}\n\nconst CheckboxBase = ({\n\tid,\n\trequired,\n\tfield,\n\ttestingKey,\n\terror,\n}: CheckboxBaseProps) => {\n\tconst generatedId = useId()\n\tconst inputId = id ?? generatedId\n\n\treturn (\n\t\t<input\n\t\t\tid={inputId}\n\t\t\ttype=\"checkbox\"\n\t\t\tclassName={s.checkbox}\n\t\t\trequired={required}\n\t\t\taria-describedby={`${error ? 'error' : 'helper-text'}-${id}`}\n\t\t\tdata-testid={testingKey}\n\t\t\t{...field}\n\t\t/>\n\t)\n}\n\nCheckboxBase.displayName = 'CheckboxBase'\n\ninterface CheckboxFieldProps {\n\tisInvalid?: boolean\n\tisLoading?: boolean\n\tisRequired?: boolean\n\tisOptional?: boolean\n\tid?: string\n\tlabel?: ReactNode\n\thelperText?: ReactNode\n\terror?: ReactNode\n\tfield: HTMLProps<HTMLInputElement>\n\tclassName?: string\n\ttestingKey?: string\n\tdisabled?: boolean\n}\n\nconst CheckboxField = ({\n\tisInvalid,\n\tisLoading,\n\tisRequired,\n\tisOptional,\n\tid,\n\tlabel,\n\thelperText,\n\terror,\n\tfield,\n\tclassName,\n\ttestingKey,\n\t...rest\n}: CheckboxFieldProps) => {\n\tconst generatedId = useId()\n\tconst inputId = id ?? generatedId\n\n\treturn (\n\t\t<Field\n\t\t\tlabel={label}\n\t\t\thelperText={helperText}\n\t\t\terror={error}\n\t\t\tisRequired={isRequired}\n\t\t\tisOptional={isOptional}\n\t\t\tid={inputId}\n\t\t\tlayout=\"flag\"\n\t\t\tclassName={className}\n\t\t>\n\t\t\t<CheckboxBase\n\t\t\t\tid={inputId}\n\t\t\t\trequired={isRequired}\n\t\t\t\tfield={field}\n\t\t\t\ttestingKey={testingKey}\n\t\t\t\terror={error}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t</Field>\n\t)\n}\n\nCheckboxField.displayName = 'CheckboxField'\n\ninterface CheckboxGroupRootProps extends ComponentProps<typeof Fieldset> {\n\tchildren: ReactNode\n}\n\nconst CheckboxGroupRoot = ({\n\tlayout = 'vertical',\n\tlegend,\n\thelperText,\n\terror,\n\tisOptional,\n\tisRequired,\n\tchildren,\n}: CheckboxGroupRootProps) => {\n\treturn (\n\t\t<Fieldset\n\t\t\tlayout={layout}\n\t\t\tlegend={legend}\n\t\t\thelperText={helperText}\n\t\t\terror={error}\n\t\t\tisOptional={isOptional}\n\t\t\tisRequired={isRequired}\n\t\t>\n\t\t\t{children}\n\t\t</Fieldset>\n\t)\n}\n\nCheckboxGroupRoot.displayName = 'CheckboxGroupRoot'\n\nconst CheckboxGroupInner = (props: CheckboxFieldProps) => {\n\treturn (\n\t\t<CheckboxField\n\t\t\tclassName={props.className}\n\t\t\ttestingKey={props.testingKey}\n\t\t\t{...props}\n\t\t/>\n\t)\n}\n\nCheckboxGroupInner.displayName = 'CheckboxGroupInner'\n\nconst CheckboxGroup = {\n\tRoot: CheckboxGroupRoot,\n\tInner: CheckboxGroupInner,\n}\n\nexport { CheckboxGroup, CheckboxBase, CheckboxField }\n","import type { HTMLProps, ReactNode } from 'react'\nimport { useId } from 'react'\nimport { Field } from '../field'\nimport s from './form-file-input.module.scss'\n\ninterface FileInputBaseProps {\n\tisRequired?: boolean\n\tclassName?: string\n\tid?: string\n\n\t/**\n\t * Can be used to supply any props that the native `<input>` element supports.\n\t * Since this is for file input, we omit `type`, see here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file\n\t */\n\tfield: Omit<HTMLProps<HTMLInputElement>, 'type' | 'id'>\n\terror?: ReactNode\n}\n\nconst FileInputBase = ({\n\tisRequired,\n\tclassName,\n\tid,\n\tfield,\n\terror,\n\t...rest\n}: FileInputBaseProps) => {\n\tconst generatedId = useId()\n\tconst inputId = id ?? generatedId\n\n\treturn (\n\t\t<input\n\t\t\ttype=\"file\"\n\t\t\trequired={isRequired}\n\t\t\tid={inputId}\n\t\t\tclassName={s['file-input']}\n\t\t\taria-describedby={`${error ? 'error' : 'helper-text'}-${id}`}\n\t\t\t{...field}\n\t\t\t{...rest}\n\t\t/>\n\t)\n}\n\nFileInputBase.displayName = 'FileInputBase'\n\ninterface FileInputFieldProps extends FileInputBaseProps {\n\tlabel?: ReactNode\n\thelperText?: ReactNode\n\terror?: ReactNode\n\tisOptional?: boolean\n}\n\nconst FileInputField = ({\n\tid,\n\tlabel,\n\thelperText,\n\terror,\n\tfield,\n\tclassName,\n\tisRequired,\n\tisOptional,\n\t...rest\n}: FileInputFieldProps) => {\n\tconst generatedId = useId()\n\tconst inputId = id ?? generatedId\n\n\treturn (\n\t\t<Field\n\t\t\tlabel={label}\n\t\t\thelperText={helperText}\n\t\t\terror={error}\n\t\t\tisRequired={isRequired}\n\t\t\tisOptional={isOptional}\n\t\t\tid={inputId}\n\t\t\tlayout=\"vertical\"\n\t\t\tclassName={className}\n\t\t>\n\t\t\t<FileInputBase\n\t\t\t\tid={inputId}\n\t\t\t\tisRequired={isRequired}\n\t\t\t\tfield={field}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t</Field>\n\t)\n}\n\nFileInputField.displayName = 'FileInputField'\n\nexport { FileInputBase, FileInputField }\n","import {\n\tuseId,\n\ttype ComponentProps,\n\ttype HTMLProps,\n\ttype ReactNode,\n} from 'react'\nimport { Field } from '../field'\nimport { Fieldset } from '../fieldset'\nimport classNames from 'classnames'\nimport s from './form-radio.module.scss'\n\ninterface RadioBaseProps {\n\tid: string\n\trequired?: boolean\n\tfield: HTMLProps<HTMLInputElement>\n\tclassName?: string\n\ttestingKey?: string\n}\n\nconst RadioBase = ({\n\tid,\n\trequired,\n\tfield,\n\tclassName,\n\ttestingKey,\n}: RadioBaseProps) => {\n\treturn (\n\t\t<input\n\t\t\tid={id}\n\t\t\ttype=\"radio\"\n\t\t\tclassName={classNames(s.radio, className)}\n\t\t\trequired={required}\n\t\t\tdata-testid={testingKey}\n\t\t\t{...field}\n\t\t/>\n\t)\n}\n\nRadioBase.displayName = 'RadioBase'\n\ninterface RadioFieldProps {\n\tisInvalid?: boolean\n\tisLoading?: boolean\n\tisRequired?: boolean\n\tisOptional?: boolean\n\tid?: string\n\tlabel?: ReactNode\n\thelperText?: ReactNode\n\terror?: ReactNode\n\tfield: HTMLProps<HTMLInputElement>\n\tclassName?: string\n\ttestingKey?: string\n}\n\nconst RadioField = ({\n\tisInvalid,\n\tisLoading,\n\tisRequired,\n\tisOptional,\n\tid,\n\tlabel,\n\thelperText,\n\terror,\n\tfield,\n\tclassName,\n\ttestingKey,\n\t...rest\n}: RadioFieldProps) => {\n\tconst generatedId = useId()\n\tconst inputId = id ?? generatedId\n\n\treturn (\n\t\t<Field\n\t\t\tlabel={label}\n\t\t\thelperText={helperText}\n\t\t\terror={error}\n\t\t\tisRequired={isRequired}\n\t\t\tisOptional={isOptional}\n\t\t\tid={inputId}\n\t\t\tlayout=\"flag\"\n\t\t\tclassName={className}\n\t\t>\n\t\t\t<RadioBase\n\t\t\t\tid={inputId}\n\t\t\t\trequired={isRequired}\n\t\t\t\tfield={{ ...field, 'aria-describedby': `error-${id}` }}\n\t\t\t\ttestingKey={testingKey}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t</Field>\n\t)\n}\n\nRadioField.displayName = 'RadioField'\n\ninterface RadioGroupProps extends ComponentProps<typeof Fieldset> {\n\tchildren: ReactNode\n}\n\nconst RadioGroupRoot = ({\n\tlayout = 'vertical',\n\tlegend,\n\tisOptional,\n\tisRequired,\n\tchildren,\n}: RadioGroupProps) => {\n\treturn (\n\t\t<Fieldset\n\t\t\tlayout={layout}\n\t\t\tlegend={legend}\n\t\t\tisOptional={isOptional}\n\t\t\tisRequired={isRequired}\n\t\t>\n\t\t\t{children}\n\t\t</Fieldset>\n\t)\n}\n\nRadioGroupRoot.displayName = 'RadioGroupRoot'\n\nconst RadioGroupField = (props: RadioFieldProps) => {\n\treturn (\n\t\t<RadioField\n\t\t\t{...props}\n\t\t\ttestingKey={props.testingKey}\n\t\t\tclassName={props.className}\n\t\t/>\n\t)\n}\n\nRadioGroupField.displayName = 'RadioGroupField'\n\nconst RadioGroup = {\n\tRoot: RadioGroupRoot,\n\tField: RadioGroupField,\n}\n\nexport { RadioGroup, RadioBase, RadioField }\n","import { Fieldset } from '../fieldset'\nimport type { ComponentProps, ReactNode } from 'react'\nimport s from './form-radio-card.module.css'\n\nexport interface RadioCardGroupProps extends ComponentProps<typeof Fieldset> {\n\tchildren: ReactNode\n\tlegend: ReactNode\n}\n\nconst RadioCardGroup = ({\n\tlayout = 'horizontal',\n\tisRequired,\n\tisOptional,\n\terror,\n\tlegend,\n\thelperText,\n\tchildren,\n\t...rest\n}: RadioCardGroupProps) => {\n\treturn (\n\t\t<Fieldset\n\t\t\tclassName={s['radio-cards']}\n\t\t\tlayout={layout}\n\t\t\tlegend={legend}\n\t\t\tisOptional={isOptional}\n\t\t\tisRequired={isRequired}\n\t\t\thelperText={helperText}\n\t\t\terror={error}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{children}\n\t\t</Fieldset>\n\t)\n}\n\nRadioCardGroup.displayName = 'RadioCardGroup'\n\nexport { RadioCardGroup }\n","import { Text } from '../../text'\nimport s from './form-radio-card.module.css'\n\nexport default function Label({ label }: { label: string }) {\n\treturn (\n\t\t<Text.DisplayExpressive className={s.label} size=\"200\" weight=\"bold\">\n\t\t\t{label}\n\t\t</Text.DisplayExpressive>\n\t)\n}\n","import { Text } from '../../text'\nimport s from './form-radio-card.module.css'\n\nexport default function Description({ description }: { description: string }) {\n\treturn (\n\t\t<Text.HDSBody className={s.description} size=\"100\">\n\t\t\t{description}\n\t\t</Text.HDSBody>\n\t)\n}\n","import classNames from 'classnames'\nimport { useId } from 'react'\nimport { Badge } from '../../badge'\nimport { FlightIcon } from '../../flight-icon'\nimport { RadioBase } from '../radio'\nimport { RadioCardGroup } from './group'\nimport Label from './label'\nimport Description from './description'\nimport type { HTMLProps, ReactNode } from 'react'\nimport type { BadgeProps } from '../../badge'\nimport s from './form-radio-card.module.css'\n\nexport const DEFAULT_CONTROL_POSITION = 'bottom'\nexport const DEFAULT_ALIGNMENT = 'left'\nexport const CONTROL_POSITIONS = ['bottom', 'left'] as const\nexport const ALIGNMENTS = ['left', 'center'] as const\n\ninterface RadioCardProps {\n\t/**\n\t * Sets the position of the form control in relation to the Radio Card content.\n\t */\n\tcontrolPosition?: (typeof CONTROL_POSITIONS)[number]\n\t/**\n\t * Sets the alignment of the Radio Card content.\n\t */\n\talignment?: (typeof ALIGNMENTS)[number]\n\t/**\n\t * any valid CSS width (%, vw, etc)\n\t * This parameter will set the width of the card, wrapping cards on multiple rows if necessary.\n\t * You can use it to define the number of Radio Cards shown per row (for example `25%`\n\t * will result in 4 cards).\n\t */\n\tmaxWidth?: `${number}px` | `${number}vw` | `${number}%`\n\t/**\n\t * Renders <Badge /> component.\n\t */\n\tbadges?: Array<BadgeProps>\n\t/**\n\t * The name of the flight icon to render.\n\t */\n\ticon?: string\n\t/**\n\t * The label text.\n\t */\n\tlabel?: string\n\t/**\n\t * The description text.\n\t */\n\tdescription?: string\n\t/*\n\t * Optional children rendered below the label and description (if provided).\n\t */\n\tchildren?: ReactNode\n\tfield: HTMLProps<HTMLInputElement>\n\tid?: string\n}\n\nconst RadioCard = ({\n\tcontrolPosition = DEFAULT_CONTROL_POSITION,\n\talignment = DEFAULT_ALIGNMENT,\n\tmaxWidth,\n\tfield,\n\ticon,\n\tlabel,\n\tdescription,\n\tbadges,\n\tchildren,\n}: RadioCardProps) => {\n\tconst generatedId = useId()\n\n\treturn (\n\t\t<label\n\t\t\thtmlFor={generatedId}\n\t\t\tstyle={{ maxWidth }}\n\t\t\tclassName={classNames(\n\t\t\t\ts['radio-card'],\n\t\t\t\ts[`control-${controlPosition}`],\n\t\t\t\ts[`align-${alignment}`],\n\t\t\t\t{\n\t\t\t\t\t[s['checked']]: field.checked,\n\t\t\t\t\t[s['disabled']]: field.disabled,\n\t\t\t\t\t[s['has-fixed-width']]: maxWidth,\n\t\t\t\t\t[s['has-fluid-width']]: !maxWidth,\n\t\t\t\t}\n\t\t\t)}\n\t\t>\n\t\t\t<span className={s['content']}>\n\t\t\t\t{icon && (\n\t\t\t\t\t<FlightIcon\n\t\t\t\t\t\tname={icon}\n\t\t\t\t\t\tsize={24}\n\t\t\t\t\t\tisInlineBlock={false}\n\t\t\t\t\t\tclassName={classNames({\n\t\t\t\t\t\t\t[s['icon-center']]: alignment === 'center',\n\t\t\t\t\t\t})}\n\t\t\t\t\t/>\n\t\t\t\t)}\n\t\t\t\t{label && <Label label={label} />}\n\t\t\t\t{badges?.length ? (\n\t\t\t\t\t<div className={s.badges}>\n\t\t\t\t\t\t{badges.map((badge) => (\n\t\t\t\t\t\t\t<Badge {...badge} key={badge.text} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</div>\n\t\t\t\t) : null}\n\t\t\t\t{description && <Description description={description} />}\n\t\t\t\t{children}\n\t\t\t</span>\n\t\t\t<span className={s['control-wrapper']}>\n\t\t\t\t<RadioBase className={s.control} id={generatedId} field={field} />\n\t\t\t</span>\n\t\t</label>\n\t)\n}\n\nRadioCard.displayName = 'RadioCard'\n\nexport { RadioCardGroup, RadioCard }\n","import classNames from 'classnames'\nimport type { HTMLProps, ReactNode } from 'react'\nimport { useId } from 'react'\nimport { Field } from '../field'\nimport s from './form-select.module.css'\n\ninterface SelectBaseProps {\n\tisInvalid?: boolean\n\tisLoading?: boolean\n\trequired?: boolean\n\tclassName?: string\n\tid: string\n\tfield: HTMLProps<HTMLSelectElement>\n\tchildren: ReactNode\n\tsize: 'medium' | 'large'\n\terror?: ReactNode\n\tdisabled?: boolean\n}\n\nconst SelectBase = ({\n\tisInvalid,\n\tisLoading,\n\tclassName,\n\tid,\n\tfield,\n\tchildren,\n\tsize,\n\terror,\n\t...rest\n}: SelectBaseProps) => {\n\treturn (\n\t\t<select\n\t\t\tid={id}\n\t\t\tclassName={classNames(\n\t\t\t\ts.select,\n\t\t\t\ts[size],\n\t\t\t\t{\n\t\t\t\t\t[s.invalid]: isInvalid,\n\t\t\t\t},\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\taria-describedby={`${error ? 'error' : 'helper-text'}-${id}`}\n\t\t\t{...field}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{children}\n\t\t</select>\n\t)\n}\n\ninterface SelectFieldProps {\n\tisInvalid?: boolean\n\tisLoading?: boolean\n\tisRequired?: boolean\n\tisOptional?: boolean\n\tid?: string\n\tlabel?: ReactNode\n\thelperText?: ReactNode\n\terror?: ReactNode\n\tfield: HTMLProps<HTMLSelectElement>\n\tchildren: ReactNode\n\tclassName?: string\n\tsize?: 'medium' | 'large'\n\tdisabled?: boolean\n}\n\nconst SelectField = ({\n\tisInvalid,\n\tisLoading,\n\tisRequired,\n\tisOptional,\n\tid,\n\tlabel,\n\thelperText,\n\terror,\n\tfield,\n\tchildren,\n\tclassName,\n\tsize = 'medium',\n\t...rest\n}: SelectFieldProps) => {\n\tconst generatedId = useId()\n\tconst inputId = id ?? generatedId\n\n\treturn (\n\t\t<Field\n\t\t\tlabel={label}\n\t\t\thelperText={helperText}\n\t\t\terror={error}\n\t\t\tisRequired={isRequired}\n\t\t\tisOptional={isOptional}\n\t\t\tid={inputId}\n\t\t\tlayout=\"vertical\"\n\t\t\tclassName={className}\n\t\t>\n\t\t\t<SelectBase\n\t\t\t\tid={inputId}\n\t\t\t\tisInvalid={isInvalid}\n\t\t\t\trequired={isRequired}\n\t\t\t\tfield={field}\n\t\t\t\tsize={size}\n\t\t\t\t{...rest}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</SelectBase>\n\t\t</Field>\n\t)\n}\n\nSelectField.displayName = 'SelectField'\n\nexport { SelectField }\n","import classNames from 'classnames'\nimport type { HTMLInputTypeAttribute, HTMLProps, ReactNode } from 'react'\nimport { useId } from 'react'\nimport { Field } from '../field'\nimport s from './styles.module.css'\n\ninterface TextInputBaseProps {\n\t/**\n\t * Sets the native HTML `type` of the `<input>`.\n\t */\n\ttype?: HTMLInputTypeAttribute\n\n\t/**\n\t * Applies an “invalid” appearance to the control but doesn’t modify its logical validity.\n\t */\n\tisInvalid?: boolean\n\n\t/**\n\t * When true, it shows a loading indicator instead of a magnifying glass; only applicable when `type=\"search\"`.\n\t */\n\tisLoading?: boolean\n\tisRequired?: boolean\n\tclassName?: string\n\tid?: string\n\n\t/**\n\t * Can be used to supply any props that the native `<input>` element supports (such as `value`, `placeholder`, in addition to events like `onChange` and `onBlur`)\n\t */\n\tfield: HTMLProps<HTMLInputElement>\n\n\t/**\n\t * Sets the size of the input to match either medium Buttons or large Buttons.\n\t */\n\tsize?: 'medium' | 'large'\n\terror?: ReactNode\n\tdisabled?: boolean\n}\n\nconst TextInputBase = ({\n\ttype,\n\tisInvalid,\n\tisLoading,\n\tisRequired,\n\tclassName,\n\tid,\n\tfield,\n\tsize = 'medium',\n\terror,\n\t...rest\n}: TextInputBaseProps) => {\n\tconst generatedId = useId()\n\tconst inputId = id ?? generatedId\n\n\treturn (\n\t\t<input\n\t\t\tid={inputId}\n\t\t\ttype={type}\n\t\t\tclassName={classNames(\n\t\t\t\ts['text-input'],\n\t\t\t\ts[`size-${size}`],\n\t\t\t\t{\n\t\t\t\t\t[s['invalid']]: isInvalid,\n\t\t\t\t\t[s['loading']]: isLoading,\n\t\t\t\t},\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\trequired={isRequired}\n\t\t\taria-describedby={`${error ? 'error' : 'helper-text'}-${id}`}\n\t\t\t{...field}\n\t\t\t{...rest}\n\t\t/>\n\t)\n}\n\nTextInputBase.displayName = 'TextInputBase'\n\ninterface TextInputProps {\n\t/**\n\t * When provided, appends a badge next to the label text.\n\t */\n\tbadgeText?: string\n\n\t/**\n\t * Sets the native HTML `type` of the `<input>`.\n\t */\n\ttype?: HTMLInputTypeAttribute\n\n\t/**\n\t * Applies an “invalid” appearance to the control but doesn’t modify its logical validity.\n\t */\n\tisInvalid?: boolean\n\n\t/**\n\t * When true, it shows a loading indicator instead of a magnifying glass; only applicable when `type=\"search\"`.\n\t */\n\tisLoading?: boolean\n\n\t/**\n\t * Appends a `Required` indicator next to the label text and sets the `required` attribute on the control when user input is required.\n\t */\n\tisRequired?: boolean\n\n\t/**\n\t * Appends an `Optional` indicator next to the label text when user input is optional.\n\t */\n\tisOptional?: boolean\n\n\t/**\n\t * Input control’s ID attribute.\n\t *\n\t * By default, the ID is automatically generated by the component. Use this argument to pass a custom ID.\n\t */\n\tid?: string\n\n\t/**\n\t * Container that renders its content inside the `<label>` element. The content can be a simple string or a `ReactNode`, in which case it inherits the text style.\n\t *\n\t * The `for` attribute of the label is automatically generated using the `controlId` value of the control.\n\t */\n\tlabel?: ReactNode\n\n\t/**\n\t * Container that renders its content inside the \"helper text\" block. The content can be a simple string or a `ReactNode`, in which case it inherits the text style.\n\t *\n\t * The `id` attribute of the message is automatically generated using the `controlId` value of the control.\n\t */\n\thelperText?: ReactNode\n\n\t/**\n\t * Container that renders its content inside the \"error\" block. The content can be a simple string or a `ReactNode`, in which case it inherits the text style.\n\t *\n\t * The `id` attribute of the error message is automatically generated using the `controlId` value of the control.\n\t */\n\terror?: ReactNode\n\n\t/**\n\t * Can be used to supply any props that the native `<input>` element supports (such as `value`, `placeholder`, in addition to events like `onChange` and `onBlur`)\n\t */\n\tfield: HTMLProps<HTMLInputElement>\n\tclassName?: string\n\n\t/**\n\t * Sets the size of the input to match either medium Buttons or large Buttons.\n\t */\n\tsize?: 'medium' | 'large'\n\tdisabled?: boolean\n}\n\nconst TextInput = ({\n\tbadgeText,\n\ttype = 'text',\n\tisInvalid,\n\tisLoading,\n\tisRequired,\n\tisOptional,\n\tid,\n\tlabel,\n\thelperText,\n\terror,\n\tfield,\n\tclassName,\n\tsize = 'medium',\n\t...rest\n}: TextInputProps) => {\n\tconst generatedId = useId()\n\tconst inputId = id ?? generatedId\n\n\treturn (\n\t\t<Field\n\t\t\tlabel={label}\n\t\t\tbadgeText={badgeText}\n\t\t\thelperText={helperText}\n\t\t\terror={error}\n\t\t\tisRequired={isRequired}\n\t\t\tisOptional={isOptional}\n\t\t\tid={inputId}\n\t\t\tlayout=\"vertical\"\n\t\t\tclassName={className}\n\t\t>\n\t\t\t<TextInputBase\n\t\t\t\tid={inputId}\n\t\t\t\ttype={type}\n\t\t\t\tisInvalid={isInvalid}\n\t\t\t\tisLoading={isLoading}\n\t\t\t\tisRequired={isRequired}\n\t\t\t\tfield={field}\n\t\t\t\tsize={size}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t</Field>\n\t)\n}\n\nTextInput.displayName = 'TextInput'\n\nexport type { TextInputBaseProps, TextInputProps }\nexport { TextInputBase, TextInput }\n","'use client'\n\nimport {\n\tcreateContext,\n\tuseCallback,\n\tuseContext,\n\tuseEffect,\n\tuseRef,\n\tuseId,\n\tuseState,\n} from 'react'\nimport { TextInputBase } from '../form/text-input'\n\ntype TComboBoxItem = {\n\tid: string\n\tvalue: string\n\tlabel: string\n}\n\nconst idWithPrefix = (prefix: string, id: string) => {\n\treturn `${prefix}__${id}`\n}\n\n/**\n * Something to note as you move through the code\n * The distinction between the native browser focus and the visually focused item\n *\n * The native browser focus only ever alternates between the toggle and the search input, focus should never be on an individual {@link ComboBox.Item}\n * The currently selected item is visually identified with css and marked in the accessibility tree with `aria-selected`\n *\n * You can see more in the [combobox aria guide](https://www.w3.org/WAI/ARIA/apg/patterns/combobox/).\n *\n * To make this terse in our implementation, we use the term `vFocus` to refer to the visually focused {@link ComboBox.Item}\n */\nconst NOTHING_VFOCUSED = -1\n\ntype ComboBoxIds = {\n\ttoggle?: string\n\tpopover?: string\n\tlistbox?: string\n}\n\nfunction assertUniqueIds(ids: ComboBoxIds) {\n\tconst idToKeysMap = new Map<string, string[]>()\n\tfor (const [key, id] of Object.entries(ids)) {\n\t\tif (!id) continue\n\t\tconst existingKeys = idToKeysMap.get(id) || []\n\t\tidToKeysMap.set(id, [...existingKeys, key])\n\t}\n\n\t// tells the caller specifically which ids are duplicated\n\tfor (const [id, keys] of idToKeysMap) {\n\t\tif (keys.length > 1) {\n\t\t\tthrow new Error(\n\t\t\t\t`ComboBox: id '${id}' is duplicated in ${keys.join(', ')}`\n\t\t\t)\n\t\t}\n\t}\n}\n\n/**\n * internally, we generate them if not provided\n * so we can assert truthiness\n */\ntype InternalComboBoxIds = {\n\ttoggle: string\n\tpopover: string\n\tlistbox: string\n}\n\ninterface ComboBoxContext {\n\taddItem: (item: TComboBoxItem) => void\n\tselectItem: (item: TComboBoxItem) => void\n\tvFocusByIdx: (idx: number) => void\n\tvFocus: (item: TComboBoxItem) => void\n\tvFocusNext: () => void\n\tvFocusPrev: () => void\n\tgetSelectedItem: () => TComboBoxItem | null\n\tgetVFocusedItem: () => TComboBoxItem | null\n\tgetItems: () => TComboBoxItem[]\n\tremoveItem: (item: TComboBoxItem) => void\n\tsearchInputRef: React.RefObject<HTMLInputElement>\n\ttoggleRef: React.RefObject<HTMLDivElement>\n\tlistRef: React.RefObject<HTMLUListElement>\n\tisOpen: boolean\n\tclosePopover: () => void\n\topenPopover: () => void\n\thandleVFocusKeyboardControls: (e: React.KeyboardEvent) => void\n\tids: React.MutableRefObject<InternalComboBoxIds>\n}\n\nconst ComboBoxContext = createContext<ComboBoxContext | null>(null)\n\nconst useComboBox = (): ComboBoxContext => {\n\tconst ctx = useContext(ComboBoxContext)\n\tif (!ctx) {\n\t\tthrow new Error('useComboBox must be used within a ComboBoxProvider')\n\t}\n\treturn ctx\n}\n\ninterface ComboBoxProviderProps {\n\tchildren: React.ReactNode\n\t/**\n\t * This does **not** loop the items, it loops the focus when the items are exhausted.\n\t * Meaning that if set to `true` and the user navigates to the last {@link ComboBox.Item} and presses `ArrowDown`,\n\t * the focus will not loop back around to the first {@link ComboBox.Item}, it will return focus to the {@link ComboBox.Trigger} and close the popover.\n\t * Otherwise, if set to `false` and the user navigates to the last {@link ComboBox.Item} and presses `ArrowDown`,\n\t * it will just remain there.\n\t *\n\t * @default true\n\t */\n\tkeyboardFocusLoop?: boolean\n\tids?: ComboBoxIds\n\tonChangeVFocusedOption?: (option: TComboBoxItem) => void\n\tonChangeSelectedOption?: (option: TComboBoxItem) => void\n}\n\nconst ComboBoxProvider = ({\n\tchildren,\n\tkeyboardFocusLoop = true,\n\tids: providedIds = {},\n\tonChangeVFocusedOption,\n\tonChangeSelectedOption,\n}: ComboBoxProviderProps) => {\n\tassertUniqueIds(providedIds)\n\n\tconst itemsRef = useRef<TComboBoxItem[]>([])\n\tconst internalUsedIds = useRef(new Set<TComboBoxItem['id']>())\n\tconst [selectedItem, _setSelectedItem] = useState<TComboBoxItem | null>(null)\n\tconst [vFocusedItemIdx, _setVFocusedItemIdx] = useState(NOTHING_VFOCUSED)\n\tconst toggleRef = useRef<HTMLDivElement>(null)\n\tconst searchInputRef = useRef<HTMLInputElement>(null)\n\tconst [isOpen, setIsOpen] = useState(false)\n\tconst listRef = useRef<HTMLUListElement>(null)\n\n\tconst fallBackToggleId = idWithPrefix('hashi-combo-box-toggle', useId())\n\tconst fallBackPopoverId = idWithPrefix('hashi-combo-box-popover', useId())\n\tconst fallBackListboxId = idWithPrefix('hashi-combo-box-listbox', useId())\n\n\t// proxy the react state to simulate event listeners\n\tconst setSelectedItem = useCallback(\n\t\t(item: TComboBoxItem) => {\n\t\t\t_setSelectedItem(item)\n\t\t\tonChangeSelectedOption?.(item)\n\t\t},\n\t\t[onChangeSelectedOption]\n\t)\n\n\tconst setVFocusedItemIdx = useCallback(\n\t\t(idx: number) => {\n\t\t\t_setVFocusedItemIdx(idx)\n\t\t\tonChangeVFocusedOption?.(itemsRef.current[idx])\n\t\t},\n\t\t[onChangeVFocusedOption]\n\t)\n\n\tconst ids = useRef<InternalComboBoxIds>({\n\t\ttoggle: providedIds.toggle ?? fallBackToggleId,\n\t\tpopover: providedIds.popover ?? fallBackPopoverId,\n\t\tlistbox: providedIds.listbox ?? fallBackListboxId,\n\t})\n\n\tconst vFocusByIdx = useCallback(\n\t\t(idx: number) => {\n\t\t\tsetVFocusedItemIdx(idx)\n\t\t},\n\t\t[setVFocusedItemIdx]\n\t)\n\n\tconst vFocusNext = useCallback(() => {\n\t\tconst items = itemsRef.current\n\t\tif (vFocusedItemIdx === NOTHING_VFOCUSED) return 0\n\t\tconst potentialNextIndex = vFocusedItemIdx + 1\n\t\tconst isAtEnd = potentialNextIndex >= items.length\n\t\tlet idx\n\t\tif (isAtEnd && keyboardFocusLoop) {\n\t\t\tidx = NOTHING_VFOCUSED\n\t\t\tsetIsOpen(false)\n\t\t} else {\n\t\t\tidx = isAtEnd ? vFocusedItemIdx : potentialNextIndex\n\t\t}\n\n\t\tvFocusByIdx(idx)\n\t}, [keyboardFocusLoop, vFocusedItemIdx, vFocusByIdx])\n\n\tconst vFocusPrev = useCallback(() => {\n\t\tif (vFocusedItemIdx === NOTHING_VFOCUSED) return 0\n\t\tconst potentialPreviousIndex = vFocusedItemIdx - 1\n\t\tconst isAtStart = potentialPreviousIndex < 0\n\t\tlet idx\n\t\tif (isAtStart && keyboardFocusLoop) {\n\t\t\tidx = NOTHING_VFOCUSED\n\t\t\tsetIsOpen(false)\n\t\t} else {\n\t\t\tidx = isAtStart ? vFocusedItemIdx : potentialPreviousIndex\n\t\t}\n\n\t\tvFocusByIdx(idx)\n\t}, [keyboardFocusLoop, vFocusedItemIdx, vFocusByIdx])\n\n\tconst vFocus = useCallback(\n\t\t(item: TComboBoxItem) => {\n\t\t\tconst foundItemIndex = itemsRef.current.findIndex((i) => i.id === item.id)\n\t\t\tif (foundItemIndex === -1) {\n\t\t\t\tconsole.error('ComboBox: Item not found', item)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tsetVFocusedItemIdx(foundItemIndex)\n\t\t},\n\t\t[setVFocusedItemIdx]\n\t)\n\n\tconst getVFocusedItem = useCallback(() => {\n\t\tif (vFocusedItemIdx === NOTHING_VFOCUSED) return null\n\t\treturn itemsRef.current[vFocusedItemIdx] || null\n\t}, [vFocusedItemIdx])\n\n\tconst selectItem = useCallback(\n\t\t(item: TComboBoxItem) => {\n\t\t\tconst foundItemIndex = itemsRef.current.findIndex((i) => i.id === item.id)\n\t\t\tif (foundItemIndex === -1) {\n\t\t\t\tconsole.error(\n\t\t\t\t\t'ComboBox: Item not found, Selected item not updated',\n\t\t\t\t\titem\n\t\t\t\t)\n\t\t\t\treturn\n\t\t\t}\n\t\t\tsetSelectedItem(item)\n\t\t\tsetIsOpen(false)\n\t\t},\n\t\t[setSelectedItem]\n\t)\n\n\tconst getSelectedItem = useCallback(() => {\n\t\treturn selectedItem\n\t}, [selectedItem])\n\n\tconst addItem = useCallback((item: TComboBoxItem) => {\n\t\tif (internalUsedIds.current.has(item.id)) {\n\t\t\tconst existing = itemsRef.current.find((i) => i.id === item.id)\n\t\t\tconst attemptedToAdd = item\n\t\t\tconst dupes = JSON.stringify({\n\t\t\t\texisting,\n\t\t\t\tattemptedToAdd,\n\t\t\t})\n\t\t\tconst errMessage = `Each ComboBox.Item must have a unique id.\\n Found items with duplicate ids: ${dupes}`\n\t\t\tthrow Error(errMessage)\n\t\t}\n\t\tinternalUsedIds.current.add(item.id)\n\t\titemsRef.current.push(item)\n\t}, [])\n\n\tconst getItems = useCallback(() => {\n\t\treturn itemsRef.current\n\t}, [])\n\n\tconst removeItem = useCallback((item: TComboBoxItem) => {\n\t\tinternalUsedIds.current.delete(item.id)\n\t\titemsRef.current = itemsRef.current.filter((i) => i.id !== item.id)\n\t}, [])\n\n\tuseEffect(() => {\n\t\tif (isOpen) {\n\t\t\tsearchInputRef.current?.focus()\n\t\t}\n\t}, [isOpen, searchInputRef, toggleRef])\n\n\t// if someone navigates to an item, via the keyboard, scroll it into view\n\tuseEffect(() => {\n\t\tconst vFocusedItem = getVFocusedItem()\n\t\tconst list = listRef.current\n\t\tif (vFocusedItem && list) {\n\t\t\tconst itemElement = list.querySelector(\n\t\t\t\t`[data-combo-box-item-id=\"${vFocusedItem.id}\"]`\n\t\t\t)\n\t\t\titemElement?.scrollIntoView({ block: 'nearest', behavior: 'smooth' })\n\t\t}\n\t}, [getVFocusedItem])\n\n\tconst closePopover = useCallback(() => {\n\t\tsetIsOpen(false)\n\t\tsetVFocusedItemIdx(NOTHING_VFOCUSED)\n\t}, [setVFocusedItemIdx])\n\n\tconst openPopover = useCallback(() => {\n\t\tsetIsOpen(true)\n\t}, [])\n\n\t// we need this event handler in several places because\n\t// it has to be attached to a focused element\n\t// if there is a search input in use, that will be the focused element\n\t// otherwise, it will be the toggle element\n\tconst handleVFocusKeyboardControls = (e: React.KeyboardEvent) => {\n\t\tconst isScrollingKey = e.key === 'ArrowDown' || e.key === 'ArrowUp'\n\t\tconst isSpaceKey = e.key === ' '\n\t\tconst hasSearchInput = searchInputRef.current !== null\n\t\tconst isSpacePressWithoutSearchInput = isSpaceKey && !hasSearchInput\n\t\tif (isScrollingKey || isSpacePressWithoutSearchInput) {\n\t\t\te.preventDefault()\n\t\t}\n\n\t\tswitch (e.key) {\n\t\t\tcase 'Escape': {\n\t\t\t\tclosePopover()\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase 'ArrowDown': {\n\t\t\t\tconst nothingVFocused = getVFocusedItem() === null\n\t\t\t\t// if someone presses down on the search input whilst nothing is vFocused, vFocus the first item\n\t\t\t\tif (isOpen && nothingVFocused) {\n\t\t\t\t\tvFocusByIdx(0)\n\t\t\t\t} else {\n\t\t\t\t\tvFocusNext()\n\t\t\t\t}\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase 'ArrowUp': {\n\t\t\t\tvFocusPrev()\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tcase 'Enter': {\n\t\t\t\tconst currItem = getVFocusedItem()\n\t\t\t\tif (currItem) {\n\t\t\t\t\tselectItem(currItem)\n\t\t\t\t}\n\t\t\t\tclosePopover()\n\t\t\t\tbreak\n\t\t\t}\n\t\t\tdefault:\n\t\t\t\tbreak\n\t\t}\n\t}\n\n\treturn (\n\t\t<ComboBoxContext.Provider\n\t\t\tvalue={{\n\t\t\t\taddItem,\n\t\t\t\tselectItem,\n\t\t\t\tvFocus,\n\t\t\t\tvFocusByIdx,\n\t\t\t\tvFocusNext,\n\t\t\t\tvFocusPrev,\n\t\t\t\tgetSelectedItem,\n\t\t\t\tgetVFocusedItem,\n\t\t\t\tgetItems,\n\t\t\t\tremoveItem,\n\t\t\t\tsearchInputRef,\n\t\t\t\ttoggleRef,\n\t\t\t\tlistRef,\n\t\t\t\tisOpen,\n\t\t\t\tclosePopover,\n\t\t\t\topenPopover,\n\t\t\t\tids,\n\t\t\t\thandleVFocusKeyboardControls,\n\t\t\t}}\n\t\t>\n\t\t\t{children}\n\t\t</ComboBoxContext.Provider>\n\t)\n}\n\ninterface ComboBoxItemProps\n\textends Omit<\n\t\tReact.HTMLAttributes<HTMLLIElement>,\n\t\t'role' | 'aria-selected' | 'onClick' | 'onKeyDown' | 'onMouseEnter'\n\t> {\n\tvalue: string\n\tlabel: string\n}\n\nconst ComboBoxItem = ({\n\tid: providedId,\n\tvalue,\n\tlabel,\n\tchildren,\n\t...restProps\n}: React.PropsWithChildren<ComboBoxItemProps>) => {\n\tconst generatedId = idWithPrefix('hashi-combo-box-item', useId())\n\tconst id = providedId ?? generatedId\n\tconst { addItem, removeItem, getVFocusedItem, vFocus, selectItem } =\n\t\tuseComboBox()\n\n\tuseEffect(() => {\n\t\taddItem({ id, value, label })\n\t\treturn () => removeItem({ id, value, label })\n\t}, [addItem, id, removeItem, value, label])\n\n\tconst isVFocused = getVFocusedItem()?.id === id\n\n\treturn (\n\t\t<li\n\t\t\tdata-combo-box-item-id={id}\n\t\t\trole=\"option\"\n\t\t\taria-selected={isVFocused}\n\t\t\tdata-vfocused={isVFocused}\n\t\t\tonClick={() => selectItem({ id, value, label })}\n\t\t\tonMouseEnter={() => vFocus({ id, value, label })}\n\t\t\t{...restProps}\n\t\t>\n\t\t\t{children}\n\t\t</li>\n\t)\n}\n\ninterface ComboBoxTriggerProps {\n\tchildren: React.ReactNode\n\tclassName?: string\n}\n\nconst ComboBoxTrigger = ({ children, className }: ComboBoxTriggerProps) => {\n\tconst {\n\t\ttoggleRef,\n\t\topenPopover,\n\t\tclosePopover,\n\t\tisOpen,\n\t\tids,\n\t\thandleVFocusKeyboardControls,\n\t\tsearchInputRef,\n\t} = useComboBox()\n\n\tconst handleClick = (e: React.MouseEvent) => {\n\t\te.stopPropagation() // an external click may be registered as an outside click which will close the popover\n\t\tif (isOpen) {\n\t\t\tclosePopover()\n\t\t} else {\n\t\t\topenPopover()\n\t\t}\n\t}\n\n\tconst handleKeyDown = (e: React.KeyboardEvent) => {\n\t\tconst isOpenKey =\n\t\t\te.key === 'Enter' || e.key === 'ArrowDown' || e.key === ' '\n\t\tconst isClosed = isOpen === false\n\n\t\tif (isOpenKey && isClosed) {\n\t\t\te.preventDefault()\n\t\t\topenPopover()\n\t\t\treturn\n\t\t}\n\n\t\tconst hasSearchInput = searchInputRef.current !== null\n\t\t// if there is a search input, the event handler will be bound there\n\t\tif (!hasSearchInput && isOpen) {\n\t\t\thandleVFocusKeyboardControls(e)\n\t\t}\n\t}\n\n\tconst getOnBlur = () => {\n\t\treturn (e: React.FocusEvent) => {\n\t\t\tconst isClickInside = e.relatedTarget?.closest('[data-combo-box-popover]')\n\t\t\tif (isClickInside) return\n\t\t\tconst hasSearchInput = searchInputRef.current !== null\n\t\t\tif (!hasSearchInput) {\n\t\t\t\tclosePopover()\n\t\t\t}\n\t\t}\n\t}\n\n\treturn (\n\t\t<div\n\t\t\trole=\"combobox\"\n\t\t\tonClick={handleClick}\n\t\t\tonKeyDown={handleKeyDown}\n\t\t\ttabIndex={0}\n\t\t\tref={toggleRef}\n\t\t\taria-haspopup=\"listbox\"\n\t\t\taria-expanded={isOpen}\n\t\t\taria-controls={ids.current.popover}\n\t\t\tclassName={className}\n\t\t\tonBlur={getOnBlur()}\n\t\t>\n\t\t\t{children}\n\t\t</div>\n\t)\n}\n\ninterface ComboBoxValueProps {\n\tplaceholder?: string\n}\n\nconst ComboBoxValue = ({\n\tplaceholder = 'Select an option',\n}: ComboBoxValueProps) => {\n\tconst { getSelectedItem } = useComboBox()\n\treturn <>{getSelectedItem()?.label ?? placeholder}</>\n}\n\ninterface ComboBoxPopoverProps {\n\tchildren: React.ReactNode\n\tclassName?: string\n}\n\nconst ComboBoxPopover = ({ children, className }: ComboBoxPopoverProps) => {\n\tconst { isOpen, ids, closePopover } = useComboBox()\n\n\tuseEffect(() => {\n\t\tconst handleClickOutside = (e: MouseEvent) => {\n\t\t\tif (!isOpen) return\n\t\t\tconst target = e.target as HTMLElement\n\t\t\tconst isClickInside = target.closest('[data-combo-box-popover]')\n\t\t\tif (isClickInside) return\n\t\t\tclosePopover()\n\t\t}\n\n\t\tdocument.addEventListener('click', handleClickOutside)\n\t\treturn () => {\n\t\t\tdocument.removeEventListener('click', handleClickOutside)\n\t\t}\n\t}, [isOpen, closePopover])\n\n\tif (!isOpen) return null\n\n\treturn (\n\t\t<div id={ids.current.popover} data-combo-box-popover className={className}>\n\t\t\t{children}\n\t\t</div>\n\t)\n}\n\ninterface ComboBoxListProps extends React.PropsWithChildren {\n\t/**\n\t * Not rendered, used to hint assistive technologies,\n\t * indicate the type of options available in the popover\n\t * eg. Schools | Languages | Countries\n\t */\n\tlabel: string\n\tclassName?: string\n\tmaxHeight?: `${number}em` | `${number}px` | `${number}%`\n\tonScroll?: (e: React.UIEvent<HTMLUListElement>) => void\n}\n\nconst ComboBoxList = ({\n\tlabel,\n\tchildren,\n\tclassName = '',\n\tmaxHeight,\n\tonScroll,\n}: ComboBoxListProps) => {\n\tconst { ids, listRef } = useComboBox()\n\n\treturn (\n\t\t<ul\n\t\t\tid={ids.current.listbox}\n\t\t\taria-label={label}\n\t\t\trole=\"listbox\"\n\t\t\ttabIndex={-1}\n\t\t\tref={listRef}\n\t\t\tclassName={className}\n\t\t\tstyle={{ maxHeight }}\n\t\t\tonScroll={onScroll}\n\t\t>\n\t\t\t{children}\n\t\t</ul>\n\t)\n}\n\ninterface ComboBoxSearchInputProps {\n\tplaceholder?: string\n\tvalue?: string\n\tonChange?: (event: React.ChangeEvent<HTMLInputElement>) => void\n\tonBlur?: () => void\n}\n\nconst ComboBoxSearchInput = ({\n\tplaceholder = 'Search',\n\tvalue,\n\tonChange,\n\tonBlur,\n}: ComboBoxSearchInputProps) => {\n\tconst {\n\t\tsearchInputRef,\n\t\tgetVFocusedItem,\n\t\thandleVFocusKeyboardControls,\n\t\tclosePopover,\n\t} = useComboBox()\n\n\treturn (\n\t\t<TextInputBase\n\t\t\tfield={{\n\t\t\t\ttype: 'search',\n\t\t\t\tref: searchInputRef,\n\t\t\t\tautoComplete: 'off',\n\t\t\t\t'aria-haspopup': 'listbox',\n\t\t\t\t'aria-autocomplete': 'list',\n\t\t\t\trole: 'combobox',\n\t\t\t\t'aria-activedescendant': getVFocusedItem()?.id ?? '',\n\t\t\t\tplaceholder,\n\t\t\t\tvalue,\n\t\t\t\tonChange,\n\t\t\t\tonKeyDown: handleVFocusKeyboardControls,\n\t\t\t\tonBlur: (e) => {\n\t\t\t\t\te.stopPropagation()\n\t\t\t\t\tconst isClickInside = e.relatedTarget?.closest(\n\t\t\t\t\t\t'[data-combo-box-popover]'\n\t\t\t\t\t)\n\t\t\t\t\tif (isClickInside) return\n\t\t\t\t\tclosePopover()\n\t\t\t\t\tonBlur?.()\n\t\t\t\t},\n\t\t\t}}\n\t\t/>\n\t)\n}\n\nexport type { TComboBoxItem, ComboBoxListProps, ComboBoxSearchInputProps }\n\nexport const ComboBox = Object.freeze({\n\tRoot: ComboBoxProvider,\n\tTrigger: ComboBoxTrigger,\n\tPopover: ComboBoxPopover,\n\tSearchInput: ComboBoxSearchInput,\n\tList: ComboBoxList,\n\tItem: ComboBoxItem,\n\tValue: ComboBoxValue,\n})\n","import { useId } from 'react'\nimport classNames from 'classnames'\nimport { Field } from '../field'\nimport { FlightIcon } from '../../flight-icon'\nimport { ComboBox } from '../../combo-box-primitive'\nimport type {\n\tTComboBoxItem,\n\tComboBoxSearchInputProps,\n\tComboBoxListProps,\n} from '../../combo-box-primitive'\nimport type { FieldProps } from '../field'\nimport s from './form-super-select.module.css'\n\ntype SuperSelectRootProps = {\n\tchildren: React.ReactNode\n\tonChangeSelectedOption?: (option: TComboBoxItem) => void\n\tonChangeVFocusedOption?: (option: TComboBoxItem) => void\n}\n\nconst SuperSelectRoot = ({\n\tchildren,\n\tonChangeSelectedOption,\n\tonChangeVFocusedOption,\n}: SuperSelectRootProps) => {\n\treturn (\n\t\t<ComboBox.Root\n\t\t\tonChangeSelectedOption={onChangeSelectedOption}\n\t\t\tonChangeVFocusedOption={onChangeVFocusedOption}\n\t\t>\n\t\t\t<div className={s.root}>{children}</div>\n\t\t</ComboBox.Root>\n\t)\n}\n\ninterface SuperSelectTriggerProps {\n\tclassName?: string\n}\n\nconst SuperSelectTrigger = ({ className }: SuperSelectTriggerProps) => {\n\treturn (\n\t\t<ComboBox.Trigger className={classNames(s.trigger, className)}>\n\t\t\t<ComboBox.Value />\n\t\t</ComboBox.Trigger>\n\t)\n}\n\ntype SuperSelectPopoverProps = {\n\tchildren: React.ReactNode\n}\n\nconst SuperSelectPopover = ({ children }: SuperSelectPopoverProps) => {\n\treturn <ComboBox.Popover className={s.popover}>{children}</ComboBox.Popover>\n}\n\ntype SuperSelectSearchInputProps = ComboBoxSearchInputProps\n\nconst SuperSelectSearchInput = ({\n\tplaceholder = 'Search',\n\tvalue,\n\tonChange,\n\tonBlur,\n}: SuperSelectSearchInputProps) => {\n\treturn (\n\t\t<div className={s['search-input-wrapper']}>\n\t\t\t<ComboBox.SearchInput\n\t\t\t\tplaceholder={placeholder}\n\t\t\t\tvalue={value}\n\t\t\t\tonChange={onChange}\n\t\t\t\tonBlur={onBlur}\n\t\t\t/>\n\t\t</div>\n\t)\n}\n\ntype SuperSelectListProps = ComboBoxListProps\n\nconst SuperSelectList = ({\n\tlabel,\n\tchildren,\n\tclassName,\n\tmaxHeight,\n\tonScroll,\n}: SuperSelectListProps) => {\n\treturn (\n\t\t<ComboBox.List\n\t\t\tlabel={label}\n\t\t\tclassName={classNames(s.list, className)}\n\t\t\tmaxHeight={maxHeight}\n\t\t\tonScroll={onScroll}\n\t\t>\n\t\t\t{children}\n\t\t</ComboBox.List>\n\t)\n}\n\ninterface SuperSelectOptionProps extends TComboBoxItem {\n\tisLoading?: boolean\n\t/**\n\t * Leading icon. Acceptable value: any [icon](https://helios.hashicorp.design/icons/library) name.\n\t */\n\ticon?: string\n\t/**\n\t * Trailing icon. Acceptable value: any [icon](https://helios.hashicorp.design/icons/library) name.\n\t */\n\ttrailingIcon?: string\n\tclassName?: string\n}\n\nconst SuperSelectOption = ({\n\tvalue,\n\tlabel,\n\tisLoading,\n\ticon,\n\tclassName,\n\ttrailingIcon,\n}: SuperSelectOptionProps) => {\n\treturn (\n\t\t<ComboBox.Item\n\t\t\tvalue={value}\n\t\t\tlabel={label}\n\t\t\tclassName={classNames(s.option, className)}\n\t\t>\n\t\t\t{isLoading ? (\n\t\t\t\t<div className={s['interactive-loading-wrapper']}>\n\t\t\t\t\t<div\n\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\ts['interactive-icon'],\n\t\t\t\t\t\t\ts['interactive-icon-leading']\n\t\t\t\t\t\t)}\n\t\t\t\t\t>\n\t\t\t\t\t\t<FlightIcon name=\"loading\" isInlineBlock={false} />\n\t\t\t\t\t</div>\n\t\t\t\t\t<span className={s['option-text']}>{label}</span>\n\t\t\t\t</div>\n\t\t\t) : (\n\t\t\t\t<>\n\t\t\t\t\t{icon && (\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\ts['interactive-icon'],\n\t\t\t\t\t\t\t\ts['interactive-icon-leading']\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<FlightIcon name={icon} isInlineBlock={false} />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t\t<span className={s['option-text']}>{label}</span>\n\t\t\t\t\t{trailingIcon && (\n\t\t\t\t\t\t<span\n\t\t\t\t\t\t\tclassName={classNames(\n\t\t\t\t\t\t\t\ts['interactive-icon'],\n\t\t\t\t\t\t\t\ts['interactive-icon-trailing']\n\t\t\t\t\t\t\t)}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t<FlightIcon name={trailingIcon} isInlineBlock={false} />\n\t\t\t\t\t\t</span>\n\t\t\t\t\t)}\n\t\t\t\t</>\n\t\t\t)}\n\t\t</ComboBox.Item>\n\t)\n}\n\ntype TSuperSelectOption = TComboBoxItem\n\nconst SuperSelect = Object.freeze({\n\tRoot: SuperSelectRoot,\n\tTrigger: SuperSelectTrigger,\n\tPopover: SuperSelectPopover,\n\t/**\n\t * Note that this only acts as a view layer,\n\t * it does not participate in the search logic.\n\t * This is left for the consumer to implement.\n\t */\n\tSearchInput: SuperSelectSearchInput,\n\tList: SuperSelectList,\n\tOption: SuperSelectOption,\n})\n\ninterface SuperSelectFieldProps\n\textends Omit<FieldProps, 'children' | 'id' | 'layout'> {\n\tid?: string\n\toptions: SuperSelectOptionProps[]\n\t/**\n\t * @default false\n\t */\n\tsearchProps?: SuperSelectSearchInputProps\n\t/**\n\t * Used for assistive technologies,\n\t * indicate the category of options you are presenting\n\t * eg. Schools | Languages | Countries\n\t */\n\tlistLabel: string\n\t/**\n\t * Is actually a `max-height` for the list.\n\t * Pass this when you have a lot of options and want to limit the height of the list.\n\t * @default `240px`\n\t */\n\tlistHeight?: `${number}em` | `${number}px` | `${number}%`\n\t/**\n\t * Callback for when the list is scrolled.\n\t * This is useful for implementing pagination, recommended for large lists.\n\t */\n\tonScroll?: (e: React.UIEvent<HTMLUListElement>) => void\n\tonChangeSelectedOption?: (option: SuperSelectOptionProps) => void\n\tonChangeVFocusedOption?: (option: SuperSelectOptionProps) => void\n\tonSearchBlur?: () => void\n}\n\n/**\n * Convenience component for using {@link SuperSelect}\n * with a {@link Field} component. This should cover most use cases\n * unless you need advanced patterns like pagination, async options, etc. outside of a form context.\n */\nconst SuperSelectField = ({\n\tlabel,\n\thelperText,\n\terror,\n\tid,\n\tsearchProps,\n\toptions,\n\tlistLabel,\n\tlistHeight = '240px',\n\tonScroll,\n\tonChangeSelectedOption,\n\tonChangeVFocusedOption,\n\tonSearchBlur,\n\t...rest\n}: SuperSelectFieldProps) => {\n\tconst genID = useId()\n\tconst fieldId = id ?? genID\n\n\treturn (\n\t\t<Field\n\t\t\tlabel={label}\n\t\t\thelperText={helperText}\n\t\t\terror={error}\n\t\t\tid={fieldId}\n\t\t\tlayout={'vertical'}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<SuperSelect.Root\n\t\t\t\tonChangeSelectedOption={onChangeSelectedOption}\n\t\t\t\tonChangeVFocusedOption={onChangeVFocusedOption}\n\t\t\t>\n\t\t\t\t<SuperSelect.Trigger />\n\t\t\t\t<SuperSelect.Popover>\n\t\t\t\t\t{searchProps && (\n\t\t\t\t\t\t<SuperSelect.SearchInput\n\t\t\t\t\t\t\tplaceholder={searchProps.placeholder}\n\t\t\t\t\t\t\tvalue={searchProps.value}\n\t\t\t\t\t\t\tonChange={searchProps.onChange}\n\t\t\t\t\t\t\tonBlur={onSearchBlur}\n\t\t\t\t\t\t/>\n\t\t\t\t\t)}\n\t\t\t\t\t<SuperSelect.List\n\t\t\t\t\t\tlabel={listLabel}\n\t\t\t\t\t\tmaxHeight={listHeight}\n\t\t\t\t\t\tonScroll={onScroll}\n\t\t\t\t\t>\n\t\t\t\t\t\t{options.map((option) => (\n\t\t\t\t\t\t\t<SuperSelect.Option key={option.value} {...option} />\n\t\t\t\t\t\t))}\n\t\t\t\t\t</SuperSelect.List>\n\t\t\t\t</SuperSelect.Popover>\n\t\t\t</SuperSelect.Root>\n\t\t</Field>\n\t)\n}\n\nSuperSelectField.displayName = 'SuperSelectField'\n\nexport type {\n\tTSuperSelectOption,\n\tSuperSelectOptionProps,\n\tSuperSelectSearchInputProps,\n}\n\nexport { SuperSelectField }\n","import classNames from 'classnames'\nimport { useId } from 'react'\nimport { Field } from '../field'\nimport type { HTMLProps, ReactNode } from 'react'\nimport s from './form-textarea.module.css'\n\ninterface TextAreaBaseProps {\n\tisInvalid?: boolean\n\tisLoading?: boolean\n\trequired?: boolean\n\tclassName?: string\n\tid: string\n\tfield: HTMLProps<HTMLTextAreaElement>\n\tsize: 'medium' | 'large'\n\terror?: ReactNode\n\tdisabled?: boolean\n}\n\nconst TextAreaBase = ({\n\tisInvalid,\n\tisLoading,\n\tclassName,\n\tid,\n\tfield,\n\tsize,\n\terror,\n\t...rest\n}: TextAreaBaseProps) => {\n\treturn (\n\t\t<textarea\n\t\t\tid={id}\n\t\t\tclassName={classNames(\n\t\t\t\ts.textarea,\n\t\t\t\ts[size],\n\t\t\t\t{\n\t\t\t\t\t[s.invalid]: isInvalid,\n\t\t\t\t},\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\taria-describedby={`${error ? 'error' : 'helper-text'}-${id}`}\n\t\t\t{...field}\n\t\t\t{...rest}\n\t\t/>\n\t)\n}\n\ninterface TextAreaFieldProps {\n\tisInvalid?: boolean\n\tisLoading?: boolean\n\tisRequired?: boolean\n\tisOptional?: boolean\n\tid?: string\n\tlabel?: ReactNode\n\thelperText?: ReactNode\n\terror?: ReactNode\n\tfield: HTMLProps<HTMLTextAreaElement>\n\tsize?: 'medium' | 'large'\n\tdisabled?: boolean\n}\n\nconst TextAreaField = ({\n\tisInvalid,\n\tisLoading,\n\tisRequired,\n\tisOptional,\n\tid,\n\tlabel,\n\thelperText,\n\terror,\n\tfield,\n\tsize = 'medium',\n\t...rest\n}: TextAreaFieldProps) => {\n\tconst generatedId = useId()\n\tconst inputId = id ?? generatedId\n\n\treturn (\n\t\t<Field\n\t\t\tlabel={label}\n\t\t\thelperText={helperText}\n\t\t\terror={error}\n\t\t\tisRequired={isRequired}\n\t\t\tisOptional={isOptional}\n\t\t\tid={inputId}\n\t\t\tlayout=\"vertical\"\n\t\t>\n\t\t\t<TextAreaBase\n\t\t\t\tid={inputId}\n\t\t\t\tisInvalid={isInvalid}\n\t\t\t\tisLoading={isLoading}\n\t\t\t\trequired={isRequired}\n\t\t\t\tfield={field}\n\t\t\t\tsize={size}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t</Field>\n\t)\n}\n\nTextAreaField.displayName = 'TextAreaField'\n\nexport { TextAreaField }\n","import { useId } from 'react'\nimport type { ReactNode, HTMLProps, ComponentProps } from 'react'\nimport { Field } from '../field'\nimport { Fieldset } from '../fieldset'\nimport s from './form-toggle.module.scss'\n\ninterface ToggleBaseProps {\n\tid?: string\n\n\t/**\n\t * Can be used to supply any props that the native `<input>` element supports (such as `value`, `placeholder`, in addition to events like `onChange` and `onBlur`)\n\t */\n\tfield: HTMLProps<HTMLInputElement>\n\ttoggleOnEnter?: boolean\n\ttestingKey?: string\n\terror?: ReactNode\n}\n\nconst ToggleBase = ({\n\tid,\n\tfield,\n\ttoggleOnEnter,\n\ttestingKey,\n\terror,\n\t...rest\n}: ToggleBaseProps) => {\n\tconst generatedId = useId()\n\tconst inputId = id ?? generatedId\n\n\tconst handleEnterKey = (event: React.KeyboardEvent<HTMLInputElement>) => {\n\t\tif (event.key === 'Enter') {\n\t\t\tevent.currentTarget.checked = !event.currentTarget.checked\n\t\t}\n\t}\n\n\treturn (\n\t\t<div className={s.toggle}>\n\t\t\t<input\n\t\t\t\tid={inputId}\n\t\t\t\tclassName={s.control}\n\t\t\t\ttype=\"checkbox\"\n\t\t\t\t{...field}\n\t\t\t\t{...rest}\n\t\t\t\trole=\"switch\"\n\t\t\t\taria-describedby={`${error ? 'error' : 'helper-text'}-${id}`}\n\t\t\t\tonKeyDown={toggleOnEnter ? handleEnterKey : undefined}\n\t\t\t\tdata-testid={testingKey}\n\t\t\t/>\n\t\t\t<div className={s.facade}></div>\n\t\t</div>\n\t)\n}\n\nToggleBase.displayName = 'ToggleBase'\n\ninterface ToggleFieldProps {\n\t/**\n\t * Applies an “invalid” appearance to the control but doesn’t modify its logical validity.\n\t */\n\tisInvalid?: boolean\n\n\t/**\n\t * Appends a `Required` indicator next to the label text and sets the `required` attribute on the control when user input is required.\n\t */\n\tisRequired?: boolean\n\n\t/**\n\t * Appends an `Optional` indicator next to the label text when user input is optional.\n\t */\n\tisOptional?: boolean\n\n\t/**\n\t * Input control’s ID attribute.\n\t *\n\t * By default, the ID is automatically generated by the component. Use this argument to pass a custom ID.\n\t */\n\tid?: string\n\n\t/**\n\t * Container that renders its content inside the `<label>` element. The content can be a simple string or a `ReactNode`, in which case it inherits the text style.\n\t *\n\t * The `for` attribute of the label is automatically generated using the `controlId` value of the control.\n\t */\n\tlabel?: ReactNode\n\n\t/**\n\t * Container that renders its content inside the \"helper text\" block. The content can be a simple string or a `ReactNode`, in which case it inherits the text style.\n\t *\n\t * The `id` attribute of the message is automatically generated using the `controlId` value of the control.\n\t */\n\thelperText?: ReactNode\n\n\t/**\n\t * Container that renders its content inside the \"error\" block. The content can be a simple string or a `ReactNode`, in which case it inherits the text style.\n\t *\n\t * The `id` attribute of the error message is automatically generated using the `controlId` value of the control.\n\t */\n\terror?: ReactNode\n\n\t/**\n\t * Can be used to supply any props that the native `<input>` element supports (such as `value`, `placeholder`, in addition to events like `onChange` and `onBlur`)\n\t */\n\tfield: HTMLProps<HTMLInputElement>\n\tclassName?: string\n\ttestingKey?: string\n}\n\nconst ToggleField = ({\n\tisInvalid,\n\tisRequired,\n\tisOptional,\n\tid,\n\tlabel,\n\thelperText,\n\terror,\n\tfield,\n\tclassName,\n\ttestingKey,\n\t...rest\n}: ToggleFieldProps) => {\n\tconst generatedId = useId()\n\tconst inputId = id ?? generatedId\n\treturn (\n\t\t<Field\n\t\t\tlabel={label}\n\t\t\thelperText={helperText}\n\t\t\terror={error}\n\t\t\tisRequired={isRequired}\n\t\t\tisOptional={isOptional}\n\t\t\tid={inputId}\n\t\t\tlayout=\"flag\"\n\t\t\tclassName={className}\n\t\t>\n\t\t\t<ToggleBase\n\t\t\t\tid={inputId}\n\t\t\t\tfield={field}\n\t\t\t\ttestingKey={testingKey}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t</Field>\n\t)\n}\n\nToggleField.displayName = 'ToggleField'\n\ninterface ToggleGroupProps extends ComponentProps<typeof Fieldset> {\n\tchildren: ReactNode\n}\n\nconst ToggleGroupRoot = ({\n\tlayout = 'vertical',\n\tlegend,\n\tisOptional,\n\tisRequired,\n\tchildren,\n}: ToggleGroupProps) => {\n\treturn (\n\t\t<Fieldset\n\t\t\tlayout={layout}\n\t\t\tlegend={legend}\n\t\t\tisOptional={isOptional}\n\t\t\tisRequired={isRequired}\n\t\t>\n\t\t\t{children}\n\t\t</Fieldset>\n\t)\n}\n\nToggleGroupRoot.displayName = 'ToggleGroupRoot'\n\nconst ToggleGroupField = (props: ToggleFieldProps) => {\n\treturn <ToggleField {...props} className={props.className} />\n}\n\nToggleGroupField.displayName = 'ToggleGroupField'\n\nconst ToggleGroup = {\n\tRoot: ToggleGroupRoot,\n\tField: ToggleGroupField,\n}\n\nexport { ToggleBase, ToggleField, ToggleGroup }\n","import classNames from 'classnames'\nimport type { FlightIconSize } from '../flight-icon'\nimport { FlightIcon } from '../flight-icon'\nimport type { HTMLAttributes } from 'react'\nimport s from './style.module.scss'\n\ntype BaseProps = {\n\tsize: 'small' | 'medium' | 'large'\n\ticonSecondary?: string\n\tcolor?:\n\t\t| 'neutral'\n\t\t| 'boundary'\n\t\t| 'consul'\n\t\t| 'nomad'\n\t\t| 'packer'\n\t\t| 'terraform'\n\t\t| 'vagrant'\n\t\t| 'vault'\n\t\t| 'vault-secrets'\n\t\t| 'waypoint'\n} & Omit<HTMLAttributes<HTMLDivElement>, 'className' | 'style'>\n\ntype WithLogo = {\n\tlogo:\n\t\t| 'hcp'\n\t\t| 'boundary'\n\t\t| 'consul'\n\t\t| 'nomad'\n\t\t| 'packer'\n\t\t| 'terraform'\n\t\t| 'vagrant'\n\t\t| 'vault'\n\t\t| 'vault-secrets'\n\t\t| 'waypoint'\n\ticon?: never\n}\n\ntype WithIcon = {\n\ticon: string\n\tlogo?: never\n}\n\ntype IconTileProps = BaseProps & (WithLogo | WithIcon)\n\nconst EXTRA_ICON_SIZE_MAP = {\n\tsmall: 12,\n\tmedium: 16,\n\tlarge: 16,\n} as const satisfies Record<'small' | 'medium' | 'large', FlightIconSize>\n\nconst IconTile = ({\n\tsize = 'medium',\n\tlogo,\n\ticon,\n\ticonSecondary,\n\tcolor = 'neutral',\n\t...rest\n}: IconTileProps) => {\n\tconst iconName = logo ? `${logo}-color` : icon\n\n\tif (iconName) {\n\t\tconst iconSize = size === 'small' ? 16 : 24\n\t\tconst entity = logo ? 'logo' : 'icon'\n\t\tconst colorUse = logo ? logo : color\n\n\t\treturn (\n\t\t\t<div\n\t\t\t\tclassName={classNames(\n\t\t\t\t\ts['icon-tile'],\n\t\t\t\t\ts[`type-${entity}`],\n\t\t\t\t\ts[`size-${size}`],\n\t\t\t\t\ts[`color-${colorUse}`]\n\t\t\t\t)}\n\t\t\t\taria-hidden=\"true\"\n\t\t\t\t{...rest}\n\t\t\t>\n\t\t\t\t<div className={logo ? s.logo : s.icon}>\n\t\t\t\t\t<FlightIcon name={iconName} size={iconSize} stretched />\n\t\t\t\t</div>\n\t\t\t\t{iconSecondary && (\n\t\t\t\t\t<div className={s.extra}>\n\t\t\t\t\t\t<FlightIcon\n\t\t\t\t\t\t\tname={iconSecondary}\n\t\t\t\t\t\t\tsize={EXTRA_ICON_SIZE_MAP[size]}\n\t\t\t\t\t\t\tcolor=\"var(--mds-color-foreground-strong)\"\n\t\t\t\t\t\t/>\n\t\t\t\t\t</div>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t)\n\t}\n}\n\nIconTile.displayName = 'IconTile'\n\nexport type { IconTileProps }\nexport { IconTile }\n","import classNames from 'classnames'\nimport { Interactive } from '../interactive'\nimport s from './inline-link.module.css'\nimport type { FlightIconName } from '../flight-icon'\nimport { FlightIcon } from '../flight-icon'\n\ninterface InlineLinkProps {\n\t/**\n\t * There are two available colors for an `<InlineLink />`: primary and secondary.\n\t */\n\tcolor?: 'primary' | 'secondary'\n\t/**\n\t * Use this parameter to show an icon.\n\t */\n\ticon?: FlightIconName\n\t/**\n\t * Positions the icon before or after the text.\n\t */\n\ticonPosition?: 'leading' | 'trailing'\n\t/**\n\t * URL parameter that’s passed down to the `<a>` element.\n\t */\n\thref: string\n\t/**\n\t * Controls if the <a> link is external. For security reasons, we add the target=\"_blank\" and rel=\"noopener noreferrer\" attributes to it by default.\n\t * default: `false`\n\t */\n\tisHrefExternal?: boolean\n\t/**\n\t * The content of the <a> HTML element.\n\t */\n\ttext: string\n\t/**\n\t * Optional class name to add to the component.\n\t */\n\tclassName?: string\n\tprefetch?: boolean\n\tlocale?: string\n}\n\nconst InlineLink = ({\n\ttext,\n\tcolor = 'primary',\n\ticon,\n\ticonPosition = 'trailing',\n\tclassName,\n\tisHrefExternal,\n\t...props\n}: InlineLinkProps) => {\n\tconst resolvedIcon = icon || !isHrefExternal ? icon : 'external-link'\n\tconst iconElement = resolvedIcon && (\n\t\t<FlightIcon name={resolvedIcon} size={16} className={s.icon} />\n\t)\n\n\treturn (\n\t\t<Interactive\n\t\t\tclassName={classNames(s['link-inline'], s[`color-${color}`], className)}\n\t\t\t{...props}\n\t\t>\n\t\t\t{iconElement && iconPosition === 'leading' && iconElement}\n\t\t\t{text}\n\t\t\t{iconElement && iconPosition === 'trailing' && iconElement}\n\t\t</Interactive>\n\t)\n}\n\nInlineLink.displayName = 'InlineLink'\n\nexport type { InlineLinkProps }\nexport { InlineLink }\n","import type { ButtonColor, Theme, ThemeVariant } from './types'\n\nexport const COLORS = [\n\t'primary',\n\t'primary-black',\n\t'primary-white',\n\t'secondary', // deprecated; maps to secondary-white\n\t'secondary-high-contrast', // alternates between secondary-black and secondary-white based on theme\n\t'secondary-white',\n\t'secondary-black',\n\t'tertiary',\n\t'critical',\n\t'boundary',\n\t'consul',\n\t'nomad',\n\t'packer',\n\t'terraform',\n\t'vagrant',\n\t'vault',\n\t'waypoint',\n\t'hashicorp', // alias to primary\n] as const\n\nexport function determineColor(theme?: Theme): ButtonColor {\n\tconst variant: ThemeVariant = theme?.variant ? theme.variant : 'primary'\n\n\tif (variant === 'primary') {\n\t\tswitch (theme?.brand) {\n\t\t\tcase 'hashicorp':\n\t\t\t\treturn 'primary'\n\t\t\tcase 'boundary':\n\t\t\tcase 'consul':\n\t\t\tcase 'nomad':\n\t\t\tcase 'packer':\n\t\t\tcase 'terraform':\n\t\t\tcase 'vagrant':\n\t\t\tcase 'vault':\n\t\t\tcase 'waypoint':\n\t\t\t\treturn theme.brand\n\t\t\tcase 'neutral':\n\t\t\t\treturn 'secondary-high-contrast'\n\t\t\tdefault:\n\t\t\t\treturn 'primary'\n\t\t}\n\t}\n\n\tif (variant === 'secondary') {\n\t\treturn 'secondary'\n\t}\n\n\tif (\n\t\tvariant === 'tertiary' ||\n\t\tvariant === 'tertiary-neutral' ||\n\t\tvariant === 'ghost'\n\t) {\n\t\treturn 'tertiary'\n\t}\n\n\tthrow new Error(\n\t\t`Unable to determine HDS Button color from theme: ${JSON.stringify(theme)}`\n\t)\n}\n\nexport const LINK_TYPE_ICON_MAP = {\n\tinbound: 'arrow-right',\n\toutbound: 'external-link',\n\tdownload: 'download',\n\tanchor: 'anchor',\n}\n","import { type ForwardRefExoticComponent, forwardRef } from 'react'\nimport type { ButtonProps } from './types'\nimport { determineColor, LINK_TYPE_ICON_MAP } from './utils'\nimport { StandaloneLink } from '../standalone-link'\nimport { Button } from '../button'\n\n/** @deprecated Use <Button> from '@hashicorp/mds-react/button' instead. Will be removed in v1.0. */\nconst MDSButton = forwardRef<\n\tHTMLAnchorElement | HTMLButtonElement,\n\tButtonProps\n>(\n\t(\n\t\t{\n\t\t\tlocale,\n\t\t\ttext,\n\t\t\ttitle,\n\t\t\turl,\n\t\t\thref,\n\t\t\tlinkType,\n\t\t\tonClick,\n\t\t\texternal,\n\t\t\tclassName,\n\t\t\tsize,\n\t\t\ticon,\n\t\t\ticonPosition = 'trailing',\n\t\t\tlabel,\n\t\t\tdisabled,\n\t\t\ttype,\n\t\t\ttheme,\n\t\t\t...rest\n\t\t},\n\t\tref\n\t) => {\n\t\tconst color = determineColor(theme)\n\n\t\tif (color === 'tertiary') {\n\t\t\t// We prefer the Standalone Link component over the tertiary\n\t\t\t// button styles.\n\t\t\treturn (\n\t\t\t\t<StandaloneLink\n\t\t\t\t\ttext={(text || title) as string}\n\t\t\t\t\tcolor={\n\t\t\t\t\t\ttheme?.background === 'dark' ? 'secondary-inverted' : 'secondary'\n\t\t\t\t\t}\n\t\t\t\t\thref={url || href}\n\t\t\t\t\ticon={linkType ? LINK_TYPE_ICON_MAP[linkType] : icon}\n\t\t\t\t\ticonPosition={linkType ? 'trailing' : iconPosition}\n\t\t\t\t\tclassName={className}\n\t\t\t\t\tonClick={onClick as () => void}\n\t\t\t\t\tsize={size}\n\t\t\t\t\tisHrefExternal={linkType === 'outbound' || external}\n\t\t\t\t\tref={ref as ForwardRefExoticComponent<HTMLAnchorElement>}\n\t\t\t\t\tlocale={locale}\n\t\t\t\t/>\n\t\t\t)\n\t\t}\n\n\t\treturn (\n\t\t\t<Button\n\t\t\t\ttext={text || title}\n\t\t\t\thref={url || href}\n\t\t\t\tisHrefExternal={linkType === 'outbound' || external}\n\t\t\t\tcolor={determineColor(theme)}\n\t\t\t\ttype={type}\n\t\t\t\ticon={linkType ? LINK_TYPE_ICON_MAP[linkType] : icon}\n\t\t\t\ticonPosition={linkType ? 'trailing' : iconPosition}\n\t\t\t\tonClick={onClick as React.MouseEventHandler<HTMLButtonElement>}\n\t\t\t\tclassName={className}\n\t\t\t\t// Default buttons to the large size unless we specifically request the\n\t\t\t\t// small variant\n\t\t\t\tsize={size === 'small' ? 'medium' : 'large'}\n\t\t\t\taria-label={label}\n\t\t\t\tdisabled={disabled}\n\t\t\t\tref={ref as ForwardRefExoticComponent<HTMLButtonElement>}\n\t\t\t\tlocale={locale}\n\t\t\t\t{...rest}\n\t\t\t/>\n\t\t)\n\t}\n)\n\nMDSButton.displayName = 'MDSButton'\n\nexport { MDSButton }\n","import classNames from 'classnames'\nimport { DismissButton } from '../dismiss-button'\nimport type { DetailedHTMLProps, DialogHTMLAttributes } from 'react'\nimport s from './dialog.module.scss'\n\ninterface OverlayProps {\n\tclassName?: string\n}\n\nconst Overlay = ({ className }: OverlayProps) => {\n\treturn <div className={classNames(s.overlay, className)}></div>\n}\n\ninterface DialogProps\n\textends DetailedHTMLProps<\n\t\tDialogHTMLAttributes<HTMLDialogElement>,\n\t\tHTMLDialogElement\n\t> {\n\tonDismiss: () => void\n}\n\nconst Wrapper = ({ children, className, onDismiss, ...rest }: DialogProps) => {\n\treturn (\n\t\t<dialog className={classNames(s.wrapper, className)} {...rest}>\n\t\t\t<DismissButton onClick={onDismiss} className={s.dismiss} />\n\t\t\t{children}\n\t\t</dialog>\n\t)\n}\n\nconst Dialog = {\n\tOverlay,\n\tWrapper,\n}\n\nexport { Dialog }\n","'use client'\n\nimport { createContext, useContext } from 'react'\nimport type { ReactNode } from 'react'\n\nexport interface ModalContextState {\n\tisOpen: boolean\n\topenModal: (content: ReactNode) => void\n\tcloseModal: () => void\n}\n\nexport const ModalContext = createContext<ModalContextState | undefined>(\n\tundefined\n)\nModalContext.displayName = 'ModalContext'\n\nexport function useModal(): ModalContextState {\n\tconst context = useContext(ModalContext)\n\tif (context === undefined) {\n\t\tthrow new Error('useModal must be used within a ModalContext.Provider')\n\t}\n\treturn context\n}\n","'use client'\n\nimport { useMemo, useState, useCallback, useEffect } from 'react'\nimport FocusLock from 'react-focus-lock'\nimport { Dialog } from '../dialog-primitive'\nimport { ModalContext, useModal } from './use-modal'\nimport type { ReactNode } from 'react'\nimport type { ModalContextState } from './use-modal'\nimport s from './modal.module.css'\n\ninterface ModalProps {\n\tinitialIsOpen?: boolean\n\tinitialModalContent?: ReactNode\n\tonClose?: () => void\n\tchildren: ReactNode\n}\n\nconst ModalProvider = ({\n\tonClose,\n\tinitialIsOpen = false,\n\tinitialModalContent = null,\n\tchildren,\n}: ModalProps) => {\n\tconst [modalContent, setModalContent] = useState<ReactNode | null>(\n\t\tinitialModalContent\n\t)\n\tconst [isOpen, setIsOpen] = useState(initialIsOpen)\n\n\tconst closeModal = useCallback(() => {\n\t\tsetIsOpen(false)\n\t\tsetModalContent(null)\n\t\tif (onClose) {\n\t\t\tonClose()\n\t\t}\n\t}, [setIsOpen, onClose])\n\n\tconst openModal = useCallback(\n\t\t(content: ReactNode) => {\n\t\t\tsetModalContent(content)\n\t\t\tsetIsOpen(true)\n\t\t},\n\t\t[setIsOpen]\n\t)\n\n\tconst contextValue: ModalContextState = useMemo(\n\t\t() => ({\n\t\t\tisOpen,\n\t\t\topenModal,\n\t\t\tmodalContent,\n\t\t\tcloseModal,\n\t\t}),\n\t\t[isOpen, openModal, closeModal, modalContent]\n\t)\n\n\tuseEffect(() => {\n\t\tconst handleKeyDown = (event: KeyboardEvent) => {\n\t\t\tif (event.key === 'Escape' && isOpen) {\n\t\t\t\tcloseModal()\n\t\t\t}\n\t\t}\n\t\tif (isOpen) {\n\t\t\twindow.addEventListener('keydown', handleKeyDown)\n\t\t}\n\n\t\treturn () => {\n\t\t\tif (isOpen) {\n\t\t\t\twindow.removeEventListener('keydown', handleKeyDown)\n\t\t\t}\n\t\t}\n\t}, [isOpen, closeModal])\n\n\treturn (\n\t\t<ModalContext.Provider value={contextValue}>\n\t\t\t{children}\n\t\t\t{isOpen && modalContent && (\n\t\t\t\t<>\n\t\t\t\t\t<FocusLock>\n\t\t\t\t\t\t<Dialog.Wrapper\n\t\t\t\t\t\t\tonDismiss={closeModal}\n\t\t\t\t\t\t\tclassName={s.modal}\n\t\t\t\t\t\t\topen={isOpen}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{modalContent}\n\t\t\t\t\t\t</Dialog.Wrapper>\n\t\t\t\t\t</FocusLock>\n\t\t\t\t\t<Dialog.Overlay />\n\t\t\t\t</>\n\t\t\t)}\n\t\t</ModalContext.Provider>\n\t)\n}\n\nModalProvider.displayName = 'ModalProvider'\n\nexport { useModal, ModalProvider }\n","import type { HTMLAttributes } from 'react'\nimport classNames from 'classnames'\nimport s from './separator.module.css'\n\ninterface SeparatorProps extends HTMLAttributes<HTMLHRElement> {\n\tspacing?: '0' | '24'\n}\n\nconst Separator = ({ spacing = '24', className, ...rest }: SeparatorProps) => {\n\treturn (\n\t\t<hr\n\t\t\tclassName={classNames(s.separator, s[`spacing-${spacing}`], className)}\n\t\t\t{...rest}\n\t\t/>\n\t)\n}\n\nSeparator.displayName = 'Separator'\n\nexport type { SeparatorProps }\nexport { Separator }\n","export const DEFAULT_DENSITY = 'medium'\nexport const DENSITIES = ['default', 'medium', 'short', 'tall'] as const\nexport type Density = (typeof DENSITIES)[number]\nexport const getDensity = (densityStr: string): Density => {\n\tconst density = densityStr as Density\n\treturn DENSITIES.includes(density) ? density : DEFAULT_DENSITY\n}\n\nexport const DEFAULT_VERTICAL_ALIGNMENT = 'top'\nexport const VERTICAL_ALIGNMENTS = ['baseline', 'middle', 'top'] as const\nexport type VerticalAlignment = (typeof VERTICAL_ALIGNMENTS)[number]\nexport const getVerticalAlignment = (valignStr: string): VerticalAlignment => {\n\tconst valign = valignStr as VerticalAlignment\n\treturn VERTICAL_ALIGNMENTS.includes(valign)\n\t\t? valign\n\t\t: DEFAULT_VERTICAL_ALIGNMENT\n}\n\nexport const DEFAULT_ALIGNMENT = 'left'\nexport const ALIGNMENTS = ['left', 'center', 'right'] as const\nexport type HorizontalAlignment = (typeof ALIGNMENTS)[number]\nexport const getHorizontalAlignment = (\n\talignStr: string\n): HorizontalAlignment => {\n\tconst align = alignStr as HorizontalAlignment\n\treturn ALIGNMENTS.includes(align) ? align : DEFAULT_ALIGNMENT\n}\n\nexport const DEFAULT_SCOPE = 'col'\nexport const SCOPES = ['col', 'row'] as const\nexport type Scope = (typeof SCOPES)[number]\nexport const getScope = (scopeStr: string): Scope => {\n\tconst scope = scopeStr as Scope\n\treturn SCOPES.includes(scope) ? scope : DEFAULT_SCOPE\n}\n","import classNames from 'classnames'\nimport { DEFAULT_ALIGNMENT, type HorizontalAlignment } from './utils'\nimport type { HTMLAttributes, ReactNode } from 'react'\nimport s from './table.module.scss'\n\nexport interface TDProps extends HTMLAttributes<HTMLTableCellElement> {\n\t/**\n\t * Determines the horizontal content alignment (sometimes referred to as text alignment) for the cell (make sure it is also set for the column header).\n\t */\n\talign?: HorizontalAlignment\n\t/**\n\t * Elements passed as children are yielded as inner content of a <td> HTML element.\n\t */\n\tchildren: ReactNode\n}\n\nconst TD = ({\n\talign = DEFAULT_ALIGNMENT,\n\tchildren,\n\tclassName,\n\t...rest\n}: TDProps) => {\n\treturn (\n\t\t<td\n\t\t\tclassName={classNames(\n\t\t\t\ts.td,\n\t\t\t\ts[`align-${align}`],\n\t\t\t\t'mds-typography-legacy-body-200',\n\t\t\t\t'mds-typography-font-weight-regular',\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\t{...rest}\n\t\t>\n\t\t\t<div className={s.content}>{children}</div>\n\t\t</td>\n\t)\n}\n\nTD.displayName = 'B.Td'\n\nexport { TD }\n","'use client'\n\nimport Tippy, { type TippyProps } from '@tippyjs/react'\nimport { followCursor, type Plugin } from 'tippy.js'\nimport type { ReactElement } from 'react'\nimport 'tippy.js/dist/svg-arrow.css'\n\nexport interface TooltipProps {\n\toptions?: TippyProps\n\tchildren: TippyProps['children']\n\ttext: string | ReactElement\n}\n\nexport interface HideOnEsc extends Plugin {\n\tname: 'hideOnEsc'\n\tdefaultValue: true\n}\n\nconst hideOnEsc = {\n\tname: 'hideOnEsc',\n\tdefaultValue: true,\n\tfn(instance: { hide: () => void }) {\n\t\tfunction onKeyDown(event: KeyboardEvent): void {\n\t\t\tif (event.key === 'Escape') {\n\t\t\t\tinstance.hide()\n\t\t\t}\n\t\t}\n\n\t\treturn {\n\t\t\tonShow() {\n\t\t\t\tdocument.addEventListener('keydown', onKeyDown)\n\t\t\t},\n\t\t\tonHide() {\n\t\t\t\tdocument.removeEventListener('keydown', onKeyDown)\n\t\t\t},\n\t\t}\n\t},\n}\n\nexport const Tooltip = ({ options = {}, children, text }: TooltipProps) => {\n\tconst plugins =\n\t\toptions.followCursor !== undefined ? [hideOnEsc, followCursor] : [hideOnEsc]\n\n\treturn (\n\t\t<Tippy\n\t\t\ttheme=\"hds\"\n\t\t\tarrow={`<svg\n\t\t\t\t\tclassName=\"hds-tooltip-pointer\"\n\t\t\t\t\twidth=\"16\"\n\t\t\t\t\theight=\"7\"\n\t\t\t\t\tviewBox=\"0 0 16 7\"\n\t\t\t\t\txmlns=\"http://www.w3.org/2000/svg\"\n\t\t\t\t>\n\t\t\t\t\t<path d=\"M0 7H16L9.11989 0.444571C8.49776 -0.148191 7.50224 -0.148191 6.88011 0.444572L0 7Z\" />\n\t\t\t\t</svg>`}\n\t\t\tinteractive\n\t\t\taria={{\n\t\t\t\tcontent: 'describedby',\n\t\t\t}}\n\t\t\tplugins={plugins}\n\t\t\tcontent={text}\n\t\t\t{...options}\n\t\t>\n\t\t\t{children}\n\t\t</Tippy>\n\t)\n}\n","import { useId } from 'react'\nimport { Tooltip } from '../hds/wrappers/tooltip'\nimport { FlightIcon } from '../flight-icon'\nimport s from './table.module.scss'\n\ninterface TooltipProps {\n\ttooltip: string\n\tlabelId: string\n}\n\nexport const ThButtonTooltip = ({ tooltip, labelId }: TooltipProps) => {\n\tconst prefixLabelId = useId()\n\n\treturn (\n\t\t<Tooltip text={tooltip}>\n\t\t\t<button\n\t\t\t\ttype=\"button\"\n\t\t\t\tclassName={s['th-button']}\n\t\t\t\taria-labelledby={`${prefixLabelId} ${labelId}`}\n\t\t\t>\n\t\t\t\t<span id={prefixLabelId} className={s['aria-label-hidden-segment']}>\n\t\t\t\t\tMore information for\n\t\t\t\t</span>\n\t\t\t\t<FlightIcon name=\"info\" />\n\t\t\t</button>\n\t\t</Tooltip>\n\t)\n}\n","import classNames from 'classnames'\nimport { DEFAULT_ALIGNMENT, DEFAULT_SCOPE } from './utils'\nimport { useId, type HTMLAttributes, type ReactNode } from 'react'\nimport { ThButtonTooltip } from './th-button-tooltip'\nimport type { HorizontalAlignment, Scope } from './utils'\nimport s from './table.module.scss'\n\nexport interface THProps extends HTMLAttributes<HTMLTableCellElement> {\n\t/**\n\t * Determines the horizontal content alignment (sometimes referred to as text alignment) for the column header.\n\t */\n\talign?: HorizontalAlignment\n\t/**\n\t * If used as the first item in a table body’s row, scope should be set to row for accessibility purposes.\n\t */\n\tscope?: Scope\n\t/**\n\t * Any valid CSS\n\t * If set, determines the column’s width.\n\t */\n\twidth?: string\n\t/**\n\t * Text string which will appear in the tooltip. May contain basic HTML tags for formatting text such as strong and em tags. Not intended for multi-paragraph text or other more complex content. May not contain interactive content such as links or buttons. The placement and offset are automatically set and can’t be overwritten.\n\t */\n\ttooltip?: string\n\t/**\n\t * If set to `true`, it visually hides the column’s text content (it will still be available to screen readers for accessibility).\n\t */\n\tisVisuallyHidden?: boolean\n\t/**\n\t * Elements passed as children are yielded as inner content of a `<th>` HTML element.\n\t */\n\tchildren: ReactNode\n}\n\nconst TH = ({\n\talign = DEFAULT_ALIGNMENT,\n\twidth,\n\tscope = DEFAULT_SCOPE,\n\ttooltip,\n\tisVisuallyHidden,\n\tchildren,\n\tclassName,\n\t...rest\n}: THProps) => {\n\tconst labelId = useId()\n\tlet content: React.ReactNode\n\n\tif (isVisuallyHidden) {\n\t\tcontent = <span className=\"sr-only\">{children}</span>\n\t} else if (tooltip) {\n\t\tcontent = (\n\t\t\t<div className={s.content}>\n\t\t\t\t<span id={labelId}>{children}</span>\n\t\t\t\t<ThButtonTooltip tooltip={tooltip} labelId={labelId} />\n\t\t\t</div>\n\t\t)\n\t} else {\n\t\tcontent = <div className={s.content}>{children}</div>\n\t}\n\n\treturn (\n\t\t<th\n\t\t\tclassName={classNames(\n\t\t\t\ts.th,\n\t\t\t\ts[`align-${align}`],\n\t\t\t\t'mds-typography-legacy-body-200',\n\t\t\t\t'mds-typography-font-weight-semibold',\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\tstyle={width ? { width, minWidth: width } : {}}\n\t\t\t{...rest}\n\t\t\tscope={scope}\n\t\t>\n\t\t\t{content}\n\t\t</th>\n\t)\n}\n\nTH.displayName = 'H.TH'\n\nexport { TH }\n","import classNames from 'classnames'\nimport type { HTMLAttributes, ReactNode } from 'react'\nimport s from './table.module.scss'\n\nexport interface TRProps extends HTMLAttributes<HTMLTableRowElement> {\n\t/**\n\t * Elements passed as children are yielded as inner content of a `<tr>` HTML element.\n\t */\n\tchildren: ReactNode\n}\n\nconst TR = ({ children, className, ...rest }: TRProps) => {\n\treturn (\n\t\t<tr className={classNames(s.tr, className)} {...rest}>\n\t\t\t{children}\n\t\t</tr>\n\t)\n}\n\nTR.displayName = 'T.TR'\n\nexport { TR }\n","import classNames from 'classnames'\nimport { TD } from './td'\nimport { TH } from './th'\nimport { TR } from './tr'\nimport type { HTMLAttributes, ReactNode } from 'react'\nimport {\n\tDEFAULT_DENSITY,\n\tDEFAULT_VERTICAL_ALIGNMENT,\n\ttype Density,\n\ttype VerticalAlignment,\n} from './utils'\nimport s from './table.module.scss'\n\nexport interface TableProps extends HTMLAttributes<HTMLTableElement> {\n\t/**\n\t * Define on the table invocation. If set to `true`, even-numbered rows will have a different background color from odd-numbered rows.\n\t */\n\tisStriped?: boolean\n\t/**\n\t * If set to `true`, the `table-display`(CSS) property will be set to fixed. See [MDN reference on table-layout](https://developer.mozilla.org/en-US/docs/Web/CSS/table-layout) for more details.\n\t */\n\tisFixedLayout?: boolean\n\t/**\n\t * If set, determines the density (height) of the table body’s rows.\n\t */\n\tdensity?: Density\n\t/**\n\t * Determines the vertical alignment for content in a table. Does not apply to table headers (`th`). See [MDN reference on vertical-align](https://developer.mozilla.org/en-US/docs/Web/CSS/vertical-align) for more details.\n\t */\n\tvalign?: VerticalAlignment\n\t/**\n\t * Adds a (non-visible) caption for users with assistive technology. If set on a sortable table, the provided table caption is paired with the automatically generated sorted message text.\n\t */\n\tcaption?: string\n}\n\nfunction Root({\n\tcaption,\n\tdensity = DEFAULT_DENSITY,\n\tvalign = DEFAULT_VERTICAL_ALIGNMENT,\n\tisStriped,\n\tisFixedLayout,\n\tchildren,\n\tclassName,\n\t...rest\n}: TableProps) {\n\treturn (\n\t\t<table\n\t\t\tclassName={classNames(\n\t\t\t\ts.table,\n\t\t\t\ts[`density-${density}`],\n\t\t\t\ts[`valign-${valign}`],\n\t\t\t\t{\n\t\t\t\t\t[s.striped]: isStriped,\n\t\t\t\t\t[s['layout-fixed']]: isFixedLayout,\n\t\t\t\t},\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\t{...rest}\n\t\t>\n\t\t\t{caption && <caption className=\"sr-only\">{caption}</caption>}\n\t\t\t{children}\n\t\t</table>\n\t)\n}\nRoot.displayName = 'Table'\n\nfunction THead({ children }: { children: ReactNode }) {\n\treturn <thead className={s.thead}>{children}</thead>\n}\nTHead.displayName = 'T.Head'\n\nfunction TBody({ children }: { children: ReactNode }) {\n\treturn <tbody className={s.tbody}>{children}</tbody>\n}\nTBody.displayName = 'T.Body'\n\nconst Table = { Root, TR, THead, TH, TBody, TD }\n\nexport { Table }\n","'use client'\n\nimport {\n\ttype MutableRefObject,\n\ttype MouseEvent,\n\ttype KeyboardEvent,\n\tcreateContext,\n\tuseContext,\n} from 'react'\n\ninterface TabsContextState {\n\ttabNodes: MutableRefObject<Array<HTMLButtonElement>>\n\tpanelNodes: MutableRefObject<Array<HTMLDivElement>>\n\ttabIds: Array<string>\n\tpanelIds: Array<string>\n\tselectedTabIndex: number\n\tonClick: (tabIndex: number, event: MouseEvent<HTMLButtonElement>) => void\n\tonKeyUp: (tabIndex: number, event: KeyboardEvent<HTMLButtonElement>) => void\n\tsize: 'medium' | 'large'\n\ttabsListRef: MutableRefObject<HTMLUListElement | null>\n}\n\nexport const TabsContext = createContext<TabsContextState | undefined>(\n\tundefined\n)\n\nexport function useTabsContext(): TabsContextState {\n\tconst context = useContext(TabsContext)\n\tif (context === undefined) {\n\t\tthrow new Error('useTabsContext must be used within a TabsContext.Provider')\n\t}\n\treturn context\n}\n","'use client'\n\nimport { useId, useMemo, type HTMLAttributes } from 'react'\nimport classNames from 'classnames'\nimport { useTabsContext } from './use-tabs-context'\nimport s from './tabs.module.scss'\n\ntype TabPanelProps = HTMLAttributes<HTMLDivElement>\n\nconst TabPanel = ({ children, className, ...rest }: TabPanelProps) => {\n\tconst { panelIds, tabIds, selectedTabIndex, panelNodes } = useTabsContext()\n\tconst panelId = 'panel-' + useId()\n\n\tconst nodeIndex = useMemo(\n\t\t() => panelIds.indexOf(panelId),\n\t\t[panelIds, panelId]\n\t)\n\n\tconst tabId = useMemo(\n\t\t() => (nodeIndex > -1 ? tabIds[nodeIndex] : undefined),\n\t\t[tabIds, nodeIndex]\n\t)\n\n\tconst isSelected = useMemo(\n\t\t() => nodeIndex === selectedTabIndex,\n\t\t[nodeIndex, selectedTabIndex]\n\t)\n\n\treturn (\n\t\t<section\n\t\t\tclassName={classNames(s.panel, className)}\n\t\t\t{...rest}\n\t\t\trole=\"tabpanel\"\n\t\t\taria-labelledby={tabId}\n\t\t\tid={panelId}\n\t\t\thidden={!isSelected}\n\t\t\tref={(el: HTMLDivElement) => panelNodes.current.push(el)}\n\t\t>\n\t\t\t{children}\n\t\t</section>\n\t)\n}\n\nexport type { TabPanelProps }\nexport { TabPanel }\n","'use client'\n\nimport classNames from 'classnames'\nimport { BadgeCount } from '../badge-count'\nimport { useId, type HTMLAttributes, useMemo } from 'react'\nimport { useTabsContext } from './use-tabs-context'\nimport type { FlightIconName } from '../flight-icon'\nimport { FlightIcon } from '../flight-icon'\nimport s from './tabs.module.scss'\n\ninterface TabProps extends HTMLAttributes<HTMLLIElement> {\n\ttabIndicatorTheme?: 'primary' | 'secondary'\n\t/**\n\t * Displays a count indicator in the tab. Accepts the text value that should go in Badge Count. (optional)\n\t */\n\tcount?: string\n\t/**\n\t * Displays an icon in the tab. (optional)\n\t */\n\ticon?: FlightIconName\n\t/**\n\t * Customizes the initial tab to display when the page is loaded. The first tab is selected on page load by default. (optional)\n\t */\n\tisSelected?: boolean\n\t/**\n\t * Used to append analytics and tracking related data attributes to any interactive element internal to this component.\n\t */\n\ttrackingKey?: string\n}\n\nconst Tab = ({\n\tcount,\n\ticon,\n\tisSelected: isInitialTab,\n\tchildren,\n\tclassName,\n\ttrackingKey,\n\ttabIndicatorTheme = 'primary',\n\t...rest\n}: TabProps) => {\n\tconst { tabNodes, tabIds, selectedTabIndex, onClick, onKeyUp, size } =\n\t\tuseTabsContext()\n\tconst tabId = 'tab-' + useId()\n\n\tconst nodeIndex = useMemo(() => tabIds.indexOf(tabId), [tabIds, tabId])\n\n\tconst isSelected = useMemo(\n\t\t() => nodeIndex === selectedTabIndex,\n\t\t[nodeIndex, selectedTabIndex]\n\t)\n\n\treturn (\n\t\t<li\n\t\t\tclassName={classNames(\n\t\t\t\ts.tab,\n\t\t\t\ts[tabIndicatorTheme],\n\t\t\t\t{\n\t\t\t\t\t[s.selected]: isSelected,\n\t\t\t\t},\n\t\t\t\tclassName\n\t\t\t)}\n\t\t\t{...rest}\n\t\t\trole=\"presentation\"\n\t\t>\n\t\t\t<button\n\t\t\t\tclassName={classNames(\n\t\t\t\t\ts['tab-button'],\n\t\t\t\t\t'mds-typography-font-weight-medium',\n\t\t\t\t\t{\n\t\t\t\t\t\t['mds-typography-legacy-body-200']: size === 'medium',\n\t\t\t\t\t\t['mds-typography-legacy-body-300']: size === 'large',\n\t\t\t\t\t}\n\t\t\t\t)}\n\t\t\t\trole=\"tab\"\n\t\t\t\ttype=\"button\"\n\t\t\t\tid={tabId}\n\t\t\t\taria-selected={isSelected}\n\t\t\t\ttabIndex={!isSelected ? -1 : undefined}\n\t\t\t\tonClick={(e) => onClick(nodeIndex, e)}\n\t\t\t\tonKeyUp={(e) => onKeyUp(nodeIndex, e)}\n\t\t\t\tdata-is-selected={isInitialTab}\n\t\t\t\tdata-analytics={trackingKey}\n\t\t\t\tref={(el: HTMLButtonElement) => tabNodes.current.push(el)}\n\t\t\t>\n\t\t\t\t{icon && <FlightIcon name={icon} size={16} role=\"presentation\" />}\n\n\t\t\t\t{children}\n\n\t\t\t\t{count && <BadgeCount text={count} size=\"small\" role=\"presentation\" />}\n\t\t\t</button>\n\t\t</li>\n\t)\n}\n\nexport type { TabProps }\nexport { Tab }\n","'use client'\n\nimport classNames from 'classnames'\nimport {\n\ttype ReactNode,\n\ttype HTMLAttributes,\n\ttype KeyboardEvent,\n\ttype MouseEvent,\n\tuseState,\n\tuseMemo,\n\tuseRef,\n\tuseEffect,\n\tuseCallback,\n} from 'react'\nimport { TabPanel } from './tab-panel'\nimport { Tab } from './tab'\nimport { TabsContext, useTabsContext } from './use-tabs-context'\nimport s from './tabs.module.scss'\n\nexport interface TabsProps extends HTMLAttributes<HTMLDivElement> {\n\tonClickTab?: (event: MouseEvent<HTMLButtonElement>, tabIndex: number) => void\n\tinitialSelectedTabIndex?: number\n\tsize?: 'medium' | 'large'\n}\n\nconst Provider = ({\n\tchildren,\n\tonClickTab,\n\tinitialSelectedTabIndex = 0,\n\tsize = 'medium',\n\tclassName,\n\t...rest\n}: TabsProps) => {\n\tconst [selectedTabIndex, setSelectedTabIndex] = useState(\n\t\tinitialSelectedTabIndex\n\t)\n\tconst tabNodes = useRef<Array<HTMLButtonElement>>([])\n\tconst panelNodes = useRef<Array<HTMLDivElement>>([])\n\tconst [tabIds, setTabIds] = useState<Array<string>>([])\n\tconst [panelIds, setPanelIds] = useState<Array<string>>([])\n\tconst [indicatorWidth, setIndicatorWidth] = useState(0)\n\tconst [indicatorLeftPosition, setIndicatorLeftPosition] = useState(0)\n\tconst tabsListRef = useRef<HTMLUListElement | null>(null)\n\n\tconst scrollIntoView = useCallback((tabIndex: number) => {\n\t\t// Scroll Tab into view if it's out of view\n\t\tconst parentNode = tabNodes.current[tabIndex]\n\t\t\t?.parentNode as HTMLElement | null\n\t\tif (parentNode) {\n\t\t\tparentNode.scrollIntoView({\n\t\t\t\tbehavior: 'smooth',\n\t\t\t\tblock: 'nearest',\n\t\t\t\tinline: 'nearest',\n\t\t\t})\n\t\t}\n\t}, [])\n\n\tuseEffect(() => {\n\t\tsetSelectedTabIndex(initialSelectedTabIndex)\n\t}, [initialSelectedTabIndex])\n\n\tuseEffect(() => {\n\t\tconst tabElem = tabNodes.current[selectedTabIndex]?.parentElement\n\t\tif (tabElem && tabsListRef.current) {\n\t\t\tconst tabLeftPos = tabElem.offsetLeft\n\t\t\tconst tabWidth = tabElem.offsetWidth\n\t\t\tsetIndicatorLeftPosition(tabLeftPos)\n\t\t\tsetIndicatorWidth(tabWidth)\n\t\t\ttabsListRef.current.scrollTo({\n\t\t\t\tleft: tabLeftPos,\n\t\t\t\tbehavior: 'smooth',\n\t\t\t})\n\t\t}\n\t}, [tabNodes, selectedTabIndex, scrollIntoView, tabsListRef])\n\n\tuseEffect(() => {\n\t\tsetTabIds(tabNodes.current.map((tab) => tab.id))\n\t\tlet initialTabIndex = 0\n\t\tlet selectedCount = 0\n\n\t\ttabNodes.current.forEach((tabElement, index) => {\n\t\t\tif (tabElement.hasAttribute('data-is-selected')) {\n\t\t\t\tinitialTabIndex = index\n\t\t\t\tselectedCount++\n\t\t\t}\n\t\t})\n\n\t\tif (selectedCount > 1) {\n\t\t\tthrow new Error('Only one tab may use isSelected argument')\n\t\t}\n\n\t\tsetSelectedTabIndex(initialTabIndex)\n\t}, [tabNodes])\n\n\tuseEffect(() => {\n\t\tsetPanelIds(panelNodes.current.map((tab) => tab.id))\n\t}, [panelNodes])\n\n\tconst onClick = useCallback(\n\t\t(tabIndex: number, event: MouseEvent<HTMLButtonElement>) => {\n\t\t\tsetSelectedTabIndex(tabIndex)\n\n\t\t\tscrollIntoView(tabIndex)\n\n\t\t\t// invoke the callback function if it's provided as argument\n\t\t\tif (typeof onClickTab === 'function') {\n\t\t\t\tonClickTab(event, tabIndex)\n\t\t\t}\n\t\t},\n\t\t[onClickTab, scrollIntoView]\n\t)\n\n\t// Focus tab for keyboard & mouse navigation:\n\tconst focusTab = useCallback(\n\t\t(tabIndex: number, e: KeyboardEvent<HTMLButtonElement>) => {\n\t\t\te.preventDefault()\n\t\t\ttabNodes.current[tabIndex].focus()\n\t\t},\n\t\t[]\n\t)\n\n\tconst onKeyUp = useCallback(\n\t\t(tabIndex: number, e: KeyboardEvent<HTMLButtonElement>) => {\n\t\t\tconst leftArrow = 'ArrowLeft'\n\t\t\tconst rightArrow = 'ArrowRight'\n\t\t\tconst enterKey = 'Enter'\n\t\t\tconst spaceKey = ' '\n\n\t\t\tif (e.key === rightArrow) {\n\t\t\t\tconst nextTabIndex = (tabIndex + 1) % tabIds.length\n\t\t\t\tfocusTab(nextTabIndex, e)\n\t\t\t} else if (e.key === leftArrow) {\n\t\t\t\tconst prevTabIndex = (tabIndex + tabIds.length - 1) % tabIds.length\n\t\t\t\tfocusTab(prevTabIndex, e)\n\t\t\t} else if (e.key === enterKey || e.key === spaceKey) {\n\t\t\t\tsetSelectedTabIndex(tabIndex)\n\t\t\t}\n\t\t},\n\t\t[focusTab, tabIds.length]\n\t)\n\n\tconst contextValue = useMemo(\n\t\t() => ({\n\t\t\ttabNodes,\n\t\t\ttabIds,\n\t\t\tpanelNodes,\n\t\t\tpanelIds,\n\t\t\tselectedTabIndex,\n\t\t\tonClick,\n\t\t\tonKeyUp,\n\t\t\tsize,\n\t\t\ttabsListRef,\n\t\t}),\n\t\t[\n\t\t\ttabNodes,\n\t\t\ttabIds,\n\t\t\tpanelNodes,\n\t\t\tpanelIds,\n\t\t\tselectedTabIndex,\n\t\t\tonClick,\n\t\t\tonKeyUp,\n\t\t\tsize,\n\t\t\ttabsListRef,\n\t\t]\n\t)\n\n\treturn (\n\t\t<TabsContext.Provider value={contextValue}>\n\t\t\t<div\n\t\t\t\tclassName={classNames(s.tabs, className)}\n\t\t\t\t{...rest}\n\t\t\t\tstyle={{\n\t\t\t\t\t['--indicator-left-pos' as string]: `${indicatorLeftPosition}px`,\n\t\t\t\t\t['--indicator-width' as string]: `${indicatorWidth}px`,\n\t\t\t\t}}\n\t\t\t>\n\t\t\t\t{children}\n\t\t\t</div>\n\t\t</TabsContext.Provider>\n\t)\n}\n\ninterface TabsListProps {\n\t/**\n\t * `<Tabs.Tab />` as children\n\t */\n\tchildren: ReactNode\n\tclassName?: string\n}\n\nconst TabList = ({ children, className }: TabsListProps) => {\n\tconst { tabsListRef } = useTabsContext()\n\treturn (\n\t\t<div className={classNames(s['tablist-wrapper'], className)}>\n\t\t\t<ul className={s.tablist} role=\"tablist\" ref={tabsListRef}>\n\t\t\t\t{children}\n\t\t\t\t<li className={s.indicator} role=\"presentation\"></li>\n\t\t\t</ul>\n\t\t</div>\n\t)\n}\n\nconst Tabs = { Provider, TabList, Panel: TabPanel, Tab }\n\nexport type { TabsListProps }\nexport { Tabs }\n","/**\n * Calculates the contrast of an RGB color and determines whether to use dark or light text.\n * @param rgb - An object containing the red (r), green (g), and blue (b) components of the color.\n * @returns A string indicating whether to use 'dark' or 'light'.\n */\nexport const getContrastYIQ = (rgb: {\n\tr: number\n\tg: number\n\tb: number\n}): string => {\n\t// Calculate the YIQ value using the RGB components\n\tconst yiq = (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000\n\t// If YIQ is greater than or equal to 192, use 'dark', otherwise use 'light'\n\treturn yiq >= 192 ? 'dark' : 'light'\n}\n\n/**\n * Converts a HEX color string to an RGB object.\n * @param hex - The HEX color string (e.g., \"#ffffff\").\n * @returns An object containing the red (r), green (g), and blue (b) components, and black if the HEX string is invalid.\n */\nexport const hexToRgb = (hex: string): { r: number; g: number; b: number } => {\n\t// Extract the RGB components from the HEX string using a regular expression\n\tconst result = /^#?([a-f\\d]{2})([a-f\\d]{2})([a-f\\d]{2})$/i.exec(hex)\n\t// If the HEX string is valid, parse the components and return the RGB object\n\treturn result\n\t\t? {\n\t\t\t\tr: parseInt(result[1], 16),\n\t\t\t\tg: parseInt(result[2], 16),\n\t\t\t\tb: parseInt(result[3], 16),\n\t\t }\n\t\t: { r: 0, g: 0, b: 0 } // Return black if the HEX string is invalid\n}\n","'use client'\n\nimport { useState } from 'react'\nimport classNames from 'classnames'\nimport useResizeObserver from 'use-resize-observer'\nimport { getContrastYIQ, hexToRgb } from '../../../../../utils/get-contrast-yiq'\nimport { Text } from '../../../../../components/text'\nimport s from './style.module.css'\n\ninterface DatasetValueProps {\n\tvalue: number\n\thighestValue: number\n\tcolor: string\n\tstackable: boolean\n}\n\nexport default function DatasetValue({\n\tvalue,\n\thighestValue,\n\tcolor,\n\tstackable,\n}: DatasetValueProps) {\n\tconst [valueIsOffset, setValueIsOffset] = useState(false)\n\tconst { ref } = useResizeObserver<HTMLDivElement>({\n\t\tonResize: ({ width }) => {\n\t\t\t// If the value is 0, we want to show a 0.5% bar\n\t\t\tif (value === 0) {\n\t\t\t\tvalue = 0.5\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * The logic below determines the threshold (in `px`)\n\t\t\t * a bar's width needs to reach for the value to be offset\n\t\t\t * by moving it to the right of the bar.\n\t\t\t *\n\t\t\t * The default below is for single-digit values.\n\t\t\t */\n\t\t\tlet offsetThreshold = 32\n\n\t\t\tif (value >= 10 && value <= 99) {\n\t\t\t\t// Offset threshold for 2 digit values\n\t\t\t\toffsetThreshold = 40\n\t\t\t} else if (value >= 100) {\n\t\t\t\t// Offset threshold for 3+ digit values\n\t\t\t\toffsetThreshold = 48\n\t\t\t}\n\n\t\t\tif (width && width < offsetThreshold) {\n\t\t\t\tsetValueIsOffset(true)\n\t\t\t} else {\n\t\t\t\tsetValueIsOffset(false)\n\t\t\t}\n\t\t},\n\t})\n\n\tconst valueColor = getContrastYIQ(hexToRgb(color))\n\n\t/**\n\t * The actual width of the bar, however, should be\n\t * a percentage of the highest value in the chart\n\t */\n\tconst percentageOfHighest = (value / highestValue) * 100\n\n\treturn (\n\t\t<div\n\t\t\tref={ref}\n\t\t\tclassName={classNames(s.datasetValue, s[valueColor])}\n\t\t\tstyle={\n\t\t\t\t{\n\t\t\t\t\t'--width': percentageOfHighest,\n\t\t\t\t} as React.CSSProperties\n\t\t\t}\n\t\t>\n\t\t\t<div\n\t\t\t\tclassName={s.datasetValueBar}\n\t\t\t\tstyle={\n\t\t\t\t\t{\n\t\t\t\t\t\t'--bar-background': color,\n\t\t\t\t\t} as React.CSSProperties\n\t\t\t\t}\n\t\t\t/>\n\t\t\t<Text.Body\n\t\t\t\ttag=\"span\"\n\t\t\t\tsize=\"200\"\n\t\t\t\tclassName={classNames(s.datasetValuePercent, {\n\t\t\t\t\t[s.offset]: valueIsOffset,\n\t\t\t\t\t[s.stackable]: stackable,\n\t\t\t\t})}\n\t\t\t>\n\t\t\t\t{value}%\n\t\t\t</Text.Body>\n\t\t</div>\n\t)\n}\n","import classNames from 'classnames'\nimport s from './style.module.css'\n\ninterface Key {\n\tlabel: string\n\tcolor: string\n}\n\ninterface LegendProps {\n\tclassName?: string\n\tkeys: Array<Key>\n}\n\nexport default function Legend({ keys, className }: LegendProps) {\n\treturn (\n\t\t<div className={classNames(s.legend, className)}>\n\t\t\t<div className={s.keyWrapper}>\n\t\t\t\t{keys.map(({ label, color }: Key) => {\n\t\t\t\t\treturn (\n\t\t\t\t\t\t<div className={s.key} key={label}>\n\t\t\t\t\t\t\t<div className={s.dot} style={{ background: color }} />\n\t\t\t\t\t\t\t<span className={s.name}>{label}</span>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t)\n\t\t\t\t})}\n\t\t\t</div>\n\t\t</div>\n\t)\n}\n","'use client'\n\nimport { useMemo, useState } from 'react'\nimport classNames from 'classnames'\nimport Balancer from 'react-wrap-balancer'\nimport DatasetValue from './dataset-value'\nimport Legend from './legend'\nimport { useMediaQuery } from '@web/hooks/use-media-query'\nimport { MDSButton } from '../../../legacy-button'\nimport { Text } from '../../../../components/text'\nimport s from './style.module.css'\n\ninterface Dataset {\n\tlabel: string\n\tvalues: Array<{\n\t\tvalue: number\n\t\tcolor: string\n\t}>\n\ttotal?: number\n}\n\ninterface Category {\n\tlabel: string\n\tcolor: string\n}\n\nexport interface HorizontalBarChartProps {\n\t/**\n\t * Passing more than one category causes\n\t * the Key to be displayed.\n\t *\n\t * If no categories are passed, the default\n\t * color is Blue.\n\t */\n\tcategories?: Array<Category>\n\t/**\n\t * All group.values.length must be equal\n\t * to the length of the number of groups\n\t * passed. If no groups are passed, each\n\t * group.values.length must equal one.\n\t */\n\tdatasets: Array<Dataset>\n\t/**\n\t * The total number of groups to display\n\t * initially before the user hits the\n\t * \"Show all\" button. Default unlimited.\n\t * */\n\tmaxInitialDatasets?: number\n\t/**\n\t * If true, values in each `group` will\n\t * be stacked together to form a single\n\t * bar.\n\t */\n\tstacked?: boolean\n}\n\nexport default function HorizontalBarChart({\n\tcategories,\n\tdatasets,\n\t// Default this to virtually unlimited\n\tmaxInitialDatasets = 999,\n\tstacked = false,\n}: HorizontalBarChartProps): JSX.Element {\n\t/**\n\t * If screen width is higher than 560px,\n\t * and this is a stacked bar chart,\n\t * we can stack the bars\n\t */\n\tconst isStackable = useMediaQuery('(min-width: 560px)')\n\tconst initialClipped = datasets.length > maxInitialDatasets\n\t/**\n\t * If true, the chart only shows datasets\n\t * up to `maxInitialDatasets`.\n\t */\n\tconst [isClipped, setIsClipped] = useState(initialClipped)\n\n\tconst datasetsToDisplay = useMemo(() => {\n\t\treturn isClipped ? datasets.slice(0, maxInitialDatasets) : datasets\n\t}, [isClipped, datasets, maxInitialDatasets])\n\n\t/**\n\t * Calculate the largest value to calculate % widths\n\t *\n\t * We make this calculation on `datasets`, rather than\n\t * `datasetsToDisplay` to prevent any resizing after\n\t * 'Show All' is clicked\n\t */\n\tconst highestValue = useMemo(() => {\n\t\tlet valueToReturn = 0\n\t\tdatasets.forEach((dataset) => {\n\t\t\tif (stacked) {\n\t\t\t\t/**\n\t\t\t\t * If we're using a stacked bar chart, we want to add\n\t\t\t\t * up the dataset values to calculate our `valueToReturn`,\n\t\t\t\t * as these will be presented together.\n\t\t\t\t *\n\t\t\t\t * The largest stack will be 100% width.\n\t\t\t\t *\n\t\t\t\t * P.S.: The `color` key in this variable's `.reduce()`\n\t\t\t\t * calculation is just here for proper TS typing;\n\t\t\t\t * `color` isn't otherwise used or necessary for\n\t\t\t\t * `summedObj`.\n\t\t\t\t */\n\t\t\t\tconst valueSum = getDatasetTotal(dataset.values)\n\n\t\t\t\t/**\n\t\t\t\t * If the bars are stackable (i.e. we're above 560px screen width)\n\t\t\t\t * then we use the valueSum calculated above to determine the\n\t\t\t\t * highestValue to return.\n\t\t\t\t *\n\t\t\t\t * Otherwise, we want the chart to behave like the unstacked\n\t\t\t\t * bar chart, so we use the same logic unstacked charts do for\n\t\t\t\t * determining highestValue.\n\t\t\t\t */\n\t\t\t\tif (isStackable) {\n\t\t\t\t\tif (valueSum > valueToReturn) {\n\t\t\t\t\t\tvalueToReturn = valueSum\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tdataset.values.forEach(({ value }) => {\n\t\t\t\t\t\tif (value > valueToReturn) {\n\t\t\t\t\t\t\tvalueToReturn = value\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t/**\n\t\t\t\t * In the event that we don't have a stacked bar chart,\n\t\t\t\t * we simply want to find the highest value out of all\n\t\t\t\t * of our values that is set (as that will be 100% width)\n\t\t\t\t */\n\t\t\t\tdataset.values.forEach(({ value }) => {\n\t\t\t\t\tif (value > valueToReturn) {\n\t\t\t\t\t\tvalueToReturn = value\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t}\n\t\t})\n\n\t\treturn valueToReturn\n\t}, [datasets, isStackable])\n\n\treturn (\n\t\t<div className={s.barChart}>\n\t\t\t<div className={s.chart}>\n\t\t\t\t{datasetsToDisplay.map((dataset) => (\n\t\t\t\t\t<div className={s.dataset} key={dataset.label}>\n\t\t\t\t\t\t<div className={s.datasetLabel}>\n\t\t\t\t\t\t\t<Balancer>{dataset.label}</Balancer>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div\n\t\t\t\t\t\t\tclassName={classNames(s.datasetValues, {\n\t\t\t\t\t\t\t\t[s.datasetValuesStacked]: stacked,\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t>\n\t\t\t\t\t\t\t{dataset.values.map(({ value, color }, barIndex) => {\n\t\t\t\t\t\t\t\treturn (\n\t\t\t\t\t\t\t\t\t<DatasetValue\n\t\t\t\t\t\t\t\t\t\tkey={`dataset-${dataset.label}-${value}-${barIndex}`}\n\t\t\t\t\t\t\t\t\t\tvalue={value}\n\t\t\t\t\t\t\t\t\t\thighestValue={highestValue}\n\t\t\t\t\t\t\t\t\t\tcolor={color}\n\t\t\t\t\t\t\t\t\t\tstackable={stacked}\n\t\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t})}\n\t\t\t\t\t\t\t{stacked ? (\n\t\t\t\t\t\t\t\t<div>\n\t\t\t\t\t\t\t\t\t<Text.Body size=\"200\" tag=\"p\" className={s.datasetTotal}>\n\t\t\t\t\t\t\t\t\t\t<span className={s.datasetTotalText}>Total:</span>\n\t\t\t\t\t\t\t\t\t\t<span className={s.datasetTotalPercent}>\n\t\t\t\t\t\t\t\t\t\t\t{dataset.total || getDatasetTotal(dataset.values)}%\n\t\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t\t</Text.Body>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t) : null}\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t))}\n\t\t\t</div>\n\t\t\t{initialClipped &&\n\t\t\t\t(isClipped ? (\n\t\t\t\t\t<MDSButton\n\t\t\t\t\t\tclassName={s.showAllButton}\n\t\t\t\t\t\ttitle=\"Show all\"\n\t\t\t\t\t\ttheme={{\n\t\t\t\t\t\t\tbrand: 'neutral',\n\t\t\t\t\t\t\tvariant: 'secondary',\n\t\t\t\t\t\t\tbackground: 'light',\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonClick={() => setIsClipped(false)}\n\t\t\t\t\t/>\n\t\t\t\t) : (\n\t\t\t\t\t<MDSButton\n\t\t\t\t\t\tclassName={s.showAllButton}\n\t\t\t\t\t\ttitle=\"Show less\"\n\t\t\t\t\t\ttheme={{\n\t\t\t\t\t\t\tbrand: 'neutral',\n\t\t\t\t\t\t\tvariant: 'secondary',\n\t\t\t\t\t\t\tbackground: 'light',\n\t\t\t\t\t\t}}\n\t\t\t\t\t\tonClick={() => setIsClipped(true)}\n\t\t\t\t\t/>\n\t\t\t\t))}\n\t\t\t{categories && categories.length > 1 && (\n\t\t\t\t<Legend className={s.legend} keys={categories} />\n\t\t\t)}\n\t\t</div>\n\t)\n}\n\nfunction getDatasetTotal(values: Dataset['values']): number {\n\tconst totalObj = values.reduce(\n\t\t(a, b) => {\n\t\t\treturn { value: a.value + b.value, color: '' }\n\t\t},\n\t\t{\n\t\t\tvalue: 0,\n\t\t\tcolor: '',\n\t\t}\n\t)\n\n\treturn totalObj.value\n}\n","'use client'\n\nimport HorizontalBarChart, {\n\ttype HorizontalBarChartProps,\n} from './horizontal-chart'\nimport { useTabsContext } from '../../tabs/use-tabs-context'\nimport { Tabs } from '../../tabs'\nimport classNames from 'classnames'\nimport s from './style.module.css'\n\ninterface HorizontalBarChart extends HorizontalBarChartProps {\n\tname: string\n\tcaption: string\n}\n\nexport interface BarChartProps {\n\tdata: HorizontalBarChart[]\n}\n\nexport const BarChart = ({ data }: BarChartProps) => {\n\treturn (\n\t\t<div className={s.root}>\n\t\t\t{data.length > 1 ? (\n\t\t\t\t<Tabs.Provider size=\"large\">\n\t\t\t\t\t<Tabs.TabList>\n\t\t\t\t\t\t{data.map((chart, i) => (\n\t\t\t\t\t\t\t<Tabs.Tab key={i} className={s.tab}>\n\t\t\t\t\t\t\t\t{chart.name}\n\t\t\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t\t\t))}\n\t\t\t\t\t</Tabs.TabList>\n\t\t\t\t\t<BarChartPanelWithTabCtx data={data} />\n\t\t\t\t</Tabs.Provider>\n\t\t\t) : (\n\t\t\t\t<BarChartPanel data={data} />\n\t\t\t)}\n\t\t</div>\n\t)\n}\n\nBarChart.displayName = 'BarChart'\n\nconst BarChartPanelWithTabCtx = ({ data }: { data: BarChartProps['data'] }) => {\n\tconst { selectedTabIndex, tabIds } = useTabsContext()\n\n\tconst tabId = tabIds[selectedTabIndex]\n\n\treturn (\n\t\t<BarChartPanel tabId={tabId} data={data} chartIndex={selectedTabIndex} />\n\t)\n}\n\ninterface BarChartPanelProps {\n\ttabId?: string\n\tdata: BarChartProps['data']\n\tchartIndex?: number\n}\n\nconst BarChartPanel = ({ tabId, data, chartIndex = 0 }: BarChartPanelProps) => {\n\tconst chartName = data[chartIndex].name\n\n\treturn (\n\t\t<figure\n\t\t\tclassName={classNames(s.chartContainer, data.length > 1 && s.multiple)}\n\t\t\tid={chartName.toLowerCase()}\n\t\t\trole=\"tabpanel\"\n\t\t\ttabIndex={0}\n\t\t\taria-label={tabId ? undefined : chartName}\n\t\t\taria-labelledby={tabId || undefined}\n\t\t>\n\t\t\t<HorizontalBarChart {...data[chartIndex]} />\n\t\t\t<div className={s.chart}>\n\t\t\t\t{data[chartIndex].caption && (\n\t\t\t\t\t<figcaption className={s.caption}>\n\t\t\t\t\t\t{data[chartIndex].caption}\n\t\t\t\t\t</figcaption>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t</figure>\n\t)\n}\n","import type { FC } from 'react'\nimport type { DefaultRawDatum, PieTooltipProps } from '@nivo/pie'\nimport s from './styles.module.css'\n\nexport const renderArcTooltip: FC<PieTooltipProps<DefaultRawDatum>> = (d) => (\n\t<div className={s.container}>\n\t\t<div className={s.label}>\n\t\t\t{d.datum.label}: <strong>{d.datum.value}%</strong>\n\t\t</div>\n\t</div>\n)\n","'use client'\n\nimport { useEffect, useRef, useState } from 'react'\nimport { animated } from '@react-spring/web'\nimport type { ComputedDatum, DefaultRawDatum } from '@nivo/pie'\nimport type { ArcLinkLabelComponent } from '@nivo/arcs'\nimport s from './styles.module.css'\n\nconst FOREIGN_OBJECT_WIDTH = 180\n\nexport const useRenderArcLinkLabelComponent: typeof ArcLinkLabelComponent<\n\tComputedDatum<DefaultRawDatum>\n> = (d) => {\n\tconst lockupRef = useRef<HTMLDivElement>(null)\n\tconst [foreignObjectHeight, setForeignObjectHeight] = useState(0)\n\n\tuseEffect(() => {\n\t\tif (lockupRef.current) {\n\t\t\tsetForeignObjectHeight(lockupRef.current.offsetHeight)\n\t\t}\n\t}, [])\n\n\treturn (\n\t\t<animated.g opacity={d.style.opacity}>\n\t\t\t<animated.path\n\t\t\t\tfill=\"none\"\n\t\t\t\td={d.style.path}\n\t\t\t\tstroke={d.style.linkColor}\n\t\t\t\tstrokeWidth={d.style.thickness}\n\t\t\t/>\n\t\t\t<animated.g\n\t\t\t\ttransform={d.style.textPosition}\n\t\t\t\ttextAnchor={d.style.textAnchor}\n\t\t\t\tclassName={s.containerWrapper}\n\t\t\t>\n\t\t\t\t<g\n\t\t\t\t\tclassName={s.container}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\t['--container-width' as string]: `${FOREIGN_OBJECT_WIDTH}px`,\n\t\t\t\t\t\t['--container-height' as string]: `${foreignObjectHeight}px`,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<foreignObject\n\t\t\t\t\t\tdominantBaseline=\"central\"\n\t\t\t\t\t\twidth={FOREIGN_OBJECT_WIDTH}\n\t\t\t\t\t\theight={foreignObjectHeight}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div ref={lockupRef} className={s.lockup}>\n\t\t\t\t\t\t\t<div className={s.value}>{d.datum.value}%</div>\n\t\t\t\t\t\t\t<div className={s.label}>{d.datum.label}</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</foreignObject>\n\t\t\t\t</g>\n\t\t\t</animated.g>\n\t\t</animated.g>\n\t)\n}\n","'use client'\n\nimport { useEffect, useRef, useState } from 'react'\nimport { animated } from '@react-spring/web'\nimport type { ComputedDatum, DefaultRawDatum } from '@nivo/pie'\nimport type { ArcLabelComponent } from '@nivo/arcs'\nimport classNames from 'classnames'\nimport s from './styles.module.css'\nimport { getContrastYIQ, hexToRgb } from '../../../../../utils/get-contrast-yiq'\n\nexport const useRenderArcLabelComponent: typeof ArcLabelComponent<\n\tComputedDatum<DefaultRawDatum>\n> = (d) => {\n\tconst labelRef = useRef<HTMLDivElement>(null)\n\tconst [foreignObjectWidth, setForeignObjectWidth] = useState(0)\n\tconst [foreignObjectHeight, setForeignObjectHeight] = useState(0)\n\n\tuseEffect(() => {\n\t\tif (labelRef.current) {\n\t\t\tsetForeignObjectWidth(labelRef.current.offsetWidth)\n\t\t\tsetForeignObjectHeight(labelRef.current.offsetHeight)\n\t\t}\n\t}, [])\n\n\tconst textColor = getContrastYIQ(hexToRgb(d.datum.color))\n\treturn (\n\t\t<>\n\t\t\t<path />\n\t\t\t<animated.g transform={d.style.transform} opacity={d.style.progress}>\n\t\t\t\t<g\n\t\t\t\t\tclassName={s.container}\n\t\t\t\t\tstyle={{\n\t\t\t\t\t\t['--container-width' as string]: `${foreignObjectWidth}px`,\n\t\t\t\t\t\t['--container-height' as string]: `${foreignObjectHeight}px`,\n\t\t\t\t\t}}\n\t\t\t\t>\n\t\t\t\t\t<animated.foreignObject\n\t\t\t\t\t\twidth={foreignObjectWidth}\n\t\t\t\t\t\theight={foreignObjectHeight}\n\t\t\t\t\t>\n\t\t\t\t\t\t<div className={classNames(s.label, s[textColor])}>\n\t\t\t\t\t\t\t<div ref={labelRef}>{d.datum.value}%</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</animated.foreignObject>\n\t\t\t\t</g>\n\t\t\t</animated.g>\n\t\t</>\n\t)\n}\n","'use client'\n\nimport { useState } from 'react'\nimport { ResponsivePie } from '@nivo/pie'\nimport type { DonutChartData, DonutChartProps, DonutChartSize } from './types'\nimport useResizeObserver from 'use-resize-observer'\nimport classNames from 'classnames'\nimport { Tabs } from '../../tabs'\nimport {\n\trenderArcTooltip,\n\tuseRenderArcLabelComponent,\n\tuseRenderArcLinkLabelComponent,\n} from './components'\nimport { useTabsContext } from '../../tabs/use-tabs-context'\nimport s from './styles.module.css'\n\nconst getArcLinkLabelsSkipAngle = (count: number): number => {\n\tif (count > 4) {\n\t\treturn 24\n\t}\n\n\treturn 16\n}\n\nconst getMargins = (\n\tsize: DonutChartSize\n): {\n\ttop?: number\n\tright?: number\n\tbottom?: number\n\tleft?: number\n} => {\n\tif (size === 'xsmall') {\n\t\treturn { top: 10, right: 0, bottom: 10, left: 0 }\n\t} else if (size === 'small') {\n\t\treturn { top: 10, right: 40, bottom: 20, left: 40 }\n\t} else {\n\t\treturn { top: 80, right: 210, bottom: 84, left: 210 }\n\t}\n}\n\nexport const DonutChart = ({ data }: DonutChartProps) =>\n\tdata.length > 1 ? (\n\t\t<Tabs.Provider size=\"large\">\n\t\t\t<Tabs.TabList>\n\t\t\t\t{data.map((group, i) => (\n\t\t\t\t\t<Tabs.Tab key={i} className={s.tab}>\n\t\t\t\t\t\t{group.groupName}\n\t\t\t\t\t</Tabs.Tab>\n\t\t\t\t))}\n\t\t\t</Tabs.TabList>\n\t\t\t<DonutChartPanelWithTabCtx data={data} />\n\t\t</Tabs.Provider>\n\t) : (\n\t\t<DonutChartPanel data={data} />\n\t)\n\nDonutChart.displayName = 'DonutChart'\n\nconst DonutChartPanelWithTabCtx = ({ data }: { data: DonutChartData[] }) => {\n\tconst { selectedTabIndex, tabIds } = useTabsContext()\n\n\tconst tabId = tabIds[selectedTabIndex]\n\n\treturn (\n\t\t<DonutChartPanel tabId={tabId} data={data} groupIndex={selectedTabIndex} />\n\t)\n}\n\nexport interface DonutChartPanelProps {\n\ttabId?: string\n\tdata: DonutChartData[]\n\tgroupIndex?: number\n}\n\nconst DonutChartPanel = ({\n\ttabId,\n\tdata,\n\tgroupIndex = 0,\n}: DonutChartPanelProps) => {\n\tconst [size, setSize] = useState<DonutChartSize>('regular')\n\tconst { ref } = useResizeObserver<HTMLDivElement>({\n\t\tonResize: ({ width }) => {\n\t\t\tif (width && width < 360) {\n\t\t\t\tsetSize('xsmall')\n\t\t\t} else if (width && width < 600) {\n\t\t\t\tsetSize('small')\n\t\t\t} else {\n\t\t\t\tsetSize('regular')\n\t\t\t}\n\t\t},\n\t})\n\n\treturn (\n\t\t<figure\n\t\t\tclassName={classNames(\n\t\t\t\ts['chart-container'],\n\t\t\t\tdata.length > 1 && s.multiple\n\t\t\t)}\n\t\t\tid={data[groupIndex].groupId}\n\t\t\trole=\"tabpanel\"\n\t\t\ttabIndex={0}\n\t\t\taria-label={tabId ? undefined : data[groupIndex].groupName}\n\t\t\taria-labelledby={tabId || undefined}\n\t\t>\n\t\t\t<div className={classNames(s.chart, s[size])} ref={ref}>\n\t\t\t\t<ResponsivePie\n\t\t\t\t\tdata={data[groupIndex].groupData}\n\t\t\t\t\tmargin={getMargins(size)}\n\t\t\t\t\tenableArcLabels={size !== 'regular'}\n\t\t\t\t\tenableArcLinkLabels={size === 'regular'}\n\t\t\t\t\tarcLabelsComponent={useRenderArcLabelComponent}\n\t\t\t\t\tarcLinkLabelComponent={useRenderArcLinkLabelComponent}\n\t\t\t\t\tarcLinkLabelsSkipAngle={getArcLinkLabelsSkipAngle(\n\t\t\t\t\t\tdata[groupIndex].groupData.length\n\t\t\t\t\t)}\n\t\t\t\t\ttooltip={renderArcTooltip}\n\t\t\t\t\taria-hidden=\"true\"\n\t\t\t\t\tcolors={{ datum: 'data.color' }}\n\t\t\t\t\tinnerRadius={0.5}\n\t\t\t\t\tpadAngle={1}\n\t\t\t\t\tcornerRadius={8}\n\t\t\t\t\tactiveOuterRadiusOffset={4}\n\t\t\t\t\tarcLinkLabelsThickness={1}\n\t\t\t\t\tarcLinkLabelsOffset={4}\n\t\t\t\t\tarcLinkLabelsDiagonalLength={28}\n\t\t\t\t\tarcLinkLabelsStraightLength={24}\n\t\t\t\t\tarcLabelsSkipAngle={16}\n\t\t\t\t/>\n\t\t\t\t{data[groupIndex].groupCaption && (\n\t\t\t\t\t<figcaption>{data[groupIndex].groupCaption}</figcaption>\n\t\t\t\t)}\n\t\t\t</div>\n\t\t\t{size !== 'regular' && (\n\t\t\t\t<ul className={s.legend} aria-hidden=\"true\">\n\t\t\t\t\t{data[groupIndex].groupData.map((record) => (\n\t\t\t\t\t\t<li key={record.id}>\n\t\t\t\t\t\t\t<span\n\t\t\t\t\t\t\t\tclassName={s['legend-dot']}\n\t\t\t\t\t\t\t\tstyle={{ background: record.color }}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t{record.label}\n\t\t\t\t\t\t</li>\n\t\t\t\t\t))}\n\t\t\t\t</ul>\n\t\t\t)}\n\t\t</figure>\n\t)\n}\n"],"names":["DisclosurePrimitiveContext","createContext","useDisclosurePrimitive","context","useContext","Provider","onClose","children","className","trackedIsOpen","containsInteractive","ariaLabel","rest","isOpen","setIsOpen","useState","contentId","useId","useEffect","closeDisclosure","useCallback","onClickToggle","prevState","contextValue","useMemo","jsx","classNames","s","Content","DisclosurePrimitive","AccordionButton","anchorId","updateUrl","parentContainsInteractive","handleClick","e","FlightIcon","AccordionItem","AccordionToggle","jsxs","Text","AccordionContent","Accordion","BadgeCount","text","size","type","color","DismissButton","onClick","ICON_BY_COLOR_AND_TYPE","Icon","icon","defaultIconName","iconName","Alert","onDismiss","title","description","role","generatedLabelId","AlertActions","AlertButton","props","Button","AlertStandaloneLink","StandaloneLink","MenuPrimitiveContext","useMenuPrimitive","isFullWidth","menuRef","useRef","toggleRef","closeMenu","onFocusOut","event","onKeyUp","Toggle","ItemContent","Fragment","Item","maxWidth","current","url","Link","useMDSLink","TruncationButton","IconMoreHorizontal16","Root","itemsCanWrap","Truncation","MenuPrimitive.Provider","MenuPrimitive.Toggle","MenuPrimitive.Content","Breadcrumbs","parseHighlightedLines","string","acc","part","parsePart","dashParts","parsedInt","startVal","endVal","v","length","int","splitJsxIntoLines","codeJsx","withNormalizedNewlines","Children","token","idx","isLastLine","isNewline","isInlineToken","isFinalNewline","hasNewlines","i","SHIKI_BLANK_LINE","splitHtmlIntoLines","codeHtml","lineParts","lineHtml","stableIdx","CodeLines","value","lineNumbers","highlight","highlightedLines","linesOfCode","index","number","lines","prevLine","nextLine","line","HiddenCopyContentComponent","code","copyRef","isClient","setIsClient","HiddenCopyContent","forwardRef","scan","pattern","callback","result","match","split","words","field","_raw","word","sq","dq","escape","garbage","separator","addition","str","processSnippet","snippet","parseShellSnippet","firstLine","multiLineFmt","commandRegex","CodeBlock","language","isStandalone","hasCopyButton","hasLineNumbers","highlightLines","maxHeight","preCodeId","CopyButton","rawSnippet","ToggleButton","count","badge","badgeIcon","disabled","badgeType","iconSize","Badge","Chevron","ListItemInteractive","isLoading","trailingIcon","Interactive","ListItemTitle","ListItemSeparator","ListItemCustom","ListItem","listPosition","width","height","List","Header","hasDivider","Footer","Dropdown","DEFAULT_LOCALE","smallWordsByLocale","LocaleContext","toSmartSentenceCase","locale","leading","firstChar","toSmartTitleCase","smallWords","segments","capitalizeNext","segment","hasWarned","useLocale","getByDotPath","obj","path","createLocalize","localizations","fallbackLocale","key","capitalization","localize","Indicator","isOptional","isRequired","Label","badgeText","controlId","HelperText","ErrorMessage","Error","IconAlertDiamondFill16","Field","id","label","helperText","error","layout","Legend","Fieldset","legend","testingKey","generatedId","fieldsetId","CheckboxBase","required","CheckboxField","isInvalid","inputId","CheckboxGroupRoot","CheckboxGroupInner","CheckboxGroup","FileInputBase","FileInputField","RadioBase","RadioField","RadioGroupRoot","RadioGroupField","RadioGroup","RadioCardGroup","Description","DEFAULT_CONTROL_POSITION","DEFAULT_ALIGNMENT","RadioCard","controlPosition","alignment","badges","createElement","SelectBase","SelectField","TextInputBase","TextInput","idWithPrefix","prefix","NOTHING_VFOCUSED","assertUniqueIds","ids","idToKeysMap","existingKeys","keys","ComboBoxContext","useComboBox","ctx","ComboBoxProvider","keyboardFocusLoop","providedIds","onChangeVFocusedOption","onChangeSelectedOption","itemsRef","internalUsedIds","selectedItem","_setSelectedItem","vFocusedItemIdx","_setVFocusedItemIdx","searchInputRef","listRef","fallBackToggleId","fallBackPopoverId","fallBackListboxId","setSelectedItem","item","setVFocusedItemIdx","vFocusByIdx","vFocusNext","items","potentialNextIndex","isAtEnd","vFocusPrev","potentialPreviousIndex","isAtStart","vFocus","foundItemIndex","getVFocusedItem","selectItem","getSelectedItem","addItem","existing","errMessage","getItems","removeItem","vFocusedItem","list","closePopover","openPopover","handleVFocusKeyboardControls","isScrollingKey","isSpaceKey","hasSearchInput","nothingVFocused","currItem","ComboBoxItem","providedId","restProps","isVFocused","ComboBoxTrigger","handleKeyDown","getOnBlur","ComboBoxValue","placeholder","ComboBoxPopover","handleClickOutside","ComboBoxList","onScroll","ComboBoxSearchInput","onChange","onBlur","ComboBox","SuperSelectRoot","SuperSelectTrigger","SuperSelectPopover","SuperSelectSearchInput","SuperSelectList","SuperSelectOption","SuperSelect","SuperSelectField","searchProps","options","listLabel","listHeight","onSearchBlur","genID","option","TextAreaBase","TextAreaField","ToggleBase","toggleOnEnter","handleEnterKey","ToggleField","ToggleGroupRoot","ToggleGroupField","ToggleGroup","EXTRA_ICON_SIZE_MAP","IconTile","logo","iconSecondary","entity","colorUse","InlineLink","iconPosition","isHrefExternal","resolvedIcon","iconElement","determineColor","theme","variant","LINK_TYPE_ICON_MAP","MDSButton","href","linkType","external","ref","Overlay","Wrapper","Dialog","ModalContext","useModal","ModalProvider","initialIsOpen","initialModalContent","modalContent","setModalContent","closeModal","openModal","content","FocusLock","Separator","spacing","DEFAULT_DENSITY","DENSITIES","getDensity","densityStr","density","DEFAULT_VERTICAL_ALIGNMENT","VERTICAL_ALIGNMENTS","getVerticalAlignment","valignStr","valign","ALIGNMENTS","getHorizontalAlignment","alignStr","align","DEFAULT_SCOPE","SCOPES","getScope","scopeStr","scope","TD","hideOnEsc","instance","onKeyDown","Tooltip","plugins","followCursor","Tippy","ThButtonTooltip","tooltip","labelId","prefixLabelId","TH","isVisuallyHidden","TR","caption","isStriped","isFixedLayout","THead","TBody","Table","TabsContext","useTabsContext","TabPanel","panelIds","tabIds","selectedTabIndex","panelNodes","panelId","nodeIndex","tabId","isSelected","el","Tab","isInitialTab","trackingKey","tabIndicatorTheme","tabNodes","onClickTab","initialSelectedTabIndex","setSelectedTabIndex","setTabIds","setPanelIds","indicatorWidth","setIndicatorWidth","indicatorLeftPosition","setIndicatorLeftPosition","tabsListRef","scrollIntoView","tabIndex","parentNode","tabElem","tabLeftPos","tabWidth","tab","initialTabIndex","selectedCount","tabElement","focusTab","leftArrow","rightArrow","enterKey","spaceKey","nextTabIndex","prevTabIndex","TabList","Tabs","getContrastYIQ","rgb","hexToRgb","hex","DatasetValue","highestValue","stackable","valueIsOffset","setValueIsOffset","useResizeObserver","offsetThreshold","valueColor","percentageOfHighest","HorizontalBarChart","categories","datasets","maxInitialDatasets","stacked","isStackable","useMediaQuery","initialClipped","isClipped","setIsClipped","datasetsToDisplay","valueToReturn","dataset","valueSum","getDatasetTotal","Balancer","barIndex","values","a","b","BarChart","data","chart","BarChartPanelWithTabCtx","BarChartPanel","chartIndex","chartName","renderArcTooltip","d","FOREIGN_OBJECT_WIDTH","useRenderArcLinkLabelComponent","lockupRef","foreignObjectHeight","setForeignObjectHeight","animated","useRenderArcLabelComponent","labelRef","foreignObjectWidth","setForeignObjectWidth","textColor","getArcLinkLabelsSkipAngle","getMargins","DonutChart","group","DonutChartPanelWithTabCtx","DonutChartPanel","groupIndex","setSize","ResponsivePie","record"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAaaA,KAA6BC,GAExC,MAAS;AACXD,GAA2B,cAAc;AAElC,SAASE,KAA0D;AACzE,QAAMC,IAAUC,GAAWJ,EAA0B;AACrD,MAAIG,MAAY;AACf,UAAM,IAAI;AAAA,M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