@apolitical/component-library 1.14.1 → 1.14.5-beta.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.
@@ -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
- a {
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
- a {
99
+ #{$special-text-elements} {
99
100
  &.text-small {
100
101
  font-size: px-to-rem(map.get($small, 'font-size_md'));
101
102
  }
@@ -184,6 +184,13 @@ $theme: (
184
184
  logos_small: map.get($c, 'n600'),
185
185
  page-layout_gradient_bg_1: map.get($c, 'n50'),
186
186
  page-layout_gradient_bg_2: rgb(240 245 255 / 0%),
187
+ page-layout_bold: map.get($c, 'white'),
188
+ page-layout_bold_bg: map.get($c, 'b700'),
189
+ page-layout_inverted_bg: map.get($c, 'g300'),
190
+ page-layout_bold_circle: map.get($c, 'g300'),
191
+ page-layout_inverted_circle: map.get($c, 'b700'),
192
+ page-layout_alt-1_circle: map.get($c, 'y300'),
193
+ page-layout_alt-2_circle: map.get($c, 'p300'),
187
194
  // Loaders
188
195
  loading-block_icon_bg: map.get($c, 'n600'),
189
196
  loading-placeholder_bg: map.get($c, 'n10'),
@@ -207,7 +214,6 @@ $theme: (
207
214
  modal_success_title: map.get($c, 'success600'),
208
215
  modal_success_title_background: map.get($c, 'g100'),
209
216
  modal_success_icon_background: map.get($c, 'success600'),
210
- // Invite Modal
211
217
  // Navigation
212
218
  breadcrumbs: map.get($c, 'n600'),
213
219
  breadcrumbs_hover: map.get($c, 'b500'),
@@ -228,6 +234,13 @@ $theme: (
228
234
  more-menu_hover_button_bg: map.get($c, 'b100'),
229
235
  more-menu_menu_bg: map.get($c, 'white'),
230
236
  more-menu_menu_shadow: rgba(0 0 0 / 10%),
237
+ navigation-menu: map.get($c, 'n700'),
238
+ navigation-menu_active: map.get($c, 'b700'),
239
+ navigation-menu_bg: map.get($c, 'white'),
240
+ navigation-menu_link_bg: map.get($c, 'white'),
241
+ navigation-menu_link_hover_bg: map.get($c, 'n50'),
242
+ navigation-menu_link_active_bg: map.get($c, 'b100'),
243
+ navigation-menu_profile-picture_border: map.get($c, 'n700'),
231
244
  tags: map.get($c, 'b700'),
232
245
  tags_light: map.get($c, 'p500'),
233
246
  // Text
@@ -253,6 +266,8 @@ $theme: (
253
266
  linear-gradient(rgba(255 255 255 / 0%), rgba(255 255 255 / 100%)),
254
267
  highlighted-text-box_bold_icon: map.get($c, 'b500'),
255
268
  highlighted-text-box_subtle_border: map.get($c, 'n100'),
269
+ page-heading_bg: linear-gradient(180deg, map.get($c, 'n50') 0%, rgb(240 245 255 / 0%) 100%),
270
+ page-heading_subtitle: map.get($c, 'n700'),
256
271
  pill: map.get($c, 'n900'),
257
272
  pill_highlighted: map.get($c, 'n700'),
258
273
  pill_registered: map.get($c, 'g700'),
@@ -0,0 +1,2 @@
1
+ export declare const defineViewportWidth: (width: number) => void;
2
+ export declare const setWindowLocation: (path: string) => void;
@@ -1 +1,2 @@
1
+ export * from './helpers';
1
2
  export * from './wrapper';
package/text/index.d.ts CHANGED
@@ -4,5 +4,6 @@ export * from './helper-text-box';
4
4
  export * from './hide-show-text-box';
5
5
  export * from './highlighted-text-box';
6
6
  export * from './markdown-text';
7
+ export * from './page-heading';
7
8
  export * from './pill';
8
9
  export * from './status-banner';
@@ -0,0 +1,2 @@
1
+ export type { PageHeadingProps } from './page-heading';
2
+ export { default as PageHeading } from './page-heading';
@@ -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;