@eightshift/frontend-libs-tailwind 1.5.0 → 2.0.0

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 (229) hide show
  1. package/CHANGELOG.md +10 -0
  2. package/package.json +11 -18
  3. package/blocks/init/assets/application-admin.js +0 -10
  4. package/blocks/init/assets/application.js +0 -13
  5. package/blocks/init/assets/fonts/fraunces-italic-latin-extended.woff2 +0 -0
  6. package/blocks/init/assets/fonts/fraunces-italic-latin.woff2 +0 -0
  7. package/blocks/init/assets/fonts/fraunces-latin-extended.woff2 +0 -0
  8. package/blocks/init/assets/fonts/fraunces-latin.woff2 +0 -0
  9. package/blocks/init/assets/fonts/noto-sans-italic-latin-extended.woff2 +0 -0
  10. package/blocks/init/assets/fonts/noto-sans-italic-latin.woff2 +0 -0
  11. package/blocks/init/assets/fonts/noto-sans-latin-extended.woff2 +0 -0
  12. package/blocks/init/assets/fonts/noto-sans-latin.woff2 +0 -0
  13. package/blocks/init/assets/images/index.js +0 -5
  14. package/blocks/init/assets/scripts/application-admin.js +0 -7
  15. package/blocks/init/assets/scripts/application.js +0 -3
  16. package/blocks/init/assets/scripts/theme-colors.js +0 -39
  17. package/blocks/init/assets/styles/application-admin.css +0 -6
  18. package/blocks/init/assets/styles/application.css +0 -3
  19. package/blocks/init/src/Blocks/assets/application-blocks-editor.js +0 -14
  20. package/blocks/init/src/Blocks/assets/application-blocks-frontend.js +0 -13
  21. package/blocks/init/src/Blocks/assets/application-blocks.js +0 -9
  22. package/blocks/init/src/Blocks/assets/scripts/application-blocks-editor.js +0 -65
  23. package/blocks/init/src/Blocks/assets/scripts/application-blocks-frontend.js +0 -24
  24. package/blocks/init/src/Blocks/assets/scripts/link-section-editor.js +0 -262
  25. package/blocks/init/src/Blocks/assets/scripts/shared.js +0 -25
  26. package/blocks/init/src/Blocks/assets/styles/application-blocks-editor.css +0 -15
  27. package/blocks/init/src/Blocks/assets/styles/application-blocks-frontend.css +0 -9
  28. package/blocks/init/src/Blocks/assets/styles/application-blocks.css +0 -1
  29. package/blocks/init/src/Blocks/assets/styles/editor/editor-overrides.css +0 -15
  30. package/blocks/init/src/Blocks/assets/styles/fonts.css +0 -90
  31. package/blocks/init/src/Blocks/assets/styles/tailwind.css +0 -30
  32. package/blocks/init/src/Blocks/components/admin-theme-options/admin-theme-options.php +0 -20
  33. package/blocks/init/src/Blocks/components/admin-theme-options/assets-admin/index.js +0 -36
  34. package/blocks/init/src/Blocks/components/admin-theme-options/assets-admin/pages/parts.js +0 -56
  35. package/blocks/init/src/Blocks/components/admin-theme-options/manifest.json +0 -5
  36. package/blocks/init/src/Blocks/components/button/assets/index.js +0 -22
  37. package/blocks/init/src/Blocks/components/button/button.php +0 -88
  38. package/blocks/init/src/Blocks/components/button/components/button-editor.js +0 -36
  39. package/blocks/init/src/Blocks/components/button/components/button-options.js +0 -134
  40. package/blocks/init/src/Blocks/components/button/manifest.json +0 -302
  41. package/blocks/init/src/Blocks/components/card/card.php +0 -42
  42. package/blocks/init/src/Blocks/components/card/components/card-editor.js +0 -43
  43. package/blocks/init/src/Blocks/components/card/components/card-options.js +0 -55
  44. package/blocks/init/src/Blocks/components/card/manifest.json +0 -111
  45. package/blocks/init/src/Blocks/components/head/head.php +0 -52
  46. package/blocks/init/src/Blocks/components/head/manifest.json +0 -17
  47. package/blocks/init/src/Blocks/components/heading/components/heading-editor.js +0 -26
  48. package/blocks/init/src/Blocks/components/heading/components/heading-options.js +0 -62
  49. package/blocks/init/src/Blocks/components/heading/heading.php +0 -45
  50. package/blocks/init/src/Blocks/components/heading/manifest.json +0 -76
  51. package/blocks/init/src/Blocks/components/hero/components/hero-editor.js +0 -42
  52. package/blocks/init/src/Blocks/components/hero/components/hero-options.js +0 -100
  53. package/blocks/init/src/Blocks/components/hero/hero.php +0 -45
  54. package/blocks/init/src/Blocks/components/hero/manifest.json +0 -96
  55. package/blocks/init/src/Blocks/components/icon/components/icon-editor.js +0 -23
  56. package/blocks/init/src/Blocks/components/icon/components/icon-options.js +0 -65
  57. package/blocks/init/src/Blocks/components/icon/icon.php +0 -53
  58. package/blocks/init/src/Blocks/components/icon/manifest.json +0 -1238
  59. package/blocks/init/src/Blocks/components/image/components/image-editor.js +0 -64
  60. package/blocks/init/src/Blocks/components/image/components/image-options.js +0 -111
  61. package/blocks/init/src/Blocks/components/image/image.php +0 -68
  62. package/blocks/init/src/Blocks/components/image/manifest.json +0 -125
  63. package/blocks/init/src/Blocks/components/list/components/list-editor.js +0 -30
  64. package/blocks/init/src/Blocks/components/list/components/list-options.js +0 -62
  65. package/blocks/init/src/Blocks/components/list/list.php +0 -32
  66. package/blocks/init/src/Blocks/components/list/manifest.json +0 -127
  67. package/blocks/init/src/Blocks/components/load-more/assets/index.js +0 -19
  68. package/blocks/init/src/Blocks/components/load-more/assets/load-more.js +0 -146
  69. package/blocks/init/src/Blocks/components/load-more/components/load-more-editor.js +0 -14
  70. package/blocks/init/src/Blocks/components/load-more/components/load-more-options.js +0 -19
  71. package/blocks/init/src/Blocks/components/load-more/load-more.php +0 -47
  72. package/blocks/init/src/Blocks/components/load-more/manifest.json +0 -39
  73. package/blocks/init/src/Blocks/components/modal/assets/index.js +0 -27
  74. package/blocks/init/src/Blocks/components/modal/manifest.json +0 -48
  75. package/blocks/init/src/Blocks/components/modal/modal.php +0 -46
  76. package/blocks/init/src/Blocks/components/paragraph/components/paragraph-editor.js +0 -38
  77. package/blocks/init/src/Blocks/components/paragraph/components/paragraph-options.js +0 -48
  78. package/blocks/init/src/Blocks/components/paragraph/manifest.json +0 -81
  79. package/blocks/init/src/Blocks/components/paragraph/paragraph.php +0 -33
  80. package/blocks/init/src/Blocks/components/post-header/manifest.json +0 -5
  81. package/blocks/init/src/Blocks/components/post-header/post-header.php +0 -24
  82. package/blocks/init/src/Blocks/components/quote/components/quote-editor.js +0 -53
  83. package/blocks/init/src/Blocks/components/quote/components/quote-options.js +0 -29
  84. package/blocks/init/src/Blocks/components/quote/manifest.json +0 -47
  85. package/blocks/init/src/Blocks/components/quote/quote.php +0 -49
  86. package/blocks/init/src/Blocks/components/share/assets/index.js +0 -39
  87. package/blocks/init/src/Blocks/components/share/components/share-editor.js +0 -28
  88. package/blocks/init/src/Blocks/components/share/components/share-options.js +0 -112
  89. package/blocks/init/src/Blocks/components/share/manifest.json +0 -72
  90. package/blocks/init/src/Blocks/components/share/share.php +0 -69
  91. package/blocks/init/src/Blocks/components/tracking-before-body-end/manifest.json +0 -5
  92. package/blocks/init/src/Blocks/components/tracking-before-body-end/tracking-before-body-end.php +0 -9
  93. package/blocks/init/src/Blocks/components/tracking-head/manifest.json +0 -5
  94. package/blocks/init/src/Blocks/components/tracking-head/tracking-head.php +0 -9
  95. package/blocks/init/src/Blocks/components/video/components/video-editor.js +0 -74
  96. package/blocks/init/src/Blocks/components/video/components/video-options.js +0 -279
  97. package/blocks/init/src/Blocks/components/video/manifest.json +0 -120
  98. package/blocks/init/src/Blocks/components/video/video.php +0 -70
  99. package/blocks/init/src/Blocks/custom/accordion/accordion-block.js +0 -15
  100. package/blocks/init/src/Blocks/custom/accordion/accordion.php +0 -28
  101. package/blocks/init/src/Blocks/custom/accordion/assets/index.js +0 -37
  102. package/blocks/init/src/Blocks/custom/accordion/components/accordion-editor.js +0 -22
  103. package/blocks/init/src/Blocks/custom/accordion/components/accordion-options.js +0 -18
  104. package/blocks/init/src/Blocks/custom/accordion/manifest.json +0 -32
  105. package/blocks/init/src/Blocks/custom/accordion-item/accordion-item-block.js +0 -19
  106. package/blocks/init/src/Blocks/custom/accordion-item/accordion-item.php +0 -46
  107. package/blocks/init/src/Blocks/custom/accordion-item/components/accordion-item-editor.js +0 -60
  108. package/blocks/init/src/Blocks/custom/accordion-item/manifest.json +0 -69
  109. package/blocks/init/src/Blocks/custom/button/button-block.js +0 -13
  110. package/blocks/init/src/Blocks/custom/button/button.php +0 -11
  111. package/blocks/init/src/Blocks/custom/button/components/button-editor.js +0 -12
  112. package/blocks/init/src/Blocks/custom/button/components/button-options.js +0 -12
  113. package/blocks/init/src/Blocks/custom/button/manifest.json +0 -18
  114. package/blocks/init/src/Blocks/custom/card/card-block.js +0 -13
  115. package/blocks/init/src/Blocks/custom/card/card.php +0 -11
  116. package/blocks/init/src/Blocks/custom/card/components/card-editor.js +0 -12
  117. package/blocks/init/src/Blocks/custom/card/components/card-options.js +0 -15
  118. package/blocks/init/src/Blocks/custom/card/manifest.json +0 -18
  119. package/blocks/init/src/Blocks/custom/carousel/assets/index.js +0 -46
  120. package/blocks/init/src/Blocks/custom/carousel/assets/navigation.js +0 -31
  121. package/blocks/init/src/Blocks/custom/carousel/assets/pagination.js +0 -40
  122. package/blocks/init/src/Blocks/custom/carousel/carousel-block.js +0 -21
  123. package/blocks/init/src/Blocks/custom/carousel/carousel.php +0 -61
  124. package/blocks/init/src/Blocks/custom/carousel/components/carousel-editor.js +0 -25
  125. package/blocks/init/src/Blocks/custom/carousel/components/carousel-options.js +0 -47
  126. package/blocks/init/src/Blocks/custom/carousel/manifest.json +0 -130
  127. package/blocks/init/src/Blocks/custom/column/column-block.js +0 -21
  128. package/blocks/init/src/Blocks/custom/column/column-hooks.js +0 -32
  129. package/blocks/init/src/Blocks/custom/column/column.php +0 -21
  130. package/blocks/init/src/Blocks/custom/column/components/column-editor.js +0 -22
  131. package/blocks/init/src/Blocks/custom/column/components/column-options.js +0 -580
  132. package/blocks/init/src/Blocks/custom/column/manifest.json +0 -625
  133. package/blocks/init/src/Blocks/custom/columns/columns-block.js +0 -20
  134. package/blocks/init/src/Blocks/custom/columns/columns.php +0 -21
  135. package/blocks/init/src/Blocks/custom/columns/components/columns-editor.js +0 -81
  136. package/blocks/init/src/Blocks/custom/columns/components/columns-options.js +0 -104
  137. package/blocks/init/src/Blocks/custom/columns/manifest.json +0 -581
  138. package/blocks/init/src/Blocks/custom/featured-content/components/featured-content-editor.js +0 -28
  139. package/blocks/init/src/Blocks/custom/featured-content/components/featured-content-options.js +0 -248
  140. package/blocks/init/src/Blocks/custom/featured-content/featured-content-block.js +0 -13
  141. package/blocks/init/src/Blocks/custom/featured-content/featured-content.php +0 -139
  142. package/blocks/init/src/Blocks/custom/featured-content/manifest.json +0 -131
  143. package/blocks/init/src/Blocks/custom/featured-content/partials/cards.php +0 -39
  144. package/blocks/init/src/Blocks/custom/group/components/group-editor.js +0 -6
  145. package/blocks/init/src/Blocks/custom/group/group-block.js +0 -14
  146. package/blocks/init/src/Blocks/custom/group/group.php +0 -10
  147. package/blocks/init/src/Blocks/custom/group/manifest.json +0 -32
  148. package/blocks/init/src/Blocks/custom/heading/components/heading-editor.js +0 -15
  149. package/blocks/init/src/Blocks/custom/heading/components/heading-options.js +0 -38
  150. package/blocks/init/src/Blocks/custom/heading/heading-block.js +0 -13
  151. package/blocks/init/src/Blocks/custom/heading/heading-transforms.js +0 -26
  152. package/blocks/init/src/Blocks/custom/heading/heading.php +0 -15
  153. package/blocks/init/src/Blocks/custom/heading/manifest.json +0 -79
  154. package/blocks/init/src/Blocks/custom/hero/components/hero-editor.js +0 -12
  155. package/blocks/init/src/Blocks/custom/hero/components/hero-options.js +0 -14
  156. package/blocks/init/src/Blocks/custom/hero/hero-block.js +0 -13
  157. package/blocks/init/src/Blocks/custom/hero/hero.php +0 -11
  158. package/blocks/init/src/Blocks/custom/hero/manifest.json +0 -17
  159. package/blocks/init/src/Blocks/custom/image/components/image-editor.js +0 -12
  160. package/blocks/init/src/Blocks/custom/image/components/image-options.js +0 -14
  161. package/blocks/init/src/Blocks/custom/image/image-block.js +0 -13
  162. package/blocks/init/src/Blocks/custom/image/image.php +0 -11
  163. package/blocks/init/src/Blocks/custom/image/manifest.json +0 -33
  164. package/blocks/init/src/Blocks/custom/list/components/list-editor.js +0 -14
  165. package/blocks/init/src/Blocks/custom/list/components/list-options.js +0 -39
  166. package/blocks/init/src/Blocks/custom/list/list-block.js +0 -13
  167. package/blocks/init/src/Blocks/custom/list/list.php +0 -15
  168. package/blocks/init/src/Blocks/custom/list/manifest.json +0 -58
  169. package/blocks/init/src/Blocks/custom/map/assets/index.js +0 -20
  170. package/blocks/init/src/Blocks/custom/map/assets/map-controller.js +0 -41
  171. package/blocks/init/src/Blocks/custom/map/assets/utils.js +0 -161
  172. package/blocks/init/src/Blocks/custom/map/components/map-components.js +0 -403
  173. package/blocks/init/src/Blocks/custom/map/components/map-editor.js +0 -56
  174. package/blocks/init/src/Blocks/custom/map/components/map-options.js +0 -550
  175. package/blocks/init/src/Blocks/custom/map/manifest.json +0 -79
  176. package/blocks/init/src/Blocks/custom/map/map-block.js +0 -13
  177. package/blocks/init/src/Blocks/custom/map/map.php +0 -52
  178. package/blocks/init/src/Blocks/custom/map/styles.css +0 -2
  179. package/blocks/init/src/Blocks/custom/modal/components/modal-editor.js +0 -90
  180. package/blocks/init/src/Blocks/custom/modal/manifest.json +0 -51
  181. package/blocks/init/src/Blocks/custom/modal/modal-block.js +0 -14
  182. package/blocks/init/src/Blocks/custom/modal/modal.php +0 -20
  183. package/blocks/init/src/Blocks/custom/paragraph/components/paragraph-editor.js +0 -17
  184. package/blocks/init/src/Blocks/custom/paragraph/components/paragraph-options.js +0 -38
  185. package/blocks/init/src/Blocks/custom/paragraph/manifest.json +0 -82
  186. package/blocks/init/src/Blocks/custom/paragraph/paragraph-block.js +0 -13
  187. package/blocks/init/src/Blocks/custom/paragraph/paragraph-transforms.js +0 -46
  188. package/blocks/init/src/Blocks/custom/paragraph/paragraph.php +0 -15
  189. package/blocks/init/src/Blocks/custom/quote/components/quote-editor.js +0 -12
  190. package/blocks/init/src/Blocks/custom/quote/components/quote-options.js +0 -14
  191. package/blocks/init/src/Blocks/custom/quote/manifest.json +0 -17
  192. package/blocks/init/src/Blocks/custom/quote/quote-block.js +0 -13
  193. package/blocks/init/src/Blocks/custom/quote/quote.php +0 -13
  194. package/blocks/init/src/Blocks/custom/share/components/share-editor.js +0 -6
  195. package/blocks/init/src/Blocks/custom/share/components/share-options.js +0 -12
  196. package/blocks/init/src/Blocks/custom/share/manifest.json +0 -19
  197. package/blocks/init/src/Blocks/custom/share/share-block.js +0 -13
  198. package/blocks/init/src/Blocks/custom/share/share.php +0 -11
  199. package/blocks/init/src/Blocks/custom/site-footer/components/site-footer-editor.js +0 -57
  200. package/blocks/init/src/Blocks/custom/site-footer/components/site-footer-options.js +0 -106
  201. package/blocks/init/src/Blocks/custom/site-footer/manifest.json +0 -73
  202. package/blocks/init/src/Blocks/custom/site-footer/site-footer-block.js +0 -13
  203. package/blocks/init/src/Blocks/custom/site-footer/site-footer.php +0 -74
  204. package/blocks/init/src/Blocks/custom/site-navigation/assets/index.js +0 -9
  205. package/blocks/init/src/Blocks/custom/site-navigation/components/site-navigation-editor.js +0 -42
  206. package/blocks/init/src/Blocks/custom/site-navigation/components/site-navigation-options.js +0 -73
  207. package/blocks/init/src/Blocks/custom/site-navigation/manifest.json +0 -77
  208. package/blocks/init/src/Blocks/custom/site-navigation/site-navigation-block.js +0 -13
  209. package/blocks/init/src/Blocks/custom/site-navigation/site-navigation.php +0 -99
  210. package/blocks/init/src/Blocks/custom/table-of-contents/assets/index.js +0 -58
  211. package/blocks/init/src/Blocks/custom/table-of-contents/components/table-of-contents-editor.js +0 -38
  212. package/blocks/init/src/Blocks/custom/table-of-contents/components/table-of-contents-options.js +0 -32
  213. package/blocks/init/src/Blocks/custom/table-of-contents/manifest.json +0 -48
  214. package/blocks/init/src/Blocks/custom/table-of-contents/table-of-contents-block.js +0 -13
  215. package/blocks/init/src/Blocks/custom/table-of-contents/table-of-contents.php +0 -31
  216. package/blocks/init/src/Blocks/custom/video/components/video-editor.js +0 -6
  217. package/blocks/init/src/Blocks/custom/video/components/video-options.js +0 -12
  218. package/blocks/init/src/Blocks/custom/video/manifest.json +0 -29
  219. package/blocks/init/src/Blocks/custom/video/video-block.js +0 -13
  220. package/blocks/init/src/Blocks/custom/video/video.php +0 -22
  221. package/blocks/init/src/Blocks/manifest.json +0 -32
  222. package/blocks/init/src/Blocks/variations/card-simple/manifest.json +0 -17
  223. package/blocks/init/src/Blocks/wrapper/components/wrapper-editor.js +0 -12
  224. package/blocks/init/src/Blocks/wrapper/components/wrapper-options.js +0 -364
  225. package/blocks/init/src/Blocks/wrapper/manifest.json +0 -459
  226. package/blocks/init/src/Blocks/wrapper/styles-editor.css +0 -13
  227. package/blocks/init/src/Blocks/wrapper/styles.css +0 -19
  228. package/blocks/init/src/Blocks/wrapper/wrapper.js +0 -27
  229. package/blocks/init/src/Blocks/wrapper/wrapper.php +0 -34
