tao_ui 0.1.3 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/lib/assets/icons/{loading.svg → Loading.svg} +0 -0
  3. data/lib/assets/icons/close.svg +12 -0
  4. data/lib/assets/javascripts/tao/ui/dialog/element.coffee +61 -0
  5. data/lib/assets/javascripts/tao/ui/dialog/index.coffee +4 -0
  6. data/lib/assets/javascripts/tao/ui/icons/{basic.coffee → base.coffee} +2 -1
  7. data/lib/assets/javascripts/tao/ui/icons/index.coffee +4 -4
  8. data/lib/assets/javascripts/tao/ui/index.coffee +4 -1
  9. data/lib/assets/javascripts/tao/ui/mobile/index.coffee +3 -2
  10. data/lib/assets/javascripts/tao/ui/mobile/slide_box/element.coffee +7 -0
  11. data/lib/assets/javascripts/tao/ui/mobile/slide_box/index.coffee +4 -0
  12. data/lib/assets/javascripts/tao/ui/popover/create.coffee +18 -0
  13. data/lib/assets/javascripts/tao/ui/popover/direction.coffee +76 -0
  14. data/lib/assets/javascripts/tao/ui/popover/element.coffee +99 -0
  15. data/lib/assets/javascripts/tao/ui/popover/index.coffee +5 -0
  16. data/lib/assets/javascripts/tao/ui/popover/position.coffee +83 -0
  17. data/lib/assets/javascripts/tao/ui/shared/slide_box/element/base.coffee +76 -0
  18. data/lib/assets/javascripts/tao/ui/{ujs.coffee → shared/ujs.coffee} +22 -1
  19. data/lib/assets/javascripts/tao/ui/slide_box/element.coffee +7 -0
  20. data/lib/assets/javascripts/tao/ui/slide_box/index.coffee +4 -0
  21. data/lib/assets/stylesheets/tao/ui/_mixins.scss +2 -2
  22. data/lib/assets/stylesheets/tao/ui/_variables.scss +2 -2
  23. data/lib/assets/stylesheets/tao/ui/basic.scss +11 -139
  24. data/lib/assets/stylesheets/tao/ui/buttons.scss +3 -54
  25. data/lib/assets/stylesheets/tao/ui/code.scss +1 -55
  26. data/lib/assets/stylesheets/tao/ui/dialog.scss +78 -0
  27. data/lib/assets/stylesheets/tao/ui/icons.scss +1 -17
  28. data/lib/assets/stylesheets/tao/ui/index.scss +3 -0
  29. data/lib/assets/stylesheets/tao/ui/mobile/_mixins.scss +2 -2
  30. data/lib/assets/stylesheets/tao/ui/mobile/_variables.scss +2 -2
  31. data/lib/assets/stylesheets/tao/ui/mobile/basic.scss +1 -1
  32. data/lib/assets/stylesheets/tao/ui/mobile/buttons.scss +1 -1
  33. data/lib/assets/stylesheets/tao/ui/mobile/code.scss +1 -1
  34. data/lib/assets/stylesheets/tao/ui/mobile/icons.scss +1 -1
  35. data/lib/assets/stylesheets/tao/ui/mobile/index.scss +1 -0
  36. data/lib/assets/stylesheets/tao/ui/mobile/slide_box.scss +48 -0
  37. data/lib/assets/stylesheets/tao/ui/mobile/tables.scss +1 -1
  38. data/lib/assets/stylesheets/tao/ui/mobile/variables/_base.scss +1 -2
  39. data/lib/assets/stylesheets/tao/ui/popover.scss +178 -0
  40. data/lib/assets/stylesheets/tao/ui/shared/_basic.scss +128 -0
  41. data/lib/assets/stylesheets/tao/ui/shared/_buttons.scss +65 -0
  42. data/lib/assets/stylesheets/tao/ui/shared/_code.scss +54 -0
  43. data/lib/assets/stylesheets/tao/ui/shared/_icons.scss +16 -0
  44. data/lib/assets/stylesheets/tao/ui/shared/_slide_box.scss +80 -0
  45. data/lib/assets/stylesheets/tao/ui/shared/_tables.scss +38 -0
  46. data/lib/assets/stylesheets/tao/ui/{mixins → shared/mixins}/_base.scss +0 -0
  47. data/lib/assets/stylesheets/tao/ui/{mixins → shared/mixins}/_buttons.scss +2 -4
  48. data/lib/assets/stylesheets/tao/ui/shared/variables/_base.scss +48 -0
  49. data/lib/assets/stylesheets/tao/ui/shared/variables/_buttons.scss +93 -0
  50. data/lib/assets/stylesheets/tao/ui/shared/variables/_tables.scss +2 -0
  51. data/lib/assets/stylesheets/tao/ui/slide_box.scss +16 -0
  52. data/lib/assets/stylesheets/tao/ui/tables.scss +3 -41
  53. data/lib/assets/stylesheets/tao/ui/variables/_base.scss +3 -42
  54. data/lib/generators/tao/icons/USAGE +2 -2
  55. data/lib/generators/tao/icons/templates/icons.coffee.erb +1 -1
  56. data/lib/tao_ui/components/dialog_component.rb +25 -0
  57. data/lib/tao_ui/components/icon_component.rb +7 -8
  58. data/lib/tao_ui/components/popover_component.rb +17 -0
  59. data/lib/tao_ui/components/slide_box_component.rb +21 -0
  60. data/lib/tao_ui/components.rb +3 -5
  61. data/lib/tao_ui/engine.rb +4 -1
  62. data/lib/tao_ui/version.rb +1 -1
  63. data/lib/views/components/tao_ui/components/_dialog.html.erb +10 -0
  64. data/lib/views/components/tao_ui/components/_popover.html.erb +10 -0
  65. data/lib/views/components/tao_ui/components/_slide_box.html.erb +8 -0
  66. metadata +79 -25
  67. data/lib/assets/stylesheets/tao/ui/mobile/mixins/_base.scss +0 -1
  68. data/lib/assets/stylesheets/tao/ui/mobile/mixins/_buttons.scss +0 -1
  69. data/lib/assets/stylesheets/tao/ui/mobile/variables/_buttons.scss +0 -1
  70. data/lib/assets/stylesheets/tao/ui/mobile/variables/_tables.scss +0 -1
  71. data/lib/assets/stylesheets/tao/ui/variables/_buttons.scss +0 -84
  72. data/lib/assets/stylesheets/tao/ui/variables/_tables.scss +0 -2
