@anker-in/headless-ui 1.0.26-alpha.1762872688412 → 1.0.26-alpha.1762914443262

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.
Files changed (146) hide show
  1. package/dist/cjs/biz-components/AiuiProvider/index.d.ts +1 -1
  2. package/dist/cjs/biz-components/AiuiProvider/index.js.map +1 -1
  3. package/dist/cjs/biz-components/CollectionShelves/CollectionShelvesItem.d.ts +4 -0
  4. package/dist/cjs/biz-components/CollectionShelves/CollectionShelvesItem.js +2 -0
  5. package/dist/cjs/biz-components/CollectionShelves/CollectionShelvesItem.js.map +7 -0
  6. package/dist/cjs/biz-components/CollectionShelves/index.d.ts +7 -0
  7. package/dist/cjs/biz-components/CollectionShelves/index.js +2 -0
  8. package/dist/cjs/biz-components/CollectionShelves/index.js.map +7 -0
  9. package/dist/cjs/biz-components/CollectionsBanner/index.d.ts +7 -0
  10. package/dist/cjs/biz-components/CollectionsBanner/index.js +2 -0
  11. package/dist/cjs/biz-components/CollectionsBanner/index.js.map +7 -0
  12. package/dist/cjs/biz-components/CollectionsBanner/types.d.ts +43 -0
  13. package/dist/cjs/biz-components/CollectionsBanner/types.js +2 -0
  14. package/dist/cjs/biz-components/CollectionsBanner/types.js.map +7 -0
  15. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.d.ts +19 -0
  16. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.js +2 -0
  17. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrap.js.map +7 -0
  18. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrapItem.d.ts +10 -0
  19. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrapItem.js +2 -0
  20. package/dist/cjs/biz-components/CollectionsFilters/FilterCardWrapItem.js.map +7 -0
  21. package/dist/cjs/biz-components/CollectionsFilters/FilterHeader.d.ts +13 -0
  22. package/dist/cjs/biz-components/CollectionsFilters/FilterHeader.js +2 -0
  23. package/dist/cjs/biz-components/CollectionsFilters/FilterHeader.js.map +7 -0
  24. package/dist/cjs/biz-components/CollectionsFilters/FilterList.d.ts +14 -0
  25. package/dist/cjs/biz-components/CollectionsFilters/FilterList.js +2 -0
  26. package/dist/cjs/biz-components/CollectionsFilters/FilterList.js.map +7 -0
  27. package/dist/cjs/biz-components/CollectionsFilters/component/AnimatedUL.d.ts +5 -0
  28. package/dist/cjs/biz-components/CollectionsFilters/component/AnimatedUL.js +2 -0
  29. package/dist/cjs/biz-components/CollectionsFilters/component/AnimatedUL.js.map +7 -0
  30. package/dist/cjs/biz-components/CollectionsFilters/component/TabFilter.d.ts +12 -0
  31. package/dist/cjs/biz-components/CollectionsFilters/component/TabFilter.js +2 -0
  32. package/dist/cjs/biz-components/CollectionsFilters/component/TabFilter.js.map +7 -0
  33. package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.d.ts +12 -0
  34. package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.js +2 -0
  35. package/dist/cjs/biz-components/CollectionsFilters/component/filtersFun.js.map +7 -0
  36. package/dist/cjs/biz-components/CollectionsFilters/component/helper.d.ts +81 -0
  37. package/dist/cjs/biz-components/CollectionsFilters/component/helper.js +2 -0
  38. package/dist/cjs/biz-components/CollectionsFilters/component/helper.js.map +7 -0
  39. package/dist/cjs/biz-components/CollectionsFilters/component/price.d.ts +25 -0
  40. package/dist/cjs/biz-components/CollectionsFilters/component/price.js +2 -0
  41. package/dist/cjs/biz-components/CollectionsFilters/component/price.js.map +7 -0
  42. package/dist/cjs/biz-components/CollectionsFilters/component/priceProps.d.ts +215 -0
  43. package/dist/cjs/biz-components/CollectionsFilters/component/priceProps.js +2 -0
  44. package/dist/cjs/biz-components/CollectionsFilters/component/priceProps.js.map +7 -0
  45. package/dist/cjs/biz-components/CollectionsFilters/index.d.ts +24 -0
  46. package/dist/cjs/biz-components/CollectionsFilters/index.js +2 -0
  47. package/dist/cjs/biz-components/CollectionsFilters/index.js.map +7 -0
  48. package/dist/cjs/biz-components/Paginator/index.d.ts +7 -0
  49. package/dist/cjs/biz-components/Paginator/index.js +7 -0
  50. package/dist/cjs/biz-components/Paginator/index.js.map +7 -0
  51. package/dist/cjs/biz-components/TextMarquee/index.d.ts +10 -0
  52. package/dist/cjs/biz-components/TextMarquee/index.js +2 -0
  53. package/dist/cjs/biz-components/TextMarquee/index.js.map +7 -0
  54. package/dist/cjs/biz-components/Title/index.js +1 -1
  55. package/dist/cjs/biz-components/Title/index.js.map +3 -3
  56. package/dist/cjs/biz-components/Title/types.d.ts +1 -0
  57. package/dist/cjs/biz-components/Title/types.js +1 -1
  58. package/dist/cjs/biz-components/Title/types.js.map +1 -1
  59. package/dist/cjs/biz-components/index.d.ts +9 -0
  60. package/dist/cjs/biz-components/index.js +1 -1
  61. package/dist/cjs/biz-components/index.js.map +3 -3
  62. package/dist/cjs/components/breadcrumb.d.ts +12 -0
  63. package/dist/cjs/components/breadcrumb.js +2 -0
  64. package/dist/cjs/components/breadcrumb.js.map +7 -0
  65. package/dist/cjs/components/index.d.ts +1 -0
  66. package/dist/cjs/components/index.js +1 -1
  67. package/dist/cjs/components/index.js.map +3 -3
  68. package/dist/cjs/helpers/utils.d.ts +1 -0
  69. package/dist/cjs/helpers/utils.js +1 -1
  70. package/dist/cjs/helpers/utils.js.map +3 -3
  71. package/dist/cjs/hooks/useRollout.d.ts +2 -14
  72. package/dist/cjs/hooks/useRollout.js +1 -1
  73. package/dist/cjs/hooks/useRollout.js.map +3 -3
  74. package/dist/esm/biz-components/AiuiProvider/index.d.ts +1 -1
  75. package/dist/esm/biz-components/AiuiProvider/index.js.map +1 -1
  76. package/dist/esm/biz-components/CollectionShelves/CollectionShelvesItem.d.ts +4 -0
  77. package/dist/esm/biz-components/CollectionShelves/CollectionShelvesItem.js +2 -0
  78. package/dist/esm/biz-components/CollectionShelves/CollectionShelvesItem.js.map +7 -0
  79. package/dist/esm/biz-components/CollectionShelves/index.d.ts +7 -0
  80. package/dist/esm/biz-components/CollectionShelves/index.js +2 -0
  81. package/dist/esm/biz-components/CollectionShelves/index.js.map +7 -0
  82. package/dist/esm/biz-components/CollectionsBanner/index.d.ts +7 -0
  83. package/dist/esm/biz-components/CollectionsBanner/index.js +2 -0
  84. package/dist/esm/biz-components/CollectionsBanner/index.js.map +7 -0
  85. package/dist/esm/biz-components/CollectionsBanner/types.d.ts +43 -0
  86. package/dist/esm/biz-components/CollectionsBanner/types.js +1 -0
  87. package/dist/esm/biz-components/CollectionsBanner/types.js.map +7 -0
  88. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.d.ts +19 -0
  89. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.js +2 -0
  90. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrap.js.map +7 -0
  91. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrapItem.d.ts +10 -0
  92. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrapItem.js +2 -0
  93. package/dist/esm/biz-components/CollectionsFilters/FilterCardWrapItem.js.map +7 -0
  94. package/dist/esm/biz-components/CollectionsFilters/FilterHeader.d.ts +13 -0
  95. package/dist/esm/biz-components/CollectionsFilters/FilterHeader.js +2 -0
  96. package/dist/esm/biz-components/CollectionsFilters/FilterHeader.js.map +7 -0
  97. package/dist/esm/biz-components/CollectionsFilters/FilterList.d.ts +14 -0
  98. package/dist/esm/biz-components/CollectionsFilters/FilterList.js +2 -0
  99. package/dist/esm/biz-components/CollectionsFilters/FilterList.js.map +7 -0
  100. package/dist/esm/biz-components/CollectionsFilters/component/AnimatedUL.d.ts +5 -0
  101. package/dist/esm/biz-components/CollectionsFilters/component/AnimatedUL.js +2 -0
  102. package/dist/esm/biz-components/CollectionsFilters/component/AnimatedUL.js.map +7 -0
  103. package/dist/esm/biz-components/CollectionsFilters/component/TabFilter.d.ts +12 -0
  104. package/dist/esm/biz-components/CollectionsFilters/component/TabFilter.js +2 -0
  105. package/dist/esm/biz-components/CollectionsFilters/component/TabFilter.js.map +7 -0
  106. package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.d.ts +12 -0
  107. package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.js +2 -0
  108. package/dist/esm/biz-components/CollectionsFilters/component/filtersFun.js.map +7 -0
  109. package/dist/esm/biz-components/CollectionsFilters/component/helper.d.ts +81 -0
  110. package/dist/esm/biz-components/CollectionsFilters/component/helper.js +2 -0
  111. package/dist/esm/biz-components/CollectionsFilters/component/helper.js.map +7 -0
  112. package/dist/esm/biz-components/CollectionsFilters/component/price.d.ts +25 -0
  113. package/dist/esm/biz-components/CollectionsFilters/component/price.js +2 -0
  114. package/dist/esm/biz-components/CollectionsFilters/component/price.js.map +7 -0
  115. package/dist/esm/biz-components/CollectionsFilters/component/priceProps.d.ts +215 -0
  116. package/dist/esm/biz-components/CollectionsFilters/component/priceProps.js +2 -0
  117. package/dist/esm/biz-components/CollectionsFilters/component/priceProps.js.map +7 -0
  118. package/dist/esm/biz-components/CollectionsFilters/index.d.ts +24 -0
  119. package/dist/esm/biz-components/CollectionsFilters/index.js +2 -0
  120. package/dist/esm/biz-components/CollectionsFilters/index.js.map +7 -0
  121. package/dist/esm/biz-components/Paginator/index.d.ts +7 -0
  122. package/dist/esm/biz-components/Paginator/index.js +7 -0
  123. package/dist/esm/biz-components/Paginator/index.js.map +7 -0
  124. package/dist/esm/biz-components/TextMarquee/index.d.ts +10 -0
  125. package/dist/esm/biz-components/TextMarquee/index.js +2 -0
  126. package/dist/esm/biz-components/TextMarquee/index.js.map +7 -0
  127. package/dist/esm/biz-components/Title/index.js +1 -1
  128. package/dist/esm/biz-components/Title/index.js.map +3 -3
  129. package/dist/esm/biz-components/Title/types.d.ts +1 -0
  130. package/dist/esm/biz-components/index.d.ts +9 -0
  131. package/dist/esm/biz-components/index.js +1 -1
  132. package/dist/esm/biz-components/index.js.map +2 -2
  133. package/dist/esm/components/breadcrumb.d.ts +12 -0
  134. package/dist/esm/components/breadcrumb.js +2 -0
  135. package/dist/esm/components/breadcrumb.js.map +7 -0
  136. package/dist/esm/components/index.d.ts +1 -0
  137. package/dist/esm/components/index.js +1 -1
  138. package/dist/esm/components/index.js.map +2 -2
  139. package/dist/esm/helpers/utils.d.ts +1 -0
  140. package/dist/esm/helpers/utils.js +1 -1
  141. package/dist/esm/helpers/utils.js.map +3 -3
  142. package/dist/esm/hooks/useRollout.d.ts +2 -14
  143. package/dist/esm/hooks/useRollout.js +1 -1
  144. package/dist/esm/hooks/useRollout.js.map +3 -3
  145. package/package.json +1 -1
  146. package/style.css +23 -0
