@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.
- package/cards/card/card.d.ts +1 -1
- package/cards/cards.types.d.ts +7 -2
- package/cards/carousel/components/carousel/carousel.helpers.d.ts +4 -1
- package/form/components/rich-text-editor/components/toolbar/toolbar.d.ts +1 -1
- package/form/components/rich-text-editor/rich-text-editor.d.ts +1 -1
- package/form/components/rich-text-editor/rich-text-editor.types.d.ts +2 -14
- package/helpers/intl.d.ts +0 -1
- package/hooks/use-tooltips.d.ts +0 -2
- package/index.js +40 -40
- package/index.mjs +4932 -4955
- package/package.json +1 -1
- package/style.css +1 -1
- package/text/pill/pill.d.ts +4 -1
- package/form/components/rich-text-editor/components/toolbar/components/header-option/header-option.d.ts +0 -2
- package/form/components/rich-text-editor/components/toolbar/components/header-option/index.d.ts +0 -1
package/cards/card/card.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import type { CardProps } from './../cards.types';
|
|
2
|
-
declare const Card: ({ id, className, buildCardData, buildMemberData, card, cta, gtmContext, handleCardClick,
|
|
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;
|
package/cards/cards.types.d.ts
CHANGED
|
@@ -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
|
-
/**
|
|
97
|
-
|
|
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[]) =>
|
|
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: ({
|
|
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,
|
|
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
|
|
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;
|
package/hooks/use-tooltips.d.ts
CHANGED
|
@@ -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;
|