@bronzelabs/oakma-ui 0.0.3 → 0.0.5
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/README.md +20 -0
- package/dist/chunk-2S26OQ7A.js +2 -0
- package/dist/chunk-3LIRS3ET.js +2 -0
- package/dist/chunk-6TPVG4ID.js +2 -0
- package/dist/chunk-7KFEINOL.js +2 -0
- package/dist/chunk-AERZTKI2.js +2 -0
- package/dist/chunk-AVEV43MA.js +2 -0
- package/dist/chunk-COIYH42M.js +2 -0
- package/dist/chunk-ESX4M42B.js +2 -0
- package/dist/chunk-ETBWQWG5.js +2 -0
- package/dist/chunk-HDP66ZRA.js +2 -0
- package/dist/chunk-IOIICV6R.js +2 -0
- package/dist/chunk-LF4EJMFU.js +2 -0
- package/dist/chunk-LILYIQ5G.js +2 -0
- package/dist/chunk-OAFI6CS3.js +2 -0
- package/dist/chunk-OHI7XZLO.js +2 -0
- package/dist/chunk-RPWJBMXA.js +2 -0
- package/dist/chunk-SCGB3NVF.js +2 -0
- package/dist/chunk-U6FPHBLH.js +2 -0
- package/dist/components/Button/index.d.ts +58 -0
- package/dist/components/Button/index.js +2 -0
- package/dist/components/Checkbox/index.d.ts +19 -0
- package/dist/components/Checkbox/index.js +2 -0
- package/dist/components/Chip/index.d.ts +17 -0
- package/dist/components/Chip/index.js +2 -0
- package/dist/components/Drawer/index.d.ts +33 -0
- package/dist/components/Drawer/index.js +2 -0
- package/dist/components/Dropdown/index.d.ts +44 -0
- package/dist/components/Dropdown/index.js +2 -0
- package/dist/components/Logo/index.d.ts +9 -0
- package/dist/components/Logo/index.js +2 -0
- package/dist/components/Modal/index.d.ts +40 -0
- package/dist/components/Modal/index.js +2 -0
- package/dist/components/MultiSelect/index.d.ts +17 -0
- package/dist/components/MultiSelect/index.js +2 -0
- package/dist/components/Notification/index.d.ts +21 -0
- package/dist/components/Notification/index.js +2 -0
- package/dist/components/Notifications/index.d.ts +25 -0
- package/dist/components/Notifications/index.js +2 -0
- package/dist/components/Select/index.d.ts +21 -0
- package/dist/components/Select/index.js +2 -0
- package/dist/components/Spinner/index.d.ts +17 -0
- package/dist/components/Spinner/index.js +2 -0
- package/dist/components/TextArea/index.d.ts +25 -0
- package/dist/components/TextArea/index.js +2 -0
- package/dist/components/TextField/index.d.ts +73 -0
- package/dist/components/TextField/index.js +2 -0
- package/dist/components/TextInput/index.d.ts +35 -0
- package/dist/components/TextInput/index.js +2 -0
- package/dist/components/Toggle/index.d.ts +13 -0
- package/dist/components/Toggle/index.js +2 -0
- package/dist/index.d.ts +20 -345
- package/dist/index.js +1 -1
- package/dist/types-CKb67Dtj.d.ts +6 -0
- package/package.json +6 -6
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { b as TextFieldSize, c as TextFieldVariant } from '../../types-CKb67Dtj.js';
|
|
3
|
+
|
|
4
|
+
interface TextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, "id"> {
|
|
5
|
+
id: string;
|
|
6
|
+
label?: string;
|
|
7
|
+
size?: TextFieldSize;
|
|
8
|
+
variant?: TextFieldVariant;
|
|
9
|
+
leadingIcon?: {
|
|
10
|
+
icon: React.ReactNode;
|
|
11
|
+
};
|
|
12
|
+
trailingIcon?: {
|
|
13
|
+
icon: React.ReactNode;
|
|
14
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
15
|
+
type?: "button" | "submit" | "reset";
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
};
|
|
18
|
+
showOptional?: boolean;
|
|
19
|
+
error?: {
|
|
20
|
+
message: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
declare const TextArea: React.FC<TextAreaProps>;
|
|
24
|
+
|
|
25
|
+
export { type TextAreaProps, TextFieldSize as TextAreaSize, TextFieldVariant as TextAreaVariant, TextArea as default };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import React$1 from 'react';
|
|
2
|
+
import { b as TextFieldSize, c as TextFieldVariant } from '../../types-CKb67Dtj.js';
|
|
3
|
+
export { T as TEXT_FIELD_SIZES, a as TEXT_FIELD_VARIANTS } from '../../types-CKb67Dtj.js';
|
|
4
|
+
|
|
5
|
+
interface ContainerProps {
|
|
6
|
+
keyboardFocused?: boolean;
|
|
7
|
+
onMouseDown?: React$1.MouseEventHandler<HTMLDivElement>;
|
|
8
|
+
onMouseUp?: React$1.MouseEventHandler<HTMLDivElement>;
|
|
9
|
+
size: "sm" | "md";
|
|
10
|
+
variant?: "dark" | "light";
|
|
11
|
+
hasButton: boolean;
|
|
12
|
+
label?: string;
|
|
13
|
+
showOptional?: boolean;
|
|
14
|
+
required?: boolean;
|
|
15
|
+
children: React$1.ReactNode;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
declare const Container: React$1.FC<ContainerProps>;
|
|
19
|
+
|
|
20
|
+
interface ErrorMessageProps {
|
|
21
|
+
id: string;
|
|
22
|
+
error: {
|
|
23
|
+
message: string;
|
|
24
|
+
};
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
declare const ErrorMessage: React$1.FC<ErrorMessageProps>;
|
|
28
|
+
|
|
29
|
+
interface LabelProps {
|
|
30
|
+
/** Unique identifier for the input element associated with this label */
|
|
31
|
+
inputId: string;
|
|
32
|
+
label: string;
|
|
33
|
+
variant?: "dark" | "light";
|
|
34
|
+
showOptional?: boolean;
|
|
35
|
+
required?: boolean;
|
|
36
|
+
className?: string;
|
|
37
|
+
}
|
|
38
|
+
declare const Label: React$1.FC<LabelProps>;
|
|
39
|
+
|
|
40
|
+
interface IconProps {
|
|
41
|
+
position: "leading" | "trailing";
|
|
42
|
+
fieldSize: TextFieldSize;
|
|
43
|
+
variant: TextFieldVariant;
|
|
44
|
+
onClick?: React$1.MouseEventHandler<HTMLButtonElement>;
|
|
45
|
+
disabled?: boolean;
|
|
46
|
+
buttonType?: "button" | "submit" | "reset";
|
|
47
|
+
children: React$1.ReactNode;
|
|
48
|
+
className?: string;
|
|
49
|
+
name?: string;
|
|
50
|
+
}
|
|
51
|
+
declare const Icon: React$1.FC<IconProps>;
|
|
52
|
+
|
|
53
|
+
interface NotchBorderProps {
|
|
54
|
+
label?: string;
|
|
55
|
+
showOptional?: boolean;
|
|
56
|
+
required?: boolean;
|
|
57
|
+
variant?: "dark" | "light";
|
|
58
|
+
}
|
|
59
|
+
declare const NotchBorder: React$1.FC<NotchBorderProps>;
|
|
60
|
+
|
|
61
|
+
interface UseInputKeyboardFocusProps<T> {
|
|
62
|
+
onFocus?: React.FocusEventHandler<T>;
|
|
63
|
+
onBlur?: React.FocusEventHandler<T>;
|
|
64
|
+
}
|
|
65
|
+
declare const useInputKeyboardFocus: <T extends HTMLElement = HTMLInputElement>({ onFocus, onBlur, }: UseInputKeyboardFocusProps<T>) => {
|
|
66
|
+
keyboardFocused: boolean;
|
|
67
|
+
handleMouseDown: () => void;
|
|
68
|
+
handleMouseUp: () => void;
|
|
69
|
+
handleFocus: (e: React.FocusEvent<T>) => void | undefined;
|
|
70
|
+
handleBlur: (e: React.FocusEvent<T>) => void | undefined;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
export { Container, ErrorMessage, Icon, Label, NotchBorder, TextFieldSize, TextFieldVariant, useInputKeyboardFocus };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ButtonProps } from '../Button/index.js';
|
|
3
|
+
import { b as TextFieldSize, c as TextFieldVariant } from '../../types-CKb67Dtj.js';
|
|
4
|
+
|
|
5
|
+
interface TextInputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, "id" | "type" | "size"> {
|
|
6
|
+
id: string;
|
|
7
|
+
label?: string;
|
|
8
|
+
size?: TextFieldSize;
|
|
9
|
+
variant?: TextFieldVariant;
|
|
10
|
+
type?: React.HTMLInputTypeAttribute;
|
|
11
|
+
leadingIcon?: {
|
|
12
|
+
icon: React.ReactNode;
|
|
13
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
14
|
+
type?: "button" | "submit" | "reset";
|
|
15
|
+
disabled?: boolean;
|
|
16
|
+
name?: string;
|
|
17
|
+
};
|
|
18
|
+
trailingIcon?: {
|
|
19
|
+
icon: React.ReactNode;
|
|
20
|
+
onClick?: React.MouseEventHandler<HTMLButtonElement>;
|
|
21
|
+
type?: "button" | "submit" | "reset";
|
|
22
|
+
disabled?: boolean;
|
|
23
|
+
name?: string;
|
|
24
|
+
};
|
|
25
|
+
showOptional?: boolean;
|
|
26
|
+
error?: {
|
|
27
|
+
message: string;
|
|
28
|
+
};
|
|
29
|
+
button?: Omit<ButtonProps, "children"> & {
|
|
30
|
+
label: string;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
declare const TextInput: React.FC<TextInputProps>;
|
|
34
|
+
|
|
35
|
+
export { type TextInputProps, TextFieldSize as TextInputSize, TextFieldVariant as TextInputVariant, TextInput as default };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
interface ToggleProps extends Omit<React.ComponentPropsWithRef<"input">, "size" | "children"> {
|
|
4
|
+
/** Label text displayed next to the Toggle. */
|
|
5
|
+
label?: string;
|
|
6
|
+
/** Secondary text displayed below the label. */
|
|
7
|
+
meta?: string;
|
|
8
|
+
/** Alternate label shown when the toggle is on. Falls back to label if not set. */
|
|
9
|
+
activeText?: string;
|
|
10
|
+
}
|
|
11
|
+
declare const Toggle: React.FC<ToggleProps>;
|
|
12
|
+
|
|
13
|
+
export { type ToggleProps, Toggle as default };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,345 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
type ButtonVariant = keyof typeof BUTTON_VARIANTS;
|
|
22
|
-
|
|
23
|
-
type AsProp<C extends React$1.ElementType> = {
|
|
24
|
-
/** The type of element to render the component as. */
|
|
25
|
-
as?: C;
|
|
26
|
-
};
|
|
27
|
-
type PropsToOmit<C extends React$1.ElementType, P> = keyof (AsProp<C> & P);
|
|
28
|
-
/**
|
|
29
|
-
* @template {React.ElementType} C Component
|
|
30
|
-
* @template {object} P Props
|
|
31
|
-
*/
|
|
32
|
-
type PolymorphicComponentProps<C extends React$1.ElementType, P = object> = React$1.PropsWithChildren<P & AsProp<C>> & Omit<React$1.ComponentPropsWithoutRef<C>, PropsToOmit<C, P>>;
|
|
33
|
-
/**
|
|
34
|
-
* @template {React.ElementType} C Components
|
|
35
|
-
* @template {object} P Props
|
|
36
|
-
*/
|
|
37
|
-
type PolymorphicComponentPropsWithRef<C extends React$1.ElementType, P = object> = PolymorphicComponentProps<C, P> & {
|
|
38
|
-
ref?: PolymorphicRef<C>;
|
|
39
|
-
};
|
|
40
|
-
/**
|
|
41
|
-
* @template {React.ElementType} C Component
|
|
42
|
-
*/
|
|
43
|
-
type PolymorphicRef<C extends React$1.ElementType> = React$1.ComponentPropsWithRef<C>["ref"];
|
|
44
|
-
|
|
45
|
-
type ButtonElementType = "button" | "a";
|
|
46
|
-
interface BaseButtonProps {
|
|
47
|
-
variant?: ButtonVariant;
|
|
48
|
-
size?: ButtonSize;
|
|
49
|
-
icon?: React$1.ReactNode;
|
|
50
|
-
as?: ButtonElementType;
|
|
51
|
-
iconPosition?: "left" | "right";
|
|
52
|
-
children?: React$1.ReactNode;
|
|
53
|
-
disabled?: boolean;
|
|
54
|
-
type?: "button" | "submit" | "reset";
|
|
55
|
-
loading?: boolean;
|
|
56
|
-
}
|
|
57
|
-
type ButtonProps<C extends ButtonElementType = "button"> = PolymorphicComponentPropsWithRef<C, BaseButtonProps>;
|
|
58
|
-
type ButtonComponent = <C extends ButtonElementType = "button">(props: ButtonProps<C>) => React$1.ReactNode;
|
|
59
|
-
declare const Button: ButtonComponent;
|
|
60
|
-
|
|
61
|
-
declare const CHECKBOX_SIZES: {
|
|
62
|
-
readonly sm: "sm";
|
|
63
|
-
readonly md: "md";
|
|
64
|
-
};
|
|
65
|
-
type CheckboxSize = keyof typeof CHECKBOX_SIZES;
|
|
66
|
-
|
|
67
|
-
interface CheckboxProps extends Omit<React$1.ComponentPropsWithRef<"input">, "size"> {
|
|
68
|
-
/** Label text for the checkbox. */
|
|
69
|
-
label?: string;
|
|
70
|
-
/** Secondary text displayed below the label. */
|
|
71
|
-
meta?: string;
|
|
72
|
-
/** Visual size of the checkbox control. */
|
|
73
|
-
size?: CheckboxSize;
|
|
74
|
-
}
|
|
75
|
-
declare const Checkbox: React$1.FC<CheckboxProps>;
|
|
76
|
-
|
|
77
|
-
declare const CHIP_SIZES: {
|
|
78
|
-
readonly sm: "sm";
|
|
79
|
-
readonly lg: "lg";
|
|
80
|
-
};
|
|
81
|
-
type ChipSize = keyof typeof CHIP_SIZES;
|
|
82
|
-
|
|
83
|
-
interface ChipProps extends React$1.ComponentPropsWithRef<"div"> {
|
|
84
|
-
size?: ChipSize;
|
|
85
|
-
leadingIcon?: React$1.ReactNode;
|
|
86
|
-
trailingIcon?: React$1.ReactNode;
|
|
87
|
-
count?: number | string;
|
|
88
|
-
}
|
|
89
|
-
declare const Chip: React$1.FC<ChipProps>;
|
|
90
|
-
|
|
91
|
-
declare const DRAWER_POSITIONS: readonly ["top", "right", "bottom", "left"];
|
|
92
|
-
type DrawerPosition = (typeof DRAWER_POSITIONS)[number];
|
|
93
|
-
|
|
94
|
-
interface DrawerProps extends HTMLMotionProps<"div"> {
|
|
95
|
-
/** Side of the screen on which the Drawer will be opened. */
|
|
96
|
-
position?: DrawerPosition;
|
|
97
|
-
/** Whether the Drawer is open. */
|
|
98
|
-
isOpen?: boolean;
|
|
99
|
-
/** Function called when the Drawer is closed. */
|
|
100
|
-
onClose: () => void;
|
|
101
|
-
/** Whether the backdrop should be rendered. */
|
|
102
|
-
withBackdrop?: boolean;
|
|
103
|
-
/** Whether the close button should be rendered. */
|
|
104
|
-
withCloseButton?: boolean;
|
|
105
|
-
/** Whether the Drawer should be closed when user clicks on the overlay. */
|
|
106
|
-
closeOnClickOutside?: boolean;
|
|
107
|
-
/** Whether `onClose` should be called when user presses the escape key. */
|
|
108
|
-
closeOnEscape?: boolean;
|
|
109
|
-
/** Whether scroll should be locked when `isOpen={true}`. */
|
|
110
|
-
lockScroll?: boolean;
|
|
111
|
-
/** Whether focus should be trapped within the drawer when `isOpen={true}`. */
|
|
112
|
-
trapFocus?: boolean;
|
|
113
|
-
/** The portal the Drawer should be rendered inside.*/
|
|
114
|
-
portal?: Element | DocumentFragment;
|
|
115
|
-
/** */
|
|
116
|
-
children?: React$1.ReactNode;
|
|
117
|
-
}
|
|
118
|
-
declare const Drawer: React$1.FC<DrawerProps>;
|
|
119
|
-
|
|
120
|
-
declare const TEXT_FIELD_SIZES: readonly ["sm", "md"];
|
|
121
|
-
type TextFieldSize = (typeof TEXT_FIELD_SIZES)[number];
|
|
122
|
-
declare const TEXT_FIELD_VARIANTS: readonly ["dark", "light"];
|
|
123
|
-
type TextFieldVariant = (typeof TEXT_FIELD_VARIANTS)[number];
|
|
124
|
-
|
|
125
|
-
type DropdownSize = TextFieldSize;
|
|
126
|
-
interface DropdownSharedProps {
|
|
127
|
-
label?: string;
|
|
128
|
-
size?: DropdownSize;
|
|
129
|
-
showOptional?: boolean;
|
|
130
|
-
leadingIcon?: {
|
|
131
|
-
icon: React.ReactNode;
|
|
132
|
-
};
|
|
133
|
-
required?: boolean;
|
|
134
|
-
error?: {
|
|
135
|
-
message: string;
|
|
136
|
-
};
|
|
137
|
-
/**
|
|
138
|
-
* When `true`, the dropdown will display a count of selected options when multiple options are selected. This prop is only applicable when using the `MultiSelect` component.
|
|
139
|
-
* @default true
|
|
140
|
-
*/
|
|
141
|
-
showSelectedCount?: boolean;
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
type SelectProps$1 = React$1.ComponentPropsWithRef<typeof ReactSelect>;
|
|
145
|
-
interface DropdownProps extends Omit<SelectProps$1, "isMulti">, DropdownSharedProps {
|
|
146
|
-
/**
|
|
147
|
-
* The `isMulti` prop is not supported in the `Dropdown` component. Please use the `MultiSelect` component for multi-select functionality.
|
|
148
|
-
*/
|
|
149
|
-
isMulti?: never;
|
|
150
|
-
}
|
|
151
|
-
declare const Dropdown: React$1.FC<DropdownProps>;
|
|
152
|
-
|
|
153
|
-
interface AsyncDropdownProps extends Omit<AsyncProps<unknown, boolean, GroupBase<unknown>>, "isMulti">, DropdownSharedProps {
|
|
154
|
-
ref?: React$1.Ref<React$1.ComponentRef<typeof AsyncReactSelect>>;
|
|
155
|
-
/**
|
|
156
|
-
* The `isMulti` prop is not supported in the `AsyncDropdown` component. Please use the `MultiSelect` component for multi-select functionality.
|
|
157
|
-
*/
|
|
158
|
-
isMulti?: never;
|
|
159
|
-
}
|
|
160
|
-
declare const AsyncDropdown: React$1.FC<AsyncDropdownProps>;
|
|
161
|
-
|
|
162
|
-
interface LogoProps extends React$1.SVGProps<SVGSVGElement> {
|
|
163
|
-
withGraidient?: boolean;
|
|
164
|
-
withText?: boolean;
|
|
165
|
-
}
|
|
166
|
-
declare const Logo: React$1.FC<LogoProps>;
|
|
167
|
-
|
|
168
|
-
interface ModalProps extends HTMLMotionProps<"div"> {
|
|
169
|
-
/** */
|
|
170
|
-
isOpen?: boolean;
|
|
171
|
-
/** Callback function that's called when the Modal is closed. */
|
|
172
|
-
onClose: () => void;
|
|
173
|
-
/** */
|
|
174
|
-
withBackdrop?: boolean;
|
|
175
|
-
/** */
|
|
176
|
-
withCloseButton?: boolean;
|
|
177
|
-
/** */
|
|
178
|
-
closeOnClickOutside?: boolean;
|
|
179
|
-
/** */
|
|
180
|
-
closeOnEscape?: boolean;
|
|
181
|
-
/** */
|
|
182
|
-
lockScroll?: boolean;
|
|
183
|
-
/** */
|
|
184
|
-
trapFocus?: boolean;
|
|
185
|
-
/** */
|
|
186
|
-
portal?: Element | DocumentFragment;
|
|
187
|
-
/** @deprecated Not currently in use */
|
|
188
|
-
/** Title to use at the top of the Modal. */
|
|
189
|
-
title?: string;
|
|
190
|
-
/** @deprecated Not currently in use */
|
|
191
|
-
/** Subtitle to use at the top of the Modal. */
|
|
192
|
-
subTitle?: string;
|
|
193
|
-
/** A React Node that's displayed in place of the default `title` and `subTitle`. */
|
|
194
|
-
header?: React$1.ReactNode;
|
|
195
|
-
/** A React Node that's displayed at the bottom of the Modal. */
|
|
196
|
-
footer?: React$1.ReactNode;
|
|
197
|
-
/** */
|
|
198
|
-
children?: React$1.ReactNode;
|
|
199
|
-
/** */
|
|
200
|
-
contentClassName?: string;
|
|
201
|
-
}
|
|
202
|
-
declare const Modal: React$1.FC<ModalProps>;
|
|
203
|
-
|
|
204
|
-
interface MultiSelectProps extends Omit<DropdownProps, "isMulti"> {
|
|
205
|
-
cy?: string;
|
|
206
|
-
}
|
|
207
|
-
declare const MultiSelect: React$1.FC<MultiSelectProps>;
|
|
208
|
-
|
|
209
|
-
interface AsyncMultiSelectProps extends Omit<AsyncDropdownProps, "isMulti"> {
|
|
210
|
-
cy?: string;
|
|
211
|
-
}
|
|
212
|
-
declare const AsyncMultiSelect: React$1.FC<AsyncMultiSelectProps>;
|
|
213
|
-
|
|
214
|
-
declare const NOTIFICATION_VARIANTS: readonly ["default", "dark"];
|
|
215
|
-
type NotificationVariant = (typeof NOTIFICATION_VARIANTS)[number];
|
|
216
|
-
|
|
217
|
-
interface NotificationProps extends Omit<React$1.ComponentPropsWithRef<"div">, "children"> {
|
|
218
|
-
variant?: NotificationVariant;
|
|
219
|
-
leadingIcon?: React$1.ReactNode;
|
|
220
|
-
text: string;
|
|
221
|
-
subText?: string | React$1.ReactNode;
|
|
222
|
-
onClose?: () => void;
|
|
223
|
-
}
|
|
224
|
-
interface NotificationData extends Pick<NotificationProps, "variant" | "text" | "subText"> {
|
|
225
|
-
/** The id of the Notification. */
|
|
226
|
-
id: string;
|
|
227
|
-
/** Time that the notification was added. */
|
|
228
|
-
timestamp: number;
|
|
229
|
-
}
|
|
230
|
-
declare const Notification: React$1.FC<NotificationProps>;
|
|
231
|
-
|
|
232
|
-
interface NotificationsProps extends React$1.ComponentProps<"div"> {
|
|
233
|
-
isDisismissable?: boolean;
|
|
234
|
-
children?: never;
|
|
235
|
-
}
|
|
236
|
-
declare const Notifications: React$1.FC<NotificationsProps>;
|
|
237
|
-
|
|
238
|
-
type PickPartial<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
|
|
239
|
-
type SingleOrArray<T> = T | T[];
|
|
240
|
-
|
|
241
|
-
type NotificationsContextType = {
|
|
242
|
-
/** Array of notifications. */
|
|
243
|
-
notifications: NotificationData[];
|
|
244
|
-
/** Function to add a notification to the state. */
|
|
245
|
-
addNotification: (notifications: SingleOrArray<PickPartial<NotificationData, "id" | "timestamp">>, withTimeout?: boolean) => void;
|
|
246
|
-
/** Function to remove a notification from the state. */
|
|
247
|
-
removeNotification: (id?: string) => void;
|
|
248
|
-
};
|
|
249
|
-
declare const NotificationsContext: React$1.Context<NotificationsContextType>;
|
|
250
|
-
declare const NotificationsProvider: React$1.FC<React$1.PropsWithChildren>;
|
|
251
|
-
declare const useNotifications: () => NotificationsContextType;
|
|
252
|
-
|
|
253
|
-
interface SelectProps extends Omit<React$1.SelectHTMLAttributes<HTMLSelectElement>, "id" | "size"> {
|
|
254
|
-
id: string;
|
|
255
|
-
label?: string;
|
|
256
|
-
size?: TextFieldSize;
|
|
257
|
-
variant?: TextFieldVariant;
|
|
258
|
-
leadingIcon?: {
|
|
259
|
-
icon: React$1.ReactNode;
|
|
260
|
-
};
|
|
261
|
-
placeholder?: string;
|
|
262
|
-
showOptional?: boolean;
|
|
263
|
-
error?: {
|
|
264
|
-
message: string;
|
|
265
|
-
};
|
|
266
|
-
children: React$1.ReactNode;
|
|
267
|
-
}
|
|
268
|
-
declare const Select: React$1.FC<SelectProps>;
|
|
269
|
-
|
|
270
|
-
declare const SPINNER_SIZES: {
|
|
271
|
-
readonly xs: "xs";
|
|
272
|
-
readonly sm: "sm";
|
|
273
|
-
readonly md: "md";
|
|
274
|
-
readonly lg: "lg";
|
|
275
|
-
};
|
|
276
|
-
type SpinnerSize = keyof typeof SPINNER_SIZES;
|
|
277
|
-
|
|
278
|
-
interface SpinnerProps extends Omit<React$1.ComponentProps<"div">, "color"> {
|
|
279
|
-
/** Size of the spinner. */
|
|
280
|
-
size?: SpinnerSize;
|
|
281
|
-
}
|
|
282
|
-
declare const Spinner: React$1.FC<SpinnerProps>;
|
|
283
|
-
|
|
284
|
-
interface TextAreaProps extends Omit<React$1.TextareaHTMLAttributes<HTMLTextAreaElement>, "id"> {
|
|
285
|
-
id: string;
|
|
286
|
-
label?: string;
|
|
287
|
-
size?: TextFieldSize;
|
|
288
|
-
variant?: TextFieldVariant;
|
|
289
|
-
leadingIcon?: {
|
|
290
|
-
icon: React$1.ReactNode;
|
|
291
|
-
};
|
|
292
|
-
trailingIcon?: {
|
|
293
|
-
icon: React$1.ReactNode;
|
|
294
|
-
onClick?: React$1.MouseEventHandler<HTMLButtonElement>;
|
|
295
|
-
type?: "button" | "submit" | "reset";
|
|
296
|
-
disabled?: boolean;
|
|
297
|
-
};
|
|
298
|
-
showOptional?: boolean;
|
|
299
|
-
error?: {
|
|
300
|
-
message: string;
|
|
301
|
-
};
|
|
302
|
-
}
|
|
303
|
-
declare const TextArea: React$1.FC<TextAreaProps>;
|
|
304
|
-
|
|
305
|
-
interface TextInputProps extends Omit<React$1.InputHTMLAttributes<HTMLInputElement>, "id" | "type" | "size"> {
|
|
306
|
-
id: string;
|
|
307
|
-
label?: string;
|
|
308
|
-
size?: TextFieldSize;
|
|
309
|
-
variant?: TextFieldVariant;
|
|
310
|
-
type?: React$1.HTMLInputTypeAttribute;
|
|
311
|
-
leadingIcon?: {
|
|
312
|
-
icon: React$1.ReactNode;
|
|
313
|
-
onClick?: React$1.MouseEventHandler<HTMLButtonElement>;
|
|
314
|
-
type?: "button" | "submit" | "reset";
|
|
315
|
-
disabled?: boolean;
|
|
316
|
-
name?: string;
|
|
317
|
-
};
|
|
318
|
-
trailingIcon?: {
|
|
319
|
-
icon: React$1.ReactNode;
|
|
320
|
-
onClick?: React$1.MouseEventHandler<HTMLButtonElement>;
|
|
321
|
-
type?: "button" | "submit" | "reset";
|
|
322
|
-
disabled?: boolean;
|
|
323
|
-
name?: string;
|
|
324
|
-
};
|
|
325
|
-
showOptional?: boolean;
|
|
326
|
-
error?: {
|
|
327
|
-
message: string;
|
|
328
|
-
};
|
|
329
|
-
button?: Omit<ButtonProps, "children"> & {
|
|
330
|
-
label: string;
|
|
331
|
-
};
|
|
332
|
-
}
|
|
333
|
-
declare const TextInput: React$1.FC<TextInputProps>;
|
|
334
|
-
|
|
335
|
-
interface ToggleProps extends Omit<React$1.ComponentPropsWithRef<"input">, "size" | "children"> {
|
|
336
|
-
/** Label text displayed next to the Toggle. */
|
|
337
|
-
label?: string;
|
|
338
|
-
/** Secondary text displayed below the label. */
|
|
339
|
-
meta?: string;
|
|
340
|
-
/** Alternate label shown when the toggle is on. Falls back to label if not set. */
|
|
341
|
-
activeText?: string;
|
|
342
|
-
}
|
|
343
|
-
declare const Toggle: React$1.FC<ToggleProps>;
|
|
344
|
-
|
|
345
|
-
export { AsyncDropdown, type AsyncDropdownProps, AsyncMultiSelect, type AsyncMultiSelectProps, BUTTON_SIZES, BUTTON_VARIANTS, Button, type ButtonProps, type ButtonSize, type ButtonVariant, CHECKBOX_SIZES, CHIP_SIZES, Checkbox, type CheckboxProps, type CheckboxSize, Chip, type ChipProps, type ChipSize, DRAWER_POSITIONS, Drawer, type DrawerPosition, type DrawerProps, Dropdown, type DropdownProps, type DropdownSize, Logo, type LogoProps, Modal, type ModalProps, MultiSelect, type MultiSelectProps, Notification, type NotificationProps, Notifications, NotificationsContext, type NotificationsContextType, type NotificationsProps, NotificationsProvider, Select, type SelectProps, type TextFieldSize as SelectSize, Spinner, type SpinnerProps, TextArea, type TextAreaProps, type TextFieldSize as TextAreaSize, TextInput, type TextInputProps, type TextFieldSize as TextInputSize, Toggle, type ToggleProps, useNotifications };
|
|
1
|
+
export { BUTTON_SIZES, BUTTON_VARIANTS, default as Button, ButtonProps, ButtonSize, ButtonVariant } from './components/Button/index.js';
|
|
2
|
+
export { CHECKBOX_SIZES, default as Checkbox, CheckboxProps, CheckboxSize } from './components/Checkbox/index.js';
|
|
3
|
+
export { CHIP_SIZES, default as Chip, ChipProps, ChipSize } from './components/Chip/index.js';
|
|
4
|
+
export { DRAWER_POSITIONS, default as Drawer, DrawerPosition, DrawerProps } from './components/Drawer/index.js';
|
|
5
|
+
export { AsyncDropdown, AsyncDropdownProps, default as Dropdown, DropdownProps, DropdownSize } from './components/Dropdown/index.js';
|
|
6
|
+
export { default as Logo, LogoProps } from './components/Logo/index.js';
|
|
7
|
+
export { default as Modal, ModalProps } from './components/Modal/index.js';
|
|
8
|
+
export { AsyncMultiSelect, AsyncMultiSelectProps, default as MultiSelect, MultiSelectProps } from './components/MultiSelect/index.js';
|
|
9
|
+
export { default as Notification, NotificationProps } from './components/Notification/index.js';
|
|
10
|
+
export { default as Notifications, NotificationsContext, NotificationsContextType, NotificationsProps, NotificationsProvider, useNotifications } from './components/Notifications/index.js';
|
|
11
|
+
export { default as Select, SelectProps } from './components/Select/index.js';
|
|
12
|
+
export { b as SelectSize, b as TextAreaSize, b as TextInputSize } from './types-CKb67Dtj.js';
|
|
13
|
+
export { default as Spinner, SpinnerProps } from './components/Spinner/index.js';
|
|
14
|
+
export { default as TextArea, TextAreaProps } from './components/TextArea/index.js';
|
|
15
|
+
export { default as TextInput, TextInputProps } from './components/TextInput/index.js';
|
|
16
|
+
export { default as Toggle, ToggleProps } from './components/Toggle/index.js';
|
|
17
|
+
import 'react';
|
|
18
|
+
import 'motion/react';
|
|
19
|
+
import 'react-select';
|
|
20
|
+
import 'react-select/async';
|