@arc-ui/community-components 0.1.0 → 1.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 (257) hide show
  1. package/.turbo/turbo-build.log +127 -7
  2. package/CHANGELOG.md +22 -0
  3. package/dist/Accordion/Accordion.cjs.js +9 -9
  4. package/dist/Accordion/Accordion.esm.js +7 -7
  5. package/dist/ArticleSidebar/ArticleSidebar.cjs.js +185 -0
  6. package/dist/ArticleSidebar/ArticleSidebar.esm.js +183 -0
  7. package/dist/ArticleSidebar/styles.css +1 -0
  8. package/dist/Author/Author.cjs.js +6 -7
  9. package/dist/Author/Author.esm.js +6 -7
  10. package/dist/BannerWithTabs/BannerWithTabs.cjs.js +15 -25
  11. package/dist/BannerWithTabs/BannerWithTabs.esm.js +16 -26
  12. package/dist/BannerWithTabs/styles.css +1 -1
  13. package/dist/CopyLead/CopyLead.cjs.js +25 -27
  14. package/dist/CopyLead/CopyLead.esm.js +15 -17
  15. package/dist/DownloadList/DownloadList.cjs.js +10 -9
  16. package/dist/DownloadList/DownloadList.esm.js +9 -8
  17. package/dist/FeaturePost/FeaturePost.cjs.js +28 -31
  18. package/dist/FeaturePost/FeaturePost.esm.js +21 -24
  19. package/dist/Highlights/Highlights.cjs.js +10 -10
  20. package/dist/Highlights/Highlights.esm.js +10 -10
  21. package/dist/ProductNavigation/ProductNavigation.cjs.js +86 -0
  22. package/dist/ProductNavigation/ProductNavigation.esm.js +84 -0
  23. package/dist/ProductNavigation/styles.css +1 -0
  24. package/dist/PromoListing/PromoListing.cjs.js +17 -17
  25. package/dist/PromoListing/PromoListing.esm.js +13 -13
  26. package/dist/Quote/Quote.cjs.js +8 -9
  27. package/dist/Quote/Quote.esm.js +6 -7
  28. package/dist/SectionHeading/SectionHeading.cjs.js +6 -6
  29. package/dist/SectionHeading/SectionHeading.esm.js +6 -6
  30. package/dist/SectionHeading/styles.css +1 -1
  31. package/dist/Statistics/Statistics.cjs.js +14 -14
  32. package/dist/Statistics/Statistics.esm.js +13 -13
  33. package/dist/Summary/Summary.cjs.js +7 -7
  34. package/dist/Summary/Summary.esm.js +7 -7
  35. package/dist/_shared/cjs/{Author-CAo-qryZ.js → Author-BXxxwh6E.js} +11 -12
  36. package/dist/_shared/cjs/SectionHeading-7IxNz67p.js +29 -0
  37. package/dist/_shared/cjs/filter-data-attrs-DlS_Fyr9.js +112 -0
  38. package/dist/_shared/cjs/{index.es-X428Cm3N.js → index.es-HAMLJhPd.js} +1 -1
  39. package/dist/_shared/esm/{Author-Bx-cE9Pz.js → Author-B8tJxqB8.js} +8 -9
  40. package/dist/_shared/esm/SectionHeading-Dz0GfXsP.js +27 -0
  41. package/dist/_shared/esm/filter-data-attrs-DAx-HNG5.js +106 -0
  42. package/dist/_shared/esm/{index.es-BzmvPxje.js → index.es-BI7la-9v.js} +2 -2
  43. package/dist/index.es.js +399 -127
  44. package/dist/index.es.js.map +1 -1
  45. package/dist/index.js +400 -125
  46. package/dist/index.js.map +1 -1
  47. package/dist/styles.css +1 -1
  48. package/dist/types/{components → cjs/components}/Accordion/Accordion.d.ts +1 -1
  49. package/dist/types/{components → cjs/components}/Accordion/components/AccordionDisclosureList/AccordionDisclosureList.d.ts +1 -1
  50. package/dist/types/cjs/components/ArticleSidebar/ArticleSidebar.d.ts +36 -0
  51. package/dist/types/cjs/components/ArticleSidebar/index.d.ts +1 -0
  52. package/dist/types/cjs/components/ArticleSidebar/types/link-section.d.ts +11 -0
  53. package/dist/types/cjs/components/ArticleSidebar/types/share-button.d.ts +8 -0
  54. package/dist/types/cjs/components/ArticleSidebar/types/share.d.ts +8 -0
  55. package/dist/types/cjs/components/ArticleSidebar/types/sidebar-author.d.ts +4 -0
  56. package/dist/types/cjs/components/ArticleSidebar/types/text-section.d.ts +6 -0
  57. package/dist/types/cjs/components/ArticleSidebar/types/topic.d.ts +7 -0
  58. package/dist/types/{components → cjs/components}/Author/Author.d.ts +1 -1
  59. package/dist/types/cjs/components/BannerWithTabs/BannerWithTabs.d.ts +42 -0
  60. package/dist/types/{components → cjs/components}/CopyLead/components/MediaContent/MediaContent.d.ts +1 -1
  61. package/dist/types/{components → cjs/components}/CopyLead/templates/Media/Media.d.ts +2 -2
  62. package/dist/types/cjs/components/CopyLead/types/copy-lead-list-item.d.ts +6 -0
  63. package/dist/types/cjs/components/DownloadList/DownloadList.d.ts +7 -0
  64. package/dist/types/{components → cjs/components}/FeaturePost/FeaturePost.d.ts +2 -2
  65. package/dist/types/{components → cjs/components}/FeaturePost/components/MediaContent/MediaContent.d.ts +1 -1
  66. package/dist/types/{components → cjs/components}/Highlights/Highlights.d.ts +1 -1
  67. package/dist/types/{components → cjs/components}/Highlights/components/HighlightItem/HighlightItem.d.ts +3 -5
  68. package/dist/types/cjs/components/Highlights/types/highlight-link.d.ts +5 -0
  69. package/dist/types/cjs/components/Highlights/types/highlight-list-item.d.ts +8 -0
  70. package/dist/types/{components → cjs/components}/Highlights/types/index.d.ts +1 -0
  71. package/dist/types/cjs/components/ProductNavigation/ProductNavigation.d.ts +49 -0
  72. package/dist/types/cjs/components/ProductNavigation/index.d.ts +2 -0
  73. package/dist/types/cjs/components/ProductNavigation/types/index.d.ts +1 -0
  74. package/dist/types/cjs/components/ProductNavigation/types/product-list.d.ts +6 -0
  75. package/dist/types/{components → cjs/components}/PromoListing/PromoListing.d.ts +5 -5
  76. package/dist/types/{components → cjs/components}/SectionHeading/SectionHeading.d.ts +6 -1
  77. package/dist/types/{components → cjs/components}/Summary/Summary.d.ts +1 -1
  78. package/dist/types/cjs/components/index.d.ts +14 -0
  79. package/dist/types/cjs/types/arc-icon.d.ts +2 -0
  80. package/dist/types/esm/components/Accordion/Accordion.d.ts +9 -0
  81. package/dist/types/esm/components/Accordion/components/AccordionDisclosureList/AccordionDisclosureList.d.ts +9 -0
  82. package/dist/types/esm/components/Accordion/index.d.ts +1 -0
  83. package/dist/types/esm/components/ArticleSidebar/ArticleSidebar.d.ts +36 -0
  84. package/dist/types/esm/components/ArticleSidebar/index.d.ts +1 -0
  85. package/dist/types/esm/components/ArticleSidebar/types/link-section.d.ts +11 -0
  86. package/dist/types/esm/components/ArticleSidebar/types/share-button.d.ts +8 -0
  87. package/dist/types/esm/components/ArticleSidebar/types/share.d.ts +8 -0
  88. package/dist/types/esm/components/ArticleSidebar/types/sidebar-author.d.ts +4 -0
  89. package/dist/types/esm/components/ArticleSidebar/types/text-section.d.ts +6 -0
  90. package/dist/types/esm/components/ArticleSidebar/types/topic.d.ts +7 -0
  91. package/dist/types/esm/components/Author/Author.d.ts +17 -0
  92. package/dist/types/esm/components/Author/index.d.ts +1 -0
  93. package/dist/types/esm/components/BannerWithTabs/BannerWithTabs.d.ts +42 -0
  94. package/dist/types/esm/components/BannerWithTabs/index.d.ts +1 -0
  95. package/dist/types/esm/components/CopyLead/CopyLead.d.ts +42 -0
  96. package/dist/types/esm/components/CopyLead/components/Button/Button.d.ts +3 -0
  97. package/dist/types/esm/components/CopyLead/components/Button/index.d.ts +1 -0
  98. package/dist/types/esm/components/CopyLead/components/Column/Column.d.ts +6 -0
  99. package/dist/types/esm/components/CopyLead/components/Column/index.d.ts +1 -0
  100. package/dist/types/esm/components/CopyLead/components/Container/Container.d.ts +9 -0
  101. package/dist/types/esm/components/CopyLead/components/Container/index.d.ts +1 -0
  102. package/dist/types/esm/components/CopyLead/components/IconList/IconList.d.ts +8 -0
  103. package/dist/types/esm/components/CopyLead/components/IconList/index.d.ts +1 -0
  104. package/dist/types/esm/components/CopyLead/components/Image/Image.d.ts +3 -0
  105. package/dist/types/esm/components/CopyLead/components/Image/index.d.ts +1 -0
  106. package/dist/types/esm/components/CopyLead/components/MediaContent/MediaContent.d.ts +9 -0
  107. package/dist/types/esm/components/CopyLead/components/MediaContent/index.d.ts +1 -0
  108. package/dist/types/esm/components/CopyLead/index.d.ts +1 -0
  109. package/dist/types/esm/components/CopyLead/templates/Content/Content.d.ts +10 -0
  110. package/dist/types/esm/components/CopyLead/templates/Content/index.d.ts +1 -0
  111. package/dist/types/esm/components/CopyLead/templates/Media/Media.d.ts +16 -0
  112. package/dist/types/esm/components/CopyLead/templates/Media/index.d.ts +1 -0
  113. package/dist/types/esm/components/CopyLead/types/copy-lead-button.d.ts +2 -0
  114. package/dist/types/esm/components/CopyLead/types/copy-lead-image.d.ts +4 -0
  115. package/dist/types/esm/components/CopyLead/types/copy-lead-list-item.d.ts +6 -0
  116. package/dist/types/esm/components/CopyLead/types/copy-lead-transcript-link.d.ts +6 -0
  117. package/dist/types/esm/components/CopyLead/types/index.d.ts +4 -0
  118. package/dist/types/esm/components/DownloadList/DownloadList.d.ts +7 -0
  119. package/dist/types/esm/components/DownloadList/index.d.ts +1 -0
  120. package/dist/types/esm/components/FeaturePost/FeaturePost.d.ts +45 -0
  121. package/dist/types/esm/components/FeaturePost/components/Image/Image.d.ts +3 -0
  122. package/dist/types/esm/components/FeaturePost/components/Image/index.d.ts +1 -0
  123. package/dist/types/esm/components/FeaturePost/components/MediaContent/MediaContent.d.ts +15 -0
  124. package/dist/types/esm/components/FeaturePost/index.d.ts +1 -0
  125. package/dist/types/esm/components/FeaturePost/types/feature-post-app-button-footer.d.ts +6 -0
  126. package/dist/types/esm/components/FeaturePost/types/feature-post-cta-footer.d.ts +7 -0
  127. package/dist/types/esm/components/FeaturePost/types/feature-post-image.d.ts +4 -0
  128. package/dist/types/esm/components/FeaturePost/types/index.d.ts +3 -0
  129. package/dist/types/esm/components/Highlights/Highlights.d.ts +17 -0
  130. package/dist/types/esm/components/Highlights/components/HighlightItem/HighlightItem.d.ts +12 -0
  131. package/dist/types/esm/components/Highlights/components/HighlightList/HighlightList.d.ts +9 -0
  132. package/dist/types/esm/components/Highlights/index.d.ts +1 -0
  133. package/dist/types/esm/components/Highlights/types/highlight-link.d.ts +5 -0
  134. package/dist/types/esm/components/Highlights/types/highlight-list-item.d.ts +8 -0
  135. package/dist/types/esm/components/Highlights/types/index.d.ts +2 -0
  136. package/dist/types/esm/components/ProductNavigation/ProductNavigation.d.ts +49 -0
  137. package/dist/types/esm/components/ProductNavigation/index.d.ts +2 -0
  138. package/dist/types/esm/components/ProductNavigation/types/index.d.ts +1 -0
  139. package/dist/types/esm/components/ProductNavigation/types/product-list.d.ts +6 -0
  140. package/dist/types/esm/components/PromoListing/PromoListing.d.ts +38 -0
  141. package/dist/types/esm/components/PromoListing/index.d.ts +1 -0
  142. package/dist/types/esm/components/Quote/Quote.d.ts +11 -0
  143. package/dist/types/esm/components/Quote/index.d.ts +1 -0
  144. package/dist/types/esm/components/SectionHeading/SectionHeading.d.ts +30 -0
  145. package/dist/types/esm/components/SectionHeading/index.d.ts +1 -0
  146. package/dist/types/esm/components/Statistics/Statistics.d.ts +7 -0
  147. package/dist/types/esm/components/Statistics/helpers/get-link-props.d.ts +2 -0
  148. package/dist/types/esm/components/Statistics/index.d.ts +1 -0
  149. package/dist/types/esm/components/Statistics/types/statistic-link.d.ts +6 -0
  150. package/dist/types/esm/components/Statistics/types/statistic.d.ts +8 -0
  151. package/dist/types/esm/components/Summary/Summary.d.ts +18 -0
  152. package/dist/types/esm/components/Summary/index.d.ts +1 -0
  153. package/dist/types/esm/components/index.d.ts +14 -0
  154. package/dist/types/esm/index.d.ts +1 -0
  155. package/dist/types/esm/types/arc-icon.d.ts +2 -0
  156. package/generate-versions.js +19 -0
  157. package/package.json +37 -34
  158. package/rollup.config.js +15 -1
  159. package/src/components/Accordion/Accordion.tsx +1 -1
  160. package/src/components/Accordion/components/AccordionDisclosureList/AccordionDisclosureList.tsx +1 -1
  161. package/src/components/ArticleSidebar/ArticleSidebar.module.css +35 -0
  162. package/src/components/ArticleSidebar/ArticleSidebar.tsx +219 -0
  163. package/src/components/ArticleSidebar/index.ts +1 -0
  164. package/src/components/ArticleSidebar/types/link-section.ts +12 -0
  165. package/src/components/ArticleSidebar/types/share-button.ts +9 -0
  166. package/src/components/ArticleSidebar/types/share.ts +9 -0
  167. package/src/components/ArticleSidebar/types/sidebar-author.ts +5 -0
  168. package/src/components/ArticleSidebar/types/text-section.ts +7 -0
  169. package/src/components/ArticleSidebar/types/topic.ts +8 -0
  170. package/src/components/Author/Author.tsx +10 -10
  171. package/src/components/BannerWithTabs/BannerWithTabs.module.css +22 -0
  172. package/src/components/BannerWithTabs/BannerWithTabs.tsx +65 -51
  173. package/src/components/CopyLead/CopyLead.tsx +1 -1
  174. package/src/components/CopyLead/components/Button/Button.tsx +1 -1
  175. package/src/components/CopyLead/components/IconList/IconList.tsx +4 -4
  176. package/src/components/CopyLead/components/Image/Image.tsx +2 -4
  177. package/src/components/CopyLead/components/MediaContent/MediaContent.tsx +3 -3
  178. package/src/components/CopyLead/templates/Content/Content.tsx +1 -1
  179. package/src/components/CopyLead/templates/Media/Media.tsx +7 -7
  180. package/src/components/CopyLead/types/copy-lead-list-item.ts +2 -2
  181. package/src/components/DownloadList/DownloadList.tsx +10 -13
  182. package/src/components/FeaturePost/FeaturePost.tsx +20 -20
  183. package/src/components/FeaturePost/components/Image/Image.tsx +2 -4
  184. package/src/components/FeaturePost/components/MediaContent/MediaContent.tsx +2 -2
  185. package/src/components/Highlights/Highlights.tsx +2 -2
  186. package/src/components/Highlights/components/HighlightItem/HighlightItem.tsx +11 -11
  187. package/src/components/Highlights/types/highlight-link.ts +5 -0
  188. package/src/components/Highlights/types/highlight-list-item.ts +3 -5
  189. package/src/components/Highlights/types/index.ts +1 -0
  190. package/src/components/ProductNavigation/ProductNavigation.module.css +51 -0
  191. package/src/components/ProductNavigation/ProductNavigation.tsx +200 -0
  192. package/src/components/ProductNavigation/index.ts +5 -0
  193. package/src/components/ProductNavigation/types/index.ts +1 -0
  194. package/src/components/ProductNavigation/types/product-list.ts +10 -0
  195. package/src/components/PromoListing/PromoListing.tsx +8 -10
  196. package/src/components/SectionHeading/SectionHeading.module.css +13 -1
  197. package/src/components/SectionHeading/SectionHeading.tsx +24 -7
  198. package/src/components/Statistics/Statistics.tsx +14 -14
  199. package/src/components/Summary/Summary.tsx +6 -6
  200. package/src/components/index.ts +14 -11
  201. package/src/types/arc-icon.ts +2 -0
  202. package/versions.json +1 -0
  203. package/dist/_shared/cjs/SectionHeading-L2EpTQ79.js +0 -25
  204. package/dist/_shared/cjs/filter-data-attrs-ajtUvDAC.js +0 -15
  205. package/dist/_shared/cjs/tslib.es6-DBA0GFPJ.js +0 -48
  206. package/dist/_shared/esm/SectionHeading-C70XNhqJ.js +0 -23
  207. package/dist/_shared/esm/filter-data-attrs-V7cbJuwS.js +0 -13
  208. package/dist/_shared/esm/tslib.es6-Cv15O4Nx.js +0 -46
  209. package/dist/types/components/BannerWithTabs/BannerWithTabs.d.ts +0 -17
  210. package/dist/types/components/CopyLead/types/copy-lead-list-item.d.ts +0 -6
  211. package/dist/types/components/DownloadList/DownloadList.d.ts +0 -10
  212. package/dist/types/components/Highlights/types/highlight-list-item.d.ts +0 -10
  213. package/dist/types/components/index.d.ts +0 -11
  214. /package/dist/types/{components → cjs/components}/Accordion/index.d.ts +0 -0
  215. /package/dist/types/{components → cjs/components}/Author/index.d.ts +0 -0
  216. /package/dist/types/{components → cjs/components}/BannerWithTabs/index.d.ts +0 -0
  217. /package/dist/types/{components → cjs/components}/CopyLead/CopyLead.d.ts +0 -0
  218. /package/dist/types/{components → cjs/components}/CopyLead/components/Button/Button.d.ts +0 -0
  219. /package/dist/types/{components → cjs/components}/CopyLead/components/Button/index.d.ts +0 -0
  220. /package/dist/types/{components → cjs/components}/CopyLead/components/Column/Column.d.ts +0 -0
  221. /package/dist/types/{components → cjs/components}/CopyLead/components/Column/index.d.ts +0 -0
  222. /package/dist/types/{components → cjs/components}/CopyLead/components/Container/Container.d.ts +0 -0
  223. /package/dist/types/{components → cjs/components}/CopyLead/components/Container/index.d.ts +0 -0
  224. /package/dist/types/{components → cjs/components}/CopyLead/components/IconList/IconList.d.ts +0 -0
  225. /package/dist/types/{components → cjs/components}/CopyLead/components/IconList/index.d.ts +0 -0
  226. /package/dist/types/{components → cjs/components}/CopyLead/components/Image/Image.d.ts +0 -0
  227. /package/dist/types/{components → cjs/components}/CopyLead/components/Image/index.d.ts +0 -0
  228. /package/dist/types/{components → cjs/components}/CopyLead/components/MediaContent/index.d.ts +0 -0
  229. /package/dist/types/{components → cjs/components}/CopyLead/index.d.ts +0 -0
  230. /package/dist/types/{components → cjs/components}/CopyLead/templates/Content/Content.d.ts +0 -0
  231. /package/dist/types/{components → cjs/components}/CopyLead/templates/Content/index.d.ts +0 -0
  232. /package/dist/types/{components → cjs/components}/CopyLead/templates/Media/index.d.ts +0 -0
  233. /package/dist/types/{components → cjs/components}/CopyLead/types/copy-lead-button.d.ts +0 -0
  234. /package/dist/types/{components → cjs/components}/CopyLead/types/copy-lead-image.d.ts +0 -0
  235. /package/dist/types/{components → cjs/components}/CopyLead/types/copy-lead-transcript-link.d.ts +0 -0
  236. /package/dist/types/{components → cjs/components}/CopyLead/types/index.d.ts +0 -0
  237. /package/dist/types/{components → cjs/components}/DownloadList/index.d.ts +0 -0
  238. /package/dist/types/{components → cjs/components}/FeaturePost/components/Image/Image.d.ts +0 -0
  239. /package/dist/types/{components → cjs/components}/FeaturePost/components/Image/index.d.ts +0 -0
  240. /package/dist/types/{components → cjs/components}/FeaturePost/index.d.ts +0 -0
  241. /package/dist/types/{components → cjs/components}/FeaturePost/types/feature-post-app-button-footer.d.ts +0 -0
  242. /package/dist/types/{components → cjs/components}/FeaturePost/types/feature-post-cta-footer.d.ts +0 -0
  243. /package/dist/types/{components → cjs/components}/FeaturePost/types/feature-post-image.d.ts +0 -0
  244. /package/dist/types/{components → cjs/components}/FeaturePost/types/index.d.ts +0 -0
  245. /package/dist/types/{components → cjs/components}/Highlights/components/HighlightList/HighlightList.d.ts +0 -0
  246. /package/dist/types/{components → cjs/components}/Highlights/index.d.ts +0 -0
  247. /package/dist/types/{components → cjs/components}/PromoListing/index.d.ts +0 -0
  248. /package/dist/types/{components → cjs/components}/Quote/Quote.d.ts +0 -0
  249. /package/dist/types/{components → cjs/components}/Quote/index.d.ts +0 -0
  250. /package/dist/types/{components → cjs/components}/SectionHeading/index.d.ts +0 -0
  251. /package/dist/types/{components → cjs/components}/Statistics/Statistics.d.ts +0 -0
  252. /package/dist/types/{components → cjs/components}/Statistics/helpers/get-link-props.d.ts +0 -0
  253. /package/dist/types/{components → cjs/components}/Statistics/index.d.ts +0 -0
  254. /package/dist/types/{components → cjs/components}/Statistics/types/statistic-link.d.ts +0 -0
  255. /package/dist/types/{components → cjs/components}/Statistics/types/statistic.d.ts +0 -0
  256. /package/dist/types/{components → cjs/components}/Summary/index.d.ts +0 -0
  257. /package/dist/types/{index.d.ts → cjs/index.d.ts} +0 -0
