@brilo/base-blocks 0.1.49 → 0.1.51

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 (40) hide show
  1. package/build/.tsbuildinfo +1 -1
  2. package/build/blocks/contact/contact-group/factory.d.ts.map +1 -1
  3. package/build/blocks/contact/contact-group/types.d.ts.map +1 -1
  4. package/build/blocks/contact/contact-item/edit.d.ts.map +1 -1
  5. package/build/blocks/person/person-group/constants.d.ts +17 -0
  6. package/build/blocks/person/person-group/constants.d.ts.map +1 -1
  7. package/build/blocks/person/person-group/constants.js +10 -0
  8. package/build/blocks/person/person-group/edit.d.ts.map +1 -1
  9. package/build/blocks/person/person-group/edit.js +6 -4
  10. package/build/blocks/person/person-group/factory.d.ts.map +1 -1
  11. package/build/blocks/person/person-group/factory.js +12 -1
  12. package/build/blocks/person/person-group/types.d.ts +11 -0
  13. package/build/blocks/person/person-group/types.d.ts.map +1 -1
  14. package/build/blocks/sections/base-section/controls.d.ts.map +1 -1
  15. package/build/blocks/sections/base-section/controls.js +4 -3
  16. package/build/blocks/sections/base-section/types.d.ts +1 -0
  17. package/build/blocks/sections/base-section/types.d.ts.map +1 -1
  18. package/build/blocks/step/step-group/constants.d.ts +55 -0
  19. package/build/blocks/step/step-group/constants.d.ts.map +1 -1
  20. package/build/blocks/step/step-group/constants.js +29 -0
  21. package/build/blocks/step/step-group/edit.d.ts.map +1 -1
  22. package/build/blocks/step/step-group/edit.js +28 -3
  23. package/build/blocks/step/step-group/factory.d.ts.map +1 -1
  24. package/build/blocks/step/step-group/factory.js +16 -1
  25. package/build/blocks/step/step-group/types.d.ts +17 -1
  26. package/build/blocks/step/step-group/types.d.ts.map +1 -1
  27. package/package.json +1 -1
  28. package/src/blocks/contact/contact-group/factory.tsx +1 -6
  29. package/src/blocks/contact/contact-group/types.ts +1 -7
  30. package/src/blocks/contact/contact-item/edit.tsx +1 -4
  31. package/src/blocks/person/person-group/constants.ts +13 -0
  32. package/src/blocks/person/person-group/edit.tsx +63 -3
  33. package/src/blocks/person/person-group/factory.tsx +12 -1
  34. package/src/blocks/person/person-group/types.ts +13 -0
  35. package/src/blocks/sections/base-section/controls.tsx +10 -1
  36. package/src/blocks/sections/base-section/types.ts +1 -0
  37. package/src/blocks/step/step-group/constants.ts +35 -0
  38. package/src/blocks/step/step-group/edit.tsx +160 -2
  39. package/src/blocks/step/step-group/factory.tsx +16 -1
  40. package/src/blocks/step/step-group/types.ts +20 -1
@@ -1,5 +1,7 @@
1
1
  import {InspectorControls} from '@wordpress/block-editor'
