@af-utils/react-virtual-list
Advanced tools
Comparing version 0.0.23 to 0.0.24
@@ -1,4 +0,4 @@ | ||
export const raw = 2052; | ||
export const min = 1075; | ||
export const minGz = 614; | ||
export const minBrotli = 540; | ||
export const raw = 2100; | ||
export const min = 1089; | ||
export const minGz = 626; | ||
export const minBrotli = 544; |
import e from "prop-types"; | ||
import { Subscription as t, mapVisibleRange as i, EVT_FROM as l, EVT_TO as s, EVT_SCROLL_SIZE as a } from "@af-utils/react-virtual-headless"; | ||
import { Subscription as t, mapVisibleRange as i, EVT_FROM as l, EVT_TO as o, EVT_SCROLL_SIZE as s } from "@af-utils/react-virtual-headless"; | ||
export * from "@af-utils/react-virtual-headless"; | ||
import { css as r, cx as o } from "@af-utils/styled"; | ||
import { css as a, cx as r } from "@af-utils/styled"; | ||
import { jsxs as d, jsx as m, Fragment as n } from "react/jsx-runtime"; | ||
const c = r("overflow: auto", "position: relative"), p = r("visibility: hidden"), h = r("position: absolute"), f = r("height: 1px"), u = r("width: 1px"), v = o(c, r("display: flex")), x = o(h, p, u, r("top: 0")), y = o(h, p, f, r("left: 0")), b = o(p, u), N = o(p, f, r("flex-shrink: 0")), g = [ "height", c, x, b ], w = [ "width", v, y, N ], I = [ l, s ], D = [ a ], K = e => { | ||
let {model: l, children: s, className: a, itemData: r, getKey: c = (e => e), tabIndex: p = -1, ...h} = e; | ||
const [f, u, v, x] = l.horizontal ? w : g; | ||
const c = a("overflow: auto", "position: relative"), p = a("visibility: hidden"), h = a("position: absolute"), f = a("height: 1px"), u = a("width: 1px"), v = r(c, a("display: flex")), x = r(h, p, u, a("top: 0")), y = r(h, p, f, a("left: 0")), b = r(p, u), N = r(p, f, a("flex-shrink: 0")), g = [ "height", c, x, b ], w = [ "width", v, y, N ], I = [ l, o ], D = [ s ], K = e => { | ||
let {model: l, children: o, className: s, itemData: a, component: c = "div", getKey: p = (e => e), tabIndex: h = -1, ...f} = e; | ||
const [u, v, x, y] = l.horizontal ? w : g; | ||
/*#__PURE__*/ | ||
return d("div", { | ||
className: o(u, a), | ||
return d(c, { | ||
className: r(v, s), | ||
ref: l.setOuterNode, | ||
tabIndex: p, | ||
...h, | ||
tabIndex: h, | ||
...f, | ||
children: [ /*#__PURE__*/ m(t, { | ||
@@ -24,5 +24,5 @@ model: l, | ||
children: () => /*#__PURE__*/ m("div", { | ||
className: v, | ||
className: x, | ||
style: { | ||
[f]: l.scrollSize | ||
[u]: l.scrollSize | ||
} | ||
@@ -35,11 +35,11 @@ }) | ||
children: [ /*#__PURE__*/ m("div", { | ||
className: x, | ||
className: y, | ||
style: { | ||
[f]: l.getOffset(l.from) | ||
[u]: l.getOffset(l.from) | ||
} | ||
}), i(l, (e => /*#__PURE__*/ m(s, { | ||
}), i(l, (e => /*#__PURE__*/ m(o, { | ||
i: e, | ||
data: r, | ||
data: a, | ||
model: l | ||
}, c(e, r)))) ] | ||
}, p(e, a)))) ] | ||
}) | ||
@@ -54,2 +54,3 @@ }) ] | ||
getKey: e.func, | ||
component: e.elementType, | ||
className: e.string, | ||
@@ -56,0 +57,0 @@ itemData: e.any, |
{ | ||
"name": "@af-utils/react-virtual-list", | ||
"private": false, | ||
"version": "0.0.23", | ||
"version": "0.0.24", | ||
"description": "React components for rendering large scrollable data", | ||
@@ -60,3 +60,3 @@ "repository": "https://github.com/nowaalex/af-virtual-scroll.git", | ||
"lodash": "^4.17.21", | ||
"rollup": "^2.77.0", | ||
"rollup": "^2.77.1", | ||
"rollup-plugin-filesize": "^9.1.2", | ||
@@ -66,4 +66,4 @@ "rollup-plugin-terser": "^7.0.2" | ||
"peerDependencies": { | ||
"@af-utils/react-virtual-headless": "^0.0.21", | ||
"@af-utils/styled": "^0.0.9", | ||
"@af-utils/react-virtual-headless": "^0.0.22", | ||
"@af-utils/styled": "^0.0.10", | ||
"prop-types": "^15.8.0", | ||
@@ -70,0 +70,0 @@ "react": "^17.0.0 || ^18.1.0" |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9914
56