@brilo/base-blocks 0.1.58 → 0.1.61

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 (255) hide show
  1. package/build/.tsbuildinfo +1 -1
  2. package/build/blocks/anchor/anchor-group/icon.js +1 -1
  3. package/build/blocks/career/career-benefits/icon.js +1 -1
  4. package/build/blocks/career/career-header/icon.js +1 -1
  5. package/build/blocks/career/job-position-group/icon.js +1 -1
  6. package/build/blocks/column/column-item/edit.d.ts.map +1 -1
  7. package/build/blocks/column/column-item/index.d.ts.map +1 -1
  8. package/build/blocks/column/column-item/index.js +1 -0
  9. package/build/blocks/compare/compare-option/edit.d.ts +1 -1
  10. package/build/blocks/compare/compare-option/edit.d.ts.map +1 -1
  11. package/build/blocks/compare/compare-option/edit.js +1 -1
  12. package/build/blocks/contact/contact-item/factory.d.ts.map +1 -1
  13. package/build/blocks/document/documents-grid/icon.js +1 -1
  14. package/build/blocks/event/event-detail-content/icon.js +1 -1
  15. package/build/blocks/event/event-detail-header/icon.js +1 -1
  16. package/build/blocks/event/event-list-group/icon.js +1 -1
  17. package/build/blocks/faq/faq-item/edit.d.ts.map +1 -1
  18. package/build/blocks/faq/faq-item/edit.js +2 -2
  19. package/build/blocks/food-menu/food-menu-group/FoodMenuPreview.d.ts.map +1 -1
  20. package/build/blocks/food-menu/food-menu-group/FoodMenuPreview.js +36 -6
  21. package/build/blocks/food-menu/food-menu-group/constants.d.ts +51 -3
  22. package/build/blocks/food-menu/food-menu-group/constants.d.ts.map +1 -1
  23. package/build/blocks/food-menu/food-menu-group/constants.js +32 -6
  24. package/build/blocks/food-menu/food-menu-group/edit.d.ts.map +1 -1
  25. package/build/blocks/food-menu/food-menu-group/edit.js +61 -2
  26. package/build/blocks/food-menu/food-menu-group/factory.d.ts.map +1 -1
  27. package/build/blocks/food-menu/food-menu-group/factory.js +77 -45
  28. package/build/blocks/food-menu/food-menu-group/index.d.ts +1 -1
  29. package/build/blocks/food-menu/food-menu-group/index.d.ts.map +1 -1
  30. package/build/blocks/food-menu/food-menu-group/types.d.ts +12 -5
  31. package/build/blocks/food-menu/food-menu-group/types.d.ts.map +1 -1
  32. package/build/blocks/food-menu/food-reservation/edit.d.ts +7 -0
  33. package/build/blocks/food-menu/food-reservation/edit.d.ts.map +1 -0
  34. package/build/blocks/food-menu/food-reservation/edit.js +69 -0
  35. package/build/blocks/food-menu/food-reservation/factory.d.ts +4 -0
  36. package/build/blocks/food-menu/food-reservation/factory.d.ts.map +1 -0
  37. package/build/blocks/food-menu/food-reservation/factory.js +24 -0
  38. package/build/blocks/food-menu/food-reservation/icon.d.ts +2 -0
  39. package/build/blocks/food-menu/food-reservation/icon.d.ts.map +1 -0
  40. package/build/blocks/food-menu/food-reservation/icon.js +2 -0
  41. package/build/blocks/food-menu/food-reservation/index.d.ts +5 -0
  42. package/build/blocks/food-menu/food-reservation/index.d.ts.map +1 -0
  43. package/build/blocks/food-menu/food-reservation/index.js +6 -0
  44. package/build/blocks/food-menu/food-reservation/types.d.ts +7 -0
  45. package/build/blocks/food-menu/food-reservation/types.d.ts.map +1 -0
  46. package/build/blocks/food-menu/food-reservation/types.js +1 -0
  47. package/build/blocks/form/form-field/types.d.ts +1 -1
  48. package/build/blocks/form/form-field/types.d.ts.map +1 -1
  49. package/build/blocks/form/form-group/index.js +1 -1
  50. package/build/blocks/gallery/gallery-group/constants.d.ts +1 -19
  51. package/build/blocks/gallery/gallery-group/constants.d.ts.map +1 -1
  52. package/build/blocks/gallery/gallery-group/constants.js +1 -8
  53. package/build/blocks/gallery/gallery-group/edit.d.ts.map +1 -1
  54. package/build/blocks/gallery/gallery-group/edit.js +3 -19
  55. package/build/blocks/gallery/gallery-item/index.js +1 -1
  56. package/build/blocks/gallery/gallery-strip-group/constants.d.ts +34 -0
  57. package/build/blocks/gallery/gallery-strip-group/constants.d.ts.map +1 -0
  58. package/build/blocks/gallery/gallery-strip-group/constants.js +17 -0
  59. package/build/blocks/gallery/gallery-strip-group/edit.d.ts +7 -0
  60. package/build/blocks/gallery/gallery-strip-group/edit.d.ts.map +1 -0
  61. package/build/blocks/gallery/gallery-strip-group/edit.js +34 -0
  62. package/build/blocks/gallery/gallery-strip-group/factory.d.ts +5 -0
  63. package/build/blocks/gallery/gallery-strip-group/factory.d.ts.map +1 -0
  64. package/build/blocks/gallery/gallery-strip-group/factory.js +28 -0
  65. package/build/blocks/gallery/gallery-strip-group/index.d.ts +5 -0
  66. package/build/blocks/gallery/gallery-strip-group/index.d.ts.map +1 -0
  67. package/build/blocks/gallery/gallery-strip-group/index.js +7 -0
  68. package/build/blocks/gallery/gallery-strip-group/types.d.ts +18 -0
  69. package/build/blocks/gallery/gallery-strip-group/types.d.ts.map +1 -0
  70. package/build/blocks/gallery/gallery-strip-group/types.js +1 -0
  71. package/build/blocks/groups/banner-group/icon.js +1 -1
  72. package/build/blocks/groups/content-group/icon.js +1 -1
  73. package/build/blocks/groups/text-and-media-group/index.d.ts.map +1 -1
  74. package/build/blocks/groups/text-and-media-group/index.js +2 -0
  75. package/build/blocks/hero/hero-group/edit.js +1 -1
  76. package/build/blocks/hero/hero-group/icon.js +1 -1
  77. package/build/blocks/hero/hero-group/types.d.ts +1 -1
  78. package/build/blocks/hero/hero-group/types.d.ts.map +1 -1
  79. package/build/blocks/hero/hero-item/edit.js +1 -1
  80. package/build/blocks/hero/hero-item/index.js +1 -1
  81. package/build/blocks/layout/box/icon.js +1 -1
  82. package/build/blocks/layout/layout-aside/edit.d.ts +1 -2
  83. package/build/blocks/layout/layout-aside/edit.d.ts.map +1 -1
  84. package/build/blocks/layout/layout-aside/edit.js +1 -1
  85. package/build/blocks/layout/layout-aside/factory.d.ts.map +1 -1
  86. package/build/blocks/layout/layout-aside/icon.d.ts +1 -2
  87. package/build/blocks/layout/layout-aside/icon.d.ts.map +1 -1
  88. package/build/blocks/layout/layout-aside/icon.js +1 -1
  89. package/build/blocks/layout/layout-content/edit.d.ts +1 -2
  90. package/build/blocks/layout/layout-content/edit.d.ts.map +1 -1
  91. package/build/blocks/layout/layout-content/edit.js +1 -1
  92. package/build/blocks/layout/layout-content/factory.d.ts.map +1 -1
  93. package/build/blocks/layout/layout-content/icon.d.ts +1 -2
  94. package/build/blocks/layout/layout-content/icon.d.ts.map +1 -1
  95. package/build/blocks/layout/layout-content/icon.js +1 -1
  96. package/build/blocks/layout/layout-content-w-aside/edit.d.ts +1 -2
  97. package/build/blocks/layout/layout-content-w-aside/edit.d.ts.map +1 -1
  98. package/build/blocks/layout/layout-content-w-aside/factory.d.ts.map +1 -1
  99. package/build/blocks/layout/layout-content-w-aside/icon.d.ts +1 -2
  100. package/build/blocks/layout/layout-content-w-aside/icon.d.ts.map +1 -1
  101. package/build/blocks/layout/layout-content-w-aside/icon.js +1 -1
  102. package/build/blocks/link/link-item/icon.js +1 -1
  103. package/build/blocks/map/map-group/edit.d.ts.map +1 -1
  104. package/build/blocks/map/map-group/edit.js +1 -1
  105. package/build/blocks/map/map-group/factory.d.ts.map +1 -1
  106. package/build/blocks/map/map-group/types.d.ts.map +1 -1
  107. package/build/blocks/newsletter/newsletter-form/edit.d.ts.map +1 -1
  108. package/build/blocks/newsletter/newsletter-form/edit.js +2 -1
  109. package/build/blocks/person/person-group/icon.js +1 -1
  110. package/build/blocks/person/person-item/constants.d.ts.map +1 -1
  111. package/build/blocks/post/post-content/icon.js +1 -1
  112. package/build/blocks/post/post-content/types.d.ts.map +1 -1
  113. package/build/blocks/post/post-slider-group/icon.js +1 -1
  114. package/build/blocks/post/posts-grid/icon.js +1 -1
  115. package/build/blocks/review/review-summary-item/constants.d.ts +3 -0
  116. package/build/blocks/review/review-summary-item/constants.d.ts.map +1 -0
  117. package/build/blocks/review/review-summary-item/constants.js +2 -0
  118. package/build/blocks/review/review-summary-item/edit.d.ts +6 -0
  119. package/build/blocks/review/review-summary-item/edit.d.ts.map +1 -0
  120. package/build/blocks/review/review-summary-item/edit.js +17 -0
  121. package/build/blocks/review/review-summary-item/factory.d.ts +5 -0
  122. package/build/blocks/review/review-summary-item/factory.d.ts.map +1 -0
  123. package/build/blocks/review/review-summary-item/factory.js +23 -0
  124. package/build/blocks/review/review-summary-item/index.d.ts +5 -0
  125. package/build/blocks/review/review-summary-item/index.d.ts.map +1 -0
  126. package/build/blocks/review/review-summary-item/index.js +5 -0
  127. package/build/blocks/review/review-summary-item/types.d.ts +11 -0
  128. package/build/blocks/review/review-summary-item/types.d.ts.map +1 -0
  129. package/build/blocks/review/review-summary-item/types.js +1 -0
  130. package/build/blocks/share/share/icon.js +1 -1
  131. package/build/blocks/signpost/signpost-group/icon.js +1 -1
  132. package/build/blocks/step/step-group/factory.d.ts.map +1 -1
  133. package/build/blocks/step/step-group/icon.js +1 -1
  134. package/build/blocks/testimonial/testimonial-group/icon.js +1 -1
  135. package/build/blocks/urgency/urgency-item/constants.d.ts +56 -0
  136. package/build/blocks/urgency/urgency-item/constants.d.ts.map +1 -0
  137. package/build/blocks/urgency/urgency-item/constants.js +32 -0
  138. package/build/blocks/urgency/urgency-item/edit.d.ts +7 -0
  139. package/build/blocks/urgency/urgency-item/edit.d.ts.map +1 -0
  140. package/build/blocks/urgency/urgency-item/edit.js +83 -0
  141. package/build/blocks/urgency/urgency-item/factory.d.ts +5 -0
  142. package/build/blocks/urgency/urgency-item/factory.d.ts.map +1 -0
  143. package/build/blocks/urgency/urgency-item/factory.js +31 -0
  144. package/build/blocks/urgency/urgency-item/index.d.ts +5 -0
  145. package/build/blocks/urgency/urgency-item/index.d.ts.map +1 -0
  146. package/build/blocks/urgency/urgency-item/index.js +5 -0
  147. package/build/blocks/urgency/urgency-item/types.d.ts +22 -0
  148. package/build/blocks/urgency/urgency-item/types.d.ts.map +1 -0
  149. package/build/blocks/urgency/urgency-item/types.js +1 -0
  150. package/build/components/GalleryImagesAppender/index.d.ts +5 -0
  151. package/build/components/GalleryImagesAppender/index.d.ts.map +1 -0
  152. package/build/components/GalleryImagesAppender/index.js +12 -0
  153. package/build/components/ImagePicker/ImagePicker.d.ts.map +1 -1
  154. package/build/components/ImagePicker/ImagePicker.js +1 -5
  155. package/build/constants.d.ts +19 -0
  156. package/build/constants.d.ts.map +1 -1
  157. package/build/constants.js +8 -0
  158. package/build/hooks/useGroupBlock.d.ts.map +1 -1
  159. package/build/hooks/useGroupBlock.js +10 -3
  160. package/build/index.d.ts +8 -0
  161. package/build/index.d.ts.map +1 -1
  162. package/build/index.js +4 -0
  163. package/package.json +4 -3
  164. package/src/blocks/anchor/anchor-group/icon.tsx +1 -1
  165. package/src/blocks/career/career-benefits/icon.tsx +1 -1
  166. package/src/blocks/career/career-header/icon.tsx +1 -1
  167. package/src/blocks/career/job-position-group/icon.tsx +1 -1
  168. package/src/blocks/column/column-item/edit.tsx +0 -1
  169. package/src/blocks/column/column-item/index.ts +1 -0
  170. package/src/blocks/compare/compare-option/edit.tsx +1 -1
  171. package/src/blocks/contact/contact-item/factory.tsx +1 -2
  172. package/src/blocks/document/documents-grid/icon.tsx +1 -1
  173. package/src/blocks/event/event-detail-content/icon.tsx +1 -1
  174. package/src/blocks/event/event-detail-header/icon.tsx +1 -1
  175. package/src/blocks/event/event-list-group/icon.tsx +1 -1
  176. package/src/blocks/faq/faq-item/edit.tsx +23 -25
  177. package/src/blocks/food-menu/food-menu-group/FoodMenuPreview.tsx +58 -9
  178. package/src/blocks/food-menu/food-menu-group/constants.ts +37 -6
  179. package/src/blocks/food-menu/food-menu-group/edit.tsx +116 -20
  180. package/src/blocks/food-menu/food-menu-group/editor.scss +35 -6
  181. package/src/blocks/food-menu/food-menu-group/factory.tsx +77 -39
  182. package/src/blocks/food-menu/food-menu-group/index.ts +2 -0
  183. package/src/blocks/food-menu/food-menu-group/types.ts +18 -5
  184. package/src/blocks/food-menu/food-reservation/edit.tsx +179 -0
  185. package/src/blocks/food-menu/food-reservation/factory.tsx +28 -0
  186. package/src/blocks/food-menu/food-reservation/icon.tsx +9 -0
  187. package/src/blocks/food-menu/food-reservation/index.ts +10 -0
  188. package/src/blocks/food-menu/food-reservation/types.ts +8 -0
  189. package/src/blocks/form/form-field/types.ts +1 -7
  190. package/src/blocks/form/form-group/index.ts +1 -1
  191. package/src/blocks/gallery/gallery-group/constants.ts +1 -8
  192. package/src/blocks/gallery/gallery-group/edit.tsx +3 -39
  193. package/src/blocks/gallery/gallery-group/editor.scss +0 -12
  194. package/src/blocks/gallery/gallery-item/index.ts +1 -1
  195. package/src/blocks/gallery/gallery-strip-group/constants.ts +22 -0
  196. package/src/blocks/gallery/gallery-strip-group/edit.tsx +112 -0
  197. package/src/blocks/gallery/gallery-strip-group/editor.scss +36 -0
  198. package/src/blocks/gallery/gallery-strip-group/factory.tsx +32 -0
  199. package/src/blocks/gallery/gallery-strip-group/index.ts +11 -0
  200. package/src/blocks/gallery/gallery-strip-group/types.ts +20 -0
  201. package/src/blocks/groups/banner-group/edit.tsx +1 -1
  202. package/src/blocks/groups/banner-group/icon.tsx +1 -1
  203. package/src/blocks/groups/content-group/icon.tsx +1 -1
  204. package/src/blocks/groups/text-and-media-group/index.ts +2 -0
  205. package/src/blocks/hero/hero-group/edit.tsx +3 -3
  206. package/src/blocks/hero/hero-group/icon.tsx +1 -1
  207. package/src/blocks/hero/hero-group/types.ts +1 -1
  208. package/src/blocks/hero/hero-item/edit.tsx +5 -5
  209. package/src/blocks/hero/hero-item/index.ts +1 -1
  210. package/src/blocks/layout/box/icon.tsx +1 -1
  211. package/src/blocks/layout/layout-aside/edit.tsx +2 -3
  212. package/src/blocks/layout/layout-aside/factory.tsx +0 -1
  213. package/src/blocks/layout/layout-aside/icon.tsx +1 -3
  214. package/src/blocks/layout/layout-content/edit.tsx +2 -3
  215. package/src/blocks/layout/layout-content/factory.tsx +0 -1
  216. package/src/blocks/layout/layout-content/icon.tsx +1 -3
  217. package/src/blocks/layout/layout-content-w-aside/edit.tsx +0 -1
  218. package/src/blocks/layout/layout-content-w-aside/factory.tsx +0 -1
  219. package/src/blocks/layout/layout-content-w-aside/icon.tsx +1 -3
  220. package/src/blocks/link/link-item/icon.tsx +1 -1
  221. package/src/blocks/map/map-group/edit.tsx +8 -3
  222. package/src/blocks/map/map-group/factory.tsx +1 -1
  223. package/src/blocks/map/map-group/types.ts +1 -1
  224. package/src/blocks/newsletter/newsletter-form/edit.tsx +5 -2
  225. package/src/blocks/person/person-group/icon.tsx +1 -1
  226. package/src/blocks/person/person-item/constants.ts +1 -1
  227. package/src/blocks/post/post-content/icon.tsx +1 -1
  228. package/src/blocks/post/post-content/types.ts +0 -1
  229. package/src/blocks/post/post-slider-group/icon.tsx +1 -1
  230. package/src/blocks/post/posts-grid/icon.tsx +1 -1
  231. package/src/blocks/review/review-summary-item/constants.ts +2 -0
  232. package/src/blocks/review/review-summary-item/edit.tsx +86 -0
  233. package/src/blocks/review/review-summary-item/editor.scss +44 -0
  234. package/src/blocks/review/review-summary-item/factory.tsx +27 -0
  235. package/src/blocks/review/review-summary-item/index.ts +9 -0
  236. package/src/blocks/review/review-summary-item/types.ts +11 -0
  237. package/src/blocks/share/share/icon.tsx +1 -1
  238. package/src/blocks/signpost/signpost-group/icon.tsx +1 -1
  239. package/src/blocks/step/step-group/factory.tsx +1 -1
  240. package/src/blocks/step/step-group/icon.tsx +1 -1
  241. package/src/blocks/testimonial/testimonial-group/icon.tsx +1 -1
  242. package/src/blocks/urgency/urgency-item/constants.ts +39 -0
  243. package/src/blocks/urgency/urgency-item/edit.tsx +319 -0
  244. package/src/blocks/urgency/urgency-item/editor.scss +99 -0
  245. package/src/blocks/urgency/urgency-item/factory.tsx +36 -0
  246. package/src/blocks/urgency/urgency-item/index.ts +9 -0
  247. package/src/blocks/urgency/urgency-item/types.ts +23 -0
  248. package/src/components/GalleryImagesAppender/editor.scss +15 -0
  249. package/src/components/GalleryImagesAppender/index.tsx +29 -0
  250. package/src/components/ImagePicker/ImagePicker.tsx +6 -6
  251. package/src/components/ItemIconControl/types.d.ts +0 -1
  252. package/src/constants.ts +9 -0
  253. package/src/editor.scss +4 -0
  254. package/src/hooks/useGroupBlock.ts +10 -2
  255. package/src/index.ts +8 -0