@@ -0,0 +1,12 @@
1
+ import React from 'react';
2
+ export type BreadcrumbItem = {
3
+ label: string;
4
+ href?: string;
5
+ };
6
+ type Props = {
7
+ items: BreadcrumbItem[];
8
+ maxItems?: number;
9
+ className?: string;
10
+ };
11
+ export declare const Breadcrumb: React.FC<Props>;
12
+ export default Breadcrumb;
@@ -0,0 +1,2 @@
1
+ import{jsx as a,jsxs as i}from"react/jsx-runtime";import"react";import b from"./link";const t=({items:l,maxItems:n=5,className:c=""})=>{if(!l||l.length===0)return null;const o=l.length>n;let s=l;if(o){const e=l[0],r=l.slice(-2);s=[e,{ellipsis:!0},...r]}return a("nav",{className:c,"aria-label":"Breadcrumb",children:a("ol",{className:"flex items-center",children:s.map((e,r)=>{if("ellipsis"in e&&e.ellipsis)return a("li",{className:"select-none text-gray-400",children:a("span",{"aria-hidden":!0,children:"\u2026"})},`ellipsis-${r}`);const p=l?.[l?.length-1]?.label===e?.label&&l?.[l?.length-1]?.href===e?.href,m=`${e.label}-${r}`;return i("li",{className:"flex items-center font-bold desktop:text-lg tablet:text-base text-sm",children:[r!==0&&a("span",{className:"mx-1 text-[#6D6D6F]",children:"/"}),p?a("span",{className:"truncate","aria-current":"page",title:e.label,children:e.label}):a(b,{href:e.href,asChild:!e.href,title:e.label,className:"text-[#6D6D6F] truncate no-underline",children:e.label})]},m)})})})};t.displayName="Breadcrumb";var h=t;export{t as Breadcrumb,h as default};
2
+ //# sourceMappingURL=breadcrumb.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/components/breadcrumb.tsx"],
4
+ "sourcesContent": ["// Breadcrumb.tsx\nimport React from 'react'\nimport Link from './link'\n\nexport type BreadcrumbItem = {\n label: string\n href?: string // \u5982\u679C\u6CA1\u6709 href \u5219\u6E32\u67D3\u4E3A\u4E0D\u53EF\u70B9\u51FB\u7684\u6587\u672C\uFF08\u901A\u5E38\u7528\u4E8E\u6700\u540E\u4E00\u9879\uFF09\n}\n\ntype Props = {\n items: BreadcrumbItem[]\n maxItems?: number // \u8D85\u8FC7\u591A\u5C11\u4E2A\u65F6\u542F\u7528\u622A\u65AD\u903B\u8F91\uFF08\u9ED8\u8BA4 5\uFF09\n className?: string\n}\n\nexport const Breadcrumb: React.FC<Props> = ({ items, maxItems = 5, className = '' }) => {\n if (!items || items.length === 0) return null\n\n // \u5982\u679C\u6570\u91CF\u8D85\u51FA maxItems\uFF0C\u5219\u663E\u793A first, '...', last 2\n const shouldTruncate = items.length > maxItems\n let visibleItems: (BreadcrumbItem | { ellipsis: true })[] = items\n\n if (shouldTruncate) {\n const first = items[0]\n const lastTwo = items.slice(-2)\n visibleItems = [first, { ellipsis: true }, ...lastTwo]\n }\n\n return (\n <nav className={className} aria-label=\"Breadcrumb\">\n <ol className=\"flex items-center\">\n {visibleItems.map((it: any, idx) => {\n // \u5904\u7406\u7701\u7565\u9879\n if ('ellipsis' in it && it.ellipsis) {\n return (\n <li key={`ellipsis-${idx}`} className=\"select-none text-gray-400\">\n <span aria-hidden>\u2026</span>\n </li>\n )\n }\n const isLast =\n items?.[items?.length - 1]?.label === it?.label && items?.[items?.length - 1]?.href === it?.href\n const key = `${it.label}-${idx}`\n\n return (\n <li key={key} className=\"flex items-center font-bold desktop:text-lg tablet:text-base text-sm\">\n {/* \u5206\u9694\u7B26\uFF08\u7B2C\u4E00\u4E2A\u9879\u524D\u9762\u4E0D\u6E32\u67D3\uFF09 */}\n {idx !== 0 && <span className=\"mx-1 text-[#6D6D6F]\">/</span>}\n\n {isLast ? (\n <span className=\"truncate\" aria-current=\"page\" title={it.label}>\n {it.label}\n </span>\n ) : (\n <Link\n href={it.href}\n asChild={!it.href}\n title={it.label}\n className=\"text-[#6D6D6F] truncate no-underline\"\n >\n {it.label}\n </Link>\n )}\n </li>\n )\n })}\n </ol>\n </nav>\n )\n}\n\nBreadcrumb.displayName = 'Breadcrumb'\n\nexport default Breadcrumb\n"],
5
+ "mappings": "AAoCgB,cAAAA,EASJ,QAAAC,MATI,oBAnChB,MAAkB,QAClB,OAAOC,MAAU,SAaV,MAAMC,EAA8B,CAAC,CAAE,MAAAC,EAAO,SAAAC,EAAW,EAAG,UAAAC,EAAY,EAAG,IAAM,CACtF,GAAI,CAACF,GAASA,EAAM,SAAW,EAAG,OAAO,KAGzC,MAAMG,EAAiBH,EAAM,OAASC,EACtC,IAAIG,EAAwDJ,EAE5D,GAAIG,EAAgB,CAClB,MAAME,EAAQL,EAAM,CAAC,EACfM,EAAUN,EAAM,MAAM,EAAE,EAC9BI,EAAe,CAACC,EAAO,CAAE,SAAU,EAAK,EAAG,GAAGC,CAAO,CACvD,CAEA,OACEV,EAAC,OAAI,UAAWM,EAAW,aAAW,aACpC,SAAAN,EAAC,MAAG,UAAU,oBACX,SAAAQ,EAAa,IAAI,CAACG,EAASC,IAAQ,CAElC,GAAI,aAAcD,GAAMA,EAAG,SACzB,OACEX,EAAC,MAA2B,UAAU,4BACpC,SAAAA,EAAC,QAAK,cAAW,GAAC,kBAAC,GADZ,YAAYY,CAAG,EAExB,EAGJ,MAAMC,EACJT,IAAQA,GAAO,OAAS,CAAC,GAAG,QAAUO,GAAI,OAASP,IAAQA,GAAO,OAAS,CAAC,GAAG,OAASO,GAAI,KACxFG,EAAM,GAAGH,EAAG,KAAK,IAAIC,CAAG,GAE9B,OACEX,EAAC,MAAa,UAAU,uEAErB,UAAAW,IAAQ,GAAKZ,EAAC,QAAK,UAAU,sBAAsB,aAAC,EAEpDa,EACCb,EAAC,QAAK,UAAU,WAAW,eAAa,OAAO,MAAOW,EAAG,MACtD,SAAAA,EAAG,MACN,EAEAX,EAACE,EAAA,CACC,KAAMS,EAAG,KACT,QAAS,CAACA,EAAG,KACb,MAAOA,EAAG,MACV,UAAU,uCAET,SAAAA,EAAG,MACN,IAhBKG,CAkBT,CAEJ,CAAC,EACH,EACF,CAEJ,EAEAX,EAAW,YAAc,aAEzB,IAAOY,EAAQZ",
6
+ "names": ["jsx", "jsxs", "Link", "Breadcrumb", "items", "maxItems", "className", "shouldTruncate", "visibleItems", "first", "lastTwo", "it", "idx", "isLast", "key", "breadcrumb_default"]
7
+ }
@@ -24,3 +24,4 @@ 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
26
  export { default as LoadingDots } from './loadingDots.js';
