@progressio_resources/gravity-design-system 3.0.1 → 3.0.3

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 (40) hide show
  1. package/esm2022/lib/components/gravity-card-list/gravity-card-list.component.mjs +50 -0
  2. package/esm2022/lib/gravity-design-system.module.mjs +7 -2
  3. package/esm2022/lib/vendor/gravity-tooltip/gravity-tooltip.component.mjs +55 -21
  4. package/esm2022/public-api.mjs +2 -1
  5. package/fesm2022/progressio_resources-gravity-design-system.mjs +109 -23
  6. package/fesm2022/progressio_resources-gravity-design-system.mjs.map +1 -1
  7. package/lib/components/gravity-card-list/gravity-card-list.component.d.ts +16 -0
  8. package/lib/gravity-design-system.module.d.ts +47 -46
  9. package/package.json +1 -1
  10. package/public-api.d.ts +1 -0
  11. package/src/lib/assets/icon-set/gt-icon-deposit/gt-icon-deposit-lg-24.svg +10 -0
  12. package/src/lib/assets/icon-set/gt-icon-deposit/gt-icon-deposit-md-16.svg +10 -0
  13. package/src/lib/assets/icon-set/gt-icon-deposit/gt-icon-deposit-sm-12.svg +10 -0
  14. package/src/lib/assets/icon-set/gt-icon-deposit/gt-icon-deposit-xl-32.svg +10 -0
  15. package/src/lib/assets/icon-set/gt-icon-exchange-provider/gt-icon-exchange-provider-lg-24.svg +5 -0
  16. package/src/lib/assets/icon-set/gt-icon-exchange-provider/gt-icon-exchange-provider-md-16.svg +5 -0
  17. package/src/lib/assets/icon-set/gt-icon-exchange-provider/gt-icon-exchange-provider-sm-12.svg +5 -0
  18. package/src/lib/assets/icon-set/gt-icon-exchange-provider/gt-icon-exchange-provider-xl-32.svg +5 -0
  19. package/src/lib/assets/icon-set/gt-icon-new-tab/gt-icon-new-tab-lg-24.svg +3 -0
  20. package/src/lib/assets/icon-set/gt-icon-new-tab/gt-icon-new-tab-md-16.svg +3 -0
  21. package/src/lib/assets/icon-set/gt-icon-new-tab/gt-icon-new-tab-sm-12.svg +3 -0
  22. package/src/lib/assets/icon-set/gt-icon-new-tab/gt-icon-new-tab-xl-32.svg +3 -0
  23. package/src/lib/assets/icon-set/gt-icon-payout/gt-icon-payout-lg-24.svg +10 -0
  24. package/src/lib/assets/icon-set/gt-icon-payout/gt-icon-payout-md-16.svg +10 -0
  25. package/src/lib/assets/icon-set/gt-icon-payout/gt-icon-payout-sm-12.svg +10 -0
  26. package/src/lib/assets/icon-set/gt-icon-payout/gt-icon-payout-xl-32.svg +10 -0
  27. package/src/lib/assets/icon-set/gt-icon-switch/gt-icon-switch-lg-24.svg +10 -0
  28. package/src/lib/assets/icon-set/gt-icon-switch/gt-icon-switch-md-16.svg +10 -0
  29. package/src/lib/assets/icon-set/gt-icon-switch/gt-icon-switch-sm-12.svg +10 -0
  30. package/src/lib/assets/icon-set/gt-icon-switch/gt-icon-switch-xl-32.svg +10 -0
  31. package/src/lib/assets/icon-set/gt-icon-tool/gt-icon-tool-lg-24.svg +10 -0
  32. package/src/lib/assets/icon-set/gt-icon-tool/gt-icon-tool-md-16.svg +10 -0
  33. package/src/lib/assets/icon-set/gt-icon-tool/gt-icon-tool-sm-12.svg +10 -0
  34. package/src/lib/assets/icon-set/gt-icon-tool/gt-icon-tool-xl-32.svg +10 -0
  35. package/src/lib/assets/json/icons.json +96 -0
  36. package/src/lib/styles/components/_link.scss +9 -1
  37. package/src/lib/styles/foundations/colors/themes/_hero.theme.scss +6 -6
  38. package/src/lib/styles/foundations/colors/tokens/_hero.tokens.scss +2 -2
  39. package/src/lib/vendor/gravity-tooltip/gravity-tooltip.component.sass +56 -0
  40. package/src/lib/vendor/gravity-tooltip/gravity-tooltip.component.ts +52 -23
