tungsten 0.1.16 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/tungsten/_index.scss +2 -1
- data/app/assets/stylesheets/tungsten/{core → components}/_badges.scss +0 -0
- data/app/assets/stylesheets/tungsten/{core → components}/_buttons.scss +1 -0
- data/app/assets/stylesheets/tungsten/{core → components}/_cards.scss +0 -0
- data/app/assets/stylesheets/tungsten/components/_index.scss +5 -0
- data/app/assets/stylesheets/tungsten/{core → components}/_tables.scss +0 -0
- data/app/assets/stylesheets/tungsten/components/_tooltip.scss +38 -0
- data/app/assets/stylesheets/tungsten/core/_animations.scss +4 -0
- data/app/assets/stylesheets/tungsten/core/_globals.scss +27 -1
- data/app/assets/stylesheets/tungsten/core/_index.scss +1 -4
- data/app/helpers/tungsten/button_helper.rb +12 -1
- data/app/views/tungsten/errors/not_found.html.slim +1 -1
- data/lib/tungsten/version.rb +1 -1
- data/public/{code-0.1.16.js → code-0.1.17.js} +1 -1
- data/public/{code-0.1.16.js.gz → code-0.1.17.js.gz} +0 -0
- data/public/{code-0.1.16.map.json → code-0.1.17.map.json} +0 -0
- data/public/{tungsten-0.1.16.css → tungsten-0.1.17.css} +1376 -1323
- data/public/tungsten-0.1.17.css.gz +0 -0
- data/public/{tungsten-0.1.16.js → tungsten-0.1.17.js} +1 -1
- data/public/{tungsten-0.1.16.js.gz → tungsten-0.1.17.js.gz} +0 -0
- data/public/{tungsten-0.1.16.map.json → tungsten-0.1.17.map.json} +0 -0
- metadata +16 -13
- data/public/tungsten-0.1.16.css.gz +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 329f8efbe917b13ad6a9dd0905d7afb167be3d82
|
4
|
+
data.tar.gz: 7dc93e12d1a22c612d3ea79742ce99787b72f2f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb1c49ab62f7a3ea7a4f1f354b602b3791c62cdcccbab9d9a478d7dd7ce0f240be9bb7cc6f16a73b6af27d2cf21055dea93f4251725bf65aae54484abe05e6b1
|
7
|
+
data.tar.gz: ae18d0137dac13386f774285e05adb9cbcf2986af0e4263dddfd84ee3fb1515ef113c7840a5ac5d9b650870d695f210e4156327f6edfb7b41cee3a7b581af701
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,38 @@
|
|
1
|
+
.has-tooltip:hover {
|
2
|
+
position: relative;
|
3
|
+
&:before, &:after {
|
4
|
+
opacity: 0;
|
5
|
+
position: absolute;
|
6
|
+
left: 50%;
|
7
|
+
transform: translate3d(-50%, 0, 0);
|
8
|
+
z-index: 100000;
|
9
|
+
pointer-events: none;
|
10
|
+
}
|
11
|
+
&:after {
|
12
|
+
-webkit-font-smoothing: subpixel-antialiased;
|
13
|
+
top: calc(100% + 6px);
|
14
|
+
transform: translateX(-50%);
|
15
|
+
background: rgba(#000, 0.8);
|
16
|
+
display: inline-block;
|
17
|
+
color: #fff;
|
18
|
+
white-space: nowrap;
|
19
|
+
font-size: 11px;
|
20
|
+
line-height: 1.5em;
|
21
|
+
padding: 5px 8px;
|
22
|
+
border-radius: $radius;
|
23
|
+
}
|
24
|
+
&:before {
|
25
|
+
top: 100%;
|
26
|
+
@include triangle(up, rgba(#000, 0.8), 6px);
|
27
|
+
}
|
28
|
+
|
29
|
+
&:hover, &:focus {
|
30
|
+
&:after { content: attr(aria-label); }
|
31
|
+
&:before { content: ""; }
|
32
|
+
&:before, &:after {
|
33
|
+
animation: fade-in .1s ease-in;
|
34
|
+
animation-fill-mode: forwards;
|
35
|
+
animation-delay: .4s;
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
@@ -71,7 +71,7 @@ $block-elements: p, ul, ol, h1, h2, h3, h4, h5, h6, pre, table, '.card';
|
|
71
71
|
$text-inputs: 'input[type=url], input[type=tel], input[type=text], input[type=email], input[type=number], input[type=password], input[type=search]';
|
72
72
|
|
73
73
|
// Border radius
|
74
|
-
$radius:
|
74
|
+
$radius: 3px;
|
75
75
|
|
76
76
|
// Card padding
|
77
77
|
$card-padding: 20px;
|
@@ -162,6 +162,32 @@ $header-height: 84px;
|
|
162
162
|
}
|
163
163
|
}
|
164
164
|
|
165
|
+
@mixin triangle($direction, $color, $size) {
|
166
|
+
@if $direction == left {
|
167
|
+
border-bottom: $size solid transparent;
|
168
|
+
border-right: $size solid $color;
|
169
|
+
border-top: $size solid transparent;
|
170
|
+
}
|
171
|
+
@else if $direction == right {
|
172
|
+
border-bottom: $size solid transparent;
|
173
|
+
border-left: $size solid $color;
|
174
|
+
border-top: $size solid transparent;
|
175
|
+
}
|
176
|
+
@else if $direction == up {
|
177
|
+
border-bottom: $size solid $color;
|
178
|
+
border-left: $size solid transparent;
|
179
|
+
border-right: $size solid transparent;
|
180
|
+
}
|
181
|
+
@else if $direction == down {
|
182
|
+
border-right: $size solid transparent;
|
183
|
+
border-left: $size solid transparent;
|
184
|
+
border-top: $size solid $color;
|
185
|
+
}
|
186
|
+
|
187
|
+
height: 0;
|
188
|
+
width: 0;
|
189
|
+
}
|
190
|
+
|
165
191
|
// Between widths media query mixin
|
166
192
|
@mixin between($small-width, $large-width) {
|
167
193
|
$large-width: $large-width - 1;
|
@@ -18,7 +18,8 @@ module Tungsten
|
|
18
18
|
data: options.delete(:data),
|
19
19
|
class: options.delete(:class),
|
20
20
|
disabled: options.delete(:disabled),
|
21
|
-
type: options.delete(:type) || 'button'
|
21
|
+
type: options.delete(:type) || 'button',
|
22
|
+
'aria-label'=> options.delete(:aria_label)
|
22
23
|
}
|
23
24
|
|
24
25
|
button_options[:href] = options[:href] if options[:href]
|
@@ -62,6 +63,16 @@ module Tungsten
|
|
62
63
|
button(text, options, &block)
|
63
64
|
end
|
64
65
|
|
66
|
+
def copy_button(text, target, options={}, &block)
|
67
|
+
options[:aria_label] ||= "Copy to clipboard"
|
68
|
+
options[:class] = "#{options[:class]} has-tooltip".strip
|
69
|
+
|
70
|
+
options[:data] ||= {}
|
71
|
+
options[:data][:copy_target] = target
|
72
|
+
|
73
|
+
button(text, options, &block)
|
74
|
+
end
|
75
|
+
|
65
76
|
def button_classes(options)
|
66
77
|
classes = ['button']
|
67
78
|
classes << options[:class]
|
data/lib/tungsten/version.rb
CHANGED
Binary file
|
File without changes
|