@redneckz/wildless-cms-uni-blocks 0.6.15 → 0.6.16

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 (27) hide show
  1. package/bin/migration-scripts/0.6.16.js +90 -0
  2. package/bin/utils.js +2 -0
  3. package/bundle/bundle.umd.js +14 -5
  4. package/bundle/bundle.umd.min.js +1 -1
  5. package/dist/components/ContentPage/renderContentPageHead.js +7 -7
  6. package/dist/components/ContentPage/renderContentPageHead.js.map +1 -1
  7. package/dist/ui-kit/Foldable/DefaultFoldButton.js +13 -4
  8. package/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  9. package/lib/components/ContentPage/renderContentPageHead.js +7 -7
  10. package/lib/components/ContentPage/renderContentPageHead.js.map +1 -1
  11. package/lib/ui-kit/Foldable/DefaultFoldButton.js +13 -4
  12. package/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  13. package/mobile/bundle/bundle.umd.js +1 -1
  14. package/mobile/bundle/bundle.umd.min.js +1 -1
  15. package/mobile/dist/components/ContentPage/renderContentPageHead.js +7 -7
  16. package/mobile/dist/components/ContentPage/renderContentPageHead.js.map +1 -1
  17. package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js +13 -4
  18. package/mobile/dist/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  19. package/mobile/lib/components/ContentPage/renderContentPageHead.js +7 -7
  20. package/mobile/lib/components/ContentPage/renderContentPageHead.js.map +1 -1
  21. package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js +13 -4
  22. package/mobile/lib/ui-kit/Foldable/DefaultFoldButton.js.map +1 -1
  23. package/mobile/src/components/ContentPage/renderContentPageHead.tsx +11 -7
  24. package/mobile/src/ui-kit/Foldable/DefaultFoldButton.tsx +32 -23
  25. package/package.json +1 -1
  26. package/src/components/ContentPage/renderContentPageHead.tsx +11 -7
  27. package/src/ui-kit/Foldable/DefaultFoldButton.tsx +32 -23
@@ -5,15 +5,19 @@ export function renderContentPageHead(data: ContentPageMeta) {
5
5
  const { description, keywords, canonical, robots } = main || {};
6
6
 
7
7
  return [
8
- <title>{title}</title>,
9
- <meta name="viewport" content="width=device-width, initial-scale=1" />,
10
- description ? <meta name="description" content={description} /> : null,
11
- keywords ? <meta name="keywords" content={keywords.join(',')} /> : null,
12
- robots ? <meta name="robots" content={robots.join(',')} /> : null,
8
+ <title key="title">{title}</title>,
9
+ <meta key="viewport" name="viewport" content="width=device-width, initial-scale=1" />,
10
+ description ? <meta key="description" name="description" content={description} /> : null,
11
+ keywords ? <meta key="keywords" name="keywords" content={keywords.join(',')} /> : null,
12
+ robots ? <meta key="robots" name="robots" content={robots.join(',')} /> : null,
13
13
  renderOpenGraph(og),
14
14
  renderTwitter(twitter),
15
- canonical ? <link rel="canonical" href={canonical} /> : null,
16
- jsonLd ? <script type="application/ld+json">{jsonLd}</script> : null,
15
+ canonical ? <link key="canonical" rel="canonical" href={canonical} /> : null,
16
+ jsonLd ? (
17
+ <script key="jsonLd" type="application/ld+json">
18
+ {jsonLd}
19
+ </script>
20
+ ) : null,
17
21
  ].filter(Boolean);
18
22
  }
19
23
 
@@ -13,29 +13,38 @@ interface DefaultFoldButtonProps {
13
13
  }
14
14
 
15
15
  export const DefaultFoldButton = JSX<DefaultFoldButtonProps>(
16
- ({ className, label, icon, dataTheme = '', onClick }) => (
17
- <button
18
- className={`border-none bg-primary-main hover:bg-primary-hover px-0 py-5 mb-[1px] w-full font-sans text-white flex justify-center cursor-pointer ${
19
- className || ''
20
- }`}
21
- data-theme={dataTheme}
22
- onClick={onClick}
23
- >
24
- <span className="text-h4 pr-3">{label}</span>
25
- {icon ? (
26
- <Img
27
- image={{
28
- icon,
29
- iconVersion: 'white',
30
- }}
31
- className="flex-shrink-0 my-auto"
32
- width="20"
33
- height="20"
34
- asSVG
35
- />
36
- ) : null}
37
- </button>
38
- ),
16
+ ({ className = '', label, icon, dataTheme = '', onClick }) => {
17
+ const STATE_STYLE =
18
+ 'hover:bg-primary-hover focus:border-primary-text active:bg-primary-active outline-none';
19
+ const DIMENSIONS_STYLE = 'flex justify-center w-full px-0 py-5 mb-[1px]';
20
+
21
+ return (
22
+ <button
23
+ className={[
24
+ 'border border-transparent bg-primary-main font-sans text-white cursor-pointer',
25
+ STATE_STYLE,
26
+ DIMENSIONS_STYLE,
27
+ className,
28
+ ].join(' ')}
29
+ data-theme={dataTheme}
30
+ onClick={onClick}
31
+ >
32
+ <span className="text-h4 pr-3">{label}</span>
33
+ {icon ? (
34
+ <Img
35
+ image={{
36
+ icon,
37
+ iconVersion: 'white',
38
+ }}
39
+ className="flex-shrink-0 my-auto"
40
+ width="20"
41
+ height="20"
42
+ asSVG
43
+ />
44
+ ) : null}
45
+ </button>
46
+ );
47
+ },
39
48
  );
