@redneckz/wildless-cms-uni-blocks 0.14.267 → 0.14.269

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 (47) hide show
  1. package/bundle/bundle.umd.js +10 -7
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/dist/components/ExchangeRateTile/CurrencyTable.js +7 -4
  4. package/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  5. package/dist/components/ExchangeRateTile/CurrentLocation.js +2 -1
  6. package/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  7. package/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
  8. package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  9. package/dist/components/TabsLayout/TabsLayout.js +1 -0
  10. package/dist/components/TabsLayout/TabsLayout.js.map +1 -1
  11. package/lib/common.css +1 -1
  12. package/lib/components/ExchangeRateTile/CurrencyTable.js +7 -4
  13. package/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  14. package/lib/components/ExchangeRateTile/CurrentLocation.js +2 -1
  15. package/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  16. package/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
  17. package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  18. package/lib/components/TabsLayout/TabsLayout.js +1 -0
  19. package/lib/components/TabsLayout/TabsLayout.js.map +1 -1
  20. package/mobile/bundle/bundle.umd.js +10 -7
  21. package/mobile/bundle/bundle.umd.min.js +1 -1
  22. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js +7 -4
  23. package/mobile/dist/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  24. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js +2 -1
  25. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  26. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
  27. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  28. package/mobile/dist/components/TabsLayout/TabsLayout.js +1 -0
  29. package/mobile/dist/components/TabsLayout/TabsLayout.js.map +1 -1
  30. package/mobile/lib/common.css +1 -1
  31. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js +7 -4
  32. package/mobile/lib/components/ExchangeRateTile/CurrencyTable.js.map +1 -1
  33. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js +2 -1
  34. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  35. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
  36. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  37. package/mobile/lib/components/TabsLayout/TabsLayout.js +1 -0
  38. package/mobile/lib/components/TabsLayout/TabsLayout.js.map +1 -1
  39. package/mobile/src/components/ExchangeRateTile/CurrencyTable.tsx +11 -8
  40. package/mobile/src/components/ExchangeRateTile/CurrentLocation.tsx +2 -1
  41. package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +2 -2
  42. package/mobile/src/components/TabsLayout/TabsLayout.tsx +1 -0
  43. package/package.json +1 -1
  44. package/src/components/ExchangeRateTile/CurrencyTable.tsx +11 -8
  45. package/src/components/ExchangeRateTile/CurrentLocation.tsx +2 -1
  46. package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +2 -2
  47. package/src/components/TabsLayout/TabsLayout.tsx +1 -0
@@ -3655,21 +3655,23 @@
3655
3655
  });
3656
3656
  const formatCurrency = (value) => (value ? currencyNumberFormat.format(value) : '');
3657
3657
 
3658
- const TABLE_HEAD_STYLE = 'text-left text-m font-light text-secondary-text';
3659
- const TABLE_HEAD_STYLE_WITH_PADDING = `${TABLE_HEAD_STYLE} pl-5xl`;
3658
+ const TABLE_STYLE_BASE = 'text-m font-light text-secondary-text ';
3659
+ const TABLE_HEAD_STYLE = `${TABLE_STYLE_BASE} text-left`;
3660
+ const TABLE_HEAD_STYLE_CENTER = `${TABLE_STYLE_BASE} pl-5xl text-center`;
3661
+ const TABLE_HEAD_STYLE_RIGHT = `${TABLE_STYLE_BASE} pl-5xl text-right`;
3660
3662
  const CURRENCY_ICONS_MAP = {
3661
3663
  USD: 'DollarIcon',
3662
3664
  EUR: 'EuroIcon',
3663
3665
  CNY: 'ChineseYuanRenminbiIcon',
3664
3666
  };
