@apolitical/component-library 2.0.3-beta.3 → 2.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.
Files changed (34) hide show
  1. package/banners/banner-section/banner-section.d.ts +1 -1
  2. package/banners/highlight-section/highlight-section.d.ts +14 -0
  3. package/banners/highlight-section/index.d.ts +1 -0
  4. package/banners/index.d.ts +1 -1
  5. package/banners/marketing-block/index.d.ts +1 -1
  6. package/form/components/index.d.ts +0 -1
  7. package/index.js +20 -26
  8. package/index.mjs +5606 -6723
  9. package/layout/content-layout/columns/columns.d.ts +1 -1
  10. package/package.json +1 -3
  11. package/sections/full-width-section/full-width-section.d.ts +1 -6
  12. package/style.css +1 -1
  13. package/styles/base/_layout.scss +0 -4
  14. package/styles/base/_table.scss +0 -2
  15. package/styles/base/_text.scss +1 -1
  16. package/styles/base/_titles.scss +0 -10
  17. package/styles/functions/_maps.scss +2 -18
  18. package/styles/variables/colors/theme/_banners.scss +2 -3
  19. package/styles/variables/colors/theme/_form.scss +0 -3
  20. package/styles/variables/colors/theme/_index.scss +2 -2
  21. package/styles/variables/colors/theme/_pages.scss +0 -2
  22. package/styles/variables/colors/theme/_user.scss +0 -1
  23. package/text/index.d.ts +1 -0
  24. package/text/testimonial-block/index.d.ts +1 -0
  25. package/text/testimonial-block/testimonial-block.d.ts +11 -0
  26. package/user/index.d.ts +0 -1
  27. package/banners/banner/banner.d.ts +0 -11
  28. package/banners/banner/index.d.ts +0 -1
  29. package/form/components/toggle/index.d.ts +0 -1
  30. package/form/components/toggle/toggle.d.ts +0 -23
  31. package/styles/variables/colors/theme/_sections.scss +0 -7
  32. package/testing/__mocks__/tabbable.d.ts +0 -2
  33. package/user/directory/directory.d.ts +0 -18
  34. package/user/directory/index.d.ts +0 -1
@@ -5,10 +5,6 @@
5
5
  display: none;
6
6
  }
7
7
 
