@hashicorp/design-system-components 3.6.0 → 4.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (967) hide show
  1. package/README.md +2 -0
  2. package/addon-main.js +7 -0
  3. package/dist/LICENSE.md +375 -0
  4. package/dist/README.md +69 -0
  5. package/dist/_app_/components/hds/accordion/index.js +1 -0
  6. package/dist/_app_/components/hds/accordion/item/button.js +1 -0
  7. package/dist/_app_/components/hds/accordion/item/index.js +1 -0
  8. package/dist/_app_/components/hds/alert/description.js +1 -0
  9. package/dist/_app_/components/hds/alert/index.js +1 -0
  10. package/dist/_app_/components/hds/alert/title.js +1 -0
  11. package/dist/_app_/components/hds/app-footer/copyright.js +1 -0
  12. package/dist/_app_/components/hds/app-footer/index.js +1 -0
  13. package/dist/_app_/components/hds/app-footer/item.js +1 -0
  14. package/dist/_app_/components/hds/app-footer/legal-links.js +1 -0
  15. package/dist/_app_/components/hds/app-footer/link.js +1 -0
  16. package/dist/_app_/components/hds/app-footer/status-link.js +1 -0
  17. package/dist/_app_/components/hds/app-frame/index.js +1 -0
  18. package/dist/_app_/components/hds/app-frame/parts/footer.js +1 -0
  19. package/dist/_app_/components/hds/app-frame/parts/header.js +1 -0
  20. package/dist/_app_/components/hds/app-frame/parts/main.js +1 -0
  21. package/dist/_app_/components/hds/app-frame/parts/modals.js +1 -0
  22. package/dist/_app_/components/hds/app-frame/parts/sidebar.js +1 -0
  23. package/dist/_app_/components/hds/application-state/body.js +1 -0
  24. package/dist/_app_/components/hds/application-state/footer.js +1 -0
  25. package/dist/_app_/components/hds/application-state/header.js +1 -0
  26. package/dist/_app_/components/hds/application-state/index.js +1 -0
  27. package/dist/_app_/components/hds/badge/index.js +1 -0
  28. package/dist/_app_/components/hds/badge-count/index.js +1 -0
  29. package/dist/_app_/components/hds/breadcrumb/index.js +1 -0
  30. package/dist/_app_/components/hds/breadcrumb/item.js +1 -0
  31. package/dist/_app_/components/hds/breadcrumb/truncation.js +1 -0
  32. package/dist/_app_/components/hds/button/index.js +1 -0
  33. package/dist/_app_/components/hds/button-set/index.js +1 -0
  34. package/dist/_app_/components/hds/card/container.js +1 -0
  35. package/dist/_app_/components/hds/code-block/copy-button.js +1 -0
  36. package/dist/_app_/components/hds/code-block/description.js +1 -0
  37. package/dist/_app_/components/hds/code-block/index.js +1 -0
  38. package/dist/_app_/components/hds/code-block/title.js +1 -0
  39. package/dist/_app_/components/hds/copy/button/index.js +1 -0
  40. package/dist/_app_/components/hds/copy/snippet/index.js +1 -0
  41. package/dist/_app_/components/hds/disclosure-primitive/index.js +1 -0
  42. package/dist/_app_/components/hds/dismiss-button/index.js +1 -0
  43. package/dist/_app_/components/hds/dropdown/footer.js +1 -0
  44. package/dist/_app_/components/hds/dropdown/header.js +1 -0
  45. package/dist/_app_/components/hds/dropdown/index.js +1 -0
  46. package/dist/_app_/components/hds/dropdown/list-item/checkbox.js +1 -0
  47. package/dist/_app_/components/hds/dropdown/list-item/checkmark.js +1 -0
  48. package/dist/_app_/components/hds/dropdown/list-item/copy-item.js +1 -0
  49. package/dist/_app_/components/hds/dropdown/list-item/description.js +1 -0
  50. package/dist/_app_/components/hds/dropdown/list-item/generic.js +1 -0
  51. package/dist/_app_/components/hds/dropdown/list-item/interactive.js +1 -0
  52. package/dist/_app_/components/hds/dropdown/list-item/radio.js +1 -0
  53. package/dist/_app_/components/hds/dropdown/list-item/separator.js +1 -0
  54. package/dist/_app_/components/hds/dropdown/list-item/title.js +1 -0
  55. package/dist/_app_/components/hds/dropdown/toggle/button.js +1 -0
  56. package/dist/_app_/components/hds/dropdown/toggle/chevron.js +1 -0
  57. package/dist/_app_/components/hds/dropdown/toggle/icon.js +1 -0
  58. package/dist/_app_/components/hds/flyout/body.js +1 -0
  59. package/dist/_app_/components/hds/flyout/description.js +1 -0
  60. package/dist/_app_/components/hds/flyout/footer.js +1 -0
  61. package/dist/_app_/components/hds/flyout/header.js +1 -0
  62. package/dist/_app_/components/hds/flyout/index.js +1 -0
  63. package/dist/_app_/components/hds/form/character-count/index.js +1 -0
  64. package/dist/_app_/components/hds/form/checkbox/base.js +1 -0
  65. package/dist/_app_/components/hds/form/checkbox/field.js +1 -0
  66. package/dist/_app_/components/hds/form/checkbox/group.js +1 -0
  67. package/dist/_app_/components/hds/form/error/index.js +1 -0
  68. package/dist/_app_/components/hds/form/error/message.js +1 -0
  69. package/dist/_app_/components/hds/form/field/index.js +1 -0
  70. package/dist/_app_/components/hds/form/fieldset/index.js +1 -0
  71. package/dist/_app_/components/hds/form/file-input/base.js +1 -0
  72. package/dist/_app_/components/hds/form/file-input/field.js +1 -0
  73. package/dist/_app_/components/hds/form/helper-text/index.js +1 -0
  74. package/dist/_app_/components/hds/form/indicator/index.js +1 -0
  75. package/dist/_app_/components/hds/form/label/index.js +1 -0
  76. package/dist/_app_/components/hds/form/legend/index.js +1 -0
  77. package/dist/_app_/components/hds/form/masked-input/base.js +1 -0
  78. package/dist/_app_/components/hds/form/masked-input/field.js +1 -0
  79. package/dist/_app_/components/hds/form/radio/base.js +1 -0
  80. package/dist/_app_/components/hds/form/radio/field.js +1 -0
  81. package/dist/_app_/components/hds/form/radio/group.js +1 -0
  82. package/dist/_app_/components/hds/form/radio-card/description.js +1 -0
  83. package/dist/_app_/components/hds/form/radio-card/group.js +1 -0
  84. package/dist/_app_/components/hds/form/radio-card/index.js +1 -0
  85. package/dist/_app_/components/hds/form/radio-card/label.js +1 -0
  86. package/dist/_app_/components/hds/form/select/base.js +1 -0
  87. package/dist/_app_/components/hds/form/select/field.js +1 -0
  88. package/dist/_app_/components/hds/form/text-input/base.js +1 -0
  89. package/dist/_app_/components/hds/form/text-input/field.js +1 -0
  90. package/dist/_app_/components/hds/form/textarea/base.js +1 -0
  91. package/dist/_app_/components/hds/form/textarea/field.js +1 -0
  92. package/dist/_app_/components/hds/form/toggle/base.js +1 -0
  93. package/dist/_app_/components/hds/form/toggle/field.js +1 -0
  94. package/dist/_app_/components/hds/form/toggle/group.js +1 -0
  95. package/dist/_app_/components/hds/form/visibility-toggle/index.js +1 -0
  96. package/dist/_app_/components/hds/icon-tile/index.js +1 -0
  97. package/dist/_app_/components/hds/interactive/index.js +1 -0
  98. package/dist/_app_/components/hds/link/inline.js +1 -0
  99. package/dist/_app_/components/hds/link/standalone.js +1 -0
  100. package/dist/_app_/components/hds/menu-primitive/index.js +1 -0
  101. package/dist/_app_/components/hds/modal/body.js +1 -0
  102. package/dist/_app_/components/hds/modal/footer.js +1 -0
  103. package/dist/_app_/components/hds/modal/header.js +1 -0
  104. package/dist/_app_/components/hds/modal/index.js +1 -0
  105. package/dist/_app_/components/hds/page-header/actions.js +1 -0
  106. package/dist/_app_/components/hds/page-header/badges.js +1 -0
  107. package/dist/_app_/components/hds/page-header/description.js +1 -0
  108. package/dist/_app_/components/hds/page-header/index.js +1 -0
  109. package/dist/_app_/components/hds/page-header/subtitle.js +1 -0
  110. package/dist/_app_/components/hds/page-header/title.js +1 -0
  111. package/dist/_app_/components/hds/pagination/compact/index.js +1 -0
  112. package/dist/_app_/components/hds/pagination/info/index.js +1 -0
  113. package/dist/_app_/components/hds/pagination/nav/arrow.js +1 -0
  114. package/dist/_app_/components/hds/pagination/nav/ellipsis.js +1 -0
  115. package/dist/_app_/components/hds/pagination/nav/number.js +1 -0
  116. package/dist/_app_/components/hds/pagination/numbered/index.js +1 -0
  117. package/dist/_app_/components/hds/pagination/size-selector/index.js +1 -0
  118. package/dist/_app_/components/hds/reveal/index.js +1 -0
  119. package/dist/_app_/components/hds/reveal/toggle/button.js +1 -0
  120. package/dist/_app_/components/hds/segmented-group/index.js +1 -0
  121. package/dist/_app_/components/hds/separator/index.js +1 -0
  122. package/dist/_app_/components/hds/side-nav/base.js +1 -0
  123. package/dist/_app_/components/hds/side-nav/header/home-link.js +1 -0
  124. package/dist/_app_/components/hds/side-nav/header/icon-button.js +1 -0
  125. package/dist/_app_/components/hds/side-nav/header/index.js +1 -0
  126. package/dist/_app_/components/hds/side-nav/index.js +1 -0
  127. package/dist/_app_/components/hds/side-nav/list/back-link.js +1 -0
  128. package/dist/_app_/components/hds/side-nav/list/index.js +1 -0
  129. package/dist/_app_/components/hds/side-nav/list/item.js +1 -0
  130. package/dist/_app_/components/hds/side-nav/list/link.js +1 -0
  131. package/dist/_app_/components/hds/side-nav/list/title.js +1 -0
  132. package/dist/_app_/components/hds/side-nav/portal/index.js +1 -0
  133. package/dist/_app_/components/hds/side-nav/portal/target.js +1 -0
  134. package/dist/_app_/components/hds/side-nav/toggle-button.js +1 -0
  135. package/dist/_app_/components/hds/stepper/step/indicator.js +1 -0
  136. package/dist/_app_/components/hds/stepper/task/indicator.js +1 -0
  137. package/dist/_app_/components/hds/table/index.js +1 -0
  138. package/dist/_app_/components/hds/table/td.js +1 -0
  139. package/dist/_app_/components/hds/table/th-button-sort.js +1 -0
  140. package/dist/_app_/components/hds/table/th-button-tooltip.js +1 -0
  141. package/dist/_app_/components/hds/table/th-selectable.js +1 -0
  142. package/dist/_app_/components/hds/table/th-sort.js +1 -0
  143. package/dist/_app_/components/hds/table/th.js +1 -0
  144. package/dist/_app_/components/hds/table/tr.js +1 -0
  145. package/dist/_app_/components/hds/tabs/index.js +1 -0
  146. package/dist/_app_/components/hds/tabs/panel.js +1 -0
  147. package/dist/_app_/components/hds/tabs/tab.js +1 -0
  148. package/dist/_app_/components/hds/tag/index.js +1 -0
  149. package/dist/_app_/components/hds/text/body.js +1 -0
  150. package/dist/_app_/components/hds/text/code.js +1 -0
  151. package/dist/_app_/components/hds/text/display.js +1 -0
  152. package/dist/_app_/components/hds/text/index.js +1 -0
  153. package/dist/_app_/components/hds/toast/index.js +1 -0
  154. package/dist/_app_/components/hds/tooltip-button/index.js +1 -0
  155. package/dist/_app_/components/hds/yield/index.js +1 -0
  156. package/dist/_app_/helpers/hds-link-to-models.js +1 -0
  157. package/dist/_app_/helpers/hds-link-to-query.js +1 -0
  158. package/dist/_app_/modifiers/hds-clipboard.js +1 -0
  159. package/dist/_app_/modifiers/hds-tooltip.js +1 -0
  160. package/dist/_rollupPluginBabelHelpers-lqPQKyNs.js +78 -0
  161. package/dist/_rollupPluginBabelHelpers-lqPQKyNs.js.map +1 -0
  162. package/dist/components/hds/accordion/index.js +10 -0
  163. package/dist/components/hds/accordion/index.js.map +1 -0
  164. package/dist/components/hds/accordion/item/button.js +36 -0
  165. package/dist/components/hds/accordion/item/button.js.map +1 -0
  166. package/dist/components/hds/accordion/item/index.js +62 -0
  167. package/dist/components/hds/accordion/item/index.js.map +1 -0
  168. package/dist/components/hds/alert/description.js +10 -0
  169. package/dist/components/hds/alert/description.js.map +1 -0
  170. package/dist/components/hds/alert/index.js +153 -0
  171. package/dist/components/hds/alert/index.js.map +1 -0
  172. package/dist/components/hds/alert/title.js +10 -0
  173. package/dist/components/hds/alert/title.js.map +1 -0
  174. package/dist/components/hds/app-footer/copyright.js +26 -0
  175. package/dist/components/hds/app-footer/copyright.js.map +1 -0
  176. package/dist/components/hds/app-footer/index.js +48 -0
  177. package/dist/components/hds/app-footer/index.js.map +1 -0
  178. package/dist/components/hds/app-footer/item.js +10 -0
  179. package/dist/components/hds/app-footer/item.js.map +1 -0
  180. package/dist/components/hds/app-footer/legal-links.js +70 -0
  181. package/dist/components/hds/app-footer/legal-links.js.map +1 -0
  182. package/dist/components/hds/app-footer/link.js +10 -0
  183. package/dist/components/hds/app-footer/link.js.map +1 -0
  184. package/dist/components/hds/app-footer/status-link.js +116 -0
  185. package/dist/components/hds/app-footer/status-link.js.map +1 -0
  186. package/dist/components/hds/app-frame/index.js +60 -0
  187. package/dist/components/hds/app-frame/index.js.map +1 -0
  188. package/dist/components/hds/app-frame/parts/footer.js +10 -0
  189. package/dist/components/hds/app-frame/parts/footer.js.map +1 -0
  190. package/dist/components/hds/app-frame/parts/header.js +10 -0
  191. package/dist/components/hds/app-frame/parts/header.js.map +1 -0
  192. package/dist/components/hds/app-frame/parts/main.js +10 -0
  193. package/dist/components/hds/app-frame/parts/main.js.map +1 -0
  194. package/dist/components/hds/app-frame/parts/modals.js +10 -0
  195. package/dist/components/hds/app-frame/parts/modals.js.map +1 -0
  196. package/dist/components/hds/app-frame/parts/sidebar.js +10 -0
  197. package/dist/components/hds/app-frame/parts/sidebar.js.map +1 -0
  198. package/dist/components/hds/application-state/body.js +10 -0
  199. package/dist/components/hds/application-state/body.js.map +1 -0
  200. package/dist/components/hds/application-state/footer.js +42 -0
  201. package/dist/components/hds/application-state/footer.js.map +1 -0
  202. package/dist/components/hds/application-state/header.js +10 -0
  203. package/dist/components/hds/application-state/header.js.map +1 -0
  204. package/dist/components/hds/application-state/index.js +10 -0
  205. package/dist/components/hds/application-state/index.js.map +1 -0
  206. package/dist/components/hds/badge/index.js +127 -0
  207. package/dist/components/hds/badge/index.js.map +1 -0
  208. package/dist/components/hds/badge-count/index.js +90 -0
  209. package/dist/components/hds/badge-count/index.js.map +1 -0
  210. package/dist/components/hds/breadcrumb/index.js +66 -0
  211. package/dist/components/hds/breadcrumb/index.js.map +1 -0
  212. package/dist/components/hds/breadcrumb/item.js +59 -0
  213. package/dist/components/hds/breadcrumb/item.js.map +1 -0
  214. package/dist/components/hds/breadcrumb/truncation.js +25 -0
  215. package/dist/components/hds/breadcrumb/truncation.js.map +1 -0
  216. package/dist/components/hds/button/index.js +157 -0
  217. package/dist/components/hds/button/index.js.map +1 -0
  218. package/dist/components/hds/button-set/index.js +10 -0
  219. package/dist/components/hds/button-set/index.js.map +1 -0
  220. package/dist/components/hds/card/container.js +130 -0
  221. package/dist/components/hds/card/container.js.map +1 -0
  222. package/dist/components/hds/code-block/copy-button.js +10 -0
  223. package/dist/components/hds/code-block/copy-button.js.map +1 -0
  224. package/dist/components/hds/code-block/description.js +10 -0
  225. package/dist/components/hds/code-block/description.js.map +1 -0
  226. package/dist/components/hds/code-block/index.js +160 -0
  227. package/dist/components/hds/code-block/index.js.map +1 -0
  228. package/dist/components/hds/code-block/title.js +10 -0
  229. package/dist/components/hds/code-block/title.js.map +1 -0
  230. package/dist/components/hds/copy/button/index.js +109 -0
  231. package/dist/components/hds/copy/button/index.js.map +1 -0
  232. package/dist/components/hds/copy/snippet/index.js +142 -0
  233. package/dist/components/hds/copy/snippet/index.js.map +1 -0
  234. package/dist/components/hds/disclosure-primitive/index.js +41 -0
  235. package/dist/components/hds/disclosure-primitive/index.js.map +1 -0
  236. package/dist/components/hds/dismiss-button/index.js +25 -0
  237. package/dist/components/hds/dismiss-button/index.js.map +1 -0
  238. package/dist/components/hds/dropdown/footer.js +10 -0
  239. package/dist/components/hds/dropdown/footer.js.map +1 -0
  240. package/dist/components/hds/dropdown/header.js +10 -0
  241. package/dist/components/hds/dropdown/header.js.map +1 -0
  242. package/dist/components/hds/dropdown/index.js +72 -0
  243. package/dist/components/hds/dropdown/index.js.map +1 -0
  244. package/dist/components/hds/dropdown/list-item/checkbox.js +24 -0
  245. package/dist/components/hds/dropdown/list-item/checkbox.js.map +1 -0
  246. package/dist/components/hds/dropdown/list-item/checkmark.js +31 -0
  247. package/dist/components/hds/dropdown/list-item/checkmark.js.map +1 -0
  248. package/dist/components/hds/dropdown/list-item/copy-item.js +53 -0
  249. package/dist/components/hds/dropdown/list-item/copy-item.js.map +1 -0
  250. package/dist/components/hds/dropdown/list-item/description.js +30 -0
  251. package/dist/components/hds/dropdown/list-item/description.js.map +1 -0
  252. package/dist/components/hds/dropdown/list-item/generic.js +10 -0
  253. package/dist/components/hds/dropdown/list-item/generic.js.map +1 -0
  254. package/dist/components/hds/dropdown/list-item/interactive.js +59 -0
  255. package/dist/components/hds/dropdown/list-item/interactive.js.map +1 -0
  256. package/dist/components/hds/dropdown/list-item/radio.js +24 -0
  257. package/dist/components/hds/dropdown/list-item/radio.js.map +1 -0
  258. package/dist/components/hds/dropdown/list-item/separator.js +10 -0
  259. package/dist/components/hds/dropdown/list-item/separator.js.map +1 -0
  260. package/dist/components/hds/dropdown/list-item/title.js +30 -0
  261. package/dist/components/hds/dropdown/list-item/title.js.map +1 -0
  262. package/dist/components/hds/dropdown/toggle/button.js +134 -0
  263. package/dist/components/hds/dropdown/toggle/button.js.map +1 -0
  264. package/dist/components/hds/dropdown/toggle/chevron.js +10 -0
  265. package/dist/components/hds/dropdown/toggle/chevron.js.map +1 -0
  266. package/dist/components/hds/dropdown/toggle/icon.js +116 -0
  267. package/dist/components/hds/dropdown/toggle/icon.js.map +1 -0
  268. package/dist/components/hds/flyout/body.js +10 -0
  269. package/dist/components/hds/flyout/body.js.map +1 -0
  270. package/dist/components/hds/flyout/description.js +10 -0
  271. package/dist/components/hds/flyout/description.js.map +1 -0
  272. package/dist/components/hds/flyout/footer.js +10 -0
  273. package/dist/components/hds/flyout/footer.js.map +1 -0
  274. package/dist/components/hds/flyout/header.js +10 -0
  275. package/dist/components/hds/flyout/header.js.map +1 -0
  276. package/dist/components/hds/flyout/index.js +156 -0
  277. package/dist/components/hds/flyout/index.js.map +1 -0
  278. package/dist/components/hds/form/character-count/index.js +149 -0
  279. package/dist/components/hds/form/character-count/index.js.map +1 -0
  280. package/dist/components/hds/form/checkbox/base.js +10 -0
  281. package/dist/components/hds/form/checkbox/base.js.map +1 -0
  282. package/dist/components/hds/form/checkbox/field.js +10 -0
  283. package/dist/components/hds/form/checkbox/field.js.map +1 -0
  284. package/dist/components/hds/form/checkbox/group.js +10 -0
  285. package/dist/components/hds/form/checkbox/group.js.map +1 -0
  286. package/dist/components/hds/form/error/index.js +68 -0
  287. package/dist/components/hds/form/error/index.js.map +1 -0
  288. package/dist/components/hds/form/error/message.js +10 -0
  289. package/dist/components/hds/form/error/message.js.map +1 -0
  290. package/dist/components/hds/form/field/index.js +107 -0
  291. package/dist/components/hds/form/field/index.js.map +1 -0
  292. package/dist/components/hds/form/fieldset/index.js +93 -0
  293. package/dist/components/hds/form/fieldset/index.js.map +1 -0
  294. package/dist/components/hds/form/file-input/base.js +10 -0
  295. package/dist/components/hds/form/file-input/base.js.map +1 -0
  296. package/dist/components/hds/form/file-input/field.js +10 -0
  297. package/dist/components/hds/form/file-input/field.js.map +1 -0
  298. package/dist/components/hds/form/helper-text/index.js +68 -0
  299. package/dist/components/hds/form/helper-text/index.js.map +1 -0
  300. package/dist/components/hds/form/indicator/index.js +30 -0
  301. package/dist/components/hds/form/indicator/index.js.map +1 -0
  302. package/dist/components/hds/form/label/index.js +36 -0
  303. package/dist/components/hds/form/label/index.js.map +1 -0
  304. package/dist/components/hds/form/legend/index.js +36 -0
  305. package/dist/components/hds/form/legend/index.js.map +1 -0
  306. package/dist/components/hds/form/masked-input/base.js +96 -0
  307. package/dist/components/hds/form/masked-input/base.js.map +1 -0
  308. package/dist/components/hds/form/masked-input/field.js +10 -0
  309. package/dist/components/hds/form/masked-input/field.js.map +1 -0
  310. package/dist/components/hds/form/radio/base.js +10 -0
  311. package/dist/components/hds/form/radio/base.js.map +1 -0
  312. package/dist/components/hds/form/radio/field.js +10 -0
  313. package/dist/components/hds/form/radio/field.js.map +1 -0
  314. package/dist/components/hds/form/radio/group.js +10 -0
  315. package/dist/components/hds/form/radio/group.js.map +1 -0
  316. package/dist/components/hds/form/radio-card/description.js +10 -0
  317. package/dist/components/hds/form/radio-card/description.js.map +1 -0
  318. package/dist/components/hds/form/radio-card/group.js +10 -0
  319. package/dist/components/hds/form/radio-card/group.js.map +1 -0
  320. package/dist/components/hds/form/radio-card/index.js +107 -0
  321. package/dist/components/hds/form/radio-card/index.js.map +1 -0
  322. package/dist/components/hds/form/radio-card/label.js +10 -0
  323. package/dist/components/hds/form/radio-card/label.js.map +1 -0
  324. package/dist/components/hds/form/select/base.js +34 -0
  325. package/dist/components/hds/form/select/base.js.map +1 -0
  326. package/dist/components/hds/form/select/field.js +10 -0
  327. package/dist/components/hds/form/select/field.js.map +1 -0
  328. package/dist/components/hds/form/text-input/base.js +62 -0
  329. package/dist/components/hds/form/text-input/base.js.map +1 -0
  330. package/dist/components/hds/form/text-input/field.js +85 -0
  331. package/dist/components/hds/form/text-input/field.js.map +1 -0
  332. package/dist/components/hds/form/textarea/base.js +34 -0
  333. package/dist/components/hds/form/textarea/base.js.map +1 -0
  334. package/dist/components/hds/form/textarea/field.js +10 -0
  335. package/dist/components/hds/form/textarea/field.js.map +1 -0
  336. package/dist/components/hds/form/toggle/base.js +10 -0
  337. package/dist/components/hds/form/toggle/base.js.map +1 -0
  338. package/dist/components/hds/form/toggle/field.js +10 -0
  339. package/dist/components/hds/form/toggle/field.js.map +1 -0
  340. package/dist/components/hds/form/toggle/group.js +10 -0
  341. package/dist/components/hds/form/toggle/group.js.map +1 -0
  342. package/dist/components/hds/form/visibility-toggle/index.js +10 -0
  343. package/dist/components/hds/form/visibility-toggle/index.js.map +1 -0
  344. package/dist/components/hds/icon-tile/index.js +158 -0
  345. package/dist/components/hds/icon-tile/index.js.map +1 -0
  346. package/dist/components/hds/interactive/index.js +41 -0
  347. package/dist/components/hds/interactive/index.js.map +1 -0
  348. package/dist/components/hds/link/inline.js +72 -0
  349. package/dist/components/hds/link/inline.js.map +1 -0
  350. package/dist/components/hds/link/standalone.js +132 -0
  351. package/dist/components/hds/link/standalone.js.map +1 -0
  352. package/dist/components/hds/menu-primitive/index.js +68 -0
  353. package/dist/components/hds/menu-primitive/index.js.map +1 -0
  354. package/dist/components/hds/modal/body.js +10 -0
  355. package/dist/components/hds/modal/body.js.map +1 -0
  356. package/dist/components/hds/modal/footer.js +10 -0
  357. package/dist/components/hds/modal/footer.js.map +1 -0
  358. package/dist/components/hds/modal/header.js +10 -0
  359. package/dist/components/hds/modal/header.js.map +1 -0
  360. package/dist/components/hds/modal/index.js +196 -0
  361. package/dist/components/hds/modal/index.js.map +1 -0
  362. package/dist/components/hds/page-header/actions.js +10 -0
  363. package/dist/components/hds/page-header/actions.js.map +1 -0
  364. package/dist/components/hds/page-header/badges.js +10 -0
  365. package/dist/components/hds/page-header/badges.js.map +1 -0
  366. package/dist/components/hds/page-header/description.js +10 -0
  367. package/dist/components/hds/page-header/description.js.map +1 -0
  368. package/dist/components/hds/page-header/index.js +10 -0
  369. package/dist/components/hds/page-header/index.js.map +1 -0
  370. package/dist/components/hds/page-header/subtitle.js +10 -0
  371. package/dist/components/hds/page-header/subtitle.js.map +1 -0
  372. package/dist/components/hds/page-header/title.js +10 -0
  373. package/dist/components/hds/page-header/title.js.map +1 -0
  374. package/dist/components/hds/pagination/compact/index.js +159 -0
  375. package/dist/components/hds/pagination/compact/index.js.map +1 -0
  376. package/dist/components/hds/pagination/info/index.js +25 -0
  377. package/dist/components/hds/pagination/info/index.js.map +1 -0
  378. package/dist/components/hds/pagination/nav/arrow.js +70 -0
  379. package/dist/components/hds/pagination/nav/arrow.js.map +1 -0
  380. package/dist/components/hds/pagination/nav/ellipsis.js +10 -0
  381. package/dist/components/hds/pagination/nav/ellipsis.js.map +1 -0
  382. package/dist/components/hds/pagination/nav/number.js +44 -0
  383. package/dist/components/hds/pagination/nav/number.js.map +1 -0
  384. package/dist/components/hds/pagination/numbered/index.js +305 -0
  385. package/dist/components/hds/pagination/numbered/index.js.map +1 -0
  386. package/dist/components/hds/pagination/size-selector/index.js +72 -0
  387. package/dist/components/hds/pagination/size-selector/index.js.map +1 -0
  388. package/dist/components/hds/reveal/index.js +36 -0
  389. package/dist/components/hds/reveal/index.js.map +1 -0
  390. package/dist/components/hds/reveal/toggle/button.js +31 -0
  391. package/dist/components/hds/reveal/toggle/button.js.map +1 -0
  392. package/dist/components/hds/segmented-group/index.js +10 -0
  393. package/dist/components/hds/segmented-group/index.js.map +1 -0
  394. package/dist/components/hds/separator/index.js +48 -0
  395. package/dist/components/hds/separator/index.js.map +1 -0
  396. package/dist/components/hds/side-nav/base.js +10 -0
  397. package/dist/components/hds/side-nav/base.js.map +1 -0
  398. package/dist/components/hds/side-nav/header/home-link.js +30 -0
  399. package/dist/components/hds/side-nav/header/home-link.js.map +1 -0
  400. package/dist/components/hds/side-nav/header/icon-button.js +30 -0
  401. package/dist/components/hds/side-nav/header/icon-button.js.map +1 -0
  402. package/dist/components/hds/side-nav/header/index.js +10 -0
  403. package/dist/components/hds/side-nav/header/index.js.map +1 -0
  404. package/dist/components/hds/side-nav/index.js +176 -0
  405. package/dist/components/hds/side-nav/index.js.map +1 -0
  406. package/dist/components/hds/side-nav/list/back-link.js +10 -0
  407. package/dist/components/hds/side-nav/list/back-link.js.map +1 -0
  408. package/dist/components/hds/side-nav/list/index.js +10 -0
  409. package/dist/components/hds/side-nav/list/index.js.map +1 -0
  410. package/dist/components/hds/side-nav/list/item.js +10 -0
  411. package/dist/components/hds/side-nav/list/item.js.map +1 -0
  412. package/dist/components/hds/side-nav/list/link.js +10 -0
  413. package/dist/components/hds/side-nav/list/link.js.map +1 -0
  414. package/dist/components/hds/side-nav/list/title.js +10 -0
  415. package/dist/components/hds/side-nav/list/title.js.map +1 -0
  416. package/dist/components/hds/side-nav/portal/index.js +10 -0
  417. package/dist/components/hds/side-nav/portal/index.js.map +1 -0
  418. package/dist/components/hds/side-nav/portal/target.js +173 -0
  419. package/dist/components/hds/side-nav/portal/target.js.map +1 -0
  420. package/dist/components/hds/side-nav/toggle-button.js +10 -0
  421. package/dist/components/hds/side-nav/toggle-button.js.map +1 -0
  422. package/dist/components/hds/stepper/step/indicator.js +59 -0
  423. package/dist/components/hds/stepper/step/indicator.js.map +1 -0
  424. package/dist/components/hds/stepper/task/indicator.js +74 -0
  425. package/dist/components/hds/stepper/task/indicator.js.map +1 -0
  426. package/dist/components/hds/table/index.js +269 -0
  427. package/dist/components/hds/table/index.js.map +1 -0
  428. package/dist/components/hds/table/td.js +48 -0
  429. package/dist/components/hds/table/td.js.map +1 -0
  430. package/dist/components/hds/table/th-button-sort.js +82 -0
  431. package/dist/components/hds/table/th-button-sort.js.map +1 -0
  432. package/dist/components/hds/table/th-button-tooltip.js +32 -0
  433. package/dist/components/hds/table/th-button-tooltip.js.map +1 -0
  434. package/dist/components/hds/table/th-selectable.js +81 -0
  435. package/dist/components/hds/table/th-selectable.js.map +1 -0
  436. package/dist/components/hds/table/th-sort.js +73 -0
  437. package/dist/components/hds/table/th-sort.js.map +1 -0
  438. package/dist/components/hds/table/th.js +54 -0
  439. package/dist/components/hds/table/th.js.map +1 -0
  440. package/dist/components/hds/table/tr.js +30 -0
  441. package/dist/components/hds/table/tr.js.map +1 -0
  442. package/dist/components/hds/tabs/index.js +242 -0
  443. package/dist/components/hds/tabs/index.js.map +1 -0
  444. package/dist/components/hds/tabs/panel.js +60 -0
  445. package/dist/components/hds/tabs/panel.js.map +1 -0
  446. package/dist/components/hds/tabs/tab.js +94 -0
  447. package/dist/components/hds/tabs/tab.js.map +1 -0
  448. package/dist/components/hds/tag/index.js +92 -0
  449. package/dist/components/hds/tag/index.js.map +1 -0
  450. package/dist/components/hds/text/body.js +63 -0
  451. package/dist/components/hds/text/body.js.map +1 -0
  452. package/dist/components/hds/text/code.js +63 -0
  453. package/dist/components/hds/text/code.js.map +1 -0
  454. package/dist/components/hds/text/display.js +76 -0
  455. package/dist/components/hds/text/display.js.map +1 -0
  456. package/dist/components/hds/text/index.js +131 -0
  457. package/dist/components/hds/text/index.js.map +1 -0
  458. package/dist/components/hds/toast/index.js +10 -0
  459. package/dist/components/hds/toast/index.js.map +1 -0
  460. package/dist/components/hds/tooltip-button/index.js +74 -0
  461. package/dist/components/hds/tooltip-button/index.js.map +1 -0
  462. package/dist/components/hds/yield/index.js +10 -0
  463. package/dist/components/hds/yield/index.js.map +1 -0
  464. package/dist/helpers/hds-link-to-models.js +34 -0
  465. package/dist/helpers/hds-link-to-models.js.map +1 -0
  466. package/dist/helpers/hds-link-to-query.js +29 -0
  467. package/dist/helpers/hds-link-to-query.js.map +1 -0
  468. package/dist/modifiers/hds-clipboard.js +152 -0
  469. package/dist/modifiers/hds-clipboard.js.map +1 -0
  470. package/dist/modifiers/hds-tooltip.js +153 -0
  471. package/dist/modifiers/hds-tooltip.js.map +1 -0
  472. package/dist/styles/@hashicorp/design-system-components.css +6600 -0
  473. package/dist/styles/@hashicorp/design-system-components.scss +67 -0
  474. package/dist/styles/@hashicorp/design-system-components.scss.map +1 -0
  475. package/dist/styles/components/flyout.scss +113 -0
  476. package/dist/styles/components/table.scss +277 -0
  477. package/dist/styles/components/tabs.scss +152 -0
  478. package/dist/template-registry.js +2 -0
  479. package/dist/template-registry.js.map +1 -0
  480. package/dist/utils/hds-get-element-id.js +22 -0
  481. package/dist/utils/hds-get-element-id.js.map +1 -0
  482. package/dist/utils/hds-set-aria-described-by.js +17 -0
  483. package/dist/utils/hds-set-aria-described-by.js.map +1 -0
  484. package/package.json +196 -62
  485. package/.stylelintignore +0 -26
  486. package/CHANGELOG-FIGMA-COMPONENTS.md +0 -191
  487. package/CHANGELOG-FIGMA-FOUNDATIONS.md +0 -13
  488. package/CHANGELOG.md +0 -1609
  489. package/HOW-TO-TEST-A-COMPONENT-IN-CLOUD-UI.md +0 -100
  490. package/NEW-COMPONENT-CHECKLIST.md +0 -166
  491. package/RELEASE.md +0 -40
  492. package/addon/components/hds/accordion/index.hbs +0 -8
  493. package/addon/components/hds/accordion/item/button.hbs +0 -16
  494. package/addon/components/hds/accordion/item/button.js +0 -31
  495. package/addon/components/hds/accordion/item/index.hbs +0 -41
  496. package/addon/components/hds/accordion/item/index.js +0 -58
  497. package/addon/components/hds/alert/description.hbs +0 -5
  498. package/addon/components/hds/alert/index.hbs +0 -38
  499. package/addon/components/hds/alert/index.js +0 -164
  500. package/addon/components/hds/alert/title.hbs +0 -5
  501. package/addon/components/hds/app-footer/copyright.hbs +0 -9
  502. package/addon/components/hds/app-footer/copyright.js +0 -18
  503. package/addon/components/hds/app-footer/index.hbs +0 -20
  504. package/addon/components/hds/app-footer/index.js +0 -41
  505. package/addon/components/hds/app-footer/item.hbs +0 -8
  506. package/addon/components/hds/app-footer/legal-links.hbs +0 -14
  507. package/addon/components/hds/app-footer/legal-links.js +0 -67
  508. package/addon/components/hds/app-footer/link.hbs +0 -22
  509. package/addon/components/hds/app-footer/status-link.hbs +0 -20
  510. package/addon/components/hds/app-footer/status-link.js +0 -121
  511. package/addon/components/hds/app-frame/index.hbs +0 -24
  512. package/addon/components/hds/app-frame/index.js +0 -52
  513. package/addon/components/hds/app-frame/parts/footer.hbs +0 -7
  514. package/addon/components/hds/app-frame/parts/header.hbs +0 -7
  515. package/addon/components/hds/app-frame/parts/main.hbs +0 -7
  516. package/addon/components/hds/app-frame/parts/modals.hbs +0 -6
  517. package/addon/components/hds/app-frame/parts/sidebar.hbs +0 -7
  518. package/addon/components/hds/application-state/body.hbs +0 -13
  519. package/addon/components/hds/application-state/footer.hbs +0 -7
  520. package/addon/components/hds/application-state/footer.js +0 -35
  521. package/addon/components/hds/application-state/header.hbs +0 -20
  522. package/addon/components/hds/application-state/index.hbs +0 -13
  523. package/addon/components/hds/badge/index.hbs +0 -18
  524. package/addon/components/hds/badge/index.js +0 -146
  525. package/addon/components/hds/badge-count/index.hbs +0 -7
  526. package/addon/components/hds/badge-count/index.js +0 -99
  527. package/addon/components/hds/breadcrumb/index.hbs +0 -9
  528. package/addon/components/hds/breadcrumb/index.js +0 -59
  529. package/addon/components/hds/breadcrumb/item.hbs +0 -50
  530. package/addon/components/hds/breadcrumb/item.js +0 -55
  531. package/addon/components/hds/breadcrumb/truncation.hbs +0 -26
  532. package/addon/components/hds/breadcrumb/truncation.js +0 -17
  533. package/addon/components/hds/button/index.hbs +0 -45
  534. package/addon/components/hds/button/index.ts +0 -199
  535. package/addon/components/hds/button-set/index.hbs +0 -7
  536. package/addon/components/hds/card/container.hbs +0 -7
  537. package/addon/components/hds/card/container.js +0 -161
  538. package/addon/components/hds/code-block/copy-button.hbs +0 -13
  539. package/addon/components/hds/code-block/description.hbs +0 -8
  540. package/addon/components/hds/code-block/index.hbs +0 -27
  541. package/addon/components/hds/code-block/index.js +0 -167
  542. package/addon/components/hds/code-block/title.hbs +0 -8
  543. package/addon/components/hds/copy/button/index.hbs +0 -16
  544. package/addon/components/hds/copy/button/index.js +0 -103
  545. package/addon/components/hds/copy/snippet/index.hbs +0 -15
  546. package/addon/components/hds/copy/snippet/index.js +0 -135
  547. package/addon/components/hds/disclosure-primitive/index.hbs +0 -14
  548. package/addon/components/hds/disclosure-primitive/index.js +0 -30
  549. package/addon/components/hds/dismiss-button/index.hbs +0 -7
  550. package/addon/components/hds/dismiss-button/index.js +0 -17
  551. package/addon/components/hds/dropdown/footer.hbs +0 -8
  552. package/addon/components/hds/dropdown/header.hbs +0 -8
  553. package/addon/components/hds/dropdown/index.hbs +0 -36
  554. package/addon/components/hds/dropdown/index.js +0 -80
  555. package/addon/components/hds/dropdown/list-item/checkbox.hbs +0 -20
  556. package/addon/components/hds/dropdown/list-item/checkbox.js +0 -16
  557. package/addon/components/hds/dropdown/list-item/checkmark.hbs +0 -46
  558. package/addon/components/hds/dropdown/list-item/checkmark.js +0 -28
  559. package/addon/components/hds/dropdown/list-item/copy-item.hbs +0 -16
  560. package/addon/components/hds/dropdown/list-item/copy-item.js +0 -51
  561. package/addon/components/hds/dropdown/list-item/description.hbs +0 -14
  562. package/addon/components/hds/dropdown/list-item/description.js +0 -25
  563. package/addon/components/hds/dropdown/list-item/generic.hbs +0 -7
  564. package/addon/components/hds/dropdown/list-item/interactive.hbs +0 -37
  565. package/addon/components/hds/dropdown/list-item/interactive.js +0 -64
  566. package/addon/components/hds/dropdown/list-item/radio.hbs +0 -25
  567. package/addon/components/hds/dropdown/list-item/radio.js +0 -16
  568. package/addon/components/hds/dropdown/list-item/separator.hbs +0 -10
  569. package/addon/components/hds/dropdown/list-item/title.hbs +0 -14
  570. package/addon/components/hds/dropdown/list-item/title.js +0 -25
  571. package/addon/components/hds/dropdown/toggle/button.hbs +0 -38
  572. package/addon/components/hds/dropdown/toggle/button.js +0 -134
  573. package/addon/components/hds/dropdown/toggle/chevron.hbs +0 -8
  574. package/addon/components/hds/dropdown/toggle/icon.hbs +0 -23
  575. package/addon/components/hds/dropdown/toggle/icon.js +0 -119
  576. package/addon/components/hds/flyout/body.hbs +0 -7
  577. package/addon/components/hds/flyout/description.hbs +0 -7
  578. package/addon/components/hds/flyout/footer.hbs +0 -7
  579. package/addon/components/hds/flyout/header.hbs +0 -18
  580. package/addon/components/hds/flyout/index.hbs +0 -20
  581. package/addon/components/hds/flyout/index.js +0 -168
  582. package/addon/components/hds/form/character-count/index.hbs +0 -28
  583. package/addon/components/hds/form/character-count/index.js +0 -178
  584. package/addon/components/hds/form/checkbox/base.hbs +0 -5
  585. package/addon/components/hds/form/checkbox/field.hbs +0 -24
  586. package/addon/components/hds/form/checkbox/group.hbs +0 -29
  587. package/addon/components/hds/form/error/index.hbs +0 -10
  588. package/addon/components/hds/form/error/index.js +0 -58
  589. package/addon/components/hds/form/error/message.hbs +0 -7
  590. package/addon/components/hds/form/field/index.hbs +0 -47
  591. package/addon/components/hds/form/field/index.js +0 -97
  592. package/addon/components/hds/form/fieldset/index.hbs +0 -33
  593. package/addon/components/hds/form/fieldset/index.js +0 -76
  594. package/addon/components/hds/form/file-input/base.hbs +0 -6
  595. package/addon/components/hds/form/file-input/field.hbs +0 -24
  596. package/addon/components/hds/form/helper-text/index.hbs +0 -15
  597. package/addon/components/hds/form/helper-text/index.js +0 -58
  598. package/addon/components/hds/form/indicator/index.hbs +0 -10
  599. package/addon/components/hds/form/indicator/index.js +0 -24
  600. package/addon/components/hds/form/label/index.hbs +0 -8
  601. package/addon/components/hds/form/label/index.js +0 -29
  602. package/addon/components/hds/form/legend/index.hbs +0 -8
  603. package/addon/components/hds/form/legend/index.js +0 -29
  604. package/addon/components/hds/form/masked-input/base.hbs +0 -40
  605. package/addon/components/hds/form/masked-input/base.js +0 -85
  606. package/addon/components/hds/form/masked-input/field.hbs +0 -33
  607. package/addon/components/hds/form/radio/base.hbs +0 -5
  608. package/addon/components/hds/form/radio/field.hbs +0 -24
  609. package/addon/components/hds/form/radio/group.hbs +0 -29
  610. package/addon/components/hds/form/radio-card/description.hbs +0 -10
  611. package/addon/components/hds/form/radio-card/group.hbs +0 -30
  612. package/addon/components/hds/form/radio-card/index.hbs +0 -24
  613. package/addon/components/hds/form/radio-card/index.js +0 -100
  614. package/addon/components/hds/form/radio-card/label.hbs +0 -11
  615. package/addon/components/hds/form/select/base.hbs +0 -7
  616. package/addon/components/hds/form/select/base.js +0 -27
  617. package/addon/components/hds/form/select/field.hbs +0 -30
  618. package/addon/components/hds/form/text-input/base.hbs +0 -5
  619. package/addon/components/hds/form/text-input/base.js +0 -72
  620. package/addon/components/hds/form/text-input/field.hbs +0 -41
  621. package/addon/components/hds/form/text-input/field.js +0 -59
  622. package/addon/components/hds/form/textarea/base.hbs +0 -6
  623. package/addon/components/hds/form/textarea/base.js +0 -27
  624. package/addon/components/hds/form/textarea/field.hbs +0 -28
  625. package/addon/components/hds/form/toggle/base.hbs +0 -8
  626. package/addon/components/hds/form/toggle/field.hbs +0 -23
  627. package/addon/components/hds/form/toggle/group.hbs +0 -21
  628. package/addon/components/hds/form/visibility-toggle/index.hbs +0 -8
  629. package/addon/components/hds/icon-tile/index.hbs +0 -23
  630. package/addon/components/hds/icon-tile/index.js +0 -189
  631. package/addon/components/hds/interactive/index.hbs +0 -32
  632. package/addon/components/hds/interactive/index.ts +0 -63
  633. package/addon/components/hds/link/inline.hbs +0 -22
  634. package/addon/components/hds/link/inline.js +0 -76
  635. package/addon/components/hds/link/standalone.hbs +0 -28
  636. package/addon/components/hds/link/standalone.js +0 -147
  637. package/addon/components/hds/menu-primitive/index.hbs +0 -22
  638. package/addon/components/hds/menu-primitive/index.js +0 -59
  639. package/addon/components/hds/modal/body.hbs +0 -7
  640. package/addon/components/hds/modal/footer.hbs +0 -7
  641. package/addon/components/hds/modal/header.hbs +0 -18
  642. package/addon/components/hds/modal/index.hbs +0 -19
  643. package/addon/components/hds/modal/index.js +0 -209
  644. package/addon/components/hds/page-header/actions.hbs +0 -5
  645. package/addon/components/hds/page-header/badges.hbs +0 -5
  646. package/addon/components/hds/page-header/description.hbs +0 -11
  647. package/addon/components/hds/page-header/index.hbs +0 -28
  648. package/addon/components/hds/page-header/subtitle.hbs +0 -11
  649. package/addon/components/hds/page-header/title.hbs +0 -11
  650. package/addon/components/hds/pagination/compact/index.hbs +0 -39
  651. package/addon/components/hds/pagination/compact/index.js +0 -163
  652. package/addon/components/hds/pagination/info/index.hbs +0 -11
  653. package/addon/components/hds/pagination/info/index.js +0 -17
  654. package/addon/components/hds/pagination/nav/arrow.hbs +0 -44
  655. package/addon/components/hds/pagination/nav/arrow.js +0 -77
  656. package/addon/components/hds/pagination/nav/ellipsis.hbs +0 -5
  657. package/addon/components/hds/pagination/nav/number.hbs +0 -17
  658. package/addon/components/hds/pagination/nav/number.js +0 -45
  659. package/addon/components/hds/pagination/numbered/index.hbs +0 -70
  660. package/addon/components/hds/pagination/numbered/index.js +0 -341
  661. package/addon/components/hds/pagination/size-selector/index.hbs +0 -16
  662. package/addon/components/hds/pagination/size-selector/index.js +0 -73
  663. package/addon/components/hds/reveal/index.hbs +0 -21
  664. package/addon/components/hds/reveal/index.js +0 -33
  665. package/addon/components/hds/reveal/toggle/button.hbs +0 -13
  666. package/addon/components/hds/reveal/toggle/button.js +0 -24
  667. package/addon/components/hds/segmented-group/index.hbs +0 -15
  668. package/addon/components/hds/separator/index.hbs +0 -5
  669. package/addon/components/hds/separator/index.js +0 -47
  670. package/addon/components/hds/side-nav/base.hbs +0 -19
  671. package/addon/components/hds/side-nav/header/home-link.hbs +0 -20
  672. package/addon/components/hds/side-nav/header/home-link.js +0 -25
  673. package/addon/components/hds/side-nav/header/icon-button.hbs +0 -20
  674. package/addon/components/hds/side-nav/header/icon-button.js +0 -25
  675. package/addon/components/hds/side-nav/header/index.hbs +0 -13
  676. package/addon/components/hds/side-nav/index.hbs +0 -42
  677. package/addon/components/hds/side-nav/index.js +0 -147
  678. package/addon/components/hds/side-nav/list/back-link.hbs +0 -24
  679. package/addon/components/hds/side-nav/list/index.hbs +0 -19
  680. package/addon/components/hds/side-nav/list/item.hbs +0 -8
  681. package/addon/components/hds/side-nav/list/link.hbs +0 -50
  682. package/addon/components/hds/side-nav/list/title.hbs +0 -8
  683. package/addon/components/hds/side-nav/portal/index.hbs +0 -12
  684. package/addon/components/hds/side-nav/portal/target.hbs +0 -14
  685. package/addon/components/hds/side-nav/portal/target.js +0 -162
  686. package/addon/components/hds/side-nav/toggle-button.hbs +0 -7
  687. package/addon/components/hds/stepper/step/indicator.hbs +0 -28
  688. package/addon/components/hds/stepper/step/indicator.js +0 -59
  689. package/addon/components/hds/stepper/task/indicator.hbs +0 -7
  690. package/addon/components/hds/stepper/task/indicator.js +0 -74
  691. package/addon/components/hds/table/index.hbs +0 -78
  692. package/addon/components/hds/table/index.js +0 -182
  693. package/addon/components/hds/table/td.hbs +0 -7
  694. package/addon/components/hds/table/td.js +0 -50
  695. package/addon/components/hds/table/th-sort.hbs +0 -18
  696. package/addon/components/hds/table/th-sort.js +0 -94
  697. package/addon/components/hds/table/th.hbs +0 -11
  698. package/addon/components/hds/table/th.js +0 -50
  699. package/addon/components/hds/table/tr.hbs +0 -7
  700. package/addon/components/hds/tabs/index.hbs +0 -47
  701. package/addon/components/hds/tabs/index.js +0 -211
  702. package/addon/components/hds/tabs/panel.hbs +0 -16
  703. package/addon/components/hds/tabs/panel.js +0 -59
  704. package/addon/components/hds/tabs/tab.hbs +0 -31
  705. package/addon/components/hds/tabs/tab.js +0 -98
  706. package/addon/components/hds/tag/index.hbs +0 -30
  707. package/addon/components/hds/tag/index.js +0 -91
  708. package/addon/components/hds/text/body.hbs +0 -13
  709. package/addon/components/hds/text/body.js +0 -73
  710. package/addon/components/hds/text/code.hbs +0 -13
  711. package/addon/components/hds/text/code.js +0 -73
  712. package/addon/components/hds/text/display.hbs +0 -13
  713. package/addon/components/hds/text/display.js +0 -85
  714. package/addon/components/hds/text/index.hbs +0 -10
  715. package/addon/components/hds/text/index.js +0 -146
  716. package/addon/components/hds/toast/index.hbs +0 -17
  717. package/addon/components/hds/tooltip-button/index.hbs +0 -11
  718. package/addon/components/hds/tooltip-button/index.js +0 -86
  719. package/addon/components/hds/yield/index.hbs +0 -6
  720. package/addon/helpers/hds-link-to-models.js +0 -35
  721. package/addon/helpers/hds-link-to-query.js +0 -26
  722. package/addon/modifiers/hds-clipboard.js +0 -163
  723. package/addon/modifiers/hds-tooltip.js +0 -164
  724. package/addon/template-registry.ts +0 -12
  725. package/addon/utils/hds-get-element-id.js +0 -19
  726. package/addon/utils/hds-set-aria-described-by.js +0 -15
  727. package/app/components/hds/accordion/index.js +0 -6
  728. package/app/components/hds/accordion/item/button.js +0 -6
  729. package/app/components/hds/accordion/item/index.js +0 -6
  730. package/app/components/hds/alert/description.js +0 -6
  731. package/app/components/hds/alert/index.js +0 -6
  732. package/app/components/hds/alert/title.js +0 -6
  733. package/app/components/hds/app-footer/copyright.js +0 -6
  734. package/app/components/hds/app-footer/index.js +0 -6
  735. package/app/components/hds/app-footer/item.js +0 -6
  736. package/app/components/hds/app-footer/legal-links.js +0 -6
  737. package/app/components/hds/app-footer/link.js +0 -6
  738. package/app/components/hds/app-footer/status-link.js +0 -6
  739. package/app/components/hds/app-frame/index.js +0 -6
  740. package/app/components/hds/app-frame/parts/footer.js +0 -6
  741. package/app/components/hds/app-frame/parts/header.js +0 -6
  742. package/app/components/hds/app-frame/parts/main.js +0 -6
  743. package/app/components/hds/app-frame/parts/modals.js +0 -6
  744. package/app/components/hds/app-frame/parts/sidebar.js +0 -6
  745. package/app/components/hds/application-state/body.js +0 -6
  746. package/app/components/hds/application-state/footer.js +0 -6
  747. package/app/components/hds/application-state/header.js +0 -6
  748. package/app/components/hds/application-state/index.js +0 -6
  749. package/app/components/hds/badge/index.js +0 -6
  750. package/app/components/hds/badge-count/index.js +0 -6
  751. package/app/components/hds/breadcrumb/index.js +0 -6
  752. package/app/components/hds/breadcrumb/item.js +0 -6
  753. package/app/components/hds/breadcrumb/truncation.js +0 -6
  754. package/app/components/hds/button/index.js +0 -6
  755. package/app/components/hds/button-set/index.js +0 -6
  756. package/app/components/hds/card/container.js +0 -6
  757. package/app/components/hds/code-block/copy-button.js +0 -6
  758. package/app/components/hds/code-block/description.js +0 -6
  759. package/app/components/hds/code-block/index.js +0 -6
  760. package/app/components/hds/code-block/title.js +0 -6
  761. package/app/components/hds/copy/button/index.js +0 -6
  762. package/app/components/hds/copy/snippet/index.js +0 -6
  763. package/app/components/hds/disclosure-primitive/index.js +0 -6
  764. package/app/components/hds/dismiss-button/index.js +0 -6
  765. package/app/components/hds/dropdown/footer.js +0 -6
  766. package/app/components/hds/dropdown/header.js +0 -6
  767. package/app/components/hds/dropdown/index.js +0 -6
  768. package/app/components/hds/dropdown/list-item/checkbox.js +0 -6
  769. package/app/components/hds/dropdown/list-item/checkmark.js +0 -6
  770. package/app/components/hds/dropdown/list-item/copy-item.js +0 -6
  771. package/app/components/hds/dropdown/list-item/description.js +0 -6
  772. package/app/components/hds/dropdown/list-item/generic.js +0 -6
  773. package/app/components/hds/dropdown/list-item/interactive.js +0 -6
  774. package/app/components/hds/dropdown/list-item/radio.js +0 -6
  775. package/app/components/hds/dropdown/list-item/separator.js +0 -6
  776. package/app/components/hds/dropdown/list-item/title.js +0 -6
  777. package/app/components/hds/dropdown/toggle/button.js +0 -6
  778. package/app/components/hds/dropdown/toggle/chevron.js +0 -6
  779. package/app/components/hds/dropdown/toggle/icon.js +0 -6
  780. package/app/components/hds/flyout/body.js +0 -6
  781. package/app/components/hds/flyout/description.js +0 -6
  782. package/app/components/hds/flyout/footer.js +0 -6
  783. package/app/components/hds/flyout/header.js +0 -6
  784. package/app/components/hds/flyout/index.js +0 -6
  785. package/app/components/hds/form/character-count/index.js +0 -6
  786. package/app/components/hds/form/checkbox/base.js +0 -6
  787. package/app/components/hds/form/checkbox/field.js +0 -6
  788. package/app/components/hds/form/checkbox/group.js +0 -6
  789. package/app/components/hds/form/error/index.js +0 -6
  790. package/app/components/hds/form/error/message.js +0 -6
  791. package/app/components/hds/form/field/index.js +0 -6
  792. package/app/components/hds/form/fieldset/index.js +0 -6
  793. package/app/components/hds/form/file-input/base.js +0 -6
  794. package/app/components/hds/form/file-input/field.js +0 -6
  795. package/app/components/hds/form/helper-text/index.js +0 -6
  796. package/app/components/hds/form/indicator/index.js +0 -6
  797. package/app/components/hds/form/label/index.js +0 -6
  798. package/app/components/hds/form/legend/index.js +0 -6
  799. package/app/components/hds/form/masked-input/base.js +0 -6
  800. package/app/components/hds/form/masked-input/field.js +0 -6
  801. package/app/components/hds/form/radio/base.js +0 -6
  802. package/app/components/hds/form/radio/field.js +0 -6
  803. package/app/components/hds/form/radio/group.js +0 -6
  804. package/app/components/hds/form/radio-card/description.js +0 -6
  805. package/app/components/hds/form/radio-card/group.js +0 -6
  806. package/app/components/hds/form/radio-card/index.js +0 -6
  807. package/app/components/hds/form/radio-card/label.js +0 -6
  808. package/app/components/hds/form/select/base.js +0 -6
  809. package/app/components/hds/form/select/field.js +0 -6
  810. package/app/components/hds/form/text-input/base.js +0 -6
  811. package/app/components/hds/form/text-input/field.js +0 -6
  812. package/app/components/hds/form/textarea/base.js +0 -6
  813. package/app/components/hds/form/textarea/field.js +0 -6
  814. package/app/components/hds/form/toggle/base.js +0 -6
  815. package/app/components/hds/form/toggle/field.js +0 -6
  816. package/app/components/hds/form/toggle/group.js +0 -6
  817. package/app/components/hds/form/visibility-toggle/index.js +0 -6
  818. package/app/components/hds/icon-tile/index.js +0 -6
  819. package/app/components/hds/interactive/index.js +0 -6
  820. package/app/components/hds/link/inline.js +0 -6
  821. package/app/components/hds/link/standalone.js +0 -6
  822. package/app/components/hds/menu-primitive/index.js +0 -6
  823. package/app/components/hds/modal/body.js +0 -6
  824. package/app/components/hds/modal/footer.js +0 -6
  825. package/app/components/hds/modal/header.js +0 -6
  826. package/app/components/hds/modal/index.js +0 -6
  827. package/app/components/hds/page-header/actions.js +0 -6
  828. package/app/components/hds/page-header/badges.js +0 -6
  829. package/app/components/hds/page-header/description.js +0 -6
  830. package/app/components/hds/page-header/index.js +0 -6
  831. package/app/components/hds/page-header/subtitle.js +0 -6
  832. package/app/components/hds/page-header/title.js +0 -6
  833. package/app/components/hds/pagination/compact/index.js +0 -6
  834. package/app/components/hds/pagination/info.js +0 -6
  835. package/app/components/hds/pagination/nav/arrow.js +0 -6
  836. package/app/components/hds/pagination/nav/ellipsis.js +0 -6
  837. package/app/components/hds/pagination/nav/number.js +0 -6
  838. package/app/components/hds/pagination/numbered/index.js +0 -6
  839. package/app/components/hds/pagination/size-selector.js +0 -6
  840. package/app/components/hds/reveal/index.js +0 -6
  841. package/app/components/hds/reveal/toggle/button.js +0 -6
  842. package/app/components/hds/segmented-group/index.js +0 -6
  843. package/app/components/hds/separator/index.js +0 -6
  844. package/app/components/hds/side-nav/base.js +0 -6
  845. package/app/components/hds/side-nav/header/home-link.js +0 -6
  846. package/app/components/hds/side-nav/header/icon-button.js +0 -6
  847. package/app/components/hds/side-nav/header/index.js +0 -6
  848. package/app/components/hds/side-nav/index.js +0 -6
  849. package/app/components/hds/side-nav/list/back-link.js +0 -6
  850. package/app/components/hds/side-nav/list/index.js +0 -6
  851. package/app/components/hds/side-nav/list/item.js +0 -6
  852. package/app/components/hds/side-nav/list/link.js +0 -6
  853. package/app/components/hds/side-nav/list/title.js +0 -6
  854. package/app/components/hds/side-nav/portal/index.js +0 -6
  855. package/app/components/hds/side-nav/portal/target.js +0 -6
  856. package/app/components/hds/side-nav/toggle-button.js +0 -6
  857. package/app/components/hds/stepper/step/indicator.js +0 -6
  858. package/app/components/hds/stepper/task/indicator.js +0 -6
  859. package/app/components/hds/table/index.js +0 -6
  860. package/app/components/hds/table/td.js +0 -6
  861. package/app/components/hds/table/th-sort.js +0 -6
  862. package/app/components/hds/table/th.js +0 -6
  863. package/app/components/hds/table/tr.js +0 -6
  864. package/app/components/hds/tabs/index.js +0 -6
  865. package/app/components/hds/tabs/panel.js +0 -6
  866. package/app/components/hds/tabs/tab.js +0 -6
  867. package/app/components/hds/tag/index.js +0 -6
  868. package/app/components/hds/text/body.js +0 -6
  869. package/app/components/hds/text/code.js +0 -6
  870. package/app/components/hds/text/display.js +0 -6
  871. package/app/components/hds/text/index.js +0 -6
  872. package/app/components/hds/toast/index.js +0 -6
  873. package/app/components/hds/tooltip-button/index.js +0 -6
  874. package/app/components/hds/yield/index.js +0 -6
  875. package/app/helpers/hds-link-to-models.js +0 -6
  876. package/app/helpers/hds-link-to-query.js +0 -6
  877. package/app/modifiers/hds-clipboard.js +0 -6
  878. package/app/modifiers/hds-tooltip.js +0 -6
  879. package/app/styles/@hashicorp/design-system-components.scss +0 -64
  880. package/app/styles/components/flyout.scss +0 -111
  881. package/app/styles/components/table.scss +0 -208
  882. package/app/styles/components/tabs.scss +0 -117
  883. package/blueprints/hds-component/files/addon/components/hds/__name__/index.hbs +0 -8
  884. package/blueprints/hds-component/files/addon/components/hds/__name__/index.js +0 -28
  885. package/blueprints/hds-component/files/app/components/hds/__name__/index.js +0 -6
  886. package/blueprints/hds-component/files/app/styles/components/__name__.scss +0 -12
  887. package/blueprints/hds-component/index.js +0 -65
  888. package/blueprints/hds-component-test/files/tests/acceptance/components/hds/__name__.js +0 -21
  889. package/blueprints/hds-component-test/files/tests/dummy/app/routes/components/__name__.js +0 -8
  890. package/blueprints/hds-component-test/files/tests/dummy/app/styles/showcase-pages/__dummyCSSFileName__.scss +0 -6
  891. package/blueprints/hds-component-test/files/tests/dummy/app/templates/components/__name__.hbs +0 -17
  892. package/blueprints/hds-component-test/files/tests/integration/components/hds/__name__/index-test.js +0 -25
  893. package/blueprints/hds-component-test/index.js +0 -151
  894. package/config/environment.js +0 -10
  895. package/index.js +0 -32
  896. package/tsconfig.declarations.json +0 -10
  897. package/tsconfig.json +0 -47
  898. package/types/dummy/index.d.ts +0 -7
  899. package/types/global.d.ts +0 -12
  900. package/vercel.json +0 -13
  901. /package/{app → dist}/styles/@hashicorp/design-system-power-select-overrides.scss +0 -0
  902. /package/{app → dist}/styles/components/accordion.scss +0 -0
  903. /package/{app → dist}/styles/components/alert.scss +0 -0
  904. /package/{app → dist}/styles/components/app-footer.scss +0 -0
  905. /package/{app → dist}/styles/components/app-frame.scss +0 -0
  906. /package/{app → dist}/styles/components/application-state.scss +0 -0
  907. /package/{app → dist}/styles/components/badge-count.scss +0 -0
  908. /package/{app → dist}/styles/components/badge.scss +0 -0
  909. /package/{app → dist}/styles/components/breadcrumb.scss +0 -0
  910. /package/{app → dist}/styles/components/button-set.scss +0 -0
  911. /package/{app → dist}/styles/components/button.scss +0 -0
  912. /package/{app → dist}/styles/components/card/container.scss +0 -0
  913. /package/{app → dist}/styles/components/card/index.scss +0 -0
  914. /package/{app → dist}/styles/components/code-block/index.scss +0 -0
  915. /package/{app → dist}/styles/components/code-block/theme.scss +0 -0
  916. /package/{app → dist}/styles/components/copy/button.scss +0 -0
  917. /package/{app → dist}/styles/components/copy/index.scss +0 -0
  918. /package/{app → dist}/styles/components/copy/snippet.scss +0 -0
  919. /package/{app → dist}/styles/components/disclosure-primitive.scss +0 -0
  920. /package/{app → dist}/styles/components/dismiss-button.scss +0 -0
  921. /package/{app → dist}/styles/components/dropdown.scss +0 -0
  922. /package/{app → dist}/styles/components/form/character-count.scss +0 -0
  923. /package/{app → dist}/styles/components/form/checkbox.scss +0 -0
  924. /package/{app → dist}/styles/components/form/error.scss +0 -0
  925. /package/{app → dist}/styles/components/form/field.scss +0 -0
  926. /package/{app → dist}/styles/components/form/file-input.scss +0 -0
  927. /package/{app → dist}/styles/components/form/group.scss +0 -0
  928. /package/{app → dist}/styles/components/form/helper-text.scss +0 -0
  929. /package/{app → dist}/styles/components/form/index.scss +0 -0
  930. /package/{app → dist}/styles/components/form/indicator.scss +0 -0
  931. /package/{app → dist}/styles/components/form/label.scss +0 -0
  932. /package/{app → dist}/styles/components/form/legend.scss +0 -0
  933. /package/{app → dist}/styles/components/form/masked-input.scss +0 -0
  934. /package/{app → dist}/styles/components/form/radio-card.scss +0 -0
  935. /package/{app → dist}/styles/components/form/radio.scss +0 -0
  936. /package/{app → dist}/styles/components/form/select.scss +0 -0
  937. /package/{app → dist}/styles/components/form/text-input.scss +0 -0
  938. /package/{app → dist}/styles/components/form/textarea.scss +0 -0
  939. /package/{app → dist}/styles/components/form/toggle.scss +0 -0
  940. /package/{app → dist}/styles/components/form/visibility-toggle.scss +0 -0
  941. /package/{app → dist}/styles/components/icon-tile.scss +0 -0
  942. /package/{app → dist}/styles/components/link/index.scss +0 -0
  943. /package/{app → dist}/styles/components/link/inline.scss +0 -0
  944. /package/{app → dist}/styles/components/link/standalone.scss +0 -0
  945. /package/{app → dist}/styles/components/menu-primitive.scss +0 -0
  946. /package/{app → dist}/styles/components/modal.scss +0 -0
  947. /package/{app → dist}/styles/components/page-header.scss +0 -0
  948. /package/{app → dist}/styles/components/pagination.scss +0 -0
  949. /package/{app → dist}/styles/components/reveal.scss +0 -0
  950. /package/{app → dist}/styles/components/segmented-group.scss +0 -0
  951. /package/{app → dist}/styles/components/separator.scss +0 -0
  952. /package/{app → dist}/styles/components/side-nav/a11y-refocus.scss +0 -0
  953. /package/{app → dist}/styles/components/side-nav/content.scss +0 -0
  954. /package/{app → dist}/styles/components/side-nav/header.scss +0 -0
  955. /package/{app → dist}/styles/components/side-nav/index.scss +0 -0
  956. /package/{app → dist}/styles/components/side-nav/main.scss +0 -0
  957. /package/{app → dist}/styles/components/side-nav/toggle-button.scss +0 -0
  958. /package/{app → dist}/styles/components/side-nav/vars.scss +0 -0
  959. /package/{app → dist}/styles/components/stepper/index.scss +0 -0
  960. /package/{app → dist}/styles/components/stepper/step-indicator.scss +0 -0
  961. /package/{app → dist}/styles/components/stepper/task-indicator.scss +0 -0
  962. /package/{app → dist}/styles/components/tag.scss +0 -0
  963. /package/{app → dist}/styles/components/text.scss +0 -0
  964. /package/{app → dist}/styles/components/toast.scss +0 -0
  965. /package/{app → dist}/styles/components/tooltip.scss +0 -0
  966. /package/{app → dist}/styles/mixins/_button.scss +0 -0
  967. /package/{app → dist}/styles/mixins/_focus-ring.scss +0 -0
