Feat:edu frontend (#17251)

Co-authored-by: crazywoola <427733928@qq.com>
Co-authored-by: zxhlyh <jasonapring2015@outlook.com>
This commit is contained in:
KVOJJJin
2025-04-01 13:58:10 +08:00
committed by GitHub
parent 4b5ec242e7
commit d1801b1f2e
37 changed files with 1115 additions and 51 deletions

View File

@@ -130,7 +130,6 @@ const DatePicker = ({
const handleConfirmDate = () => {
// debugger
console.log(selectedDate, selectedDate?.tz(timezone))
onChange(selectedDate ? selectedDate.tz(timezone) : undefined)
setIsOpen(false)
}

View File

@@ -0,0 +1,3 @@
<svg width="16" height="22" viewBox="0 0 16 22" fill="none" xmlns="http://www.w3.org/2000/svg">
<path id="Rectangle 979" d="M0 0H16L9.91493 16.7339C8.76529 19.8955 5.76063 22 2.39658 22H0V0Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 214 B

View File

@@ -0,0 +1,27 @@
{
"icon": {
"type": "element",
"isRootNode": true,
"name": "svg",
"attributes": {
"width": "16",
"height": "22",
"viewBox": "0 0 16 22",
"fill": "none",
"xmlns": "http://www.w3.org/2000/svg"
},
"children": [
{
"type": "element",
"name": "path",
"attributes": {
"id": "Rectangle 979",
"d": "M0 0H16L9.91493 16.7339C8.76529 19.8955 5.76063 22 2.39658 22H0V0Z",
"fill": "white"
},
"children": []
}
]
},
"name": "Triangle"
}

View File

@@ -0,0 +1,16 @@
// GENERATE BY script
// DON NOT EDIT IT MANUALLY
import * as React from 'react'
import data from './Triangle.json'
import IconBase from '@/app/components/base/icons/IconBase'
import type { IconBaseProps, IconData } from '@/app/components/base/icons/IconBase'
const Icon = React.forwardRef<React.MutableRefObject<SVGElement>, Omit<IconBaseProps, 'data'>>((
props,
ref,
) => <IconBase {...props} ref={ref} data={data as IconData} />)
Icon.displayName = 'Triangle'
export default Icon

View File

@@ -0,0 +1 @@
export { default as Triangle } from './Triangle'

View File

@@ -6,6 +6,7 @@ import {
flip,
offset,
shift,
size,
useDismiss,
useFloating,
useFocus,
@@ -27,6 +28,7 @@ export type PortalToFollowElemOptions = {
open?: boolean
offset?: number | OffsetOptions
onOpenChange?: (open: boolean) => void
triggerPopupSameWidth?: boolean
}
export function usePortalToFollowElem({
@@ -34,6 +36,7 @@ export function usePortalToFollowElem({
open,
offset: offsetValue = 0,
onOpenChange: setControlledOpen,
triggerPopupSameWidth,
}: PortalToFollowElemOptions = {}) {
const setOpen = setControlledOpen
@@ -50,6 +53,12 @@ export function usePortalToFollowElem({
padding: 5,
}),
shift({ padding: 5 }),
size({
apply({ rects, elements }) {
if (triggerPopupSameWidth)
elements.floating.style.width = `${rects.reference.width}px`
},
}),
],
})