@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.
Files changed (118) hide show
  1. package/bundle/blocks.schema.json +1 -1
  2. package/bundle/bundle.umd.js +14 -18
  3. package/bundle/bundle.umd.min.js +1 -1
  4. package/bundle/components/Blocks.d.ts +2 -1
  5. package/bundle/components/OtherProducts/OtherProducts.d.ts +2 -1
  6. package/bundle/components/OtherProducts/OtherProductsContent.d.ts +1 -21
  7. package/bundle/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
  8. package/bundle/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
  9. package/dist/components/Blocks.d.ts +2 -1
  10. package/dist/components/Blocks.js +2 -0
  11. package/dist/components/Blocks.js.map +1 -1
  12. package/dist/components/ContentPage/renderBlock.js +7 -6
  13. package/dist/components/ContentPage/renderBlock.js.map +1 -1
  14. package/dist/components/OtherProducts/OtherProducts.d.ts +2 -1
  15. package/dist/components/OtherProducts/OtherProducts.js +2 -4
  16. package/dist/components/OtherProducts/OtherProducts.js.map +1 -1
  17. package/dist/components/OtherProducts/OtherProductsContent.d.ts +1 -21
  18. package/dist/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
  19. package/dist/components/OtherProductsItem/OtherProductsItem.js +11 -0
  20. package/dist/components/OtherProductsItem/OtherProductsItem.js.map +1 -0
  21. package/dist/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
  22. package/dist/components/OtherProductsItem/OtherProductsItemContent.js +2 -0
  23. package/dist/components/OtherProductsItem/OtherProductsItemContent.js.map +1 -0
  24. package/dist/ui-kit/Foldable/FoldableSection.js +1 -1
  25. package/dist/ui-kit/Foldable/FoldableSection.js.map +1 -1
  26. package/lib/components/Blocks.d.ts +2 -1
  27. package/lib/components/Blocks.js +2 -0
  28. package/lib/components/Blocks.js.map +1 -1
  29. package/lib/components/ContentPage/renderBlock.js +7 -6
  30. package/lib/components/ContentPage/renderBlock.js.map +1 -1
  31. package/lib/components/OtherProducts/OtherProducts.d.ts +2 -1
  32. package/lib/components/OtherProducts/OtherProducts.fixture.d.ts +1 -0
  33. package/lib/components/OtherProducts/OtherProducts.js +2 -4
  34. package/lib/components/OtherProducts/OtherProducts.js.map +1 -1
  35. package/lib/components/OtherProducts/OtherProductsContent.d.ts +1 -21
  36. package/lib/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
  37. package/lib/components/OtherProductsItem/OtherProductsItem.fixture.d.ts +5 -0
  38. package/lib/components/OtherProductsItem/OtherProductsItem.js +9 -0
  39. package/lib/components/OtherProductsItem/OtherProductsItem.js.map +1 -0
  40. package/lib/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
  41. package/lib/components/OtherProductsItem/OtherProductsItemContent.js +2 -0
  42. package/lib/components/OtherProductsItem/OtherProductsItemContent.js.map +1 -0
  43. package/lib/ui-kit/Foldable/FoldableSection.js +1 -1
  44. package/lib/ui-kit/Foldable/FoldableSection.js.map +1 -1
  45. package/mobile/bundle/bundle.umd.js +8 -7
  46. package/mobile/bundle/bundle.umd.min.js +1 -1
  47. package/mobile/bundle/components/OtherProducts/OtherProducts.d.ts +2 -1
  48. package/mobile/bundle/components/OtherProducts/OtherProductsContent.d.ts +1 -21
  49. package/mobile/bundle/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
  50. package/mobile/bundle/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
  51. package/mobile/dist/components/ContentPage/renderBlock.js +7 -6
  52. package/mobile/dist/components/ContentPage/renderBlock.js.map +1 -1
  53. package/mobile/dist/components/OtherProducts/OtherProducts.d.ts +2 -1
  54. package/mobile/dist/components/OtherProducts/OtherProducts.js +2 -4
  55. package/mobile/dist/components/OtherProducts/OtherProducts.js.map +1 -1
  56. package/mobile/dist/components/OtherProducts/OtherProductsContent.d.ts +1 -21
  57. package/mobile/dist/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
  58. package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js +11 -0
  59. package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js.map +1 -0
  60. package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
  61. package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.js +2 -0
  62. package/mobile/dist/components/OtherProductsItem/OtherProductsItemContent.js.map +1 -0
  63. package/mobile/dist/ui-kit/Foldable/FoldableSection.js +1 -1
  64. package/mobile/dist/ui-kit/Foldable/FoldableSection.js.map +1 -1
  65. package/mobile/lib/components/ContentPage/renderBlock.js +7 -6
  66. package/mobile/lib/components/ContentPage/renderBlock.js.map +1 -1
  67. package/mobile/lib/components/OtherProducts/OtherProducts.d.ts +2 -1
  68. package/mobile/lib/components/OtherProducts/OtherProducts.js +2 -4
  69. package/mobile/lib/components/OtherProducts/OtherProducts.js.map +1 -1
  70. package/mobile/lib/components/OtherProducts/OtherProductsContent.d.ts +1 -21
  71. package/mobile/lib/components/OtherProductsItem/OtherProductsItem.d.ts +6 -0
  72. package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js +9 -0
  73. package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js.map +1 -0
  74. package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.d.ts +14 -0
  75. package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.js +2 -0
  76. package/mobile/lib/components/OtherProductsItem/OtherProductsItemContent.js.map +1 -0
  77. package/mobile/lib/ui-kit/Foldable/FoldableSection.js +1 -1
  78. package/mobile/lib/ui-kit/Foldable/FoldableSection.js.map +1 -1
  79. package/mobile/src/components/ContentPage/renderBlock.tsx +14 -9
  80. package/mobile/src/components/OtherProducts/OtherProducts.example.json +1 -54
  81. package/mobile/src/components/OtherProducts/OtherProducts.tsx +13 -24
  82. package/mobile/src/components/OtherProducts/OtherProducts.ui.json +1 -76
  83. package/mobile/src/components/OtherProducts/OtherProductsContent.ts +1 -22
  84. package/mobile/src/components/OtherProductsItem/OtherProductsItem.example.json +3 -0
  85. package/mobile/src/components/OtherProductsItem/OtherProductsItem.tsx +39 -0
  86. package/mobile/src/components/OtherProductsItem/OtherProductsItem.ui.json +1 -0
  87. package/mobile/src/components/OtherProductsItem/OtherProductsItemContent.ts +17 -0
  88. package/mobile/src/ui-kit/Foldable/FoldableSection.tsx +1 -1
  89. package/package.json +1 -1
  90. package/src/components/Blocks.ts +2 -0
  91. package/src/components/ContentPage/renderBlock.tsx +14 -9
  92. package/src/components/OtherProducts/OtherProducts.example.json +1 -54
  93. package/src/components/OtherProducts/OtherProducts.fixture.tsx +77 -126
  94. package/src/components/OtherProducts/OtherProducts.tsx +13 -24
  95. package/src/components/OtherProducts/OtherProducts.ui.json +1 -76
  96. package/src/components/OtherProducts/OtherProductsContent.ts +1 -22
  97. package/src/components/OtherProductsItem/OtherProductsItem.example.json +3 -0
  98. package/src/components/OtherProductsItem/OtherProductsItem.fixture.tsx +5 -0
  99. package/src/components/OtherProductsItem/OtherProductsItem.tsx +39 -0
  100. package/src/components/OtherProductsItem/OtherProductsItem.ui.json +1 -0
  101. package/src/components/OtherProductsItem/OtherProductsItemContent.ts +17 -0
  102. package/src/ui-kit/Foldable/FoldableSection.tsx +1 -1
  103. package/bundle/components/OtherProducts/OtherProductsItem.d.ts +0 -6
  104. package/dist/components/OtherProducts/OtherProductsItem.d.ts +0 -6
  105. package/dist/components/OtherProducts/OtherProductsItem.js +0 -17
  106. package/dist/components/OtherProducts/OtherProductsItem.js.map +0 -1
  107. package/lib/components/OtherProducts/OtherProductsItem.d.ts +0 -6
  108. package/lib/components/OtherProducts/OtherProductsItem.js +0 -15
  109. package/lib/components/OtherProducts/OtherProductsItem.js.map +0 -1
  110. package/mobile/bundle/components/OtherProducts/OtherProductsItem.d.ts +0 -6
  111. package/mobile/dist/components/OtherProducts/OtherProductsItem.d.ts +0 -6
  112. package/mobile/dist/components/OtherProducts/OtherProductsItem.js +0 -17
  113. package/mobile/dist/components/OtherProducts/OtherProductsItem.js.map +0 -1
  114. package/mobile/lib/components/OtherProducts/OtherProductsItem.d.ts +0 -6
  115. package/mobile/lib/components/OtherProducts/OtherProductsItem.js +0 -15
  116. package/mobile/lib/components/OtherProducts/OtherProductsItem.js.map +0 -1
  117. package/mobile/src/components/OtherProducts/OtherProductsItem.tsx +0 -52
  118. 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
- );