@snowbomb1/nova-ui 1.0.9 → 1.0.11
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/index.d.ts +307 -13
- package/dist/index.js +32 -7
- package/dist/nova-ui.css +1 -2
- package/dist/styles.d.ts +2 -0
- package/package.json +2 -2
- package/dist/Box.d.ts +0 -2
- package/dist/chunks/Box-ByLjqYJZ.js +0 -4670
- package/dist/chunks/Box-vMWmmOuo.js +0 -6
- package/dist/components/Box/Box.d.ts +0 -6
- package/dist/components/Box/index.d.ts +0 -1
- package/dist/components/Box/index.js +0 -1
- package/dist/components/Button/Button.d.ts +0 -11
- package/dist/components/Button/index.d.ts +0 -1
- package/dist/components/FormField/FormField.d.ts +0 -7
- package/dist/components/FormField/index.d.ts +0 -1
- package/dist/components/Header/Header.d.ts +0 -6
- package/dist/components/Header/index.d.ts +0 -1
- package/dist/components/Input/Input.d.ts +0 -8
- package/dist/components/Input/index.d.ts +0 -1
- package/dist/components/Modal/Modal.d.ts +0 -9
- package/dist/components/Modal/index.d.ts +0 -1
- package/dist/components/Select/Select.d.ts +0 -15
- package/dist/components/Select/index.d.ts +0 -1
- package/dist/components/Toggle/Toggle.d.ts +0 -7
- package/dist/components/Toggle/index.d.ts +0 -1
- package/dist/components/Tooltip/Tooltip.d.ts +0 -7
- package/dist/components/Tooltip/index.d.ts +0 -1
- package/dist/components/TopNav/ThemeToggler.d.ts +0 -1
- package/dist/components/TopNav/TopNav.d.ts +0 -7
- package/dist/components/TopNav/index.d.ts +0 -1
- package/dist/components/Viewer/Viewer.d.ts +0 -15
- package/dist/components/Viewer/ViewerLoader.d.ts +0 -6
- package/dist/components/Viewer/index.d.ts +0 -1
- package/dist/hooks/useKeyboardShortcuts.d.ts +0 -7
- package/dist/hooks/useMediaLoader.d.ts +0 -11
- package/dist/hooks/useTheme.d.ts +0 -6
- package/dist/icons/close.d.ts +0 -6
- package/dist/icons/hamburger.d.ts +0 -6
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,307 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
export
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import { JSX } from 'react/jsx-runtime';
|
|
2
|
+
import { LabelHTMLAttributes } from 'react';
|
|
3
|
+
import { MouseEvent as MouseEvent_2 } from 'react';
|
|
4
|
+
import { ReactNode } from 'react';
|
|
5
|
+
|
|
6
|
+
export declare const Accordion: ({ title, children, defaultOpen }: AccordionProps) => JSX.Element;
|
|
7
|
+
|
|
8
|
+
export declare interface AccordionProps {
|
|
9
|
+
title: string;
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
defaultOpen?: boolean;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export declare const ActionSheet: ({ isOpen, onClose, title, message, actions }: ActionSheetProps) => JSX.Element;
|
|
15
|
+
|
|
16
|
+
export declare interface ActionSheetAction {
|
|
17
|
+
label: string;
|
|
18
|
+
icon?: React.ReactNode;
|
|
19
|
+
onClick: () => void;
|
|
20
|
+
destructive?: boolean;
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export declare interface ActionSheetProps {
|
|
25
|
+
isOpen: boolean;
|
|
26
|
+
onClose: () => void;
|
|
27
|
+
title?: string;
|
|
28
|
+
message?: string;
|
|
29
|
+
actions: ActionSheetAction[];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export declare const Alert: ({ type, children }: AlertProps) => JSX.Element;
|
|
33
|
+
|
|
34
|
+
export declare interface AlertProps {
|
|
35
|
+
type?: AlertType;
|
|
36
|
+
children: React.ReactNode;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export declare type AlertType = 'success' | 'warning' | 'error' | 'info';
|
|
40
|
+
|
|
41
|
+
export declare const AppLayout: ({ topNav, sideNav, sideNavOpen, sideNavExpandedWidth, sideNavCollapsedWidth, children }: AppLayoutProps) => JSX.Element;
|
|
42
|
+
|
|
43
|
+
export declare interface AppLayoutProps {
|
|
44
|
+
topNav?: ReactNode;
|
|
45
|
+
sideNav?: ReactNode;
|
|
46
|
+
sideNavOpen?: boolean;
|
|
47
|
+
sideNavExpandedWidth?: string;
|
|
48
|
+
sideNavCollapsedWidth?: string;
|
|
49
|
+
children: ReactNode;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export declare const Box: ({ children, position, direction }: BoxProps) => JSX.Element;
|
|
53
|
+
|
|
54
|
+
export declare type BoxPosition = 'left' | 'right' | 'center';
|
|
55
|
+
|
|
56
|
+
export declare interface BoxProps {
|
|
57
|
+
children: React.ReactNode;
|
|
58
|
+
position?: BoxPosition;
|
|
59
|
+
direction?: FlexDirection;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export declare const Button: ({ children, onClick, variant, disabled, disabledMessage, tooltipPosition, ...props }: ButtonProps) => JSX.Element;
|
|
63
|
+
|
|
64
|
+
export declare interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
65
|
+
children: React.ReactNode;
|
|
66
|
+
variant?: ButtonVariant;
|
|
67
|
+
disabled?: boolean;
|
|
68
|
+
disabledMessage?: string;
|
|
69
|
+
tooltipPosition?: TooltipPosition;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export declare type ButtonVariant = 'primary' | 'secondary' | 'icon';
|
|
73
|
+
|
|
74
|
+
export declare const Checkbox: ({ checked, onChange, label, disabled, indeterminate }: CheckboxProps) => JSX.Element;
|
|
75
|
+
|
|
76
|
+
export declare interface CheckboxProps {
|
|
77
|
+
checked: boolean;
|
|
78
|
+
onChange: (checked: boolean) => void;
|
|
79
|
+
label?: string;
|
|
80
|
+
disabled?: boolean;
|
|
81
|
+
indeterminate?: boolean;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export declare const Container: ({ children, header, headerActions, footer, variant, padding, fullWidth }: ContainerProps) => JSX.Element;
|
|
85
|
+
|
|
86
|
+
export declare type ContainerPadding = 'none' | 'sm' | 'md' | 'lg';
|
|
87
|
+
|
|
88
|
+
export declare interface ContainerProps {
|
|
89
|
+
children: React.ReactNode;
|
|
90
|
+
header?: React.ReactNode;
|
|
91
|
+
headerActions?: React.ReactNode;
|
|
92
|
+
footer?: React.ReactNode;
|
|
93
|
+
variant?: ContainerVariant;
|
|
94
|
+
padding?: ContainerPadding;
|
|
95
|
+
fullWidth?: boolean;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export declare type ContainerVariant = 'default' | 'outlined' | 'elevated' | 'flat';
|
|
99
|
+
|
|
100
|
+
export declare type FlexDirection = 'horizontal' | 'vertical';
|
|
101
|
+
|
|
102
|
+
export declare const FloatingButton: ({ onClick, variant, ariaLabel }: FloatingButtonProps) => JSX.Element;
|
|
103
|
+
|
|
104
|
+
export declare interface FloatingButtonProps {
|
|
105
|
+
variant: FloatingButtonVariant;
|
|
106
|
+
ariaLabel: string;
|
|
107
|
+
onClick: () => void;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export declare type FloatingButtonVariant = 'menu' | 'action';
|
|
111
|
+
|
|
112
|
+
export declare const FormField: ({ label, helperText, error, required, disabled, children }: FormFieldProps) => JSX.Element;
|
|
113
|
+
|
|
114
|
+
export declare interface FormFieldProps extends LabelHTMLAttributes<HTMLLabelElement> {
|
|
115
|
+
label?: string;
|
|
116
|
+
helperText?: string;
|
|
117
|
+
error?: string;
|
|
118
|
+
required?: boolean;
|
|
119
|
+
disabled?: boolean;
|
|
120
|
+
children: React.ReactNode;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export declare const Header: ({ children, variant }: HeaderProps) => JSX.Element;
|
|
124
|
+
|
|
125
|
+
export declare interface HeaderProps {
|
|
126
|
+
children: React.ReactNode;
|
|
127
|
+
variant?: HeaderVariant;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
export declare type HeaderVariant = 'h1' | 'h2' | 'h3' | 'h4';
|
|
131
|
+
|
|
132
|
+
export declare const Input: ({ value, onChange, disabled, suggestions, placeholder, hideClear, label, error, required, helperText, ...props }: InputProps) => JSX.Element;
|
|
133
|
+
|
|
134
|
+
export declare interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'onChange'> {
|
|
135
|
+
value: string | undefined;
|
|
136
|
+
onChange?: (newValue: string) => void;
|
|
137
|
+
disabled?: boolean;
|
|
138
|
+
suggestions?: string[];
|
|
139
|
+
hideClear?: boolean;
|
|
140
|
+
required?: boolean;
|
|
141
|
+
label?: string;
|
|
142
|
+
error?: string;
|
|
143
|
+
helperText?: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export declare const Modal: ({ isVisible, onClose, size, header, footer, children }: ModalProps) => JSX.Element;
|
|
147
|
+
|
|
148
|
+
export declare interface ModalProps {
|
|
149
|
+
isVisible: boolean;
|
|
150
|
+
onClose: () => void;
|
|
151
|
+
children: React.ReactNode;
|
|
152
|
+
size?: ModalSize;
|
|
153
|
+
header?: React.ReactNode;
|
|
154
|
+
footer?: React.ReactNode;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
export declare type ModalSize = 's' | 'm' | 'l' | 'xl';
|
|
158
|
+
|
|
159
|
+
declare interface MultiSelectProps extends SharedProps {
|
|
160
|
+
selectType: 'multi';
|
|
161
|
+
selectedOption?: Option_2[];
|
|
162
|
+
onChange: (options: Option_2[]) => void;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export declare type NavItem = {
|
|
166
|
+
label: string;
|
|
167
|
+
icon?: React.ReactNode;
|
|
168
|
+
onClick: () => void;
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
export declare type NavPosition = 'left' | 'right';
|
|
172
|
+
|
|
173
|
+
declare type Option_2 = {
|
|
174
|
+
label: string;
|
|
175
|
+
value: string | number;
|
|
176
|
+
};
|
|
177
|
+
export { Option_2 as Option }
|
|
178
|
+
|
|
179
|
+
export declare const Select: (props: SelectProps) => JSX.Element;
|
|
180
|
+
|
|
181
|
+
export declare type SelectProps = SingleSelectProps | MultiSelectProps;
|
|
182
|
+
|
|
183
|
+
declare interface SharedProps {
|
|
184
|
+
options: Option_2[];
|
|
185
|
+
autoFilter?: boolean;
|
|
186
|
+
placeholder?: string;
|
|
187
|
+
disabled?: boolean;
|
|
188
|
+
name?: string;
|
|
189
|
+
required?: boolean;
|
|
190
|
+
label?: string;
|
|
191
|
+
helperText?: string;
|
|
192
|
+
error?: string;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
export declare const SideNav: ({ isOpen, items, onToggle, expandedWidth, collapsedWidth, position }: SideNavProps) => JSX.Element;
|
|
196
|
+
|
|
197
|
+
export declare interface SideNavProps {
|
|
198
|
+
isOpen: boolean;
|
|
199
|
+
onToggle: () => void;
|
|
200
|
+
items: NavItem[];
|
|
201
|
+
expandedWidth?: string;
|
|
202
|
+
collapsedWidth?: string;
|
|
203
|
+
position?: NavPosition;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
declare interface SingleSelectProps extends SharedProps {
|
|
207
|
+
selectType?: 'single';
|
|
208
|
+
selectedOption?: Option_2;
|
|
209
|
+
onChange: (option: Option_2) => void;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
export declare const Stepper: ({ label, helperText, error, required, value, onChange, min, max, step, disabled }: StepperProps) => JSX.Element;
|
|
213
|
+
|
|
214
|
+
export declare interface StepperProps extends Pick<FormFieldProps, 'label' | 'helperText' | 'error' | 'required'> {
|
|
215
|
+
value: number;
|
|
216
|
+
onChange: (value: number) => void;
|
|
217
|
+
min?: number;
|
|
218
|
+
max?: number;
|
|
219
|
+
step?: number;
|
|
220
|
+
disabled?: boolean;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
declare type Theme = 'light' | 'dark';
|
|
224
|
+
|
|
225
|
+
export declare const Toast: ({ visible, onDismiss, timeout, position, status, children, dismissible }: ToastProps) => JSX.Element;
|
|
226
|
+
|
|
227
|
+
export declare type ToastPosition = 'top' | 'bottom';
|
|
228
|
+
|
|
229
|
+
export declare interface ToastProps {
|
|
230
|
+
visible: boolean;
|
|
231
|
+
onDismiss: () => void;
|
|
232
|
+
timeout?: number;
|
|
233
|
+
position?: ToastPosition;
|
|
234
|
+
status?: ToastStatus;
|
|
235
|
+
children: React.ReactNode;
|
|
236
|
+
dismissible?: boolean;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
export declare type ToastStatus = 'success' | 'warning' | 'error' | 'info';
|
|
240
|
+
|
|
241
|
+
export declare const Toggle: ({ label, value, onChange, disabled }: ToggleProps) => JSX.Element;
|
|
242
|
+
|
|
243
|
+
export declare interface ToggleProps {
|
|
244
|
+
label: string;
|
|
245
|
+
value: boolean;
|
|
246
|
+
onChange: (enabled: boolean) => void;
|
|
247
|
+
disabled?: boolean;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
export declare const Tooltip: ({ children, message, position }: TooltipProps) => JSX.Element;
|
|
251
|
+
|
|
252
|
+
export declare type TooltipPosition = 'top' | 'bottom' | 'left' | 'right';
|
|
253
|
+
|
|
254
|
+
export declare interface TooltipProps {
|
|
255
|
+
children: React.ReactNode;
|
|
256
|
+
message?: string;
|
|
257
|
+
position?: TooltipPosition;
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
export declare const TopNav: ({ header, logo, logoClick, search }: TopNavProps) => JSX.Element;
|
|
261
|
+
|
|
262
|
+
export declare interface TopNavProps {
|
|
263
|
+
header: React.ReactNode;
|
|
264
|
+
logo?: React.ReactNode;
|
|
265
|
+
logoClick?: () => void;
|
|
266
|
+
search?: React.ReactNode;
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
export declare const useMediaLoader: ({ src, onError }: UseMediaLoaderProps) => {
|
|
270
|
+
isLoading: boolean;
|
|
271
|
+
hasError: boolean;
|
|
272
|
+
isVideo: boolean;
|
|
273
|
+
reload: () => void;
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
declare interface UseMediaLoaderProps {
|
|
277
|
+
src: string;
|
|
278
|
+
onError?: (error: Error) => void;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
export declare const useTheme: () => {
|
|
282
|
+
theme: Theme;
|
|
283
|
+
isTransitioning: boolean;
|
|
284
|
+
toggleTheme: (event: MouseEvent_2) => void;
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
export declare interface VideoProps {
|
|
288
|
+
controls?: boolean;
|
|
289
|
+
loop?: boolean;
|
|
290
|
+
autoPlay?: boolean;
|
|
291
|
+
muted?: boolean;
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
export declare const Viewer: ({ src, alt, video, thumbnailWidth, onError, aspectRatio }: ViewerProps) => JSX.Element;
|
|
295
|
+
|
|
296
|
+
export declare type ViewerAspectRatio = '16/9' | '9/16' | '1/1' | '4/3' | '3/2' | '21/19';
|
|
297
|
+
|
|
298
|
+
export declare interface ViewerProps {
|
|
299
|
+
src: string;
|
|
300
|
+
alt: string;
|
|
301
|
+
video?: VideoProps;
|
|
302
|
+
thumbnailWidth?: string;
|
|
303
|
+
aspectRatio?: ViewerAspectRatio;
|
|
304
|
+
onError?: (error: Error) => void;
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
export { }
|