@apolitical/component-library 1.14.1 → 1.14.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.
- package/index.js +14 -14
- package/index.mjs +1464 -1357
- package/layout/content-layout/columns/columns.d.ts +1 -1
- package/layout/content-layout/index.d.ts +1 -0
- package/layout/content-layout/top-level-page/index.d.ts +1 -0
- package/layout/content-layout/top-level-page/top-level-page.d.ts +6 -0
- package/navigation/index.d.ts +1 -0
- package/navigation/navigation-menu/index.d.ts +2 -0
- package/navigation/navigation-menu/navigation-menu.d.ts +6 -0
- package/navigation/navigation-menu/navigation-menu.helpers.d.ts +1 -0
- package/package.json +1 -1
- package/style.css +1 -1
- package/styles/base/_text.scss +6 -5
- package/styles/variables/colors/_theme.scss +9 -1
- package/testing/helpers.d.ts +2 -0
- package/testing/index.d.ts +1 -0
- package/text/index.d.ts +1 -0
- package/text/page-heading/index.d.ts +2 -0
- package/text/page-heading/page-heading.d.ts +21 -0
package/styles/base/_text.scss
CHANGED
|
@@ -7,7 +7,8 @@ $default: ('font-size': 16, 'font-size_md': 18, 'line-height': 24, 'line-height_
|
|
|
7
7
|
$small: ('font-size': 12, 'font-size_md': 14, 'letter-spacing': 0.16, 'line-height': 16, 'margin-bottom': 16);
|
|
8
8
|
$medium: ('font-size': 14, 'font-size_md': 16, 'line-height': 16, 'line-height_md': 20, 'margin-bottom': 18);
|
|
9
9
|
$sup: ('font-size': 10);
|
|
10
|
-
$text-elements: p, li, dt, dd;
|
|
10
|
+
$standard-text-elements: p, li, dt, dd;
|
|
11
|
+
$special-text-elements: h1, h2, h3, h4, h5, h6, a;
|
|
11
12
|
|
|
12
13
|
@layer base {
|
|
13
14
|
p, li, small {
|
|
@@ -17,7 +18,7 @@ $text-elements: p, li, dt, dd;
|
|
|
17
18
|
.error &, &.error { color: map.get($theme, 'text_error'); }
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
#{$text-elements} {
|
|
21
|
+
#{$standard-text-elements} {
|
|
21
22
|
font-size: px-to-rem(map.get($default, 'font-size'));
|
|
22
23
|
line-height: px-to-rem(map.get($default, 'line-height'));
|
|
23
24
|
|
|
@@ -68,7 +69,7 @@ $text-elements: p, li, dt, dd;
|
|
|
68
69
|
|
|
69
70
|
address { font-style: normal; }
|
|
70
71
|
|
|
71
|
-
|
|
72
|
+
#{$special-text-elements} {
|
|
72
73
|
&.text-small {
|
|
73
74
|
font-size: px-to-rem(map.get($small, 'font-size'));
|
|
74
75
|
line-height: px-to-rem(map.get($small, 'line-height'));
|
|
@@ -81,7 +82,7 @@ $text-elements: p, li, dt, dd;
|
|
|
81
82
|
}
|
|
82
83
|
|
|
83
84
|
@include breakpoint('min-width', 'md') {
|
|
84
|
-
#{$text-elements} {
|
|
85
|
+
#{$standard-text-elements} {
|
|
85
86
|
font-size: px-to-rem(map.get($default, 'font-size_md'));
|
|
86
87
|
line-height: px-to-rem(map.get($default, 'line-height_md'));
|
|
87
88
|
|
|
@@ -95,7 +96,7 @@ $text-elements: p, li, dt, dd;
|
|
|
95
96
|
}
|
|
96
97
|
}
|
|
97
98
|
|
|
98
|
-
|
|
99
|
+
#{$special-text-elements} {
|
|
99
100
|
&.text-small {
|
|
100
101
|
font-size: px-to-rem(map.get($small, 'font-size_md'));
|
|
101
102
|
}
|
|
@@ -207,7 +207,6 @@ $theme: (
|
|
|
207
207
|
modal_success_title: map.get($c, 'success600'),
|
|
208
208
|
modal_success_title_background: map.get($c, 'g100'),
|
|
209
209
|
modal_success_icon_background: map.get($c, 'success600'),
|
|
210
|
-
// Invite Modal
|
|
211
210
|
// Navigation
|
|
212
211
|
breadcrumbs: map.get($c, 'n600'),
|
|
213
212
|
breadcrumbs_hover: map.get($c, 'b500'),
|
|
@@ -228,6 +227,13 @@ $theme: (
|
|
|
228
227
|
more-menu_hover_button_bg: map.get($c, 'b100'),
|
|
229
228
|
more-menu_menu_bg: map.get($c, 'white'),
|
|
230
229
|
more-menu_menu_shadow: rgba(0 0 0 / 10%),
|
|
230
|
+
navigation-menu: map.get($c, 'n700'),
|
|
231
|
+
navigation-menu_active: map.get($c, 'b700'),
|
|
232
|
+
navigation-menu_bg: map.get($c, 'white'),
|
|
233
|
+
navigation-menu_link_bg: map.get($c, 'white'),
|
|
234
|
+
navigation-menu_link_hover_bg: map.get($c, 'n50'),
|
|
235
|
+
navigation-menu_link_active_bg: map.get($c, 'b100'),
|
|
236
|
+
navigation-menu_profile-picture_border: map.get($c, 'n700'),
|
|
231
237
|
tags: map.get($c, 'b700'),
|
|
232
238
|
tags_light: map.get($c, 'p500'),
|
|
233
239
|
// Text
|
|
@@ -253,6 +259,8 @@ $theme: (
|
|
|
253
259
|
linear-gradient(rgba(255 255 255 / 0%), rgba(255 255 255 / 100%)),
|
|
254
260
|
highlighted-text-box_bold_icon: map.get($c, 'b500'),
|
|
255
261
|
highlighted-text-box_subtle_border: map.get($c, 'n100'),
|
|
262
|
+
page-heading_bg: linear-gradient(180deg, map.get($c, 'n50') 0%, rgb(240 245 255 / 0%) 100%),
|
|
263
|
+
page-heading_subtitle: map.get($c, 'n700'),
|
|
256
264
|
pill: map.get($c, 'n900'),
|
|
257
265
|
pill_highlighted: map.get($c, 'n700'),
|
|
258
266
|
pill_registered: map.get($c, 'g700'),
|
package/testing/index.d.ts
CHANGED
package/text/index.d.ts
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
interface PageHeadingTitleProps {
|
|
3
|
+
/** Text to be rendered in the title */
|
|
4
|
+
text: string;
|
|
5
|
+
/** HTML element to be used for the title */
|
|
6
|
+
element?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
7
|
+
}
|
|
8
|
+
export interface PageHeadingProps {
|
|
9
|
+
/** An optional number to restrict the width of the titles to */
|
|
10
|
+
maxWidth?: number | false;
|
|
11
|
+
/** Details of the title to be rendered */
|
|
12
|
+
title?: PageHeadingTitleProps;
|
|
13
|
+
/** Details of the subtitle to be rendered */
|
|
14
|
+
subtitle?: PageHeadingTitleProps;
|
|
15
|
+
/** Optional children */
|
|
16
|
+
children?: React.ReactNode;
|
|
17
|
+
/** Additional classes */
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
declare const PageHeading: ({ maxWidth, title, subtitle, children, className, }: PageHeadingProps) => import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export default PageHeading;
|