@orderly.network/ui 2.8.6 → 2.8.7-alpha.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.css +3 -3
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +14 -1
- package/dist/index.d.ts +14 -1
- package/dist/index.js +117 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +117 -1
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -8668,6 +8668,19 @@ declare function useMediaQuery(query: string): boolean;
|
|
|
8668
8668
|
* */
|
|
8669
8669
|
declare function useObserverElement<T extends HTMLElement>(element: T | null, callback: (entry: ResizeObserverEntry) => void): void;
|
|
8670
8670
|
|
|
8671
|
+
interface LongPressHandlers {
|
|
8672
|
+
onMouseDown: (e: React.MouseEvent) => void;
|
|
8673
|
+
onMouseUp: () => void;
|
|
8674
|
+
onMouseMove: (e: React.MouseEvent) => void;
|
|
8675
|
+
onMouseLeave: () => void;
|
|
8676
|
+
onContextMenu: (e: React.MouseEvent) => void;
|
|
8677
|
+
onTouchStart: (e: React.TouchEvent) => void;
|
|
8678
|
+
onTouchEnd: () => void;
|
|
8679
|
+
onTouchMove: (e: React.TouchEvent) => void;
|
|
8680
|
+
onTouchCancel: () => void;
|
|
8681
|
+
}
|
|
8682
|
+
declare function useLongPress(callback: () => void, longPressTime?: number): LongPressHandlers;
|
|
8683
|
+
|
|
8671
8684
|
declare const localeValues: {
|
|
8672
8685
|
readonly locale: string;
|
|
8673
8686
|
readonly dialog: {
|
|
@@ -9042,4 +9055,4 @@ declare const DotStatus: {
|
|
|
9042
9055
|
displayName: string;
|
|
9043
9056
|
};
|
|
9044
9057
|
|
|
9045
|
-
export { ActionSheet, type ActionSheetItem, AddCircleIcon, AffiliateIcon, AlertDialog, type AlertDialogProps, ArrowDownShortIcon, ArrowDownSquareFillIcon, ArrowDownUpIcon, ArrowLeftRightIcon, ArrowLeftRightSquareFill, ArrowLeftShortIcon, ArrowRightShortIcon, ArrowRightUpSquareFillIcon, ArrowUpShortIcon, ArrowUpSquareFillIcon, AssetIcon, Avatar, Badge, BarChartIcon, type BaseActionSheetItem, type BaseIconProps, BattleActiveIcon, BattleIcon, BattleInactiveIcon, BattleSolidActiveIcon, BattleSolidInactiveIcon, BellIcon, Box, type BoxProps, Button, type ButtonProps, Calendar, CalendarIcon, CalendarMinusIcon, Card, CardBase, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CaretDownIcon, CaretLeftIcon, CaretRightIcon, CaretUpIcon, ChainIcon, type ChainSelectProps, CheckIcon, CheckSquareEmptyIcon, Checkbox, CheckedCircleFillIcon, CheckedSquareFillIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleOutlinedIcon, CloseCircleFillIcon, CloseIcon, CloseRoundFillIcon, CloseSquareFillIcon, Collapse, Collapsible, CollapsibleContent, CollapsibleTrigger, type Column, type ColumnFixed, ConfirmDialog, type ConfirmProps, CopyIcon, DataFilter, type DataFilterItem, DataTable, type DataTableClassNames, type DataTableProps, DatePicker, type DatePickerProps, Dialog, type DialogAction, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Divider, type DividerProps, DotStatus, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuTrigger, EVMAvatar, EarnActiveIcon, EarnIcon, EarnInactiveIcon, EditIcon, Either, EmptyDataState, EmptyStateIcon, EsOrderlyIcon, ExclamationFillIcon, type ExtensionPosition, ExtensionPositionEnum, ExtensionSlot, EyeCloseIcon, EyeIcon, FeeTierIcon, Flex, type FlexProps, GradientText, Grid, HoverCard, HoverCardContent, type HoverCardProps, HoverCardRoot, HoverCardTrigger, Icon, type IconType, InfoCircleIcon, Input, InputAdditional, type InputFormatter, type InputFormatterOptions, type InputProps, type InputWithTooltipProps, LeaderboardActiveIcon, LeaderboardInactiveIcon, LeftNavVaultsIcon, ListView, type Locale, LocaleContext, LocaleProvider, Logo, type LogoProps, MarketsActiveIcon, MarketsInactiveIcon, Marquee, type MarqueeProps, type MenuItem, ModalContext, type ModalHocProps, ModalIdContext, ModalProvider, type MultiFieldSort, type MultiSortField, MultiSortHeader, type MultiSortHeaderProps, NewsFillIcon, type NumeralProps, index as OUITailwind, OrderlyIcon, OrderlyThemeProvider, type OrderlyThemeProviderProps, PaginationItems, type PaginationMeta, PeopleIcon, PerpsIcon, PersonIcon, Picker, PlusIcon, Popover, PopoverAnchor, PopoverContent, PopoverRoot, PopoverTrigger, PopupUnionIcon, PortfolioActiveIcon, PortfolioInactiveIcon, QuestionFillIcon, ReduceIcon, ReferralSolidIcon, RefreshIcon, ScrollArea, ScrollBar, ScrollIndicator, type ScrollIndicatorProps, Select, SelectItem, type SelectOption, type SelectProps, SelectedChoicesFillIcon, ServerFillIcon, SettingFillIcon, SettingIcon, ShareIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SimpleDialog, SimpleDialogFooter, type SimpleDialogFooterProps, type SimpleDialogProps, SimpleDropdownMenu, SimpleSheet, type SizeType, Slider, type SliderMarks, type SortOrder, SortingAscIcon, SortingDescIcon, SortingIcon, Spinner, type SpinnerProps, SpotIcon, SquareOutlinedIcon, StarChildChatActiveIcon, StarChildChatInactiveIcon, Statistic, StatisticLabel, SwapHorizIcon, Switch, TabPanel, type TabPanelProps, type TableCellContext, type TableCellFormatter, type TableCellPlainTextRenderer, type TableCellRenderer, index$1 as TableFeatures, type TableSort, Tabs, TabsBase, TabsContent, TabsList, TabsTrigger, Text, TextField, type TextFieldProps, type TextProps, type TextType, ThrottledButton, ToastTile, Toaster, TokenIcon, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTrigger, TraderMobileIcon, TradingActiveIcon, TradingIcon, TradingInactiveIcon, TradingLeftNavIcon, TradingRewardsIcon, TriggerDialog, type TriggerDialogProps, VaultsIcon, VectorIcon, WalletIcon, WoofiStakeIcon, boxVariants, buttonVariants, capitalizeFirstLetter, convertValueToPercentage, dotStatusVariants, formatAddress, gradientTextVariants, index$2 as inputFormatter, installExtension, modal, parseNumber, registerSimpleDialog, registerSimpleSheet, scrollAreaVariants, setExtensionBuilder, startViewTransition, statisticVariants, textVariants, tv, useLocale, useMediaQuery, useModal, useMultiSort, useObserverElement, useOrderlyTheme, usePagination, useScreen };
|
|
9058
|
+
export { ActionSheet, type ActionSheetItem, AddCircleIcon, AffiliateIcon, AlertDialog, type AlertDialogProps, ArrowDownShortIcon, ArrowDownSquareFillIcon, ArrowDownUpIcon, ArrowLeftRightIcon, ArrowLeftRightSquareFill, ArrowLeftShortIcon, ArrowRightShortIcon, ArrowRightUpSquareFillIcon, ArrowUpShortIcon, ArrowUpSquareFillIcon, AssetIcon, Avatar, Badge, BarChartIcon, type BaseActionSheetItem, type BaseIconProps, BattleActiveIcon, BattleIcon, BattleInactiveIcon, BattleSolidActiveIcon, BattleSolidInactiveIcon, BellIcon, Box, type BoxProps, Button, type ButtonProps, Calendar, CalendarIcon, CalendarMinusIcon, Card, CardBase, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CaretDownIcon, CaretLeftIcon, CaretRightIcon, CaretUpIcon, ChainIcon, type ChainSelectProps, CheckIcon, CheckSquareEmptyIcon, Checkbox, CheckedCircleFillIcon, CheckedSquareFillIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleOutlinedIcon, CloseCircleFillIcon, CloseIcon, CloseRoundFillIcon, CloseSquareFillIcon, Collapse, Collapsible, CollapsibleContent, CollapsibleTrigger, type Column, type ColumnFixed, ConfirmDialog, type ConfirmProps, CopyIcon, DataFilter, type DataFilterItem, DataTable, type DataTableClassNames, type DataTableProps, DatePicker, type DatePickerProps, Dialog, type DialogAction, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Divider, type DividerProps, DotStatus, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuTrigger, EVMAvatar, EarnActiveIcon, EarnIcon, EarnInactiveIcon, EditIcon, Either, EmptyDataState, EmptyStateIcon, EsOrderlyIcon, ExclamationFillIcon, type ExtensionPosition, ExtensionPositionEnum, ExtensionSlot, EyeCloseIcon, EyeIcon, FeeTierIcon, Flex, type FlexProps, GradientText, Grid, HoverCard, HoverCardContent, type HoverCardProps, HoverCardRoot, HoverCardTrigger, Icon, type IconType, InfoCircleIcon, Input, InputAdditional, type InputFormatter, type InputFormatterOptions, type InputProps, type InputWithTooltipProps, LeaderboardActiveIcon, LeaderboardInactiveIcon, LeftNavVaultsIcon, ListView, type Locale, LocaleContext, LocaleProvider, Logo, type LogoProps, MarketsActiveIcon, MarketsInactiveIcon, Marquee, type MarqueeProps, type MenuItem, ModalContext, type ModalHocProps, ModalIdContext, ModalProvider, type MultiFieldSort, type MultiSortField, MultiSortHeader, type MultiSortHeaderProps, NewsFillIcon, type NumeralProps, index as OUITailwind, OrderlyIcon, OrderlyThemeProvider, type OrderlyThemeProviderProps, PaginationItems, type PaginationMeta, PeopleIcon, PerpsIcon, PersonIcon, Picker, PlusIcon, Popover, PopoverAnchor, PopoverContent, PopoverRoot, PopoverTrigger, PopupUnionIcon, PortfolioActiveIcon, PortfolioInactiveIcon, QuestionFillIcon, ReduceIcon, ReferralSolidIcon, RefreshIcon, ScrollArea, ScrollBar, ScrollIndicator, type ScrollIndicatorProps, Select, SelectItem, type SelectOption, type SelectProps, SelectedChoicesFillIcon, ServerFillIcon, SettingFillIcon, SettingIcon, ShareIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SimpleDialog, SimpleDialogFooter, type SimpleDialogFooterProps, type SimpleDialogProps, SimpleDropdownMenu, SimpleSheet, type SizeType, Slider, type SliderMarks, type SortOrder, SortingAscIcon, SortingDescIcon, SortingIcon, Spinner, type SpinnerProps, SpotIcon, SquareOutlinedIcon, StarChildChatActiveIcon, StarChildChatInactiveIcon, Statistic, StatisticLabel, SwapHorizIcon, Switch, TabPanel, type TabPanelProps, type TableCellContext, type TableCellFormatter, type TableCellPlainTextRenderer, type TableCellRenderer, index$1 as TableFeatures, type TableSort, Tabs, TabsBase, TabsContent, TabsList, TabsTrigger, Text, TextField, type TextFieldProps, type TextProps, type TextType, ThrottledButton, ToastTile, Toaster, TokenIcon, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTrigger, TraderMobileIcon, TradingActiveIcon, TradingIcon, TradingInactiveIcon, TradingLeftNavIcon, TradingRewardsIcon, TriggerDialog, type TriggerDialogProps, VaultsIcon, VectorIcon, WalletIcon, WoofiStakeIcon, boxVariants, buttonVariants, capitalizeFirstLetter, convertValueToPercentage, dotStatusVariants, formatAddress, gradientTextVariants, index$2 as inputFormatter, installExtension, modal, parseNumber, registerSimpleDialog, registerSimpleSheet, scrollAreaVariants, setExtensionBuilder, startViewTransition, statisticVariants, textVariants, tv, useLocale, useLongPress, useMediaQuery, useModal, useMultiSort, useObserverElement, useOrderlyTheme, usePagination, useScreen };
|
package/dist/index.d.ts
CHANGED
|
@@ -8668,6 +8668,19 @@ declare function useMediaQuery(query: string): boolean;
|
|
|
8668
8668
|
* */
|
|
8669
8669
|
declare function useObserverElement<T extends HTMLElement>(element: T | null, callback: (entry: ResizeObserverEntry) => void): void;
|
|
8670
8670
|
|
|
8671
|
+
interface LongPressHandlers {
|
|
8672
|
+
onMouseDown: (e: React.MouseEvent) => void;
|
|
8673
|
+
onMouseUp: () => void;
|
|
8674
|
+
onMouseMove: (e: React.MouseEvent) => void;
|
|
8675
|
+
onMouseLeave: () => void;
|
|
8676
|
+
onContextMenu: (e: React.MouseEvent) => void;
|
|
8677
|
+
onTouchStart: (e: React.TouchEvent) => void;
|
|
8678
|
+
onTouchEnd: () => void;
|
|
8679
|
+
onTouchMove: (e: React.TouchEvent) => void;
|
|
8680
|
+
onTouchCancel: () => void;
|
|
8681
|
+
}
|
|
8682
|
+
declare function useLongPress(callback: () => void, longPressTime?: number): LongPressHandlers;
|
|
8683
|
+
|
|
8671
8684
|
declare const localeValues: {
|
|
8672
8685
|
readonly locale: string;
|
|
8673
8686
|
readonly dialog: {
|
|
@@ -9042,4 +9055,4 @@ declare const DotStatus: {
|
|
|
9042
9055
|
displayName: string;
|
|
9043
9056
|
};
|
|
9044
9057
|
|
|
9045
|
-
export { ActionSheet, type ActionSheetItem, AddCircleIcon, AffiliateIcon, AlertDialog, type AlertDialogProps, ArrowDownShortIcon, ArrowDownSquareFillIcon, ArrowDownUpIcon, ArrowLeftRightIcon, ArrowLeftRightSquareFill, ArrowLeftShortIcon, ArrowRightShortIcon, ArrowRightUpSquareFillIcon, ArrowUpShortIcon, ArrowUpSquareFillIcon, AssetIcon, Avatar, Badge, BarChartIcon, type BaseActionSheetItem, type BaseIconProps, BattleActiveIcon, BattleIcon, BattleInactiveIcon, BattleSolidActiveIcon, BattleSolidInactiveIcon, BellIcon, Box, type BoxProps, Button, type ButtonProps, Calendar, CalendarIcon, CalendarMinusIcon, Card, CardBase, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CaretDownIcon, CaretLeftIcon, CaretRightIcon, CaretUpIcon, ChainIcon, type ChainSelectProps, CheckIcon, CheckSquareEmptyIcon, Checkbox, CheckedCircleFillIcon, CheckedSquareFillIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleOutlinedIcon, CloseCircleFillIcon, CloseIcon, CloseRoundFillIcon, CloseSquareFillIcon, Collapse, Collapsible, CollapsibleContent, CollapsibleTrigger, type Column, type ColumnFixed, ConfirmDialog, type ConfirmProps, CopyIcon, DataFilter, type DataFilterItem, DataTable, type DataTableClassNames, type DataTableProps, DatePicker, type DatePickerProps, Dialog, type DialogAction, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Divider, type DividerProps, DotStatus, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuTrigger, EVMAvatar, EarnActiveIcon, EarnIcon, EarnInactiveIcon, EditIcon, Either, EmptyDataState, EmptyStateIcon, EsOrderlyIcon, ExclamationFillIcon, type ExtensionPosition, ExtensionPositionEnum, ExtensionSlot, EyeCloseIcon, EyeIcon, FeeTierIcon, Flex, type FlexProps, GradientText, Grid, HoverCard, HoverCardContent, type HoverCardProps, HoverCardRoot, HoverCardTrigger, Icon, type IconType, InfoCircleIcon, Input, InputAdditional, type InputFormatter, type InputFormatterOptions, type InputProps, type InputWithTooltipProps, LeaderboardActiveIcon, LeaderboardInactiveIcon, LeftNavVaultsIcon, ListView, type Locale, LocaleContext, LocaleProvider, Logo, type LogoProps, MarketsActiveIcon, MarketsInactiveIcon, Marquee, type MarqueeProps, type MenuItem, ModalContext, type ModalHocProps, ModalIdContext, ModalProvider, type MultiFieldSort, type MultiSortField, MultiSortHeader, type MultiSortHeaderProps, NewsFillIcon, type NumeralProps, index as OUITailwind, OrderlyIcon, OrderlyThemeProvider, type OrderlyThemeProviderProps, PaginationItems, type PaginationMeta, PeopleIcon, PerpsIcon, PersonIcon, Picker, PlusIcon, Popover, PopoverAnchor, PopoverContent, PopoverRoot, PopoverTrigger, PopupUnionIcon, PortfolioActiveIcon, PortfolioInactiveIcon, QuestionFillIcon, ReduceIcon, ReferralSolidIcon, RefreshIcon, ScrollArea, ScrollBar, ScrollIndicator, type ScrollIndicatorProps, Select, SelectItem, type SelectOption, type SelectProps, SelectedChoicesFillIcon, ServerFillIcon, SettingFillIcon, SettingIcon, ShareIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SimpleDialog, SimpleDialogFooter, type SimpleDialogFooterProps, type SimpleDialogProps, SimpleDropdownMenu, SimpleSheet, type SizeType, Slider, type SliderMarks, type SortOrder, SortingAscIcon, SortingDescIcon, SortingIcon, Spinner, type SpinnerProps, SpotIcon, SquareOutlinedIcon, StarChildChatActiveIcon, StarChildChatInactiveIcon, Statistic, StatisticLabel, SwapHorizIcon, Switch, TabPanel, type TabPanelProps, type TableCellContext, type TableCellFormatter, type TableCellPlainTextRenderer, type TableCellRenderer, index$1 as TableFeatures, type TableSort, Tabs, TabsBase, TabsContent, TabsList, TabsTrigger, Text, TextField, type TextFieldProps, type TextProps, type TextType, ThrottledButton, ToastTile, Toaster, TokenIcon, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTrigger, TraderMobileIcon, TradingActiveIcon, TradingIcon, TradingInactiveIcon, TradingLeftNavIcon, TradingRewardsIcon, TriggerDialog, type TriggerDialogProps, VaultsIcon, VectorIcon, WalletIcon, WoofiStakeIcon, boxVariants, buttonVariants, capitalizeFirstLetter, convertValueToPercentage, dotStatusVariants, formatAddress, gradientTextVariants, index$2 as inputFormatter, installExtension, modal, parseNumber, registerSimpleDialog, registerSimpleSheet, scrollAreaVariants, setExtensionBuilder, startViewTransition, statisticVariants, textVariants, tv, useLocale, useMediaQuery, useModal, useMultiSort, useObserverElement, useOrderlyTheme, usePagination, useScreen };
|
|
9058
|
+
export { ActionSheet, type ActionSheetItem, AddCircleIcon, AffiliateIcon, AlertDialog, type AlertDialogProps, ArrowDownShortIcon, ArrowDownSquareFillIcon, ArrowDownUpIcon, ArrowLeftRightIcon, ArrowLeftRightSquareFill, ArrowLeftShortIcon, ArrowRightShortIcon, ArrowRightUpSquareFillIcon, ArrowUpShortIcon, ArrowUpSquareFillIcon, AssetIcon, Avatar, Badge, BarChartIcon, type BaseActionSheetItem, type BaseIconProps, BattleActiveIcon, BattleIcon, BattleInactiveIcon, BattleSolidActiveIcon, BattleSolidInactiveIcon, BellIcon, Box, type BoxProps, Button, type ButtonProps, Calendar, CalendarIcon, CalendarMinusIcon, Card, CardBase, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CaretDownIcon, CaretLeftIcon, CaretRightIcon, CaretUpIcon, ChainIcon, type ChainSelectProps, CheckIcon, CheckSquareEmptyIcon, Checkbox, CheckedCircleFillIcon, CheckedSquareFillIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleOutlinedIcon, CloseCircleFillIcon, CloseIcon, CloseRoundFillIcon, CloseSquareFillIcon, Collapse, Collapsible, CollapsibleContent, CollapsibleTrigger, type Column, type ColumnFixed, ConfirmDialog, type ConfirmProps, CopyIcon, DataFilter, type DataFilterItem, DataTable, type DataTableClassNames, type DataTableProps, DatePicker, type DatePickerProps, Dialog, type DialogAction, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Divider, type DividerProps, DotStatus, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuTrigger, EVMAvatar, EarnActiveIcon, EarnIcon, EarnInactiveIcon, EditIcon, Either, EmptyDataState, EmptyStateIcon, EsOrderlyIcon, ExclamationFillIcon, type ExtensionPosition, ExtensionPositionEnum, ExtensionSlot, EyeCloseIcon, EyeIcon, FeeTierIcon, Flex, type FlexProps, GradientText, Grid, HoverCard, HoverCardContent, type HoverCardProps, HoverCardRoot, HoverCardTrigger, Icon, type IconType, InfoCircleIcon, Input, InputAdditional, type InputFormatter, type InputFormatterOptions, type InputProps, type InputWithTooltipProps, LeaderboardActiveIcon, LeaderboardInactiveIcon, LeftNavVaultsIcon, ListView, type Locale, LocaleContext, LocaleProvider, Logo, type LogoProps, MarketsActiveIcon, MarketsInactiveIcon, Marquee, type MarqueeProps, type MenuItem, ModalContext, type ModalHocProps, ModalIdContext, ModalProvider, type MultiFieldSort, type MultiSortField, MultiSortHeader, type MultiSortHeaderProps, NewsFillIcon, type NumeralProps, index as OUITailwind, OrderlyIcon, OrderlyThemeProvider, type OrderlyThemeProviderProps, PaginationItems, type PaginationMeta, PeopleIcon, PerpsIcon, PersonIcon, Picker, PlusIcon, Popover, PopoverAnchor, PopoverContent, PopoverRoot, PopoverTrigger, PopupUnionIcon, PortfolioActiveIcon, PortfolioInactiveIcon, QuestionFillIcon, ReduceIcon, ReferralSolidIcon, RefreshIcon, ScrollArea, ScrollBar, ScrollIndicator, type ScrollIndicatorProps, Select, SelectItem, type SelectOption, type SelectProps, SelectedChoicesFillIcon, ServerFillIcon, SettingFillIcon, SettingIcon, ShareIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SimpleDialog, SimpleDialogFooter, type SimpleDialogFooterProps, type SimpleDialogProps, SimpleDropdownMenu, SimpleSheet, type SizeType, Slider, type SliderMarks, type SortOrder, SortingAscIcon, SortingDescIcon, SortingIcon, Spinner, type SpinnerProps, SpotIcon, SquareOutlinedIcon, StarChildChatActiveIcon, StarChildChatInactiveIcon, Statistic, StatisticLabel, SwapHorizIcon, Switch, TabPanel, type TabPanelProps, type TableCellContext, type TableCellFormatter, type TableCellPlainTextRenderer, type TableCellRenderer, index$1 as TableFeatures, type TableSort, Tabs, TabsBase, TabsContent, TabsList, TabsTrigger, Text, TextField, type TextFieldProps, type TextProps, type TextType, ThrottledButton, ToastTile, Toaster, TokenIcon, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTrigger, TraderMobileIcon, TradingActiveIcon, TradingIcon, TradingInactiveIcon, TradingLeftNavIcon, TradingRewardsIcon, TriggerDialog, type TriggerDialogProps, VaultsIcon, VectorIcon, WalletIcon, WoofiStakeIcon, boxVariants, buttonVariants, capitalizeFirstLetter, convertValueToPercentage, dotStatusVariants, formatAddress, gradientTextVariants, index$2 as inputFormatter, installExtension, modal, parseNumber, registerSimpleDialog, registerSimpleSheet, scrollAreaVariants, setExtensionBuilder, startViewTransition, statisticVariants, textVariants, tv, useLocale, useLongPress, useMediaQuery, useModal, useMultiSort, useObserverElement, useOrderlyTheme, usePagination, useScreen };
|
package/dist/index.js
CHANGED
|
@@ -8846,6 +8846,122 @@ function useObserverElement(element, callback) {
|
|
|
8846
8846
|
};
|
|
8847
8847
|
}, [element]);
|
|
8848
8848
|
}
|
|
8849
|
+
function useLongPress(callback, longPressTime = 600) {
|
|
8850
|
+
const timeoutRef = React67.useRef(null);
|
|
8851
|
+
const targetRef = React67.useRef(null);
|
|
8852
|
+
const startPositionRef = React67.useRef(null);
|
|
8853
|
+
const isLongPressTriggeredRef = React67.useRef(false);
|
|
8854
|
+
const clearLongPress = React67.useCallback(() => {
|
|
8855
|
+
if (timeoutRef.current) {
|
|
8856
|
+
clearTimeout(timeoutRef.current);
|
|
8857
|
+
timeoutRef.current = null;
|
|
8858
|
+
}
|
|
8859
|
+
targetRef.current = null;
|
|
8860
|
+
startPositionRef.current = null;
|
|
8861
|
+
isLongPressTriggeredRef.current = false;
|
|
8862
|
+
}, []);
|
|
8863
|
+
const startLongPress = React67.useCallback(
|
|
8864
|
+
(e) => {
|
|
8865
|
+
clearLongPress();
|
|
8866
|
+
if ("touches" in e) {
|
|
8867
|
+
e.preventDefault();
|
|
8868
|
+
}
|
|
8869
|
+
targetRef.current = e.currentTarget;
|
|
8870
|
+
const clientX = "touches" in e ? e.touches[0]?.clientX : e.clientX;
|
|
8871
|
+
const clientY = "touches" in e ? e.touches[0]?.clientY : e.clientY;
|
|
8872
|
+
startPositionRef.current = { x: clientX, y: clientY };
|
|
8873
|
+
isLongPressTriggeredRef.current = false;
|
|
8874
|
+
timeoutRef.current = setTimeout(() => {
|
|
8875
|
+
if (targetRef.current && startPositionRef.current) {
|
|
8876
|
+
isLongPressTriggeredRef.current = true;
|
|
8877
|
+
callback();
|
|
8878
|
+
}
|
|
8879
|
+
clearLongPress();
|
|
8880
|
+
}, longPressTime);
|
|
8881
|
+
},
|
|
8882
|
+
[callback, longPressTime, clearLongPress]
|
|
8883
|
+
);
|
|
8884
|
+
const handleMouseDown = React67.useCallback(
|
|
8885
|
+
(e) => {
|
|
8886
|
+
if (e.button !== 0)
|
|
8887
|
+
return;
|
|
8888
|
+
startLongPress(e);
|
|
8889
|
+
},
|
|
8890
|
+
[startLongPress]
|
|
8891
|
+
);
|
|
8892
|
+
const handleMouseUp = React67.useCallback(() => {
|
|
8893
|
+
clearLongPress();
|
|
8894
|
+
}, [clearLongPress]);
|
|
8895
|
+
const handleMouseMove = React67.useCallback(
|
|
8896
|
+
(e) => {
|
|
8897
|
+
if (isLongPressTriggeredRef.current)
|
|
8898
|
+
return;
|
|
8899
|
+
if (startPositionRef.current) {
|
|
8900
|
+
const deltaX = Math.abs(e.clientX - startPositionRef.current.x);
|
|
8901
|
+
const deltaY = Math.abs(e.clientY - startPositionRef.current.y);
|
|
8902
|
+
const threshold = 5;
|
|
8903
|
+
if (deltaX > threshold || deltaY > threshold) {
|
|
8904
|
+
clearLongPress();
|
|
8905
|
+
}
|
|
8906
|
+
}
|
|
8907
|
+
},
|
|
8908
|
+
[clearLongPress]
|
|
8909
|
+
);
|
|
8910
|
+
const handleMouseLeave = React67.useCallback(() => {
|
|
8911
|
+
clearLongPress();
|
|
8912
|
+
}, [clearLongPress]);
|
|
8913
|
+
const handleContextMenu = React67.useCallback((e) => {
|
|
8914
|
+
if (timeoutRef.current || isLongPressTriggeredRef.current) {
|
|
8915
|
+
e.preventDefault();
|
|
8916
|
+
e.stopPropagation();
|
|
8917
|
+
}
|
|
8918
|
+
}, []);
|
|
8919
|
+
const handleTouchStart = React67.useCallback(
|
|
8920
|
+
(e) => {
|
|
8921
|
+
startLongPress(e);
|
|
8922
|
+
},
|
|
8923
|
+
[startLongPress]
|
|
8924
|
+
);
|
|
8925
|
+
const handleTouchEnd = React67.useCallback(() => {
|
|
8926
|
+
clearLongPress();
|
|
8927
|
+
}, [clearLongPress]);
|
|
8928
|
+
const handleTouchMove = React67.useCallback(
|
|
8929
|
+
(e) => {
|
|
8930
|
+
if (timeoutRef.current) {
|
|
8931
|
+
e.preventDefault();
|
|
8932
|
+
}
|
|
8933
|
+
if (isLongPressTriggeredRef.current)
|
|
8934
|
+
return;
|
|
8935
|
+
if (startPositionRef.current && e.touches[0]) {
|
|
8936
|
+
const deltaX = Math.abs(
|
|
8937
|
+
e.touches[0].clientX - startPositionRef.current.x
|
|
8938
|
+
);
|
|
8939
|
+
const deltaY = Math.abs(
|
|
8940
|
+
e.touches[0].clientY - startPositionRef.current.y
|
|
8941
|
+
);
|
|
8942
|
+
const threshold = 5;
|
|
8943
|
+
if (deltaX > threshold || deltaY > threshold) {
|
|
8944
|
+
clearLongPress();
|
|
8945
|
+
}
|
|
8946
|
+
}
|
|
8947
|
+
},
|
|
8948
|
+
[clearLongPress]
|
|
8949
|
+
);
|
|
8950
|
+
const handleTouchCancel = React67.useCallback(() => {
|
|
8951
|
+
clearLongPress();
|
|
8952
|
+
}, [clearLongPress]);
|
|
8953
|
+
return {
|
|
8954
|
+
onMouseDown: handleMouseDown,
|
|
8955
|
+
onMouseUp: handleMouseUp,
|
|
8956
|
+
onMouseMove: handleMouseMove,
|
|
8957
|
+
onMouseLeave: handleMouseLeave,
|
|
8958
|
+
onContextMenu: handleContextMenu,
|
|
8959
|
+
onTouchStart: handleTouchStart,
|
|
8960
|
+
onTouchEnd: handleTouchEnd,
|
|
8961
|
+
onTouchMove: handleTouchMove,
|
|
8962
|
+
onTouchCancel: handleTouchCancel
|
|
8963
|
+
};
|
|
8964
|
+
}
|
|
8849
8965
|
var AlertDialog = (props) => {
|
|
8850
8966
|
const [locale] = useLocale("dialog");
|
|
8851
8967
|
const {
|
|
@@ -11577,6 +11693,7 @@ exports.statisticVariants = statisticVariants;
|
|
|
11577
11693
|
exports.textVariants = textVariants;
|
|
11578
11694
|
exports.tv = tv;
|
|
11579
11695
|
exports.useLocale = useLocale;
|
|
11696
|
+
exports.useLongPress = useLongPress;
|
|
11580
11697
|
exports.useMediaQuery = useMediaQuery;
|
|
11581
11698
|
exports.useModal = useModal;
|
|
11582
11699
|
exports.useMultiSort = useMultiSort;
|