@@ -0,0 +1,112 @@
1
+ import {InspectorControls} from '@wordpress/block-editor'
2
+ import {
3
+ PanelBody,
4
+ __experimentalToggleGroupControl as ToggleGroupControl,
5
+ __experimentalToggleGroupControlOption as ToggleGroupControlOption,
6
+ } from '@wordpress/components'
7
+ import {__} from '@wordpress/i18n'
8
+ import clsx from 'clsx'
9
+ import {GalleryImagesAppender} from '~/components/GalleryImagesAppender'
10
+ import {ItemSpacingPanel, itemSpacingStyle} from '~/components/ItemSpacingControl'
11
+ import {useGroupBlock} from '~/hooks/useGroupBlock'
12
+ import {DEFAULT_RATIOS, DIRECTIONS, HEIGHTS, HEIGHT_PIXELS, SPEEDS} from './constants'
13
+ import type {
14
+ GalleryStripDirection,
15
+ GalleryStripGroupAttributes,
16
+ GalleryStripGroupOptions,
17
+ GalleryStripHeight,
18
+ GalleryStripRatio,
19
+ GalleryStripSpeed,
20
+ } from './types'
21
+
22
+ export function createGalleryStripGroupEdit(options: GalleryStripGroupOptions) {
23
+ const RATIOS = options.ratios ?? DEFAULT_RATIOS
24
+
25
+ return function Edit({
26
+ attributes,
27
+ setAttributes,
28
+ clientId,
29
+ }: {
30
+ attributes: GalleryStripGroupAttributes
31
+ setAttributes: (a: Partial<GalleryStripGroupAttributes>) => void
32
+ clientId: string
33
+ }) {
34
+ const {height, ratio, speed, direction, spacing} = attributes
35
+ const heightPx = HEIGHT_PIXELS[height] ?? HEIGHT_PIXELS.md
36
+ const [ratioWidth, ratioHeight] = ratio.split(':').map(Number)
37
+
38
+ const {blockProps, innerBlocksProps} = useGroupBlock({
39
+ blockClassName: clsx(
40
+ options.blockClassName ?? 'g-gallery g-gallery-strip wp-block-section',
41
+ `--speed-${speed}`,
42
+ `--direction-${direction}`,
43
+ ),
44
+ containerClassName: options.containerClassName ?? 'g-gallery-strip__track',
45
+ containerStyle: {
46
+ '--gallery-strip-height': `${heightPx}px`,
47
+ '--gallery-strip-item-width': `${Math.round((heightPx * ratioWidth) / ratioHeight)}px`,
48
+ ...itemSpacingStyle(spacing),
49
+ },
50
+ allowedBlocks: options.allowedBlocks,
51
+ orientation: 'horizontal',
52
+ renderAppender: () => <GalleryImagesAppender clientId={clientId} itemBlock={options.allowedBlocks[0]} />,
53
+ template: options.template,
54
+ layout: {type: 'default'},
55
+ })
56
+
57
+ return (
58
+ <>
59
+ <InspectorControls>
60
+ <PanelBody title={__('Rozložení', 'brilo-blocks')}>
61
+ <ToggleGroupControl
62
+ isBlock
63
+ label={__('Výška', 'brilo-blocks')}
64
+ value={height}
65
+ onChange={(v) => setAttributes({height: v as GalleryStripHeight})}
66
+ >
67
+ {HEIGHTS.map((h) => (
68
+ <ToggleGroupControlOption key={h.value} value={h.value} label={h.label} />
69
+ ))}
70
+ </ToggleGroupControl>
71
+ <ToggleGroupControl
72
+ isBlock
73
+ label={__('Poměr stran', 'brilo-blocks')}
74
+ value={ratio}
75
+ onChange={(v) => setAttributes({ratio: v as GalleryStripRatio})}
76
+ >
77
+ {RATIOS.map((r) => (
78
+ <ToggleGroupControlOption key={r.value} value={r.value} label={r.label} />
79
+ ))}
80
+ </ToggleGroupControl>
81
+ </PanelBody>
82
+ <PanelBody title={__('Animace', 'brilo-blocks')}>
83
+ <ToggleGroupControl
84
+ isBlock
85
+ label={__('Rychlost', 'brilo-blocks')}
86
+ value={speed}
87
+ onChange={(v) => setAttributes({speed: v as GalleryStripSpeed})}
88
+ >
89
+ {SPEEDS.map((s) => (
90
+ <ToggleGroupControlOption key={s.value} value={s.value} label={s.label} />
91
+ ))}
92
+ </ToggleGroupControl>
93
+ <ToggleGroupControl
94
+ isBlock
95
+ label={__('Směr', 'brilo-blocks')}
96
+ value={direction}
97
+ onChange={(v) => setAttributes({direction: v as GalleryStripDirection})}
98
+ >
99
+ {DIRECTIONS.map((d) => (
100
+ <ToggleGroupControlOption key={d.value} value={d.value} label={d.label} />
101
+ ))}
102
+ </ToggleGroupControl>
103
+ </PanelBody>
104
+ <ItemSpacingPanel spacing={spacing} onChange={(v) => setAttributes({spacing: v})} />
105
+ </InspectorControls>
106
+ <div {...blockProps}>
107
+ <div {...innerBlocksProps} />
108
+ </div>
109
+ </>
110
+ )
111
+ }
112
+ }
@@ -0,0 +1,36 @@
1
+ .g-gallery-strip {
2
+ // Horizontal scroll only: items get a fixed width (height × ratio) and grow
3
+ // vertically to fit the gallery-item controls instead of overflowing.
4
+ .g-gallery-strip__track {
5
+ display: flex;
6
+ flex-wrap: nowrap;
7
+ align-items: stretch;
8
+ gap: 16px;
9
+ overflow-x: auto;
10
+ overflow-y: hidden;
11
+ }
12
+
13
+ .g-gallery-strip__track > .wp-block,
14
+ .g-gallery-strip__track > .block-list-appender {
15
+ flex: 0 0 var(--gallery-strip-item-width);
16
+ width: var(--gallery-strip-item-width);
17
+ display: flex;
18
+ flex-direction: column;
19
+ min-height: var(--gallery-strip-height);
20
+ margin: 0;
21
+ }
22
+
23
+ .i-gallery {
24
+ display: flex;
25
+ flex: 1;
26
+ flex-direction: column;
27
+ }
28
+
29
+ .i-gallery__image-wrapper {
30
+ flex: 1;
31
+ }
32
+
33
+ .g-gallery__appender {
34
+ min-height: var(--gallery-strip-height);
35
+ }
36
+ }
@@ -0,0 +1,32 @@
1
+ import {InnerBlocks} from '@wordpress/block-editor'
2
+ import type {BlockConfiguration} from '@wordpress/blocks'
3
+ import {__} from '@wordpress/i18n'
4
+ import {ITEM_SPACING_ATTRIBUTE} from '~/components/ItemSpacingControl'
5
+ import {DEFAULT_RATIOS, DIRECTIONS, HEIGHTS, SPEEDS} from './constants'
6
+ import {createGalleryStripGroupEdit} from './edit'
7
+ import type {GalleryStripGroupAttributes, GalleryStripGroupOptions} from './types'
8
+
9
+ export type {GalleryStripGroupAttributes, GalleryStripGroupOptions}
10
+
11
+ export function createGalleryStripGroupBlock(options: GalleryStripGroupOptions): BlockConfiguration<GalleryStripGroupAttributes> {
12
+ const ratios = options.ratios ?? DEFAULT_RATIOS
13
+
14
+ return {
15
+ name: options.name,
16
+ title: options.title ?? __('Pás obrázků', 'brilo-blocks'),
17
+ description: options.description ?? __('Nekonečně se posouvající pás obrázků', 'brilo-blocks'),
18
+ category: options.category ?? 'layout',
19
+ ...(options.parent && {parent: options.parent}),
20
+ icon: options.icon ?? 'images-alt2',
21
+ supports: {html: false, customClassName: false},
22
+ attributes: {
23
+ height: {type: 'string', default: HEIGHTS[1].value, enum: HEIGHTS.map((h) => h.value)},
24
+ ratio: {type: 'string', default: ratios[0].value, enum: ratios.map((r) => r.value)},
25
+ speed: {type: 'string', default: SPEEDS[1].value, enum: SPEEDS.map((s) => s.value)},
26
+ direction: {type: 'string', default: DIRECTIONS[0].value, enum: DIRECTIONS.map((d) => d.value)},
27
+ ...ITEM_SPACING_ATTRIBUTE,
28
+ },
29
+ edit: createGalleryStripGroupEdit(options),
30
+ save: () => <InnerBlocks.Content />,
31
+ } as unknown as BlockConfiguration<GalleryStripGroupAttributes>
32
+ }
@@ -0,0 +1,11 @@
1
+ export type {GalleryStripGroupAttributes, GalleryStripGroupOptions} from './types'
2
+ export {createGalleryStripGroupBlock} from './factory'
3
+
4
+ import type {GalleryStripGroupOptions} from './types'
5
+
6
+ export const galleryStripGroupDefaults: GalleryStripGroupOptions = {
7
+ name: 'brilo/gallery-strip-group',
8
+ parent: ['brilo/base-section'],
9
+ allowedBlocks: ['brilo/gallery-item'],
10
+ template: [],
11
+ }
@@ -0,0 +1,20 @@
1
+ import type {BriloBlockType, OptionArray} from '~/types'
2
+ import type {DEFAULT_RATIOS, DIRECTIONS, HEIGHTS, SPEEDS} from './constants'
3
+
4
+ export type GalleryStripHeight = (typeof HEIGHTS)[number]['value']
5
+ export type GalleryStripSpeed = (typeof SPEEDS)[number]['value']
6
+ export type GalleryStripRatio = (typeof DEFAULT_RATIOS)[number]['value']
7
+ export type GalleryStripDirection = (typeof DIRECTIONS)[number]['value']
8
+
9
+ export interface GalleryStripGroupAttributes extends Record<string, unknown> {
10
+ height: GalleryStripHeight
11
+ ratio: GalleryStripRatio
12
+ speed: GalleryStripSpeed
13
+ direction: GalleryStripDirection
14
+ spacing?: number
15
+ }
16
+
17
+ export interface GalleryStripGroupOptions extends BriloBlockType {
18
+ allowedBlocks: string[]
19
+ ratios?: OptionArray
20
+ }
@@ -8,7 +8,7 @@ import {
8
8
  BaseControl,
9
9
  } from '@wordpress/components'
