@ship-ui/core 0.17.15 → 0.17.16

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.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ship-ui/core",
3
3
  "license": "MIT",
4
- "version": "0.17.15",
4
+ "version": "0.17.16",
5
5
  "peerDependencies": {
6
6
  "@angular/common": ">=20",
7
7
  "@angular/core": ">=20",
@@ -167,7 +167,7 @@ $shipMenu: true !default;
167
167
  justify-content: flex-start;
168
168
  align-items: center;
169
169
  text-align: left;
170
- height: min-content;
170
+ height: auto;
171
171
  margin: p2r(0 8);
172
172
  padding: p2r(4 8);
173
173
  gap: p2r(0 8);
@@ -181,6 +181,15 @@ $shipMenu: true !default;
181
181
  transition: transform 125ms linear;
182
182
  transform: scale(1);
183
183
 
184
+ &:before {
185
+ content: '';
186
+
187
+ min-height: p2r(24);
188
+ display: inline-block;
189
+ width: 0;
190
+ margin-right: p2r(-8);
191
+ }
192
+
184
193
  &:active {
185
194
  transform: scale(0.98);
186
195
  }
@@ -11,6 +11,7 @@ $shipTooltip: true !default;
11
11
  @if $shipTooltip == true {
12
12
  .tooltip {
13
13
  position: relative;
14
+ display: flex;
14
15
  pointer-events: initial !important;
15
16
 
16
17
  &:after {
@@ -55,7 +56,9 @@ $shipTooltip: true !default;
55
56
  z-index: 1;
56
57
 
57
58
  @supports (anchor-name: --anchor) {
58
- transform: translateY(0) scaleY(1) scaleX(1);
59
+ .tooltip-content {
60
+ transform: translateY(0) scaleY(1) scaleX(1);
61
+ }
59
62
  }
60
63
  }
61
64
  }
@@ -66,29 +69,27 @@ $shipTooltip: true !default;
66
69
  --tt-c: var(--base-12);
67
70
  --tt-mh: #{p2r(136)};
68
71
  --tt-mw: #{p2r(280)};
72
+ --tt-translate-y: 50%;
69
73
 
70
74
  position: fixed;
71
- padding: p2r(0 0 12);
72
-
73
75
  font: var(--paragraph-30);
74
76
  width: max-content;
75
77
  overflow: visible;
76
78
  box-shadow: none;
77
- margin: initial;
78
79
  background: transparent;
79
80
  border: 0;
80
81
 
82
+ padding: 0;
83
+ margin: 0;
84
+ margin-block-end: p2r(12);
85
+
81
86
  @supports (anchor-name: --anchor) {
82
- transform: translateY(50%) scaleY(0) scaleX(0.8);
83
- transition: transform 125ms linear;
84
87
  inset: unset;
85
88
  justify-self: anchor-center;
86
89
  bottom: anchor(top);
87
90
  position: fixed;
88
- position-try-order:
89
- flip-block,
90
- flip-inline,
91
- flip-block flip-inline;
91
+
92
+ position-try-order: normal;
92
93
  position-try-fallbacks:
93
94
  flip-block,
94
95
  flip-inline,
@@ -98,7 +99,8 @@ $shipTooltip: true !default;
98
99
  &:before {
99
100
  content: '';
100
101
  position: absolute;
101
- bottom: 0%;
102
+ bottom: p2r(-12);
103
+ top: auto;
102
104
  left: 50%;
103
105
  z-index: 1;
104
106
  transform: translateX(-50%);
@@ -112,13 +114,19 @@ $shipTooltip: true !default;
112
114
  }
113
115
 
114
116
  &.below {
115
- padding: p2r(12 0 0);
117
+ --tt-translate-y: -50%;
118
+
116
119
  &:before {
117
120
  border-top-color: transparent;
118
121
  border-bottom-color: var(--tt-bg);
119
- top: 0%;
122
+ top: p2r(-12);
120
123
  bottom: auto;
121
124
  }
125
+
126
+ @supports not (anchor-name: --anchor) {
127
+ margin-block-start: p2r(12);
128
+ margin-block-end: 0;
129
+ }
122
130
  }
123
131
 
124
132
  .tooltip-content {
@@ -130,46 +138,14 @@ $shipTooltip: true !default;
130
138
  max-height: var(--tt-mh);
131
139
  max-width: var(--tt-mw);
132
140
  overflow: auto;
133
- // background: none;
134
141
  background: var(--tt-bg);
135
142
  border-radius: var(--shape-2);
136
143
  box-shadow: var(--box-shadow-20);
137
- }
138
144
 
139
- // @position-fallback --dropdown-flip-and-slide {
140
- // /* Attempt 1: Position below and align to the start (left) of the trigger */
141
- // @try {
142
- // top: calc(anchor(bottom) + 8px); /* 8px gap */
143
- // left: anchor(left);
144
- // }
145
- // /* Attempt 2: Position above and align to the start (left) of the trigger */
146
- // @try {
147
- // bottom: calc(anchor(top) + 8px); /* 8px gap */
148
- // left: anchor(left);
149
- // }
150
- // /* Attempt 3: Position below and align to the end (right) of the trigger */
151
- // @try {
152
- // top: calc(anchor(bottom) + 8px);
153
- // right: anchor(right);
154
- // }
155
- // /* Attempt 4: Position above and align to the end (right) of the trigger */
156
- // @try {
157
- // bottom: calc(anchor(top) + 8px);
158
- // right: anchor(right);
159
- // }
160
- // /* Attempt 5: (More advanced) If it's too wide, try to align center, below */
161
- // @try {
162
- // top: calc(anchor(bottom) + 8px);
163
- // left: anchor(center);
164
- // /* This might need more constraints or a width calculation if it's wider than anchor */
165
- // transform: translateX(-50%); /* Center it based on its own width */
166
- // }
167
- // /* Attempt 6: (More advanced) If it's too wide, try to align center, above */
168
- // @try {
169
- // bottom: calc(anchor(top) + 8px);
170
- // left: anchor(center);
171
- // transform: translateX(-50%);
172
- // }
173
- // }
145
+ @supports (anchor-name: --anchor) {
146
+ transform: translateY(var(--tt-translate-y)) scaleY(0) scaleX(0.8);
147
+ transition: transform 125ms linear;
148
+ }
149
+ }
174
150
  }
175
151
  }