Skip to content
This repository has been archived by the owner on Jan 16, 2018. It is now read-only.

Commit

Permalink
Rename clay-grid to clay-card-grid
Browse files Browse the repository at this point in the history
  • Loading branch information
Carlos Lancha authored and matuzalemsteles committed Dec 19, 2017
1 parent 44a96ab commit a82d40f
Show file tree
Hide file tree
Showing 11 changed files with 75 additions and 75 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"jest": "jest",
"lerna": "lerna bootstrap -- --no-optional --no-package-lock",
"lint": "eslint packages/clay-*/src/*.js packages/clay-*/src/**/*.js && npm run mcritic",
"mcritic": "mcritic packages/ --ignore '**/{browserslist-config-clay-components,generator-metal-clay,clay-dropdown,clay-alert,clay-grid,clay-list,clay-management-toolbar,clay-card,node_modules}/**'",
"mcritic": "mcritic packages/ --ignore '**/{browserslist-config-clay-components,generator-metal-clay,clay-dropdown,clay-alert,clay-card-grid,clay-list,clay-management-toolbar,clay-card,node_modules}/**'",
"precommit": "lint-staged",
"prettier": "prettier-eslint packages/clay-*/src/*.js packages/clay-*/src/**/*.js",
"start": "http-server . -p 4000",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# clay-grid
# clay-card-grid

Metal ClayGrid Component
Metal ClayCardGrid Component

## Setup

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Demo: ClayGrid</title>
<title>Demo: ClayCardGrid</title>

<link rel="stylesheet" href="../../../node_modules/clay/build/css/atlas.css">

Expand All @@ -17,11 +17,11 @@
}
</style>

<script src="../build/globals/clay-grid.js"></script>
<script src="../build/globals/clay-card-grid.js"></script>
</head>
<body class="container">
<h1 class="page-title">
ClayGrid
ClayCardGrid
</h1>

<div id="container1"></div>
Expand All @@ -48,7 +48,7 @@ <h1 class="page-title">
},
];