10
10
  import {__} from '@wordpress/i18n'
11
- import {ImagePickerBody, ImagePickerControl} from '~/components/ImagePicker'
11
+ import {ImagePickerControl} from '~/components/ImagePicker'
12
12
  import {useGroupBlock} from '~/hooks/useGroupBlock'
13
13
  import {useTenantColorPalette} from '~/hooks/useTenantColorPalette'
14
14
  import {DEFAULT_HEADING_STYLES, DEFAULT_VARIANTS} from './constants'
@@ -1,5 +1,5 @@
1
1
  export const icon = (
2
- <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <svg aria-hidden="true" focusable="false" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <rect x="0.5" y="5.5" width="19" height="8" stroke="black" fill="none" />
4
4
  <path d="M2 8H8V9H2V8Z" fill="black" />
5
5
  <path d="M2 10H9V11H2V10Z" fill="black" />
@@ -1,5 +1,5 @@
1
1
  export const icon = (
2
- <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <svg aria-hidden="true" focusable="false" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <rect x="1.5" y="12.5" width="17" height="7" stroke="black" fill="none" />
4
4
  <path fillRule="evenodd" clipRule="evenodd" d="M8.5 15L6 18L11 18L8.5 15Z" fill="black" />
5
5
  <path
@@ -15,5 +15,7 @@ export const textAndMediaGroupDefaults: TextAndMediaGroupOptions = {
15
15
  'core/heading',
16
16
  'core/list',
17
17
  'core/paragraph',
18
+ 'brilo/review-summary-item',
19
+ 'brilo/urgency-item',
18
20
  ],
19
21
  }
@@ -54,13 +54,13 @@ export function createHeroGroupEdit(options: HeroGroupOptions) {
54
54
  <SelectControl
55
55
  label={__('Efekt přechodu', 'brilo-blocks')}
56
56
  value={effect}
57
- options={EFFECTS_OPTIONS as any}
57
+ options={EFFECTS_OPTIONS}
58
58
  onChange={(v) => setAttributes({effect: v as Effect})}
59
59
  />
60
60
  <SelectControl
61
61
  label={__('Poměr stran', 'brilo-blocks')}
62
62
  value={aspectRatio}
63
- options={ASPECT_RATIOS_OPTIONS as any}
63
+ options={ASPECT_RATIOS_OPTIONS}
64
64
  onChange={(v) => setAttributes({aspectRatio: v as AspectRatio})}
65
65
  />
66
66
  </PanelBody>
@@ -74,7 +74,7 @@ export function createHeroGroupEdit(options: HeroGroupOptions) {
74
74
  <NumberControl
75
75
  label={__('Rychlost přehrávání (ms)', 'brilo-blocks')}
76
76
  value={autoplaySpeed}
77
- onChange={(v) => setAttributes({autoplaySpeed: parseInt(v ?? '3000')})}
77
+ onChange={(v) => setAttributes({autoplaySpeed: parseInt(v ?? '3000', 10)})}
78
78
  />
79
79
  )}
80
80
  <ToggleControl
@@ -1,5 +1,5 @@
1
1
  export const icon = (
2
- <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <svg aria-hidden="true" focusable="false" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <path d="M4 4H8V5H4V4Z" fill="black" />
4
4
  <path d="M7 19H9V20H7V19Z" fill="black" />
5
5
  <path d="M10 19H11V20H10V19Z" fill="black" />
@@ -2,7 +2,7 @@ import type {BlockEditProps} from '@wordpress/blocks'
2
2
  import type {ReactNode} from 'react'
3
3
  import type {BriloBlockType, OptionArray} from '~/types'
4
4
  import type {HeroSliderItem} from '../hero-item/types'
5
- import {DEFAULT_ASPECT_RATIOS, EFFECTS, VARIANTS} from './constants'
5
+ import type {DEFAULT_ASPECT_RATIOS, EFFECTS, VARIANTS} from './constants'
6
6
 
7
7
  export type Variant = (typeof VARIANTS)[number]['value']
8
8
  export type Effect = (typeof EFFECTS)[number]['value']
@@ -1,4 +1,4 @@
1
- import {InspectorControls, RichText, useBlockProps, useInnerBlocksProps} from '@wordpress/block-editor'
1
+ import {InspectorControls, RichText} from '@wordpress/block-editor'
2
2
  import type {BlockEditProps} from '@wordpress/blocks'
3
3
  import {
4
4
  PanelBody,
@@ -12,7 +12,7 @@ import {
12
12
  } from '@wordpress/components'
13
13
  import {__} from '@wordpress/i18n'
14
14
  import {ImagePickerBody, ImagePickerControl} from '~/components/ImagePicker'
15
- import {CONTENT_POSITIONS, HEADING_LEVELS} from './constants'
15
+ import {HEADING_LEVELS} from './constants'
16
16
  import type {ContentPosition, HeroItemAttributes, HeroItemOptions} from './types'
17
17
  import {useGroupBlock} from '~/hooks/useGroupBlock'
18
18
  import {useTenantColorPalette} from '~/hooks/useTenantColorPalette'
@@ -41,14 +41,14 @@ export function createHeroItemEdit(options: HeroItemOptions) {
41
41
 
42
42
  <BaseControl label={__('Focal point (desktop)', 'brilo-blocks')}>
43
43
  <AlignmentMatrixControl
44
- value={focalPoint.point as any}
44
+ value={focalPoint.point}
45
45
  onChange={(v) => setAttributes({focalPoint: {...focalPoint, point: (v ?? 'center center') as ContentPosition}})}
46
46
  />
47
47
  </BaseControl>
48
48
 
49
49
  <BaseControl label={__('Focal point (mobil)', 'brilo-blocks')}>
50
50
  <AlignmentMatrixControl
51
- value={(focalPoint.sm?.point ?? 'center center') as any}
51
+ value={focalPoint.sm?.point ?? 'center center'}
52
52
  onChange={(v) => setAttributes({focalPoint: {...focalPoint, sm: {point: (v ?? 'center center') as ContentPosition}}})}
53
53
  />
54
54
  </BaseControl>
@@ -136,7 +136,7 @@ export function createHeroItemEdit(options: HeroItemOptions) {
136
136
  />
137
137
 
138
138
  <RichText
139
- tagName={`h${headingLevel}` as any}
139
+ tagName={`h${headingLevel}` as 'h1' | 'h2' | 'h3' | 'h4'}
140
140
  className="i-hero__title u-text-editable"
141
141
  style={titleColor ? {color: titleColor} : undefined}
142
142
  value={title}
@@ -6,5 +6,5 @@ import type {HeroItemOptions} from './types'
6
6
  export const heroItemDefaults: HeroItemOptions = {
7
7
  name: 'brilo/hero-item',
8
8
  parent: ['brilo/hero-group'],
9
- allowedBlocks: ['core/list', 'core/paragraph', 'brilo/button-group'],
9
+ allowedBlocks: ['core/list', 'core/paragraph', 'brilo/button-group', 'brilo/review-summary-item'],
10
10
  }
@@ -1,5 +1,5 @@
1
1
  export const icon = (
2
- <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <svg aria-hidden="true" focusable="false" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <rect x="1.5" y="1.5" width="17" height="17" rx="2" stroke="black" fill="none" />
4
4
  </svg>
5
5
  )
@@ -1,8 +1,7 @@
1
- import React from 'react'
2
1
  import {useGroupBlock} from '~/hooks/useGroupBlock'
3
- import type {AsideAttributes, AsideOptions} from './types'
2
+ import type {AsideOptions} from './types'
4
3
 
5
- export function createAsideEdit(options: AsideOptions) {
4
+ export function createAsideEdit(_options: AsideOptions) {
6
5
  return function Edit() {
7
6
  const {blockProps, innerBlocksProps} = useGroupBlock({
8
7
  blockClassName: 'l-content-w-aside__aside',
@@ -1,7 +1,6 @@
1
1
  import {InnerBlocks} from '@wordpress/block-editor'
2
2
  import type {BlockConfiguration} from '@wordpress/blocks'
3
3
  import {__} from '@wordpress/i18n'
4
- import React from 'react'
5
4
  import {createAsideEdit} from './edit'
6
5
  import {icon as defaultIcon} from './icon'
7
6
  import type {AsideAttributes, AsideOptions} from './types'
@@ -1,7 +1,5 @@
1
- import React from 'react'
2
-
3
1
  export const icon = (
4
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <svg aria-hidden="true" focusable="false" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
3
  <path fillRule="evenodd" clipRule="evenodd" d="M8 4H20V20H8V4ZM10 6H18V18H10V6Z" fill="currentColor" />
6
4
  </svg>
7
5
  )
@@ -1,8 +1,7 @@
1
- import React from 'react'
2
1
  import {useGroupBlock} from '~/hooks/useGroupBlock'
3
- import type {ContentAttributes, ContentOptions} from './types'
2
+ import type {ContentOptions} from './types'
4
3
 
5
- export function createContentEdit(options: ContentOptions) {
4
+ export function createContentEdit(_options: ContentOptions) {
6
5
  return function Edit() {
7
6
  const {blockProps, innerBlocksProps} = useGroupBlock({
8
7
  blockClassName: 'l-content-w-aside__content',
@@ -1,7 +1,6 @@
1
1
  import {InnerBlocks} from '@wordpress/block-editor'
2
2
  import type {BlockConfiguration} from '@wordpress/blocks'
3
3
  import {__} from '@wordpress/i18n'
4
- import React from 'react'
5
4
  import {createContentEdit} from './edit'
6
5
  import {icon as defaultIcon} from './icon'
7
6
  import type {ContentAttributes, ContentOptions} from './types'
@@ -1,7 +1,5 @@
1
- import React from 'react'
2
-
3
1
  export const icon = (
4
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <svg aria-hidden="true" focusable="false" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
3
  <path fillRule="evenodd" clipRule="evenodd" d="M4 4H16V20H4V4ZM6 6H14V18H6V6Z" fill="currentColor" />
6
4
  </svg>
7
5
  )
@@ -5,7 +5,6 @@ import {
5
5
  __experimentalToggleGroupControlOption as ToggleGroupControlOption,
6
6
  } from '@wordpress/components'
7
7
  import {__} from '@wordpress/i18n'
8
- import React from 'react'
9
8
  import {useGroupBlock} from '~/hooks/useGroupBlock'
10
9
  import {ASIDE_SIZES} from './constants'
11
10
  import type {AsideSize, ContentWithAsideAttributes, ContentWithAsideOptions} from './types'
@@ -1,7 +1,6 @@
1
1
  import {InnerBlocks} from '@wordpress/block-editor'
2
2
  import type {BlockConfiguration} from '@wordpress/blocks'
3
3
  import {__} from '@wordpress/i18n'
4
- import React from 'react'
5
4
  import type {OptionArray} from '~/types'
6
5
  import {ASIDE_SIZES} from './constants'
7
6
  import {createContentWithAsideEdit} from './edit'
@@ -1,7 +1,5 @@
1
- import React from 'react'
2
-
3
1
  export const icon = (
4
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <svg aria-hidden="true" focusable="false" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5
3
  <path fillRule="evenodd" clipRule="evenodd" d="M4 4H20V20H4V4ZM6 6H13V18H6V6ZM15 6H18V18H15V6Z" fill="currentColor" />
6
4
  </svg>
7
5
  )
@@ -1,5 +1,5 @@
1
1
  export const icon = (
2
- <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <svg aria-hidden="true" focusable="false" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <path d="M8 4H4C2.895 4 2 4.895 2 6v10c0 1.105.895 2 2 2h10c1.105 0 2-.895 2-2v-4" stroke="black" strokeWidth="1.5" fill="none" />
4
4
  <path d="M12 2h6v6M18 2L10 10" stroke="black" strokeWidth="1.5" strokeLinecap="round" />
5
5
  </svg>
@@ -1,4 +1,4 @@
1
- import {InspectorControls, RichText, useBlockProps} from '@wordpress/block-editor'
1
+ import {InspectorControls, RichText} from '@wordpress/block-editor'
2
2
  import {
3
3
  PanelBody,
4
4
  BaseControl,
@@ -157,8 +157,13 @@ export function createMapGroupEdit(options: MapGroupOptions) {
157
157
  <p>{[lat, long].filter(Boolean).join(', ')}</p>
158
158
  </div>
159
159
  )}
160
- {mapType === 'url' && iframeSrc && <iframe src={iframeSrc} width={640} height={320}></iframe>}
161
- {mapType === 'element' && iframeElement && <div dangerouslySetInnerHTML={{__html: iframeElement}} />}
160
+ {mapType === 'url' && iframeSrc && (
161
+ <iframe src={iframeSrc} title={__('Náhled mapy', 'brilo-blocks')} width={640} height={320}></iframe>
162
+ )}
163
+ {mapType === 'element' && iframeElement && (
164
+ // biome-ignore lint/security/noDangerouslySetInnerHtml: the editor's own embed code (an iframe from the map provider), previewed as the page will show it
165
+ <div dangerouslySetInnerHTML={{__html: iframeElement}} />
166
+ )}
162
167
  {mapType === 'image' && img && <ImagePickerControl value={img} onChange={(v) => setAttributes({img: v})} size={[640, 320]} />}
163
168
  {(!mapType ||
164
169
  (mapType === 'gps' && !lat && !long) ||
@@ -5,7 +5,7 @@ import {createMapGroupEdit} from './edit'
5
5
  import type {MapGroupAttributes, MapGroupOptions} from './types'
6
6
  import {MAP_TYPES} from './constants'
7
7
  import type {StringArray} from '~/types'
8
- import {DEFAULT_HEADING_STYLES, DEFAULT_VARIANTS} from '~/blocks/groups/banner-group/constants'
8
+ import {DEFAULT_HEADING_STYLES} from '~/blocks/groups/banner-group/constants'
9
9
  import {InnerBlocks} from '@wordpress/block-editor'
10
10
  import {HEADING_LEVELS} from '~/constants'
11
11
 
@@ -1,4 +1,4 @@
1
- import type {BriloBlockType, Media, OptionArray, StringArray} from '~/types'
1
+ import type {BriloBlockType, Media, StringArray} from '~/types'
2
2
  import type {DEFAULT_HEADING_STYLES, MAP_TYPES} from './constants'
3
3
  import type {HEADING_LEVELS} from '~/constants'
4
4
 
@@ -26,6 +26,7 @@ export function createNewsletterFormEdit(options: NewsletterFormOptions) {
26
26
  }) {
27
27
  const {heading, description, form} = attributes
28
28
  const {email, submit, terms} = form.fields
29
+ const TermsTag = terms.isCheckbox ? 'label' : 'div'
29
30
 
30
31
  const setForm = (patch: Partial<NewsletterFormAttributes['form']>) => setAttributes({form: {...form, ...patch}})
31
32
  const setFields = (patch: Partial<NewsletterFormAttributes['form']['fields']>) => setForm({fields: {...form.fields, ...patch}})
@@ -77,6 +78,7 @@ export function createNewsletterFormEdit(options: NewsletterFormOptions) {
77
78
 
78
79
  <PanelBody title={__('Skrytá pole', 'brilo-blocks')} initialOpen={false}>
79
80
  {form.hiddenFields.map((field, i) => (
81
+ // biome-ignore lint/suspicious/noArrayIndexKey: hidden fields carry no id; the list is edited by position
80
82
  <div key={i} className="f-newsletter__hidden-field">
81
83
  <TextControl
82
84
  label={__('Název', 'brilo-blocks')}
@@ -176,7 +178,8 @@ export function createNewsletterFormEdit(options: NewsletterFormOptions) {
176
178
  </button>
177
179
  </div>
178
180
 
179
- <label className="f-newsletter__terms">
181
+ {/* A label only around a checkbox; without one the terms are plain text. */}
182
+ <TermsTag className="f-newsletter__terms">
180
183
  {terms.isCheckbox && <input type="checkbox" disabled />}
181
184
  <RichText
182
185
  tagName="span"
@@ -186,7 +189,7 @@ export function createNewsletterFormEdit(options: NewsletterFormOptions) {
186
189
  placeholder={__('Souhlas se zpracováním...', 'brilo-blocks')}
187
190
  allowedFormats={['core/bold', 'core/italic', 'core/link']}
188
191
  />
189
- </label>
192
+ </TermsTag>
190
193
  </div>
191
194
  </>
192
195
  )
@@ -1,5 +1,5 @@
1
1
  export const icon = (
2
- <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <svg aria-hidden="true" focusable="false" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <rect x="2.5" y="1.5" width="15" height="17" stroke="black" fill="none" />
4
4
  <path d="M7 13H13V14H7V13Z" fill="black" />
5
5
  <path d="M6 15H14V16H6V15Z" fill="black" />
@@ -1 +1 @@
1
- import {__} from '@wordpress/i18n'
1
+ export {}
@@ -1,5 +1,5 @@
1
1
  export const icon = (
2
- <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <svg aria-hidden="true" focusable="false" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <rect x="3" y="2" width="14" height="16" rx="1" stroke="black" fill="none" />
4
4
  <line x1="6" y1="6" x2="14" y2="6" stroke="black" />
5
5
  <line x1="6" y1="9" x2="14" y2="9" stroke="black" />
@@ -1,6 +1,5 @@
1
1
  import type {BriloBlockType} from '~/types'
2
2
 
3
- // biome-ignore lint/complexity/noBannedTypes: no block-specific attributes, matches BriloBlockType's generic constraint shape
4
3
  export interface PostContentAttributes extends Record<string, unknown> {}
5
4
 
6
5
  export type PostContentOptions = BriloBlockType
@@ -1,5 +1,5 @@
1
1
  export const icon = (
2
- <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <svg aria-hidden="true" focusable="false" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <rect x="1" y="4" width="18" height="12" rx="1" stroke="black" fill="none" />
4
4
  <rect x="3" y="6" width="6" height="5" stroke="black" fill="none" />
5
5
  <path d="M3 13H7V14H3V13Z" fill="black" />
@@ -1,5 +1,5 @@
1
1
  export const icon = (
2
- <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
2
+ <svg aria-hidden="true" focusable="false" width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
3
3
  <rect x="1" y="1" width="8" height="8" stroke="black" fill="none" />
4
4
  <rect x="11" y="1" width="8" height="8" stroke="black" fill="none" />
5
5
  <rect x="1" y="11" width="8" height="8" stroke="black" fill="none" />
@@ -0,0 +1,2 @@
1
+ export const RATING_MAX = 5
2
+ export const RATING_STEP = 0.1