@redneckz/wildless-cms-uni-blocks 0.14.207 → 0.14.209

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 (87) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +7 -6
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/icons/IconName.d.ts +2 -2
  5. package/bundle/ui-kit/PreventableEvent.d.ts +1 -0
  6. package/cosmos-static/icons/HuaweiIcon.svg +1 -1
  7. package/cosmos-static/icons/sprites.svg +1 -1
  8. package/dist/components/ExchangeRateTile/CurrentLocation.js +1 -1
  9. package/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  10. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +1 -1
  11. package/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  12. package/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
  13. package/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  14. package/dist/icons/IconName.d.ts +2 -2
  15. package/dist/icons/IconName.js +2 -2
  16. package/dist/icons/IconName.js.map +1 -1
  17. package/dist/ui-kit/LinkButton/useFormSubmit.js +1 -0
  18. package/dist/ui-kit/LinkButton/useFormSubmit.js.map +1 -1
  19. package/dist/ui-kit/PreventableEvent.d.ts +1 -0
  20. package/dist/ui-kit/Select/Select.js +2 -2
  21. package/dist/ui-kit/Select/Select.js.map +1 -1
  22. package/lib/common.css +1 -1
  23. package/lib/components/ExchangeRateTile/CurrentLocation.js +1 -1
  24. package/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  25. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +1 -1
  26. package/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  27. package/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
  28. package/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  29. package/lib/icons/IconName.d.ts +2 -2
  30. package/lib/icons/IconName.js +2 -2
  31. package/lib/icons/IconName.js.map +1 -1
  32. package/lib/ui-kit/LinkButton/useFormSubmit.js +1 -0
  33. package/lib/ui-kit/LinkButton/useFormSubmit.js.map +1 -1
  34. package/lib/ui-kit/PreventableEvent.d.ts +1 -0
  35. package/lib/ui-kit/Select/Select.js +2 -2
  36. package/lib/ui-kit/Select/Select.js.map +1 -1
  37. package/mobile/bundle/bundle.umd.js +7 -6
  38. package/mobile/bundle/bundle.umd.min.js +1 -1
  39. package/mobile/bundle/icons/IconName.d.ts +2 -2
  40. package/mobile/bundle/ui-kit/PreventableEvent.d.ts +1 -0
  41. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js +1 -1
  42. package/mobile/dist/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  43. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +1 -1
  44. package/mobile/dist/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  45. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
  46. package/mobile/dist/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  47. package/mobile/dist/icons/IconName.d.ts +2 -2
  48. package/mobile/dist/icons/IconName.js +2 -2
  49. package/mobile/dist/icons/IconName.js.map +1 -1
  50. package/mobile/dist/ui-kit/LinkButton/useFormSubmit.js +1 -0
  51. package/mobile/dist/ui-kit/LinkButton/useFormSubmit.js.map +1 -1
  52. package/mobile/dist/ui-kit/PreventableEvent.d.ts +1 -0
  53. package/mobile/dist/ui-kit/Select/Select.js +2 -2
  54. package/mobile/dist/ui-kit/Select/Select.js.map +1 -1
  55. package/mobile/lib/common.css +1 -1
  56. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js +1 -1
  57. package/mobile/lib/components/ExchangeRateTile/CurrentLocation.js.map +1 -1
  58. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js +1 -1
  59. package/mobile/lib/components/ExchangeRateTile/ExchangeCurrencyCalculator.js.map +1 -1
  60. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js +1 -1
  61. package/mobile/lib/components/ExchangeRateTile/ExchangeRateTile.js.map +1 -1
  62. package/mobile/lib/icons/IconName.d.ts +2 -2
  63. package/mobile/lib/icons/IconName.js +2 -2
  64. package/mobile/lib/icons/IconName.js.map +1 -1
  65. package/mobile/lib/ui-kit/LinkButton/useFormSubmit.js +1 -0
  66. package/mobile/lib/ui-kit/LinkButton/useFormSubmit.js.map +1 -1
  67. package/mobile/lib/ui-kit/PreventableEvent.d.ts +1 -0
  68. package/mobile/lib/ui-kit/Select/Select.js +2 -2
  69. package/mobile/lib/ui-kit/Select/Select.js.map +1 -1
  70. package/mobile/src/components/ExchangeRateTile/CurrentLocation.tsx +2 -2
  71. package/mobile/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +1 -1
  72. package/mobile/src/components/ExchangeRateTile/ExchangeRateTile.tsx +3 -3
  73. package/mobile/src/icons/HuaweiIcon.svg +1 -3
  74. package/mobile/src/icons/IconName.ts +3 -3
  75. package/mobile/src/ui-kit/LinkButton/useFormSubmit.ts +1 -0
  76. package/mobile/src/ui-kit/PreventableEvent.ts +1 -0
  77. package/mobile/src/ui-kit/Select/Select.tsx +3 -5
  78. package/package.json +1 -1
  79. package/src/components/ExchangeRateTile/CurrentLocation.tsx +2 -2
  80. package/src/components/ExchangeRateTile/ExchangeCurrencyCalculator.tsx +1 -1
  81. package/src/components/ExchangeRateTile/ExchangeRateTile.tsx +3 -3
  82. package/src/components/MobileAppTile/MobileAppTile.fixture.tsx +3 -3
  83. package/src/icons/HuaweiIcon.svg +1 -3
  84. package/src/icons/IconName.ts +3 -2
  85. package/src/ui-kit/LinkButton/useFormSubmit.ts +1 -0
  86. package/src/ui-kit/PreventableEvent.ts +1 -0
  87. package/src/ui-kit/Select/Select.tsx +3 -5
@@ -498,6 +498,7 @@
498
498
  return;
