@redneckz/wildless-cms-uni-blocks 0.2.82 → 0.2.85

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 (41) hide show
  1. package/bundle/bundle.umd.js +155 -6
  2. package/bundle/bundle.umd.min.js +1 -1
  3. package/dist/components/Blocks.d.ts +1 -0
  4. package/dist/components/Blocks.js +2 -0
  5. package/dist/components/Blocks.js.map +1 -1
  6. package/dist/components/CreditCalculator/CreditCalculator.js +9 -5
  7. package/dist/components/CreditCalculator/CreditCalculator.js.map +1 -1
  8. package/dist/components/Footer/SocialMedia.js +2 -2
  9. package/dist/components/Footer/SocialMedia.js.map +1 -1
  10. package/dist/components/Header/HeaderSecondaryMenu.js +1 -1
  11. package/dist/components/Header/HeaderSecondaryMenu.js.map +1 -1
  12. package/dist/components/Header/HeaderSecondaryMenuButton.js +1 -1
  13. package/dist/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  14. package/dist/ui-kit/Icon/Icon.js +7 -1
  15. package/dist/ui-kit/Icon/Icon.js.map +1 -1
  16. package/dist/ui-kit/Icon/IconProps.d.ts +1 -1
  17. package/lib/common.css +1 -1
  18. package/lib/components/Blocks.d.ts +1 -0
  19. package/lib/components/Blocks.js +2 -0
  20. package/lib/components/Blocks.js.map +1 -1
  21. package/lib/components/CreditCalculator/CreditCalculator.js +10 -6
  22. package/lib/components/CreditCalculator/CreditCalculator.js.map +1 -1
  23. package/lib/components/Footer/SocialMedia.js +2 -2
  24. package/lib/components/Footer/SocialMedia.js.map +1 -1
  25. package/lib/components/Header/HeaderSecondaryMenu.js +1 -1
  26. package/lib/components/Header/HeaderSecondaryMenu.js.map +1 -1
  27. package/lib/components/Header/HeaderSecondaryMenuButton.js +1 -1
  28. package/lib/components/Header/HeaderSecondaryMenuButton.js.map +1 -1
  29. package/lib/ui-kit/Icon/Icon.js +7 -1
  30. package/lib/ui-kit/Icon/Icon.js.map +1 -1
  31. package/lib/ui-kit/Icon/IconProps.d.ts +1 -1
  32. package/package.json +16 -15
  33. package/src/components/Blocks.ts +2 -0
  34. package/src/components/ContentPage/ContentPage.page.json +7 -0
  35. package/src/components/CreditCalculator/CreditCalculator.tsx +15 -17
  36. package/src/components/Footer/SocialMedia.tsx +3 -10
  37. package/src/components/Header/HeaderSecondaryMenu.tsx +4 -8
  38. package/src/components/Header/HeaderSecondaryMenuButton.tsx +1 -1
  39. package/src/icons/GridIcon.svg +4 -7
  40. package/src/ui-kit/Icon/Icon.tsx +23 -9
  41. package/src/ui-kit/Icon/IconProps.ts +1 -1
@@ -36,23 +36,19 @@ export const HeaderSecondaryMenu = JSX<HeaderSecondaryMenuProps>(
36
36
  className="mr-5 text-primary-text hover:text-primary-main"
37
37
  ariaLabel="Поиск по сайту"
38
38
  >
39
- <Icon name="LoupeIcon" aria-hidden="true" />
39
+ <Icon name="LoupeIcon" aria-hidden="true" className="h-full" asSVG />
40
40
  </HeaderSecondaryMenuButton>
41
41
  <HeaderSecondaryMenuButton
42
42
  className="mr-5 text-primary-text hover:text-primary-main"
43
43
  ariaLabel="Профиль"
44
44
  >
45
- <Icon name="ProfileIcon" aria-hidden="true" />
45
+ <Icon name="ProfileIcon" aria-hidden="true" className="h-full" asSVG />
46
46
  </HeaderSecondaryMenuButton>
47
47
  <HeaderSecondaryMenuButton
48
- className="mr-5 text-secondary-light hover:text-primary-main min-w-[32px] min-h-[32px]"
48
+ className="min-w-[32px] min-h-[32px] fill-secondary-light hover:fill-secondary-hover"
49
49
  ariaLabel="Дополнительные ссылки"
50
50
  >
51
- <Icon
52
- name="GridIcon"
53
- aria-hidden="true"
54
- className="[&>*]:fill-secondary-light [&>*]:hover:fill-primary-main"
55
- />
51
+ <Icon name="GridIcon" aria-hidden="true" className="h-full" asSVG />
56
52
  </HeaderSecondaryMenuButton>
57
53
  </div>
58
54
  );
