@brilo/base-blocks 0.1.5 → 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.
@@ -1 +1 @@
1
- {"version":3,"file":"edit.d.ts","sourceRoot":"","sources":["../../../../src/blocks/usp/usp-item/edit.tsx"],"names":[],"mappings":"AAQA,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"}
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brilo/base-blocks",
3
- "version": "0.1.5",
3
+ "version": "0.1.6",
4
4
  "author": "Brilo",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -1,9 +1,7 @@
1
1
  import {InspectorControls, RichText, useBlockProps} from '@wordpress/block-editor'
2
- import {Modal, PanelBody, ToggleControl, TextControl} from '@wordpress/components'
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}