@@ -1,154 +1,26 @@
1
1
  @import 'tao/ui/globals';
2
-
3
- html {
4
- box-sizing: border-box;
5
- height: 100%;
6
- font-size: 16px;
7
- -webkit-text-size-adjust: 100%;
8
- -ms-text-size-adjust: 100%;
9
- -ms-overflow-style: scrollbar;
10
- -webkit-tap-highlight-color: rgba(0,0,0,0);
11
-
12
- *, *:before, *:after {
13
- box-sizing: inherit;
14
- }
15
- }
16
-
17
- body {
18
- height: 100%;
19
- margin: 0;
20
- padding: 0;
21
- font-size: $font-size;
22
- font-family: "Helvetica Neue", "PingFang SC", "Microsoft Yahei", 微软雅黑, STXihei, 华文细黑, sans-serif;
23
- line-height: $default-line-height;
24
- color: $text-color;
25
- fill: $text-color;
26
- background-color: $white-color;
27
- }
28
-
29
- small,
30
- .small {
31
- font-size: $font-size-s;
32
- font-weight: normal;
33
- }
34
-
35
- .x-small {
36
- font-size: $font-size-xs;
37
- font-weight: normal;
38
- }
39
-
40
- big,
41
- .big,
42
- .large {
43
- font-size: $font-size-l;
44
- }
45
-
46
- mark,
47
- .mark {
48
- padding: 0.2em;
49
- background-color: yellow;
50
- }
2
+ @import 'tao/ui/shared/basic';
51
3
 
