@junyiacademy/ui-test 1.6.7 → 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 +1 -1
- package/dist/index.js.umd.js +1 -1
- package/package.json +15 -6
- package/dist/shared-utils/src/hooks/topic-filter/useGetTopicList.d.ts +0 -14
- package/dist/shared-utils/src/models/index.d.ts +0 -2
- package/dist/shared-utils/src/models/topic-tree/SubTree.d.ts +0 -5
- package/dist/shared-utils/src/models/topic-tree/Topic.d.ts +0 -10
- package/dist/shared-utils/src/models/user/UserProfile.d.ts +0 -92
- package/dist/shared-utils/src/utils/axios.d.ts +0 -2
- package/dist/shared-utils/src/utils/getCsrfToken.d.ts +0 -7
- package/dist/ui/src/index.d.ts +0 -14
- package/dist/ui/src/interfaces/index.d.ts +0 -21
- package/dist/ui/src/lib/Info-Popover/InfoPopover.d.ts +0 -20
- package/dist/ui/src/lib/MUI/Alert/Alert.d.ts +0 -3
- package/dist/ui/src/lib/MUI/Avatar/Avatar.d.ts +0 -3
- package/dist/ui/src/lib/MUI/Badge/Badge.d.ts +0 -3
- package/dist/ui/src/lib/MUI/Checkbox/Checkbox.d.ts +0 -3
- package/dist/ui/src/lib/MUI/Chip/Chip.d.ts +0 -3
- package/dist/ui/src/lib/MUI/CircularProgress/CircularProgress.d.ts +0 -3
- package/dist/ui/src/lib/MUI/Divider/Divider.d.ts +0 -3
- package/dist/ui/src/lib/MUI/Fab/Fab.d.ts +0 -3
- package/dist/ui/src/lib/MUI/LinearProgress/LinearProgress.d.ts +0 -3
- package/dist/ui/src/lib/MUI/Link/Link.d.ts +0 -3
- package/dist/ui/src/lib/MUI/Menu/Menu.d.ts +0 -3
- package/dist/ui/src/lib/MUI/Menu/MenuItem.d.ts +0 -3
- package/dist/ui/src/lib/MUI/Paper/Paper.d.ts +0 -3
- package/dist/ui/src/lib/MUI/Rating/Rating.d.ts +0 -3
- package/dist/ui/src/lib/MUI/Skeleton/Skeleton.d.ts +0 -3
- package/dist/ui/src/lib/MUI/Slider/Slider.d.ts +0 -3
- package/dist/ui/src/lib/MUI/Snackbar/Snackbar.d.ts +0 -3
- package/dist/ui/src/lib/MUI/Switch/Switch.d.ts +0 -3
- package/dist/ui/src/lib/MUI/Tooltip/Tooltip.d.ts +0 -3
- package/dist/ui/src/lib/MUI/Typography/Typography.d.ts +0 -5
- package/dist/ui/src/lib/button/Button.d.ts +0 -10
- package/dist/ui/src/lib/button/LoadingButton.d.ts +0 -7
- package/dist/ui/src/lib/button-group/ButtonGroup.d.ts +0 -15
- package/dist/ui/src/lib/chip/Chip.d.ts +0 -9
- package/dist/ui/src/lib/icon/Icon.d.ts +0 -5
- package/dist/ui/src/lib/menu-item/SelectMenuItem.d.ts +0 -6
- package/dist/ui/src/lib/radio/Radio.d.ts +0 -13
- package/dist/ui/src/lib/select/OutlinedSelect.d.ts +0 -3
- package/dist/ui/src/lib/select/Select.d.ts +0 -3
- package/dist/ui/src/lib/select/StandardSelect.d.ts +0 -3
- package/dist/ui/src/lib/text-field/TextField.d.ts +0 -3
- package/dist/ui/src/lib/topic-filter/TopicFilter.d.ts +0 -13
- package/dist/ui/src/lib/tutorial/Tutorial.d.ts +0 -8
- package/dist/ui/src/lib/tutorial/TutorialStep.d.ts +0 -27
- package/dist/ui/src/styles/colors.d.ts +0 -11
- package/dist/ui/src/styles/locales/dateTimePicker.d.ts +0 -83
- package/dist/ui/src/styles/theme.d.ts +0 -77
- package/dist/ui/src/utils/capitalize.d.ts +0 -1
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
|
+
}
|
package/dist/index.js.mjs
CHANGED
|
@@ -642,7 +642,7 @@ const It = $(X, {
|
|
|
642
642
|
children: [
|
|
643
643
|
/* @__PURE__ */ o(I, { disabled: !0, value: "", children: q }),
|
|
644
644
|
n && d === 0 && /* @__PURE__ */ o(I, { value: U, children: "所有科目" }),
|
|
645
|
-
u.data
|
|
645
|
+
u.data?.children?.map((l) => /* @__PURE__ */ o(
|
|
646
646
|
I,
|
|
647
647
|
{
|
|
648
648
|
value: l.id,
|
package/dist/index.js.umd.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(a,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("@mui/material/styles"),require("react/jsx-runtime"),require("react"),require("@mui/material"),require("@mui/icons-material/ArrowRightRounded"),require("@mui/material/MenuItem"),require("@mui/material/FormHelperText"),require("@mui/material/InputBase"),require("@mui/material/InputLabel"),require("@mui/material/OutlinedInput"),require("@mui/material/Input"),require("@mui/material/Button"),require("@mui/material/ButtonGroup"),require("@mui/material/FormControlLabel"),require("@mui/material/Radio"),require("@mui/material/TextField"),require("@mui/material/useMediaQuery"),require("@mui/icons-material/Close"),require("@mui/material/Chip")):typeof define=="function"&&define.amd?define(["exports","@mui/material/styles","react/jsx-runtime","react","@mui/material","@mui/icons-material/ArrowRightRounded","@mui/material/MenuItem","@mui/material/FormHelperText","@mui/material/InputBase","@mui/material/InputLabel","@mui/material/OutlinedInput","@mui/material/Input","@mui/material/Button","@mui/material/ButtonGroup","@mui/material/FormControlLabel","@mui/material/Radio","@mui/material/TextField","@mui/material/useMediaQuery","@mui/icons-material/Close","@mui/material/Chip"],h):(a=typeof globalThis<"u"?globalThis:a||self,h(a.JunyiJUI={},a.styles,a.jsxRuntime,a.React,a.MaterialUI,a.ArrowRightRoundedIcon,a.MenuItem,a.FormHelperText,a.InputBase,a.InputLabel,a.OutlinedInput,a.Input,a.Button$1,a.ButtonGroup$1,a.FormControlLabel,a.Radio$1,a.TextField$1,a.useMediaQuery,a.Close,a.Chip$1))})(this,function(a,h,t,k,r,Z,R,U,V,F,$,b,B,H,E,ee,te,oe,re,Q){"use strict";const w={yellow:{200:"#FFFF99"},blue:{600:"#4990E2"},lightGreen:{400:"#99CC66"}},ne=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:{...e}}}}}),_={hours:"小時",minutes:"分鐘",seconds:"秒",meridiem:"子午線"},ae=ne({previousMonth:"上個月",nextMonth:"下個月",openPreviousView:"上一個視圖",openNextView:"下一個視圖",calendarViewSwitchingButtonAriaLabel:e=>e==="year"?"年視圖已打開,切換為日曆視圖":"日曆視圖已打開,切換為年視圖",start:"開始",end:"結束",cancelButtonLabel:"取消",clearButtonLabel:"清除",okButtonLabel:"確認",todayButtonLabel:"今天",nextStepButtonLabel:"下一步",datePickerToolbarTitle:"選擇日期",dateTimePickerToolbarTitle:"選擇日期和時間",timePickerToolbarTitle:"選擇時間",dateRangePickerToolbarTitle:"選擇時間範圍",clockLabelText:(e,o)=>`選擇 ${_[e]}. ${o===null?"未選擇時間":`已選擇${o}`}`,hoursClockNumberText:e=>`${e}小時`,minutesClockNumberText:e=>`${e}分鐘`,secondsClockNumberText:e=>`${e}秒`,selectViewText:e=>`選擇 ${_[e]}`,calendarWeekNumberHeaderLabel:"週數",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`第${e}週`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:e=>e?`選擇日期,已選擇${e}`:"選擇日期",openTimePickerDialogue:e=>e?`選擇時間,已選擇${e}`:"選擇時間",timeTableLabel:"選擇時間",dateTableLabel:"選擇日期",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>e.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa"}),J=h.createTheme(),C=['"Noto Sans TC"',"PingFang",'"Microsoft JhengHei"',"Arial","sans-serif"].join(","),ie=h.createTheme({typography:{fontFamily:C,h1:{fontFamily:C,fontSize:96,lineHeight:"112px"},h2:{fontFamily:C,fontSize:60,lineHeight:1.2},h3:{fontFamily:C,fontSize:48,lineHeight:1.167},h4:{fontFamily:C,fontSize:34,lineHeight:1.235},h5:{fontFamily:C,fontSize:24,lineHeight:1.334},h6:{fontFamily:C,fontSize:20,lineHeight:1.6},subtitle1:{fontFamily:C,fontSize:16,lineHeight:1.75},subtitle2:{fontFamily:C,fontSize:14,lineHeight:1.57},body1:{fontFamily:C,fontSize:16,lineHeight:1.5},body2:{fontFamily:C,fontSize:14,lineHeight:1.43},button:{fontFamily:C},caption:{fontFamily:C,fontSize:12,lineHeight:1.66},overline:{fontFamily:C,fontSize:12,lineHeight:2.66}},palette:{primary:{light:"#82C0FF",main:w.blue[600],dark:"#0063B0"},secondary:{light:"#FFD759",main:"#F5A623",dark:"#BD7700",contrastText:"#FFFFFF"},cancel:{main:"#C4C4C4",contrastText:"#FFFFFF"},primaryGreen:{light:"#9DD49E",main:"#5CB85D",dark:"#218838",contrastText:"#FFFFFF"},blueGreen:{main:"#19A696",contrastText:"#FFFFFF"},grassGreen:J.palette.augmentColor({color:{main:"#80BB5A",contrastText:"#FFFFFF"}}),darkOrange:J.palette.augmentColor({color:{main:"#D55704",contrastText:"#FFFFFF"}}),progressPrimary:{main:w.blue[600],dark:w.blue[600],light:"#FFFFFF",contrastText:"#FFFFFF"},progressUpgraded:{main:"#EEEEEE",light:"#FFF",dark:"#D4D4D4",contrastText:"#000000DE"},progressUnstarted:{main:"#EEEEEE",light:"#FFF",dark:"#D4D4D4",contrastText:"#000000DE"},progressStart:{main:"#BEDEFF",light:"#FFFFFF",dark:"#ABC8E5",contrastText:"#000000DE"},progressLevel1:{main:"#82C0FF",light:"#FFFFFF",dark:"#75ADE5",contrastText:"#000000DE"},progressLevel2:{main:w.blue[600],light:"#FFFFFF",dark:"#4180C9",contrastText:"#FFFFFF"},progressLevel3:{main:"#0063B0",light:"#FFFFFF",dark:"#005596",contrastText:"#FFFFFF"},progressFinished:{main:"#05396B",light:"#FFFFFF",dark:"#042B52",contrastText:"#FFFFFF"},progressStruggle:{main:"#C62828",light:"#FFFFFF",dark:"#AD2323",contrastText:"#FFFFFF"},text:{secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)"}},components:{MuiCssBaseline:{styleOverrides:{body:{color:"rgba(0, 0, 0, 0.6)",lineHeight:"1.2",WebkitFontSmoothing:"auto","& .swal2-container":{zIndex:1350},button:{fontFamily:C}},"ol, ul":{listStyle:"none"},"h1, h2, h3, h4, h5, h6, p":{color:"rgba(0, 0, 0, 0.87)",margin:0,padding:0,border:0},a:{color:w.blue[600],textDecoration:"none",cursor:"pointer"},"a:hover, a:focus":{color:"#0063b0"}}},MuiButton:{styleOverrides:{sizeSmall:{fontSize:12,fontWeight:500,lineHeight:"22px"},sizeMedium:{fontSize:14,fontWeight:500,lineHeight:"24px"},sizeLarge:{fontSize:15,fontWeight:500,lineHeight:"26px"}}}}},ae),z=k.forwardRef((e,o)=>{const{children:n,value:s="",...f}=e,{sx:i,...p}=f;return t.jsx(r.MenuItem,{ref:o,sx:[u=>({whiteSpace:"unset",color:u.palette.text.primary,[`&.${R.menuItemClasses.selected}`]:{backgroundColor:u.palette.grey[300],"&:hover":{backgroundColor:u.palette.grey[200]}}}),...Array.isArray(i)?i:[i]],value:s,...p,children:n})});z.displayName="SelectMenuItem";const se=h.styled(r.InputLabel,{shouldForwardProp:e=>e!=="color"})(({color:e="primary",theme:o})=>({color:o.palette.text.secondary,[`&.${F.inputLabelClasses.outlined}`]:{[`&:not(.${F.inputLabelClasses.disabled}) .${F.inputLabelClasses.focused}`]:{color:o.palette.action.active},[`&.${F.inputLabelClasses.sizeSmall}:not(.${F.inputLabelClasses.shrink})`]:{transform:"translate(12px, 12px) scale(1)"}},[`&.${F.inputLabelClasses.shrink}:not(.${F.inputLabelClasses.error}):not(.${F.inputLabelClasses.disabled}).${F.inputLabelClasses.focused}`]:{color:o.palette[e].main},[`&.${F.inputLabelClasses.shrink}`]:{backgroundColor:"#ffffff",padding:"0 2px"}})),le=h.styled(r.OutlinedInput)(({theme:e})=>({[`&.${$.outlinedInputClasses.root}`]:{[`&.${$.outlinedInputClasses.error}.${$.outlinedInputClasses.focused} .${$.outlinedInputClasses.notchedOutline}`]:{borderColor:`${e.palette.error.main}`},[`&.${V.inputBaseClasses.sizeSmall} > .${V.inputBaseClasses.input}`]:{padding:"12.5px 15px 12.5px 12px"}},[`& .${$.outlinedInputClasses.input}`]:{color:e.palette.text.primary,"&:focus":{background:"rgba(0,0,0,0)"}}})),de=({label:e,helperText:o,FormControlProps:n={},InputLabelProps:s={},InputProps:f={},SelectProps:i={},MenuProps:p={},FormHelperTextProps:u={},className:x,children:l,color:g="primary",size:c="small",paperMaxHeight:m="auto",error:d=!1,hasLabel:y=!0,hasShrink:S=!1,value:M="",disabled:P=!1})=>{const q=!!o,{sx:A=[],...O}=n,{sx:T=[],...j}=u;return t.jsxs(r.FormControl,{sx:[G=>({backgroundColor:"white","&:hover":{[`& :not(.${$.outlinedInputClasses.disabled}):not(.${$.outlinedInputClasses.error}) .${$.outlinedInputClasses.notchedOutline}`]:{borderColor:G.palette[g].main}}}),...Array.isArray(A)?A:[A]],size:c,disabled:P,error:d,color:g,className:x,...O,children:[y&&t.jsx(se,{color:g,shrink:S?!0:void 0,...s,children:e}),t.jsx(r.Select,{value:M,label:y?e:void 0,MenuProps:{PaperProps:{sx:{maxHeight:m}},disableAutoFocusItem:!0,anchorOrigin:{vertical:2,horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},...p},input:t.jsx(le,{color:g,label:y?e:void 0,disabled:P,...f}),...i,children:l}),q&&t.jsx(r.FormHelperText,{sx:[{[`&.${U.formHelperTextClasses.root}`]:{marginLeft:0}},...Array.isArray(T)?T:[T]],...j,children:o})]})},pe=h.styled(r.InputLabel,{shouldForwardProp:e=>e!=="color"})(({color:e="primary",theme:o})=>({[`&.${F.inputLabelClasses.root}`]:{color:o.palette.text.disabled},[`&.${F.inputLabelClasses.focused}`]:{color:o.palette[e].main},[`&.${F.inputLabelClasses.error}`]:{color:o.palette.error.main}})),ce=h.styled(r.Input,{shouldForwardProp:e=>e!=="color"})(({color:e="primary",theme:o})=>({color:o.palette.text.primary,[`& .${b.inputClasses.input}`]:{"&:focus":{background:"rgba(0,0,0,0)"}},[`&.${b.inputClasses.underline}:not(.${b.inputClasses.disabled}):not(.${b.inputClasses.error})`]:{"&:after,&:hover:before":{borderBottomColor:o.palette[e].main}},[`&.${b.inputClasses.underline}.${b.inputClasses.error}:not(.${b.inputClasses.disabled})`]:{"&:after,&:hover:before":{borderBottomColor:o.palette.error.main}}})),ue=({label:e,helperText:o,FormControlProps:n={},InputLabelProps:s={},InputProps:f={},SelectProps:i={},FormHelperTextProps:p={},className:u,children:x,color:l="primary",size:g="small",paperMaxHeight:c="auto",error:m=!1,hasLabel:d=!0,hasShrink:y=!1,value:S="",disabled:M=!1})=>{const P=!!o;return t.jsxs(r.FormControl,{variant:"standard",color:l,size:g,disabled:M,error:m,className:u,...n,children:[t.jsx(pe,{color:l,shrink:y?!0:void 0,...s,children:d?e:void 0}),t.jsx(r.Select,{value:S,MenuProps:{PaperProps:{sx:{maxHeight:c}},anchorOrigin:{vertical:2,horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},input:t.jsx(ce,{color:l,...f}),...i,children:x}),P&&t.jsx(r.FormHelperText,{...p,children:o})]})},D=({variant:e,...o})=>e==="outlined"?t.jsx(de,{...o}):t.jsx(ue,{...o}),N="請選擇",W="option-for-reset",he="",xe=(e,o,n)=>{const s=n&&e===0?W:he;return o?.[e+1]||s},ge=({topicList:e,onTopicSelected:o,hasArrow:n,selectedTopicIds:s,onResetClick:f=()=>{},hasResetOption:i=!1})=>{const p=r.useMediaQuery(g=>g.breakpoints.up("md")),[u,x]=k.useState([]),l=(g,c)=>{if(g.target.value===W){f();return}o(g.target.value,{layerNumber:c}),x(m=>[...m.slice(0,c+1),!1])};return t.jsx(r.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:e.map((g,c)=>{const m=u[c]||!s[c+1];return g.isError?null:t.jsxs(r.Box,{sx:{display:"flex",alignItems:"center",width:p?void 0:"100%"},children:[n&&c!==0&&t.jsx(Z,{sx:d=>({margin:d.spacing(-1,-1.5),fontSize:d.spacing(7),color:"#444"}),fontSize:"large","data-testid":"topic-filter-arrow"}),g.isLoading?t.jsx(D,{variant:"outlined",size:"small",label:"載入資料中...",disabled:!0,FormControlProps:{sx:d=>({width:p?220:"100%",margin:d.spacing(1)})}}):t.jsxs(D,{variant:"outlined",size:"small",label:N,paperMaxHeight:412,hasLabel:m,value:xe(c,s,i),SelectProps:{"data-testid":`layered-topic-${c}`},InputProps:{inputProps:{"aria-label":`layered-topic-${c}`},onChange:d=>{l(d,c)},onFocus:()=>{x(d=>{const y=[...d];return y[c]=!0,y})},onBlur:()=>{x(d=>{const y=[...d];return y[c]=!1,y})}},FormControlProps:{sx:d=>({width:p?220:"100%",margin:d.spacing(1)})},children:[t.jsx(z,{disabled:!0,value:"",children:N}),i&&c===0&&t.jsx(z,{value:W,children:"所有科目"}),g.data.children.map(d=>t.jsx(z,{value:d.id,"data-testid":`layered-menuitem-${c}`,"data-is-content-topic":d.hasContentChild,children:d.title},d.id))]})]},c)})})};function v(e){return`${e.charAt(0).toUpperCase()}${e.slice(1)}`}const L=k.forwardRef((e,o)=>{const{children:n,...s}=e;return t.jsx(r.Button,{ref:o,...s,children:n})});L.displayName="Button";const fe=h.styled(L,{shouldForwardProp:e=>e!=="active"})(({theme:e,active:o,color:n="primary"})=>({[`&.${B.buttonClasses.outlined}${v(n)}`]:{backgroundColor:o?e.palette[n].main:e.palette.common.white,color:o?e.palette.common.white:e.palette[n].main,borderColor:e.palette[n].main,"&:hover":{backgroundColor:o?e.palette[n].main:h.alpha(e.palette[n].main,.1)},[`&.${B.buttonClasses.disabled}`]:{backgroundColor:e.palette.common.white,borderColor:e.palette.action.disabledBackground,color:e.palette.action.disabled}},[`&.${B.buttonClasses.text}${v(n)}`]:{"&:hover":{backgroundColor:h.alpha(e.palette[n].main,.1)}}})),Fe=h.styled(r.Button)(({theme:e,color:o="primary",loading:n})=>({[`&.${B.buttonClasses.outlined}${v(o)}`]:{borderColor:!n&&e.palette[o].main,"&:hover":{backgroundColor:h.alpha(e.palette[o].main,.1)},[`&.${B.buttonClasses.disabled}`]:{backgroundColor:!n&&e.palette.common.white,borderColor:!n&&e.palette.action.disabledBackground,color:!n&&e.palette.action.disabled}},[`&.${B.buttonClasses.text}${v(o)}`]:{"&:hover":{backgroundColor:h.alpha(e.palette[o].main,.1)}}})),me=({children:e,...o})=>t.jsx(Fe,{...o,children:t.jsx("span",{children:e})}),Y=k.forwardRef((e,o)=>{const{children:n,...s}=e;return t.jsx(r.ButtonGroup,{ref:o,...s,children:n})});Y.displayName="ButtonGroup";const be=h.styled(Y)(({color:e="primary",theme:o})=>({[`&.${H.buttonGroupClasses.outlined} > .${H.buttonGroupClasses.grouped}${v(e)}.${H.buttonGroupClasses.grouped}.${H.buttonGroupClasses.disabled}`]:{borderColor:h.alpha(o.palette[e].main,.5),color:h.alpha(o.palette[e].main,.5)}})),Ce=h.styled(r.FormControlLabel)(({theme:e})=>({[`& .${E.formControlLabelClasses.label}`]:{color:e.palette.text.secondary,[`&.${E.formControlLabelClasses.disabled}`]:{color:e.palette.text.disabled}},[`& .${ee.radioClasses.checked} + .${E.formControlLabelClasses.label}`]:{color:e.palette.text.primary}})),ye=({checked:e,disabled:o,label:n,labelPlacement:s,value:f,FormControlLabelProps:i={},RadioProps:p={},TypographyProps:u={},color:x="secondary",size:l="medium",caption:g=""})=>{const{sx:c=[],...m}=p,{sx:d=[],...y}=u;return t.jsxs(t.Fragment,{children:[t.jsx(Ce,{control:t.jsx(r.Radio,{sx:[S=>({color:S.palette.text.primary}),...Array.isArray(c)?c:[c]],color:x,size:l,...m}),checked:e,disabled:o,label:n,labelPlacement:s,value:f,...i}),g&&t.jsx(r.Typography,{sx:[S=>({color:S.palette.text.disabled,margin:"0 0 0 30px"}),...Array.isArray(d)?d:[d]],variant:"body2",...y,children:g})]})},$e=h.styled(r.TextField)(({label:e,color:o="primary",theme:n})=>({[`& .${F.inputLabelClasses.error}`]:{[`&:not(.${F.inputLabelClasses.shrink})`]:{color:n.palette.text.secondary},[`&.${F.inputLabelClasses.disabled}`]:{color:n.palette.text.disabled}},[`& .${F.inputLabelClasses.error}.${F.inputLabelClasses.focused}`]:{color:n.palette.error.main},[`& .${b.inputClasses.underline}:not(.${b.inputClasses.disabled})`]:{[`&.MuiInputBase-color${v(o)}:hover:before`]:{borderColor:n.palette[o].main}},[`& .${b.inputClasses.disabled} .${$.outlinedInputClasses.notchedOutline}`]:{borderStyle:"dotted"},[`& .${b.inputClasses.error}.${b.inputClasses.focused} .${$.outlinedInputClasses.notchedOutline}`]:{borderColor:n.palette.error.main},[`&.${te.textFieldClasses.root} :not(.${b.inputClasses.disabled}):not(.${b.inputClasses.error})`]:{[`&.MuiInputBase-color${v(o)}:hover .${$.outlinedInputClasses.notchedOutline}`]:{borderColor:n.palette[o].main}},[`& .${$.outlinedInputClasses.notchedOutline}`]:{"& > legend":{maxWidth:e===""&&0}}})),Te=e=>{const{slotProps:o={},...n}=e,{inputLabel:s={},input:f={},formHelperText:i={},...p}=o,u=!!("endAdornment"in f&&f?.endAdornment);return t.jsx($e,{slotProps:{inputLabel:{shrink:u?!0:void 0,...s},input:f,formHelperText:{...i,sx:[x=>({[`&.${U.formHelperTextClasses.root}`]:{marginLeft:0,[`&.${b.inputClasses.error}`]:{color:x.palette.error.main}}})]},...p},...n})},K=k.forwardRef((e,o)=>{const{title:n,content:s,imageUrl:f,confirmButtonProps:i,cancelButtonProps:p,closeButtonProps:u,context:x}=e;return t.jsxs(r.Card,{ref:o,sx:l=>({zIndex:"10000",backgroundColor:"white",borderRadius:"10px",boxShadow:"4px 6px 20px 0px #00000040",padding:0,width:"400px",[l.breakpoints.up(1024)]:{position:"fixed",left:"64px",bottom:"50px"},[l.breakpoints.down(451)]:{width:"80%"}}),children:[t.jsx(r.CardHeader,{sx:l=>({padding:l.spacing(u?1:2,2,0)}),action:u&&t.jsx(r.IconButton,{onClick:()=>{u instanceof Object&&u?.onClick?u.onClick(x):x.close()},children:t.jsx(re,{})})}),f&&t.jsx(r.CardMedia,{sx:l=>({padding:l.spacing(1,2)}),children:t.jsxs(r.Box,{sx:l=>({display:"flex",flexDirection:"column",gap:l.spacing(1)}),children:[t.jsx(r.Box,{component:"img",sx:{textAlign:"center",width:"100%",height:"100%",border:"0.5px solid #D2D2D2",borderRadius:"8px"},src:f}),t.jsx(r.Divider,{})]})}),t.jsxs(r.CardContent,{sx:l=>({padding:l.spacing(0,2),gap:l.spacing(1),display:"flex",flexDirection:"column"}),children:[t.jsxs(r.Box,{sx:l=>({gap:l.spacing(1),display:"flex"}),children:[t.jsx(r.Box,{component:"img",alt:"title icon",src:"https://www.junyiacademy.org/images/exam/title_icon.svg"}),t.jsx(r.Box,{children:t.jsx(r.Typography,{sx:{fontSize:"21px"},children:n})})]}),t.jsx(r.Typography,{sx:{color:"#b5b5b5",fontSize:"18px"},children:s})]}),t.jsxs(r.CardActions,{sx:l=>({padding:l.spacing(1,1,3,1),display:"flex",justifyContent:"center",gap:l.spacing(2)}),children:[p&&t.jsx(L,{color:"cancel",variant:p?.variant??"contained",size:p?.size??"large",onClick:()=>{p?.onClick&&p.onClick(x)},children:p.title||"取消"}),i&&t.jsx(L,{variant:i?.variant??"contained",size:i?.size??"large",onClick:()=>{i?.onClick&&i.onClick(x)},children:i.title||"確定"})]})]})});K.displayName="TutorialStep";const Se=({steps:e=[],initialStep:o=0,onClose:n})=>{const[s,f]=k.useState(o),i=oe(m=>m.breakpoints.up(1024)),[p,u]=k.useState(!0),x=e[s],g={...x,context:{close:()=>{u(!1),n&&n()},goToStep:m=>{f(m)},currentStep:s,currentStepProps:x}};return(m=>i?t.jsx(r.Slide,{in:p,direction:"up",mountOnEnter:!0,unmountOnExit:!0,children:m}):t.jsx(r.Modal,{open:p,sx:{display:"flex",alignItems:"center",justifyContent:"center",outline:0},children:t.jsx(r.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",outline:0},children:m})}))(t.jsx(K,{...g}))},X=({color:e="progressUpgraded",checked:o=!1,...n})=>{const{sx:s=[],...f}=n;return t.jsx(r.Chip,{variant:"outlined",sx:[i=>({...o?{backgroundColor:i.palette[e].main,color:i.palette[e].contrastText,".MuiChip-icon":{color:i.palette[e].contrastText}}:{backgroundColor:i.palette[e].light,color:i.palette.text.primary},[`&.${Q.chipClasses.clickable}:hover`]:{backgroundColor:i.palette[e].dark,color:i.palette[e].contrastText},[`&.${Q.chipClasses.clickable}:hover > .MuiChip-icon`]:{color:i.palette[e].contrastText}}),...Array.isArray(s)?s:[s]],...f})},ke=h.styled(r.Popper)(({theme:e})=>({zIndex:1e3,"& > div":{position:"relative"},'&[data-popper-placement*="bottom"]':{"& > div":{marginTop:6},"& .MuiPopper-arrow":{top:0,left:0,marginTop:"-0.9em",width:"3em",height:"1em","&::after":{borderWidth:"0 1em 1em 1em",borderColor:`transparent transparent ${e.palette.common.white} transparent`,top:1},"&::before":{borderWidth:"0 1em 1em 1em",borderColor:"transparent transparent rgba(0, 0, 0, 0.4) transparent",top:6}}},'&[data-popper-placement*="top"]':{"& > div":{marginBottom:6},"& .MuiPopper-arrow":{bottom:0,left:0,marginBottom:"-0.9em",width:"3em",height:"1em","&::after":{borderWidth:"6px 6px 0 6px",borderColor:`${e.palette.common.white} transparent transparent transparent`,bottom:14},"&::before":{borderWidth:"7px 7px 0 7px",borderColor:"rgba(0, 0, 0, 0.4) transparent transparent transparent",bottom:6}}},'&[data-popper-placement*="right"]':{"& > div":{marginLeft:6},"& .MuiPopper-arrow":{left:6,marginLeft:"-0.9em",height:"3em",width:"1em","&::after":{borderWidth:"6px 6px 6px 0",borderColor:`transparent ${e.palette.common.white} transparent transparent`,top:-13,left:1},"&::before":{borderWidth:"7px 7px 7px 0",borderColor:"transparent rgba(0, 0, 0, 0.4) transparent transparent"}}},'&[data-popper-placement*="left"]':{"& > div":{marginRight:6},"& .MuiPopper-arrow":{right:6,marginRight:"-0.9em",height:"3em",width:"1em","&::after":{borderWidth:"6px 0 6px 6px",borderColor:`transparent transparent transparent ${e.palette.common.white}`,top:-13,right:1},"&::before":{borderWidth:"7px 0 7px 7px",borderColor:"transparent transparent transparent rgba(0, 0, 0, 0.4)"}}}})),ve=h.styled("div")(({hasBorder:e})=>({position:"absolute",fontSize:7,width:"3em",height:"3em",zIndex:1,"&::after":{position:"relative",content:'""',margin:"auto",display:"block",width:0,height:0,borderStyle:"solid",zIndex:2},"&::before":{position:"relative",content:'""',margin:"auto",display:"block",visibility:e?"visible":"hidden",width:0,height:0,borderStyle:"solid"}})),I=h.styled(L)({minWidth:"49px"}),Be=({anchorEl:e,arrow:o,placement:n="right",hasBorder:s=!0,content:f="",helperText:i,chipLabel:p,TopLeftButtonProps:u,TopRightButtonProps:x,BottomRightButtonProps:l,ChipProps:g,PopperProps:c={}})=>{const[m,d]=k.useState(null),{title:y,...S}=u||{},{title:M,...P}=x||{},{title:q,...A}=l||{},O=!!e;return t.jsxs(ke,{"data-testid":"info-popover",open:O,anchorEl:e,placement:n,disablePortal:!0,modifiers:[{name:"flip",enabled:!0,options:{altBoundary:!0,rootBoundary:"document",padding:8}},{name:"preventOverflow",enabled:!0,options:{altAxis:!1,altBoundary:!0,tether:!0,rootBoundary:"document",padding:8}},{name:"arrow",enabled:o,options:{element:m,padding:10}}],sx:{maxWidth:194,width:"100%"},...c,children:[o?t.jsx(ve,{"data-testid":"info-popover-arrow",ref:d,className:"MuiPopper-arrow",hasBorder:s}):null,t.jsx(r.Box,{"data-testid":"info-popover-paper",sx:T=>({padding:2,backgroundColor:T.palette.background.paper,borderRadius:"4px",border:s?"1px solid rgba(0, 0, 0, 0.4)":null,overflow:"auto",boxShadow:T.shadows[2]}),children:t.jsxs(r.Box,{sx:{maxWidth:194},children:[t.jsx(r.Typography,{variant:"body1",sx:{width:"100%","&:not(:last-child)":{marginBottom:1}},children:f}),p&&g&&t.jsxs(r.Box,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center","&:not(:last-child)":{marginBottom:1}},children:[t.jsx(r.Typography,{variant:"body2",children:p}),t.jsx(X,{...g,sx:{border:0}})]}),i&&t.jsx(r.Box,{sx:T=>({width:"100%",padding:T.spacing(1,0),"&:not(:last-child)":{marginBottom:1}}),children:i.split(`
|
|
1
|
+
(function(a,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("@mui/material/styles"),require("react/jsx-runtime"),require("react"),require("@mui/material"),require("@mui/icons-material/ArrowRightRounded"),require("@mui/material/MenuItem"),require("@mui/material/FormHelperText"),require("@mui/material/InputBase"),require("@mui/material/InputLabel"),require("@mui/material/OutlinedInput"),require("@mui/material/Input"),require("@mui/material/Button"),require("@mui/material/ButtonGroup"),require("@mui/material/FormControlLabel"),require("@mui/material/Radio"),require("@mui/material/TextField"),require("@mui/material/useMediaQuery"),require("@mui/icons-material/Close"),require("@mui/material/Chip")):typeof define=="function"&&define.amd?define(["exports","@mui/material/styles","react/jsx-runtime","react","@mui/material","@mui/icons-material/ArrowRightRounded","@mui/material/MenuItem","@mui/material/FormHelperText","@mui/material/InputBase","@mui/material/InputLabel","@mui/material/OutlinedInput","@mui/material/Input","@mui/material/Button","@mui/material/ButtonGroup","@mui/material/FormControlLabel","@mui/material/Radio","@mui/material/TextField","@mui/material/useMediaQuery","@mui/icons-material/Close","@mui/material/Chip"],h):(a=typeof globalThis<"u"?globalThis:a||self,h(a.JunyiJUI={},a.styles,a.jsxRuntime,a.React,a.MaterialUI,a.ArrowRightRoundedIcon,a.MenuItem,a.FormHelperText,a.InputBase,a.InputLabel,a.OutlinedInput,a.Input,a.Button$1,a.ButtonGroup$1,a.FormControlLabel,a.Radio$1,a.TextField$1,a.useMediaQuery,a.Close,a.Chip$1))})(this,function(a,h,t,k,r,Z,R,U,V,F,$,b,B,H,E,ee,te,oe,re,Q){"use strict";const w={yellow:{200:"#FFFF99"},blue:{600:"#4990E2"},lightGreen:{400:"#99CC66"}},ne=e=>({components:{MuiLocalizationProvider:{defaultProps:{localeText:{...e}}}}}),_={hours:"小時",minutes:"分鐘",seconds:"秒",meridiem:"子午線"},ae=ne({previousMonth:"上個月",nextMonth:"下個月",openPreviousView:"上一個視圖",openNextView:"下一個視圖",calendarViewSwitchingButtonAriaLabel:e=>e==="year"?"年視圖已打開,切換為日曆視圖":"日曆視圖已打開,切換為年視圖",start:"開始",end:"結束",cancelButtonLabel:"取消",clearButtonLabel:"清除",okButtonLabel:"確認",todayButtonLabel:"今天",nextStepButtonLabel:"下一步",datePickerToolbarTitle:"選擇日期",dateTimePickerToolbarTitle:"選擇日期和時間",timePickerToolbarTitle:"選擇時間",dateRangePickerToolbarTitle:"選擇時間範圍",clockLabelText:(e,o)=>`選擇 ${_[e]}. ${o===null?"未選擇時間":`已選擇${o}`}`,hoursClockNumberText:e=>`${e}小時`,minutesClockNumberText:e=>`${e}分鐘`,secondsClockNumberText:e=>`${e}秒`,selectViewText:e=>`選擇 ${_[e]}`,calendarWeekNumberHeaderLabel:"週數",calendarWeekNumberHeaderText:"#",calendarWeekNumberAriaLabelText:e=>`第${e}週`,calendarWeekNumberText:e=>`${e}`,openDatePickerDialogue:e=>e?`選擇日期,已選擇${e}`:"選擇日期",openTimePickerDialogue:e=>e?`選擇時間,已選擇${e}`:"選擇時間",timeTableLabel:"選擇時間",dateTableLabel:"選擇日期",fieldYearPlaceholder:e=>"Y".repeat(e.digitAmount),fieldMonthPlaceholder:e=>e.contentType==="letter"?"MMMM":"MM",fieldDayPlaceholder:()=>"DD",fieldWeekDayPlaceholder:e=>e.contentType==="letter"?"EEEE":"EE",fieldHoursPlaceholder:()=>"hh",fieldMinutesPlaceholder:()=>"mm",fieldSecondsPlaceholder:()=>"ss",fieldMeridiemPlaceholder:()=>"aa"}),J=h.createTheme(),C=['"Noto Sans TC"',"PingFang",'"Microsoft JhengHei"',"Arial","sans-serif"].join(","),ie=h.createTheme({typography:{fontFamily:C,h1:{fontFamily:C,fontSize:96,lineHeight:"112px"},h2:{fontFamily:C,fontSize:60,lineHeight:1.2},h3:{fontFamily:C,fontSize:48,lineHeight:1.167},h4:{fontFamily:C,fontSize:34,lineHeight:1.235},h5:{fontFamily:C,fontSize:24,lineHeight:1.334},h6:{fontFamily:C,fontSize:20,lineHeight:1.6},subtitle1:{fontFamily:C,fontSize:16,lineHeight:1.75},subtitle2:{fontFamily:C,fontSize:14,lineHeight:1.57},body1:{fontFamily:C,fontSize:16,lineHeight:1.5},body2:{fontFamily:C,fontSize:14,lineHeight:1.43},button:{fontFamily:C},caption:{fontFamily:C,fontSize:12,lineHeight:1.66},overline:{fontFamily:C,fontSize:12,lineHeight:2.66}},palette:{primary:{light:"#82C0FF",main:w.blue[600],dark:"#0063B0"},secondary:{light:"#FFD759",main:"#F5A623",dark:"#BD7700",contrastText:"#FFFFFF"},cancel:{main:"#C4C4C4",contrastText:"#FFFFFF"},primaryGreen:{light:"#9DD49E",main:"#5CB85D",dark:"#218838",contrastText:"#FFFFFF"},blueGreen:{main:"#19A696",contrastText:"#FFFFFF"},grassGreen:J.palette.augmentColor({color:{main:"#80BB5A",contrastText:"#FFFFFF"}}),darkOrange:J.palette.augmentColor({color:{main:"#D55704",contrastText:"#FFFFFF"}}),progressPrimary:{main:w.blue[600],dark:w.blue[600],light:"#FFFFFF",contrastText:"#FFFFFF"},progressUpgraded:{main:"#EEEEEE",light:"#FFF",dark:"#D4D4D4",contrastText:"#000000DE"},progressUnstarted:{main:"#EEEEEE",light:"#FFF",dark:"#D4D4D4",contrastText:"#000000DE"},progressStart:{main:"#BEDEFF",light:"#FFFFFF",dark:"#ABC8E5",contrastText:"#000000DE"},progressLevel1:{main:"#82C0FF",light:"#FFFFFF",dark:"#75ADE5",contrastText:"#000000DE"},progressLevel2:{main:w.blue[600],light:"#FFFFFF",dark:"#4180C9",contrastText:"#FFFFFF"},progressLevel3:{main:"#0063B0",light:"#FFFFFF",dark:"#005596",contrastText:"#FFFFFF"},progressFinished:{main:"#05396B",light:"#FFFFFF",dark:"#042B52",contrastText:"#FFFFFF"},progressStruggle:{main:"#C62828",light:"#FFFFFF",dark:"#AD2323",contrastText:"#FFFFFF"},text:{secondary:"rgba(0, 0, 0, 0.54)",disabled:"rgba(0, 0, 0, 0.38)"}},components:{MuiCssBaseline:{styleOverrides:{body:{color:"rgba(0, 0, 0, 0.6)",lineHeight:"1.2",WebkitFontSmoothing:"auto","& .swal2-container":{zIndex:1350},button:{fontFamily:C}},"ol, ul":{listStyle:"none"},"h1, h2, h3, h4, h5, h6, p":{color:"rgba(0, 0, 0, 0.87)",margin:0,padding:0,border:0},a:{color:w.blue[600],textDecoration:"none",cursor:"pointer"},"a:hover, a:focus":{color:"#0063b0"}}},MuiButton:{styleOverrides:{sizeSmall:{fontSize:12,fontWeight:500,lineHeight:"22px"},sizeMedium:{fontSize:14,fontWeight:500,lineHeight:"24px"},sizeLarge:{fontSize:15,fontWeight:500,lineHeight:"26px"}}}}},ae),z=k.forwardRef((e,o)=>{const{children:n,value:s="",...f}=e,{sx:i,...p}=f;return t.jsx(r.MenuItem,{ref:o,sx:[u=>({whiteSpace:"unset",color:u.palette.text.primary,[`&.${R.menuItemClasses.selected}`]:{backgroundColor:u.palette.grey[300],"&:hover":{backgroundColor:u.palette.grey[200]}}}),...Array.isArray(i)?i:[i]],value:s,...p,children:n})});z.displayName="SelectMenuItem";const se=h.styled(r.InputLabel,{shouldForwardProp:e=>e!=="color"})(({color:e="primary",theme:o})=>({color:o.palette.text.secondary,[`&.${F.inputLabelClasses.outlined}`]:{[`&:not(.${F.inputLabelClasses.disabled}) .${F.inputLabelClasses.focused}`]:{color:o.palette.action.active},[`&.${F.inputLabelClasses.sizeSmall}:not(.${F.inputLabelClasses.shrink})`]:{transform:"translate(12px, 12px) scale(1)"}},[`&.${F.inputLabelClasses.shrink}:not(.${F.inputLabelClasses.error}):not(.${F.inputLabelClasses.disabled}).${F.inputLabelClasses.focused}`]:{color:o.palette[e].main},[`&.${F.inputLabelClasses.shrink}`]:{backgroundColor:"#ffffff",padding:"0 2px"}})),le=h.styled(r.OutlinedInput)(({theme:e})=>({[`&.${$.outlinedInputClasses.root}`]:{[`&.${$.outlinedInputClasses.error}.${$.outlinedInputClasses.focused} .${$.outlinedInputClasses.notchedOutline}`]:{borderColor:`${e.palette.error.main}`},[`&.${V.inputBaseClasses.sizeSmall} > .${V.inputBaseClasses.input}`]:{padding:"12.5px 15px 12.5px 12px"}},[`& .${$.outlinedInputClasses.input}`]:{color:e.palette.text.primary,"&:focus":{background:"rgba(0,0,0,0)"}}})),de=({label:e,helperText:o,FormControlProps:n={},InputLabelProps:s={},InputProps:f={},SelectProps:i={},MenuProps:p={},FormHelperTextProps:u={},className:x,children:l,color:g="primary",size:c="small",paperMaxHeight:m="auto",error:d=!1,hasLabel:y=!0,hasShrink:S=!1,value:M="",disabled:P=!1})=>{const q=!!o,{sx:A=[],...O}=n,{sx:T=[],...j}=u;return t.jsxs(r.FormControl,{sx:[G=>({backgroundColor:"white","&:hover":{[`& :not(.${$.outlinedInputClasses.disabled}):not(.${$.outlinedInputClasses.error}) .${$.outlinedInputClasses.notchedOutline}`]:{borderColor:G.palette[g].main}}}),...Array.isArray(A)?A:[A]],size:c,disabled:P,error:d,color:g,className:x,...O,children:[y&&t.jsx(se,{color:g,shrink:S?!0:void 0,...s,children:e}),t.jsx(r.Select,{value:M,label:y?e:void 0,MenuProps:{PaperProps:{sx:{maxHeight:m}},disableAutoFocusItem:!0,anchorOrigin:{vertical:2,horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"},...p},input:t.jsx(le,{color:g,label:y?e:void 0,disabled:P,...f}),...i,children:l}),q&&t.jsx(r.FormHelperText,{sx:[{[`&.${U.formHelperTextClasses.root}`]:{marginLeft:0}},...Array.isArray(T)?T:[T]],...j,children:o})]})},pe=h.styled(r.InputLabel,{shouldForwardProp:e=>e!=="color"})(({color:e="primary",theme:o})=>({[`&.${F.inputLabelClasses.root}`]:{color:o.palette.text.disabled},[`&.${F.inputLabelClasses.focused}`]:{color:o.palette[e].main},[`&.${F.inputLabelClasses.error}`]:{color:o.palette.error.main}})),ce=h.styled(r.Input,{shouldForwardProp:e=>e!=="color"})(({color:e="primary",theme:o})=>({color:o.palette.text.primary,[`& .${b.inputClasses.input}`]:{"&:focus":{background:"rgba(0,0,0,0)"}},[`&.${b.inputClasses.underline}:not(.${b.inputClasses.disabled}):not(.${b.inputClasses.error})`]:{"&:after,&:hover:before":{borderBottomColor:o.palette[e].main}},[`&.${b.inputClasses.underline}.${b.inputClasses.error}:not(.${b.inputClasses.disabled})`]:{"&:after,&:hover:before":{borderBottomColor:o.palette.error.main}}})),ue=({label:e,helperText:o,FormControlProps:n={},InputLabelProps:s={},InputProps:f={},SelectProps:i={},FormHelperTextProps:p={},className:u,children:x,color:l="primary",size:g="small",paperMaxHeight:c="auto",error:m=!1,hasLabel:d=!0,hasShrink:y=!1,value:S="",disabled:M=!1})=>{const P=!!o;return t.jsxs(r.FormControl,{variant:"standard",color:l,size:g,disabled:M,error:m,className:u,...n,children:[t.jsx(pe,{color:l,shrink:y?!0:void 0,...s,children:d?e:void 0}),t.jsx(r.Select,{value:S,MenuProps:{PaperProps:{sx:{maxHeight:c}},anchorOrigin:{vertical:2,horizontal:"left"},transformOrigin:{vertical:"top",horizontal:"left"}},input:t.jsx(ce,{color:l,...f}),...i,children:x}),P&&t.jsx(r.FormHelperText,{...p,children:o})]})},D=({variant:e,...o})=>e==="outlined"?t.jsx(de,{...o}):t.jsx(ue,{...o}),N="請選擇",W="option-for-reset",he="",xe=(e,o,n)=>{const s=n&&e===0?W:he;return o?.[e+1]||s},ge=({topicList:e,onTopicSelected:o,hasArrow:n,selectedTopicIds:s,onResetClick:f=()=>{},hasResetOption:i=!1})=>{const p=r.useMediaQuery(g=>g.breakpoints.up("md")),[u,x]=k.useState([]),l=(g,c)=>{if(g.target.value===W){f();return}o(g.target.value,{layerNumber:c}),x(m=>[...m.slice(0,c+1),!1])};return t.jsx(r.Box,{sx:{display:"flex",alignItems:"center",flexWrap:"wrap"},children:e.map((g,c)=>{const m=u[c]||!s[c+1];return g.isError?null:t.jsxs(r.Box,{sx:{display:"flex",alignItems:"center",width:p?void 0:"100%"},children:[n&&c!==0&&t.jsx(Z,{sx:d=>({margin:d.spacing(-1,-1.5),fontSize:d.spacing(7),color:"#444"}),fontSize:"large","data-testid":"topic-filter-arrow"}),g.isLoading?t.jsx(D,{variant:"outlined",size:"small",label:"載入資料中...",disabled:!0,FormControlProps:{sx:d=>({width:p?220:"100%",margin:d.spacing(1)})}}):t.jsxs(D,{variant:"outlined",size:"small",label:N,paperMaxHeight:412,hasLabel:m,value:xe(c,s,i),SelectProps:{"data-testid":`layered-topic-${c}`},InputProps:{inputProps:{"aria-label":`layered-topic-${c}`},onChange:d=>{l(d,c)},onFocus:()=>{x(d=>{const y=[...d];return y[c]=!0,y})},onBlur:()=>{x(d=>{const y=[...d];return y[c]=!1,y})}},FormControlProps:{sx:d=>({width:p?220:"100%",margin:d.spacing(1)})},children:[t.jsx(z,{disabled:!0,value:"",children:N}),i&&c===0&&t.jsx(z,{value:W,children:"所有科目"}),g.data?.children?.map(d=>t.jsx(z,{value:d.id,"data-testid":`layered-menuitem-${c}`,"data-is-content-topic":d.hasContentChild,children:d.title},d.id))]})]},c)})})};function v(e){return`${e.charAt(0).toUpperCase()}${e.slice(1)}`}const L=k.forwardRef((e,o)=>{const{children:n,...s}=e;return t.jsx(r.Button,{ref:o,...s,children:n})});L.displayName="Button";const fe=h.styled(L,{shouldForwardProp:e=>e!=="active"})(({theme:e,active:o,color:n="primary"})=>({[`&.${B.buttonClasses.outlined}${v(n)}`]:{backgroundColor:o?e.palette[n].main:e.palette.common.white,color:o?e.palette.common.white:e.palette[n].main,borderColor:e.palette[n].main,"&:hover":{backgroundColor:o?e.palette[n].main:h.alpha(e.palette[n].main,.1)},[`&.${B.buttonClasses.disabled}`]:{backgroundColor:e.palette.common.white,borderColor:e.palette.action.disabledBackground,color:e.palette.action.disabled}},[`&.${B.buttonClasses.text}${v(n)}`]:{"&:hover":{backgroundColor:h.alpha(e.palette[n].main,.1)}}})),Fe=h.styled(r.Button)(({theme:e,color:o="primary",loading:n})=>({[`&.${B.buttonClasses.outlined}${v(o)}`]:{borderColor:!n&&e.palette[o].main,"&:hover":{backgroundColor:h.alpha(e.palette[o].main,.1)},[`&.${B.buttonClasses.disabled}`]:{backgroundColor:!n&&e.palette.common.white,borderColor:!n&&e.palette.action.disabledBackground,color:!n&&e.palette.action.disabled}},[`&.${B.buttonClasses.text}${v(o)}`]:{"&:hover":{backgroundColor:h.alpha(e.palette[o].main,.1)}}})),me=({children:e,...o})=>t.jsx(Fe,{...o,children:t.jsx("span",{children:e})}),Y=k.forwardRef((e,o)=>{const{children:n,...s}=e;return t.jsx(r.ButtonGroup,{ref:o,...s,children:n})});Y.displayName="ButtonGroup";const be=h.styled(Y)(({color:e="primary",theme:o})=>({[`&.${H.buttonGroupClasses.outlined} > .${H.buttonGroupClasses.grouped}${v(e)}.${H.buttonGroupClasses.grouped}.${H.buttonGroupClasses.disabled}`]:{borderColor:h.alpha(o.palette[e].main,.5),color:h.alpha(o.palette[e].main,.5)}})),Ce=h.styled(r.FormControlLabel)(({theme:e})=>({[`& .${E.formControlLabelClasses.label}`]:{color:e.palette.text.secondary,[`&.${E.formControlLabelClasses.disabled}`]:{color:e.palette.text.disabled}},[`& .${ee.radioClasses.checked} + .${E.formControlLabelClasses.label}`]:{color:e.palette.text.primary}})),ye=({checked:e,disabled:o,label:n,labelPlacement:s,value:f,FormControlLabelProps:i={},RadioProps:p={},TypographyProps:u={},color:x="secondary",size:l="medium",caption:g=""})=>{const{sx:c=[],...m}=p,{sx:d=[],...y}=u;return t.jsxs(t.Fragment,{children:[t.jsx(Ce,{control:t.jsx(r.Radio,{sx:[S=>({color:S.palette.text.primary}),...Array.isArray(c)?c:[c]],color:x,size:l,...m}),checked:e,disabled:o,label:n,labelPlacement:s,value:f,...i}),g&&t.jsx(r.Typography,{sx:[S=>({color:S.palette.text.disabled,margin:"0 0 0 30px"}),...Array.isArray(d)?d:[d]],variant:"body2",...y,children:g})]})},$e=h.styled(r.TextField)(({label:e,color:o="primary",theme:n})=>({[`& .${F.inputLabelClasses.error}`]:{[`&:not(.${F.inputLabelClasses.shrink})`]:{color:n.palette.text.secondary},[`&.${F.inputLabelClasses.disabled}`]:{color:n.palette.text.disabled}},[`& .${F.inputLabelClasses.error}.${F.inputLabelClasses.focused}`]:{color:n.palette.error.main},[`& .${b.inputClasses.underline}:not(.${b.inputClasses.disabled})`]:{[`&.MuiInputBase-color${v(o)}:hover:before`]:{borderColor:n.palette[o].main}},[`& .${b.inputClasses.disabled} .${$.outlinedInputClasses.notchedOutline}`]:{borderStyle:"dotted"},[`& .${b.inputClasses.error}.${b.inputClasses.focused} .${$.outlinedInputClasses.notchedOutline}`]:{borderColor:n.palette.error.main},[`&.${te.textFieldClasses.root} :not(.${b.inputClasses.disabled}):not(.${b.inputClasses.error})`]:{[`&.MuiInputBase-color${v(o)}:hover .${$.outlinedInputClasses.notchedOutline}`]:{borderColor:n.palette[o].main}},[`& .${$.outlinedInputClasses.notchedOutline}`]:{"& > legend":{maxWidth:e===""&&0}}})),Te=e=>{const{slotProps:o={},...n}=e,{inputLabel:s={},input:f={},formHelperText:i={},...p}=o,u=!!("endAdornment"in f&&f?.endAdornment);return t.jsx($e,{slotProps:{inputLabel:{shrink:u?!0:void 0,...s},input:f,formHelperText:{...i,sx:[x=>({[`&.${U.formHelperTextClasses.root}`]:{marginLeft:0,[`&.${b.inputClasses.error}`]:{color:x.palette.error.main}}})]},...p},...n})},K=k.forwardRef((e,o)=>{const{title:n,content:s,imageUrl:f,confirmButtonProps:i,cancelButtonProps:p,closeButtonProps:u,context:x}=e;return t.jsxs(r.Card,{ref:o,sx:l=>({zIndex:"10000",backgroundColor:"white",borderRadius:"10px",boxShadow:"4px 6px 20px 0px #00000040",padding:0,width:"400px",[l.breakpoints.up(1024)]:{position:"fixed",left:"64px",bottom:"50px"},[l.breakpoints.down(451)]:{width:"80%"}}),children:[t.jsx(r.CardHeader,{sx:l=>({padding:l.spacing(u?1:2,2,0)}),action:u&&t.jsx(r.IconButton,{onClick:()=>{u instanceof Object&&u?.onClick?u.onClick(x):x.close()},children:t.jsx(re,{})})}),f&&t.jsx(r.CardMedia,{sx:l=>({padding:l.spacing(1,2)}),children:t.jsxs(r.Box,{sx:l=>({display:"flex",flexDirection:"column",gap:l.spacing(1)}),children:[t.jsx(r.Box,{component:"img",sx:{textAlign:"center",width:"100%",height:"100%",border:"0.5px solid #D2D2D2",borderRadius:"8px"},src:f}),t.jsx(r.Divider,{})]})}),t.jsxs(r.CardContent,{sx:l=>({padding:l.spacing(0,2),gap:l.spacing(1),display:"flex",flexDirection:"column"}),children:[t.jsxs(r.Box,{sx:l=>({gap:l.spacing(1),display:"flex"}),children:[t.jsx(r.Box,{component:"img",alt:"title icon",src:"https://www.junyiacademy.org/images/exam/title_icon.svg"}),t.jsx(r.Box,{children:t.jsx(r.Typography,{sx:{fontSize:"21px"},children:n})})]}),t.jsx(r.Typography,{sx:{color:"#b5b5b5",fontSize:"18px"},children:s})]}),t.jsxs(r.CardActions,{sx:l=>({padding:l.spacing(1,1,3,1),display:"flex",justifyContent:"center",gap:l.spacing(2)}),children:[p&&t.jsx(L,{color:"cancel",variant:p?.variant??"contained",size:p?.size??"large",onClick:()=>{p?.onClick&&p.onClick(x)},children:p.title||"取消"}),i&&t.jsx(L,{variant:i?.variant??"contained",size:i?.size??"large",onClick:()=>{i?.onClick&&i.onClick(x)},children:i.title||"確定"})]})]})});K.displayName="TutorialStep";const Se=({steps:e=[],initialStep:o=0,onClose:n})=>{const[s,f]=k.useState(o),i=oe(m=>m.breakpoints.up(1024)),[p,u]=k.useState(!0),x=e[s],g={...x,context:{close:()=>{u(!1),n&&n()},goToStep:m=>{f(m)},currentStep:s,currentStepProps:x}};return(m=>i?t.jsx(r.Slide,{in:p,direction:"up",mountOnEnter:!0,unmountOnExit:!0,children:m}):t.jsx(r.Modal,{open:p,sx:{display:"flex",alignItems:"center",justifyContent:"center",outline:0},children:t.jsx(r.Box,{sx:{display:"flex",alignItems:"center",justifyContent:"center",outline:0},children:m})}))(t.jsx(K,{...g}))},X=({color:e="progressUpgraded",checked:o=!1,...n})=>{const{sx:s=[],...f}=n;return t.jsx(r.Chip,{variant:"outlined",sx:[i=>({...o?{backgroundColor:i.palette[e].main,color:i.palette[e].contrastText,".MuiChip-icon":{color:i.palette[e].contrastText}}:{backgroundColor:i.palette[e].light,color:i.palette.text.primary},[`&.${Q.chipClasses.clickable}:hover`]:{backgroundColor:i.palette[e].dark,color:i.palette[e].contrastText},[`&.${Q.chipClasses.clickable}:hover > .MuiChip-icon`]:{color:i.palette[e].contrastText}}),...Array.isArray(s)?s:[s]],...f})},ke=h.styled(r.Popper)(({theme:e})=>({zIndex:1e3,"& > div":{position:"relative"},'&[data-popper-placement*="bottom"]':{"& > div":{marginTop:6},"& .MuiPopper-arrow":{top:0,left:0,marginTop:"-0.9em",width:"3em",height:"1em","&::after":{borderWidth:"0 1em 1em 1em",borderColor:`transparent transparent ${e.palette.common.white} transparent`,top:1},"&::before":{borderWidth:"0 1em 1em 1em",borderColor:"transparent transparent rgba(0, 0, 0, 0.4) transparent",top:6}}},'&[data-popper-placement*="top"]':{"& > div":{marginBottom:6},"& .MuiPopper-arrow":{bottom:0,left:0,marginBottom:"-0.9em",width:"3em",height:"1em","&::after":{borderWidth:"6px 6px 0 6px",borderColor:`${e.palette.common.white} transparent transparent transparent`,bottom:14},"&::before":{borderWidth:"7px 7px 0 7px",borderColor:"rgba(0, 0, 0, 0.4) transparent transparent transparent",bottom:6}}},'&[data-popper-placement*="right"]':{"& > div":{marginLeft:6},"& .MuiPopper-arrow":{left:6,marginLeft:"-0.9em",height:"3em",width:"1em","&::after":{borderWidth:"6px 6px 6px 0",borderColor:`transparent ${e.palette.common.white} transparent transparent`,top:-13,left:1},"&::before":{borderWidth:"7px 7px 7px 0",borderColor:"transparent rgba(0, 0, 0, 0.4) transparent transparent"}}},'&[data-popper-placement*="left"]':{"& > div":{marginRight:6},"& .MuiPopper-arrow":{right:6,marginRight:"-0.9em",height:"3em",width:"1em","&::after":{borderWidth:"6px 0 6px 6px",borderColor:`transparent transparent transparent ${e.palette.common.white}`,top:-13,right:1},"&::before":{borderWidth:"7px 0 7px 7px",borderColor:"transparent transparent transparent rgba(0, 0, 0, 0.4)"}}}})),ve=h.styled("div")(({hasBorder:e})=>({position:"absolute",fontSize:7,width:"3em",height:"3em",zIndex:1,"&::after":{position:"relative",content:'""',margin:"auto",display:"block",width:0,height:0,borderStyle:"solid",zIndex:2},"&::before":{position:"relative",content:'""',margin:"auto",display:"block",visibility:e?"visible":"hidden",width:0,height:0,borderStyle:"solid"}})),I=h.styled(L)({minWidth:"49px"}),Be=({anchorEl:e,arrow:o,placement:n="right",hasBorder:s=!0,content:f="",helperText:i,chipLabel:p,TopLeftButtonProps:u,TopRightButtonProps:x,BottomRightButtonProps:l,ChipProps:g,PopperProps:c={}})=>{const[m,d]=k.useState(null),{title:y,...S}=u||{},{title:M,...P}=x||{},{title:q,...A}=l||{},O=!!e;return t.jsxs(ke,{"data-testid":"info-popover",open:O,anchorEl:e,placement:n,disablePortal:!0,modifiers:[{name:"flip",enabled:!0,options:{altBoundary:!0,rootBoundary:"document",padding:8}},{name:"preventOverflow",enabled:!0,options:{altAxis:!1,altBoundary:!0,tether:!0,rootBoundary:"document",padding:8}},{name:"arrow",enabled:o,options:{element:m,padding:10}}],sx:{maxWidth:194,width:"100%"},...c,children:[o?t.jsx(ve,{"data-testid":"info-popover-arrow",ref:d,className:"MuiPopper-arrow",hasBorder:s}):null,t.jsx(r.Box,{"data-testid":"info-popover-paper",sx:T=>({padding:2,backgroundColor:T.palette.background.paper,borderRadius:"4px",border:s?"1px solid rgba(0, 0, 0, 0.4)":null,overflow:"auto",boxShadow:T.shadows[2]}),children:t.jsxs(r.Box,{sx:{maxWidth:194},children:[t.jsx(r.Typography,{variant:"body1",sx:{width:"100%","&:not(:last-child)":{marginBottom:1}},children:f}),p&&g&&t.jsxs(r.Box,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center","&:not(:last-child)":{marginBottom:1}},children:[t.jsx(r.Typography,{variant:"body2",children:p}),t.jsx(X,{...g,sx:{border:0}})]}),i&&t.jsx(r.Box,{sx:T=>({width:"100%",padding:T.spacing(1,0),"&:not(:last-child)":{marginBottom:1}}),children:i.split(`
|
|
2
2
|
`).map((T,j)=>t.jsx(r.Typography,{variant:"body2",sx:G=>({color:G.palette.text.secondary,textAlign:"right"}),children:T},`helper-text-${j}`))}),(x||u)&&t.jsxs(r.Box,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center","&:not(:last-child)":{marginBottom:1}},children:[u&&t.jsx(r.Box,{sx:{display:"flex"},children:t.jsx(I,{"data-testid":"info-popover-top-left-button",variant:"contained",size:"medium",color:"primary",...S,children:y})}),x&&t.jsx(r.Box,{sx:{display:"flex",marginLeft:1},children:t.jsx(I,{"data-testid":"info-popover-top-right-button",variant:"contained",size:"medium",color:"primary",...P,children:M})})]}),l&&t.jsx(r.Box,{sx:{display:"flex",justifyContent:"flex-end",alignItems:"center","&:not(:last-child)":{marginBottom:1}},children:t.jsx(I,{"data-testid":"info-popover-bottom-left-button",variant:"contained",size:"medium",color:"primary",...A,children:q})})]})})]})};a.Button=fe,a.ButtonGroup=be,a.Chip=X,a.InfoPopover=Be,a.LoadingButton=me,a.Radio=ye,a.Select=D,a.SelectMenuItem=z,a.TextField=Te,a.TopicFilter=ge,a.Tutorial=Se,a.colors=w,a.theme=ie,Object.defineProperty(a,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@junyiacademy/ui-test",
|
|
3
|
-
"version": "1.
|
|
4
|
-
"description": "junyiacademy ui library
|
|
5
|
-
"main": "./dist/index.js",
|
|
3
|
+
"version": "1.7.0",
|
|
4
|
+
"description": "junyiacademy ui library",
|
|
5
|
+
"main": "./dist/index.js.umd.js",
|
|
6
|
+
"module": "./dist/index.js.mjs",
|
|
6
7
|
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"import": "./dist/index.js.mjs",
|
|
11
|
+
"require": "./dist/index.js.umd.js",
|
|
12
|
+
"types": "./dist/index.d.ts"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
7
15
|
"directories": {
|
|
8
16
|
"lib": "lib"
|
|
9
17
|
},
|
|
@@ -12,7 +20,7 @@
|
|
|
12
20
|
],
|
|
13
21
|
"scripts": {
|
|
14
22
|
"test": "echo \"Error: no test specified\" && exit 1",
|
|
15
|
-
"build": "rm -rf ./dist && vite build
|
|
23
|
+
"build": "rm -rf ./dist && vite build"
|
|
16
24
|
},
|
|
17
25
|
"keywords": [
|
|
18
26
|
"junyiacademy"
|
|
@@ -35,10 +43,11 @@
|
|
|
35
43
|
"@emotion/react": "^11.0.0",
|
|
36
44
|
"@emotion/styled": "^11.0.0",
|
|
37
45
|
"@mui/material": "^7.3.1",
|
|
38
|
-
"@types/react": "^18.
|
|
46
|
+
"@types/react": "^18.2.24",
|
|
39
47
|
"axios": "~1.13.2",
|
|
40
48
|
"react": "^18.2.0",
|
|
41
49
|
"react-dom": "^=18.2.0",
|
|
42
|
-
"typescript": "^5.8.3"
|
|
50
|
+
"typescript": "^5.8.3",
|
|
51
|
+
"vite-plugin-dts": "^4.5.4"
|
|
43
52
|
}
|
|
44
53
|
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { SubTree } from '../../models/topic-tree/SubTree';
|
|
2
|
-
export declare const getTopicKey = "getTopicData";
|
|
3
|
-
interface GetTopicListArgument {
|
|
4
|
-
topicIds: string[];
|
|
5
|
-
selectFunc: (topic: SubTree) => SubTree;
|
|
6
|
-
}
|
|
7
|
-
export declare const useGetTopicList: ({ topicIds, selectFunc, }: GetTopicListArgument) => {
|
|
8
|
-
data: any;
|
|
9
|
-
isLoading: boolean;
|
|
10
|
-
isSuccess: boolean;
|
|
11
|
-
isError: boolean;
|
|
12
|
-
}[];
|
|
13
|
-
export default useGetTopicList;
|
|
14
|
-
export type QueryTopicInfo = ReturnType<typeof useGetTopicList>;
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
import { type InferOutput } from 'valibot';
|
|
2
|
-
export declare enum UserRole {
|
|
3
|
-
Student = "student",
|
|
4
|
-
Teacher = "teacher",
|
|
5
|
-
Parent = "parent",
|
|
6
|
-
Others = "others",
|
|
7
|
-
Unknown = ""
|
|
8
|
-
}
|
|
9
|
-
export declare const userRoleMap: {
|
|
10
|
-
student: string;
|
|
11
|
-
teacher: string;
|
|
12
|
-
parent: string;
|
|
13
|
-
others: string;
|
|
14
|
-
"": string;
|
|
15
|
-
};
|
|
16
|
-
declare const AuthDataSchema: import("valibot").ObjectSchema<{
|
|
17
|
-
readonly isLogin: import("valibot").BooleanSchema<undefined>;
|
|
18
|
-
readonly isPhantom: import("valibot").BooleanSchema<undefined>;
|
|
19
|
-
}, undefined>;
|
|
20
|
-
declare const IdentityDataSchema: import("valibot").ObjectSchema<{
|
|
21
|
-
readonly nickname: import("valibot").StringSchema<undefined>;
|
|
22
|
-
readonly username: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
23
|
-
readonly schoolName: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
24
|
-
readonly email: import("valibot").StringSchema<undefined>;
|
|
25
|
-
readonly contactEmail: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
|
|
26
|
-
readonly backupEmails: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
27
|
-
readonly profileRoot: import("valibot").StringSchema<undefined>;
|
|
28
|
-
readonly userId: import("valibot").StringSchema<undefined>;
|
|
29
|
-
readonly userKey: import("valibot").StringSchema<undefined>;
|
|
30
|
-
readonly hasCredential: import("valibot").BooleanSchema<undefined>;
|
|
31
|
-
readonly hashedId: import("valibot").StringSchema<undefined>;
|
|
32
|
-
}, undefined>;
|
|
33
|
-
declare const KindDataSchema: import("valibot").ObjectSchema<{
|
|
34
|
-
readonly userRole: import("valibot").EnumSchema<typeof UserRole, undefined>;
|
|
35
|
-
readonly isChildAccount: import("valibot").BooleanSchema<undefined>;
|
|
36
|
-
readonly isCoach: import("valibot").BooleanSchema<undefined>;
|
|
37
|
-
readonly isLecturer: import("valibot").OptionalSchema<import("valibot").BooleanSchema<undefined>, undefined>;
|
|
38
|
-
}, undefined>;
|
|
39
|
-
declare const AchievementDataSchema: import("valibot").ObjectSchema<{
|
|
40
|
-
readonly avatar: import("valibot").ObjectSchema<{
|
|
41
|
-
readonly avatarType: import("valibot").StringSchema<undefined>;
|
|
42
|
-
readonly displayName: import("valibot").StringSchema<undefined>;
|
|
43
|
-
readonly imageSrc: import("valibot").StringSchema<undefined>;
|
|
44
|
-
readonly minRate: import("valibot").OptionalSchema<import("valibot").NumberSchema<undefined>, undefined>;
|
|
45
|
-
readonly minPoints: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>]>, undefined>;
|
|
46
|
-
readonly name: import("valibot").StringSchema<undefined>;
|
|
47
|
-
}, undefined>;
|
|
48
|
-
readonly points: import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>]>;
|
|
49
|
-
readonly proficientExercises: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
50
|
-
readonly totalProblemsCorrect: import("valibot").NumberSchema<undefined>;
|
|
51
|
-
readonly lastActivity: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
52
|
-
}, undefined>;
|
|
53
|
-
declare const UserProfileDataSchema: import("valibot").ObjectSchema<{
|
|
54
|
-
readonly avatar: import("valibot").ObjectSchema<{
|
|
55
|
-
readonly avatarType: import("valibot").StringSchema<undefined>;
|
|
56
|
-
readonly displayName: import("valibot").StringSchema<undefined>;
|
|
57
|
-
readonly imageSrc: import("valibot").StringSchema<undefined>;
|
|
58
|
-
readonly minRate: import("valibot").OptionalSchema<import("valibot").NumberSchema<undefined>, undefined>;
|
|
59
|
-
readonly minPoints: import("valibot").OptionalSchema<import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>]>, undefined>;
|
|
60
|
-
readonly name: import("valibot").StringSchema<undefined>;
|
|
61
|
-
}, undefined>;
|
|
62
|
-
readonly points: import("valibot").SchemaWithPipe<readonly [import("valibot").NumberSchema<undefined>, import("valibot").IntegerAction<number, undefined>]>;
|
|
63
|
-
readonly proficientExercises: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
64
|
-
readonly totalProblemsCorrect: import("valibot").NumberSchema<undefined>;
|
|
65
|
-
readonly lastActivity: import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
66
|
-
readonly userRole: import("valibot").EnumSchema<typeof UserRole, undefined>;
|
|
67
|
-
readonly isChildAccount: import("valibot").BooleanSchema<undefined>;
|
|
68
|
-
readonly isCoach: import("valibot").BooleanSchema<undefined>;
|
|
69
|
-
readonly isLecturer: import("valibot").OptionalSchema<import("valibot").BooleanSchema<undefined>, undefined>;
|
|
70
|
-
readonly nickname: import("valibot").StringSchema<undefined>;
|
|
71
|
-
readonly username: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
72
|
-
readonly schoolName: import("valibot").OptionalSchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
73
|
-
readonly email: import("valibot").StringSchema<undefined>;
|
|
74
|
-
readonly contactEmail: import("valibot").OptionalSchema<import("valibot").NullableSchema<import("valibot").StringSchema<undefined>, undefined>, undefined>;
|
|
75
|
-
readonly backupEmails: import("valibot").ArraySchema<import("valibot").StringSchema<undefined>, undefined>;
|
|
76
|
-
readonly profileRoot: import("valibot").StringSchema<undefined>;
|
|
77
|
-
readonly userId: import("valibot").StringSchema<undefined>;
|
|
78
|
-
readonly userKey: import("valibot").StringSchema<undefined>;
|
|
79
|
-
readonly hasCredential: import("valibot").BooleanSchema<undefined>;
|
|
80
|
-
readonly hashedId: import("valibot").StringSchema<undefined>;
|
|
81
|
-
readonly isLogin: import("valibot").BooleanSchema<undefined>;
|
|
82
|
-
readonly isPhantom: import("valibot").BooleanSchema<undefined>;
|
|
83
|
-
}, undefined>;
|
|
84
|
-
export type UserProfileData = InferOutput<typeof UserProfileDataSchema>;
|
|
85
|
-
export interface UserProfile {
|
|
86
|
-
auth: InferOutput<typeof AuthDataSchema>;
|
|
87
|
-
identity: InferOutput<typeof IdentityDataSchema>;
|
|
88
|
-
kind: InferOutput<typeof KindDataSchema>;
|
|
89
|
-
achievement: InferOutput<typeof AchievementDataSchema>;
|
|
90
|
-
}
|
|
91
|
-
export declare function formatRespUserProfile(json: unknown): UserProfile | null;
|
|
92
|
-
export {};
|
package/dist/ui/src/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
export { default as theme } from './styles/theme';
|
|
2
|
-
export { colors } from './styles/colors';
|
|
3
|
-
export type { ProgressColor } from './styles/theme';
|
|
4
|
-
export { default as TopicFilter } from './lib/topic-filter/TopicFilter';
|
|
5
|
-
export { default as SelectMenuItem } from './lib/menu-item/SelectMenuItem';
|
|
6
|
-
export { default as Button } from './lib/button/Button';
|
|
7
|
-
export { default as LoadingButton } from './lib/button/LoadingButton';
|
|
8
|
-
export { default as ButtonGroup } from './lib/button-group/ButtonGroup';
|
|
9
|
-
export { default as Radio } from './lib/radio/Radio';
|
|
10
|
-
export { default as TextField } from './lib/text-field/TextField';
|
|
11
|
-
export { default as Select } from './lib/select/Select';
|
|
12
|
-
export { default as Tutorial } from './lib/tutorial/Tutorial';
|
|
13
|
-
export { default as Chip } from './lib/chip/Chip';
|
|
14
|
-
export { default as InfoPopover } from './lib/Info-Popover/InfoPopover';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ChangeEvent } from 'react';
|
|
2
|
-
import { FormControlProps as MuiFormControlProps, FormHelperTextProps as MuiFormHelperTextProps, InputLabelProps as MuiInputLabelProps, InputProps as MuiInputProps, BaseSelectProps as MuiSelectProp, OutlinedInputProps } from '@mui/material';
|
|
3
|
-
export interface SelectProps extends MuiSelectProp {
|
|
4
|
-
helperText?: string;
|
|
5
|
-
FormControlProps?: Partial<MuiFormControlProps>;
|
|
6
|
-
InputLabelProps?: Partial<MuiInputLabelProps>;
|
|
7
|
-
InputProps?: (Partial<OutlinedInputProps> & {
|
|
8
|
-
onChange: (e: ChangeEvent<HTMLInputElement>) => void;
|
|
9
|
-
}) | (object & Partial<MuiInputProps>);
|
|
10
|
-
SelectProps?: object | Partial<MuiSelectProp>;
|
|
11
|
-
FormHelperTextProps?: Partial<MuiFormHelperTextProps>;
|
|
12
|
-
color?: 'primary' | 'secondary';
|
|
13
|
-
size?: 'medium' | 'small';
|
|
14
|
-
paperMaxHeight?: number | string;
|
|
15
|
-
error?: boolean;
|
|
16
|
-
hasLabel?: boolean;
|
|
17
|
-
hasShrink?: boolean;
|
|
18
|
-
disabled?: boolean;
|
|
19
|
-
className?: string;
|
|
20
|
-
otherProps?: any;
|
|
21
|
-
}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { PopperProps as MuiPopperProps } from '@mui/material';
|
|
2
|
-
import { ButtonProps } from '../button/Button';
|
|
3
|
-
import { ChipProps } from '../chip/Chip';
|
|
4
|
-
export interface PopperButtonProps extends ButtonProps {
|
|
5
|
-
title?: string;
|
|
6
|
-
}
|
|
7
|
-
export interface InfoPopoverProps extends Pick<MuiPopperProps, 'anchorEl' | 'placement'> {
|
|
8
|
-
arrow?: boolean;
|
|
9
|
-
hasBorder?: boolean;
|
|
10
|
-
content?: string;
|
|
11
|
-
helperText?: string;
|
|
12
|
-
chipLabel?: string;
|
|
13
|
-
ChipProps?: ChipProps;
|
|
14
|
-
TopRightButtonProps?: PopperButtonProps;
|
|
15
|
-
TopLeftButtonProps?: PopperButtonProps;
|
|
16
|
-
BottomRightButtonProps?: PopperButtonProps;
|
|
17
|
-
PopperProps?: Partial<MuiPopperProps>;
|
|
18
|
-
}
|
|
19
|
-
export declare const InfoPopover: ({ anchorEl, arrow, placement, hasBorder, content, helperText, chipLabel, TopLeftButtonProps, TopRightButtonProps, BottomRightButtonProps, ChipProps, PopperProps, }: InfoPopoverProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export default InfoPopover;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { BadgeProps as MuiBadgeProps } from '@mui/material';
|
|
2
|
-
export type BadgeProps = Pick<MuiBadgeProps, 'children' | 'anchorOrigin' | 'badgeContent' | 'color' | 'invisible' | 'max' | 'overlap' | 'showZero' | 'variant'>;
|
|
3
|
-
export declare const Badge: ({ ...props }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { CheckboxProps as MuiCheckboxProps } from '@mui/material';
|
|
2
|
-
export type CheckboxProps = Pick<MuiCheckboxProps, 'color' | 'disabled' | 'disableRipple' | 'size'>;
|
|
3
|
-
export declare const Checkbox: ({ ...props }: CheckboxProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ChipProps as MuiChipProps } from '@mui/material';
|
|
2
|
-
export type ChipProps = Pick<MuiChipProps, 'avatar' | 'clickable' | 'color' | 'disabled' | 'icon' | 'label' | 'onDelete' | 'size' | 'variant'>;
|
|
3
|
-
export declare const Chip: ({ ...props }: ChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { CircularProgressProps as MuiCircularProgressProps } from '@mui/material';
|
|
2
|
-
export type CircularProgressProps = Pick<MuiCircularProgressProps, 'color' | 'disableShrink' | 'size' | 'thickness' | 'value' | 'variant'>;
|
|
3
|
-
export declare const CircularProgress: ({ ...props }: CircularProgressProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { DividerProps as MuiDividerProps } from '@mui/material';
|
|
2
|
-
export type DividerProps = Pick<MuiDividerProps, 'flexItem' | 'light' | 'orientation' | 'textAlign' | 'variant'>;
|
|
3
|
-
export declare const Divider: ({ ...props }: DividerProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { FabProps as MuiFabProps } from '@mui/material';
|
|
2
|
-
export type FabProps = Pick<MuiFabProps, 'color' | 'disabled' | 'disableFocusRipple' | 'disableRipple' | 'size' | 'variant'>;
|
|
3
|
-
export declare const Fab: ({ ...props }: FabProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { LinearProgressProps as MuiLinearProgressProps } from '@mui/material';
|
|
2
|
-
export type LinearProgressProps = Pick<MuiLinearProgressProps, 'color' | 'value' | 'valueBuffer' | 'variant'>;
|
|
3
|
-
export declare const LinearProgress: ({ ...props }: LinearProgressProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { MenuProps as MuiMenuProps } from '@mui/material';
|
|
2
|
-
export type MenuProps = Pick<MuiMenuProps, 'children' | 'anchorEl' | 'open' | 'onClose' | 'transitionDuration'>;
|
|
3
|
-
export declare const Menu: ({ children, ...props }: MenuProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { ButtonProps as MuiButtonProps, MenuItemProps as MuiMenuItemProps } from '@mui/material';
|
|
2
|
-
export type MenuItemProps = MuiMenuItemProps & MuiButtonProps;
|
|
3
|
-
export declare const MenuItem: import("@mui/material").ExtendButtonBase<import("@mui/material").MenuItemTypeMap<{}, "li">>;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { RatingProps as MuiRatingProps } from '@mui/material';
|
|
2
|
-
export type RatingProps = Pick<MuiRatingProps, 'disabled' | 'highlightSelectedOnly' | 'max' | 'readOnly' | 'size'>;
|
|
3
|
-
export declare const Rating: ({ ...props }: RatingProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { SliderProps as MuiSliderProps } from '@mui/material';
|
|
2
|
-
export type SliderProps = Pick<MuiSliderProps, 'color' | 'disabled' | 'disableSwap' | 'marks' | 'max' | 'min' | 'size' | 'step' | 'track' | 'valueLabelDisplay'>;
|
|
3
|
-
export declare const Slider: ({ ...props }: SliderProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { SnackbarProps as MuiSnackbarProps } from '@mui/material';
|
|
2
|
-
export type SnackbarProps = Pick<MuiSnackbarProps, 'action' | 'anchorOrigin' | 'autoHideDuration' | 'message' | 'onClose' | 'open' | 'resumeHideDuration'>;
|
|
3
|
-
export declare const Snackbar: ({ ...props }: SnackbarProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { TooltipProps as MuiTooltipProps } from '@mui/material';
|
|
2
|
-
export type TooltipProps = Pick<MuiTooltipProps, 'children' | 'arrow' | 'enterDelay' | 'enterNextDelay' | 'followCursor' | 'leaveDelay' | 'leaveTouchDelay' | 'placement' | 'title'>;
|
|
3
|
-
export declare const Tooltip: ({ children, ...props }: TooltipProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { TypographyProps as MuiTypographyProps } from '@mui/material';
|
|
2
|
-
export type TypographyProps = Pick<MuiTypographyProps & {
|
|
3
|
-
children: React.ReactNode;
|
|
4
|
-
}, 'children' | 'align' | 'gutterBottom' | 'noWrap' | 'paragraph' | 'variant'>;
|
|
5
|
-
export declare const Typography: ({ ...props }: TypographyProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { StyledComponent } from '@emotion/styled';
|
|
2
|
-
import { ButtonProps as MuiButtonProps } from '@mui/material';
|
|
3
|
-
import { Color } from '../../styles/theme';
|
|
4
|
-
export interface ButtonProps extends Partial<MuiButtonProps> {
|
|
5
|
-
active?: boolean;
|
|
6
|
-
color?: Color;
|
|
7
|
-
}
|
|
8
|
-
export declare const Button: import("react").ForwardRefExoticComponent<Omit<ButtonProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
9
|
-
declare const StyledButton: StyledComponent<ButtonProps>;
|
|
10
|
-
export default StyledButton;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { ButtonProps as MuiButtonProps } from '@mui/material';
|
|
2
|
-
import { Color } from '../../styles/theme';
|
|
3
|
-
export interface LoadingButtonProps extends Partial<MuiButtonProps> {
|
|
4
|
-
color?: Color;
|
|
5
|
-
}
|
|
6
|
-
declare const LoadingButton: React.FC<LoadingButtonProps>;
|
|
7
|
-
export default LoadingButton;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { StyledComponent } from '@emotion/styled';
|
|
2
|
-
import { ButtonGroupProps as MuiButtonGroupProps } from '@mui/material';
|
|
3
|
-
import { Color } from '../../styles/theme';
|
|
4
|
-
interface StyledButtonGroupProps extends Partial<MuiButtonGroupProps> {
|
|
5
|
-
color?: Color;
|
|
6
|
-
}
|
|
7
|
-
export interface ButtonGroupProps extends MuiButtonGroupProps {
|
|
8
|
-
color?: Color;
|
|
9
|
-
size?: 'small' | 'medium' | 'large';
|
|
10
|
-
variant?: 'contained' | 'outlined' | 'text';
|
|
11
|
-
disabled?: boolean;
|
|
12
|
-
}
|
|
13
|
-
export declare const ButtonGroup: import("react").ForwardRefExoticComponent<Omit<ButtonGroupProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
14
|
-
declare const StyledButtonGroup: StyledComponent<StyledButtonGroupProps>;
|
|
15
|
-
export default StyledButtonGroup;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ChipProps as MuiChipProps } from '@mui/material';
|
|
2
|
-
import type { Color, ProgressColor } from '../../styles/theme';
|
|
3
|
-
export type ChipColor = ProgressColor | Color;
|
|
4
|
-
export interface ChipProps extends Pick<MuiChipProps, 'icon' | 'label' | 'clickable' | 'sx' | 'onClick' | 'disabled'> {
|
|
5
|
-
color?: ChipColor;
|
|
6
|
-
checked?: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare const Chip: ({ color, checked, ...props }: ChipProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export default Chip;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { IconProps as MuiIconProps } from '@mui/material';
|
|
2
|
-
export type IconProps = Pick<MuiIconProps, 'color' | 'children' | 'fontSize'>;
|
|
3
|
-
export declare const Icon: import("@mui/material/OverridableComponent").OverridableComponent<import("@mui/material").IconTypeMap<{}, "span">> & {
|
|
4
|
-
muiName: string;
|
|
5
|
-
};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { MenuItemProps } from '@mui/material';
|
|
2
|
-
export interface SelectMenuItemProps extends MenuItemProps {
|
|
3
|
-
value?: any;
|
|
4
|
-
}
|
|
5
|
-
declare const SelectMenuItem: import("react").ForwardRefExoticComponent<Omit<SelectMenuItemProps, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
6
|
-
export default SelectMenuItem;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import { FormControlLabelProps as MuiFormControlLabelProps, RadioProps as MuiRadioProps, TypographyProps as MuiTypographyProps } from '@mui/material';
|
|
2
|
-
export interface RadioProps extends Omit<MuiFormControlLabelProps, 'control'> {
|
|
3
|
-
color?: 'primary' | 'secondary' | 'default';
|
|
4
|
-
size?: 'medium' | 'small';
|
|
5
|
-
caption?: string;
|
|
6
|
-
FormControlLabelProps?: Partial<MuiFormControlLabelProps>;
|
|
7
|
-
RadioProps?: Partial<MuiRadioProps> & {
|
|
8
|
-
'data-testid'?: string;
|
|
9
|
-
};
|
|
10
|
-
TypographyProps?: Partial<MuiTypographyProps>;
|
|
11
|
-
}
|
|
12
|
-
export declare const Radio: React.FC<RadioProps>;
|
|
13
|
-
export default Radio;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import type { QueryTopicInfo } from '@shared-utils/hooks/topic-filter/useGetTopicList';
|
|
2
|
-
export interface TopicFilterProps {
|
|
3
|
-
topicList: QueryTopicInfo;
|
|
4
|
-
onTopicSelected: (selectedTopicId: string, selectedInfo: {
|
|
5
|
-
layerNumber: number;
|
|
6
|
-
}) => void;
|
|
7
|
-
hasArrow: boolean;
|
|
8
|
-
selectedTopicIds: string[];
|
|
9
|
-
onResetClick?: () => void;
|
|
10
|
-
hasResetOption?: boolean;
|
|
11
|
-
}
|
|
12
|
-
declare const TopicFilter: ({ topicList, onTopicSelected, hasArrow, selectedTopicIds, onResetClick, hasResetOption, }: TopicFilterProps) => import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
export default TopicFilter;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { TutorialStepProps } from './TutorialStep';
|
|
2
|
-
export interface TutorialProps {
|
|
3
|
-
steps?: TutorialStepProps[];
|
|
4
|
-
initialStep?: number;
|
|
5
|
-
onClose: () => void;
|
|
6
|
-
}
|
|
7
|
-
export declare const Tutorial: ({ steps, initialStep, onClose, }: TutorialProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export default Tutorial;
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export interface TutorialContext {
|
|
2
|
-
close: () => void;
|
|
3
|
-
goToStep: (step: number) => void;
|
|
4
|
-
currentStep: number;
|
|
5
|
-
currentStepProps: TutorialStepProps;
|
|
6
|
-
}
|
|
7
|
-
export interface TutorialButtonProps {
|
|
8
|
-
title?: string;
|
|
9
|
-
variant?: 'text' | 'outlined' | 'contained';
|
|
10
|
-
size?: 'small' | 'medium' | 'large';
|
|
11
|
-
onClick?: (context?: TutorialContext) => void;
|
|
12
|
-
}
|
|
13
|
-
export interface TutorialStepProps {
|
|
14
|
-
title: string;
|
|
15
|
-
content: string;
|
|
16
|
-
imageUrl?: string;
|
|
17
|
-
confirmButtonProps?: TutorialButtonProps;
|
|
18
|
-
cancelButtonProps?: TutorialButtonProps;
|
|
19
|
-
closeButtonProps?: TutorialButtonProps | boolean;
|
|
20
|
-
context?: TutorialContext;
|
|
21
|
-
}
|
|
22
|
-
export declare const TutorialStep: import("react").ForwardRefExoticComponent<TutorialStepProps & import("react").RefAttributes<unknown>>;
|
|
23
|
-
export interface TutorialProps {
|
|
24
|
-
steps?: TutorialStepProps[];
|
|
25
|
-
initialStep?: number;
|
|
26
|
-
close: () => void;
|
|
27
|
-
}
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
import type { TimeView } from '@mui/x-date-pickers/models/views';
|
|
2
|
-
export declare const zhTW: {
|
|
3
|
-
components: {
|
|
4
|
-
MuiLocalizationProvider: {
|
|
5
|
-
defaultProps: {
|
|
6
|
-
localeText: {
|
|
7
|
-
previousMonth?: string;
|
|
8
|
-
nextMonth?: string;
|
|
9
|
-
calendarWeekNumberHeaderLabel?: string;
|
|
10
|
-
calendarWeekNumberHeaderText?: string;
|
|
11
|
-
calendarWeekNumberAriaLabelText?: (weekNumber: number) => string;
|
|
12
|
-
calendarWeekNumberText?: (weekNumber: number) => string;
|
|
13
|
-
openPreviousView?: string;
|
|
14
|
-
openNextView?: string;
|
|
15
|
-
calendarViewSwitchingButtonAriaLabel?: (currentView: import("@mui/x-date-pickers/models/views").DateView) => string;
|
|
16
|
-
start?: string;
|
|
17
|
-
end?: string;
|
|
18
|
-
startDate?: string;
|
|
19
|
-
startTime?: string;
|
|
20
|
-
endDate?: string;
|
|
21
|
-
endTime?: string;
|
|
22
|
-
cancelButtonLabel?: string;
|
|
23
|
-
clearButtonLabel?: string;
|
|
24
|
-
okButtonLabel?: string;
|
|
25
|
-
todayButtonLabel?: string;
|
|
26
|
-
nextStepButtonLabel?: string;
|
|
27
|
-
clockLabelText?: (view: TimeView, formattedTime: string | null) => string;
|
|
28
|
-
hoursClockNumberText?: (hours: string) => string;
|
|
29
|
-
minutesClockNumberText?: (minutes: string) => string;
|
|
30
|
-
secondsClockNumberText?: (seconds: string) => string;
|
|
31
|
-
selectViewText?: (view: import("@mui/x-date-pickers/internals").TimeViewWithMeridiem) => string;
|
|
32
|
-
openDatePickerDialogue?: (formattedDate: string | null) => string;
|
|
33
|
-
openTimePickerDialogue?: (formattedTime: string | null) => string;
|
|
34
|
-
openRangePickerDialogue?: (formattedRange: string | null) => string;
|
|
35
|
-
fieldClearLabel?: string;
|
|
36
|
-
timeTableLabel?: string;
|
|
37
|
-
dateTableLabel?: string;
|
|
38
|
-
fieldYearPlaceholder?: (params: {
|
|
39
|
-
digitAmount: number;
|
|
40
|
-
format: string;
|
|
41
|
-
}) => string;
|
|
42
|
-
fieldMonthPlaceholder?: (params: {
|
|
43
|
-
contentType: import("@mui/x-date-pickers/models").FieldSectionContentType;
|
|
44
|
-
format: string;
|
|
45
|
-
}) => string;
|
|
46
|
-
fieldDayPlaceholder?: (params: {
|
|
47
|
-
format: string;
|
|
48
|
-
}) => string;
|
|
49
|
-
fieldWeekDayPlaceholder?: (params: {
|
|
50
|
-
contentType: import("@mui/x-date-pickers/models").FieldSectionContentType;
|
|
51
|
-
format: string;
|
|
52
|
-
}) => string;
|
|
53
|
-
fieldHoursPlaceholder?: (params: {
|
|
54
|
-
format: string;
|
|
55
|
-
}) => string;
|
|
56
|
-
fieldMinutesPlaceholder?: (params: {
|
|
57
|
-
format: string;
|
|
58
|
-
}) => string;
|
|
59
|
-
fieldSecondsPlaceholder?: (params: {
|
|
60
|
-
format: string;
|
|
61
|
-
}) => string;
|
|
62
|
-
fieldMeridiemPlaceholder?: (params: {
|
|
63
|
-
format: string;
|
|
64
|
-
}) => string;
|
|
65
|
-
year?: string;
|
|
66
|
-
month?: string;
|
|
67
|
-
day?: string;
|
|
68
|
-
weekDay?: string;
|
|
69
|
-
hours?: string;
|
|
70
|
-
minutes?: string;
|
|
71
|
-
seconds?: string;
|
|
72
|
-
meridiem?: string;
|
|
73
|
-
empty?: string;
|
|
74
|
-
datePickerToolbarTitle?: string;
|
|
75
|
-
timePickerToolbarTitle?: string;
|
|
76
|
-
dateTimePickerToolbarTitle?: string;
|
|
77
|
-
dateRangePickerToolbarTitle?: string;
|
|
78
|
-
timeRangePickerToolbarTitle?: string;
|
|
79
|
-
};
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
};
|
|
83
|
-
};
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
declare module '@mui/material/styles' {
|
|
2
|
-
interface Palette {
|
|
3
|
-
primaryGreen: Palette['primary'];
|
|
4
|
-
blueGreen: Palette['primary'];
|
|
5
|
-
grassGreen: Palette['primary'];
|
|
6
|
-
cancel: Palette['primary'];
|
|
7
|
-
darkOrange: Palette['primary'];
|
|
8
|
-
progressPrimary: Palette['primary'];
|
|
9
|
-
progressUpgraded: Palette['primary'];
|
|
10
|
-
progressUnstarted: Palette['primary'];
|
|
11
|
-
progressStart: Palette['primary'];
|
|
12
|
-
progressLevel1: Palette['primary'];
|
|
13
|
-
progressLevel2: Palette['primary'];
|
|
14
|
-
progressLevel3: Palette['primary'];
|
|
15
|
-
progressFinished: Palette['primary'];
|
|
16
|
-
progressStruggle: Palette['primary'];
|
|
17
|
-
}
|
|
18
|
-
interface PaletteOptions {
|
|
19
|
-
primaryGreen: PaletteOptions['primary'];
|
|
20
|
-
blueGreen: PaletteOptions['primary'];
|
|
21
|
-
grassGreen: PaletteOptions['primary'];
|
|
22
|
-
cancel: PaletteOptions['primary'];
|
|
23
|
-
darkOrange: PaletteOptions['primary'];
|
|
24
|
-
progressPrimary: PaletteOptions['primary'];
|
|
25
|
-
progressUpgraded: PaletteOptions['primary'];
|
|
26
|
-
progressUnstarted: PaletteOptions['primary'];
|
|
27
|
-
progressStart: PaletteOptions['primary'];
|
|
28
|
-
progressLevel1: PaletteOptions['primary'];
|
|
29
|
-
progressLevel2: PaletteOptions['primary'];
|
|
30
|
-
progressLevel3: PaletteOptions['primary'];
|
|
31
|
-
progressFinished: PaletteOptions['primary'];
|
|
32
|
-
progressStruggle: PaletteOptions['primary'];
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
export interface DefaultColorOverrides {
|
|
36
|
-
cancel: true;
|
|
37
|
-
primaryGreen: true;
|
|
38
|
-
blueGreen: true;
|
|
39
|
-
grassGreen: true;
|
|
40
|
-
darkOrange: true;
|
|
41
|
-
}
|
|
42
|
-
declare module '@mui/material' {
|
|
43
|
-
interface ButtonPropsColorOverrides extends DefaultColorOverrides {
|
|
44
|
-
}
|
|
45
|
-
interface ButtonGroupPropsColorOverrides extends DefaultColorOverrides {
|
|
46
|
-
}
|
|
47
|
-
interface CheckboxPropsColorOverrides extends DefaultColorOverrides {
|
|
48
|
-
}
|
|
49
|
-
interface FabPropsColorOverrides extends DefaultColorOverrides {
|
|
50
|
-
}
|
|
51
|
-
interface ChipPropsColorOverrides extends DefaultColorOverrides {
|
|
52
|
-
}
|
|
53
|
-
interface SwitchPropsColorOverrides extends DefaultColorOverrides {
|
|
54
|
-
}
|
|
55
|
-
interface BadgePropsColorOverrides extends DefaultColorOverrides {
|
|
56
|
-
}
|
|
57
|
-
interface CircularProgressPropsColorOverrides extends DefaultColorOverrides {
|
|
58
|
-
}
|
|
59
|
-
interface LinearProgressPropsColorOverrides extends DefaultColorOverrides {
|
|
60
|
-
}
|
|
61
|
-
interface ChipPropsColorOverrides extends DefaultColorOverrides {
|
|
62
|
-
progressUpgraded: true;
|
|
63
|
-
progressUnstarted: true;
|
|
64
|
-
progressStart: true;
|
|
65
|
-
progressLevel1: true;
|
|
66
|
-
progressLevel2: true;
|
|
67
|
-
progressLevel3: true;
|
|
68
|
-
progressFinished: true;
|
|
69
|
-
progressStruggle: true;
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
declare const theme: import("@mui/material/styles").Theme;
|
|
73
|
-
export default theme;
|
|
74
|
-
export declare const paletteColor: readonly ["primary", "secondary", "success", "error", "info", "cancel", "warning", "primaryGreen", "blueGreen", "grassGreen", "darkOrange"];
|
|
75
|
-
export type Color = (typeof paletteColor)[number];
|
|
76
|
-
export declare const progressColor: readonly ["progressPrimary", "progressUpgraded", "progressUnstarted", "progressStart", "progressLevel1", "progressLevel2", "progressLevel3", "progressFinished", "progressStruggle"];
|
|
77
|
-
export type ProgressColor = (typeof progressColor)[number];
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export default function capitalize(string: string): string;
|