@@ -304,6 +304,22 @@
304
304
  "iconName": "gt-icon-copy-xl-32",
305
305
  "iconPath": "/assets/gravity/icon-set/gt-icon-copy/gt-icon-copy-xl-32.svg"
306
306
  },
307
+ {
308
+ "iconName": "gt-icon-deposit-lg-24",
309
+ "iconPath": "/assets/gravity/icon-set/gt-icon-deposit/gt-icon-deposit-lg-24.svg"
310
+ },
311
+ {
312
+ "iconName": "gt-icon-deposit-md-16",
313
+ "iconPath": "/assets/gravity/icon-set/gt-icon-deposit/gt-icon-deposit-md-16.svg"
314
+ },
315
+ {
316
+ "iconName": "gt-icon-deposit-sm-12",
317
+ "iconPath": "/assets/gravity/icon-set/gt-icon-deposit/gt-icon-deposit-sm-12.svg"
318
+ },
319
+ {
320
+ "iconName": "gt-icon-deposit-xl-32",
321
+ "iconPath": "/assets/gravity/icon-set/gt-icon-deposit/gt-icon-deposit-xl-32.svg"
322
+ },
307
323
  {
308
324
  "iconName": "gt-icon-download-lg-24",
309
325
  "iconPath": "/assets/gravity/icon-set/gt-icon-download/gt-icon-download-lg-24.svg"
@@ -320,6 +336,22 @@
320
336
  "iconName": "gt-icon-download-xl-32",
321
337
  "iconPath": "/assets/gravity/icon-set/gt-icon-download/gt-icon-download-xl-32.svg"
322
338
  },
339
+ {
340
+ "iconName": "gt-icon-exchange-provider-lg-24",
341
+ "iconPath": "/assets/gravity/icon-set/gt-icon-exchange-provider/gt-icon-exchange-provider-lg-24.svg"
342
+ },
343
+ {
344
+ "iconName": "gt-icon-exchange-provider-md-16",
345
+ "iconPath": "/assets/gravity/icon-set/gt-icon-exchange-provider/gt-icon-exchange-provider-md-16.svg"
346
+ },
347
+ {
348
+ "iconName": "gt-icon-exchange-provider-sm-12",
349
+ "iconPath": "/assets/gravity/icon-set/gt-icon-exchange-provider/gt-icon-exchange-provider-sm-12.svg"
350
+ },
351
+ {
352
+ "iconName": "gt-icon-exchange-provider-xl-32",
353
+ "iconPath": "/assets/gravity/icon-set/gt-icon-exchange-provider/gt-icon-exchange-provider-xl-32.svg"
354
+ },
323
355
  {
324
356
  "iconName": "gt-icon-eye-closed-lg-24",
325
357
  "iconPath": "/assets/gravity/icon-set/gt-icon-eye-closed/gt-icon-eye-closed-lg-24.svg"
@@ -496,6 +528,22 @@
496
528
  "iconName": "gt-icon-more-options-xl-32",
497
529
  "iconPath": "/assets/gravity/icon-set/gt-icon-more-options/gt-icon-more-options-xl-32.svg"
498
530
  },