3665
- const CurrencyTable = JSX(({ className, exchangeCurrencyItems }) => (jsxs("table", { className: `h-fit w-fit ${className}`, children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { className: TABLE_HEAD_STYLE, children: jsx(Text, { size: "text-m", children: "\u0412\u0430\u043B\u044E\u0442\u0430" }) }), jsx("th", { className: TABLE_HEAD_STYLE_WITH_PADDING, children: jsx(Text, { size: "text-m", children: "\u041A\u0443\u043F\u0438\u0442\u044C" }) }), jsx("th", { className: TABLE_HEAD_STYLE_WITH_PADDING, children: jsx(Text, { size: "text-m", children: "\u041F\u0440\u043E\u0434\u0430\u0442\u044C" }) })] }) }), jsx("tbody", { children: exchangeCurrencyItems.map(renderCurrencyRow) })] })));
3667
+ const CurrencyTable = JSX(({ className, exchangeCurrencyItems }) => (jsxs("table", { className: style('h-fit w-full', className), children: [jsx("thead", { children: jsxs("tr", { children: [jsx("th", { className: TABLE_HEAD_STYLE, children: jsx(Text, { size: "text-m", children: "\u0412\u0430\u043B\u044E\u0442\u0430" }) }), jsx("th", { className: TABLE_HEAD_STYLE_CENTER, children: jsx(Text, { size: "text-m", children: "\u041A\u0443\u043F\u0438\u0442\u044C" }) }), jsx("th", { className: TABLE_HEAD_STYLE_RIGHT, children: jsx(Text, { size: "text-m", children: "\u041F\u0440\u043E\u0434\u0430\u0442\u044C" }) })] }) }), jsx("tbody", { children: exchangeCurrencyItems.map(renderCurrencyRow) })] })));
3666
3668
  const renderCurrencyRow = (exchangeCurrencyItem) => {
3667
3669
  const currency = exchangeCurrencyItem?.currency?.currency;
3668
- return (jsxs("tr", { className: "pb-2xs text-h6", children: [jsx("td", { className: "pt-m", children: jsxs("div", { className: "flex items-center gap-xs", children: [currency ? (jsx(Img, { image: { icon: CURRENCY_ICONS_MAP[currency] }, width: "24", height: "24" })) : null, jsx(Text, { size: "text-h6", children: currency })] }) }), jsx("td", { className: "pt-m pl-5xl", children: jsx(Text, { size: "text-h6", children: formatCurrency(exchangeCurrencyItem?.saleExchangeRate) }) }), jsx("td", { className: "pt-m pl-5xl", children: jsx(Text, { size: "text-h6", children: formatCurrency(exchangeCurrencyItem?.buyExchangeRate) }) })] }, currency));
3670
+ return (jsxs("tr", { className: "pb-2xs text-h6", children: [jsx("td", { className: "pt-m m-auto flex text-left", children: jsxs("div", { className: "flex items-center gap-xs", children: [currency ? (jsx(Img, { image: { icon: CURRENCY_ICONS_MAP[currency] }, width: "24", height: "24" })) : null, jsx(Text, { size: "text-h6", children: currency })] }) }), jsx("td", { className: "pt-m pl-5xl text-center", children: jsx(Text, { size: "text-h6", children: formatCurrency(exchangeCurrencyItem?.saleExchangeRate) }) }), jsx("td", { className: "pt-m pl-5xl text-right", children: jsx(Text, { size: "text-h6", children: formatCurrency(exchangeCurrencyItem?.buyExchangeRate) }) })] }, currency));
3669
3671
  };
3670
3672
 
3671
3673
  const icon = { icon: 'GpsIcon' };
3672
- const CurrentLocation = JSX(({ className = '', address }) => (jsxs("div", { className: `flex gap-s ${className}`, children: [jsx(RoundedIcon, { ...icon, iconBgVersion: "primary", className: "shrink-0" }), jsxs("div", { className: "space-y-2xs whitespace-pre-wrap", children: [address ? (jsx(Paragraph, { size: "text-l", color: "text-primary-main", children: address })) : null, jsx(Paragraph, { size: "text-m", color: "text-secondary-text", children: "\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u043D\u043D\u043E\u0433\u043E \u043E\u0444\u0438\u0441\u0430" })] })] })));
3674
+ const CurrentLocation = JSX(({ className = '', address }) => (jsxs("div", { className: style('flex gap-s w-full justify-between @sm:justify-center', className), children: [jsx(RoundedIcon, { ...icon, iconBgVersion: "primary", className: "shrink-0" }), jsxs("div", { className: "space-y-2xs whitespace-pre-wrap", children: [address ? (jsx(Paragraph, { size: "text-l", color: "text-primary-main", children: address })) : null, jsx(Paragraph, { size: "text-m", color: "text-secondary-text", children: "\u041A\u0443\u0440\u0441 \u0443\u043A\u0430\u0437\u0430\u043D \u0434\u043B\u044F \u0437\u0430\u0434\u0430\u043D\u043D\u043E\u0433\u043E \u043E\u0444\u0438\u0441\u0430" })] })] })));
3673
3675
 
