@blockscout/ui-toolkit 0.0.1-alpha.1 → 0.0.1-alpha.2

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 (286) hide show
  1. package/README.md +8 -0
  2. package/dist/chakra/accordion.d.ts +1 -1
  3. package/dist/chakra/drawer.d.ts +1 -1
  4. package/dist/chakra/popover.d.ts +1 -2
  5. package/dist/index.d.ts +2 -0
  6. package/dist/index.js +9284 -0
  7. package/dist/package/src/index.d.ts +7 -11
  8. package/dist/theme/foundations/semanticTokens.ts +1 -5
  9. package/dist/theme/recipes/alert.recipe.d.ts +6 -46
  10. package/dist/theme/recipes/alert.recipe.ts +45 -48
  11. package/dist/theme/recipes/badge.recipe.d.ts +11 -44
  12. package/dist/theme/recipes/badge.recipe.ts +11 -45
  13. package/dist/theme/recipes/button.recipe.d.ts +17 -20
  14. package/dist/theme/recipes/button.recipe.ts +42 -27
  15. package/dist/theme/recipes/close-button.recipe.d.ts +0 -3
  16. package/dist/theme/recipes/close-button.recipe.ts +0 -3
  17. package/dist/theme/recipes/dialog.recipe.d.ts +1 -1
  18. package/dist/theme/recipes/drawer.recipe.d.ts +1 -1
  19. package/dist/theme/recipes/index.d.ts +47 -147
  20. package/dist/theme/recipes/link.recipe.d.ts +1 -9
  21. package/dist/theme/recipes/link.recipe.ts +1 -9
  22. package/dist/theme/recipes/list.recipe.d.ts +1 -1
  23. package/dist/theme/recipes/menu.recipe.d.ts +1 -1
  24. package/dist/theme/recipes/popover.recipe.ts +4 -3
  25. package/dist/theme/recipes/select.recipe.d.ts +1 -1
  26. package/dist/theme/recipes/skeleton.recipe.d.ts +5 -6
  27. package/dist/theme/recipes/skeleton.recipe.ts +10 -9
  28. package/dist/theme/recipes/table.recipe.d.ts +1 -1
  29. package/dist/theme/recipes/tag.recipe.d.ts +0 -12
  30. package/dist/theme/recipes/tag.recipe.ts +0 -13
  31. package/dist/theme/recipes/toast.recipe.d.ts +1 -1
  32. package/package.json +14 -28
  33. package/dist/_virtual/Button.js +0 -4
  34. package/dist/_virtual/Element.js +0 -4
  35. package/dist/_virtual/Link.js +0 -4
  36. package/dist/_virtual/_commonjsHelpers.js +0 -4
  37. package/dist/_virtual/animate-scroll.js +0 -4
  38. package/dist/_virtual/cancel-events.js +0 -4
  39. package/dist/_virtual/index.js +0 -5
  40. package/dist/_virtual/index2.js +0 -4
  41. package/dist/_virtual/index3.js +0 -4
  42. package/dist/_virtual/index4.js +0 -4
  43. package/dist/_virtual/jsx-runtime.js +0 -5
  44. package/dist/_virtual/jsx-runtime2.js +0 -4
  45. package/dist/_virtual/passive-event-listeners.js +0 -4
  46. package/dist/_virtual/react-is.development.js +0 -4
  47. package/dist/_virtual/react-is.production.min.js +0 -4
  48. package/dist/_virtual/react-jsx-runtime.development.js +0 -4
  49. package/dist/_virtual/react-jsx-runtime.production.min.js +0 -4
  50. package/dist/_virtual/scroll-element.js +0 -4
  51. package/dist/_virtual/scroll-events.js +0 -4
  52. package/dist/_virtual/scroll-hash.js +0 -4
  53. package/dist/_virtual/scroll-link.js +0 -4
  54. package/dist/_virtual/scroll-spy.js +0 -4
  55. package/dist/_virtual/scroller.js +0 -4
  56. package/dist/_virtual/smooth.js +0 -4
  57. package/dist/_virtual/utils.js +0 -4
  58. package/dist/chakra/accordion.js +0 -61
  59. package/dist/chakra/alert.js +0 -45
  60. package/dist/chakra/avatar.js +0 -36
  61. package/dist/chakra/badge.js +0 -18
  62. package/dist/chakra/button.js +0 -65
  63. package/dist/chakra/checkbox.js +0 -33
  64. package/dist/chakra/close-button.js +0 -13
  65. package/dist/chakra/collapsible.js +0 -58
  66. package/dist/chakra/color-mode.js +0 -35
  67. package/dist/chakra/dialog.js +0 -47
  68. package/dist/chakra/drawer.js +0 -39
  69. package/dist/chakra/field.js +0 -65
  70. package/dist/chakra/heading.js +0 -12
  71. package/dist/chakra/icon-button.js +0 -44
  72. package/dist/chakra/image.js +0 -30
  73. package/dist/chakra/input-group.js +0 -47
  74. package/dist/chakra/input.js +0 -5
  75. package/dist/chakra/link.js +0 -68
  76. package/dist/chakra/menu.js +0 -63
  77. package/dist/chakra/pin-input.js +0 -15
  78. package/dist/chakra/popover.js +0 -69
  79. package/dist/chakra/progress-circle.js +0 -17
  80. package/dist/chakra/provider.js +0 -10
  81. package/dist/chakra/radio.js +0 -17
  82. package/dist/chakra/rating.js +0 -21
  83. package/dist/chakra/select.js +0 -185
  84. package/dist/chakra/skeleton.js +0 -40
  85. package/dist/chakra/slider.js +0 -39
  86. package/dist/chakra/switch.js +0 -19
  87. package/dist/chakra/table.js +0 -66
  88. package/dist/chakra/tabs.js +0 -29
  89. package/dist/chakra/tag.js +0 -51
  90. package/dist/chakra/textarea.js +0 -5
  91. package/dist/chakra/toaster.js +0 -31
  92. package/dist/chakra/tooltip.js +0 -85
  93. package/dist/chakra.d.ts +0 -1
  94. package/dist/chakra.js +0 -155
  95. package/dist/components/ButtonBackTo.js +0 -22
  96. package/dist/components/Filter/FilterInput.js +0 -48
  97. package/dist/components/TruncatedTextTooltip.js +0 -49
  98. package/dist/components.d.ts +0 -2
  99. package/dist/components.js +0 -1
  100. package/dist/configs/app/api.js +0 -23
  101. package/dist/configs/app/app.js +0 -19
  102. package/dist/configs/app/chain.js +0 -30
  103. package/dist/configs/app/features/account.js +0 -13
  104. package/dist/configs/app/features/addressMetadata.js +0 -15
  105. package/dist/configs/app/features/addressProfileAPI.js +0 -25
  106. package/dist/configs/app/features/addressVerification.js +0 -17
  107. package/dist/configs/app/features/adsBanner.js +0 -50
  108. package/dist/configs/app/features/adsText.js +0 -16
  109. package/dist/configs/app/features/advancedFilter.js +0 -11
  110. package/dist/configs/app/features/beaconChain.js +0 -15
  111. package/dist/configs/app/features/blockchainInteraction.js +0 -15
  112. package/dist/configs/app/features/bridgedTokens.js +0 -16
  113. package/dist/configs/app/features/celo.js +0 -13
  114. package/dist/configs/app/features/csvExport.js +0 -14
  115. package/dist/configs/app/features/dataAvailability.js +0 -11
  116. package/dist/configs/app/features/deFiDropdown.js +0 -12
  117. package/dist/configs/app/features/easterEggBadge.js +0 -12
  118. package/dist/configs/app/features/externalTxs.js +0 -14
  119. package/dist/configs/app/features/faultProofSystem.js +0 -12
  120. package/dist/configs/app/features/gasTracker.js +0 -17
  121. package/dist/configs/app/features/getGasButton.js +0 -17
  122. package/dist/configs/app/features/googleAnalytics.js +0 -12
  123. package/dist/configs/app/features/graphqlApiDocs.js +0 -12
  124. package/dist/configs/app/features/growthBook.js +0 -12
  125. package/dist/configs/app/features/index.js +0 -92
  126. package/dist/configs/app/features/marketplace.js +0 -46
  127. package/dist/configs/app/features/metasuites.js +0 -11
  128. package/dist/configs/app/features/mixpanel.js +0 -12
  129. package/dist/configs/app/features/mudFramework.js +0 -12
  130. package/dist/configs/app/features/multichainButton.js +0 -18
  131. package/dist/configs/app/features/nameService.js +0 -15
  132. package/dist/configs/app/features/pools.js +0 -15
  133. package/dist/configs/app/features/publicTagsSubmission.js +0 -17
  134. package/dist/configs/app/features/restApiDocs.js +0 -12
  135. package/dist/configs/app/features/rewards.js +0 -17
  136. package/dist/configs/app/features/rollbar.js +0 -20
  137. package/dist/configs/app/features/rollup.js +0 -37
  138. package/dist/configs/app/features/safe.js +0 -23
  139. package/dist/configs/app/features/saveOnGas.js +0 -13
  140. package/dist/configs/app/features/sol2uml.js +0 -16
  141. package/dist/configs/app/features/stats.js +0 -16
  142. package/dist/configs/app/features/suave.js +0 -11
  143. package/dist/configs/app/features/txInterpretation.js +0 -16
  144. package/dist/configs/app/features/userOps.js +0 -11
  145. package/dist/configs/app/features/validators.js +0 -16
  146. package/dist/configs/app/features/verifiedTokens.js +0 -15
  147. package/dist/configs/app/features/web3Wallet.js +0 -24
  148. package/dist/configs/app/features/xStarScore.js +0 -12
  149. package/dist/configs/app/index.js +0 -19
  150. package/dist/configs/app/meta.js +0 -16
  151. package/dist/configs/app/services.js +0 -9
  152. package/dist/configs/app/ui/views/address.js +0 -36
  153. package/dist/configs/app/ui/views/block.js +0 -11
  154. package/dist/configs/app/ui/views/index.js +0 -12
  155. package/dist/configs/app/ui/views/nft.js +0 -10
  156. package/dist/configs/app/ui/views/token.js +0 -7
  157. package/dist/configs/app/ui/views/tx.js +0 -15
  158. package/dist/configs/app/ui.js +0 -128
  159. package/dist/configs/app/utils.js +0 -45
  160. package/dist/hooks/useClipboard.js +0 -27
  161. package/dist/hooks/useDisclosure.js +0 -17
  162. package/dist/hooks/useViewportSize.js +0 -17
  163. package/dist/hooks.d.ts +0 -1
  164. package/dist/hooks.js +0 -8
  165. package/dist/icons/arrows/east-mini.svg.js +0 -4
  166. package/dist/icons/arrows/east.svg.js +0 -4
  167. package/dist/icons/check.svg.js +0 -4
  168. package/dist/icons/close.svg.js +0 -4
  169. package/dist/icons/info_filled.svg.js +0 -4
  170. package/dist/icons/link_external.svg.js +0 -4
  171. package/dist/icons/star_filled.svg.js +0 -4
  172. package/dist/icons/star_outline.svg.js +0 -4
  173. package/dist/lib/consts.js +0 -10
  174. package/dist/lib/hooks/useFirstMountState.js +0 -8
  175. package/dist/lib/hooks/useIsMobile.js +0 -7
  176. package/dist/lib/hooks/useUpdateEffect.js +0 -12
  177. package/dist/lib/html-entities.js +0 -5
  178. package/dist/lib/isBrowser.js +0 -6
  179. package/dist/lib/regexp.js +0 -4
  180. package/dist/lib/settings/colorTheme.js +0 -33
  181. package/dist/lib/stripTrailingSlash.js +0 -4
  182. package/dist/node_modules/@uidotdev/usehooks/index.js +0 -51
  183. package/dist/node_modules/bignumber.js/bignumber.js +0 -627
  184. package/dist/node_modules/es-toolkit/dist/function/debounce.js +0 -30
  185. package/dist/node_modules/es-toolkit/dist/function/throttle.js +0 -11
  186. package/dist/node_modules/lodash.throttle/index.js +0 -95
  187. package/dist/node_modules/object-assign/index.js +0 -54
  188. package/dist/node_modules/prop-types/checkPropTypes.js +0 -54
  189. package/dist/node_modules/prop-types/factoryWithThrowingShims.js +0 -52
  190. package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +0 -329
  191. package/dist/node_modules/prop-types/index.js +0 -17
  192. package/dist/node_modules/prop-types/lib/ReactPropTypesSecret.js +0 -10
  193. package/dist/node_modules/prop-types/lib/has.js +0 -7
  194. package/dist/node_modules/react-icons/lib/iconBase.js +0 -108
  195. package/dist/node_modules/react-icons/lib/iconContext.js +0 -12
  196. package/dist/node_modules/react-icons/lu/index.js +0 -12
  197. package/dist/node_modules/react-is/cjs/react-is.development.js +0 -95
  198. package/dist/node_modules/react-is/cjs/react-is.production.min.js +0 -78
  199. package/dist/node_modules/react-is/index.js +0 -10
  200. package/dist/node_modules/react-scroll/modules/components/Button.js +0 -58
  201. package/dist/node_modules/react-scroll/modules/components/Element.js +0 -72
  202. package/dist/node_modules/react-scroll/modules/components/Link.js +0 -49
  203. package/dist/node_modules/react-scroll/modules/index.js +0 -26
  204. package/dist/node_modules/react-scroll/modules/mixins/Helpers.js +0 -192
  205. package/dist/node_modules/react-scroll/modules/mixins/animate-scroll.js +0 -132
  206. package/dist/node_modules/react-scroll/modules/mixins/cancel-events.js +0 -20
  207. package/dist/node_modules/react-scroll/modules/mixins/passive-event-listeners.js +0 -27
  208. package/dist/node_modules/react-scroll/modules/mixins/scroll-element.js +0 -98
  209. package/dist/node_modules/react-scroll/modules/mixins/scroll-events.js +0 -23
  210. package/dist/node_modules/react-scroll/modules/mixins/scroll-hash.js +0 -61
  211. package/dist/node_modules/react-scroll/modules/mixins/scroll-link.js +0 -171
  212. package/dist/node_modules/react-scroll/modules/mixins/scroll-spy.js +0 -79
  213. package/dist/node_modules/react-scroll/modules/mixins/scroller.js +0 -62
  214. package/dist/node_modules/react-scroll/modules/mixins/smooth.js +0 -72
  215. package/dist/node_modules/react-scroll/modules/mixins/utils.js +0 -55
  216. package/dist/package/node_modules/react/cjs/react-jsx-runtime.development.js +0 -604
  217. package/dist/package/node_modules/react/cjs/react-jsx-runtime.production.min.js +0 -28
  218. package/dist/package/node_modules/react/jsx-runtime.js +0 -10
  219. package/dist/theme/foundations/animations.js +0 -15
  220. package/dist/theme/foundations/borders.js +0 -12
  221. package/dist/theme/foundations/breakpoints.js +0 -11
  222. package/dist/theme/foundations/colors.js +0 -163
  223. package/dist/theme/foundations/durations.js +0 -12
  224. package/dist/theme/foundations/semanticTokens.js +0 -474
  225. package/dist/theme/foundations/shadows.js +0 -16
  226. package/dist/theme/foundations/typography.js +0 -92
  227. package/dist/theme/foundations/zIndex.js +0 -24
  228. package/dist/theme/globalCss.js +0 -51
  229. package/dist/theme/globals/address-entity.js +0 -34
  230. package/dist/theme/globals/recaptcha.js +0 -21
  231. package/dist/theme/globals/scrollbar.js +0 -33
  232. package/dist/theme/index.d.ts +0 -1
  233. package/dist/theme/index.ts +0 -1
  234. package/dist/theme/recipes/accordion.recipe.js +0 -143
  235. package/dist/theme/recipes/alert.recipe.js +0 -134
  236. package/dist/theme/recipes/badge.recipe.js +0 -119
  237. package/dist/theme/recipes/button.recipe.js +0 -272
  238. package/dist/theme/recipes/checkbox.recipe.js +0 -53
  239. package/dist/theme/recipes/checkmark.recipe.js +0 -73
  240. package/dist/theme/recipes/close-button.recipe.js +0 -39
  241. package/dist/theme/recipes/dialog.recipe.js +0 -210
  242. package/dist/theme/recipes/drawer.recipe.js +0 -168
  243. package/dist/theme/recipes/field.recipe.js +0 -174
  244. package/dist/theme/recipes/index.js +0 -69
  245. package/dist/theme/recipes/input.recipe.js +0 -116
  246. package/dist/theme/recipes/link.recipe.js +0 -88
  247. package/dist/theme/recipes/list.recipe.js +0 -65
  248. package/dist/theme/recipes/menu.recipe.js +0 -104
  249. package/dist/theme/recipes/pin-input.recipe.js +0 -34
  250. package/dist/theme/recipes/popover.recipe.js +0 -72
  251. package/dist/theme/recipes/progress-circle.recipe.js +0 -74
  252. package/dist/theme/recipes/radio-group.recipe.js +0 -69
  253. package/dist/theme/recipes/radiomark.recipe.js +0 -87
  254. package/dist/theme/recipes/rating-group.recipe.js +0 -84
  255. package/dist/theme/recipes/select.recipe.js +0 -275
  256. package/dist/theme/recipes/skeleton.recipe.js +0 -54
  257. package/dist/theme/recipes/spinner.recipe.js +0 -33
  258. package/dist/theme/recipes/stat.recipe.js +0 -101
  259. package/dist/theme/recipes/switch.recipe.js +0 -125
  260. package/dist/theme/recipes/table.recipe.js +0 -83
  261. package/dist/theme/recipes/tabs.recipe.js +0 -216
  262. package/dist/theme/recipes/tag.recipe.js +0 -157
  263. package/dist/theme/recipes/textarea.recipe.js +0 -86
  264. package/dist/theme/recipes/toast.recipe.js +0 -98
  265. package/dist/theme/recipes/tooltip.recipe.js +0 -87
  266. package/dist/theme/theme.js +0 -40
  267. package/dist/theme/utils/entries.js +0 -11
  268. package/dist/theme.d.ts +0 -2
  269. package/dist/theme.js +0 -4
  270. package/dist/types/client/adProviders.js +0 -12
  271. package/dist/types/client/contract.js +0 -13
  272. package/dist/types/client/gasTracker.js +0 -7
  273. package/dist/types/client/navigation.js +0 -4
  274. package/dist/types/client/rollup.js +0 -11
  275. package/dist/types/client/txInterpretation.js +0 -8
  276. package/dist/types/client/validators.js +0 -8
  277. package/dist/types/client/wallets.js +0 -8
  278. package/dist/types/homepage.js +0 -15
  279. package/dist/types/views/address.js +0 -14
  280. package/dist/types/views/block.js +0 -12
  281. package/dist/types/views/tx.js +0 -16
  282. package/dist/ui/shared/forms/validators/url.js +0 -12
  283. package/dist/utils/getComponentDisplayName.js +0 -7
  284. package/dist/utils/index.d.ts +0 -1
  285. package/dist/utils.d.ts +0 -2
  286. package/dist/utils.js +0 -4
