opus-toolkit-components 1.6.2 → 1.6.3
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/lib/index.d.ts +206 -0
- package/package.json +1 -1
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
declare module "opus-toolkit-components" {
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
|
|
4
|
+
// Accordion
|
|
5
|
+
export interface AccordionProps {
|
|
6
|
+
items?: any[];
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
export const Accordion: React.ComponentType<AccordionProps>;
|
|
10
|
+
|
|
11
|
+
// Button
|
|
12
|
+
export interface ButtonProps {
|
|
13
|
+
children?: React.ReactNode;
|
|
14
|
+
variant?: string;
|
|
15
|
+
rank?: string;
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
onClick?: (event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
18
|
+
className?: string;
|
|
19
|
+
name?: string;
|
|
20
|
+
["data-cy"]?: string;
|
|
21
|
+
}
|
|
22
|
+
export const Button: React.ComponentType<ButtonProps>;
|
|
23
|
+
|
|
24
|
+
// Card
|
|
25
|
+
export interface CardProps {
|
|
26
|
+
children?: React.ReactNode;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
export const Card: React.ComponentType<CardProps>;
|
|
30
|
+
|
|
31
|
+
// Input
|
|
32
|
+
export interface InputProps {
|
|
33
|
+
name?: string;
|
|
34
|
+
value?: string | number;
|
|
35
|
+
placeholder?: string;
|
|
36
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
37
|
+
className?: string;
|
|
38
|
+
["data-cy"]?: string;
|
|
39
|
+
}
|
|
40
|
+
export const Input: React.ComponentType<InputProps>;
|
|
41
|
+
|
|
42
|
+
// DatePicker
|
|
43
|
+
export interface DatePickerProps {
|
|
44
|
+
name?: string;
|
|
45
|
+
initialDate?: Date | string;
|
|
46
|
+
label?: string;
|
|
47
|
+
onChange?: (event: any) => void;
|
|
48
|
+
className?: string;
|
|
49
|
+
}
|
|
50
|
+
export const DatePicker: React.ComponentType<DatePickerProps>;
|
|
51
|
+
|
|
52
|
+
// Radio
|
|
53
|
+
export interface RadioButtonProps {
|
|
54
|
+
name?: string;
|
|
55
|
+
value?: string;
|
|
56
|
+
checked?: boolean;
|
|
57
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
58
|
+
}
|
|
59
|
+
export const RadioButton: React.ComponentType<RadioButtonProps>;
|
|
60
|
+
|
|
61
|
+
// Checkbox
|
|
62
|
+
export interface CheckboxProps {
|
|
63
|
+
name?: string;
|
|
64
|
+
checked?: boolean;
|
|
65
|
+
onChange?: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
66
|
+
label?: string;
|
|
67
|
+
}
|
|
68
|
+
export const Checkbox: React.ComponentType<CheckboxProps>;
|
|
69
|
+
|
|
70
|
+
// Table
|
|
71
|
+
export interface TableProps {
|
|
72
|
+
columns: any[];
|
|
73
|
+
data: any[];
|
|
74
|
+
className?: string;
|
|
75
|
+
}
|
|
76
|
+
export const Table: React.ComponentType<TableProps>;
|
|
77
|
+
|
|
78
|
+
// Dropdown
|
|
79
|
+
export interface DropdownProps {
|
|
80
|
+
name?: string;
|
|
81
|
+
value?: string;
|
|
82
|
+
options?: { label: string; value: string }[];
|
|
83
|
+
onChange?: (event: any) => void;
|
|
84
|
+
className?: string;
|
|
85
|
+
["data-cy"]?: string;
|
|
86
|
+
}
|
|
87
|
+
export const Dropdown: React.ComponentType<DropdownProps>;
|
|
88
|
+
|
|
89
|
+
// Navbar
|
|
90
|
+
export interface NavbarProps {
|
|
91
|
+
children?: React.ReactNode;
|
|
92
|
+
className?: string;
|
|
93
|
+
}
|
|
94
|
+
export const Navbar: React.ComponentType<NavbarProps>;
|
|
95
|
+
|
|
96
|
+
// Modal
|
|
97
|
+
export interface ModalProps {
|
|
98
|
+
open: boolean;
|
|
99
|
+
onClose: () => void;
|
|
100
|
+
children?: React.ReactNode;
|
|
101
|
+
title?: string;
|
|
102
|
+
className?: string;
|
|
103
|
+
}
|
|
104
|
+
export const Modal: React.ComponentType<ModalProps>;
|
|
105
|
+
|
|
106
|
+
// Loader
|
|
107
|
+
export interface LoaderProps {
|
|
108
|
+
size?: number | string;
|
|
109
|
+
className?: string;
|
|
110
|
+
}
|
|
111
|
+
export const Loader: React.ComponentType<LoaderProps>;
|
|
112
|
+
|
|
113
|
+
// Pill
|
|
114
|
+
export interface PillProps {
|
|
115
|
+
label: string;
|
|
116
|
+
variant?: string;
|
|
117
|
+
className?: string;
|
|
118
|
+
}
|
|
119
|
+
export const Pill: React.ComponentType<PillProps>;
|
|
120
|
+
|
|
121
|
+
// CookieBanner
|
|
122
|
+
export interface CookieBannerProps {
|
|
123
|
+
message?: string;
|
|
124
|
+
acceptLabel?: string;
|
|
125
|
+
declineLabel?: string;
|
|
126
|
+
onAccept?: () => void;
|
|
127
|
+
onDecline?: () => void;
|
|
128
|
+
}
|
|
129
|
+
export const CookieBanner: React.ComponentType<CookieBannerProps>;
|
|
130
|
+
|
|
131
|
+
// Text
|
|
132
|
+
export interface TextProps {
|
|
133
|
+
variant?: string;
|
|
134
|
+
as?: keyof JSX.IntrinsicElements;
|
|
135
|
+
children?: React.ReactNode;
|
|
136
|
+
className?: string;
|
|
137
|
+
}
|
|
138
|
+
export const Text: React.ComponentType<TextProps>;
|
|
139
|
+
|
|
140
|
+
// Sidebar
|
|
141
|
+
export interface SidebarProps {
|
|
142
|
+
open?: boolean;
|
|
143
|
+
onClose?: () => void;
|
|
144
|
+
children?: React.ReactNode;
|
|
145
|
+
}
|
|
146
|
+
export const Sidebar: React.ComponentType<SidebarProps>;
|
|
147
|
+
|
|
148
|
+
// Header
|
|
149
|
+
export interface HeaderProps {
|
|
150
|
+
title?: string;
|
|
151
|
+
actions?: React.ReactNode;
|
|
152
|
+
className?: string;
|
|
153
|
+
}
|
|
154
|
+
export const Header: React.ComponentType<HeaderProps>;
|
|
155
|
+
|
|
156
|
+
// Icon
|
|
157
|
+
export interface IconProps {
|
|
158
|
+
name: string;
|
|
159
|
+
size?: number | string;
|
|
160
|
+
className?: string;
|
|
161
|
+
}
|
|
162
|
+
export const Icon: React.ComponentType<IconProps>;
|
|
163
|
+
|
|
164
|
+
// Footer
|
|
165
|
+
export interface FooterProps {
|
|
166
|
+
left?: React.ReactNode;
|
|
167
|
+
center?: React.ReactNode;
|
|
168
|
+
right?: React.ReactNode;
|
|
169
|
+
className?: string;
|
|
170
|
+
}
|
|
171
|
+
export const Footer: React.ComponentType<FooterProps>;
|
|
172
|
+
|
|
173
|
+
// BarLayout
|
|
174
|
+
export interface BarLayoutProps {
|
|
175
|
+
left?: React.ReactNode;
|
|
176
|
+
center?: React.ReactNode;
|
|
177
|
+
right?: React.ReactNode;
|
|
178
|
+
className?: string;
|
|
179
|
+
}
|
|
180
|
+
export const BarLayout: React.ComponentType<BarLayoutProps>;
|
|
181
|
+
|
|
182
|
+
// PageTemplate
|
|
183
|
+
export interface PageTemplateProps {
|
|
184
|
+
headerTitle?: string;
|
|
185
|
+
headerLeft?: React.ReactNode;
|
|
186
|
+
headerCenter?: React.ReactNode;
|
|
187
|
+
headerRight?: React.ReactNode;
|
|
188
|
+
|
|
189
|
+
footerLeft?: React.ReactNode;
|
|
190
|
+
footerCenter?: React.ReactNode;
|
|
191
|
+
footerRight?: React.ReactNode;
|
|
192
|
+
|
|
193
|
+
children?: React.ReactNode;
|
|
194
|
+
className?: string;
|
|
195
|
+
}
|
|
196
|
+
export const PageTemplate: React.ComponentType<PageTemplateProps>;
|
|
197
|
+
|
|
198
|
+
// ProfileCard
|
|
199
|
+
export interface ProfileCardProps {
|
|
200
|
+
name: string;
|
|
201
|
+
description?: string;
|
|
202
|
+
avatarUrl?: string;
|
|
203
|
+
className?: string;
|
|
204
|
+
}
|
|
205
|
+
export const ProfileCard: React.ComponentType<ProfileCardProps>;
|
|
206
|
+
}
|