northants-design-system 0.2.0 → 0.2.4

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.
@@ -1,4 +1,4 @@
1
- import React from "react";
1
+ import React from 'react';
2
2
  export interface ContentPageProps {
3
3
  }
4
- export declare const ContentPage: React.FC<ContentPageProps>;
4
+ export declare const ContentPage: React.FunctionComponent<ContentPageProps>;
@@ -0,0 +1,10 @@
1
+ /** Example story data for Content Page example */
2
+ export declare const smallTable: {
3
+ caption: string;
4
+ headings: string[];
5
+ data: string[][];
6
+ };
7
+ export declare const largeTable: {
8
+ caption: string;
9
+ headings: string[];
10
+ };
@@ -2,8 +2,10 @@ import { SectionLinksProps } from '../../structure/SectionLinks/SectionLinks.typ
2
2
  import { FooterLinkProp } from '../../structure/Footer/Footer.types';
3
3
  import { BreadcrumbProp } from '../../structure/Breadcrumbs/Breadcrumbs.types';
4
4
  import { ServicesLinksListProps } from '../../structure/ServicesLinksList/ServicesLinksList.types';
5
+ import { AlertBannerServiceProps } from '../../structure/AlertBannerService/AlertBannerService.types';
5
6
  export declare const threeTopServicesData: ServicesLinksListProps;
6
7
  export declare const sixTopServicesData: ServicesLinksListProps;
7
8
  export declare const sections: SectionLinksProps[];
8
9
  export declare const footerLinks: FooterLinkProp[];
9
10
  export declare const breadcrumbs: BreadcrumbProp[];
11
+ export declare const serviceAlert: AlertBannerServiceProps;
@@ -3,6 +3,7 @@ import { FooterLinkProp } from '../../structure/Footer/Footer.types';
3
3
  import { HeroImageProps } from '../../structure/HeroImage/HeroImage.types';
4
4
  import { SectionLinksProps } from '../../structure/SectionLinks/SectionLinks.types';
5
5
  import { ServicesLinksListProps } from '../../structure/ServicesLinksList/ServicesLinksList.types';
6
+ import { AlertBannerServiceProps } from '../../structure/AlertBannerService/AlertBannerService.types';
6
7
  export interface ServiceLandingPageExampleProps {
7
8
  /**
8
9
  * The Service landing page title
@@ -32,4 +33,20 @@ export interface ServiceLandingPageExampleProps {
32
33
  * Top services to highlight below the heading or hero image
33
34
  */
34
35
  topServices?: ServicesLinksListProps;
36
+ /**
37
+ * Summary text describing the page
38
+ */
39
+ summary?: string;
40
+ /**
41
+ * Should the summary be displayed
42
+ */
43
+ showSummary?: Boolean;
44
+ /**
45
+ * Optional service alert banner
46
+ */
47
+ serviceAlert?: AlertBannerServiceProps;
48
+ /**
49
+ * Optional heading icon
50
+ */
51
+ icon?: string;
35
52
  }
@@ -1,4 +1,4 @@
1
- import React from "react";
2
- import { AccordionProps } from "./Accordion.types";
1
+ import React from 'react';
2
+ import { AccordionProps } from './Accordion.types';
3
3
  declare const Accordion: React.FunctionComponent<AccordionProps>;
4
4
  export default Accordion;
