@apolitical/component-library 3.3.1-ac.5 → 3.3.1-beta.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/accessibility/visually-hidden/visually-hidden.d.ts +3 -1
- package/banners/custom-content-banner/custom-content-banner.d.ts +13 -0
- package/banners/custom-content-banner/index.d.ts +1 -0
- package/banners/index.d.ts +1 -0
- package/cards/cards.types.d.ts +5 -11
- package/cards/mocks/card.d.ts +4 -28
- package/cards/mocks/mocks.helpers.d.ts +16 -49
- package/constants/courses.d.ts +5 -0
- package/constants/index.d.ts +1 -0
- package/context/flags/flags.provider.d.ts +1 -1
- package/context/intl/intl.provider.d.ts +13 -1
- package/courses/course-progression/course-progression.d.ts +7 -0
- package/courses/course-progression/course-progression.types.d.ts +28 -0
- package/courses/course-progression/index.d.ts +1 -0
- package/courses/course-structure/course-structure.d.ts +3 -0
- package/courses/course-structure/course-structure.mock.d.ts +122 -0
- package/courses/course-structure/course-structure.types.d.ts +55 -0
- package/courses/course-structure/index.d.ts +1 -0
- package/courses/index.d.ts +5 -0
- package/courses/lesson-name/index.d.ts +1 -0
- package/courses/lesson-name/lesson-name.d.ts +19 -0
- package/courses/lesson-type/index.d.ts +1 -0
- package/courses/lesson-type/lesson-type.d.ts +10 -0
- package/courses/mark-complete-button/index.d.ts +1 -0
- package/courses/mark-complete-button/mark-complete-button.d.ts +7 -0
- package/general/index.d.ts +2 -0
- package/general/link/link.d.ts +3 -1
- package/general/table-of-contents/index.d.ts +1 -0
- package/general/table-of-contents/table-of-contents.d.ts +16 -0
- package/general/time-to-complete/index.d.ts +1 -0
- package/general/time-to-complete/time-to-complete.d.ts +14 -0
- package/helpers/cases.d.ts +2 -0
- package/helpers/intl.d.ts +381 -1
- package/index.d.ts +3 -1
- package/index.js +18 -18
- package/index.mjs +6404 -5868
- package/layout/page-layout/components/header/header.data.d.ts +6 -14
- package/loaders/progress-bar/progress-bar.d.ts +11 -1
- package/modals/invite-modal/invite-modal.d.ts +2 -2
- package/navigation/language-switcher/language-switcher.d.ts +2 -8
- package/navigation/language-switcher/language-switcher.helpers.d.ts +6 -2
- package/navigation/load-more/load-more.d.ts +2 -1
- package/package.json +1 -1
- package/sections/full-width-section/full-width-section.d.ts +2 -0
- package/sections/logo-section/logo-section.d.ts +11 -1
- package/style.css +1 -1
- package/styles/base/_layout.scss +12 -2
- package/styles/base/_lists.scss +29 -1
- package/styles/base/_text.scss +1 -1
- package/styles/base/_titles.scss +14 -0
- package/styles/base/buttons/_button-wrapper.scss +2 -0
- package/styles/base/buttons/_icons.scss +9 -0
- package/styles/variables/colors/theme/_banners.scss +8 -0
- package/styles/variables/colors/theme/_base.scss +2 -0
- package/styles/variables/colors/theme/_courses.scss +22 -0
- package/styles/variables/colors/theme/_general.scss +2 -0
- package/styles/variables/colors/theme/_index.scss +5 -4
- package/styles/variables/colors/theme/_layout.scss +1 -0
- package/styles/variables/colors/theme/_loaders.scss +4 -0
- package/styles/variables/colors/theme/_text.scss +12 -0
- package/styles/variables/sizes/_common.scss +3 -0
- package/text/collapsible-section/accordian.d.ts +16 -0
- package/text/collapsible-section/collapsible-section.d.ts +4 -4
- package/text/content-type-label/content-type-label.d.ts +14 -0
- package/{cards/card/card.helpers.d.ts → text/content-type-label/content-type-label.helpers.d.ts} +1 -1
- package/text/content-type-label/content-type-label.types.d.ts +1 -0
- package/text/content-type-label/index.d.ts +2 -0
- package/text/highlighted-text-box/highlighted-text-box.d.ts +9 -2
- package/text/icon-bulleted-list/icon-bulleted-list.d.ts +31 -0
- package/text/icon-bulleted-list/index.d.ts +1 -0
- package/text/index.d.ts +2 -0
- package/text/markdown-text/components/div/div.d.ts +1 -1
- package/text/markdown-text/markdown-text.d.ts +5 -1
- package/text/pill/pill.d.ts +2 -4
- package/user/contributors/contributors.d.ts +3 -1
|
@@ -33,14 +33,6 @@ declare namespace _default {
|
|
|
33
33
|
let className_2: string;
|
|
34
34
|
export { className_2 as className };
|
|
35
35
|
}
|
|
36
|
-
export namespace communities {
|
|
37
|
-
let href_4: string;
|
|
38
|
-
export { href_4 as href };
|
|
39
|
-
let gtmType_3: string;
|
|
40
|
-
export { gtmType_3 as gtmType };
|
|
41
|
-
let className_3: string;
|
|
42
|
-
export { className_3 as className };
|
|
43
|
-
}
|
|
44
36
|
}
|
|
45
37
|
let topics_1: {
|
|
46
38
|
order: string[];
|
|
@@ -85,8 +77,8 @@ declare namespace _default {
|
|
|
85
77
|
export { topics_1 as topics };
|
|
86
78
|
}
|
|
87
79
|
namespace partners {
|
|
88
|
-
let
|
|
89
|
-
export {
|
|
80
|
+
let href_4: string;
|
|
81
|
+
export { href_4 as href };
|
|
90
82
|
export let onlyShow: string;
|
|
91
83
|
}
|
|
92
84
|
let account: {
|
|
@@ -109,12 +101,12 @@ declare namespace _default {
|
|
|
109
101
|
let order_3: string[];
|
|
110
102
|
export { order_3 as order };
|
|
111
103
|
export namespace login {
|
|
112
|
-
let
|
|
113
|
-
export {
|
|
104
|
+
let href_5: string;
|
|
105
|
+
export { href_5 as href };
|
|
114
106
|
}
|
|
115
107
|
export namespace signup {
|
|
116
|
-
let
|
|
117
|
-
export {
|
|
108
|
+
let href_6: string;
|
|
109
|
+
export { href_6 as href };
|
|
118
110
|
export namespace props {
|
|
119
111
|
let variant: string;
|
|
120
112
|
}
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface Props {
|
|
3
|
+
styling?: {
|
|
4
|
+
/** Whether to show the text visually. It will always be rendered for screen readers */
|
|
5
|
+
showText?: boolean;
|
|
6
|
+
/** The layout of the progress bar */
|
|
7
|
+
layout?: 'bar' | 'circle';
|
|
8
|
+
/** The size of the progress bar */
|
|
9
|
+
size?: 'default' | 'small';
|
|
10
|
+
/** The color of the progress bar */
|
|
11
|
+
color?: 'default' | 'dark';
|
|
12
|
+
};
|
|
3
13
|
/** The amount of progress, shown as a percent */
|
|
4
14
|
progress?: number;
|
|
5
15
|
/** Text to display for screen readers */
|
|
@@ -9,5 +19,5 @@ interface Props {
|
|
|
9
19
|
/** The language for the text */
|
|
10
20
|
locale?: string;
|
|
11
21
|
}
|
|
12
|
-
declare const _default: React.MemoExoticComponent<({ progress, text, className }: Props) => import("react/jsx-runtime").JSX.Element>;
|
|
22
|
+
declare const _default: React.MemoExoticComponent<({ styling, progress, text, className, }: Props) => import("react/jsx-runtime").JSX.Element>;
|
|
13
23
|
export default _default;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
import React from 'react';
|
|
2
2
|
interface IProps {
|
|
3
3
|
/** The ID of the element */
|
|
4
4
|
id?: string;
|
|
@@ -19,7 +19,7 @@ interface IProps {
|
|
|
19
19
|
/** Form input label */
|
|
20
20
|
formLabel?: string;
|
|
21
21
|
/** CTA button text displayed on the form */
|
|
22
|
-
ctaMessage
|
|
22
|
+
ctaMessage?: string;
|
|
23
23
|
/** Function to send the invites */
|
|
24
24
|
sendInvites(emails: string[]): void;
|
|
25
25
|
/** Whether to show the check icon */
|
|
@@ -1,10 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
en: string;
|
|
3
|
-
es: string;
|
|
4
|
-
fr: string;
|
|
5
|
-
pt: string;
|
|
6
|
-
};
|
|
7
|
-
export type LanguageType = keyof typeof supportedLanguages;
|
|
1
|
+
import { LanguageType } from '../../context';
|
|
8
2
|
export type UrlPartsType = {
|
|
9
3
|
url: string;
|
|
10
4
|
position: 'before-lang' | 'after-lang';
|
|
@@ -23,7 +17,7 @@ interface Props {
|
|
|
23
17
|
};
|
|
24
18
|
};
|
|
25
19
|
/** The function to call when the language is changed */
|
|
26
|
-
onChange?: (language?: LanguageType) => void;
|
|
20
|
+
onChange?: (language?: LanguageType, url?: string) => void;
|
|
27
21
|
/** Additional parts of the URL */
|
|
28
22
|
urlParts?: UrlPartsType;
|
|
29
23
|
/** The version of the language switcher to use */
|
|
@@ -1,2 +1,6 @@
|
|
|
1
|
-
import { LanguageType
|
|
2
|
-
|
|
1
|
+
import { LanguageType } from '../../context';
|
|
2
|
+
import { UrlPartsType } from './language-switcher';
|
|
3
|
+
export declare const getUrl: (lang: LanguageType, slug?: string, urlParts?: UrlPartsType) => string | {
|
|
4
|
+
url: string;
|
|
5
|
+
urlForRouter: string;
|
|
6
|
+
};
|
|
@@ -5,6 +5,7 @@ export interface PaginationType {
|
|
|
5
5
|
hasNextPage: boolean;
|
|
6
6
|
/** The function that will be invoked when the button is clicked */
|
|
7
7
|
loadNextPage: (e: React.MouseEvent<HTMLElement>) => void;
|
|
8
|
+
isLoading?: boolean;
|
|
8
9
|
/** Text displayed in the component */
|
|
9
10
|
messages?: {
|
|
10
11
|
button: string;
|
|
@@ -20,5 +21,5 @@ interface Props extends PaginationType {
|
|
|
20
21
|
}
|
|
21
22
|
interface Props extends ButtonPropsType {
|
|
22
23
|
}
|
|
23
|
-
declare const LoadMore: ({ hasNextPage, loadNextPage, variant, size, styling, icon, messages, className, gtmContext, }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
24
|
+
declare const LoadMore: ({ hasNextPage, loadNextPage, isLoading, variant, size, styling, icon, messages, className, gtmContext, }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
24
25
|
export default LoadMore;
|
package/package.json
CHANGED
|
@@ -10,6 +10,8 @@ interface Props {
|
|
|
10
10
|
children: React.ReactNode | JSX.Element;
|
|
11
11
|
/** Optional ID */
|
|
12
12
|
id?: string;
|
|
13
|
+
/** Optional style */
|
|
14
|
+
style?: React.CSSProperties;
|
|
13
15
|
}
|
|
14
16
|
declare const FullWidthSection: ({ children, className, styling, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
15
17
|
export default FullWidthSection;
|
|
@@ -14,11 +14,21 @@ interface Props {
|
|
|
14
14
|
title?: false | string | {
|
|
15
15
|
element: string;
|
|
16
16
|
text: string;
|
|
17
|
+
className?: string;
|
|
17
18
|
};
|
|
18
19
|
/** The logos to show */
|
|
19
20
|
logos?: Array<LogosType>;
|
|
21
|
+
/** Optional styling */
|
|
22
|
+
styling?: {
|
|
23
|
+
/** Whether the logos should be wrapped in boxes */
|
|
24
|
+
wrapLogos?: boolean;
|
|
25
|
+
/** The alignment of the section */
|
|
26
|
+
align?: 'center' | 'left';
|
|
27
|
+
/** Whether the section is inline or not */
|
|
28
|
+
display?: 'block' | 'inline-block';
|
|
29
|
+
};
|
|
20
30
|
/** Additional classes */
|
|
21
31
|
className?: string;
|
|
22
32
|
}
|
|
23
|
-
declare const LogoSection: ({ title: titleProps, logos, className, }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
33
|
+
declare const LogoSection: ({ title: titleProps, logos, styling, className, }: Props) => import("react/jsx-runtime").JSX.Element | null;
|
|
24
34
|
export default LogoSection;
|