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

Commit

Permalink
Merge 38d1d66 into f0126cf
Browse files Browse the repository at this point in the history
  • Loading branch information
carloslancha committed Dec 29, 2017
2 parents f0126cf + 38d1d66 commit ce6d5b8
Show file tree
Hide file tree
Showing 10 changed files with 2,875 additions and 1,293 deletions.
602 changes: 265 additions & 337 deletions packages/clay-list/demos/index.html

Large diffs are not rendered by default.

61 changes: 20 additions & 41 deletions packages/clay-list/src/ClayList.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import 'clay-checkbox';
import 'clay-dropdown';
import 'clay-icon';
import 'clay-label';
import 'clay-link';
import 'clay-sticker';
import './ClayListItem';

// eslint-disable-next-line
import { ClayActionsDropdown } from 'clay-dropdown';
import {Config} from 'metal-state';
import Component from 'metal-component';
import defineWebComponent from 'metal-web-component';
import Soy from 'metal-soy';
import {Config} from 'metal-state';

import templates from './ClayList.soy.js';

Expand Down Expand Up @@ -54,41 +55,10 @@ ClayList.STATE = {
* List of items.
* @instance
* @memberof ClayList
* @type {!array}
* @type {?array|undefined}
* @default undefined
*/
items: Config.arrayOf(
Config.shapeOf({
actionItems: Config.arrayOf(
Config.shapeOf({
disabled: Config.bool().value(false),
href: Config.string().required(),
icon: Config.string(),
label: Config.string().required(),
quickAction: Config.bool(),
separator: Config.bool().value(false),
})
),
description: Config.string(),
href: Config.string(),
icon: Config.string(),
iconShape: Config.oneOf(['circle', 'rounded']).value('rounded'),
labels: Config.arrayOf(
Config.shapeOf({
label: Config.string(),
style: Config.oneOf([
'danger',
'info',
'secondary',
'success',
'warning',
]).value('secondary'),
})
),
selected: Config.bool().value(false),
title: Config.string().required(),
})
).required(),
items: Config.array(),

/**
* Flag to indicate if the list group items are selectable.
Expand All @@ -100,22 +70,31 @@ ClayList.STATE = {
selectable: Config.bool().value(false),

/**
* The path to the SVG spritemap file containing the icons.
* Schema mapping list item fields with item data properties.
* @instance
* @memberof ClayList
* @type {?string|undefined}
* @type {!object}
* @default undefined
*/
spritemap: Config.string(),
schema: Config.arrayOf(
Config.shapeOf({
contentRenderer: Config.string(),
fieldName: Config.string(),
fieldsMap: Config.object(),
iconsMap: Config.object(),
iconShapesMap: Config.object(),
labelStylesMap: Config.object(),
})
).required(),

/**
* Header of the list group.
* The path to the SVG spritemap file containing the icons.
* @instance
* @memberof ClayList
* @type {?string|undefined}
* @default undefined
*/
title: Config.string(),
spritemap: Config.string(),
};

defineWebComponent('clay-list', ClayList);
Expand Down
Loading

0 comments on commit ce6d5b8

Please sign in to comment.