Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
154 changed files
with
894 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,6 @@ | ||
<span class="attach attach_theme_simple attach_size_l i-bem" data-bem="{"attach":{}}"><span class="button button_theme_islands button_size_m button__control i-bem" data-bem="{"button":{}}" role="button"><input class="attach__control" type="file" name="attach-name" tabindex="1"/></span><span class="attach__no-file">no file</span></span> | ||
<span class="attach attach_theme_simple attach_size_l i-bem" data-bem="{"attach":{}}"> | ||
<span class="button button_theme_islands button_size_m button__control i-bem" data-bem="{"button":{}}" role="button"> | ||
<input class="attach__control" type="file" name="attach-name" tabindex="1"/> | ||
</span> | ||
<span class="attach__no-file">no file</span> | ||
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,7 @@ | ||
<span class="attach attach_theme_simple attach_disabled i-bem" data-bem="{"attach":{}}"><span class="button button_theme_simple button_disabled button__control i-bem" data-bem="{"button":{}}" role="button" aria-disabled="true"><input class="attach__control" type="file" disabled="disabled"/><span class="button__text">file</span></span><span class="attach__no-file">no file</span></span> | ||
<span class="attach attach_theme_simple attach_disabled i-bem" data-bem="{"attach":{}}"> | ||
<span class="button button_theme_simple button_disabled button__control i-bem" data-bem="{"button":{}}" role="button" aria-disabled="true"> | ||
<input class="attach__control" type="file" disabled="disabled"/> | ||
<span class="button__text">file</span> | ||
</span> | ||
<span class="attach__no-file">no file</span> | ||
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
module.exports = function(bh) { | ||
bh.match(['button_togglable_check', 'button_togglable_radio'], function(ctx) { | ||
ctx.attr('aria-pressed', String(!!ctx.mod('checked'))); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* @module button | ||
*/ | ||
|
||
modules.define('button', function(provide, Button) { | ||
|
||
/** | ||
* @exports | ||
* @class button | ||
* @bem | ||
*/ | ||
provide(Button.decl({ modName : 'togglable' }, /** @lends button.prototype */{ | ||
onSetMod : { | ||
'checked' : function(_, modVal) { | ||
this.__base.apply(this, arguments); | ||
this.domElem.attr('aria-pressed', !!modVal); | ||
} | ||
} | ||
})); | ||
|
||
}); |
3 changes: 3 additions & 0 deletions
3
common.blocks/button/_togglable/button_togglable_check.bemhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
block('button').mod('togglable', 'check').attrs()(function() { | ||
return this.extend(applyNext(), { 'aria-pressed' : !!this.mods.checked }); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
common.blocks/button/_togglable/button_togglable_radio.bemhtml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
block('button').mod('togglable', 'radio').attrs()(function() { | ||
return this.extend(applyNext(), { 'aria-pressed' : !!this.mods.checked }); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
<button class="button button_focused button__control i-bem" data-bem="{"button":{"live":false}}" role="button" tabindex="0" type="button" id="btn" name="name" value="value"><span aria-hidden="true" class="icon icon_social_twitter"></span><span class="button__text">button</span></button> | ||
<button class="button button_focused button__control i-bem" data-bem="{"button":{"live":false}}" role="button" tabindex="0" type="button" id="btn" name="name" value="value"> | ||
<span class="icon icon_social_twitter"></span> | ||
<span class="button__text">button</span> | ||
</button> |
2 changes: 1 addition & 1 deletion
2
common.blocks/button/button.tmpl-specs/50-type_link_content.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<a class="button button_type_link button__control i-bem" data-bem="{"button":{}}" role="button" target="_blank" href="//ya.ru/yandsearch?text=<script type="javascript">&amp;=test">content</a> | ||
<a class="button button_type_link button__control i-bem" data-bem="{"button":{}}" role="link" target="_blank" href="//ya.ru/yandsearch?text=<script type="javascript">&amp;=test">content</a> |
2 changes: 1 addition & 1 deletion
2
common.blocks/button/button.tmpl-specs/50-type_link_disabled.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
<a class="button button_type_link button_disabled button__control i-bem" data-bem="{"button":{"url":"#"}}" role="button" aria-disabled="true"></a> | ||
<a class="button button_type_link button_disabled button__control i-bem" data-bem="{"button":{"url":"#"}}" role="link" aria-disabled="true"></a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 10 additions & 1 deletion
11
common.blocks/checkbox-group/checkbox-group.tmpl-specs/10-no_type_disabled_item.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
<span class="checkbox-group checkbox-group_theme_islands checkbox-group_size_m control-group i-bem" data-bem="{"checkbox-group":{}}"><label class="checkbox checkbox_theme_islands checkbox_size_m i-bem" data-bem="{"checkbox":{}}"><span class="checkbox__box"><input class="checkbox__control" type="checkbox" autocomplete="off" name="default" value="1"/></span>first</label><br/><label class="checkbox checkbox_theme_islands checkbox_size_m checkbox_checked checkbox_disabled i-bem" data-bem="{"checkbox":{}}"><span class="checkbox__box"><input class="checkbox__control" type="checkbox" autocomplete="off" name="default" value="3" checked="checked" disabled="disabled"/></span>third</label></span> | ||
<span class="checkbox-group checkbox-group_theme_islands checkbox-group_size_m control-group i-bem" role="group" data-bem="{"checkbox-group":{}}"> | ||
<label class="checkbox checkbox_theme_islands checkbox_size_m i-bem" data-bem="{"checkbox":{}}"> | ||
<span class="checkbox__box"><input class="checkbox__control" type="checkbox" autocomplete="off" name="default" value="1"/></span> | ||
<span class="checkbox__text" role="presentation">first</span> | ||
</label><br/> | ||
<label class="checkbox checkbox_theme_islands checkbox_size_m checkbox_checked checkbox_disabled i-bem" data-bem="{"checkbox":{}}"> | ||
<span class="checkbox__box"><input class="checkbox__control" type="checkbox" autocomplete="off" name="default" value="3" checked="checked" disabled="disabled"/></span> | ||
<span class="checkbox__text" role="presentation">third</span> | ||
</label> | ||
</span> |
11 changes: 10 additions & 1 deletion
11
common.blocks/checkbox-group/checkbox-group.tmpl-specs/20-type_button_disabled_group.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,10 @@ | ||
<span class="checkbox-group checkbox-group_type_button checkbox-group_disabled control-group i-bem" data-bem="{"checkbox-group":{}}"><label class="checkbox checkbox_type_button checkbox_disabled i-bem" data-bem="{"checkbox":{}}"><button class="button button_togglable_check button_disabled button__control i-bem" data-bem="{"button":{}}" role="button" type="button" disabled="disabled"><span class="button__text">first</span></button><input class="checkbox__control" type="checkbox" autocomplete="off" disabled="disabled"/></label><label class="checkbox checkbox_type_button checkbox_disabled i-bem" data-bem="{"checkbox":{}}"><button class="button button_togglable_check button_disabled button__control i-bem" data-bem="{"button":{}}" role="button" type="button" disabled="disabled"><span aria-hidden="true" class="icon icon_social_vk"></span><span class="button__text">VK</span></button><input class="checkbox__control" type="checkbox" autocomplete="off" disabled="disabled"/></label></span> | ||
<span class="checkbox-group checkbox-group_type_button checkbox-group_disabled control-group i-bem" role="group" data-bem="{"checkbox-group":{}}"> | ||
<label class="checkbox checkbox_type_button checkbox_disabled i-bem" data-bem="{"checkbox":{}}"> | ||
<button class="button button_togglable_check button_disabled button__control i-bem" role="checkbox" type="button" disabled="disabled" aria-checked="false" data-bem="{"button":{}}"><span class="button__text">first</span></button> | ||
<input class="checkbox__control" type="checkbox" autocomplete="off" disabled="disabled"/> | ||
</label> | ||
<label class="checkbox checkbox_type_button checkbox_disabled i-bem" data-bem="{"checkbox":{}}"> | ||
<button class="button button_togglable_check button_disabled button__control i-bem" role="checkbox" type="button" disabled="disabled" aria-checked="false" data-bem="{"button":{}}"><span class="icon icon_social_vk"></span><span class="button__text">VK</span></button> | ||
<input class="checkbox__control" type="checkbox" autocomplete="off" disabled="disabled"/> | ||
</label> | ||
</span> |
4 changes: 3 additions & 1 deletion
4
common.blocks/checkbox-group/checkbox-group.tmpl-specs/30-empty.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
<span class="checkbox-group control-group i-bem" data-bem="{"checkbox-group":{}}"><label class="checkbox checkbox_checked i-bem" data-bem="{"checkbox":{}}"><span class="checkbox__box"><input class="checkbox__control" type="checkbox" autocomplete="off" checked="checked" value="1"/></span></label></span> | ||
<span class="checkbox-group control-group i-bem" role="group" data-bem="{"checkbox-group":{}}"> | ||
<label class="checkbox checkbox_checked i-bem" data-bem="{"checkbox":{}}"><span class="checkbox__box"><input class="checkbox__control" type="checkbox" autocomplete="off" value="1" checked="checked"/></span></label> | ||
</span> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
block('checkbox').elem('text')( | ||
tag()('span'), | ||
attrs()({ role : 'presentation' }) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module.exports = function(bh) { | ||
bh.match('checkbox__text', function(ctx) { | ||
ctx | ||
.tag('span') | ||
.attrs({ role : 'presentation' }); | ||
}); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[{ | ||
mustDeps : 'button' | ||
shouldDeps : { block : 'button', mods : { togglable : 'check' } } | ||
}, | ||
{ | ||
tech : 'spec.js', | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,10 @@ block('checkbox')( | |
val : ctx.val | ||
} | ||
}, | ||
ctx.text | ||
ctx.text && { | ||
elem : 'text', | ||
content : ctx.text | ||
} | ||
]; | ||
}) | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.