531
+ {
532
+ "iconName": "gt-icon-new-tab-lg-24",
533
+ "iconPath": "/assets/gravity/icon-set/gt-icon-new-tab/gt-icon-new-tab-lg-24.svg"
534
+ },
535
+ {
536
+ "iconName": "gt-icon-new-tab-md-16",
537
+ "iconPath": "/assets/gravity/icon-set/gt-icon-new-tab/gt-icon-new-tab-md-16.svg"
538
+ },
539
+ {
540
+ "iconName": "gt-icon-new-tab-sm-12",
541
+ "iconPath": "/assets/gravity/icon-set/gt-icon-new-tab/gt-icon-new-tab-sm-12.svg"
542
+ },
543
+ {
544
+ "iconName": "gt-icon-new-tab-xl-32",
545
+ "iconPath": "/assets/gravity/icon-set/gt-icon-new-tab/gt-icon-new-tab-xl-32.svg"
546
+ },
499
547
  {
500
548
  "iconName": "gt-icon-news-lg-24",
501
549
  "iconPath": "/assets/gravity/icon-set/gt-icon-news/gt-icon-news-lg-24.svg"
@@ -512,6 +560,22 @@
512
560
  "iconName": "gt-icon-news-xl-32",
513
561
  "iconPath": "/assets/gravity/icon-set/gt-icon-news/gt-icon-news-xl-32.svg"
514
562
  },
563
+ {
564
+ "iconName": "gt-icon-payout-lg-24",
565
+ "iconPath": "/assets/gravity/icon-set/gt-icon-payout/gt-icon-payout-lg-24.svg"
566
+ },
567
+ {
568
+ "iconName": "gt-icon-payout-md-16",
569
+ "iconPath": "/assets/gravity/icon-set/gt-icon-payout/gt-icon-payout-md-16.svg"
570
+ },
571
+ {
572
+ "iconName": "gt-icon-payout-sm-12",
573
+ "iconPath": "/assets/gravity/icon-set/gt-icon-payout/gt-icon-payout-sm-12.svg"
574
+ },
575
+ {
576
+ "iconName": "gt-icon-payout-xl-32",
577
+ "iconPath": "/assets/gravity/icon-set/gt-icon-payout/gt-icon-payout-xl-32.svg"
578
+ },
515
579
  {
516
580
  "iconName": "gt-icon-plus-lg-24",
517
581
  "iconPath": "/assets/gravity/icon-set/gt-icon-plus/gt-icon-plus-lg-24.svg"
@@ -704,6 +768,38 @@
704
768
  "iconName": "gt-icon-swaps-arrow-right-xl-32",
705
769
  "iconPath": "/assets/gravity/icon-set/gt-icon-swaps-arrow-right/gt-icon-swaps-arrow-right-xl-32.svg"
706
770
  },
771
+ {
772
+ "iconName": "gt-icon-switch-lg-24",
773
+ "iconPath": "/assets/gravity/icon-set/gt-icon-switch/gt-icon-switch-lg-24.svg"
774
+ },
775
+ {
776
+ "iconName": "gt-icon-switch-md-16",
777
+ "iconPath": "/assets/gravity/icon-set/gt-icon-switch/gt-icon-switch-md-16.svg"
778
+ },
779
+ {
780
+ "iconName": "gt-icon-switch-sm-12",
781
+ "iconPath": "/assets/gravity/icon-set/gt-icon-switch/gt-icon-switch-sm-12.svg"
782
+ },
783
+ {
784
+ "iconName": "gt-icon-switch-xl-32",
785
+ "iconPath": "/assets/gravity/icon-set/gt-icon-switch/gt-icon-switch-xl-32.svg"
786
+ },
787
+ {
788
+ "iconName": "gt-icon-tool-lg-24",
789
+ "iconPath": "/assets/gravity/icon-set/gt-icon-tool/gt-icon-tool-lg-24.svg"
790
+ },
791
+ {
792
+ "iconName": "gt-icon-tool-md-16",
793
+ "iconPath": "/assets/gravity/icon-set/gt-icon-tool/gt-icon-tool-md-16.svg"
794
+ },
795
+ {
796
+ "iconName": "gt-icon-tool-sm-12",
797
+ "iconPath": "/assets/gravity/icon-set/gt-icon-tool/gt-icon-tool-sm-12.svg"
798
+ },
799
+ {
800
+ "iconName": "gt-icon-tool-xl-32",
801
+ "iconPath": "/assets/gravity/icon-set/gt-icon-tool/gt-icon-tool-xl-32.svg"
802
+ },
707
803
  {
708
804
  "iconName": "gt-icon-trash-lg-24",
709
805
  "iconPath": "/assets/gravity/icon-set/gt-icon-trash/gt-icon-trash-lg-24.svg"
@@ -3,6 +3,7 @@
3
3
  cursor: pointer;
4
4
  text-decoration: underline;
5
5
  text-decoration-color: var(--link-underline-color);
6
+ padding: 2px 4px;
6
7
 
7
8
  &:not([disabled]) {
8
9
  --link-color: var(--link-active-primary);
@@ -14,7 +15,14 @@
14
15
  }
15
16
 
16
17
  &:active {
17
- --link-color: var(--link-pressed-primary);
18
+ background-color: transparent;
19
+ border: 0.5px solid var(--link-active-primary);
20
+ border-radius: 2px;
21
+ }
22
+
23
+ &:visited{
24
+ --link-color: var(--link-visited-primary);
25
+ --link-underline-color: var(--link-visited-primary);
18
26
  }
19
27
  }
