@brilo/base-blocks 0.1.26 → 0.1.28
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.
- package/README.md +34 -11
- package/build/.tsbuildinfo +1 -1
- package/build/blocks/accordion/accordion-group/constants.d.ts +2 -0
- package/build/blocks/accordion/accordion-group/constants.d.ts.map +1 -0
- package/build/blocks/accordion/accordion-group/constants.js +1 -0
- package/build/blocks/accordion/accordion-group/edit.d.ts +6 -0
- package/build/blocks/accordion/accordion-group/edit.d.ts.map +1 -0
- package/build/blocks/accordion/accordion-group/edit.js +21 -0
- package/build/blocks/accordion/accordion-group/factory.d.ts +5 -0
- package/build/blocks/accordion/accordion-group/factory.d.ts.map +1 -0
- package/build/blocks/accordion/accordion-group/factory.js +26 -0
- package/build/blocks/accordion/accordion-group/index.d.ts +5 -0
- package/build/blocks/accordion/accordion-group/index.d.ts.map +1 -0
- package/build/blocks/accordion/accordion-group/index.js +7 -0
- package/build/blocks/accordion/accordion-group/types.d.ts +9 -0
- package/build/blocks/accordion/accordion-group/types.d.ts.map +1 -0
- package/build/blocks/accordion/accordion-group/types.js +1 -0
- package/build/blocks/accordion/accordion-item/edit.d.ts +6 -0
- package/build/blocks/accordion/accordion-item/edit.d.ts.map +1 -0
- package/build/blocks/accordion/accordion-item/edit.js +14 -0
- package/build/blocks/accordion/accordion-item/factory.d.ts +5 -0
- package/build/blocks/accordion/accordion-item/factory.d.ts.map +1 -0
- package/build/blocks/accordion/accordion-item/factory.js +21 -0
- package/build/blocks/accordion/accordion-item/index.d.ts +5 -0
- package/build/blocks/accordion/accordion-item/index.d.ts.map +1 -0
- package/build/blocks/accordion/accordion-item/index.js +5 -0
- package/build/blocks/accordion/accordion-item/types.d.ts +7 -0
- package/build/blocks/accordion/accordion-item/types.d.ts.map +1 -0
- package/build/blocks/accordion/accordion-item/types.js +1 -0
- package/build/blocks/document/documents-group/DocumentsSelectModal.d.ts +12 -0
- package/build/blocks/document/documents-group/DocumentsSelectModal.d.ts.map +1 -0
- package/build/blocks/document/documents-group/DocumentsSelectModal.js +153 -0
- package/build/blocks/document/documents-group/constants.d.ts +7 -0
- package/build/blocks/document/documents-group/constants.d.ts.map +1 -0
- package/build/blocks/document/documents-group/constants.js +5 -0
- package/build/blocks/document/documents-group/edit.d.ts +6 -0
- package/build/blocks/document/documents-group/edit.d.ts.map +1 -0
- package/build/blocks/document/documents-group/edit.js +27 -0
- package/build/blocks/document/documents-group/factory.d.ts +5 -0
- package/build/blocks/document/documents-group/factory.d.ts.map +1 -0
- package/build/blocks/document/documents-group/factory.js +50 -0
- package/build/blocks/document/documents-group/icon.d.ts +2 -0
- package/build/blocks/document/documents-group/icon.d.ts.map +1 -0
- package/build/blocks/document/documents-group/icon.js +2 -0
- package/build/blocks/document/documents-group/index.d.ts +6 -0
- package/build/blocks/document/documents-group/index.d.ts.map +1 -0
- package/build/blocks/document/documents-group/index.js +5 -0
- package/build/blocks/document/documents-group/types.d.ts +22 -0
- package/build/blocks/document/documents-group/types.d.ts.map +1 -0
- package/build/blocks/document/documents-group/types.js +1 -0
- package/build/blocks/layout/layout-aside/factory.d.ts.map +1 -1
- package/build/blocks/layout/layout-aside/icon.d.ts.map +1 -1
- package/build/blocks/layout/layout-content/factory.d.ts.map +1 -1
- package/build/blocks/layout/layout-content/icon.d.ts.map +1 -1
- package/build/blocks/layout/layout-content-w-aside/edit.d.ts.map +1 -1
- package/build/blocks/layout/layout-content-w-aside/edit.js +1 -1
- package/build/blocks/layout/layout-content-w-aside/factory.d.ts.map +1 -1
- package/build/blocks/layout/layout-content-w-aside/icon.d.ts.map +1 -1
- package/build/blocks/sections/base-section/controls.d.ts.map +1 -1
- package/build/blocks/sections/base-section/controls.js +1 -1
- package/build/index.d.ts +6 -0
- package/build/index.d.ts.map +1 -1
- package/build/index.js +3 -0
- package/package.json +6 -1
- package/src/blocks/accordion/accordion-group/constants.ts +1 -0
- package/src/blocks/accordion/accordion-group/edit.tsx +45 -0
- package/src/blocks/accordion/accordion-group/factory.tsx +29 -0
- package/src/blocks/accordion/accordion-group/index.ts +11 -0
- package/src/blocks/accordion/accordion-group/types.ts +10 -0
- package/src/blocks/accordion/accordion-item/edit.tsx +47 -0
- package/src/blocks/accordion/accordion-item/factory.tsx +24 -0
- package/src/blocks/accordion/accordion-item/index.ts +9 -0
- package/src/blocks/accordion/accordion-item/types.ts +7 -0
- package/src/blocks/document/documents-group/DocumentsSelectModal.tsx +273 -0
- package/src/blocks/document/documents-group/constants.ts +7 -0
- package/src/blocks/document/documents-group/edit.tsx +96 -0
- package/src/blocks/document/documents-group/factory.tsx +59 -0
- package/src/blocks/document/documents-group/icon.tsx +9 -0
- package/src/blocks/document/documents-group/index.ts +15 -0
- package/src/blocks/document/documents-group/types.ts +25 -0
- package/src/blocks/layout/layout-aside/factory.tsx +1 -3
- package/src/blocks/layout/layout-aside/icon.tsx +1 -6
- package/src/blocks/layout/layout-content/editor.scss +1 -1
- package/src/blocks/layout/layout-content/factory.tsx +1 -3
- package/src/blocks/layout/layout-content/icon.tsx +1 -6
- package/src/blocks/layout/layout-content-w-aside/edit.tsx +5 -1
- package/src/blocks/layout/layout-content-w-aside/factory.tsx +1 -3
- package/src/blocks/layout/layout-content-w-aside/icon.tsx +1 -6
- package/src/blocks/sections/base-section/controls.tsx +7 -1
- package/src/index.ts +12 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import {InspectorControls, useBlockProps} 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 {DOCUMENTS_GROUP_COLUMNS} from './constants'
|
|
9
|
+
import type {DocumentsGroupAttributes, DocumentsGroupOptions} from './types'
|
|
10
|
+
|
|
11
|
+
export function createDocumentsGroupEdit(options: DocumentsGroupOptions) {
|
|
12
|
+
return function Edit({
|
|
13
|
+
attributes,
|
|
14
|
+
setAttributes,
|
|
15
|
+
}: {
|
|
16
|
+
attributes: DocumentsGroupAttributes
|
|
17
|
+
setAttributes: (a: Partial<DocumentsGroupAttributes>) => void
|
|
18
|
+
}) {
|
|
19
|
+
const {mode, listingStyle, sortBy, columns, selectedDocuments, selectedCategories} = attributes
|
|
20
|
+
|
|
21
|
+
const blockProps = useBlockProps({className: 'wp-block-section'})
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<>
|
|
25
|
+
<InspectorControls>
|
|
26
|
+
<PanelBody title={__('Nastavení výpisu', 'brilo-blocks')} initialOpen>
|
|
27
|
+
<ToggleGroupControl
|
|
28
|
+
label={__('Zdroj dokumentů', 'brilo-blocks')}
|
|
29
|
+
value={mode}
|
|
30
|
+
onChange={(value) => {
|
|
31
|
+
const nextMode = value as DocumentsGroupAttributes['mode']
|
|
32
|
+
setAttributes({
|
|
33
|
+
mode: nextMode,
|
|
34
|
+
sortBy: 'manual' === nextMode ? sortBy : sortBy === 'manual-order' ? 'menu_order' : sortBy,
|
|
35
|
+
})
|
|
36
|
+
}}
|
|
37
|
+
isBlock
|
|
38
|
+
>
|
|
39
|
+
<ToggleGroupControlOption value="manual" label={__('Ruční výběr', 'brilo-blocks')} />
|
|
40
|
+
<ToggleGroupControlOption value="category" label={__('Dle kategorie', 'brilo-blocks')} />
|
|
41
|
+
</ToggleGroupControl>
|
|
42
|
+
|
|
43
|
+
<ToggleGroupControl
|
|
44
|
+
label={__('Styl výpisu', 'brilo-blocks')}
|
|
45
|
+
value={listingStyle}
|
|
46
|
+
onChange={(value) => setAttributes({listingStyle: value as DocumentsGroupAttributes['listingStyle']})}
|
|
47
|
+
isBlock
|
|
48
|
+
>
|
|
49
|
+
<ToggleGroupControlOption value="classic" label={__('Klasický výpis', 'brilo-blocks')} />
|
|
50
|
+
<ToggleGroupControlOption value="group-by-category" label={__('Dle kategorií', 'brilo-blocks')} />
|
|
51
|
+
</ToggleGroupControl>
|
|
52
|
+
|
|
53
|
+
<ToggleGroupControl
|
|
54
|
+
label={__('Řazení', 'brilo-blocks')}
|
|
55
|
+
value={sortBy}
|
|
56
|
+
onChange={(value) => setAttributes({sortBy: value as DocumentsGroupAttributes['sortBy']})}
|
|
57
|
+
isBlock
|
|
58
|
+
>
|
|
59
|
+
<ToggleGroupControlOption value="menu_order" label={__('Pořadí', 'brilo-blocks')} />
|
|
60
|
+
<ToggleGroupControlOption value="date" label={__('Datum', 'brilo-blocks')} />
|
|
61
|
+
{'manual' === mode && <ToggleGroupControlOption value="manual-order" label={__('Dle výběru', 'brilo-blocks')} />}
|
|
62
|
+
</ToggleGroupControl>
|
|
63
|
+
|
|
64
|
+
<ToggleGroupControl
|
|
65
|
+
label={__('Počet sloupců', 'brilo-blocks')}
|
|
66
|
+
help={
|
|
67
|
+
'group-by-category' === listingStyle ? __('Platí pro seznam dokumentů uvnitř každé kategorie.', 'brilo-blocks') : undefined
|
|
68
|
+
}
|
|
69
|
+
value={String(columns)}
|
|
70
|
+
onChange={(value) => setAttributes({columns: Number(value) as DocumentsGroupAttributes['columns']})}
|
|
71
|
+
isBlock
|
|
72
|
+
>
|
|
73
|
+
{DOCUMENTS_GROUP_COLUMNS.map((c) => (
|
|
74
|
+
<ToggleGroupControlOption key={c} value={String(c)} label={String(c)} />
|
|
75
|
+
))}
|
|
76
|
+
</ToggleGroupControl>
|
|
77
|
+
</PanelBody>
|
|
78
|
+
</InspectorControls>
|
|
79
|
+
|
|
80
|
+
<div {...blockProps}>
|
|
81
|
+
{'category' === mode &&
|
|
82
|
+
options.renderCategoryControl?.({
|
|
83
|
+
selectedItems: selectedCategories,
|
|
84
|
+
onChange: (ids: number[]) => setAttributes({selectedCategories: ids}),
|
|
85
|
+
})}
|
|
86
|
+
|
|
87
|
+
{'manual' === mode &&
|
|
88
|
+
options.renderDocumentsControl?.({
|
|
89
|
+
selectedItems: selectedDocuments,
|
|
90
|
+
onChange: (ids: number[]) => setAttributes({selectedDocuments: ids}),
|
|
91
|
+
})}
|
|
92
|
+
</div>
|
|
93
|
+
</>
|
|
94
|
+
)
|
|
95
|
+
}
|
|
96
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type {BlockConfiguration} from '@wordpress/blocks'
|
|
2
|
+
import {__} from '@wordpress/i18n'
|
|
3
|
+
import {
|
|
4
|
+
DOCUMENTS_GROUP_COLUMNS_DEFAULT,
|
|
5
|
+
DOCUMENTS_GROUP_LISTING_STYLE_DEFAULT,
|
|
6
|
+
DOCUMENTS_GROUP_MODE_DEFAULT,
|
|
7
|
+
DOCUMENTS_GROUP_SORT_BY_DEFAULT,
|
|
8
|
+
} from './constants'
|
|
9
|
+
import {createDocumentsGroupEdit} from './edit'
|
|
10
|
+
import {icon as defaultIcon} from './icon'
|
|
11
|
+
import type {DocumentsGroupAttributes, DocumentsGroupOptions} from './types'
|
|
12
|
+
|
|
13
|
+
export type {DocumentsGroupAttributes, DocumentsGroupOptions}
|
|
14
|
+
|
|
15
|
+
export function createDocumentsGroupBlock(options: DocumentsGroupOptions): BlockConfiguration<DocumentsGroupAttributes> {
|
|
16
|
+
return {
|
|
17
|
+
name: options.name,
|
|
18
|
+
title: options.title ?? __('Dokumenty', 'brilo-blocks'),
|
|
19
|
+
description: options.description,
|
|
20
|
+
category: options.category ?? 'widgets',
|
|
21
|
+
...(options.parent && {parent: options.parent}),
|
|
22
|
+
icon: options.icon ?? {src: defaultIcon},
|
|
23
|
+
supports: {html: false, customClassName: false},
|
|
24
|
+
attributes: {
|
|
25
|
+
mode: {
|
|
26
|
+
type: 'string',
|
|
27
|
+
default: DOCUMENTS_GROUP_MODE_DEFAULT,
|
|
28
|
+
enum: ['manual', 'category'],
|
|
29
|
+
},
|
|
30
|
+
listingStyle: {
|
|
31
|
+
type: 'string',
|
|
32
|
+
default: DOCUMENTS_GROUP_LISTING_STYLE_DEFAULT,
|
|
33
|
+
enum: ['classic', 'group-by-category'],
|
|
34
|
+
},
|
|
35
|
+
sortBy: {
|
|
36
|
+
type: 'string',
|
|
37
|
+
default: DOCUMENTS_GROUP_SORT_BY_DEFAULT,
|
|
38
|
+
enum: ['menu_order', 'date', 'manual-order'],
|
|
39
|
+
},
|
|
40
|
+
columns: {
|
|
41
|
+
type: 'number',
|
|
42
|
+
default: DOCUMENTS_GROUP_COLUMNS_DEFAULT,
|
|
43
|
+
enum: [1, 2, 3, 4, 6],
|
|
44
|
+
},
|
|
45
|
+
selectedDocuments: {
|
|
46
|
+
type: 'array',
|
|
47
|
+
default: [],
|
|
48
|
+
items: {type: 'number'},
|
|
49
|
+
},
|
|
50
|
+
selectedCategories: {
|
|
51
|
+
type: 'array',
|
|
52
|
+
default: [],
|
|
53
|
+
items: {type: 'number'},
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
edit: createDocumentsGroupEdit(options),
|
|
57
|
+
save: () => null,
|
|
58
|
+
} as unknown as BlockConfiguration<DocumentsGroupAttributes>
|
|
59
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export const icon = (
|
|
2
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
3
|
+
<path d="M4 1H12L16 5V19H4V1Z" stroke="black" fill="none" />
|
|
4
|
+
<path d="M12 1V5H16" stroke="black" fill="none" />
|
|
5
|
+
<line x1="6.5" y1="9" x2="13.5" y2="9" stroke="black" />
|
|
6
|
+
<line x1="6.5" y1="12" x2="13.5" y2="12" stroke="black" />
|
|
7
|
+
<line x1="6.5" y1="15" x2="11" y2="15" stroke="black" />
|
|
8
|
+
</svg>
|
|
9
|
+
)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export type {
|
|
2
|
+
DocumentsGroupAttributes,
|
|
3
|
+
DocumentsGroupOptions,
|
|
4
|
+
DocumentsGroupListingStyle,
|
|
5
|
+
DocumentsGroupMode,
|
|
6
|
+
DocumentsGroupSortBy,
|
|
7
|
+
} from './types'
|
|
8
|
+
export {createDocumentsGroupBlock} from './factory'
|
|
9
|
+
export {DocumentsSelectModal} from './DocumentsSelectModal'
|
|
10
|
+
|
|
11
|
+
import type {DocumentsGroupOptions} from './types'
|
|
12
|
+
|
|
13
|
+
export const documentsGroupDefaults: DocumentsGroupOptions = {
|
|
14
|
+
name: 'brilo/documents-group',
|
|
15
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type {BriloBlockType} from '~/types'
|
|
2
|
+
|
|
3
|
+
export type DocumentsGroupMode = 'manual' | 'category'
|
|
4
|
+
export type DocumentsGroupListingStyle = 'classic' | 'group-by-category'
|
|
5
|
+
export type DocumentsGroupSortBy = 'menu_order' | 'date' | 'manual-order'
|
|
6
|
+
export type DocumentsGroupColumns = 1 | 2 | 3 | 4 | 6
|
|
7
|
+
|
|
8
|
+
export interface DocumentsGroupAttributes extends Record<string, unknown> {
|
|
9
|
+
mode: DocumentsGroupMode
|
|
10
|
+
listingStyle: DocumentsGroupListingStyle
|
|
11
|
+
sortBy: DocumentsGroupSortBy
|
|
12
|
+
columns: DocumentsGroupColumns
|
|
13
|
+
selectedDocuments: number[]
|
|
14
|
+
selectedCategories: number[]
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface SelectControlProps {
|
|
18
|
+
selectedItems: number[]
|
|
19
|
+
onChange: (ids: number[]) => void
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface DocumentsGroupOptions extends BriloBlockType {
|
|
23
|
+
renderCategoryControl?: (props: SelectControlProps) => JSX.Element
|
|
24
|
+
renderDocumentsControl?: (props: SelectControlProps) => JSX.Element
|
|
25
|
+
}
|
|
@@ -6,9 +6,7 @@ import {createAsideEdit} from './edit'
|
|
|
6
6
|
import {icon as defaultIcon} from './icon'
|
|
7
7
|
import type {AsideAttributes, AsideOptions} from './types'
|
|
8
8
|
|
|
9
|
-
export function createAsideBlock(
|
|
10
|
-
options: AsideOptions,
|
|
11
|
-
): BlockConfiguration<AsideAttributes> {
|
|
9
|
+
export function createAsideBlock(options: AsideOptions): BlockConfiguration<AsideAttributes> {
|
|
12
10
|
return {
|
|
13
11
|
name: options.name,
|
|
14
12
|
title: options.title ?? __('Postranní panel', 'brilo-blocks'),
|
|
@@ -2,11 +2,6 @@ import React from 'react'
|
|
|
2
2
|
|
|
3
3
|
export const icon = (
|
|
4
4
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
-
<path
|
|
6
|
-
fillRule="evenodd"
|
|
7
|
-
clipRule="evenodd"
|
|
8
|
-
d="M8 4H20V20H8V4ZM10 6H18V18H10V6Z"
|
|
9
|
-
fill="currentColor"
|
|
10
|
-
/>
|
|
5
|
+
<path fillRule="evenodd" clipRule="evenodd" d="M8 4H20V20H8V4ZM10 6H18V18H10V6Z" fill="currentColor" />
|
|
11
6
|
</svg>
|
|
12
7
|
)
|
|
@@ -6,9 +6,7 @@ import {createContentEdit} from './edit'
|
|
|
6
6
|
import {icon as defaultIcon} from './icon'
|
|
7
7
|
import type {ContentAttributes, ContentOptions} from './types'
|
|
8
8
|
|
|
9
|
-
export function createContentBlock(
|
|
10
|
-
options: ContentOptions,
|
|
11
|
-
): BlockConfiguration<ContentAttributes> {
|
|
9
|
+
export function createContentBlock(options: ContentOptions): BlockConfiguration<ContentAttributes> {
|
|
12
10
|
return {
|
|
13
11
|
name: options.name,
|
|
14
12
|
title: options.title ?? __('Obsah', 'brilo-blocks'),
|
|
@@ -2,11 +2,6 @@ import React from 'react'
|
|
|
2
2
|
|
|
3
3
|
export const icon = (
|
|
4
4
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
-
<path
|
|
6
|
-
fillRule="evenodd"
|
|
7
|
-
clipRule="evenodd"
|
|
8
|
-
d="M4 4H16V20H4V4ZM6 6H14V18H6V6Z"
|
|
9
|
-
fill="currentColor"
|
|
10
|
-
/>
|
|
5
|
+
<path fillRule="evenodd" clipRule="evenodd" d="M4 4H16V20H4V4ZM6 6H14V18H6V6Z" fill="currentColor" />
|
|
11
6
|
</svg>
|
|
12
7
|
)
|
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import {InspectorControls} from '@wordpress/block-editor'
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
PanelBody,
|
|
4
|
+
__experimentalToggleGroupControl as ToggleGroupControl,
|
|
5
|
+
__experimentalToggleGroupControlOption as ToggleGroupControlOption,
|
|
6
|
+
} from '@wordpress/components'
|
|
3
7
|
import {__} from '@wordpress/i18n'
|
|
4
8
|
import React from 'react'
|
|
5
9
|
import {useGroupBlock} from '~/hooks/useGroupBlock'
|
|
@@ -8,9 +8,7 @@ import {createContentWithAsideEdit} from './edit'
|
|
|
8
8
|
import {icon as defaultIcon} from './icon'
|
|
9
9
|
import type {ContentWithAsideAttributes, ContentWithAsideOptions} from './types'
|
|
10
10
|
|
|
11
|
-
export function createContentWithAsideBlock<
|
|
12
|
-
TAsideSizes extends OptionArray = typeof ASIDE_SIZES,
|
|
13
|
-
>(
|
|
11
|
+
export function createContentWithAsideBlock<TAsideSizes extends OptionArray = typeof ASIDE_SIZES>(
|
|
14
12
|
options: ContentWithAsideOptions<TAsideSizes>,
|
|
15
13
|
): BlockConfiguration<ContentWithAsideAttributes<TAsideSizes[number]['value']>> {
|
|
16
14
|
const asideSizes = options.asideSizes ?? ASIDE_SIZES
|
|
@@ -2,11 +2,6 @@ import React from 'react'
|
|
|
2
2
|
|
|
3
3
|
export const icon = (
|
|
4
4
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
5
|
-
<path
|
|
6
|
-
fillRule="evenodd"
|
|
7
|
-
clipRule="evenodd"
|
|
8
|
-
d="M4 4H20V20H4V4ZM6 6H13V18H6V6ZM15 6H18V18H15V6Z"
|
|
9
|
-
fill="currentColor"
|
|
10
|
-
/>
|
|
5
|
+
<path fillRule="evenodd" clipRule="evenodd" d="M4 4H20V20H4V4ZM6 6H13V18H6V6ZM15 6H18V18H15V6Z" fill="currentColor" />
|
|
11
6
|
</svg>
|
|
12
7
|
)
|
|
@@ -14,7 +14,13 @@ import {
|
|
|
14
14
|
import {__} from '@wordpress/i18n'
|
|
15
15
|
import {useTenantColorPalette} from '~/hooks/useTenantColorPalette'
|
|
16
16
|
import type {BaseBlockAttributes, ExcludableBaseAttr, FluidDecoration, FluidDecorationImage} from './types'
|
|
17
|
-
import {
|
|
17
|
+
import {
|
|
18
|
+
FLUID_DECORATION_DEFAULT_HEIGHT,
|
|
19
|
+
FLUID_DECORATION_HEIGHT_PRESETS,
|
|
20
|
+
FLUID_DECORATION_UNITS,
|
|
21
|
+
SPACING_POSITIONS,
|
|
22
|
+
SPACING_SIZES,
|
|
23
|
+
} from './constants'
|
|
18
24
|
|
|
19
25
|
interface FluidDecorationControlProps {
|
|
20
26
|
label: string
|
package/src/index.ts
CHANGED
|
@@ -34,6 +34,10 @@ export {
|
|
|
34
34
|
createContactItemBlock,
|
|
35
35
|
createContactItemEdit,
|
|
36
36
|
} from './blocks/contact/contact-item'
|
|
37
|
+
export type {AccordionItemAttributes, AccordionItemOptions} from './blocks/accordion/accordion-item'
|
|
38
|
+
export {accordionItemDefaults, createAccordionItemBlock} from './blocks/accordion/accordion-item'
|
|
39
|
+
export type {AccordionGroupAttributes, AccordionGroupOptions, AccordionHeadingLevel} from './blocks/accordion/accordion-group'
|
|
40
|
+
export {accordionGroupDefaults, createAccordionGroupBlock} from './blocks/accordion/accordion-group'
|
|
37
41
|
export type {FaqItemAttributes, FaqItemOptions} from './blocks/faq/faq-item'
|
|
38
42
|
export {createFaqItemBlock, faqItemDefaults} from './blocks/faq/faq-item'
|
|
39
43
|
export type {FaqGroupAttributes, FaqGroupOptions} from './blocks/faq/faq-group'
|
|
@@ -145,6 +149,14 @@ export type {PostSliderGroupAttributes, PostSliderGroupOptions} from './blocks/p
|
|
|
145
149
|
export {createPostSliderGroupBlock, postSliderGroupDefaults} from './blocks/post/post-slider-group'
|
|
146
150
|
export type {PostsGridAttributes, PostsGridOptions} from './blocks/post/posts-grid'
|
|
147
151
|
export {createPostsGridBlock, postsGridDefaults} from './blocks/post/posts-grid'
|
|
152
|
+
export type {
|
|
153
|
+
DocumentsGroupAttributes,
|
|
154
|
+
DocumentsGroupOptions,
|
|
155
|
+
DocumentsGroupListingStyle,
|
|
156
|
+
DocumentsGroupMode,
|
|
157
|
+
DocumentsGroupSortBy,
|
|
158
|
+
} from './blocks/document/documents-group'
|
|
159
|
+
export {createDocumentsGroupBlock, documentsGroupDefaults, DocumentsSelectModal} from './blocks/document/documents-group'
|
|
148
160
|
export type {LinkItemAttributes, LinkItemIcon, LinkItemOptions} from './blocks/link/link-item'
|
|
149
161
|
export {createLinkItemBlock, linkItemDefaults} from './blocks/link/link-item'
|
|
150
162
|
export type {ContentWithAsideAttributes, ContentWithAsideOptions} from './blocks/layout/layout-content-w-aside'
|