@agorapulse/ui-theme 22.0.15 → 22.0.16-beta.2

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.
@@ -1,26 +1,12 @@
1
+ // The tooltip's surface: the `floating` engine places it, draws its tip and attaches it into a CDK pane.
1
2
  .ap-tooltip {
2
- --ap-arrow-width: 16px;
3
- --ap-arrow-height: 8px;
4
- --ap-arrow-offset: 10px;
5
- --ap-tooltip-z-index: 9999999;
3
+ // A component host is `inline`, and `width: fit-content` and the padding need a block.
4
+ display: block;
6
5
 
7
6
  width: fit-content;
8
7
  max-width: 350px;
9
8
  background: var(--comp-tooltip-text-color-main-default-bg);
10
9
  border-radius: var(--ref-border-radius-md);
11
- // Viewport-relative, so a positioned host body (e.g. an Intercom banner margin) can't shift it.
12
- position: fixed;
13
- z-index: var(--ap-tooltip-z-index);
14
- animation: fadeIn var(--ref-animation-short) ease-in-out;
15
-
16
- @keyframes fadeIn {
17
- 0% {
18
- opacity: 0;
19
- }
20
- 100% {
21
- opacity: 1;
22
- }
23
- }
24
10
 
25
11
  &.ap-predefined-tooltip {
26
12
  max-width: 256px;
@@ -30,21 +16,13 @@
30
16
  background: var(--ref-color-white);
31
17
 
32
18
  /* Shadow/Low (default) */
33
- box-shadow: 0 4px 25px -2px rgba(52, 69, 99, 0.15), 0 4px 6px -2px rgba(52, 69, 99, 0.15);
19
+ box-shadow: var(--sys-elevation-floating);
34
20
 
35
21
  .ap-content-container.ap-content-predefined-container {
36
22
  padding: 0;
37
-
38
- .ap-tooltip-arrow {
39
- color: var(--ref-color-white);
40
- }
41
23
  }
42
24
  }
43
25
 
44
- &.ap-tooltip-click-trigger {
45
- z-index: calc(var(--ap-tooltip-z-index) + 1); // has to be above the z-index of the .ap-tooltip class above
46
- }
47
-
48
26
  .ap-content-container {
49
27
  padding: var(--ref-spacing-xxs) var(--ref-spacing-xs);
50
28
  border-radius: var(--ref-border-radius-md);
@@ -56,108 +34,41 @@
56
34
  font-weight: var(--comp-tooltip-text-style-weight);
57
35
  line-height: var(--comp-tooltip-text-style-line-height);
58
36
  }
59
-
60
- .ap-tooltip-arrow {
61
- color: var(--ref-color-grey-100);
62
- position: absolute;
63
- z-index: 10000;
64
- width: var(--ap-arrow-width);
65
- height: var(--ap-arrow-height);
66
- display: block;
67
-
68
- path {
69
- fill: currentColor;
70
- }
71
- }
72
- }
73
- &.ap-tooltip-top,
74
- &.ap-tooltip-bottom {
75
- .ap-tooltip-arrow {
76
- margin: auto;
77
- right: 0;
78
- left: 0;
79
- }
80
37
  }
81
38
 
82
- &.ap-tooltip-top,
83
- &.ap-tooltip-bottom,
84
- &.ap-tooltip-top-left,
85
- &.ap-tooltip-top-right,
86
- &.ap-tooltip-bottom-left,
87
- &.ap-tooltip-bottom-right {
88
- .ap-tooltip-arrow {
89
- transform: translateY(7px) rotate(180deg);
90
- }
91
- }
39
+ &.ap-tooltip-custom-template {
40
+ background-color: var(--ref-color-white);
92
41
 
93
- &.ap-tooltip-top-left,
94
- &.ap-tooltip-bottom-left {
95
- .ap-tooltip-arrow {
96
- left: var(--ap-arrow-offset);
97
- }
98
- }
42
+ // No-arrow case only: with an arrow, `.ap-tooltip-pane.custom-template` below takes the shadow over.
43
+ filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.08));
99
44
 
100
- &.ap-tooltip-top-right,
101
- &.ap-tooltip-bottom-right {
102
- .ap-tooltip-arrow {
103
- right: var(--ap-arrow-offset);
45
+ .ap-tooltip-text {
46
+ color: var(--ref-color-grey-100);
104
47
  }
105
48
  }
49
+ }
106
50
 
107
- &.ap-tooltip-bottom,
108
- &.ap-tooltip-bottom-right,
109
- &.ap-tooltip-bottom-left {
110
- .ap-tooltip-arrow {
111
- top: 0;
112
- rotate: 180deg;
113
- }
114
- }
51
+ // The pane carries the shadow, one per surface: `drop-shadow` has to wrap panel and tip as one shape.
52
+ // It carries the fade too: the tip is the pane's `::before`, which the panel's opacity never reaches.
53
+ .ap-tooltip-pane {
54
+ --ap-arrow-filter: none;
115
55
 
116
- &.ap-tooltip-top,
117
- &.ap-tooltip-top-right,
118
- &.ap-tooltip-top-left {
119
- .ap-tooltip-arrow {
120
- bottom: 0;
121
- }
122
- }
56
+ animation: fadeIn var(--ref-animation-short) ease-in-out;
123
57
 
124
- &.ap-tooltip-right {
125
- .ap-tooltip-arrow {
126
- top: 0;
127
- left: 0;
128
- transform: scale(-1) translateY(-11px) translateX(calc((var(--ap-tooltip-height) / 2 - 4px) * -1));
129
- rotate: 90deg;
58
+ @keyframes fadeIn {
59
+ 0% {
60
+ opacity: 0;
130
61
  }
131
- }
132
-
133
- &.ap-tooltip-left {
134
- .ap-tooltip-arrow {
135
- top: 0;
136
- right: 0;
137
- rotate: 90deg;
138
- transform: translateY(-11px) translateX(calc((var(--ap-tooltip-height) / 2 - 4px)));
62
+ 100% {
63
+ opacity: 1;
139
64
  }
140
65
  }
141
66
 
142
- &.ap-tooltip-custom-template {
143
- background-color: var(--ref-color-white);
144
- filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.08));
145
-
146
- .ap-tooltip-text {
147
- color: var(--ref-color-grey-100);
148
- }
149
-
150
- .ap-tooltip-arrow {
151
- color: var(--ref-color-white);
152
- position: absolute;
153
- z-index: 10000;
154
- width: var(--ap-arrow-width);
155
- height: var(--ap-arrow-height);
156
- display: block;
67
+ &.custom-template {
68
+ --ap-arrow-filter: drop-shadow(0 0 10px rgba(0, 0, 0, 0.08));
69
+ }
157
70
 
158
- path {
159
- fill: currentColor;
160
- }
161
- }
71
+ &.predefined {
72
+ --ap-arrow-filter: var(--sys-elevation-floating-filter);
162
73
  }
163
74
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agorapulse/ui-theme",
3
- "version": "22.0.15",
3
+ "version": "22.0.16-beta.2",
4
4
  "description": "Agorapulse UI Theme Library",
5
5
  "repository": {
6
6
  "type": "git",
Binary file