@arc-ui/community-components 3.2.0 → 3.3.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 (97) hide show
  1. package/.turbo/turbo-build.log +10 -10
  2. package/CHANGELOG.md +19 -0
  3. package/lib/Accordion/Accordion.cjs +2 -3
  4. package/lib/Accordion/Accordion.mjs +2 -3
  5. package/lib/ActionTile/ActionTile.cjs +4 -5
  6. package/lib/ActionTile/ActionTile.mjs +2 -3
  7. package/lib/ActionTile/styles.css +1 -1
  8. package/lib/ArticleSidebar/ArticleSidebar.cjs +9 -10
  9. package/lib/ArticleSidebar/ArticleSidebar.mjs +4 -5
  10. package/lib/Author/Author.cjs +2 -3
  11. package/lib/Author/Author.mjs +2 -3
  12. package/lib/BannerWithTabs/BannerWithTabs.cjs +4 -5
  13. package/lib/BannerWithTabs/BannerWithTabs.mjs +4 -5
  14. package/lib/ContentInfoWidget/ContentInfoWidget.cjs +3 -2
  15. package/lib/ContentInfoWidget/ContentInfoWidget.mjs +3 -2
  16. package/lib/CopyLead/CopyLead.cjs +14 -15
  17. package/lib/CopyLead/CopyLead.mjs +2 -3
  18. package/lib/DownloadList/DownloadList.cjs +6 -8
  19. package/lib/DownloadList/DownloadList.mjs +6 -8
  20. package/lib/FAQs/FAQs.cjs +5 -6
  21. package/lib/FAQs/FAQs.mjs +3 -4
  22. package/lib/FeaturePost/FeaturePost.cjs +13 -14
  23. package/lib/FeaturePost/FeaturePost.mjs +5 -6
  24. package/lib/Highlights/Highlights.cjs +11 -12
  25. package/lib/Highlights/Highlights.mjs +11 -12
  26. package/lib/InlineLinkGroup/InlineLinkGroup.cjs +25 -0
  27. package/lib/InlineLinkGroup/InlineLinkGroup.mjs +23 -0
  28. package/lib/InlineLinkGroup/styles.css +1 -0
  29. package/lib/LinkTile/LinkTile.cjs +6 -6
  30. package/lib/LinkTile/LinkTile.mjs +4 -4
  31. package/lib/LinkTile/styles.css +1 -1
  32. package/lib/ProductNavigation/ProductNavigation.cjs +5 -6
  33. package/lib/ProductNavigation/ProductNavigation.mjs +2 -3
  34. package/lib/PromoListing/PromoListing.cjs +6 -7
  35. package/lib/PromoListing/PromoListing.mjs +4 -5
  36. package/lib/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.cjs +6 -7
  37. package/lib/PromoListingThumbnailSignpost/PromoListingThumbnailSignpost.mjs +3 -4
  38. package/lib/Quote/Quote.cjs +5 -6
  39. package/lib/Quote/Quote.mjs +3 -4
  40. package/lib/SectionHeading/SectionHeading.cjs +2 -3
  41. package/lib/SectionHeading/SectionHeading.mjs +2 -3
  42. package/lib/Statistics/Statistics.cjs +21 -19
  43. package/lib/Statistics/Statistics.mjs +21 -19
  44. package/lib/Statistics/styles.css +1 -1
  45. package/lib/Summary/Summary.cjs +3 -3
  46. package/lib/Summary/Summary.mjs +3 -3
  47. package/lib/ThumbnailSignpost/ThumbnailSignpost.cjs +2 -3
  48. package/lib/ThumbnailSignpost/ThumbnailSignpost.mjs +2 -3
  49. package/lib/_shared/cjs/{Accordion-DfNGOjTm.cjs → Accordion-QqDoB3pY.cjs} +8 -9
  50. package/lib/_shared/cjs/{Author-D4dKNQem.cjs → Author-aL8YXi7C.cjs} +4 -5
  51. package/lib/_shared/cjs/{SectionHeading-DeSFM0HV.cjs → SectionHeading-Dj-dJfv3.cjs} +4 -5
  52. package/lib/_shared/cjs/{ThumbnailSignpost-GkOiwt-Z.cjs → ThumbnailSignpost-SBnrGooA.cjs} +4 -5
  53. package/lib/_shared/cjs/{tslib.es6-BxB9I209.cjs → filter-attrs-C26zOt4_.cjs} +25 -0
  54. package/lib/_shared/esm/{Accordion-cd1oYvBv.mjs → Accordion-DrOTh90S.mjs} +1 -2
  55. package/lib/_shared/esm/{Author-HnYsFTPT.mjs → Author-BVCRPgkl.mjs} +1 -2
  56. package/lib/_shared/esm/{SectionHeading-CpDLCndw.mjs → SectionHeading-DZOg_gYi.mjs} +1 -2
  57. package/lib/_shared/esm/{ThumbnailSignpost-BeRiXbUp.mjs → ThumbnailSignpost-DaZByYIH.mjs} +1 -2
  58. package/lib/_shared/esm/{tslib.es6-D6Wu-xwB.mjs → filter-attrs-D-1kWaCP.mjs} +25 -1
  59. package/lib/index.cjs +75 -83
  60. package/lib/index.cjs.map +1 -1
  61. package/lib/index.d.cts +24 -63
  62. package/lib/index.d.mts +24 -63
  63. package/lib/index.mjs +75 -83
  64. package/lib/index.mjs.map +1 -1
  65. package/lib/styles.css +1 -1
  66. package/package.json +4 -4
  67. package/src/components/ActionTile/ActionTile.module.css +56 -37
  68. package/src/components/ActionTile/ActionTile.tsx +1 -1
  69. package/src/components/ArticleSidebar/ArticleSidebar.tsx +4 -6
  70. package/src/components/Author/Author.tsx +0 -3
  71. package/src/components/BannerWithTabs/BannerWithTabs.tsx +4 -6
  72. package/src/components/ContentInfoWidget/ContentInfoWidget.tsx +3 -4
  73. package/src/components/DownloadList/DownloadList.tsx +8 -8
  74. package/src/components/FeaturePost/FeaturePost.tsx +3 -7
  75. package/src/components/Highlights/Highlights.tsx +3 -2
  76. package/src/components/Highlights/components/HighlightItem/HighlightItem.tsx +3 -2
  77. package/src/components/Highlights/components/HighlightList/HighlightList.tsx +5 -2
  78. package/src/components/InlineLinkGroup/InlineLinkGroup.module.css +81 -0
  79. package/src/components/InlineLinkGroup/InlineLinkGroup.tsx +67 -0
  80. package/src/components/InlineLinkGroup/index.ts +5 -0
  81. package/src/components/LinkTile/LinkTile.module.css +62 -26
  82. package/src/components/LinkTile/LinkTile.tsx +8 -1
  83. package/src/components/PromoListing/PromoListing.tsx +3 -11
  84. package/src/components/Quote/Quote.tsx +1 -7
  85. package/src/components/Statistics/Statistics.module.css +0 -10
  86. package/src/components/Statistics/Statistics.tsx +35 -32
  87. package/src/components/Summary/Summary.tsx +3 -1
  88. package/src/components/index.ts +1 -1
  89. package/versions.json +1 -1
  90. package/lib/HeroLink/HeroLink.cjs +0 -35
  91. package/lib/HeroLink/HeroLink.mjs +0 -33
  92. package/lib/HeroLink/styles.css +0 -1
  93. package/lib/_shared/cjs/filter-attrs-BizjMsy0.cjs +0 -27
  94. package/lib/_shared/esm/filter-attrs-DZ7RCEZm.mjs +0 -25
  95. package/src/components/HeroLink/HeroLink.module.css +0 -44
  96. package/src/components/HeroLink/HeroLink.tsx +0 -136
  97. package/src/components/HeroLink/index.ts +0 -2
