@brilo/base-blocks 0.1.4 → 0.1.6
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/build/blocks/signpost/signpost-item/factory.d.ts.map +1 -1
- package/build/blocks/signpost/signpost-item/factory.js +1 -2
- package/build/blocks/signpost/signpost-item/types.d.ts +0 -1
- package/build/blocks/signpost/signpost-item/types.d.ts.map +1 -1
- package/build/blocks/usp/usp-item/edit.d.ts.map +1 -1
- package/build/components/IconControl/IconControl.js +1 -1
- package/package.json +1 -1
- package/src/blocks/signpost/signpost-item/factory.tsx +1 -2
- package/src/blocks/signpost/signpost-item/types.ts +0 -1
- package/src/blocks/usp/usp-item/edit.tsx +1 -3
- package/src/components/IconControl/IconControl.tsx +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/blocks/signpost/signpost-item/factory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAA;AAIzD,OAAO,KAAK,EAAC,sBAAsB,EAAE,mBAAmB,EAAC,MAAM,SAAS,CAAA;AAGxE,YAAY,EAAC,sBAAsB,EAAE,mBAAmB,EAAC,CAAA;AAEzD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,mBAAmB,GAAG,kBAAkB,CAAC,sBAAsB,CAAC,
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../../src/blocks/signpost/signpost-item/factory.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,mBAAmB,CAAA;AAIzD,OAAO,KAAK,EAAC,sBAAsB,EAAE,mBAAmB,EAAC,MAAM,SAAS,CAAA;AAGxE,YAAY,EAAC,sBAAsB,EAAE,mBAAmB,EAAC,CAAA;AAEzD,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,mBAAmB,GAAG,kBAAkB,CAAC,sBAAsB,CAAC,CAkBhH"}
|
|
@@ -17,8 +17,7 @@ export function createSignpostItemBlock(options) {
|
|
|
17
17
|
title: { type: 'string', default: '' },
|
|
18
18
|
img: { type: 'object', default: { id: 0, alt: '' } },
|
|
19
19
|
button: { type: 'object', default: { title: '' } },
|
|
20
|
-
url: { type: '
|
|
21
|
-
blank: { type: 'boolean', default: false },
|
|
20
|
+
url: { type: 'object', default: { src: '', blank: false } },
|
|
22
21
|
},
|
|
23
22
|
edit: createSignpostItemEdit(options),
|
|
24
23
|
save: () => _jsx(InnerBlocks.Content, {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/blocks/signpost/signpost-item/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,SAAS,CAAA;AACtC,OAAO,EAAC,UAAU,EAAC,MAAM,sCAAsC,CAAA;AAE/D,MAAM,WAAW,sBAAuB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACrE,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,UAAU,CAAA;IACf,MAAM,EAAE;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAA;IACvB,GAAG,EAAE;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/blocks/signpost/signpost-item/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,cAAc,EAAC,MAAM,SAAS,CAAA;AACtC,OAAO,EAAC,UAAU,EAAC,MAAM,sCAAsC,CAAA;AAE/D,MAAM,WAAW,sBAAuB,SAAQ,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACrE,KAAK,EAAE,MAAM,CAAA;IACb,GAAG,EAAE,UAAU,CAAA;IACf,MAAM,EAAE;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,CAAA;IACvB,GAAG,EAAE;QAAC,GAAG,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,OAAO,CAAA;KAAC,CAAA;CACnC;AAED,MAAM,WAAW,mBAAoB,SAAQ,cAAc;CAAG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/usp/usp-item/edit.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/usp/usp-item/edit.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAC,iBAAiB,EAAE,cAAc,EAAC,MAAM,SAAS,CAAA;AAE9D,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,cAAc,IAClC,gCAGlB;IACD,UAAU,EAAE,iBAAiB,CAAA;IAC7B,aAAa,EAAE,CAAC,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,KAAK,IAAI,CAAA;CACvD,iCA+CF"}
|
|
@@ -8,7 +8,7 @@ export function IconControl({ value, label, icons, iconsSrc, onChange }) {
|
|
|
8
8
|
value,
|
|
9
9
|
label: label !== null && label !== void 0 ? label : '',
|
|
10
10
|
});
|
|
11
|
-
return (_jsxs("div", { className: "icon-control flex column gap-4", children: [_jsxs("div", { className: "icon-control__hero-selected flex gap-4", children: [_jsx("div", { className: "icon-control__hero-selected-img flex items-center justify-center", children: selectedIcon.value && _jsx("img", { src: getIconUrl(selectedIcon.value), alt: "", width: 24, height: 24, loading: "lazy" }) }), _jsxs("div", { className: "icon-control__hero-selected-body flex column gap-1", children: [_jsx("span", { children: __('Vybraná ikona', 'brilo-blocks') }), _jsx("span", { className: "icon-control__hero-selected-label", children: selectedIcon.label })] })] }), _jsx("div", { className: "icon-control__group", children: icons.map((icon) => (_jsx("button", { type: "button", className: clsx('icon-control__item', 'flex', 'column', 'gap-2', 'items-center', 'justify-center', 'cursor-pointer', {
|
|
11
|
+
return (_jsxs("div", { className: "icon-control flex column gap-4", children: [_jsxs("div", { className: "icon-control__hero-selected flex gap-4", children: [_jsx("div", { className: "icon-control__hero-selected-img flex items-center justify-center", children: selectedIcon.value && _jsx("img", { src: getIconUrl(selectedIcon.value), alt: "", width: 24, height: 24, loading: "lazy" }) }), _jsxs("div", { className: "icon-control__hero-selected-body flex column gap-1", children: [_jsx("span", { children: __('Vybraná ikona', 'brilo-blocks') }), _jsx("span", { className: "icon-control__hero-selected-label", children: selectedIcon.label })] })] }), _jsx("div", { className: "icon-control__group u-grid-responsive --col-12", children: icons.map((icon) => (_jsx("button", { type: "button", className: clsx('icon-control__item', 'flex', 'column', 'gap-2', 'items-center', 'justify-center', 'cursor-pointer', {
|
|
12
12
|
'--selected': selectedIcon.value === icon.value,
|
|
13
13
|
}), onClick: () => {
|
|
14
14
|
onChange(icon);
|
package/package.json
CHANGED
|
@@ -20,8 +20,7 @@ export function createSignpostItemBlock(options: SignpostItemOptions): BlockConf
|
|
|
20
20
|
title: {type: 'string', default: ''},
|
|
21
21
|
img: {type: 'object', default: {id: 0, alt: ''}},
|
|
22
22
|
button: {type: 'object', default: {title: ''}},
|
|
23
|
-
url: {type: '
|
|
24
|
-
blank: {type: 'boolean', default: false},
|
|
23
|
+
url: {type: 'object', default: {src: '', blank: false}},
|
|
25
24
|
},
|
|
26
25
|
edit: createSignpostItemEdit(options),
|
|
27
26
|
save: () => <InnerBlocks.Content />,
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import {InspectorControls, RichText, useBlockProps} from '@wordpress/block-editor'
|
|
2
|
-
import {
|
|
3
|
-
import {useState} from '@wordpress/element'
|
|
2
|
+
import {PanelBody, ToggleControl, TextControl} from '@wordpress/components'
|
|
4
3
|
import {__} from '@wordpress/i18n'
|
|
5
4
|
import clsx from 'clsx'
|
|
6
|
-
import {IconControl} from '~/components/IconControl'
|
|
7
5
|
import {ItemIconControl, ItemIconPreview} from '~/components/ItemIconControl'
|
|
8
6
|
import {ICON_TYPES} from './constants'
|
|
9
7
|
import type {UspItemAttributes, UspItemOptions} from './types'
|
|
@@ -33,7 +33,7 @@ export function IconControl({value, label, icons, iconsSrc, onChange}: IconContr
|
|
|
33
33
|
<span className="icon-control__hero-selected-label">{selectedIcon.label}</span>
|
|
34
34
|
</div>
|
|
35
35
|
</div>
|
|
36
|
-
<div className="icon-control__group">
|
|
36
|
+
<div className="icon-control__group u-grid-responsive --col-12">
|
|
37
37
|
{icons.map((icon) => (
|
|
38
38
|
<button
|
|
39
39
|
key={icon.value}
|