@apolitical/component-library 3.2.0-beta.1 → 3.2.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 (68) hide show
  1. package/accessibility/visually-hidden/visually-hidden.d.ts +1 -3
  2. package/banners/index.d.ts +0 -1
  3. package/{text/content-type-label/content-type-label.helpers.d.ts → cards/card/card.helpers.d.ts} +1 -1
  4. package/cards/cards.types.d.ts +1 -3
  5. package/cards/mocks/mocks.helpers.d.ts +0 -16
  6. package/constants/index.d.ts +0 -1
  7. package/general/index.d.ts +0 -2
  8. package/general/link/link.d.ts +0 -2
  9. package/helpers/cases.d.ts +0 -2
  10. package/helpers/intl.d.ts +1 -378
  11. package/index.d.ts +1 -3
  12. package/index.js +18 -18
  13. package/index.mjs +5520 -6071
  14. package/loaders/progress-bar/progress-bar.d.ts +1 -11
  15. package/modals/invite-modal/invite-modal.d.ts +2 -2
  16. package/navigation/load-more/load-more.d.ts +1 -2
  17. package/package.json +1 -1
  18. package/sections/full-width-section/full-width-section.d.ts +0 -2
  19. package/sections/logo-section/logo-section.d.ts +1 -11
  20. package/style.css +1 -1
  21. package/styles/base/_layout.scss +9 -3
  22. package/styles/base/_lists.scss +1 -29
  23. package/styles/base/_text.scss +1 -1
  24. package/styles/base/_titles.scss +0 -14
  25. package/styles/base/buttons/_button-wrapper.scss +0 -2
  26. package/styles/base/buttons/_icons.scss +0 -9
  27. package/styles/variables/colors/theme/_banners.scss +0 -8
  28. package/styles/variables/colors/theme/_base.scss +0 -2
  29. package/styles/variables/colors/theme/_general.scss +0 -2
  30. package/styles/variables/colors/theme/_index.scss +4 -5
  31. package/styles/variables/colors/theme/_layout.scss +0 -1
  32. package/styles/variables/colors/theme/_loaders.scss +0 -4
  33. package/styles/variables/colors/theme/_text.scss +0 -12
  34. package/styles/variables/sizes/_common.scss +3 -0
  35. package/text/collapsible-section/collapsible-section.d.ts +4 -4
  36. package/text/highlighted-text-box/highlighted-text-box.d.ts +2 -9
  37. package/text/index.d.ts +0 -2
  38. package/text/markdown-text/components/div/div.d.ts +1 -1
  39. package/text/markdown-text/markdown-text.d.ts +1 -5
  40. package/text/pill/pill.d.ts +1 -1
  41. package/banners/custom-content-banner/custom-content-banner.d.ts +0 -13
  42. package/banners/custom-content-banner/index.d.ts +0 -1
  43. package/constants/courses.d.ts +0 -5
  44. package/courses/course-progression/course-progression.d.ts +0 -7
  45. package/courses/course-progression/course-progression.types.d.ts +0 -28
  46. package/courses/course-progression/index.d.ts +0 -1
  47. package/courses/course-structure/course-structure.d.ts +0 -3
  48. package/courses/course-structure/course-structure.mock.d.ts +0 -122
  49. package/courses/course-structure/course-structure.types.d.ts +0 -55
  50. package/courses/course-structure/index.d.ts +0 -1
  51. package/courses/index.d.ts +0 -5
  52. package/courses/lesson-name/index.d.ts +0 -1
  53. package/courses/lesson-name/lesson-name.d.ts +0 -19
  54. package/courses/lesson-type/index.d.ts +0 -1
  55. package/courses/lesson-type/lesson-type.d.ts +0 -10
  56. package/courses/mark-complete-button/index.d.ts +0 -1
  57. package/courses/mark-complete-button/mark-complete-button.d.ts +0 -7
  58. package/general/table-of-contents/index.d.ts +0 -1
  59. package/general/table-of-contents/table-of-contents.d.ts +0 -16
  60. package/general/time-to-complete/index.d.ts +0 -1
  61. package/general/time-to-complete/time-to-complete.d.ts +0 -14
  62. package/styles/variables/colors/theme/_courses.scss +0 -22
  63. package/text/collapsible-section/accordian.d.ts +0 -15
  64. package/text/content-type-label/content-type-label.d.ts +0 -14
  65. package/text/content-type-label/content-type-label.types.d.ts +0 -1
  66. package/text/content-type-label/index.d.ts +0 -2
  67. package/text/icon-bulleted-list/icon-bulleted-list.d.ts +0 -31
  68. package/text/icon-bulleted-list/index.d.ts +0 -1