8
- .center {
9
- text-align: center;
10
- }
11
-
12
8
  .content-slim {
13
9
  max-width: px-to-rem($content-slim-width);
14
10
  margin-left: auto;
@@ -16,8 +16,6 @@ $table: (
16
16
  px-to-rem(get-map($table, 'margin-bottom')) auto;
17
17
  border-collapse: separate;
18
18
  border-spacing: 0;
19
- display: table;
20
- overflow-x: auto;
21
19
 
22
20
  &,
23
21
  p,
@@ -25,7 +25,7 @@ $sup: (
25
25
  'font-size': 10,
26
26
  );
27
27
  $standard-text-elements: p, li, dt, dd;
28
- $special-text-elements: h1, h2, h3, h4, h5, h6, a, small;
28
+ $special-text-elements: h1, h2, h3, h4, h5, h6, a;
29
29
 
30
30
  @layer base {
31
31
  p,
@@ -45,7 +45,6 @@ $h3: (
45
45
  'line-height': 28,
46
46
  'line-height_md': 32,
47
47
  'margin-top': 60,
48
- 'margin-top_sibling': 32,
49
48
  'margin-bottom': 20,
50
49
  );
51
50
  $h4: (
@@ -175,15 +174,6 @@ $count-icon: (
175
174
  font-weight: 900;
176
175
  line-height: px-to-rem(get-map($h3, 'line-height'));
177
176
 
178
- h1 + &,
179
- h2 + &,
180
- h3 + &,
181
- h4 + &,
182
- h5 + &,
183
- h6 + & {
184
- margin-top: px-to-rem(get-map($h3, 'margin-top_sibling'));
185
- }
186
-
187
177
  @include breakpoint('min-width', 'md') {
188
178
  font-size: px-to-rem(get-map($h3, 'font-size_md'));
189
179
  line-height: px-to-rem(get-map($h3, 'line-height_md'));
@@ -2,26 +2,10 @@
2
2
  @use 'sass:map';
3
3
  @use 'sass:meta';
4
4
 
5
- @function get-map($map, $key, $children: ()) {
5
+ @function get-map($map, $key) {
6
6
  @if meta.variable-exists('map') and meta.type-of($map) == map {
7
7
  @if map.has-key($map, $key) {
8
- @if length($children) > 0 {
9
- $map: map.get($map, $key);
10
-
11
- @if length($children) == 1 {
12
- @return map.get($map, $children);
13
- } @else {
14
- $new-list: ();
15
- @for $i from 1 through length($children) {
16
- @if $i != 1 {
17
- $new-list: list.append($new-list, list.nth($children, $i), 'space');
18
- }
19
- }
20
- @return get-map($map, list.nth($children, 1), $new-list);
21
- }
22
- } @else {
23
- @return map.get($map, $key);
24
- }
8
+ @return map.get($map, $key);
25
9
  } @else {
26
10
  @error "ERROR: the key `#{$key}` does not exist in map.";
27
11
  }
@@ -3,13 +3,10 @@
3
3
 
4
4
  $c: $default-colors;
5
5
  $banners: (
6
- banner_bg: get-map($c, 'n100'),
7
6
  banner-section: get-map($c, 'white'),
8
7
  banner-section_light: get-map($c, 'n700'),
9
8
  banner-section_bg: get-map($c, 'b700'),
10
9
  banner-section_light_bg: get-map($c, 'white'),
11
- banner-section_gradient_bg:
12
- linear-gradient(135deg, get-map($c, 'b700') 0%, get-map($c, 'g300') 100%),
13
10
  banner-section_overlay: get-map($c, 'n900'),
14
11
  banner-section_eyebrow: get-map($c, 'y300'),
15
12
  banner-section_light_eyebrow: get-map($c, 'b700'),
@@ -26,4 +23,6 @@ $banners: (
26
23
  marketing-block_primary_bg_2: get-map($c, 'y300'),
27
24
  marketing-block_secondary_bg_2: get-map($c, 'g100'),
28
25
  marketing-block_tertiary_bg_2: get-map($c, 'p600'),
26
+ testimonial-block_author: get-map($c, 'b700'),
27
+ testimonial-block_author_cite: get-map($c, 'n700'),
29
28
  );
@@ -22,7 +22,4 @@ $form: (
22
22
  search_search-button_active_bg: get-map($c, 'white'),
23
23
  show_password: get-map($c, 'n600'),
24
24
  signup_form_error: get-map($c, 'error600'),
25
- toggle_bg: get-map($c, 'n100'),
26
- toggle_on_bg: get-map($c, 'b700'),
27
- toggle_switch_bg: get-map($c, 'white'),
28
25
  );
@@ -1,8 +1,8 @@
1
1
  @import './../../../functions';
2
2
  @import 'banners', 'base', 'cards', 'communities', 'discussion', 'form', 'general',
3
- 'layout', 'loaders', 'modals', 'navigation', 'pages', 'sections', 'text', 'user';
3
+ 'layout', 'loaders', 'modals', 'navigation', 'pages', 'text', 'user';
4
4
 
5
5
  $theme: merge-maps(
6
6
  $banners $base $cards $communities $discussion $form $general $layout $loaders $modals
7
- $navigation $pages $sections $text $user
7
+ $navigation $pages $text $user
8
8
  );
@@ -3,8 +3,6 @@
3
3
 
4
4
  $c: $default-colors;
5
5
  $pages: (
6
- general-website-pages_subtitle: get-map($c, 'n700'),
7
- general-website-pages_subtitle_link: get-map($c, 'n600'),
8
6
  not-found_title: get-map($c, 'y300'),
9
7
  not-found_subtitle: get-map($c, 'white'),
10
8
  not-found_appended_bg: get-map($c, 'white'),
@@ -9,7 +9,6 @@ $user: (
9
9
  contributor_border: get-map($c, 'white'),
10
10
  contributor_inner-border: get-map($c, 'n200'),
11
11
  contributor_label: get-map($c, 'n600'),
12
- directory_hover_image: rgb(57 45 135 / 40%),
13
12
  member_highlighted_name: get-map($c, 'p500'),
14
13
  member_additional-content: get-map($c, 'n700'),
15
14
  member_small: get-map($c, 'n700'),
package/text/index.d.ts CHANGED
@@ -7,3 +7,4 @@ export * from './markdown-text';
7
7
  export * from './page-heading';
8
8
  export * from './pill';
9
9
  export * from './status-banner';
10
+ export * from './testimonial-block';
@@ -0,0 +1 @@
1
+ export { default as TestimonialBlock } from './testimonial-block';
@@ -0,0 +1,11 @@
1
+ /// <reference types="react" />
2
+ export type TestimonialBlockProps = {
3
+ /** The name of the Testimonial's author */
4
+ author?: string;
5
+ /** The citation of the Testimonial's author */
6
+ authorCite?: string;
7
+ /** The content to display */
8
+ content: string;
9
+ };
10
+ declare const _default: import("react").MemoExoticComponent<({ author, authorCite, content }: TestimonialBlockProps) => import("react/jsx-runtime").JSX.Element>;
11
+ export default _default;
package/user/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  export * from './contributors';
2
- export * from './directory';
3
2
  export * from './member';
4
3
  export * from './profile-picture';
@@ -1,11 +0,0 @@
1
- import { ResponsiveImageType } from '../../general';
2
- export interface BannerSectionType {
3
- /** Additional className */
4
- className?: string;
5
- /** The image to display */
6
- image?: string | ResponsiveImageType;
7
- /** Optional data test ID */
8
- testId?: string;
9
- }
10
- declare const Banner: ({ className, image, ...props }: BannerSectionType) => import("react/jsx-runtime").JSX.Element | null;
11
- export default Banner;
@@ -1 +0,0 @@
1
- export { default as Banner } from './banner';
@@ -1 +0,0 @@
1
- export { default as Toggle } from './toggle';
@@ -1,23 +0,0 @@
1
- interface Props {
2
- /** The ID of the toggle */
3
- id?: string;
4
- /** The label to show next to the toggle */
5
- label: string;
6
- /** The options for the toggle */
7
- options: {
8
- /** The text for the option, used for screen readers */
9
- label: string;
10
- /** The value for the option */
11
- value: boolean | string;
12
- }[];
13
- /** The initial value of the toggle */
14
- initialValue?: boolean | string;
15
- /** Callback function to run when the toggle is clicked */
16
- onChange: (value: boolean | string) => void;
17
- /** Whether the toggle is disabled */
18
- isDisabled?: boolean;
19
- /** Additional class names */
20
- className?: string;
21
- }
22
- declare const Toggle: ({ id, label, options, initialValue, onChange, isDisabled, className, }: Props) => import("react/jsx-runtime").JSX.Element;
23
- export default Toggle;
@@ -1,7 +0,0 @@
1
- @import './../colors';
2
- @import './../../../functions';
3
-
4
- $c: $default-colors;
5
- $sections: (
6
- full-width-section_light_bg: get-map($c, 'n50'),
7
- );
@@ -1,2 +0,0 @@
1
- export = tabbable;
2
- declare const tabbable: any;
@@ -1,18 +0,0 @@
1
- interface IDirectoryMember {
2
- /** The member's name */
3
- fullName: string;
4
- /** The member's job title */
5
- jobTitle: string;
6
- /** The organisation the member works for */
7
- organisation?: string;
8
- /** The member's profile picture */
9
- photo?: string;
10
- /** The member's profile text */
11
- text: string;
12
- }
13
- interface Props {
14
- /** The members to show */
15
- members: IDirectoryMember[];
16
- }
17
- declare const Directory: ({ members }: Props) => import("react/jsx-runtime").JSX.Element;
18
- export default Directory;
@@ -1 +0,0 @@
1
- export { default as Directory } from './directory';