@@ -0,0 +1,67 @@
1
+ import React from "react";
2
+ import { Link } from "@arc-ui/components/Link";
3
+ import { Icon } from "@arc-ui/components/Icon";
4
+ import { Heading } from "@arc-ui/components/Heading";
5
+ import { BtIconArrowAltRight } from "@arc-ui/icons/BtIconArrowAltRight";
6
+ import { filterAttrs } from "@arc-ui/community-utils/filter-attrs";
7
+ import styles from "./InlineLinkGroup.module.css";
8
+
9
+ export const InlineLinkGroup: React.FC<InlineLinkGroupProps> = ({
10
+ label,
11
+ links,
12
+ ...props
13
+ }) => {
14
+ return (
15
+ <div className={styles["quick-help"]} {...filterAttrs(props)}>
16
+ {label && (
17
+ <div className={styles["quick-help-label"]}>
18
+ <Heading size="xxs" fontStyle="overline">
19
+ {label}
20
+ </Heading>
21
+ </div>
22
+ )}
23
+
24
+ <ul className={styles["quick-help-container"]}>
25
+ {links.map((link, index) => (
26
+ <React.Fragment key={index}>
27
+ <li className={styles["quick-help-item"]}>
28
+ <Link
29
+ href={link.href}
30
+ onClick={link.onClick}
31
+ aria-label={link.ariaLabel}
32
+ >
33
+ {link.label}
34
+ </Link>
35
+
36
+ <Icon icon={BtIconArrowAltRight} size={24} color="brand" />
37
+ </li>
38
+
39
+ {index < links.length - 1 && (
40
+ <li className={styles["quick-help-separator"]} aria-hidden="true">
41
+ <div className={styles["quick-help-separator-line"]} />
42
+ </li>
43
+ )}
44
+ </React.Fragment>
45
+ ))}
46
+ </ul>
47
+ </div>
48
+ );
49
+ };
50
+
51
+ export interface InlineLinkGroupProps {
52
+ /** Optional overline label displayed above the link group */
53
+ label?: string;
54
+ /** Array of link items to display */
55
+ links: InlineLinkGroupItem[];
56
+ }
57
+
58
+ export interface InlineLinkGroupItem {
59
+ /** Display text for the link */
60
+ label: string;
61
+ /** URL the link navigates to */
62
+ href: string;
63
+ /** Optional click handler for the link */
64
+ onClick?: () => void;
65
+ /** Optional accessible label for screen readers */
66
+ ariaLabel?: string;
67
+ }
@@ -0,0 +1,5 @@
1
+ export { InlineLinkGroup } from "./InlineLinkGroup";
2
+ export type {
3
+ InlineLinkGroupProps,
4
+ InlineLinkGroupItem,
5
+ } from "./InlineLinkGroup";
@@ -1,57 +1,93 @@
1
+ @import url("@arc-ui/tokens-arc/dist/custom-media.css");
2
+
1
3
  .link-tile {
4
+ box-sizing: border-box;
2
5
  display: flex;
3
6
  flex-direction: column;
7
+ justify-content: center;
8
+ align-items: center;
4
9
  width: 306px;
5
- border: 1px solid #c8c8c8;
6
- border-radius: 32px;
7
- padding: 24px;
8
- background: #ffffff;
10
+ height: 96px;
11
+ border: var(--sem-border-width-xxs) solid
12
+ var(--sem-color-border-secondary-light-minimal);
13
+ border-radius: var(--sem-border-radius-xl);
14
+ padding: var(--sem-space-padding-110) var(--sem-space-padding-70)
15
+ var(--sem-space-padding-110) var(--sem-space-padding-110);
16
+ background: var(--sem-color-bg-secondary-light-default);
9
17
  text-decoration: none;
10
18
  cursor: pointer;
11
- transition:
12
- border-color 0.2s ease,
13
- border-radius 0.2s ease;
19
+ transition: border-color 0.2s ease;
20
+ flex: none;
21
+ align-self: stretch;
22
+ position: relative;
23
+ overflow: visible;
14
24
  }
