@junyiacademy/ui-test 1.6.5 → 1.6.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -4
- package/dist/index.js.mjs +1479 -0
- package/dist/index.js.umd.js +2 -0
- package/dist/shared-utils/src/hooks/topic-filter/useGetTopicList.d.ts +14 -0
- package/dist/shared-utils/src/models/index.d.ts +2 -0
- package/dist/shared-utils/src/models/topic-tree/SubTree.d.ts +5 -0
- package/dist/shared-utils/src/models/topic-tree/Topic.d.ts +10 -0
- package/dist/shared-utils/src/models/user/UserProfile.d.ts +92 -0
- package/dist/shared-utils/src/utils/axios.d.ts +2 -0
- package/dist/shared-utils/src/utils/getCsrfToken.d.ts +7 -0
- package/dist/{index.d.ts → ui/src/index.d.ts} +7 -0
- package/dist/{interfaces → ui/src/interfaces}/index.d.ts +1 -9
- package/dist/ui/src/lib/Info-Popover/InfoPopover.d.ts +20 -0
- package/dist/ui/src/lib/MUI/Alert/Alert.d.ts +3 -0
- package/dist/ui/src/lib/MUI/Avatar/Avatar.d.ts +3 -0
- package/dist/ui/src/lib/MUI/Badge/Badge.d.ts +3 -0
- package/dist/ui/src/lib/MUI/Checkbox/Checkbox.d.ts +3 -0
- package/dist/ui/src/lib/MUI/Chip/Chip.d.ts +3 -0
- package/dist/ui/src/lib/MUI/CircularProgress/CircularProgress.d.ts +3 -0
- package/dist/ui/src/lib/MUI/Divider/Divider.d.ts +3 -0
- package/dist/ui/src/lib/MUI/Fab/Fab.d.ts +3 -0
- package/dist/ui/src/lib/MUI/LinearProgress/LinearProgress.d.ts +3 -0
- package/dist/ui/src/lib/MUI/Link/Link.d.ts +3 -0
- package/dist/ui/src/lib/MUI/Menu/Menu.d.ts +3 -0
- package/dist/ui/src/lib/MUI/Menu/MenuItem.d.ts +3 -0
- package/dist/ui/src/lib/MUI/Paper/Paper.d.ts +3 -0
- package/dist/ui/src/lib/MUI/Rating/Rating.d.ts +3 -0
- package/dist/ui/src/lib/MUI/Skeleton/Skeleton.d.ts +3 -0
- package/dist/ui/src/lib/MUI/Slider/Slider.d.ts +3 -0
- package/dist/ui/src/lib/MUI/Snackbar/Snackbar.d.ts +3 -0
- package/dist/ui/src/lib/MUI/Switch/Switch.d.ts +3 -0
- package/dist/ui/src/lib/MUI/Tooltip/Tooltip.d.ts +3 -0
- package/dist/ui/src/lib/MUI/Typography/Typography.d.ts +5 -0
- package/dist/ui/src/lib/button/Button.d.ts +10 -0
- package/dist/ui/src/lib/button/LoadingButton.d.ts +7 -0
- package/dist/ui/src/lib/button-group/ButtonGroup.d.ts +15 -0
- package/dist/ui/src/lib/chip/Chip.d.ts +9 -0
- package/dist/ui/src/lib/icon/Icon.d.ts +5 -0
- package/dist/{lib → ui/src/lib}/menu-item/SelectMenuItem.d.ts +1 -1
- package/dist/ui/src/lib/radio/Radio.d.ts +13 -0
- package/dist/ui/src/lib/select/OutlinedSelect.d.ts +3 -0
- package/dist/ui/src/lib/select/Select.d.ts +3 -0
- package/dist/ui/src/lib/select/StandardSelect.d.ts +3 -0
- package/dist/{lib → ui/src/lib}/text-field/TextField.d.ts +1 -1
- package/dist/ui/src/lib/topic-filter/TopicFilter.d.ts +13 -0
- package/dist/ui/src/lib/tutorial/Tutorial.d.ts +8 -0
- package/dist/ui/src/lib/tutorial/TutorialStep.d.ts +27 -0
- package/dist/ui/src/styles/colors.d.ts +11 -0
- package/dist/ui/src/styles/locales/dateTimePicker.d.ts +83 -0
- package/dist/ui/src/styles/theme.d.ts +77 -0
- package/dist/ui/src/utils/capitalize.d.ts +1 -0
- package/package.json +27 -12
- package/dist/index.js +0 -20
- package/dist/interfaces/index.js +0 -2
- package/dist/lib/button/Button.d.ts +0 -6
- package/dist/lib/button/Button.js +0 -73
- package/dist/lib/button-group/ButtonGroup.d.ts +0 -3
- package/dist/lib/button-group/ButtonGroup.js +0 -51
- package/dist/lib/menu-item/SelectMenuItem.js +0 -58
- package/dist/lib/radio/Radio.d.ts +0 -11
- package/dist/lib/radio/Radio.js +0 -76
- package/dist/lib/select/OutlinedSelect.d.ts +0 -3
- package/dist/lib/select/OutlinedSelect.js +0 -133
- package/dist/lib/select/Select.d.ts +0 -3
- package/dist/lib/select/Select.js +0 -40
- package/dist/lib/select/StandardSelect.d.ts +0 -3
- package/dist/lib/select/StandardSelect.js +0 -88
- package/dist/lib/text-field/TextField.js +0 -110
- package/dist/lib/topic-filter/TopicFilter.d.ts +0 -13
- package/dist/lib/topic-filter/TopicFilter.js +0 -151
- package/dist/styles/theme.d.ts +0 -24
- package/dist/styles/theme.js +0 -42
- package/dist/utils/Capitalize.d.ts +0 -1
- package/dist/utils/Capitalize.js +0 -6
- package/dist/utils/topicTree.d.ts +0 -2
- package/dist/utils/topicTree.js +0 -177
|
@@ -0,0 +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(`
|
|
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"})});
|
|
@@ -0,0 +1,14 @@
|
|
|
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>;
|
|
@@ -0,0 +1,92 @@
|
|
|
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 {};
|
|
@@ -1,7 +1,14 @@
|
|
|
1
|
+
export { default as theme } from './styles/theme';
|
|
2
|
+
export { colors } from './styles/colors';
|
|
3
|
+
export type { ProgressColor } from './styles/theme';
|
|
1
4
|
export { default as TopicFilter } from './lib/topic-filter/TopicFilter';
|
|
2
5
|
export { default as SelectMenuItem } from './lib/menu-item/SelectMenuItem';
|
|
3
6
|
export { default as Button } from './lib/button/Button';
|
|
7
|
+
export { default as LoadingButton } from './lib/button/LoadingButton';
|
|
4
8
|
export { default as ButtonGroup } from './lib/button-group/ButtonGroup';
|
|
5
9
|
export { default as Radio } from './lib/radio/Radio';
|
|
6
10
|
export { default as TextField } from './lib/text-field/TextField';
|
|
7
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,13 +1,5 @@
|
|
|
1
1
|
import { ChangeEvent } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export interface ITopicTreeNode {
|
|
4
|
-
childTopics: ITopicTreeNode[];
|
|
5
|
-
id: string;
|
|
6
|
-
isContentTopic: boolean;
|
|
7
|
-
key: string;
|
|
8
|
-
tags: string[];
|
|
9
|
-
title: string;
|
|
10
|
-
}
|
|
2
|
+
import { FormControlProps as MuiFormControlProps, FormHelperTextProps as MuiFormHelperTextProps, InputLabelProps as MuiInputLabelProps, InputProps as MuiInputProps, BaseSelectProps as MuiSelectProp, OutlinedInputProps } from '@mui/material';
|
|
11
3
|
export interface SelectProps extends MuiSelectProp {
|
|
12
4
|
helperText?: string;
|
|
13
5
|
FormControlProps?: Partial<MuiFormControlProps>;
|
|
@@ -0,0 +1,20 @@
|
|
|
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;
|
|
@@ -0,0 +1,3 @@
|
|
|
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;
|
|
@@ -0,0 +1,3 @@
|
|
|
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;
|
|
@@ -0,0 +1,3 @@
|
|
|
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;
|
|
@@ -0,0 +1,3 @@
|
|
|
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;
|
|
@@ -0,0 +1,3 @@
|
|
|
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;
|
|
@@ -0,0 +1,3 @@
|
|
|
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;
|
|
@@ -0,0 +1,3 @@
|
|
|
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;
|
|
@@ -0,0 +1,3 @@
|
|
|
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;
|
|
@@ -0,0 +1,3 @@
|
|
|
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">>;
|
|
@@ -0,0 +1,3 @@
|
|
|
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;
|
|
@@ -0,0 +1,3 @@
|
|
|
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;
|
|
@@ -0,0 +1,3 @@
|
|
|
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;
|
|
@@ -0,0 +1,3 @@
|
|
|
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;
|
|
@@ -0,0 +1,5 @@
|
|
|
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;
|
|
@@ -0,0 +1,10 @@
|
|
|
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;
|
|
@@ -0,0 +1,7 @@
|
|
|
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;
|
|
@@ -0,0 +1,15 @@
|
|
|
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;
|
|
@@ -0,0 +1,9 @@
|
|
|
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;
|
|
@@ -0,0 +1,5 @@
|
|
|
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
|
+
};
|
|
@@ -2,5 +2,5 @@ import { MenuItemProps } from '@mui/material';
|
|
|
2
2
|
export interface SelectMenuItemProps extends MenuItemProps {
|
|
3
3
|
value?: any;
|
|
4
4
|
}
|
|
5
|
-
declare const SelectMenuItem: (
|
|
5
|
+
declare const SelectMenuItem: import("react").ForwardRefExoticComponent<Omit<SelectMenuItemProps, "ref"> & import("react").RefAttributes<HTMLLIElement>>;
|
|
6
6
|
export default SelectMenuItem;
|
|
@@ -0,0 +1,13 @@
|
|
|
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;
|
|
@@ -0,0 +1,13 @@
|
|
|
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;
|
|
@@ -0,0 +1,8 @@
|
|
|
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;
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
}
|