Skip to content
This repository has been archived by the owner on Mar 27, 2023. It is now read-only.

Commit

Permalink
[ICONS] vol-2 additianal icons
Browse files Browse the repository at this point in the history
Signed-off-by: Shijir Tsogoo <[email protected]>
  • Loading branch information
Shijir authored and hippee-lee committed Jan 26, 2017
1 parent 6944391 commit a6cdbe6
Show file tree
Hide file tree
Showing 13 changed files with 1,767 additions and 20 deletions.
7 changes: 7 additions & 0 deletions build/tasks/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,19 @@ gulp.task("bundle:icons:shapes", ["typescript:icons"], function () {
}
});

/* TODO: BasicShapes is deprecated, so is this task and will be removed in 0.9.0 */
builder.buildStatic("clarity-icons/shapes/basic-shapes.js", "dist/bundles/basic-shapes.umd.js", buildOpts)
.catch(function (err) {
console.error(err);
process.exit(1);
});

builder.buildStatic("clarity-icons/shapes/essential-shapes.js", "dist/bundles/essential-shapes.umd.js", buildOpts)
.catch(function (err) {
console.error(err);
process.exit(1);
});

builder.buildStatic("clarity-icons/shapes/social-shapes.js", "dist/bundles/social-shapes.umd.js", buildOpts)
.catch(function (err) {
console.error(err);
Expand Down
Binary file modified gemini/screens/iconography/selection/default/chrome.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions src/app/iconography/icon-selection.demo.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="clr-icon-selection">

<section>
<h5>Core shapes</h5>
<h5>Core Shapes</h5>
<div class="row clr-icon-collection">
<div *ngFor="let shape of coreShapes" class="clr-icon-item col-xs-12 col-sm-6 col-md-4 col-lg-3">
<clr-icon [attr.shape]="shape"></clr-icon><span class="icon-shape-name">{{shape}}</span>
Expand All @@ -10,16 +10,16 @@ <h5>Core shapes</h5>
</section>

<section>
<h5>Basic shapes</h5>
<h5>Essential Shapes</h5>
<div class="row clr-icon-collection">
<div *ngFor="let shape of basicShapes" class="clr-icon-item col-xs-12 col-sm-6 col-md-4 col-lg-3">
<div *ngFor="let shape of essentialShapes" class="clr-icon-item col-xs-12 col-sm-6 col-md-4 col-lg-3">
<clr-icon [attr.shape]="shape"></clr-icon><span class="icon-shape-name">{{shape}}</span>
</div>
</div>
</section>

<section>
<h5>Social shapes</h5>
<h5>Social Shapes</h5>
<div class="row clr-icon-collection">
<div *ngFor="let shape of socialShapes" class="clr-icon-item col-xs-12 col-sm-6 col-md-4 col-lg-3">
<clr-icon [attr.shape]="shape"></clr-icon><span class="icon-shape-name">{{shape}}</span>
Expand All @@ -28,7 +28,7 @@ <h5>Social shapes</h5>
</section>

<section>
<h5>Technology shapes</h5>
<h5>Technology Shapes</h5>
<div class="row clr-icon-collection">
<div *ngFor="let shape of technologyShapes" class="clr-icon-item col-xs-12 col-sm-6 col-md-4 col-lg-3">
<clr-icon [attr.shape]="shape"></clr-icon><span class="icon-shape-name">{{shape}}</span>
Expand Down
6 changes: 3 additions & 3 deletions src/app/iconography/icon-selection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
*/
import { Component } from "@angular/core";
import { CoreShapes } from "../../clarity-icons/shapes/core-shapes";
import { BasicShapes } from "../../clarity-icons/shapes/basic-shapes";
import { EssentialShapes } from "../../clarity-icons/shapes/essential-shapes";
import { SocialShapes } from "../../clarity-icons/shapes/social-shapes";
import { TechnologyShapes } from "../../clarity-icons/shapes/technology-shapes";


let coreShapes = Object.keys(CoreShapes);
let basicShapes = Object.keys(BasicShapes);
let essentialShapes = Object.keys(EssentialShapes);
let socialShapes = Object.keys(SocialShapes);
let technologyShapes = Object.keys(TechnologyShapes);

Expand All @@ -31,7 +31,7 @@ export class IconSelectionDemo {
return this.hideShapesFromCore.indexOf(shape) === -1;
});

basicShapes: string[] = basicShapes;
essentialShapes: string[] = essentialShapes;

socialShapes: string[] = socialShapes;

Expand Down
2 changes: 1 addition & 1 deletion src/app/tree-view/lazy-loading/lazy-loading.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {Component, ViewChild} from "@angular/core";

import {TreeNode} from "../../../clarity-angular/tree-view/tree-node";

import "clarity-icons/shapes/basic-shapes";
import "clarity-icons/shapes/essential-shapes";
import "clarity-icons/shapes/technology-shapes";
import "clarity-icons/shapes/social-shapes";

Expand Down
2 changes: 1 addition & 1 deletion src/app/tree-view/tree-view-dynamic/tree-view-dynamic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/
import {Component} from "@angular/core";

import "clarity-icons/shapes/basic-shapes";
import "clarity-icons/shapes/essential-shapes";
import "clarity-icons/shapes/technology-shapes";
import "clarity-icons/shapes/social-shapes";

Expand Down
4 changes: 2 additions & 2 deletions src/clarity-icons/clarity-icons-sfx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
*/

import { ClarityIcons } from "./index";
import { BasicShapes } from "./shapes/basic-shapes";
import { EssentialShapes } from "./shapes/essential-shapes";
import { SocialShapes } from "./shapes/social-shapes";
import { TechnologyShapes } from "./shapes/technology-shapes";

ClarityIcons.add(BasicShapes);
ClarityIcons.add(EssentialShapes);
ClarityIcons.add(SocialShapes);
ClarityIcons.add(TechnologyShapes);

Expand Down
12 changes: 6 additions & 6 deletions src/clarity-icons/clarity-icons.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

import { ClarityIcons } from "./index";
import { CoreShapes } from "./shapes/core-shapes";
import { BasicShapes } from "./shapes/basic-shapes";
import { EssentialShapes } from "./shapes/essential-shapes";

describe("ClarityIcons", () => {

Expand Down Expand Up @@ -48,17 +48,17 @@ describe("ClarityIcons", () => {
expect(ClarityIcons.get("check").trim()).toEqual(CoreShapes[ "check" ].trim());
});

it("should return all icons when no argument is passed in passed after including BasicShapes", () => {
it("should return all icons when no argument is passed in passed after including EssentialShapes", () => {

ClarityIcons.add(BasicShapes);
let currentAllShapes = Object.assign({}, CoreShapes, BasicShapes);
ClarityIcons.add(EssentialShapes);
let currentAllShapes = Object.assign({}, CoreShapes, EssentialShapes);

testAllShapes(currentAllShapes);
});

it("should return BasicShapes['pencil'] when 'pencil' is passed in after including BasicShapes", () => {
it("should return EssentialShapes['pencil'] when 'pencil' is passed in after including EssentialShapes", () => {

expect(ClarityIcons.get("pencil").trim()).toEqual(BasicShapes[ "pencil" ].trim());
expect(ClarityIcons.get("pencil").trim()).toEqual(EssentialShapes[ "pencil" ].trim());
});

it("should throw an error if the requested shape doesn't exist", () => {
Expand Down
Loading

0 comments on commit a6cdbe6

Please sign in to comment.