new metal.ClayGrid({
new metal.ClayCardGrid({
items: [
{
title: 'Folder 1',
Expand Down Expand Up @@ -80,7 +80,7 @@ <h1 class="page-title">
title: 'Folders',
}, '#container1');

new metal.ClayGrid({
new metal.ClayCardGrid({
items: [
{
title: 'File Item 1',
Expand Down Expand Up @@ -112,7 +112,7 @@ <h1 class="page-title">
title: 'File Items',
}, '#container2');

new metal.ClayGrid({
new metal.ClayCardGrid({
items: [
{
initials: 'CL',
Expand Down Expand Up @@ -151,7 +151,7 @@ <h1 class="page-title">
}, '#container3');


new metal.ClayGrid({
new metal.ClayCardGrid({
items: [
{
fileType: 'JPG',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
{
"name": "clay-grid",
"name": "clay-card-grid",
"version": "1.0.0-alpha.8",
"description": "Metal ClayGrid component",
"description": "Metal ClayCardGrid component",
"license": "BSD",
"repository": "https://github.com/metal/metal-clay-components/tree/master/packages/clay-grid",
"repository": "https://github.com/metal/metal-clay-components/tree/master/packages/clay-card-grid",
"engines": {
"node": ">=0.12.0",
"npm": ">=3.0.0"
},
"main": "lib/ClayGrid.js",
"esnext:main": "src/ClayGrid.js",
"jsnext:main": "src/ClayGrid.js",
"main": "lib/ClayCardGrid.js",
"esnext:main": "src/ClayCardGrid.js",
"jsnext:main": "src/ClayCardGrid.js",
"files": [
"lib",
"src",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import defineWebComponent from 'metal-web-component';
import Soy from 'metal-soy';
import {Config} from 'metal-state';

import templates from './ClayGrid.soy.js';
import templates from './ClayCardGrid.soy.js';

/**
* Metal ClayGrid component.
* Metal ClayCardGrid component.
*/
class ClayGrid extends Component {
class ClayCardGrid extends Component {
/**
* Continues the propagation of the checkbox changed event
* @param {!Event} event
Expand All @@ -25,11 +25,11 @@ class ClayGrid extends Component {
* @static
* @type {!Object}
*/
ClayGrid.STATE = {
ClayCardGrid.STATE = {
/**
* CSS classes to be applied to the element.
* @instance
* @memberof ClayGrid
* @memberof ClayCardGrid
* @type {?string|undefined}
* @default undefined
*/
Expand All @@ -38,7 +38,7 @@ ClayGrid.STATE = {
/**
* Id to be applied to the element.
* @instance
* @memberof ClayGrid
* @memberof ClayCardGrid
* @type {?string|undefined}
* @default undefined
*/
Expand All @@ -47,7 +47,7 @@ ClayGrid.STATE = {
/**
* List of items.
* @instance
* @memberof ClayGrid
* @memberof ClayCardGrid
* @type {!array}
* @default undefined
*/
Expand Down Expand Up @@ -104,7 +104,7 @@ ClayGrid.STATE = {
/**
* Flag to indicate if the list group items are selectable.
* @instance
* @memberof ClayGrid
* @memberof ClayCardGrid
* @type {?bool}
* @default false
*/
Expand All @@ -113,7 +113,7 @@ ClayGrid.STATE = {
/**
* The path to the SVG spritemap file containing the icons.
* @instance
* @memberof ClayGrid
* @memberof ClayCardGrid
* @type {?string|undefined}
* @default undefined
*/
Expand All @@ -122,16 +122,16 @@ ClayGrid.STATE = {
/**
* Header of the list group.
* @instance
* @memberof ClayGrid
* @memberof ClayCardGrid
* @type {?string|undefined}
* @default undefined
*/
title: Config.string(),
};

defineWebComponent('clay-grid', ClayGrid);
defineWebComponent('clay-card-grid', ClayCardGrid);

Soy.register(ClayGrid, templates);
Soy.register(ClayCardGrid, templates);

export {ClayGrid};
export default ClayGrid;
export {ClayCardGrid};
export default ClayCardGrid;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{namespace ClayGrid}
{namespace ClayCardGrid}

/**
* This renders the component's whole content.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import ClayGrid from '../ClayGrid';
import ClayCardGrid from '../ClayCardGrid';

let component;

Expand Down Expand Up @@ -72,50 +72,50 @@ let items = [...fileItems, ...folderItems, ...imageItems, ...userItems];

const spritemap = '../node_modules/lexicon-ux/build/images/icons/icons.svg';

describe('ClayGrid', function() {
describe('ClayCardGrid', function() {
afterEach(() => {
if (component) {
component.dispose();
}
});

it('should render the default markup', () => {
component = new ClayGrid({
component = new ClayCardGrid({
items: [],
});

expect(component).toMatchSnapshot();
});

it('should render a ClayGrid with classes', () => {
component = new ClayGrid({
it('should render a ClayCardGrid with classes', () => {
component = new ClayCardGrid({
elementClasses: 'my-custom-class',
items: [],
});

expect(component).toMatchSnapshot();
});

it('should render a ClayGrid with id', () => {
component = new ClayGrid({
it('should render a ClayCardGrid with id', () => {
component = new ClayCardGrid({
id: 'myId',
items: [],
});

expect(component).toMatchSnapshot();
});

it('should render a ClayGrid with file items', () => {
component = new ClayGrid({
it('should render a ClayCardGrid with file items', () => {
component = new ClayCardGrid({
items: fileItems,
spritemap: spritemap,
});

expect(component).toMatchSnapshot();
});

it('should render a ClayGrid with file items and title', () => {
component = new ClayGrid({
it('should render a ClayCardGrid with file items and title', () => {
component = new ClayCardGrid({
items: fileItems,
spritemap: spritemap,
title: 'File Items',
Expand All @@ -124,17 +124,17 @@ describe('ClayGrid', function() {
expect(component).toMatchSnapshot();
});

it('should render a ClayGrid with folder items', () => {
component = new ClayGrid({
it('should render a ClayCardGrid with folder items', () => {
component = new ClayCardGrid({
items: folderItems,
spritemap: spritemap,
});

expect(component).toMatchSnapshot();
});

it('should render a ClayGrid with folder items and title', () => {
component = new ClayGrid({
it('should render a ClayCardGrid with folder items and title', () => {
component = new ClayCardGrid({
items: folderItems,
spritemap: spritemap,
title: 'Folder Items',
Expand All @@ -143,17 +143,17 @@ describe('ClayGrid', function() {
expect(component).toMatchSnapshot();
});

it('should render a ClayGrid with image items', () => {
component = new ClayGrid({
it('should render a ClayCardGrid with image items', () => {
component = new ClayCardGrid({
items: imageItems,
spritemap: spritemap,
});

expect(component).toMatchSnapshot();
});

it('should render a ClayGrid with image items and title', () => {
component = new ClayGrid({
it('should render a ClayCardGrid with image items and title', () => {
component = new ClayCardGrid({
items: imageItems,
spritemap: spritemap,
title: 'Image Items',
Expand All @@ -162,17 +162,17 @@ describe('ClayGrid', function() {
expect(component).toMatchSnapshot();
});

it('should render a ClayGrid with user items', () => {
component = new ClayGrid({
it('should render a ClayCardGrid with user items', () => {
component = new ClayCardGrid({
items: userItems,
spritemap: spritemap,
});

expect(component).toMatchSnapshot();
});

it('should render a ClayGrid with user items and title', () => {
component = new ClayGrid({
it('should render a ClayCardGrid with user items and title', () => {
component = new ClayCardGrid({
items: userItems,
spritemap: spritemap,
title: 'User Items',
Expand All @@ -181,17 +181,17 @@ describe('ClayGrid', function() {
expect(component).toMatchSnapshot();
});

it('should render a ClayGrid with all kind items', () => {
component = new ClayGrid({
it('should render a ClayCardGrid with all kind items', () => {
component = new ClayCardGrid({
items: userItems,
spritemap: spritemap,
});

expect(component).toMatchSnapshot();
});

it('should render a ClayGrid with all kind items and title', () => {
component = new ClayGrid({
it('should render a ClayCardGrid with all kind items and title', () => {
component = new ClayCardGrid({
items: items,
spritemap: spritemap,
title: 'All Items',
Expand All @@ -200,8 +200,8 @@ describe('ClayGrid', function() {
expect(component).toMatchSnapshot();
});

it('should render a selectable items ClayGrid and emit an event on item toggle selection', () => {
component = new ClayGrid({
it('should render a selectable items ClayCardGrid and emit an event on item toggle selection', () => {
component = new ClayCardGrid({
items: items,
selectable: true,
spritemap: spritemap,
Expand Down
Loading

0 comments on commit a82d40f

Please sign in to comment.