15
25
 
16
26
  .link-tile-content {
17
27
  display: flex;
28
+ flex-direction: row;
29
+ justify-content: center;
18
30
  align-items: center;
19
- justify-content: space-between;
20
- gap: 8px;
31
+ gap: var(--sem-space-padding-40);
32
+ width: 100%;
33
+ height: 48px;
34
+ flex: none;
35
+ align-self: stretch;
36
+ }
37
+
38
+ .link-tile-icon {
39
+ display: flex;
40
+ width: 32px;
41
+ height: 32px;
42
+ color: var(--sem-color-fg-primary-light-default);
43
+ transition: color 0.2s ease;
44
+ flex: none;
45
+ flex-shrink: 0;
46
+ order: 1;
21
47
  }
22
48
 
23
49
  .link-tile-text {
24
- font-family: "BT Curve", sans-serif;
25
- font-size: 16px;
26
- font-weight: 500;
27
- line-height: 24px;
50
+ font-family: var(--sem-font-family-heading);
51
+ font-size: var(--sem-font-size-100);
52
+ font-weight: var(--sem-font-weight-semi);
53
+ line-height: var(--sem-line-height-base-scale-xs);
28
54
  letter-spacing: 0;
29
- color: #5514b4;
55
+ color: var(--sem-color-fg-primary-light-default);
30
56
  transition: color 0.2s ease;
31
57
  flex: 1;
58
+ order: 0;
32
59
  }
