@apolitical/component-library 2.1.1-beta.0 → 2.1.2

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.
@@ -5,6 +5,7 @@ interface Props {
5
5
  bootstrap: () => Promise<IUserContext>;
6
6
  children: React.ReactNode;
7
7
  intl?: IIntlContext;
8
+ showDevTools?: boolean;
8
9
  }
9
- export declare const GlobalProviders: ({ bootstrap, children, intl }: Props) => import("react/jsx-runtime").JSX.Element;
10
+ export declare const GlobalProviders: ({ bootstrap, children, intl, showDevTools }: Props) => import("react/jsx-runtime").JSX.Element;
10
11
  export {};
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { IField } from '../../../form.types';
3
3
  export declare const Checkbox: ({ className, disabled, element, functions: allFunctions, id, inputRef: ref, intlPath, label, shownValue: value, type, value: isChecked, ...props }: IField) => React.DOMElement<{
4
+ onMultiSelectSubmit?: ((arg1: import("../../../form.types").FormValues) => void) | undefined;
4
5
  onBlur?: (() => void) | undefined;
5
6
  onFocus?: (() => void) | undefined;
6
7
  'aria-describedby'?: string | undefined;
@@ -17,6 +18,10 @@ export declare const Checkbox: ({ className, disabled, element, functions: allFu
17
18
  initialValue?: import("../../../form.types").FormValues;
18
19
  limit?: number | undefined;
19
20
  multiSelect?: boolean | undefined;
21
+ multiSelectOptions?: {
22
+ topbar?: boolean | undefined;
23
+ submitSection?: boolean | undefined;
24
+ } | undefined;
20
25
  name?: string | undefined;
21
26
  options?: import("../../../form.types").IFieldOption[] | undefined;
22
27
  placeholder?: string | undefined;
@@ -1,3 +1,3 @@
1
1
  import { IField } from '../../../../../../form/components/form/form.types';
2
- declare const DropdownMenu: ({ className, options, initialValue, value, functions: allFunctions, gtm: { context }, }: IField) => import("react/jsx-runtime").JSX.Element;
2
+ declare const DropdownMenu: ({ className, options, initialValue, value, functions: allFunctions, gtm: { context }, placeholder, multiSelect, multiSelectOptions, id, }: IField) => import("react/jsx-runtime").JSX.Element;
3
3
  export default DropdownMenu;
@@ -2,6 +2,7 @@ import React from 'react';
2
2
  import { IField, InputTypes, InputValues } from '../../../form.types';
3
3
  export declare const Input: ({ className, element, id, inputRef: ref, functions, name, placeholder, type, value, ...props }: IField) => React.DOMElement<{
4
4
  onChange: (e: React.FormEvent<HTMLInputElement>) => void;
5
+ onMultiSelectSubmit?: ((arg1: import("../../../form.types").FormValues) => void) | undefined;
5
6
  onBlur?: (() => void) | undefined;
6
7
  onFocus?: (() => void) | undefined;
7
8
  type: InputTypes;
@@ -27,6 +28,10 @@ export declare const Input: ({ className, element, id, inputRef: ref, functions,
27
28
  label?: React.ReactNode;
28
29
  limit?: number | undefined;
29
30
  multiSelect?: boolean | undefined;
31
+ multiSelectOptions?: {
32
+ topbar?: boolean | undefined;
33
+ submitSection?: boolean | undefined;
34
+ } | undefined;
30
35
  options?: import("../../../form.types").IFieldOption[] | undefined;
31
36
  props?: {
32
37
  [key: string]: string | boolean | React.RefObject<any> | (() => void);
@@ -89,6 +89,8 @@ export interface IField {
89
89
  [key: string]: string | boolean;
90
90
  };
91
91
  }) => void) => void;
92
+ /** The function to call when the field is submitted */
93
+ onMultiSelectSubmit?: (arg1: FormValues) => void;
92
94
  /** The function to call when the field is blurred */
93
95
  onBlur?: () => void;
94
96
  /** The function to call when the field is focused */
@@ -115,6 +117,13 @@ export interface IField {
115
117
  limit?: number;
116
118
  /** Whether the field can have multiple values, for checkboxes */
117
119
  multiSelect?: boolean;
120
+ /** The additional options for multiselect, for dropdowns */
121
+ multiSelectOptions?: {
122
+ /** Whether to display the topbar in the dropdown - this includes a total of the checked boxes and an option to select all or none */
123
+ topbar?: boolean;
124
+ /** Whether to display the submit button in the dropdown - this allows the user to submit the dropdown only */
125
+ submitSection?: boolean;
126
+ };
118
127
  /** The name of the field */
119
128
  name?: string;
120
129
  /** The options for the field, for checkboxes and dropdowns */
@@ -145,6 +154,8 @@ export interface FormButtonPropsType extends ButtonPropsType {
145
154
  customOnSubmit?: React.ReactNode | false;
146
155
  /** The text to show on the button */
147
156
  text?: string;
157
+ /** The option to not have the submit button at all */
158
+ hideButton?: boolean;
148
159
  }
149
160
  export interface IFormProps {
150
161
  /** The form submit button */
@@ -0,0 +1,12 @@
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;
@@ -0,0 +1 @@
1
+ export { default as ImageContainer } from './image-container';
@@ -1,5 +1,7 @@
1
1
  export * from './buttons';
2
2
  export * from './divider';
3
+ export * from './image-container';
3
4
  export * from './link';
4
5
  export * from './responsive-image';
6
+ export * from './return-to-nav-button';
5
7
  export * from './tooltip';
@@ -0,0 +1 @@
1
+ export { default as ReturnToNavButton } from './return-to-nav-button';
@@ -0,0 +1,9 @@
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;