@@ -1,171 +0,0 @@
1
- import { __exports as S } from "../../../../_virtual/scroll-link.js";
2
- import X from "react";
3
- import { __require as Y } from "./scroll-spy.js";
4
- import { __require as B } from "./scroller.js";
5
- import { __require as tt } from "../../../prop-types/index.js";
6
- import { __require as et } from "./scroll-hash.js";
7
- var E;
8
- function st() {
9
- if (E) return S;
10
- E = 1, Object.defineProperty(S, "__esModule", {
11
- value: !0
12
- });
13
- var q = Object.assign || function(a) {
14
- for (var e = 1; e < arguments.length; e++) {
15
- var i = arguments[e];
16
- for (var s in i)
17
- Object.prototype.hasOwnProperty.call(i, s) && (a[s] = i[s]);
18
- }
19
- return a;
20
- }, L = /* @__PURE__ */ function() {
21
- function a(e, i) {
22
- for (var s = 0; s < i.length; s++) {
23
- var u = i[s];
24
- u.enumerable = u.enumerable || !1, u.configurable = !0, "value" in u && (u.writable = !0), Object.defineProperty(e, u.key, u);
25
- }
26
- }
27
- return function(e, i, s) {
28
- return i && a(e.prototype, i), s && a(e, s), e;
29
- };
30
- }(), z = X, H = v(z), N = Y(), h = v(N), x = B(), U = v(x), W = /* @__PURE__ */ tt(), r = v(W), F = et(), c = v(F);
31
- function v(a) {
32
- return a && a.__esModule ? a : { default: a };
33
- }
34
- function G(a, e) {
35
- if (!(a instanceof e))
36
- throw new TypeError("Cannot call a class as a function");
37
- }
38
- function J(a, e) {
39
- if (!a)
40
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
41
- return e && (typeof e == "object" || typeof e == "function") ? e : a;
42
- }
43
- function K(a, e) {
44
- if (typeof e != "function" && e !== null)
45
- throw new TypeError("Super expression must either be null or a function, not " + typeof e);
46
- a.prototype = Object.create(e && e.prototype, { constructor: { value: a, enumerable: !1, writable: !0, configurable: !0 } }), e && (Object.setPrototypeOf ? Object.setPrototypeOf(a, e) : a.__proto__ = e);
47
- }
48
- var P = {
49
- to: r.default.string.isRequired,
50
- containerId: r.default.string,
51
- container: r.default.object,
52
- activeClass: r.default.string,
53
- spy: r.default.bool,
54
- horizontal: r.default.bool,
55
- smooth: r.default.oneOfType([r.default.bool, r.default.string]),
56
- offset: r.default.number,
57
- delay: r.default.number,
58
- isDynamic: r.default.bool,
59
- onClick: r.default.func,
60
- duration: r.default.oneOfType([r.default.number, r.default.func]),
61
- absolute: r.default.bool,
62
- onSetActive: r.default.func,
63
- onSetInactive: r.default.func,
64
- ignoreCancelEvents: r.default.bool,
65
- hashSpy: r.default.bool,
66
- saveHashHistory: r.default.bool,
67
- spyThrottle: r.default.number
68
- };
69
- return S.default = function(a, e) {
70
- var i = e || U.default, s = function(w) {
71
- K(t, w);
72
- function t(o) {
73
- G(this, t);
74
- var n = J(this, (t.__proto__ || Object.getPrototypeOf(t)).call(this, o));
75
- return u.call(n), n.state = {
76
- active: !1
77
- }, n;
78
- }
79
- return L(t, [{
80
- key: "getScrollSpyContainer",
81
- value: function() {
82
- var n = this.props.containerId, l = this.props.container;
83
- return n && !l ? document.getElementById(n) : l && l.nodeType ? l : document;
84
- }
85
- }, {
86
- key: "componentDidMount",
87
- value: function() {
88
- if (this.props.spy || this.props.hashSpy) {
89
- var n = this.getScrollSpyContainer();
90
- h.default.isMounted(n) || h.default.mount(n, this.props.spyThrottle), this.props.hashSpy && (c.default.isMounted() || c.default.mount(i), c.default.mapContainer(this.props.to, n)), h.default.addSpyHandler(this.spyHandler, n), this.setState({
91
- container: n
92
- });
93
- }
94
- }
95
- }, {
96
- key: "componentWillUnmount",
97
- value: function() {
98
- h.default.unmount(this.stateHandler, this.spyHandler);
99
- }
100
- }, {
101
- key: "render",
102
- value: function() {
103
- var n = "";
104
- this.state && this.state.active ? n = ((this.props.className || "") + " " + (this.props.activeClass || "active")).trim() : n = this.props.className;
105
- var l = q({}, this.props);
106
- for (var d in P)
107
- l.hasOwnProperty(d) && delete l[d];
108
- return l.className = n, l.onClick = this.handleClick, H.default.createElement(a, l);
109
- }
110
- }]), t;
111
- }(H.default.PureComponent), u = function() {
112
- var t = this;
113
- this.scrollTo = function(o, n) {
114
- i.scrollTo(o, q({}, t.state, n));
115
- }, this.handleClick = function(o) {
116
- t.props.onClick && t.props.onClick(o), o.stopPropagation && o.stopPropagation(), o.preventDefault && o.preventDefault(), t.scrollTo(t.props.to, t.props);
117
- }, this.spyHandler = function(o, n) {
118
- var l = t.getScrollSpyContainer();
119
- if (!(c.default.isMounted() && !c.default.isInitialized())) {
120
- var d = t.props.horizontal, p = t.props.to, f = null, b = void 0, k = void 0;
121
- if (d) {
122
- var y = 0, O = 0, C = 0;
123
- if (l.getBoundingClientRect) {
124
- var Q = l.getBoundingClientRect();
125
- C = Q.left;
126
- }
127
- if (!f || t.props.isDynamic) {
128
- if (f = i.get(p), !f)
129
- return;
130
- var T = f.getBoundingClientRect();
131
- y = T.left - C + o, O = y + T.width;
132
- }
133
- var _ = o - t.props.offset;
134
- b = _ >= Math.floor(y) && _ < Math.floor(O), k = _ < Math.floor(y) || _ >= Math.floor(O);
135
- } else {
136
- var g = 0, M = 0, R = 0;
137
- if (l.getBoundingClientRect) {
138
- var V = l.getBoundingClientRect();
139
- R = V.top;
140
- }
141
- if (!f || t.props.isDynamic) {
142
- if (f = i.get(p), !f)
143
- return;
144
- var I = f.getBoundingClientRect();
145
- g = I.top - R + n, M = g + I.height;
146
- }
147
- var m = n - t.props.offset;
148
- b = m >= Math.floor(g) && m < Math.floor(M), k = m < Math.floor(g) || m >= Math.floor(M);
149
- }
150
- var D = i.getActiveLink();
151
- if (k) {
152
- if (p === D && i.setActiveLink(void 0), t.props.hashSpy && c.default.getHash() === p) {
153
- var j = t.props.saveHashHistory, Z = j === void 0 ? !1 : j;
154
- c.default.changeHash("", Z);
155
- }
156
- t.props.spy && t.state.active && (t.setState({ active: !1 }), t.props.onSetInactive && t.props.onSetInactive(p, f));
157
- }
158
- if (b && (D !== p || t.state.active === !1)) {
159
- i.setActiveLink(p);
160
- var A = t.props.saveHashHistory, $ = A === void 0 ? !1 : A;
161
- t.props.hashSpy && c.default.changeHash(p, $), t.props.spy && (t.setState({ active: !0 }), t.props.onSetActive && t.props.onSetActive(p, f));
162
- }
163
- }
164
- };
165
- };
166
- return s.propTypes = P, s.defaultProps = { offset: 0 }, s;
167
- }, S;
168
- }
169
- export {
170
- st as __require
171
- };
@@ -1,79 +0,0 @@
1
- import { __exports as s } from "../../../../_virtual/scroll-spy.js";
2
- import { __require as f } from "../../../lodash.throttle/index.js";
3
- import { __require as p } from "./passive-event-listeners.js";
4
- var a;
5
- function h() {
6
- if (a) return s;
7
- a = 1, Object.defineProperty(s, "__esModule", {
8
- value: !0
9
- });
10
- var u = f(), l = c(u), i = p();
11
- function c(r) {
12
- return r && r.__esModule ? r : { default: r };
13
- }
14
- var d = function(e) {
15
- var o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : 66;
16
- return (0, l.default)(e, o);
17
- }, t = {
18
- spyCallbacks: [],
19
- spySetState: [],
20
- scrollSpyContainers: [],
21
- mount: function(e, o) {
22
- if (e) {
23
- var n = d(function(m) {
24
- t.scrollHandler(e);
25
- }, o);
26
- t.scrollSpyContainers.push(e), (0, i.addPassiveEventListener)(e, "scroll", n);
27
- }
28
- },
29
- isMounted: function(e) {
30
- return t.scrollSpyContainers.indexOf(e) !== -1;
31
- },
32
- currentPositionX: function(e) {
33
- if (e === document) {
34
- var o = window.pageYOffset !== void 0, n = (document.compatMode || "") === "CSS1Compat";
35
- return o ? window.pageXOffset : n ? document.documentElement.scrollLeft : document.body.scrollLeft;
36
- } else
37
- return e.scrollLeft;
38
- },
39
- currentPositionY: function(e) {
40
- if (e === document) {
41
- var o = window.pageXOffset !== void 0, n = (document.compatMode || "") === "CSS1Compat";
42
- return o ? window.pageYOffset : n ? document.documentElement.scrollTop : document.body.scrollTop;
43
- } else
44
- return e.scrollTop;
45
- },
46
- scrollHandler: function(e) {
47
- var o = t.scrollSpyContainers[t.scrollSpyContainers.indexOf(e)].spyCallbacks || [];
48
- o.forEach(function(n) {
49
- return n(t.currentPositionX(e), t.currentPositionY(e));
50
- });
51
- },
52
- addStateHandler: function(e) {
53
- t.spySetState.push(e);
54
- },
55
- addSpyHandler: function(e, o) {
56
- var n = t.scrollSpyContainers[t.scrollSpyContainers.indexOf(o)];
57
- n.spyCallbacks || (n.spyCallbacks = []), n.spyCallbacks.push(e), e(t.currentPositionX(o), t.currentPositionY(o));
58
- },
59
- updateStates: function() {
60
- t.spySetState.forEach(function(e) {
61
- return e();
62
- });
63
- },
64
- unmount: function(e, o) {
65
- t.scrollSpyContainers.forEach(function(n) {
66
- return n.spyCallbacks && n.spyCallbacks.length && n.spyCallbacks.splice(n.spyCallbacks.indexOf(o), 1);
67
- }), t.spySetState && t.spySetState.length && t.spySetState.splice(t.spySetState.indexOf(e), 1), document.removeEventListener("scroll", t.scrollHandler);
68
- },
69
- update: function() {
70
- return t.scrollSpyContainers.forEach(function(e) {
71
- return t.scrollHandler(e);
72
- });
73
- }
74
- };
75
- return s.default = t, s;
76
- }
77
- export {
78
- h as __require
79
- };
@@ -1,62 +0,0 @@
1
- import { __exports as u } from "../../../../_virtual/scroller.js";
2
- import { __require as T } from "./utils.js";
3
- import { __require as w } from "./animate-scroll.js";
4
- import { __require as y } from "./scroll-events.js";
5
- var v;
6
- function B() {
7
- if (v) return u;
8
- v = 1, Object.defineProperty(u, "__esModule", {
9
- value: !0
10
- });
11
- var m = Object.assign || function(t) {
12
- for (var e = 1; e < arguments.length; e++) {
13
- var r = arguments[e];
14
- for (var n in r)
15
- Object.prototype.hasOwnProperty.call(r, n) && (t[n] = r[n]);
16
- }
17
- return t;
18
- }, _ = T(), g = s(_), q = w(), E = s(q), h = y(), l = s(h);
19
- function s(t) {
20
- return t && t.__esModule ? t : { default: t };
21
- }
22
- var o = {}, f = void 0;
23
- return u.default = {
24
- unmount: function() {
25
- o = {};
26
- },
27
- register: function(e, r) {
28
- o[e] = r;
29
- },
30
- unregister: function(e) {
31
- delete o[e];
32
- },
33
- get: function(e) {
34
- return o[e] || document.getElementById(e) || document.getElementsByName(e)[0] || document.getElementsByClassName(e)[0];
35
- },
36
- setActiveLink: function(e) {
37
- return f = e;
38
- },
39
- getActiveLink: function() {
40
- return f;
41
- },
42
- scrollTo: function(e, r) {
43
- var n = this.get(e);
44
- if (!n) {
45
- console.warn("target Element not found");
46
- return;
47
- }
48
- r = m({}, r, { absolute: !1 });
49
- var d = r.containerId, c = r.container, i = void 0;
50
- d ? i = document.getElementById(d) : c && c.nodeType ? i = c : i = document, r.absolute = !0;
51
- var S = r.horizontal, a = g.default.scrollOffset(i, n, S) + (r.offset || 0);
52
- if (!r.smooth) {
53
- l.default.registered.begin && l.default.registered.begin(e, n), i === document ? r.horizontal ? window.scrollTo(a, 0) : window.scrollTo(0, a) : i.scrollTop = a, l.default.registered.end && l.default.registered.end(e, n);
54
- return;
55
- }
56
- E.default.animateTopScroll(a, r, e, n);
57
- }
58
- }, u;
59
- }
60
- export {
61
- B as __require
62
- };
@@ -1,72 +0,0 @@
1
- import { __exports as n } from "../../../../_virtual/smooth.js";
2
- var t;
3
- function a() {
4
- return t ? n : (t = 1, Object.defineProperty(n, "__esModule", {
5
- value: !0
6
- }), n.default = {
7
- /*
8
- * https://github.com/oblador/angular-scroll (duScrollDefaultEasing)
9
- */
10
- defaultEasing: function(e) {
11
- return e < 0.5 ? Math.pow(e * 2, 2) / 2 : 1 - Math.pow((1 - e) * 2, 2) / 2;
12
- },
13
- /*
14
- * https://gist.github.com/gre/1650294
15
- */
16
- // no easing, no acceleration
17
- linear: function(e) {
18
- return e;
19
- },
20
- // accelerating from zero velocity
21
- easeInQuad: function(e) {
22
- return e * e;
23
- },
24
- // decelerating to zero velocity
25
- easeOutQuad: function(e) {
26
- return e * (2 - e);
27
- },
28
- // acceleration until halfway, then deceleration
29
- easeInOutQuad: function(e) {
30
- return e < 0.5 ? 2 * e * e : -1 + (4 - 2 * e) * e;
31
- },
32
- // accelerating from zero velocity
33
- easeInCubic: function(e) {
34
- return e * e * e;
35
- },
36
- // decelerating to zero velocity π
37
- easeOutCubic: function(e) {
38
- return --e * e * e + 1;
39
- },
40
- // acceleration until halfway, then deceleration
41
- easeInOutCubic: function(e) {
42
- return e < 0.5 ? 4 * e * e * e : (e - 1) * (2 * e - 2) * (2 * e - 2) + 1;
43
- },
44
- // accelerating from zero velocity
45
- easeInQuart: function(e) {
46
- return e * e * e * e;
47
- },
48
- // decelerating to zero velocity
49
- easeOutQuart: function(e) {
50
- return 1 - --e * e * e * e;
51
- },
52
- // acceleration until halfway, then deceleration
53
- easeInOutQuart: function(e) {
54
- return e < 0.5 ? 8 * e * e * e * e : 1 - 8 * --e * e * e * e;
55
- },
56
- // accelerating from zero velocity
57
- easeInQuint: function(e) {
58
- return e * e * e * e * e;
59
- },
60
- // decelerating to zero velocity
61
- easeOutQuint: function(e) {
62
- return 1 + --e * e * e * e * e;
63
- },
64
- // acceleration until halfway, then deceleration
65
- easeInOutQuint: function(e) {
66
- return e < 0.5 ? 16 * e * e * e * e * e : 1 + 16 * --e * e * e * e * e;
67
- }
68
- }, n);
69
- }
70
- export {
71
- a as __require
72
- };
@@ -1,55 +0,0 @@
1
- import { __exports as a } from "../../../../_virtual/utils.js";
2
- var p;
3
- function T() {
4
- if (p) return a;
5
- p = 1, Object.defineProperty(a, "__esModule", {
6
- value: !0
7
- });
8
- var c = function(t, e) {
9
- var n = t.indexOf("#") === 0 ? t.substring(1) : t, o = n ? "#" + n : "", r = window && window.location, s = o ? r.pathname + r.search + o : r.pathname + r.search;
10
- e ? history.pushState(history.state, "", s) : history.replaceState(history.state, "", s);
11
- }, d = function() {
12
- return window.location.hash.replace(/^#/, "");
13
- }, h = function(t) {
14
- return function(e) {
15
- return t.contains ? t != e && t.contains(e) : !!(t.compareDocumentPosition(e) & 16);
16
- };
17
- }, m = function(t) {
18
- return getComputedStyle(t).position !== "static";
19
- }, u = function(t, e) {
20
- for (var n = t.offsetTop, o = t.offsetParent; o && !e(o); )
21
- n += o.offsetTop, o = o.offsetParent;
22
- return { offsetTop: n, offsetParent: o };
23
- }, v = function(t, e, n) {
24
- if (n)
25
- return t === document ? e.getBoundingClientRect().left + (window.scrollX || window.pageXOffset) : getComputedStyle(t).position !== "static" ? e.offsetLeft : e.offsetLeft - t.offsetLeft;
26
- if (t === document)
27
- return e.getBoundingClientRect().top + (window.scrollY || window.pageYOffset);
28
- if (m(t)) {
29
- if (e.offsetParent !== t) {
30
- var o = function(i) {
31
- return i === t || i === document;
32
- }, r = u(e, o), s = r.offsetTop, w = r.offsetParent;
33
- if (w !== t)
34
- throw new Error("Seems containerElement is not an ancestor of the Element");
35
- return s;
36
- }
37
- return e.offsetTop;
38
- }
39
- if (e.offsetParent === t.offsetParent)
40
- return e.offsetTop - t.offsetTop;
41
- var l = function(i) {
42
- return i === document;
43
- };
44
- return u(e, l).offsetTop - u(t, l).offsetTop;
45
- };
46
- return a.default = {
47
- updateHash: c,
48
- getHash: d,
49
- filterElementInContainer: h,
50
- scrollOffset: v
51
- }, a;
52
- }
53
- export {
54
- T as __require
55
- };