revelry_core 0.1.11.1 → 0.1.11.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4ab77570021e8162539800bb76bb2982b15b8515
4
- data.tar.gz: bcdbd64b1ea2527f46bd8f6493199c071ee3adce
3
+ metadata.gz: 3103f059a1494d5ff841c90f06fde124010b0a19
4
+ data.tar.gz: d7e5c5e80333f6c39adb2b3e3602ec820078b8d1
5
5
  SHA512:
6
- metadata.gz: dc4a557fcdfef45278b08205bc3fb490d59585e71047fdcdd08a3ad141431fd7b412f12cab02d0165543b155dac1937d48da5c7a70b8a847a7a4450882ff5c2f
7
- data.tar.gz: 7a6156042e95eba908dc24da404763a0fd8882bfdb51fe3a23394f481a1484e096a0bc7fc1dc5f7976592accc08b7134913009b32daa7365106abd26ab6e0e86
6
+ metadata.gz: ec039c7027c6217a33796e6b03eba0e51f609e21635f6ae78f069aae088b84c70bd0d7f0da2dc22dd65e2a058367cd070cadf0508283bd33b14808b173dfe4d6
7
+ data.tar.gz: c48004aaa1c3de8e5a4c1a547542d3f0c04ebedb9aa9ae606168d67d9bdc067bb77143ab9866bc06619ac3ea26126c1b74c62965d8c229571bd850bfa96614e6
@@ -0,0 +1,8 @@
1
+ Icon = Rev.Components.Icon
2
+
3
+ Rev.registerExample 'Icons',
4
+ render: ->
5
+ <div>
6
+ <h3>{"<Icons>"}</h3>
7
+ <Icon type="FontAwesome" icon="cog" className="icon" />
8
+ </div>
@@ -0,0 +1,35 @@
1
+ # <Icon type="Foundation" icon="cog" className="left" />
2
+ Rev.registerComponent 'Icon',
3
+ statics:
4
+ Adapters:
5
+ FontAwesome: (icon) -> "fa fa-#{icon}"
6
+ IconMoon: (icon) -> "icon-#{icon}"
7
+ Foundation: (icon) -> "fi-#{icon}"
8
+
9
+ typeToAdapter: (type) ->
10
+ adapter = @Adapters[type]
11
+ throw new Error("Invalid Icon type `#{type}`") unless adapter
12
+ adapter
13
+
14
+ defaultType: "IconMoon"
15
+
16
+ propTypes:
17
+ icon: React.PropTypes.string
18
+ type: React.PropTypes.string
19
+
20
+ getDefaultProps: ->
21
+ type: @defaultType
22
+
23
+ getAdapterClassName: ->
24
+ @constructor.typeToAdapter(@props.type)(@props.icon)
25
+
26
+ render: ->
27
+ classNameObject =
28
+ RevIcon: true
29
+
30
+ classNameObject["RevIcon-#{@props.icon}"] = true
31
+ classNameObject[@getAdapterClassName()] = true
32
+
33
+ className = @classAdd classNameObject
34
+
35
+ <i {...@props} className={className} />
@@ -1,5 +1,5 @@
1
1
  module Revelry
2
2
  module Core
3
- VERSION = "0.1.11.1"
3
+ VERSION = "0.1.11.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: revelry_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.11.1
4
+ version: 0.1.11.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Revelry Labs, LLC
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-20 00:00:00.000000000 Z
11
+ date: 2015-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -325,6 +325,7 @@ files:
325
325
  - app/assets/javascripts/revelry/examples/Buttons.js.cjsx
326
326
  - app/assets/javascripts/revelry/examples/Forms.js.cjsx
327
327
  - app/assets/javascripts/revelry/examples/Grid.js.cjsx
328
+ - app/assets/javascripts/revelry/examples/Icons.js.cjsx
328
329
  - app/assets/javascripts/revelry/examples/Modals.js.cjsx
329
330
  - app/assets/javascripts/revelry/examples/ModelForm.js.cjsx
330
331
  - app/assets/javascripts/revelry/examples/ModelHasManyInput.js.cjsx
@@ -379,6 +380,7 @@ files:
379
380
  - app/assets/javascripts/revelry/ui/grid/BlockGrid.js.cjsx
380
381
  - app/assets/javascripts/revelry/ui/grid/Col.js.cjsx
381
382
  - app/assets/javascripts/revelry/ui/grid/Row.js.cjsx
383
+ - app/assets/javascripts/revelry/ui/icons/Icon.js.cjsx
382
384
  - app/assets/javascripts/revelry/ui/modals/Modal.js.cjsx
383
385
  - app/assets/javascripts/revelry/ui/navigation/IconBar.js.cjsx
384
386
  - app/assets/javascripts/revelry/ui/navigation/IconBarItem.js.cjsx