@apolitical/component-library 2.0.2 → 2.0.3-beta.1
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/banners/banner/banner.d.ts +11 -0
- package/banners/banner/index.d.ts +1 -0
- package/banners/banner-section/banner-section.d.ts +1 -1
- package/banners/index.d.ts +1 -0
- package/banners/marketing-block/index.d.ts +1 -1
- package/form/components/index.d.ts +1 -0
- package/form/components/toggle/index.d.ts +1 -0
- package/form/components/toggle/toggle.d.ts +23 -0
- package/index.js +26 -20
- package/index.mjs +6723 -5563
- package/layout/content-layout/columns/columns.d.ts +1 -1
- package/package.json +2 -1
- package/sections/full-width-section/full-width-section.d.ts +6 -1
- package/style.css +1 -1
- package/styles/base/_layout.scss +4 -0
- package/styles/base/_table.scss +2 -0
- package/styles/base/_text.scss +1 -1
- package/styles/base/_titles.scss +10 -0
- package/styles/functions/_maps.scss +18 -2
- package/styles/variables/colors/theme/_banners.scss +3 -0
- package/styles/variables/colors/theme/_form.scss +3 -0
- package/styles/variables/colors/theme/_index.scss +2 -2
- package/styles/variables/colors/theme/_pages.scss +2 -0
- package/styles/variables/colors/theme/_sections.scss +7 -0
- package/styles/variables/colors/theme/_user.scss +1 -0
- package/testing/__mocks__/tabbable.d.ts +2 -0
- package/user/directory/directory.d.ts +18 -0
- package/user/directory/index.d.ts +1 -0
- package/user/index.d.ts +1 -0
package/styles/base/_layout.scss
CHANGED
package/styles/base/_table.scss
CHANGED
package/styles/base/_text.scss
CHANGED
package/styles/base/_titles.scss
CHANGED
|
@@ -45,6 +45,7 @@ $h3: (
|
|
|
45
45
|
'line-height': 28,
|
|
46
46
|
'line-height_md': 32,
|
|
47
47
|
'margin-top': 60,
|
|
48
|
+
'margin-top_sibling': 32,
|
|
48
49
|
'margin-bottom': 20,
|
|
49
50
|
);
|
|
50
51
|
$h4: (
|
|
@@ -174,6 +175,15 @@ $count-icon: (
|
|
|
174
175
|
font-weight: 900;
|
|
175
176
|
line-height: px-to-rem(get-map($h3, 'line-height'));
|
|
176
177
|
|
|
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
|
+
|
|
177
187
|
@include breakpoint('min-width', 'md') {
|
|
178
188
|
font-size: px-to-rem(get-map($h3, 'font-size_md'));
|
|
179
189
|
line-height: px-to-rem(get-map($h3, 'line-height_md'));
|
|
@@ -2,10 +2,26 @@
|
|
|
2
2
|
@use 'sass:map';
|
|
3
3
|
@use 'sass:meta';
|
|
4
4
|
|
|
5
|
-
@function get-map($map, $key) {
|
|
5
|
+
@function get-map($map, $key, $children: ()) {
|
|
6
6
|
@if meta.variable-exists('map') and meta.type-of($map) == map {
|
|
7
7
|
@if map.has-key($map, $key) {
|
|
8
|
-
@
|
|
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
|
+
}
|
|
9
25
|
} @else {
|
|
10
26
|
@error "ERROR: the key `#{$key}` does not exist in map.";
|
|
11
27
|
}
|
|
@@ -3,10 +3,13 @@
|
|
|
3
3
|
|
|
4
4
|
$c: $default-colors;
|
|
5
5
|
$banners: (
|
|
6
|
+
banner_bg: get-map($c, 'n100'),
|
|
6
7
|
banner-section: get-map($c, 'white'),
|
|
7
8
|
banner-section_light: get-map($c, 'n700'),
|
|
8
9
|
banner-section_bg: get-map($c, 'b700'),
|
|
9
10
|
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%),
|
|
10
13
|
banner-section_overlay: get-map($c, 'n900'),
|
|
11
14
|
banner-section_eyebrow: get-map($c, 'y300'),
|
|
12
15
|
banner-section_light_eyebrow: get-map($c, 'b700'),
|
|
@@ -22,4 +22,7 @@ $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'),
|
|
25
28
|
);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
@import './../../../functions';
|
|
2
2
|
@import 'banners', 'base', 'cards', 'communities', 'discussion', 'form', 'general',
|
|
3
|
-
'layout', 'loaders', 'modals', 'navigation', 'pages', 'text', 'user';
|
|
3
|
+
'layout', 'loaders', 'modals', 'navigation', 'pages', 'sections', 'text', 'user';
|
|
4
4
|
|
|
5
5
|
$theme: merge-maps(
|
|
6
6
|
$banners $base $cards $communities $discussion $form $general $layout $loaders $modals
|
|
7
|
-
$navigation $pages $text $user
|
|
7
|
+
$navigation $pages $sections $text $user
|
|
8
8
|
);
|
|
@@ -3,6 +3,8 @@
|
|
|
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'),
|
|
6
8
|
not-found_title: get-map($c, 'y300'),
|
|
7
9
|
not-found_subtitle: get-map($c, 'white'),
|
|
8
10
|
not-found_appended_bg: get-map($c, 'white'),
|
|
@@ -9,6 +9,7 @@ $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%),
|
|
12
13
|
member_highlighted_name: get-map($c, 'p500'),
|
|
13
14
|
member_additional-content: get-map($c, 'n700'),
|
|
14
15
|
member_small: get-map($c, 'n700'),
|
|
@@ -0,0 +1,18 @@
|
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Directory } from './directory';
|
package/user/index.d.ts
CHANGED