@apolitical/component-library 5.2.2-ac.8 → 5.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 (34) hide show
  1. package/discussion/components/add-post/add-post.d.ts +0 -3
  2. package/discussion/components/form/form.type.d.ts +0 -5
  3. package/discussion/components/post/post.d.ts +1 -6
  4. package/discussion/feeds/activities-feed/activities-feed.d.ts +0 -5
  5. package/discussion/feeds/activities-feed/cache/hooks/list/list.hook.d.ts +2 -5
  6. package/discussion/feeds/activities-feed/mocks/activities-feed.mock.d.ts +0 -4
  7. package/discussion/sections/activity-section/activity-section.d.ts +0 -4
  8. package/discussion/sections/activity-section/mocks/activity-section.mock.d.ts +0 -1
  9. package/discussion/shared/interfaces/activity.interface.d.ts +0 -1
  10. package/discussion/shared/interfaces/discussion.interface.d.ts +0 -2
  11. package/discussion/shared/interfaces/index.d.ts +0 -1
  12. package/form/components/form/components/fields/checkbox/checkbox.d.ts +2 -2
  13. package/form/components/form/components/fields/input/input.d.ts +0 -5
  14. package/form/components/form/components/fields/multiple-options/multiple-options.d.ts +1 -1
  15. package/form/components/form/form.types.d.ts +0 -8
  16. package/form/components/rich-text-editor/components/context/context.d.ts +5 -0
  17. package/form/components/rich-text-editor/helpers/handle-text/handle-text.d.ts +1 -0
  18. package/form/components/rich-text-editor/helpers/transform/transform.d.ts +1 -1
  19. package/form/components/rich-text-editor/plugins/index.d.ts +1 -0
  20. package/form/components/rich-text-editor/plugins/with-link-removal-listener/index.d.ts +1 -0
  21. package/form/components/rich-text-editor/plugins/with-link-removal-listener/with-link-removal-listener.d.ts +6 -0
  22. package/form/components/rich-text-editor/rich-text-editor.d.ts +2 -42
  23. package/form/components/rich-text-editor/rich-text-editor.types.d.ts +65 -2
  24. package/helpers/intl.d.ts +3 -2
  25. package/index.js +60 -60
  26. package/index.mjs +6091 -6103
  27. package/navigation/enriched-url/enriched-url.d.ts +26 -20
  28. package/navigation/enriched-url/index.d.ts +1 -1
  29. package/navigation/filters/filters.d.ts +1 -5
  30. package/package.json +1 -1
  31. package/style.css +1 -1
  32. package/styles/base/_accessibility.scss +0 -1
  33. package/styles/variables/colors/theme/_navigation.scss +6 -4
  34. package/discussion/shared/interfaces/community.category.interface.d.ts +0 -4
@@ -1,26 +1,32 @@
1
+ import React from 'react';
2
+ export interface IEnrichedUrlData {
3
+ /** An image to show */
4
+ image?: {
5
+ /** The image file */
6
+ src: string;
7
+ /** The width of the image */
8
+ width?: number;
9
+ /** The height of the image */
10
+ height?: number;
11
+ /** The alt text for the image */
12
+ alt?: string;
13
+ };
14
+ /** The url to link to */
15
+ url: string;
16
+ /** The title text to show on the link */
17
+ title: string;
18
+ /** Paragraph text to show on the link; this is only shown on extra-large and large sizes */
19
+ description?: string;
20
+ }
1
21
  interface Props {
2
22
  /** The style of the link. Defaults to 'default', which shows all of the details. */
3
23
  variant?: 'default' | 'condensed';
4
24
  /** The data to render in the link */
5
- data: {
6
- /** An image to show */
7
- image?: {
8
- /** The image file */
9
- src: string;
10
- /** The width of the image */
11
- width?: number;
12
- /** The height of the image */
13
- height?: number;
14
- /** The alt text for the image */
15
- alt?: string;
16
- };
17
- /** The url to link to */
18
- url: string;
19
- /** The title text to show on the link */
20
- title: string;
21
- /** Paragraph text to show on the link; this is only shown on extra-large and large sizes */
22
- description?: string;
23
- };
25
+ data: IEnrichedUrlData;
26
+ /** An optional function to call when the link is clicked, instead of opening the link */
27
+ onClick?: (e: React.MouseEvent<HTMLElement>) => void;
28
+ /** An optional aria-label, so we can explain to screen readers what the onClick will do */
29
+ 'aria-label'?: string;
24
30
  /** The Google Tag Manager data to be passed to the link */
25
31
  gtm?: {
26
32
  /** The context of the event for GTM */
@@ -29,5 +35,5 @@ interface Props {
29
35
  event?: string;
30
36
  };
31
37
  }
32
- declare const EnrichedUrl: ({ variant, data: { image, url, title, description }, gtm, }: Props) => import("react/jsx-runtime").JSX.Element;
38
+ declare const EnrichedUrl: ({ variant, data: { image, url, title, description }, onClick, gtm, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
33
39
  export default EnrichedUrl;
@@ -1 +1 @@
1
- export { default as EnrichedUrl } from './enriched-url';
1
+ export { default as EnrichedUrl, type IEnrichedUrlData } from './enriched-url';
@@ -7,8 +7,6 @@ export interface FilterType {
7
7
  interface Props {
8
8
  /** The filter details */
9
9
  options: FilterType[];
10
- /** The default filter */
11
- defaultOptions?: FilterType[];
12
10
  /** A filter for 'all' */
13
11
  allOption?: boolean | {
14
12
  text?: string;
@@ -16,8 +14,6 @@ interface Props {
16
14
  };
17
15
  /** Whether the filter allows multiple selections */
18
16
  allowMultiple?: boolean;
19
- /** Whether to prevent no option being selected */
20
- preventNoOptionSelected?: boolean;
21
17
  /** The callback function for when the filter changes */
22
18
  onChange?: (options: {
23
19
  current: string[];
@@ -28,5 +24,5 @@ interface Props {
28
24
  /** The language to use */
29
25
  locale?: string;
30
26
  }
31
- declare const Filters: ({ options, defaultOptions, allOption, allowMultiple, onChange, preventNoOptionSelected, className, }: Props) => import("react/jsx-runtime").JSX.Element;
27
+ declare const Filters: ({ options, allOption, allowMultiple, onChange, className, }: Props) => import("react/jsx-runtime").JSX.Element;
32
28
  export default Filters;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apolitical/component-library",
3
- "version": "5.2.2-ac.8",
3
+ "version": "5.3.0",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {