@gardenfi/garden-book 0.2.3-beta.13 → 0.2.3-beta.15

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 (259) hide show
  1. package/dist/BlogCard/BlogCard.js +60 -0
  2. package/dist/BottomSheet/BottomSheet.js +17 -0
  3. package/dist/Button/Button.js +108 -0
  4. package/dist/Button/ClientOnlyLottie.js +27 -0
  5. package/dist/{Button.js → Button/spinner.json.js} +30 -170
  6. package/dist/Checkbox/Checkbox.js +7 -0
  7. package/dist/Chip/Chip.js +20 -0
  8. package/dist/ClientOnly/ClientOnly.js +6 -0
  9. package/dist/Container/Container.js +6 -0
  10. package/dist/Footer/Footer.js +371 -0
  11. package/dist/Footer/FooterBackgroundAnimation.js +100 -0
  12. package/dist/Footer/FooterLink.js +86 -0
  13. package/dist/GradientScroll/GradientScroll.js +73 -0
  14. package/dist/Icons/APIIcon/APIIcon.js +37 -0
  15. package/dist/Icons/AddIcon/AddIcon.js +16 -0
  16. package/dist/Icons/ArrowDownwardIcon/ArrowDownwardIcon.js +16 -0
  17. package/dist/Icons/ArrowEastIcon/ArrowEastIcon.js +22 -0
  18. package/dist/Icons/ArrowInwardIcon/ArrowInwardIcon.js +37 -0
  19. package/dist/Icons/ArrowLeftIcon/ArrowLeftIcon.js +16 -0
  20. package/dist/Icons/ArrowNorthEastIcon/ArrowNorthEastIcon.js +16 -0
  21. package/dist/Icons/ArrowNorthWestIcon/ArrowNorthWestIcon.js +16 -0
  22. package/dist/Icons/ArrowRightIcon/ArrowRightIcon.js +16 -0
  23. package/dist/Icons/ArrowSouthEastIcon/ArrowSouthEastIcon.js +16 -0
  24. package/dist/Icons/ArrowSouthWestIcon/ArrowSouthWestIcon.js +16 -0
  25. package/dist/Icons/ArrowSyncIcon/ArrowSyncIcon.js +16 -0
  26. package/dist/Icons/ArrowUpwardIcon/ArrowUpwardIcon.js +16 -0
  27. package/dist/Icons/BlogIcon/BlogIcon.js +37 -0
  28. package/dist/Icons/BrandKitIcon/BrandKitIcon.js +37 -0
  29. package/dist/Icons/CancelIcon/CancelIcon.js +22 -0
  30. package/dist/Icons/ChainflipIcon/ChainflipIcon.js +103 -0
  31. package/dist/Icons/CheckCircleIcon/CheckCircleIcon.js +22 -0
  32. package/dist/Icons/CheckIcon/CheckIcon.js +16 -0
  33. package/dist/Icons/Checked/Checked.js +37 -0
  34. package/dist/Icons/ClockIcon/ClockIcon.js +16 -0
  35. package/dist/Icons/CloseIcon/CloseIcon.js +16 -0
  36. package/dist/Icons/CodeBlockIcon/CodeBlockIcon.js +22 -0
  37. package/dist/Icons/CompareArrowsIcon/CompareArrowsIcon.js +22 -0
  38. package/dist/Icons/ConsoleIcon/ConsoleIcon.js +22 -0
  39. package/dist/Icons/CopyIcon/CopyIcon.js +16 -0
  40. package/dist/Icons/CopyrightsIcon/CopyrightsIcon.js +22 -0
  41. package/dist/Icons/DeleteIcon/DeleteIcon.js +16 -0
  42. package/dist/Icons/DiscordIcon/DiscordIcon.js +22 -0
  43. package/dist/Icons/DollarChipIcon/DollarChipIcon.js +37 -0
  44. package/dist/Icons/DraftIcon/DraftIcon.js +37 -0
  45. package/dist/Icons/EditIcon/EditIcon.js +16 -0
  46. package/dist/Icons/EncryptedIcon/EncryptedIcon.js +37 -0
  47. package/dist/Icons/ExchangeIcon/ExchangeIcon.js +19 -0
  48. package/dist/Icons/FaqIcon/FaqIcon.js +37 -0
  49. package/dist/Icons/FeesIcon/FeesIcon.js +22 -0
  50. package/dist/Icons/FingerprintIcon/FingerprintIcon.js +22 -0
  51. package/dist/Icons/FolderIcon/FolderIcon.js +37 -0
  52. package/dist/Icons/GasStationIcon/GasStationIcon.js +22 -0
  53. package/dist/Icons/GiftBoxIcon/GiftBoxIcon.js +37 -0
  54. package/dist/Icons/{LanguageIcon → GlobeIcon}/GlobeIcon.d.ts +1 -1
  55. package/dist/Icons/GlobeIcon/GlobeIcon.js +16 -0
  56. package/dist/Icons/GlobeIcon/index.d.ts +1 -0
  57. package/dist/Icons/HorizontalSwap/HorizontalSwap.js +37 -0
  58. package/dist/Icons/HubIcon/HubIcon.js +16 -0
  59. package/dist/Icons/InfinityIcon/InfinityIcon.js +22 -0
  60. package/dist/Icons/InfoIcon/InfoIcon.js +16 -0
  61. package/dist/Icons/KeyboardDownIcon/KeyboardDownIcon.js +16 -0
  62. package/dist/Icons/KeyboardLeftIcon/KeyboardLeftIcon.js +16 -0
  63. package/dist/Icons/KeyboardRightIcon/KeyboardRightIcon.js +16 -0
  64. package/dist/Icons/KeyboardUpIcon/KeyboardUpIcon.js +16 -0
  65. package/dist/Icons/LinkIcon/LinkIcon.js +16 -0
  66. package/dist/Icons/LockIcon/LockIcon.js +16 -0
  67. package/dist/Icons/LogoutIcon/LogoutIcon.js +16 -0
  68. package/dist/Icons/MenuIcon/MenuIcon.js +16 -0
  69. package/dist/Icons/MinusIcon/MinusIcon.js +19 -0
  70. package/dist/Icons/OpenInFullIcon/OpenInFullIcon.js +16 -0
  71. package/dist/Icons/OpenInNewIcon/OpenInNewIcon.js +22 -0
  72. package/dist/Icons/OtterSecIcon/OtterSecIcon.js +31 -0
  73. package/dist/Icons/PageInfoIcon/PageInfoIcon.js +16 -0
  74. package/dist/Icons/PasskeyIcon/PasskeyIcon.js +22 -0
  75. package/dist/Icons/PasskeyIcon/index.d.ts +1 -1
  76. package/dist/Icons/PlusIcon/PlusIcon.js +19 -0
  77. package/dist/Icons/RadioCheckedIcon/RadioCheckedIcon.js +16 -0
  78. package/dist/Icons/RadioUncheckedIcon/RadioUncheckedIcon.js +16 -0
  79. package/dist/Icons/RaiseHandIcon/RaiseHandIcon.js +37 -0
  80. package/dist/Icons/ReferralIcon/ReferralIcon.js +16 -0
  81. package/dist/Icons/RelayLinkIcon/RelayLinkIcon.js +88 -0
  82. package/dist/Icons/RemoveIcon/RemoveIcon.js +16 -0
  83. package/dist/Icons/Rotate360Icon/Rotate360Icon.js +37 -0
  84. package/dist/Icons/RoutingIcon/RoutingIcon.js +37 -0
  85. package/dist/Icons/RowInfoIcon/RowInfoIcon.js +37 -0
  86. package/dist/Icons/SDKIcon/SDKIcon.js +37 -0
  87. package/dist/Icons/SearchIcon/SearchIcon.js +16 -0
  88. package/dist/Icons/SearchIconThin/SearchIconThin.js +37 -0
  89. package/dist/Icons/Share/Share.js +22 -0
  90. package/dist/Icons/StakeIcon/StakeIcon.js +37 -0
  91. package/dist/Icons/StarIcon/StarIcon.js +16 -0
  92. package/dist/Icons/SwapHorizontalIcon/SwapHorizontalIcon.js +21 -0
  93. package/dist/Icons/ThorswapIcon/ThorswapIcon.js +55 -0
  94. package/dist/Icons/TimerIcon/TimerIcon.js +16 -0
  95. package/dist/Icons/Unchecked/Unchecked.js +37 -0
  96. package/dist/Icons/WalletIcon/WalletIcon.js +16 -0
  97. package/dist/Icons/WalletIconRose/WalletIconRose.js +22 -0
  98. package/dist/Icons/WarningIcon/WarningIcon.js +37 -0
  99. package/dist/Icons/XIcon/XIcon.js +22 -0
  100. package/dist/Icons/XSolidIcon/XSolidIcon.js +22 -0
  101. package/dist/Icons/ZellicIcon/ZellicIcon.js +101 -0
  102. package/dist/Icons/index.d.ts +1 -1
  103. package/dist/InfoBadge/InfoBadge.js +16 -0
  104. package/dist/Logo/ArbitrumLogo/ArbitrumLogo.js +66 -0
  105. package/dist/Logo/BTCLogo/BTCLogo.js +32 -0
  106. package/dist/Logo/Camelot/Camelot.js +73 -0
  107. package/dist/Logo/CatalogLogo/CatalogLogo.js +44 -0
  108. package/dist/Logo/Coinbase/Coinbase.js +24 -0
  109. package/dist/Logo/DLCBTC/DLCBTC.js +68 -0
  110. package/dist/Logo/Debridge/Debridge.js +103 -0
  111. package/dist/Logo/Dodo/DODO.js +77 -0
  112. package/dist/Logo/EthereumLogo/EthereumLogo.js +60 -0
  113. package/dist/Logo/GMX/GMX.js +49 -0
  114. package/dist/Logo/GMXLogo/GMXLogo.js +40 -0
  115. package/dist/Logo/GardenDocs/GardenDocs.js +31 -0
  116. package/dist/Logo/GardenExplorer/GardenExplorer.js +34 -0
  117. package/dist/Logo/GardenExplorerAlt/GardenExplorerAlt.js +31 -0
  118. package/dist/Logo/GardenFullLogo/GardenFullLogo.js +66 -0
  119. package/dist/{GardenIcon-E0OJI-b-.js → Logo/GardenIcon/GardenIcon.js} +11 -13
  120. package/dist/Logo/GardenIconOutline/GardenIconOutline.js +43 -0
  121. package/dist/Logo/GardenLogo/GardenLogo.js +33 -0
  122. package/dist/Logo/GardenLogoDark/GardenLogoDark.js +83 -0
  123. package/dist/Logo/GardenLogoLight/GardenLogoLight.js +83 -0
  124. package/dist/Logo/GardenLogoMarkDark/GardenLogoMarkDark.js +41 -0
  125. package/dist/Logo/GardenLogoMarkLight/GardenLogoMarkLight.js +41 -0
  126. package/dist/Logo/GardenLogoText/GardenLogoText.js +59 -0
  127. package/dist/Logo/GardenStrokeIcon/GardenStrokeIcon.js +43 -0
  128. package/dist/Logo/NFTIcon/NFTIcon.js +37 -0
  129. package/dist/Logo/PancakeSwap/PancakeSwap.js +134 -0
  130. package/dist/Logo/PhantomIcon/PhantomIcon.js +23 -0
  131. package/dist/Logo/PolygonLogo/PolygonLogo.js +31 -0
  132. package/dist/Logo/Radiant/Radiant.js +31 -0
  133. package/dist/Logo/RadiantLogo/RadiantLogo.js +40 -0
  134. package/dist/Logo/Solv/Solv.js +73 -0
  135. package/dist/Logo/SwellBTC/SwellBTC.js +31 -0
  136. package/dist/Logo/TraderJoe/TraderJoe.js +98 -0
  137. package/dist/Logo/TrailOfBits/TrailOfBits.js +190 -0
  138. package/dist/Logo/TrustWallet/TrustWallet.js +50 -0
  139. package/dist/Logo/Vertex/Vertex.js +90 -0
  140. package/dist/Logo/WalletConnect/WalletConnect.js +22 -0
  141. package/dist/Modal/Modal.js +66 -0
  142. package/dist/Opacity/Opacity.d.ts +1 -1
  143. package/dist/Opacity/Opacity.js +25 -0
  144. package/dist/QuestCard/QuestCard.js +57 -0
  145. package/dist/Sidebar/Sidebar.js +41 -0
  146. package/dist/TokenInfo/TokenInfo.js +44 -0
  147. package/dist/TokenNetworkLogos/TokenNetworkLogos.js +41 -0
  148. package/dist/{Typography-DX9XpQWB.js → Typography/Typography.js} +23 -25
  149. package/dist/animations/RollingText/RollingText.d.ts +12 -0
  150. package/dist/animations/RollingText/RollingText.js +70 -0
  151. package/dist/animations/ScaleY/ScaleY.d.ts +12 -0
  152. package/dist/animations/ScaleY/ScaleY.js +32 -0
  153. package/dist/animations/Shine/Shine.d.ts +11 -0
  154. package/dist/animations/Shine/Shine.js +6 -0
  155. package/dist/animations/index.d.ts +5 -0
  156. package/dist/assets/blogPlaceholder.svg.js +4 -0
  157. package/dist/assets/maskRect.svg.js +4 -0
  158. package/dist/hooks/useClientOnly.d.ts +5 -0
  159. package/dist/hooks/useClientOnly.js +10 -0
  160. package/dist/index.d.ts +21 -0
  161. package/dist/index.js +287 -0
  162. package/dist/node_modules/@radix-ui/primitive/dist/index.js +9 -0
  163. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +29 -0
  164. package/dist/node_modules/@radix-ui/react-context/dist/index.js +70 -0
  165. package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +257 -0
  166. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +127 -0
  167. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +17 -0
  168. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +137 -0
  169. package/dist/node_modules/@radix-ui/react-id/dist/index.js +13 -0
  170. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +16 -0
  171. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +71 -0
  172. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +36 -0
  173. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +50 -0
  174. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +13 -0
  175. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +54 -0
  176. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +14 -0
  177. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +6 -0
  178. package/dist/node_modules/aria-hidden/dist/es2015/index.js +52 -0
  179. package/dist/node_modules/vaul/dist/index.js +1038 -0
  180. package/dist/style.css +1 -17
  181. package/dist/utils/utils.d.ts +3 -0
  182. package/dist/utils/utils.js +6 -0
  183. package/package.json +16 -4
  184. package/dist/BlogCard.js +0 -820
  185. package/dist/BlogCard.js.map +0 -1
  186. package/dist/BottomSheet.js +0 -2801
  187. package/dist/BottomSheet.js.map +0 -1
  188. package/dist/Button/spinner.json.d.ts +0 -3
  189. package/dist/Button.js.map +0 -1
  190. package/dist/Checkbox.js +0 -9
  191. package/dist/Checkbox.js.map +0 -1
  192. package/dist/Chip-DOSAEkS5.js +0 -24
  193. package/dist/Chip-DOSAEkS5.js.map +0 -1
  194. package/dist/Chip.js +0 -5
  195. package/dist/Chip.js.map +0 -1
  196. package/dist/ClientOnly-CMQEf-Yl.js +0 -13
  197. package/dist/ClientOnly-CMQEf-Yl.js.map +0 -1
  198. package/dist/ClientOnly.js +0 -5
  199. package/dist/ClientOnly.js.map +0 -1
  200. package/dist/Combination-BN2ESQ8D.js +0 -666
  201. package/dist/Combination-BN2ESQ8D.js.map +0 -1
  202. package/dist/Container.js +0 -9
  203. package/dist/Container.js.map +0 -1
  204. package/dist/Footer.js +0 -661
  205. package/dist/Footer.js.map +0 -1
  206. package/dist/GardenIcon-E0OJI-b-.js.map +0 -1
  207. package/dist/GradientScroll.js +0 -86
  208. package/dist/GradientScroll.js.map +0 -1
  209. package/dist/Icons/LanguageIcon/index.d.ts +0 -1
  210. package/dist/Icons.js +0 -1936
  211. package/dist/Icons.js.map +0 -1
  212. package/dist/InfoBadge.js +0 -19
  213. package/dist/InfoBadge.js.map +0 -1
  214. package/dist/KeyboardDownIcon-hh63DdT7.js +0 -19
  215. package/dist/KeyboardDownIcon-hh63DdT7.js.map +0 -1
  216. package/dist/Logo.js +0 -2044
  217. package/dist/Logo.js.map +0 -1
  218. package/dist/Modal.js +0 -77
  219. package/dist/Modal.js.map +0 -1
  220. package/dist/Opacity-DRe3jTZ4.js +0 -29
  221. package/dist/Opacity-DRe3jTZ4.js.map +0 -1
  222. package/dist/Opacity.js +0 -5
  223. package/dist/Opacity.js.map +0 -1
  224. package/dist/OpenInFullIcon-D2mt0Gjr.js +0 -34
  225. package/dist/OpenInFullIcon-D2mt0Gjr.js.map +0 -1
  226. package/dist/QuestCard.js +0 -60
  227. package/dist/QuestCard.js.map +0 -1
  228. package/dist/RadioUncheckedIcon-KnzZG6cp.js +0 -34
  229. package/dist/RadioUncheckedIcon-KnzZG6cp.js.map +0 -1
  230. package/dist/Sidebar.js +0 -45
  231. package/dist/Sidebar.js.map +0 -1
  232. package/dist/TokenInfo.js +0 -47
  233. package/dist/TokenInfo.js.map +0 -1
  234. package/dist/TokenNetworkLogos-DZZrRsmI.js +0 -41
  235. package/dist/TokenNetworkLogos-DZZrRsmI.js.map +0 -1
  236. package/dist/TokenNetworkLogos.js +0 -5
  237. package/dist/TokenNetworkLogos.js.map +0 -1
  238. package/dist/Typography-DX9XpQWB.js.map +0 -1
  239. package/dist/Typography.js +0 -5
  240. package/dist/Typography.js.map +0 -1
  241. package/dist/Unchecked-B7UGXlAZ.js +0 -76
  242. package/dist/Unchecked-B7UGXlAZ.js.map +0 -1
  243. package/dist/XIcon-DC822TMq.js +0 -67
  244. package/dist/XIcon-DC822TMq.js.map +0 -1
  245. package/dist/fonts/HafferBlack.woff2 +0 -0
  246. package/dist/fonts/HafferBold.woff2 +0 -0
  247. package/dist/fonts/HafferHeavy.woff2 +0 -0
  248. package/dist/fonts/HafferLight.woff2 +0 -0
  249. package/dist/fonts/HafferMedium.woff2 +0 -0
  250. package/dist/fonts/HafferRegular.woff2 +0 -0
  251. package/dist/fonts/HafferSemiBold.woff2 +0 -0
  252. package/dist/fonts/HafferThin.woff2 +0 -0
  253. package/dist/index-Ir5YwUO1.js +0 -45
  254. package/dist/index-Ir5YwUO1.js.map +0 -1
  255. package/dist/useClientOnly-Bzx92NOa.js +0 -12
  256. package/dist/useClientOnly-Bzx92NOa.js.map +0 -1
  257. package/dist/utils-BnsJHiW8.js +0 -2478
  258. package/dist/utils-BnsJHiW8.js.map +0 -1
  259. /package/dist/Icons/PasskeyIcon/{Passkey.d.ts → PasskeyIcon.d.ts} +0 -0
