@junyiacademy/ui-test 1.6.9 → 1.7.0
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 +265 -0
- package/dist/index.js.mjs +1479 -0
- package/dist/index.js.umd.js +2 -0
- package/package.json +12 -4
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import { BaseSelectProps } from '@mui/material';
|
|
2
|
+
import { ButtonGroupProps } from '@mui/material';
|
|
3
|
+
import { ButtonProps as ButtonProps_2 } from '@mui/material';
|
|
4
|
+
import { ChangeEvent } from 'react';
|
|
5
|
+
import { ChipProps as ChipProps_2 } from '@mui/material';
|
|
6
|
+
import { FormControlLabelProps } from '@mui/material';
|
|
7
|
+
import { FormControlProps } from '@mui/material';
|
|
8
|
+
import { FormHelperTextProps } from '@mui/material';
|
|
9
|
+
import { ForwardRefExoticComponent } from 'react';
|
|
10
|
+
import { InputLabelProps } from '@mui/material';
|
|
11
|
+
import { InputProps } from '@mui/material';
|
|
12
|
+
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
|
13
|
+
import { MenuItemProps } from '@mui/material';
|
|
14
|
+
import { OutlinedInputProps } from '@mui/material';
|
|
15
|
+
import { PopperProps } from '@mui/material';
|
|
16
|
+
import { RadioProps as RadioProps_2 } from '@mui/material';
|
|
17
|
+
import { RefAttributes } from 'react';
|
|
18
|
+
import { StyledComponent } from '@emotion/styled';
|
|
19
|
+
import { TextFieldProps } from '@mui/material';
|
|
20
|
+
import { Theme } from '@mui/material/styles';
|
|
21
|
+
import { TypographyProps } from '@mui/material';
|
|
22
|
+
|
|
23
|
+
export declare const Button: StyledComponent<ButtonProps>;
|
|
24
|
+
|
|
25
|
+
export declare const ButtonGroup: StyledComponent<StyledButtonGroupProps>;
|
|
26
|
+
|
|
27
|
+
declare interface ButtonProps extends Partial<ButtonProps_2> {
|
|
28
|
+
active?: boolean;
|
|
29
|
+
color?: Color;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export declare const Chip: ({ color, checked, ...props }: ChipProps) => JSX_2.Element;
|
|
33
|
+
|
|
34
|
+
declare type ChipColor = ProgressColor | Color;
|
|
35
|
+
|
|
36
|
+
declare interface ChipProps extends Pick<ChipProps_2, 'icon' | 'label' | 'clickable' | 'sx' | 'onClick' | 'disabled'> {
|
|
37
|
+
color?: ChipColor;
|
|
38
|
+
checked?: boolean;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
declare type Color = (typeof paletteColor)[number];
|
|
42
|
+
|
|
43
|
+
export declare const colors: {
|
|
44
|
+
readonly yellow: {
|
|
45
|
+
readonly 200: "#FFFF99";
|
|
46
|
+
};
|
|
47
|
+
readonly blue: {
|
|
48
|
+
readonly 600: "#4990E2";
|
|
49
|
+
};
|
|
50
|
+
readonly lightGreen: {
|
|
51
|
+
readonly 400: "#99CC66";
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
export declare const InfoPopover: ({ anchorEl, arrow, placement, hasBorder, content, helperText, chipLabel, TopLeftButtonProps, TopRightButtonProps, BottomRightButtonProps, ChipProps, PopperProps, }: InfoPopoverProps) => JSX_2.Element;
|
|
56
|
+
|
|
57
|
+
declare interface InfoPopoverProps extends Pick<PopperProps, 'anchorEl' | 'placement'> {
|
|
58
|
+
arrow?: boolean;
|
|
59
|
+
hasBorder?: boolean;
|
|
60
|
+
content?: string;
|
|
61
|
+
helperText?: string;
|
|
62
|
+
chipLabel?: string;
|
|
63
|
+
ChipProps?: ChipProps;
|
|
64
|
+
TopRightButtonProps?: PopperButtonProps;
|
|
65
|
+
TopLeftButtonProps?: PopperButtonProps;
|
|
66
|
+
BottomRightButtonProps?: PopperButtonProps;
|
|
67
|
+
PopperProps?: Partial<PopperProps>;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export declare const LoadingButton: React.FC<LoadingButtonProps>;
|
|
71
|
+
|
|
72
|
+
declare interface LoadingButtonProps extends Partial<ButtonProps_2> {
|
|
73
|
+
color?: Color;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
declare const paletteColor: readonly ["primary", "secondary", "success", "error", "info", "cancel", "warning", "primaryGreen", "blueGreen", "grassGreen", "darkOrange"];
|
|
77
|
+
|
|
78
|
+
declare interface PopperButtonProps extends ButtonProps {
|
|
79
|
+
title?: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export declare type ProgressColor = (typeof progressColor)[number];
|
|
83
|
+
|
|
84
|
+
declare const progressColor: readonly ["progressPrimary", "progressUpgraded", "progressUnstarted", "progressStart", "progressLevel1", "progressLevel2", "progressLevel3", "progressFinished", "progressStruggle"];
|
|
85
|
+
|
|
86
|
+
export declare const Radio: React.FC<RadioProps>;
|
|
87
|
+
|
|
88
|
+
declare interface RadioProps extends Omit<FormControlLabelProps, 'control'> {
|
|
89
|
+
color?: 'primary' | 'secondary' | 'default';
|
|
90
|
+
size?: 'medium' | 'small';
|
|
91
|
+
caption?: string;
|
|
92
|
+
FormControlLabelProps?: Partial<FormControlLabelProps>;
|
|
93
|
+
RadioProps?: Partial<RadioProps_2> & {
|
|
94
|
+
'data-testid'?: string;
|
|
95
|
+
};
|
|
96
|
+
TypographyProps?: Partial<TypographyProps>;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export declare const Select: React.FC<SelectProps>;
|
|
100
|
+
|
|
101
|
+
export declare const SelectMenuItem: ForwardRefExoticComponent<Omit<SelectMenuItemProps, "ref"> & RefAttributes<HTMLLIElement>>;
|
|
102
|
+
|
|
103
|
+
declare interface SelectMenuItemProps extends MenuItemProps {
|
|
104
|
+
value?: any;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
declare interface SelectProps extends BaseSelectProps {
|
|
108
|
+
helperText?: string;
|
|
109
|
+
FormControlProps?: Partial<FormControlProps>;
|
|
110
|
+
InputLabelProps?: Partial<InputLabelProps>;
|
|
111
|
+
InputProps?: (Partial<OutlinedInputProps> & {
|
|
112
|
+
onChange: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
113
|
+
}) | (object & Partial<InputProps>);
|
|
114
|
+
SelectProps?: object | Partial<BaseSelectProps>;
|
|
115
|
+
FormHelperTextProps?: Partial<FormHelperTextProps>;
|
|
116
|
+
color?: 'primary' | 'secondary';
|
|
117
|
+
size?: 'medium' | 'small';
|
|
118
|
+
paperMaxHeight?: number | string;
|
|
119
|
+
error?: boolean;
|
|
120
|
+
hasLabel?: boolean;
|
|
121
|
+
hasShrink?: boolean;
|
|
122
|
+
disabled?: boolean;
|
|
123
|
+
className?: string;
|
|
124
|
+
otherProps?: any;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
declare interface StyledButtonGroupProps extends Partial<ButtonGroupProps> {
|
|
128
|
+
color?: Color;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export declare const TextField: React.FC<TextFieldProps>;
|
|
132
|
+
|
|
133
|
+
export declare const theme: Theme;
|
|
134
|
+
|
|
135
|
+
export declare const TopicFilter: ({ topicList, onTopicSelected, hasArrow, selectedTopicIds, onResetClick, hasResetOption, }: TopicFilterProps) => JSX_2.Element;
|
|
136
|
+
|
|
137
|
+
declare interface TopicFilterProps {
|
|
138
|
+
topicList: TopicFilterQueryTopicInfo;
|
|
139
|
+
onTopicSelected: (selectedTopicId: string, selectedInfo: {
|
|
140
|
+
layerNumber: number;
|
|
141
|
+
}) => void;
|
|
142
|
+
hasArrow: boolean;
|
|
143
|
+
selectedTopicIds: string[];
|
|
144
|
+
onResetClick?: () => void;
|
|
145
|
+
hasResetOption?: boolean;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
declare type TopicFilterQueryTopicInfo = {
|
|
149
|
+
isError?: boolean;
|
|
150
|
+
isLoading?: boolean;
|
|
151
|
+
isSuccess?: boolean;
|
|
152
|
+
data?: {
|
|
153
|
+
children: TopicFilterSubTree[];
|
|
154
|
+
};
|
|
155
|
+
}[];
|
|
156
|
+
|
|
157
|
+
declare interface TopicFilterSubTree {
|
|
158
|
+
id: string;
|
|
159
|
+
title: string;
|
|
160
|
+
href?: string;
|
|
161
|
+
hasContentChild?: boolean;
|
|
162
|
+
tags?: string[];
|
|
163
|
+
children: TopicFilterSubTree[];
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
export declare const Tutorial: ({ steps, initialStep, onClose, }: TutorialProps) => JSX_2.Element;
|
|
167
|
+
|
|
168
|
+
declare interface TutorialButtonProps {
|
|
169
|
+
title?: string;
|
|
170
|
+
variant?: 'text' | 'outlined' | 'contained';
|
|
171
|
+
size?: 'small' | 'medium' | 'large';
|
|
172
|
+
onClick?: (context?: TutorialContext) => void;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
declare interface TutorialContext {
|
|
176
|
+
close: () => void;
|
|
177
|
+
goToStep: (step: number) => void;
|
|
178
|
+
currentStep: number;
|
|
179
|
+
currentStepProps: TutorialStepProps;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
declare interface TutorialProps {
|
|
183
|
+
steps?: TutorialStepProps[];
|
|
184
|
+
initialStep?: number;
|
|
185
|
+
onClose: () => void;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
declare interface TutorialStepProps {
|
|
189
|
+
title: string;
|
|
190
|
+
content: string;
|
|
191
|
+
imageUrl?: string;
|
|
192
|
+
confirmButtonProps?: TutorialButtonProps;
|
|
193
|
+
cancelButtonProps?: TutorialButtonProps;
|
|
194
|
+
closeButtonProps?: TutorialButtonProps | boolean;
|
|
195
|
+
context?: TutorialContext;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export { }
|
|
199
|
+
|
|
200
|
+
declare module '@mui/material/styles' {
|
|
201
|
+
interface Palette {
|
|
202
|
+
primaryGreen: Palette['primary'];
|
|
203
|
+
blueGreen: Palette['primary'];
|
|
204
|
+
grassGreen: Palette['primary'];
|
|
205
|
+
cancel: Palette['primary'];
|
|
206
|
+
darkOrange: Palette['primary'];
|
|
207
|
+
progressPrimary: Palette['primary'];
|
|
208
|
+
progressUpgraded: Palette['primary'];
|
|
209
|
+
progressUnstarted: Palette['primary'];
|
|
210
|
+
progressStart: Palette['primary'];
|
|
211
|
+
progressLevel1: Palette['primary'];
|
|
212
|
+
progressLevel2: Palette['primary'];
|
|
213
|
+
progressLevel3: Palette['primary'];
|
|
214
|
+
progressFinished: Palette['primary'];
|
|
215
|
+
progressStruggle: Palette['primary'];
|
|
216
|
+
}
|
|
217
|
+
interface PaletteOptions {
|
|
218
|
+
primaryGreen: PaletteOptions['primary'];
|
|
219
|
+
blueGreen: PaletteOptions['primary'];
|
|
220
|
+
grassGreen: PaletteOptions['primary'];
|
|
221
|
+
cancel: PaletteOptions['primary'];
|
|
222
|
+
darkOrange: PaletteOptions['primary'];
|
|
223
|
+
progressPrimary: PaletteOptions['primary'];
|
|
224
|
+
progressUpgraded: PaletteOptions['primary'];
|
|
225
|
+
progressUnstarted: PaletteOptions['primary'];
|
|
226
|
+
progressStart: PaletteOptions['primary'];
|
|
227
|
+
progressLevel1: PaletteOptions['primary'];
|
|
228
|
+
progressLevel2: PaletteOptions['primary'];
|
|
229
|
+
progressLevel3: PaletteOptions['primary'];
|
|
230
|
+
progressFinished: PaletteOptions['primary'];
|
|
231
|
+
progressStruggle: PaletteOptions['primary'];
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
|
|
236
|
+
declare module '@mui/material' {
|
|
237
|
+
interface ButtonPropsColorOverrides extends DefaultColorOverrides {
|
|
238
|
+
}
|
|
239
|
+
interface ButtonGroupPropsColorOverrides extends DefaultColorOverrides {
|
|
240
|
+
}
|
|
241
|
+
interface CheckboxPropsColorOverrides extends DefaultColorOverrides {
|
|
242
|
+
}
|
|
243
|
+
interface FabPropsColorOverrides extends DefaultColorOverrides {
|
|
244
|
+
}
|
|
245
|
+
interface ChipPropsColorOverrides extends DefaultColorOverrides {
|
|
246
|
+
}
|
|
247
|
+
interface SwitchPropsColorOverrides extends DefaultColorOverrides {
|
|
248
|
+
}
|
|
249
|
+
interface BadgePropsColorOverrides extends DefaultColorOverrides {
|
|
250
|
+
}
|
|
251
|
+
interface CircularProgressPropsColorOverrides extends DefaultColorOverrides {
|
|
252
|
+
}
|
|
253
|
+
interface LinearProgressPropsColorOverrides extends DefaultColorOverrides {
|
|
254
|
+
}
|
|
255
|
+
interface ChipPropsColorOverrides extends DefaultColorOverrides {
|
|
256
|
+
progressUpgraded: true;
|
|
257
|
+
progressUnstarted: true;
|
|
258
|
+
progressStart: true;
|
|
259
|
+
progressLevel1: true;
|
|
260
|
+
progressLevel2: true;
|
|
261
|
+
progressLevel3: true;
|
|
262
|
+
progressFinished: true;
|
|
263
|
+
progressStruggle: true;
|
|
264
|
+
}
|
|
265
|
+
}
|