@apolitical/component-library 10.4.4 → 10.4.5-db.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.
Files changed (38) hide show
  1. package/banners/index.d.ts +0 -1
  2. package/form/components/index.d.ts +0 -1
  3. package/form/types/index.d.ts +0 -1
  4. package/general/index.d.ts +0 -2
  5. package/index.js +130 -132
  6. package/index.mjs +34317 -34815
  7. package/navigation/index.d.ts +0 -2
  8. package/navigation/more-menu/more-menu.d.ts +2 -2
  9. package/package.json +1 -1
  10. package/sections/index.d.ts +0 -1
  11. package/style.css +1 -1
  12. package/text/index.d.ts +0 -2
  13. package/user/index.d.ts +0 -1
  14. package/banners/banner/banner.d.ts +0 -11
  15. package/banners/banner/index.d.ts +0 -1
  16. package/form/components/password-rules/index.d.ts +0 -1
  17. package/form/components/password-rules/password-rules.d.ts +0 -16
  18. package/form/types/password-form/helper.d.ts +0 -1
  19. package/form/types/password-form/index.d.ts +0 -2
  20. package/form/types/password-form/password-form.d.ts +0 -17
  21. package/general/image-container/image-container.d.ts +0 -12
  22. package/general/image-container/index.d.ts +0 -1
  23. package/general/return-to-nav-button/index.d.ts +0 -1
  24. package/general/return-to-nav-button/return-to-nav-button.d.ts +0 -9
  25. package/navigation/share-links/index.d.ts +0 -1
  26. package/navigation/share-links/share-links.d.ts +0 -18
  27. package/navigation/share-links/share-links.helpers.d.ts +0 -19
  28. package/navigation/tags/index.d.ts +0 -1
  29. package/navigation/tags/tags.d.ts +0 -20
  30. package/navigation/tags/tags.helpers.d.ts +0 -34
  31. package/sections/edit-section/edit-section.d.ts +0 -37
  32. package/sections/edit-section/index.d.ts +0 -2
  33. package/text/buckets/buckets.d.ts +0 -21
  34. package/text/buckets/index.d.ts +0 -1
  35. package/text/testimonial-block/index.d.ts +0 -1
  36. package/text/testimonial-block/testimonial-block.d.ts +0 -16
  37. package/user/directory/directory.d.ts +0 -18
  38. package/user/directory/index.d.ts +0 -1
package/text/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- export * from './buckets';
2
1
  export * from './collapsible-section';
3
2
  export * from './content-type-label';
4
3
  export * from './empty-state-box';
@@ -10,4 +9,3 @@ export * from './markdown-text';
10
9
  export * from './page-heading';
11
10
  export * from './pill';
12
11
  export * from './status-banner';
13
- export * from './testimonial-block';
package/user/index.d.ts CHANGED
@@ -2,7 +2,6 @@ export * from './badge';
2
2
  export * from './badges';
3
3
  export * from './connection-cta';
4
4
  export * from './contributors';
5
- export * from './directory';
6
5
  export * from './member';
7
6
  export * from './profile-picture';
8
7
  export * from './show-email';
