nitro_sg 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: f547f99e50f3f9f8e96004704dea0c483c6094a22887bc63d14dea569e5f882d
4
+ data.tar.gz: a4511c9fc6817609626509ce2f7bd7304c90c92f80bb2148bf69b66d7fd8ba03
5
+ SHA512:
6
+ metadata.gz: 98f1d4d139dac35b0f2785bfbcd80d09df0b28ea966e43b30f9876d337527c37a527ca7db8781eabec58a20b23a45aa8901dea3ace1241ffd93eda961a84c53c
7
+ data.tar.gz: 8b0f499c31d64a9368a2b80e4bddb37d5ed58a62614296ec84b477a53622dd40a0055d79b122facff5e28bd40e5d8eaa1b7625ba5700a9cf3271d3ba1d09c1a8
@@ -0,0 +1,226 @@
1
+ # Nitro Storybook
2
+
3
+ This repo provides the tools to implement view components which make up the visual appearance of Nitro.
4
+
5
+ * Stylesheets for the app navigation and general appearance
6
+ * Self-contained React components for use in building views
7
+
8
+ The intent of this repo is to provide a base on which other UIs can be built such that they maintain visual consistency and the Nitro brand.
9
+
10
+
11
+ - [Quick Start](#quick-start)
12
+ - [Local Storybook Development in Nitro-Web](#local-storybook-development-in-nitro-web)
13
+ - [Other options for storybook in Nitro-Web](#other-options-for-storybook-in-nitro-web)
14
+ - [Getting Your Changes Into Nitro-Web](#getting-your-changes-into-nitro-web)
15
+ - [Creating Components](#creating-components)
16
+ - [Converting Existing Components](#converting-existing-components)
17
+
18
+
19
+ ## Quick Start
20
+ From the current project directory, run:
21
+
22
+ 1. ensure you are running proper node version (see `package.json` => `engines`)
23
+ 2. `yarn install`
24
+ 3. `yarn run storybook`
25
+ 4. navigate to [localhost:9001](http://localhost:9001)
26
+
27
+ ---
28
+
29
+ ## Local Storybook Development in Nitro-Web
30
+ Its easy to create and test out a component on nitro in real time, even with hot reload. You can point your local storybook folder as you develop it.
31
+
32
+ ##### Update the storybook in the Gemfile to a local path
33
+ `gem "nitro_sg", :path => "/path/to/storybook/locally"`
34
+
35
+ ##### Update the storybook in package.json to a local path
36
+ `”nitro-storybook": "/path/to/storybook/locally"`
37
+
38
+ > if you have any problems with assets not showing try running:
39
+ `bundle exec rake assets:clobber`
40
+
41
+
42
+ ---
43
+
44
+ ## Other options for storybook in Nitro-Web
45
+ You’ll need to point to a something published on GitHub when your ready to deploy it. Here are some options for you:
46
+
47
+ ##### Gemfile - Tag
48
+ `gem "nitro_sg", git: "git@github.com:powerhome/nitro-styleguide.git", tag: "v1.2.1"`
49
+
50
+ ##### Gemfile - SHA
51
+ `gem "nitro_sg", git: "git@github.com:powerhome/nitro-styleguide.git", ref: "4aded"`
52
+
53
+ ##### Gemfile - Branch
54
+ `gem "nitro_sg", git: "git@github.com:powerhome/nitro-styleguide.git", branch: "branchname"`
55
+
56
+ ##### package.json - Branch
57
+ `"nitro-storybook": "git+ssh://git@github.com/powerhome/nitro-storybook.git#branchname",`
58
+
59
+
60
+ ---
61
+
62
+ ## Getting Your Changes Into Nitro-Web
63
+
64
+ ### 1. Increase your version
65
+
66
+ Check the [releases](https://github.com/powerhome/nitro-storybook/releases) and increase your version by 1 in the following files:
67
+
68
+ ```
69
+ lib/nitro_sg/version.rb
70
+ package.json
71
+ ```
72
+
73
+ Be sure and run the following anytime you version up:
74
+
75
+ `yarn install && bundle install`
76
+
77
+
78
+ ### 2. Prep a Storybook PR
79
+
80
+ Get your `nitro-storybook` PR approved and merged into the `nitro-storybook`'s `master` branch.
81
+
82
+ ### 3. Create a Tag & Release
83
+
84
+ Once your merged you need to create a tag so we can reference this version. Here are some easy ways to create and delete tags:
85
+
86
+ ##### Add A Tag
87
+ ```
88
+ git tag v1.0.1
89
+ git push origin v1.0.1
90
+ ```
91
+
92
+ ##### Remove A Tag
93
+ ```
94
+ git tag -d v1.0.1
95
+ git push --delete origin v1.0.1
96
+ ```
97
+
98
+ ### 4. Update references in Nitro Web
99
+
100
+ ##### Package.json
101
+ `"nitro-storybook": "git+ssh://git@github.com/powerhome/nitro-storybook.git#v1.9.2",`
102
+
103
+ ##### Gemfile (Usually 4 Spots)
104
+ ```
105
+ gem "nitro_sg", git: "git@github.com:powerhome/nitro-storybook.git", tag: "v1.9.2"
106
+ ```
107
+
108
+ If your updated styling doesn’t show up, you may have old assets you need to remove.
109
+ `bundle exec rake assets:clobber`
110
+
111
+ ---
112
+
113
+ ## Creating Components
114
+
115
+ Creation of new components requires a bit of forethought. Ask yourself these questions first:
116
+
117
+ 1. Does the component already exist in `nitro_react` ?
118
+ 1. Yes - see [Converting Existing Components](#converting-existing-components)
119
+ 1. No - continue
120
+ 1. Ensure you are familiar with these concepts:
121
+ - using Flow.js (install tooling in your editor/IDE)
122
+ - creating "dumb components" in React - your new component **will not** need to be concerned with XHR requests, servers, ect.
123
+ - ESLint (install tooling in your editor/IDE)
124
+ - CSSModules
125
+ - Composing complex React components/organisms (so that you don't create them here!)
126
+ - [Storybook]()
127
+
128
+ ### New React Component
129
+
130
+ Here are the steps to creating a new `Foo` component (in order):
131
+
132
+ 1. Create a new directory under `/components` named `Foo`
133
+ 1. Create `Foo.jsx` inside the directory with the contents:
134
+ ```javascript
135
+ /* @flow */
136
+
137
+ import React from 'react'
138
+
139
+ type Props = {}
140
+
141
+ export default class Foo extends React.Component<Props> {
142
+ static defaultProps = {}
143
+ props: Props
144
+ render() {
145
+ return <span>{`I'm a Foo`}</span>
146
+ }
147
+ }
148
+
149
+ ```
150
+ 1. Create `styles.scss` inside the directory with the contents:
151
+ ```scss
152
+ .foo {}
153
+ ```
154
+ 1. Add the stylesheet as an import by adding this line:
155
+ ```javascript
156
+ import styles from './styles.scss'
157
+ ```
158
+ 1. Then make use of the import by adding `styles.foo` as the `className`:
159
+ ```javascript
160
+ render() {
161
+ return <span className={styles.foo}>{`I'm a Foo`}</span>
162
+ }
163
+ ```
164
+ 1. Add `Foo.jsx` to the component index in `components/index.js`
165
+ ```javascript
166
+ export Foo from './Foo/Foo.jsx'
167
+ ```
168
+
169
+ #### Create the Story
170
+
171
+ 1. Within the same directory, create a `FooStory.jsx` with the contents:
172
+ ```javascript
173
+ import React from "react"
174
+ import Foo from "./Foo"
175
+
176
+ import { text, select, boolean } from "@storybook/addon-knobs"
177
+
178
+ export default function FooStory(stories) {
179
+ stories.add("Foo",
180
+ () => {
181
+ let props = {}
182
+ return (
183
+ <Foo {...props}/>
184
+ )
185
+ }
186
+ )
187
+ }
188
+ ```
189
+ 1. Add the story to the appropriate story index. This will depend on the intent of your component. `Foo` is pretty simply 😁, hence we will add it to `/stories/basic.js` like so:
190
+ ```javascript
191
+ export FooStory from '../components/Foo/FooStory'
192
+ ```
193
+ This will add your `Foo` story to the categoy "Basic Components" in Storybook
194
+
195
+ ---
196
+
197
+ ## Converting Existing Components
198
+
199
+ Conversion of existing components in `nitro_react` is a little different since we already have a decent class structure in the jsx component. There are, however, a few considerations:
200
+
201
+ - Use Flow.js types instead of `PropTypes`
202
+ - use `class` instead of `function` (see the examples below)
203
+ - Try and fix as many eslint and Flow warnings as possible - this is your chance and the time is now! 😬 💀
204
+
205
+ 1. Create a `Props` flow type
206
+ ```javascript
207
+ type Props = {
208
+ children?: Array<React.Node>,
209
+ bold: boolean,
210
+ italic: boolean,
211
+ className: string,
212
+ }
213
+ ```
214
+ 1. Add the type to your class
215
+ ```javascript
216
+ export default class Foo extends React.Component<Props> {
217
+ static defaultProps = {}
218
+ props: Props
219
+ ...
220
+ ```
221
+ 1. You can still deconstruct `this.props` in any of your methods in the normal way
222
+ ```javascript
223
+ const {bar} = this.props
224
+ ```
225
+ 1. Lint your code `yarn run lint`
226
+ 1. For some lint warning you can `yarn run lint-fix` which will automagically fix things like indentation.
@@ -0,0 +1,23 @@
1
+ #!/usr/bin/env rake
2
+ begin
3
+ require "bundler/setup"
4
+ rescue LoadError
5
+ puts "You must `gem install bundler` and `bundle install` to run rake tasks"
6
+ end
7
+
8
+ begin
9
+ require "yard"
10
+ YARD::Rake::YardocTask.new do |t|
11
+ t.files = ["lib/**/*.rb"]
12
+ t.options = [
13
+ "--no-private",
14
+ ]
15
+ end
16
+ rescue LoadError
17
+ STDERR.puts "Could not require() YARD! Install with 'gem install yard' to get the 'yardoc' task"
18
+ end
19
+
20
+ APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
21
+ load "rails/tasks/engine.rake"
22
+
23
+ Bundler::GemHelper.install_tasks
@@ -0,0 +1,22 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="21px" height="24px" viewBox="0 0 21 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 53.1 (72631) - https://sketchapp.com -->
4
+ <title>Group 8 Copy 8</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs>
7
+ <polygon id="path-1" points="2.43902439e-05 0.0932647059 9.7812439 0.0932647059 9.7812439 21 2.43902439e-05 21"></polygon>
8
+ </defs>
9
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
10
+ <g id="Group-8-Copy-8">
11
+ <g id="Group-3" transform="translate(0.500000, 3.000000)">
12
+ <mask id="mask-2" fill="white">
13
+ <use xlink:href="#path-1"></use>
14
+ </mask>
15
+ <g id="Clip-2"></g>
16
+ <path d="M9.7812439,0.0932647059 L0.16197561,6.99855882 L0.151487805,7.00597059 C0.0566097561,7.07415882 2.43902439e-05,7.18484118 2.43902439e-05,7.30293529 L2.43902439e-05,7.30565294 L2.43902439e-05,14.0303471 L2.43902439e-05,14.0335588 C2.43902439e-05,14.1511588 0.0563658537,14.2615941 0.151,14.3295353 L0.16197561,14.3371941 L9.37612195,20.9517 C9.54612195,21.0737471 9.7812439,20.9507118 9.7812439,20.7394765 L9.7812439,0.0932647059 Z" id="Fill-1" fill="#00A3E0" mask="url(#mask-2)"></path>
17
+ </g>
18
+ <path d="M10.27,21 L20.1044264,14.0639185 L20.1148994,14.0564737 C20.212149,13.9879814 20.27,13.8768056 20.27,13.7581849 L20.27,7.00077885 C20.27,6.87942845 20.2123983,6.76850077 20.1156475,6.70025668 L20.1044264,6.69256371 L10.6841835,0.0485669036 C10.510381,-0.0740243048 10.27,0.049559545 10.27,0.261736636 L10.27,21 Z" id="Fill-4" fill="#00A3E0"></path>
19
+ <path d="M7.87657729,17.5988099 C7.85329911,17.6027989 7.83173616,17.596698 7.81703414,17.5814458 C7.80257717,17.5664283 7.79694139,17.5450752 7.80159703,17.5220796 L7.93955091,16.8880577 L7.93955091,8.95011279 L7.80159703,8.36231676 C7.79694139,8.34143299 7.80257717,8.31773343 7.81703414,8.2980229 C7.83173616,8.27807773 7.85329911,8.26446808 7.87657729,8.26047904 L11.2673514,7.68770056 C12.6498307,7.45422469 13.6473622,7.68746591 14.2312772,8.38085404 C14.7262449,8.96911937 14.8,9.76059083 14.8,10.1801434 C14.8,10.601104 14.7262449,11.420968 14.2307871,12.1791193 C13.6473622,13.0728977 12.6498307,13.6440337 11.2673514,13.8777442 L10.2835418,14.0436411 L10.2835418,17.1175445 C10.2835418,17.1588428 10.248747,17.1980292 10.2056211,17.2057726 L7.87657729,17.5988099 Z M10.2835418,11.8721982 L11.2800932,11.7039548 C12.0110282,11.580764 12.3665719,11.2165886 12.3665719,10.5907794 C12.3665719,10.3608233 12.3665719,9.66109961 11.2800932,9.84459522 L10.2835418,10.012604 L10.2835418,11.8721982 Z" id="Fill-6" fill="#FEFEFE"></path>
20
+ </g>
21
+ </g>
22
+ </svg>
@@ -0,0 +1,22 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="21px" height="24px" viewBox="0 0 21 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 53.1 (72631) - https://sketchapp.com -->
4
+ <title>Group 8 Copy 5</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs>
7
+ <polygon id="path-1" points="2.43902439e-05 0.0932647059 9.7812439 0.0932647059 9.7812439 21 2.43902439e-05 21"></polygon>
8
+ </defs>
9
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
10
+ <g id="Group-8-Copy-5">
11
+ <g id="Group-3" transform="translate(0.500000, 3.000000)">
12
+ <mask id="mask-2" fill="white">
13
+ <use xlink:href="#path-1"></use>
14
+ </mask>
15
+ <g id="Clip-2"></g>
16
+ <path d="M9.7812439,0.0932647059 L0.16197561,6.99855882 L0.151487805,7.00597059 C0.0566097561,7.07415882 2.43902439e-05,7.18484118 2.43902439e-05,7.30293529 L2.43902439e-05,7.30565294 L2.43902439e-05,14.0303471 L2.43902439e-05,14.0335588 C2.43902439e-05,14.1511588 0.0563658537,14.2615941 0.151,14.3295353 L0.16197561,14.3371941 L9.37612195,20.9517 C9.54612195,21.0737471 9.7812439,20.9507118 9.7812439,20.7394765 L9.7812439,0.0932647059 Z" id="Fill-1" fill="#00A3E0" mask="url(#mask-2)"></path>
17
+ </g>
18
+ <path d="M10.27,21 L20.1044264,14.0639185 L20.1148994,14.0564737 C20.212149,13.9879814 20.27,13.8768056 20.27,13.7581849 L20.27,13.7554552 L20.27,7.00077885 L20.27,6.99755277 C20.27,6.87942845 20.2123983,6.76850077 20.1156475,6.70025668 L20.1044264,6.69256371 L10.6841835,0.0485669036 C10.510381,-0.0740243048 10.27,0.049559545 10.27,0.261736636 L10.27,21 Z" id="Fill-4" fill="#0072CE"></path>
19
+ <path d="M7.87657729,17.5988099 C7.85329911,17.6027989 7.83173616,17.596698 7.81703414,17.5814458 C7.80257717,17.5664283 7.79694139,17.5450752 7.80159703,17.5220796 L7.93955091,16.8880577 L7.93955091,8.95011279 L7.80159703,8.36231676 C7.79694139,8.34143299 7.80257717,8.31773343 7.81703414,8.2980229 C7.83173616,8.27807773 7.85329911,8.26446808 7.87657729,8.26047904 L11.2673514,7.68770056 C12.6498307,7.45422469 13.6473622,7.68746591 14.2312772,8.38085404 C14.7262449,8.96911937 14.8,9.76059083 14.8,10.1801434 C14.8,10.601104 14.7262449,11.420968 14.2307871,12.1791193 C13.6473622,13.0728977 12.6498307,13.6440337 11.2673514,13.8777442 L10.2835418,14.0436411 L10.2835418,17.1175445 C10.2835418,17.1588428 10.248747,17.1980292 10.2056211,17.2057726 L7.87657729,17.5988099 Z M10.2835418,11.8721982 L11.2800932,11.7039548 C12.0110282,11.580764 12.3665719,11.2165886 12.3665719,10.5907794 C12.3665719,10.3608233 12.3665719,9.66109961 11.2800932,9.84459522 L10.2835418,10.012604 L10.2835418,11.8721982 Z" id="Fill-6" fill="#FEFEFE"></path>
20
+ </g>
21
+ </g>
22
+ </svg>
@@ -0,0 +1,22 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="21px" height="24px" viewBox="0 0 21 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 53.1 (72631) - https://sketchapp.com -->
4
+ <title>Group 8 Copy 12</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs>
7
+ <polygon id="path-1" points="2.43902439e-05 0.0932647059 9.7812439 0.0932647059 9.7812439 21 2.43902439e-05 21"></polygon>
8
+ </defs>
9
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
10
+ <g id="Group-8-Copy-12">
11
+ <g id="Group-3" transform="translate(0.500000, 3.000000)">
12
+ <mask id="mask-2" fill="white">
13
+ <use xlink:href="#path-1"></use>
14
+ </mask>
15
+ <g id="Clip-2"></g>
16
+ <path d="M9.7812439,0.0932647059 L0.16197561,6.99855882 L0.151487805,7.00597059 C0.0566097561,7.07415882 2.43902439e-05,7.18484118 2.43902439e-05,7.30293529 L2.43902439e-05,7.30565294 L2.43902439e-05,14.0303471 L2.43902439e-05,14.0335588 C2.43902439e-05,14.1511588 0.0563658537,14.2615941 0.151,14.3295353 L0.16197561,14.3371941 L9.37612195,20.9517 C9.54612195,21.0737471 9.7812439,20.9507118 9.7812439,20.7394765 L9.7812439,0.0932647059 Z" id="Fill-1" fill="#F9423A" mask="url(#mask-2)"></path>
17
+ </g>
18
+ <path d="M10.27,21 L20.1044264,14.0639185 L20.1148994,14.0564737 C20.212149,13.9879814 20.27,13.8768056 20.27,13.7581849 L20.27,7.00077885 C20.27,6.87942845 20.2123983,6.76850077 20.1156475,6.70025668 L20.1044264,6.69256371 L10.6841835,0.0485669036 C10.510381,-0.0740243048 10.27,0.049559545 10.27,0.261736636 L10.27,21 Z" id="Fill-4" fill="#F9423A"></path>
19
+ <path d="M7.87657729,17.5988099 C7.85329911,17.6027989 7.83173616,17.596698 7.81703414,17.5814458 C7.80257717,17.5664283 7.79694139,17.5450752 7.80159703,17.5220796 L7.93955091,16.8880577 L7.93955091,8.95011279 L7.80159703,8.36231676 C7.79694139,8.34143299 7.80257717,8.31773343 7.81703414,8.2980229 C7.83173616,8.27807773 7.85329911,8.26446808 7.87657729,8.26047904 L11.2673514,7.68770056 C12.6498307,7.45422469 13.6473622,7.68746591 14.2312772,8.38085404 C14.7262449,8.96911937 14.8,9.76059083 14.8,10.1801434 C14.8,10.601104 14.7262449,11.420968 14.2307871,12.1791193 C13.6473622,13.0728977 12.6498307,13.6440337 11.2673514,13.8777442 L10.2835418,14.0436411 L10.2835418,17.1175445 C10.2835418,17.1588428 10.248747,17.1980292 10.2056211,17.2057726 L7.87657729,17.5988099 Z M10.2835418,11.8721982 L11.2800932,11.7039548 C12.0110282,11.580764 12.3665719,11.2165886 12.3665719,10.5907794 C12.3665719,10.3608233 12.3665719,9.66109961 11.2800932,9.84459522 L10.2835418,10.012604 L10.2835418,11.8721982 Z" id="Fill-6" fill="#FEFEFE"></path>
20
+ </g>
21
+ </g>
22
+ </svg>
@@ -0,0 +1 @@
1
+ <svg version="1.1" xmlns="http://www.w3.org/2000/svg" width="32px" height="22px"><title>select-arrow</title><g><polygon style="fill:#999999;" points="11.898,14.077 2.389,4.066 0.512,5.963 11.898,17.95 23.488,5.963 21.596,4.049 "/></g></svg>
@@ -0,0 +1,11 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="15px" height="12px" viewBox="0 0 15 12" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 52.5 (67469) - http://www.bohemiancoding.com/sketch -->
4
+ <title>check</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <g id="Icons" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
7
+ <g id="Branding" transform="translate(-432.000000, -324.000000)" fill="#FFFFFF">
8
+ <path d="M445.124968,324.593777 C445.187467,324.531277 445.270801,324.500027 445.374967,324.500027 C445.479133,324.500027 445.572883,324.531277 445.656216,324.593777 L446.531214,325.500025 C446.614547,325.562525 446.656214,325.645858 446.656214,325.750024 C446.656214,325.854191 446.614547,325.94794 446.531214,326.031274 L437.156237,335.406251 C437.093737,335.468751 437.010403,335.500001 436.906237,335.500001 C436.802071,335.500001 436.708321,335.468751 436.624988,335.406251 L432.468748,331.218761 C432.385414,331.156262 432.343748,331.072928 432.343748,330.968762 C432.343748,330.864596 432.385414,330.770846 432.468748,330.687513 L433.343746,329.812515 C433.427079,329.729181 433.520829,329.687515 433.624995,329.687515 C433.729161,329.687515 433.812494,329.729181 433.874994,329.812515 L436.906237,332.843758 L445.124968,324.593777 Z" id="check"></path>
9
+ </g>
10
+ </g>
11
+ </svg>
@@ -0,0 +1,22 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="21px" height="24px" viewBox="0 0 21 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 53.1 (72631) - https://sketchapp.com -->
4
+ <title>Group 8 Copy 13</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs>
7
+ <polygon id="path-1" points="2.43902439e-05 0.0932647059 9.7812439 0.0932647059 9.7812439 21 2.43902439e-05 21"></polygon>
8
+ </defs>
9
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
10
+ <g id="Group-8-Copy-13">
11
+ <g id="Group-3" transform="translate(0.500000, 3.000000)">
12
+ <mask id="mask-2" fill="white">
13
+ <use xlink:href="#path-1"></use>
14
+ </mask>
15
+ <g id="Clip-2"></g>
16
+ <path d="M9.7812439,0.0932647059 L0.16197561,6.99855882 L0.151487805,7.00597059 C0.0566097561,7.07415882 2.43902439e-05,7.18484118 2.43902439e-05,7.30293529 L2.43902439e-05,7.30565294 L2.43902439e-05,14.0303471 L2.43902439e-05,14.0335588 C2.43902439e-05,14.1511588 0.0563658537,14.2615941 0.151,14.3295353 L0.16197561,14.3371941 L9.37612195,20.9517 C9.54612195,21.0737471 9.7812439,20.9507118 9.7812439,20.7394765 L9.7812439,0.0932647059 Z" id="Fill-1" fill="#273142" mask="url(#mask-2)"></path>
17
+ </g>
18
+ <path d="M10.27,21 L20.1044264,14.0639185 L20.1148994,14.0564737 C20.212149,13.9879814 20.27,13.8768056 20.27,13.7581849 L20.27,7.00077885 C20.27,6.87942845 20.2123983,6.76850077 20.1156475,6.70025668 L20.1044264,6.69256371 L10.6841835,0.0485669036 C10.510381,-0.0740243048 10.27,0.049559545 10.27,0.261736636 L10.27,21 Z" id="Fill-4" fill="#273142"></path>
19
+ <path d="M7.87657729,17.5988099 C7.85329911,17.6027989 7.83173616,17.596698 7.81703414,17.5814458 C7.80257717,17.5664283 7.79694139,17.5450752 7.80159703,17.5220796 L7.93955091,16.8880577 L7.93955091,8.95011279 L7.80159703,8.36231676 C7.79694139,8.34143299 7.80257717,8.31773343 7.81703414,8.2980229 C7.83173616,8.27807773 7.85329911,8.26446808 7.87657729,8.26047904 L11.2673514,7.68770056 C12.6498307,7.45422469 13.6473622,7.68746591 14.2312772,8.38085404 C14.7262449,8.96911937 14.8,9.76059083 14.8,10.1801434 C14.8,10.601104 14.7262449,11.420968 14.2307871,12.1791193 C13.6473622,13.0728977 12.6498307,13.6440337 11.2673514,13.8777442 L10.2835418,14.0436411 L10.2835418,17.1175445 C10.2835418,17.1588428 10.248747,17.1980292 10.2056211,17.2057726 L7.87657729,17.5988099 Z M10.2835418,11.8721982 L11.2800932,11.7039548 C12.0110282,11.580764 12.3665719,11.2165886 12.3665719,10.5907794 C12.3665719,10.3608233 12.3665719,9.66109961 11.2800932,9.84459522 L10.2835418,10.012604 L10.2835418,11.8721982 Z" id="Fill-6" fill="#FEFEFE"></path>
20
+ </g>
21
+ </g>
22
+ </svg>
@@ -0,0 +1,22 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="21px" height="24px" viewBox="0 0 21 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 53.1 (72631) - https://sketchapp.com -->
4
+ <title>Group 8 Copy 10</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs>
7
+ <polygon id="path-1" points="2.43902439e-05 0.0932647059 9.7812439 0.0932647059 9.7812439 21 2.43902439e-05 21"></polygon>
8
+ </defs>
9
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
10
+ <g id="Group-8-Copy-10">
11
+ <g id="Group-3" transform="translate(0.500000, 3.000000)">
12
+ <mask id="mask-2" fill="white">
13
+ <use xlink:href="#path-1"></use>
14
+ </mask>
15
+ <g id="Clip-2"></g>
16
+ <path d="M9.7812439,0.0932647059 L0.16197561,6.99855882 L0.151487805,7.00597059 C0.0566097561,7.07415882 2.43902439e-05,7.18484118 2.43902439e-05,7.30293529 L2.43902439e-05,7.30565294 L2.43902439e-05,14.0303471 L2.43902439e-05,14.0335588 C2.43902439e-05,14.1511588 0.0563658537,14.2615941 0.151,14.3295353 L0.16197561,14.3371941 L9.37612195,20.9517 C9.54612195,21.0737471 9.7812439,20.9507118 9.7812439,20.7394765 L9.7812439,0.0932647059 Z" id="Fill-1" fill="#DAAA01" mask="url(#mask-2)"></path>
17
+ </g>
18
+ <path d="M10.27,21 L20.1044264,14.0639185 L20.1148994,14.0564737 C20.212149,13.9879814 20.27,13.8768056 20.27,13.7581849 L20.27,7.00077885 C20.27,6.87942845 20.2123983,6.76850077 20.1156475,6.70025668 L20.1044264,6.69256371 L10.6841835,0.0485669036 C10.510381,-0.0740243048 10.27,0.049559545 10.27,0.261736636 L10.27,21 Z" id="Fill-4" fill="#DAAA01"></path>
19
+ <path d="M7.87657729,17.5988099 C7.85329911,17.6027989 7.83173616,17.596698 7.81703414,17.5814458 C7.80257717,17.5664283 7.79694139,17.5450752 7.80159703,17.5220796 L7.93955091,16.8880577 L7.93955091,8.95011279 L7.80159703,8.36231676 C7.79694139,8.34143299 7.80257717,8.31773343 7.81703414,8.2980229 C7.83173616,8.27807773 7.85329911,8.26446808 7.87657729,8.26047904 L11.2673514,7.68770056 C12.6498307,7.45422469 13.6473622,7.68746591 14.2312772,8.38085404 C14.7262449,8.96911937 14.8,9.76059083 14.8,10.1801434 C14.8,10.601104 14.7262449,11.420968 14.2307871,12.1791193 C13.6473622,13.0728977 12.6498307,13.6440337 11.2673514,13.8777442 L10.2835418,14.0436411 L10.2835418,17.1175445 C10.2835418,17.1588428 10.248747,17.1980292 10.2056211,17.2057726 L7.87657729,17.5988099 Z M10.2835418,11.8721982 L11.2800932,11.7039548 C12.0110282,11.580764 12.3665719,11.2165886 12.3665719,10.5907794 C12.3665719,10.3608233 12.3665719,9.66109961 11.2800932,9.84459522 L10.2835418,10.012604 L10.2835418,11.8721982 Z" id="Fill-6" fill="#FEFEFE"></path>
20
+ </g>
21
+ </g>
22
+ </svg>
@@ -0,0 +1,22 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="21px" height="24px" viewBox="0 0 21 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 53.1 (72631) - https://sketchapp.com -->
4
+ <title>Group 8 Copy 11</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs>
7
+ <polygon id="path-1" points="2.43902439e-05 0.0932647059 9.7812439 0.0932647059 9.7812439 21 2.43902439e-05 21"></polygon>
8
+ </defs>
9
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
10
+ <g id="Group-8-Copy-11">
11
+ <g id="Group-3" transform="translate(0.500000, 3.000000)">
12
+ <mask id="mask-2" fill="white">
13
+ <use xlink:href="#path-1"></use>
14
+ </mask>
15
+ <g id="Clip-2"></g>
16
+ <path d="M9.7812439,0.0932647059 L0.16197561,6.99855882 L0.151487805,7.00597059 C0.0566097561,7.07415882 2.43902439e-05,7.18484118 2.43902439e-05,7.30293529 L2.43902439e-05,7.30565294 L2.43902439e-05,14.0303471 L2.43902439e-05,14.0335588 C2.43902439e-05,14.1511588 0.0563658537,14.2615941 0.151,14.3295353 L0.16197561,14.3371941 L9.37612195,20.9517 C9.54612195,21.0737471 9.7812439,20.9507118 9.7812439,20.7394765 L9.7812439,0.0932647059 Z" id="Fill-1" fill="#00BF6F" mask="url(#mask-2)"></path>
17
+ </g>
18
+ <path d="M10.27,21 L20.1044264,14.0639185 L20.1148994,14.0564737 C20.212149,13.9879814 20.27,13.8768056 20.27,13.7581849 L20.27,7.00077885 C20.27,6.87942845 20.2123983,6.76850077 20.1156475,6.70025668 L20.1044264,6.69256371 L10.6841835,0.0485669036 C10.510381,-0.0740243048 10.27,0.049559545 10.27,0.261736636 L10.27,21 Z" id="Fill-4" fill="#00BF6F"></path>
19
+ <path d="M7.87657729,17.5988099 C7.85329911,17.6027989 7.83173616,17.596698 7.81703414,17.5814458 C7.80257717,17.5664283 7.79694139,17.5450752 7.80159703,17.5220796 L7.93955091,16.8880577 L7.93955091,8.95011279 L7.80159703,8.36231676 C7.79694139,8.34143299 7.80257717,8.31773343 7.81703414,8.2980229 C7.83173616,8.27807773 7.85329911,8.26446808 7.87657729,8.26047904 L11.2673514,7.68770056 C12.6498307,7.45422469 13.6473622,7.68746591 14.2312772,8.38085404 C14.7262449,8.96911937 14.8,9.76059083 14.8,10.1801434 C14.8,10.601104 14.7262449,11.420968 14.2307871,12.1791193 C13.6473622,13.0728977 12.6498307,13.6440337 11.2673514,13.8777442 L10.2835418,14.0436411 L10.2835418,17.1175445 C10.2835418,17.1588428 10.248747,17.1980292 10.2056211,17.2057726 L7.87657729,17.5988099 Z M10.2835418,11.8721982 L11.2800932,11.7039548 C12.0110282,11.580764 12.3665719,11.2165886 12.3665719,10.5907794 C12.3665719,10.3608233 12.3665719,9.66109961 11.2800932,9.84459522 L10.2835418,10.012604 L10.2835418,11.8721982 Z" id="Fill-6" fill="#FEFEFE"></path>
20
+ </g>
21
+ </g>
22
+ </svg>
@@ -0,0 +1,22 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <svg width="21px" height="24px" viewBox="0 0 21 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
3
+ <!-- Generator: Sketch 53.1 (72631) - https://sketchapp.com -->
4
+ <title>Group 8 Copy 9</title>
5
+ <desc>Created with Sketch.</desc>
6
+ <defs>
7
+ <polygon id="path-1" points="2.43902439e-05 0.0932647059 9.7812439 0.0932647059 9.7812439 21 2.43902439e-05 21"></polygon>
8
+ </defs>
9
+ <g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
10
+ <g id="Group-8-Copy-9">
11
+ <g id="Group-3" transform="translate(0.500000, 3.000000)">
12
+ <mask id="mask-2" fill="white">
13
+ <use xlink:href="#path-1"></use>
14
+ </mask>
15
+ <g id="Clip-2"></g>
16
+ <path d="M9.7812439,0.0932647059 L0.16197561,6.99855882 L0.151487805,7.00597059 C0.0566097561,7.07415882 2.43902439e-05,7.18484118 2.43902439e-05,7.30293529 L2.43902439e-05,7.30565294 L2.43902439e-05,14.0303471 L2.43902439e-05,14.0335588 C2.43902439e-05,14.1511588 0.0563658537,14.2615941 0.151,14.3295353 L0.16197561,14.3371941 L9.37612195,20.9517 C9.54612195,21.0737471 9.7812439,20.9507118 9.7812439,20.7394765 L9.7812439,0.0932647059 Z" id="Fill-1" fill="#004976" mask="url(#mask-2)"></path>
17
+ </g>
18
+ <path d="M10.27,21 L20.1044264,14.0639185 L20.1148994,14.0564737 C20.212149,13.9879814 20.27,13.8768056 20.27,13.7581849 L20.27,7.00077885 C20.27,6.87942845 20.2123983,6.76850077 20.1156475,6.70025668 L20.1044264,6.69256371 L10.6841835,0.0485669036 C10.510381,-0.0740243048 10.27,0.049559545 10.27,0.261736636 L10.27,21 Z" id="Fill-4" fill="#004976"></path>
19
+ <path d="M7.87657729,17.5988099 C7.85329911,17.6027989 7.83173616,17.596698 7.81703414,17.5814458 C7.80257717,17.5664283 7.79694139,17.5450752 7.80159703,17.5220796 L7.93955091,16.8880577 L7.93955091,8.95011279 L7.80159703,8.36231676 C7.79694139,8.34143299 7.80257717,8.31773343 7.81703414,8.2980229 C7.83173616,8.27807773 7.85329911,8.26446808 7.87657729,8.26047904 L11.2673514,7.68770056 C12.6498307,7.45422469 13.6473622,7.68746591 14.2312772,8.38085404 C14.7262449,8.96911937 14.8,9.76059083 14.8,10.1801434 C14.8,10.601104 14.7262449,11.420968 14.2307871,12.1791193 C13.6473622,13.0728977 12.6498307,13.6440337 11.2673514,13.8777442 L10.2835418,14.0436411 L10.2835418,17.1175445 C10.2835418,17.1588428 10.248747,17.1980292 10.2056211,17.2057726 L7.87657729,17.5988099 Z M10.2835418,11.8721982 L11.2800932,11.7039548 C12.0110282,11.580764 12.3665719,11.2165886 12.3665719,10.5907794 C12.3665719,10.3608233 12.3665719,9.66109961 11.2800932,9.84459522 L10.2835418,10.012604 L10.2835418,11.8721982 Z" id="Fill-6" fill="#FEFEFE"></path>
20
+ </g>
21
+ </g>
22
+ </svg>
@@ -0,0 +1,23 @@
1
+ require "sassc-rails"
2
+
3
+ require "nitro_sg/engine"
4
+
5
+
6
+
7
+ module NitroSg
8
+ # @return [Boolean] indication of whether the request is a web view within Nitro Mobile
9
+ def self.web_page_within_mobile_app?(request)
10
+ request.user_agent.try(:downcase) =~ /^nitro/
11
+ end
12
+
13
+ # @return [String] the digest value for assets managed by the asset pipeline
14
+ def self.assets_digest
15
+ @assets_digest ||= begin
16
+ if ActionView::Base.respond_to?(:asset_manifest) # Rails 4
17
+ Digest::MD5.hexdigest(ActionView::Base.assets_manifest.assets.values.sort.join)
18
+ elsif Rails.configuration.assets.digests.present? # Rails 3
19
+ Digest::MD5.hexdigest(Rails.configuration.assets.digests.try(:values).sort.join)
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,15 @@
1
+ module NitroSg
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace NitroSg
4
+
5
+ config.generators do |g|
6
+ g.test_framework :rspec
7
+ end
8
+
9
+ config.sass.load_paths ||= []
10
+ config.assets.paths ||= []
11
+ config.assets.paths << "#{Gem.loaded_specs['nitro_sg'].full_gem_path}/fonts"
12
+ config.sass.load_paths << "#{Gem.loaded_specs['nitro_sg'].full_gem_path}/sass-mixins"
13
+ config.sass.load_paths << "#{Gem.loaded_specs['nitro_sg'].full_gem_path}/components"
14
+ end
15
+ end
@@ -0,0 +1,3 @@
1
+ module NitroSg
2
+ VERSION = "3.0.0".freeze
3
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :nitro_sg do
3
+ # # Task goes here
4
+ # end
metadata ADDED
@@ -0,0 +1,190 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: nitro_sg
3
+ version: !ruby/object:Gem::Version
4
+ version: 3.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Nitro Developers
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2019-05-23 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: 5.1.6
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '6.0'
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ version: 5.1.6
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '6.0'
33
+ - !ruby/object:Gem::Dependency
34
+ name: sassc-rails
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - '='
38
+ - !ruby/object:Gem::Version
39
+ version: 1.3.0
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - '='
45
+ - !ruby/object:Gem::Version
46
+ version: 1.3.0
47
+ - !ruby/object:Gem::Dependency
48
+ name: sprockets-rails
49
+ requirement: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - '='
52
+ - !ruby/object:Gem::Version
53
+ version: 2.3.3
54
+ type: :runtime
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - '='
59
+ - !ruby/object:Gem::Version
60
+ version: 2.3.3
61
+ - !ruby/object:Gem::Dependency
62
+ name: test-unit
63
+ requirement: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - '='
66
+ - !ruby/object:Gem::Version
67
+ version: 3.1.5
68
+ type: :development
69
+ prerelease: false
70
+ version_requirements: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - '='
73
+ - !ruby/object:Gem::Version
74
+ version: 3.1.5
75
+ - !ruby/object:Gem::Dependency
76
+ name: rspec-rails
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ - !ruby/object:Gem::Dependency
90
+ name: simplecov
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - '='
94
+ - !ruby/object:Gem::Version
95
+ version: 0.10.0
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - '='
101
+ - !ruby/object:Gem::Version
102
+ version: 0.10.0
103
+ - !ruby/object:Gem::Dependency
104
+ name: rubocop
105
+ requirement: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - '='
108
+ - !ruby/object:Gem::Version
109
+ version: 0.49.1
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - '='
115
+ - !ruby/object:Gem::Version
116
+ version: 0.49.1
117
+ - !ruby/object:Gem::Dependency
118
+ name: yard
119
+ requirement: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: '0'
124
+ type: :development
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - ">="
129
+ - !ruby/object:Gem::Version
130
+ version: '0'
131
+ - !ruby/object:Gem::Dependency
132
+ name: rainbow
133
+ requirement: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - '='
136
+ - !ruby/object:Gem::Version
137
+ version: 2.1.0
138
+ type: :development
139
+ prerelease: false
140
+ version_requirements: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - '='
143
+ - !ruby/object:Gem::Version
144
+ version: 2.1.0
145
+ description: Nitro's visual theme, including page layout, styling and navigation
146
+ email:
147
+ - dev@powerhrg.com
148
+ executables: []
149
+ extensions: []
150
+ extra_rdoc_files: []
151
+ files:
152
+ - README.md
153
+ - Rakefile
154
+ - app/assets/images/doors_power_p.svg
155
+ - app/assets/images/general_power_p.svg
156
+ - app/assets/images/insulation_power_p.svg
157
+ - app/assets/images/pb-caret.svg
158
+ - app/assets/images/pb-check.svg
159
+ - app/assets/images/roofing_power_p.svg
160
+ - app/assets/images/siding_power_p.svg
161
+ - app/assets/images/solar_power_p.svg
162
+ - app/assets/images/windows_power_p.svg
163
+ - lib/nitro_sg.rb
164
+ - lib/nitro_sg/engine.rb
165
+ - lib/nitro_sg/version.rb
166
+ - lib/tasks/nitro_sg_tasks.rake
167
+ homepage: http://nitro.powerhrg.com
168
+ licenses: []
169
+ metadata: {}
170
+ post_install_message:
171
+ rdoc_options: []
172
+ require_paths:
173
+ - lib
174
+ required_ruby_version: !ruby/object:Gem::Requirement
175
+ requirements:
176
+ - - ">="
177
+ - !ruby/object:Gem::Version
178
+ version: '0'
179
+ required_rubygems_version: !ruby/object:Gem::Requirement
180
+ requirements:
181
+ - - ">="
182
+ - !ruby/object:Gem::Version
183
+ version: '0'
184
+ requirements: []
185
+ rubyforge_project:
186
+ rubygems_version: 2.7.7
187
+ signing_key:
188
+ specification_version: 4
189
+ summary: Nitro's visual theme
190
+ test_files: []