@redneckz/wildless-cms-uni-blocks 0.8.1 → 0.8.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.
- package/bundle/bundle.umd.js +9 -7
- package/bundle/bundle.umd.min.js +1 -1
- package/dist/components/Tabs/Tabs.js +1 -1
- package/dist/components/Tabs/Tabs.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js +7 -5
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/lib/components/Tabs/Tabs.js +1 -1
- package/lib/components/Tabs/Tabs.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js +7 -5
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +8 -6
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/dist/components/Tabs/Tabs.js +1 -1
- package/mobile/dist/components/Tabs/Tabs.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js +7 -5
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/lib/components/Tabs/Tabs.js +1 -1
- package/mobile/lib/components/Tabs/Tabs.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js +7 -5
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/src/components/Tabs/Tabs.tsx +2 -2
- package/mobile/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +9 -6
- package/package.json +1 -1
- package/src/components/Tabs/Tabs.tsx +2 -2
- package/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +9 -6
package/bundle/bundle.umd.js
CHANGED
|
@@ -1803,6 +1803,7 @@
|
|
|
1803
1803
|
});
|
|
1804
1804
|
|
|
1805
1805
|
const childStyleMap = ['min-w-[100%]', 'min-w-[50%]', 'min-w-[33.33%]', 'min-w-[25%]'];
|
|
1806
|
+
const DEFAULT_HEIGHT = '866px';
|
|
1806
1807
|
const SwipeListContainer = JSX(({ className = '', containerRef, activeIndex, visibleItemCount = 0, gap = 0, padding = 0, listType = 'horizontal-list', snapAlign = 'snap-center', children, onVisibleItemsChange, onVisibleIndicesChange, }) => {
|
|
1807
1808
|
const observerOptions = {
|
|
1808
1809
|
sensitivity: 1,
|
|
@@ -1821,10 +1822,14 @@
|
|
|
1821
1822
|
const isHorizontalList = listType === 'horizontal-list';
|
|
1822
1823
|
const containerStyle = {
|
|
1823
1824
|
...(isHorizontalList ? getContainerOffset(padding, additionPadding) : {}),
|
|
1824
|
-
...(isVerticalList ?
|
|
1825
|
+
...(isVerticalList ? { height: DEFAULT_HEIGHT } : {}),
|
|
1825
1826
|
gap: `${gap}px`,
|
|
1826
1827
|
};
|
|
1827
|
-
|
|
1828
|
+
const itemContainerStyle = {
|
|
1829
|
+
...(isHorizontalList ? getContainerOffset(padding / 4) : {}),
|
|
1830
|
+
maxHeight: DEFAULT_HEIGHT,
|
|
1831
|
+
};
|
|
1832
|
+
return (jsx("div", { className: style('box-border overflow-auto no-scrollbar', listType, className), style: containerStyle, role: "list", ref: containerRef, children: mapChildren((child, idx) => (jsx(SwipeListItem, { className: style(snapAlign, visibleItemCount ? childStyleMap[visibleItemCount - 1] : '', isVerticalList ? 'h-full' : ''), style: itemContainerStyle, activeIndex: activeIndex, idx: idx, observerOptions: observerOptions, onIntersection: handleIntersection, children: child }, String(idx))))(children) }));
|
|
1828
1833
|
});
|
|
1829
1834
|
// Styles used to compensate outer container padding to get rid of clipping effect
|
|
1830
1835
|
const getContainerOffset = (padding, additionalPadding = 0) => ({
|
|
@@ -1837,9 +1842,6 @@
|
|
|
1837
1842
|
.map((_, i) => [_, i])
|
|
1838
1843
|
.filter(([_]) => _ && _.intersectionRatio >= 0.9)
|
|
1839
1844
|
.map(([, i]) => i);
|
|
1840
|
-
const getContainerHeight = (ref) => ({
|
|
1841
|
-
height: ref?.current?.firstElementChild?.clientHeight || 0,
|
|
1842
|
-
});
|
|
1843
1845
|
|
|
1844
1846
|
const areArraysEqual = (as, bs) => as === bs || Boolean(as && bs && as?.length === bs?.length && as.every((_, i) => _ === bs[i]));
|
|
1845
1847
|
|
|
@@ -4053,7 +4055,7 @@
|
|
|
4053
4055
|
return [];
|
|
4054
4056
|
}), [tabs]);
|
|
4055
4057
|
useEffect(() => currentTab?.type === 'group'
|
|
4056
|
-
? EventBus.inst.subject('tab', { label: currentTab.ref })
|
|
4058
|
+
? EventBus.inst.subject('tab', { type: currentTab.type, label: currentTab.ref })
|
|
4057
4059
|
: undefined, [currentTab]);
|
|
4058
4060
|
const handleClick = useCallback((selectedTab) => {
|
|
4059
4061
|
if (selectedTab?.type === 'group') {
|
|
@@ -4479,7 +4481,7 @@
|
|
|
4479
4481
|
return (jsx("div", { className: "flex items-end absolute bottom-0 right-0 h-full pointer-events-none", children: jsx(LikeControl, { className: "rounded-tl-lg sticky bottom-0 pointer-events-auto" }) }));
|
|
4480
4482
|
}
|
|
4481
4483
|
|
|
4482
|
-
const packageVersion = "0.8.
|
|
4484
|
+
const packageVersion = "0.8.2";
|
|
4483
4485
|
|
|
4484
4486
|
exports.Blocks = Blocks;
|
|
4485
4487
|
exports.ContentPage = ContentPage;
|