499
499
  }
500
500
  ev.preventDefault();
501
+ ev.stopPropagation();
501
502
  const { origin, pathname, searchParams } = new URL(href || '');
502
503
  const form = document.createElement('form');
503
504
  form.setAttribute('method', 'POST');
@@ -1102,9 +1103,9 @@
1102
1103
  onClose: handleClose,
1103
1104
  iconVersion,
1104
1105
  });
1105
- return (jsxs("div", { className: style('space-y-xs', className), children: [renderLabel(label), jsxs("div", { className: style('relative', hasOpen ? 'z-20' : 'z-10'), ref: inputRef, children: [jsxs("div", { className: style('h-14 text-l flex justify-between items-center text-primary-text relative z-10', getStyle(isBorder, valid, isDisabled)), onClick: hasOpen ? handleClose : open, children: [jsx("p", { className: "p-m pr-8 flex items-center overflow-hidden text-ellipsis", children: formatOption(value) || placeholder }), renderIcon$1(hasOpen, iconVersion)] }), isSearch && hasOpen ? (jsx("div", { className: style('absolute top-0 w-full z-20'), children: jsx(Input, { type: "text", autoFocus: true, value: query, onChange: setQuery }) })) : null] })] }));
1106
+ return (jsxs("div", { className: style('space-y-xs', className), children: [renderLabel(label), jsxs("div", { className: style('relative', hasOpen ? 'z-20' : 'z-10'), ref: inputRef, children: [jsxs("div", { className: style('h-14 [&>*]:p-m pr-8 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden', getStyle(isBorder, valid, isDisabled)), onClick: hasOpen ? handleClose : open, children: [jsx("p", { className: "line-clamp-2 text-ellipsis", children: formatOption(value) || placeholder }), renderIcon$1(hasOpen, iconVersion)] }), isSearch && hasOpen ? (jsx("div", { className: style('absolute top-0 w-full z-20'), children: jsx(Input, { type: "text", autoFocus: true, value: query, onChange: setQuery }) })) : null] })] }));
1106
1107
  });
1107
- const renderIcon$1 = (isOpen, iconVersion) => (jsx(Icon, { className: style('absolute right-3', isOpen ? '' : 'rotate-180'), iconVersion: iconVersion, name: "ArrowUpIcon", width: "16", height: "16" }));
1108
+ const renderIcon$1 = (isOpen, iconVersion) => (jsx(Icon, { className: style('absolute right-3 flex self-center', isOpen ? '' : 'rotate-180'), iconVersion: iconVersion, name: "ArrowUpIcon", width: "16", height: "16" }));
1108
1109
  const getStyle = (isBorder, valid, disabled) => style(isBorder ? 'border rounded-md ' : '', isBorder && !disabled ? 'hover:border-primary-hover' : '', disabled ? 'bg-main-divider' : 'cursor-pointer ', valid ? 'border-gray' : 'border-error');
1109
1110
 
1110
1111
  const SelectControl = JSX(({ className = '', label, error, ...rest }) => (jsxs("div", { className: className, children: [jsx(Select, { ...rest, valid: !error, label: rest?.errors ? `${label}*` : label }), renderErrorText(error)] })));
@@ -3736,7 +3737,7 @@
3736
3737
  };
3737
3738
 
3738
3739
  const icon = { icon: 'GpsIcon' };
3739
- const CurrentLocation = JSX(({ className = '', address }) => (jsxs("div", { className: `flex gap-s ${className}`, children: [jsx(RoundedIcon, { ...icon, iconBgVersion: "primary" }), jsxs("div", { className: "space-y-2xs", 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" })] })] })));
3740
+ 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" })] })] })));
3740
3741
 
3741
3742
  const roundTo = (value, precision = 2) => {
3742
3743
  const factor = 10 ** precision;
@@ -3788,7 +3789,7 @@
3788
3789
  selectBuy: currencyRatesSell?.[0]?.currency?.currency || Currency.USD,
3789
3790
  });
3790
3791
  const handleSetCalcState = useCallback((newState) => setCalcState((oldState) => ({ ...oldState, ...newState })), []);
3791
- return (jsxs("div", { className: `grid gap-m pt-2xl ${className}`, children: [renderInput({
3792
+ return (jsxs("div", { className: `flex flex-col gap-m pt-2xl ${className}`, children: [renderInput({
3792
3793
  placeholder: 'Хочу продать',
3793
3794
  rates: currencyRatesSell,
3794
3795
  selected: calcState.selectSell,
@@ -3858,7 +3859,7 @@
3858
3859
  currencyRatesBuy.unshift({ currency: { currency: Currency.RUB } });
3859
3860
  const currencyRatesSell = currencyRates.filter((_) => _.saleExchangeRate);
3860
3861
  currencyRatesSell.push({ currency: { currency: Currency.RUB } });
3861
- 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 gap-6xl flex-wrap", children: [jsxs("div", { 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", currencyRatesBuy: currencyRatesBuy, currencyRatesSell: currencyRatesSell, button: button })) : null] }) }) }));
3862
+ 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] }) }) }));
3862
3863
  });
3863
3864
  const getCurrencyRates = (currencies) => {
3864
3865
  return currencies?.filter((_) => [1, 2, 3].includes(_?.currency?.id)) || [];
@@ -6054,7 +6055,7 @@
6054
6055
  slots: () => [HEADER_SLOT, FOOTER_SLOT, STICKY_FOOTER_SLOT],
6055
6056
  });
6056
6057
 
6057
- const packageVersion = "0.14.206";
6058
+ const packageVersion = "0.14.208";
6058
6059
 
6059
6060
  exports.Blocks = Blocks;
6060
6061
  exports.ContentPage = ContentPage;