@redneckz/wildless-cms-uni-blocks 0.7.8 → 0.7.9

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 (79) hide show
  1. package/bundle/bundle.umd.js +12 -6
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/bundle/ui-kit/SlideCheckbox/SlideCheckbox.d.ts +7 -0
  4. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
  5. package/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  6. package/dist/components/ErrorBlock/ErrorBlock.js +3 -1
  7. package/dist/components/ErrorBlock/ErrorBlock.js.map +1 -1
  8. package/dist/components/Header/DropdownMenu.js +4 -1
  9. package/dist/components/Header/DropdownMenu.js.map +1 -1
  10. package/dist/components/OtherProductsItem/OtherProductsItem.js +3 -1
  11. package/dist/components/OtherProductsItem/OtherProductsItem.js.map +1 -1
  12. package/dist/ui-kit/SlideCheckbox/SlideCheckbox.d.ts +7 -0
  13. package/dist/ui-kit/SlideCheckbox/SlideCheckbox.js +7 -0
  14. package/dist/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -0
  15. package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
  16. package/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  17. package/lib/common.css +1 -1
  18. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
  19. package/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  20. package/lib/components/ErrorBlock/ErrorBlock.js +3 -1
  21. package/lib/components/ErrorBlock/ErrorBlock.js.map +1 -1
  22. package/lib/components/Header/DropdownMenu.js +4 -1
  23. package/lib/components/Header/DropdownMenu.js.map +1 -1
  24. package/lib/components/OtherProductsItem/OtherProductsItem.js +3 -1
  25. package/lib/components/OtherProductsItem/OtherProductsItem.js.map +1 -1
  26. package/lib/components/SwipeListControlBlock/SwipeListControlBlock.fixture.d.ts +1 -0
  27. package/lib/ui-kit/SlideCheckbox/SlideCheckbox.d.ts +7 -0
  28. package/lib/ui-kit/SlideCheckbox/SlideCheckbox.fixture.d.ts +5 -0
  29. package/lib/ui-kit/SlideCheckbox/SlideCheckbox.js +5 -0
  30. package/lib/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -0
  31. package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
  32. package/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  33. package/mobile/bundle/bundle.umd.js +2 -2
  34. package/mobile/bundle/bundle.umd.min.js +1 -1
  35. package/mobile/bundle/ui-kit/SlideCheckbox/SlideCheckbox.d.ts +7 -0
  36. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
  37. package/mobile/dist/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  38. package/mobile/dist/components/ErrorBlock/ErrorBlock.js +3 -1
  39. package/mobile/dist/components/ErrorBlock/ErrorBlock.js.map +1 -1
  40. package/mobile/dist/components/Header/DropdownMenu.js +4 -1
  41. package/mobile/dist/components/Header/DropdownMenu.js.map +1 -1
  42. package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js +3 -1
  43. package/mobile/dist/components/OtherProductsItem/OtherProductsItem.js.map +1 -1
  44. package/mobile/dist/ui-kit/SlideCheckbox/SlideCheckbox.d.ts +7 -0
  45. package/mobile/dist/ui-kit/SlideCheckbox/SlideCheckbox.js +7 -0
  46. package/mobile/dist/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -0
  47. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
  48. package/mobile/dist/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  49. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js +1 -1
  50. package/mobile/lib/components/CarouselRecommendationCard/CarouselRecommendationCard.js.map +1 -1
  51. package/mobile/lib/components/ErrorBlock/ErrorBlock.js +3 -1
  52. package/mobile/lib/components/ErrorBlock/ErrorBlock.js.map +1 -1
  53. package/mobile/lib/components/Header/DropdownMenu.js +4 -1
  54. package/mobile/lib/components/Header/DropdownMenu.js.map +1 -1
  55. package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js +3 -1
  56. package/mobile/lib/components/OtherProductsItem/OtherProductsItem.js.map +1 -1
  57. package/mobile/lib/ui-kit/SlideCheckbox/SlideCheckbox.d.ts +7 -0
  58. package/mobile/lib/ui-kit/SlideCheckbox/SlideCheckbox.js +5 -0
  59. package/mobile/lib/ui-kit/SlideCheckbox/SlideCheckbox.js.map +1 -0
  60. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js +1 -1
  61. package/mobile/lib/ui-kit/SwipeListControl/SwipeListControlDots.js.map +1 -1
  62. package/mobile/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +5 -1
  63. package/mobile/src/components/ErrorBlock/ErrorBlock.tsx +10 -1
  64. package/mobile/src/components/Header/DropdownMenu.tsx +16 -12
  65. package/mobile/src/components/OtherProductsItem/OtherProductsItem.tsx +3 -1
  66. package/mobile/src/components/SwipeListControlBlock/SwipeListControlBlock.example.json +1 -1
  67. package/mobile/src/ui-kit/SlideCheckbox/SlideCheckbox.tsx +33 -0
  68. package/mobile/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +1 -1
  69. package/package.json +1 -1
  70. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.fixture.tsx +1 -0
  71. package/src/components/CarouselRecommendationCard/CarouselRecommendationCard.tsx +5 -1
  72. package/src/components/ErrorBlock/ErrorBlock.tsx +10 -1
  73. package/src/components/Header/DropdownMenu.tsx +16 -12
  74. package/src/components/OtherProductsItem/OtherProductsItem.tsx +3 -1
  75. package/src/components/SwipeListControlBlock/SwipeListControlBlock.example.json +1 -1
  76. package/src/components/SwipeListControlBlock/SwipeListControlBlock.fixture.tsx +17 -0
  77. package/src/ui-kit/SlideCheckbox/SlideCheckbox.fixture.tsx +9 -0
  78. package/src/ui-kit/SlideCheckbox/SlideCheckbox.tsx +33 -0
  79. package/src/ui-kit/SwipeListControl/SwipeListControlDots.tsx +1 -1