@@ -27,7 +27,7 @@ export interface AccordionSectionProps {
27
27
  */
28
28
  summary?: string;
29
29
  /**
30
- * Section summary
30
+ * Is the section expanded
31
31
  */
32
32
  isExpanded?: boolean;
33
33
  /**
@@ -35,16 +35,16 @@ export interface AccordionSectionProps {
35
35
  */
36
36
  accordionSectionId?: number;
37
37
  /**
38
- * Method used internally for opening closing eelment
38
+ * Method used internally for opening closing element
39
39
  */
40
- onToggle?: ((title: any, value: any) => void);
40
+ onToggle?: (title: any, value: any) => void;
41
41
  /**
42
- * We reuse this on filter pages - but it looks slightly different
42
+ * We reuse this on filter pages where the section buttons have h4 styles, instead of h3 styles
43
43
  */
44
44
  isFilter?: boolean;
45
45
  /**
46
- * Should there be a read more link at the bottom of each section?
47
- */
46
+ * Should there be a read more link at the bottom of each section?
47
+ */
48
48
  withReadMore?: boolean;
49
49
  /**
50
50
  * unique ID for the section
@@ -1,4 +1,4 @@
1
- import React from "react";
2
- import { AccordionSectionProps } from "./Accordion.types";
3
- declare const AccordionSection: React.FC<AccordionSectionProps>;
1
+ import React from 'react';
2
+ import { AccordionSectionProps } from './Accordion.types';
3
+ declare const AccordionSection: React.FunctionComponent<AccordionSectionProps>;
4
4
  export default AccordionSection;
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
2
  import { AlertBannerServiceProps } from './AlertBannerService.types';
3
3
  /**
4
- * A container for holding the main content of a page
4
+ * A banner to be displayed at the top of a page before the main content
5
+ * to draw the viewer's attention to an alert notice
5
6
  */
6
7
  declare const AlertBannerService: React.FunctionComponent<AlertBannerServiceProps>;
7
8
  export default AlertBannerService;
@@ -1,15 +1,19 @@
1
1
  /// <reference types="react" />
2
2
  export interface AlertBannerServiceProps {
3
3
  /**
4
- * The title of this alert
4
+ * The optional title of this alert banner
5
5
  */
6
- title: string;
6
+ title?: string;
7
7
  /**
8
- * The type of alert
9
- */
10
- alertType?: "alert" | "warning" | "positive" | "london_bridge";
8
+ * Set to true for additional margin above the alert banner
9
+ */
10
+ hasTopSpacing?: boolean;
11
+ /**
12
+ * The type of alert banner
13
+ */
14
+ alertType?: 'alert' | 'warning' | 'positive' | 'london_bridge';
11
15
  /**
12
- * All children content for the banner
13
- */
16
+ * All child content for the alert banner
17
+ */
14
18
  children: React.ReactNode;
15
19
  }
@@ -1,4 +1,4 @@
1
- import React from "react";
2
- import { BreadcrumbsProps } from "./Breadcrumbs.types";
3
- declare const Breadcrumbs: React.FC<BreadcrumbsProps>;
1
+ import React from 'react';
2
+ import { BreadcrumbsProps } from './Breadcrumbs.types';
3
+ declare const Breadcrumbs: React.FunctionComponent<BreadcrumbsProps>;
4
4
  export default Breadcrumbs;
@@ -1,16 +1,20 @@
1
1
  export interface BreadcrumbsProps {
2
2
  /**
3
- * An array of the breadcrumbs, each with a title and a URL not including the current page users are on
4
- */
3
+ * An array of the breadcrumbs, each with a title and a URL not including the current page users are on
4
+ */
5
5
  breadcrumbsArray: Array<BreadcrumbProp>;
6
+ /**
7
+ * Should the breadcrumbs have bottom margin
8
+ */
9
+ hasMargin?: boolean;
6
10
  }
7
11
  export interface BreadcrumbProp {
8
12
  /**
9
- * Title of the page
10
- */
13
+ * Title of the page
14
+ */
11
15
  title: string;
12
16
  /**
13
- * URL of the page
14
- */
17
+ * URL of the page
18
+ */
15
19
  url: string;
16
20
  }
@@ -1,5 +1,5 @@
1
- import React from "react";
2
- import { HomeHeroProps } from "./HomeHero.types";
1
+ import React from 'react';
2
+ import { HomeHeroProps } from './HomeHero.types';
3
3
  /**
4
4
  * The Hero that should appear at the top of the home page.
5
5
  */
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Example data for the HomeHero stories
3
+ */
4
+ export declare const HomeHeroCommon: {
5
+ searchSuggestions: string[];
6
+ imagesArray: {
7
+ image1440x810: string;
8
+ image144x81: string;
9
+ }[];
10
+ };
11
+ export declare const HomeHeroPromotedLinks: {
12
+ title: string;
13
+ url: string;
14
+ }[];
@@ -1,11 +1,19 @@
1
1
  export interface HomeHeroProps {
2
2
  /**
3
- * The line of text before the logo
4
- */
3
+ * The line of text before the logo
4
+ */
5
5
  topline?: string;
6
6
  /**
7
- * The line of text after the logo
7
+ * URL of an alternative logo to override the preset ones (520 x 150 px)
8
+ */
9
+ imageOverrideLogo?: string;
10
+ /**
11
+ * Alt text for overridden logo
8
12
  */
13
+ imageOverrideLogoAltText?: string;
14
+ /**
15
+ * The line of text after the logo
16
+ */
9
17
  strapline?: string;
10
18
  /**
11
19
  * The images for the hero, minimum of one
@@ -35,4 +35,5 @@ import SectionLinksSidebar from './SectionLinksSidebar/SectionLinksSidebar';
35
35
  import ServicesLinksList from './ServicesLinksList/ServicesLinksList';
36
36
  import SignpostLinks from './SignpostLinks/SignpostLinks';
37
37
  import SkipToMainContent from './SkipToMainContent/SkipToMainContent';
38
- export { AccessibleLinks, AlertBanner, AlertBannerService, Breadcrumbs, CookieBanner, DisplayDate, Footer, FullWidthContainer, Header, HeroImage, HomeHero, HomeUnitarySection, MaxWidthContainer, MemorialHero, NewsArticleDate, NewsArticleFeaturedBlock, NewsArticleFilterAccordion, NewsArticleImage, NewsArticleList, NewsArticleListHeader, NewsArticleOldBanner, PhaseBanner, PageMain, PageSidebar, PageTitle, PageWithSidebarContainer, PageWrapper, PromoBanner, PromoBlock, Searchbar, SearchResultsList, SectionLinks, SectionLinksMobileContents, SectionLinksSidebar, ServicesLinksList, SignpostLinks, SkipToMainContent, };
38
+ import Summary from './Summary/Summary';
39
+ export { AccessibleLinks, AlertBanner, AlertBannerService, Breadcrumbs, CookieBanner, DisplayDate, Footer, FullWidthContainer, Header, HeroImage, HomeHero, HomeUnitarySection, MaxWidthContainer, MemorialHero, NewsArticleDate, NewsArticleFeaturedBlock, NewsArticleFilterAccordion, NewsArticleImage, NewsArticleList, NewsArticleListHeader, NewsArticleOldBanner, PhaseBanner, PageMain, PageSidebar, PageTitle, PageWithSidebarContainer, PageWrapper, PromoBanner, PromoBlock, Searchbar, SearchResultsList, SectionLinks, SectionLinksMobileContents, SectionLinksSidebar, ServicesLinksList, SignpostLinks, SkipToMainContent, Summary, };
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { SummaryProps } from './Summary.types';
3
+ declare const Summary: React.FunctionComponent<SummaryProps>;
4
+ export default Summary;
@@ -0,0 +1,10 @@
1
+ export interface SummaryProps {
2
+ /**
3
+ * Should the summary have padding
4
+ */
5
+ hasPadding?: boolean;
6
+ /**
7
+ * Should the summary have a background colour
8
+ */
9
+ hasBackground?: boolean;
10
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "northants-design-system",
3
- "version": "0.2.0",
3
+ "version": "0.2.4",
4
4
  "private": false,
5
5
  "description": "A new design system for Future Northants - North Northamptonshire & West Northamptonshire, two brand new unitary councils encompassing Wellingborough, Corby, Daventry, East Northants, Kettering, Northampton, Northamptonshire County and South Northants.",
6
6
  "main": "build/index.js",