27
+ export { default as Breadcrumb } from './breadcrumb.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 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};
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 m}from"./skeleton.js";import{Dialog as D,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 c,PopoverContent as G}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 F}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 mr,DropdownMenuRadioItem as sr,DropdownMenuLabel as Dr,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 cr,CardTitle as Gr,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 Fr,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";import{default as $r}from"./breadcrumb.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,$r as Breadcrumb,e as Button,yr as Card,Ar as CardContent,vr as CardDescription,cr as CardFooter,Ir as CardHeader,Gr 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,D 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,mr as DropdownMenuCheckboxItem,ir as DropdownMenuContent,Cr as DropdownMenuGroup,lr as DropdownMenuItem,Dr 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,F as Heading,n as Input,pr as InputNumber,u as InputSlot,$ as Link,Zr as LoadingDots,Qr as Picture,I as Popover,G as PopoverContent,c as PopoverTrigger,A as RadioGroup,S as RadioGroupItem,m as Skeleton,Fr 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'\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",
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'\nexport { default as Breadcrumb } from './breadcrumb.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,mBACvC,OAAoB,WAAXA,OAA6B",
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
  }
@@ -4,3 +4,4 @@ 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
6
  export declare const highlightSearchWord: (text: string, searchText: string) => string;
7
+ export declare const yotpoInstanceId: (locale?: string) => string;
@@ -1,2 +1,2 @@
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};
1
+ import{clsx as r}from"clsx";import{extendTailwindMerge as s}from"tailwind-merge";const i=s({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 c(...t){return i(r(t))}function p(){}function g(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 o=t.slice(e,e+n.length);return t.replace(o,`<span class='text-brand-0 font-bold'>${o}</span>`)}else return t}catch(e){return console.log("e",e),t}},u=(t="us")=>({us:"1126311",uk:"638361",ca:"638351"})[t]||"";export{g as atobID,c as cn,d as highlightSearchWord,p as noop,x as spaceToHyphen,u as yotpoInstanceId};
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\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"]
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}\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}\nexport const yotpoInstanceId = (locale = 'us') =>\n ({\n us: '1126311',\n uk: '638361',\n ca: '638351',\n }[locale] || '')\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,CAEO,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,EACaI,EAAkB,CAACC,EAAS,QACtC,CACC,GAAI,UACJ,GAAI,SACJ,GAAI,QACN,GAAEA,CAAM,GAAK",
6
+ "names": ["clsx", "extendTailwindMerge", "twMerge", "cn", "inputs", "noop", "atobID", "id", "spaceToHyphen", "str", "highlightSearchWord", "text", "searchText", "wordIndex", "word", "yotpoInstanceId", "locale"]
7
7
  }
