opus-toolkit-components 1.6.5 → 1.6.7
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 +202 -228
- package/package.json +3 -2
package/lib/index.d.ts
CHANGED
|
@@ -1,232 +1,206 @@
|
|
|
1
1
|
declare module "opus-toolkit-components" {
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
export const ProfileCard: React.ComponentType<ProfileCardProps>;
|
|
207
|
-
}
|
|
208
|
-
|
|
209
|
-
// Export all components at root level too
|
|
210
|
-
export import Accordion = OpusToolkitComponents.Accordion;
|
|
211
|
-
export import Button = OpusToolkitComponents.Button;
|
|
212
|
-
export import Card = OpusToolkitComponents.Card;
|
|
213
|
-
export import Input = OpusToolkitComponents.Input;
|
|
214
|
-
export import DatePicker = OpusToolkitComponents.DatePicker;
|
|
215
|
-
export import RadioButton = OpusToolkitComponents.RadioButton;
|
|
216
|
-
export import Checkbox = OpusToolkitComponents.Checkbox;
|
|
217
|
-
export import Table = OpusToolkitComponents.Table;
|
|
218
|
-
export import Dropdown = OpusToolkitComponents.Dropdown;
|
|
219
|
-
export import Navbar = OpusToolkitComponents.Navbar;
|
|
220
|
-
export import Modal = OpusToolkitComponents.Modal;
|
|
221
|
-
export import Loader = OpusToolkitComponents.Loader;
|
|
222
|
-
export import Pill = OpusToolkitComponents.Pill;
|
|
223
|
-
export import CookieBanner = OpusToolkitComponents.CookieBanner;
|
|
224
|
-
export import Text = OpusToolkitComponents.Text;
|
|
225
|
-
export import Sidebar = OpusToolkitComponents.Sidebar;
|
|
226
|
-
export import Header = OpusToolkitComponents.Header;
|
|
227
|
-
export import Icon = OpusToolkitComponents.Icon;
|
|
228
|
-
export import Footer = OpusToolkitComponents.Footer;
|
|
229
|
-
export import BarLayout = OpusToolkitComponents.BarLayout;
|
|
230
|
-
export import PageTemplate = OpusToolkitComponents.PageTemplate;
|
|
231
|
-
export import ProfileCard = OpusToolkitComponents.ProfileCard;
|
|
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>;
|
|
232
206
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opus-toolkit-components",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.7",
|
|
4
4
|
"private": false,
|
|
5
5
|
"peerDependencies": {
|
|
6
6
|
"react": "^17.0.0 || ^18.0.0",
|
|
@@ -114,9 +114,10 @@
|
|
|
114
114
|
],
|
|
115
115
|
"exports": {
|
|
116
116
|
".": {
|
|
117
|
+
"types": "./lib/index.d.ts",
|
|
117
118
|
"import": "./lib/opus-components.main.js",
|
|
118
119
|
"require": "./lib/opus-components.main.js",
|
|
119
|
-
"
|
|
120
|
+
"default": "./lib/opus-components.main.js"
|
|
120
121
|
}
|
|
121
122
|
},
|
|
122
123
|
"directories": {
|