mirror of
https://github.com/CommunityOx/ox_lib.git
synced 2026-08-17 23:16:03 +01:00
chore(web): update react and chakra versions
hopefully nothing broke that I didn't notice prayge
This commit is contained in:
@@ -49,42 +49,42 @@ const Dev: React.FC = () => {
|
||||
<DrawerBody>
|
||||
<VStack>
|
||||
<Divider />
|
||||
<Button isFullWidth onClick={() => debugInput()}>
|
||||
<Button width="full" onClick={() => debugInput()}>
|
||||
Open input dialog
|
||||
</Button>
|
||||
<Button isFullWidth onClick={() => debugAlert()}>
|
||||
<Button width="full" onClick={() => debugAlert()}>
|
||||
Open alert dialog
|
||||
</Button>
|
||||
<Divider />
|
||||
<Button isFullWidth onClick={() => debugContext()}>
|
||||
<Button width="full" onClick={() => debugContext()}>
|
||||
Open context menu
|
||||
</Button>
|
||||
<Button isFullWidth onClick={() => debugMenu()}>
|
||||
<Button width="full" onClick={() => debugMenu()}>
|
||||
Open list menu
|
||||
</Button>
|
||||
<Divider />
|
||||
<Button isFullWidth onClick={() => debugCustomNotification()}>
|
||||
<Button width="full" onClick={() => debugCustomNotification()}>
|
||||
Send custom notification
|
||||
</Button>
|
||||
<Button isFullWidth onClick={() => debugNotification()}>
|
||||
<Button width="full" onClick={() => debugNotification()}>
|
||||
Send default notification
|
||||
</Button>
|
||||
<Divider />
|
||||
<Button isFullWidth onClick={() => debugProgressbar()}>
|
||||
<Button width="full" onClick={() => debugProgressbar()}>
|
||||
Activate progress bar
|
||||
</Button>
|
||||
<Button isFullWidth onClick={() => debugCircleProgressbar()}>
|
||||
<Button width="full" onClick={() => debugCircleProgressbar()}>
|
||||
Activate progress circle
|
||||
</Button>
|
||||
<Divider />
|
||||
<Button isFullWidth onClick={() => debugSettings()}>
|
||||
<Button width="full" onClick={() => debugSettings()}>
|
||||
Open settings page
|
||||
</Button>
|
||||
<Button isFullWidth onClick={() => debugTextUI()}>
|
||||
<Button width="full" onClick={() => debugTextUI()}>
|
||||
Show TextUI
|
||||
</Button>
|
||||
<Divider />
|
||||
<Button isFullWidth onClick={() => debugSkillCheck()}>
|
||||
<Button width="full" onClick={() => debugSkillCheck()}>
|
||||
Run skill check
|
||||
</Button>
|
||||
</VStack>
|
||||
|
||||
@@ -6,6 +6,7 @@ import {
|
||||
NumberIncrementStepper,
|
||||
NumberDecrementStepper,
|
||||
InputLeftElement,
|
||||
InputGroup,
|
||||
} from '@chakra-ui/react';
|
||||
import { useEffect } from 'react';
|
||||
import { INumber } from '../../../../interfaces/dialog';
|
||||
@@ -26,22 +27,24 @@ const NumberField: React.FC<Props> = (props) => {
|
||||
return (
|
||||
<Box mb={3}>
|
||||
<Label label={props.row.label} description={props.row.description} />
|
||||
<NumberInput
|
||||
onChange={(val: string) => props.handleChange(+val, props.index)}
|
||||
defaultValue={props.row.default}
|
||||
min={props.row.min}
|
||||
max={props.row.max}
|
||||
isDisabled={props.row.disabled}
|
||||
>
|
||||
{props.row.icon && (
|
||||
<InputLeftElement pointerEvents="none" children={<FontAwesomeIcon icon={props.row.icon} fixedWidth />} />
|
||||
)}
|
||||
<NumberInputField placeholder={props.row.placeholder} pl={props.row.icon ? '40px' : undefined} />
|
||||
<NumberInputStepper>
|
||||
<NumberIncrementStepper />
|
||||
<NumberDecrementStepper />
|
||||
</NumberInputStepper>
|
||||
</NumberInput>
|
||||
<InputGroup>
|
||||
<NumberInput
|
||||
onChange={(val: string) => props.handleChange(+val, props.index)}
|
||||
defaultValue={props.row.default}
|
||||
min={props.row.min}
|
||||
max={props.row.max}
|
||||
isDisabled={props.row.disabled}
|
||||
>
|
||||
{props.row.icon && (
|
||||
<InputLeftElement pointerEvents="none" children={<FontAwesomeIcon icon={props.row.icon} fixedWidth />} />
|
||||
)}
|
||||
<NumberInputField placeholder={props.row.placeholder} pl={props.row.icon ? '40px' : undefined} />
|
||||
<NumberInputStepper>
|
||||
<NumberIncrementStepper />
|
||||
<NumberDecrementStepper />
|
||||
</NumberInputStepper>
|
||||
</NumberInput>
|
||||
</InputGroup>
|
||||
</Box>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useToast, type ToastPositionWithLogical, Box, HStack, Text } from '@chakra-ui/react';
|
||||
import { useToast, type ToastPosition, Box, HStack, Text } from '@chakra-ui/react';
|
||||
import { useNuiEvent } from '../../hooks/useNuiEvent';
|
||||
import { IconProp } from '@fortawesome/fontawesome-svg-core';
|
||||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
|
||||
@@ -7,7 +7,7 @@ export interface NotificationProps {
|
||||
title?: string;
|
||||
description?: string;
|
||||
duration?: number;
|
||||
position?: ToastPositionWithLogical;
|
||||
position?: ToastPosition;
|
||||
status?: 'info' | 'warning' | 'success' | 'error';
|
||||
id?: number;
|
||||
}
|
||||
@@ -19,7 +19,7 @@ export interface CustomNotificationProps {
|
||||
duration?: number;
|
||||
icon?: IconProp;
|
||||
iconColor?: string;
|
||||
position?: ToastPositionWithLogical;
|
||||
position?: ToastPosition;
|
||||
id?: number;
|
||||
type?: string;
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ const CircleProgressbar: React.FC = () => {
|
||||
>
|
||||
<CircularProgressLabel fontFamily="Fira Mono">{value}%</CircularProgressLabel>
|
||||
</CircularProgress>
|
||||
<Text fontFamily="Inter" isTruncated fontSize={18} fontWeight="light">
|
||||
<Text fontFamily="Inter" fontSize={18} fontWeight="light">
|
||||
{label}
|
||||
</Text>
|
||||
</Flex>
|
||||
|
||||
@@ -65,8 +65,11 @@ const Progressbar: React.FC = () => {
|
||||
}
|
||||
/>
|
||||
<Text
|
||||
maxWidth={350}
|
||||
fontFamily="Inter"
|
||||
isTruncated
|
||||
textOverflow="ellipsis"
|
||||
overflow="hidden"
|
||||
whiteSpace="nowrap"
|
||||
fontSize={22}
|
||||
fontWeight="light"
|
||||
position="absolute"
|
||||
|
||||
Reference in New Issue
Block a user