@redneckz/wildless-cms-uni-blocks 0.14.47 → 0.14.49
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 +12 -12
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/RollupItem/{PrimaryFoldButton.d.ts → AccordionFoldButton.d.ts} +2 -2
- package/bundle/components/RollupItem/RollupItemContent.d.ts +6 -0
- package/dist/components/Depository/useDepository.js +2 -2
- package/dist/components/Depository/useDepository.js.map +1 -1
- package/dist/components/RollupItem/{PrimaryFoldButton.d.ts → AccordionFoldButton.d.ts} +2 -2
- package/dist/components/RollupItem/AccordionFoldButton.js +12 -0
- package/dist/components/RollupItem/AccordionFoldButton.js.map +1 -0
- package/dist/components/RollupItem/RollupItem.js +5 -5
- package/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/dist/components/RollupItem/RollupItemContent.d.ts +6 -0
- package/lib/components/Depository/useDepository.js +2 -2
- package/lib/components/Depository/useDepository.js.map +1 -1
- package/lib/components/RollupItem/{PrimaryFoldButton.d.ts → AccordionFoldButton.d.ts} +2 -2
- package/lib/components/RollupItem/AccordionFoldButton.js +10 -0
- package/lib/components/RollupItem/AccordionFoldButton.js.map +1 -0
- package/lib/components/RollupItem/RollupItem.fixture.d.ts +2 -2
- package/lib/components/RollupItem/RollupItem.js +5 -5
- package/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/lib/components/RollupItem/RollupItemContent.d.ts +6 -0
- package/lib/components/VerticalLayout/VerticalLayout.fixture.d.ts +1 -1
- package/mobile/bundle/bundle.umd.js +10 -10
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/RollupItem/{PrimaryFoldButton.d.ts → AccordionFoldButton.d.ts} +2 -2
- package/mobile/bundle/components/RollupItem/RollupItemContent.d.ts +6 -0
- package/mobile/dist/components/Depository/useDepository.js +2 -2
- package/mobile/dist/components/Depository/useDepository.js.map +1 -1
- package/mobile/dist/components/RollupItem/AccordionFoldButton.d.ts +12 -0
- package/mobile/dist/components/RollupItem/AccordionFoldButton.js +12 -0
- package/mobile/dist/components/RollupItem/AccordionFoldButton.js.map +1 -0
- package/mobile/dist/components/RollupItem/RollupItem.js +5 -5
- package/mobile/dist/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/dist/components/RollupItem/RollupItemContent.d.ts +6 -0
- package/mobile/lib/components/Depository/useDepository.js +2 -2
- package/mobile/lib/components/Depository/useDepository.js.map +1 -1
- package/mobile/lib/components/RollupItem/AccordionFoldButton.d.ts +12 -0
- package/mobile/lib/components/RollupItem/AccordionFoldButton.js +10 -0
- package/mobile/lib/components/RollupItem/AccordionFoldButton.js.map +1 -0
- package/mobile/lib/components/RollupItem/RollupItem.js +5 -5
- package/mobile/lib/components/RollupItem/RollupItem.js.map +1 -1
- package/mobile/lib/components/RollupItem/RollupItemContent.d.ts +6 -0
- package/mobile/src/components/Depository/useDepository.ts +2 -2
- package/mobile/src/components/RollupItem/{PrimaryFoldButton.tsx → AccordionFoldButton.tsx} +2 -2
- package/mobile/src/components/RollupItem/RollupItem.example.json +2 -1
- package/mobile/src/components/RollupItem/RollupItem.tsx +8 -9
- package/mobile/src/components/RollupItem/RollupItemContent.ts +7 -0
- package/package.json +1 -1
- package/src/components/Depository/useDepository.ts +2 -2
- package/src/components/RollupItem/{PrimaryFoldButton.tsx → AccordionFoldButton.tsx} +2 -2
- package/src/components/RollupItem/RollupItem.example.json +2 -1
- package/src/components/RollupItem/RollupItem.fixture.mobile.tsx +1 -1
- package/src/components/RollupItem/RollupItem.fixture.tsx +6 -6
- package/src/components/RollupItem/RollupItem.tsx +8 -9
- package/src/components/RollupItem/RollupItemContent.ts +7 -0
- package/src/components/VerticalLayout/VerticalLayout.fixture.tsx +29 -28
- package/dist/components/RollupItem/PrimaryFoldButton.js +0 -12
- package/dist/components/RollupItem/PrimaryFoldButton.js.map +0 -1
- package/lib/components/RollupItem/PrimaryFoldButton.js +0 -10
- package/lib/components/RollupItem/PrimaryFoldButton.js.map +0 -1
- package/mobile/dist/components/RollupItem/PrimaryFoldButton.d.ts +0 -12
- package/mobile/dist/components/RollupItem/PrimaryFoldButton.js +0 -12
- package/mobile/dist/components/RollupItem/PrimaryFoldButton.js.map +0 -1
- package/mobile/lib/components/RollupItem/PrimaryFoldButton.d.ts +0 -12
- package/mobile/lib/components/RollupItem/PrimaryFoldButton.js +0 -10
- package/mobile/lib/components/RollupItem/PrimaryFoldButton.js.map +0 -1
package/mobile/bundle/components/RollupItem/{PrimaryFoldButton.d.ts → AccordionFoldButton.d.ts}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { type IconName } from '../../icons/IconName';
|
|
2
2
|
import { type Picture } from '../../model/Picture';
|
|
3
3
|
import { type IconBgVersion } from '../../ui-kit/Icon/IconProps';
|
|
4
|
-
interface
|
|
4
|
+
interface RollupButtonProps {
|
|
5
5
|
label?: string;
|
|
6
6
|
labelIcon?: Picture;
|
|
7
7
|
labelIconBgVersion?: IconBgVersion;
|
|
8
8
|
icon?: IconName;
|
|
9
9
|
onToggle?: () => void;
|
|
10
10
|
}
|
|
11
|
-
export declare const
|
|
11
|
+
export declare const AccordionFoldButton: import("@redneckz/uni-jsx").UNIComponent<RollupButtonProps, any, any>;
|
|
12
12
|
export {};
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { type LabelProps } from '../../model/HeadlineType';
|
|
2
2
|
import { type UniBlockContent } from '../../model/JSXBlock';
|
|
3
|
+
/**
|
|
4
|
+
* @title Вид кнопки сворачивания
|
|
5
|
+
* @enumNames ["Основная", "Аккордион"]
|
|
6
|
+
*/
|
|
7
|
+
export declare type FoldButtonVersion = 'default' | 'accordion';
|
|
3
8
|
/**
|
|
4
9
|
* @title Сворачивающаяся секция
|
|
5
10
|
*/
|
|
@@ -8,4 +13,5 @@ export declare type RollupItemContent = UniBlockContent & LabelProps & {
|
|
|
8
13
|
isExpanded?: boolean;
|
|
9
14
|
/** @title Кнопка сверху */
|
|
10
15
|
isFoldButtonOnTop?: boolean;
|
|
16
|
+
foldButtonVersion?: FoldButtonVersion;
|
|
11
17
|
};
|
|
@@ -11,8 +11,8 @@ const useDepository = ({ size, page, query, startDate, endDate }) => {
|
|
|
11
11
|
searchParams.set('page', String(page));
|
|
12
12
|
searchParams.set('size', String(size));
|
|
13
13
|
searchParams.set('query', query);
|
|
14
|
-
searchParams.set('
|
|
15
|
-
searchParams.set('
|
|
14
|
+
searchParams.set('timestampStart', formatStartDate);
|
|
15
|
+
searchParams.set('timestampEnd', formatEndDate);
|
|
16
16
|
const queryString = `?${searchParams.toString()}`;
|
|
17
17
|
const { data } = (0, useAsyncData_1.useAsyncData)(DEPOSITARY_URL + queryString, fetchJSON_1.fetchJSONUnsafe);
|
|
18
18
|
return { items: data?.content, totalPages: data?.totalPages };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDepository.js","sourceRoot":"","sources":["../../../src/components/Depository/useDepository.ts"],"names":[],"mappings":";;AAAA,2EAAwE;AACxE,qDAAwD;AACxD,uDAAoD;AAmBpD,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAErC,MAAM,aAAa,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAuB,EAAE,EAAE;IAC9F,MAAM,eAAe,GAAG,SAAS,CAAC,CAAC,CAAC,IAAA,uBAAU,EAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACrE,MAAM,aAAa,GAAG,OAAO,CAAC,CAAC,CAAC,IAAA,uBAAU,EAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAE/D,MAAM,YAAY,GAAG,IAAI,eAAe,CAAC,cAAc,CAAC,CAAC;IAEzD,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAA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AG,WAAW,EAAE,2BAAe,CAAC,CAAC;IAE7F,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AAChE,CAAC,CAAC;AAjBW,QAAA,aAAa,iBAiBxB"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type IconName } from '../../icons/IconName';
|
|
2
|
+
import { type Picture } from '../../model/Picture';
|
|
3
|
+
import { type IconBgVersion } from '../../ui-kit/Icon/IconProps';
|
|
4
|
+
interface RollupButtonProps {
|
|
5
|
+
label?: string;
|
|
6
|
+
labelIcon?: Picture;
|
|
7
|
+
labelIconBgVersion?: IconBgVersion;
|
|
8
|
+
icon?: IconName;
|
|
9
|
+
onToggle?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const AccordionFoldButton: import("@redneckz/uni-jsx").UNIComponent<RollupButtonProps, any, any>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2
|
+
exports.AccordionFoldButton = void 0;
|
|
3
|
+
const jsx_runtime_1 = require("@redneckz/uni-jsx/jsx-runtime");
|
|
4
|
+
const uni_jsx_1 = require("@redneckz/uni-jsx");
|
|
5
|
+
const Icon_1 = require("../../ui-kit/Icon/Icon");
|
|
6
|
+
const Text_1 = require("../../ui-kit/Text/Text");
|
|
7
|
+
const TextWithIcon_1 = require("../../ui-kit/TextWithIcon/TextWithIcon");
|
|
8
|
+
const style_1 = require("../../utils/style");
|
|
9
|
+
const renderRoundedIcon_1 = require("./renderRoundedIcon");
|
|
10
|
+
const rollupIconVersion_1 = require("./rollupIconVersion");
|
|
11
|
+
exports.AccordionFoldButton = (0, uni_jsx_1.JSX)(({ label, labelIconBgVersion, icon, onToggle, labelIcon }) => ((0, jsx_runtime_1.jsx)(TextWithIcon_1.TextWithIcon, { tag: "button", className: (0, style_1.style)('border-none bg-transparent items-center group/button', labelIcon?.icon ? 'py-xs' : 'py-lg'), onClick: onToggle, textNode: (0, jsx_runtime_1.jsxs)("div", { className: "flex items-center text-start group-hover/button:text-primary-main gap-s", children: [(0, renderRoundedIcon_1.renderRoundedIcon)(labelIcon, labelIconBgVersion), label ? ((0, jsx_runtime_1.jsx)(Text_1.Text, { size: "text-h6", font: "font-normal", children: label })) : null] }), iconNode: icon ? (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: icon, iconVersion: rollupIconVersion_1.rollupIconVersion, width: "24", height: "24" }) : null })));
|
|
12
|
+
//# sourceMappingURL=AccordionFoldButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccordionFoldButton.js","sourceRoot":"","sources":["../../../src/components/RollupItem/AccordionFoldButton.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AAGxC,iDAA8C;AAE9C,iDAA8C;AAC9C,yEAAsE;AACtE,6CAA0C;AAC1C,2DAAwD;AACxD,2DAAwD;AAU3C,QAAA,mBAAmB,GAAG,IAAA,aAAG,EACpC,CAAC,EAAE,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAC5D,uBAAC,2BAAY,IACX,GAAG,EAAC,QAAQ,EACZ,SAAS,EAAE,IAAA,aAAK,EACd,sDAAsD,EACtD,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CACpC,EACD,OAAO,EAAE,QAAQ,EACjB,QAAQ,EACN,iCAAK,SAAS,EAAC,yEAAyE,aACrF,IAAA,qCAAiB,EAAC,SAAS,EAAE,kBAAkB,CAAC,EAChD,KAAK,CAAC,CAAC,CAAC,CACP,uBAAC,WAAI,IAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,aAAa,YACpC,KAAK,GACD,CACR,CAAC,CAAC,CAAC,IAAI,IACJ,EAER,QAAQ,EACN,IAAI,CAAC,CAAC,CAAC,uBAAC,WAAI,IAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,qCAAiB,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,GAE3F,CACH,CACF,CAAC"}
|
|
@@ -8,15 +8,15 @@ const DefaultFoldButton_1 = require("../../ui-kit/Foldable/DefaultFoldButton");
|
|
|
8
8
|
const Foldable_1 = require("../../ui-kit/Foldable/Foldable");
|
|
9
9
|
const FoldableSection_1 = require("../../ui-kit/Foldable/FoldableSection");
|
|
10
10
|
const style_1 = require("../../utils/style");
|
|
11
|
+
const AccordionFoldButton_1 = require("./AccordionFoldButton");
|
|
11
12
|
const foldableSectionStyles_1 = require("./foldableSectionStyles");
|
|
12
13
|
const getIconName_1 = require("./getIconName");
|
|
13
|
-
const PrimaryFoldButton_1 = require("./PrimaryFoldButton");
|
|
14
14
|
const rollupItemStyles_1 = require("./rollupItemStyles");
|
|
15
|
-
exports.RollupItem = (0, uni_jsx_1.JSX)(({ className = '', isExpanded, isFoldButtonOnTop = true, label = 'Развернуть', labelIcon, labelIconBgVersion,
|
|
15
|
+
exports.RollupItem = (0, uni_jsx_1.JSX)(({ className = '', isExpanded, isFoldButtonOnTop = true, label = 'Развернуть', labelIcon, labelIconBgVersion, foldButtonVersion = 'accordion', ...rest }) => ((0, jsx_runtime_1.jsx)(BlockWrapper_1.BlockWrapper, { className: (0, style_1.style)('w-full', rollupItemStyles_1.rollupItemStyles, className), defaultPadding: "p-0", tag: "div", version: "transparent", ...rest, children: (0, jsx_runtime_1.jsx)(Foldable_1.Foldable, { isFoldButtonOnTop: isFoldButtonOnTop, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => ((0, jsx_runtime_1.jsx)(FoldableSection_1.FoldableSection, { className: (0, style_1.style)('gap-lg', foldableSectionStyles_1.foldableSectionStyles), isUnfolded: isUnfolded, children: (0, renderChildren_1.renderChildren)({
|
|
16
16
|
...rest,
|
|
17
17
|
extraProps: { className: 'w-full', padding: 'p-0' },
|
|
18
18
|
}) })), renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton({
|
|
19
|
-
|
|
19
|
+
foldButtonVersion,
|
|
20
20
|
label,
|
|
21
21
|
labelIcon,
|
|
22
22
|
labelIconBgVersion,
|
|
@@ -26,9 +26,9 @@ exports.RollupItem = (0, uni_jsx_1.JSX)(({ className = '', isExpanded, isFoldBut
|
|
|
26
26
|
exports.RollupItem.childrenTypes = {
|
|
27
27
|
exclude: ['RollupItem'],
|
|
28
28
|
};
|
|
29
|
-
const renderFoldButton = ({
|
|
29
|
+
const renderFoldButton = ({ foldButtonVersion, label: defaultLabel, labelIcon, labelIconBgVersion, isUnfolded, onToggle, }) => {
|
|
30
30
|
const label = defaultLabel || (isUnfolded ? 'Скрыть' : 'Развернуть');
|
|
31
31
|
const icon = (0, getIconName_1.getIconName)(isUnfolded);
|
|
32
|
-
return
|
|
32
|
+
return foldButtonVersion === 'accordion' ? ((0, jsx_runtime_1.jsx)(AccordionFoldButton_1.AccordionFoldButton, { label: label, labelIcon: labelIcon, labelIconBgVersion: labelIconBgVersion, icon: icon, onToggle: onToggle })) : ((0, jsx_runtime_1.jsx)(DefaultFoldButton_1.DefaultFoldButton, { label: label, icon: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', onClick: onToggle }));
|
|
33
33
|
};
|
|
34
34
|
//# sourceMappingURL=RollupItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RollupItem.js","sourceRoot":"","sources":["../../../src/components/RollupItem/RollupItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uEAAoE;
|
|
1
|
+
{"version":3,"file":"RollupItem.js","sourceRoot":"","sources":["../../../src/components/RollupItem/RollupItem.tsx"],"names":[],"mappings":";;;AAAA,+CAAwC;AACxC,uEAAoE;AAGpE,4DAAyD;AACzD,+EAA4E;AAC5E,6DAA0D;AAE1D,2EAAwE;AAExE,6CAA0C;AAC1C,+D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,EACV,QAAQ,GACQ,EAAE,EAAE;IACpB,MAAM,KAAK,GAAG,YAAY,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;IACrE,MAAM,IAAI,GAAG,IAAA,yBAAW,EAAC,UAAU,CAAC,CAAC;IAErC,OAAO,iBAAiB,KAAK,WAAW,CAAC,CAAC,CAAC,CACzC,uBAAC,yCAAmB,IAClB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,kBAAkB,EAAE,kBAAkB,EACtC,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC,CAAC,CAAC,CACF,uBAAC,qCAAiB,IAChB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,eAAe,EAClD,OAAO,EAAE,QAAQ,GACjB,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { type LabelProps } from '../../model/HeadlineType';
|
|
2
2
|
import { type UniBlockContent } from '../../model/JSXBlock';
|
|
3
|
+
/**
|
|
4
|
+
* @title Вид кнопки сворачивания
|
|
5
|
+
* @enumNames ["Основная", "Аккордион"]
|
|
6
|
+
*/
|
|
7
|
+
export declare type FoldButtonVersion = 'default' | 'accordion';
|
|
3
8
|
/**
|
|
4
9
|
* @title Сворачивающаяся секция
|
|
5
10
|
*/
|
|
@@ -8,4 +13,5 @@ export declare type RollupItemContent = UniBlockContent & LabelProps & {
|
|
|
8
13
|
isExpanded?: boolean;
|
|
9
14
|
/** @title Кнопка сверху */
|
|
10
15
|
isFoldButtonOnTop?: boolean;
|
|
16
|
+
foldButtonVersion?: FoldButtonVersion;
|
|
11
17
|
};
|
|
@@ -9,8 +9,8 @@ export const useDepository = ({ size, page, query, startDate, endDate }) => {
|
|
|
9
9
|
searchParams.set('page', String(page));
|
|
10
10
|
searchParams.set('size', String(size));
|
|
11
11
|
searchParams.set('query', query);
|
|
12
|
-
searchParams.set('
|
|
13
|
-
searchParams.set('
|
|
12
|
+
searchParams.set('timestampStart', formatStartDate);
|
|
13
|
+
searchParams.set('timestampEnd', formatEndDate);
|
|
14
14
|
const queryString = `?${searchParams.toString()}`;
|
|
15
15
|
const { data } = useAsyncData(DEPOSITARY_URL + queryString, fetchJSONUnsafe);
|
|
16
16
|
return { items: data?.content, totalPages: data?.totalPages };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDepository.js","sourceRoot":"","sources":["../../../src/components/Depository/useDepository.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,0CAA0C,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAmBpD,MAAM,cAAc,GAAG,oBAAoB,CAAC;AAE5C,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAuB,EAAE,EAAE;IAC9F,MAAM,eAAe,GAAG,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACrE,MAAM,aAAa,GAAG,OAAO,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAE/D,MAAM,YAAY,GAAG,IAAI,eAAe,CAAC,cAAc,CAAC,CAAC;IAEzD,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IACvC,YAAY,CAAC,GAAG,CAAC,MAAM,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC;IACvC,YAAY,CAAC,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;IACjC,YAA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,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,UAAU,EAAE,CAAC;AAChE,CAAC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type IconName } from '../../icons/IconName';
|
|
2
|
+
import { type Picture } from '../../model/Picture';
|
|
3
|
+
import { type IconBgVersion } from '../../ui-kit/Icon/IconProps';
|
|
4
|
+
interface RollupButtonProps {
|
|
5
|
+
label?: string;
|
|
6
|
+
labelIcon?: Picture;
|
|
7
|
+
labelIconBgVersion?: IconBgVersion;
|
|
8
|
+
icon?: IconName;
|
|
9
|
+
onToggle?: () => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const AccordionFoldButton: import("@redneckz/uni-jsx").UNIComponent<RollupButtonProps, any, any>;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "@redneckz/uni-jsx/jsx-runtime";
|
|
2
|
+
import { JSX } from '@redneckz/uni-jsx';
|
|
3
|
+
import { Icon } from '../../ui-kit/Icon/Icon.js';
|
|
4
|
+
import { Text } from '../../ui-kit/Text/Text.js';
|
|
5
|
+
import { TextWithIcon } from '../../ui-kit/TextWithIcon/TextWithIcon.js';
|
|
6
|
+
import { style } from '../../utils/style.js';
|
|
7
|
+
import { renderRoundedIcon } from './renderRoundedIcon.js';
|
|
8
|
+
import { rollupIconVersion } from './rollupIconVersion.js';
|
|
9
|
+
export const AccordionFoldButton = JSX(({ label, labelIconBgVersion, icon, onToggle, labelIcon }) => (_jsx(TextWithIcon, { tag: "button", className: style('border-none bg-transparent items-center group/button', labelIcon?.icon ? 'py-xs' : 'py-lg'), onClick: onToggle, textNode: _jsxs("div", { className: "flex items-center text-start group-hover/button:text-primary-main gap-s", children: [renderRoundedIcon(labelIcon, labelIconBgVersion), label ? (_jsx(Text, { size: "text-h6", font: "font-normal", children: label })) : null] }), iconNode: icon ? _jsx(Icon, { name: icon, iconVersion: rollupIconVersion, width: "24", height: "24" }) : null })));
|
|
10
|
+
//# sourceMappingURL=AccordionFoldButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AccordionFoldButton.js","sourceRoot":"","sources":["../../../src/components/RollupItem/AccordionFoldButton.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAE9C,OAAO,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AAC9C,OAAO,EAAE,YAAY,EAAE,MAAM,wCAAwC,CAAC;AACtE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAUxD,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,CACpC,CAAC,EAAE,KAAK,EAAE,kBAAkB,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,CAC5D,KAAC,YAAY,IACX,GAAG,EAAC,QAAQ,EACZ,SAAS,EAAE,KAAK,CACd,sDAAsD,EACtD,SAAS,EAAE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,OAAO,CACpC,EACD,OAAO,EAAE,QAAQ,EACjB,QAAQ,EACN,eAAK,SAAS,EAAC,yEAAyE,aACrF,iBAAiB,CAAC,SAAS,EAAE,kBAAkB,CAAC,EAChD,KAAK,CAAC,CAAC,CAAC,CACP,KAAC,IAAI,IAAC,IAAI,EAAC,SAAS,EAAC,IAAI,EAAC,aAAa,YACpC,KAAK,GACD,CACR,CAAC,CAAC,CAAC,IAAI,IACJ,EAER,QAAQ,EACN,IAAI,CAAC,CAAC,CAAC,KAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,WAAW,EAAE,iBAAiB,EAAE,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,GAAG,CAAC,CAAC,CAAC,IAAI,GAE3F,CACH,CACF,CAAC"}
|
|
@@ -6,15 +6,15 @@ import { DefaultFoldButton } from '../../ui-kit/Foldable/DefaultFoldButton.js';
|
|
|
6
6
|
import { Foldable } from '../../ui-kit/Foldable/Foldable.js';
|
|
7
7
|
import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection.js';
|
|
8
8
|
import { style } from '../../utils/style.js';
|
|
9
|
+
import { AccordionFoldButton } from './AccordionFoldButton.js';
|
|
9
10
|
import { foldableSectionStyles } from './foldableSectionStyles.js';
|
|
10
11
|
import { getIconName } from './getIconName.js';
|
|
11
|
-
import { PrimaryFoldButton } from './PrimaryFoldButton.js';
|
|
12
12
|
import { rollupItemStyles } from './rollupItemStyles.js';
|
|
13
|
-
export const RollupItem = JSX(({ className = '', isExpanded, isFoldButtonOnTop = true, label = 'Развернуть', labelIcon, labelIconBgVersion,
|
|
13
|
+
export const RollupItem = JSX(({ className = '', isExpanded, isFoldButtonOnTop = true, label = 'Развернуть', labelIcon, labelIconBgVersion, foldButtonVersion = 'accordion', ...rest }) => (_jsx(BlockWrapper, { className: style('w-full', rollupItemStyles, className), defaultPadding: "p-0", tag: "div", version: "transparent", ...rest, children: _jsx(Foldable, { isFoldButtonOnTop: isFoldButtonOnTop, unfoldedByDefault: isExpanded, renderFoldableSection: ({ isUnfolded }) => (_jsx(FoldableSection, { className: style('gap-lg', foldableSectionStyles), isUnfolded: isUnfolded, children: renderChildren({
|
|
14
14
|
...rest,
|
|
15
15
|
extraProps: { className: 'w-full', padding: 'p-0' },
|
|
16
16
|
}) })), renderFoldButton: ({ isUnfolded, onToggle }) => renderFoldButton({
|
|
17
|
-
|
|
17
|
+
foldButtonVersion,
|
|
18
18
|
label,
|
|
19
19
|
labelIcon,
|
|
20
20
|
labelIconBgVersion,
|
|
@@ -24,9 +24,9 @@ export const RollupItem = JSX(({ className = '', isExpanded, isFoldButtonOnTop =
|
|
|
24
24
|
RollupItem.childrenTypes = {
|
|
25
25
|
exclude: ['RollupItem'],
|
|
26
26
|
};
|
|
27
|
-
const renderFoldButton = ({
|
|
27
|
+
const renderFoldButton = ({ foldButtonVersion, label: defaultLabel, labelIcon, labelIconBgVersion, isUnfolded, onToggle, }) => {
|
|
28
28
|
const label = defaultLabel || (isUnfolded ? 'Скрыть' : 'Развернуть');
|
|
29
29
|
const icon = getIconName(isUnfolded);
|
|
30
|
-
return
|
|
30
|
+
return foldButtonVersion === 'accordion' ? (_jsx(AccordionFoldButton, { label: label, labelIcon: labelIcon, labelIconBgVersion: labelIconBgVersion, icon: icon, onToggle: onToggle })) : (_jsx(DefaultFoldButton, { label: label, icon: isUnfolded ? 'ArrowUpIcon' : 'ArrowDownIcon', onClick: onToggle }));
|
|
31
31
|
};
|
|
32
32
|
//# sourceMappingURL=RollupItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RollupItem.js","sourceRoot":"","sources":["../../../src/components/RollupItem/RollupItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;
|
|
1
|
+
{"version":3,"file":"RollupItem.js","sourceRoot":"","sources":["../../../src/components/RollupItem/RollupItem.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAGpE,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,yCAAyC,CAAC;AAC5E,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAE1D,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAExE,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,O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AY,CAAC;CACxB,CAAC;AAUF,MAAM,gBAAgB,GAAG,CAAC,EACxB,iBAAiB,EACjB,KAAK,EAAE,YAAY,EACnB,SAAS,EACT,kBAAkB,EAClB,UAAU,EACV,QAAQ,GACQ,EAAE,EAAE;IACpB,MAAM,KAAK,GAAG,YAAY,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC;IACrE,MAAM,IAAI,GAAG,WAAW,CAAC,UAAU,CAAC,CAAC;IAErC,OAAO,iBAAiB,KAAK,WAAW,CAAC,CAAC,CAAC,CACzC,KAAC,mBAAmB,IAClB,KAAK,EAAE,KAAK,EACZ,SAAS,EAAE,SAAS,EACpB,kBAAkB,EAAE,kBAAkB,EACtC,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,GAClB,CACH,CAAC,CAAC,CAAC,CACF,KAAC,iBAAiB,IAChB,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,eAAe,EAClD,OAAO,EAAE,QAAQ,GACjB,CACH,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
import { type LabelProps } from '../../model/HeadlineType';
|
|
2
2
|
import { type UniBlockContent } from '../../model/JSXBlock';
|
|
3
|
+
/**
|
|
4
|
+
* @title Вид кнопки сворачивания
|
|
5
|
+
* @enumNames ["Основная", "Аккордион"]
|
|
6
|
+
*/
|
|
7
|
+
export declare type FoldButtonVersion = 'default' | 'accordion';
|
|
3
8
|
/**
|
|
4
9
|
* @title Сворачивающаяся секция
|
|
5
10
|
*/
|
|
@@ -8,4 +13,5 @@ export declare type RollupItemContent = UniBlockContent & LabelProps & {
|
|
|
8
13
|
isExpanded?: boolean;
|
|
9
14
|
/** @title Кнопка сверху */
|
|
10
15
|
isFoldButtonOnTop?: boolean;
|
|
16
|
+
foldButtonVersion?: FoldButtonVersion;
|
|
11
17
|
};
|
|
@@ -30,8 +30,8 @@ export const useDepository = ({ size, page, query, startDate, endDate }: UseDepo
|
|
|
30
30
|
searchParams.set('page', String(page));
|
|
31
31
|
searchParams.set('size', String(size));
|
|
32
32
|
searchParams.set('query', query);
|
|
33
|
-
searchParams.set('
|
|
34
|
-
searchParams.set('
|
|
33
|
+
searchParams.set('timestampStart', formatStartDate);
|
|
34
|
+
searchParams.set('timestampEnd', formatEndDate);
|
|
35
35
|
|
|
36
36
|
const queryString = `?${searchParams.toString()}`;
|
|
37
37
|
|
|
@@ -9,7 +9,7 @@ import { style } from '../../utils/style';
|
|
|
9
9
|
import { renderRoundedIcon } from './renderRoundedIcon';
|
|
10
10
|
import { rollupIconVersion } from './rollupIconVersion';
|
|
11
11
|
|
|
12
|
-
interface
|
|
12
|
+
interface RollupButtonProps {
|
|
13
13
|
label?: string;
|
|
14
14
|
labelIcon?: Picture;
|
|
15
15
|
labelIconBgVersion?: IconBgVersion;
|
|
@@ -17,7 +17,7 @@ interface PrimaryFoldButtonProps {
|
|
|
17
17
|
onToggle?: () => void;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
export const
|
|
20
|
+
export const AccordionFoldButton = JSX<RollupButtonProps>(
|
|
21
21
|
({ label, labelIconBgVersion, icon, onToggle, labelIcon }) => (
|
|
22
22
|
<TextWithIcon
|
|
23
23
|
tag="button"
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { renderChildren } from '../../BlockRenderer/renderChildren';
|
|
3
|
-
import { type BlockVersion } from '../../model/BlockVersion';
|
|
4
3
|
import { type JSXBlock, type UniBlockProps } from '../../model/JSXBlock';
|
|
5
4
|
import { type Picture } from '../../model/Picture';
|
|
6
5
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
@@ -10,10 +9,10 @@ import { type FoldablePartProps } from '../../ui-kit/Foldable/FoldablePartProps'
|
|
|
10
9
|
import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection';
|
|
11
10
|
import { type IconBgVersion, type IconProps } from '../../ui-kit/Icon/IconProps';
|
|
12
11
|
import { style } from '../../utils/style';
|
|
12
|
+
import { AccordionFoldButton } from './AccordionFoldButton';
|
|
13
13
|
import { foldableSectionStyles } from './foldableSectionStyles';
|
|
14
14
|
import { getIconName } from './getIconName';
|
|
15
|
-
import {
|
|
16
|
-
import { type RollupItemContent } from './RollupItemContent';
|
|
15
|
+
import { type FoldButtonVersion, type RollupItemContent } from './RollupItemContent';
|
|
17
16
|
import { rollupItemStyles } from './rollupItemStyles';
|
|
18
17
|
|
|
19
18
|
interface RollupItemProps extends RollupItemContent, UniBlockProps {
|
|
@@ -29,7 +28,7 @@ export const RollupItem: JSXBlock<RollupItemProps> = JSX<RollupItemProps>(
|
|
|
29
28
|
label = 'Развернуть',
|
|
30
29
|
labelIcon,
|
|
31
30
|
labelIconBgVersion,
|
|
32
|
-
|
|
31
|
+
foldButtonVersion = 'accordion',
|
|
33
32
|
...rest
|
|
34
33
|
}) => (
|
|
35
34
|
<BlockWrapper
|
|
@@ -55,7 +54,7 @@ export const RollupItem: JSXBlock<RollupItemProps> = JSX<RollupItemProps>(
|
|
|
55
54
|
)}
|
|
56
55
|
renderFoldButton={({ isUnfolded, onToggle }) =>
|
|
57
56
|
renderFoldButton({
|
|
58
|
-
|
|
57
|
+
foldButtonVersion,
|
|
59
58
|
label,
|
|
60
59
|
labelIcon,
|
|
61
60
|
labelIconBgVersion,
|
|
@@ -73,7 +72,7 @@ RollupItem.childrenTypes = {
|
|
|
73
72
|
};
|
|
74
73
|
|
|
75
74
|
interface FoldButtonProps extends FoldablePartProps {
|
|
76
|
-
|
|
75
|
+
foldButtonVersion?: FoldButtonVersion;
|
|
77
76
|
label?: string;
|
|
78
77
|
labelIcon?: IconProps;
|
|
79
78
|
labelIconBgVersion?: IconBgVersion;
|
|
@@ -81,7 +80,7 @@ interface FoldButtonProps extends FoldablePartProps {
|
|
|
81
80
|
}
|
|
82
81
|
|
|
83
82
|
const renderFoldButton = ({
|
|
84
|
-
|
|
83
|
+
foldButtonVersion,
|
|
85
84
|
label: defaultLabel,
|
|
86
85
|
labelIcon,
|
|
87
86
|
labelIconBgVersion,
|
|
@@ -91,8 +90,8 @@ const renderFoldButton = ({
|
|
|
91
90
|
const label = defaultLabel || (isUnfolded ? 'Скрыть' : 'Развернуть');
|
|
92
91
|
const icon = getIconName(isUnfolded);
|
|
93
92
|
|
|
94
|
-
return
|
|
95
|
-
<
|
|
93
|
+
return foldButtonVersion === 'accordion' ? (
|
|
94
|
+
<AccordionFoldButton
|
|
96
95
|
label={label}
|
|
97
96
|
labelIcon={labelIcon}
|
|
98
97
|
labelIconBgVersion={labelIconBgVersion}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { type LabelProps } from '../../model/HeadlineType';
|
|
2
2
|
import { type UniBlockContent } from '../../model/JSXBlock';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @title Вид кнопки сворачивания
|
|
6
|
+
* @enumNames ["Основная", "Аккордион"]
|
|
7
|
+
*/
|
|
8
|
+
export type FoldButtonVersion = 'default' | 'accordion';
|
|
9
|
+
|
|
4
10
|
/**
|
|
5
11
|
* @title Сворачивающаяся секция
|
|
6
12
|
*/
|
|
@@ -10,4 +16,5 @@ export type RollupItemContent = UniBlockContent &
|
|
|
10
16
|
isExpanded?: boolean;
|
|
11
17
|
/** @title Кнопка сверху */
|
|
12
18
|
isFoldButtonOnTop?: boolean;
|
|
19
|
+
foldButtonVersion?: FoldButtonVersion;
|
|
13
20
|
};
|
package/package.json
CHANGED
|
@@ -30,8 +30,8 @@ export const useDepository = ({ size, page, query, startDate, endDate }: UseDepo
|
|
|
30
30
|
searchParams.set('page', String(page));
|
|
31
31
|
searchParams.set('size', String(size));
|
|
32
32
|
searchParams.set('query', query);
|
|
33
|
-
searchParams.set('
|
|
34
|
-
searchParams.set('
|
|
33
|
+
searchParams.set('timestampStart', formatStartDate);
|
|
34
|
+
searchParams.set('timestampEnd', formatEndDate);
|
|
35
35
|
|
|
36
36
|
const queryString = `?${searchParams.toString()}`;
|
|
37
37
|
|
|
@@ -9,7 +9,7 @@ import { style } from '../../utils/style';
|
|
|
9
9
|
import { renderRoundedIcon } from './renderRoundedIcon';
|
|
10
10
|
import { rollupIconVersion } from './rollupIconVersion';
|
|
11
11
|
|
|
12
|
-
interface
|
|
12
|
+
interface RollupButtonProps {
|
|
13
13
|
label?: string;
|
|
14
14
|
labelIcon?: Picture;
|
|
15
15
|
labelIconBgVersion?: IconBgVersion;
|
|
@@ -17,7 +17,7 @@ interface PrimaryFoldButtonProps {
|
|
|
17
17
|
onToggle?: () => void;
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
export const
|
|
20
|
+
export const AccordionFoldButton = JSX<RollupButtonProps>(
|
|
21
21
|
({ label, labelIconBgVersion, icon, onToggle, labelIcon }) => (
|
|
22
22
|
<TextWithIcon
|
|
23
23
|
tag="button"
|
|
@@ -13,7 +13,9 @@ export default {
|
|
|
13
13
|
default: (
|
|
14
14
|
<RollupItem
|
|
15
15
|
label="Rollup button 1"
|
|
16
|
-
|
|
16
|
+
foldButtonVersion="default"
|
|
17
|
+
isFoldButtonOnTop={false}
|
|
18
|
+
isExpanded={false}
|
|
17
19
|
block={{
|
|
18
20
|
type: 'RollupItem',
|
|
19
21
|
blocks: [
|
|
@@ -24,11 +26,9 @@ export default {
|
|
|
24
26
|
options={options}
|
|
25
27
|
/>
|
|
26
28
|
),
|
|
27
|
-
|
|
29
|
+
accordion: (
|
|
28
30
|
<RollupItem
|
|
29
31
|
label="Rollup button 2"
|
|
30
|
-
version="secondary"
|
|
31
|
-
isFoldButtonOnTop={false}
|
|
32
32
|
isExpanded={true}
|
|
33
33
|
block={{
|
|
34
34
|
type: 'RollupItem',
|
|
@@ -40,10 +40,10 @@ export default {
|
|
|
40
40
|
options={options}
|
|
41
41
|
/>
|
|
42
42
|
),
|
|
43
|
-
'
|
|
43
|
+
'default-open': (
|
|
44
44
|
<RollupItem
|
|
45
|
-
version="secondary"
|
|
46
45
|
label="Rollup button 2"
|
|
46
|
+
foldButtonVersion="default"
|
|
47
47
|
isExpanded={true}
|
|
48
48
|
block={{
|
|
49
49
|
type: 'RollupItem',
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { JSX } from '@redneckz/uni-jsx';
|
|
2
2
|
import { renderChildren } from '../../BlockRenderer/renderChildren';
|
|
3
|
-
import { type BlockVersion } from '../../model/BlockVersion';
|
|
4
3
|
import { type JSXBlock, type UniBlockProps } from '../../model/JSXBlock';
|
|
5
4
|
import { type Picture } from '../../model/Picture';
|
|
6
5
|
import { BlockWrapper } from '../../ui-kit/BlockWrapper';
|
|
@@ -10,10 +9,10 @@ import { type FoldablePartProps } from '../../ui-kit/Foldable/FoldablePartProps'
|
|
|
10
9
|
import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection';
|
|
11
10
|
import { type IconBgVersion, type IconProps } from '../../ui-kit/Icon/IconProps';
|
|
12
11
|
import { style } from '../../utils/style';
|
|
12
|
+
import { AccordionFoldButton } from './AccordionFoldButton';
|
|
13
13
|
import { foldableSectionStyles } from './foldableSectionStyles';
|
|
14
14
|
import { getIconName } from './getIconName';
|
|
15
|
-
import {
|
|
16
|
-
import { type RollupItemContent } from './RollupItemContent';
|
|
15
|
+
import { type FoldButtonVersion, type RollupItemContent } from './RollupItemContent';
|
|
17
16
|
import { rollupItemStyles } from './rollupItemStyles';
|
|
18
17
|
|
|
19
18
|
interface RollupItemProps extends RollupItemContent, UniBlockProps {
|
|
@@ -29,7 +28,7 @@ export const RollupItem: JSXBlock<RollupItemProps> = JSX<RollupItemProps>(
|
|
|
29
28
|
label = 'Развернуть',
|
|
30
29
|
labelIcon,
|
|
31
30
|
labelIconBgVersion,
|
|
32
|
-
|
|
31
|
+
foldButtonVersion = 'accordion',
|
|
33
32
|
...rest
|
|
34
33
|
}) => (
|
|
35
34
|
<BlockWrapper
|
|
@@ -55,7 +54,7 @@ export const RollupItem: JSXBlock<RollupItemProps> = JSX<RollupItemProps>(
|
|
|
55
54
|
)}
|
|
56
55
|
renderFoldButton={({ isUnfolded, onToggle }) =>
|
|
57
56
|
renderFoldButton({
|
|
58
|
-
|
|
57
|
+
foldButtonVersion,
|
|
59
58
|
label,
|
|
60
59
|
labelIcon,
|
|
61
60
|
labelIconBgVersion,
|
|
@@ -73,7 +72,7 @@ RollupItem.childrenTypes = {
|
|
|
73
72
|
};
|
|
74
73
|
|
|
75
74
|
interface FoldButtonProps extends FoldablePartProps {
|
|
76
|
-
|
|
75
|
+
foldButtonVersion?: FoldButtonVersion;
|
|
77
76
|
label?: string;
|
|
78
77
|
labelIcon?: IconProps;
|
|
79
78
|
labelIconBgVersion?: IconBgVersion;
|
|
@@ -81,7 +80,7 @@ interface FoldButtonProps extends FoldablePartProps {
|
|
|
81
80
|
}
|
|
82
81
|
|
|
83
82
|
const renderFoldButton = ({
|
|
84
|
-
|
|
83
|
+
foldButtonVersion,
|
|
85
84
|
label: defaultLabel,
|
|
86
85
|
labelIcon,
|
|
87
86
|
labelIconBgVersion,
|
|
@@ -91,8 +90,8 @@ const renderFoldButton = ({
|
|
|
91
90
|
const label = defaultLabel || (isUnfolded ? 'Скрыть' : 'Развернуть');
|
|
92
91
|
const icon = getIconName(isUnfolded);
|
|
93
92
|
|
|
94
|
-
return
|
|
95
|
-
<
|
|
93
|
+
return foldButtonVersion === 'accordion' ? (
|
|
94
|
+
<AccordionFoldButton
|
|
96
95
|
label={label}
|
|
97
96
|
labelIcon={labelIcon}
|
|
98
97
|
labelIconBgVersion={labelIconBgVersion}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
import { type LabelProps } from '../../model/HeadlineType';
|
|
2
2
|
import { type UniBlockContent } from '../../model/JSXBlock';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* @title Вид кнопки сворачивания
|
|
6
|
+
* @enumNames ["Основная", "Аккордион"]
|
|
7
|
+
*/
|
|
8
|
+
export type FoldButtonVersion = 'default' | 'accordion';
|
|
9
|
+
|
|
4
10
|
/**
|
|
5
11
|
* @title Сворачивающаяся секция
|
|
6
12
|
*/
|
|
@@ -10,4 +16,5 @@ export type RollupItemContent = UniBlockContent &
|
|
|
10
16
|
isExpanded?: boolean;
|
|
11
17
|
/** @title Кнопка сверху */
|
|
12
18
|
isFoldButtonOnTop?: boolean;
|
|
19
|
+
foldButtonVersion?: FoldButtonVersion;
|
|
13
20
|
};
|