control-group
Используется как обертка для визуальной группировки других блоков. Группируемые блоки помещаются в поле content
BEMJSON-декларации.
Варианты использования
Блок позволяет визуально группировать следующие блоки:
Open in a new window<div class="control-group" role="group"><span class="input input_theme_islands input_size_m input_type_search i-bem" data-bem='{"input":{}}'><span class="input__box"><input class="input__control" placeholder="Имя" type="search"></span></span><span class="input input_theme_islands input_size_m input_type_search i-bem"
data-bem='{"input":{}}'><span class="input__box"><input class="input__control" placeholder="Фамилия" type="search"></span></span><span class="input input_theme_islands input_size_m input_type_search i-bem" data-bem='{"input":{}}'><span class="input__box"><input class="input__control" placeholder="Электронный адрес" type="search"></span></span>
</div>
HTML{
block: 'control-group',
content: [
{
block: 'input',
mods: {
theme: 'islands',
size: 'm',
type: 'search'
},
placeholder: 'Имя'
},
{
block: 'input',
mods: {
theme: 'islands',
size: 'm',
type: 'search'
},
placeholder: 'Фамилия'
},
{
block: 'input',
mods: {
theme: 'islands',
size: 'm',
type: 'search'
},
placeholder: 'Электронный адрес'
}
]
}
BEMJSON[
'control-group',
{
block: 'input',
mods: {
theme: 'islands',
size: 'm',
type: 'search'
}
}
]
deps
Open in a new window<div class="control-group" role="group"><button class="button button_theme_islands button_size_m button__control i-bem" data-bem='{"button":{}}' role="button" type="button"><span class="button__text">Просмотреть корзину</span></button><button class="button button_theme_islands button_size_m button__control i-bem"
data-bem='{"button":{}}' role="button" type="button"><span class="button__text">История покупок</span></button><button class="button button_theme_islands button_size_m button__control i-bem" data-bem='{"button":{}}' role="button" type="button"><span class="button__text">Проверить бонусный счет</span></button></div>
HTML{
block: 'control-group',
content: [
{
block: 'button',
mods: {
theme: 'islands',
size: 'm'
},
text: 'Просмотреть корзину'
},
{
block: 'button',
mods: {
theme: 'islands',
size: 'm'
},
text: 'История покупок'
},
{
block: 'button',
mods: {
theme: 'islands',
size: 'm'
},
text: 'Проверить бонусный счет'
}
]
}
BEMJSON[
'control-group',
{
block: 'button',
mods: {
theme: 'islands',
size: 'm'
}
}
]
deps
Open in a new window<div class="control-group" role="group"><span class="input input_theme_islands input_size_m input_type_search i-bem" data-bem='{"input":{}}'><span class="input__box"><input class="input__control" placeholder="Введите запрос" type="search"></span></span><button class="button button_theme_islands button_size_m button__control i-bem"
data-bem='{"button":{}}' role="button" type="button"><span class="button__text">Поиск</span></button></div>
HTML{
block: 'control-group',
content: [
{
block: 'input',
mods: {
theme: 'islands',
size: 'm',
type: 'search'
},
placeholder: 'Введите запрос'
},
{
block: 'button',
mods: {
theme: 'islands',
size: 'm'
},
text: 'Поиск'
}
]
}
BEMJSON[
'control-group',
{
block: 'input',
mods: {
theme: 'islands',
size: 'm',
type: 'search'
}
},
{
block: 'button',
mods: {
theme: 'islands',
size: 'm'
}
}
]
deps
Open in a new window<div class="control-group" role="group"><span class="input input_theme_islands input_size_m i-bem" data-bem='{"input":{}}'><span class="input__box"><input class="input__control" placeholder="Цена от"></span></span><span class="input input_theme_islands input_size_m i-bem" data-bem='{"input":{}}'><span class="input__box"><input class="input__control" placeholder="до"></span></span>
<div
class="select select_mode_radio select_theme_islands select_size_m i-bem" data-bem='{"select":{}}'><input class="select__control" type="hidden" value="usd" autocomplete="off"><button class="button button_size_m button_theme_islands button__control i-bem" data-bem='{"button":{}}' role="button" type="button"><span class="button__text" id="uniq14953581684533">$</span><span class="icon select__tick"></span></button>
<div
class="popup popup_target_anchor popup_theme_islands popup_autoclosable i-bem" data-bem='{"popup":{"directions":["bottom-left","bottom-right","top-left","top-right"]}}' aria-hidden="true">
<div class="menu menu_size_m menu_theme_islands menu_mode_radio menu__control i-bem" data-bem='{"menu":{}}' role="menu" tabindex="0">
<div class="menu__item menu__item_checked menu__item_theme_islands i-bem" data-bem='{"menu__item":{"val":"usd"}}' role="menuitemradio" id="uniq14953581684531" aria-checked="true">$</div>
<div class="menu__item menu__item_theme_islands i-bem" data-bem='{"menu__item":{"val":"euro"}}' role="menuitemradio" id="uniq14953581684532" aria-checked="false">€</div>
</div>
</div>
</div>
</div>
HTML{
block: 'control-group',
content: [
{
block: 'input',
mods: {
theme: 'islands',
size: 'm'
},
placeholder: 'Цена от'
},
{
block: 'input',
mods: {
theme: 'islands',
size: 'm'
},
placeholder: 'до'
},
{
block: 'select',
mods: {
mode: 'radio',
theme: 'islands',
size: 'm'
},
val: 'usd',
options: [
{
val: 'usd',
text: '$'
},
{
val: 'euro',
text: '€'
}
]
}
]
}
BEMJSON[
'control-group',
{
block: 'input',
mods: {
theme: 'islands',
size: 'm'
}
},
{
block: 'select',
mods: {
mode: 'radio',
theme: 'islands',
size: 'm'
}
}
]
deps
- dropdown (с модификатором
switcher
в значении button
)
Open in a new window<div class="control-group" role="group"><button class="button button_view_action button_theme_islands button_size_m button__control i-bem" data-bem='{"button":{}}' role="button" type="button"><span class="button__text">Купить сейчас!</span></button>
<div class="popup popup_theme_islands popup_autoclosable popup_target_anchor dropdown dropdown_switcher_button dropdown_theme_islands dropdown_size_m i-bem"
data-bem='{"popup":{},"dropdown":{"id":"uniq14953581676251"}}' aria-hidden="true">Воспользуйтесь нашим специальным предложением: «50% скидка на доставку каждого пятого груза».</div><button class="button button_size_m button_theme_islands button__control i-bem" data-bem='{"button":{}}' role="button" type="button"><span class="button__text">Действующие скидки</span></button></div>
HTML{
block: 'control-group',
content: [
{
block: 'button',
mods: {
view: 'action',
theme: 'islands',
size: 'm'
},
text: 'Купить сейчас!'
},
{
block: 'dropdown',
mods: {
switcher: 'button',
theme: 'islands',
size: 'm'
},
switcher: 'Действующие скидки',
popup: 'Воспользуйтесь нашим специальным предложением: «50% скидка на доставку каждого пятого груза».'
}
]
}
BEMJSON[
'control-group',
{
block: 'button',
mods: {
view: 'action',
theme: 'islands',
size: 'm'
}
},
{
block: 'dropdown',
mods: {
switcher: 'button',
theme: 'islands',
size: 'm'
}
}
]
deps
- checkbox (с модификатором
type
в значении button
)
Open in a new window<div class="control-group" role="group"><label class="checkbox checkbox_theme_islands checkbox_size_m checkbox_type_button i-bem" data-bem='{"checkbox":{}}'><button class="button button_togglable_check button_theme_islands button_size_m button__control i-bem" data-bem='{"button":{}}' role="button" type="button" aria-pressed="false"><span class="button__text">Телевизоры</span></button><input class="checkbox__control" type="checkbox" autocomplete="off" name="tv" value="1"></label>
<label
class="checkbox checkbox_theme_islands checkbox_size_m checkbox_type_button i-bem" data-bem='{"checkbox":{}}'><button class="button button_togglable_check button_theme_islands button_size_m button__control i-bem" data-bem='{"button":{}}' role="button" type="button" aria-pressed="false"><span class="button__text">Фотокамеры</span></button><input class="checkbox__control"
type="checkbox" autocomplete="off" name="photo" value="1"></label><label class="checkbox checkbox_theme_islands checkbox_size_m checkbox_type_button i-bem" data-bem='{"checkbox":{}}'><button class="button button_togglable_check button_theme_islands button_size_m button__control i-bem" data-bem='{"button":{}}' role="button" type="button" aria-pressed="false"><span class="button__text">Электронные книги</span></button><input class="checkbox__control" type="checkbox" autocomplete="off" name="book" value="1"></label></div>
HTML{
block: 'control-group',
content: [
{
block: 'checkbox',
mods: {
theme: 'islands',
size: 'm',
type: 'button'
},
name: 'tv',
val: '1',
text: 'Телевизоры'
},
{
block: 'checkbox',
mods: {
theme: 'islands',
size: 'm',
type: 'button'
},
name: 'photo',
val: '1',
text: 'Фотокамеры'
},
{
block: 'checkbox',
mods: {
theme: 'islands',
size: 'm',
type: 'button'
},
name: 'book',
val: '1',
text: 'Электронные книги'
}
]
}
BEMJSON[
'control-group',
{
block: 'checkbox',
mods: {
theme: 'islands',
size: 'm',
type: 'button'
}
}
]
deps