style: format addons/rose
This commit is contained in:
21 files changed
+49
-33
No files matched your search
@@ -3,5 +3,5 @@ import layout from '../../../templates/components/rose/list/key-value';
|
||||
|
||||
export default Component.extend({
|
||||
layout,
|
||||
tagName: ''
|
||||
tagName: '',
|
||||
});
|
||||
@@ -4,5 +4,5 @@ import ComponentAutoId from '../../../../mixins/component-auto-id';
|
||||
|
||||
export default Component.extend(ComponentAutoId, {
|
||||
layout,
|
||||
tagName: ''
|
||||
tagName: '',
|
||||
});
|
||||
@@ -1,3 +1,3 @@
|
||||
@import 'dropdown';
|
||||
@import 'button';
|
||||
@import 'link';
|
||||
@import 'link';
|
||||
@@ -16,8 +16,7 @@
|
||||
background-color: var(--subtle);
|
||||
border: sizing.rems(xxxxs) solid var(--ui-gray-subtler-2);
|
||||
border-radius: sizing.rems(xxxs);
|
||||
box-shadow: inset 0px 3px 1px
|
||||
rgba(var(--stark-components), var(--opacity-4));
|
||||
box-shadow: inset 0px 3px 1px rgba(var(--stark-components), var(--opacity-4));
|
||||
|
||||
&.error {
|
||||
color: var(--failure);
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
$chevron: "data:image/svg+xml;utf-8,<svg viewBox='0 0 24 24' fill='%23ebeef2' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z'></path></svg>";
|
||||
|
||||
.rose-header {
|
||||
.rose-header {
|
||||
.rose-dropdown {
|
||||
&,
|
||||
&[open] {
|
||||
@@ -33,7 +33,8 @@ $chevron: "data:image/svg+xml;utf-8,<svg viewBox='0 0 24 24' fill='%23ebeef2' xm
|
||||
}
|
||||
}
|
||||
|
||||
&:hover, &:focus {
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: transparent;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
@import 'table';
|
||||
@import 'table';
|
||||
@@ -1 +1 @@
|
||||
export { default } from 'rose/components/rose/dropdown/button';
|
||||
export { default } from 'rose/components/rose/dropdown/button';
|
||||
@@ -1 +1 @@
|
||||
export { default } from 'rose/components/rose/dropdown/link';
|
||||
export { default } from 'rose/components/rose/dropdown/link';
|
||||
@@ -1 +1 @@
|
||||
export { default } from 'rose/components/rose/form/helper-text';
|
||||
export { default } from 'rose/components/rose/form/helper-text';
|
||||
@@ -1 +1 @@
|
||||
export { default } from 'rose/components/rose/form/input/input';
|
||||
export { default } from 'rose/components/rose/form/input/input';
|
||||
@@ -1 +1 @@
|
||||
export { default } from 'rose/components/rose/form/label';
|
||||
export { default } from 'rose/components/rose/form/label';
|
||||
@@ -1 +1 @@
|
||||
export { default } from 'rose/components/rose/form/textarea/textarea';
|
||||
export { default } from 'rose/components/rose/form/textarea/textarea';
|
||||
@@ -1 +1 @@
|
||||
export { default } from 'rose/components/rose/list/key-value';
|
||||
export { default } from 'rose/components/rose/list/key-value';
|
||||
@@ -1 +1 @@
|
||||
export { default } from 'rose/components/rose/list/key-value/item';
|
||||
export { default } from 'rose/components/rose/list/key-value/item';
|
||||
@@ -3,7 +3,7 @@ import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render, find } from '@ember/test-helpers';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
module('Integration | Component | rose/dropdown/button', function(hooks) {
|
||||
module('Integration | Component | rose/dropdown/button', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function (assert) {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render, find } from '@ember/test-helpers';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
module('Integration | Component | rose/dropdown/link', function(hooks) {
|
||||
module('Integration | Component | rose/dropdown/link', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function (assert) {
|
||||
|
||||
@@ -16,9 +16,17 @@ module('Integration | Component | rose/form/checkbox', function (hooks) {
|
||||
|
||||
test('it renders optional description paragraph', async function (assert) {
|
||||
assert.expect(3);
|
||||
await render(hbs`<Rose::Form::Checkbox @label="Label" @description="Hello world" />`);
|
||||
assert.equal(await find('.rose-form-checkbox-label-text').textContent.trim(), 'Label');
|
||||
assert.equal(await find('.rose-form-checkbox-label-description').textContent.trim(), 'Hello world');
|
||||
await render(
|
||||
hbs`<Rose::Form::Checkbox @label="Label" @description="Hello world" />`
|
||||
);
|
||||
assert.equal(
|
||||
await find('.rose-form-checkbox-label-text').textContent.trim(),
|
||||
'Label'
|
||||
);
|
||||
assert.equal(
|
||||
await find('.rose-form-checkbox-label-description').textContent.trim(),
|
||||
'Hello world'
|
||||
);
|
||||
assert.ok(await find('input'));
|
||||
});
|
||||
|
||||
|
||||
@@ -3,7 +3,7 @@ import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render, find } from '@ember/test-helpers';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
module('Integration | Component | rose/form/helper-text', function(hooks) {
|
||||
module('Integration | Component | rose/form/helper-text', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function (assert) {
|
||||
|
||||
@@ -80,7 +80,10 @@ module('Integration | Component | rose/form/input', function (hooks) {
|
||||
</field.errors>
|
||||
</Rose::Form::Input>
|
||||
`);
|
||||
assert.notOk(find('.rose-form-input'), 'The form field wrapper element is not present in contextual mode');
|
||||
assert.notOk(
|
||||
find('.rose-form-input'),
|
||||
'The form field wrapper element is not present in contextual mode'
|
||||
);
|
||||
assert.ok(find('.rose-form-label.error'));
|
||||
assert.ok(find('.rose-form-helper-text.error'));
|
||||
assert.ok(find('.rose-form-input-field.error'));
|
||||
|
||||
@@ -3,7 +3,7 @@ import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render, find } from '@ember/test-helpers';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
module('Integration | Component | rose/form/label', function(hooks) {
|
||||
module('Integration | Component | rose/form/label', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function (assert) {
|
||||
@@ -14,9 +14,6 @@ module('Integration | Component | rose/form/label', function(hooks) {
|
||||
<//Rose::Form::Label>
|
||||
`);
|
||||
assert.ok(find('.rose-form-label'));
|
||||
assert.equal(
|
||||
find('.rose-form-label').textContent.trim(),
|
||||
'Form Label'
|
||||
);
|
||||
assert.equal(find('.rose-form-label').textContent.trim(), 'Form Label');
|
||||
});
|
||||
});
|
||||
@@ -3,10 +3,10 @@ import { setupRenderingTest } from 'ember-qunit';
|
||||
import { render, find, findAll } from '@ember/test-helpers';
|
||||
import hbs from 'htmlbars-inline-precompile';
|
||||
|
||||
module('Integration | Component | rose/list/key-value', function(hooks) {
|
||||
module('Integration | Component | rose/list/key-value', function (hooks) {
|
||||
setupRenderingTest(hooks);
|
||||
|
||||
test('it renders', async function(assert) {
|
||||
test('it renders', async function (assert) {
|
||||
assert.expect(2);
|
||||
await render(hbs`
|
||||
<Rose::List::KeyValue as |list|>
|
||||
@@ -20,10 +20,18 @@ module('Integration | Component | rose/list/key-value', function(hooks) {
|
||||
</list.item>
|
||||
</Rose::List::KeyValue>
|
||||
`);
|
||||
const itemLabelledBy = find('.rose-list-key-value-item:first-child').getAttribute('aria-labelledby');
|
||||
assert.equal(findAll('.rose-list-key-value-item').length, 2, 'it has two items');
|
||||
const itemLabelledBy = find(
|
||||
'.rose-list-key-value-item:first-child'
|
||||
).getAttribute('aria-labelledby');
|
||||
assert.equal(
|
||||
findAll('.rose-list-key-value-item').length,
|
||||
2,
|
||||
'it has two items'
|
||||
);
|
||||
assert.ok(
|
||||
find(`.rose-list-key-value-item:first-child > .rose-list-key-value-item-cell:first-child#${itemLabelledBy}`),
|
||||
find(
|
||||
`.rose-list-key-value-item:first-child > .rose-list-key-value-item-cell:first-child#${itemLabelledBy}`
|
||||
),
|
||||
'The key cell has an ID associated with the `aria-labelledby` attribute of its parent item element'
|
||||
);
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user