52
4
  a {
53
- color: $link-color;
54
- fill: $link-color;
55
- text-decoration: none;
56
- background-color: transparent; // Remove the gray background on active links in IE 10.
57
- -webkit-text-decoration-skip: objects; // Remove gaps in links underline in iOS 8+ and Safari 8+.
58
-
59
- @if not $mobile {
60
- &:hover {
61
- color: $link-hover-color;
62
- }
5
+ &:hover {
6
+ color: $link-hover-color;
63
7
  }
64
8
 
65
9
  &.warn {
66
- color: $red-color;
67
- fill: $red-color;
68
-
69
- @if not $mobile {
70
- &:hover {
71
- color: lighten($red-color, 10%);
72
- fill: lighten($red-color, 10%);
73
- }
74
- }
75
- }
76
-
77
- &.disabled {
78
- color: $lightest-grey-color;
79
- fill: $lightest-grey-color;
80
- cursor: not-allowed;;
81
- }
82
- }
83
-
84
- a:not([href]):not([tabindex]) {
85
- color: inherit;
86
- fill: inherit;
87
-
88
- @if not $mobile {
89
10
  &:hover {
90
- color: inherit;
91
- fill: inherit;
92
- }
93
-
94
- &:focus {
95
- outline: 0;
11
+ color: lighten($red-color, 10%);
12
+ fill: lighten($red-color, 10%);
96
13
  }
97
14
  }
98
15
  }
99
16
 
100
- h1, h2, h3, h4, h5, h6,
101
- .h1, .h2, .h3, .h4, .h5, .h6 {
102
- margin-top: 1.5em;
103
- margin-bottom: 1em;
104
- line-height: $default-line-height;
105
- color: $black-color;
106
-
107
- &:first-child {
108
- margin-top: 0;
109
- }
110
- }
111
-
112
- h1, .h1 { font-size: $font-size-h1; }
113
- h2, .h2 { font-size: $font-size-h2; }
114
- h3, .h3 { font-size: $font-size-h3; }
115
- h4, .h4 { font-size: $font-size-h4; }
116
- h5, .h5 { font-size: $font-size-h5; }
117
- h6, .h6 { font-size: $font-size-h6; }
118
-
119
-
120
- hr {
121
- margin-top: 1em;
122
- margin-bottom: 1em;
123
- border: 0;
124
- border-top: 1px solid $border-color;
125
- }
126
-
127
- p {
128
- line-height: 2.0;
129
- margin: 0 0 1em 0;
130
- }
131
-
132
- ul, ol {
133
- margin: 0 0 1em 0;
134
- padding: 0 0 0 2em;
135
-
136
- li {
137
- line-height: 2.0
138
- }
139
-
140
- ul, ol {
141
- margin-bottom: 0;
17
+ a:not([href]):not([tabindex]) {
18
+ &:hover {
19
+ color: inherit;
20
+ fill: inherit;
142
21
  }
143
- }
144
-
145
- blockquote {
146
- margin: 0 0 1em 0;
147
- padding: 0.5em 1em;
148
- color: $light-grey-color;
149
- border-left: 0.25em solid $border-color;
150
22
 
151
- *:last-child {
152
- margin-bottom: 0;
23
+ &:focus {
24
+ outline: 0;
153
25
  }
154
26
  }
@@ -1,59 +1,8 @@
1
1
  @import 'tao/ui/globals';
2
+ @import 'tao/ui/shared/buttons';
2
3
 
3
4
  .button {
4
- display: inline-block;
5
- padding: $button-padding;
6
- font-size: $button-font-size;
7
- line-height: $button-line-height;
8
- border-radius: $border-radius-s;
9
- cursor: pointer;
10
- text-decoration: none;
11
- text-align: center;
12
- vertical-align: middle;
13
- white-space: nowrap;
14
- user-select: none;
15
- transition: background 200ms, color 200ms, fill 200ms, border-color 200ms, box-shadow 200ms;
16
- @include button-colors($default-button-colors);
17
-
18
- .icon {
19
- vertical-align: text-top;
20
- }
21
-
22
- &:focus, &.focus {
23
- outline: none;
24
- }
25
-
26
- @if not $mobile {
27
- &:hover {
28
- text-decoration: none;
29
- }
30
- }
31
-
32
- &.disabled,
33
- &[disabled] {
34
- cursor: not-allowed;
35
- }
36
-
37
- &.button-warning {
38
- @include button-colors($warning-button-colors);
39
- }
40
-
41
- &.button-primary {
42
- @include button-colors($primary-button-colors);
43
- }
44
-
45
- &.button-primary-warning {
46
- @include button-colors($primary-warning-button-colors);
47
- }
48
-
49
- &.button-small {
50
- padding: $small-button-padding;
51
- font-size: $small-button-font-size;
52
- line-height: $small-button-line-height;
53
- }
54
-
55
- &.button-block {
56
- display: block;
57
- width: 100%;
5
+ &:hover {
6
+ text-decoration: none;
58
7
  }
59
8
  }
@@ -1,56 +1,2 @@
1
1
  @import 'tao/ui/globals';
2
-
3
- // Inline and block code styles
4
- code,
5
- kbd,
6
- pre,
7
- samp {
8
- font-family: Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
9
- }
10
-
11
- code {
12
- padding: 0.2em 0.4em;
13
- font-size: 85%;
14
- background-color: $lighter-grey-bg-color;
15
- border-radius: $border-radius;
16
- word-wrap: break-word;
17
-
18
- a > & {
19
- padding: 0;
20
- color: inherit;
21
- background-color: inherit;
22
- }
23
- }
24
-
25
- kbd {
26
- padding: 0.2em 0.4em;
27
- font-size: 85%;
28
- background-color: $lighter-grey-bg-color;
29
- border-radius: $border-radius;
30
-
31
- kbd {
32
- padding: 0;
33
- font-size: 100%;
34
- }
35
- }
36
-
37
- pre {
38
- display: block;
39
- margin-top: 0;
40
- margin-bottom: 1em;
41
- padding: 1.5em;
42
- font-size: 85%;
43
- background-color: $lighter-grey-bg-color;
44
- overflow: auto;
45
- border-radius: $border-radius;
46
- white-space: pre-wrap;
47
-
48
- code {
49
- padding: 0;
50
- font-size: inherit;
51
- color: inherit;
52
- background-color: transparent;
53
- border-radius: 0;
54
- word-wrap: normal;
55
- }
56
- }
2
+ @import 'tao/ui/shared/code';
@@ -0,0 +1,78 @@
1
+ @import 'tao/ui/globals';
2
+
3
+ body.tao-dialog-active {
4
+ overflow: hidden;
5
+ }
6
+
7
+ .tao-dialog {
8
+ position: fixed;
9
+ top: 0;
10
+ right: 0;
11
+ bottom: 0;
12
+ left: 0;
13
+ z-index: $z-index-dialog;
14
+ display: none;
15
+ overflow: hidden;
16
+
17
+ &[modal] {
18
+ background-color: rgba(0, 0, 0, 0);
19
+ transition: background-color 200ms ease-in-out;
20
+ }
21
+
22
+ &[modal][active] {
23
+ background-color: rgba(0, 0, 0, 0.55);
24
+ }
25
+
26
+ &[active] .tao-dialog-wrapper {
27
+ transform: translate(0, 0);
28
+ opacity: 1;
29
+ }
30
+
31
+ .tao-dialog-wrapper {
32
+ position: relative;
33
+ width: 37.5rem;
34
+ min-height: 1em;
35
+ margin: 0 auto;
36
+ border-radius: 0 0 $border-radius-s $border-radius-s;
37
+ background-color: $white-color;
38
+ box-shadow: 0 0 5px rgba(0,0,0,0.2);
39
+ transform: translate(0, -30%);
40
+ transition: transform .3s ease-in-out, opacity .3s ease-in-out, width .2s ease-in-out;
41
+ opacity: 0;
42
+ padding: 1rem 2rem;
43
+
44
+ .tao-dialog-content {
45
+ overflow-y: auto;
46
+ }
47
+ }
48
+
49
+ &[size='l'] .tao-dialog-wrapper {
50
+ width: 53.75rem;
51
+ }
52
+
53
+ &[size='xl'] .tao-dialog-wrapper {
54
+ width: 71.25rem;
55
+ }
56
+
57
+ .tao-dialog-wrapper > .link-close {
58
+ display: none;
59
+ align-items: center;
60
+ justify-content: center;
61
+ width: 2rem;
62
+ height: 2rem;
63
+ position: absolute;
64
+ top: 0.625rem;
65
+ right: 0.625rem;
66
+ text-decoration: none;
67
+ fill: $lighter-grey-color;
68
+
69
+ &:hover {
70
+ fill: $grey-color;
71
+ }
72
+ }
73
+
74
+ &[with-close-button] .tao-dialog-wrapper > .link-close {
75
+ display: flex;
76
+ }
77
+
78
+ }
@@ -1,18 +1,2 @@
1
1
  @import 'tao/ui/globals';
2
-
3
- @keyframes spin {
4
- from { transform:rotate(0deg); }
5
- to { transform:rotate(360deg); }
6
- }
7
-
8
- .icon {
9
- display: inline-block;
10
- width: 1.25em;
11
- height: 1.25em;
12
- vertical-align: middle;
13
- fill: inherit;
14
-
15
- &.spin {
16
- animation: spin 1s infinite linear;
17
- }
18
- }
2
+ @import 'tao/ui/shared/icons';
@@ -4,3 +4,6 @@
4
4
  //= require ./code
5
5
  //= require ./buttons
6
6
  //= require ./tables
7
+ //= require ./slide_box
8
+ //= require ./popover
9
+ //= require ./dialog
@@ -1,2 +1,2 @@
1
- @import 'tao/ui/mobile/mixins/base';
2
- @import 'tao/ui/mobile/mixins/buttons';
1
+ @import 'tao/ui/shared/mixins/base';
2
+ @import 'tao/ui/shared/mixins/buttons';
@@ -1,3 +1,3 @@
1
1
  @import 'tao/ui/mobile/variables/base';
2
- @import 'tao/ui/mobile/variables/buttons';
3
- @import 'tao/ui/mobile/variables/tables';
2
+ @import 'tao/ui/shared/variables/buttons';
3
+ @import 'tao/ui/shared/variables/tables';
@@ -1,5 +1,5 @@
1
1
  @import 'tao/ui/mobile/globals';
2
- @import 'tao/ui/basic';
2
+ @import 'tao/ui/shared/basic';
3
3
 
4
4
  // Avoid 300ms click delay on touch devices that support the `touch-action` CSS property.
5
5
  //
@@ -1,2 +1,2 @@
1
1
  @import 'tao/ui/mobile/globals';
2
- @import 'tao/ui/buttons';
2
+ @import 'tao/ui/shared/buttons';
@@ -1,2 +1,2 @@
1
1
  @import 'tao/ui/mobile/globals';
2
- @import 'tao/ui/code';
2
+ @import 'tao/ui/shared/code';
@@ -1,2 +1,2 @@
1
1
  @import 'tao/ui/mobile/globals';
2
- @import 'tao/ui/icons';
2
+ @import 'tao/ui/shared/icons';
@@ -4,3 +4,4 @@
4
4
  //= require ./code
5
5
  //= require ./buttons
6
6
  //= require ./tables
7
+ //= require ./slide_box
@@ -0,0 +1,48 @@
1
+ @import 'tao/ui/mobile/globals';
2
+ @import 'tao/ui/shared/slide_box';
3
+
4
+ tao-slide-box {
5
+ & > .link-close {
6
+ left: 0.5rem;
7
+
8
+ &:active {
9
+ fill: $grey-color;
10
+ }
11
+ }
12
+
13
+ .header {
14
+ height: 3rem;
15
+ background: $white-color;
16
+ display: flex;
17
+ align-items: center;
18
+ justify-content: space-between;
19
+ border-bottom: 1px solid $border-color;
20
+
21
+ .left {
22
+ width: 6rem;
23
+ flex: 1 1 auto;
24
+ text-align: left;
25
+ margin: 0 0 0 0.75rem;
26
+ }
27
+
28
+ .right {
29
+ width: 6rem;
30
+ flex: 1 1 auto;
31
+ text-align: right;
32
+ margin: 0 0.75rem 0 0;
33
+ }
34
+
35
+ .title {
36
+ flex: 1 1 auto;
37
+ text-align: center;
38
+ }
39
+
40
+ .link-close {
41
+ fill: $lighter-grey-color;
42
+
43
+ &:active {
44
+ fill: $grey-color;
45
+ }
46
+ }
47
+ }
48
+ }
@@ -1,2 +1,2 @@
1
1
  @import 'tao/ui/mobile/globals';
2
- @import 'tao/ui/tables';
2
+ @import 'tao/ui/shared/tables';
@@ -1,3 +1,4 @@
1
+ @import 'tao/ui/shared/variables/base';
1
2
 
2
3
  $mobile: true !default;
3
4
 
@@ -7,5 +8,3 @@ $font-size-h3: 1.125rem !default;
7
8
  $font-size-h4: 1rem !default;
8
9
  $font-size-h5: 0.875rem !default;
9
10
  $font-size-h6: 0.75rem !default;
10
-
11
- @import 'tao/ui/variables/base';
@@ -0,0 +1,178 @@
1
+ @import 'tao/ui/globals';
2
+
3
+ $arrowSize: 1rem;
4
+
5
+ tao-popover,
6
+ .tao-popover {
7
+ display: none;
8
+ position: absolute;
9
+ left: -9999px;
10
+ top: -9999px;
11
+ z-index: $z-index-popover;
12
+
13
+ &[active] {
14
+ display: block;
15
+ }
16
+
17
+ .tao-popover-content {
18
+ padding: 0.75em 1em;
19
+ background: $white-color;
20
+ border: 1px solid $border-color;
21
+ border-radius: $border-radius-s;
22
+ box-shadow: 0 3px 15px rgba(0,0,0,0.1);
23
+ white-space: nowrap;
24
+ }
25
+
26
+ .tao-popover-arrow {
27
+ position: absolute;
28
+ width: $arrowSize;
29
+ height: $arrowSize;
30
+
31
+ .arrow {
32
+ font-size: 0;
33
+ height: 0;
34
+ width: 0;
35
+ border-style: solid;
36
+ border-width: $arrowSize / 2;
37
+ position: absolute;
38
+ left: 0;
39
+ top: 0;
40
+ }
41
+ }
42
+
43
+ &[direction='right-top'],
44
+ &[direction='right-bottom'],
45
+ &[direction='right-middle'] {
46
+ .tao-popover-arrow {
47
+ left: -$arrowSize;
48
+ }
49
+
50
+ .arrow-basic {
51
+ border-color: transparent #fff transparent transparent;
52
+ left: 1px;
53
+ }
54
+
55
+ .arrow-border {
56
+ border-color: transparent #ddd transparent transparent;
57
+ left: 0px;
58
+ }
59
+
60
+ .arrow-shadow {
61
+ border-color: transparent rgba(0,0,0,0.08) transparent transparent;
62
+ left: -1px;
63
+ }
64
+ }
65
+
66
+ &[direction='left-top'],
67
+ &[direction='left-bottom'],
68
+ &[direction='left-middle'] {
69
+ .tao-popover-arrow {
70
+ right: -$arrowSize;
71
+ }
72
+
73
+ .arrow-basic {
74
+ border-color: transparent transparent transparent #fff;
75
+ left: -1px;
76
+ }
77
+
78
+ .arrow-border {
79
+ border-color: transparent transparent transparent #ddd;
80
+ left: 0px;
81
+ }
82
+
83
+ .arrow-shadow {
84
+ border-color: transparent transparent transparent rgba(0,0,0,0.08);
85
+ left: 1px;
86
+ }
87
+ }
88
+
89
+ &[direction='left-top'],
90
+ &[direction='right-top'] {
91
+ .tao-popover-arrow {
92
+ bottom: $arrowSize;
93
+ }
94
+ }
95
+
96
+ &[direction='left-bottom'],
97
+ &[direction='right-bottom'] {
98
+ .tao-popover-arrow {
99
+ top: $arrowSize;
100
+ }
101
+ }
102
+
103
+ &[direction='left-middle'],
104
+ &[direction='right-middle'] {
105
+ .tao-popover-arrow {
106
+ top: 50%;
107
+ margin-top: -$arrowSize / 2;
108
+ }
109
+ }
110
+
111
+ &[direction='top-left'],
112
+ &[direction='top-right'],
113
+ &[direction='top-center'] {
114
+ .tao-popover-arrow {
115
+ bottom: -$arrowSize;
116
+ }
117
+
118
+ .arrow-basic {
119
+ border-color: #fff transparent transparent transparent;
120
+ top: -1px;
121
+ }
122
+
123
+ .arrow-border {
124
+ border-color: #ddd transparent transparent transparent;
125
+ top: 0px;
126
+ }
127
+
128
+ .arrow-shadow {
129
+ border-color: rgba(0,0,0,0.08) transparent transparent transparent;
130
+ top: 1px;
131
+ }
132
+ }
133
+
134
+ &[direction='bottom-left'],
135
+ &[direction='bottom-right'],
136
+ &[direction='bottom-center'] {
137
+ .tao-popover-arrow {
138
+ top: -$arrowSize;
139
+ }
140
+
141
+ .arrow-basic {
142
+ border-color: transparent transparent #fff transparent;
143
+ top: 1px;
144
+ }
145
+
146
+ .arrow-border {
147
+ border-color: transparent transparent #ddd transparent;
148
+ top: 0px;
149
+ }
150
+
151
+ .arrow-shadow {
152
+ border-color: transparent transparent rgba(0,0,0,0.08) transparent;
153
+ top: -1px;
154
+ }
155
+ }
156
+
157
+ &[direction='top-left'],
158
+ &[direction='bottom-left'] {
159
+ .tao-popover-arrow {
160
+ right: $arrowSize;
161
+ }
162
+ }
163
+
164
+ &[direction='top-right'],
165
+ &[direction='bottom-right'] {
166
+ .tao-popover-arrow {
167
+ left: $arrowSize;
168
+ }
169
+ }
170
+
171
+ &[direction='top-center'],
172
+ &[direction='bottom-center'] {
173
+ .tao-popover-arrow {
174
+ left: 50%;
175
+ margin-left: -$arrowSize / 2;
176
+ }
177
+ }
178
+ }