@@ -8,7 +8,7 @@ const activeDotStyles = {
8
8
  'horizontal-list': 'w-6',
9
9
  'vertical-list': 'h-6',
10
10
  };
11
- const dotStyle = 'cursor-pointer bg-primary-main rounded-full transition-width duration-300 group-data-secondary:bg-white';
11
+ const dotStyle = 'cursor-pointer bg-primary-main rounded-full transition-width duration-300 group-data-secondary:bg-white group-data-transparent:bg-white';
12
12
  const inactiveDotStyle = 'w-2 h-2 opacity-30';
13
13
  export const SwipeListControlDots = JSX(({ containerRef, activeIndex, dotCount = 0, listType = 'horizontal-list' }) => {
14
14
  const handleClick = (idx) => {
@@ -1 +1 @@
1
- {"version":3,"file":"SwipeListControlDots.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListControlDots.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,MAAM,eAAe,GAAyC;IAC5D,iBAAiB,EAAE,oBAAoB;IACvC,eAAe,EAAE,sDAAsD;CACxE,CAAC;AAEF,MAAM,eAAe,GAAyC;IAC5D,iBAAiB,EAAE,KAAK;IACxB,eAAe,EAAE,KAAK;CACvB,CAAC;AAEF,MAAM,QAAQ,GACZ,yGAAyG,CAAC;AAE5G,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAS9C,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CACrC,CAAC,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,GAAG,CAAC,EAAE,QAAQ,GAAG,iBAAiB,EAAE,EAAE,EAAE;IAC5E,MAAM,WAAW,GAAG,CAAC,GAAW,EAAE,EAAE;QAClC,IAAI,GAAG,KAAK,WAAW,IAAI,YAAY,EAAE,OAAO,EAAE;YAChD,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,cAAc,CAAC;gBACjD,QAAQ,EAAE,QAAQ;gBAClB,KAAK,EAAE,SAAS;aACjB,CAAC,CAAC;SACJ;IACH,CAAC,CAAC;IAEF,OAAO,QAAQ,CAAC,CAAC,CAAC,CAChB,cAAK,SAAS,EAAE,cAAc,eAAe,CAAC,QAAQ,CAAC,EAAE,YACtD,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAW,EAAE,EAAE,CAAC,CACtD,cAEE,SAAS,EAAE,GAAG,QAAQ,IACpB,GAAG,KAAK,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,gBACpD,EAAE,EACF,IAAI,EAAC,QAAQ,uBAEb,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,IAN1B,MAAM,CAAC,GAAG,CAAC,CAOhB,CACH,CAAC,GACE,CACP,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CACF,CAAC"}
1
+ {"version":3,"file":"SwipeListControlDots.js","sourceRoot":"","sources":["../../../src/ui-kit/SwipeListControl/SwipeListControlDots.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AAGxC,MAAM,eAAe,GAAyC;IAC5D,iBAAiB,EAAE,oBAAoB;IACvC,eAAe,EAAE,sDAAsD;CACxE,CAAC;AAEF,MAAM,eAAe,GAAyC;IAC5D,iBAAiB,EAAE,KAAK;IACxB,eAAe,EAAE,KAAK;CACvB,CAAC;AAEF,MAAM,QAAQ,GACZ,yIAAyI,CAAC;AAE5I,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAS9C,MAAM,CAAC,MAAM,oBAAoB,GAAG,GAAG,CACrC,CAAC,EAAE,YAAY,EAAE,WAAW,EAAE,QAAQ,GAAG,CAAC,EAAE,QAAQ,GAAG,iBAAiB,EAAE,EAAE,EAAE;IAC5E,MAAM,WAAW,GAAG,CAAC,GAAW,EAAE,EAAE;QAClC,IAAI,GAAG,KAAK,WAAW,IAAI,YAAY,EAAE,OAAO,EAAE;YAChD,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,EAAE,cAAc,CAAC;gBACjD,QAAQ,EAAE,QAAQ;gBAClB,KAAK,EAAE,SAAS;aACjB,CAAC,CAAC;SACJ;IACH,CAAC,CAAC;IAEF,OAAO,QAAQ,CAAC,CAAC,CAAC,CAChB,cAAK,SAAS,EAAE,cAAc,eAAe,CAAC,QAAQ,CAAC,EAAE,YACtD,IAAI,KAAK,CAAC,QAAQ,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,GAAW,EAAE,EAAE,CAAC,CACtD,cAEE,SAAS,EAAE,GAAG,QAAQ,IACpB,GAAG,KAAK,WAAW,CAAC,CAAC,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,gBACpD,EAAE,EACF,IAAI,EAAC,QAAQ,uBAEb,OAAO,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,IAN1B,MAAM,CAAC,GAAG,CAAC,CAOhB,CACH,CAAC,GACE,CACP,CAAC,CAAC,CAAC,IAAI,CAAC;AACX,CAAC,CACF,CAAC"}
@@ -45,7 +45,11 @@ export const CarouselRecommendationCard = JSX<RecommendationCardProps>(
45
45
  >
46
46
  <BaseTile className="flex justify-between" title={tileTitle} image={tileImage}>
47
47
  <div className="h-full flex flex-col justify-between">
48
- {description ? <span className="mb-2">{description}</span> : null}
48
+ {description ? (
49
+ <span className="mb-2 group-data-gray:text-secondary-text group-data-gray:max-w-[265px]">
50
+ {description}
51
+ </span>
52
+ ) : null}
49
53
  {items.length ? (
50
54
  <List
51
55
  className="text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]"
@@ -4,6 +4,7 @@ import { Button } from '../../ui-kit/Button/Button';
4
4
  import { Heading } from '../../ui-kit/Heading/Heading';
5
5
  import { Img } from '../../ui-kit/Img/Img';
6
6
  import type { ErrorBlockContent } from './ErrorBlockContent';
7
+ import { style } from '../../utils/style';
7
8
 
8
9
  export interface ErrorBlockProps extends ErrorBlockContent, UniBlockProps {}
9
10
 
@@ -19,9 +20,17 @@ const renderErrorContent = (error: ErrorBlockContent['error']) => {
19
20
  return null;
20
21
  };
21
22
 
23
+ const getErrorBlockStyle = (text: string) => (text ? 'py-20 pt-3 pb-1' : 'mb-16 pb-2 mt-24 pt-3');
24
+
22
25
  export const ErrorBlock = JSX<ErrorBlockProps>(
23
26
  ({ className = '', title, subtitle, error, button }) => (
24
- <section className={`flex flex-col justify-center items-center mt-12 ${className}`}>
27
+ <section
28
+ className={style(
29
+ 'flex flex-col justify-center items-center',
30
+ getErrorBlockStyle(button?.text as string),
31
+ className,
32
+ )}
33
+ >
25
34
  <div className="flex justify-center py-20">{renderErrorContent(error)}</div>
26
35
  {title ? <Heading headingType="h1" className="text-left mb-4" title={title} /> : null}
27
36
  {subtitle ? (
@@ -43,18 +43,22 @@ export const DropdownMenu = JSX<DropdownMenuProps>(({ className = '', items, act
43
43
  className={style('flex flex-col rounded-md bg-white p-6 pb-2', visible ? '' : 'hidden')}
44
44
  aria-hidden={!visible}
45
45
  >
46
- {items?.map((item, i) => (
47
- <a
48
- key={item.href || String(i)}
49
- className={style(
50
- 'text-l-light pb-4 hover:text-primary-main',
51
- item === activeItem ? 'text-primary-main' : '',
52
- )}
53
- {...link(item)}
54
- >
55
- {item.text}
56
- </a>
57
- ))}
46
+ {items?.map((item, i) => {
47
+ const { text, ...linkProps } = item;
48
+
49
+ return (
50
+ <a
51
+ key={item.href || String(i)}
52
+ className={style(
53
+ 'text-l-light pb-4 hover:text-primary-main',
54
+ item === activeItem ? 'text-primary-main' : '',
55
+ )}
56
+ {...link(linkProps)}
57
+ >
58
+ {text}
59
+ </a>
60
+ );
61
+ })}
58
62
  </div>
59
63
  </div>
60
64
  );
@@ -45,4 +45,6 @@ export const OtherProductsItem: JSXBlock<OtherProductsItemProps> = JSX<OtherProd
45
45
  },
46
46
  );
47
47
 
48
- OtherProductsItem.childrenTypes = []; // All types of blocks are suitable
48
+ OtherProductsItem.childrenTypes = {
49
+ exclude: ['OtherProductsItem'],
50
+ };
@@ -2,7 +2,7 @@
2
2
  "content": {
3
3
  "listType": "vertical-list"
4
4
  },
5
- "style": ["col-span-12", "h-96"],
5
+ "style": ["col-span-12"],
6
6
  "type": "SwipeListControlBlock",
7
7
  "blocks": [
8
8
  {
@@ -0,0 +1,33 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { Text } from '../../ui-kit/Text/Text';
3
+
4
+ interface SlideCheckboxProps {
5
+ checked?: boolean;
6
+ text?: string;
7
+ onClick?: () => void;
8
+ }
9
+ export const SlideCheckbox = JSX<SlideCheckboxProps>(({ checked, text, onClick }) => (
10
+ <div
11
+ role="checkbox"
12
+ aria-checked={checked}
13
+ className="flex justify-start items-center w-full cursor-pointer mb-4"
14
+ onClick={() => onClick && onClick()}
15
+ >
16
+ <div
17
+ className={`relative duration-300 w-9 h-5 mr-3 rounded rounded-2xl ${
18
+ checked ? 'bg-primary-main' : 'bg-main-divider'
19
+ }`}
20
+ >
21
+ <div
22
+ className={`absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded rounded-full ${
23
+ checked ? 'left-[50%]' : 'left-[5%]'
24
+ }`}
25
+ />
26
+ </div>
27
+ <div>
28
+ <Text size="text-m" font="font-light" color="text-primary-text">
29
+ {text}
30
+ </Text>
31
+ </div>
32
+ </div>
33
+ ));
@@ -12,7 +12,7 @@ const activeDotStyles: Record<SwipeListControlType, string> = {
12
12
  };
13
13
 
14
14
  const dotStyle =
15
- 'cursor-pointer bg-primary-main rounded-full transition-width duration-300 group-data-secondary:bg-white';
15
+ 'cursor-pointer bg-primary-main rounded-full transition-width duration-300 group-data-secondary:bg-white group-data-transparent:bg-white';
16
16
 
17
17
  const inactiveDotStyle = 'w-2 h-2 opacity-30';
18
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.7.8",
3
+ "version": "0.7.9",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -65,6 +65,7 @@ export default {
65
65
  className="col-span-4"
66
66
  version="gray"
67
67
  {...CAROUSEL_RECOMMENDATION_CARD}
68
+ description="На портале представлено множество ипотечных программ, в том числе и сельская ипотека"
68
69
  />
69
70
  </div>
70
71
  ),
@@ -45,7 +45,11 @@ export const CarouselRecommendationCard = JSX<RecommendationCardProps>(
45
45
  >
46
46
  <BaseTile className="flex justify-between" title={tileTitle} image={tileImage}>
47
47
  <div className="h-full flex flex-col justify-between">
48
- {description ? <span className="mb-2">{description}</span> : null}
48
+ {description ? (
49
+ <span className="mb-2 group-data-gray:text-secondary-text group-data-gray:max-w-[265px]">
50
+ {description}
51
+ </span>
52
+ ) : null}
49
53
  {items.length ? (
50
54
  <List
51
55
  className="text-xl-light flex flex-col flex-1 gap-2 max-w-[236px]"
@@ -4,6 +4,7 @@ import { Button } from '../../ui-kit/Button/Button';
4
4
  import { Heading } from '../../ui-kit/Heading/Heading';
5
5
  import { Img } from '../../ui-kit/Img/Img';
6
6
  import type { ErrorBlockContent } from './ErrorBlockContent';
7
+ import { style } from '../../utils/style';
7
8
 
8
9
  export interface ErrorBlockProps extends ErrorBlockContent, UniBlockProps {}
9
10
 
@@ -19,9 +20,17 @@ const renderErrorContent = (error: ErrorBlockContent['error']) => {
19
20
  return null;
20
21
  };
21
22
 
23
+ const getErrorBlockStyle = (text: string) => (text ? 'py-20 pt-3 pb-1' : 'mb-16 pb-2 mt-24 pt-3');
24
+
22
25
  export const ErrorBlock = JSX<ErrorBlockProps>(
23
26
  ({ className = '', title, subtitle, error, button }) => (
24
- <section className={`flex flex-col justify-center items-center mt-12 ${className}`}>
27
+ <section
28
+ className={style(
29
+ 'flex flex-col justify-center items-center',
30
+ getErrorBlockStyle(button?.text as string),
31
+ className,
32
+ )}
33
+ >
25
34
  <div className="flex justify-center py-20">{renderErrorContent(error)}</div>
26
35
  {title ? <Heading headingType="h1" className="text-left mb-4" title={title} /> : null}
27
36
  {subtitle ? (
@@ -43,18 +43,22 @@ export const DropdownMenu = JSX<DropdownMenuProps>(({ className = '', items, act
43
43
  className={style('flex flex-col rounded-md bg-white p-6 pb-2', visible ? '' : 'hidden')}
44
44
  aria-hidden={!visible}
45
45
  >
46
- {items?.map((item, i) => (
47
- <a
48
- key={item.href || String(i)}
49
- className={style(
50
- 'text-l-light pb-4 hover:text-primary-main',
51
- item === activeItem ? 'text-primary-main' : '',
52
- )}
53
- {...link(item)}
54
- >
55
- {item.text}
56
- </a>
57
- ))}
46
+ {items?.map((item, i) => {
47
+ const { text, ...linkProps } = item;
48
+
49
+ return (
50
+ <a
51
+ key={item.href || String(i)}
52
+ className={style(
53
+ 'text-l-light pb-4 hover:text-primary-main',
54
+ item === activeItem ? 'text-primary-main' : '',
55
+ )}
56
+ {...link(linkProps)}
57
+ >
58
+ {text}
59
+ </a>
60
+ );
61
+ })}
58
62
  </div>
59
63
  </div>
60
64
  );
@@ -45,4 +45,6 @@ export const OtherProductsItem: JSXBlock<OtherProductsItemProps> = JSX<OtherProd
45
45
  },
46
46
  );
47
47
 
48
- OtherProductsItem.childrenTypes = []; // All types of blocks are suitable
48
+ OtherProductsItem.childrenTypes = {
49
+ exclude: ['OtherProductsItem'],
50
+ };
@@ -2,7 +2,7 @@
2
2
  "content": {
3
3
  "listType": "vertical-list"
4
4
  },
5
- "style": ["col-span-12", "h-96"],
5
+ "style": ["col-span-12"],
6
6
  "type": "SwipeListControlBlock",
7
7
  "blocks": [
8
8
  {
@@ -41,4 +41,21 @@ export default {
41
41
  />
42
42
  </div>
43
43
  ),
44
+ transparent: (
45
+ <div className="container grid grid-cols-12 p-4">
46
+ <SwipeListControlBlock
47
+ className="col-span-12"
48
+ block={{
49
+ type: 'SwipeListControlBlock',
50
+ blocks: [
51
+ { type: 'ProductTile', content: { ...PRODUCT_TILE, version: '' } },
52
+ { type: 'ProductTile', content: { ...PRODUCT_TILE, version: '' } },
53
+ ],
54
+ }}
55
+ listType="vertical-list"
56
+ options={options}
57
+ version="transparent"
58
+ />
59
+ </div>
60
+ ),
44
61
  };
@@ -0,0 +1,9 @@
1
+ import { SlideCheckbox } from './SlideCheckbox';
2
+
3
+ export default {
4
+ primary: (
5
+ <div className="bg-white">
6
+ <SlideCheckbox checked={true} text={'Checkbox'} />
7
+ </div>
8
+ ),
9
+ };
@@ -0,0 +1,33 @@
1
+ import { JSX } from '@redneckz/uni-jsx';
2
+ import { Text } from '../../ui-kit/Text/Text';
3
+
4
+ interface SlideCheckboxProps {
5
+ checked?: boolean;
6
+ text?: string;
7
+ onClick?: () => void;
8
+ }
9
+ export const SlideCheckbox = JSX<SlideCheckboxProps>(({ checked, text, onClick }) => (
10
+ <div
11
+ role="checkbox"
12
+ aria-checked={checked}
13
+ className="flex justify-start items-center w-full cursor-pointer mb-4"
14
+ onClick={() => onClick && onClick()}
15
+ >
16
+ <div
17
+ className={`relative duration-300 w-9 h-5 mr-3 rounded rounded-2xl ${
18
+ checked ? 'bg-primary-main' : 'bg-main-divider'
19
+ }`}
20
+ >
21
+ <div
22
+ className={`absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded rounded-full ${
23
+ checked ? 'left-[50%]' : 'left-[5%]'
24
+ }`}
25
+ />
26
+ </div>
27
+ <div>
28
+ <Text size="text-m" font="font-light" color="text-primary-text">
29
+ {text}
30
+ </Text>
31
+ </div>
32
+ </div>
33
+ ));
@@ -12,7 +12,7 @@ const activeDotStyles: Record<SwipeListControlType, string> = {
12
12
  };
13
13
 
14
14
  const dotStyle =
15
- 'cursor-pointer bg-primary-main rounded-full transition-width duration-300 group-data-secondary:bg-white';
15
+ 'cursor-pointer bg-primary-main rounded-full transition-width duration-300 group-data-secondary:bg-white group-data-transparent:bg-white';
16
16
 
17
17
  const inactiveDotStyle = 'w-2 h-2 opacity-30';
18
18