33
60
 
61
+ .link-tile-icon svg,
34
62
  .link-tile .link-tile-content svg {
35
- color: #5514b4;
36
- flex-shrink: 0;
63
+ color: inherit;
37
64
  transition: color 0.2s ease;
38
65
  }
39
66
 
40
- .link-tile:hover {
41
- border-color: #5514b4;
67
+ .link-tile:not(:has(svg)) {
68
+ padding: var(--sem-space-padding-110);
42
69
  }
43
70
 
44
71
  .link-tile:active {
45
- border-radius: 32px;
72
+ border-radius: var(--sem-border-radius-xl);
46
73
  }
47
74
 
48
- .link-tile:hover .link-tile-text,
49
- .link-tile:hover .link-tile-content svg {
50
- color: #3f187f;
51
- }
52
-
53
- @media (width <= 1023px) {
75
+ @media (--arc-custom-media-min-width-l-px) {
54
76
  .link-tile {
55
- padding: 24px 16px 24px 24px;
77
+ padding: var(--sem-space-padding-110) var(--sem-space-padding-70)
78
+ var(--sem-space-padding-110) var(--sem-space-padding-110);
56
79
  }
57
80
  }
81
+
82
+ .link-tile:hover {
83
+ border-color: transparent;
84
+ box-shadow: inset 0 0 0 2px var(--button-v2-colors-light-text-hover);
85
+ }
86
+
87
+ .link-tile:hover .link-tile-text {
88
+ color: var(--button-v2-colors-light-text-hover);
89
+ }
90
+
91
+ .link-tile:hover .link-tile-icon {
92
+ color: var(--button-v2-colors-light-text-hover);
93
+ }
@@ -24,7 +24,11 @@ export const LinkTile: React.FC<LinkTileProps> = ({
24
24
  {text && (
25
25
  <div className={styles["link-tile-content"]}>
26
26
  <span className={styles["link-tile-text"]}>{text}</span>
27
- {showIcon && <Icon icon={BtIconArrowAltRight} size={32} />}
27
+ {showIcon && (
28
+ <span className={styles["link-tile-icon"]}>
29
+ <Icon icon={BtIconArrowAltRight} size={32} />
30
+ </span>
31
+ )}
28
32
  </div>
29
33
  )}
30
34
  </Component>
@@ -32,7 +36,10 @@ export const LinkTile: React.FC<LinkTileProps> = ({
32
36
  };
33
37
 
34
38
  export interface LinkTileProps extends React.HTMLAttributes<HTMLDivElement> {
39
+ /** Display text for the tile */
35
40
  text?: string;
41
+ /** URL the tile navigates to. Renders as an anchor tag when provided */
36
42
  href?: string;
43
+ /** Whether to show the arrow icon. Defaults to true */
37
44
  showIcon?: boolean;
38
45
  }
@@ -1,17 +1,12 @@
1
1
  import React, { useId, ComponentType } from "react";
2
-
3
2
  import classNames from "classnames";
4
-
5
3
  import { ArcSizeBreakpointsL, ArcSizeBreakpointsM } from "@arc-ui/tokens-arc";
6
-
7
4
  import { Carousel } from "@arc-ui/components/Carousel";
8
5
  import { Heading, type HeadingLevel } from "@arc-ui/components/Heading";
9
6
  import { useMediaQuery } from "@arc-ui/components/use-media-query";
10
-
11
7
  import { SectionHeading, type SectionHeadingProps } from "../SectionHeading";
12
-
13
8
  import { MediaCard, type MediaCardProps } from "@arc-ui/components/MediaCard";
14
-
9
+ import { filterAttrs } from "@arc-ui/community-utils/filter-attrs";
15
10
  import {
16
11
  ImpactCard,
17
12
  type ImpactCardProps,
@@ -49,6 +44,7 @@ export const PromoListing: React.FC<PromoListingProps> = ({
49
44
  button = { buttonStyle: "secondary" },
50
45
  overlineHeadingLevel,
51
46
  overlineLabel,
47
+ ...props
52
48
  }) => {
53
49
  const componentId = useId();
54
50
 
@@ -97,7 +93,7 @@ export const PromoListing: React.FC<PromoListingProps> = ({
97
93
  };
98
94
 
99
95
  return (
100
- <div className={styles.PromoListing}>
96
+ <div className={styles.PromoListing} {...filterAttrs(props)}>
101
97
  {overlineLabel && (
102
98
  <>
103
99
  <Heading level={overlineHeadingLevel} fontStyle="overline">
@@ -230,8 +226,4 @@ interface PromoListingButton
230
226
  * Style variant for the button. Defaults to "secondary".
231
227
  */
232
228
  buttonStyle?: "secondary" | "compact";
233
- /**
234
- * Optional prop to pass additional props to the button. Only data-* and aria-* will work.
235
- */
236
- [key: string]: unknown;
237
229
  }
@@ -38,13 +38,7 @@ export const Quote: React.FC<QuoteProps> = ({
38
38
  </svg>
39
39
  <p className={styles.quoteContent}>{content}</p>
40
40
  </blockquote>
41
- {author && (
42
- <Author
43
- name={author.name}
44
- title={author.title}
45
- avatar={author.avatar}
46
- />
47
- )}
41
+ {author && <Author {...author} />}
48
42
  </div>
49
43
  );
50
44
  };
@@ -13,13 +13,3 @@
13
13
  .mutedText {
14
14
  color: var(--sem-color-text-primary-light-subtle);
15
15
  }
16
-
17
- .statWrapper {
18
- margin-bottom: -12px;
19
- }
20
-
21
- @media (--arc-custom-media-min-width-s-px) {
22
- .statWrapper {
23
- margin-bottom: 0;
24
- }
25
- }
@@ -1,16 +1,14 @@
1
1
  import React, { useId } from "react";
2
-
2
+ import { filterAttrs } from "@arc-ui/community-utils/filter-attrs";
3
3
  import { Columns, ColumnsCol } from "@arc-ui/components/Columns";
4
4
  import { Rule } from "@arc-ui/components/Rule";
5
5
  import { Text } from "@arc-ui/components/Text";
6
6
  import { Align } from "@arc-ui/components/Align";
7
7
  import { Heading } from "@arc-ui/components/Heading";
8
8
  import { VerticalSpace } from "@arc-ui/components/VerticalSpace";
9
-
9
+ import { Hidden } from "@arc-ui/components/Hidden";
10
10
  import { SectionHeading, type SectionHeadingProps } from "../SectionHeading";
11
-
12
11
  import styles from "./Statistics.module.css";
13
-
14
12
  import { getLinkProps } from "./helpers/get-link-props";
15
13
  import { type Statistic } from "./types/statistic";
16
14
 
@@ -21,11 +19,12 @@ export const Statistics: React.FC<StatisticsProps> = ({
21
19
  heading,
22
20
  content,
23
21
  statistics,
22
+ ...props
24
23
  }) => {
25
24
  const componentId = useId();
26
25
 
27
26
  return (
28
- <Columns>
27
+ <Columns isGutterless {...filterAttrs(props)}>
29
28
  <ColumnsCol spanM={9}>
30
29
  <SectionHeading
31
30
  id={id}
@@ -34,7 +33,6 @@ export const Statistics: React.FC<StatisticsProps> = ({
34
33
  headingLevel={headingLevel}
35
34
  content={content}
36
35
  />
37
- <VerticalSpace size="16" />
38
36
  </ColumnsCol>
39
37
  <ColumnsCol spanL={9}>
40
38
  <ul className={styles.list}>
@@ -54,38 +52,43 @@ export const Statistics: React.FC<StatisticsProps> = ({
54
52
  <Heading color="brand" size="xxl">
55
53
  {stat}
56
54
  </Heading>
55
+ <Hidden s m l xl xxl>
56
+ <VerticalSpace size="12" />
57
+ </Hidden>
57
58
  </div>
58
59
  </Align>
59
60
  </ColumnsCol>
60
61
  <ColumnsCol spanS={6} spanM={4}>
61
- <Text>{copy}</Text>
62
- {link && (
63
- <>
64
- <VerticalSpace size="12" />
65
- <a
66
- href={link.href}
67
- aria-label={link.ariaLabel}
68
- {...getLinkProps(link)}
69
- >
70
- {link.text}
71
- </a>
72
- </>
73
- )}
74
- {source && (
75
- <>
76
- <VerticalSpace size="12" />
62
+ <Align vertical="center">
63
+ <Text>{copy}</Text>
64
+ {link && (
65
+ <>
66
+ <VerticalSpace size="12" />
67
+ <a
68
+ href={link.href}
69
+ aria-label={link.ariaLabel}
70
+ {...getLinkProps(link)}
71
+ >
72
+ {link.text}
73
+ </a>
74
+ </>
75
+ )}
76
+ {source && (
77
+ <>
78
+ <VerticalSpace size="12" />
79
+ <Text size="xs">
80
+ <span className={styles.mutedText}>{source}</span>
81
+ </Text>
82
+ </>
83
+ )}
84
+ {sourceUrl && (
77
85
  <Text size="xs">
78
- <span className={styles.mutedText}>{source}</span>
86
+ <a className={styles.mutedText} href={sourceUrl}>
87
+ {sourceUrl}
88
+ </a>
79
89
  </Text>
80
- </>
81
- )}
82
- {sourceUrl && (
83
- <Text size="xs">
84
- <a className={styles.mutedText} href={sourceUrl}>
85
- {sourceUrl}
86
- </a>
87
- </Text>
88
- )}
90
+ )}
91
+ </Align>
89
92
  </ColumnsCol>
90
93
  </Columns>
91
94
  </li>
@@ -8,13 +8,14 @@ import { Box } from "@arc-ui/components/Box";
8
8
  import { Rule } from "@arc-ui/components/Rule";
9
9
  import { VerticalSpace } from "@arc-ui/components/VerticalSpace";
10
10
  import { useMediaQuery } from "@arc-ui/components/use-media-query";
11
-
11
+ import { filterAttrs } from "@arc-ui/community-utils/filter-attrs";
12
12
  import styles from "./Summary.module.css";
13
13
 
14
14
  export const Summary: React.FC<SummaryProps> = ({
15
15
  content,
16
16
  noBorder = false,
17
17
  headingLevel = "3",
18
+ ...props
18
19
  }) => {
19
20
  const isMinWidthArcBreakpointM = useMediaQuery(
20
21
  `(min-width: ${ArcSizeBreakpointsM})`,
@@ -25,6 +26,7 @@ export const Summary: React.FC<SummaryProps> = ({
25
26
  isBorderRadius
26
27
  {...(!noBorder ? { borderWidth: "thin" } : { elevationLevel: "1" })}
27
28
  padding="24"
29
+ {...filterAttrs(props)}
28
30
  >
29
31
  <div className={styles.row}>
30
32
  {content.map(({ heading, text }, i) => (
@@ -14,8 +14,8 @@ export * from "./ArticleSidebar";
14
14
  export * from "./ProductNavigation";
15
15
  export * from "./SectionHeading";
16
16
  export * from "./ContentInfoWidget";
17
- export * from "./HeroLink";
18
17
  export * from "./ActionTile";
19
18
  export * from "./LinkTile";
19
+ export * from "./InlineLinkGroup";
20
20
  export * from "./ThumbnailSignpost";
21
21
  export * from "./PromoListingThumbnailSignpost";
package/versions.json CHANGED
@@ -1 +1 @@
1
- ["v3.2.0","v3.1.0","v3.0.1","v3.0.0","v2.0.0","v1.1.0","v1.0.2","v1.0.1","v1.0.0","v0.1.0"]
1
+ ["v3.3.0","v3.2.0","v3.1.0","v3.0.1","v3.0.0","v2.0.0","v1.1.0","v1.0.2","v1.0.1","v1.0.0","v0.1.0"]
@@ -1,35 +0,0 @@
1
- 'use strict';
2
-
3
- var tslib_es6 = require('../_shared/cjs/tslib.es6-BxB9I209.cjs');
4
- var React = require('react');
5
- var index = require('../_shared/cjs/index-Bp6Dd2i1.cjs');
6
- var BtIconArrowAltRight = require('../_shared/cjs/BtIconArrowAltRight-CLQdP61r.cjs');
7
- var Icon = require('@arc-ui/components/Icon');
8
-
9
- var styles = {"heroLink":"HeroLink-module_heroLink__WUqWB","heroLink-inner":"HeroLink-module_heroLink-inner__RE5i8","heroLink-label":"HeroLink-module_heroLink-label__93HPY","heroLink-icon":"HeroLink-module_heroLink-icon__l7o4U","heroLink--emptyLabel":"HeroLink-module_heroLink--emptyLabel__XY2sa"};
10
-
11
- /**
12
- * Pill-style HeroLink component with default and hover states
13
- */
14
- var HeroLink = function (_a) {
15
- var _b;
16
- var label = _a.label, onClick = _a.onClick, href = _a.href, id = _a.id, rel = _a.rel, target = _a.target, ariaLabel = _a.ariaLabel, ref = _a.ref, props = tslib_es6.__rest(_a, ["label", "onClick", "href", "id", "rel", "target", "ariaLabel", "ref"]);
17
- var HeroLinkClasses = index.classNames(styles.heroLink, (_b = {},
18
- _b[styles["heroLink--emptyLabel"]] = !label,
19
- _b));
20
- var commonProps = tslib_es6.__assign({ id: id, onClick: onClick, ref: ref }, props);
21
- if (href) {
22
- return (React.createElement("a", tslib_es6.__assign({}, commonProps, { className: HeroLinkClasses, href: href, rel: rel, "aria-label": ariaLabel, target: target }),
23
- React.createElement("span", { className: styles["heroLink-inner"] },
24
- label && React.createElement("span", { className: styles["heroLink-label"] }, label),
25
- React.createElement("span", { className: styles["heroLink-icon"] },
26
- React.createElement(Icon.Icon, { testId: "hero-link-icon", size: 24, icon: BtIconArrowAltRight.BtIconArrowAltRight })))));
27
- }
28
- return (React.createElement("button", tslib_es6.__assign({}, commonProps, { className: HeroLinkClasses, "aria-label": ariaLabel }),
29
- React.createElement("span", { className: styles["heroLink-inner"] },
30
- label && React.createElement("span", { className: styles["heroLink-label"] }, label),
31
- React.createElement("span", { className: styles["heroLink-icon"] },
32
- React.createElement(Icon.Icon, { testId: "hero-link-icon", size: 24, icon: BtIconArrowAltRight.BtIconArrowAltRight })))));
33
- };
34
-
35
- exports.HeroLink = HeroLink;
@@ -1,33 +0,0 @@
1
- import { a as __rest, _ as __assign } from '../_shared/esm/tslib.es6-D6Wu-xwB.mjs';
2
- import React from 'react';
3
- import { c as classNames } from '../_shared/esm/index-BfTCfPZ1.mjs';
4
- import { B as BtIconArrowAltRight } from '../_shared/esm/BtIconArrowAltRight-VH6RTTnL.mjs';
5
- import { Icon } from '@arc-ui/components/Icon';
6
-
7
- var styles = {"heroLink":"HeroLink-module_heroLink__WUqWB","heroLink-inner":"HeroLink-module_heroLink-inner__RE5i8","heroLink-label":"HeroLink-module_heroLink-label__93HPY","heroLink-icon":"HeroLink-module_heroLink-icon__l7o4U","heroLink--emptyLabel":"HeroLink-module_heroLink--emptyLabel__XY2sa"};
8
-
9
- /**
10
- * Pill-style HeroLink component with default and hover states
11
- */
12
- var HeroLink = function (_a) {
13
- var _b;
14
- var label = _a.label, onClick = _a.onClick, href = _a.href, id = _a.id, rel = _a.rel, target = _a.target, ariaLabel = _a.ariaLabel, ref = _a.ref, props = __rest(_a, ["label", "onClick", "href", "id", "rel", "target", "ariaLabel", "ref"]);
15
- var HeroLinkClasses = classNames(styles.heroLink, (_b = {},
16
- _b[styles["heroLink--emptyLabel"]] = !label,
17
- _b));
18
- var commonProps = __assign({ id: id, onClick: onClick, ref: ref }, props);
19
- if (href) {
20
- return (React.createElement("a", __assign({}, commonProps, { className: HeroLinkClasses, href: href, rel: rel, "aria-label": ariaLabel, target: target }),
21
- React.createElement("span", { className: styles["heroLink-inner"] },
22
- label && React.createElement("span", { className: styles["heroLink-label"] }, label),
23
- React.createElement("span", { className: styles["heroLink-icon"] },
24
- React.createElement(Icon, { testId: "hero-link-icon", size: 24, icon: BtIconArrowAltRight })))));
25
- }
26
- return (React.createElement("button", __assign({}, commonProps, { className: HeroLinkClasses, "aria-label": ariaLabel }),
27
- React.createElement("span", { className: styles["heroLink-inner"] },
28
- label && React.createElement("span", { className: styles["heroLink-label"] }, label),
29
- React.createElement("span", { className: styles["heroLink-icon"] },
30
- React.createElement(Icon, { testId: "hero-link-icon", size: 24, icon: BtIconArrowAltRight })))));
31
- };
32
-
33
- export { HeroLink };
@@ -1 +0,0 @@
1
- .HeroLink-module_heroLink__WUqWB{display:inline-flex;align-items:center;justify-content:center;gap:4px;padding:16px 16px 16px 24px;border:2px solid #e5e5e5;border-radius:32px;background:transparent;color:#5514b4;text-decoration:none;font-size:14px;font-weight:500;line-height:1;cursor:pointer;transition:all 0.2s ease;width:-moz-fit-content;width:fit-content;height:-moz-fit-content;height:fit-content}.HeroLink-module_heroLink__WUqWB:hover{border-color:#3f187f;color:#3f187f}.HeroLink-module_heroLink-inner__RE5i8{display:flex;align-items:center;gap:4px}.HeroLink-module_heroLink-label__93HPY{white-space:nowrap}.HeroLink-module_heroLink-icon__l7o4U{display:flex;align-items:center;justify-content:center}.HeroLink-module_heroLink--emptyLabel__XY2sa{padding:16px}
@@ -1,27 +0,0 @@
1
- 'use strict';
2
-
3
- /**
4
- * Filters out attributes from the given props object based on a pattern.
5
- *
6
- * This function extracts all properties that match either the `data-*` or `aria-*` attribute patterns
7
- * and returns a new object containing only those properties.
8
- *
9
- * @param props - The object containing properties to filter.
10
- * @returns A new object containing only the matched attributes (`data-*` and `aria-*`) from the input props.
11
- */
12
- var attributePrefixes = ["data-", "aria-"];
13
- var filterAttrs = function (props) {
14
- var filteredProps = {};
15
- var _loop_1 = function (prop) {
16
- if (Object.prototype.hasOwnProperty.call(props, prop) &&
17
- attributePrefixes.some(function (prefix) { return prop.startsWith(prefix); })) {
18
- filteredProps[prop] = props[prop];
19
- }
20
- };
21
- for (var prop in props) {
22
- _loop_1(prop);
23
- }
24
- return filteredProps;
25
- };
26
-
27
- exports.filterAttrs = filterAttrs;
@@ -1,25 +0,0 @@
1
- /**
2
- * Filters out attributes from the given props object based on a pattern.
3
- *
4
- * This function extracts all properties that match either the `data-*` or `aria-*` attribute patterns
5
- * and returns a new object containing only those properties.
6
- *
7
- * @param props - The object containing properties to filter.
8
- * @returns A new object containing only the matched attributes (`data-*` and `aria-*`) from the input props.
9
- */
10
- var attributePrefixes = ["data-", "aria-"];
11
- var filterAttrs = function (props) {
12
- var filteredProps = {};
13
- var _loop_1 = function (prop) {
14
- if (Object.prototype.hasOwnProperty.call(props, prop) &&
15
- attributePrefixes.some(function (prefix) { return prop.startsWith(prefix); })) {
16
- filteredProps[prop] = props[prop];
17
- }
18
- };
19
- for (var prop in props) {
20
- _loop_1(prop);
21
- }
22
- return filteredProps;
23
- };
24
-
25
- export { filterAttrs as f };
@@ -1,44 +0,0 @@
1
- .heroLink {
2
- display: inline-flex;
3
- align-items: center;
4
- justify-content: center;
5
- gap: 4px;
6
- padding: 16px 16px 16px 24px;
7
- border: 2px solid #e5e5e5;
8
- border-radius: 32px;
9
- background: transparent;
10
- color: #5514b4;
11
- text-decoration: none;
12
- font-size: 14px;
13
- font-weight: 500;
14
- line-height: 1;
15
- cursor: pointer;
16
- transition: all 0.2s ease;
17
- width: fit-content;
18
- height: fit-content;
19
- }
20
-
21
- .heroLink:hover {
22
- border-color: #3f187f;
23
- color: #3f187f;
24
- }
25
-
26
- .heroLink-inner {
27
- display: flex;
28
- align-items: center;
29
- gap: 4px;
30
- }
31
-
32
- .heroLink-label {
33
- white-space: nowrap;
34
- }
35
-
36
- .heroLink-icon {
37
- display: flex;
38
- align-items: center;
39
- justify-content: center;
40
- }
41
-
42
- .heroLink--emptyLabel {
43
- padding: 16px;
44
- }