@@ -7,13 +7,19 @@
7
7
 
8
8
  .center {
9
9
  text-align: center;
10
- margin-right: auto;
10
+ }
11
+
12
+ .content-slim,
13
+ .content-slimmest {
11
14
  margin-left: auto;
15
+ margin-right: auto;
12
16
  }
13
17
 
14
18
  .content-slim {
15
19
  max-width: px-to-rem($content-slim-width);
16
- margin-left: auto;
17
- margin-right: auto;
20
+ }
21
+
22
+ .content-slimmest {
23
+ max-width: px-to-rem($content-slimmest-width);
18
24
  }
19
25
  }
@@ -1,14 +1,9 @@
1
- @import './../mixins', './../functions', './../variables';
1
+ @import './../functions';
2
2
 
3
3
  $ul: (
4
4
  'margin-bottom': 16,
5
5
  'padding-left': 40,
6
6
  );
7
- $checkmarks: (
8
- 'width': 16,
9
- 'top': 7,
10
- 'margin-right': 12,
11
- );
12
7
  $li: (
13
8
  'margin-bottom': 18,
14
9
  'margin-bottom_sm': 12,
@@ -23,29 +18,6 @@ $li: (
23
18
  display: block;
24
19
  }
25
20
 
26
- ul.checkmarks {
27
- list-style: none;
28
-
29
- li {
30
- position: relative;
31
- padding-left: px-to-rem(
32
- get-map($checkmarks, 'width') + get-map($checkmarks, 'margin-right')
33
- );
34
-
35
- &::before {
36
- @include image('icons/check-inside-circle.svg', true);
37
-
38
- content: '';
39
- width: px-to-rem(get-map($checkmarks, 'width'));
40
- height: px-to-rem(get-map($checkmarks, 'width'));
41
- background: get-map($theme, 'list_checkmarks_bg');
42
- position: absolute;
43
- top: px-to-rem(get-map($checkmarks, 'top'));
44
- left: 0;
45
- }
46
- }
47
- }
48
-
49
21
  li {
50
22
  margin-bottom: px-to-rem(get-map($li, 'margin-bottom'));
51
23
 
@@ -24,7 +24,7 @@ $medium: (
24
24
  $sup: (
25
25
  'font-size': 10,
26
26
  );
27
- $standard-text-elements: p, li, dt, dd, summary;
27
+ $standard-text-elements: p, li, dt, dd;
28
28
  $special-text-elements: h1, h2, h3, h4, h5, h6, a, small;
29
29
 
30
30
  @layer base {
@@ -5,9 +5,6 @@ $highlight: (
5
5
  'height': 4,
6
6
  'margin-top': 12,
7
7
  'border-radius': 8,
8
- 'width_vertical': 4,
9
- 'height_vertical': 24,
10
- 'bottom_vertical': 26,
11
8
  );
12
9
  $pre-title: (
13
10
  'font-size': 14,
@@ -107,17 +104,6 @@ $count-icon: (
107
104
  left: 50%;
108
105
  transform: translateX(-50%);
109
106
  }
110
- } @else if $align == 'vertical' {
111
- padding-left: px-to-rem(
112
- get-map($highlight, 'height') + get-map($highlight, 'margin-top')
113
- );
114
-
115
- &::after {
116
- width: px-to-rem(get-map($highlight, 'width_vertical'));
117
- height: px-to-rem(get-map($highlight, 'height_vertical'));
118
- bottom: px-to-rem(get-map($highlight, 'bottom_vertical'));
119
- max-height: 100%;
120
- }
121
107
  }
122
108
  }
123
109
 
@@ -9,7 +9,6 @@ $button-wrapper-button: (
9
9
  list-style: none;
10
10
  margin: 0 auto;
11
11
  padding: 0;
12
- line-height: normal;
13
12
  display: flex;
14
13
  flex-flow: row wrap;
15
14
  place-content: center;
@@ -23,7 +22,6 @@ $button-wrapper-button: (
23
22
  }
24
23
 
25
24
  li {
26
- line-height: normal;
27
25
  display: flex;
28
26
  align-content: center;
29
27
 
@@ -9,18 +9,9 @@
9
9
 
10
10
  $icons: ('arrow_left', (d, d, 3, 8), (d, d, 3, 8), (d, d, 4, 7)),
11
11
  ('arrow_right', (d, d, 3, 8), (d, d, 3, 8), (d, d, 4, 7)),
12
- ('arrow_rotating', (20, 20, 2, d), (d, d, 2, d), (15, 15, d, d)),
13
12
  ('arrow_corner-down_right', (12, 12, 6, 8), (12, 12, 4, 12), (d, d, d, d)),
14
13
  ('arrow_corner-down_left', (12, 12, 6, 8), (12, 12, 4, 12), (d, d, d, d)),
15
14
  ('arrow-down', (d, d, 4, 10), (d, d, 3, 8), (d, d, 4, d)),
16
- ('check-inside-circle', (28, 28, -2, d), (d, d, 3, d), (d, d, d, d)),
17
- ('check-inside-circle_no-overlap', (28, 28, -2, d), (24, 24, -2, d), (d, d, 2, d)),
18
- (
19
- 'check-inside-circle_no-overlap_inverted',
20
- (28, 28, -2, d),
21
- (24, 24, -2, d),
22
- (d, d, 2, d)
23
- ),
24
15
  ('chevron_left', (16, 16, 4, 8), (14, 14, 3, 8), (14, 14, d, d)),
25
16
  ('chevron_right', (16, 16, 4, 8), (14, 14, 3, 8), (14, 14, d, d)),
26
17
  ('close', (48, 48, 0, 0), (32, 32, 0, 0), (24, 24, 0, 0)),
@@ -14,14 +14,6 @@ $banners: (
14
14
  banner-section_eyebrow: get-map($c, 'y300'),
15
15
  banner-section_light_eyebrow: get-map($c, 'b700'),
16
16
  banner-section_light_title: get-map($c, 'n900'),
17
- custom-content-banner: get-map($c, 'n900'),
18
- custom-content-banner_bg: get-map($c, 'n50'),
19
- custom-content-banner_overlay:
20
- linear-gradient(90deg, #{get-map($c, 'n50')} 50%, rgb(240 245 255 / 0%) 100%),
21
- custom-content-banner_dark: get-map($c, 'white'),
22
- custom-content-banner_dark_bg: get-map($c, 'b900'),
23
- custom-content-banner_dark_overlay:
24
- linear-gradient(273deg, rgb(126 115 182 / 0%) 5.36%, #{get-map($c, 'b900')} 47.32%),
25
17
  marketing-block_title: get-map($c, 'n900'),
26
18
  marketing-block_tertiary_title: get-map($c, 'white'),
27
19
  marketing-block_text: get-map($c, 'n700'),
@@ -85,6 +85,4 @@ $base: (
85
85
  table_th: get-map($c, 'white'),
86
86
  table_th_bg: get-map($c, 'n600'),
87
87
  overlay: rgb(21 25 33 / 25%),
88
- list_checkmarks_bg:
89
- linear-gradient(140deg, rgba(107 62 205 / 100%), rgba(0 179 191 / 100%)),
90
88
  );
@@ -9,8 +9,6 @@ $general: (
9
9
  return_to_nav_box_shadow: get-map($c, 'black'),
10
10
  return_to_nav_bg_focus_active: get-map($c, 'white'),
11
11
  return_to_nav_bg_before_after: get-map($c, 'b700'),
12
- table-of-contents_border: get-map($c, 'b200'),
13
- time-to-complete: get-map($c, 'p500'),
14
12
  tooltip: get-map($c, 'white'),
15
13
  tooltip_bg: color.adjust(get-map($c, 'n900'), $alpha: -0.1),
16
14
  );
@@ -1,9 +1,8 @@
1
1
  @import './../../../functions';
2
- @import 'banners', 'base', 'cards', 'communities', 'courses', 'discussion', 'form',
3
- 'general', 'layout', 'loaders', 'modals', 'navigation', 'pages', 'sections', 'text',
4
- 'user';
2
+ @import 'banners', 'base', 'cards', 'communities', 'discussion', 'form', 'general',
3
+ 'layout', 'loaders', 'modals', 'navigation', 'pages', 'sections', 'text', 'user';
5
4
 
6
5
  $theme: merge-maps(
7
- $banners $base $cards $communities $courses $discussion $form $general $layout $loaders
8
- $modals $navigation $pages $sections $text $user
6
+ $banners $base $cards $communities $discussion $form $general $layout $loaders $modals
7
+ $navigation $pages $sections $text $user
9
8
  );
@@ -38,7 +38,6 @@ $layout: (
38
38
  header_border: get-map($c, 'n100'),
39
39
  logos_title: get-map($c, 'n700'),
40
40
  logos_small: get-map($c, 'n600'),
41
- logos_wrapped-logo_bg: get-map($c, 'white'),
42
41
  page-layout_gradient_bg_1: get-map($c, 'n50'),
43
42
  page-layout_subtle_bg: rgb(43 137 117 / 10%),
44
43
  page-layout_gradient_bg_2: rgb(240 245 255 / 0%),
@@ -17,8 +17,4 @@ $loaders: (
17
17
  progress-bar_75_bg_2: get-map($c, 'b200'),
18
18
  progress-bar_100_bg_1: get-map($c, 'b200'),
19
19
  progress-bar_100_bg_2: get-map($c, 'g100'),
20
- progress-bar_circle_inner: get-map($c, 'white'),
21
- progress-bar_circle_bg: get-map($c, 'n100'),
22
- progress-bar_circle_progress: get-map($c, 'g300'),
23
- progress-bar_circle_dark_progress: get-map($c, 'b700'),
24
20
  );
@@ -18,37 +18,25 @@ $text: (
18
18
  highlighted-text-box_bg: get-map($c, 'n50'),
19
19
  highlighted-text-box_secondary_bg: get-map($c, 'y50'),
20
20
  highlighted-text-box_tertiary_bg: get-map($c, 'error50'),
21
- highlighted-text-box_quaternary_bg: get-map($c, 'g50'),
22
21
  highlighted-text-box_subtle_bg: get-map($c, 'white'),
23
- highlighted-text-box_subtle-alt_dark_bg: get-map($c, 'n50'),
24
22
  highlighted-text-box_bold_bg:
25
23
  linear-gradient(135deg, get-map($c, 'b100'), get-map($c, 'g50')),
26
24
  highlighted-text-box_subtle_gradient:
27
25
  linear-gradient(rgba(255 255 255 / 0%), rgba(255 255 255 / 100%)),
28
26
  highlighted-text-box_bold_icon: get-map($c, 'b500'),
29
27
  highlighted-text-box_subtle_border: get-map($c, 'n100'),
30
- highlighted-text-box_subtle-alt_border: get-map($c, 'n200'),
31
28
  highlighted-text-box_muted_bg: get-map($c, 'n40'),
32
29
  highlighted-text-box_muted_icon: get-map($c, 'n600'),
33
- highlighted-text-box_quaternary_highlight: get-map($c, 'g300'),
34
- highlighted-text-box_subtle-alt_highlight: get-map($c, 'g300'),
35
- icon-bulleted-list: get-map($c, 'b700'),
36
- icon-bulleted-list_light: get-map($c, 'y300'),
37
- icon-bulleted-list_muted: get-map($c, 'n700'),
38
- icon-bulleted-list_border: get-map($c, 'n200'),
39
- icon-bulleted-list_zebra_bg: get-map($c, 'n50'),
40
30
  page-heading_bg:
41
31
  linear-gradient(180deg, get-map($c, 'n50') 0%, rgb(240 245 255 / 0%) 100%),
42
32
  page-heading_subtitle: get-map($c, 'n700'),
43
33
  page-user_location_text: get-map($c, 'p500'),
44
34
  pill: get-map($c, 'n900'),
45
35
  pill_highlighted: get-map($c, 'n700'),
46
- pill_highlighted-light: get-map($c, 'n900'),
47
36
  pill_registered: get-map($c, 'g700'),
48
37
  pill_bg: get-map($c, 'n200'),
49
38
  pill_subtle_bg: get-map($c, 'white'),
50
39
  pill_highlighted_bg: get-map($c, 'y300'),
51
- pill_highlighted-light_bg: get-map($c, 'y100'),
52
40
  pill_light_bg: get-map($c, 'info50'),
53
41
  pill_information_bg: get-map($c, 'g100'),
54
42
  pill_registered_bg: get-map($c, 'g50'),
@@ -5,3 +5,6 @@ $outline: 0 0 0 $outline-width;
5
5
 
6
6
  // This is used for the width of a slimmer layout column.
7
7
  $content-slim-width: 1040;
8
+
9
+ // This is used for the width of the slimmest layout column.
10
+ $content-slimmest-width: 752;
@@ -1,13 +1,13 @@
1
1
  import React from 'react';
2
2
  interface Props {
3
3
  /** The text to show when the section is collapsed */
4
- label?: string | React.ReactNode | false;
4
+ label?: string | false;
5
5
  /** Additional classes to add to the `details` */
6
6
  className?: string;
7
7
  /** The content to show when the section is expanded */
8
8
  children?: React.ReactNode;
9
- /** Whether the section should animate when opening/closing */
10
- shouldAnimate?: boolean;
9
+ /** The language to use for the text */
10
+ locale?: string;
11
11
  }
12
- declare const CollapsibleSection: ({ label, className, children, shouldAnimate, }: Props) => import("react/jsx-runtime").JSX.Element;
12
+ declare const CollapsibleSection: ({ label, className, children }: Props) => import("react/jsx-runtime").JSX.Element;
13
13
  export default CollapsibleSection;
@@ -1,16 +1,9 @@
1
1
  import React from 'react';
2
2
  interface Props {
3
3
  /** The style of box being rendered */
4
- variant?: 'primary' | 'secondary' | 'tertiary' | 'quaternary' | 'subtle' | 'subtle-alt' | 'bold' | 'muted';
4
+ variant?: 'primary' | 'secondary' | 'tertiary' | 'subtle' | 'bold' | 'muted';
5
5
  /** The name of an icon file to display at the top */
6
6
  icon?: string;
7
- /** Optional styling for the box */
8
- styling?: {
9
- /** Whether to show a highlight at the bottom of the box, for `subtle-alt` */
10
- showHighlight?: boolean;
11
- /** The background of the box, for `subtle-alt`. Defaults to `default` */
12
- background?: 'default' | 'dark';
13
- };
14
7
  /** Additional classes to add to the box */
15
8
  className?: string;
16
9
  /** The content to display */
@@ -18,5 +11,5 @@ interface Props {
18
11
  /** Additional props to pass to the box */
19
12
  style?: React.CSSProperties;
20
13
  }
21
- declare const HighlightedTextBoxWrapper: ({ variant, icon, styling, className, children, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
14
+ declare const HighlightedTextBoxWrapper: ({ variant, icon, className, children, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
22
15
  export default HighlightedTextBoxWrapper;
package/text/index.d.ts CHANGED
@@ -1,10 +1,8 @@
1
1
  export * from './collapsible-section';
2
- export * from './content-type-label';
3
2
  export * from './empty-state-box';
4
3
  export * from './helper-text-box';
5
4
  export * from './hide-show-text-box';
6
5
  export * from './highlighted-text-box';
7
- export * from './icon-bulleted-list';
8
6
  export * from './markdown-text';
9
7
  export * from './page-heading';
10
8
  export * from './pill';
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  declare const _default: ({ children, ...props }: {
3
3
  children: React.ReactNode | string;
4
4
  class?: string | undefined;
5
- }) => string | number | boolean | Iterable<React.ReactNode> | import("react/jsx-runtime").JSX.Element | null | undefined;
5
+ }) => import("react/jsx-runtime").JSX.Element;
6
6
  export default _default;
@@ -7,10 +7,6 @@ interface Props {
7
7
  children: string;
8
8
  /** What is being changed or removed in the final mark-up. `default` handles large blocks of HTML for courses. `text-only` only expects text and will remove `iframe`s. */
9
9
  overrideType?: 'default' | 'text-only';
10
- styling?: {
11
- /** Whether to highlight the titles */
12
- highlightTitles?: boolean;
13
- };
14
10
  }
15
- declare const MarkdownText: ({ className, options, children, overrideType, styling, }: Props) => import("react/jsx-runtime").JSX.Element;
11
+ declare const MarkdownText: ({ className, options, children, overrideType, }: Props) => import("react/jsx-runtime").JSX.Element;
16
12
  export default MarkdownText;
@@ -3,7 +3,7 @@ interface Props {
3
3
  /** The size of the pill */
4
4
  size?: 'small' | 'medium' | 'large';
5
5
  /** The style of the pill */
6
- variant?: 'default' | 'subtle' | 'highlighted' | 'highlighted-light' | 'information' | 'registered' | 'light';
6
+ variant?: 'default' | 'subtle' | 'highlighted' | 'information' | 'registered' | 'light';
7
7
  /** Additional classes to add to the pill */
8
8
  className?: string;
9
9
  /** The pill text */
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- interface Props {
3
- /** The image to show on the banner */
4
- image?: string;
5
- /** The color variant of the list */
6
- variant?: 'default' | 'dark';
7
- /** The content to show */
8
- children: React.ReactNode;
9
- /** Additional classes */
10
- className?: string;
11
- }
12
- declare const CustomContentBanner: ({ image, variant, children, className, }: Props) => import("react/jsx-runtime").JSX.Element;
13
- export default CustomContentBanner;
@@ -1 +0,0 @@
1
- export { default as CustomContentBanner } from './custom-content-banner';
@@ -1,5 +0,0 @@
1
- export declare const COURSE_CONTENT_TYPES: {
2
- ARTICLE: string;
3
- DISCUSSION: string;
4
- QUIZ: string;
5
- };
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- import { ICourseProgressionTypes } from './course-progression.types';
3
- declare const CourseProgression: ({ element, data: { timeLeftToFinish, percentageCompleted: { inTime, inLessons }, shouldShowTimes, }, graph, styling, className, }: ICourseProgressionTypes) => React.DetailedReactHTMLElement<{
4
- className: string;
5
- children: import("react/jsx-runtime").JSX.Element;
6
- }, HTMLElement>;
7
- export default CourseProgression;
@@ -1,28 +0,0 @@
1
- export interface ICourseProgressionData {
2
- /** The amount of time the remaining, completeable lessons will take to finish, in minutes */
3
- timeLeftToFinish: number;
4
- /** The percentage of the course that has been completed */
5
- percentageCompleted: {
6
- /** The percentage of timed lessons complete - this is used when the course shows the time for lessons */
7
- inTime?: number;
8
- /** The percentage of total, completeable lessons complete - this is used when the course hides the time for lessons */
9
- inLessons?: number;
10
- };
11
- /** Whether the course shows the time for lessons */
12
- shouldShowTimes?: boolean;
13
- }
14
- export interface ICourseProgressionTypes {
15
- /** The element to wrap the course progression in */
16
- element?: 'p' | 'aside' | 'div';
17
- /** The data to display */
18
- data: ICourseProgressionData;
19
- /** The type of graph to display */
20
- graph?: 'bar' | 'circle' | false;
21
- /** Styling options */
22
- styling?: {
23
- /** Whether to highlight the percentage text */
24
- highlightPercentage?: boolean;
25
- };
26
- /** Additional classes */
27
- className?: string;
28
- }
@@ -1 +0,0 @@
1
- export { default as CourseProgression } from './course-progression';
@@ -1,3 +0,0 @@
1
- import { ICourseStructure } from './course-structure.types';
2
- declare const CourseStructure: ({ course: { articles, canAccessCourse, description, hideTimes, isEnrolled, sectionId, sectionTime, slug: microcourseSlug, timeLeft, title, }, quizScores, }: ICourseStructure) => import("react/jsx-runtime").JSX.Element;
3
- export default CourseStructure;
@@ -1,122 +0,0 @@
1
- export default data;
2
- declare namespace data {
3
- namespace course {
4
- let articles: ({
5
- title: string;
6
- slug: string;
7
- subsectionId: number;
8
- humanTranslation: boolean;
9
- completionTime: number;
10
- type: string;
11
- icon: string;
12
- content: {
13
- sys: {
14
- type: string;
15
- linkType: string;
16
- id: string;
17
- };
18
- };
19
- optional: boolean;
20
- contentType: string;
21
- createdAt: string;
22
- updatedAt: string;
23
- image: null;
24
- isIntroduction: boolean;
25
- completed: boolean;
26
- sectionId: number;
27
- description?: undefined;
28
- questions?: undefined;
29
- question?: undefined;
30
- } | {
31
- title: string;
32
- slug: string;
33
- subsectionId: number;
34
- humanTranslation: boolean;
35
- completionTime: number;
36
- type: string;
37
- icon: string;
38
- content: {
39
- sys: {
40
- type: string;
41
- linkType: string;
42
- id: string;
43
- };
44
- };
45
- optional: boolean;
46
- contentType: string;
47
- createdAt: string;
48
- updatedAt: string;
49
- image: string;
50
- isIntroduction: boolean;
51
- completed: boolean;
52
- sectionId: number;
53
- description?: undefined;
54
- questions?: undefined;
55
- question?: undefined;
56
- } | {
57
- title: string;
58
- slug: string;
59
- subsectionId: number;
60
- description: string;
61
- questions: {
62
- sys: {
63
- type: string;
64
- linkType: string;
65
- id: string;
66
- };
67
- }[];
68
- optional: boolean;
69
- contentType: string;
70
- createdAt: string;
71
- updatedAt: string;
72
- icon: string;
73
- type: string;
74
- completed: boolean;
75
- sectionId: number;
76
- humanTranslation?: undefined;
77
- completionTime?: undefined;
78
- content?: undefined;
79
- image?: undefined;
80
- isIntroduction?: undefined;
81
- question?: undefined;
82
- } | {
83
- title: string;
84
- slug: string;
85
- subsectionId: number;
86
- description: string;
87
- question: {
88
- sys: {
89
- type: string;
90
- linkType: string;
91
- id: string;
92
- };
93
- };
94
- optional: boolean;
95
- contentType: string;
96
- createdAt: string;
97
- updatedAt: string;
98
- icon: string;
99
- type: string;
100
- completed: boolean;
101
- sectionId: number;
102
- humanTranslation?: undefined;
103
- completionTime?: undefined;
104
- content?: undefined;
105
- image?: undefined;
106
- isIntroduction?: undefined;
107
- questions?: undefined;
108
- })[];
109
- let canAccessCourse: boolean;
110
- let description: string;
111
- let hideTimes: boolean;
112
- let isEnrolled: boolean;
113
- let sectionId: number;
114
- let sectionTime: number;
115
- let slug: string;
116
- let timeLeft: number;
117
- let title: string;
118
- }
119
- let quizScores: {
120
- 'check-what-youve-learned-vaw-data-1': number;
121
- };
122
- }
@@ -1,55 +0,0 @@
1
- export interface ILessonType {
2
- /** The time it takes to complete the article */
3
- completionTime: number;
4
- /** The article's icon */
5
- icon: string;
6
- /** Whether the article is optional */
7
- optional: boolean;
8
- /** The article's type */
9
- type: string;
10
- }
11
- export interface ICourseStructureArticles extends ILessonType {
12
- /** The article's content type */
13
- contentType: string;
14
- /** Whether the use has completed the article */
15
- completed: boolean;
16
- /** The article's image */
17
- image?: string;
18
- /** Whether the article is an introduction, which is visible whether the user is enrolled or not */
19
- isIntroduction: boolean;
20
- /** The article's slug */
21
- slug: string;
22
- /** The subsection ID */
23
- subsectionId: number;
24
- /** The article's title */
25
- title: string;
26
- }
27
- export interface ICourseStructureCourse {
28
- /** Articles in the course */
29
- articles: ICourseStructureArticles[];
30
- /** Whether the user can access the course */
31
- canAccessCourse: boolean;
32
- /** Description of the course */
33
- description: string;
34
- /** Whether to hide the times */
35
- hideTimes: boolean;
36
- /** Whether the user is enrolled in the course */
37
- isEnrolled: boolean;
38
- /** The section ID */
39
- sectionId: number;
40
- /** The time it takes to complete the course */
41
- sectionTime: number;
42
- /** The course slug */
43
- slug: string;
44
- /** The time left to complete the course */
45
- timeLeft: number;
46
- /** The course title */
47
- title: string;
48
- }
49
- export interface ICourseStructure {
50
- /** Details about the course */
51
- course: ICourseStructureCourse;
52
- quizScores?: {
53
- [key: string]: number;
54
- };
55
- }
@@ -1 +0,0 @@
1
- export { default as CourseStructure } from './course-structure';
@@ -1,5 +0,0 @@
1
- export * from './course-progression';
2
- export * from './course-structure';
3
- export * from './lesson-name';
4
- export * from './lesson-type';
5
- export * from './mark-complete-button';
@@ -1 +0,0 @@
1
- export { default as LessonName } from './lesson-name';
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- interface Props {
3
- /** The element to use for the lesson name */
4
- element?: 'h1' | 'span';
5
- /** The ID of the lesson section */
6
- sectionId: number;
7
- /** The ID of the section article */
8
- subsectionId: number;
9
- /** The title of the lesson */
10
- title: string;
11
- /** Additional classes */
12
- className?: string;
13
- }
14
- declare const LessonName: ({ element, sectionId, subsectionId, title, className, }: Props) => React.DetailedReactHTMLElement<{
15
- className: string;
16
- 'data-number': string;
17
- children: string;
18
- }, HTMLElement>;
19
- export default LessonName;
@@ -1 +0,0 @@
1
- export { default as LessonType } from './lesson-type';
@@ -1,10 +0,0 @@
1
- import React from 'react';
2
- import { ILessonType } from './../course-structure/course-structure.types';
3
- interface LessonTypeProps extends ILessonType {
4
- /** The size of the component */
5
- size?: 'default' | 'large';
6
- /** Optional children */
7
- children?: React.ReactNode;
8
- }
9
- declare const LessonType: ({ size, completionTime, icon, optional, type, children, }: LessonTypeProps) => import("react/jsx-runtime").JSX.Element;
10
- export default LessonType;
@@ -1 +0,0 @@
1
- export { default as MarkCompleteButton } from './mark-complete-button';