-
Notifications
You must be signed in to change notification settings - Fork 87
Open
Description
block('select').elem('button')(
mods()(function() {
var mods = this.mods;
return {
size : mods.size,
theme : mods.theme,
view : mods.view,
focused : mods.focused,
disabled : mods.disabled,
checked : mods.mode !== 'radio' && !!this._checkedOptions.length
}
}),
attrs()(function() {
var mods = this.mods;
return {
role : 'listbox',
'aria-owns' : this._optionIds.join(' '),
'aria-multiselectable' : mods.mode === 'check'? 'true' : undefined,
'aria-labelledby' : this._selectTextId
},
}),
replace()(function() {
var select = this._select,
mods = this.mods;
return {
block : 'button',
mix : { block : this.block, elem : this.elem },
mods : apply('mods'),
attrs : apply('attrs'),
id : select.id,
tabIndex : select.tabIndex,
content : [
apply('content'),
{ block : 'icon', mix : { block : 'select', elem : 'tick' } }
]
};
}),
def()(function() {
return applyNext({ _selectTextId : this.generateId() });
})
);Полезно для переопределения на проекте как-то так.
block('select').mod('prefixed').elem('button')(
mods()(function() { return this.extend(applyNext(), { prefixed : true })})
);Metadata
Metadata
Assignees
Labels
No labels