20
28
 
@@ -225,8 +225,8 @@ $on-bg-table-header-secondary-dark: $n900;
225
225
  $bg-table-header-secondary-dark: $n400;
226
226
 
227
227
  // tooltip
228
- $on-bg-tooltip-primary-light: $n400;
229
- $bg-tooltip-primary-light: $n800;
228
+ $on-bg-tooltip-primary-light: $n800;
229
+ $bg-tooltip-primary-light: $n400;
230
230
  $on-bg-tooltip-primary-dark: $n900;
231
231
  $bg-tooltip-primary-dark: $n400;
232
232
 
@@ -394,13 +394,13 @@ $bg-icon-dialog-primary-dark: $n800;
394
394
  $link-active-primary-light: $b400;
395
395
  $link-hover-primary-light: $b400;
396
396
  $bg-link-hover-primary-light: $b800;
397
- $link-disabled-primary-light: $n700;
398
- $link-pressed-primary-light: $b200;
397
+ $link-disabled-primary-light: $n600;
398
+ $link-visited-primary-light: $b200;
399
399
  $link-active-primary-dark: $b700;
400
400
  $link-hover-primary-dark: $b700;
401
401
  $bg-link-hover-primary-dark: $n300;
402
- $link-disabled-primary-dark: $n300;
403
- $link-pressed-primary-dark: $b600;
402
+ $link-disabled-primary-dark: $n500;
403
+ $link-visited-primary-dark: $n900;
404
404
 
405
405
  // menu
406
406
  $divider-menu-active-primary-light: $n800;
@@ -227,7 +227,7 @@
227
227
  --link-hover-primary: #{$link-hover-primary-light};
228
228
  --bg-link-hover-primary: #{$bg-link-hover-primary-light};
229
229
  --link-disabled-primary: #{$link-disabled-primary-light};
230
- --link-pressed-primary: #{$link-pressed-primary-light};
230
+ --link-visited-primary: #{$link-visited-primary-light};
231
231
 
232
232
  // menu
233
233
  --divider-menu-active-primary: #{$divider-menu-active-primary-light};
@@ -552,7 +552,7 @@
552
552
  --link-hover-primary: #{$link-hover-primary-dark};
553
553
  --bg-link-hover-primary: #{$bg-link-hover-primary-dark};
554
554
  --link-disabled-primary: #{$link-disabled-primary-dark};
555
- --link-pressed-primary: #{$link-pressed-primary-dark};
555
+ --link-visited-primary: #{$link-visited-primary-dark};
556
556
 
557
557
  // menu
558
558
  --divider-menu-active-primary: #{$divider-menu-primary-dark};
@@ -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 */