@redneckz/wildless-cms-uni-blocks 0.5.13 → 0.5.14
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 +14 -18
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/components/Blocks.d.ts +2 -1
- package/bundle/components/OtherProducts/OtherProducts.d.ts +2 -1
- package/bundle/components/OtherProducts/OtherProductsContent.d.ts +1 -21
- package/bundle/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
- package/bundle/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
- package/dist/components/Blocks.d.ts +2 -1
- package/dist/components/Blocks.js +2 -0
- package/dist/components/Blocks.js.map +1 -1
- package/dist/components/ContentPage/renderBlock.js +7 -6
- package/dist/components/ContentPage/renderBlock.js.map +1 -1
- package/dist/components/OtherProducts/OtherProducts.d.ts +2 -1
- package/dist/components/OtherProducts/OtherProducts.js +2 -4
- package/dist/components/OtherProducts/OtherProducts.js.map +1 -1
- package/dist/components/OtherProducts/OtherProductsContent.d.ts +1 -21
- package/dist/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
- package/dist/components/OtherProductsItem/OtherProductsItem.js +11 -0
- package/dist/components/OtherProductsItem/OtherProductsItem.js.map +1 -0
- package/dist/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
- package/dist/components/OtherProductsItem/OtherProductsItemContent.js +2 -0
- package/dist/components/OtherProductsItem/OtherProductsItemContent.js.map +1 -0
- package/dist/ui-kit/Foldable/FoldableSection.js +1 -1
- package/dist/ui-kit/Foldable/FoldableSection.js.map +1 -1
- package/lib/components/Blocks.d.ts +2 -1
- package/lib/components/Blocks.js +2 -0
- package/lib/components/Blocks.js.map +1 -1
- package/lib/components/ContentPage/renderBlock.js +7 -6
- package/lib/components/ContentPage/renderBlock.js.map +1 -1
- package/lib/components/OtherProducts/OtherProducts.d.ts +2 -1
- package/lib/components/OtherProducts/OtherProducts.fixture.d.ts +1 -0
- package/lib/components/OtherProducts/OtherProducts.js +2 -4
- package/lib/components/OtherProducts/OtherProducts.js.map +1 -1
- package/lib/components/OtherProducts/OtherProductsContent.d.ts +1 -21
- package/lib/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
- package/lib/components/OtherProductsItem/OtherProductsItem.fixture.d.ts +5 -0
- package/lib/components/OtherProductsItem/OtherProductsItem.js +9 -0
- package/lib/components/OtherProductsItem/OtherProductsItem.js.map +1 -0
- package/lib/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
- package/lib/components/OtherProductsItem/OtherProductsItemContent.js +2 -0
- package/lib/components/OtherProductsItem/OtherProductsItemContent.js.map +1 -0
- package/lib/ui-kit/Foldable/FoldableSection.js +1 -1
- package/lib/ui-kit/Foldable/FoldableSection.js.map +1 -1
- package/mobile/bundle/bundle.umd.js +8 -7
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/components/OtherProducts/OtherProducts.d.ts +2 -1
- package/mobile/bundle/components/OtherProducts/OtherProductsContent.d.ts +1 -21
- package/mobile/bundle/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
- package/mobile/bundle/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
- package/mobile/dist/components/ContentPage/renderBlock.js +7 -6
- package/mobile/dist/components/ContentPage/renderBlock.js.map +1 -1
- package/mobile/dist/components/OtherProducts/OtherProducts.d.ts +2 -1
- package/mobile/dist/components/OtherProducts/OtherProducts.js +2 -4
- package/mobile/dist/components/OtherProducts/OtherProducts.js.map +1 -1
- package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +1 -21
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js +11 -0
- package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js.map +1 -0
- package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
- package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.js +2 -0
- package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.js.map +1 -0
- package/mobile/dist/ui-kit/Foldable/FoldableSection.js +1 -1
- package/mobile/dist/ui-kit/Foldable/FoldableSection.js.map +1 -1
- package/mobile/lib/components/ContentPage/renderBlock.js +7 -6
- package/mobile/lib/components/ContentPage/renderBlock.js.map +1 -1
- package/mobile/lib/components/OtherProducts/OtherProducts.d.ts +2 -1
- package/mobile/lib/components/OtherProducts/OtherProducts.js +2 -4
- package/mobile/lib/components/OtherProducts/OtherProducts.js.map +1 -1
- package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +1 -21
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js +9 -0
- package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js.map +1 -0
- package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
- package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.js +2 -0
- package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.js.map +1 -0
- package/mobile/lib/ui-kit/Foldable/FoldableSection.js +1 -1
- package/mobile/lib/ui-kit/Foldable/FoldableSection.js.map +1 -1
- package/mobile/src/components/ContentPage/renderBlock.tsx +14 -9
- package/mobile/src/components/OtherProducts/OtherProducts.example.json +1 -54
- package/mobile/src/components/OtherProducts/OtherProducts.tsx +13 -24
- package/mobile/src/components/OtherProducts/OtherProducts.ui.json +1 -76
- package/mobile/src/components/OtherProducts/OtherProductsContent.ts +1 -22
- package/mobile/src/components/OtherProductsItem/OtherProductsItem.example.json +3 -0
- package/mobile/src/components/OtherProductsItem/OtherProductsItem.tsx +39 -0
- package/mobile/src/components/OtherProductsItem/OtherProductsItem.ui.json +1 -0
- package/mobile/src/components/OtherProductsItem/OtherProductsItemContent.ts +17 -0
- package/mobile/src/ui-kit/Foldable/FoldableSection.tsx +1 -1
- package/package.json +1 -1
- package/src/components/Blocks.ts +2 -0
- package/src/components/ContentPage/renderBlock.tsx +14 -9
- package/src/components/OtherProducts/OtherProducts.example.json +1 -54
- package/src/components/OtherProducts/OtherProducts.fixture.tsx +77 -126
- package/src/components/OtherProducts/OtherProducts.tsx +13 -24
- package/src/components/OtherProducts/OtherProducts.ui.json +1 -76
- package/src/components/OtherProducts/OtherProductsContent.ts +1 -22
- package/src/components/OtherProductsItem/OtherProductsItem.example.json +3 -0
- package/src/components/OtherProductsItem/OtherProductsItem.fixture.tsx +5 -0
- package/src/components/OtherProductsItem/OtherProductsItem.tsx +39 -0
- package/src/components/OtherProductsItem/OtherProductsItem.ui.json +1 -0
- package/src/components/OtherProductsItem/OtherProductsItemContent.ts +17 -0
- package/src/ui-kit/Foldable/FoldableSection.tsx +1 -1
- package/bundle/components/OtherProducts/OtherProductsItem.d.ts +0 -6
- package/dist/components/OtherProducts/OtherProductsItem.d.ts +0 -6
- package/dist/components/OtherProducts/OtherProductsItem.js +0 -17
- package/dist/components/OtherProducts/OtherProductsItem.js.map +0 -1
- package/lib/components/OtherProducts/OtherProductsItem.d.ts +0 -6
- package/lib/components/OtherProducts/OtherProductsItem.js +0 -15
- package/lib/components/OtherProducts/OtherProductsItem.js.map +0 -1
- package/mobile/bundle/components/OtherProducts/OtherProductsItem.d.ts +0 -6
- package/mobile/dist/components/OtherProducts/OtherProductsItem.d.ts +0 -6
- package/mobile/dist/components/OtherProducts/OtherProductsItem.js +0 -17
- package/mobile/dist/components/OtherProducts/OtherProductsItem.js.map +0 -1
- package/mobile/lib/components/OtherProducts/OtherProductsItem.d.ts +0 -6
- package/mobile/lib/components/OtherProducts/OtherProductsItem.js +0 -15
- package/mobile/lib/components/OtherProducts/OtherProductsItem.js.map +0 -1
- package/mobile/src/components/OtherProducts/OtherProductsItem.tsx +0 -52
- package/src/components/OtherProducts/OtherProductsItem.tsx +0 -52
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import type { ColorPalette, UniBlockProps } from '../../model/ContentPageDef';
|
|
3
|
-
import type { VNode } from '../../model/VNode';
|
|
4
|
-
import { renderBlocksList } from '../../ui-kit/BlocksList/renderBlocksList';
|
|
5
|
-
import { DefaultFoldButton } from '../../ui-kit/Foldable/DefaultFoldButton';
|
|
6
|
-
import { Foldable } from '../../ui-kit/Foldable/Foldable';
|
|
7
|
-
import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection';
|
|
8
|
-
import type { IconName } from '../../ui-kit/Icon/IconProps';
|
|
9
|
-
import type { BlockItemCommonProps } from './OtherProductsContent';
|
|
10
|
-
|
|
11
|
-
export interface BlockItemProps extends BlockItemCommonProps, UniBlockProps {
|
|
12
|
-
dataTheme?: ColorPalette;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const icons: IconName[] = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
16
|
-
|
|
17
|
-
export const OtherProductsItem = JSX<BlockItemProps>(
|
|
18
|
-
({ label = '', blocks, context, dataTheme, isUnfolded: unfoldedByDefault }) => {
|
|
19
|
-
const foldableBlocks = renderBlocksList({
|
|
20
|
-
context,
|
|
21
|
-
blocks,
|
|
22
|
-
}) as VNode[];
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<div className="˝border-0 border-b border-solid border-main-divider">
|
|
26
|
-
{blocks?.length ? (
|
|
27
|
-
<Foldable
|
|
28
|
-
unfoldedByDefault={unfoldedByDefault}
|
|
29
|
-
renderFoldableSection={({ isUnfolded }) => (
|
|
30
|
-
<div className="box-border">
|
|
31
|
-
<FoldableSection
|
|
32
|
-
className="grid grid-cols-12 gap-1 border-box"
|
|
33
|
-
isUnfolded={isUnfolded}
|
|
34
|
-
>
|
|
35
|
-
{foldableBlocks}
|
|
36
|
-
</FoldableSection>
|
|
37
|
-
</div>
|
|
38
|
-
)}
|
|
39
|
-
renderFoldButton={({ isUnfolded, onToggle }) => (
|
|
40
|
-
<DefaultFoldButton
|
|
41
|
-
label={label}
|
|
42
|
-
icon={icons[Number(isUnfolded)]}
|
|
43
|
-
dataTheme={dataTheme}
|
|
44
|
-
onClick={onToggle}
|
|
45
|
-
/>
|
|
46
|
-
)}
|
|
47
|
-
/>
|
|
48
|
-
) : null}
|
|
49
|
-
</div>
|
|
50
|
-
);
|
|
51
|
-
},
|
|
52
|
-
);
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { JSX } from '@redneckz/uni-jsx';
|
|
2
|
-
import type { ColorPalette, UniBlockProps } from '../../model/ContentPageDef';
|
|
3
|
-
import type { VNode } from '../../model/VNode';
|
|
4
|
-
import { renderBlocksList } from '../../ui-kit/BlocksList/renderBlocksList';
|
|
5
|
-
import { DefaultFoldButton } from '../../ui-kit/Foldable/DefaultFoldButton';
|
|
6
|
-
import { Foldable } from '../../ui-kit/Foldable/Foldable';
|
|
7
|
-
import { FoldableSection } from '../../ui-kit/Foldable/FoldableSection';
|
|
8
|
-
import type { IconName } from '../../ui-kit/Icon/IconProps';
|
|
9
|
-
import type { BlockItemCommonProps } from './OtherProductsContent';
|
|
10
|
-
|
|
11
|
-
export interface BlockItemProps extends BlockItemCommonProps, UniBlockProps {
|
|
12
|
-
dataTheme?: ColorPalette;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const icons: IconName[] = ['ArrowDownIcon', 'ArrowUpIcon'];
|
|
16
|
-
|
|
17
|
-
export const OtherProductsItem = JSX<BlockItemProps>(
|
|
18
|
-
({ label = '', blocks, context, dataTheme, isUnfolded: unfoldedByDefault }) => {
|
|
19
|
-
const foldableBlocks = renderBlocksList({
|
|
20
|
-
context,
|
|
21
|
-
blocks,
|
|
22
|
-
}) as VNode[];
|
|
23
|
-
|
|
24
|
-
return (
|
|
25
|
-
<div className="˝border-0 border-b border-solid border-main-divider">
|
|
26
|
-
{blocks?.length ? (
|
|
27
|
-
<Foldable
|
|
28
|
-
unfoldedByDefault={unfoldedByDefault}
|
|
29
|
-
renderFoldableSection={({ isUnfolded }) => (
|
|
30
|
-
<div className="box-border">
|
|
31
|
-
<FoldableSection
|
|
32
|
-
className="grid grid-cols-12 gap-1 border-box"
|
|
33
|
-
isUnfolded={isUnfolded}
|
|
34
|
-
>
|
|
35
|
-
{foldableBlocks}
|
|
36
|
-
</FoldableSection>
|
|
37
|
-
</div>
|
|
38
|
-
)}
|
|
39
|
-
renderFoldButton={({ isUnfolded, onToggle }) => (
|
|
40
|
-
<DefaultFoldButton
|
|
41
|
-
label={label}
|
|
42
|
-
icon={icons[Number(isUnfolded)]}
|
|
43
|
-
dataTheme={dataTheme}
|
|
44
|
-
onClick={onToggle}
|
|
45
|
-
/>
|
|
46
|
-
)}
|
|
47
|
-
/>
|
|
48
|
-
) : null}
|
|
49
|
-
</div>
|
|
50
|
-
);
|
|
51
|
-
},
|
|
52
|
-
);
|