@progressio_resources/gravity-design-system 3.0.2 → 3.0.4

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.
Files changed (36) hide show
  1. package/esm2022/lib/components/gravity-avatar-stack/gravity-avatar-stack.component.mjs +26 -11
  2. package/esm2022/lib/vendor/gravity-tooltip/gravity-tooltip.component.mjs +55 -21
  3. package/fesm2022/progressio_resources-gravity-design-system.mjs +79 -30
  4. package/fesm2022/progressio_resources-gravity-design-system.mjs.map +1 -1
  5. package/lib/components/gravity-avatar-stack/gravity-avatar-stack.component.d.ts +5 -4
  6. package/package.json +1 -1
  7. package/src/lib/assets/icon-set/gt-icon-deposit/gt-icon-deposit-lg-24.svg +10 -0
  8. package/src/lib/assets/icon-set/gt-icon-deposit/gt-icon-deposit-md-16.svg +10 -0
  9. package/src/lib/assets/icon-set/gt-icon-deposit/gt-icon-deposit-sm-12.svg +10 -0
  10. package/src/lib/assets/icon-set/gt-icon-deposit/gt-icon-deposit-xl-32.svg +10 -0
  11. package/src/lib/assets/icon-set/gt-icon-exchange-provider/gt-icon-exchange-provider-lg-24.svg +5 -0
  12. package/src/lib/assets/icon-set/gt-icon-exchange-provider/gt-icon-exchange-provider-md-16.svg +5 -0
  13. package/src/lib/assets/icon-set/gt-icon-exchange-provider/gt-icon-exchange-provider-sm-12.svg +5 -0
  14. package/src/lib/assets/icon-set/gt-icon-exchange-provider/gt-icon-exchange-provider-xl-32.svg +5 -0
  15. package/src/lib/assets/icon-set/gt-icon-new-tab/gt-icon-new-tab-lg-24.svg +3 -0
  16. package/src/lib/assets/icon-set/gt-icon-new-tab/gt-icon-new-tab-md-16.svg +3 -0
  17. package/src/lib/assets/icon-set/gt-icon-new-tab/gt-icon-new-tab-sm-12.svg +3 -0
  18. package/src/lib/assets/icon-set/gt-icon-new-tab/gt-icon-new-tab-xl-32.svg +3 -0
  19. package/src/lib/assets/icon-set/gt-icon-payout/gt-icon-payout-lg-24.svg +10 -0
  20. package/src/lib/assets/icon-set/gt-icon-payout/gt-icon-payout-md-16.svg +10 -0
  21. package/src/lib/assets/icon-set/gt-icon-payout/gt-icon-payout-sm-12.svg +10 -0
  22. package/src/lib/assets/icon-set/gt-icon-payout/gt-icon-payout-xl-32.svg +10 -0
  23. package/src/lib/assets/icon-set/gt-icon-switch/gt-icon-switch-lg-24.svg +10 -0
  24. package/src/lib/assets/icon-set/gt-icon-switch/gt-icon-switch-md-16.svg +10 -0
  25. package/src/lib/assets/icon-set/gt-icon-switch/gt-icon-switch-sm-12.svg +10 -0
  26. package/src/lib/assets/icon-set/gt-icon-switch/gt-icon-switch-xl-32.svg +10 -0
  27. package/src/lib/assets/icon-set/gt-icon-tool/gt-icon-tool-lg-24.svg +10 -0
  28. package/src/lib/assets/icon-set/gt-icon-tool/gt-icon-tool-md-16.svg +10 -0
  29. package/src/lib/assets/icon-set/gt-icon-tool/gt-icon-tool-sm-12.svg +10 -0
  30. package/src/lib/assets/icon-set/gt-icon-tool/gt-icon-tool-xl-32.svg +10 -0
  31. package/src/lib/assets/json/icons.json +96 -0
  32. package/src/lib/styles/components/_link.scss +9 -1
  33. package/src/lib/styles/foundations/colors/themes/_hero.theme.scss +6 -6
  34. package/src/lib/styles/foundations/colors/tokens/_hero.tokens.scss +2 -2
  35. package/src/lib/vendor/gravity-tooltip/gravity-tooltip.component.sass +56 -0
  36. package/src/lib/vendor/gravity-tooltip/gravity-tooltip.component.ts +52 -23