40
49
 
41
50
  export const renderDefaultFoldButton = ({ isUnfolded, onToggle }: FoldablePartProps) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redneckz/wildless-cms-uni-blocks",
3
- "version": "0.6.15",
3
+ "version": "0.6.16",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "author": "ЦК",
@@ -5,15 +5,19 @@ export function renderContentPageHead(data: ContentPageMeta) {
5
5
  const { description, keywords, canonical, robots } = main || {};
6
6
 
7
7
  return [
8
- <title>{title}</title>,
9
- <meta name="viewport" content="width=device-width, initial-scale=1" />,
10
- description ? <meta name="description" content={description} /> : null,
11
- keywords ? <meta name="keywords" content={keywords.join(',')} /> : null,
12
- robots ? <meta name="robots" content={robots.join(',')} /> : null,
8
+ <title key="title">{title}</title>,
9
+ <meta key="viewport" name="viewport" content="width=device-width, initial-scale=1" />,
10
+ description ? <meta key="description" name="description" content={description} /> : null,
11
+ keywords ? <meta key="keywords" name="keywords" content={keywords.join(',')} /> : null,
12
+ robots ? <meta key="robots" name="robots" content={robots.join(',')} /> : null,
13
13
  renderOpenGraph(og),
14
14
  renderTwitter(twitter),
15
- canonical ? <link rel="canonical" href={canonical} /> : null,
16
- jsonLd ? <script type="application/ld+json">{jsonLd}</script> : null,
15
+ canonical ? <link key="canonical" rel="canonical" href={canonical} /> : null,
16
+ jsonLd ? (
17
+ <script key="jsonLd" type="application/ld+json">
18
+ {jsonLd}
19
+ </script>
20
+ ) : null,
17
21
  ].filter(Boolean);
18
22
  }
19
23
 
@@ -13,29 +13,38 @@ interface DefaultFoldButtonProps {
13
13
  }
14
14
 
15
15
  export const DefaultFoldButton = JSX<DefaultFoldButtonProps>(
16
- ({ className, label, icon, dataTheme = '', onClick }) => (
17
- <button
18
- className={`border-none bg-primary-main hover:bg-primary-hover px-0 py-5 mb-[1px] w-full font-sans text-white flex justify-center cursor-pointer ${
19
- className || ''
20
- }`}
21
- data-theme={dataTheme}
22
- onClick={onClick}
23
- >
24
- <span className="text-h4 pr-3">{label}</span>
25
- {icon ? (
26
- <Img
27
- image={{
28
- icon,
29
- iconVersion: 'white',
30
- }}
31
- className="flex-shrink-0 my-auto"
32
- width="20"
33
- height="20"
34
- asSVG
35
- />
36
- ) : null}
37
- </button>
38
- ),
16
+ ({ className = '', label, icon, dataTheme = '', onClick }) => {
17
+ const STATE_STYLE =
18
+ 'hover:bg-primary-hover focus:border-primary-text active:bg-primary-active outline-none';
19
+ const DIMENSIONS_STYLE = 'flex justify-center w-full px-0 py-5 mb-[1px]';
20
+
21
+ return (
22
+ <button
23
+ className={[
24
+ 'border border-transparent bg-primary-main font-sans text-white cursor-pointer',
25
+ STATE_STYLE,
26
+ DIMENSIONS_STYLE,
27
+ className,
28
+ ].join(' ')}
29
+ data-theme={dataTheme}
30
+ onClick={onClick}
31
+ >
32
+ <span className="text-h4 pr-3">{label}</span>
33
+ {icon ? (
34
+ <Img
35
+ image={{
36
+ icon,
37
+ iconVersion: 'white',
38
+ }}
39
+ className="flex-shrink-0 my-auto"
40
+ width="20"
41
+ height="20"
42
+ asSVG
43
+ />
44
+ ) : null}
45
+ </button>
46
+ );
47
+ },
39
48
  );
40
49
 
41
50
  export const renderDefaultFoldButton = ({ isUnfolded, onToggle }: FoldablePartProps) => {