@@ -1,14 +1,2 @@
1
- import { type MutableRefObject } from 'react';
2
- type UseRolloutOptions = IntersectionObserverInit & {
3
- /**
4
- * When true, once the target enters the viewport the first time,
5
- * the observer disconnects and `inView` stays true.
6
- */
7
- once?: boolean;
8
- };
9
- /**
10
- * Observe when an element enters the viewport.
11
- * Returns a ref to attach to the element and a boolean indicating visibility.
12
- */
13
- export declare function useRollout<T extends HTMLElement = HTMLElement>(options?: UseRolloutOptions): [MutableRefObject<T | null>, boolean];
14
- export {};
1
+ /// <reference types="react" />
2
+ export declare function useRollout<T extends Element>(options: any): (boolean | import("react").RefObject<T>)[];
@@ -1,2 +1,2 @@
1
- import{useEffect as d,useRef as b,useState as I}from"react";function y(e={}){const t=b(null),[c,n]=I(!1);return d(()=>{if(typeof window>"u"||typeof IntersectionObserver>"u"){n(!0);return}const{root:i=null,rootMargin:u="0px",threshold:f=0,once:o=!1}=e,s=t.current;if(!s)return;let l=!1;const r=new IntersectionObserver(a=>{a[0]?.isIntersecting??!1?(n(!0),o&&!l&&(l=!0,r.disconnect())):o||n(!1)},{root:i,rootMargin:u,threshold:f});return r.observe(s),()=>{r.disconnect()}},[t.current,e.root,e.rootMargin,e.threshold,e.once]),[t,c]}export{y as useRollout};
1
+ import{useState as i,useEffect as u,useRef as f}from"react";function d(t){const r=f(null),[e,o]=i(!1);return u(()=>{if(e)return;const s=r.current;if(!s||typeof IntersectionObserver>"u")return;const n=new IntersectionObserver(([c])=>{c.isIntersecting&&(o(!0),n.disconnect())},t);return n.observe(s),()=>n.disconnect()},[e,t]),[r,e]}export{d as useRollout};
2
2
  //# sourceMappingURL=useRollout.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/hooks/useRollout.ts"],