@@ -38,6 +38,20 @@
38
38
  border-width: 5px
39
39
  border-color: var(--bg-tooltip-primary) transparent transparent transparent
40
40
 
41
+ \:host.tooltip-top-left::after
42
+ top: 100%
43
+ left: 10%
44
+ margin-left: -5px
45
+ border-width: 5px
46
+ border-color: var(--bg-tooltip-primary) transparent transparent transparent
47
+
48
+ \:host.tooltip-top-right::after
49
+ top: 100%
50
+ left: 90%
51
+ margin-left: -5px
52
+ border-width: 5px
53
+ border-color: var(--bg-tooltip-primary) transparent transparent transparent
54
+
41
55
  \:host.tooltip-bottom::after
42
56
  bottom: 100%
43
57
  left: 50%
@@ -45,6 +59,20 @@
45
59
  border-width: 5px
46
60
  border-color: transparent transparent var(--bg-tooltip-primary) transparent
47
61
 
62
+ \:host.tooltip-bottom-left::after
63
+ bottom: 100%
64
+ left: 10%
65
+ margin-left: -5px
66
+ border-width: 5px
67
+ border-color: transparent transparent var(--bg-tooltip-primary) transparent
68
+
69
+ \:host.tooltip-bottom-right::after
70
+ bottom: 100%
71
+ left: 90%
72
+ margin-left: -5px
73
+ border-width: 5px
74
+ border-color: transparent transparent var(--bg-tooltip-primary) transparent
75
+
48
76
  \:host.tooltip-left::after
49
77
  top: 50%
50
78
  left: 100%
@@ -52,6 +80,20 @@
52
80
  border-width: 5px
53
81
  border-color: transparent transparent transparent var(--bg-tooltip-primary)
54
82
 
83
+ \:host.tooltip-left-top::after
84
+ top: 10%
85
+ left: 100%
86
+ margin-top: -5px
87
+ border-width: 5px
88
+ border-color: transparent transparent transparent var(--bg-tooltip-primary)
89
+
90
+ \:host.tooltip-left-bottom::after
91
+ top: 90%
92
+ left: 100%
93
+ margin-top: -5px
94
+ border-width: 5px
95
+ border-color: transparent transparent transparent var(--bg-tooltip-primary)
96
+
55
97
  \:host.tooltip-right::after
56
98
  top: 50%
57
99
  right: 100%
@@ -59,6 +101,20 @@
59
101
  border-width: 5px
60
102
  border-color: transparent var(--bg-tooltip-primary) transparent transparent
61
103
 
104
+ \:host.tooltip-right-top::after
105
+ top: 10%
106
+ right: 100%
107
+ margin-top: -5px
108
+ border-width: 5px
109
+ border-color: transparent var(--bg-tooltip-primary) transparent transparent
110
+
111
+ \:host.tooltip-right-bottom::after
112
+ top: 90%
113
+ right: 100%
114
+ margin-top: -5px
115
+ border-width: 5px
116
+ border-color: transparent var(--bg-tooltip-primary) transparent transparent
117
+
62
118
  // Light
63
119
  \:host.tooltip-light::after
64
120
  display: none