@@ -9,7 +9,7 @@ export const HeaderSecondaryMenuButton = JSX<HeaderSecondaryMenuButtonProps>(
9
9
  ({ className, children, ariaLabel }) => (
10
10
  <button
11
11
  type="button"
12
- className={`border-0 p-0 w-[24px] flex items-center bg-inherit cursor-pointer ${
12
+ className={`border-0 p-0 w-[24px] h-[24px] flex items-center bg-inherit cursor-pointer ${
13
13
  className || ''
14
14
  }`}
15
15
  disabled={true}
@@ -1,7 +1,4 @@
1
- <svg id="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32">
2
- <rect y=".5" width="32" height="32" rx="16"/>
3
- <path
4
- fill="#1c1c1c"
5
- d="M13 11.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM13 16.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM11.5 23a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM18 11.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM16.5 18a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM18 21.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM21.5 13a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM23 16.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM21.5 23a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"
6
- />
7
- </svg>
1
+ <svg id="icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 33">
2
+ <rect width="32" height="32" y=".5" rx="16"/>
3
+ <path fill="#1C1C1C" d="M13 11.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM13 16.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM11.5 23a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM18 11.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM16.5 18a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM18 21.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM21.5 13a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM23 16.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM21.5 23a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"/>
4
+ </svg>
@@ -3,14 +3,28 @@ import { projectSettings } from '../../ProjectSettings';
3
3
  import type { IconProps } from './IconProps';
4
4
 
5
5
  export const Icon = JSX<IconProps>(
6
- ({ className, name, alt = `Icon ${name}`, title = alt, ...imgProps }) => (
7
- <svg className={className} {...imgProps} aria-hidden="true">
8
- {title ? <title>{title}</title> : null}
9
- {alt ? <desc>{alt}</desc> : null}
10
- <use
11
- href={`${projectSettings.CDN || ''}icons/${name}.svg#icon`}
12
- xlinkHref={`${projectSettings.CDN || ''}icons/${name}.svg#icon`}
6
+ ({ className, name, alt = `Icon ${name}`, title = alt, asSVG, ...imgProps }) => {
7
+ const href = `${projectSettings.CDN || ''}icons/${name}.svg`;
8
+
9
+ if (asSVG) {
10
+ return (
11
+ <svg className={className} {...imgProps} aria-hidden="true">
12
+ {title ? <title>{title}</title> : null}
13
+ {alt ? <desc>{alt}</desc> : null}
14
+ <use href={`${href}#icon`} xlinkHref={`${href}#icon`} />
15
+ </svg>
16
+ );
17
+ }
18
+
19
+ return (
20
+ <img
21
+ className={className}
22
+ src={href}
23
+ alt={alt}
24
+ title={title}
25
+ {...imgProps}
26
+ aria-hidden="true"
13
27
  />
14
- </svg>
15
- ),
28
+ );
29
+ },
16
30
  );
@@ -33,5 +33,5 @@ export interface IconProps {
33
33
  title?: string;
34
34
  width?: string;
35
35
  height?: string;
36
- 'aria-hidden'?: 'true';
36
+ asSVG?: boolean;
37
37
  }