@redneckz/wildless-cms-uni-blocks 0.14.233 → 0.14.234

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.
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { type LinkButtonVersion } from '../../model/LinkButtonVersion';
3
- export declare function renderBackwardButton(version: LinkButtonVersion, handleClick: () => void): JSX.Element;
3
+ export declare function renderBackwardButton(version: LinkButtonVersion, handleClick: () => void, alwaysVisible?: boolean): JSX.Element;
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { type LinkButtonVersion } from '../../model/LinkButtonVersion';
3
- export declare function renderBackwardButton(version: LinkButtonVersion, handleClick: () => void): JSX.Element;
3
+ export declare function renderBackwardButton(version: LinkButtonVersion, handleClick: () => void, alwaysVisible?: boolean): JSX.Element;
@@ -4,11 +4,12 @@ const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
4
4
  const Img_1 = require("../../ui-kit/Img/Img");
5
5
  const getRegularButtonClasses_1 = require("../../ui-kit/LinkButton/getRegularButtonClasses");
6
6
  const LinkButton_1 = require("../../ui-kit/LinkButton/LinkButton");
7
- function renderBackwardButton(version, handleClick) {
7
+ const style_1 = require("../../utils/style");
8
+ function renderBackwardButton(version, handleClick, alwaysVisible = false) {
8
9
  const iconVersion = version === 'primary' ? 'white' : 'black';
9
10
  const className = 'w-12 h-12 min-h-12 min-w-12 flex items-center justify-center';
10
11
  const text = 'Вернуться назад';
11
- return ((0, jsx_runtime_1.jsxs)("div", { className: "hidden sm:flex items-center gap-s", children: [(0, jsx_runtime_1.jsx)("div", { className: (0, getRegularButtonClasses_1.getRegularButtonClasses)({ className, version, rounded: true }), onClick: handleClick, children: (0, jsx_runtime_1.jsx)(Img_1.Img, { className: "w-4 h-4", image: {
12
+ return ((0, jsx_runtime_1.jsxs)("div", { className: (0, style_1.style)(alwaysVisible ? 'flex' : 'hidden sm:flex', 'items-center gap-s'), children: [(0, jsx_runtime_1.jsx)("div", { className: (0, getRegularButtonClasses_1.getRegularButtonClasses)({ className, version, rounded: true }), onClick: handleClick, children: (0, jsx_runtime_1.jsx)(Img_1.Img, { className: "w-4 h-4", image: {
12
13
  icon: 'ArrowLeftIcon',
13
14
  iconVersion: iconVersion,
14
15
  } }) }), (0, jsx_runtime_1.jsx)(LinkButton_1.LinkButton, { version: "link", className: "group-data-secondary:text-white/80", text: text, ariaLabel: text, onClick: handleClick, type: "button" })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"renderBackwardButton.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/renderBackwardButton.tsx"],"names":[],"mappings":";;;AACA,8CAA2C;AAC3C,6FAA0F;AAC1F,mEAAgE;AAEhE,SAAgB,oBAAoB,CAAC,OAA0B,EAAE,WAAuB;IACtF,MAAM,WAAW,GAAG,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IAC9D,MAAM,SAAS,GAAG,8DAA8D,CAAC;IACjF,MAAM,IAAI,GAAG,iBAAiB,CAAC;IAE/B,OAAO,CACL,iCAAK,SAAS,EAAC,mCAAmC,aAChD,gCACE,SAAS,EAAE,IAAA,iDAAuB,EAAC,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EACzE,OAAO,EAAE,WAAW,YAEpB,uBAAC,SAAG,IACF,SAAS,EAAC,SAAS,EACnB,KAAK,EAAE;wBACL,IAAI,EAAE,eAAe;wBACrB,WAAW,EAAE,WAAW;qBACzB,GACD,GACE,EACN,uBAAC,uBAAU,IACT,OAAO,EAAC,MAAM,EACd,SAAS,EAAC,oCAAoC,EAC9C,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,IAAI,EACf,OAAO,EAAE,WAAW,EACpB,IAAI,EAAC,QAAQ,GACb,IACE,CACP,CAAC;AACJ,CAAC;AA7BD,oDA6BC"}
1
+ {"version":3,"file":"renderBackwardButton.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/renderBackwardButton.tsx"],"names":[],"mappings":";;;AACA,8CAA2C;AAC3C,6FAA0F;AAC1F,mEAAgE;AAChE,6CAA0C;AAE1C,SAAgB,oBAAoB,CAClC,OAA0B,EAC1B,WAAuB,EACvB,aAAa,GAAG,KAAK;IAErB,MAAM,WAAW,GAAG,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IAC9D,MAAM,SAAS,GAAG,8DAA8D,CAAC;IACjF,MAAM,IAAI,GAAG,iBAAiB,CAAC;IAE/B,OAAO,CACL,iCAAK,SAAS,EAAE,IAAA,aAAK,EAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,gBAAgB,EAAE,oBAAoB,CAAC,aACpF,gCACE,SAAS,EAAE,IAAA,iDAAuB,EAAC,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EACzE,OAAO,EAAE,WAAW,YAEpB,uBAAC,SAAG,IACF,SAAS,EAAC,SAAS,EACnB,KAAK,EAAE;wBACL,IAAI,EAAE,eAAe;wBACrB,WAAW,EAAE,WAAW;qBACzB,GACD,GACE,EACN,uBAAC,uBAAU,IACT,OAAO,EAAC,MAAM,EACd,SAAS,EAAC,oCAAoC,EAC9C,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,IAAI,EACf,OAAO,EAAE,WAAW,EACpB,IAAI,EAAC,QAAQ,GACb,IACE,CACP,CAAC;AACJ,CAAC;AAjCD,oDAiCC"}
@@ -1,3 +1,3 @@
1
1
  /// <reference types="react" />
2
2
  import { type LinkButtonVersion } from '../../model/LinkButtonVersion';
3
- export declare function renderBackwardButton(version: LinkButtonVersion, handleClick: () => void): JSX.Element;
3
+ export declare function renderBackwardButton(version: LinkButtonVersion, handleClick: () => void, alwaysVisible?: boolean): JSX.Element;
@@ -2,11 +2,12 @@ import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
2
2
  import { Img } from '../../ui-kit/Img/Img.js';
3
3
  import { getRegularButtonClasses } from '../../ui-kit/LinkButton/getRegularButtonClasses.js';
4
4
  import { LinkButton } from '../../ui-kit/LinkButton/LinkButton.js';
5
- export function renderBackwardButton(version, handleClick) {
5
+ import { style } from '../../utils/style.js';
6
+ export function renderBackwardButton(version, handleClick, alwaysVisible = false) {
6
7
  const iconVersion = version === 'primary' ? 'white' : 'black';
7
8
  const className = 'w-12 h-12 min-h-12 min-w-12 flex items-center justify-center';
8
9
  const text = 'Вернуться назад';
9
- return (_jsxs("div", { className: "hidden sm:flex items-center gap-s", children: [_jsx("div", { className: getRegularButtonClasses({ className, version, rounded: true }), onClick: handleClick, children: _jsx(Img, { className: "w-4 h-4", image: {
10
+ return (_jsxs("div", { className: style(alwaysVisible ? 'flex' : 'hidden sm:flex', 'items-center gap-s'), children: [_jsx("div", { className: getRegularButtonClasses({ className, version, rounded: true }), onClick: handleClick, children: _jsx(Img, { className: "w-4 h-4", image: {
10
11
  icon: 'ArrowLeftIcon',
11
12
  iconVersion: iconVersion,
12
13
  } }) }), _jsx(LinkButton, { version: "link", className: "group-data-secondary:text-white/80", text: text, ariaLabel: text, onClick: handleClick, type: "button" })] }));
@@ -1 +1 @@
1
- {"version":3,"file":"renderBackwardButton.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/renderBackwardButton.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,iDAAiD,CAAC;AAC1F,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAEhE,MAAM,UAAU,oBAAoB,CAAC,OAA0B,EAAE,WAAuB;IACtF,MAAM,WAAW,GAAG,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IAC9D,MAAM,SAAS,GAAG,8DAA8D,CAAC;IACjF,MAAM,IAAI,GAAG,iBAAiB,CAAC;IAE/B,OAAO,CACL,eAAK,SAAS,EAAC,mCAAmC,aAChD,cACE,SAAS,EAAE,uBAAuB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EACzE,OAAO,EAAE,WAAW,YAEpB,KAAC,GAAG,IACF,SAAS,EAAC,SAAS,EACnB,KAAK,EAAE;wBACL,IAAI,EAAE,eAAe;wBACrB,WAAW,EAAE,WAAW;qBACzB,GACD,GACE,EACN,KAAC,UAAU,IACT,OAAO,EAAC,MAAM,EACd,SAAS,EAAC,oCAAoC,EAC9C,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,IAAI,EACf,OAAO,EAAE,WAAW,EACpB,IAAI,EAAC,QAAQ,GACb,IACE,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"renderBackwardButton.js","sourceRoot":"","sources":["../../../src/components/ProductBlock/renderBackwardButton.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,EAAE,uBAAuB,EAAE,MAAM,iDAAiD,CAAC;AAC1F,OAAO,EAAE,UAAU,EAAE,MAAM,oCAAoC,CAAC;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAE1C,MAAM,UAAU,oBAAoB,CAClC,OAA0B,EAC1B,WAAuB,EACvB,aAAa,GAAG,KAAK;IAErB,MAAM,WAAW,GAAG,OAAO,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC;IAC9D,MAAM,SAAS,GAAG,8DAA8D,CAAC;IACjF,MAAM,IAAI,GAAG,iBAAiB,CAAC;IAE/B,OAAO,CACL,eAAK,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,gBAAgB,EAAE,oBAAoB,CAAC,aACpF,cACE,SAAS,EAAE,uBAAuB,CAAC,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,EACzE,OAAO,EAAE,WAAW,YAEpB,KAAC,GAAG,IACF,SAAS,EAAC,SAAS,EACnB,KAAK,EAAE;wBACL,IAAI,EAAE,eAAe;wBACrB,WAAW,EAAE,WAAW;qBACzB,GACD,GACE,EACN,KAAC,UAAU,IACT,OAAO,EAAC,MAAM,EACd,SAAS,EAAC,oCAAoC,EAC9C,IAAI,EAAE,IAAI,EACV,SAAS,EAAE,IAAI,EACf,OAAO,EAAE,WAAW,EACpB,IAAI,EAAC,QAAQ,GACb,IACE,CACP,CAAC;AACJ,CAAC"}
@@ -535,11 +535,11 @@
535
535
  const RegularButton = JSX(({ className = '', href, rel, target, ariaLabel, version, rounded, onClick, type, data, children, }) => (jsx("a", { className: getRegularButtonClasses({ className, version, rounded }), href: href, rel: rel, target: target, "aria-label": ariaLabel, role: href ? 'link' : 'button', onClick: onClick, type: type, ...dataAttributes(data), children: children })));
536
536
  const DisabledButton = JSX(({ className, ariaLabel, version, rounded, children }) => (jsx("button", { type: "button", "aria-disabled": "true", "aria-label": ariaLabel, tabIndex: -1, className: getDisabledButtonClasses({ className, rounded, version }), children: children })));
537
537
 
538
- function renderBackwardButton(version, handleClick) {
538
+ function renderBackwardButton(version, handleClick, alwaysVisible = false) {
539
539
  const iconVersion = version === 'primary' ? 'white' : 'black';
540
540
  const className = 'w-12 h-12 min-h-12 min-w-12 flex items-center justify-center';
541
541
  const text = 'Вернуться назад';
542
- return (jsxs("div", { className: "hidden sm:flex items-center gap-s", children: [jsx("div", { className: getRegularButtonClasses({ className, version, rounded: true }), onClick: handleClick, children: jsx(Img, { className: "w-4 h-4", image: {
542
+ return (jsxs("div", { className: style(alwaysVisible ? 'flex' : 'hidden sm:flex', 'items-center gap-s'), children: [jsx("div", { className: getRegularButtonClasses({ className, version, rounded: true }), onClick: handleClick, children: jsx(Img, { className: "w-4 h-4", image: {
543
543
  icon: 'ArrowLeftIcon',
544
544
  iconVersion: iconVersion,
545
545
  } }) }), jsx(LinkButton, { version: "link", className: "group-data-secondary:text-white/80", text: text, ariaLabel: text, onClick: handleClick, type: "button" })] }));
@@ -5641,7 +5641,7 @@
5641
5641
 
5642
5642
  const joinList = (sep) => (list) => list.reduce((acc, el, i) => (acc.length ? acc.concat({ ...sep, key: `sep-${i}` }, el) : [el]), []);
5643
5643
 
5644
- const packageVersion = "0.14.232";
5644
+ const packageVersion = "0.14.233";
5645
5645
 
5646
5646
  exports.Blocks = Blocks;
5647
5647
  exports.ContentPage = ContentPage;