@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.
- package/.turbo/turbo-build.log +127 -7
- package/CHANGELOG.md +22 -0
- package/dist/Accordion/Accordion.cjs.js +9 -9
- package/dist/Accordion/Accordion.esm.js +7 -7
- package/dist/ArticleSidebar/ArticleSidebar.cjs.js +185 -0
- package/dist/ArticleSidebar/ArticleSidebar.esm.js +183 -0
- package/dist/ArticleSidebar/styles.css +1 -0
- package/dist/Author/Author.cjs.js +6 -7
- package/dist/Author/Author.esm.js +6 -7
- package/dist/BannerWithTabs/BannerWithTabs.cjs.js +15 -25
- package/dist/BannerWithTabs/BannerWithTabs.esm.js +16 -26
- package/dist/BannerWithTabs/styles.css +1 -1
- package/dist/CopyLead/CopyLead.cjs.js +25 -27
- package/dist/CopyLead/CopyLead.esm.js +15 -17
- package/dist/DownloadList/DownloadList.cjs.js +10 -9
- package/dist/DownloadList/DownloadList.esm.js +9 -8
- package/dist/FeaturePost/FeaturePost.cjs.js +28 -31
- package/dist/FeaturePost/FeaturePost.esm.js +21 -24
- package/dist/Highlights/Highlights.cjs.js +10 -10
- package/dist/Highlights/Highlights.esm.js +10 -10
- package/dist/ProductNavigation/ProductNavigation.cjs.js +86 -0
- package/dist/ProductNavigation/ProductNavigation.esm.js +84 -0
- package/dist/ProductNavigation/styles.css +1 -0
- package/dist/PromoListing/PromoListing.cjs.js +17 -17
- package/dist/PromoListing/PromoListing.esm.js +13 -13
- package/dist/Quote/Quote.cjs.js +8 -9
- package/dist/Quote/Quote.esm.js +6 -7
- package/dist/SectionHeading/SectionHeading.cjs.js +6 -6
- package/dist/SectionHeading/SectionHeading.esm.js +6 -6
- package/dist/SectionHeading/styles.css +1 -1
- package/dist/Statistics/Statistics.cjs.js +14 -14
- package/dist/Statistics/Statistics.esm.js +13 -13
- package/dist/Summary/Summary.cjs.js +7 -7
- package/dist/Summary/Summary.esm.js +7 -7
- package/dist/_shared/cjs/{Author-CAo-qryZ.js → Author-BXxxwh6E.js} +11 -12
- package/dist/_shared/cjs/SectionHeading-7IxNz67p.js +29 -0
- package/dist/_shared/cjs/filter-data-attrs-DlS_Fyr9.js +112 -0
- package/dist/_shared/cjs/{index.es-X428Cm3N.js → index.es-HAMLJhPd.js} +1 -1
- package/dist/_shared/esm/{Author-Bx-cE9Pz.js → Author-B8tJxqB8.js} +8 -9
- package/dist/_shared/esm/SectionHeading-Dz0GfXsP.js +27 -0
- package/dist/_shared/esm/filter-data-attrs-DAx-HNG5.js +106 -0
- package/dist/_shared/esm/{index.es-BzmvPxje.js → index.es-BI7la-9v.js} +2 -2
- package/dist/index.es.js +399 -127
- package/dist/index.es.js.map +1 -1
- package/dist/index.js +400 -125
- package/dist/index.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/types/{components → cjs/components}/Accordion/Accordion.d.ts +1 -1
- package/dist/types/{components → cjs/components}/Accordion/components/AccordionDisclosureList/AccordionDisclosureList.d.ts +1 -1
- package/dist/types/cjs/components/ArticleSidebar/ArticleSidebar.d.ts +36 -0
- package/dist/types/cjs/components/ArticleSidebar/index.d.ts +1 -0
- package/dist/types/cjs/components/ArticleSidebar/types/link-section.d.ts +11 -0
- package/dist/types/cjs/components/ArticleSidebar/types/share-button.d.ts +8 -0
- package/dist/types/cjs/components/ArticleSidebar/types/share.d.ts +8 -0
- package/dist/types/cjs/components/ArticleSidebar/types/sidebar-author.d.ts +4 -0
- package/dist/types/cjs/components/ArticleSidebar/types/text-section.d.ts +6 -0
- package/dist/types/cjs/components/ArticleSidebar/types/topic.d.ts +7 -0
- package/dist/types/{components → cjs/components}/Author/Author.d.ts +1 -1
- package/dist/types/cjs/components/BannerWithTabs/BannerWithTabs.d.ts +42 -0
- package/dist/types/{components → cjs/components}/CopyLead/components/MediaContent/MediaContent.d.ts +1 -1
- package/dist/types/{components → cjs/components}/CopyLead/templates/Media/Media.d.ts +2 -2
- package/dist/types/cjs/components/CopyLead/types/copy-lead-list-item.d.ts +6 -0
- package/dist/types/cjs/components/DownloadList/DownloadList.d.ts +7 -0
- package/dist/types/{components → cjs/components}/FeaturePost/FeaturePost.d.ts +2 -2
- package/dist/types/{components → cjs/components}/FeaturePost/components/MediaContent/MediaContent.d.ts +1 -1
- package/dist/types/{components → cjs/components}/Highlights/Highlights.d.ts +1 -1
- package/dist/types/{components → cjs/components}/Highlights/components/HighlightItem/HighlightItem.d.ts +3 -5
- package/dist/types/cjs/components/Highlights/types/highlight-link.d.ts +5 -0
- package/dist/types/cjs/components/Highlights/types/highlight-list-item.d.ts +8 -0
- package/dist/types/{components → cjs/components}/Highlights/types/index.d.ts +1 -0
- package/dist/types/cjs/components/ProductNavigation/ProductNavigation.d.ts +49 -0
- package/dist/types/cjs/components/ProductNavigation/index.d.ts +2 -0
- package/dist/types/cjs/components/ProductNavigation/types/index.d.ts +1 -0
- package/dist/types/cjs/components/ProductNavigation/types/product-list.d.ts +6 -0
- package/dist/types/{components → cjs/components}/PromoListing/PromoListing.d.ts +5 -5
- package/dist/types/{components → cjs/components}/SectionHeading/SectionHeading.d.ts +6 -1
- package/dist/types/{components → cjs/components}/Summary/Summary.d.ts +1 -1
- package/dist/types/cjs/components/index.d.ts +14 -0
- package/dist/types/cjs/types/arc-icon.d.ts +2 -0
- package/dist/types/esm/components/Accordion/Accordion.d.ts +9 -0
- package/dist/types/esm/components/Accordion/components/AccordionDisclosureList/AccordionDisclosureList.d.ts +9 -0
- package/dist/types/esm/components/Accordion/index.d.ts +1 -0
- package/dist/types/esm/components/ArticleSidebar/ArticleSidebar.d.ts +36 -0
- package/dist/types/esm/components/ArticleSidebar/index.d.ts +1 -0
- package/dist/types/esm/components/ArticleSidebar/types/link-section.d.ts +11 -0
- package/dist/types/esm/components/ArticleSidebar/types/share-button.d.ts +8 -0
- package/dist/types/esm/components/ArticleSidebar/types/share.d.ts +8 -0
- package/dist/types/esm/components/ArticleSidebar/types/sidebar-author.d.ts +4 -0
- package/dist/types/esm/components/ArticleSidebar/types/text-section.d.ts +6 -0
- package/dist/types/esm/components/ArticleSidebar/types/topic.d.ts +7 -0
- package/dist/types/esm/components/Author/Author.d.ts +17 -0
- package/dist/types/esm/components/Author/index.d.ts +1 -0
- package/dist/types/esm/components/BannerWithTabs/BannerWithTabs.d.ts +42 -0
- package/dist/types/esm/components/BannerWithTabs/index.d.ts +1 -0
- package/dist/types/esm/components/CopyLead/CopyLead.d.ts +42 -0
- package/dist/types/esm/components/CopyLead/components/Button/Button.d.ts +3 -0
- package/dist/types/esm/components/CopyLead/components/Button/index.d.ts +1 -0
- package/dist/types/esm/components/CopyLead/components/Column/Column.d.ts +6 -0
- package/dist/types/esm/components/CopyLead/components/Column/index.d.ts +1 -0
- package/dist/types/esm/components/CopyLead/components/Container/Container.d.ts +9 -0
- package/dist/types/esm/components/CopyLead/components/Container/index.d.ts +1 -0
- package/dist/types/esm/components/CopyLead/components/IconList/IconList.d.ts +8 -0
- package/dist/types/esm/components/CopyLead/components/IconList/index.d.ts +1 -0
- package/dist/types/esm/components/CopyLead/components/Image/Image.d.ts +3 -0
- package/dist/types/esm/components/CopyLead/components/Image/index.d.ts +1 -0
- package/dist/types/esm/components/CopyLead/components/MediaContent/MediaContent.d.ts +9 -0
- package/dist/types/esm/components/CopyLead/components/MediaContent/index.d.ts +1 -0
- package/dist/types/esm/components/CopyLead/index.d.ts +1 -0
- package/dist/types/esm/components/CopyLead/templates/Content/Content.d.ts +10 -0
- package/dist/types/esm/components/CopyLead/templates/Content/index.d.ts +1 -0
- package/dist/types/esm/components/CopyLead/templates/Media/Media.d.ts +16 -0
- package/dist/types/esm/components/CopyLead/templates/Media/index.d.ts +1 -0
- package/dist/types/esm/components/CopyLead/types/copy-lead-button.d.ts +2 -0
- package/dist/types/esm/components/CopyLead/types/copy-lead-image.d.ts +4 -0
- package/dist/types/esm/components/CopyLead/types/copy-lead-list-item.d.ts +6 -0
- package/dist/types/esm/components/CopyLead/types/copy-lead-transcript-link.d.ts +6 -0
- package/dist/types/esm/components/CopyLead/types/index.d.ts +4 -0
- package/dist/types/esm/components/DownloadList/DownloadList.d.ts +7 -0
- package/dist/types/esm/components/DownloadList/index.d.ts +1 -0
- package/dist/types/esm/components/FeaturePost/FeaturePost.d.ts +45 -0
- package/dist/types/esm/components/FeaturePost/components/Image/Image.d.ts +3 -0
- package/dist/types/esm/components/FeaturePost/components/Image/index.d.ts +1 -0
- package/dist/types/esm/components/FeaturePost/components/MediaContent/MediaContent.d.ts +15 -0
- package/dist/types/esm/components/FeaturePost/index.d.ts +1 -0
- package/dist/types/esm/components/FeaturePost/types/feature-post-app-button-footer.d.ts +6 -0
- package/dist/types/esm/components/FeaturePost/types/feature-post-cta-footer.d.ts +7 -0
- package/dist/types/esm/components/FeaturePost/types/feature-post-image.d.ts +4 -0
- package/dist/types/esm/components/FeaturePost/types/index.d.ts +3 -0
- package/dist/types/esm/components/Highlights/Highlights.d.ts +17 -0
- package/dist/types/esm/components/Highlights/components/HighlightItem/HighlightItem.d.ts +12 -0
- package/dist/types/esm/components/Highlights/components/HighlightList/HighlightList.d.ts +9 -0
- package/dist/types/esm/components/Highlights/index.d.ts +1 -0
- package/dist/types/esm/components/Highlights/types/highlight-link.d.ts +5 -0
- package/dist/types/esm/components/Highlights/types/highlight-list-item.d.ts +8 -0
- package/dist/types/esm/components/Highlights/types/index.d.ts +2 -0
- package/dist/types/esm/components/ProductNavigation/ProductNavigation.d.ts +49 -0
- package/dist/types/esm/components/ProductNavigation/index.d.ts +2 -0
- package/dist/types/esm/components/ProductNavigation/types/index.d.ts +1 -0
- package/dist/types/esm/components/ProductNavigation/types/product-list.d.ts +6 -0
- package/dist/types/esm/components/PromoListing/PromoListing.d.ts +38 -0
- package/dist/types/esm/components/PromoListing/index.d.ts +1 -0
- package/dist/types/esm/components/Quote/Quote.d.ts +11 -0
- package/dist/types/esm/components/Quote/index.d.ts +1 -0
- package/dist/types/esm/components/SectionHeading/SectionHeading.d.ts +30 -0
- package/dist/types/esm/components/SectionHeading/index.d.ts +1 -0
- package/dist/types/esm/components/Statistics/Statistics.d.ts +7 -0
- package/dist/types/esm/components/Statistics/helpers/get-link-props.d.ts +2 -0
- package/dist/types/esm/components/Statistics/index.d.ts +1 -0
- package/dist/types/esm/components/Statistics/types/statistic-link.d.ts +6 -0
- package/dist/types/esm/components/Statistics/types/statistic.d.ts +8 -0
- package/dist/types/esm/components/Summary/Summary.d.ts +18 -0
- package/dist/types/esm/components/Summary/index.d.ts +1 -0
- package/dist/types/esm/components/index.d.ts +14 -0
- package/dist/types/esm/index.d.ts +1 -0
- package/dist/types/esm/types/arc-icon.d.ts +2 -0
- package/generate-versions.js +19 -0
- package/package.json +37 -34
- package/rollup.config.js +15 -1
- package/src/components/Accordion/Accordion.tsx +1 -1
- package/src/components/Accordion/components/AccordionDisclosureList/AccordionDisclosureList.tsx +1 -1
- package/src/components/ArticleSidebar/ArticleSidebar.module.css +35 -0
- package/src/components/ArticleSidebar/ArticleSidebar.tsx +219 -0
- package/src/components/ArticleSidebar/index.ts +1 -0
- package/src/components/ArticleSidebar/types/link-section.ts +12 -0
- package/src/components/ArticleSidebar/types/share-button.ts +9 -0
- package/src/components/ArticleSidebar/types/share.ts +9 -0
- package/src/components/ArticleSidebar/types/sidebar-author.ts +5 -0
- package/src/components/ArticleSidebar/types/text-section.ts +7 -0
- package/src/components/ArticleSidebar/types/topic.ts +8 -0
- package/src/components/Author/Author.tsx +10 -10
- package/src/components/BannerWithTabs/BannerWithTabs.module.css +22 -0
- package/src/components/BannerWithTabs/BannerWithTabs.tsx +65 -51
- package/src/components/CopyLead/CopyLead.tsx +1 -1
- package/src/components/CopyLead/components/Button/Button.tsx +1 -1
- package/src/components/CopyLead/components/IconList/IconList.tsx +4 -4
- package/src/components/CopyLead/components/Image/Image.tsx +2 -4
- package/src/components/CopyLead/components/MediaContent/MediaContent.tsx +3 -3
- package/src/components/CopyLead/templates/Content/Content.tsx +1 -1
- package/src/components/CopyLead/templates/Media/Media.tsx +7 -7
- package/src/components/CopyLead/types/copy-lead-list-item.ts +2 -2
- package/src/components/DownloadList/DownloadList.tsx +10 -13
- package/src/components/FeaturePost/FeaturePost.tsx +20 -20
- package/src/components/FeaturePost/components/Image/Image.tsx +2 -4
- package/src/components/FeaturePost/components/MediaContent/MediaContent.tsx +2 -2
- package/src/components/Highlights/Highlights.tsx +2 -2
- package/src/components/Highlights/components/HighlightItem/HighlightItem.tsx +11 -11
- package/src/components/Highlights/types/highlight-link.ts +5 -0
- package/src/components/Highlights/types/highlight-list-item.ts +3 -5
- package/src/components/Highlights/types/index.ts +1 -0
- package/src/components/ProductNavigation/ProductNavigation.module.css +51 -0
- package/src/components/ProductNavigation/ProductNavigation.tsx +200 -0
- package/src/components/ProductNavigation/index.ts +5 -0
- package/src/components/ProductNavigation/types/index.ts +1 -0
- package/src/components/ProductNavigation/types/product-list.ts +10 -0
- package/src/components/PromoListing/PromoListing.tsx +8 -10
- package/src/components/SectionHeading/SectionHeading.module.css +13 -1
- package/src/components/SectionHeading/SectionHeading.tsx +24 -7
- package/src/components/Statistics/Statistics.tsx +14 -14
- package/src/components/Summary/Summary.tsx +6 -6
- package/src/components/index.ts +14 -11
- package/src/types/arc-icon.ts +2 -0
- package/versions.json +1 -0
- package/dist/_shared/cjs/SectionHeading-L2EpTQ79.js +0 -25
- package/dist/_shared/cjs/filter-data-attrs-ajtUvDAC.js +0 -15
- package/dist/_shared/cjs/tslib.es6-DBA0GFPJ.js +0 -48
- package/dist/_shared/esm/SectionHeading-C70XNhqJ.js +0 -23
- package/dist/_shared/esm/filter-data-attrs-V7cbJuwS.js +0 -13
- package/dist/_shared/esm/tslib.es6-Cv15O4Nx.js +0 -46
- package/dist/types/components/BannerWithTabs/BannerWithTabs.d.ts +0 -17
- package/dist/types/components/CopyLead/types/copy-lead-list-item.d.ts +0 -6
- package/dist/types/components/DownloadList/DownloadList.d.ts +0 -10
- package/dist/types/components/Highlights/types/highlight-list-item.d.ts +0 -10
- package/dist/types/components/index.d.ts +0 -11
- /package/dist/types/{components → cjs/components}/Accordion/index.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/Author/index.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/BannerWithTabs/index.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/CopyLead/CopyLead.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/CopyLead/components/Button/Button.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/CopyLead/components/Button/index.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/CopyLead/components/Column/Column.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/CopyLead/components/Column/index.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/CopyLead/components/Container/Container.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/CopyLead/components/Container/index.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/CopyLead/components/IconList/IconList.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/CopyLead/components/IconList/index.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/CopyLead/components/Image/Image.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/CopyLead/components/Image/index.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/CopyLead/components/MediaContent/index.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/CopyLead/index.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/CopyLead/templates/Content/Content.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/CopyLead/templates/Content/index.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/CopyLead/templates/Media/index.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/CopyLead/types/copy-lead-button.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/CopyLead/types/copy-lead-image.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/CopyLead/types/copy-lead-transcript-link.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/CopyLead/types/index.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/DownloadList/index.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/FeaturePost/components/Image/Image.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/FeaturePost/components/Image/index.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/FeaturePost/index.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/FeaturePost/types/feature-post-app-button-footer.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/FeaturePost/types/feature-post-cta-footer.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/FeaturePost/types/feature-post-image.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/FeaturePost/types/index.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/Highlights/components/HighlightList/HighlightList.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/Highlights/index.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/PromoListing/index.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/Quote/Quote.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/Quote/index.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/SectionHeading/index.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/Statistics/Statistics.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/Statistics/helpers/get-link-props.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/Statistics/index.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/Statistics/types/statistic-link.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/Statistics/types/statistic.d.ts +0 -0
- /package/dist/types/{components → cjs/components}/Summary/index.d.ts +0 -0
- /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,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": "
|
|
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
|
-
"
|
|
10
|
-
|
|
11
|
-
|
|
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
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
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.
|
|
27
|
-
"@arc-ui/
|
|
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/
|
|
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.
|
|
46
|
-
"@arc-ui/icons
|
|
47
|
-
"@arc-ui/
|
|
48
|
-
"@arc-ui/
|
|
49
|
-
"@arc-ui/
|
|
50
|
-
"@arc-ui/
|
|
51
|
-
"@arc-ui/tokens-
|
|
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-
|
|
75
|
-
"@arc-ui/community-
|
|
76
|
-
"@arc-ui/community-
|
|
77
|
-
"@arc-ui/community-
|
|
78
|
-
"@arc-ui/community-
|
|
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
|
|
@@ -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";
|
|
@@ -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/
|
|
6
|
-
import { type AvatarProps, Avatar } from "@arc-ui/components/
|
|
7
|
-
import { Heading } from "@arc-ui/components/
|
|
8
|
-
import { Text } from "@arc-ui/components/
|
|
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
|
-
<
|
|
27
|
-
<
|
|
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
|
-
</
|
|
32
|
-
<
|
|
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
|
-
</
|
|
41
|
-
</
|
|
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
|
+
}
|