@hellobetterdigitalnz/betterui 0.0.3-9 → 0.0.3-91
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.
- package/dist/Components/BetterUIProvider/BetterUIContext.d.ts +2 -2
- package/dist/Components/DataDisplay/Accordion/AccordionItemProps.d.ts +3 -0
- package/dist/Components/DataDisplay/NotificationsPanel/NotificationProps.d.ts +1 -1
- package/dist/Components/DataDisplay/Tab/TabNavItemProps.d.ts +1 -0
- package/dist/Components/DataDisplay/Table/TableFooter.d.ts +2 -1
- package/dist/Components/DataDisplay/Table/TableFooterProps.d.ts +6 -0
- package/dist/Components/DataDisplay/index.d.ts +3 -3
- package/dist/Components/Form/Button/ButtonProps.d.ts +1 -0
- package/dist/Components/Form/Checkbox/CheckboxProps.d.ts +3 -2
- package/dist/Components/Form/DropdownBadge/DropdownBadgeProps.d.ts +4 -3
- package/dist/Components/Form/DropdownField/DropdownFieldProps.d.ts +1 -1
- package/dist/Components/Form/FormFieldHolder/FormFieldHolderProps.d.ts +1 -0
- package/dist/Components/Form/InputProps.d.ts +3 -1
- package/dist/Components/Form/MultiSelectField/MultiSelectField.d.ts +2 -1
- package/dist/Components/Form/MultiSelectField/MultiSelectFieldItem.d.ts +2 -1
- package/dist/Components/Form/MultiSelectField/MultiSelectFieldItemProps.d.ts +10 -0
- package/dist/Components/Form/MultiSelectField/MultiSelectFieldProps.d.ts +29 -0
- package/dist/Components/Form/MultiSelectField/MultiSelectFieldTag.d.ts +2 -1
- package/dist/Components/Form/MultiSelectField/MultiSelectFieldTagProps.d.ts +5 -0
- package/dist/Components/Form/NumberField/NumberField.d.ts +3 -0
- package/dist/Components/Form/NumberField/NumberField.stories.d.ts +13 -0
- package/dist/Components/Form/NumberField/NumberFieldProps.d.ts +5 -0
- package/dist/Components/Form/PhoneField/PhoneField.d.ts +3 -0
- package/dist/Components/Form/PhoneField/PhoneField.stories.d.ts +13 -0
- package/dist/Components/Form/TypableDropdownField/TypableDropdownField.d.ts +3 -0
- package/dist/Components/Form/TypableDropdownField/TypableDropdownFieldItem.d.ts +3 -0
- package/dist/Components/Form/TypableDropdownField/TypableDropdownFieldItemProps.d.ts +7 -0
- package/dist/Components/Form/TypableDropdownField/TypableDropdownFieldProps.d.ts +29 -0
- package/dist/Components/Form/TypableDropdownField/TypableDropdownFieldSelector.d.ts +3 -0
- package/dist/Components/Form/TypableDropdownField/TypableDropdownFieldSelectorProps.d.ts +5 -0
- package/dist/Components/Form/UnitInput/UnitField.d.ts +3 -0
- package/dist/Components/Form/UnitInput/UnitField.stories.d.ts +13 -0
- package/dist/Components/Form/UnitInput/UnitFieldProps.d.ts +6 -0
- package/dist/Components/Form/index.d.ts +8 -0
- package/dist/Components/Icons/Arrows/ArrowLeft/ArrowLeft.d.ts +3 -0
- package/dist/Components/Icons/Arrows/ArrowsDownUp/ArrowsDownUp.d.ts +3 -0
- package/dist/Components/Icons/Arrows/ArrowsOutCardinal/ArrowsOutCardinal.d.ts +3 -0
- package/dist/Components/Icons/Arrows/CaretUpDown/CaretUpDown.d.ts +3 -0
- package/dist/Components/Icons/Communication/EnvelopeSimple/EnvelopeSimple.d.ts +3 -0
- package/dist/Components/Icons/Communication/Export/Export.d.ts +3 -0
- package/dist/Components/Icons/Communication/Phone/Phone.d.ts +3 -0
- package/dist/Components/Icons/Communication/Translate/Translate.d.ts +3 -0
- package/dist/Components/Icons/Design/PencilLine/PencilLine.d.ts +3 -0
- package/dist/Components/Icons/Design/PencilSimple/PencilSimple.d.ts +3 -0
- package/dist/Components/Icons/Design/Ruler/Ruler.d.ts +3 -0
- package/dist/Components/Icons/Education/BookOpenText/BookOpenText.d.ts +3 -0
- package/dist/Components/Icons/MapAndTravel/Globe/Globe.d.ts +3 -0
- package/dist/Components/Icons/MapAndTravel/HouseSimple/HouseSimple.d.ts +3 -0
- package/dist/Components/Icons/MathsAndFinance/ChartBar/ChartBar.d.ts +3 -0
- package/dist/Components/Icons/MathsAndFinance/ChartBarHorizontal/ChartBarHorizontal.d.ts +3 -0
- package/dist/Components/Icons/MathsAndFinance/ChartLine/ChartLine.d.ts +3 -0
- package/dist/Components/Icons/MathsAndFinance/ChartPie/ChartPie.d.ts +3 -0
- package/dist/Components/Icons/MathsAndFinance/NumberSquareThree/NumberSquareThree.d.ts +3 -0
- package/dist/Components/Icons/MathsAndFinance/Plus/Plus.d.ts +3 -0
- package/dist/Components/Icons/Media/SlidersHorizontal/SlidersHorizontal.d.ts +3 -0
- package/dist/Components/Icons/OfficeAndEditing/Folder/Folder.d.ts +3 -0
- package/dist/Components/Icons/OfficeAndEditing/List/List.d.ts +3 -0
- package/dist/Components/Icons/OfficeAndEditing/ListBullets/ListBullets.d.ts +3 -0
- package/dist/Components/Icons/OfficeAndEditing/Printer/Printer.d.ts +3 -0
- package/dist/Components/Icons/OfficeAndEditing/TextAa/TextAa.d.ts +3 -0
- package/dist/Components/Icons/OfficeAndEditing/TextColumns/TextColumns.d.ts +3 -0
- package/dist/Components/Icons/People/User/User.d.ts +3 -0
- package/dist/Components/Icons/People/UserCircle/UserCircle.d.ts +3 -0
- package/dist/Components/Icons/People/UserSwitch/UserSwitch.d.ts +3 -0
- package/dist/Components/Icons/SecurityAndWarnings/LockKeyOpen/LockKeyOpen.d.ts +3 -0
- package/dist/Components/Icons/SecurityAndWarnings/LockSimple/LockSimple.d.ts +3 -0
- package/dist/Components/Icons/SecurityAndWarnings/Question/Question.d.ts +3 -0
- package/dist/Components/Icons/SystemAndDevice/Check/Check.d.ts +3 -0
- package/dist/Components/Icons/SystemAndDevice/CheckSquare/CheckSquare.d.ts +3 -0
- package/dist/Components/Icons/SystemAndDevice/DotsThreeVertical/DotsThreeVertical.d.ts +3 -0
- package/dist/Components/Icons/SystemAndDevice/DownloadSimple/DownloadSimple.d.ts +3 -0
- package/dist/Components/Icons/SystemAndDevice/Gear/Gear.d.ts +3 -0
- package/dist/Components/Icons/SystemAndDevice/RadioButtonIcon/RadioButtonIcon.d.ts +3 -0
- package/dist/Components/Icons/SystemAndDevice/SignIn/SignIn.d.ts +3 -0
- package/dist/Components/Icons/SystemAndDevice/SignOut/SignOut.d.ts +3 -0
- package/dist/Components/Icons/index.d.ts +42 -1
- package/dist/Components/Layout/CalloutPopup/CalloutPopup.d.ts +2 -1
- package/dist/Components/Layout/CalloutPopup/CalloutPopupActionHolder.d.ts +3 -0
- package/dist/Components/Layout/CalloutPopup/CalloutPopupActionHolderProps.d.ts +9 -0
- package/dist/Components/Layout/CalloutPopup/CalloutPopupProps.d.ts +6 -0
- package/dist/Components/Layout/Header/HeaderLeftProps.d.ts +1 -0
- package/dist/Components/Layout/Header/HeaderRightProps.d.ts +1 -0
- package/dist/Components/Layout/ProfileDropdown/ProfileNavigationItemProps.d.ts +1 -1
- package/dist/Components/Layout/Sidebar/SidebarChevronProps.d.ts +2 -1
- package/dist/Components/Layout/Sidebar/SidebarSubNavigation.d.ts +2 -2
- package/dist/Components/Layout/Sidebar/SidebarSubNavigationProps.d.ts +2 -0
- package/dist/Components/Layout/index.d.ts +1 -0
- package/dist/index.cjs.js +2 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.es.js +4310 -2028
- package/dist/index.es.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
import { ReactNode } from "react";
|
|
2
2
|
interface BetterUIContextType {
|
|
3
3
|
curtain: boolean;
|
|
4
|
-
|
|
4
|
+
modalStack: ReactNode[];
|
|
5
5
|
openModal: (modal: React.ReactNode) => void;
|
|
6
6
|
closeModal: () => void;
|
|
7
7
|
setCurtain: (value: boolean) => void;
|
|
@@ -32,10 +32,10 @@ export type { default as NotificationsBellProps } from './NotificationsBell/Noti
|
|
|
32
32
|
export { default as Notification } from './NotificationsPanel/Notification';
|
|
33
33
|
export { default as NotificationsGroup } from './NotificationsPanel/NotificationsGroup';
|
|
34
34
|
export { default as NotificationsGroups } from './NotificationsPanel/NotificationsGroups';
|
|
35
|
+
export { default as NotificationsPanel } from './NotificationsPanel/NotificationsPanel';
|
|
36
|
+
export { default as NotificationsHeader } from './NotificationsPanel/NotificationsHeader';
|
|
37
|
+
export { default as NotificationsNone } from './NotificationsPanel/NotificationsNone';
|
|
35
38
|
export type { default as NotificationProps } from './NotificationsPanel/NotificationProps';
|
|
36
|
-
export type { default as NotificationsHeader } from './NotificationsPanel/NotificationsHeader';
|
|
37
|
-
export type { default as NotificationsNone } from './NotificationsPanel/NotificationsNone';
|
|
38
|
-
export type { default as NotificationsPanel } from './NotificationsPanel/NotificationsPanel';
|
|
39
39
|
export type { default as NotificationsGroupProps } from './NotificationsPanel/NotificationsGroupProps';
|
|
40
40
|
export type { default as NotificationsGroupsProps } from './NotificationsPanel/NotificationsGroupsProps';
|
|
41
41
|
export type { default as NotificationsHeaderProps } from './NotificationsPanel/NotificationsHeaderProps';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FocusEvent, MouseEvent } from "react";
|
|
1
|
+
import { ChangeEvent, FocusEvent, MouseEvent } from "react";
|
|
2
2
|
interface CheckboxProps {
|
|
3
3
|
label?: string;
|
|
4
4
|
name?: string;
|
|
@@ -14,7 +14,8 @@ interface CheckboxProps {
|
|
|
14
14
|
ariaLabel?: string;
|
|
15
15
|
ariaLabeledby?: string;
|
|
16
16
|
ariaDescribedby?: string;
|
|
17
|
-
|
|
17
|
+
onClick?: (e: MouseEvent, checked?: boolean) => void;
|
|
18
|
+
onChange?: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
18
19
|
onFocus?: (e: FocusEvent) => void;
|
|
19
20
|
onBlur?: (e: FocusEvent) => void;
|
|
20
21
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MouseEvent, FocusEvent } from "react";
|
|
2
|
-
interface
|
|
2
|
+
interface BadgeNameValueInterface {
|
|
3
3
|
label: string;
|
|
4
4
|
status?: "pending" | "inProgress" | "complete" | undefined;
|
|
5
5
|
value: string | number;
|
|
@@ -8,8 +8,9 @@ interface DropdownBadgeProps {
|
|
|
8
8
|
name?: string;
|
|
9
9
|
id?: string;
|
|
10
10
|
value?: string;
|
|
11
|
-
options: (
|
|
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;
|
|
@@ -23,5 +24,5 @@ interface DropdownBadgeProps {
|
|
|
23
24
|
onFocus?: (e: FocusEvent) => void;
|
|
24
25
|
onBlur?: (e: FocusEvent) => void;
|
|
25
26
|
}
|
|
26
|
-
export type {
|
|
27
|
+
export type { BadgeNameValueInterface };
|
|
27
28
|
export default DropdownBadgeProps;
|
|
@@ -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
|
}
|
|
@@ -2,7 +2,7 @@ import { FocusEvent, ChangeEvent, MouseEvent } from "react";
|
|
|
2
2
|
interface InputProps {
|
|
3
3
|
name?: string;
|
|
4
4
|
id?: string;
|
|
5
|
-
value?: string;
|
|
5
|
+
value?: string | number;
|
|
6
6
|
extraClass?: string;
|
|
7
7
|
placeholder?: string;
|
|
8
8
|
error?: boolean;
|
|
@@ -11,6 +11,8 @@ interface InputProps {
|
|
|
11
11
|
autoComplete?: boolean;
|
|
12
12
|
required?: boolean;
|
|
13
13
|
ariaLabel?: string;
|
|
14
|
+
min?: string;
|
|
15
|
+
max?: string;
|
|
14
16
|
minLength?: number;
|
|
15
17
|
maxLength?: number;
|
|
16
18
|
ariaLabeledby?: string;
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import MultiSelectFieldItemProps from "./MultiSelectFieldItemProps.tsx";
|
|
2
|
+
declare const MultiSelectFieldItem: (props: MultiSelectFieldItemProps) => import("react/jsx-runtime").JSX.Element;
|
|
2
3
|
export default MultiSelectFieldItem;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface MultiSelectFieldItemProps {
|
|
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;
|
|
9
|
+
}
|
|
10
|
+
export default MultiSelectFieldItemProps;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { MouseEvent, FocusEvent } from "react";
|
|
2
|
+
interface SelectOption {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string | number;
|
|
5
|
+
}
|
|
6
|
+
interface MultiSelectFieldProps {
|
|
7
|
+
name?: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
value: SelectOption[];
|
|
10
|
+
options: SelectOption[];
|
|
11
|
+
extraClass?: string;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
error?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
readonly?: boolean;
|
|
16
|
+
autoComplete?: boolean;
|
|
17
|
+
minLength?: number;
|
|
18
|
+
maxLength?: number;
|
|
19
|
+
required?: boolean;
|
|
20
|
+
ariaLabel?: string;
|
|
21
|
+
ariaLabeledby?: string;
|
|
22
|
+
ariaDescribedby?: string;
|
|
23
|
+
onClick?: (e: MouseEvent) => void;
|
|
24
|
+
onChange: (value: SelectOption[]) => void;
|
|
25
|
+
onFocus?: (e: FocusEvent) => void;
|
|
26
|
+
onBlur?: (e: FocusEvent) => void;
|
|
27
|
+
}
|
|
28
|
+
export type { SelectOption };
|
|
29
|
+
export default MultiSelectFieldProps;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
import NumberField from "././NumberField.tsx";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: (props: import("./NumberFieldProps.tsx").default) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof NumberField>;
|
|
13
|
+
export declare const Example: Story;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
import PhoneField from "./PhoneField.tsx";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: (props: import("../InputProps.tsx").default) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof PhoneField>;
|
|
13
|
+
export declare const Example: Story;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { MouseEvent, FocusEvent } from "react";
|
|
2
|
+
interface NameValueInterface {
|
|
3
|
+
label: string;
|
|
4
|
+
value: string | number;
|
|
5
|
+
}
|
|
6
|
+
interface TypableDropdownFieldProps {
|
|
7
|
+
name?: string;
|
|
8
|
+
id?: string;
|
|
9
|
+
value?: string | number | undefined;
|
|
10
|
+
options: NameValueInterface[] | string[];
|
|
11
|
+
extraClass?: string;
|
|
12
|
+
placeholder?: string;
|
|
13
|
+
error?: boolean;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
readonly?: boolean;
|
|
16
|
+
autoComplete?: boolean;
|
|
17
|
+
required?: boolean;
|
|
18
|
+
ariaLabel?: string;
|
|
19
|
+
minLength?: number;
|
|
20
|
+
maxLength?: number;
|
|
21
|
+
ariaLabeledby?: string;
|
|
22
|
+
creatable: boolean;
|
|
23
|
+
onClick?: (e: MouseEvent) => void;
|
|
24
|
+
onChange?: (e: MouseEvent, value: string | number) => void;
|
|
25
|
+
onFocus?: (e: FocusEvent) => void;
|
|
26
|
+
onBlur?: (e: FocusEvent) => void;
|
|
27
|
+
}
|
|
28
|
+
export type { NameValueInterface };
|
|
29
|
+
export default TypableDropdownFieldProps;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { StoryObj } from "@storybook/react";
|
|
2
|
+
import UnitField from "./UnitField";
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: (props: import("./UnitFieldProps").default) => import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
tags: string[];
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof UnitField>;
|
|
13
|
+
export declare const Example: Story;
|
|
@@ -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';
|
|
@@ -41,6 +44,11 @@ export { default as Textarea } from './Textarea/Textarea';
|
|
|
41
44
|
export type { default as TextareaProps } from './Textarea/TextareaProps';
|
|
42
45
|
export { default as TextField } from './TextField/TextField';
|
|
43
46
|
export type { default as TextFieldProps } from './TextField/TextFieldProps';
|
|
47
|
+
export { default as NumberField } from './NumberField/NumberField.tsx';
|
|
48
|
+
export type { default as NumberFieldProps } from './NumberField/NumberFieldProps.tsx';
|
|
49
|
+
export { default as UnitField } from './UnitInput/UnitField.tsx';
|
|
50
|
+
export type { default as UnitFieldProps } from './UnitInput/UnitField.tsx';
|
|
44
51
|
export { default as TimeField } from './TimeField/TimeField';
|
|
52
|
+
export { default as PhoneField } from './PhoneField/PhoneField.tsx';
|
|
45
53
|
export { default as ToggleSwitch } from './ToggleSwitch/ToggleSwitch';
|
|
46
54
|
export type { default as ToggleSwitchProps } from './ToggleSwitch/ToggleSwitchProps';
|