@@ -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 PasswordRules } from './password-rules';
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- export type MatchingRules = {
3
- isMoreThanEightCharacters: boolean;
4
- includesNumberAndSymbol: boolean;
5
- includesLowerAndUppercase: boolean;
6
- };
7
- interface Props {
8
- /** Results of the validator check */
9
- matchingRules?: MatchingRules;
10
- /** Additional classes */
11
- className?: string;
12
- /** The language to use for the text */
13
- locale?: string;
14
- }
15
- declare const _default: React.MemoExoticComponent<({ matchingRules, className, }: Props) => import("react/jsx-runtime").JSX.Element>;
16
- export default _default;
@@ -1 +0,0 @@
1
- export function generateConditions(conditions: any): any;
@@ -1,2 +0,0 @@
1
- export { default as PasswordForm, type IPasswordFormProps } from './password-form';
2
- export * from './helper';
@@ -1,17 +0,0 @@
1
- import React from 'react';
2
- import type { IFormProps, IFormValues } from '../../components/form/form.types';
3
- export interface IPasswordFormProps extends Omit<IFormProps, 'id' | 'fields'> {
4
- /** Indicated for whether to show the current password field */
5
- isPasswordChange?: boolean;
6
- /** The functions being passed to the form */
7
- functions: IFormProps['functions'] & {
8
- /** The function to call to create the password */
9
- createPassword: (arg: IFormValues) => Promise<void>;
10
- };
11
- /** Specify custom text for the submit button */
12
- button?: {
13
- text: string;
14
- };
15
- }
16
- declare const PasswordForm: React.FC<IPasswordFormProps>;
17
- export default PasswordForm;
@@ -1,12 +0,0 @@
1
- /// <reference types="react" />
2
- import { ResponsiveImageType } from '../responsive-image';
3
- interface Props {
4
- /** The image to display */
5
- image?: ResponsiveImageType | null;
6
- /** Additional classes */
7
- className?: string;
8
- /** Optional custom testId for unit testing */
9
- testId?: string;
10
- }
11
- declare const ImageContainer: React.FC<Props>;
12
- export default ImageContainer;
@@ -1 +0,0 @@
1
- export { default as ImageContainer } from './image-container';
@@ -1 +0,0 @@
1
- export { default as ReturnToNavButton } from './return-to-nav-button';
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- interface Props {
3
- /** Id of the element to scroll to */
4
- elementId: string;
5
- /** Offset from the top of the element to scroll to */
6
- offset?: number;
7
- }
8
- declare const ReturnToNavButton: React.FC<Props>;
9
- export default ReturnToNavButton;
@@ -1 +0,0 @@
1
- export { default as ShareLinks } from './share-links';
@@ -1,18 +0,0 @@
1
- interface Props {
2
- /** The title of the page being shared */
3
- title: string;
4
- /** The URL of the page being shared */
5
- link: string;
6
- /** The referrer, to go into the UUID in the URL */
7
- referrer?: string;
8
- /** The Google Tag Manager event context */
9
- gtmContext?: string;
10
- /** The size of the buttons */
11
- size?: 'large' | 'medium';
12
- /** The styling variant */
13
- variant?: 'default' | 'muted';
14
- /** Additional classes */
15
- className?: string;
16
- }
17
- declare const ShareLinks: ({ title, link, referrer, gtmContext, size, variant, className, }: Props) => import("react/jsx-runtime").JSX.Element;
18
- export default ShareLinks;
@@ -1,19 +0,0 @@
1
- import React from 'react';
2
- export declare const generateLink: (link: string, type: string, referrer?: string) => string;
3
- export declare const getLinkData: ({ title, link, referrer, }: {
4
- title: string;
5
- link: string;
6
- referrer?: string | undefined;
7
- }) => ({
8
- key: string;
9
- icon: string;
10
- url: string;
11
- shouldRender?: undefined;
12
- onClick?: undefined;
13
- } | {
14
- key: string;
15
- icon: string;
16
- url: string;
17
- shouldRender: () => (data: string) => Promise<void>;
18
- onClick: (e: React.MouseEvent<HTMLElement>, url: string) => Promise<void>;
19
- })[];
@@ -1 +0,0 @@
1
- export { default as Tags } from './tags';
@@ -1,20 +0,0 @@
1
- interface Props {
2
- /** The tags for the content */
3
- tags?: string[];
4
- /** The colour of the tags */
5
- color?: 'default' | 'light';
6
- /** Force the tags to be on one line */
7
- forceOneLine?: boolean;
8
- /** Whether the tags can have links */
9
- canHaveLinks?: boolean;
10
- /** Additional classes */
11
- className?: string;
12
- /** The GTM event type */
13
- gtmType?: string;
14
- /** The GTM event context */
15
- gtmContext?: string;
16
- /** The language to use */
17
- locale?: string;
18
- }
19
- declare const Tags: ({ tags, color, forceOneLine, canHaveLinks, className, gtmType, gtmContext, }: Props) => import("react/jsx-runtime").JSX.Element | null;
20
- export default Tags;
@@ -1,34 +0,0 @@
1
- export namespace intlPath {
2
- let _default: string;
3
- export { _default as default };
4
- export let headerTopics: string;
5
- }
6
- export const tags: {
7
- topic: {
8
- Climate: string;
9
- CitiesAndLocalGovernment: string;
10
- DigitalAndData: string;
11
- Education: string;
12
- EquityJusticeAndInclusion: string;
13
- HealthAndSocialCare: string;
14
- Innovation: string;
15
- LeadershipAndSkills: string;
16
- LifeInGovernment: string;
17
- Policymaking: string;
18
- TransportAndInfrastructure: string;
19
- WorkAndTheEconomy: string;
20
- };
21
- 'from the community': string;
22
- };
23
- declare namespace _default {
24
- function getTagDetails(tag: any): {
25
- id: any;
26
- href: any;
27
- text: string;
28
- } | {
29
- id: any;
30
- text: string;
31
- href?: undefined;
32
- } | null;
33
- }
34
- export default _default;
@@ -1,37 +0,0 @@
1
- import React, { type JSX } from 'react';
2
- import { IFormProps } from '../../form/components/form/form.types';
3
- type THref = string | undefined;
4
- interface IPlaceholder {
5
- /** Placeholder icon */
6
- icon?: string | undefined;
7
- /** Placeholder description */
8
- description?: string;
9
- /** Cta message showing on a button */
10
- ctaMessage?: string;
11
- }
12
- export interface IEditSectionProps {
13
- /** Additional classes */
14
- className?: string;
15
- /** Content to be rendered */
16
- children?: React.ReactNode | JSX.Element;
17
- /** Optional ID */
18
- id?: string;
19
- /** Section title */
20
- title: string;
21
- /** Show title or not */
22
- showTitle?: boolean;
23
- /** Modal Title */
24
- modalTitle?: string;
25
- /** Form fields to be rendered inside a modal form when user clicks cta or edit button. Alternatively, we can pass a whole form in `form`, if there's an existing component. */
26
- formProps?: IFormProps;
27
- /** A form to render inside the modal. Alternatively, we can use `formProps` to create a new form if the component doesn't already exist. */
28
- formComponent?: JSX.Element;
29
- /** Link to a url where user can edit the data */
30
- href?: THref;
31
- /** Whether to show a divider at the bottom of the section */
32
- showDivider?: boolean;
33
- /** Placeholder settings */
34
- placeholder?: IPlaceholder;
35
- }
36
- declare const EditSection: ({ children, className, formProps, formComponent: originalFormComponent, href, title, showTitle, modalTitle, placeholder, showDivider, }: IEditSectionProps) => import("react/jsx-runtime").JSX.Element;
37
- export default EditSection;
@@ -1,2 +0,0 @@
1
- export type { IEditSectionProps } from './edit-section';
2
- export { default as EditSection } from './edit-section';
@@ -1,21 +0,0 @@
1
- interface Props {
2
- /** The items to show for each bucket */
3
- items: {
4
- /** The title of the bucket */
5
- title: string;
6
- /** The text to display */
7
- text: string;
8
- /** The link to go to */
9
- link: string;
10
- /** Additional classes */
11
- className?: string;
12
- /** The type of event to send to GTM */
13
- 'data-gtm-event-context'?: string;
14
- /** The type of event to send to GTM */
15
- 'data-gtm-event-type'?: string;
16
- }[];
17
- /** Additional classes */
18
- className?: string;
19
- }
20
- declare const Buckets: ({ items, className, ...props }: Props) => import("react/jsx-runtime").JSX.Element;
21
- export default Buckets;
@@ -1 +0,0 @@
1
- export { default as Buckets } from './buckets';
@@ -1 +0,0 @@
1
- export { default as TestimonialBlock } from './testimonial-block';
@@ -1,16 +0,0 @@
1
- /// <reference types="react" />
2
- import type { MemberDetailsProps } from '../../user';
3
- export type TestimonialBlockProps = {
4
- /** The name of the Testimonial's author */
5
- author?: string;
6
- /** The citation of the Testimonial's author */
7
- authorCite?: string;
8
- /** The details of the member who gave the testimonial; this is rendered as a `Member` component instead of plain text */
9
- member?: MemberDetailsProps;
10
- /** The content to display */
11
- content: string;
12
- /** Additional classes */
13
- className?: string;
14
- };
15
- declare const _default: import("react").MemoExoticComponent<({ author, authorCite, content, member, className, }: TestimonialBlockProps) => import("react/jsx-runtime").JSX.Element>;
16
- export default _default;
@@ -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';