kickstart_rails 3.0.39 → 3.0.40
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/kickstart_rails/app.coffee +17 -0
- data/app/assets/javascripts/kickstart_rails/buffer.coffee +32 -0
- data/app/assets/javascripts/kickstart_rails/buttons.coffee +8 -0
- data/app/assets/javascripts/kickstart_rails/debouncer.coffee +14 -0
- data/app/assets/javascripts/kickstart_rails/docs.coffee +179 -0
- data/app/assets/javascripts/kickstart_rails/dropdown.coffee +40 -0
- data/app/assets/javascripts/kickstart_rails/growl.coffee +56 -0
- data/app/assets/javascripts/kickstart_rails/ks.coffee +16 -0
- data/app/assets/javascripts/kickstart_rails/modal.coffee +29 -0
- data/app/assets/javascripts/kickstart_rails/navbar-fixer.coffee +9 -0
- data/app/assets/javascripts/kickstart_rails/navbar.coffee +36 -0
- data/app/assets/javascripts/kickstart_rails/status.coffee +30 -0
- data/app/assets/javascripts/kickstart_rails/tabs.coffee +32 -0
- data/app/assets/javascripts/kickstart_rails/tests.coffee +10 -0
- data/app/assets/javascripts/kickstart_rails/throttler.coffee +7 -0
- data/app/assets/stylesheets/core/_animations.sass +8 -0
- data/app/assets/stylesheets/core/_base.sass +16 -0
- data/app/assets/stylesheets/core/_base_components.sass +15 -0
- data/app/assets/stylesheets/core/_dependent_components.sass +12 -0
- data/app/assets/stylesheets/core/_direct-apply.sass +337 -0
- data/app/assets/stylesheets/core/_grid.sass +142 -0
- data/app/assets/stylesheets/core/_icons.sass +3 -0
- data/app/assets/stylesheets/core/_index.sass +7 -0
- data/app/assets/stylesheets/core/_mixins.sass +22 -0
- data/app/assets/stylesheets/core/_normalize.sass +339 -0
- data/app/assets/stylesheets/core/_root-element.sass +17 -0
- data/app/assets/stylesheets/core/_typography.sass +180 -0
- data/app/assets/stylesheets/core/components/_alerts.sass +23 -0
- data/app/assets/stylesheets/core/components/_buttons.sass +159 -0
- data/app/assets/stylesheets/core/components/_dropdown_menu.sass +69 -0
- data/app/assets/stylesheets/core/components/_forms.sass +106 -0
- data/app/assets/stylesheets/core/components/_growls.sass +2 -0
- data/app/assets/stylesheets/core/components/_hr.sass +5 -0
- data/app/assets/stylesheets/core/components/_images.sass +40 -0
- data/app/assets/stylesheets/core/components/_labels.sass +15 -0
- data/app/assets/stylesheets/core/components/_modals.sass +73 -0
- data/app/assets/stylesheets/core/components/_navbar.sass +270 -0
- data/app/assets/stylesheets/core/components/_notifications.sass +20 -0
- data/app/assets/stylesheets/core/components/_pagination.sass +11 -0
- data/app/assets/stylesheets/core/components/_progress.sass +12 -0
- data/app/assets/stylesheets/core/components/_tables.sass +70 -0
- data/app/assets/stylesheets/core/components/_tabs.sass +37 -0
- data/app/assets/stylesheets/core/components/_tooltips.sass +26 -0
- data/app/assets/stylesheets/docs.sass +99 -0
- data/app/assets/stylesheets/fullpage.sass +7 -0
- data/app/assets/stylesheets/kickstart-semantic.sass +10 -0
- data/app/assets/stylesheets/kickstart.sass +344 -0
- data/app/assets/stylesheets/pages/docs/form.sass +0 -0
- data/app/assets/stylesheets/pages/docs/grid.sass +73 -0
- data/app/assets/stylesheets/pages/docs/index.sass +217 -0
- data/app/assets/stylesheets/pages/docs/ui/alerts.sass +5 -0
- data/app/assets/stylesheets/pages/docs/ui/buttons.sass +52 -0
- data/app/assets/stylesheets/pages/docs/ui/forms.sass +31 -0
- data/app/assets/stylesheets/pages/docs/ui/images.sass +7 -0
- data/app/assets/stylesheets/pages/docs/ui/labels.sass +10 -0
- data/app/assets/stylesheets/pages/docs/ui/modals.sass +18 -0
- data/app/assets/stylesheets/pages/docs/ui/navigation.sass +14 -0
- data/app/assets/stylesheets/pages/docs/ui/notifications.sass +17 -0
- data/app/assets/stylesheets/pages/docs/ui/tables.sass +13 -0
- data/app/assets/stylesheets/pages/docs/ui/tabs.sass +7 -0
- data/app/assets/stylesheets/pages/docs/ui/tooltips.sass +7 -0
- data/app/assets/stylesheets/pages/docs/ui/typography.sass +56 -0
- data/app/assets/stylesheets/pages/index.sass +105 -0
- data/app/assets/stylesheets/themes/default/theme.sass +264 -0
- data/app/assets/stylesheets/vendor/_index.sass +10 -0
- data/app/assets/stylesheets/vendor/switch/README.md +34 -0
- data/app/assets/stylesheets/vendor/switch/example.sass +14 -0
- data/app/assets/stylesheets/vendor/switch/gulpfile.js +16 -0
- data/app/assets/stylesheets/vendor/switch/index.html +18 -0
- data/app/assets/stylesheets/vendor/switch/package.json +24 -0
- data/app/assets/stylesheets/vendor/switch/switch.sass +53 -0
- data/lib/kickstart_rails/version.rb +1 -1
- metadata +72 -1
@@ -0,0 +1,30 @@
|
|
1
|
+
status = (opts) ->
|
2
|
+
|
3
|
+
defaults =
|
4
|
+
type: 'status-yellow'
|
5
|
+
delay: 2000
|
6
|
+
|
7
|
+
status = k$.extend defaults, opts
|
8
|
+
|
9
|
+
if not k$.$$('#status_bar').length
|
10
|
+
$statusBar = document.createElement('div')
|
11
|
+
$statusBar.id = 'status_bar'
|
12
|
+
$statusBar.className = 'status_bar'
|
13
|
+
$statusBar.innerHTML = "<div class='status_bar-status' id='status_bar-status'></div>"
|
14
|
+
document.body.appendChild($statusBar)
|
15
|
+
|
16
|
+
$statusBar = k$.$('#status_bar')
|
17
|
+
|
18
|
+
hideStatusBar = ->
|
19
|
+
$statusBar.parentNode.removeChild $statusBar
|
20
|
+
|
21
|
+
if status.delay > 0
|
22
|
+
k$.debounce hideStatusBar, 'hideStatusBar', status.delay
|
23
|
+
|
24
|
+
$status = k$.$("#status_bar-status")
|
25
|
+
$status.innerHTML = status.text
|
26
|
+
$status.dataset.type = status.type
|
27
|
+
|
28
|
+
k$.status = status
|
29
|
+
|
30
|
+
module.exports = status
|
@@ -0,0 +1,32 @@
|
|
1
|
+
tabs = (el) ->
|
2
|
+
$tabSet = k$.$(el).querySelectorAll('li')
|
3
|
+
$tab.classList.add('tab-item') for $tab in $tabSet
|
4
|
+
|
5
|
+
$paneSet = new Array()
|
6
|
+
for $_tab in $tabSet
|
7
|
+
$id = $_tab.querySelector('a').getAttribute('href')
|
8
|
+
$pane = k$.$("article#{$id}")
|
9
|
+
$pane.classList.add 'open' if $_tab.classList.contains 'open'
|
10
|
+
$paneSet.push($pane)
|
11
|
+
$pane.dataset.panel = 'true'
|
12
|
+
|
13
|
+
for $tab in $tabSet
|
14
|
+
# Create an array of panels by reading the links from each tab.
|
15
|
+
$tabLink = $tab.querySelector('a')
|
16
|
+
$tabLink.dataset.link = $tabLink.getAttribute 'href'
|
17
|
+
$tabLink.href = 'javascript:void(0);'
|
18
|
+
|
19
|
+
do ($tab, $tabLink, $paneSet) ->
|
20
|
+
$tab.addEventListener 'click', ->
|
21
|
+
|
22
|
+
# Reset tabs and panes only in this tabset
|
23
|
+
$pane.classList.remove 'open' for $pane in $paneSet
|
24
|
+
_$tab.classList.remove 'open' for _$tab in $tabSet
|
25
|
+
|
26
|
+
# Add an open class uniquely to this tab and pane.
|
27
|
+
k$.$("article#{$tabLink.dataset.link}").classList.add 'open'
|
28
|
+
$tab.classList.add 'open'
|
29
|
+
|
30
|
+
k$.tabs = tabs
|
31
|
+
|
32
|
+
module.exports = tabs
|
@@ -0,0 +1,10 @@
|
|
1
|
+
App = require './app'
|
2
|
+
testDef = require '../tests/default'
|
3
|
+
testModal = require '../tests/modal'
|
4
|
+
testNavbar = require '../tests/navbar'
|
5
|
+
testGrowl = require '../tests/growl'
|
6
|
+
testDropdownButtons = require '../tests/dropdown-buttons'
|
7
|
+
testTabs = require '../tests/tabs'
|
8
|
+
testStatus = require '../tests/status'
|
9
|
+
testDebouncer = require '../tests/debouncer'
|
10
|
+
testBuffer = require '../tests/buffer'
|
@@ -0,0 +1,15 @@
|
|
1
|
+
// Base Components
|
2
|
+
// ===============
|
3
|
+
// These are the base components from which dependent components can extend.
|
4
|
+
|
5
|
+
// Components
|
6
|
+
@import components/_alerts
|
7
|
+
@import components/_buttons
|
8
|
+
@import components/_hr
|
9
|
+
@import components/_images
|
10
|
+
@import components/_labels
|
11
|
+
@import components/_modals
|
12
|
+
@import components/_progress
|
13
|
+
@import components/_tables
|
14
|
+
@import components/_dropdown_menu
|
15
|
+
@import components/_navbar
|
@@ -0,0 +1,12 @@
|
|
1
|
+
// Dependent Components
|
2
|
+
// ====================
|
3
|
+
// These components extend the core and base components.
|
4
|
+
|
5
|
+
// Components
|
6
|
+
@import components/_growls
|
7
|
+
@import components/_modals
|
8
|
+
@import components/_notifications
|
9
|
+
@import components/_tabs
|
10
|
+
@import components/_tooltips
|
11
|
+
@import components/_forms
|
12
|
+
@import components/_pagination
|
@@ -0,0 +1,337 @@
|
|
1
|
+
// Direct applications
|
2
|
+
// ===================
|
3
|
+
// Regardless of semantic or non-semantic usage, some styles
|
4
|
+
// Should be applied directly to classes or elements no matter
|
5
|
+
// what. This include should be included near the end of the
|
6
|
+
// import chain but before kickstart.sass to accomplish this.
|
7
|
+
|
8
|
+
body
|
9
|
+
&.dismiss-modal
|
10
|
+
cursor: pointer
|
11
|
+
|
12
|
+
// Buttons
|
13
|
+
// -------
|
14
|
+
|
15
|
+
button,
|
16
|
+
input[type="submit"],
|
17
|
+
input[type="button"],
|
18
|
+
+button
|
19
|
+
|
20
|
+
input[type="file"]::-webkit-file-upload-button
|
21
|
+
+button
|
22
|
+
|
23
|
+
+dropdown_menu
|
24
|
+
|
25
|
+
// Forms
|
26
|
+
// -----
|
27
|
+
|
28
|
+
%error_message
|
29
|
+
font-style: italic
|
30
|
+
margin:
|
31
|
+
top: 7px
|
32
|
+
bottom: 14px
|
33
|
+
|
34
|
+
form
|
35
|
+
.errors, .warnings, .successes
|
36
|
+
p
|
37
|
+
@extend %error_message
|
38
|
+
|
39
|
+
.errors
|
40
|
+
+field-colors(map-get($colors, red))
|
41
|
+
|
42
|
+
.warnings
|
43
|
+
+field-colors(map-get($colors, yellow))
|
44
|
+
|
45
|
+
.successes
|
46
|
+
+field-colors(map-get($colors, green))
|
47
|
+
|
48
|
+
p
|
49
|
+
&.error, &.warning, &.success
|
50
|
+
@extend %error_message
|
51
|
+
|
52
|
+
label, span, p
|
53
|
+
&.error
|
54
|
+
color: map-get($colors, red)
|
55
|
+
|
56
|
+
&.warning
|
57
|
+
color: map-get($colors, yellow)
|
58
|
+
|
59
|
+
&.success
|
60
|
+
color: map-get($colors, green)
|
61
|
+
|
62
|
+
input, select
|
63
|
+
&.error
|
64
|
+
border-color: map-get($colors, red)
|
65
|
+
|
66
|
+
&.warning
|
67
|
+
border-color: map-get($colors, yellow)
|
68
|
+
|
69
|
+
&.success
|
70
|
+
border-color: map-get($colors, green)
|
71
|
+
|
72
|
+
|
73
|
+
// Growls
|
74
|
+
// ------
|
75
|
+
|
76
|
+
.growl_container
|
77
|
+
position: fixed
|
78
|
+
top: 0
|
79
|
+
right: 0
|
80
|
+
padding: $space/2
|
81
|
+
z-index: 2000
|
82
|
+
width: 300px
|
83
|
+
overflow: auto
|
84
|
+
max-height: 100vh
|
85
|
+
|
86
|
+
.growl
|
87
|
+
box-shadow: 0px 0px $space/2 rgba(0, 0, 0, 0.5)
|
88
|
+
transition: all 0.5s
|
89
|
+
|
90
|
+
&.show, &.hide
|
91
|
+
+fadeInDown
|
92
|
+
|
93
|
+
&.hide
|
94
|
+
animation-direction: reverse
|
95
|
+
|
96
|
+
+growl
|
97
|
+
|
98
|
+
// Status
|
99
|
+
// ------
|
100
|
+
|
101
|
+
.status_bar
|
102
|
+
+status_bar
|
103
|
+
.status_bar-status
|
104
|
+
&[data-type="status-red"]
|
105
|
+
+label(map-get($colors, red))
|
106
|
+
|
107
|
+
&[data-type="status-orange"]
|
108
|
+
+label(map-get($colors, orange))
|
109
|
+
|
110
|
+
&[data-type="status-yellow"]
|
111
|
+
+label(map-get($colors, yellow))
|
112
|
+
|
113
|
+
&[data-type="status-green"]
|
114
|
+
+label(map-get($colors, green))
|
115
|
+
|
116
|
+
&[data-type="status-blue"]
|
117
|
+
+label(map-get($colors, blue))
|
118
|
+
|
119
|
+
&[data-type="status-violet"]
|
120
|
+
+label(map-get($colors, violet))
|
121
|
+
|
122
|
+
// Tabs
|
123
|
+
// ----
|
124
|
+
|
125
|
+
[data-panel]
|
126
|
+
display: none
|
127
|
+
|
128
|
+
&.open
|
129
|
+
display: block
|
130
|
+
|
131
|
+
// Tooltips
|
132
|
+
// --------
|
133
|
+
|
134
|
+
=tooltip_base
|
135
|
+
margin-bottom: 0
|
136
|
+
position: absolute
|
137
|
+
display: block
|
138
|
+
opacity: 0
|
139
|
+
bottom: 100%
|
140
|
+
box-shadow: 0px 5px 25px rgba(0, 0, 0, 0.25)
|
141
|
+
pointer-events: none
|
142
|
+
max-width: 350px
|
143
|
+
min-width: 100px
|
144
|
+
text-align: center
|
145
|
+
transition: all 0.25s
|
146
|
+
|
147
|
+
=tooltip_arrow
|
148
|
+
border-top-style: solid
|
149
|
+
border-top-width: 10px
|
150
|
+
border-left: 10px solid transparent
|
151
|
+
border-right: 10px solid transparent
|
152
|
+
width: 0px
|
153
|
+
height: 0px
|
154
|
+
content: ' '
|
155
|
+
display: block
|
156
|
+
background: transparent
|
157
|
+
position: absolute
|
158
|
+
left: 50%
|
159
|
+
margin-left: -8px
|
160
|
+
opacity: 0
|
161
|
+
|
162
|
+
=pseudo-tooltip-color($color: $primary-color)
|
163
|
+
&:after
|
164
|
+
+label($color)
|
165
|
+
margin-bottom: 0
|
166
|
+
|
167
|
+
&:before
|
168
|
+
border-top-color: $color
|
169
|
+
|
170
|
+
[data-ks-tooltip]
|
171
|
+
position: relative
|
172
|
+
|
173
|
+
+pseudo-tooltip-color
|
174
|
+
|
175
|
+
&:after
|
176
|
+
content: attr(data-ks-tooltip)
|
177
|
+
+tooltip_base
|
178
|
+
transform: translateY(0px)
|
179
|
+
z-index: 10
|
180
|
+
|
181
|
+
&:before
|
182
|
+
+tooltip_arrow
|
183
|
+
bottom: 100%
|
184
|
+
z-index: 100
|
185
|
+
|
186
|
+
&:hover
|
187
|
+
&:after, &:before
|
188
|
+
opacity: 1
|
189
|
+
|
190
|
+
&:after
|
191
|
+
transform: translateY(-8px)
|
192
|
+
transition: transform 0.25s
|
193
|
+
|
194
|
+
// Positioning
|
195
|
+
|
196
|
+
&[data-ks-tooltip-position="bottom"]
|
197
|
+
&:after
|
198
|
+
top: 100%
|
199
|
+
bottom: auto
|
200
|
+
margin-top: 15px
|
201
|
+
transform: translateY(-6px)
|
202
|
+
|
203
|
+
&:before
|
204
|
+
transform: rotate(180deg)
|
205
|
+
top: 100%
|
206
|
+
bottom: auto
|
207
|
+
|
208
|
+
&[data-ks-tooltip-position="left"]
|
209
|
+
&:after
|
210
|
+
transform: translateY(6px)
|
211
|
+
top: 50%
|
212
|
+
bottom: auto
|
213
|
+
margin:
|
214
|
+
top: -19px
|
215
|
+
right: 12px
|
216
|
+
left: auto
|
217
|
+
right: 100%
|
218
|
+
|
219
|
+
&:before
|
220
|
+
transform: rotate(-90deg)
|
221
|
+
top: 50%
|
222
|
+
margin-top: -4px
|
223
|
+
bottom: auto
|
224
|
+
left: auto
|
225
|
+
right: 100%
|
226
|
+
|
227
|
+
&[data-ks-tooltip-position="right"]
|
228
|
+
&:after
|
229
|
+
transform: translateY(6px)
|
230
|
+
top: 50%
|
231
|
+
bottom: auto
|
232
|
+
margin:
|
233
|
+
top: -19px
|
234
|
+
left: 16px
|
235
|
+
left: 100%
|
236
|
+
right: auto
|
237
|
+
|
238
|
+
&:before
|
239
|
+
transform: rotate(90deg)
|
240
|
+
top: 50%
|
241
|
+
margin-top: -4px
|
242
|
+
margin-left: 4px
|
243
|
+
bottom: auto
|
244
|
+
left: 100%
|
245
|
+
right: auto
|
246
|
+
|
247
|
+
&[data-ks-tooltip-color="red"]
|
248
|
+
+pseudo-tooltip-color(map-get($colors, red))
|
249
|
+
|
250
|
+
&[data-ks-tooltip-color="orange"]
|
251
|
+
+pseudo-tooltip-color(map-get($colors, orange))
|
252
|
+
|
253
|
+
&[data-ks-tooltip-color="yellow"]
|
254
|
+
+pseudo-tooltip-color(map-get($colors, yellow))
|
255
|
+
|
256
|
+
&[data-ks-tooltip-color="green"]
|
257
|
+
+pseudo-tooltip-color(map-get($colors, green))
|
258
|
+
|
259
|
+
&[data-ks-tooltip-color="blue"]
|
260
|
+
+pseudo-tooltip-color(map-get($colors, blue))
|
261
|
+
|
262
|
+
&[data-ks-tooltip-color="violet"]
|
263
|
+
+pseudo-tooltip-color(map-get($colors, violet))
|
264
|
+
|
265
|
+
.tooltip
|
266
|
+
+tooltip_base
|
267
|
+
left: -30px
|
268
|
+
right: -30px
|
269
|
+
transform: translateY(8px)
|
270
|
+
z-index: 10
|
271
|
+
+label(map-get($colors, blue))
|
272
|
+
margin: 10px auto
|
273
|
+
|
274
|
+
&:after
|
275
|
+
+tooltip_arrow
|
276
|
+
top: 100%
|
277
|
+
|
278
|
+
&.tooltip-bottom
|
279
|
+
top: 100%
|
280
|
+
bottom: auto
|
281
|
+
|
282
|
+
&:after
|
283
|
+
bottom: 100%
|
284
|
+
top: auto
|
285
|
+
transform: rotate(180deg)
|
286
|
+
|
287
|
+
&.tooltip-left
|
288
|
+
right: 100%
|
289
|
+
left: auto
|
290
|
+
|
291
|
+
&:after
|
292
|
+
transform: rotate(-90deg)
|
293
|
+
left: 100%
|
294
|
+
|
295
|
+
&.tooltip-right
|
296
|
+
left: 100%
|
297
|
+
right: auto
|
298
|
+
|
299
|
+
&:after
|
300
|
+
transform: rotate(90deg)
|
301
|
+
left: auto
|
302
|
+
right: 100%
|
303
|
+
margin:
|
304
|
+
left: 0
|
305
|
+
right: -8px
|
306
|
+
|
307
|
+
&.tooltip-right, &.tooltip-left
|
308
|
+
top: 0
|
309
|
+
bottom: auto
|
310
|
+
margin: 0
|
311
|
+
|
312
|
+
&:after
|
313
|
+
top: 8px
|
314
|
+
|
315
|
+
&.tooltip-red
|
316
|
+
+label(map-get($colors, red))
|
317
|
+
|
318
|
+
&.tooltip-orange
|
319
|
+
+label(map-get($colors, orange))
|
320
|
+
|
321
|
+
&.tooltip-yellow
|
322
|
+
+label(map-get($colors, yellow))
|
323
|
+
|
324
|
+
&.tooltip-green
|
325
|
+
+label(map-get($colors, green))
|
326
|
+
|
327
|
+
&.tooltip-blue
|
328
|
+
+label(map-get($colors, blue))
|
329
|
+
|
330
|
+
&.tooltip-violet
|
331
|
+
+label(map-get($colors, violet))
|
332
|
+
|
333
|
+
&.tooltip-primary
|
334
|
+
+label(map-get($colors, primary))
|
335
|
+
|
336
|
+
&.tooltip-secondary
|
337
|
+
+label(map-get($colors, secondary))
|