@orderly.network/ui 2.8.5 → 2.8.6-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 +6 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +436 -125
- package/dist/index.d.ts +436 -125
- package/dist/index.js +82 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +81 -7
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -4314,7 +4314,7 @@ var NumType = (props) => {
|
|
|
4314
4314
|
const renderChild = () => {
|
|
4315
4315
|
switch (numType) {
|
|
4316
4316
|
case "roi":
|
|
4317
|
-
return formatNum.roi(children);
|
|
4317
|
+
return formatNum.roi(children, props.rule === "percentages" ? 4 : 2)?.toString();
|
|
4318
4318
|
case "pnl":
|
|
4319
4319
|
return formatNum.pnl(children);
|
|
4320
4320
|
case "notional":
|
|
@@ -4496,10 +4496,10 @@ var BaseInput = forwardRef(
|
|
|
4496
4496
|
[innerFormatters]
|
|
4497
4497
|
);
|
|
4498
4498
|
const formattedValue = useMemo(() => {
|
|
4499
|
-
if (typeof value === "undefined")
|
|
4500
|
-
return
|
|
4499
|
+
if (typeof value === "undefined" || value === null)
|
|
4500
|
+
return "";
|
|
4501
4501
|
return formatToRender(value);
|
|
4502
|
-
}, [value]);
|
|
4502
|
+
}, [value, formatToRender]);
|
|
4503
4503
|
useEffect(() => {
|
|
4504
4504
|
if (document.activeElement !== innerInputRef.current)
|
|
4505
4505
|
return;
|
|
@@ -5422,7 +5422,7 @@ var SelectWithOptions = (props) => {
|
|
|
5422
5422
|
}) }) });
|
|
5423
5423
|
};
|
|
5424
5424
|
var TokenSelect = (props) => {
|
|
5425
|
-
const { tokens, showIcon = true, iconSize, ...rest } = props;
|
|
5425
|
+
const { tokens, showIcon = true, iconSize, showCaret, ...rest } = props;
|
|
5426
5426
|
const { icon } = selectVariants();
|
|
5427
5427
|
const options = useMemo(() => {
|
|
5428
5428
|
return tokens.map((token) => {
|
|
@@ -5460,7 +5460,7 @@ var TokenSelect = (props) => {
|
|
|
5460
5460
|
SelectWithOptions,
|
|
5461
5461
|
{
|
|
5462
5462
|
...rest,
|
|
5463
|
-
showCaret: selectable,
|
|
5463
|
+
showCaret: typeof showCaret === "boolean" ? showCaret : selectable,
|
|
5464
5464
|
options,
|
|
5465
5465
|
valueFormatter: showIcon ? valueRenderer : void 0,
|
|
5466
5466
|
optionRenderer,
|
|
@@ -11211,7 +11211,81 @@ __export(tailwind_exports, {
|
|
|
11211
11211
|
default: () => tailwind_default
|
|
11212
11212
|
});
|
|
11213
11213
|
var tailwind_default = {};
|
|
11214
|
+
var dotStatusVariants = tv$1({
|
|
11215
|
+
slots: {
|
|
11216
|
+
root: "oui-flex oui-items-center oui-justify-center oui-gap-1",
|
|
11217
|
+
dot: "oui-flex-shrink-0 oui-rounded-full",
|
|
11218
|
+
label: "oui-text-2xs"
|
|
11219
|
+
},
|
|
11220
|
+
variants: {
|
|
11221
|
+
color: {
|
|
11222
|
+
primary: {
|
|
11223
|
+
dot: "oui-bg-primary-darken",
|
|
11224
|
+
label: "oui-text-primary-darken"
|
|
11225
|
+
},
|
|
11226
|
+
warning: {
|
|
11227
|
+
dot: "oui-bg-warning-darken",
|
|
11228
|
+
label: "oui-text-warning-darken"
|
|
11229
|
+
},
|
|
11230
|
+
profit: {
|
|
11231
|
+
dot: "oui-bg-profit-darken",
|
|
11232
|
+
label: "oui-text-profit-darken"
|
|
11233
|
+
},
|
|
11234
|
+
loss: {
|
|
11235
|
+
dot: "oui-bg-loss-darken",
|
|
11236
|
+
label: "oui-text-loss-darken"
|
|
11237
|
+
},
|
|
11238
|
+
secondary: {
|
|
11239
|
+
dot: "oui-bg-secondary-darken",
|
|
11240
|
+
label: "oui-text-secondary-darken"
|
|
11241
|
+
}
|
|
11242
|
+
},
|
|
11243
|
+
size: {
|
|
11244
|
+
xs: {
|
|
11245
|
+
dot: "oui-w-1 oui-h-1",
|
|
11246
|
+
label: "oui-text-2xs"
|
|
11247
|
+
},
|
|
11248
|
+
sm: {
|
|
11249
|
+
dot: "oui-w-2 oui-h-2",
|
|
11250
|
+
label: "oui-text-2xs"
|
|
11251
|
+
},
|
|
11252
|
+
md: {
|
|
11253
|
+
dot: "oui-w-3 oui-h-3",
|
|
11254
|
+
label: "oui-text-2xs"
|
|
11255
|
+
},
|
|
11256
|
+
lg: {
|
|
11257
|
+
dot: "oui-w-4 oui-h-4",
|
|
11258
|
+
label: "oui-text-2xs"
|
|
11259
|
+
}
|
|
11260
|
+
}
|
|
11261
|
+
},
|
|
11262
|
+
defaultVariants: {
|
|
11263
|
+
color: "primary",
|
|
11264
|
+
size: "xs"
|
|
11265
|
+
}
|
|
11266
|
+
});
|
|
11267
|
+
var DotStatus = (props) => {
|
|
11268
|
+
const { color, size, label, classNames } = props;
|
|
11269
|
+
const { root, dot, label: labelSlot } = dotStatusVariants({ color, size });
|
|
11270
|
+
if (!label) {
|
|
11271
|
+
return /* @__PURE__ */ jsx(Box, { r: "full", className: dot({ className: classNames?.dot }) });
|
|
11272
|
+
}
|
|
11273
|
+
return /* @__PURE__ */ jsxs(
|
|
11274
|
+
Flex,
|
|
11275
|
+
{
|
|
11276
|
+
itemAlign: "center",
|
|
11277
|
+
justify: "center",
|
|
11278
|
+
gapX: 1,
|
|
11279
|
+
className: root({ className: classNames?.root }),
|
|
11280
|
+
children: [
|
|
11281
|
+
/* @__PURE__ */ jsx(Box, { r: "full", className: dot({ className: classNames?.dot }) }),
|
|
11282
|
+
/* @__PURE__ */ jsx(Text2, { size: "2xs", className: labelSlot({ className: classNames?.label }), children: label })
|
|
11283
|
+
]
|
|
11284
|
+
}
|
|
11285
|
+
);
|
|
11286
|
+
};
|
|
11287
|
+
DotStatus.displayName = "DotStatus";
|
|
11214
11288
|
|
|
11215
|
-
export { ActionSheet, AddCircleIcon, AffiliateIcon, AlertDialog, ArrowDownShortIcon, ArrowDownSquareFillIcon, ArrowDownUpIcon, ArrowLeftRightIcon, ArrowLeftRightSquareFill, ArrowLeftShortIcon, ArrowRightShortIcon, ArrowRightUpSquareFillIcon, ArrowUpShortIcon, ArrowUpSquareFillIcon, AssetIcon, Avatar, Badge, BarChartIcon, BattleActiveIcon, BattleIcon, BattleInactiveIcon, BattleSolidActiveIcon, BattleSolidInactiveIcon, BellIcon, Box, Button, Calendar, CalendarIcon, CalendarMinusIcon, Card, CardBase, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CaretDownIcon, CaretLeftIcon, CaretRightIcon, CaretUpIcon, ChainIcon, CheckIcon, CheckSquareEmptyIcon, Checkbox, CheckedCircleFillIcon, CheckedSquareFillIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleOutlinedIcon, CloseCircleFillIcon, CloseIcon, CloseRoundFillIcon, CloseSquareFillIcon, collapse_default as Collapse, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ConfirmDialog, CopyIcon, DataFilter, DataTable, DatePicker2 as DatePicker, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Divider, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuTrigger, EVMAvatar, EarnActiveIcon, EarnIcon, EarnInactiveIcon, EditIcon, Either, EmptyDataState, EmptyStateIcon, EsOrderlyIcon, ExclamationFillIcon, ExtensionPositionEnum, ExtensionSlot, EyeCloseIcon, EyeIcon, FeeTierIcon, Flex, GradientText, Grid2 as Grid, HoverCard, HoverCardContent, HoverCardRoot, HoverCardTrigger, Icon, InfoCircleIcon, Input2 as Input, InputAdditional, LeaderboardActiveIcon, LeaderboardInactiveIcon, LeftNavVaultsIcon, ListView, LocaleContext, LocaleProvider, Logo, MarketsActiveIcon, MarketsInactiveIcon, Marquee, ModalContext, ModalIdContext, ModalProvider, MultiSortHeader, NewsFillIcon, tailwind_exports as OUITailwind, OrderlyIcon, OrderlyThemeProvider, PaginationItems, PeopleIcon, PerpsIcon, PersonIcon, Picker, PlusIcon, Popover, PopoverAnchor, PopoverContent, PopoverRoot, PopoverTrigger, PopupUnionIcon, PortfolioActiveIcon, PortfolioInactiveIcon, QuestionFillIcon, ReduceIcon, ReferralSolidIcon, RefreshIcon, ScrollArea, ScrollBar, ScrollIndicator, Select2 as Select, SelectItem, SelectedChoicesFillIcon, ServerFillIcon, SettingFillIcon, SettingIcon, ShareIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SimpleDialog, SimpleDialogFooter, SimpleDropdownMenu, SimpleSheet, Slider, SortingAscIcon, SortingDescIcon, SortingIcon, Spinner, SpotIcon, SquareOutlinedIcon, StarChildChatActiveIcon, StarChildChatInactiveIcon, Statistic, StatisticLabel, SwapHorizIcon, Switch, TabPanel, features_exports as TableFeatures, Tabs, TabsBase, TabsContent, TabsList, TabsTrigger, Text2 as Text, TextField, ThrottledButton, ToastTile, Toaster, TokenIcon, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTrigger, TraderMobileIcon, TradingActiveIcon, TradingIcon, TradingInactiveIcon, TradingLeftNavIcon, TradingRewardsIcon, TriggerDialog, VaultsIcon, VectorIcon, WalletIcon, WoofiStakeIcon, boxVariants, buttonVariants, capitalizeFirstLetter, convertValueToPercentage, formatAddress, gradientTextVariants, formatter_exports as inputFormatter, installExtension, modal, parseNumber, registerSimpleDialog, registerSimpleSheet, scrollAreaVariants, setExtensionBuilder, startViewTransition, statisticVariants, textVariants, tv, useLocale, useMediaQuery, useModal, useMultiSort, useObserverElement, useOrderlyTheme, usePagination, useScreen };
|
|
11289
|
+
export { ActionSheet, AddCircleIcon, AffiliateIcon, AlertDialog, ArrowDownShortIcon, ArrowDownSquareFillIcon, ArrowDownUpIcon, ArrowLeftRightIcon, ArrowLeftRightSquareFill, ArrowLeftShortIcon, ArrowRightShortIcon, ArrowRightUpSquareFillIcon, ArrowUpShortIcon, ArrowUpSquareFillIcon, AssetIcon, Avatar, Badge, BarChartIcon, BattleActiveIcon, BattleIcon, BattleInactiveIcon, BattleSolidActiveIcon, BattleSolidInactiveIcon, BellIcon, Box, Button, Calendar, CalendarIcon, CalendarMinusIcon, Card, CardBase, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CaretDownIcon, CaretLeftIcon, CaretRightIcon, CaretUpIcon, ChainIcon, CheckIcon, CheckSquareEmptyIcon, Checkbox, CheckedCircleFillIcon, CheckedSquareFillIcon, ChevronDownIcon, ChevronLeftIcon, ChevronRightIcon, ChevronUpIcon, CircleOutlinedIcon, CloseCircleFillIcon, CloseIcon, CloseRoundFillIcon, CloseSquareFillIcon, collapse_default as Collapse, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, ConfirmDialog, CopyIcon, DataFilter, DataTable, DatePicker2 as DatePicker, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Divider, DotStatus, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRoot, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuTrigger, EVMAvatar, EarnActiveIcon, EarnIcon, EarnInactiveIcon, EditIcon, Either, EmptyDataState, EmptyStateIcon, EsOrderlyIcon, ExclamationFillIcon, ExtensionPositionEnum, ExtensionSlot, EyeCloseIcon, EyeIcon, FeeTierIcon, Flex, GradientText, Grid2 as Grid, HoverCard, HoverCardContent, HoverCardRoot, HoverCardTrigger, Icon, InfoCircleIcon, Input2 as Input, InputAdditional, LeaderboardActiveIcon, LeaderboardInactiveIcon, LeftNavVaultsIcon, ListView, LocaleContext, LocaleProvider, Logo, MarketsActiveIcon, MarketsInactiveIcon, Marquee, ModalContext, ModalIdContext, ModalProvider, MultiSortHeader, NewsFillIcon, tailwind_exports as OUITailwind, OrderlyIcon, OrderlyThemeProvider, PaginationItems, PeopleIcon, PerpsIcon, PersonIcon, Picker, PlusIcon, Popover, PopoverAnchor, PopoverContent, PopoverRoot, PopoverTrigger, PopupUnionIcon, PortfolioActiveIcon, PortfolioInactiveIcon, QuestionFillIcon, ReduceIcon, ReferralSolidIcon, RefreshIcon, ScrollArea, ScrollBar, ScrollIndicator, Select2 as Select, SelectItem, SelectedChoicesFillIcon, ServerFillIcon, SettingFillIcon, SettingIcon, ShareIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, SimpleDialog, SimpleDialogFooter, SimpleDropdownMenu, SimpleSheet, Slider, SortingAscIcon, SortingDescIcon, SortingIcon, Spinner, SpotIcon, SquareOutlinedIcon, StarChildChatActiveIcon, StarChildChatInactiveIcon, Statistic, StatisticLabel, SwapHorizIcon, Switch, TabPanel, features_exports as TableFeatures, Tabs, TabsBase, TabsContent, TabsList, TabsTrigger, Text2 as Text, TextField, ThrottledButton, ToastTile, Toaster, TokenIcon, Tooltip, TooltipArrow, TooltipContent, TooltipPortal, TooltipProvider, TooltipRoot, TooltipTrigger, TraderMobileIcon, TradingActiveIcon, TradingIcon, TradingInactiveIcon, TradingLeftNavIcon, TradingRewardsIcon, TriggerDialog, VaultsIcon, VectorIcon, WalletIcon, WoofiStakeIcon, boxVariants, buttonVariants, capitalizeFirstLetter, convertValueToPercentage, dotStatusVariants, formatAddress, gradientTextVariants, formatter_exports as inputFormatter, installExtension, modal, parseNumber, registerSimpleDialog, registerSimpleSheet, scrollAreaVariants, setExtensionBuilder, startViewTransition, statisticVariants, textVariants, tv, useLocale, useMediaQuery, useModal, useMultiSort, useObserverElement, useOrderlyTheme, usePagination, useScreen };
|
|
11216
11290
|
//# sourceMappingURL=out.js.map
|
|
11217
11291
|
//# sourceMappingURL=index.mjs.map
|