@@ -0,0 +1,109 @@
1
+ import { a as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../../_rollupPluginBabelHelpers-lqPQKyNs.js';
2
+ import Component from '@glimmer/component';
3
+ import { assert } from '@ember/debug';
4
+ import { tracked } from '@glimmer/tracking';
5
+ import { action } from '@ember/object';
6
+ import { precompileTemplate } from '@ember/template-compilation';
7
+ import { setComponentTemplate } from '@ember/component';
8
+
9
+ var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<Hds::Button\n class={{this.classNames}}\n @size={{this.size}}\n @isFullWidth={{@isFullWidth}}\n @text={{@text}}\n @icon={{this.icon}}\n @isIconOnly={{@isIconOnly}}\n @color=\"secondary\"\n @iconPosition=\"trailing\"\n {{hds-clipboard text=@textToCopy target=@targetToCopy onSuccess=this.onSuccess onError=this.onError}}\n ...attributes\n/>");
10
+
11
+ var _class, _descriptor, _descriptor2;
12
+ const DEFAULT_SIZE = 'medium';
13
+ const SIZES = ['small', 'medium'];
14
+ const DEFAULT_ICON = 'clipboard-copy';
15
+ const SUCCESS_ICON = 'clipboard-checked';
16
+ const ERROR_ICON = 'clipboard-x';
17
+ const DEFAULT_STATUS = 'idle';
18
+ let HdsCopyButtonComponent = (_class = class HdsCopyButtonComponent extends Component {
19
+ constructor(...args) {
20
+ super(...args);
21
+ _initializerDefineProperty(this, "status", _descriptor, this);
22
+ _initializerDefineProperty(this, "timer", _descriptor2, this);
23
+ }
24
+ /**
25
+ * @param icon
26
+ * @type {string}
27
+ * @description The icon to be displayed for each status; automatically calculated based on the tracked property `status`.
28
+ */
29
+ get icon() {
30
+ let icon = DEFAULT_ICON;
31
+ if (this.status === 'success') {
32
+ icon = SUCCESS_ICON;
33
+ } else if (this.status === 'error') {
34
+ icon = ERROR_ICON;
35
+ }
36
+ return icon;
37
+ }
38
+
39
+ /**
40
+ * @param size
41
+ * @type {string}
42
+ * @default medium
43
+ * @description The size of the copy/button; acceptable values are `small` and `medium`
44
+ */
45
+ get size() {
46
+ let {
47
+ size = DEFAULT_SIZE
48
+ } = this.args;
49
+ assert(`@size for "Hds::Copy::Button" must be one of the following: ${SIZES.join(', ')}; received: ${size}`, SIZES.includes(size));
50
+ return size;
51
+ }
52
+
53
+ /**
54
+ * Get the class names to apply to the component.
55
+ * @method CopyButton#classNames
56
+ * @return {string} The "class" attribute to apply to the component.
57
+ */
58
+ get classNames() {
59
+ let classes = ['hds-copy-button'];
60
+
61
+ // add a class based on the @size argument
62
+ classes.push(`hds-button--size-${this.size}`);
63
+ classes.push(`hds-copy-button--status-${this.status}`);
64
+ return classes.join(' ');
65
+ }
66
+ onSuccess(args) {
67
+ this.status = 'success';
68
+ this.resetStatusDelayed();
69
+ let {
70
+ onSuccess
71
+ } = this.args;
72
+ if (typeof onSuccess === 'function') {
73
+ onSuccess(args);
74
+ }
75
+ }
76
+ onError(args) {
77
+ this.status = 'error';
78
+ this.resetStatusDelayed();
79
+ let {
80
+ onError
81
+ } = this.args;
82
+ if (typeof onError === 'function') {
83
+ onError(args);
84
+ }
85
+ }
86
+ resetStatusDelayed() {
87
+ clearTimeout(this.timer);
88
+ // make it fade back to the default state
89
+ this.timer = setTimeout(() => {
90
+ this.status = DEFAULT_STATUS;
91
+ }, 1500);
92
+ }
93
+ }, (_descriptor = _applyDecoratedDescriptor(_class.prototype, "status", [tracked], {
94
+ configurable: true,
95
+ enumerable: true,
96
+ writable: true,
97
+ initializer: function () {
98
+ return DEFAULT_STATUS;
99
+ }
100
+ }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "timer", [tracked], {
101
+ configurable: true,
102
+ enumerable: true,
103
+ writable: true,
104
+ initializer: null
105
+ }), _applyDecoratedDescriptor(_class.prototype, "onSuccess", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onSuccess"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "onError", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onError"), _class.prototype)), _class);
106
+ setComponentTemplate(TEMPLATE, HdsCopyButtonComponent);
107
+
108
+ export { DEFAULT_ICON, DEFAULT_SIZE, DEFAULT_STATUS, ERROR_ICON, SIZES, SUCCESS_ICON, HdsCopyButtonComponent as default };
109
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/hds/copy/button/index.hbs","../../../../../src/components/hds/copy/button/index.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<Hds::Button\\n class={{this.classNames}}\\n @size={{this.size}}\\n @isFullWidth={{@isFullWidth}}\\n @text={{@text}}\\n @icon={{this.icon}}\\n @isIconOnly={{@isIconOnly}}\\n @color=\\\"secondary\\\"\\n @iconPosition=\\\"trailing\\\"\\n {{hds-clipboard text=@textToCopy target=@targetToCopy onSuccess=this.onSuccess onError=this.onError}}\\n ...attributes\\n/>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\n\nexport const DEFAULT_SIZE = 'medium';\nexport const SIZES = ['small', 'medium'];\nexport const DEFAULT_ICON = 'clipboard-copy';\nexport const SUCCESS_ICON = 'clipboard-checked';\nexport const ERROR_ICON = 'clipboard-x';\nexport const DEFAULT_STATUS = 'idle';\n\nexport default class HdsCopyButtonComponent extends Component {\n @tracked status = DEFAULT_STATUS;\n @tracked timer;\n\n /**\n * @param icon\n * @type {string}\n * @description The icon to be displayed for each status; automatically calculated based on the tracked property `status`.\n */\n get icon() {\n let icon = DEFAULT_ICON;\n if (this.status === 'success') {\n icon = SUCCESS_ICON;\n } else if (this.status === 'error') {\n icon = ERROR_ICON;\n }\n return icon;\n }\n\n /**\n * @param size\n * @type {string}\n * @default medium\n * @description The size of the copy/button; acceptable values are `small` and `medium`\n */\n get size() {\n let { size = DEFAULT_SIZE } = this.args;\n\n assert(\n `@size for \"Hds::Copy::Button\" must be one of the following: ${SIZES.join(\n ', '\n )}; received: ${size}`,\n SIZES.includes(size)\n );\n\n return size;\n }\n\n /**\n * Get the class names to apply to the component.\n * @method CopyButton#classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n let classes = ['hds-copy-button'];\n\n // add a class based on the @size argument\n classes.push(`hds-button--size-${this.size}`);\n\n classes.push(`hds-copy-button--status-${this.status}`);\n\n return classes.join(' ');\n }\n\n @action\n onSuccess(args) {\n this.status = 'success';\n this.resetStatusDelayed();\n\n let { onSuccess } = this.args;\n\n if (typeof onSuccess === 'function') {\n onSuccess(args);\n }\n }\n\n @action\n onError(args) {\n this.status = 'error';\n this.resetStatusDelayed();\n\n let { onError } = this.args;\n\n if (typeof onError === 'function') {\n onError(args);\n }\n }\n\n resetStatusDelayed() {\n clearTimeout(this.timer);\n // make it fade back to the default state\n this.timer = setTimeout(() => {\n this.status = DEFAULT_STATUS;\n }, 1500);\n }\n}\n"],"names":["DEFAULT_SIZE","SIZES","DEFAULT_ICON","SUCCESS_ICON","ERROR_ICON","DEFAULT_STATUS","HdsCopyButtonComponent","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_descriptor2","icon","status","size","assert","join","includes","classNames","classes","push","onSuccess","resetStatusDelayed","onError","clearTimeout","timer","setTimeout","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":"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"}
@@ -0,0 +1,142 @@
1
+ import { a as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../../_rollupPluginBabelHelpers-lqPQKyNs.js';
2
+ import Component from '@glimmer/component';
3
+ import { assert } from '@ember/debug';
4
+ import { tracked } from '@glimmer/tracking';
5
+ import { action } from '@ember/object';
6
+ import { precompileTemplate } from '@ember/template-compilation';
7
+ import { setComponentTemplate } from '@ember/component';
8
+
9
+ var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<button\n type=\"button\"\n class={{this.classNames}}\n {{hds-clipboard text=@textToCopy onSuccess=this.onSuccess onError=this.onError}}\n ...attributes\n>\n <Hds::Text::Code class=\"hds-copy-snippet__text\" @tag=\"span\" @size=\"100\">\n {{@textToCopy}}\n </Hds::Text::Code>\n <FlightIcon @name={{this.icon}} class=\"hds-copy-snippet__icon\" />\n</button>");
10
+
11
+ var _class, _descriptor, _descriptor2;
12
+ const DEFAULT_COLOR = 'primary';
13
+ const COLORS = ['primary', 'secondary'];
14
+ const DEFAULT_ICON = 'clipboard-copy';
15
+ const SUCCESS_ICON = 'clipboard-checked';
16
+ const ERROR_ICON = 'clipboard-x';
17
+ const DEFAULT_STATUS = 'idle';
18
+ let HdsCopySnippetIndexComponent = (_class = class HdsCopySnippetIndexComponent extends Component {
19
+ constructor(...args) {
20
+ super(...args);
21
+ _initializerDefineProperty(this, "status", _descriptor, this);
22
+ _initializerDefineProperty(this, "timer", _descriptor2, this);
23
+ }
24
+ /**
25
+ * @param icon
26
+ * @type {string}
27
+ * @default DEFAULT_ICON
28
+ * @description Determines the icon to be used, based on the success state. Note that this is auto-tracked because it depends on a tracked property (status).
29
+ */
30
+ get icon() {
31
+ let icon = DEFAULT_ICON;
32
+ if (this.status === 'success') {
33
+ icon = SUCCESS_ICON;
34
+ } else if (this.status === 'error') {
35
+ icon = ERROR_ICON;
36
+ }
37
+ return icon;
38
+ }
39
+
40
+ /**
41
+ * @param color
42
+ * @type {string}
43
+ * @default primary
44
+ * @description Determines the color of button to be used; acceptable values are `primary` and `secondary`
45
+ */
46
+ get color() {
47
+ let {
48
+ color = DEFAULT_COLOR
49
+ } = this.args;
50
+ assert(`@color for "Hds::Copy::Snippet" must be one of the following: ${COLORS.join(', ')}; received: ${color}`, COLORS.includes(color));
51
+ return color;
52
+ }
53
+
54
+ /**
55
+ * @param isFullWidth
56
+ * @type {boolean}
57
+ * @default false
58
+ * @description Indicates that the component should take up the full width of the parent container.
59
+ */
60
+ get isFullWidth() {
61
+ return this.args.isFullWidth ?? false;
62
+ }
63
+
64
+ /**
65
+ * @param isTruncated
66
+ * @type {boolean}
67
+ * @default false
68
+ * @description Indicates that the component should be truncated instead of wrapping text and using multiple lines.
69
+ */
70
+ get isTruncated() {
71
+ return this.args.isTruncated ?? false;
72
+ }
73
+
74
+ /**
75
+ * Get the class names to apply to the component.
76
+ * @method CopySnippet#classNames
77
+ * @return {string} The "class" attribute to apply to the component.
78
+ */
79
+ get classNames() {
80
+ let classes = ['hds-copy-snippet'];
81
+
82
+ // add a class based on the @color argument
83
+ classes.push(`hds-copy-snippet--color-${this.color}`);
84
+
85
+ // add a class based on the tracked status (idle/success/error)
86
+ classes.push(`hds-copy-snippet--status-${this.status}`);
87
+
88
+ // add a class based on the @isTruncated argument
89
+ if (this.isTruncated) {
90
+ classes.push('hds-copy-snippet--is-truncated');
91
+ }
92
+
93
+ // add a class based on the @isFullWidth argument
94
+ if (this.isFullWidth) {
95
+ classes.push('hds-copy-snippet--width-full');
96
+ }
97
+ return classes.join(' ');
98
+ }
99
+ onSuccess(args) {
100
+ this.status = 'success';
101
+ this.resetStatusDelayed();
102
+ let {
103
+ onSuccess
104
+ } = this.args;
105
+ if (typeof onSuccess === 'function') {
106
+ onSuccess(args);
107
+ }
108
+ }
109
+ onError(args) {
110
+ this.status = 'error';
111
+ this.resetStatusDelayed();
112
+ let {
113
+ onError
114
+ } = this.args;
115
+ if (typeof onError === 'function') {
116
+ onError(args);
117
+ }
118
+ }
119
+ resetStatusDelayed() {
120
+ clearTimeout(this.timer);
121
+ // make it fade back to the default state
122
+ this.timer = setTimeout(() => {
123
+ this.status = DEFAULT_STATUS;
124
+ }, 1500);
125
+ }
126
+ }, (_descriptor = _applyDecoratedDescriptor(_class.prototype, "status", [tracked], {
127
+ configurable: true,
128
+ enumerable: true,
129
+ writable: true,
130
+ initializer: function () {
131
+ return DEFAULT_STATUS;
132
+ }
133
+ }), _descriptor2 = _applyDecoratedDescriptor(_class.prototype, "timer", [tracked], {
134
+ configurable: true,
135
+ enumerable: true,
136
+ writable: true,
137
+ initializer: null
138
+ }), _applyDecoratedDescriptor(_class.prototype, "onSuccess", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onSuccess"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "onError", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onError"), _class.prototype)), _class);
139
+ setComponentTemplate(TEMPLATE, HdsCopySnippetIndexComponent);
140
+
141
+ export { COLORS, DEFAULT_COLOR, DEFAULT_ICON, DEFAULT_STATUS, ERROR_ICON, SUCCESS_ICON, HdsCopySnippetIndexComponent as default };
142
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../../src/components/hds/copy/snippet/index.hbs","../../../../../src/components/hds/copy/snippet/index.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<button\\n type=\\\"button\\\"\\n class={{this.classNames}}\\n {{hds-clipboard text=@textToCopy onSuccess=this.onSuccess onError=this.onError}}\\n ...attributes\\n>\\n <Hds::Text::Code class=\\\"hds-copy-snippet__text\\\" @tag=\\\"span\\\" @size=\\\"100\\\">\\n {{@textToCopy}}\\n </Hds::Text::Code>\\n <FlightIcon @name={{this.icon}} class=\\\"hds-copy-snippet__icon\\\" />\\n</button>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { assert } from '@ember/debug';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\n\nexport const DEFAULT_COLOR = 'primary';\nexport const COLORS = ['primary', 'secondary'];\nexport const DEFAULT_ICON = 'clipboard-copy';\nexport const SUCCESS_ICON = 'clipboard-checked';\nexport const ERROR_ICON = 'clipboard-x';\nexport const DEFAULT_STATUS = 'idle';\n\nexport default class HdsCopySnippetIndexComponent extends Component {\n @tracked status = DEFAULT_STATUS;\n @tracked timer;\n\n /**\n * @param icon\n * @type {string}\n * @default DEFAULT_ICON\n * @description Determines the icon to be used, based on the success state. Note that this is auto-tracked because it depends on a tracked property (status).\n */\n get icon() {\n let icon = DEFAULT_ICON;\n if (this.status === 'success') {\n icon = SUCCESS_ICON;\n } else if (this.status === 'error') {\n icon = ERROR_ICON;\n }\n return icon;\n }\n\n /**\n * @param color\n * @type {string}\n * @default primary\n * @description Determines the color of button to be used; acceptable values are `primary` and `secondary`\n */\n get color() {\n let { color = DEFAULT_COLOR } = this.args;\n\n assert(\n `@color for \"Hds::Copy::Snippet\" must be one of the following: ${COLORS.join(\n ', '\n )}; received: ${color}`,\n COLORS.includes(color)\n );\n\n return color;\n }\n\n /**\n * @param isFullWidth\n * @type {boolean}\n * @default false\n * @description Indicates that the component should take up the full width of the parent container.\n */\n get isFullWidth() {\n return this.args.isFullWidth ?? false;\n }\n\n /**\n * @param isTruncated\n * @type {boolean}\n * @default false\n * @description Indicates that the component should be truncated instead of wrapping text and using multiple lines.\n */\n get isTruncated() {\n return this.args.isTruncated ?? false;\n }\n\n /**\n * Get the class names to apply to the component.\n * @method CopySnippet#classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n let classes = ['hds-copy-snippet'];\n\n // add a class based on the @color argument\n classes.push(`hds-copy-snippet--color-${this.color}`);\n\n // add a class based on the tracked status (idle/success/error)\n classes.push(`hds-copy-snippet--status-${this.status}`);\n\n // add a class based on the @isTruncated argument\n if (this.isTruncated) {\n classes.push('hds-copy-snippet--is-truncated');\n }\n\n // add a class based on the @isFullWidth argument\n if (this.isFullWidth) {\n classes.push('hds-copy-snippet--width-full');\n }\n\n return classes.join(' ');\n }\n\n @action\n onSuccess(args) {\n this.status = 'success';\n this.resetStatusDelayed();\n\n let { onSuccess } = this.args;\n\n if (typeof onSuccess === 'function') {\n onSuccess(args);\n }\n }\n\n @action\n onError(args) {\n this.status = 'error';\n this.resetStatusDelayed();\n\n let { onError } = this.args;\n\n if (typeof onError === 'function') {\n onError(args);\n }\n }\n\n resetStatusDelayed() {\n clearTimeout(this.timer);\n // make it fade back to the default state\n this.timer = setTimeout(() => {\n this.status = DEFAULT_STATUS;\n }, 1500);\n }\n}\n"],"names":["DEFAULT_COLOR","COLORS","DEFAULT_ICON","SUCCESS_ICON","ERROR_ICON","DEFAULT_STATUS","HdsCopySnippetIndexComponent","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","_descriptor2","icon","status","color","assert","join","includes","isFullWidth","isTruncated","classNames","classes","push","onSuccess","resetStatusDelayed","onError","clearTimeout","timer","setTimeout","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;AACA,eAAe,kBAAkB,CAAC,8bAA8b;;;ACSzd,MAAMA,aAAa,GAAG,UAAS;MACzBC,MAAM,GAAG,CAAC,SAAS,EAAE,WAAW,EAAC;AACvC,MAAMC,YAAY,GAAG,iBAAgB;AACrC,MAAMC,YAAY,GAAG,oBAAmB;AACxC,MAAMC,UAAU,GAAG,cAAa;AAChC,MAAMC,cAAc,GAAG,OAAM;AAEfC,IAAAA,4BAA4B,IAAAC,MAAA,GAAlC,MAAMD,4BAA4B,SAASE,SAAS,CAAC;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,iBAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AAAAD,IAAAA,0BAAA,gBAAAE,YAAA,EAAA,IAAA,CAAA,CAAA;AAAA,GAAA;AAIlE;AACF;AACA;AACA;AACA;AACA;EACE,IAAIC,IAAIA,GAAG;IACT,IAAIA,IAAI,GAAGZ,YAAY,CAAA;AACvB,IAAA,IAAI,IAAI,CAACa,MAAM,KAAK,SAAS,EAAE;AAC7BD,MAAAA,IAAI,GAAGX,YAAY,CAAA;AACrB,KAAC,MAAM,IAAI,IAAI,CAACY,MAAM,KAAK,OAAO,EAAE;AAClCD,MAAAA,IAAI,GAAGV,UAAU,CAAA;AACnB,KAAA;AACA,IAAA,OAAOU,IAAI,CAAA;AACb,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;EACE,IAAIE,KAAKA,GAAG;IACV,IAAI;AAAEA,MAAAA,KAAK,GAAGhB,aAAAA;KAAe,GAAG,IAAI,CAACU,IAAI,CAAA;AAEzCO,IAAAA,MAAM,CACH,CAAgEhB,8DAAAA,EAAAA,MAAM,CAACiB,IAAI,CAC1E,IACF,CAAE,CAAA,YAAA,EAAcF,KAAM,CAAA,CAAC,EACvBf,MAAM,CAACkB,QAAQ,CAACH,KAAK,CACvB,CAAC,CAAA;AAED,IAAA,OAAOA,KAAK,CAAA;AACd,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;EACE,IAAII,WAAWA,GAAG;AAChB,IAAA,OAAO,IAAI,CAACV,IAAI,CAACU,WAAW,IAAI,KAAK,CAAA;AACvC,GAAA;;AAEA;AACF;AACA;AACA;AACA;AACA;EACE,IAAIC,WAAWA,GAAG;AAChB,IAAA,OAAO,IAAI,CAACX,IAAI,CAACW,WAAW,IAAI,KAAK,CAAA;AACvC,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAG;AACf,IAAA,IAAIC,OAAO,GAAG,CAAC,kBAAkB,CAAC,CAAA;;AAElC;IACAA,OAAO,CAACC,IAAI,CAAE,CAAA,wBAAA,EAA0B,IAAI,CAACR,KAAM,EAAC,CAAC,CAAA;;AAErD;IACAO,OAAO,CAACC,IAAI,CAAE,CAAA,yBAAA,EAA2B,IAAI,CAACT,MAAO,EAAC,CAAC,CAAA;;AAEvD;IACA,IAAI,IAAI,CAACM,WAAW,EAAE;AACpBE,MAAAA,OAAO,CAACC,IAAI,CAAC,gCAAgC,CAAC,CAAA;AAChD,KAAA;;AAEA;IACA,IAAI,IAAI,CAACJ,WAAW,EAAE;AACpBG,MAAAA,OAAO,CAACC,IAAI,CAAC,8BAA8B,CAAC,CAAA;AAC9C,KAAA;AAEA,IAAA,OAAOD,OAAO,CAACL,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1B,GAAA;EAGAO,SAASA,CAACf,IAAI,EAAE;IACd,IAAI,CAACK,MAAM,GAAG,SAAS,CAAA;IACvB,IAAI,CAACW,kBAAkB,EAAE,CAAA;IAEzB,IAAI;AAAED,MAAAA,SAAAA;KAAW,GAAG,IAAI,CAACf,IAAI,CAAA;AAE7B,IAAA,IAAI,OAAOe,SAAS,KAAK,UAAU,EAAE;MACnCA,SAAS,CAACf,IAAI,CAAC,CAAA;AACjB,KAAA;AACF,GAAA;EAGAiB,OAAOA,CAACjB,IAAI,EAAE;IACZ,IAAI,CAACK,MAAM,GAAG,OAAO,CAAA;IACrB,IAAI,CAACW,kBAAkB,EAAE,CAAA;IAEzB,IAAI;AAAEC,MAAAA,OAAAA;KAAS,GAAG,IAAI,CAACjB,IAAI,CAAA;AAE3B,IAAA,IAAI,OAAOiB,OAAO,KAAK,UAAU,EAAE;MACjCA,OAAO,CAACjB,IAAI,CAAC,CAAA;AACf,KAAA;AACF,GAAA;AAEAgB,EAAAA,kBAAkBA,GAAG;AACnBE,IAAAA,YAAY,CAAC,IAAI,CAACC,KAAK,CAAC,CAAA;AACxB;AACA,IAAA,IAAI,CAACA,KAAK,GAAGC,UAAU,CAAC,MAAM;MAC5B,IAAI,CAACf,MAAM,GAAGV,cAAc,CAAA;KAC7B,EAAE,IAAI,CAAC,CAAA;AACV,GAAA;AACF,CAAC,GAAAO,WAAA,GAAAmB,yBAAA,CAAAxB,MAAA,CAAAyB,SAAA,EAAA,QAAA,EAAA,CApHEC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;AAAAC,EAAAA,WAAA,cAAA;AAAA,IAAA,OAAUhC,cAAc,CAAA;AAAA,GAAA;AAAA,CAAAQ,CAAAA,EAAAA,YAAA,GAAAkB,yBAAA,CAAAxB,MAAA,CAAAyB,SAAA,YAC/BC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;EAAAC,WAAA,EAAA,IAAA;AAAA,CAAA,CAAA,EAAAN,yBAAA,CAAAxB,MAAA,CAAAyB,SAAA,EAAA,WAAA,EAAA,CAoFPM,MAAM,CAAAC,EAAAA,MAAA,CAAAC,wBAAA,CAAAjC,MAAA,CAAAyB,SAAA,EAAAzB,WAAAA,CAAAA,EAAAA,MAAA,CAAAyB,SAAA,CAAA,EAAAD,yBAAA,CAAAxB,MAAA,CAAAyB,SAAA,cAYNM,MAAM,CAAA,EAAAC,MAAA,CAAAC,wBAAA,CAAAjC,MAAA,CAAAyB,SAAA,EAAA,SAAA,CAAA,EAAAzB,MAAA,CAAAyB,SAAA,IAAAzB,MAAA,EAAA;AAlGwCkC,oBAAA,CAAAC,QAAA,EAAApC,4BAAA,CAAA;;;;"}
@@ -0,0 +1,41 @@
1
+ import { a as _applyDecoratedDescriptor, b as _initializerDefineProperty } from '../../../_rollupPluginBabelHelpers-lqPQKyNs.js';
2
+ import Component from '@glimmer/component';
3
+ import { tracked } from '@glimmer/tracking';
4
+ import { action } from '@ember/object';
5
+ import { schedule } from '@ember/runloop';
6
+ import { precompileTemplate } from '@ember/template-compilation';
7
+ import { setComponentTemplate } from '@ember/component';
8
+
9
+ var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<div class=\"hds-disclosure-primitive\" ...attributes>\n <div class=\"hds-disclosure-primitive__toggle\">\n {{yield (hash onClickToggle=this.onClickToggle isOpen=this.isOpen) to=\"toggle\"}}\n </div>\n {{#if this.isOpen}}\n <div class=\"hds-disclosure-primitive__content\">\n {{yield (hash close=this.close) to=\"content\"}}\n </div>\n {{/if}}\n</div>");
10
+
11
+ var _class, _descriptor;
12
+ let HdsDisclosurePrimitiveComponent = (_class = class HdsDisclosurePrimitiveComponent extends Component {
13
+ constructor(...args) {
14
+ super(...args);
15
+ _initializerDefineProperty(this, "isOpen", _descriptor, this);
16
+ }
17
+ onClickToggle() {
18
+ this.isOpen = !this.isOpen;
19
+ }
20
+ close() {
21
+ // we schedule this afterRender to avoid an error in tests caused by updating `isOpen` multiple times in the same computation
22
+ schedule('afterRender', () => {
23
+ this.isOpen = false;
24
+ // we call the "onClose" callback if it exists (and is a function)
25
+ if (this.args.onClose && typeof this.args.onClose === 'function') {
26
+ this.args.onClose();
27
+ }
28
+ });
29
+ }
30
+ }, (_descriptor = _applyDecoratedDescriptor(_class.prototype, "isOpen", [tracked], {
31
+ configurable: true,
32
+ enumerable: true,
33
+ writable: true,
34
+ initializer: function () {
35
+ return this.args.isOpen ?? false;
36
+ }
37
+ }), _applyDecoratedDescriptor(_class.prototype, "onClickToggle", [action], Object.getOwnPropertyDescriptor(_class.prototype, "onClickToggle"), _class.prototype), _applyDecoratedDescriptor(_class.prototype, "close", [action], Object.getOwnPropertyDescriptor(_class.prototype, "close"), _class.prototype)), _class);
38
+ setComponentTemplate(TEMPLATE, HdsDisclosurePrimitiveComponent);
39
+
40
+ export { HdsDisclosurePrimitiveComponent as default };
41
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/hds/disclosure-primitive/index.hbs","../../../../src/components/hds/disclosure-primitive/index.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<div class=\\\"hds-disclosure-primitive\\\" ...attributes>\\n <div class=\\\"hds-disclosure-primitive__toggle\\\">\\n {{yield (hash onClickToggle=this.onClickToggle isOpen=this.isOpen) to=\\\"toggle\\\"}}\\n </div>\\n {{#if this.isOpen}}\\n <div class=\\\"hds-disclosure-primitive__content\\\">\\n {{yield (hash close=this.close) to=\\\"content\\\"}}\\n </div>\\n {{/if}}\\n</div>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action } from '@ember/object';\nimport { schedule } from '@ember/runloop';\n\nexport default class HdsDisclosurePrimitiveComponent extends Component {\n @tracked isOpen = this.args.isOpen ?? false;\n\n @action\n onClickToggle() {\n this.isOpen = !this.isOpen;\n }\n\n @action\n close() {\n // we schedule this afterRender to avoid an error in tests caused by updating `isOpen` multiple times in the same computation\n schedule('afterRender', () => {\n this.isOpen = false;\n // we call the \"onClose\" callback if it exists (and is a function)\n if (this.args.onClose && typeof this.args.onClose === 'function') {\n this.args.onClose();\n }\n });\n }\n}\n"],"names":["HdsDisclosurePrimitiveComponent","_class","Component","constructor","args","_initializerDefineProperty","_descriptor","onClickToggle","isOpen","close","schedule","onClose","_applyDecoratedDescriptor","prototype","tracked","configurable","enumerable","writable","initializer","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;;AACA,eAAe,kBAAkB,CAAC,icAAic;;;ACS9cA,IAAAA,+BAA+B,IAAAC,MAAA,GAArC,MAAMD,+BAA+B,SAASE,SAAS,CAAC;AAAAC,EAAAA,WAAAA,CAAA,GAAAC,IAAA,EAAA;AAAA,IAAA,KAAA,CAAA,GAAAA,IAAA,CAAA,CAAA;AAAAC,IAAAA,0BAAA,iBAAAC,WAAA,EAAA,IAAA,CAAA,CAAA;AAAA,GAAA;AAIrEC,EAAAA,aAAaA,GAAG;AACd,IAAA,IAAI,CAACC,MAAM,GAAG,CAAC,IAAI,CAACA,MAAM,CAAA;AAC5B,GAAA;AAGAC,EAAAA,KAAKA,GAAG;AACN;IACAC,QAAQ,CAAC,aAAa,EAAE,MAAM;MAC5B,IAAI,CAACF,MAAM,GAAG,KAAK,CAAA;AACnB;AACA,MAAA,IAAI,IAAI,CAACJ,IAAI,CAACO,OAAO,IAAI,OAAO,IAAI,CAACP,IAAI,CAACO,OAAO,KAAK,UAAU,EAAE;AAChE,QAAA,IAAI,CAACP,IAAI,CAACO,OAAO,EAAE,CAAA;AACrB,OAAA;AACF,KAAC,CAAC,CAAA;AACJ,GAAA;AACF,CAAC,GAAAL,WAAA,GAAAM,yBAAA,CAAAX,MAAA,CAAAY,SAAA,EAAA,QAAA,EAAA,CAlBEC,OAAO,CAAA,EAAA;EAAAC,YAAA,EAAA,IAAA;EAAAC,UAAA,EAAA,IAAA;EAAAC,QAAA,EAAA,IAAA;AAAAC,EAAAA,WAAA,cAAA;AAAA,IAAA,OAAU,IAAI,CAACd,IAAI,CAACI,MAAM,IAAI,KAAK,CAAA;AAAA,GAAA;AAAA,CAAA,CAAA,EAAAI,yBAAA,CAAAX,MAAA,CAAAY,SAAA,EAAA,eAAA,EAAA,CAE1CM,MAAM,CAAAC,EAAAA,MAAA,CAAAC,wBAAA,CAAApB,MAAA,CAAAY,SAAA,EAAAZ,eAAAA,CAAAA,EAAAA,MAAA,CAAAY,SAAA,CAAA,EAAAD,yBAAA,CAAAX,MAAA,CAAAY,SAAA,YAKNM,MAAM,CAAA,EAAAC,MAAA,CAAAC,wBAAA,CAAApB,MAAA,CAAAY,SAAA,EAAA,OAAA,CAAA,EAAAZ,MAAA,CAAAY,SAAA,IAAAZ,MAAA,EAAA;AAR2CqB,oBAAA,CAAAC,QAAA,EAAAvB,+BAAA,CAAA;;;;"}
@@ -0,0 +1,25 @@
1
+ import Component from '@glimmer/component';
2
+ import { precompileTemplate } from '@ember/template-compilation';
3
+ import { setComponentTemplate } from '@ember/component';
4
+
5
+ var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<button class=\"hds-dismiss-button\" type=\"button\" aria-label={{this.ariaLabel}} ...attributes>\n <FlightIcon @name=\"x\" @size=\"16\" @isInlineBlock={{false}} />\n</button>");
6
+
7
+ /**
8
+ * Copyright (c) HashiCorp, Inc.
9
+ * SPDX-License-Identifier: MPL-2.0
10
+ */
11
+
12
+ class HdsDismissButtonIndexComponent extends Component {
13
+ /**
14
+ * @param ariaLabel
15
+ * @type {string}
16
+ * @default 'Dismiss'
17
+ */
18
+ get ariaLabel() {
19
+ return this.args.ariaLabel ?? 'Dismiss';
20
+ }
21
+ }
22
+ setComponentTemplate(TEMPLATE, HdsDismissButtonIndexComponent);
23
+
24
+ export { HdsDismissButtonIndexComponent as default };
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/hds/dismiss-button/index.hbs","../../../../src/components/hds/dismiss-button/index.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<button class=\\\"hds-dismiss-button\\\" type=\\\"button\\\" aria-label={{this.ariaLabel}} ...attributes>\\n <FlightIcon @name=\\\"x\\\" @size=\\\"16\\\" @isInlineBlock={{false}} />\\n</button>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\n\nexport default class HdsDismissButtonIndexComponent extends Component {\n /**\n * @param ariaLabel\n * @type {string}\n * @default 'Dismiss'\n */\n get ariaLabel() {\n return this.args.ariaLabel ?? 'Dismiss';\n }\n}\n"],"names":["HdsDismissButtonIndexComponent","Component","ariaLabel","args","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,gQAAgQ;;ACDlS;AACA;AACA;AACA;;AAIe,MAAMA,8BAA8B,SAASC,SAAS,CAAC;AACpE;AACF;AACA;AACA;AACA;EACE,IAAIC,SAASA,GAAG;AACd,IAAA,OAAO,IAAI,CAACC,IAAI,CAACD,SAAS,IAAI,SAAS,CAAA;AACzC,GAAA;AACF,CAAA;AAACE,oBAAA,CAAAC,QAAA,EAToBL,8BAA8B,CAAA;;;;"}
@@ -0,0 +1,10 @@
1
+ import templateOnly from '@ember/component/template-only';
2
+ import { precompileTemplate } from '@ember/template-compilation';
3
+ import { setComponentTemplate } from '@ember/component';
4
+
5
+ var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n<div class=\"hds-dropdown__footer {{if @hasDivider \'hds-dropdown__footer--with-divider\'}}\" ...attributes>\n {{yield}}\n</div>");
6
+
7
+ var footer = setComponentTemplate(TEMPLATE, templateOnly());
8
+
9
+ export { footer as default };
10
+ //# sourceMappingURL=footer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"footer.js","sources":["../../../../src/components/hds/dropdown/footer.hbs","../../../../src/components/hds/dropdown/footer.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n<div class=\\\"hds-dropdown__footer {{if @hasDivider \\'hds-dropdown__footer--with-divider\\'}}\\\" ...attributes>\\n {{yield}}\\n</div>\")","import templateOnly from '@ember/component/template-only';\nexport default templateOnly();\n"],"names":["setComponentTemplate","TEMPLATE","templateOnly"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,mNAAmN;;ACArP,aAAAA,oBAAA,CAAAC,QAAA,EAAeC,YAAY,EAAE,CAAA;;;;"}
@@ -0,0 +1,10 @@
1
+ import templateOnly from '@ember/component/template-only';
2
+ import { precompileTemplate } from '@ember/template-compilation';
3
+ import { setComponentTemplate } from '@ember/component';
4
+
5
+ var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n<div class=\"hds-dropdown__header {{if @hasDivider \'hds-dropdown__header--with-divider\'}}\" ...attributes>\n {{yield}}\n</div>");
6
+
7
+ var header = setComponentTemplate(TEMPLATE, templateOnly());
8
+
9
+ export { header as default };
10
+ //# sourceMappingURL=header.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"header.js","sources":["../../../../src/components/hds/dropdown/header.hbs","../../../../src/components/hds/dropdown/header.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n<div class=\\\"hds-dropdown__header {{if @hasDivider \\'hds-dropdown__header--with-divider\\'}}\\\" ...attributes>\\n {{yield}}\\n</div>\")","import templateOnly from '@ember/component/template-only';\nexport default templateOnly();\n"],"names":["setComponentTemplate","TEMPLATE","templateOnly"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,mNAAmN;;ACArP,aAAAA,oBAAA,CAAAC,QAAA,EAAeC,YAAY,EAAE,CAAA;;;;"}
@@ -0,0 +1,72 @@
1
+ import { a as _applyDecoratedDescriptor } from '../../../_rollupPluginBabelHelpers-lqPQKyNs.js';
2
+ import Component from '@glimmer/component';
3
+ import { action } from '@ember/object';
4
+ import { assert } from '@ember/debug';
5
+ import { precompileTemplate } from '@ember/template-compilation';
6
+ import { setComponentTemplate } from '@ember/component';
7
+
8
+ var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<Hds::MenuPrimitive class={{this.classNames}} @onClose={{@onClose}} ...attributes>\n <:toggle as |t|>\n {{yield\n (hash\n ToggleButton=(component \"hds/dropdown/toggle/button\" isOpen=t.isOpen onClick=t.onClickToggle)\n ToggleIcon=(component \"hds/dropdown/toggle/icon\" isOpen=t.isOpen onClick=t.onClickToggle)\n )\n }}\n </:toggle>\n <:content as |c|>\n <div class={{this.classNamesContent}} {{style width=@width max-height=@height}}>\n {{yield (hash Header=(component \"hds/dropdown/header\"))}}\n <ul class=\"hds-dropdown__list\" {{did-insert this.didInsertList}}>\n {{yield\n (hash\n close=c.close\n Checkbox=(component \"hds/dropdown/list-item/checkbox\")\n Checkmark=(component \"hds/dropdown/list-item/checkmark\")\n CopyItem=(component \"hds/dropdown/list-item/copy-item\")\n Description=(component \"hds/dropdown/list-item/description\")\n Generic=(component \"hds/dropdown/list-item/generic\")\n Interactive=(component \"hds/dropdown/list-item/interactive\")\n Radio=(component \"hds/dropdown/list-item/radio\")\n Separator=(component \"hds/dropdown/list-item/separator\")\n Title=(component \"hds/dropdown/list-item/title\")\n )\n }}\n </ul>\n {{yield (hash close=c.close Footer=(component \"hds/dropdown/footer\"))}}\n </div>\n </:content>\n</Hds::MenuPrimitive>");
9
+
10
+ var _class;
11
+ const DEFAULT_POSITION = 'bottom-right';
12
+ const POSITIONS = ['bottom-left', 'bottom-right', 'top-left', 'top-right'];
13
+ let HdsDropdownIndexComponent = (_class = class HdsDropdownIndexComponent extends Component {
14
+ /**
15
+ * @param listPosition
16
+ * @type {string}
17
+ * @default bottom-right
18
+ * @description Determines the position of the "list"
19
+ */
20
+ get listPosition() {
21
+ let {
22
+ listPosition = DEFAULT_POSITION
23
+ } = this.args;
24
+ assert(`@listPosition for "Hds::Dropdown::Index" must be one of the following: ${POSITIONS.join(', ')}; received: ${listPosition}`, POSITIONS.includes(listPosition));
25
+ return listPosition;
26
+ }
27
+
28
+ /**
29
+ * Get the class names to apply to the element
30
+ * @method classNames
31
+ * @return {string} The "class" attribute to apply to the root element
32
+ */
33
+ get classNames() {
34
+ let classes = ['hds-dropdown'];
35
+
36
+ // add a class based on the @isInline argument
37
+ if (this.args.isInline) {
38
+ classes.push('hds-dropdown--is-inline');
39
+ }
40
+ return classes.join(' ');
41
+ }
42
+
43
+ /**
44
+ * Get the class names to apply to the content
45
+ * @method classNamesContent
46
+ * @return {string} The "class" attribute to apply to the disclosed content
47
+ */
48
+ get classNamesContent() {
49
+ let classes = ['hds-dropdown__content'];
50
+
51
+ // add a class based on the @listPosition argument
52
+ classes.push(`hds-dropdown__content--position-${this.listPosition}`);
53
+
54
+ // add a class based on the @width argument
55
+ if (this.args.width) {
56
+ classes.push('hds-dropdown__content--fixed-width');
57
+ }
58
+ return classes.join(' ');
59
+ }
60
+ didInsertList(element) {
61
+ const checkmarkItems = element.querySelectorAll(`[role="option"]`);
62
+ if (checkmarkItems.length) {
63
+ const toggleButtonId = element.closest('.hds-dropdown')?.querySelector('.hds-dropdown-toggle-button')?.getAttribute('id');
64
+ element.setAttribute('role', 'listbox');
65
+ element.setAttribute('aria-labelledby', toggleButtonId);
66
+ }
67
+ }
68
+ }, (_applyDecoratedDescriptor(_class.prototype, "didInsertList", [action], Object.getOwnPropertyDescriptor(_class.prototype, "didInsertList"), _class.prototype)), _class);
69
+ setComponentTemplate(TEMPLATE, HdsDropdownIndexComponent);
70
+
71
+ export { DEFAULT_POSITION, POSITIONS, HdsDropdownIndexComponent as default };
72
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../../src/components/hds/dropdown/index.hbs","../../../../src/components/hds/dropdown/index.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n<Hds::MenuPrimitive class={{this.classNames}} @onClose={{@onClose}} ...attributes>\\n <:toggle as |t|>\\n {{yield\\n (hash\\n ToggleButton=(component \\\"hds/dropdown/toggle/button\\\" isOpen=t.isOpen onClick=t.onClickToggle)\\n ToggleIcon=(component \\\"hds/dropdown/toggle/icon\\\" isOpen=t.isOpen onClick=t.onClickToggle)\\n )\\n }}\\n </:toggle>\\n <:content as |c|>\\n <div class={{this.classNamesContent}} {{style width=@width max-height=@height}}>\\n {{yield (hash Header=(component \\\"hds/dropdown/header\\\"))}}\\n <ul class=\\\"hds-dropdown__list\\\" {{did-insert this.didInsertList}}>\\n {{yield\\n (hash\\n close=c.close\\n Checkbox=(component \\\"hds/dropdown/list-item/checkbox\\\")\\n Checkmark=(component \\\"hds/dropdown/list-item/checkmark\\\")\\n CopyItem=(component \\\"hds/dropdown/list-item/copy-item\\\")\\n Description=(component \\\"hds/dropdown/list-item/description\\\")\\n Generic=(component \\\"hds/dropdown/list-item/generic\\\")\\n Interactive=(component \\\"hds/dropdown/list-item/interactive\\\")\\n Radio=(component \\\"hds/dropdown/list-item/radio\\\")\\n Separator=(component \\\"hds/dropdown/list-item/separator\\\")\\n Title=(component \\\"hds/dropdown/list-item/title\\\")\\n )\\n }}\\n </ul>\\n {{yield (hash close=c.close Footer=(component \\\"hds/dropdown/footer\\\"))}}\\n </div>\\n </:content>\\n</Hds::MenuPrimitive>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { action } from '@ember/object';\nimport { assert } from '@ember/debug';\n\nexport const DEFAULT_POSITION = 'bottom-right';\nexport const POSITIONS = [\n 'bottom-left',\n 'bottom-right',\n 'top-left',\n 'top-right',\n];\n\nexport default class HdsDropdownIndexComponent extends Component {\n /**\n * @param listPosition\n * @type {string}\n * @default bottom-right\n * @description Determines the position of the \"list\"\n */\n get listPosition() {\n let { listPosition = DEFAULT_POSITION } = this.args;\n\n assert(\n `@listPosition for \"Hds::Dropdown::Index\" must be one of the following: ${POSITIONS.join(\n ', '\n )}; received: ${listPosition}`,\n POSITIONS.includes(listPosition)\n );\n\n return listPosition;\n }\n\n /**\n * Get the class names to apply to the element\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the root element\n */\n get classNames() {\n let classes = ['hds-dropdown'];\n\n // add a class based on the @isInline argument\n if (this.args.isInline) {\n classes.push('hds-dropdown--is-inline');\n }\n\n return classes.join(' ');\n }\n\n /**\n * Get the class names to apply to the content\n * @method classNamesContent\n * @return {string} The \"class\" attribute to apply to the disclosed content\n */\n get classNamesContent() {\n let classes = ['hds-dropdown__content'];\n\n // add a class based on the @listPosition argument\n classes.push(`hds-dropdown__content--position-${this.listPosition}`);\n\n // add a class based on the @width argument\n if (this.args.width) {\n classes.push('hds-dropdown__content--fixed-width');\n }\n\n return classes.join(' ');\n }\n\n @action\n didInsertList(element) {\n const checkmarkItems = element.querySelectorAll(`[role=\"option\"]`);\n if (checkmarkItems.length) {\n const toggleButtonId = element\n .closest('.hds-dropdown')\n ?.querySelector('.hds-dropdown-toggle-button')\n ?.getAttribute('id');\n element.setAttribute('role', 'listbox');\n element.setAttribute('aria-labelledby', toggleButtonId);\n }\n }\n}\n"],"names":["DEFAULT_POSITION","POSITIONS","HdsDropdownIndexComponent","_class","Component","listPosition","args","assert","join","includes","classNames","classes","isInline","push","classNamesContent","width","didInsertList","element","checkmarkItems","querySelectorAll","length","toggleButtonId","closest","querySelector","getAttribute","setAttribute","_applyDecoratedDescriptor","prototype","action","Object","getOwnPropertyDescriptor","setComponentTemplate","TEMPLATE"],"mappings":";;;;;;;AACA,eAAe,kBAAkB,CAAC,qhDAAqhD;;;ACQhjD,MAAMA,gBAAgB,GAAG,eAAc;AACvC,MAAMC,SAAS,GAAG,CACvB,aAAa,EACb,cAAc,EACd,UAAU,EACV,WAAW,EACZ;AAEoBC,IAAAA,yBAAyB,IAAAC,MAAA,GAA/B,MAAMD,yBAAyB,SAASE,SAAS,CAAC;AAC/D;AACF;AACA;AACA;AACA;AACA;EACE,IAAIC,YAAYA,GAAG;IACjB,IAAI;AAAEA,MAAAA,YAAY,GAAGL,gBAAAA;KAAkB,GAAG,IAAI,CAACM,IAAI,CAAA;AAEnDC,IAAAA,MAAM,CACH,CAAyEN,uEAAAA,EAAAA,SAAS,CAACO,IAAI,CACtF,IACF,CAAE,CAAA,YAAA,EAAcH,YAAa,CAAA,CAAC,EAC9BJ,SAAS,CAACQ,QAAQ,CAACJ,YAAY,CACjC,CAAC,CAAA;AAED,IAAA,OAAOA,YAAY,CAAA;AACrB,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIK,UAAUA,GAAG;AACf,IAAA,IAAIC,OAAO,GAAG,CAAC,cAAc,CAAC,CAAA;;AAE9B;AACA,IAAA,IAAI,IAAI,CAACL,IAAI,CAACM,QAAQ,EAAE;AACtBD,MAAAA,OAAO,CAACE,IAAI,CAAC,yBAAyB,CAAC,CAAA;AACzC,KAAA;AAEA,IAAA,OAAOF,OAAO,CAACH,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1B,GAAA;;AAEA;AACF;AACA;AACA;AACA;EACE,IAAIM,iBAAiBA,GAAG;AACtB,IAAA,IAAIH,OAAO,GAAG,CAAC,uBAAuB,CAAC,CAAA;;AAEvC;IACAA,OAAO,CAACE,IAAI,CAAE,CAAA,gCAAA,EAAkC,IAAI,CAACR,YAAa,EAAC,CAAC,CAAA;;AAEpE;AACA,IAAA,IAAI,IAAI,CAACC,IAAI,CAACS,KAAK,EAAE;AACnBJ,MAAAA,OAAO,CAACE,IAAI,CAAC,oCAAoC,CAAC,CAAA;AACpD,KAAA;AAEA,IAAA,OAAOF,OAAO,CAACH,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1B,GAAA;EAGAQ,aAAaA,CAACC,OAAO,EAAE;AACrB,IAAA,MAAMC,cAAc,GAAGD,OAAO,CAACE,gBAAgB,CAAE,iBAAgB,CAAC,CAAA;IAClE,IAAID,cAAc,CAACE,MAAM,EAAE;AACzB,MAAA,MAAMC,cAAc,GAAGJ,OAAO,CAC3BK,OAAO,CAAC,eAAe,CAAC,EACvBC,aAAa,CAAC,6BAA6B,CAAC,EAC5CC,YAAY,CAAC,IAAI,CAAC,CAAA;AACtBP,MAAAA,OAAO,CAACQ,YAAY,CAAC,MAAM,EAAE,SAAS,CAAC,CAAA;AACvCR,MAAAA,OAAO,CAACQ,YAAY,CAAC,iBAAiB,EAAEJ,cAAc,CAAC,CAAA;AACzD,KAAA;AACF,GAAA;AACF,CAAC,GAAAK,yBAAA,CAAAvB,MAAA,CAAAwB,SAAA,EAAA,eAAA,EAAA,CAZEC,MAAM,CAAAC,EAAAA,MAAA,CAAAC,wBAAA,CAAA3B,MAAA,CAAAwB,SAAA,oBAAAxB,MAAA,CAAAwB,SAAA,CAAA,GAAAxB,MAAA,EAAA;AAvDqC4B,oBAAA,CAAAC,QAAA,EAAA9B,yBAAA,CAAA;;;;"}
@@ -0,0 +1,24 @@
1
+ import Component from '@glimmer/component';
2
+ import { getElementId } from '../../../../utils/hds-get-element-id.js';
3
+ import { precompileTemplate } from '@ember/template-compilation';
4
+ import { setComponentTemplate } from '@ember/component';
5
+
6
+ var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n<li class=\"hds-dropdown-list-item hds-dropdown-list-item--variant-checkbox\">\n <label class=\"hds-dropdown-list-item__label hds-typography-body-200\" for={{this.id}}>\n <Hds::Form::Checkbox::Base class=\"hds-dropdown-list-item__control\" id={{this.id}} @value={{@value}} ...attributes />\n {{#if @icon}}\n <span class=\"hds-dropdown-list-item__icon\">\n <FlightIcon @name={{@icon}} @isInlineBlock={{false}} />\n </span>\n {{/if}}\n <span class=\"hds-dropdown-list-item__text-content\">{{yield}}</span>\n\n {{#if @count}}\n <span class=\"hds-dropdown-list-item__count hds-typography-body-100 hds-font-weight-medium\">{{@count}}</span>\n {{/if}}\n </label>\n</li>");
7
+
8
+ /**
9
+ * Copyright (c) HashiCorp, Inc.
10
+ * SPDX-License-Identifier: MPL-2.0
11
+ */
12
+
13
+ class HdsDropdownListItemCheckboxComponent extends Component {
14
+ /**
15
+ * Determines the unique ID to assign to the checkbox control
16
+ */
17
+ get id() {
18
+ return getElementId(this);
19
+ }
20
+ }
21
+ setComponentTemplate(TEMPLATE, HdsDropdownListItemCheckboxComponent);
22
+
23
+ export { HdsDropdownListItemCheckboxComponent as default };
24
+ //# sourceMappingURL=checkbox.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox.js","sources":["../../../../../src/components/hds/dropdown/list-item/checkbox.hbs","../../../../../src/components/hds/dropdown/list-item/checkbox.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n<li class=\\\"hds-dropdown-list-item hds-dropdown-list-item--variant-checkbox\\\">\\n <label class=\\\"hds-dropdown-list-item__label hds-typography-body-200\\\" for={{this.id}}>\\n <Hds::Form::Checkbox::Base class=\\\"hds-dropdown-list-item__control\\\" id={{this.id}} @value={{@value}} ...attributes />\\n {{#if @icon}}\\n <span class=\\\"hds-dropdown-list-item__icon\\\">\\n <FlightIcon @name={{@icon}} @isInlineBlock={{false}} />\\n </span>\\n {{/if}}\\n <span class=\\\"hds-dropdown-list-item__text-content\\\">{{yield}}</span>\\n\\n {{#if @count}}\\n <span class=\\\"hds-dropdown-list-item__count hds-typography-body-100 hds-font-weight-medium\\\">{{@count}}</span>\\n {{/if}}\\n </label>\\n</li>\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\nimport { getElementId } from '../../../../utils/hds-get-element-id';\n\nexport default class HdsDropdownListItemCheckboxComponent extends Component {\n /**\n * Determines the unique ID to assign to the checkbox control\n */\n get id() {\n return getElementId(this);\n }\n}\n"],"names":["HdsDropdownListItemCheckboxComponent","Component","id","getElementId","setComponentTemplate","TEMPLATE"],"mappings":";;;;;AACA,eAAe,kBAAkB,CAAC,mxBAAmxB;;ACDrzB;AACA;AACA;AACA;;AAKe,MAAMA,oCAAoC,SAASC,SAAS,CAAC;AAC1E;AACF;AACA;EACE,IAAIC,EAAEA,GAAG;IACP,OAAOC,YAAY,CAAC,IAAI,CAAC,CAAA;AAC3B,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EAPoBL,oCAAoC,CAAA;;;;"}
@@ -0,0 +1,31 @@
1
+ import Component from '@glimmer/component';
2
+ import { precompileTemplate } from '@ember/template-compilation';
3
+ import { setComponentTemplate } from '@ember/component';
4
+
5
+ var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n\n{{! template-lint-disable no-invalid-role require-context-role require-presentational-children }}\n<li class={{this.classNames}} role=\"none\">\n <Hds::Interactive\n @current-when={{@current-when}}\n @models={{hds-link-to-models @model @models}}\n @query={{hds-link-to-query @query}}\n @replace={{@replace}}\n @route={{@route}}\n @isRouteExternal={{@isRouteExternal}}\n @href={{@href}}\n @isHrefExternal={{@isHrefExternal}}\n class=\"hds-dropdown-list-item__interactive\"\n ...attributes\n role=\"option\"\n aria-selected={{if @selected \"true\" \"false\"}}\n >\n {{#if @icon}}\n <span class=\"hds-dropdown-list-item__interactive-icon\">\n <FlightIcon @name={{@icon}} @isInlineBlock={{false}} />\n </span>\n {{/if}}\n <Hds::Text::Body @tag=\"span\" @size=\"200\" @weight=\"medium\" class=\"hds-dropdown-list-item__interactive-text\">\n {{yield}}\n </Hds::Text::Body>\n {{#if @count}}\n <Hds::Text::Body\n class=\"hds-dropdown-list-item__count\"\n @tag=\"span\"\n @size=\"100\"\n @weight=\"medium\"\n @color=\"faint\"\n >{{@count}}</Hds::Text::Body>\n {{/if}}\n <span class=\"hds-dropdown-list-item__checkmark\">\n {{#if @selected}}\n <FlightIcon class=\"hds-dropdown-list-item__checkmark-icon\" @name=\"check\" @isInlineBlock={{false}} />\n {{/if}}\n </span>\n </Hds::Interactive>\n</li>\n{{! template-lint-enable no-invalid-role require-context-role require-presentational-children }}");
6
+
7
+ /**
8
+ * Copyright (c) HashiCorp, Inc.
9
+ * SPDX-License-Identifier: MPL-2.0
10
+ */
11
+
12
+ class HdsDropdownListItemCheckmarkComponent extends Component {
13
+ /**
14
+ * Get the class names to apply to the component.
15
+ * @method classNames
16
+ * @return {string} The "class" attribute to apply to the component.
17
+ */
18
+ get classNames() {
19
+ let classes = ['hds-dropdown-list-item', 'hds-dropdown-list-item--color-action', 'hds-dropdown-list-item--variant-checkmark'];
20
+
21
+ // add a class based on the @selected argument
22
+ if (this.args.selected) {
23
+ classes.push('hds-dropdown-list-item--variant-checkmark-selected');
24
+ }
25
+ return classes.join(' ');
26
+ }
27
+ }
28
+ setComponentTemplate(TEMPLATE, HdsDropdownListItemCheckmarkComponent);
29
+
30
+ export { HdsDropdownListItemCheckmarkComponent as default };
31
+ //# sourceMappingURL=checkmark.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkmark.js","sources":["../../../../../src/components/hds/dropdown/list-item/checkmark.hbs","../../../../../src/components/hds/dropdown/list-item/checkmark.js"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{!\\n Copyright (c) HashiCorp, Inc.\\n SPDX-License-Identifier: MPL-2.0\\n}}\\n\\n{{! template-lint-disable no-invalid-role require-context-role require-presentational-children }}\\n<li class={{this.classNames}} role=\\\"none\\\">\\n <Hds::Interactive\\n @current-when={{@current-when}}\\n @models={{hds-link-to-models @model @models}}\\n @query={{hds-link-to-query @query}}\\n @replace={{@replace}}\\n @route={{@route}}\\n @isRouteExternal={{@isRouteExternal}}\\n @href={{@href}}\\n @isHrefExternal={{@isHrefExternal}}\\n class=\\\"hds-dropdown-list-item__interactive\\\"\\n ...attributes\\n role=\\\"option\\\"\\n aria-selected={{if @selected \\\"true\\\" \\\"false\\\"}}\\n >\\n {{#if @icon}}\\n <span class=\\\"hds-dropdown-list-item__interactive-icon\\\">\\n <FlightIcon @name={{@icon}} @isInlineBlock={{false}} />\\n </span>\\n {{/if}}\\n <Hds::Text::Body @tag=\\\"span\\\" @size=\\\"200\\\" @weight=\\\"medium\\\" class=\\\"hds-dropdown-list-item__interactive-text\\\">\\n {{yield}}\\n </Hds::Text::Body>\\n {{#if @count}}\\n <Hds::Text::Body\\n class=\\\"hds-dropdown-list-item__count\\\"\\n @tag=\\\"span\\\"\\n @size=\\\"100\\\"\\n @weight=\\\"medium\\\"\\n @color=\\\"faint\\\"\\n >{{@count}}</Hds::Text::Body>\\n {{/if}}\\n <span class=\\\"hds-dropdown-list-item__checkmark\\\">\\n {{#if @selected}}\\n <FlightIcon class=\\\"hds-dropdown-list-item__checkmark-icon\\\" @name=\\\"check\\\" @isInlineBlock={{false}} />\\n {{/if}}\\n </span>\\n </Hds::Interactive>\\n</li>\\n{{! template-lint-enable no-invalid-role require-context-role require-presentational-children }}\")","/**\n * Copyright (c) HashiCorp, Inc.\n * SPDX-License-Identifier: MPL-2.0\n */\n\nimport Component from '@glimmer/component';\n\nexport default class HdsDropdownListItemCheckmarkComponent extends Component {\n /**\n * Get the class names to apply to the component.\n * @method classNames\n * @return {string} The \"class\" attribute to apply to the component.\n */\n get classNames() {\n let classes = [\n 'hds-dropdown-list-item',\n 'hds-dropdown-list-item--color-action',\n 'hds-dropdown-list-item--variant-checkmark',\n ];\n\n // add a class based on the @selected argument\n if (this.args.selected) {\n classes.push('hds-dropdown-list-item--variant-checkmark-selected');\n }\n\n return classes.join(' ');\n }\n}\n"],"names":["HdsDropdownListItemCheckmarkComponent","Component","classNames","classes","args","selected","push","join","setComponentTemplate","TEMPLATE"],"mappings":";;;;AACA,eAAe,kBAAkB,CAAC,8kDAA8kD;;ACDhnD;AACA;AACA;AACA;;AAIe,MAAMA,qCAAqC,SAASC,SAAS,CAAC;AAC3E;AACF;AACA;AACA;AACA;EACE,IAAIC,UAAUA,GAAG;IACf,IAAIC,OAAO,GAAG,CACZ,wBAAwB,EACxB,sCAAsC,EACtC,2CAA2C,CAC5C,CAAA;;AAED;AACA,IAAA,IAAI,IAAI,CAACC,IAAI,CAACC,QAAQ,EAAE;AACtBF,MAAAA,OAAO,CAACG,IAAI,CAAC,oDAAoD,CAAC,CAAA;AACpE,KAAA;AAEA,IAAA,OAAOH,OAAO,CAACI,IAAI,CAAC,GAAG,CAAC,CAAA;AAC1B,GAAA;AACF,CAAA;AAACC,oBAAA,CAAAC,QAAA,EApBoBT,qCAAqC,CAAA;;;;"}
@@ -0,0 +1,53 @@
1
+ import Component from '@glimmer/component';
2
+ import { assert } from '@ember/debug';
3
+ import { precompileTemplate } from '@ember/template-compilation';
4
+ import { setComponentTemplate } from '@ember/component';
5
+
6
+ var TEMPLATE = precompileTemplate("{{!\n Copyright (c) HashiCorp, Inc.\n SPDX-License-Identifier: MPL-2.0\n}}\n<li class={{this.classNames}} ...attributes>\n {{#if @copyItemTitle}}\n <Hds::Text::Body\n class=\"hds-dropdown-list-item__copy-item-title\"\n @tag=\"div\"\n @size=\"100\"\n @weight=\"semibold\"\n @color=\"faint\"\n >{{@copyItemTitle}}</Hds::Text::Body>\n {{/if}}\n <Hds::Copy::Snippet @color=\"secondary\" @textToCopy={{this.text}} @isTruncated={{this.isTruncated}} />\n</li>");
7
+
8
+ /**
9
+ * Copyright (c) HashiCorp, Inc.
10
+ * SPDX-License-Identifier: MPL-2.0
11
+ */
12
+
13
+ class HdsDropdownListItemCopyItemComponent extends Component {
14
+ /**
15
+ * @param text
16
+ * @type {string}
17
+ * @description The text of the item. If no text value is defined an error will be thrown
18
+ */
19
+ get text() {
20
+ let {
21
+ text
22
+ } = this.args;
23
+ assert('@text for "Hds::Dropdown::ListItem::CopyItem" must have a valid value', text !== undefined);
24
+ return text;
25
+ }
26
+
27
+ /**
28
+ * @param isTruncated
29
+ * @type {boolean}
30
+ * @default true
31
+ * @description Indicates that the text should be truncated instead of wrapping and using multiple lines.
32
+ */
33
+ get isTruncated() {
34
+ let {
35
+ isTruncated = true
36
+ } = this.args;
37
+ return isTruncated;
38
+ }
39
+
40
+ /**
41
+ * Get the class names to apply to the component.
42
+ * @method classNames
43
+ * @return {string} The "class" attribute to apply to the component.
44
+ */
45
+ get classNames() {
46
+ let classes = ['hds-dropdown-list-item', 'hds-dropdown-list-item--variant-copy-item'];
47
+ return classes.join(' ');
48
+ }
49
+ }
50
+ setComponentTemplate(TEMPLATE, HdsDropdownListItemCopyItemComponent);
51
+
52
+ export { HdsDropdownListItemCopyItemComponent as default };
53
+ //# sourceMappingURL=copy-item.js.map