@@ -1,81 +0,0 @@
1
- import { __ } from '@wordpress/i18n';
2
- import { useSelect, dispatch } from '@wordpress/data';
3
- import { createBlock } from '@wordpress/blocks';
4
- import { BlockInserter, tailwindClasses, checkAttr } from '@eightshift/frontend-libs-tailwind/scripts';
5
- import { useBlockProps, useInnerBlocksProps } from '@wordpress/block-editor';
6
- import { Button, RichLabel } from '@eightshift/ui-components';
7
- import { icons, BlockIcon } from '@eightshift/ui-components/icons';
8
- import manifest from './../manifest.json';
9
-
10
- export const ColumnsEditor = ({ attributes, setAttributes, clientId }) => {
11
- const { title, layoutPresets } = manifest;
12
-
13
- const innerBlockCount = useSelect(
14
- (select) => select('core/block-editor').getBlock(clientId).innerBlocks?.length ?? 0,
15
- );
16
-
17
- const blockProps = useBlockProps();
18
- const innerBlocksProps = useInnerBlocksProps(blockProps, {
19
- allowedBlocks: ['eightshift-boilerplate/column'],
20
- renderAppender: false,
21
- orientation: 'horizontal',
22
- });
23
-
24
- return (
25
- <>
26
- {innerBlockCount < 1 && (
27
- <div className='es-uic-font-sans mx-auto grid max-w-72 grid-cols-2 gap-1.5 rounded-lg border border-gray-200 p-3 text-xs shadow-lg'>
28
- <RichLabel
29
- icon={<BlockIcon iconName='es-columns' />}
30
- label={title}
31
- className='col-span-2 mb-2 select-none font-medium !text-gray-400'
32
- />
33
-
34
- <span className='col-span-2 select-none justify-self-center'>{__('Common layouts', '%g_textdomain%')}</span>
35
-
36
- {layoutPresets.map(({ name, icon, blocks: blockData, attributes: attrsToSet }, index) => {
37
- return (
38
- <Button
39
- key={index}
40
- onPress={async () => {
41
- const blocksToInsert = blockData.map(({ name: blockName, attributes: blockAttrs }) =>
42
- createBlock(blockName, blockAttrs),
43
- );
44
-
45
- setAttributes(attrsToSet);
46
-
47
- await dispatch('core/block-editor').insertBlocks(blocksToInsert, 0, clientId);
48
- }}
49
- icon={icons?.[icon] ?? icons.genericShapesAlt}
50
- size='large'
51
- >
52
- {name}
53
- </Button>
54
- );
55
- })}
56
-
57
- <span className='col-span-2 select-none justify-self-center'>{__('or', '%g_textdomain%')}</span>
58
-
59
- <BlockInserter
60
- label
61
- clientId={clientId}
62
- className='col-span-2 justify-self-center'
63
- />
64
- </div>
65
- )}
66
-
67
- <div
68
- {...innerBlocksProps}
69
- className={tailwindClasses(attributes, manifest, '[&>.block-list-appender]:hidden')}
70
- />
71
-
72
- {innerBlockCount > 0 && (
73
- <BlockInserter
74
- label
75
- clientId={clientId}
76
- className='mx-auto mt-2.5'
77
- />
78
- )}
79
- </>
80
- );
81
- };
@@ -1,104 +0,0 @@
1
- import { __ } from '@wordpress/i18n';
2
- import { Responsive, Spacer, OptionSelect, NumberPicker } from '@eightshift/ui-components';
3
- import { icons } from '@eightshift/ui-components/icons';
4
- import { getResponsiveData } from '@eightshift/frontend-libs-tailwind/scripts/helpers/breakpoints';
5
- import { checkAttr, getOption, getAttrKey, generateOptionsFromValue } from '@eightshift/frontend-libs-tailwind/scripts';
6
- import manifest from './../manifest.json';
7
-
8
- export const ColumnsOptions = ({ attributes, setAttributes }) => {
9
- const columnsNumOfColumns = checkAttr('columnsNumOfColumns', attributes, manifest);
10
- const columnsColumnGap = checkAttr('columnsColumnGap', attributes, manifest);
11
- const columnsRowGap = checkAttr('columnsRowGap', attributes, manifest);
12
- const columnsRowHeight = checkAttr('columnsRowHeight', attributes, manifest);
13
-
14
- const responsiveData = getResponsiveData(true);
15
-
16
- return (
17
- <>
18
- <Responsive
19
- value={columnsNumOfColumns}
20
- onChange={(value) => setAttributes({ [getAttrKey('columnsNumOfColumns', attributes, manifest)]: value })}
21
- icon={icons.gridAutoCols}
22
- label={__('Number of columns', 'eightshift-ui-components')}
23
- options={generateOptionsFromValue(columnsNumOfColumns)}
24
- noModeSelect
25
- inline
26
- {...responsiveData}
27
- >
28
- {({ currentValue, handleChange }) => (
29
- <NumberPicker
30
- value={parseInt(currentValue)}
31
- onChange={(value) => handleChange(`${value}`)}
32
- fixedWidth={2.25}
33
- size='small'
34
- min={1}
35
- max={12}
36
- step={1}
37
- aria-label={__('Number of columns', 'eightshift-ui-components')}
38
- />
39
- )}
40
- </Responsive>
41
-
42
- <Responsive
43
- value={columnsRowHeight}
44
- onChange={(value) => setAttributes({ [getAttrKey('columnsRowHeight', attributes, manifest)]: value })}
45
- icon={icons.gridRow}
46
- label={__('Row height', 'eightshift-ui-components')}
47
- options={getOption('columnsRowHeight', attributes, manifest)}
48
- noModeSelect
49
- inline
50
- {...responsiveData}
51
- >
52
- {({ currentValue, options, handleChange }) => (
53
- <OptionSelect
54
- options={options}
55
- value={currentValue}
56
- onChange={(value) => handleChange(value)}
57
- />
58
- )}
59
- </Responsive>
60
-
61
- <Spacer />
62
-
63
- <Responsive
64
- value={columnsColumnGap}
65
- onChange={(value) => setAttributes({ [getAttrKey('columnsColumnGap', attributes, manifest)]: value })}
66
- icon={icons.gutter}
67
- label={__('Column gap', 'eightshift-ui-components')}
68
- options={getOption('columnsGap', attributes, manifest)}
69
- noModeSelect
70
- inline
71
- {...responsiveData}
72
- >
73
- {({ currentValue, options, handleChange, isInlineCollapsedView }) => (
74
- <OptionSelect
75
- options={options}
76
- value={currentValue}
77
- onChange={(value) => handleChange(value)}
78
- type={isInlineCollapsedView ? 'menu' : 'toggleButtons'}
79
- />
80
- )}
81
- </Responsive>
82
-
83
- <Responsive
84
- value={columnsRowGap}
85
- onChange={(value) => setAttributes({ [getAttrKey('columnsRowGap', attributes, manifest)]: value })}
86
- icon={icons.verticalSpacing}
87
- label={__('Row gap', 'eightshift-ui-components')}
88
- options={getOption('columnsGap', attributes, manifest)}
89
- noModeSelect
90
- inline
91
- {...responsiveData}
92
- >
93
- {({ currentValue, options, handleChange, isInlineCollapsedView }) => (
94
- <OptionSelect
95
- options={options}
96
- value={currentValue}
97
- onChange={(value) => handleChange(value)}
98
- type={isInlineCollapsedView ? 'menu' : 'toggleButtons'}
99
- />
100
- )}
101
- </Responsive>
102
- </>
103
- );
104
- };