@@ -0,0 +1,71 @@
1
+ import * as a from "react";
2
+ import { useComposedRefs as E } from "../../react-compose-refs/dist/index.js";
3
+ import { useLayoutEffect as A } from "../../react-use-layout-effect/dist/index.js";
4
+ function T(n, e) {
5
+ return a.useReducer((r, t) => e[r][t] ?? r, n);
6
+ }
7
+ var R = (n) => {
8
+ const { present: e, children: r } = n, t = v(e), i = typeof r == "function" ? r({ present: t.isPresent }) : a.Children.only(r), c = E(t.ref, P(i));
9
+ return typeof r == "function" || t.isPresent ? a.cloneElement(i, { ref: c }) : null;
10
+ };
11
+ R.displayName = "Presence";
12
+ function v(n) {
13
+ const [e, r] = a.useState(), t = a.useRef(null), i = a.useRef(n), c = a.useRef("none"), p = n ? "mounted" : "unmounted", [N, s] = T(p, {
14
+ mounted: {
15
+ UNMOUNT: "unmounted",
16
+ ANIMATION_OUT: "unmountSuspended"
17
+ },
18
+ unmountSuspended: {
19
+ MOUNT: "mounted",
20
+ ANIMATION_END: "unmounted"
21
+ },
22
+ unmounted: {
23
+ MOUNT: "mounted"
24
+ }
25
+ });
26
+ return a.useEffect(() => {
27
+ const o = l(t.current);
28
+ c.current = N === "mounted" ? o : "none";
29
+ }, [N]), A(() => {
30
+ const o = t.current, m = i.current;
31
+ if (m !== n) {
32
+ const f = c.current, u = l(o);
33
+ n ? s("MOUNT") : u === "none" || (o == null ? void 0 : o.display) === "none" ? s("UNMOUNT") : s(m && f !== u ? "ANIMATION_OUT" : "UNMOUNT"), i.current = n;
34
+ }
35
+ }, [n, s]), A(() => {
36
+ if (e) {
37
+ let o;
38
+ const m = e.ownerDocument.defaultView ?? window, d = (u) => {
39
+ const g = l(t.current).includes(CSS.escape(u.animationName));
40
+ if (u.target === e && g && (s("ANIMATION_END"), !i.current)) {
41
+ const O = e.style.animationFillMode;
42
+ e.style.animationFillMode = "forwards", o = m.setTimeout(() => {
43
+ e.style.animationFillMode === "forwards" && (e.style.animationFillMode = O);
44
+ });
45
+ }
46
+ }, f = (u) => {
47
+ u.target === e && (c.current = l(t.current));
48
+ };
49
+ return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", d), e.addEventListener("animationend", d), () => {
50
+ m.clearTimeout(o), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", d), e.removeEventListener("animationend", d);
51
+ };
52
+ } else
53
+ s("ANIMATION_END");
54
+ }, [e, s]), {
55
+ isPresent: ["mounted", "unmountSuspended"].includes(N),
56
+ ref: a.useCallback((o) => {
57
+ t.current = o ? getComputedStyle(o) : null, r(o);
58
+ }, [])
59
+ };
60
+ }
61
+ function l(n) {
62
+ return (n == null ? void 0 : n.animationName) || "none";
63
+ }
64
+ function P(n) {
65
+ var t, i;
66
+ let e = (t = Object.getOwnPropertyDescriptor(n.props, "ref")) == null ? void 0 : t.get, r = e && "isReactWarning" in e && e.isReactWarning;
67
+ return r ? n.ref : (e = (i = Object.getOwnPropertyDescriptor(n, "ref")) == null ? void 0 : i.get, r = e && "isReactWarning" in e && e.isReactWarning, r ? n.props.ref : n.props.ref || n.ref);
68
+ }
69
+ export {
70
+ R as Presence
71
+ };
@@ -0,0 +1,36 @@
1
+ import * as f from "react";
2
+ import * as p from "react-dom";
3
+ import { createSlot as c } from "../../react-slot/dist/index.js";
4
+ import { jsx as l } from "react/jsx-runtime";
5
+ var u = [
6
+ "a",
7
+ "button",
8
+ "div",
9
+ "form",
10
+ "h2",
11
+ "h3",
12
+ "img",
13
+ "input",
14
+ "label",
15
+ "li",
16
+ "nav",
17
+ "ol",
18
+ "p",
19
+ "select",
20
+ "span",
21
+ "svg",
22
+ "ul"
23
+ ], h = u.reduce((t, i) => {
24
+ const o = c(`Primitive.${i}`), r = f.forwardRef((e, m) => {
25
+ const { asChild: s, ...a } = e, n = s ? o : i;
26
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ l(n, { ...a, ref: m });
27
+ });
28
+ return r.displayName = `Primitive.${i}`, { ...t, [i]: r };
29
+ }, {});
30
+ function w(t, i) {
31
+ t && p.flushSync(() => t.dispatchEvent(i));
32
+ }
33
+ export {
34
+ h as Primitive,
35
+ w as dispatchDiscreteCustomEvent
36
+ };
@@ -0,0 +1,50 @@
1
+ import * as l from "react";
2
+ import { composeRefs as m } from "../../react-compose-refs/dist/index.js";
3
+ import { jsx as u } from "react/jsx-runtime";
4
+ // @__NO_SIDE_EFFECTS__
5
+ function b(e) {
6
+ const n = /* @__PURE__ */ y(e), o = l.forwardRef((t, r) => {
7
+ const { children: i, ...c } = t, s = l.Children.toArray(i), a = s.find(E);
8
+ if (a) {
9
+ const f = a.props.children, d = s.map((p) => p === a ? l.Children.count(f) > 1 ? l.Children.only(null) : l.isValidElement(f) ? f.props.children : null : p);
10
+ return /* @__PURE__ */ u(n, { ...c, ref: r, children: l.isValidElement(f) ? l.cloneElement(f, void 0, d) : null });
11
+ }
12
+ return /* @__PURE__ */ u(n, { ...c, ref: r, children: i });
13
+ });
14
+ return o.displayName = `${e}.Slot`, o;
15
+ }
16
+ // @__NO_SIDE_EFFECTS__
17
+ function y(e) {
18
+ const n = l.forwardRef((o, t) => {
19
+ const { children: r, ...i } = o;
20
+ if (l.isValidElement(r)) {
21
+ const c = S(r), s = C(i, r.props);
22
+ return r.type !== l.Fragment && (s.ref = t ? m(t, c) : c), l.cloneElement(r, s);
23
+ }
24
+ return l.Children.count(r) > 1 ? l.Children.only(null) : null;
25
+ });
26
+ return n.displayName = `${e}.SlotClone`, n;
27
+ }
28
+ var g = Symbol("radix.slottable");
29
+ function E(e) {
30
+ return l.isValidElement(e) && typeof e.type == "function" && "__radixId" in e.type && e.type.__radixId === g;
31
+ }
32
+ function C(e, n) {
33
+ const o = { ...n };
34
+ for (const t in n) {
35
+ const r = e[t], i = n[t];
36
+ /^on[A-Z]/.test(t) ? r && i ? o[t] = (...s) => {
37
+ const a = i(...s);
38
+ return r(...s), a;
39
+ } : r && (o[t] = r) : t === "style" ? o[t] = { ...r, ...i } : t === "className" && (o[t] = [r, i].filter(Boolean).join(" "));
40
+ }
41
+ return { ...e, ...o };
42
+ }
43
+ function S(e) {
44
+ var t, r;
45
+ let n = (t = Object.getOwnPropertyDescriptor(e.props, "ref")) == null ? void 0 : t.get, o = n && "isReactWarning" in n && n.isReactWarning;
46
+ return o ? e.ref : (n = (r = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : r.get, o = n && "isReactWarning" in n && n.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
47
+ }
48
+ export {
49
+ b as createSlot
50
+ };
@@ -0,0 +1,13 @@
1
+ import * as r from "react";
2
+ function o(t) {
3
+ const e = r.useRef(t);
4
+ return r.useEffect(() => {
5
+ e.current = t;
6
+ }), r.useMemo(() => (...n) => {
7
+ var u;
8
+ return (u = e.current) == null ? void 0 : u.call(e, ...n);
9
+ }, []);
10
+ }
11
+ export {
12
+ o as useCallbackRef
13
+ };
@@ -0,0 +1,54 @@
1
+ import * as n from "react";
2
+ import { useLayoutEffect as v } from "../../react-use-layout-effect/dist/index.js";
3
+ var E = n[" useInsertionEffect ".trim().toString()] || v;
4
+ function y({
5
+ prop: t,
6
+ defaultProp: u,
7
+ onChange: o = () => {
8
+ },
9
+ caller: i
10
+ }) {
11
+ const [l, e, r] = w({
12
+ defaultProp: u,
13
+ onChange: o
14
+ }), c = t !== void 0, a = c ? t : l;
15
+ {
16
+ const s = n.useRef(t !== void 0);
17
+ n.useEffect(() => {
18
+ const f = s.current;
19
+ f !== c && console.warn(
20
+ `${i} is changing from ${f ? "controlled" : "uncontrolled"} to ${c ? "controlled" : "uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
21
+ ), s.current = c;
22
+ }, [c, i]);
23
+ }
24
+ const m = n.useCallback(
25
+ (s) => {
26
+ var f;
27
+ if (c) {
28
+ const d = R(s) ? s(t) : s;
29
+ d !== t && ((f = r.current) == null || f.call(r, d));
30
+ } else
31
+ e(s);
32
+ },
33
+ [c, t, e, r]
34
+ );
35
+ return [a, m];
36
+ }
37
+ function w({
38
+ defaultProp: t,
39
+ onChange: u
40
+ }) {
41
+ const [o, i] = n.useState(t), l = n.useRef(o), e = n.useRef(u);
42
+ return E(() => {
43
+ e.current = u;
44
+ }, [u]), n.useEffect(() => {
45
+ var r;
46
+ l.current !== o && ((r = e.current) == null || r.call(e, o), l.current = o);
47
+ }, [o, l]), [o, i, e];
48
+ }
49
+ function R(t) {
50
+ return typeof t == "function";
51
+ }
52
+ export {
53
+ y as useControllableState
54
+ };
@@ -0,0 +1,14 @@
1
+ import * as r from "react";
2
+ import { useCallbackRef as s } from "../../react-use-callback-ref/dist/index.js";
3
+ function p(n, e = globalThis == null ? void 0 : globalThis.document) {
4
+ const t = s(n);
5
+ r.useEffect(() => {
6
+ const o = (a) => {
7
+ a.key === "Escape" && t(a);
8
+ };
9
+ return e.addEventListener("keydown", o, { capture: !0 }), () => e.removeEventListener("keydown", o, { capture: !0 });
10
+ }, [t, e]);
11
+ }
12
+ export {
13
+ p as useEscapeKeydown
14
+ };
@@ -0,0 +1,6 @@
1
+ import * as t from "react";
2
+ var e = globalThis != null && globalThis.document ? t.useLayoutEffect : () => {
3
+ };
4
+ export {
5
+ e as useLayoutEffect
6
+ };
@@ -0,0 +1,52 @@
1
+ var S = function(r) {
2
+ if (typeof document > "u")
3
+ return null;
4
+ var u = Array.isArray(r) ? r[0] : r;
5
+ return u.ownerDocument.body;
6
+ }, f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {}, h = 0, W = function(r) {
7
+ return r && (r.host || W(r.parentNode));
8
+ }, D = function(r, u) {
9
+ return u.map(function(e) {
10
+ if (r.contains(e))
11
+ return e;
12
+ var n = W(e);
13
+ return n && r.contains(n) ? n : (console.error("aria-hidden", e, "in not contained inside", r, ". Doing nothing"), null);
14
+ }).filter(function(e) {
15
+ return !!e;
16
+ });
17
+ }, E = function(r, u, e, n) {
18
+ var i = D(u, Array.isArray(r) ? r : [r]);
19
+ p[e] || (p[e] = /* @__PURE__ */ new WeakMap());
20
+ var s = p[e], l = [], o = /* @__PURE__ */ new Set(), b = new Set(i), y = function(t) {
21
+ !t || o.has(t) || (o.add(t), y(t.parentNode));
22
+ };
23
+ i.forEach(y);
24
+ var A = function(t) {
25
+ !t || b.has(t) || Array.prototype.forEach.call(t.children, function(a) {
26
+ if (o.has(a))
27
+ A(a);
28
+ else
29
+ try {
30
+ var c = a.getAttribute(n), w = c !== null && c !== "false", d = (f.get(a) || 0) + 1, M = (s.get(a) || 0) + 1;
31
+ f.set(a, d), s.set(a, M), l.push(a), d === 1 && w && v.set(a, !0), M === 1 && a.setAttribute(e, "true"), w || a.setAttribute(n, "true");
32
+ } catch (k) {
33
+ console.error("aria-hidden: cannot operate on ", a, k);
34
+ }
35
+ });
36
+ };
37
+ return A(u), o.clear(), h++, function() {
38
+ l.forEach(function(t) {
39
+ var a = f.get(t) - 1, c = s.get(t) - 1;
40
+ f.set(t, a), s.set(t, c), a || (v.has(t) || t.removeAttribute(n), v.delete(t)), c || t.removeAttribute(e);
41
+ }), h--, h || (f = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {});
42
+ };
43
+ }, C = function(r, u, e) {
44
+ e === void 0 && (e = "data-aria-hidden");
45
+ var n = Array.from(Array.isArray(r) ? r : [r]), i = S(r);
46
+ return i ? (n.push.apply(n, Array.from(i.querySelectorAll("[aria-live], script"))), E(n, i, e, "aria-hidden")) : function() {
47
+ return null;
48
+ };
49
+ };
50
+ export {
51
+ C as hideOthers
52
+ };