2
2
  import {
3
+ BaseControl,
4
+ ColorPalette,
3
5
  PanelBody,
4
6
  __experimentalToggleGroupControl as ToggleGroupControl,
5
7
  __experimentalToggleGroupControlOption as ToggleGroupControlOption,
@@ -7,8 +9,9 @@ import {
7
9
  import {__} from '@wordpress/i18n'
8
10
  import clsx from 'clsx'
9
11
  import {useGroupBlock} from '~/hooks/useGroupBlock'
10
- import {COLUMNS, HEADING_LEVELS} from './constants'
11
- import type {PersonGroupAttributes, PersonGroupOptions} from './types'
12
+ import {useTenantColorPalette} from '~/hooks/useTenantColorPalette'
13
+ import {COLUMNS, DEFAULT_SHADOWS, HEADING_LEVELS, TEXT_ALIGNS} from './constants'
14
+ import type {PersonGroupAttributes, PersonGroupOptions, PersonShadow, PersonTextAlign} from './types'
12
15
 
13
16
  export function createPersonGroupEdit(options: PersonGroupOptions) {
14
17
  return function Edit({
@@ -18,7 +21,8 @@ export function createPersonGroupEdit(options: PersonGroupOptions) {
18
21
  attributes: PersonGroupAttributes
19
22
  setAttributes: (a: Partial<PersonGroupAttributes>) => void
20
23
  }) {
21
- const {columns, headingLevel} = attributes
24
+ const {columns, headingLevel, style} = attributes
25
+ const {paletteColors} = useTenantColorPalette()
22
26
 
23
27
  const {blockProps, innerBlocksProps} = useGroupBlock({
24
28
  blockClassName: clsx(options.blockClassName ?? 'g-person wp-block-section'),
@@ -55,6 +59,62 @@ export function createPersonGroupEdit(options: PersonGroupOptions) {
55
59
  ))}
56
60
  </ToggleGroupControl>
57
61
  </PanelBody>
62
+ {style && (
63
+ <PanelBody title={__('Styl', 'brilo-blocks')}>
64
+ <ToggleGroupControl
65
+ isBlock
66
+ label={__('Stín', 'brilo-blocks')}
67
+ value={style.shadow}
68
+ onChange={(v) => setAttributes({style: {...style, shadow: v as PersonShadow}})}
69
+ >
70
+ {DEFAULT_SHADOWS.map((s) => (
71
+ <ToggleGroupControlOption key={s.value} value={s.value} label={s.label} />
72
+ ))}
73
+ </ToggleGroupControl>
74
+ <BaseControl
75
+ label={__('Barva okraje', 'brilo-blocks')}
76
+ help={__('Bez vybrané barvy se okraj nevykreslí.', 'brilo-blocks')}
77
+ id="person-group-border-color"
78
+ >
79
+ <ColorPalette
80
+ colors={paletteColors}
81
+ value={style.borderColor || undefined}
82
+ onChange={(value) => setAttributes({style: {...style, borderColor: value ?? ''}})}
83
+ />
84
+ </BaseControl>
85
+ <BaseControl label={__('Barva pozadí', 'brilo-blocks')} id="person-group-background-color">
86
+ <ColorPalette
87
+ colors={paletteColors}
88
+ value={style.backgroundColor || undefined}
89
+ onChange={(value) => setAttributes({style: {...style, backgroundColor: value ?? ''}})}
90
+ />
91
+ </BaseControl>
92
+ <BaseControl label={__('Barva textu', 'brilo-blocks')} id="person-group-text-color">
93
+ <ColorPalette
94
+ colors={paletteColors}
95
+ value={style.textColor || undefined}
96
+ onChange={(value) => setAttributes({style: {...style, textColor: value ?? ''}})}
97
+ />
98
+ </BaseControl>
99
+ <BaseControl label={__('Barva nadpisu', 'brilo-blocks')} id="person-group-heading-color">
100
+ <ColorPalette
101
+ colors={paletteColors}
102
+ value={style.headingColor || undefined}
103
+ onChange={(value) => setAttributes({style: {...style, headingColor: value ?? ''}})}
104
+ />
105
+ </BaseControl>
106
+ <ToggleGroupControl
107
+ isBlock
108
+ label={__('Zarovnání textu', 'brilo-blocks')}
109
+ value={style.textAlign}
110
+ onChange={(v) => setAttributes({style: {...style, textAlign: v as PersonTextAlign}})}
111
+ >
112
+ {TEXT_ALIGNS.map((a) => (
113
+ <ToggleGroupControlOption key={a.value} value={a.value} label={a.label} />
114
+ ))}
115
+ </ToggleGroupControl>
116
+ </PanelBody>
117
+ )}
58
118
  </InspectorControls>
59
119
  <div {...blockProps}>
60
120
  <div {...innerBlocksProps} />
@@ -1,7 +1,7 @@
1
1
  import {InnerBlocks} from '@wordpress/block-editor'
2
2
  import type {BlockConfiguration} from '@wordpress/blocks'
3
3
  import {__} from '@wordpress/i18n'
4
- import {COLUMNS, HEADING_LEVELS} from './constants'
4
+ import {COLUMNS, DEFAULT_SHADOWS, HEADING_LEVELS} from './constants'
5
5
  import {createPersonGroupEdit} from './edit'
6
6
  import {icon as defaultIcon} from './icon'
7
7
  import type {PersonGroupAttributes, PersonGroupOptions} from './types'
@@ -28,6 +28,17 @@ export function createPersonGroupBlock(options: PersonGroupOptions): BlockConfig
28
28
  default: HEADING_LEVELS[0],
29
29
  enum: [...HEADING_LEVELS],
30
30
  },
31
+ style: {
32
+ type: 'object',
33
+ default: {
34
+ shadow: DEFAULT_SHADOWS[0].value,
35
+ borderColor: '',
36
+ backgroundColor: '',
37
+ textColor: '',
38
+ headingColor: '',
39
+ textAlign: 'center',
40
+ },
41
+ },
31
42
  },
32
43
  edit: createPersonGroupEdit(options),
33
44
  save: () => <InnerBlocks.Content />,
@@ -1,8 +1,21 @@
1
1
  import type {BriloBlockType} from '~/types'
2
+ import type {DEFAULT_SHADOWS, TEXT_ALIGNS} from './constants'
3
+
4
+ export type PersonShadow = (typeof DEFAULT_SHADOWS)[number]['value']
5
+
6
+ export type PersonTextAlign = (typeof TEXT_ALIGNS)[number]['value']
2
7
 
3
8
  export interface PersonGroupAttributes extends Record<string, unknown> {
4
9
  columns: number
5
10
  headingLevel: number
11
+ style: {
12
+ shadow: PersonShadow
13
+ borderColor: string
14
+ backgroundColor: string
15
+ textColor: string
16
+ headingColor: string
17
+ textAlign: PersonTextAlign
18
+ }
6
19
  }
7
20
 
8
21
  export interface PersonGroupOptions extends BriloBlockType {}
@@ -76,8 +76,9 @@ function FluidDecorationControl({label, placement, value, onChange}: FluidDecora
76
76
  // overriding the frontend once the editor actually writes an explicit value.
77
77
  const bgPosition = value?.bgPosition ?? (placement === 'bottom' ? 'left bottom' : 'left top')
78
78
  const repeat = value?.repeat ?? 'repeat-x'
79
+ const opacity = value?.opacity ?? BACKGROUND_IMAGE_OPACITY_DEFAULT
79
80
 
80
- const update = (patch: Partial<FluidDecoration>) => onChange(mergeUpdate({img, height, fit, bgPosition, repeat}, value, patch))
81
+ const update = (patch: Partial<FluidDecoration>) => onChange(mergeUpdate({img, height, fit, bgPosition, repeat, opacity}, value, patch))
81
82
 
82
83
  const handleSelect = (media: {id: number; url: string; alt: string; width?: number; height?: number}) => {
83
84
  const nextImg: FluidDecorationImage = {id: media.id, src: media.url, alt: media.alt ?? '', width: media.width, height: media.height}
@@ -158,6 +159,14 @@ function FluidDecorationControl({label, placement, value, onChange}: FluidDecora
158
159
  options={[...BACKGROUND_IMAGE_REPEATS]}
159
160
  onChange={(next) => update({repeat: next as BackgroundImageRepeat})}
160
161
  />
162
+
163
+ <RangeControl
164
+ label={__('Průhlednost obrázku', 'brilo-blocks')}
165
+ value={opacity}
166
+ min={0}
167
+ max={100}
168
+ onChange={(next) => update({opacity: next ?? BACKGROUND_IMAGE_OPACITY_DEFAULT})}
169
+ />
161
170
  </>
162
171
  )}
163
172
  </BaseControl>
@@ -19,6 +19,7 @@ export interface FluidDecoration {
19
19
  // key as "position" on top of this object, which would silently clobber a same-named field.
20
20
  bgPosition?: BackgroundImagePosition
21
21
  repeat?: BackgroundImageRepeat
22
+ opacity?: number
22
23
  }
23
24
 
24
25
  export type DecorationImage = FluidDecorationImage
@@ -4,3 +4,38 @@ export const DEFAULT_VARIANTS = [
4
4
  {value: 'horizontal', label: __('Horizontální', 'brilo-blocks')},
5
5
  {value: 'vertical', label: __('Vertikální', 'brilo-blocks')},
6
6
  ] as const
7
+
8
+ export const DEFAULT_SHADOWS = [
9
+ {value: 'none', label: __('Žádný', 'brilo-blocks')},
10
+ {value: 'sm', label: __('Malý', 'brilo-blocks')},
11
+ {value: 'md', label: __('Střední', 'brilo-blocks')},
12
+ ] as const
13
+
14
+ export const TEXT_ALIGNS = [
15
+ {value: 'left', label: __('Vlevo', 'brilo-blocks')},
16
+ {value: 'center', label: __('Na střed', 'brilo-blocks')},
17
+ ] as const
18
+
19
+ export const DEFAULT_ICON_SIZE = 48
20
+ export const ICON_SIZE_MIN = 16
21
+ export const ICON_SIZE_MAX = 96
22
+
23
+ export const DEFAULT_ICON_SIZE_PRESETS = [
24
+ {value: 24, label: __('SM', 'brilo-blocks')},
25
+ {value: 32, label: __('MD', 'brilo-blocks')},
26
+ {value: 48, label: __('Výchozí', 'brilo-blocks')},
27
+ {value: 64, label: __('LG', 'brilo-blocks')},
28
+ {value: 80, label: __('XL', 'brilo-blocks')},
29
+ ] as const
30
+
31
+ export const DEFAULT_ICON_BACKGROUND_SIZE = 144
32
+ export const ICON_BACKGROUND_SIZE_MIN = 56
33
+ export const ICON_BACKGROUND_SIZE_MAX = 200
34
+
35
+ export const DEFAULT_ICON_BACKGROUND_SIZE_PRESETS = [
36
+ {value: 88, label: __('SM', 'brilo-blocks')},
37
+ {value: 112, label: __('MD', 'brilo-blocks')},
38
+ {value: 144, label: __('Výchozí', 'brilo-blocks')},
39
+ {value: 168, label: __('LG', 'brilo-blocks')},
40
+ {value: 200, label: __('XL', 'brilo-blocks')},
41
+ ] as const
@@ -1,6 +1,10 @@
1
1
  import {InspectorControls} from '@wordpress/block-editor'
2
2
  import {
3
+ BaseControl,
4
+ Button,
5
+ ColorPalette,
3
6
  PanelBody,
7
+ RangeControl,
4
8
  ToggleControl,
5
9
  __experimentalToggleGroupControl as ToggleGroupControl,
6
10
  __experimentalToggleGroupControlOption as ToggleGroupControlOption,
@@ -9,9 +13,73 @@ import {__} from '@wordpress/i18n'
9
13
  import clsx from 'clsx'
10
14
  import {ItemSpacingPanel, itemSpacingStyle} from '~/components/ItemSpacingControl'
11
15
  import {useGroupBlock} from '~/hooks/useGroupBlock'
16
+ import {useTenantColorPalette} from '~/hooks/useTenantColorPalette'
12
17
  import type {OptionArray} from '~/types'
13
- import type {StepGroupAttributes, StepGroupOptions, StepVariant} from './types'
14
- import {DEFAULT_VARIANTS} from './constants'
18
+ import type {StepGroupAttributes, StepGroupOptions, StepShadow, StepTextAlign} from './types'
19
+ import {
20
+ DEFAULT_ICON_BACKGROUND_SIZE,
21
+ DEFAULT_ICON_BACKGROUND_SIZE_PRESETS,
22
+ DEFAULT_ICON_SIZE,
23
+ DEFAULT_ICON_SIZE_PRESETS,
24
+ DEFAULT_SHADOWS,
25
+ DEFAULT_VARIANTS,
26
+ ICON_BACKGROUND_SIZE_MAX,
27
+ ICON_BACKGROUND_SIZE_MIN,
28
+ ICON_SIZE_MAX,
29
+ ICON_SIZE_MIN,
30
+ TEXT_ALIGNS,
31
+ } from './constants'
32
+
33
+ // Older step-group blocks were saved before `style` / `style.icon` existed. WordPress does
34
+ // not deep-merge object-attribute defaults, so normalise here to stay backward compatible.
35
+ function normaliseStyle(saved: Partial<StepGroupAttributes['style']> | undefined): StepGroupAttributes['style'] {
36
+ return {
37
+ shadow: 'none',
38
+ borderColor: '',
39
+ backgroundColor: '',
40
+ textColor: '',
41
+ headingColor: '',
42
+ textAlign: 'left',
43
+ ...saved,
44
+ icon: {
45
+ size: DEFAULT_ICON_SIZE,
46
+ background: '',
47
+ backgroundSize: DEFAULT_ICON_BACKGROUND_SIZE,
48
+ ...saved?.icon,
49
+ },
50
+ }
51
+ }
52
+
53
+ function PresetSizeControl({
54
+ label,
55
+ id,
56
+ value,
57
+ presets,
58
+ min,
59
+ max,
60
+ onChange,
61
+ }: {
62
+ label: string
63
+ id: string
64
+ value: number
65
+ presets: readonly {value: number; label: string}[]
66
+ min: number
67
+ max: number
68
+ onChange: (v: number) => void
69
+ }) {
70
+ return (
71
+ <BaseControl label={label} id={id}>
72
+ <div style={{display: 'flex', gap: 4, marginBottom: 8, flexWrap: 'wrap'}}>
73
+ {presets.map((p) => (
74
+ <Button key={p.label} variant={value === p.value ? 'primary' : 'secondary'} size="small" onClick={() => onChange(p.value)}>
75
+ {p.label}
76
+ </Button>
77
+ ))}
78
+ </div>
79
+ <RangeControl value={value} onChange={(v) => onChange(v ?? min)} min={min} max={max} step={1} withInputField />
80
+ </BaseControl>
81
+ )
82
+ }
15
83
 
16
84
  export function createStepGroupEdit<TVariants extends OptionArray = typeof DEFAULT_VARIANTS>(options: StepGroupOptions<TVariants>) {
17
85
  const VARIANTS = options.variants ?? DEFAULT_VARIANTS
@@ -24,6 +92,8 @@ export function createStepGroupEdit<TVariants extends OptionArray = typeof DEFAU
24
92
  setAttributes: (a: Partial<StepGroupAttributes>) => void
25
93
  }) {
26
94
  const {variant, disableIcon, spacing} = attributes
95
+ const style = normaliseStyle(attributes.style as Partial<StepGroupAttributes['style']> | undefined)
96
+ const {paletteColors} = useTenantColorPalette()
27
97
 
28
98
  const {blockProps, innerBlocksProps} = useGroupBlock({
29
99
  blockClassName: clsx(options.blockClassName ?? 'g-step wp-block-section', `--variant-${variant}`, disableIcon && '--disable-icon'),
@@ -55,6 +125,94 @@ export function createStepGroupEdit<TVariants extends OptionArray = typeof DEFAU
55
125
  onChange={(v) => setAttributes({disableIcon: v})}
56
126
  />
57
127
  </PanelBody>
128
+ {style && (
129
+ <PanelBody title={__('Styl', 'brilo-blocks')}>
130
+ <ToggleGroupControl
131
+ isBlock
132
+ label={__('Stín', 'brilo-blocks')}
133
+ value={style.shadow}
134
+ onChange={(v) => setAttributes({style: {...style, shadow: v as StepShadow}})}
135
+ >
136
+ {DEFAULT_SHADOWS.map((s) => (
137
+ <ToggleGroupControlOption key={s.value} value={s.value} label={s.label} />
138
+ ))}
139
+ </ToggleGroupControl>
140
+ <BaseControl
141
+ label={__('Barva okraje', 'brilo-blocks')}
142
+ help={__('Bez vybrané barvy se okraj nevykreslí.', 'brilo-blocks')}
143
+ id="step-group-border-color"
144
+ >
145
+ <ColorPalette
146
+ colors={paletteColors}
147
+ value={style.borderColor || undefined}
148
+ onChange={(value) => setAttributes({style: {...style, borderColor: value ?? ''}})}
149
+ />
150
+ </BaseControl>
151
+ <BaseControl label={__('Barva pozadí', 'brilo-blocks')} id="step-group-background-color">
152
+ <ColorPalette
153
+ colors={paletteColors}
154
+ value={style.backgroundColor || undefined}
155
+ onChange={(value) => setAttributes({style: {...style, backgroundColor: value ?? ''}})}
156
+ />
157
+ </BaseControl>
158
+ <BaseControl label={__('Barva textu', 'brilo-blocks')} id="step-group-text-color">
159
+ <ColorPalette
160
+ colors={paletteColors}
161
+ value={style.textColor || undefined}
162
+ onChange={(value) => setAttributes({style: {...style, textColor: value ?? ''}})}
163
+ />
164
+ </BaseControl>
165
+ <BaseControl label={__('Barva nadpisu', 'brilo-blocks')} id="step-group-heading-color">
166
+ <ColorPalette
167
+ colors={paletteColors}
168
+ value={style.headingColor || undefined}
169
+ onChange={(value) => setAttributes({style: {...style, headingColor: value ?? ''}})}
170
+ />
171
+ </BaseControl>
172
+ <ToggleGroupControl
173
+ isBlock
174
+ label={__('Zarovnání textu', 'brilo-blocks')}
175
+ value={style.textAlign}
176
+ onChange={(v) => setAttributes({style: {...style, textAlign: v as StepTextAlign}})}
177
+ >
178
+ {TEXT_ALIGNS.map((a) => (
179
+ <ToggleGroupControlOption key={a.value} value={a.value} label={a.label} />
180
+ ))}
181
+ </ToggleGroupControl>
182
+ </PanelBody>
183
+ )}
184
+
185
+ <PanelBody title={__('Ikona', 'brilo-blocks')} initialOpen={false}>
186
+ <PresetSizeControl
187
+ label={__('Velikost', 'brilo-blocks')}
188
+ id="step-group-icon-size"
189
+ value={style.icon.size}
190
+ presets={DEFAULT_ICON_SIZE_PRESETS}
191
+ min={ICON_SIZE_MIN}
192
+ max={ICON_SIZE_MAX}
193
+ onChange={(v) => setAttributes({style: {...style, icon: {...style.icon, size: v}}})}
194
+ />
195
+ <BaseControl
196
+ label={__('Barva pozadí', 'brilo-blocks')}
197
+ help={__('Ovládá i barvu spojnice mezi kroky.', 'brilo-blocks')}
198
+ id="step-group-icon-background"
199
+ >
200
+ <ColorPalette
201
+ colors={paletteColors}
202
+ value={style.icon.background || undefined}
203
+ onChange={(value) => setAttributes({style: {...style, icon: {...style.icon, background: value ?? ''}}})}
204
+ />
205
+ </BaseControl>
206
+ <PresetSizeControl
207
+ label={__('Velikost pozadí', 'brilo-blocks')}
208
+ id="step-group-icon-background-size"
209
+ value={style.icon.backgroundSize}
210
+ presets={DEFAULT_ICON_BACKGROUND_SIZE_PRESETS}
211
+ min={ICON_BACKGROUND_SIZE_MIN}
212
+ max={ICON_BACKGROUND_SIZE_MAX}
213
+ onChange={(v) => setAttributes({style: {...style, icon: {...style.icon, backgroundSize: v}}})}
214
+ />
215
+ </PanelBody>
58
216
  <ItemSpacingPanel spacing={spacing} onChange={(v) => setAttributes({spacing: v})} />
59
217
  </InspectorControls>
60
218
  <div {...blockProps}>
@@ -1,7 +1,7 @@
1
1
  import {InnerBlocks} from '@wordpress/block-editor'
2
2
  import type {BlockConfiguration} from '@wordpress/blocks'
3
3
  import {__} from '@wordpress/i18n'
4
- import {DEFAULT_VARIANTS} from './constants'
4
+ import {DEFAULT_ICON_BACKGROUND_SIZE, DEFAULT_ICON_SIZE, DEFAULT_SHADOWS, DEFAULT_VARIANTS, TEXT_ALIGNS} from './constants'
5
5
  import {createStepGroupEdit} from './edit'
6
6
  import type {StepGroupAttributes, StepGroupOptions} from './types'
7
7
  import {icon} from '~/blocks/step/step-group/icon'
@@ -30,6 +30,21 @@ export function createStepGroupBlock<TVariants extends OptionArray = typeof DEFA
30
30
  type: 'boolean',
31
31
  default: false,
32
32
  },
33
+ style: {
34
+ type: 'object',
35
+ default: {
36
+ shadow: DEFAULT_SHADOWS[0].value,
37
+ borderColor: '',
38
+ backgroundColor: '',
39
+ textColor: '',
40
+ headingColor: '',
41
+ textAlign: TEXT_ALIGNS[0].value,
42
+ icon: {
43
+ background: '',
44
+ backgroundSize: DEFAULT_ICON_BACKGROUND_SIZE,
45
+ },
46
+ },
47
+ },
33
48
  ...ITEM_SPACING_ATTRIBUTE,
34
49
  },
35
50
  edit: createStepGroupEdit(options as unknown as StepGroupOptions),
@@ -1,11 +1,30 @@
1
1
  import type {BriloBlockType, OptionArray} from '~/types'
2
- import type {DEFAULT_VARIANTS} from './constants'
2
+ import type {DEFAULT_SHADOWS, DEFAULT_VARIANTS, TEXT_ALIGNS} from './constants'
3
3
 
4
4
  export type StepVariant = (typeof DEFAULT_VARIANTS)[number]['value']
5
5
 
6
+ export type StepShadow = (typeof DEFAULT_SHADOWS)[number]['value']
7
+
8
+ export type StepTextAlign = (typeof TEXT_ALIGNS)[number]['value']
9
+
10
+ export interface StepIconStyle {
11
+ size: number
12
+ background: string
13
+ backgroundSize: number
14
+ }
15
+
6
16
  export interface StepGroupAttributes<TVariant extends string = StepVariant> extends Record<string, unknown> {
7
17
  variant: TVariant
8
18
  disableIcon: boolean
19
+ style: {
20
+ shadow: StepShadow
21
+ borderColor: string
22
+ backgroundColor: string
23
+ textColor: string
24
+ headingColor: string
25
+ textAlign: StepTextAlign
26
+ icon: StepIconStyle
27
+ }
9
28
  spacing?: number
10
29
  }
11
30