4
- "sourcesContent": ["import { useEffect, useRef, useState, type MutableRefObject } from 'react'\n\ntype UseRolloutOptions = IntersectionObserverInit & {\n /**\n * When true, once the target enters the viewport the first time,\n * the observer disconnects and `inView` stays true.\n */\n once?: boolean\n}\n\n/**\n * Observe when an element enters the viewport.\n * Returns a ref to attach to the element and a boolean indicating visibility.\n */\nexport function useRollout<T extends HTMLElement = HTMLElement>(\n options: UseRolloutOptions = {}\n): [MutableRefObject<T | null>, boolean] {\n const targetRef = useRef<T | null>(null)\n const [inView, setInView] = useState<boolean>(false)\n\n useEffect(() => {\n // Guard for SSR or unsupported environments\n if (typeof window === 'undefined' || typeof IntersectionObserver === 'undefined') {\n setInView(true)\n return\n }\n\n const { root = null, rootMargin = '0px', threshold = 0, once = false } = options\n\n const node = targetRef.current\n if (!node) return\n\n let didDisconnect = false\n\n const observer = new IntersectionObserver(\n entries => {\n const entry = entries[0]\n const isIntersecting = entry?.isIntersecting ?? false\n if (isIntersecting) {\n setInView(true)\n if (once && !didDisconnect) {\n didDisconnect = true\n observer.disconnect()\n }\n } else if (!once) {\n setInView(false)\n }\n },\n { root, rootMargin, threshold }\n )\n\n observer.observe(node)\n\n return () => {\n observer.disconnect()\n }\n // It's important that we only recreate when options or node change\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [targetRef.current, options.root, options.rootMargin, options.threshold, options.once])\n\n return [targetRef, inView]\n}\n\n\n"],
5
- "mappings": "AAAA,OAAS,aAAAA,EAAW,UAAAC,EAAQ,YAAAC,MAAuC,QAc5D,SAASC,EACdC,EAA6B,CAAC,EACS,CACvC,MAAMC,EAAYJ,EAAiB,IAAI,EACjC,CAACK,EAAQC,CAAS,EAAIL,EAAkB,EAAK,EAEnD,OAAAF,EAAU,IAAM,CAEd,GAAI,OAAO,OAAW,KAAe,OAAO,qBAAyB,IAAa,CAChFO,EAAU,EAAI,EACd,MACF,CAEA,KAAM,CAAE,KAAAC,EAAO,KAAM,WAAAC,EAAa,MAAO,UAAAC,EAAY,EAAG,KAAAC,EAAO,EAAM,EAAIP,EAEnEQ,EAAOP,EAAU,QACvB,GAAI,CAACO,EAAM,OAEX,IAAIC,EAAgB,GAEpB,MAAMC,EAAW,IAAI,qBACnBC,GAAW,CACKA,EAAQ,CAAC,GACO,gBAAkB,IAE9CR,EAAU,EAAI,EACVI,GAAQ,CAACE,IACXA,EAAgB,GAChBC,EAAS,WAAW,IAEZH,GACVJ,EAAU,EAAK,CAEnB,EACA,CAAE,KAAAC,EAAM,WAAAC,EAAY,UAAAC,CAAU,CAChC,EAEA,OAAAI,EAAS,QAAQF,CAAI,EAEd,IAAM,CACXE,EAAS,WAAW,CACtB,CAGF,EAAG,CAACT,EAAU,QAASD,EAAQ,KAAMA,EAAQ,WAAYA,EAAQ,UAAWA,EAAQ,IAAI,CAAC,EAElF,CAACC,EAAWC,CAAM,CAC3B",
6
- "names": ["useEffect", "useRef", "useState", "useRollout", "options", "targetRef", "inView", "setInView", "root", "rootMargin", "threshold", "once", "node", "didDisconnect", "observer", "entries"]
4
+ "sourcesContent": ["import { useState, useEffect, useRef } from 'react'\n\nexport function useRollout<T extends Element>(options: any) {\n const ref = useRef<T>(null)\n const [inView, setInView] = useState(false)\n useEffect(() => {\n if (inView) return // \u5DF2\u8FDB\u5165\u8FC7\uFF0C\u5219\u4E0D\u518D\u89C2\u5BDF\n const el = ref.current\n if (!el || typeof IntersectionObserver === 'undefined') return\n\n const observer = new IntersectionObserver(([entry]) => {\n if (entry.isIntersecting) {\n setInView(true)\n observer.disconnect() // \u505C\u6B62\u89C2\u5BDF\n }\n }, options)\n\n observer.observe(el)\n return () => observer.disconnect()\n }, [inView, options])\n\n return [ref, inView]\n}\n"],
5
+ "mappings": "AAAA,OAAS,YAAAA,EAAU,aAAAC,EAAW,UAAAC,MAAc,QAErC,SAASC,EAA8BC,EAAc,CAC1D,MAAMC,EAAMH,EAAU,IAAI,EACpB,CAACI,EAAQC,CAAS,EAAIP,EAAS,EAAK,EAC1C,OAAAC,EAAU,IAAM,CACd,GAAIK,EAAQ,OACZ,MAAME,EAAKH,EAAI,QACf,GAAI,CAACG,GAAM,OAAO,qBAAyB,IAAa,OAExD,MAAMC,EAAW,IAAI,qBAAqB,CAAC,CAACC,CAAK,IAAM,CACjDA,EAAM,iBACRH,EAAU,EAAI,EACdE,EAAS,WAAW,EAExB,EAAGL,CAAO,EAEV,OAAAK,EAAS,QAAQD,CAAE,EACZ,IAAMC,EAAS,WAAW,CACnC,EAAG,CAACH,EAAQF,CAAO,CAAC,EAEb,CAACC,EAAKC,CAAM,CACrB",
6
+ "names": ["useState", "useEffect", "useRef", "useRollout", "options", "ref", "inView", "setInView", "el", "observer", "entry"]
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anker-in/headless-ui",
3
- "version": "1.0.26-alpha.1762872688412",
3
+ "version": "1.0.26-alpha.1762914443262",
4
4
  "type": "commonjs",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "types": "./dist/cjs/index.d.ts",
