@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,767 @@
1
+ import { jsx as t, jsxs as _, Fragment as $ } from "react/jsx-runtime";
2
+ import { useId as M, createElement as T, forwardRef as v, useState as X, useRef as q } from "react";
3
+ import { u as H, a as J } from "./index-DBjAbGt7.js";
4
+ import g from "classnames";
5
+ import { IconArrowRight24 as Y } from "@hashicorp/flight-icons/svg-react/arrow-right-24";
6
+ import x from "@hashicorp/flight-icons/svg-sprite/svg-sprite.svg";
7
+ const Q = "loading__-Ng-b", V = "running__6uXP5", E = {
8
+ "flight-icon": "flight-icon__f6lPO",
9
+ "display-inline": "display-inline__ItStG",
10
+ loading: Q,
11
+ running: V
12
+ }, sr = [12, 16, 24, 32], oo = {
13
+ 12: 16,
14
+ 16: 16,
15
+ 24: 24,
16
+ 32: 24
17
+ }, D = typeof x == "string" ? x : x.src, k = ({
18
+ name: o,
19
+ color: r = "currentColor",
20
+ size: e = 16,
21
+ stretched: s = !1,
22
+ isInlineBlock: n = !0,
23
+ title: a,
24
+ className: i,
25
+ ...c
26
+ }) => {
27
+ const l = M(), u = M(), d = oo[e];
28
+ return /* @__PURE__ */ t(
29
+ "svg",
30
+ {
31
+ className: g(
32
+ E["flight-icon"],
33
+ `flight-icon-${o}`,
34
+ {
35
+ [E["display-inline"]]: n && !s,
36
+ [E.loading]: o === "loading",
37
+ [E.running]: o === "running"
38
+ },
39
+ i
40
+ ),
41
+ ...c,
42
+ "aria-hidden": a ? "false" : "true",
43
+ "aria-labelledby": a ? u : void 0,
44
+ fill: r,
45
+ id: l,
46
+ role: a ? "img" : void 0,
47
+ width: s ? "100%" : e,
48
+ height: s ? "100%" : e,
49
+ viewBox: `0 0 ${d} ${d}`,
50
+ xmlns: "http://www.w3.org/2000/svg",
51
+ children: a ? /* @__PURE__ */ _($, { children: [
52
+ /* @__PURE__ */ t("title", { id: u, children: a }),
53
+ /* @__PURE__ */ t("g", { role: "presentation", children: /* @__PURE__ */ t("use", { href: `${D}#flight-${o}-${d}` }) })
54
+ ] }) : /* @__PURE__ */ t("use", { href: `${D}#flight-${o}-${d}` })
55
+ }
56
+ );
57
+ };
58
+ k.displayName = "FlightIcon";
59
+ const ro = {
60
+ "align-left": "align-left__Twy3l",
61
+ "align-center": "align-center__iK1pm",
62
+ "align-right": "align-right__YgPRT"
63
+ }, eo = [
64
+ "primary",
65
+ "strong",
66
+ "faint",
67
+ "disabled",
68
+ "high-contrast",
69
+ "action",
70
+ "action-hover",
71
+ "action-active",
72
+ "highlight",
73
+ "highlight-on-surface",
74
+ "highlight-high-contrast",
75
+ "success",
76
+ "success-on-surface",
77
+ "success-high-contrast",
78
+ "warning",
79
+ "warning-on-surface",
80
+ "warning-high-contrast",
81
+ "critical",
82
+ "critical-on-surface",
83
+ "critical-high-contrast"
84
+ ], ar = ["regular", "medium", "semibold", "bold"];
85
+ function to(o, r) {
86
+ return {
87
+ "hds-body": `mds-typography-legacy-body-${r}`,
88
+ code: `mds-typography-code-${r}`,
89
+ "display-expressive": `mds-typography-display-expressive-${r}`,
90
+ label: "mds-typography-label",
91
+ body: `mds-typography-body-${r}`
92
+ }[o];
93
+ }
94
+ const C = ({
95
+ tag: o,
96
+ group: r,
97
+ size: e = "200",
98
+ weight: s,
99
+ align: n,
100
+ color: a,
101
+ children: i,
102
+ className: c,
103
+ ...l
104
+ }) => {
105
+ const u = o ?? "span", d = to(r, e), p = eo.includes(a);
106
+ return /* @__PURE__ */ t(
107
+ u,
108
+ {
109
+ className: g(
110
+ d,
111
+ {
112
+ [ro[`align-${n}`]]: n,
113
+ [`mds-typography-font-weight-${s}`]: s,
114
+ [`mds-foreground-${a}`]: a && p
115
+ },
116
+ c
117
+ ),
118
+ style: a && !p ? { color: a } : {},
119
+ ...l,
120
+ children: i
121
+ }
122
+ );
123
+ }, no = ({
124
+ size: o = "300",
125
+ ...r
126
+ }) => T(C, {
127
+ ...r,
128
+ size: o,
129
+ group: "body"
130
+ }), so = ({
131
+ size: o = "200",
132
+ ...r
133
+ }) => T(C, {
134
+ ...r,
135
+ size: o,
136
+ group: "display-expressive"
137
+ }), ao = (o) => T(C, {
138
+ ...o,
139
+ group: "label"
140
+ }), io = ({
141
+ size: o = "200",
142
+ weight: r = "regular",
143
+ ...e
144
+ }) => T(C, {
145
+ ...e,
146
+ size: o,
147
+ weight: r,
148
+ group: "hds-body"
149
+ }), co = ({
150
+ size: o = "200",
151
+ weight: r = "regular",
152
+ ...e
153
+ }) => T(C, {
154
+ ...e,
155
+ size: o,
156
+ weight: r,
157
+ group: "code"
158
+ }), I = {
159
+ Body: no,
160
+ DisplayExpressive: so,
161
+ Label: ao,
162
+ HDSBody: io,
163
+ Code: co
164
+ }, lo = "badge__zns82", uo = "text__WoM4W", w = {
165
+ badge: lo,
166
+ text: uo,
167
+ "size-small": "size-small__8xHdE",
168
+ "size-medium": "size-medium__xqCpO",
169
+ "size-large": "size-large__Pviip",
170
+ "color-neutral": "color-neutral__6Csf4",
171
+ "type-filled": "type-filled__ZaWsu",
172
+ "type-inverted": "type-inverted__A3554",
173
+ "type-outlined": "type-outlined__l0zjH",
174
+ "color-neutral-dark-mode": "color-neutral-dark-mode__C1TO4",
175
+ "color-highlight": "color-highlight__eWwJ5",
176
+ "color-success": "color-success__EuxKz",
177
+ "color-warning": "color-warning__gCbUY",
178
+ "color-critical": "color-critical__hV-l-"
179
+ }, ir = ["small", "medium", "large"], cr = ["filled", "inverted", "outlined"], lr = [
180
+ "neutral",
181
+ "neutral-dark-mode",
182
+ "highlight",
183
+ "success",
184
+ "warning",
185
+ "critical"
186
+ ], mo = {
187
+ small: 12,
188
+ medium: 16,
189
+ large: 16
190
+ }, R = ({
191
+ icon: o,
192
+ iconColor: r,
193
+ iconOnly: e,
194
+ text: s,
195
+ size: n = "medium",
196
+ type: a = "filled",
197
+ color: i = "neutral",
198
+ className: c,
199
+ ...l
200
+ }) => /* @__PURE__ */ _(
201
+ "div",
202
+ {
203
+ className: g(
204
+ w.badge,
205
+ w[`size-${n}`],
206
+ w[`type-${a}`],
207
+ w[`color-${i}`],
208
+ c
209
+ ),
210
+ ...l,
211
+ children: [
212
+ o && /* @__PURE__ */ t(k, { name: o, color: r, size: mo[n] }),
213
+ e && o ? /* @__PURE__ */ t("span", { className: "sr-only", children: s }) : /* @__PURE__ */ t("div", { className: w.text, children: s })
214
+ ]
215
+ }
216
+ );
217
+ R.displayName = "Badge";
218
+ const z = v((o, r) => {
219
+ const e = H(), {
220
+ href: s,
221
+ className: n,
222
+ isHrefExternal: a,
223
+ onClick: i,
224
+ children: c,
225
+ locale: l,
226
+ ...u
227
+ } = o;
228
+ return s ? /* @__PURE__ */ t(
229
+ e,
230
+ {
231
+ className: n,
232
+ target: a ? "_blank" : void 0,
233
+ rel: a ? "noopener noreferrer" : void 0,
234
+ onClick: i,
235
+ ...po(s, l, a),
236
+ ...u,
237
+ ref: r,
238
+ children: c
239
+ }
240
+ ) : /* @__PURE__ */ t(
241
+ "button",
242
+ {
243
+ type: "button",
244
+ className: n,
245
+ onClick: i,
246
+ ...u,
247
+ ref: r,
248
+ children: c
249
+ }
250
+ );
251
+ });
252
+ z.displayName = "Interactive";
253
+ const po = (o, r, e) => e ? {
254
+ href: o,
255
+ hrefLang: void 0
256
+ } : ["en", "de", "es", "fr", "ja", "ko", "pt", "id"].includes(
257
+ o.substring(1, 3)
258
+ ) ? {
259
+ href: o,
260
+ hrefLang: o.substring(1, 3)
261
+ } : o.startsWith("/") && r ? {
262
+ href: `/${r}${o}`,
263
+ hrefLang: r
264
+ } : {
265
+ href: o,
266
+ hrefLang: void 0
267
+ }, go = "text__2B7Ih", N = {
268
+ "standalone-link": "standalone-link__85Pyl",
269
+ "icon-position-leading": "icon-position-leading__KE5kn",
270
+ "icon-position-trailing": "icon-position-trailing__Mygyz",
271
+ text: go,
272
+ "size-small": "size-small__pf7gu",
273
+ "size-medium": "size-medium__r6Rbi",
274
+ "size-large": "size-large__aue6M",
275
+ "color-primary": "color-primary__7WaoM",
276
+ "color-secondary": "color-secondary__4qYkh",
277
+ "color-secondary-inverted": "color-secondary-inverted__ILbsj"
278
+ }, dr = ["small", "medium", "large"], ur = [
279
+ "primary",
280
+ "secondary",
281
+ "secondary-inverted"
282
+ ], mr = ["leading", "trailing"], L = v(
283
+ ({
284
+ text: o,
285
+ size: r = "medium",
286
+ color: e = "primary",
287
+ icon: s,
288
+ iconPosition: n = "leading",
289
+ className: a,
290
+ "data-testid": i,
291
+ locale: c,
292
+ ...l
293
+ }, u) => {
294
+ const d = s && /* @__PURE__ */ t(k, { name: s, size: 16 });
295
+ return /* @__PURE__ */ _(
296
+ z,
297
+ {
298
+ ...l,
299
+ ref: u,
300
+ className: g(
301
+ N["standalone-link"],
302
+ N[`size-${r}`],
303
+ N[`color-${e}`],
304
+ N[`icon-position-${n}`],
305
+ a
306
+ ),
307
+ "data-testid": i,
308
+ locale: c,
309
+ children: [
310
+ d && n === "leading" && d,
311
+ /* @__PURE__ */ t("span", { className: N.text, children: o }),
312
+ d && n === "trailing" && d
313
+ ]
314
+ }
315
+ );
316
+ }
317
+ );
318
+ L.displayName = "StandaloneLink";
319
+ const _o = "button__gOWvd", yo = "text__KbKvH", f = {
320
+ button: _o,
321
+ "width-full": "width-full__juTUO",
322
+ text: yo,
323
+ "color-primary": "color-primary__rWbwp",
324
+ "color-secondary": "color-secondary__-5Q4d",
325
+ "color-tertiary": "color-tertiary__rw4Ww",
326
+ "color-critical": "color-critical__-8hXs",
327
+ "color-primary-white": "color-primary-white__2JDoz",
328
+ "color-primary-black": "color-primary-black__zTF4n",
329
+ "color-secondary-white": "color-secondary-white__AseI0",
330
+ "color-secondary-black": "color-secondary-black__b-umt",
331
+ "color-secondary-high-contrast": "color-secondary-high-contrast__3bxg3",
332
+ "color-boundary": "color-boundary__xJtzy",
333
+ "color-consul": "color-consul__5lFsa",
334
+ "color-nomad": "color-nomad__HGWXf",
335
+ "color-packer": "color-packer__vbRu0",
336
+ "color-terraform": "color-terraform__DQMD5",
337
+ "color-vagrant": "color-vagrant__iNokw",
338
+ "color-vault": "color-vault__Q6Qbm",
339
+ "color-waypoint": "color-waypoint__8j-Oi",
340
+ "size-small": "size-small__kT0Jp",
341
+ "icon-only": "icon-only__5c-is",
342
+ "size-medium": "size-medium__HxMcm",
343
+ "size-large": "size-large__MEpK3"
344
+ }, pr = ["small", "medium", "large"], gr = ["leading", "trailing"], _r = [
345
+ "primary",
346
+ "primary-black",
347
+ "primary-white",
348
+ "secondary",
349
+ // deprecated; maps to secondary-white
350
+ "secondary-high-contrast",
351
+ // alternates based on theme
352
+ "secondary-white",
353
+ "secondary-black",
354
+ "tertiary",
355
+ "critical",
356
+ "boundary",
357
+ "consul",
358
+ "nomad",
359
+ "packer",
360
+ "terraform",
361
+ "vagrant",
362
+ "vault",
363
+ "waypoint",
364
+ "hashicorp"
365
+ // alias to primary
366
+ ], ho = {
367
+ primary: "primary",
368
+ "primary-black": "custom",
369
+ "primary-white": "custom",
370
+ secondary: "custom",
371
+ "secondary-high-contrast": "custom",
372
+ "secondary-white": "custom",
373
+ "secondary-black": "custom",
374
+ tertiary: "tertiary",
375
+ critical: "critical",
376
+ boundary: "custom",
377
+ consul: "custom",
378
+ nomad: "custom",
379
+ packer: "custom",
380
+ terraform: "custom",
381
+ vagrant: "custom",
382
+ vault: "custom",
383
+ waypoint: "custom",
384
+ hashicorp: "primary"
385
+ }, fo = {
386
+ small: 12,
387
+ medium: 16,
388
+ large: 24
389
+ }, F = v(
390
+ ({
391
+ size: o = "medium",
392
+ color: r = "primary",
393
+ isFullWidth: e,
394
+ isIconOnly: s,
395
+ icon: n,
396
+ iconPosition: a = "leading",
397
+ text: i,
398
+ href: c,
399
+ isHrefExternal: l,
400
+ className: u,
401
+ locale: d,
402
+ ...p
403
+ }, y) => {
404
+ const h = s && !!n, b = n && /* @__PURE__ */ t(k, { name: n, size: fo[o] });
405
+ return /* @__PURE__ */ t(
406
+ z,
407
+ {
408
+ className: g(
409
+ f.button,
410
+ f[`size-${o}`],
411
+ {
412
+ [f["width-full"]]: e,
413
+ [f["icon-only"]]: h
414
+ },
415
+ r !== "custom" && f[`color-${r}`],
416
+ u
417
+ ),
418
+ href: p.disabled ? "" : c,
419
+ isHrefExternal: l,
420
+ "aria-label": h ? i : void 0,
421
+ locale: d,
422
+ ...p,
423
+ ref: y,
424
+ children: h && n ? b : /* @__PURE__ */ _($, { children: [
425
+ n && a === "leading" && b,
426
+ /* @__PURE__ */ t("div", { className: f.text, children: i }),
427
+ n && a === "trailing" && b
428
+ ] })
429
+ }
430
+ );
431
+ }
432
+ );
433
+ F.displayName = "ButtonPrimitive";
434
+ const U = v(({ color: o = "primary", className: r, ...e }, s) => {
435
+ const n = ho[o], i = n === "custom" ? f[`color-${{
436
+ hashicorp: "primary",
437
+ secondary: "secondary-white"
438
+ }[o] ?? o}`] : void 0;
439
+ return /* @__PURE__ */ t(
440
+ F,
441
+ {
442
+ ...e,
443
+ color: n,
444
+ className: g(i, r),
445
+ ref: s
446
+ }
447
+ );
448
+ });
449
+ U.displayName = "Button";
450
+ const bo = "thumbnail__f0mUs", wo = {
451
+ thumbnail: bo
452
+ }, No = ({
453
+ alt: o,
454
+ aspectRatio: r,
455
+ src: e
456
+ }) => {
457
+ const s = J();
458
+ return e ? /* @__PURE__ */ t(
459
+ "div",
460
+ {
461
+ className: wo.thumbnail,
462
+ style: { "--aspect-ratio": r },
463
+ children: /* @__PURE__ */ t(s, { fill: !0, alt: o, src: e })
464
+ }
465
+ ) : null;
466
+ }, To = "card__HomZw", vo = "interactive__Irpce", Co = "arrow__qnBL7", So = "link__Dz3Nf", Eo = "cta__UfNG2", ko = "content__SiycH", Io = "subheading__MM0J8", Oo = "contentLockup__08EYi", xo = "badges__GrCpe", Lo = "meta__8eKyE", $o = "metaSeparator__44API", m = {
467
+ card: To,
468
+ interactive: vo,
469
+ arrow: Co,
470
+ link: So,
471
+ cta: Eo,
472
+ content: ko,
473
+ "has-thumbnail": "has-thumbnail__ftF14",
474
+ subheading: Io,
475
+ contentLockup: Oo,
476
+ badges: xo,
477
+ meta: Lo,
478
+ metaSeparator: $o
479
+ }, W = v(
480
+ ({
481
+ children: o,
482
+ className: r,
483
+ content: e,
484
+ ctaLabel: s,
485
+ href: n,
486
+ standaloneLink: a,
487
+ isExternal: i,
488
+ onClickCapture: c,
489
+ "aria-label": l
490
+ }, u) => {
491
+ const d = H(), p = n && !s, y = i ? { target: "_blank", rel: "noopener noreferrer" } : {};
492
+ return /* @__PURE__ */ _(
493
+ "div",
494
+ {
495
+ ref: u,
496
+ className: g(
497
+ m.card,
498
+ { [m.interactive]: p },
499
+ r
500
+ ),
501
+ children: [
502
+ p && /* @__PURE__ */ t(
503
+ d,
504
+ {
505
+ href: n,
506
+ className: m.link,
507
+ draggable: "false",
508
+ onClickCapture: c,
509
+ "aria-label": l,
510
+ ...y
511
+ }
512
+ ),
513
+ e && /* @__PURE__ */ t(
514
+ zo,
515
+ {
516
+ badges: e.badges,
517
+ description: e.description,
518
+ eyebrow: e.eyebrow,
519
+ heading: e.heading,
520
+ subheading: e.subheading,
521
+ thumbnail: e.thumbnail,
522
+ showArrow: e.showArrow && !!p,
523
+ cta: {
524
+ ctaLabel: s,
525
+ href: n,
526
+ standaloneLink: a,
527
+ onClickCapture: c,
528
+ isExternal: i
529
+ }
530
+ }
531
+ ),
532
+ o,
533
+ o && /* @__PURE__ */ t(
534
+ K,
535
+ {
536
+ ctaLabel: s,
537
+ href: n,
538
+ standaloneLink: a,
539
+ onClickCapture: c,
540
+ isExternal: i
541
+ }
542
+ )
543
+ ]
544
+ }
545
+ );
546
+ }
547
+ );
548
+ W.displayName = "Card";
549
+ const zo = ({
550
+ badges: o,
551
+ description: r,
552
+ eyebrow: e,
553
+ heading: s,
554
+ thumbnail: n,
555
+ subheading: a,
556
+ cta: i,
557
+ showArrow: c
558
+ }) => /* @__PURE__ */ _("div", { className: g(m.content, { [m["has-thumbnail"]]: n }), children: [
559
+ n && /* @__PURE__ */ t(No, { ...n }),
560
+ /* @__PURE__ */ _("div", { className: m.contentLockup, children: [
561
+ /* @__PURE__ */ t(Ao, { children: e }),
562
+ /* @__PURE__ */ t(Do, { children: s }),
563
+ /* @__PURE__ */ t(Bo, { children: a }),
564
+ /* @__PURE__ */ t(Po, { children: r }),
565
+ /* @__PURE__ */ t(Ho, { badges: o }),
566
+ i && /* @__PURE__ */ t(
567
+ K,
568
+ {
569
+ ctaLabel: i.ctaLabel,
570
+ href: i.href,
571
+ standaloneLink: i.standaloneLink,
572
+ isExternal: i.isExternal,
573
+ onClickCapture: i.onClickCapture
574
+ }
575
+ ),
576
+ c ? /* @__PURE__ */ t("div", { className: m.arrow, children: /* @__PURE__ */ t(Y, {}) }) : null
577
+ ] })
578
+ ] }), K = ({
579
+ href: o,
580
+ ctaLabel: r,
581
+ standaloneLink: e,
582
+ isExternal: s,
583
+ onClickCapture: n
584
+ }) => {
585
+ const a = o && !r;
586
+ if (e) {
587
+ const i = {
588
+ ...e,
589
+ icon: e.icon || "chevron-right",
590
+ iconPosition: e.iconPosition || "trailing"
591
+ };
592
+ return /* @__PURE__ */ t(L, { className: m.cta, ...i });
593
+ }
594
+ return o && !a && r ? /* @__PURE__ */ t(
595
+ L,
596
+ {
597
+ className: m.cta,
598
+ text: r,
599
+ href: o,
600
+ icon: "chevron-right",
601
+ iconPosition: "trailing",
602
+ color: "secondary",
603
+ onClickCapture: n,
604
+ isHrefExternal: s
605
+ }
606
+ ) : null;
607
+ }, Ao = ({ children: o }) => o ? Array.isArray(o) ? /* @__PURE__ */ t(Mo, { items: Array.from(o) }) : /* @__PURE__ */ t(G, { children: o }) : null, Mo = ({ items: o }) => /* @__PURE__ */ t("ul", { className: m.meta, children: o.map((r, e) => /* @__PURE__ */ _("li", { children: [
608
+ /* @__PURE__ */ t(G, { children: r }),
609
+ e < o.length - 1 ? /* @__PURE__ */ t("span", { className: m.metaSeparator, "aria-hidden": !0, children: "|" }) : null
610
+ ] }, r)) }), G = ({ children: o }) => o ? /* @__PURE__ */ t(I.Label, { color: "faint", weight: "medium", children: o }) : null, Do = ({ children: o }) => o ? /* @__PURE__ */ t(
611
+ I.DisplayExpressive,
612
+ {
613
+ tag: "span",
614
+ size: "200",
615
+ weight: "semibold",
616
+ color: "strong",
617
+ children: o
618
+ }
619
+ ) : null, Bo = ({ children: o }) => o ? /* @__PURE__ */ t(I.Body, { tag: "span", size: "200", className: m.subheading, color: "primary", children: o }) : null, Po = ({ children: o }) => o ? typeof o == "string" ? /* @__PURE__ */ t(I.Body, { tag: "span", size: "200", color: "primary", children: o }) : /* @__PURE__ */ t($, { children: o }) : null, Ho = ({ badges: o }) => o && o.length > 0 ? /* @__PURE__ */ t("div", { className: m.badges, children: o.map((r) => /* @__PURE__ */ t(R, { ...r }, r.text)) }) : null;
620
+ W.displayName = "Card";
621
+ const Ro = (o) => {
622
+ let r;
623
+ if (o)
624
+ if (typeof o == "string")
625
+ r = o;
626
+ else if (
627
+ // context: https://github.com/hashicorp/design-system/pull/1564
628
+ typeof o == "number" || typeof o == "bigint"
629
+ )
630
+ r = o.toString();
631
+ else
632
+ throw new Error(
633
+ `\`hds-clipboard\` modifier - \`text\` argument must be a string - provided: ${typeof o}`
634
+ );
635
+ return r;
636
+ }, Fo = (o) => {
637
+ let r;
638
+ if (typeof o == "string") {
639
+ if (r = document.querySelector(o), !r) {
640
+ console.error(
641
+ "`hds-clipboard` modifier - `target` selector provided does not point to an existing DOM node, check your selector string",
642
+ r
643
+ );
644
+ return;
645
+ }
646
+ } else if (o instanceof Node && o.nodeType === Node.ELEMENT_NODE)
647
+ r = o;
648
+ else
649
+ throw o instanceof NodeList ? new Error(
650
+ "`hds-clipboard` modifier - `target` argument must be a string or a DOM node - provided: a list of DOM nodes"
651
+ ) : new Error(
652
+ `\`hds-clipboard\` modifier - \`target\` argument must be a string or a DOM node - provided: ${typeof o}`
653
+ );
654
+ return r;
655
+ }, Uo = (o) => {
656
+ let r;
657
+ return o instanceof Node && o.nodeType === Node.ELEMENT_NODE && (o instanceof HTMLInputElement || // targetElement.nodeName === 'INPUT' ||
658
+ o instanceof HTMLTextAreaElement || // targetElement.nodeName === 'TEXTAREA' ||
659
+ o instanceof HTMLSelectElement ? r = o.value : r = o.innerText), r;
660
+ }, Wo = async (o) => {
661
+ if (o)
662
+ try {
663
+ return await navigator.clipboard.writeText(o), !0;
664
+ } catch {
665
+ return console.warn(
666
+ "copy action failed, please check your browser‘s permissions",
667
+ {
668
+ id: "hds-clipboard.write-text-to-clipboard.catch-error"
669
+ }
670
+ ), !1;
671
+ }
672
+ else
673
+ return !1;
674
+ }, Ko = async (o, r, e) => {
675
+ let s;
676
+ if (e)
677
+ s = e();
678
+ else if (o)
679
+ s = Ro(o);
680
+ else if (r) {
681
+ const a = Fo(r);
682
+ s = Uo(a);
683
+ } else
684
+ throw new Error(
685
+ "`hds-clipboard` modifier - either a `getTextFn`, `text`, or a `target` argument is required"
686
+ );
687
+ return await Wo(s);
688
+ }, Go = (o) => {
689
+ const { text: r, target: e, getTextFn: s, onSuccess: n, onError: a } = o;
690
+ return { onClick: async (c) => {
691
+ const l = c.currentTarget;
692
+ await Ko(r, e, s) ? typeof n == "function" && n({ trigger: l, text: r, target: e }) : typeof a == "function" && a({ trigger: l, text: r, target: e });
693
+ } };
694
+ }, Zo = "idle__1ofXr", jo = "success__9mXCl", Xo = "error__a3l-p", B = {
695
+ "copy-button": "copy-button__uXOTd",
696
+ idle: Zo,
697
+ success: jo,
698
+ error: Xo
699
+ }, qo = "clipboard-copy", Jo = "clipboard-checked", Yo = "clipboard-x", P = "idle", Qo = ({
700
+ size: o = "medium",
701
+ isIconOnly: r = !1,
702
+ isFullWidth: e = !1,
703
+ text: s,
704
+ textToCopy: n,
705
+ getTextFn: a,
706
+ targetToCopy: i,
707
+ onSuccess: c,
708
+ onError: l,
709
+ className: u,
710
+ defaultIcon: d,
711
+ ...p
712
+ }) => {
713
+ const [y, S] = X(P), h = q(null), b = y === "idle" ? d || qo : y === "success" ? Jo : Yo, A = () => {
714
+ h.current && clearTimeout(h.current), h.current = setTimeout(() => {
715
+ S(P);
716
+ }, 1500);
717
+ }, Z = (O) => {
718
+ S("success"), A(), c && c(O);
719
+ }, j = (O) => {
720
+ S("error"), A(), l && l(O);
721
+ };
722
+ return /* @__PURE__ */ t(
723
+ U,
724
+ {
725
+ className: g(B["copy-button"], B[y], u),
726
+ size: o,
727
+ isFullWidth: e,
728
+ text: s,
729
+ icon: b,
730
+ isIconOnly: r,
731
+ color: "secondary",
732
+ iconPosition: "trailing",
733
+ ...Go({
734
+ text: n,
735
+ getTextFn: a,
736
+ target: i,
737
+ onSuccess: Z,
738
+ onError: j
739
+ }),
740
+ ...p
741
+ }
742
+ );
743
+ };
744
+ Qo.displayName = "CopyButton";
745
+ export {
746
+ lr as B,
747
+ W as C,
748
+ sr as F,
749
+ z as I,
750
+ L as S,
751
+ I as T,
752
+ ir as a,
753
+ cr as b,
754
+ R as c,
755
+ U as d,
756
+ _r as e,
757
+ gr as f,
758
+ pr as g,
759
+ k as h,
760
+ ur as i,
761
+ mr as j,
762
+ dr as k,
763
+ eo as l,
764
+ ar as m,
765
+ Qo as n
766
+ };
767
+ //# sourceMappingURL=index-WkGIywHj.js.map