myshell-react-lib 0.1.35 → 0.1.37
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.cjs +7 -28
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +12 -46
- package/dist/index.d.ts +12 -46
- package/dist/index.js +7 -28
- package/dist/index.js.map +1 -1
- package/dist/styles/components-light.scss +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -423,7 +423,7 @@ type IconButtonProps<V extends VariantType = VariantType> = Omit<IconButtonBaseP
|
|
|
423
423
|
color?: V extends keyof VariantColorMap ? VariantColorMap[V] : never;
|
|
424
424
|
};
|
|
425
425
|
|
|
426
|
-
type HeroIcon
|
|
426
|
+
type HeroIcon = React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<React$1.SVGProps<SVGSVGElement>> & {
|
|
427
427
|
title?: string;
|
|
428
428
|
titleId?: string;
|
|
429
429
|
} & React$1.RefAttributes<SVGSVGElement>>;
|
|
@@ -431,7 +431,7 @@ interface IconButtonComponentProps<V extends VariantType = VariantType> extends
|
|
|
431
431
|
asChild?: boolean;
|
|
432
432
|
loading?: boolean;
|
|
433
433
|
disabled?: boolean;
|
|
434
|
-
icon?: HeroIcon
|
|
434
|
+
icon?: HeroIcon | LucideIcon | IconComponent | React$1.ElementType;
|
|
435
435
|
hoverText?: string;
|
|
436
436
|
hoverSide?: 'top' | 'right' | 'bottom' | 'left';
|
|
437
437
|
iconClassName?: ClassNameValue;
|
|
@@ -914,18 +914,6 @@ declare namespace SearchBar {
|
|
|
914
914
|
var displayName: string;
|
|
915
915
|
}
|
|
916
916
|
|
|
917
|
-
/**
|
|
918
|
-
* 通用类型定义
|
|
919
|
-
*/
|
|
920
|
-
type HeroIcon = React.ForwardRefExoticComponent<React.PropsWithoutRef<React.SVGProps<SVGSVGElement>> & {
|
|
921
|
-
title?: string;
|
|
922
|
-
titleId?: string;
|
|
923
|
-
} & React.RefAttributes<SVGSVGElement>>;
|
|
924
|
-
|
|
925
|
-
type IIcons = {
|
|
926
|
-
icon: HeroIcon | LucideIcon | React.ElementType;
|
|
927
|
-
onClick?: () => void;
|
|
928
|
-
};
|
|
929
917
|
type ITopNavigationBar = {
|
|
930
918
|
/**
|
|
931
919
|
* 是否展示背景
|
|
@@ -946,22 +934,10 @@ type ITopNavigationBar = {
|
|
|
946
934
|
*/
|
|
947
935
|
title?: string;
|
|
948
936
|
/**
|
|
949
|
-
*
|
|
950
|
-
*
|
|
951
|
-
*
|
|
952
|
-
* @default false
|
|
953
|
-
*/
|
|
954
|
-
showSearchBar?: boolean;
|
|
955
|
-
/**
|
|
956
|
-
* 搜索框值
|
|
957
|
-
* string
|
|
958
|
-
*/
|
|
959
|
-
searchValue?: string;
|
|
960
|
-
/**
|
|
961
|
-
* 搜索框占位值
|
|
962
|
-
* string
|
|
937
|
+
* 搜索框自定义内容
|
|
938
|
+
* ReactNode
|
|
963
939
|
*/
|
|
964
|
-
|
|
940
|
+
searchElement?: React.ReactNode;
|
|
965
941
|
/**
|
|
966
942
|
* 是否显示底部border
|
|
967
943
|
* boolean
|
|
@@ -984,11 +960,6 @@ type ITopNavigationBar = {
|
|
|
984
960
|
* string
|
|
985
961
|
*/
|
|
986
962
|
clearText?: string;
|
|
987
|
-
/**
|
|
988
|
-
* icon按钮配置
|
|
989
|
-
* IIcons
|
|
990
|
-
*/
|
|
991
|
-
icons?: IIcons[];
|
|
992
963
|
/**
|
|
993
964
|
* 头像配置
|
|
994
965
|
* {
|
|
@@ -1008,22 +979,17 @@ type ITopNavigationBar = {
|
|
|
1008
979
|
*/
|
|
1009
980
|
pageType?: 1 | 2;
|
|
1010
981
|
/**
|
|
1011
|
-
*
|
|
1012
|
-
*
|
|
1013
|
-
*/
|
|
1014
|
-
onBack?: () => void;
|
|
1015
|
-
/**
|
|
1016
|
-
* 搜索框值变化回调
|
|
1017
|
-
* (value: string) => void
|
|
982
|
+
* 自定义样式
|
|
983
|
+
* string
|
|
1018
984
|
*/
|
|
1019
|
-
|
|
985
|
+
className?: string;
|
|
1020
986
|
/**
|
|
1021
|
-
*
|
|
987
|
+
* 返回按钮点击回调
|
|
1022
988
|
* () => void
|
|
1023
989
|
*/
|
|
1024
|
-
|
|
990
|
+
onBack?: () => void;
|
|
1025
991
|
};
|
|
1026
|
-
declare function TopNavigationBar({
|
|
992
|
+
declare function TopNavigationBar({ searchElement, title, border, backUrl, children, hasBackground, avatar, onBack, pageType, className, }: ITopNavigationBar): react_jsx_runtime.JSX.Element;
|
|
1027
993
|
|
|
1028
994
|
interface ISelectProps extends SelectPrimitive.SelectProps {
|
|
1029
995
|
options?: Array<{
|
|
@@ -1634,4 +1600,4 @@ declare const RectangleGroupIcon: React$1.ForwardRefExoticComponent<React$1.HTML
|
|
|
1634
1600
|
component?: React$1.ElementType;
|
|
1635
1601
|
} & React$1.RefAttributes<SVGSVGElement>>;
|
|
1636
1602
|
|
|
1637
|
-
export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, ArrowLeftIcon, ArrowUpTrayIcon, AspectRatio, AudioPlayer, AudioPlaying, Avatar, AvatarImage, AvatarRoot, Badge, Button, type ButtonComponentProps, type ButtonProps, CaretDownIcon, type CascaderOption, CheckCircleIcon, Checkbox, Chips, CodeIcon, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfigIcon, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type CustomToasterProps, Description, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Display, DownIcon, DragIcon, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Guide, Heading, type HeroIcon
|
|
1603
|
+
export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, ArrowLeftIcon, ArrowUpTrayIcon, AspectRatio, AudioPlayer, AudioPlaying, Avatar, AvatarImage, AvatarRoot, Badge, Button, type ButtonComponentProps, type ButtonProps, CaretDownIcon, type CascaderOption, CheckCircleIcon, Checkbox, Chips, CodeIcon, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfigIcon, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type CustomToasterProps, Description, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Display, DownIcon, DragIcon, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Guide, Heading, type HeroIcon, type IAudioProps, type INumberInputProps, type ISelectProps, Icon, IconButton, type IconButtonComponentProps, type IconComponent, type IconProps, Image, type ImageProps, Input, type InputProps, Label, Link, type LinkProps, Masonry, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MiddleBar, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, ModalOverlay, ModalRoot, ModalTitle, NumberInput, Paragraph, PencilSquareIcon, PhoneIcon, Popover, PopoverAnchor, PopoverContent, type PopoverContentExs, PopoverRoot, Progress, ProgressIndicator, type ProgressProps, ProgressRoot, type Props, RadioGroup, RadioGroupItem, RectangleGroupIcon, ScrollArea, ScrollBar, SearchBar, type SearchBarProps, type SearchInputProps, Select, SelectContent, SelectGroup, SelectIcon, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, SliderSingle, Spinner, SubHeading, SubTitle, Swiper, type SwiperProps, Switch, type TModalState, Tab, Tabs, TabsContent, TabsList, TabsRoot, TabsTrigger, Text, Textarea, type TextareaProps, Title, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, type ToastType, ToastViewport, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipProvider, TopNavigationBar, WindowIcon, buttonVariants, dangerouText, iconButtonVariants, reducer, toast, toggleVariants, useDevice, useFormField, useIsMobileByWindowWidth, useNativeBridge, useNotification, useToast, useWindowWidth };
|
package/dist/index.d.ts
CHANGED
|
@@ -423,7 +423,7 @@ type IconButtonProps<V extends VariantType = VariantType> = Omit<IconButtonBaseP
|
|
|
423
423
|
color?: V extends keyof VariantColorMap ? VariantColorMap[V] : never;
|
|
424
424
|
};
|
|
425
425
|
|
|
426
|
-
type HeroIcon
|
|
426
|
+
type HeroIcon = React$1.ForwardRefExoticComponent<React$1.PropsWithoutRef<React$1.SVGProps<SVGSVGElement>> & {
|
|
427
427
|
title?: string;
|
|
428
428
|
titleId?: string;
|
|
429
429
|
} & React$1.RefAttributes<SVGSVGElement>>;
|
|
@@ -431,7 +431,7 @@ interface IconButtonComponentProps<V extends VariantType = VariantType> extends
|
|
|
431
431
|
asChild?: boolean;
|
|
432
432
|
loading?: boolean;
|
|
433
433
|
disabled?: boolean;
|
|
434
|
-
icon?: HeroIcon
|
|
434
|
+
icon?: HeroIcon | LucideIcon | IconComponent | React$1.ElementType;
|
|
435
435
|
hoverText?: string;
|
|
436
436
|
hoverSide?: 'top' | 'right' | 'bottom' | 'left';
|
|
437
437
|
iconClassName?: ClassNameValue;
|
|
@@ -914,18 +914,6 @@ declare namespace SearchBar {
|
|
|
914
914
|
var displayName: string;
|
|
915
915
|
}
|
|
916
916
|
|
|
917
|
-
/**
|
|
918
|
-
* 通用类型定义
|
|
919
|
-
*/
|
|
920
|
-
type HeroIcon = React.ForwardRefExoticComponent<React.PropsWithoutRef<React.SVGProps<SVGSVGElement>> & {
|
|
921
|
-
title?: string;
|
|
922
|
-
titleId?: string;
|
|
923
|
-
} & React.RefAttributes<SVGSVGElement>>;
|
|
924
|
-
|
|
925
|
-
type IIcons = {
|
|
926
|
-
icon: HeroIcon | LucideIcon | React.ElementType;
|
|
927
|
-
onClick?: () => void;
|
|
928
|
-
};
|
|
929
917
|
type ITopNavigationBar = {
|
|
930
918
|
/**
|
|
931
919
|
* 是否展示背景
|
|
@@ -946,22 +934,10 @@ type ITopNavigationBar = {
|
|
|
946
934
|
*/
|
|
947
935
|
title?: string;
|
|
948
936
|
/**
|
|
949
|
-
*
|
|
950
|
-
*
|
|
951
|
-
*
|
|
952
|
-
* @default false
|
|
953
|
-
*/
|
|
954
|
-
showSearchBar?: boolean;
|
|
955
|
-
/**
|
|
956
|
-
* 搜索框值
|
|
957
|
-
* string
|
|
958
|
-
*/
|
|
959
|
-
searchValue?: string;
|
|
960
|
-
/**
|
|
961
|
-
* 搜索框占位值
|
|
962
|
-
* string
|
|
937
|
+
* 搜索框自定义内容
|
|
938
|
+
* ReactNode
|
|
963
939
|
*/
|
|
964
|
-
|
|
940
|
+
searchElement?: React.ReactNode;
|
|
965
941
|
/**
|
|
966
942
|
* 是否显示底部border
|
|
967
943
|
* boolean
|
|
@@ -984,11 +960,6 @@ type ITopNavigationBar = {
|
|
|
984
960
|
* string
|
|
985
961
|
*/
|
|
986
962
|
clearText?: string;
|
|
987
|
-
/**
|
|
988
|
-
* icon按钮配置
|
|
989
|
-
* IIcons
|
|
990
|
-
*/
|
|
991
|
-
icons?: IIcons[];
|
|
992
963
|
/**
|
|
993
964
|
* 头像配置
|
|
994
965
|
* {
|
|
@@ -1008,22 +979,17 @@ type ITopNavigationBar = {
|
|
|
1008
979
|
*/
|
|
1009
980
|
pageType?: 1 | 2;
|
|
1010
981
|
/**
|
|
1011
|
-
*
|
|
1012
|
-
*
|
|
1013
|
-
*/
|
|
1014
|
-
onBack?: () => void;
|
|
1015
|
-
/**
|
|
1016
|
-
* 搜索框值变化回调
|
|
1017
|
-
* (value: string) => void
|
|
982
|
+
* 自定义样式
|
|
983
|
+
* string
|
|
1018
984
|
*/
|
|
1019
|
-
|
|
985
|
+
className?: string;
|
|
1020
986
|
/**
|
|
1021
|
-
*
|
|
987
|
+
* 返回按钮点击回调
|
|
1022
988
|
* () => void
|
|
1023
989
|
*/
|
|
1024
|
-
|
|
990
|
+
onBack?: () => void;
|
|
1025
991
|
};
|
|
1026
|
-
declare function TopNavigationBar({
|
|
992
|
+
declare function TopNavigationBar({ searchElement, title, border, backUrl, children, hasBackground, avatar, onBack, pageType, className, }: ITopNavigationBar): react_jsx_runtime.JSX.Element;
|
|
1027
993
|
|
|
1028
994
|
interface ISelectProps extends SelectPrimitive.SelectProps {
|
|
1029
995
|
options?: Array<{
|
|
@@ -1634,4 +1600,4 @@ declare const RectangleGroupIcon: React$1.ForwardRefExoticComponent<React$1.HTML
|
|
|
1634
1600
|
component?: React$1.ElementType;
|
|
1635
1601
|
} & React$1.RefAttributes<SVGSVGElement>>;
|
|
1636
1602
|
|
|
1637
|
-
export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, ArrowLeftIcon, ArrowUpTrayIcon, AspectRatio, AudioPlayer, AudioPlaying, Avatar, AvatarImage, AvatarRoot, Badge, Button, type ButtonComponentProps, type ButtonProps, CaretDownIcon, type CascaderOption, CheckCircleIcon, Checkbox, Chips, CodeIcon, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfigIcon, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type CustomToasterProps, Description, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Display, DownIcon, DragIcon, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Guide, Heading, type HeroIcon
|
|
1603
|
+
export { Accordion, AccordionContent, AccordionItem, type AccordionItemProps, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, ArrowLeftIcon, ArrowUpTrayIcon, AspectRatio, AudioPlayer, AudioPlaying, Avatar, AvatarImage, AvatarRoot, Badge, Button, type ButtonComponentProps, type ButtonProps, CaretDownIcon, type CascaderOption, CheckCircleIcon, Checkbox, Chips, CodeIcon, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, ConfigIcon, ContextMenu, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuLabel, ContextMenuPortal, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuShortcut, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, type CustomToasterProps, Description, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Display, DownIcon, DragIcon, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, Guide, Heading, type HeroIcon, type IAudioProps, type INumberInputProps, type ISelectProps, Icon, IconButton, type IconButtonComponentProps, type IconComponent, type IconProps, Image, type ImageProps, Input, type InputProps, Label, Link, type LinkProps, Masonry, Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger, Message, MiddleBar, Modal, ModalBody, ModalContent, ModalFooter, ModalHeader, ModalOverlay, ModalRoot, ModalTitle, NumberInput, Paragraph, PencilSquareIcon, PhoneIcon, Popover, PopoverAnchor, PopoverContent, type PopoverContentExs, PopoverRoot, Progress, ProgressIndicator, type ProgressProps, ProgressRoot, type Props, RadioGroup, RadioGroupItem, RectangleGroupIcon, ScrollArea, ScrollBar, SearchBar, type SearchBarProps, type SearchInputProps, Select, SelectContent, SelectGroup, SelectIcon, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger, Skeleton, Slider, SliderSingle, Spinner, SubHeading, SubTitle, Swiper, type SwiperProps, Switch, type TModalState, Tab, Tabs, TabsContent, TabsList, TabsRoot, TabsTrigger, Text, Textarea, type TextareaProps, Title, Toast$1 as Toast, ToastAction, type ToastActionElement, ToastClose, ToastDescription, type ToastProps, ToastProvider, ToastTitle, type ToastType, ToastViewport, Toaster, type ToasterProps, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipProvider, TopNavigationBar, WindowIcon, buttonVariants, dangerouText, iconButtonVariants, reducer, toast, toggleVariants, useDevice, useFormField, useIsMobileByWindowWidth, useNativeBridge, useNotification, useToast, useWindowWidth };
|
package/dist/index.js
CHANGED
|
@@ -10737,7 +10737,7 @@ import { useEffect as useEffect10, useRef as useRef6, useState as useState8 } fr
|
|
|
10737
10737
|
import { useMedia as useMedia5 } from "react-use";
|
|
10738
10738
|
import { jsx as jsx43, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
10739
10739
|
function TopNavigationBar(param) {
|
|
10740
|
-
var
|
|
10740
|
+
var searchElement = param.searchElement, title = param.title, border = param.border, backUrl = param.backUrl, children = param.children, _param_hasBackground = param.hasBackground, hasBackground = _param_hasBackground === void 0 ? false : _param_hasBackground, avatar = param.avatar, onBack = param.onBack, _param_pageType = param.pageType, pageType = _param_pageType === void 0 ? 2 : _param_pageType, className = param.className;
|
|
10741
10741
|
var isMobile2 = useMedia5("(max-width: 768px)");
|
|
10742
10742
|
var navbarRef = useRef6(null);
|
|
10743
10743
|
var _useState8 = _sliced_to_array(useState8(hasBackground), 2), showBackground = _useState8[0], setShowBackground = _useState8[1];
|
|
@@ -10761,7 +10761,7 @@ function TopNavigationBar(param) {
|
|
|
10761
10761
|
]);
|
|
10762
10762
|
return /* @__PURE__ */ jsxs24("div", {
|
|
10763
10763
|
ref: navbarRef,
|
|
10764
|
-
className: cn("w-full flex flex-col md:flex-row justify-center items-center px-4 md:px-6", !isMobile2 && border && "border-b border-Colors-Border-Default", showBackground
|
|
10764
|
+
className: cn("w-full flex flex-col md:flex-row justify-center items-center px-4 md:px-6", !isMobile2 && border && "border-b border-Colors-Border-Default", showBackground ? "bg-Colors-Background-Normal-Primary-Default" : "bg-cc-Button-Plain-bg-default md:bg-Colors-Background-Normal-Primary-Default", className),
|
|
10765
10765
|
children: [
|
|
10766
10766
|
/* @__PURE__ */ jsxs24("div", {
|
|
10767
10767
|
className: "relative w-full flex justify-between items-center h-13 md:h-15 pt-5 pb-1.5 md:pt-2 md:pb-2",
|
|
@@ -10794,7 +10794,7 @@ function TopNavigationBar(param) {
|
|
|
10794
10794
|
})
|
|
10795
10795
|
]
|
|
10796
10796
|
}),
|
|
10797
|
-
title &&
|
|
10797
|
+
title && !(avatar === null || avatar === void 0 ? void 0 : avatar.logo) && /* @__PURE__ */ jsx43(Display, {
|
|
10798
10798
|
size: isMobile2 ? "xs" : "sm",
|
|
10799
10799
|
className: "line-clamp-1",
|
|
10800
10800
|
children: title
|
|
@@ -10816,44 +10816,23 @@ function TopNavigationBar(param) {
|
|
|
10816
10816
|
children: avatar.name
|
|
10817
10817
|
})
|
|
10818
10818
|
]
|
|
10819
|
-
}) :
|
|
10820
|
-
className: "w-[76px]"
|
|
10821
|
-
})
|
|
10819
|
+
}) : null
|
|
10822
10820
|
}),
|
|
10823
10821
|
/* @__PURE__ */ jsx43("div", {
|
|
10824
10822
|
className: "flex-1 flex justify-end items-center",
|
|
10825
10823
|
children: /* @__PURE__ */ jsxs24("div", {
|
|
10826
10824
|
className: "flex items-center space-x-3",
|
|
10827
10825
|
children: [
|
|
10828
|
-
|
|
10829
|
-
className: "relative w-full md:w-60",
|
|
10830
|
-
children: /* @__PURE__ */ jsx43(SearchBar, {
|
|
10831
|
-
color: "gray",
|
|
10832
|
-
size: "xs",
|
|
10833
|
-
searchValue: searchValue,
|
|
10834
|
-
placeholder: searchPlaceholder || "Search",
|
|
10835
|
-
onSearchChange: function(value1) {
|
|
10836
|
-
onSearchChange && onSearchChange(value1);
|
|
10837
|
-
}
|
|
10838
|
-
})
|
|
10839
|
-
}),
|
|
10826
|
+
searchElement && (!isMobile2 && pageType === 1 || pageType === 2) && searchElement,
|
|
10840
10827
|
children
|
|
10841
10828
|
]
|
|
10842
10829
|
})
|
|
10843
10830
|
})
|
|
10844
10831
|
]
|
|
10845
10832
|
}),
|
|
10846
|
-
|
|
10833
|
+
searchElement && pageType === 1 && isMobile2 && /* @__PURE__ */ jsx43("div", {
|
|
10847
10834
|
className: "relative w-full h-13 py-2",
|
|
10848
|
-
children:
|
|
10849
|
-
color: "gray",
|
|
10850
|
-
size: "xs",
|
|
10851
|
-
searchValue: searchValue,
|
|
10852
|
-
placeholder: searchPlaceholder || "Search",
|
|
10853
|
-
onSearchChange: function(value1) {
|
|
10854
|
-
onSearchChange && onSearchChange(value1);
|
|
10855
|
-
}
|
|
10856
|
-
})
|
|
10835
|
+
children: searchElement
|
|
10857
10836
|
})
|
|
10858
10837
|
]
|
|
10859
10838
|
});
|