package/style.css CHANGED
@@ -647,6 +647,10 @@ video {
647
647
  margin-left: -0.25rem;
648
648
  margin-right: -0.25rem;
649
649
  }
650
+ .mx-1 {
651
+ margin-left: 0.25rem;
652
+ margin-right: 0.25rem;
653
+ }
650
654
  .mx-1\.5 {
651
655
  margin-left: 0.375rem;
652
656
  margin-right: 0.375rem;
@@ -1385,6 +1389,10 @@ video {
1385
1389
  .\!text-transparent {
1386
1390
  color: transparent !important;
1387
1391
  }
1392
+ .text-\[\#6D6D6F\] {
1393
+ --tw-text-opacity: 1;
1394
+ color: rgb(109 109 111 / var(--tw-text-opacity, 1));
1395
+ }
1388
1396
  .text-\[\#86868C\] {
1389
1397
  --tw-text-opacity: 1;
1390
1398
  color: rgb(134 134 140 / var(--tw-text-opacity, 1));
@@ -1401,6 +1409,10 @@ video {
1401
1409
  .text-current {
1402
1410
  color: currentColor;
1403
1411
  }
1412
+ .text-gray-400 {
1413
+ --tw-text-opacity: 1;
1414
+ color: rgb(156 163 175 / var(--tw-text-opacity, 1));
1415
+ }
1404
1416
  .text-info-primary {
1405
1417
  color: var(--info-primary-color);
1406
1418
  }
@@ -1428,6 +1440,9 @@ video {
1428
1440
  .underline {
1429
1441
  text-decoration-line: underline;
1430
1442
  }
1443
+ .no-underline {
1444
+ text-decoration-line: none;
1445
+ }
1431
1446
  .opacity-60 {
1432
1447
  opacity: 0.6;
1433
1448
  }
@@ -1837,6 +1852,10 @@ video {
1837
1852
  .tablet\:text-left {
1838
1853
  text-align: left;
1839
1854
  }
1855
+ .tablet\:text-base {
1856
+ font-size: 1rem;
1857
+ line-height: 1.5rem;
1858
+ }
1840
1859
  }
1841
1860
  @media (min-width: 1025px) {
1842
1861
  .laptop\:-bottom-\[40px\] {
@@ -1890,6 +1909,10 @@ video {
1890
1909
  .desktop\:text-\[56px\] {
1891
1910
  font-size: 56px;
1892
1911
  }
1912
+ .desktop\:text-lg {
1913
+ font-size: 1.125rem;
1914
+ line-height: 1.75rem;
1915
+ }
1893
1916
  }
1894
1917
  @media (min-width: 1920px) {
1895
1918
  .lg-desktop\:my-\[128px\] {