-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support bem-xjst 8.x #2010
Support bem-xjst 8.x #2010
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,16 +62,19 @@ module.exports = { | |
'applyCtx', | ||
'applyNext', | ||
'attrs', | ||
'addAttrs', | ||
'bem', | ||
'block', | ||
'cls', | ||
'content', | ||
'def', | ||
'elem', | ||
'js', | ||
'addJs', | ||
'local', | ||
'match', | ||
'mix', | ||
'addMix', | ||
'mod', | ||
'mode', | ||
'tag', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Guess we should drop There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
block('button').mod('togglable', 'check').attrs()(function() { | ||
return this.extend(applyNext(), { 'aria-pressed' : String(!!this.mods.checked) }); | ||
block('button').mod('togglable', 'check').addAttrs()(function() { | ||
return this.extend({ 'aria-pressed' : String(!!this.mods.checked) }, | ||
applyNext()); | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
block('button').mod('togglable', 'radio').attrs()(function() { | ||
return this.extend(applyNext(), { 'aria-pressed' : String(!!this.mods.checked) }); | ||
block('button').mod('togglable', 'radio').addAttrs()(function() { | ||
return { 'aria-pressed' : String(!!this.mods.checked) }; | ||
}); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
block('checkbox').elem('text')( | ||
tag()('span'), | ||
attrs()({ role : 'presentation' }) | ||
addAttrs()({ role : 'presentation' }) | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
block('control-group').attrs()({ role : 'group' }); | ||
block('control-group').addAttrs()({ role : 'group' }); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
block('link').mod('pseudo', true).match(function() { return !this.ctx.url; })( | ||
tag()('span'), | ||
attrs()(function() { | ||
addAttrs()(function() { | ||
return this.extend(applyNext(), { role : 'button' }); | ||
}) | ||
); |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -46,10 +46,12 @@ block('menu')( | |
attrs['aria-disabled'] = 'true' : | ||
attrs.tabindex = 0; | ||
|
||
return attrs; | ||
// extend in backwards order: | ||
// bemjson have more priority | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. bemjson haS |
||
return this.extend(attrs, applyNext()); | ||
}), | ||
js()(true), | ||
mix()({ elem : 'control' }), | ||
addMix()({ elem : 'control' }), | ||
mod('disabled', true) | ||
.js()(function() { | ||
return this.extend(applyNext(), { tabIndex : 0 }); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
block('radio').elem('text')( | ||
tag()('span'), | ||
attrs()(function() { | ||
addAttrs()(function() { | ||
return { role : 'presentation' }; | ||
}) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
appendContent?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
…and prependContent