@hellobetterdigitalnz/betterui 0.0.3-46 → 0.0.3-49

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.
@@ -10,6 +10,7 @@ interface DropdownBadgeProps {
10
10
  value?: string;
11
11
  options: (BadgeNameValueInterface | string)[];
12
12
  status?: "pending" | "inProgress" | "complete" | undefined;
13
+ lock?: boolean;
13
14
  extraClass?: string;
14
15
  disabled?: boolean;
15
16
  readonly?: boolean;
@@ -21,7 +21,7 @@ interface DropdownFieldProps {
21
21
  ariaLabeledby?: string;
22
22
  ariaDescribedby?: string;
23
23
  onClick?: (e: MouseEvent) => void;
24
- onChange?: (e: MouseEvent) => void;
24
+ onChange?: (e: React.MouseEvent, value: string | number) => void;
25
25
  onFocus?: (e: FocusEvent) => void;
26
26
  onBlur?: (e: FocusEvent) => void;
27
27
  }
@@ -1,9 +1,3 @@
1
- import React from 'react';
2
- interface Item {
3
- id: number;
4
- label: string;
5
- }
6
- declare const MultiSelectField: React.FC<{
7
- options: Item[];
8
- }>;
1
+ import MultiSelectFieldProps from "./MultiSelectFieldProps.tsx";
2
+ declare const MultiSelectField: (props: MultiSelectFieldProps) => import("react/jsx-runtime").JSX.Element;
9
3
  export default MultiSelectField;
@@ -1,11 +1,3 @@
1
- /// <reference types="react" />
2
- interface MultiSelectFieldItemProps {
3
- item: {
4
- id: number;
5
- label: string;
6
- };
7
- onClick: () => void;
8
- isSelected: boolean;
9
- }
10
- declare const MultiSelectFieldItem: React.FC<MultiSelectFieldItemProps>;
1
+ import MultiSelectFieldItemProps from "./MultiSelectFieldItemProps.tsx";
2
+ declare const MultiSelectFieldItem: (props: MultiSelectFieldItemProps) => import("react/jsx-runtime").JSX.Element;
11
3
  export default MultiSelectFieldItem;
@@ -1,9 +1,10 @@
1
+ /// <reference types="react" />
1
2
  interface MultiSelectFieldItemProps {
2
- item: {
3
- id: number;
4
- label: string;
5
- };
6
- onClick: () => void;
7
- isSelected: boolean;
3
+ id?: number | string;
4
+ label?: string;
5
+ value?: string | number;
6
+ handleSelect: (e: React.MouseEvent, value: string | number | undefined) => void;
7
+ onMouseEnter?: () => void;
8
+ isSelected?: boolean;
8
9
  }
9
10
  export default MultiSelectFieldItemProps;
@@ -1,13 +1,13 @@
1
1
  import { MouseEvent, FocusEvent } from "react";
2
- interface MultiSelectNameValueInterface {
2
+ interface SelectOption {
3
3
  label: string;
4
4
  value: string | number;
5
5
  }
6
6
  interface MultiSelectFieldProps {
7
7
  name?: string;
8
8
  id?: string;
9
- value?: string;
10
- options: MultiSelectNameValueInterface[] | string[];
9
+ value: SelectOption[];
10
+ options: SelectOption[];
11
11
  extraClass?: string;
12
12
  placeholder?: string;
13
13
  error?: boolean;
@@ -21,9 +21,9 @@ interface MultiSelectFieldProps {
21
21
  ariaLabeledby?: string;
22
22
  ariaDescribedby?: string;
23
23
  onClick?: (e: MouseEvent) => void;
24
- onChange?: (items: MultiSelectNameValueInterface[]) => void;
24
+ onChange: (value: SelectOption[]) => void;
25
25
  onFocus?: (e: FocusEvent) => void;
26
26
  onBlur?: (e: FocusEvent) => void;
27
27
  }
28
- export type { MultiSelectNameValueInterface };
28
+ export type { SelectOption };
29
29
  export default MultiSelectFieldProps;
@@ -1,10 +1,3 @@
1
- import React from 'react';
2
- interface MultiSelectFieldTagProps {
3
- item: {
4
- id: number;
5
- label: string;
6
- };
7
- onRemove: () => void;
8
- }
9
- declare const MultiSelectFieldTag: React.FC<MultiSelectFieldTagProps>;
1
+ import MultiSelectFieldTagProps from "./MultiSelectFieldTagProps.tsx";
2
+ declare const MultiSelectFieldTag: (props: MultiSelectFieldTagProps) => import("react/jsx-runtime").JSX.Element;
10
3
  export default MultiSelectFieldTag;
@@ -1,8 +1,5 @@
1
1
  interface MultiSelectFieldTagProps {
2
- item: {
3
- id: number;
4
- label: string;
5
- };
6
- onRemove: () => void;
2
+ label: string;
3
+ onRemove: (e: any) => void;
7
4
  }
8
5
  export default MultiSelectFieldTagProps;
@@ -32,6 +32,9 @@ export type { default as IconButtonProps } from './IconButton/IconButtonProps';
32
32
  export { default as MultiSelectField } from './MultiSelectField/MultiSelectField';
33
33
  export { default as MultiSelectFieldItem } from './MultiSelectField/MultiSelectFieldItem';
34
34
  export { default as MultiSelectFieldTag } from './MultiSelectField/MultiSelectFieldTag';
35
+ export type { default as MultiSelectFieldTagProps } from './MultiSelectField/MultiSelectFieldTagProps.tsx';
36
+ export type { default as MultiSelectFieldProps } from './MultiSelectField/MultiSelectFieldProps.tsx';
37
+ export type { default as MultiSelectFieldItemProps } from './MultiSelectField/MultiSelectFieldItemProps.tsx';
35
38
  export { default as PasswordField } from './PasswordField/PasswordField';
36
39
  export { default as RadioButton } from './RadioButtons/RadioButton';
37
40
  export { default as RadioButtons } from './RadioButtons/RadioButtons';
@@ -0,0 +1,3 @@
1
+ import IconProps from "../../IconProps";
2
+ declare const LockSimple: ({ type }: IconProps) => import("react/jsx-runtime").JSX.Element;
3
+ export default LockSimple;
@@ -37,6 +37,7 @@ export { default as ListBullets } from './OfficeAndEditing/ListBullets/ListBulle
37
37
  export { default as Printer } from './OfficeAndEditing/Printer/Printer.tsx';
38
38
  export { default as User } from './People/User/User.tsx';
39
39
  export { default as WarningCircle } from './SecurityAndWarnings/WarningCircle/WarningCircle';
40
+ export { default as LockSimple } from './SecurityAndWarnings/LockSimple/LockSimple.tsx';
40
41
  export { default as Bell } from './SystemAndDevice/Bell/Bell';
41
42
  export { default as MagnifyingGlass } from './SystemAndDevice/MagnifyingGlass/MagnifyingGlass';
42
43
  export { default as DotsSixVertical } from './SystemAndDevice/DotSixVertical/DotSixVertical.tsx';