@redneckz/wildless-cms-uni-blocks 0.8.18 → 0.8.20
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/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +24 -20
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/bundle/components/ApplicationForm/renderSubmitButton.d.ts +2 -2
- package/bundle/ui-kit/SwipeListControl/SwipeListContainer.d.ts +0 -2
- package/bundle/ui-kit/SwipeListControl/SwipeListControlContent.d.ts +2 -7
- package/bundle/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -1
- package/bundle/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +12 -3
- package/bundle/ui-kit/SwipeListControl/getContainerHeight.d.ts +4 -0
- package/dist/api/CorporateLeadAPI.js +1 -1
- package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +2 -2
- package/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/dist/components/ApplicationForm/renderBankOffices.js +1 -1
- package/dist/components/ApplicationForm/renderBankOffices.js.map +1 -1
- package/dist/components/ApplicationForm/renderSelects.js +2 -2
- package/dist/components/ApplicationForm/renderSelects.js.map +1 -1
- package/dist/components/ApplicationForm/renderSubmitButton.d.ts +2 -2
- package/dist/components/ApplicationForm/renderSubmitButton.js.map +1 -1
- package/dist/components/CarouselLinks/CarouselLinks.js +1 -1
- package/dist/ui-kit/LinkButton/LinkButton.js +4 -4
- package/dist/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.d.ts +0 -2
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js +4 -8
- package/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
- package/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlContent.d.ts +2 -7
- package/dist/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -1
- package/dist/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +12 -3
- package/dist/ui-kit/SwipeListControl/getContainerHeight.d.ts +4 -0
- package/dist/ui-kit/SwipeListControl/getContainerHeight.js +13 -0
- package/dist/ui-kit/SwipeListControl/getContainerHeight.js.map +1 -0
- package/lib/api/CorporateLeadAPI.js +1 -1
- package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +2 -2
- package/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/lib/components/ApplicationForm/renderBankOffices.js +1 -1
- package/lib/components/ApplicationForm/renderBankOffices.js.map +1 -1
- package/lib/components/ApplicationForm/renderSelects.js +2 -2
- package/lib/components/ApplicationForm/renderSelects.js.map +1 -1
- package/lib/components/ApplicationForm/renderSubmitButton.d.ts +2 -2
- package/lib/components/ApplicationForm/renderSubmitButton.js.map +1 -1
- package/lib/components/CarouselLinks/CarouselLinks.js +1 -1
- package/lib/ui-kit/LinkButton/LinkButton.js +4 -4
- package/lib/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.d.ts +0 -2
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js +4 -8
- package/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
- package/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlContent.d.ts +2 -7
- package/lib/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -1
- package/lib/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +12 -3
- package/lib/ui-kit/SwipeListControl/getContainerHeight.d.ts +4 -0
- package/lib/ui-kit/SwipeListControl/getContainerHeight.js +10 -0
- package/lib/ui-kit/SwipeListControl/getContainerHeight.js.map +1 -0
- package/mobile/bundle/bundle.umd.js +16 -11
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/mobile/bundle/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/mobile/bundle/components/ApplicationForm/renderSubmitButton.d.ts +2 -2
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListContainer.d.ts +0 -2
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListControlContent.d.ts +2 -7
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -1
- package/mobile/bundle/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +12 -3
- package/mobile/bundle/ui-kit/SwipeListControl/getContainerHeight.d.ts +4 -0
- package/mobile/dist/api/CorporateLeadAPI.js +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js +2 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/mobile/dist/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/mobile/dist/components/ApplicationForm/renderBankOffices.js +1 -1
- package/mobile/dist/components/ApplicationForm/renderBankOffices.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderSelects.js +2 -2
- package/mobile/dist/components/ApplicationForm/renderSelects.js.map +1 -1
- package/mobile/dist/components/ApplicationForm/renderSubmitButton.d.ts +2 -2
- package/mobile/dist/components/ApplicationForm/renderSubmitButton.js.map +1 -1
- package/mobile/dist/components/CarouselLinks/CarouselLinks.js +1 -1
- package/mobile/dist/ui-kit/LinkButton/LinkButton.js +4 -4
- package/mobile/dist/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.d.ts +0 -2
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js +4 -8
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlContent.d.ts +2 -7
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -1
- package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +12 -3
- package/mobile/dist/ui-kit/SwipeListControl/getContainerHeight.d.ts +4 -0
- package/mobile/dist/ui-kit/SwipeListControl/getContainerHeight.js +13 -0
- package/mobile/dist/ui-kit/SwipeListControl/getContainerHeight.js.map +1 -0
- package/mobile/lib/api/CorporateLeadAPI.js +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js +2 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormBusinessCard.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/ApplicationFormContent.d.ts +2 -2
- package/mobile/lib/components/ApplicationForm/ApplicationFormsProps.d.ts +2 -2
- package/mobile/lib/components/ApplicationForm/renderBankOffices.js +1 -1
- package/mobile/lib/components/ApplicationForm/renderBankOffices.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderSelects.js +2 -2
- package/mobile/lib/components/ApplicationForm/renderSelects.js.map +1 -1
- package/mobile/lib/components/ApplicationForm/renderSubmitButton.d.ts +2 -2
- package/mobile/lib/components/ApplicationForm/renderSubmitButton.js.map +1 -1
- package/mobile/lib/components/CarouselLinks/CarouselLinks.js +1 -1
- package/mobile/lib/ui-kit/LinkButton/LinkButton.js +4 -4
- package/mobile/lib/ui-kit/LinkButton/LinkButton.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.d.ts +0 -2
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js +4 -8
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListContainer.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js +2 -2
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControl.js.map +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlContent.d.ts +2 -7
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.d.ts +1 -1
- package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlProps.d.ts +12 -3
- package/mobile/lib/ui-kit/SwipeListControl/getContainerHeight.d.ts +4 -0
- package/mobile/lib/ui-kit/SwipeListControl/getContainerHeight.js +10 -0
- package/mobile/lib/ui-kit/SwipeListControl/getContainerHeight.js.map +1 -0
- package/mobile/src/api/CorporateLeadAPI.ts +1 -1
- package/mobile/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +2 -2
- package/mobile/src/components/ApplicationForm/ApplicationFormContent.ts +2 -2
- package/mobile/src/components/ApplicationForm/ApplicationFormsProps.ts +2 -2
- package/mobile/src/components/ApplicationForm/renderBankOffices.tsx +2 -2
- package/mobile/src/components/ApplicationForm/renderSelects.tsx +3 -3
- package/mobile/src/components/ApplicationForm/renderSubmitButton.tsx +2 -2
- package/mobile/src/components/CarouselLinks/CarouselLinks.tsx +1 -1
- package/mobile/src/components/CarouselLinks/CarouselLinks.ui.json +8 -0
- package/mobile/src/ui-kit/LinkButton/LinkButton.tsx +7 -7
- package/mobile/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +4 -10
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControl.tsx +2 -0
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlContent.ts +2 -8
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +1 -1
- package/mobile/src/ui-kit/SwipeListControl/SwipeListControlProps.ts +14 -3
- package/mobile/src/ui-kit/SwipeListControl/getContainerHeight.ts +10 -0
- package/package.json +1 -1
- package/src/api/CorporateLeadAPI.ts +1 -1
- package/src/components/ApplicationForm/ApplicationFormBusinessCard.tsx +2 -2
- package/src/components/ApplicationForm/ApplicationFormContent.ts +2 -2
- package/src/components/ApplicationForm/ApplicationFormsProps.ts +2 -2
- package/src/components/ApplicationForm/renderBankOffices.tsx +2 -2
- package/src/components/ApplicationForm/renderSelects.tsx +3 -3
- package/src/components/ApplicationForm/renderSubmitButton.tsx +2 -2
- package/src/components/CarouselLinks/CarouselLinks.tsx +1 -1
- package/src/components/CarouselLinks/CarouselLinks.ui.json +8 -0
- package/src/ui-kit/LinkButton/LinkButton.tsx +7 -7
- package/src/ui-kit/SwipeListControl/SwipeListContainer.tsx +4 -10
- package/src/ui-kit/SwipeListControl/SwipeListControl.tsx +2 -0
- package/src/ui-kit/SwipeListControl/SwipeListControlContent.ts +2 -8
- package/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +1 -1
- package/src/ui-kit/SwipeListControl/SwipeListControlProps.ts +14 -3
- package/src/ui-kit/SwipeListControl/getContainerHeight.ts +10 -0
package/bundle/bundle.umd.js
CHANGED
|
@@ -521,7 +521,7 @@
|
|
|
521
521
|
function CorporateLeadAPI() {
|
|
522
522
|
async function send(body) {
|
|
523
523
|
try {
|
|
524
|
-
const response = await fetch('/api/v1/
|
|
524
|
+
const response = await fetch('/api/v1/sendcorporatelead', {
|
|
525
525
|
method: 'POST',
|
|
526
526
|
headers: { 'Content-Type': 'application/json' },
|
|
527
527
|
mode: 'cors',
|
|
@@ -822,7 +822,7 @@
|
|
|
822
822
|
return (jsx(Select, { options: dataFormat, label: label, placeholder: placeholder || selected, onChange: (_) => setSelected(_.key), value: selectedObj }));
|
|
823
823
|
});
|
|
824
824
|
|
|
825
|
-
const renderSelects = ({ acquiringType, regions, region, handleChange }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(WrapperSelect$1, { data: ACQUIRING_TYPES, fieldValue: "name", fieldLabel: "name", selected: acquiringType, setSelected: (value) => handleChange({ acquiringType: value }), label: "\u0412\u0438\u0434 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433\u0430", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433" }) }), jsx("div", { className: "w-1/2", children: jsx(WrapperSelect$1, { data: regions, fieldValue: "
|
|
825
|
+
const renderSelects = ({ acquiringType, regions, region, handleChange }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(WrapperSelect$1, { data: ACQUIRING_TYPES, fieldValue: "name", fieldLabel: "name", selected: acquiringType, setSelected: (value) => handleChange({ acquiringType: value }), label: "\u0412\u0438\u0434 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433\u0430", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u044D\u043A\u0432\u0430\u0439\u0440\u0438\u043D\u0433" }) }), jsx("div", { className: "w-1/2", children: jsx(WrapperSelect$1, { data: regions, fieldValue: "code", fieldLabel: "name", selected: region, setSelected: (value) => handleChange({ region: value }), label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441" }) })] }));
|
|
826
826
|
|
|
827
827
|
const SlideCheckbox = JSX(({ checked, text, onClick }) => (jsxs("div", { role: "checkbox", "aria-checked": checked, className: "flex justify-start items-center w-full cursor-pointer mb-4", onClick: () => onClick && onClick(), children: [jsx("div", { className: `relative duration-300 w-9 h-5 mr-3 rounded rounded-2xl ${checked ? 'bg-primary-main' : 'bg-main-divider'}`, children: jsx("div", { className: `absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded rounded-full ${checked ? 'left-[50%]' : 'left-[5%]'}` }) }), jsx("div", { children: jsx(Text, { size: "text-m", font: "font-light", color: "text-primary-text", children: text }) })] })));
|
|
828
828
|
|
|
@@ -928,7 +928,7 @@
|
|
|
928
928
|
}), renderDataOrganization$3({ name, phone, inn, mail, handleChange }), renderSubmitButton(button, 'mb-4'), jsx(Footnote, { link: link })] }));
|
|
929
929
|
});
|
|
930
930
|
const renderDataOrganization$3 = ({ name, phone, mail, inn, handleChange, }) => (jsxs("div", { className: "flex justify-between gap-5", children: [jsxs("div", { className: "w-1/2", children: [jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", label: "\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E", value: name, onChange: (value) => handleChange({ name: value }) }), jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u0418\u041D\u041D", label: "\u0418\u041D\u041D", value: inn, onChange: (value) => handleChange({ inn: value }) })] }), jsxs("div", { className: "w-1/2", children: [jsx(Input, { className: "shrink-0 text-l w-full mb-5", type: "text", "aria-label": "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", label: "\u0422\u0435\u043B\u0435\u0444\u043E\u043D", value: phone, onChange: (value) => handleChange({ phone: value }) }), jsx(Input, { className: "shrink-0 text-l w-full ", type: "text", "aria-label": "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", label: "\u042D\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u0430\u044F \u043F\u043E\u0447\u0442\u0430", value: mail, onChange: (value) => handleChange({ mail: value }) })] })] }));
|
|
931
|
-
const renderRegion$1 = ({ regions, region, handleChange }) => (jsx("div", { className: "flex justify-between gap-5 mb-5", children: jsx("div", { className: "w-full", children: jsx(WrapperSelect$1, { data: regions, fieldValue: "
|
|
931
|
+
const renderRegion$1 = ({ regions, region, handleChange }) => (jsx("div", { className: "flex justify-between gap-5 mb-5", children: jsx("div", { className: "w-full", children: jsx(WrapperSelect$1, { data: regions, fieldValue: "code", fieldLabel: "name", selected: region, setSelected: (value) => handleChange({ region: value }), label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D" }) }) }));
|
|
932
932
|
|
|
933
933
|
const SAFEBOXES_URL = '/api/v1/safeboxes';
|
|
934
934
|
const EMPTY_VALUE = [];
|
|
@@ -948,7 +948,7 @@
|
|
|
948
948
|
const MAX_CREDIT_TERM = 60;
|
|
949
949
|
const ITEMS_CREDIT_TERM = ['От 1 года', 'До 5 лет'];
|
|
950
950
|
|
|
951
|
-
const renderBankOffices = ({ regions, region, branches, department, handleChange, }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(WrapperSelect$1, { data: regions, fieldValue: "
|
|
951
|
+
const renderBankOffices = ({ regions, region, branches, department, handleChange, }) => (jsxs("div", { className: "flex justify-between gap-5 mb-7", children: [jsx("div", { className: "w-1/2", children: jsx(WrapperSelect$1, { data: regions, fieldValue: "code", fieldLabel: "name", selected: region, setSelected: (value) => handleChange({ region: value }), label: "\u0420\u0435\u0433\u0438\u043E\u043D", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0440\u0435\u0433\u0438\u043E\u043D" }) }), jsx("div", { className: "w-1/2", children: jsx(WrapperSelect$1, { data: branches, fieldValue: "branchCode", fieldLabel: "address", selected: department, setSelected: (value) => handleChange({ department: value }), label: "\u0410\u0434\u0440\u0435\u0441", placeholder: "\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u0430\u0434\u0440\u0435\u0441" }) })] }));
|
|
952
952
|
|
|
953
953
|
const addSpacesBetweenNumbers = (number) => new Intl.NumberFormat('ru-RU', {}).format(number);
|
|
954
954
|
|
|
@@ -1832,6 +1832,16 @@
|
|
|
1832
1832
|
return Array.isArray(children) ? children.map(mapper) : mapper(children, 0);
|
|
1833
1833
|
};
|
|
1834
1834
|
|
|
1835
|
+
const HEADER_HEIGHT = 170;
|
|
1836
|
+
const FOOTER_HEIGHT = 48;
|
|
1837
|
+
const BLOCKS_GAP = 4;
|
|
1838
|
+
const PAGE_PADDINGS_X = 20;
|
|
1839
|
+
const DEFAULT_HEIGHT = 866;
|
|
1840
|
+
const getContainerHeight = (minHeight) => ({
|
|
1841
|
+
height: `calc(100vh - ${HEADER_HEIGHT + FOOTER_HEIGHT + BLOCKS_GAP + PAGE_PADDINGS_X}px)`,
|
|
1842
|
+
minHeight: `${minHeight || DEFAULT_HEIGHT}px`,
|
|
1843
|
+
});
|
|
1844
|
+
|
|
1835
1845
|
const SwipeListItem = JSX(({ className = '', style, idx, activeIndex, observerOptions, children, onIntersection }) => {
|
|
1836
1846
|
const observerCallback = useCallback((entries) => {
|
|
1837
1847
|
if (entries.length && onIntersection) {
|
|
@@ -1843,8 +1853,7 @@
|
|
|
1843
1853
|
});
|
|
1844
1854
|
|
|
1845
1855
|
const childStyleMap = ['min-w-[100%]', 'min-w-[50%]', 'min-w-[33.33%]', 'min-w-[25%]'];
|
|
1846
|
-
const
|
|
1847
|
-
const SwipeListContainer = JSX(({ className = '', containerRef, activeIndex, visibleItemCount = 0, gap = 0, padding = 0, listType = 'horizontal-list', snapAlign = 'snap-center', children, onVisibleItemsChange, onVisibleIndicesChange, }) => {
|
|
1856
|
+
const SwipeListContainer = JSX(({ className = '', containerRef, activeIndex, visibleItemCount = 0, gap = 0, padding = 0, listType = 'horizontal-list', snapAlign = 'snap-center', minHeight, children, onVisibleItemsChange, onVisibleIndicesChange, }) => {
|
|
1848
1857
|
const observerOptions = {
|
|
1849
1858
|
sensitivity: 1,
|
|
1850
1859
|
rootRef: containerRef,
|
|
@@ -1862,14 +1871,10 @@
|
|
|
1862
1871
|
const isHorizontalList = listType === 'horizontal-list';
|
|
1863
1872
|
const containerStyle = {
|
|
1864
1873
|
...(isHorizontalList ? getContainerOffset(padding, additionPadding) : {}),
|
|
1865
|
-
...(isVerticalList ?
|
|
1874
|
+
...(isVerticalList ? getContainerHeight(minHeight) : {}),
|
|
1866
1875
|
gap: `${gap}px`,
|
|
1867
1876
|
};
|
|
1868
|
-
|
|
1869
|
-
...(isHorizontalList ? getContainerOffset(padding / 4) : {}),
|
|
1870
|
-
maxHeight: DEFAULT_HEIGHT,
|
|
1871
|
-
};
|
|
1872
|
-
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) }));
|
|
1877
|
+
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: isHorizontalList ? getContainerOffset(padding / 4) : {}, activeIndex: activeIndex, idx: idx, observerOptions: observerOptions, onIntersection: handleIntersection, children: child }, String(idx))))(children) }));
|
|
1873
1878
|
});
|
|
1874
1879
|
// Styles used to compensate outer container padding to get rid of clipping effect
|
|
1875
1880
|
const getContainerOffset = (padding, additionalPadding = 0) => ({
|
|
@@ -2101,13 +2106,12 @@
|
|
|
2101
2106
|
justify-between items-center group-hover/link:text-primary-main z-10`;
|
|
2102
2107
|
const LINK_BORDER_CLASS_NAME = 'bg-transparent border-white border h-[70px] absolute w-[316px] top-0';
|
|
2103
2108
|
const LinkButton = JSX(({ text, href = '', target = '', className = '' }) => {
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
}
|
|
2107
|
-
return (jsxs("div", { className: `relative group/link cursor-pointer w-[328px] h-[82px] ${className}`, children: [jsxs("a", { className: LINK_CLASS_NAME, role: "link", href: href, target: target, children: [jsx("div", { className: "p-0.5", children: text }), jsx("div", { className: "w-6 h-6", children: jsx(ImgInner, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border brightness-0 group-hover/link:brightness-100", image: { icon: 'ArrowRightIcon', iconVersion: 'black' }, imageClassName: "group-hover/link:text-primary-main", width: "24", height: "24", asSVG: true }) })] }), jsx("div", { className: `${LINK_BORDER_CLASS_NAME} mx-1.5 mt-1.5` }), jsx("div", { className: `${LINK_BORDER_CLASS_NAME} mt-3 mr-3` })] }));
|
|
2109
|
+
const link = useLink();
|
|
2110
|
+
const adjustedProps = link({ href, target });
|
|
2111
|
+
return text ? (jsxs("div", { className: `relative group/link cursor-pointer w-[328px] h-[82px] ${className}`, children: [jsxs("a", { className: LINK_CLASS_NAME, role: "link", ...adjustedProps, children: [jsx("div", { className: "p-0.5", children: text }), jsx("div", { className: "w-6 h-6", children: jsx(ImgInner, { className: "w-4 h-4 min-w-4 min-h-4 rounded-full box-border brightness-0 group-hover/link:brightness-100", image: { icon: 'ArrowRightIcon', iconVersion: 'black' }, imageClassName: "group-hover/link:text-primary-main", width: "24", height: "24", asSVG: true }) })] }), jsx("div", { className: `${LINK_BORDER_CLASS_NAME} mx-1.5 mt-1.5` }), jsx("div", { className: `${LINK_BORDER_CLASS_NAME} mt-3 mr-3` })] })) : null;
|
|
2108
2112
|
});
|
|
2109
2113
|
|
|
2110
|
-
const MAX_LINKS_COUNT =
|
|
2114
|
+
const MAX_LINKS_COUNT = 10;
|
|
2111
2115
|
const CarouselLinks = JSX(({ className = '', additionalDescription, description, links, title, version = 'secondary', ...rest }) => {
|
|
2112
2116
|
return (jsxs(BlockWrapper, { className: `flex w-full p-10 overflow-hidden justify-between ${className}`, version: version, ...rest, children: [jsxs("div", { className: "flex flex-col max-w-96 pr-9 text-white text-xl-light", children: [jsx(Headline, { className: "p-0", title: title, description: description, as: "h1", align: "text-left" }), additionalDescription ? (jsx("div", { className: "pt-6", children: jsx(Paragraph, { children: additionalDescription }) })) : null] }), links?.length ? renderLinks(links) : null] }));
|
|
2113
2117
|
});
|
|
@@ -3949,14 +3953,14 @@
|
|
|
3949
3953
|
and get rid of a clipping effect caused by overflow: hidden.
|
|
3950
3954
|
*/
|
|
3951
3955
|
const DEFAULT_PADDING = 16;
|
|
3952
|
-
const SwipeListControl = JSX(({ className = '', gap = DEFAULT_GAP, padding = DEFAULT_PADDING, showDots = true, children, onVisibleIndicesChange, listType = 'horizontal-list', }) => {
|
|
3956
|
+
const SwipeListControl = JSX(({ className = '', gap = DEFAULT_GAP, padding = DEFAULT_PADDING, showDots = true, minHeight, children, onVisibleIndicesChange, listType = 'horizontal-list', }) => {
|
|
3953
3957
|
const itemCount = Array.isArray(children) ? children.length : 0;
|
|
3954
3958
|
const [containerRef, scroll] = useSwipeListScroll({
|
|
3955
3959
|
itemCount,
|
|
3956
3960
|
onVisibleIndicesChange,
|
|
3957
3961
|
});
|
|
3958
3962
|
const [activeIndex] = scroll.visibleIndicesRange;
|
|
3959
|
-
return (jsxs("div", { className: style(className, listType === 'vertical-list' ? 'relative h-full' : ''), children: [jsx(SwipeListContainer, { containerRef: containerRef, activeIndex: activeIndex, visibleItemCount: 1, gap: gap, padding: padding, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, listType: listType, children: children }), showDots ? (jsx(SwipeListControlDots, { containerRef: containerRef, activeIndex: activeIndex, dotCount: itemCount, listType: listType })) : null] }));
|
|
3963
|
+
return (jsxs("div", { className: style(className, listType === 'vertical-list' ? 'relative h-full' : ''), children: [jsx(SwipeListContainer, { containerRef: containerRef, activeIndex: activeIndex, visibleItemCount: 1, gap: gap, padding: padding, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, listType: listType, minHeight: minHeight, children: children }), showDots ? (jsx(SwipeListControlDots, { containerRef: containerRef, activeIndex: activeIndex, dotCount: itemCount, listType: listType })) : null] }));
|
|
3960
3964
|
});
|
|
3961
3965
|
|
|
3962
3966
|
const SwipeListControlBlock = JSX(({ listType, showDots, options, ...rest }) => {
|
|
@@ -4523,7 +4527,7 @@
|
|
|
4523
4527
|
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" }) }));
|
|
4524
4528
|
}
|
|
4525
4529
|
|
|
4526
|
-
const packageVersion = "0.8.
|
|
4530
|
+
const packageVersion = "0.8.20";
|
|
4527
4531
|
|
|
4528
4532
|
exports.Blocks = Blocks;
|
|
4529
4533
|
exports.ContentPage = ContentPage;
|