@@ -90,7 +90,7 @@ export class GravityTooltipComponent implements OnInit {
90
90
  return;
91
91
  } else {
92
92
  /* Is tooltip outside the visible area */
93
- const placements = ['top', 'right', 'bottom', 'left'];
93
+ const placements = ['top', 'top-left', 'top-right', 'right', 'right-top', 'right-bottom', 'bottom', 'bottom-right', 'bottom-left', 'left', 'left-top', 'left-bottom'];
94
94
  let isPlacementSet;
95
95
 
96
96
  for (const placement of placements) {
@@ -133,28 +133,57 @@ export class GravityTooltipComponent implements OnInit {
133
133
  let topStyle;
134
134
  let leftStyle;
135
135
 
136
- if (placement === 'top') {
137
- topStyle = (this.elementPosition.top + scrollY) - (tooltipHeight + this.tooltipOffset);
138
- }
139
-
140
- if (placement === 'bottom') {
141
- topStyle = (this.elementPosition.top + scrollY) + elementHeight + this.tooltipOffset;
142
- }
143
-
144
- if (placement === 'top' || placement === 'bottom') {
145
- leftStyle = (this.elementPosition.left + elementWidth / 2) - tooltipWidth / 2;
146
- }
147
-
148
- if (placement === 'left') {
149
- leftStyle = this.elementPosition.left - tooltipWidth - this.tooltipOffset;
150
- }
151
-
152
- if (placement === 'right') {
153
- leftStyle = this.elementPosition.left + elementWidth + this.tooltipOffset;
154
- }
155
-
156
- if (placement === 'left' || placement === 'right') {
157
- topStyle = (this.elementPosition.top + scrollY) + elementHeight / 2 - tooltip.clientHeight / 2;
136
+ switch (placement) {
137
+ case 'top':
138
+ topStyle = (this.elementPosition.top + scrollY) - (tooltipHeight + this.tooltipOffset);
139
+ leftStyle = (this.elementPosition.left + elementWidth / 2) - tooltipWidth / 2;
140
+ break;
141
+ case 'top-left':
142
+ topStyle = (this.elementPosition.top + scrollY) - (tooltipHeight + this.tooltipOffset);
143
+ leftStyle = (this.elementPosition.left + elementWidth / 2) - (tooltipWidth * 0.1);
144
+ break;
145
+ case 'top-right':
146
+ topStyle = (this.elementPosition.top + scrollY) - (tooltipHeight + this.tooltipOffset);
147
+ leftStyle = (this.elementPosition.left + elementWidth / 2) - (tooltipWidth * 0.9);
148
+ break;
149
+ case 'bottom':
150
+ topStyle = (this.elementPosition.top + scrollY) + elementHeight + this.tooltipOffset;
151
+ leftStyle = (this.elementPosition.left + elementWidth / 2) - tooltipWidth / 2;
152
+ break;
153
+ case 'bottom-left':
154
+ topStyle = (this.elementPosition.top + scrollY) + elementHeight + this.tooltipOffset;
155
+ leftStyle = (this.elementPosition.left + elementWidth / 2) - (tooltipWidth * 0.1);
156
+ break;
157
+ case 'bottom-right':
158
+ topStyle = (this.elementPosition.top + scrollY) + elementHeight + this.tooltipOffset;
159
+ leftStyle = (this.elementPosition.left + elementWidth / 2) - (tooltipWidth * 0.9);
160
+ break;
161
+ case 'left':
162
+ leftStyle = this.elementPosition.left - tooltipWidth - this.tooltipOffset;
163
+ topStyle = (this.elementPosition.top + scrollY) + elementHeight / 2 - tooltipHeight / 2;
164
+ break;
165
+ case 'left-top':
166
+ leftStyle = this.elementPosition.left - tooltipWidth - this.tooltipOffset;
167
+ topStyle = (this.elementPosition.top + scrollY + elementHeight / 2) - (tooltipHeight * 0.1);
168
+ break;
169
+ case 'left-bottom':
170
+ leftStyle = this.elementPosition.left - tooltipWidth - this.tooltipOffset;
171
+ topStyle = (this.elementPosition.top + scrollY + elementHeight / 2) - (tooltipHeight * 0.9);
172
+ break;
173
+ case 'right':
174
+ leftStyle = this.elementPosition.left + elementWidth + this.tooltipOffset;
175
+ topStyle = (this.elementPosition.top + scrollY) + elementHeight / 2 - tooltipHeight / 2;
176
+ break;
177
+ case 'right-top':
178
+ leftStyle = this.elementPosition.left + elementWidth + this.tooltipOffset;
179
+ topStyle = (this.elementPosition.top + scrollY + elementHeight / 2) - (tooltipHeight * 0.1);
180
+ break;
181
+ case 'right-bottom':
182
+ leftStyle = this.elementPosition.left + elementWidth + this.tooltipOffset;
183
+ topStyle = (this.elementPosition.top + scrollY + elementHeight / 2) - (tooltipHeight * 0.9);
184
+ break;
185
+ default:
186
+ return false;
158
187
  }
159
188
 
160
189
  /* Is tooltip outside the visible area */