@apolitical/component-library 2.0.3-beta.1 → 2.0.4-4125.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 (39) hide show
  1. package/banners/banner-section/banner-section.d.ts +1 -1
  2. package/banners/index.d.ts +0 -1
  3. package/banners/marketing-block/index.d.ts +1 -1
  4. package/form/components/form/form.d.ts +1 -1
  5. package/form/components/form/form.types.d.ts +16 -4
  6. package/form/components/index.d.ts +0 -1
  7. package/form/types/contact-form/contact-form.d.ts +1 -1
  8. package/helpers/validation.d.ts +8 -0
  9. package/index.d.ts +1 -0
  10. package/index.js +20 -26
  11. package/index.mjs +5666 -6801
  12. package/layout/content-layout/columns/columns.d.ts +1 -1
  13. package/layout/content-layout/contact-footer/contact-footer.d.ts +1 -1
  14. package/layout/page-layout/page-layout.d.ts +1 -1
  15. package/package.json +1 -2
  16. package/sections/full-width-section/full-width-section.d.ts +1 -6
  17. package/style.css +1 -1
  18. package/styles/base/_layout.scss +0 -4
  19. package/styles/base/_table.scss +0 -2
  20. package/styles/base/_text.scss +1 -1
  21. package/styles/base/_titles.scss +0 -10
  22. package/styles/functions/_maps.scss +2 -18
  23. package/styles/variables/colors/theme/_banners.scss +0 -3
  24. package/styles/variables/colors/theme/_form.scss +0 -3
  25. package/styles/variables/colors/theme/_index.scss +2 -2
  26. package/styles/variables/colors/theme/_layout.scss +1 -0
  27. package/styles/variables/colors/theme/_pages.scss +0 -2
  28. package/styles/variables/colors/theme/_text.scss +1 -0
  29. package/styles/variables/colors/theme/_user.scss +0 -1
  30. package/text/pill/pill.d.ts +1 -1
  31. package/user/index.d.ts +0 -1
  32. package/banners/banner/banner.d.ts +0 -11
  33. package/banners/banner/index.d.ts +0 -1
  34. package/form/components/toggle/index.d.ts +0 -1
  35. package/form/components/toggle/toggle.d.ts +0 -23
  36. package/styles/variables/colors/theme/_sections.scss +0 -7
  37. package/testing/__mocks__/tabbable.d.ts +0 -2
  38. package/user/directory/directory.d.ts +0 -18
  39. 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'),
@@ -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
  );
@@ -39,6 +39,7 @@ $layout: (
39
39
  logos_title: get-map($c, 'n700'),
40
40
  logos_small: get-map($c, 'n600'),
41
41
  page-layout_gradient_bg_1: get-map($c, 'n50'),
42
+ page-layout_subtle_bg: rgb(43 137 117 / 10%),
42
43
  page-layout_gradient_bg_2: rgb(240 245 255 / 0%),
43
44
  page-layout_bold: get-map($c, 'white'),
44
45
  page-layout_bold_bg: get-map($c, 'b700'),
@@ -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'),
@@ -36,6 +36,7 @@ $text: (
36
36
  pill_bg: get-map($c, 'n200'),
37
37
  pill_subtle_bg: get-map($c, 'white'),
38
38
  pill_highlighted_bg: get-map($c, 'y300'),
39
+ pill_light_bg: get-map($c, 'info50'),
39
40
  pill_information_bg: get-map($c, 'g100'),
40
41
  pill_registered_bg: get-map($c, 'g50'),
41
42
  pill_subtle_border: get-map($c, 'n200'),
@@ -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'),
@@ -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' | 'information' | 'registered';
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 */
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';