@apolitical/component-library 6.0.3-ac.0 → 6.0.3

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.
@@ -1,3 +1,3 @@
1
1
  import type { CardProps } from './../cards.types';
2
- declare const Card: ({ id, className, buildCardData, buildMemberData, card, cta, gtmContext, handleCardClick, setFocus, }: CardProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const Card: ({ id, className, buildCardData, buildMemberData, card, cta, gtmContext, handleCardClick, meta, }: CardProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default Card;
@@ -93,8 +93,13 @@ export interface CardProps {
93
93
  className?: string;
94
94
  /** A callback to run when the user clicks on the card CTA */
95
95
  handleCardClick?: (card: CardType) => Promise<string>;
96
- /** If the browser should focus on this card */
97
- setFocus?: boolean;
96
+ /** Metadata about the card */
97
+ meta?: {
98
+ /** If the browser should be able to reach the card, e.g. for out of view cards in carousels */
99
+ isTabbable?: boolean;
100
+ /** If the browser should focus on this card */
101
+ setFocus?: boolean;
102
+ };
98
103
  }
99
104
  export interface CarouselTitleProps {
100
105
  /** The title text */
@@ -1 +1,4 @@
1
- export declare const shouldDisplayCard: (index: number, cardsPerPage: number, page: number, loadedPages: number[]) => boolean;
1
+ export declare const shouldDisplayCard: (index: number, cardsPerPage: number, page: number, loadedPages: number[]) => {
2
+ inView: boolean;
3
+ isLoaded: boolean;
4
+ };
@@ -1,4 +1,4 @@
1
1
  import { PropsWithChildren } from 'react';
2
2
  import { BaseProps } from './../../rich-text-editor.types';
3
- declare const Toolbar: ({ styling, ...props }: PropsWithChildren<BaseProps>) => import("react/jsx-runtime").JSX.Element;
3
+ declare const Toolbar: ({ ...props }: PropsWithChildren<BaseProps>) => import("react/jsx-runtime").JSX.Element;
4
4
  export default Toolbar;
@@ -1,3 +1,3 @@
1
1
  import { IRTEProps } from './rich-text-editor.types';
2
- declare const RichTextEditor: ({ id, value, placeholder, maxLength, meta, functions, autoFocus, data, styling, ...props }: IRTEProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const RichTextEditor: ({ id, value, placeholder, maxLength, meta, functions, autoFocus, data, ...props }: IRTEProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default RichTextEditor;
@@ -42,13 +42,6 @@ export interface IRTEProps {
42
42
  'aria-errormessage'?: string;
43
43
  /** Optional data for the editor */
44
44
  data?: IRTEData;
45
- /** Optional styling */
46
- styling?: {
47
- /** Optional toolbar styling */
48
- toolbar?: {
49
- showHeadingOption?: boolean;
50
- };
51
- };
52
45
  }
53
46
  export interface IRTEInitialState {
54
47
  editorKey: string | null;
@@ -85,8 +78,7 @@ export declare enum Formatting {
85
78
  paragraph = "paragraph",
86
79
  ul = "ul_list",
87
80
  strikethrough = "strikeThrough",
88
- span = "span",
89
- h3 = "h3"
81
+ span = "span"
90
82
  }
91
83
  export declare enum Marks {
92
84
  delete = "delete_mark",
@@ -96,9 +88,6 @@ export declare enum Marks {
96
88
  }
97
89
  export interface BaseProps {
98
90
  className?: string;
99
- styling?: {
100
- showHeadingOption?: boolean;
101
- };
102
91
  [key: string]: unknown;
103
92
  }
104
93
  export type BlockOptionType = Formatting.blockquote | Formatting.link | Formatting.li | Formatting.mention | Formatting.ol | Formatting.ul | Formatting.paragraph | Formatting.span;
@@ -110,12 +99,11 @@ export interface MentionElement extends BaseElement {
110
99
  id: string;
111
100
  name?: string;
112
101
  }
113
- export type MarkOptionType = Formatting.bold | Formatting.italic | Formatting.strikethrough | Formatting.h3;
102
+ export type MarkOptionType = Formatting.bold | Formatting.italic | Formatting.strikethrough;
114
103
  export interface TypeText extends BaseText {
115
104
  [Formatting.bold]?: boolean;
116
105
  [Formatting.italic]?: boolean;
117
106
  [Formatting.strikethrough]?: boolean;
118
- [Formatting.h3]?: boolean;
119
107
  }
120
108
  export type OptionTypes = {
121
109
  format: BlockOptionType | MarkOptionType;
package/helpers/intl.d.ts CHANGED
@@ -297,7 +297,6 @@ export declare const checkIntlPathExists: (path: string, language?: {
297
297
  richTextEditor_placeholder: string;
298
298
  richTextEditor_toolbar: string;
299
299
  richTextEditor_bold: string;
300
- richTextEditor_h3: string;
301
300
  richTextEditor_italic: string;
302
301
  richTextEditor_strikeThrough: string;
303
302
  richTextEditor_link: string;
@@ -7,7 +7,6 @@ declare const _default: (hasTooltip?: boolean) => {
7
7
  onMouseOut?: undefined;
8
8
  onFocus?: undefined;
9
9
  onBlur?: undefined;
10
- tabIndex?: undefined;
11
10
  };
12
11
  } | {
13
12
  showTooltip: boolean;
@@ -18,7 +17,6 @@ declare const _default: (hasTooltip?: boolean) => {
18
17
  onMouseOut: () => void;
19
18
  onFocus: () => void;
20
19
  onBlur: () => void;
21
- tabIndex: number;
22
20
  };
23
21
  };
24
22
  export default _default;