@apolitical/component-library 2.0.3-beta.0 → 2.0.3-beta.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.
Files changed (33) hide show
  1. package/banners/banner/banner.d.ts +11 -0
  2. package/banners/banner/index.d.ts +1 -0
  3. package/banners/banner-section/banner-section.d.ts +1 -1
  4. package/banners/index.d.ts +1 -0
  5. package/banners/marketing-block/index.d.ts +1 -1
  6. package/discussion/components/responses-heading/responses-heading.d.ts +1 -1
  7. package/discussion/discussion.mock.d.ts +4 -0
  8. package/discussion/sections/activity-section/mocks/activity-section.mock.d.ts +3 -0
  9. package/discussion/shared/interfaces/user.interface.d.ts +3 -0
  10. package/form/components/index.d.ts +1 -0
  11. package/form/components/toggle/index.d.ts +1 -0
  12. package/form/components/toggle/toggle.d.ts +23 -0
  13. package/index.js +26 -20
  14. package/index.mjs +6693 -5528
  15. package/layout/content-layout/columns/columns.d.ts +1 -1
  16. package/package.json +3 -1
  17. package/sections/full-width-section/full-width-section.d.ts +6 -1
  18. package/style.css +1 -1
  19. package/styles/base/_layout.scss +4 -0
  20. package/styles/base/_table.scss +2 -0
  21. package/styles/base/_text.scss +1 -1
  22. package/styles/base/_titles.scss +10 -0
  23. package/styles/functions/_maps.scss +18 -2
  24. package/styles/variables/colors/theme/_banners.scss +3 -0
  25. package/styles/variables/colors/theme/_form.scss +3 -0
  26. package/styles/variables/colors/theme/_index.scss +2 -2
  27. package/styles/variables/colors/theme/_pages.scss +2 -0
  28. package/styles/variables/colors/theme/_sections.scss +7 -0
  29. package/styles/variables/colors/theme/_user.scss +1 -0
  30. package/testing/__mocks__/tabbable.d.ts +2 -0
  31. package/user/directory/directory.d.ts +18 -0
  32. package/user/directory/index.d.ts +1 -0
  33. package/user/index.d.ts +1 -0
@@ -0,0 +1,11 @@
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;
@@ -0,0 +1 @@
1
+ export { default as Banner } from './banner';
@@ -24,7 +24,7 @@ export interface BannerSectionType {
24
24
  /** The image to display */
25
25
  image?: ResponsiveImageType;
26
26
  /** The colour variant (when there's no image) */
27
- variant?: 'default' | 'light';
27
+ variant?: 'default' | 'light' | 'gradient';
28
28
  /** How to handle spacing on the banner */
29
29
  spacing?: 'normal' | 'slim';
30
30
  /** Whether or not to show the ContentType.text, eyebrow or title */
@@ -1,2 +1,3 @@
1
+ export * from './banner';
1
2
  export * from './banner-section';
2
3
  export * from './marketing-block';
@@ -1 +1 @@
1
- export { default as MarketingBox } from './marketing-block';
1
+ export { default as MarketingBlock } from './marketing-block';
@@ -2,7 +2,7 @@ interface Props {
2
2
  /** The type of response */
3
3
  type?: 'answer' | 'comment';
4
4
  /** The number of responses to show */
5
- responses: number;
5
+ responses: number | string;
6
6
  /** The language to use for the text */
7
7
  locale?: string;
8
8
  }
@@ -5,6 +5,10 @@ export namespace authors {
5
5
  namespace image {
6
6
  let thumbnail: string;
7
7
  }
8
+ let jobTitle: string;
9
+ namespace location {
10
+ let country: string;
11
+ }
8
12
  }
9
13
  namespace otherUser {
10
14
  let id_1: string;
@@ -7,6 +7,9 @@ export declare const activitySectionMock: {
7
7
  jobTitle: string;
8
8
  name: string;
9
9
  organization: string;
10
+ location: {
11
+ country: string;
12
+ };
10
13
  };
11
14
  };
12
15
  content: string;
@@ -4,6 +4,9 @@ export interface IUser extends EnrichedUser {
4
4
  name?: string;
5
5
  organization?: string;
6
6
  jobTitle?: string;
7
+ location?: {
8
+ country?: string;
9
+ };
7
10
  thumbnail?: string;
8
11
  };
9
12
  }
@@ -2,3 +2,4 @@ export * from './email-helper-text-box';
2
2
  export * from './form';
3
3
  export * from './password-rules';
4
4
  export * from './rating';
5
+ export * from './toggle';
@@ -0,0 +1 @@
1
+ export { default as Toggle } from './toggle';
@@ -0,0 +1,23 @@
1
+ interface Props {
2
+ /** The ID of the toggle */
3
+ id?: string;
4
+ /** The label to show next to the toggle */
5
+ label: string;
6
+ /** The options for the toggle */
7
+ options: {
8
+ /** The text for the option, used for screen readers */
9
+ label: string;
10
+ /** The value for the option */
11
+ value: boolean | string;
12
+ }[];
13
+ /** The initial value of the toggle */
14
+ initialValue?: boolean | string;
15
+ /** Callback function to run when the toggle is clicked */
16
+ onChange: (value: boolean | string) => void;
17
+ /** Whether the toggle is disabled */
18
+ isDisabled?: boolean;
19
+ /** Additional class names */
20
+ className?: string;
21
+ }
22
+ declare const Toggle: ({ id, label, options, initialValue, onChange, isDisabled, className, }: Props) => import("react/jsx-runtime").JSX.Element;
23
+ export default Toggle;