@@ -0,0 +1,14 @@
1
+ export * from "./Accordion";
2
+ export * from "./Author";
3
+ export * from "./CopyLead";
4
+ export * from "./DownloadList";
5
+ export * from "./FeaturePost";
6
+ export * from "./Highlights";
7
+ export * from "./PromoListing";
8
+ export * from "./Quote";
9
+ export * from "./Summary";
10
+ export * from "./Statistics";
11
+ export * from "./BannerWithTabs";
12
+ export * from "./ArticleSidebar";
13
+ export * from "./ProductNavigation";
14
+ export * from "./SectionHeading";
@@ -0,0 +1 @@
1
+ export * from "./components";
@@ -0,0 +1,2 @@
1
+ import { type SVGProps } from "react";
2
+ export type ArcIcon = React.FC<SVGProps<SVGSVGElement>>;
@@ -0,0 +1,19 @@
1
+ import path from "node:path";
2
+ import fs from "node:fs";
3
+
4
+ import semverRsort from "semver/functions/rsort.js";
5
+
6
+ const changelog = fs.readFileSync("./CHANGELOG.md", "utf-8");
7
+
8
+ let contents = changelog.toString().split("\n");
9
+
10
+ const regexp =
11
+ /^##\s(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$/g;
12
+
13
+ const versions = contents
14
+ .filter((line) => line && regexp.test(line))
15
+ .map((v) => v.replace("## ", "v"));
16
+
17
+ const versionsPath = path.join("./versions.json");
18
+
19
+ fs.writeFileSync(versionsPath, JSON.stringify(semverRsort(versions)));
package/package.json CHANGED
@@ -1,57 +1,57 @@
1
1
  {
2
2
  "name": "@arc-ui/community-components",
3
- "version": "0.1.0",
3
+ "version": "1.0.0",
4
4
  "type": "module",
5
5
  "homepage": "https://ui.digital-ent-int.bt.com",
6
6
  "author": "BT Business Digital UI Team <ui-digital-ent-int@bt.com>",
7
7
  "exports": {
8
8
  ".": {
9
- "types": "./dist/types/index.d.ts",
10
- "import": "./dist/index.es.js",
11
- "require": "./dist/index.js"
9
+ "import": {
10
+ "types": "./dist/types/esm/index.d.ts",
11
+ "default": "./dist/index.es.js"
12
+ },
13
+ "require": {
14
+ "types": "./dist/types/cjs/index.d.ts",
15
+ "default": "./dist/index.js"
16
+ }
12
17
  },
13
18
  "./src": "./src/index.ts",
19
+ "./versions": "./versions.json",
14
20
  "./styles.css": "./dist/styles.css",
15
21
  "./*.css": "./dist/*/styles.css",
16
22
  "./*": {
17
- "types": "./dist/types/components/*/index.d.ts",
18
- "import": "./dist/*/*.esm.js",
19
- "require": "./dist/*/*.cjs.js"
23
+ "import": {
24
+ "types": "./dist/types/esm/components/*/index.d.ts",
25
+ "default": "./dist/*/*.esm.js"
26
+ },
27
+ "require": {
28
+ "types": "./dist/types/cjs/components/*/index.d.cts",
29
+ "default": "./dist/*/*.cjs.js"
30
+ }
20
31
  }
21
32
  },
22
33
  "publishConfig": {
23
34
  "access": "public"
24
35
  },
25
36
  "peerDependencies": {
26
- "@arc-ui/components": "12.0.0-beta.11",
27
- "@arc-ui/theme-bt-business": "12.0.0-beta.11",
28
- "@arc-ui/theme-bt-enterprise": "12.0.0-beta.11",
29
- "@arc-ui/theme-ee": "12.0.0-beta.11",
37
+ "@arc-ui/components": "12.0.0-beta.16",
38
+ "@arc-ui/themes": "12.0.0-beta.16",
30
39
  "react": "^18.0.0",
31
40
  "react-dom": "^18.0.0"
32
41
  },
33
42
  "peerDependenciesMeta": {
34
- "@arc-ui/theme-bt-enterprise": {
35
- "optional": true
36
- },
37
- "@arc-ui/theme-bt-business": {
38
- "optional": true
39
- },
40
- "@arc-ui/theme-ee": {
43
+ "@arc-ui/themes": {
41
44
  "optional": true
42
45
  }
43
46
  },
44
47
  "devDependencies": {
45
- "@arc-ui/components": "12.0.0-beta.11",
46
- "@arc-ui/icons-bt": "12.0.0-beta.11",
47
- "@arc-ui/icons-ee": "12.0.0-beta.11",
48
- "@arc-ui/theme-bt-business": "12.0.0-beta.11",
49
- "@arc-ui/theme-bt-enterprise": "12.0.0-beta.11",
50
- "@arc-ui/theme-ee": "12.0.0-beta.11",
51
- "@arc-ui/tokens-arc": "12.0.0-beta.11",
52
- "@arc-ui/tokens-bt-business": "12.0.0-beta.11",
53
- "@arc-ui/tokens-bt-enterprise": "12.0.0-beta.11",
54
- "@arc-ui/tokens-ee": "12.0.0-beta.11",
48
+ "@arc-ui/components": "12.0.0-beta.16",
49
+ "@arc-ui/icons": "12.0.0-beta.16",
50
+ "@arc-ui/themes": "12.0.0-beta.16",
51
+ "@arc-ui/tokens-arc": "12.0.0-beta.16",
52
+ "@arc-ui/tokens-bt-business": "12.0.0-beta.16",
53
+ "@arc-ui/tokens-bt-enterprise": "12.0.0-beta.16",
54
+ "@arc-ui/tokens-ee": "12.0.0-beta.16",
55
55
  "@rollup/plugin-commonjs": "^28.0.1",
56
56
  "@rollup/plugin-node-resolve": "^15.3.0",
57
57
  "@rollup/plugin-typescript": "^12.1.1",
@@ -65,17 +65,19 @@
65
65
  "react-dom": "^18.0.0",
66
66
  "rimraf": "^6.0.1",
67
67
  "rollup": "^4.27.3",
68
+ "rollup-plugin-copy": "^3.5.0",
68
69
  "rollup-plugin-delete": "^2.0.0",
69
70
  "rollup-plugin-peer-deps-external": "^2.2.4",
70
71
  "rollup-plugin-postcss": "^4.0.0",
72
+ "semver": "^7.6.3",
71
73
  "stylelint": "^16.10.0",
72
74
  "tslib": "^2.8.1",
73
75
  "typescript": "^5.6.3",
74
- "@arc-ui/community-typescript-config": "^1.0.0",
75
- "@arc-ui/community-eslint-config": "^1.0.0",
76
- "@arc-ui/community-css-config": "^1.0.0",
77
- "@arc-ui/community-build-utils": "^1.0.0",
78
- "@arc-ui/community-utils": "^1.0.0"
76
+ "@arc-ui/community-build-utils": "^0.1.0",
77
+ "@arc-ui/community-css-config": "^0.1.0",
78
+ "@arc-ui/community-eslint-config": "^0.1.0",
79
+ "@arc-ui/community-utils": "^0.1.0",
80
+ "@arc-ui/community-typescript-config": "^0.1.0"
79
81
  },
80
82
  "browserslist": [
81
83
  "defaults",
@@ -100,6 +102,7 @@
100
102
  "lint:ts": "eslint .",
101
103
  "lint:css": "stylelint '**/*.css'",
102
104
  "ts:check": "tsc --noEmit",
103
- "build": "rimraf dist && rollup -c && generate-subpath-css"
105
+ "build": "rimraf dist && rollup -c && generate-subpath-css",
106
+ "generate:versions:json": "node ./generate-versions.js"
104
107
  }
105
108
  }
package/rollup.config.js CHANGED
@@ -4,6 +4,7 @@ import resolve from "@rollup/plugin-node-resolve";
4
4
  import external from "rollup-plugin-peer-deps-external";
5
5
  import postcss from "rollup-plugin-postcss";
6
6
  import del from "rollup-plugin-delete";
7
+ import copy from "rollup-plugin-copy";
7
8
 
8
9
  import { getDirectories } from "@arc-ui/community-build-utils/get-directories";
9
10
  import { getSubPathFileMap } from "@arc-ui/community-build-utils/get-subpath-file-map";
@@ -37,7 +38,7 @@ export default [
37
38
  // file so that we can specify standard .es.js file extension.
38
39
  typescript({
39
40
  declaration: true,
40
- declarationDir: "dist/types",
41
+ declarationDir: "dist/types/cjs",
41
42
  exclude: [
42
43
  "**/__mocks__/**/*.ts",
43
44
  "**/__tests__/**/*.tsx",
@@ -63,6 +64,19 @@ export default [
63
64
  ...basePlugins,
64
65
  typescript(),
65
66
  postcss({ ...postcssConfig, extract: false }),
67
+ copy({
68
+ targets: [
69
+ // TypeScript requires 2 distinct files for ESM and CJS types. See:
70
+ // https://devblogs.microsoft.com/typescript/announcing-typescript-4-7/
71
+ // https://github.com/gxmari007/vite-plugin-eslint/pull/60
72
+ // Copy for CJS types is made in ES bundle to ensure the declaration file generated in
73
+ // the previous bundle exists.
74
+ {
75
+ src: "dist/types/cjs/*",
76
+ dest: "dist/types/esm",
77
+ },
78
+ ],
79
+ }),
66
80
  ],
67
81
  },
68
82
  // Sub path esm
@@ -34,5 +34,5 @@ export const Accordion: React.FC<AccordionProps> = ({
34
34
  };
35
35
 
36
36
  export interface AccordionProps
37
- extends SectionHeadingProps,
37
+ extends Omit<SectionHeadingProps, "isPadded">,
38
38
  AccordionDisclosureListProps {}
@@ -3,7 +3,7 @@ import React from "react";
3
3
  import {
4
4
  type DisclosureProps,
5
5
  Disclosure,
6
- } from "@arc-ui/components/dist/Disclosure";
6
+ } from "@arc-ui/components/Disclosure";
7
7
 
8
8
  export const AccordionDisclosureList: React.FC<
9
9
  AccordionDisclosureListProps
@@ -0,0 +1,35 @@
1
+ /* stylelint-disable selector-pseudo-class-no-unknown */
2
+ @import url("@arc-ui/tokens-arc/dist/custom-media.css");
3
+
4
+ .tagGroup {
5
+ display: flex;
6
+ gap: 16px;
7
+ flex-wrap: wrap;
8
+ }
9
+
10
+ .textContent {
11
+ padding-right: 16px;
12
+ }
13
+
14
+ .shareButtonContainer {
15
+ display: flex;
16
+ gap: 8px;
17
+ }
18
+
19
+ :global(.arc a).shareButton {
20
+ color: var(--sem-color-fg-secondary-light-default);
21
+ background: var(--sem-color-bg-secondary-light-default);
22
+ border: 1px solid var(--sem-color-border-secondary-light-subtle);
23
+ cursor: pointer;
24
+ border-radius: 50%;
25
+ padding: 12px;
26
+ display: block;
27
+ transition:
28
+ 0.4s ease color,
29
+ 0.4s ease border-color;
30
+ }
31
+
32
+ :global(.arc a).shareButton:hover {
33
+ color: var(--sem-color-bg-primary-light-strong);
34
+ border-color: var(--sem-color-bg-primary-light-strong);
35
+ }
@@ -0,0 +1,219 @@
1
+ import React, { useId, useState } from "react";
2
+
3
+ import { ArcIconSocialLinkedin } from "@arc-ui/icons/ArcIconSocialLinkedin";
4
+ import { ArcIconSocialX } from "@arc-ui/icons/ArcIconSocialX";
5
+ import { BtIconLink } from "@arc-ui/icons/BtIconLink";
6
+ import { BtIconEmailUnread } from "@arc-ui/icons/BtIconEmailUnread";
7
+
8
+ import { Heading } from "@arc-ui/components/Heading";
9
+ import { Icon } from "@arc-ui/components/Icon";
10
+ import { Text } from "@arc-ui/components/Text";
11
+ import { Rule } from "@arc-ui/components/Rule";
12
+ import { Link } from "@arc-ui/components/Link";
13
+ import { Tag } from "@arc-ui/components/Tag";
14
+ import { Toast, ToastNotification } from "@arc-ui/components/Toast";
15
+ import { VerticalSpace } from "@arc-ui/components/VerticalSpace";
16
+
17
+ import { Author } from "../Author";
18
+
19
+ import { type TextSection } from "./types/text-section";
20
+ import { type LinkSection } from "./types/link-section";
21
+ import { type Topic } from "./types/topic";
22
+ import { type Share } from "./types/share";
23
+ import { type ShareButton } from "./types/share-button";
24
+ import { type SidebarAuthor } from "./types/sidebar-author";
25
+
26
+ import styles from "./ArticleSidebar.module.css";
27
+
28
+ /**
29
+ * Use `ArticleSidebar` to provide additional information about the article.
30
+ */
31
+ export const ArticleSidebar: React.FC<ArticleSidebarProps> = ({
32
+ author,
33
+ aboutSection,
34
+ topics,
35
+ share,
36
+ additionalContent,
37
+ linkSection,
38
+ }) => {
39
+ const id = useId();
40
+ const [showToast, setShowToast] = useState(false);
41
+ const url = location.href;
42
+
43
+ const copyTextToClipBoard = async () => {
44
+ await navigator.clipboard.writeText(url);
45
+ setShowToast(true);
46
+ };
47
+
48
+ const shareButtons: ShareButton[] = [
49
+ {
50
+ isButton: true,
51
+ label: "Copy url to clipboard",
52
+ onClick: copyTextToClipBoard,
53
+ icon: BtIconLink,
54
+ },
55
+ {
56
+ label: "Share by email",
57
+ href: `mailto:?subject=${share.articleTitle}&body=${url}`,
58
+ icon: BtIconEmailUnread,
59
+ },
60
+ ...(share.linkedin
61
+ ? [
62
+ {
63
+ label: "Share on LinkedIn",
64
+ href: `https://www.linkedin.com/sharing/share-offsite/?url=${url}`,
65
+ icon: ArcIconSocialLinkedin,
66
+ },
67
+ ]
68
+ : []),
69
+ ...(share.x
70
+ ? [
71
+ {
72
+ label: "Share on x",
73
+ href: `https://twitter.com/intent/tweet?url=${url}`,
74
+ icon: ArcIconSocialX,
75
+ },
76
+ ]
77
+ : []),
78
+ ];
79
+
80
+ return (
81
+ <>
82
+ <div className={styles.textContent}>
83
+ {author && (
84
+ <>
85
+ <Author {...author} avatar={{ ...author.avatar, size: "xl" }} />
86
+ </>
87
+ )}
88
+
89
+ {aboutSection && (
90
+ <>
91
+ <VerticalSpace size="32" />
92
+ <Heading level={aboutSection.headingLevel}>
93
+ {aboutSection.heading}
94
+ </Heading>
95
+ <VerticalSpace size="16" />
96
+
97
+ <Text size="s">{aboutSection.content}</Text>
98
+ </>
99
+ )}
100
+
101
+ {additionalContent &&
102
+ additionalContent.map(({ heading, headingLevel, content }) => (
103
+ <>
104
+ <VerticalSpace size="16" />
105
+ <Heading level={headingLevel} size="xxs">
106
+ {heading}
107
+ </Heading>
108
+ <Text size="s">{content}</Text>
109
+ </>
110
+ ))}
111
+ </div>
112
+
113
+ {(author || aboutSection || additionalContent) && (
114
+ <div data-testid="content-rule">
115
+ <VerticalSpace size="32" />
116
+ <Rule />
117
+ <VerticalSpace size="32" />
118
+ </div>
119
+ )}
120
+
121
+ <Heading level={linkSection.headingLevel}>{linkSection.heading}</Heading>
122
+
123
+ {linkSection.links.map(({ text, url }) => (
124
+ <>
125
+ <VerticalSpace size="8" />
126
+ <div key={`${id}-${url}`}>
127
+ <Link size="s" href={url}>
128
+ {text}
129
+ </Link>
130
+ </div>
131
+ </>
132
+ ))}
133
+
134
+ <VerticalSpace size="32" />
135
+
136
+ {topics && (
137
+ <>
138
+ <Heading level={topics.headingLevel}>{topics.heading}</Heading>
139
+
140
+ <VerticalSpace size="16" />
141
+
142
+ <div className={styles.tagGroup}>
143
+ {topics.tags.map((tag) => (
144
+ <Tag key={`${id}-${tag.title}`} {...tag} />
145
+ ))}
146
+ </div>
147
+
148
+ <VerticalSpace size="32" />
149
+ </>
150
+ )}
151
+
152
+ <Rule />
153
+
154
+ <VerticalSpace size="32" />
155
+
156
+ <Heading level={share.headingLevel}>{share.heading}</Heading>
157
+
158
+ <VerticalSpace size="16" />
159
+
160
+ <div className={styles.shareButtonContainer}>
161
+ {shareButtons.map(({ isButton, label, href, icon, onClick }) => (
162
+ <a
163
+ key={`${id}-${label}`}
164
+ role={isButton ? "button" : undefined}
165
+ target="_blank"
166
+ rel="noreferrer"
167
+ className={styles.shareButton}
168
+ aria-label={label}
169
+ href={href}
170
+ onClick={onClick}
171
+ >
172
+ <Icon icon={icon} size={24} />
173
+ </a>
174
+ ))}
175
+ </div>
176
+
177
+ <Toast>
178
+ <ToastNotification
179
+ status="success"
180
+ title="Copied to clipboard"
181
+ isOpen={showToast}
182
+ onOpenChange={() => setShowToast(false)}
183
+ />
184
+ </Toast>
185
+ </>
186
+ );
187
+ };
188
+
189
+ export interface ArticleSidebarProps {
190
+ /**
191
+ * Props for Author component.
192
+ */
193
+ author?: SidebarAuthor;
194
+
195
+ /**
196
+ * Content for the about section.
197
+ */
198
+ aboutSection?: TextSection;
199
+
200
+ /**
201
+ * Array of headings and text for additional text sections.
202
+ */
203
+ additionalContent?: TextSection[];
204
+
205
+ /**
206
+ * Links that are relevant to the article.
207
+ */
208
+ linkSection: LinkSection;
209
+
210
+ /**
211
+ * Topics rendered as tags that are relevant to the article.
212
+ */
213
+ topics?: Topic;
214
+
215
+ /**
216
+ * Sharing options for the article.
217
+ */
218
+ share: Share;
219
+ }
@@ -0,0 +1 @@
1
+ export { ArticleSidebar, type ArticleSidebarProps } from "./ArticleSidebar";
@@ -0,0 +1,12 @@
1
+ import { type HeadingLevel } from "@arc-ui/components/dist/Heading";
2
+
3
+ interface Link {
4
+ text: string;
5
+ url: string;
6
+ }
7
+
8
+ export interface LinkSection {
9
+ heading: string;
10
+ links: Link[];
11
+ headingLevel?: HeadingLevel;
12
+ }
@@ -0,0 +1,9 @@
1
+ import { type ArcIcon } from "../../../types/arc-icon";
2
+
3
+ export interface ShareButton {
4
+ label: string;
5
+ icon: ArcIcon | React.ReactElement<SVGElement>;
6
+ isButton?: boolean;
7
+ href?: string;
8
+ onClick?: () => void;
9
+ }
@@ -0,0 +1,9 @@
1
+ import { type HeadingLevel } from "@arc-ui/components/dist/Heading";
2
+
3
+ export interface Share {
4
+ heading: string;
5
+ articleTitle: string;
6
+ x?: boolean;
7
+ headingLevel?: HeadingLevel;
8
+ linkedin?: boolean;
9
+ }
@@ -0,0 +1,5 @@
1
+ import { type AuthorProps } from "../../Author";
2
+
3
+ export interface SidebarAuthor extends AuthorProps {
4
+ avatar?: Omit<NonNullable<AuthorProps["avatar"]>, "size">;
5
+ }
@@ -0,0 +1,7 @@
1
+ import { type HeadingLevel } from "@arc-ui/components/dist/Heading";
2
+
3
+ export interface TextSection {
4
+ heading: string;
5
+ content: string;
6
+ headingLevel?: HeadingLevel;
7
+ }
@@ -0,0 +1,8 @@
1
+ import { type HeadingLevel } from "@arc-ui/components/dist/Heading";
2
+ import { type TagProps } from "@arc-ui/components/dist/types/components/Tag/Tag";
3
+
4
+ export interface Topic {
5
+ heading: string;
6
+ tags: TagProps[];
7
+ headingLevel?: HeadingLevel;
8
+ }
@@ -2,10 +2,10 @@ import React from "react";
2
2
 
3
3
  import { filterDataAttrs } from "@arc-ui/community-utils/filter-data-attrs";
4
4
 
5
- import { Grid } from "@arc-ui/components/dist/Grid";
6
- import { type AvatarProps, Avatar } from "@arc-ui/components/dist/Avatar";
7
- import { Heading } from "@arc-ui/components/dist/Heading";
8
- import { Text } from "@arc-ui/components/dist/Text";
5
+ import { Grid, GridRow, GridCol } from "@arc-ui/components/Grid";
6
+ import { type AvatarProps, Avatar } from "@arc-ui/components/Avatar";
7
+ import { Heading } from "@arc-ui/components/Heading";
8
+ import { Text } from "@arc-ui/components/Text";
9
9
 
10
10
  import styles from "./Author.module.css";
11
11
 
@@ -23,13 +23,13 @@ export const Author: React.FC<AuthorProps> = ({
23
23
  return (
24
24
  <div {...filterDataAttrs(props)}>
25
25
  <Grid isFluid isGutterless>
26
- <Grid.Row align="center">
27
- <Grid.Col xs={isLargeAvatar ? 12 : "auto"}>
26
+ <GridRow align="center">
27
+ <GridCol xs={isLargeAvatar ? 12 : "auto"}>
28
28
  <div className={isLargeAvatar ? styles.largeAvatar : undefined}>
29
29
  <Avatar {...avatar} />
30
30
  </div>
31
- </Grid.Col>
32
- <Grid.Col>
31
+ </GridCol>
32
+ <GridCol>
33
33
  <div
34
34
  className={`${!isLargeAvatar && styles.authorContent}`}
35
35
  data-testid="authorContent"
@@ -37,8 +37,8 @@ export const Author: React.FC<AuthorProps> = ({
37
37
  <Heading size="xs">{name}</Heading>
38
38
  <Text size="s">{title}</Text>
39
39
  </div>
40
- </Grid.Col>
41
- </Grid.Row>
40
+ </GridCol>
41
+ </GridRow>
42
42
  </Grid>
43
43
  </div>
44
44
  );
@@ -17,3 +17,25 @@
17
17
  display: none;
18
18
  }
19
19
  }
20
+
21
+ .bannerWithTabsHeadingCentered {
22
+ text-align: center;
23
+ }
24
+
25
+ @media (--arc-custom-media-min-width-s-px) {
26
+ .bannerWithTabsHeadingCentered {
27
+ padding-inline: 62px;
28
+ }
29
+ }
30
+
31
+ @media (--arc-custom-media-min-width-m-px) {
32
+ .bannerWithTabsHeadingCentered {
33
+ padding-inline: 86px;
34
+ }
35
+ }
36
+
37
+ @media (--arc-custom-media-min-width-l-px) {
38
+ .bannerWithTabsHeadingCentered {
39
+ padding-inline: 104px;
40
+ }
41
+ }