@pronto-tools-and-more/components 10.40.0 → 10.42.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/dist/main.js CHANGED
@@ -597,6 +597,16 @@ var FooterSocialLinks = ({
597
597
  }));
598
598
  };
599
599
 
600
+ // src/parts/GetEmailLink/GetEmailLink.ts
601
+ var separator = "%0D%0D";
602
+ var getEmailLink = ({
603
+ subject,
604
+ details
605
+ }) => {
606
+ const formattedDetails = details.join(separator);
607
+ return `mailto:?subject=${subject}&body=${formattedDetails}${separator}`;
608
+ };
609
+
600
610
  // src/parts/HeaderLogo/HeaderLogo.tsx
601
611
  var HeaderLogo = ({ logoPath }) => {
602
612
  const fullMessage = `<img src="${logoPath}" alt="" />`;
@@ -1069,6 +1079,19 @@ var Seo = ({
1069
1079
  return /* @__PURE__ */ React.createElement(JsonComponent, { json });
1070
1080
  };
1071
1081
 
1082
+ // src/parts/SocialLink/SocialLink.tsx
1083
+ var SocialLink = ({ item }) => {
1084
+ const iconClass = `MaskIcon MaskIcon${item.label}`;
1085
+ return /* @__PURE__ */ React.createElement("li", { className: "SocialLink" }, /* @__PURE__ */ React.createElement("a", { href: item.url, "aria-label": item.label, target: "_blank" }, /* @__PURE__ */ React.createElement("div", { className: iconClass })));
1086
+ };
1087
+
1088
+ // src/parts/SocialLinks/SocialLinks.tsx
1089
+ var SocialLinks = ({ items }) => {
1090
+ return /* @__PURE__ */ React.createElement("ul", { className: "SocialLinks" }, ...items.map((link) => {
1091
+ return /* @__PURE__ */ React.createElement(SocialLink, { item: link });
1092
+ }));
1093
+ };
1094
+
1072
1095
  // src/parts/SubscriptionLink/SubscriptionLink.tsx
1073
1096
  var SubscriptionLink = ({ message } = {}) => {
1074
1097
  const json = {
@@ -1156,8 +1179,11 @@ export {
1156
1179
  SearchLink,
1157
1180
  SearchResults,
1158
1181
  Seo,
1182
+ SocialLink,
1183
+ SocialLinks,
1159
1184
  SubscriptionLink,
1160
1185
  TagList,
1161
1186
  createLanguageRegistry,
1162
- dateHelper
1187
+ dateHelper,
1188
+ getEmailLink
1163
1189
  };
@@ -15,6 +15,7 @@ export * from "../ErrorPage/ErrorPage.tsx";
15
15
  export * from "../FooterItemsList/FooterItemsList.tsx";
16
16
  export * from "../FooterSocialLink/FooterSocialLink.tsx";
17
17
  export * from "../FooterSocialLinks/FooterSocialLinks.tsx";
18
+ export * from "../GetEmailLink/GetEmailLink.ts";
18
19
  export * from "../HeaderLogo/HeaderLogo.tsx";
19
20
  export * from "../HeaderLogoSection/HeaderLogoSection.tsx";
20
21
  export * from "../HeaderMenuItems/HeaderMenuItems.tsx";
@@ -25,6 +26,7 @@ export * from "../ICategoryItem/ICategoryItem.ts";
25
26
  export * from "../IFooterSocialLink/IFooterSocialLink.ts";
26
27
  export * from "../ISearchResult/ISearchResult.ts";
27
28
  export * from "../ISearchResultComponent/ISearchResultComponent.tsx";
29
+ export * from "../ISocialLink/ISocialLink.ts";
28
30
  export * from "../ITagItem/ITagItem.ts";
29
31
  export * from "../JsonComponent/JsonComponent.tsx";
30
32
  export * from "../LanguageRegistry/LanguageRegistry.ts";
@@ -42,5 +44,7 @@ export * from "../SearchHeaderToggle/SearchHeaderToggle.tsx";
42
44
  export * from "../SearchLink/SearchLink.tsx";
43
45
  export * from "../SearchResults/SearchResults.tsx";
44
46
  export * from "../Seo/Seo.tsx";
47
+ export * from "../SocialLink/SocialLink.tsx";
48
+ export * from "../SocialLinks/SocialLinks.tsx";
45
49
  export * from "../SubscriptionLink/SubscriptionLink.tsx";
46
50
  export * from "../TagList/TagList.tsx";
@@ -1,4 +1,7 @@
1
1
  import type { IFooterSocialLink } from "../IFooterSocialLink/IFooterSocialLink.ts";
2
+ /**
3
+ * @deprecated use SocialLink instead
4
+ */
2
5
  export declare const FooterSocialLink: ({ item }: {
3
6
  item: IFooterSocialLink;
4
7
  }) => import("react").JSX.Element;
@@ -1,4 +1,7 @@
1
- import type { IFooterSocialLink } from "../IFooterSocialLink/IFooterSocialLink.ts";
1
+ import type { ISocialLink } from "../ISocialLink/ISocialLink.ts";
2
+ /**
3
+ * @deprecated use SocialLinks instead
4
+ */
2
5
  export declare const FooterSocialLinks: ({ items, }: {
3
- items: readonly IFooterSocialLink[];
6
+ items: readonly ISocialLink[];
4
7
  }) => import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ export declare const getEmailLink: ({ subject, details, }: {
2
+ subject: string;
3
+ details: readonly string[];
4
+ }) => string;
@@ -0,0 +1,5 @@
1
+ export interface ISocialLink {
2
+ readonly image: string;
3
+ readonly label: string;
4
+ readonly url: string;
5
+ }
@@ -0,0 +1,4 @@
1
+ import type { ISocialLink } from "../ISocialLink/ISocialLink.ts";
2
+ export declare const SocialLink: ({ item }: {
3
+ item: ISocialLink;
4
+ }) => import("react").JSX.Element;
@@ -0,0 +1,4 @@
1
+ import type { ISocialLink } from "../ISocialLink/ISocialLink.ts";
2
+ export declare const SocialLinks: ({ items }: {
3
+ items: readonly ISocialLink[];
4
+ }) => import("react").JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pronto-tools-and-more/components",
3
- "version": "10.40.0",
3
+ "version": "10.42.0",
4
4
  "description": "",
5
5
  "main": "dist/main.js",
6
6
  "types": "dist/main.d.ts",