3674
3676
  const roundTo = (value, precision = 2) => {
3675
3677
  const factor = 10 ** precision;
@@ -3791,7 +3793,7 @@
3791
3793
  currencyRatesBuy.unshift({ currency: { currency: Currency.RUB } });
3792
3794
  const currencyRatesSell = currencyRates.filter((_) => _.saleExchangeRate);
3793
3795
  currencyRatesSell.push({ currency: { currency: Currency.RUB } });
3794
- return (jsx(BlockWrapper, { className: style('box-border min-h-80', className), ...rest, children: jsx(BaseTile, { className: "h-full", title: jsx(Heading, { headingType: "h4", title: title, className: "whitespace-pre-wrap" }), children: jsxs("div", { className: "flex w-full gap-6xl flex-wrap sm:flex-nowrap", children: [jsxs("div", { className: "max-w-1/2", children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-xl", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation, { address: exchangeRates?.address })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow w-1/2", currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })) : null] }) }) }));
3796
+ return (jsx(BlockWrapper, { className: style('box-border min-h-80', className), ...rest, children: jsx(BaseTile, { className: "h-full", title: jsx(Heading, { headingType: "h4", title: title, className: "whitespace-pre-wrap" }), children: jsxs("div", { className: "flex w-full gap-6xl flex-wrap @lg:flex-nowrap", children: [jsxs("div", { className: "w-full @2xl:w-auto @5xl:w-1/2", children: [currencyRates ? (jsx(CurrencyTable, { className: "mb-xl", exchangeCurrencyItems: currencyRates })) : null, jsx(CurrentLocation, { address: exchangeRates?.address })] }), currencyRates.length && currencyRatesBuy.length && currencyRatesSell.length ? (jsx(ExchangeCurrencyCalculator, { className: "grow w-1/2", currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })) : null] }) }) }));
3795
3797
  });
3796
3798
  const getCurrencyRates = (currencies) => {
3797
3799
  return currencies?.filter((_) => [1, 2, 3].includes(_?.currency?.id)) || [];
@@ -5619,6 +5621,7 @@
5619
5621
  const [containerRef, scroll] = useSwipeListScroll({ itemCount });
5620
5622
  return (jsxs(BlockWrapper, { className: style(className), defaultPadding: "p-0", ...rest, children: [jsxs("div", { className: "relative border-b-8 border-primary-main", children: [jsx(SwipeListContainer, { itemClassName: "flex", containerRef: containerRef, snapAlign: "snap-end", gap: 8, onVisibleIndicesChange: scroll.handleVisibleIndicesChange, children: tabs.map(renderTabButton(activeTabIndex, setActiveTabIndex, tabAlign)) }), jsx(CarouselScrollButtons, { scroll: scroll, arrowsPadded: true, onScrollLeft: decActiveSlideIndex, onScrollRight: incActiveSlideIndex, activeIndex: activeSlideIndex, itemCount: itemCount })] }), jsx("div", { className: "space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs", children: tabs[activeTabIndex]?.href ? (jsx(TabsLayoutRedirectSection, { tab: tabs[activeTabIndex] })) : (renderBlocksList(block?.slots?.[slotName], {
5621
5623
  ...rest?.options,
5624
+ key: `${slotName}-${block?.type}`,
5622
5625
  slotName,
5623
5626
  parent: block,
5624
5627
  })) })] }));
@@ -6110,7 +6113,7 @@
6110
6113
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
6111
6114
  });
6112
6115
 
6113
- const packageVersion = "0.14.266";
6116
+ const packageVersion = "0.14.268";
6114
6117
 
6115
6118
  exports.Blocks = Blocks;
6116
6119
  exports.ContentPage = ContentPage;