tungsten 0.1.16 → 0.1.17

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: 2ab6f396a5376f121a115d097cb538040ab4eef5
4
- data.tar.gz: 74eb6fafd135a1901fe34aed02f77c06e39c79a1
3
+ metadata.gz: 329f8efbe917b13ad6a9dd0905d7afb167be3d82
4
+ data.tar.gz: 7dc93e12d1a22c612d3ea79742ce99787b72f2f6
5
5
  SHA512:
6
- metadata.gz: 4a38745041cbaf5df3d39a536f7de23ac94160a2fcace927a73638a7a1c3c7c2d3516256df54aedcf09fdf4216087574f097a171e179ba2c03efbbc20240bbac
7
- data.tar.gz: 1568758094ebba7c308400d0bd4ca299661f4e76832544794182e35a61e8289b98c670695490c133f00ef40deeb854f52b1161f1fea91be6ad9c972b2592a152
6
+ metadata.gz: fb1c49ab62f7a3ea7a4f1f354b602b3791c62cdcccbab9d9a478d7dd7ce0f240be9bb7cc6f16a73b6af27d2cf21055dea93f4251725bf65aae54484abe05e6b1
7
+ data.tar.gz: ae18d0137dac13386f774285e05adb9cbcf2986af0e4263dddfd84ee3fb1515ef113c7840a5ac5d9b650870d695f210e4156327f6edfb7b41cee3a7b581af701
@@ -2,5 +2,6 @@
2
2
  @import 'colors.yml';
3
3
  @import 'core/index';
4
4
  @import 'code/index';
5
- @import 'form/index';
6
5
  @import 'pages/index';
6
+ @import 'form/index';
7
+ @import 'components/index';
@@ -13,6 +13,7 @@
13
13
  width: auto;
14
14
  line-height: 1;
15
15
  font-size: 14px;
16
+ white-space: nowrap;
16
17
  font-weight: 500;
17
18
  text-align: center;
18
19
  text-decoration: none;
@@ -0,0 +1,5 @@
1
+ @import 'tables';
2
+ @import 'buttons';
3
+ @import 'badges';
4
+ @import 'cards';
5
+ @import 'tooltip';
@@ -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
+ }
@@ -0,0 +1,4 @@
1
+ @keyframes fade-in {
2
+ 0% { opacity: 0; }
3
+ 100% { opacity: 1; }
4
+ }
@@ -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: 2px;
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;
@@ -3,9 +3,6 @@
3
3
  @import 'grid';
4
4
  @import 'layout';
5
5
  @import 'text';
6
- @import 'tables';
7
- @import 'buttons';
8
- @import 'badges';
9
- @import 'cards';
10
6
  @import 'sections';
11
7
  @import 'navigation';
8
+ @import 'animations';
@@ -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]
@@ -2,4 +2,4 @@
2
2
  .error-svgs= error_code_svg @status_code
3
3
  .error-message
4
4
  h1 Page Not Found
5
- p Regretably, this page does not exist.
5
+ p Regrettably, this page does not exist.
@@ -1,3 +1,3 @@
1
1
  module Tungsten
2
- VERSION = "0.1.16"
2
+ VERSION = "0.1.17"
3
3
  end
@@ -89,4 +89,4 @@ function move(o){document.documentElement.scrollTop=o,document.body.parentNode.s
89
89
  });
90
90
 
91
91
 
92
- //# sourceMappingURL=/assets/tungsten/code-0.1.16.map.json
92
+ //# sourceMappingURL=/assets/tungsten/code-0.1.17.map.json