@anker-in/headless-ui 1.0.20 → 1.0.22
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/cjs/biz-components/FooterNavigation/index.js +1 -1
- package/dist/cjs/biz-components/FooterNavigation/index.js.map +3 -3
- package/dist/cjs/biz-components/FooterNavigation/types.d.ts +2 -1
- package/dist/cjs/biz-components/FooterNavigation/types.js +1 -1
- package/dist/cjs/biz-components/FooterNavigation/types.js.map +2 -2
- package/dist/cjs/biz-components/HeaderNavigation/NavProvider.d.ts +8 -5
- package/dist/cjs/biz-components/HeaderNavigation/NavProvider.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/NavProvider.js.map +3 -3
- package/dist/cjs/biz-components/HeaderNavigation/icons/Menu.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/icons/Menu.js.map +2 -2
- package/dist/cjs/biz-components/HeaderNavigation/icons/Polygon.d.ts +3 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/Polygon.js +2 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/Polygon.js.map +7 -0
- package/dist/cjs/biz-components/HeaderNavigation/icons/index.d.ts +2 -1
- package/dist/cjs/biz-components/HeaderNavigation/icons/index.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/icons/index.js.map +3 -3
- package/dist/cjs/biz-components/HeaderNavigation/index.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/index.js.map +3 -3
- package/dist/cjs/biz-components/HeaderNavigation/types.d.ts +26 -2
- package/dist/cjs/biz-components/HeaderNavigation/types.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/types.js.map +2 -2
- package/dist/cjs/biz-components/HeaderNavigation/withCategory.d.ts +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/withCategory.js +1 -1
- package/dist/cjs/biz-components/HeaderNavigation/withCategory.js.map +3 -3
- package/dist/cjs/biz-components/NavigationSearch/index.d.ts +4 -0
- package/dist/cjs/biz-components/NavigationSearch/index.js +11 -0
- package/dist/cjs/biz-components/NavigationSearch/index.js.map +7 -0
- package/dist/cjs/biz-components/NavigationSearch/types.d.ts +18 -0
- package/dist/cjs/biz-components/NavigationSearch/types.js +2 -0
- package/dist/cjs/biz-components/NavigationSearch/types.js.map +7 -0
- package/dist/cjs/biz-components/SearchPage/index.d.ts +6 -0
- package/dist/cjs/biz-components/SearchPage/index.js +2 -0
- package/dist/cjs/biz-components/SearchPage/index.js.map +7 -0
- package/dist/cjs/biz-components/SearchPage/types.d.ts +58 -0
- package/dist/cjs/biz-components/SearchPage/types.js +2 -0
- package/dist/cjs/biz-components/SearchPage/types.js.map +7 -0
- package/dist/cjs/biz-components/Subscribe/index.d.ts +7 -1
- package/dist/cjs/biz-components/Subscribe/index.js +10 -1
- package/dist/cjs/biz-components/Subscribe/index.js.map +3 -3
- package/dist/cjs/biz-components/index.d.ts +3 -0
- package/dist/cjs/biz-components/index.js +1 -1
- package/dist/cjs/biz-components/index.js.map +3 -3
- package/dist/cjs/components/container.js +1 -1
- package/dist/cjs/components/container.js.map +2 -2
- package/dist/cjs/components/dialog.d.ts +3 -1
- package/dist/cjs/components/dialog.js +1 -1
- package/dist/cjs/components/dialog.js.map +3 -3
- package/dist/cjs/components/index.d.ts +1 -0
- package/dist/cjs/components/index.js +1 -1
- package/dist/cjs/components/index.js.map +3 -3
- package/dist/cjs/components/loadingDots.d.ts +6 -0
- package/dist/cjs/components/loadingDots.js +42 -0
- package/dist/cjs/components/loadingDots.js.map +7 -0
- package/dist/cjs/components/picture.d.ts +1 -0
- package/dist/cjs/components/picture.js +1 -1
- package/dist/cjs/components/picture.js.map +3 -3
- package/dist/cjs/helpers/utils.d.ts +1 -0
- package/dist/cjs/helpers/utils.js +1 -1
- package/dist/cjs/helpers/utils.js.map +3 -3
- package/dist/cjs/stories/picture.stories.d.ts +4 -0
- package/dist/cjs/stories/picture.stories.js +8 -3
- package/dist/cjs/stories/picture.stories.js.map +3 -3
- package/dist/esm/biz-components/FooterNavigation/index.js +1 -1
- package/dist/esm/biz-components/FooterNavigation/index.js.map +3 -3
- package/dist/esm/biz-components/FooterNavigation/types.d.ts +2 -1
- package/dist/esm/biz-components/FooterNavigation/types.js +1 -1
- package/dist/esm/biz-components/FooterNavigation/types.js.map +2 -2
- package/dist/esm/biz-components/HeaderNavigation/NavProvider.d.ts +8 -5
- package/dist/esm/biz-components/HeaderNavigation/NavProvider.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/NavProvider.js.map +3 -3
- package/dist/esm/biz-components/HeaderNavigation/icons/Menu.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/icons/Menu.js.map +2 -2
- package/dist/esm/biz-components/HeaderNavigation/icons/Polygon.d.ts +3 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/Polygon.js +2 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/Polygon.js.map +7 -0
- package/dist/esm/biz-components/HeaderNavigation/icons/index.d.ts +2 -1
- package/dist/esm/biz-components/HeaderNavigation/icons/index.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/icons/index.js.map +3 -3
- package/dist/esm/biz-components/HeaderNavigation/index.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/index.js.map +3 -3
- package/dist/esm/biz-components/HeaderNavigation/types.d.ts +26 -2
- package/dist/esm/biz-components/HeaderNavigation/types.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/types.js.map +2 -2
- package/dist/esm/biz-components/HeaderNavigation/withCategory.d.ts +1 -1
- package/dist/esm/biz-components/HeaderNavigation/withCategory.js +1 -1
- package/dist/esm/biz-components/HeaderNavigation/withCategory.js.map +3 -3
- package/dist/esm/biz-components/NavigationSearch/index.d.ts +4 -0
- package/dist/esm/biz-components/NavigationSearch/index.js +11 -0
- package/dist/esm/biz-components/NavigationSearch/index.js.map +7 -0
- package/dist/esm/biz-components/NavigationSearch/types.d.ts +18 -0
- package/dist/esm/biz-components/NavigationSearch/types.js +2 -0
- package/dist/esm/biz-components/NavigationSearch/types.js.map +7 -0
- package/dist/esm/biz-components/SearchPage/index.d.ts +6 -0
- package/dist/esm/biz-components/SearchPage/index.js +2 -0
- package/dist/esm/biz-components/SearchPage/index.js.map +7 -0
- package/dist/esm/biz-components/SearchPage/types.d.ts +58 -0
- package/dist/esm/biz-components/SearchPage/types.js +2 -0
- package/dist/esm/biz-components/SearchPage/types.js.map +7 -0
- package/dist/esm/biz-components/Subscribe/index.d.ts +7 -1
- package/dist/esm/biz-components/Subscribe/index.js +10 -1
- package/dist/esm/biz-components/Subscribe/index.js.map +3 -3
- package/dist/esm/biz-components/index.d.ts +3 -0
- package/dist/esm/biz-components/index.js +1 -1
- package/dist/esm/biz-components/index.js.map +3 -3
- package/dist/esm/components/container.js +1 -1
- package/dist/esm/components/container.js.map +2 -2
- package/dist/esm/components/dialog.d.ts +3 -1
- package/dist/esm/components/dialog.js +1 -1
- package/dist/esm/components/dialog.js.map +3 -3
- package/dist/esm/components/index.d.ts +1 -0
- package/dist/esm/components/index.js +1 -1
- package/dist/esm/components/index.js.map +2 -2
- package/dist/esm/components/loadingDots.d.ts +6 -0
- package/dist/esm/components/loadingDots.js +42 -0
- package/dist/esm/components/loadingDots.js.map +7 -0
- package/dist/esm/components/picture.d.ts +1 -0
- package/dist/esm/components/picture.js +1 -1
- package/dist/esm/components/picture.js.map +3 -3
- package/dist/esm/helpers/utils.d.ts +1 -0
- package/dist/esm/helpers/utils.js +1 -1
- package/dist/esm/helpers/utils.js.map +3 -3
- package/dist/esm/stories/picture.stories.d.ts +4 -0
- package/dist/esm/stories/picture.stories.js +8 -3
- package/dist/esm/stories/picture.stories.js.map +3 -3
- package/package.json +1 -1
- package/style.css +2 -2
|
@@ -23,3 +23,4 @@ export { Alert, AlertTitle, AlertDescription } from './alert.js';
|
|
|
23
23
|
export { default as Picture } from './picture.js';
|
|
24
24
|
export { default as Theme } from './theme.js';
|
|
25
25
|
export { default as Board } from './board.js';
|
|
26
|
+
export { default as LoadingDots } from './loadingDots.js';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{default as e}from"./button.js";import{default as a}from"./badge.js";import{Input as n,InputSlot as u}from"./input.js";import{default as
|
|
1
|
+
import{default as e}from"./button.js";import{default as a}from"./badge.js";import{Input as n,InputSlot as u}from"./input.js";import{default as i}from"./checkbox.js";import{default as D}from"./skeleton.js";import{Dialog as m,DialogPortal as f,DialogOverlay as x,DialogClose as C,DialogTrigger as g,DialogContent as w,DialogHeader as P,DialogFooter as T,DialogTitle as M,DialogDescription as b}from"./dialog.js";import{Popover as I,PopoverTrigger as G,PopoverContent as c}from"./popover.js";import{RadioGroup as A,RadioGroupItem as S}from"./radio.js";import{Text as R}from"./text.js";import{Grid as L,GridItem as h}from"./gird.js";import{Heading as B}from"./heading.js";import{Container as O}from"./container.js";import{Color as q}from"./color.js";import{Drawer as E,DrawerPortal as J,DrawerOverlay as K,DrawerTrigger as Q,DrawerClose as U,DrawerContent as V,DrawerHeader as W,DrawerFooter as X,DrawerTitle as Y,DrawerDescription as Z}from"./drawer.js";import{default as $}from"./link.js";import{Avatar as or,AvatarImage as er,AvatarFallback as tr}from"./avatar.js";import{default as pr}from"./input-number.js";import{DropdownMenu as ur,DropdownMenuTrigger as dr,DropdownMenuContent as ir,DropdownMenuItem as lr,DropdownMenuCheckboxItem as Dr,DropdownMenuRadioItem as sr,DropdownMenuLabel as mr,DropdownMenuSeparator as fr,DropdownMenuShortcut as xr,DropdownMenuGroup as Cr,DropdownMenuPortal as gr,DropdownMenuSub as wr,DropdownMenuSubContent as Pr,DropdownMenuSubTrigger as Tr,DropdownMenuRadioGroup as Mr}from"./drop-down.js";import{Card as yr,CardHeader as Ir,CardFooter as Gr,CardTitle as cr,CardDescription as vr,CardContent as Ar}from"./card.js";import{Carousel as kr,CarouselContent as Rr,CarouselItem as Hr,CarouselPrevious as Lr,CarouselNext as hr}from"./carousel.js";import{Tabs as Br,TabsList as Nr,TabsTrigger as Or,TabsContent as jr}from"./tabs.js";import{Alert as zr,AlertTitle as Er,AlertDescription as Jr}from"./alert.js";import{default as Qr}from"./picture.js";import{default as Vr}from"./theme.js";import{default as Xr}from"./board.js";import{default as Zr}from"./loadingDots.js";export{zr as Alert,Jr as AlertDescription,Er as AlertTitle,or as Avatar,tr as AvatarFallback,er as AvatarImage,a as Badge,Xr as Board,e as Button,yr as Card,Ar as CardContent,vr as CardDescription,Gr as CardFooter,Ir as CardHeader,cr as CardTitle,kr as Carousel,Rr as CarouselContent,Hr as CarouselItem,hr as CarouselNext,Lr as CarouselPrevious,i as Checkbox,q as Color,O as Container,m as Dialog,C as DialogClose,w as DialogContent,b as DialogDescription,T as DialogFooter,P as DialogHeader,x as DialogOverlay,f as DialogPortal,M as DialogTitle,g as DialogTrigger,E as Drawer,U as DrawerClose,V as DrawerContent,Z as DrawerDescription,X as DrawerFooter,W as DrawerHeader,K as DrawerOverlay,J as DrawerPortal,Y as DrawerTitle,Q as DrawerTrigger,ur as DropdownMenu,Dr as DropdownMenuCheckboxItem,ir as DropdownMenuContent,Cr as DropdownMenuGroup,lr as DropdownMenuItem,mr as DropdownMenuLabel,gr as DropdownMenuPortal,Mr as DropdownMenuRadioGroup,sr as DropdownMenuRadioItem,fr as DropdownMenuSeparator,xr as DropdownMenuShortcut,wr as DropdownMenuSub,Pr as DropdownMenuSubContent,Tr as DropdownMenuSubTrigger,dr as DropdownMenuTrigger,L as Grid,h as GridItem,B as Heading,n as Input,pr as InputNumber,u as InputSlot,$ as Link,Zr as LoadingDots,Qr as Picture,I as Popover,c as PopoverContent,G as PopoverTrigger,A as RadioGroup,S as RadioGroupItem,D as Skeleton,Br as Tabs,jr as TabsContent,Nr as TabsList,Or as TabsTrigger,R as Text,Vr as Theme};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/index.ts"],
|
|
4
|
-
"sourcesContent": ["export { default as Button } from './button.js'\nexport { default as Badge } from './badge.js'\nexport { Input, InputSlot } from './input.js'\n\nexport { default as Checkbox } from './checkbox.js'\n\nexport { default as Skeleton } from './skeleton.js'\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n} from './dialog.js'\nexport { Popover, PopoverTrigger, PopoverContent } from './popover.js'\nexport { RadioGroup, RadioGroupItem, type RadioGroupProps, type RadioGroupItemProps } from './radio.js'\nexport { Text, type TextProps } from './text.js'\nexport { Grid, GridItem, type GridProps, type GridItemProps } from './gird.js'\nexport { Heading, type HeadingProps } from './heading.js'\nexport { Container, type ContainerProps } from './container.js'\nexport { Color, type ColorProps } from './color.js'\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n} from './drawer.js'\nexport { default as Link, type LinkProps } from './link.js'\nexport { Avatar, AvatarImage, AvatarFallback } from './avatar.js'\nexport { default as InputNumber, type InputNumberProps } from './input-number.js'\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n} from './drop-down.js'\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from './card.js'\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n} from './carousel.js'\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from './tabs.js'\nexport { Alert, AlertTitle, AlertDescription } from './alert.js'\nexport { default as Picture } from './picture.js'\nexport { default as Theme } from './theme.js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AAS,QAAAC,GAAM,YAAAC,GAAU,eAAAC,GAAa,eAAAC,OAAmB,YACzD,OAAS,SAAAC,GAAO,cAAAC,GAAY,oBAAAC,OAAwB,aACpD,OAAoB,WAAXrE,OAA0B,eACnC,OAAoB,WAAXA,OAAwB,aACjC,OAAoB,WAAXA,OAAwB",
|
|
4
|
+
"sourcesContent": ["export { default as Button } from './button.js'\nexport { default as Badge } from './badge.js'\nexport { Input, InputSlot } from './input.js'\n\nexport { default as Checkbox } from './checkbox.js'\n\nexport { default as Skeleton } from './skeleton.js'\nexport {\n Dialog,\n DialogPortal,\n DialogOverlay,\n DialogClose,\n DialogTrigger,\n DialogContent,\n DialogHeader,\n DialogFooter,\n DialogTitle,\n DialogDescription,\n} from './dialog.js'\nexport { Popover, PopoverTrigger, PopoverContent } from './popover.js'\nexport { RadioGroup, RadioGroupItem, type RadioGroupProps, type RadioGroupItemProps } from './radio.js'\nexport { Text, type TextProps } from './text.js'\nexport { Grid, GridItem, type GridProps, type GridItemProps } from './gird.js'\nexport { Heading, type HeadingProps } from './heading.js'\nexport { Container, type ContainerProps } from './container.js'\nexport { Color, type ColorProps } from './color.js'\nexport {\n Drawer,\n DrawerPortal,\n DrawerOverlay,\n DrawerTrigger,\n DrawerClose,\n DrawerContent,\n DrawerHeader,\n DrawerFooter,\n DrawerTitle,\n DrawerDescription,\n} from './drawer.js'\nexport { default as Link, type LinkProps } from './link.js'\nexport { Avatar, AvatarImage, AvatarFallback } from './avatar.js'\nexport { default as InputNumber, type InputNumberProps } from './input-number.js'\nexport {\n DropdownMenu,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuGroup,\n DropdownMenuPortal,\n DropdownMenuSub,\n DropdownMenuSubContent,\n DropdownMenuSubTrigger,\n DropdownMenuRadioGroup,\n} from './drop-down.js'\nexport { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent } from './card.js'\nexport {\n type CarouselApi,\n Carousel,\n CarouselContent,\n CarouselItem,\n CarouselPrevious,\n CarouselNext,\n} from './carousel.js'\nexport { Tabs, TabsList, TabsTrigger, TabsContent } from './tabs.js'\nexport { Alert, AlertTitle, AlertDescription } from './alert.js'\nexport { default as Picture } from './picture.js'\nexport { default as Theme } from './theme.js'\nexport { default as Board } from './board.js'\nexport { default as LoadingDots } from './loadingDots.js'\n"],
|
|
5
|
+
"mappings": "AAAA,OAAoB,WAAXA,MAAyB,cAClC,OAAoB,WAAXA,MAAwB,aACjC,OAAS,SAAAC,EAAO,aAAAC,MAAiB,aAEjC,OAAoB,WAAXF,MAA2B,gBAEpC,OAAoB,WAAXA,MAA2B,gBACpC,OACE,UAAAG,EACA,gBAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,iBAAAC,EACA,gBAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,qBAAAC,MACK,cACP,OAAS,WAAAC,EAAS,kBAAAC,EAAgB,kBAAAC,MAAsB,eACxD,OAAS,cAAAC,EAAY,kBAAAC,MAAsE,aAC3F,OAAS,QAAAC,MAA4B,YACrC,OAAS,QAAAC,EAAM,YAAAC,MAAoD,YACnE,OAAS,WAAAC,MAAkC,eAC3C,OAAS,aAAAC,MAAsC,iBAC/C,OAAS,SAAAC,MAA8B,aACvC,OACE,UAAAC,EACA,gBAAAC,EACA,iBAAAC,EACA,iBAAAC,EACA,eAAAC,EACA,iBAAAC,EACA,gBAAAC,EACA,gBAAAC,EACA,eAAAC,EACA,qBAAAC,MACK,cACP,OAAoB,WAAXjC,MAAuC,YAChD,OAAS,UAAAkC,GAAQ,eAAAC,GAAa,kBAAAC,OAAsB,cACpD,OAAoB,WAAXpC,OAAqD,oBAC9D,OACE,gBAAAqC,GACA,uBAAAC,GACA,uBAAAC,GACA,oBAAAC,GACA,4BAAAC,GACA,yBAAAC,GACA,qBAAAC,GACA,yBAAAC,GACA,wBAAAC,GACA,qBAAAC,GACA,sBAAAC,GACA,mBAAAC,GACA,0BAAAC,GACA,0BAAAC,GACA,0BAAAC,OACK,iBACP,OAAS,QAAAC,GAAM,cAAAC,GAAY,cAAAC,GAAY,aAAAC,GAAW,mBAAAC,GAAiB,eAAAC,OAAmB,YACtF,OAEE,YAAAC,GACA,mBAAAC,GACA,gBAAAC,GACA,oBAAAC,GACA,gBAAAC,OACK,gBACP,OAAS,QAAAC,GAAM,YAAAC,GAAU,eAAAC,GAAa,eAAAC,OAAmB,YACzD,OAAS,SAAAC,GAAO,cAAAC,GAAY,oBAAAC,OAAwB,aACpD,OAAoB,WAAXrE,OAA0B,eACnC,OAAoB,WAAXA,OAAwB,aACjC,OAAoB,WAAXA,OAAwB,aACjC,OAAoB,WAAXA,OAA8B",
|
|
6
6
|
"names": ["default", "Input", "InputSlot", "Dialog", "DialogPortal", "DialogOverlay", "DialogClose", "DialogTrigger", "DialogContent", "DialogHeader", "DialogFooter", "DialogTitle", "DialogDescription", "Popover", "PopoverTrigger", "PopoverContent", "RadioGroup", "RadioGroupItem", "Text", "Grid", "GridItem", "Heading", "Container", "Color", "Drawer", "DrawerPortal", "DrawerOverlay", "DrawerTrigger", "DrawerClose", "DrawerContent", "DrawerHeader", "DrawerFooter", "DrawerTitle", "DrawerDescription", "Avatar", "AvatarImage", "AvatarFallback", "DropdownMenu", "DropdownMenuTrigger", "DropdownMenuContent", "DropdownMenuItem", "DropdownMenuCheckboxItem", "DropdownMenuRadioItem", "DropdownMenuLabel", "DropdownMenuSeparator", "DropdownMenuShortcut", "DropdownMenuGroup", "DropdownMenuPortal", "DropdownMenuSub", "DropdownMenuSubContent", "DropdownMenuSubTrigger", "DropdownMenuRadioGroup", "Card", "CardHeader", "CardFooter", "CardTitle", "CardDescription", "CardContent", "Carousel", "CarouselContent", "CarouselItem", "CarouselPrevious", "CarouselNext", "Tabs", "TabsList", "TabsTrigger", "TabsContent", "Alert", "AlertTitle", "AlertDescription"]
|
|
7
7
|
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import{Fragment as s,jsx as t,jsxs as o}from"react/jsx-runtime";import{cn as i}from"../helpers/utils";const e=a=>{const{className:n}=a;return o(s,{children:[t("style",{children:`span.root {
|
|
2
|
+
min-height: 19px;
|
|
3
|
+
align-items: center;
|
|
4
|
+
text-align: center;
|
|
5
|
+
line-height: 7;
|
|
6
|
+
display: inline-flex !important;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
span.root .dot {
|
|
10
|
+
height: 8px;
|
|
11
|
+
width: 8px;
|
|
12
|
+
border-radius: 100%;
|
|
13
|
+
background-color: currentColor;
|
|
14
|
+
animation-name: blink;
|
|
15
|
+
animation-duration: 1.6s;
|
|
16
|
+
animation-iteration-count: infinite;
|
|
17
|
+
animation-fill-mode: both;
|
|
18
|
+
margin: 0 2px;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.root .dot:nth-of-type(2) {
|
|
22
|
+
animation-delay: 0.2s;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.root .dot::nth-of-type(3) {
|
|
26
|
+
animation-delay: 0.4s;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
@keyframes blink {
|
|
30
|
+
0% {
|
|
31
|
+
opacity: 0.2;
|
|
32
|
+
}
|
|
33
|
+
20% {
|
|
34
|
+
opacity: 1;
|
|
35
|
+
}
|
|
36
|
+
100% {
|
|
37
|
+
opacity: 0.2;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
`}),o("span",{className:i("root",n),children:[t("span",{className:"dot"},"dot_1"),t("span",{className:"dot"},"dot_2"),t("span",{className:"dot"},"dot_3")]})]})};var p=e;export{p as default};
|
|
42
|
+
//# sourceMappingURL=loadingDots.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/components/loadingDots.tsx"],
|
|
4
|
+
"sourcesContent": ["import { cn } from '../helpers/utils'\nimport type { FC } from 'react'\n\ninterface LoadingProps {\n className?: string\n}\n\nconst LoadingDots: FC<LoadingProps> = props => {\n const { className } = props\n return (\n <>\n <style>{`span.root {\n min-height: 19px;\n align-items: center;\n text-align: center;\n line-height: 7;\n display: inline-flex !important;\n}\n\nspan.root .dot {\n height: 8px;\n width: 8px;\n border-radius: 100%;\n background-color: currentColor;\n animation-name: blink;\n animation-duration: 1.6s;\n animation-iteration-count: infinite;\n animation-fill-mode: both;\n margin: 0 2px;\n}\n\n.root .dot:nth-of-type(2) {\n animation-delay: 0.2s;\n}\n\n.root .dot::nth-of-type(3) {\n animation-delay: 0.4s;\n}\n\n@keyframes blink {\n 0% {\n opacity: 0.2;\n }\n 20% {\n opacity: 1;\n }\n 100% {\n opacity: 0.2;\n }\n}\n\n `}</style>\n <span className={cn('root', className)}>\n <span className=\"dot\" key={`dot_1`} />\n <span className=\"dot\" key={`dot_2`} />\n <span className=\"dot\" key={`dot_3`} />\n </span>\n </>\n )\n}\n\nexport default LoadingDots\n"],
|
|
5
|
+
"mappings": "AAUI,mBAAAA,EACE,OAAAC,EAyCA,QAAAC,MA1CF,oBAVJ,OAAS,MAAAC,MAAU,mBAOnB,MAAMC,EAAgCC,GAAS,CAC7C,KAAM,CAAE,UAAAC,CAAU,EAAID,EACtB,OACEH,EAAAF,EAAA,CACE,UAAAC,EAAC,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,MAwCR,EACAC,EAAC,QAAK,UAAWC,EAAG,OAAQG,CAAS,EACnC,UAAAL,EAAC,QAAK,UAAU,OAAW,OAAS,EACpCA,EAAC,QAAK,UAAU,OAAW,OAAS,EACpCA,EAAC,QAAK,UAAU,OAAW,OAAS,GACtC,GACF,CAEJ,EAEA,IAAOM,EAAQH",
|
|
6
|
+
"names": ["Fragment", "jsx", "jsxs", "cn", "LoadingDots", "props", "className", "loadingDots_default"]
|
|
7
|
+
}
|
|
@@ -8,6 +8,7 @@ export interface PictureProps extends React.ImgHTMLAttributes<HTMLImageElement>
|
|
|
8
8
|
quality?: number;
|
|
9
9
|
/** 响应式图片,对应picture 下source 的max-width */
|
|
10
10
|
deviceSizes?: number[];
|
|
11
|
+
alt?: string;
|
|
11
12
|
}
|
|
12
13
|
declare const Picture: React.ForwardRefExoticComponent<PictureProps & React.RefAttributes<HTMLPictureElement>>;
|
|
13
14
|
export default Picture;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use client";import{jsx as
|
|
1
|
+
"use client";import{jsx as S,jsxs as N}from"react/jsx-runtime";import _,{useCallback as w,useMemo as E}from"react";const L=["cdn.shopify.com","cdn.shopifycdn.net","www.facebook.com"],v=3960,z=3980,x={domains:["cdn.shopify.com","cdn.shopifycdn.net","www.facebook.com"],deviceSizes:[375,768,1024,1280,1440,1540,1920]},F=t=>L.some(s=>t==s),U=(t="")=>/\.(png|apng|jpg|jpeg|gif|svg|webp|tif)/.test(t),j=t=>{try{return new URL(t).searchParams.get("alt")||""}catch{return""}},R=t=>{try{const s=new URL(t);return s.searchParams.delete("alt"),s.toString()}catch{return t}},k=_.forwardRef(({imgClassName:t="",source:s="",quality:p=2,deviceSizes:m=[375,767,1023,1024,1279,1440,1439,1539,1919,1920],className:P,loading:b="lazy",alt:g="",...u},y)=>{const A=r=>(x?.domains||[]).some(o=>r.includes(o)),a=w(({src:r,width:c})=>{const o=c,n=R(r);try{const e=new URL(n);if(!F(e.hostname))return n;const i=e.pathname.split("/").pop()||"";if(U(i))return n?.split("/")?.map(l=>{if(A(n)&&/\.(png|apng|jpg|jpeg|gif|svg|webp|tif)(\?.*)?/.test(l)&&/_[0-9]{2,4}x/.test(n)===!1){const f=l.split(".");return f.map((h,M)=>M===f.length-2?`${h}_${o<3960?o:3980}x`:h).join(".")}return l}).join("/")}catch{return n}},[]),d=w(({srcArr:r,width:c})=>{const o=c*p,n=a({src:r[0][0],width:o}),e=r.filter(([,i])=>i&&parseInt(i,10)>=c).map(([i])=>a({src:i,width:o})).pop();return S("source",{srcSet:e||n,media:`(max-width: ${c}px)`},c)},[a,p]),I=E(()=>{if(typeof s!="string"||!s)return[];const r=s.replace(/[\r\n]/g,"").replace(/\s\s+/g," ").split(",").map(e=>e.split(" ").filter(Boolean)),c=g||r.map(e=>e[0]).filter(Boolean).map(j).find(Boolean)||"",o=m.map(e=>d({srcArr:r,width:e})),n=a({src:r[0][0],width:1920*p});return[...o,S("img",{src:n,className:`w-full ${t}`,loading:b,alt:c,...u},"default")]},[m,t,a,p,s,d,g]);return N("picture",{ref:y,className:`block overflow-hidden ${P}`,children:[I,u.children]})});var D=k;export{D as default};
|
|
2
2
|
//# sourceMappingURL=picture.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/components/picture.tsx"],
|
|
4
|
-
"sourcesContent": ["'use client'\nimport React, { useCallback, useMemo } from 'react'\n\nconst APPEND_FILE_SUFFIX_MATCH_DOMAIN = ['cdn.shopify.com', 'cdn.shopifycdn.net', 'www.facebook.com']\n\nconst MAX_SIZE = 3960\nconst FIXED_MAX_SIZE = 3980\n\nexport interface PictureProps extends React.ImgHTMLAttributes<HTMLImageElement> {\n /** picture \u5185\u90E8img \u6807\u7B7E\u7684\u7C7B\u540D */\n imgClassName?: string\n /** \u56FE\u7247url , \u652F\u6301\u4F20\u5165\u4E0D\u540C\u5206\u8FA8\u7387\u4E0B\u7684\u56FE\u7247\uFF0C\u6BD4\u5982\uFF0C\u683C\u5F0F \"url1 1920\uFF0C url2 1080, url3 767\" */\n source?: string\n /** \u56FE\u7247\u8D28\u91CF */\n quality?: number\n /** \u54CD\u5E94\u5F0F\u56FE\u7247\uFF0C\u5BF9\u5E94picture \u4E0Bsource \u7684max-width */\n deviceSizes?: number[]\n}\nconst images = {\n domains: ['cdn.shopify.com', 'cdn.shopifycdn.net', 'www.facebook.com'],\n deviceSizes: [375, 768, 1024, 1280, 1440, 1540, 1920],\n}\n\nconst isMatchDomain = (srcDomain: string) => {\n return APPEND_FILE_SUFFIX_MATCH_DOMAIN.some(domain => srcDomain == domain)\n}\nconst idMatchFileExtensions = (fileName: string = '') => /\\.(png|apng|jpg|jpeg|gif|svg|webp|tif)/.test(fileName)\n\nconst Picture = React.forwardRef<HTMLPictureElement, PictureProps>(\n (\n {\n imgClassName = '',\n source = '',\n quality = 2,\n deviceSizes = [375, 767, 1023, 1024, 1279, 1440, 1439, 1539, 1919, 1920],\n className,\n loading = 'lazy',\n alt = '',\n ...rest\n }: PictureProps,\n ref\n ) => {\n const isShopifycdn = (src: string | string[]) => {\n const domains = images?.domains || []\n return domains.some(domain => src.includes(domain))\n }\n\n const imgSrcSetsize = useCallback(({ src, width }: { src: string; width: number }) => {\n const size = width\n try {\n const parsedUrl = new URL(
|
|
5
|
-
"mappings": "
|
|
6
|
-
"names": ["jsx", "jsxs", "React", "useCallback", "useMemo", "APPEND_FILE_SUFFIX_MATCH_DOMAIN", "MAX_SIZE", "FIXED_MAX_SIZE", "images", "isMatchDomain", "srcDomain", "domain", "idMatchFileExtensions", "fileName", "Picture", "imgClassName", "source", "quality", "deviceSizes", "className", "loading", "alt", "rest", "ref", "isShopifycdn", "src", "imgSrcSetsize", "width", "size", "parsedUrl", "item", "name", "v", "i", "sourceSrcSet", "srcArr", "computedWidth", "
|
|
4
|
+
"sourcesContent": ["'use client'\nimport React, { useCallback, useMemo } from 'react'\n\nconst APPEND_FILE_SUFFIX_MATCH_DOMAIN = ['cdn.shopify.com', 'cdn.shopifycdn.net', 'www.facebook.com']\n\nconst MAX_SIZE = 3960\nconst FIXED_MAX_SIZE = 3980\n\nexport interface PictureProps extends React.ImgHTMLAttributes<HTMLImageElement> {\n /** picture \u5185\u90E8img \u6807\u7B7E\u7684\u7C7B\u540D */\n imgClassName?: string\n /** \u56FE\u7247url , \u652F\u6301\u4F20\u5165\u4E0D\u540C\u5206\u8FA8\u7387\u4E0B\u7684\u56FE\u7247\uFF0C\u6BD4\u5982\uFF0C\u683C\u5F0F \"url1 1920\uFF0C url2 1080, url3 767\" */\n source?: string\n /** \u56FE\u7247\u8D28\u91CF */\n quality?: number\n /** \u54CD\u5E94\u5F0F\u56FE\u7247\uFF0C\u5BF9\u5E94picture \u4E0Bsource \u7684max-width */\n deviceSizes?: number[]\n alt?: string\n}\nconst images = {\n domains: ['cdn.shopify.com', 'cdn.shopifycdn.net', 'www.facebook.com'],\n deviceSizes: [375, 768, 1024, 1280, 1440, 1540, 1920],\n}\n\nconst isMatchDomain = (srcDomain: string) => {\n return APPEND_FILE_SUFFIX_MATCH_DOMAIN.some(domain => srcDomain == domain)\n}\nconst idMatchFileExtensions = (fileName: string = '') => /\\.(png|apng|jpg|jpeg|gif|svg|webp|tif)/.test(fileName)\n\n/**\n * \u4ECE URL \u4E2D\u89E3\u6790 alt \u53C2\u6570\n * @param url \u56FE\u7247 URL\n * @returns \u89E3\u6790\u51FA\u7684 alt \u503C\uFF0C\u5982\u679C\u6CA1\u6709\u5219\u8FD4\u56DE\u7A7A\u5B57\u7B26\u4E32\n */\nconst parseAltFromUrl = (url: string): string => {\n try {\n return new URL(url).searchParams.get('alt') || ''\n } catch {\n return ''\n }\n}\n\n/**\n * \u79FB\u9664 URL \u4E2D\u7684 alt \u53C2\u6570\n * @param url \u56FE\u7247 URL\n * @returns \u79FB\u9664 alt \u53C2\u6570\u540E\u7684 URL\n */\nconst removeAltFromUrl = (url: string): string => {\n try {\n const urlObj = new URL(url)\n urlObj.searchParams.delete('alt')\n return urlObj.toString()\n } catch {\n return url\n }\n}\n\nconst Picture = React.forwardRef<HTMLPictureElement, PictureProps>(\n (\n {\n imgClassName = '',\n source = '',\n quality = 2,\n deviceSizes = [375, 767, 1023, 1024, 1279, 1440, 1439, 1539, 1919, 1920],\n className,\n loading = 'lazy',\n alt = '',\n ...rest\n }: PictureProps,\n ref\n ) => {\n const isShopifycdn = (src: string | string[]) => {\n const domains = images?.domains || []\n return domains.some(domain => src.includes(domain))\n }\n\n const imgSrcSetsize = useCallback(({ src, width }: { src: string; width: number }) => {\n const size = width\n const cleanSrc = removeAltFromUrl(src)\n try {\n const parsedUrl = new URL(cleanSrc)\n if (!isMatchDomain(parsedUrl.hostname)) {\n return cleanSrc\n }\n const fileName = parsedUrl.pathname.split('/').pop() || ''\n if (idMatchFileExtensions(fileName)) {\n return cleanSrc\n ?.split('/')\n ?.map(item => {\n if (\n isShopifycdn(cleanSrc) &&\n /\\.(png|apng|jpg|jpeg|gif|svg|webp|tif)(\\?.*)?/.test(item) &&\n /_[0-9]{2,4}x/.test(cleanSrc) === false\n ) {\n const name = item.split('.')\n return name\n .map((v, i) => {\n if (i === name.length - 2) {\n return `${v}_${size < 3960 ? size : 3980}x`\n }\n return v\n })\n .join('.')\n }\n return item\n })\n .join('/')\n }\n } catch (error) {\n return cleanSrc\n }\n }, [])\n\n const sourceSrcSet = useCallback(\n ({ srcArr, width }: { srcArr: string[][]; width: number }) => {\n const computedWidth = width * quality\n const defaultSrc = imgSrcSetsize({ src: srcArr[0][0], width: computedWidth })\n \n const matchingSrc = srcArr\n .filter(([, breakpoint]) => breakpoint && parseInt(breakpoint, 10) >= width)\n .map(([src]) => imgSrcSetsize({ src, width: computedWidth }))\n .pop()\n \n return <source key={width} srcSet={matchingSrc || defaultSrc} media={`(max-width: ${width}px)`} />\n },\n [imgSrcSetsize, quality]\n )\n\n const sourceList = useMemo(() => {\n if (typeof source !== 'string' || !source) return []\n \n const srcArr = source\n .replace(/[\\r\\n]/g, '')\n .replace(/\\s\\s+/g, ' ')\n .split(',')\n .map(item => item.split(' ').filter(Boolean))\n\n // \u4ECE URL \u4E2D\u89E3\u6790 alt \u53C2\u6570\uFF0C\u4F18\u5148\u4F7F\u7528\u7B2C\u4E00\u4E2A\u6709 alt \u53C2\u6570\u7684 URL\n const parsedAlt = alt || srcArr\n .map(item => item[0])\n .filter(Boolean)\n .map(parseAltFromUrl)\n .find(Boolean) || ''\n\n const sources = deviceSizes.map(width => sourceSrcSet({ srcArr, width }))\n const defaultImg = imgSrcSetsize({ src: srcArr[0][0], width: 1920 * quality })\n\n return [\n ...sources,\n <img key=\"default\" src={defaultImg} className={`w-full ${imgClassName}`} loading={loading} alt={parsedAlt} {...rest} />\n ]\n }, [deviceSizes, imgClassName, imgSrcSetsize, quality, source, sourceSrcSet, alt])\n\n return (\n <picture ref={ref} className={`block overflow-hidden ${className}`}>\n {sourceList}\n {rest.children}\n </picture>\n )\n }\n)\nexport default Picture\n"],
|
|
5
|
+
"mappings": "aA2He,cAAAA,EA+BT,QAAAC,MA/BS,oBA1Hf,OAAOC,GAAS,eAAAC,EAAa,WAAAC,MAAe,QAE5C,MAAMC,EAAkC,CAAC,kBAAmB,qBAAsB,kBAAkB,EAE9FC,EAAW,KACXC,EAAiB,KAajBC,EAAS,CACb,QAAS,CAAC,kBAAmB,qBAAsB,kBAAkB,EACrE,YAAa,CAAC,IAAK,IAAK,KAAM,KAAM,KAAM,KAAM,IAAI,CACtD,EAEMC,EAAiBC,GACdL,EAAgC,KAAKM,GAAUD,GAAaC,CAAM,EAErEC,EAAwB,CAACC,EAAmB,KAAO,yCAAyC,KAAKA,CAAQ,EAOzGC,EAAmBC,GAAwB,CAC/C,GAAI,CACF,OAAO,IAAI,IAAIA,CAAG,EAAE,aAAa,IAAI,KAAK,GAAK,EACjD,MAAQ,CACN,MAAO,EACT,CACF,EAOMC,EAAoBD,GAAwB,CAChD,GAAI,CACF,MAAME,EAAS,IAAI,IAAIF,CAAG,EAC1B,OAAAE,EAAO,aAAa,OAAO,KAAK,EACzBA,EAAO,SAAS,CACzB,MAAQ,CACN,OAAOF,CACT,CACF,EAEMG,EAAUhB,EAAM,WACpB,CACE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"names": ["jsx", "jsxs", "React", "useCallback", "useMemo", "APPEND_FILE_SUFFIX_MATCH_DOMAIN", "MAX_SIZE", "FIXED_MAX_SIZE", "images", "isMatchDomain", "srcDomain", "domain", "idMatchFileExtensions", "fileName", "parseAltFromUrl", "url", "removeAltFromUrl", "urlObj", "Picture", "imgClassName", "source", "quality", "deviceSizes", "className", "loading", "alt", "rest", "ref", "isShopifycdn", "src", "imgSrcSetsize", "width", "size", "cleanSrc", "parsedUrl", "item", "name", "v", "i", "sourceSrcSet", "srcArr", "computedWidth", "defaultSrc", "matchingSrc", "breakpoint", "sourceList", "parsedAlt", "sources", "defaultImg", "picture_default"]
|
|
7
7
|
}
|
|
@@ -3,3 +3,4 @@ export declare function cn(...inputs: ClassValue[]): string;
|
|
|
3
3
|
export declare function noop(): any;
|
|
4
4
|
export declare function atobID(id: string): string | undefined;
|
|
5
5
|
export declare const spaceToHyphen: (str: string) => string;
|
|
6
|
+
export declare const highlightSearchWord: (text: string, searchText: string) => string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{clsx as
|
|
1
|
+
import{clsx as o}from"clsx";import{extendTailwindMerge as i}from"tailwind-merge";const s=i({extend:{theme:{borderRadius:["btn"]},classGroups:{"font-size":["text-heading-1","text-heading-2","text-heading-3","text-heading-4","text-heading-5","text-text-3","text-text-2","text-text-1"],"text-color":["text-info-primary","text-info-secondary","text-info-tertiary","text-info-quaternary","text-info-white"],leading:["leading-tight","leading-normal","leading-loose"]}}});function g(...t){return s(o(t))}function p(){}function c(t){return t&&typeof t=="string"&&t.includes("/")?t.split("/").pop()?.split("?")?.shift():t}const x=t=>t?.replace(/\s+/g,"-"),d=(t,n)=>{try{const e=t?.search(new RegExp(n,"i"));if(n&&e!==-1){const r=t.slice(e,e+n.length);return t.replace(r,`<span class='text-brand-0 font-bold'>${r}</span>`)}else return t}catch(e){return console.log("e",e),t}};export{c as atobID,g as cn,d as highlightSearchWord,p as noop,x as spaceToHyphen};
|
|
2
2
|
//# sourceMappingURL=utils.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/helpers/utils.ts"],
|
|
4
|
-
"sourcesContent": ["import { clsx, type ClassValue } from 'clsx'\nimport { extendTailwindMerge } from 'tailwind-merge'\n\nconst twMerge = extendTailwindMerge({\n extend: {\n theme: {\n borderRadius: ['btn'],\n },\n classGroups: {\n 'font-size': [\n 'text-heading-1',\n 'text-heading-2',\n 'text-heading-3',\n 'text-heading-4',\n 'text-heading-5',\n 'text-text-3',\n 'text-text-2',\n 'text-text-1',\n ],\n 'text-color': [\n 'text-info-primary',\n 'text-info-secondary',\n 'text-info-tertiary',\n 'text-info-quaternary',\n 'text-info-white',\n ],\n leading: ['leading-tight', 'leading-normal', 'leading-loose'],\n },\n },\n})\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\nexport function noop(): any {}\n\nexport function atobID(id: string) {\n if (id && typeof id === 'string' && id.includes('/')) {\n return id.split('/').pop()?.split('?')?.shift()\n } else {\n return id\n }\n}\nexport const spaceToHyphen = (str: string) => str?.replace(/\\s+/g, '-')\n"],
|
|
5
|
-
"mappings": "AAAA,OAAS,QAAAA,MAA6B,OACtC,OAAS,uBAAAC,MAA2B,iBAEpC,MAAMC,EAAUD,EAAoB,CAClC,OAAQ,CACN,MAAO,CACL,aAAc,CAAC,KAAK,CACtB,EACA,YAAa,CACX,YAAa,CACX,iBACA,iBACA,iBACA,iBACA,iBACA,cACA,cACA,aACF,EACA,aAAc,CACZ,oBACA,sBACA,qBACA,uBACA,iBACF,EACA,QAAS,CAAC,gBAAiB,iBAAkB,eAAe,CAC9D,CACF,CACF,CAAC,EAEM,SAASE,KAAMC,EAAsB,CAC1C,OAAOF,EAAQF,EAAKI,CAAM,CAAC,CAC7B,CAEO,SAASC,GAAY,CAAC,CAEtB,SAASC,EAAOC,EAAY,CACjC,OAAIA,GAAM,OAAOA,GAAO,UAAYA,EAAG,SAAS,GAAG,EAC1CA,EAAG,MAAM,GAAG,EAAE,IAAI,GAAG,MAAM,GAAG,GAAG,MAAM,EAEvCA,CAEX,CACO,MAAMC,EAAiBC,GAAgBA,GAAK,QAAQ,OAAQ,GAAG",
|
|
6
|
-
"names": ["clsx", "extendTailwindMerge", "twMerge", "cn", "inputs", "noop", "atobID", "id", "spaceToHyphen", "str"]
|
|
4
|
+
"sourcesContent": ["import { clsx, type ClassValue } from 'clsx'\nimport { extendTailwindMerge } from 'tailwind-merge'\n\nconst twMerge = extendTailwindMerge({\n extend: {\n theme: {\n borderRadius: ['btn'],\n },\n classGroups: {\n 'font-size': [\n 'text-heading-1',\n 'text-heading-2',\n 'text-heading-3',\n 'text-heading-4',\n 'text-heading-5',\n 'text-text-3',\n 'text-text-2',\n 'text-text-1',\n ],\n 'text-color': [\n 'text-info-primary',\n 'text-info-secondary',\n 'text-info-tertiary',\n 'text-info-quaternary',\n 'text-info-white',\n ],\n leading: ['leading-tight', 'leading-normal', 'leading-loose'],\n },\n },\n})\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs))\n}\n\nexport function noop(): any {}\n\nexport function atobID(id: string) {\n if (id && typeof id === 'string' && id.includes('/')) {\n return id.split('/').pop()?.split('?')?.shift()\n } else {\n return id\n }\n}\nexport const spaceToHyphen = (str: string) => str?.replace(/\\s+/g, '-')\n\nexport const highlightSearchWord = (text: string, searchText: string) => {\n try {\n const wordIndex = text?.search(new RegExp(searchText, 'i'))\n if (searchText && wordIndex !== -1) {\n const word = text.slice(wordIndex, wordIndex + searchText.length)\n return text.replace(word, `<span class='text-brand-0 font-bold'>${word}</span>`)\n } else {\n return text\n }\n } catch (e) {\n console.log('e', e)\n return text\n }\n}"],
|
|
5
|
+
"mappings": "AAAA,OAAS,QAAAA,MAA6B,OACtC,OAAS,uBAAAC,MAA2B,iBAEpC,MAAMC,EAAUD,EAAoB,CAClC,OAAQ,CACN,MAAO,CACL,aAAc,CAAC,KAAK,CACtB,EACA,YAAa,CACX,YAAa,CACX,iBACA,iBACA,iBACA,iBACA,iBACA,cACA,cACA,aACF,EACA,aAAc,CACZ,oBACA,sBACA,qBACA,uBACA,iBACF,EACA,QAAS,CAAC,gBAAiB,iBAAkB,eAAe,CAC9D,CACF,CACF,CAAC,EAEM,SAASE,KAAMC,EAAsB,CAC1C,OAAOF,EAAQF,EAAKI,CAAM,CAAC,CAC7B,CAEO,SAASC,GAAY,CAAC,CAEtB,SAASC,EAAOC,EAAY,CACjC,OAAIA,GAAM,OAAOA,GAAO,UAAYA,EAAG,SAAS,GAAG,EAC1CA,EAAG,MAAM,GAAG,EAAE,IAAI,GAAG,MAAM,GAAG,GAAG,MAAM,EAEvCA,CAEX,CACO,MAAMC,EAAiBC,GAAgBA,GAAK,QAAQ,OAAQ,GAAG,EAEzDC,EAAsB,CAACC,EAAcC,IAAuB,CACvE,GAAI,CACF,MAAMC,EAAYF,GAAM,OAAO,IAAI,OAAOC,EAAY,GAAG,CAAC,EAC1D,GAAIA,GAAcC,IAAc,GAAI,CAClC,MAAMC,EAAOH,EAAK,MAAME,EAAWA,EAAYD,EAAW,MAAM,EAChE,OAAOD,EAAK,QAAQG,EAAM,wCAAwCA,CAAI,SAAS,CACjF,KACE,QAAOH,CAEX,OAAS,EAAG,CACV,eAAQ,IAAI,IAAK,CAAC,EACXA,CACT,CACF",
|
|
6
|
+
"names": ["clsx", "extendTailwindMerge", "twMerge", "cn", "inputs", "noop", "atobID", "id", "spaceToHyphen", "str", "highlightSearchWord", "text", "searchText", "wordIndex", "word"]
|
|
7
7
|
}
|
|
@@ -16,3 +16,7 @@ export default meta;
|
|
|
16
16
|
type Story = StoryObj<typeof meta>;
|
|
17
17
|
export declare const Default: Story;
|
|
18
18
|
export declare const NotMatchDomain: Story;
|
|
19
|
+
export declare const WithAltFromUrl: Story;
|
|
20
|
+
export declare const WithAltFromUrlMultipleBreakpoints: Story;
|
|
21
|
+
export declare const AltPriority: Story;
|
|
22
|
+
export declare const MixedAltSources: Story;
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
import{Picture as
|
|
2
|
-
\u5F53\u56FE\u7247\u5339\u914D\u57DF\u540D\uFF08'cdn.shopify.com', 'cdn.shopifycdn.net', 'www.facebook.com'\uFF09\u7684\u65F6\u5019\uFF0C\u4F1A\u81EA\u52A8\u5728\u56FE\u7247url\u540E\u9762\u6DFB\u52A0\u56FE\u7247\u5C3A\u5BF8\u540E\u7F00
|
|
3
|
-
|
|
1
|
+
import{Picture as s}from"../components/index.js";const e="https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Mask_group_3_f2d0041d-7b54-4d6a-a504-1dbe6c2de6ee.png?v=1718245219",a="https://cdn.shopify.com/s/files/1/0521/9411/5753/files/1_c67da28a-50c5-4821-8712-330259ea6039.png?v=1718245627",t="https://http.cat/images/200.jpg",o="https://http.cat/images/102.jpg",r={title:"Components/Picture",component:s,parameters:{layout:"centerd",docs:{description:{component:`\u54CD\u5E94\u5F0F\u56FE\u7247\u7EC4\u4EF6, \u652F\u6301\u4F20\u5165\u4E0D\u540C\u5206\u8FA8\u7387\u4E0B\u7684\u56FE\u7247\uFF0C\u6BD4\u5982\uFF0Csource="url1 1920\uFF0C url2 1080, url3 767".
|
|
2
|
+
\u5F53\u56FE\u7247\u5339\u914D\u57DF\u540D\uFF08'cdn.shopify.com', 'cdn.shopifycdn.net', 'www.facebook.com'\uFF09\u7684\u65F6\u5019\uFF0C\u4F1A\u81EA\u52A8\u5728\u56FE\u7247url\u540E\u9762\u6DFB\u52A0\u56FE\u7247\u5C3A\u5BF8\u540E\u7F00\u3002
|
|
3
|
+
|
|
4
|
+
\u65B0\u7279\u6027\uFF1A\u652F\u6301\u4ECE URL query \u53C2\u6570\u4E2D\u81EA\u52A8\u89E3\u6790 alt \u5C5E\u6027\uFF1A
|
|
5
|
+
- \u5982\u679C\u76F4\u63A5\u4F20\u5165 alt \u5C5E\u6027\uFF0C\u4F18\u5148\u7EA7\u66F4\u9AD8
|
|
6
|
+
- \u5982\u679C\u672A\u4F20\u5165 alt \u5C5E\u6027\uFF0C\u4F1A\u4ECE source \u4E2D\u7684 URL \u89E3\u6790 alt \u53C2\u6570
|
|
7
|
+
- \u591A\u4E2A\u65AD\u70B9 URL \u65F6\uFF0C\u53EA\u4F7F\u7528\u7B2C\u4E00\u4E2A\u6709 alt \u53C2\u6570\u7684 URL \u7684 alt \u503C
|
|
8
|
+
`}}},tags:["autodocs"]};var l=r;const p={args:{source:`${e}, ${a} 768`,imgClassName:"rounded-[24px]"}},i={args:{source:`${t}, ${o} 768`,className:"w-[300px]"},parameters:{docs:{description:{story:"\u56FE\u7247\u4E0D\u5339\u914D\u57DF\u540D"}}}},m={args:{source:`${t}?alt=\u4ECEURL\u53C2\u6570\u89E3\u6790\u7684\u56FE\u7247\u63CF\u8FF0, ${o}?alt=\u79FB\u52A8\u7AEF\u56FE\u7247\u63CF\u8FF0 768`,className:"w-[300px]"},parameters:{docs:{description:{story:"\u4ECE URL query \u53C2\u6570\u4E2D\u89E3\u6790 alt \u5C5E\u6027"}}}},n={args:{source:`${t}?alt=\u7B2C\u4E00\u4E2A\u56FE\u7247\u63CF\u8FF0, ${o}?alt=\u7B2C\u4E8C\u4E2A\u56FE\u7247\u63CF\u8FF0 768, ${t}?alt=\u7B2C\u4E09\u4E2A\u56FE\u7247\u63CF\u8FF0 1024`,className:"w-[300px]"},parameters:{docs:{description:{story:"\u591A\u4E2A\u65AD\u70B9 URL \u65F6\uFF0C\u53EA\u4F7F\u7528\u7B2C\u4E00\u4E2A\u6709 alt \u53C2\u6570\u7684 URL \u7684 alt \u503C"}}}},d={args:{source:`${t}?alt=URL\u4E2D\u7684alt\u53C2\u6570, ${o}?alt=\u79FB\u52A8\u7AEFalt\u53C2\u6570 768`,alt:"\u76F4\u63A5\u4F20\u5165\u7684alt\u5C5E\u6027",className:"w-[300px]"},parameters:{docs:{description:{story:"\u76F4\u63A5\u4F20\u5165\u7684 alt \u5C5E\u6027\u4F18\u5148\u7EA7\u66F4\u9AD8"}}}},y={args:{source:`${t}, ${o}?alt=\u53EA\u6709\u7B2C\u4E8C\u4E2AURL\u6709alt\u53C2\u6570 768`,className:"w-[300px]"},parameters:{docs:{description:{story:"\u6DF7\u5408\u60C5\u51B5\uFF1A\u7B2C\u4E00\u4E2A URL \u6CA1\u6709 alt \u53C2\u6570\uFF0C\u7B2C\u4E8C\u4E2A\u6709"}}}};export{d as AltPriority,p as Default,y as MixedAltSources,i as NotMatchDomain,m as WithAltFromUrl,n as WithAltFromUrlMultipleBreakpoints,l as default};
|
|
4
9
|
//# sourceMappingURL=picture.stories.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../../src/stories/picture.stories.tsx"],
|
|
4
|
-
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport { Picture } from '../components/index.js'\nconst imageUrl =\n 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Mask_group_3_f2d0041d-7b54-4d6a-a504-1dbe6c2de6ee.png?v=1718245219'\n\nconst mobImageUrl =\n 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/1_c67da28a-50c5-4821-8712-330259ea6039.png?v=1718245627'\n\nconst imageUrl2 = 'https://http.cat/images/200.jpg'\nconst mobImageUrl2 = 'https://http.cat/images/102.jpg'\n\nconst meta = {\n title: 'Components/Picture',\n component: Picture,\n parameters: {\n layout: 'centerd',\n docs: {\n description: {\n component: `\u54CD\u5E94\u5F0F\u56FE\u7247\u7EC4\u4EF6, \u652F\u6301\u4F20\u5165\u4E0D\u540C\u5206\u8FA8\u7387\u4E0B\u7684\u56FE\u7247\uFF0C\u6BD4\u5982\uFF0Csource=\"url1 1920\uFF0C url2 1080, url3 767\". \n \u5F53\u56FE\u7247\u5339\u914D\u57DF\u540D\uFF08'cdn.shopify.com', 'cdn.shopifycdn.net', 'www.facebook.com'\uFF09\u7684\u65F6\u5019\uFF0C\u4F1A\u81EA\u52A8\u5728\u56FE\u7247url\u540E\u9762\u6DFB\u52A0\u56FE\u7247\u5C3A\u5BF8\u540E\u7F00\n `,\n },\n },\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof Picture>\n\nexport default meta\n\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n source: `${imageUrl}, ${mobImageUrl} 768`,\n imgClassName: 'rounded-[24px]',\n },\n}\n\nexport const NotMatchDomain: Story = {\n args: {\n source: `${imageUrl2}, ${mobImageUrl2} 768`,\n className: 'w-[300px]',\n },\n parameters: {\n docs: {\n description: {\n story: '\u56FE\u7247\u4E0D\u5339\u914D\u57DF\u540D',\n },\n },\n },\n}\n"],
|
|
5
|
-
"mappings": "AACA,OAAS,WAAAA,MAAe,yBACxB,MAAMC,EACJ,4HAEIC,EACJ,iHAEIC,EAAY,kCACZC,EAAe,kCAEfC,EAAO,CACX,MAAO,qBACP,UAAWL,EACX,WAAY,CACV,OAAQ,UACR,KAAM,CACJ,YAAa,CACX,UAAW;AAAA;AAAA,
|
|
6
|
-
"names": ["Picture", "imageUrl", "mobImageUrl", "imageUrl2", "mobImageUrl2", "meta", "picture_stories_default", "Default", "NotMatchDomain"]
|
|
4
|
+
"sourcesContent": ["import type { Meta, StoryObj } from '@storybook/react'\nimport { Picture } from '../components/index.js'\nconst imageUrl =\n 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/Mask_group_3_f2d0041d-7b54-4d6a-a504-1dbe6c2de6ee.png?v=1718245219'\n\nconst mobImageUrl =\n 'https://cdn.shopify.com/s/files/1/0521/9411/5753/files/1_c67da28a-50c5-4821-8712-330259ea6039.png?v=1718245627'\n\nconst imageUrl2 = 'https://http.cat/images/200.jpg'\nconst mobImageUrl2 = 'https://http.cat/images/102.jpg'\n\nconst meta = {\n title: 'Components/Picture',\n component: Picture,\n parameters: {\n layout: 'centerd',\n docs: {\n description: {\n component: `\u54CD\u5E94\u5F0F\u56FE\u7247\u7EC4\u4EF6, \u652F\u6301\u4F20\u5165\u4E0D\u540C\u5206\u8FA8\u7387\u4E0B\u7684\u56FE\u7247\uFF0C\u6BD4\u5982\uFF0Csource=\"url1 1920\uFF0C url2 1080, url3 767\". \n \u5F53\u56FE\u7247\u5339\u914D\u57DF\u540D\uFF08'cdn.shopify.com', 'cdn.shopifycdn.net', 'www.facebook.com'\uFF09\u7684\u65F6\u5019\uFF0C\u4F1A\u81EA\u52A8\u5728\u56FE\u7247url\u540E\u9762\u6DFB\u52A0\u56FE\u7247\u5C3A\u5BF8\u540E\u7F00\u3002\n\n \u65B0\u7279\u6027\uFF1A\u652F\u6301\u4ECE URL query \u53C2\u6570\u4E2D\u81EA\u52A8\u89E3\u6790 alt \u5C5E\u6027\uFF1A\n - \u5982\u679C\u76F4\u63A5\u4F20\u5165 alt \u5C5E\u6027\uFF0C\u4F18\u5148\u7EA7\u66F4\u9AD8\n - \u5982\u679C\u672A\u4F20\u5165 alt \u5C5E\u6027\uFF0C\u4F1A\u4ECE source \u4E2D\u7684 URL \u89E3\u6790 alt \u53C2\u6570\n - \u591A\u4E2A\u65AD\u70B9 URL \u65F6\uFF0C\u53EA\u4F7F\u7528\u7B2C\u4E00\u4E2A\u6709 alt \u53C2\u6570\u7684 URL \u7684 alt \u503C\n `,\n },\n },\n },\n tags: ['autodocs'],\n} satisfies Meta<typeof Picture>\n\nexport default meta\n\ntype Story = StoryObj<typeof meta>\n\nexport const Default: Story = {\n args: {\n source: `${imageUrl}, ${mobImageUrl} 768`,\n imgClassName: 'rounded-[24px]',\n },\n}\n\nexport const NotMatchDomain: Story = {\n args: {\n source: `${imageUrl2}, ${mobImageUrl2} 768`,\n className: 'w-[300px]',\n },\n parameters: {\n docs: {\n description: {\n story: '\u56FE\u7247\u4E0D\u5339\u914D\u57DF\u540D',\n },\n },\n },\n}\n\nexport const WithAltFromUrl: Story = {\n args: {\n source: `${imageUrl2}?alt=\u4ECEURL\u53C2\u6570\u89E3\u6790\u7684\u56FE\u7247\u63CF\u8FF0, ${mobImageUrl2}?alt=\u79FB\u52A8\u7AEF\u56FE\u7247\u63CF\u8FF0 768`,\n className: 'w-[300px]',\n },\n parameters: {\n docs: {\n description: {\n story: '\u4ECE URL query \u53C2\u6570\u4E2D\u89E3\u6790 alt \u5C5E\u6027',\n },\n },\n },\n}\n\nexport const WithAltFromUrlMultipleBreakpoints: Story = {\n args: {\n source: `${imageUrl2}?alt=\u7B2C\u4E00\u4E2A\u56FE\u7247\u63CF\u8FF0, ${mobImageUrl2}?alt=\u7B2C\u4E8C\u4E2A\u56FE\u7247\u63CF\u8FF0 768, ${imageUrl2}?alt=\u7B2C\u4E09\u4E2A\u56FE\u7247\u63CF\u8FF0 1024`,\n className: 'w-[300px]',\n },\n parameters: {\n docs: {\n description: {\n story: '\u591A\u4E2A\u65AD\u70B9 URL \u65F6\uFF0C\u53EA\u4F7F\u7528\u7B2C\u4E00\u4E2A\u6709 alt \u53C2\u6570\u7684 URL \u7684 alt \u503C',\n },\n },\n },\n}\n\nexport const AltPriority: Story = {\n args: {\n source: `${imageUrl2}?alt=URL\u4E2D\u7684alt\u53C2\u6570, ${mobImageUrl2}?alt=\u79FB\u52A8\u7AEFalt\u53C2\u6570 768`,\n alt: '\u76F4\u63A5\u4F20\u5165\u7684alt\u5C5E\u6027',\n className: 'w-[300px]',\n },\n parameters: {\n docs: {\n description: {\n story: '\u76F4\u63A5\u4F20\u5165\u7684 alt \u5C5E\u6027\u4F18\u5148\u7EA7\u66F4\u9AD8',\n },\n },\n },\n}\n\nexport const MixedAltSources: Story = {\n args: {\n source: `${imageUrl2}, ${mobImageUrl2}?alt=\u53EA\u6709\u7B2C\u4E8C\u4E2AURL\u6709alt\u53C2\u6570 768`,\n className: 'w-[300px]',\n },\n parameters: {\n docs: {\n description: {\n story: '\u6DF7\u5408\u60C5\u51B5\uFF1A\u7B2C\u4E00\u4E2A URL \u6CA1\u6709 alt \u53C2\u6570\uFF0C\u7B2C\u4E8C\u4E2A\u6709',\n },\n },\n },\n}\n"],
|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imageUrl2", "mobImageUrl2", "meta", "picture_stories_default", "Default", "NotMatchDomain", "WithAltFromUrl", "WithAltFromUrlMultipleBreakpoints", "AltPriority", "MixedAltSources"]
|
|
7
7
|
}
|
package/package.json
CHANGED