@nysds/nys-tooltip 1.10.1 → 1.11.0
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/dist/nys-tooltip.js +141 -170
- package/dist/nys-tooltip.js.map +1 -1
- package/package.json +2 -5
package/dist/nys-tooltip.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { css as
|
|
1
|
+
import { css as U, LitElement as R, html as b } from "lit";
|
|
2
2
|
/*!
|
|
3
3
|
* ▒█▄░▒█ ▒█░░▒█ ▒█▀▀▀█ ▒█▀▀▄ ▒█▀▀▀█
|
|
4
4
|
* ▒█▒█▒█ ▒█▄▄▄█ ░▀▀▀▄▄ ▒█░▒█ ░▀▀▀▄▄
|
|
@@ -14,18 +14,18 @@ import { css as O, LitElement as A, html as E } from "lit";
|
|
|
14
14
|
* Copyright 2019 Google LLC
|
|
15
15
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
16
16
|
*/
|
|
17
|
-
const
|
|
18
|
-
let
|
|
17
|
+
const _ = globalThis, m = _.ShadowRoot && (_.ShadyCSS === void 0 || _.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, x = Symbol(), S = /* @__PURE__ */ new WeakMap();
|
|
18
|
+
let O = class {
|
|
19
19
|
constructor(t, e, o) {
|
|
20
|
-
if (this._$cssResult$ = !0, o !==
|
|
20
|
+
if (this._$cssResult$ = !0, o !== x) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
21
21
|
this.cssText = t, this.t = e;
|
|
22
22
|
}
|
|
23
23
|
get styleSheet() {
|
|
24
24
|
let t = this.o;
|
|
25
25
|
const e = this.t;
|
|
26
|
-
if (
|
|
26
|
+
if (m && t === void 0) {
|
|
27
27
|
const o = e !== void 0 && e.length === 1;
|
|
28
|
-
o && (t =
|
|
28
|
+
o && (t = S.get(e)), t === void 0 && ((this.o = t = new CSSStyleSheet()).replaceSync(this.cssText), o && S.set(e, t));
|
|
29
29
|
}
|
|
30
30
|
return t;
|
|
31
31
|
}
|
|
@@ -33,26 +33,26 @@ let L = class {
|
|
|
33
33
|
return this.cssText;
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
36
|
+
const A = (s) => new O(typeof s == "string" ? s : s + "", void 0, x), L = (s, t) => {
|
|
37
|
+
if (m) s.adoptedStyleSheets = t.map(((e) => e instanceof CSSStyleSheet ? e : e.styleSheet));
|
|
38
38
|
else for (const e of t) {
|
|
39
|
-
const o = document.createElement("style"), i =
|
|
39
|
+
const o = document.createElement("style"), i = _.litNonce;
|
|
40
40
|
i !== void 0 && o.setAttribute("nonce", i), o.textContent = e.cssText, s.appendChild(o);
|
|
41
41
|
}
|
|
42
|
-
},
|
|
42
|
+
}, E = m ? (s) => s : (s) => s instanceof CSSStyleSheet ? ((t) => {
|
|
43
43
|
let e = "";
|
|
44
44
|
for (const o of t.cssRules) e += o.cssText;
|
|
45
|
-
return
|
|
45
|
+
return A(e);
|
|
46
46
|
})(s) : s;
|
|
47
47
|
/**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright 2017 Google LLC
|
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
51
|
*/
|
|
52
|
-
const { is:
|
|
52
|
+
const { is: T, defineProperty: k, getOwnPropertyDescriptor: M, getOwnPropertyNames: z, getOwnPropertySymbols: B, getPrototypeOf: q } = Object, g = globalThis, P = g.trustedTypes, j = P ? P.emptyScript : "", I = g.reactiveElementPolyfillSupport, u = (s, t) => s, y = { toAttribute(s, t) {
|
|
53
53
|
switch (t) {
|
|
54
54
|
case Boolean:
|
|
55
|
-
s = s ?
|
|
55
|
+
s = s ? j : null;
|
|
56
56
|
break;
|
|
57
57
|
case Object:
|
|
58
58
|
case Array:
|
|
@@ -77,46 +77,44 @@ const { is: z, defineProperty: B, getOwnPropertyDescriptor: M, getOwnPropertyNam
|
|
|
77
77
|
}
|
|
78
78
|
}
|
|
79
79
|
return e;
|
|
80
|
-
} },
|
|
81
|
-
Symbol.metadata
|
|
82
|
-
class
|
|
80
|
+
} }, w = (s, t) => !T(s, t), $ = { attribute: !0, type: String, converter: y, reflect: !1, useDefault: !1, hasChanged: w };
|
|
81
|
+
Symbol.metadata ??= Symbol("metadata"), g.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
82
|
+
class f extends HTMLElement {
|
|
83
83
|
static addInitializer(t) {
|
|
84
|
-
this._$Ei(), (this.l
|
|
84
|
+
this._$Ei(), (this.l ??= []).push(t);
|
|
85
85
|
}
|
|
86
86
|
static get observedAttributes() {
|
|
87
87
|
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
88
88
|
}
|
|
89
|
-
static createProperty(t, e =
|
|
90
|
-
if (e.state && (e.attribute = !1), this._$Ei(), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
89
|
+
static createProperty(t, e = $) {
|
|
90
|
+
if (e.state && (e.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(t) && ((e = Object.create(e)).wrapped = !0), this.elementProperties.set(t, e), !e.noAccessor) {
|
|
91
91
|
const o = Symbol(), i = this.getPropertyDescriptor(t, o, e);
|
|
92
|
-
i !== void 0 &&
|
|
92
|
+
i !== void 0 && k(this.prototype, t, i);
|
|
93
93
|
}
|
|
94
94
|
}
|
|
95
95
|
static getPropertyDescriptor(t, e, o) {
|
|
96
|
-
const { get: i, set:
|
|
96
|
+
const { get: i, set: r } = M(this.prototype, t) ?? { get() {
|
|
97
97
|
return this[e];
|
|
98
|
-
}, set(
|
|
99
|
-
this[e] =
|
|
98
|
+
}, set(n) {
|
|
99
|
+
this[e] = n;
|
|
100
100
|
} };
|
|
101
|
-
return { get() {
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
const a = i == null ? void 0 : i.call(this);
|
|
105
|
-
n.call(this, r), this.requestUpdate(t, a, o);
|
|
101
|
+
return { get: i, set(n) {
|
|
102
|
+
const a = i?.call(this);
|
|
103
|
+
r?.call(this, n), this.requestUpdate(t, a, o);
|
|
106
104
|
}, configurable: !0, enumerable: !0 };
|
|
107
105
|
}
|
|
108
106
|
static getPropertyOptions(t) {
|
|
109
|
-
return this.elementProperties.get(t) ??
|
|
107
|
+
return this.elementProperties.get(t) ?? $;
|
|
110
108
|
}
|
|
111
109
|
static _$Ei() {
|
|
112
|
-
if (this.hasOwnProperty(
|
|
113
|
-
const t =
|
|
110
|
+
if (this.hasOwnProperty(u("elementProperties"))) return;
|
|
111
|
+
const t = q(this);
|
|
114
112
|
t.finalize(), t.l !== void 0 && (this.l = [...t.l]), this.elementProperties = new Map(t.elementProperties);
|
|
115
113
|
}
|
|
116
114
|
static finalize() {
|
|
117
|
-
if (this.hasOwnProperty(
|
|
118
|
-
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(
|
|
119
|
-
const e = this.properties, o = [...
|
|
115
|
+
if (this.hasOwnProperty(u("finalized"))) return;
|
|
116
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(u("properties"))) {
|
|
117
|
+
const e = this.properties, o = [...z(e), ...B(e)];
|
|
120
118
|
for (const i of o) this.createProperty(i, e[i]);
|
|
121
119
|
}
|
|
122
120
|
const t = this[Symbol.metadata];
|
|
@@ -135,8 +133,8 @@ class y extends HTMLElement {
|
|
|
135
133
|
const e = [];
|
|
136
134
|
if (Array.isArray(t)) {
|
|
137
135
|
const o = new Set(t.flat(1 / 0).reverse());
|
|
138
|
-
for (const i of o) e.unshift(
|
|
139
|
-
} else t !== void 0 && e.push(
|
|
136
|
+
for (const i of o) e.unshift(E(i));
|
|
137
|
+
} else t !== void 0 && e.push(E(t));
|
|
140
138
|
return e;
|
|
141
139
|
}
|
|
142
140
|
static _$Eu(t, e) {
|
|
@@ -147,16 +145,13 @@ class y extends HTMLElement {
|
|
|
147
145
|
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
148
146
|
}
|
|
149
147
|
_$Ev() {
|
|
150
|
-
|
|
151
|
-
this._$ES = new Promise((e) => this.enableUpdating = e), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), (t = this.constructor.l) == null || t.forEach((e) => e(this));
|
|
148
|
+
this._$ES = new Promise(((t) => this.enableUpdating = t)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((t) => t(this)));
|
|
152
149
|
}
|
|
153
150
|
addController(t) {
|
|
154
|
-
|
|
155
|
-
(this._$EO ?? (this._$EO = /* @__PURE__ */ new Set())).add(t), this.renderRoot !== void 0 && this.isConnected && ((e = t.hostConnected) == null || e.call(t));
|
|
151
|
+
(this._$EO ??= /* @__PURE__ */ new Set()).add(t), this.renderRoot !== void 0 && this.isConnected && t.hostConnected?.();
|
|
156
152
|
}
|
|
157
153
|
removeController(t) {
|
|
158
|
-
|
|
159
|
-
(e = this._$EO) == null || e.delete(t);
|
|
154
|
+
this._$EO?.delete(t);
|
|
160
155
|
}
|
|
161
156
|
_$E_() {
|
|
162
157
|
const t = /* @__PURE__ */ new Map(), e = this.constructor.elementProperties;
|
|
@@ -165,54 +160,47 @@ class y extends HTMLElement {
|
|
|
165
160
|
}
|
|
166
161
|
createRenderRoot() {
|
|
167
162
|
const t = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
168
|
-
return
|
|
163
|
+
return L(t, this.constructor.elementStyles), t;
|
|
169
164
|
}
|
|
170
165
|
connectedCallback() {
|
|
171
|
-
|
|
172
|
-
this.renderRoot ?? (this.renderRoot = this.createRenderRoot()), this.enableUpdating(!0), (t = this._$EO) == null || t.forEach((e) => {
|
|
173
|
-
var o;
|
|
174
|
-
return (o = e.hostConnected) == null ? void 0 : o.call(e);
|
|
175
|
-
});
|
|
166
|
+
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((t) => t.hostConnected?.()));
|
|
176
167
|
}
|
|
177
168
|
enableUpdating(t) {
|
|
178
169
|
}
|
|
179
170
|
disconnectedCallback() {
|
|
180
|
-
|
|
181
|
-
(t = this._$EO) == null || t.forEach((e) => {
|
|
182
|
-
var o;
|
|
183
|
-
return (o = e.hostDisconnected) == null ? void 0 : o.call(e);
|
|
184
|
-
});
|
|
171
|
+
this._$EO?.forEach(((t) => t.hostDisconnected?.()));
|
|
185
172
|
}
|
|
186
173
|
attributeChangedCallback(t, e, o) {
|
|
187
174
|
this._$AK(t, o);
|
|
188
175
|
}
|
|
189
|
-
_$
|
|
190
|
-
var n;
|
|
176
|
+
_$ET(t, e) {
|
|
191
177
|
const o = this.constructor.elementProperties.get(t), i = this.constructor._$Eu(t, o);
|
|
192
178
|
if (i !== void 0 && o.reflect === !0) {
|
|
193
|
-
const r = (
|
|
179
|
+
const r = (o.converter?.toAttribute !== void 0 ? o.converter : y).toAttribute(e, o.type);
|
|
194
180
|
this._$Em = t, r == null ? this.removeAttribute(i) : this.setAttribute(i, r), this._$Em = null;
|
|
195
181
|
}
|
|
196
182
|
}
|
|
197
183
|
_$AK(t, e) {
|
|
198
|
-
var n;
|
|
199
184
|
const o = this.constructor, i = o._$Eh.get(t);
|
|
200
185
|
if (i !== void 0 && this._$Em !== i) {
|
|
201
|
-
const r = o.getPropertyOptions(i),
|
|
202
|
-
this._$Em = i
|
|
186
|
+
const r = o.getPropertyOptions(i), n = typeof r.converter == "function" ? { fromAttribute: r.converter } : r.converter?.fromAttribute !== void 0 ? r.converter : y;
|
|
187
|
+
this._$Em = i;
|
|
188
|
+
const a = n.fromAttribute(e, r.type);
|
|
189
|
+
this[i] = a ?? this._$Ej?.get(i) ?? a, this._$Em = null;
|
|
203
190
|
}
|
|
204
191
|
}
|
|
205
192
|
requestUpdate(t, e, o) {
|
|
206
193
|
if (t !== void 0) {
|
|
207
|
-
|
|
208
|
-
|
|
194
|
+
const i = this.constructor, r = this[t];
|
|
195
|
+
if (o ??= i.getPropertyOptions(t), !((o.hasChanged ?? w)(r, e) || o.useDefault && o.reflect && r === this._$Ej?.get(t) && !this.hasAttribute(i._$Eu(t, o)))) return;
|
|
196
|
+
this.C(t, e, o);
|
|
209
197
|
}
|
|
210
|
-
this.isUpdatePending === !1 && (this._$ES = this._$
|
|
198
|
+
this.isUpdatePending === !1 && (this._$ES = this._$EP());
|
|
211
199
|
}
|
|
212
|
-
|
|
213
|
-
this._$AL.has(t) || this._$AL.set(t, e),
|
|
200
|
+
C(t, e, { useDefault: o, reflect: i, wrapped: r }, n) {
|
|
201
|
+
o && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(t) && (this._$Ej.set(t, n ?? e ?? this[t]), r !== !0 || n !== void 0) || (this._$AL.has(t) || (this.hasUpdated || o || (e = void 0), this._$AL.set(t, e)), i === !0 && this._$Em !== t && (this._$Eq ??= /* @__PURE__ */ new Set()).add(t));
|
|
214
202
|
}
|
|
215
|
-
async _$
|
|
203
|
+
async _$EP() {
|
|
216
204
|
this.isUpdatePending = !0;
|
|
217
205
|
try {
|
|
218
206
|
await this._$ES;
|
|
@@ -226,38 +214,33 @@ class y extends HTMLElement {
|
|
|
226
214
|
return this.performUpdate();
|
|
227
215
|
}
|
|
228
216
|
performUpdate() {
|
|
229
|
-
var o;
|
|
230
217
|
if (!this.isUpdatePending) return;
|
|
231
218
|
if (!this.hasUpdated) {
|
|
232
|
-
if (this.renderRoot
|
|
233
|
-
for (const [
|
|
219
|
+
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
220
|
+
for (const [i, r] of this._$Ep) this[i] = r;
|
|
234
221
|
this._$Ep = void 0;
|
|
235
222
|
}
|
|
236
|
-
const
|
|
237
|
-
if (
|
|
223
|
+
const o = this.constructor.elementProperties;
|
|
224
|
+
if (o.size > 0) for (const [i, r] of o) {
|
|
225
|
+
const { wrapped: n } = r, a = this[i];
|
|
226
|
+
n !== !0 || this._$AL.has(i) || a === void 0 || this.C(i, void 0, r, a);
|
|
227
|
+
}
|
|
238
228
|
}
|
|
239
229
|
let t = !1;
|
|
240
230
|
const e = this._$AL;
|
|
241
231
|
try {
|
|
242
|
-
t = this.shouldUpdate(e), t ? (this.willUpdate(e),
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
}), this.update(e)) : this._$EU();
|
|
246
|
-
} catch (i) {
|
|
247
|
-
throw t = !1, this._$EU(), i;
|
|
232
|
+
t = this.shouldUpdate(e), t ? (this.willUpdate(e), this._$EO?.forEach(((o) => o.hostUpdate?.())), this.update(e)) : this._$EM();
|
|
233
|
+
} catch (o) {
|
|
234
|
+
throw t = !1, this._$EM(), o;
|
|
248
235
|
}
|
|
249
236
|
t && this._$AE(e);
|
|
250
237
|
}
|
|
251
238
|
willUpdate(t) {
|
|
252
239
|
}
|
|
253
240
|
_$AE(t) {
|
|
254
|
-
|
|
255
|
-
(e = this._$EO) == null || e.forEach((o) => {
|
|
256
|
-
var i;
|
|
257
|
-
return (i = o.hostUpdated) == null ? void 0 : i.call(o);
|
|
258
|
-
}), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
241
|
+
this._$EO?.forEach(((e) => e.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(t)), this.updated(t);
|
|
259
242
|
}
|
|
260
|
-
_$
|
|
243
|
+
_$EM() {
|
|
261
244
|
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
262
245
|
}
|
|
263
246
|
get updateComplete() {
|
|
@@ -270,44 +253,44 @@ class y extends HTMLElement {
|
|
|
270
253
|
return !0;
|
|
271
254
|
}
|
|
272
255
|
update(t) {
|
|
273
|
-
this._$
|
|
256
|
+
this._$Eq &&= this._$Eq.forEach(((e) => this._$ET(e, this[e]))), this._$EM();
|
|
274
257
|
}
|
|
275
258
|
updated(t) {
|
|
276
259
|
}
|
|
277
260
|
firstUpdated(t) {
|
|
278
261
|
}
|
|
279
262
|
}
|
|
280
|
-
|
|
263
|
+
f.elementStyles = [], f.shadowRootOptions = { mode: "open" }, f[u("elementProperties")] = /* @__PURE__ */ new Map(), f[u("finalized")] = /* @__PURE__ */ new Map(), I?.({ ReactiveElement: f }), (g.reactiveElementVersions ??= []).push("2.1.1");
|
|
281
264
|
/**
|
|
282
265
|
* @license
|
|
283
266
|
* Copyright 2017 Google LLC
|
|
284
267
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
285
268
|
*/
|
|
286
|
-
const
|
|
269
|
+
const D = { attribute: !0, type: String, converter: y, reflect: !1, hasChanged: w }, N = (s = D, t, e) => {
|
|
287
270
|
const { kind: o, metadata: i } = e;
|
|
288
|
-
let
|
|
289
|
-
if (
|
|
290
|
-
const { name:
|
|
271
|
+
let r = globalThis.litPropertyMetadata.get(i);
|
|
272
|
+
if (r === void 0 && globalThis.litPropertyMetadata.set(i, r = /* @__PURE__ */ new Map()), o === "setter" && ((s = Object.create(s)).wrapped = !0), r.set(e.name, s), o === "accessor") {
|
|
273
|
+
const { name: n } = e;
|
|
291
274
|
return { set(a) {
|
|
292
275
|
const h = t.get.call(this);
|
|
293
|
-
t.set.call(this, a), this.requestUpdate(
|
|
276
|
+
t.set.call(this, a), this.requestUpdate(n, h, s);
|
|
294
277
|
}, init(a) {
|
|
295
|
-
return a !== void 0 && this.
|
|
278
|
+
return a !== void 0 && this.C(n, void 0, s, a), a;
|
|
296
279
|
} };
|
|
297
280
|
}
|
|
298
281
|
if (o === "setter") {
|
|
299
|
-
const { name:
|
|
282
|
+
const { name: n } = e;
|
|
300
283
|
return function(a) {
|
|
301
|
-
const h = this[
|
|
302
|
-
t.call(this, a), this.requestUpdate(
|
|
284
|
+
const h = this[n];
|
|
285
|
+
t.call(this, a), this.requestUpdate(n, h, s);
|
|
303
286
|
};
|
|
304
287
|
}
|
|
305
288
|
throw Error("Unsupported decorator location: " + o);
|
|
306
289
|
};
|
|
307
|
-
function
|
|
308
|
-
return (t, e) => typeof e == "object" ?
|
|
309
|
-
const
|
|
310
|
-
return i.constructor.createProperty(
|
|
290
|
+
function c(s) {
|
|
291
|
+
return (t, e) => typeof e == "object" ? N(s, t, e) : ((o, i, r) => {
|
|
292
|
+
const n = i.hasOwnProperty(r);
|
|
293
|
+
return i.constructor.createProperty(r, o), n ? Object.getOwnPropertyDescriptor(i, r) : void 0;
|
|
311
294
|
})(s, t, e);
|
|
312
295
|
}
|
|
313
296
|
/**
|
|
@@ -315,10 +298,10 @@ function u(s) {
|
|
|
315
298
|
* Copyright 2017 Google LLC
|
|
316
299
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
317
300
|
*/
|
|
318
|
-
function
|
|
319
|
-
return
|
|
301
|
+
function H(s) {
|
|
302
|
+
return c({ ...s, state: !0, attribute: !1 });
|
|
320
303
|
}
|
|
321
|
-
const
|
|
304
|
+
const F = U`
|
|
322
305
|
:host {
|
|
323
306
|
/* Global Tooltip Styles */
|
|
324
307
|
--_nys-tooltip-color: var(--nys-color-text-reverse, #ffffff);
|
|
@@ -475,20 +458,19 @@ const V = O`
|
|
|
475
458
|
}
|
|
476
459
|
}
|
|
477
460
|
`;
|
|
478
|
-
var
|
|
479
|
-
for (var i = o > 1 ? void 0 : o ?
|
|
480
|
-
(
|
|
481
|
-
return o && i &&
|
|
461
|
+
var V = Object.defineProperty, W = Object.getOwnPropertyDescriptor, d = (s, t, e, o) => {
|
|
462
|
+
for (var i = o > 1 ? void 0 : o ? W(t, e) : t, r = s.length - 1, n; r >= 0; r--)
|
|
463
|
+
(n = s[r]) && (i = (o ? n(t, e, i) : n(i)) || i);
|
|
464
|
+
return o && i && V(t, e, i), i;
|
|
482
465
|
};
|
|
483
|
-
let
|
|
484
|
-
const
|
|
466
|
+
let K = 0;
|
|
467
|
+
const v = class v extends R {
|
|
485
468
|
/**************** Lifecycle Methods ****************/
|
|
486
469
|
constructor() {
|
|
487
470
|
super(), this.id = "", this.text = "", this.inverted = !1, this.focusable = !1, this._active = !1, this._userHasSetPosition = !1, this._originalUserPosition = null, this._internallyUpdatingPosition = !1, this._position = null, this._handleTooltipEnter = () => {
|
|
488
471
|
if (this._active = !0, this._addScrollListeners(), this._userHasSetPosition && this._originalUserPosition && this._doesPositionFit(this._originalUserPosition)) {
|
|
489
472
|
this.position = this._originalUserPosition, this.updateComplete.then(() => {
|
|
490
|
-
|
|
491
|
-
const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector(
|
|
473
|
+
const t = this.shadowRoot?.querySelector(
|
|
492
474
|
".nys-tooltip__content"
|
|
493
475
|
);
|
|
494
476
|
t && this._shiftTooltipIntoViewport(t);
|
|
@@ -497,28 +479,25 @@ const P = class P extends A {
|
|
|
497
479
|
}
|
|
498
480
|
this.autoPositionTooltip();
|
|
499
481
|
}, this._handleBlurOrMouseLeave = () => {
|
|
500
|
-
var e;
|
|
501
482
|
this._active = !1, this._removeScrollListeners();
|
|
502
|
-
const t =
|
|
483
|
+
const t = this.shadowRoot?.querySelector(
|
|
503
484
|
".nys-tooltip__content"
|
|
504
485
|
);
|
|
505
486
|
t && this._resetTooltipPositioningStyles(t);
|
|
506
487
|
}, this._handleScrollOrResize = () => {
|
|
507
488
|
this._active && (this._userHasSetPosition && this._originalUserPosition ? this._doesPositionFit(this._originalUserPosition) ? (this._setInternalPosition(this._originalUserPosition), this.updateComplete.then(() => {
|
|
508
|
-
|
|
509
|
-
const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector(
|
|
489
|
+
const t = this.shadowRoot?.querySelector(
|
|
510
490
|
".nys-tooltip__content"
|
|
511
491
|
);
|
|
512
492
|
t && this._shiftTooltipIntoViewport(t);
|
|
513
493
|
})) : this.autoPositionTooltip() : this.autoPositionTooltip());
|
|
514
494
|
}, this._handleEscapeKey = (t) => {
|
|
515
|
-
var e;
|
|
516
495
|
if (t.key === "Escape" && this._active) {
|
|
517
496
|
this._active = !1, this._removeScrollListeners();
|
|
518
|
-
const
|
|
497
|
+
const e = this.shadowRoot?.querySelector(
|
|
519
498
|
".nys-tooltip__content"
|
|
520
499
|
);
|
|
521
|
-
|
|
500
|
+
e && this._resetTooltipPositioningStyles(e);
|
|
522
501
|
}
|
|
523
502
|
};
|
|
524
503
|
}
|
|
@@ -530,22 +509,19 @@ const P = class P extends A {
|
|
|
530
509
|
this._position = t, this.requestUpdate("position", e), this._internallyUpdatingPosition || (this._userHasSetPosition = t !== null, this._originalUserPosition = t);
|
|
531
510
|
}
|
|
532
511
|
connectedCallback() {
|
|
533
|
-
super.connectedCallback(), this.id || (this.id = `nys-tooltip-${Date.now()}-${
|
|
512
|
+
super.connectedCallback(), this.id || (this.id = `nys-tooltip-${Date.now()}-${K++}`), window.addEventListener("keydown", this._handleEscapeKey);
|
|
534
513
|
}
|
|
535
514
|
disconnectedCallback() {
|
|
536
515
|
super.disconnectedCallback(), window.removeEventListener("keydown", this._handleEscapeKey);
|
|
537
516
|
}
|
|
538
517
|
get _firstAssignedEl() {
|
|
539
|
-
|
|
540
|
-
const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("slot");
|
|
541
|
-
return t == null ? void 0 : t.assignedElements({ flatten: !0 })[0];
|
|
518
|
+
return this.shadowRoot?.querySelector("slot")?.assignedElements({ flatten: !0 })[0];
|
|
542
519
|
}
|
|
543
520
|
firstUpdated() {
|
|
544
|
-
|
|
545
|
-
const t = (e = this.shadowRoot) == null ? void 0 : e.querySelector("slot");
|
|
521
|
+
const t = this.shadowRoot?.querySelector("slot");
|
|
546
522
|
t && t.addEventListener("slotchange", () => {
|
|
547
|
-
const
|
|
548
|
-
|
|
523
|
+
const e = this._firstAssignedEl;
|
|
524
|
+
e && this._applyFocusBehavior(e);
|
|
549
525
|
});
|
|
550
526
|
}
|
|
551
527
|
updated(t) {
|
|
@@ -573,49 +549,46 @@ const P = class P extends A {
|
|
|
573
549
|
}
|
|
574
550
|
// Applies focus behavior to an otherwise non focus element (i.e. nys-icon is non focusable by default)
|
|
575
551
|
async _applyFocusBehavior(t) {
|
|
576
|
-
var o;
|
|
577
552
|
if (!this.focusable) return;
|
|
578
553
|
if (t.tagName.toLowerCase() === "nys-icon") {
|
|
579
554
|
"updateComplete" in t && await t.updateComplete;
|
|
580
|
-
const
|
|
581
|
-
|
|
555
|
+
const o = t.shadowRoot?.querySelector("svg");
|
|
556
|
+
o && o.setAttribute("tabindex", "0");
|
|
582
557
|
} else
|
|
583
558
|
t.setAttribute("tabindex", "0");
|
|
584
559
|
}
|
|
585
560
|
// Checks if user's set position fit with current viewport (Does not account for overflow texts at this moment)
|
|
586
561
|
_doesPositionFit(t) {
|
|
587
|
-
|
|
588
|
-
const e = (d = this.shadowRoot) == null ? void 0 : d.querySelector(".nys-tooltip__wrapper"), o = (f = this.shadowRoot) == null ? void 0 : f.querySelector(".nys-tooltip__content");
|
|
562
|
+
const e = this.shadowRoot?.querySelector(".nys-tooltip__wrapper"), o = this.shadowRoot?.querySelector(".nys-tooltip__content");
|
|
589
563
|
if (!e || !o || t == null) return;
|
|
590
|
-
const i = e.getBoundingClientRect(),
|
|
591
|
-
top: i.top -
|
|
592
|
-
left: i.left -
|
|
593
|
-
bottom: window.innerHeight - i.bottom -
|
|
594
|
-
right: window.innerWidth - i.right -
|
|
564
|
+
const i = e.getBoundingClientRect(), r = o.getBoundingClientRect(), n = 8, a = {
|
|
565
|
+
top: i.top - n,
|
|
566
|
+
left: i.left - n,
|
|
567
|
+
bottom: window.innerHeight - i.bottom - n,
|
|
568
|
+
right: window.innerWidth - i.right - n
|
|
595
569
|
};
|
|
596
570
|
return {
|
|
597
|
-
top: a.top >=
|
|
598
|
-
bottom: a.bottom >=
|
|
599
|
-
left: a.left >=
|
|
600
|
-
right: a.right >=
|
|
571
|
+
top: a.top >= r.height,
|
|
572
|
+
bottom: a.bottom >= r.height,
|
|
573
|
+
left: a.left >= r.width,
|
|
574
|
+
right: a.right >= r.width
|
|
601
575
|
}[t];
|
|
602
576
|
}
|
|
603
577
|
// Calculates the best placement based on available space (flips placement if it doesn't fit)
|
|
604
578
|
async autoPositionTooltip() {
|
|
605
|
-
|
|
606
|
-
const t = (d = this.shadowRoot) == null ? void 0 : d.querySelector(
|
|
579
|
+
const t = this.shadowRoot?.querySelector(
|
|
607
580
|
".nys-tooltip__wrapper"
|
|
608
|
-
), e =
|
|
581
|
+
), e = this.shadowRoot?.querySelector(
|
|
609
582
|
".nys-tooltip__content"
|
|
610
583
|
);
|
|
611
584
|
if (!t || !e) return;
|
|
612
|
-
const o = t.getBoundingClientRect(), i = 8,
|
|
585
|
+
const o = t.getBoundingClientRect(), i = 8, r = {
|
|
613
586
|
top: o.top - i,
|
|
614
587
|
left: o.left - i,
|
|
615
588
|
bottom: window.innerHeight - o.bottom - i,
|
|
616
589
|
right: window.innerWidth - o.right - i
|
|
617
590
|
};
|
|
618
|
-
let
|
|
591
|
+
let n = [
|
|
619
592
|
"top",
|
|
620
593
|
"bottom",
|
|
621
594
|
"right",
|
|
@@ -623,16 +596,16 @@ const P = class P extends A {
|
|
|
623
596
|
];
|
|
624
597
|
if (this._userHasSetPosition && this._originalUserPosition) {
|
|
625
598
|
const l = this._originalUserPosition;
|
|
626
|
-
l === "left" ?
|
|
599
|
+
l === "left" ? n = ["left", "right", "top", "bottom"] : l === "right" ? n = ["right", "left", "top", "bottom"] : l === "top" ? n = ["top", "bottom", "right", "left"] : l === "bottom" && (n = ["bottom", "top", "right", "left"]);
|
|
627
600
|
}
|
|
628
|
-
for (const l of
|
|
601
|
+
for (const l of n)
|
|
629
602
|
if (this._doesPositionFit(l)) {
|
|
630
603
|
this._setInternalPosition(l), await this.updateComplete, this._shiftTooltipIntoViewport(e);
|
|
631
604
|
return;
|
|
632
605
|
}
|
|
633
|
-
let a = "top", h =
|
|
634
|
-
for (const l of
|
|
635
|
-
|
|
606
|
+
let a = "top", h = r.top;
|
|
607
|
+
for (const l of n)
|
|
608
|
+
r[l] > h && (h = r[l], a = l);
|
|
636
609
|
this._setInternalPosition(a), await this.updateComplete, this._shiftTooltipIntoViewport(e);
|
|
637
610
|
}
|
|
638
611
|
// Sets flag to distinguish to position's setter that we are updating "position" prop internally
|
|
@@ -641,21 +614,19 @@ const P = class P extends A {
|
|
|
641
614
|
}
|
|
642
615
|
// Determines if text of tooltip over-extends outside of viewport edge and adjust tooltip for horizontal overflow
|
|
643
616
|
_shiftTooltipIntoViewport(t) {
|
|
644
|
-
|
|
645
|
-
const o = ((l = this.shadowRoot) == null ? void 0 : l.querySelector(
|
|
617
|
+
const o = (this.shadowRoot?.querySelector(
|
|
646
618
|
".nys-tooltip__wrapper"
|
|
647
|
-
)).getBoundingClientRect(), i = t.getBoundingClientRect(),
|
|
648
|
-
this._resetTooltipPositioningStyles(t),
|
|
649
|
-
const h = t.getBoundingClientRect(),
|
|
650
|
-
t.style.setProperty("--arrow-offset-x", `${
|
|
619
|
+
)).getBoundingClientRect(), i = t.getBoundingClientRect(), r = o.left + o.width / 2, n = i.left < 0, a = i.right > window.innerWidth;
|
|
620
|
+
this._resetTooltipPositioningStyles(t), n ? (t.style.left = "0px", t.style.transform = "none") : a && (t.style.right = "0px", t.style.left = "auto", t.style.transform = "none");
|
|
621
|
+
const h = t.getBoundingClientRect(), l = (r - h.left) / h.width, C = Math.max(0, Math.min(1, l)) * 100;
|
|
622
|
+
t.style.setProperty("--arrow-offset-x", `${C}%`);
|
|
651
623
|
}
|
|
652
624
|
// Reposition tooltip back to original set position (e.g. top, left, bottom, right) to avoid positioning issue base on last position
|
|
653
625
|
_resetTooltipPositioningStyles(t) {
|
|
654
626
|
t.style.left = "", t.style.right = "", t.style.transform = "";
|
|
655
627
|
}
|
|
656
628
|
render() {
|
|
657
|
-
|
|
658
|
-
return E`
|
|
629
|
+
return b`
|
|
659
630
|
<div class="nys-tooltip__main">
|
|
660
631
|
<div
|
|
661
632
|
class="nys-tooltip__wrapper"
|
|
@@ -668,7 +639,7 @@ const P = class P extends A {
|
|
|
668
639
|
<slot></slot>
|
|
669
640
|
</span>
|
|
670
641
|
</div>
|
|
671
|
-
${
|
|
642
|
+
${this.text?.trim() ? b`<div
|
|
672
643
|
id=${this.id}
|
|
673
644
|
class="nys-tooltip__content"
|
|
674
645
|
role="tooltip"
|
|
@@ -682,25 +653,25 @@ const P = class P extends A {
|
|
|
682
653
|
`;
|
|
683
654
|
}
|
|
684
655
|
};
|
|
685
|
-
|
|
686
|
-
let p =
|
|
687
|
-
|
|
688
|
-
|
|
656
|
+
v.styles = F;
|
|
657
|
+
let p = v;
|
|
658
|
+
d([
|
|
659
|
+
c({ type: String })
|
|
689
660
|
], p.prototype, "id", 2);
|
|
690
|
-
|
|
691
|
-
|
|
661
|
+
d([
|
|
662
|
+
c({ type: String })
|
|
692
663
|
], p.prototype, "text", 2);
|
|
693
|
-
|
|
694
|
-
|
|
664
|
+
d([
|
|
665
|
+
c({ type: Boolean, reflect: !0 })
|
|
695
666
|
], p.prototype, "inverted", 2);
|
|
696
|
-
|
|
697
|
-
|
|
667
|
+
d([
|
|
668
|
+
c({ type: Boolean, reflect: !0 })
|
|
698
669
|
], p.prototype, "focusable", 2);
|
|
699
|
-
|
|
700
|
-
|
|
670
|
+
d([
|
|
671
|
+
H()
|
|
701
672
|
], p.prototype, "_active", 2);
|
|
702
|
-
|
|
703
|
-
|
|
673
|
+
d([
|
|
674
|
+
c({ type: String, reflect: !0 })
|
|
704
675
|
], p.prototype, "position", 1);
|
|
705
676
|
customElements.get("nys-tooltip") || customElements.define("nys-tooltip", p);
|
|
706
677
|
export {
|
package/dist/nys-tooltip.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nys-tooltip.js","sources":["../../../node_modules/@lit/reactive-element/css-tag.js","../../../node_modules/@lit/reactive-element/reactive-element.js","../../../node_modules/@lit/reactive-element/decorators/property.js","../../../node_modules/@lit/reactive-element/decorators/state.js","../src/nys-tooltip.styles.ts","../src/nys-tooltip.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,adoptStyles,css,getCompatibleStyle,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:r,getOwnPropertyNames:h,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),y={attribute:!0,type:String,converter:u,reflect:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class b extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=y){if(s.state&&(s.attribute=!1),this._$Ei(),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(t,i,s);void 0!==r&&e(this.prototype,t,r)}}static getPropertyDescriptor(t,s,i){const{get:e,set:h}=r(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get(){return e?.call(this)},set(s){const r=e?.call(this);h.call(this,s),this.requestUpdate(t,r,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??y}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...h(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$EC(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const r=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==r?this.removeAttribute(e):this.setAttribute(e,r),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),r=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e,this[e]=r.fromAttribute(s,t.type),this._$Em=null}}requestUpdate(t,s,i){if(void 0!==t){if(i??=this.constructor.getPropertyOptions(t),!(i.hasChanged??f)(this[t],s))return;this.P(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$ET())}P(t,s,i){this._$AL.has(t)||this._$AL.set(t,s),!0===i.reflect&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t)!0!==i.wrapped||this._$AL.has(s)||void 0===this[s]||this.P(s,this[s],i)}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EU()}catch(s){throw t=!1,this._$EU(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach((t=>this._$EC(t,this[t]))),this._$EU()}updated(t){}firstUpdated(t){}}b.elementStyles=[],b.shadowRootOptions={mode:\"open\"},b[d(\"elementProperties\")]=new Map,b[d(\"finalized\")]=new Map,p?.({ReactiveElement:b}),(a.reactiveElementVersions??=[]).push(\"2.0.4\");export{b as ReactiveElement,u as defaultConverter,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","import{defaultConverter as t,notEqual as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:t,reflect:!1,hasChanged:e},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t)},init(e){return void 0!==e&&this.P(o,void 0,t),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,r?{...t,wrapped:!0}:t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","import{property as t}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};\n//# sourceMappingURL=state.js.map\n","import { css } from \"lit\";\n\nexport default css`\n :host {\n /* Global Tooltip Styles */\n --_nys-tooltip-color: var(--nys-color-text-reverse, #ffffff);\n --_nys-tooltip-background-color: var(--nys-color-ink, #1b1b1b);\n --_nys-tooltip-border-radius: var(--nys-radius-md, 4px);\n --_nys-tooltip-font-family: var(\n --nys-font-family-ui,\n var(\n --nys-font-family-sans,\n \"Proxima Nova\",\n \"Helvetica Neue\",\n \"Helvetica\",\n \"Arial\",\n sans-serif\n )\n );\n --_nys-tooltip-font-size: var(--nys-type-size-ui-sm, 14px);\n --_nys-tooltip-letter-spacing: var(--nys-font-letterspacing-ui-sm, 0.044px);\n --_nys-tooltip-line-height: var(--nys-font-lineheight-ui-sm, 24px);\n }\n\n .nys-tooltip__main {\n position: relative;\n width: fit-content;\n }\n\n .nys-tooltip__wrapper {\n width: fit-content;\n display: flex;\n cursor: pointer;\n }\n\n .nys-tooltip__trigger {\n display: flex;\n }\n\n .nys-tooltip__content {\n position: absolute;\n display: none;\n max-width: 400px;\n width: max-content;\n max-height: 120px;\n padding: var(--nys-space-50, 4px) var(--nys-space-100, 8px);\n background-color: var(--_nys-tooltip-background-color);\n border-radius: var(--_nys-tooltip-border-radius);\n cursor: auto;\n z-index: 1;\n }\n\n .nys-tooltip__inner {\n display: block;\n color: var(--_nys-tooltip-color);\n font-family: var(--_nys-tooltip-font-family);\n font-size: var(--_nys-tooltip-font-size);\n font-weight: 400;\n line-height: var(--_nys-tooltip-line-height);\n letter-spacing: var(--_nys-tooltip-letter-spacing);\n white-space: normal;\n word-break: break-word;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 4;\n -webkit-box-orient: vertical;\n }\n\n /* Tooltip Arrow (default) */\n .nys-tooltip__arrow {\n position: absolute;\n width: 14px;\n height: 6px;\n background: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"15\" height=\"6\" viewBox=\"0 0 15 6\" fill=\"none\"><path d=\"M8.15079 5.44218C7.7763 5.76317 7.2237 5.76317 6.84921 5.44218L0.5 0H14.5L8.15079 5.44218Z\" fill=\"%231B1B1B\"/></svg>')\n no-repeat center;\n }\n\n .nys-tooltip__content[active] {\n display: block;\n }\n\n /* ===================== POSITIONING ===================== */\n /* Top */\n :host([position=\"top\"]) .nys-tooltip__content {\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-bottom: 10px;\n }\n\n :host([position=\"top\"]) .nys-tooltip__arrow {\n top: 100%;\n left: var(--arrow-offset-x, 50%);\n transform: translateX(-50%);\n }\n\n /* Bottom */\n :host([position=\"bottom\"]) .nys-tooltip__content {\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-top: 10px;\n }\n\n :host([position=\"bottom\"]) .nys-tooltip__arrow {\n bottom: 100%;\n left: var(--arrow-offset-x, 50%);\n transform: translateX(-50%) rotate(180deg);\n }\n\n /* Left */\n :host([position=\"left\"]) .nys-tooltip__content {\n left: auto;\n right: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-right: 10px;\n }\n\n :host([position=\"left\"]) .nys-tooltip__arrow {\n left: 100%;\n top: 50%;\n transform: translateY(-50%) rotate(-90deg);\n margin-left: -4px;\n }\n /* Right */\n :host([position=\"right\"]) .nys-tooltip__content {\n left: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-left: 10px;\n }\n\n :host([position=\"right\"]) .nys-tooltip__arrow {\n right: 100%;\n top: 50%;\n transform: translateY(-50%) rotate(90deg);\n margin-right: -4px;\n }\n\n :host([inverted]) .nys-tooltip__content {\n --_nys-tooltip-color: var(--nys-color-text, #1b1b1b);\n --_nys-tooltip-background-color: var(--nys-color-ink-reverse, #fff);\n }\n\n :host([inverted]) .nys-tooltip__arrow {\n background: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"15\" height=\"6\" viewBox=\"0 0 15 6\" fill=\"none\"><path d=\"M8.15079 5.44218C7.7763 5.76317 7.2237 5.76317 6.84921 5.44218L0.5 0H14.5L8.15079 5.44218Z\" fill=\"white\"/></svg>')\n no-repeat center;\n }\n\n @media (max-width: 400px) {\n .nys-tooltip__content {\n max-width: calc(\n 100vw - 2rem\n ); /* 2rem = 32px = 16px margin on each side */\n }\n }\n`;\n","import { LitElement, html } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport styles from \"./nys-tooltip.styles\";\n\nlet tooltipIdCounter = 0; // Counter for generating unique IDs\n\nexport class NysTooltip extends LitElement {\n @property({ type: String }) id = \"\";\n @property({ type: String }) text = \"\";\n @property({ type: Boolean, reflect: true }) inverted = false;\n @property({ type: Boolean, reflect: true }) focusable = false;\n\n // Track if tooltip is active (hovered or focused)\n @state()\n private _active = false;\n\n // Track if user set position is set explicitly\n private _userHasSetPosition = false;\n private _originalUserPosition: typeof this._position | null = null;\n // Internal flag to prevent dynamic positioning when not needed\n private _internallyUpdatingPosition = false;\n\n static styles = styles;\n\n /********************* Position Logic *********************/\n private _position: \"top\" | \"bottom\" | \"left\" | \"right\" | null = null;\n\n @property({ type: String, reflect: true })\n get position() {\n return this._position;\n }\n\n set position(value) {\n const oldVal = this._position;\n this._position = value;\n this.requestUpdate(\"position\", oldVal);\n\n // The \"_internallyUpdatingPosition\" flag allows user's set position to take preference\n if (!this._internallyUpdatingPosition) {\n this._userHasSetPosition = value !== null;\n this._originalUserPosition = value;\n }\n }\n\n /**************** Lifecycle Methods ****************/\n constructor() {\n super();\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n // Generate a unique ID if not provided\n if (!this.id) {\n this.id = `nys-tooltip-${Date.now()}-${tooltipIdCounter++}`;\n }\n\n window.addEventListener(\"keydown\", this._handleEscapeKey);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n window.removeEventListener(\"keydown\", this._handleEscapeKey);\n }\n\n private get _firstAssignedEl(): HTMLElement | undefined {\n const slot = this.shadowRoot?.querySelector(\"slot\");\n return slot?.assignedElements({ flatten: true })[0] as\n | HTMLElement\n | undefined;\n }\n\n firstUpdated() {\n const slot = this.shadowRoot?.querySelector(\"slot\");\n if (slot) {\n slot.addEventListener(\"slotchange\", () => {\n const firstEl = this._firstAssignedEl;\n if (firstEl) {\n this._applyFocusBehavior(firstEl);\n }\n });\n }\n }\n\n updated(changedProps: Map<string, unknown>) {\n super.updated(changedProps);\n\n const firstEl = this._firstAssignedEl;\n if (!firstEl) return;\n\n // Accounts for tooltip's text change (for code editor changes & VO)\n if (changedProps.has(\"text\")) {\n this._passAria(firstEl);\n }\n if (changedProps.has(\"focusable\")) {\n this._applyFocusBehavior(firstEl);\n }\n }\n\n /******************** Event Handlers ********************/\n // When toggling tooltip, check if user has set position to give it preference it space allows. Otherwise dynamically position tooltip.\n private _handleTooltipEnter = () => {\n this._active = true;\n this._addScrollListeners();\n\n // Try to honor user's original preference first\n if (this._userHasSetPosition && this._originalUserPosition) {\n if (this._doesPositionFit(this._originalUserPosition)) {\n this.position = this._originalUserPosition;\n // Check if current tooltip position overflows to edge of screen\n this.updateComplete.then(() => {\n const tooltip = this.shadowRoot?.querySelector(\n \".nys-tooltip__content\",\n ) as HTMLElement;\n if (tooltip) this._shiftTooltipIntoViewport(tooltip);\n });\n return;\n }\n }\n\n // Otherwise fall back to auto logic\n this.autoPositionTooltip();\n };\n\n private _handleBlurOrMouseLeave = () => {\n this._active = false;\n this._removeScrollListeners();\n\n const tooltip = this.shadowRoot?.querySelector(\n \".nys-tooltip__content\",\n ) as HTMLElement;\n\n if (tooltip) {\n this._resetTooltipPositioningStyles(tooltip);\n }\n };\n\n // Listen to window scroll so a focus tooltip can auto position even when user move across the page\n private _addScrollListeners() {\n window.addEventListener(\"scroll\", this._handleScrollOrResize, true);\n window.addEventListener(\"resize\", this._handleScrollOrResize);\n }\n\n private _removeScrollListeners() {\n window.removeEventListener(\"scroll\", this._handleScrollOrResize, true);\n window.removeEventListener(\"resize\", this._handleScrollOrResize);\n }\n\n private _handleScrollOrResize = () => {\n if (!this._active) return;\n\n if (this._userHasSetPosition && this._originalUserPosition) {\n if (this._doesPositionFit(this._originalUserPosition)) {\n this._setInternalPosition(this._originalUserPosition);\n\n // Check if current tooltip position overflows to edge of screen\n this.updateComplete.then(() => {\n const tooltip = this.shadowRoot?.querySelector(\n \".nys-tooltip__content\",\n ) as HTMLElement;\n if (tooltip) this._shiftTooltipIntoViewport(tooltip);\n });\n } else {\n this.autoPositionTooltip();\n }\n } else {\n this.autoPositionTooltip();\n }\n };\n\n private _handleEscapeKey = (e: KeyboardEvent) => {\n if (e.key === \"Escape\" && this._active) {\n this._active = false;\n this._removeScrollListeners();\n\n const tooltip = this.shadowRoot?.querySelector(\n \".nys-tooltip__content\",\n ) as HTMLElement;\n if (tooltip) {\n this._resetTooltipPositioningStyles(tooltip);\n }\n }\n };\n\n /******************** Functions ********************/\n // We need to pass `ariaLabel` or `ariaDescription` to the nys-components so they can announce both their label and the tooltip's text\n private _passAria(el: HTMLElement) {\n const tagName = el.tagName.toLowerCase();\n\n if (tagName.startsWith(\"nys-\")) {\n if (tagName === \"nys-icon\") {\n // For nys-icon, use ariaLabel instead\n const existingLabel = el.getAttribute(\"ariaLabel\") || \"\";\n const mergedLabel = existingLabel\n ? `${existingLabel}, ${this.text}`\n : this.text;\n\n el.setAttribute(\"ariaLabel\", mergedLabel);\n } else {\n // For other components like nys-button, use ariaDescription\n el.setAttribute(\"ariaDescription\", this.text);\n }\n }\n }\n\n // Applies focus behavior to an otherwise non focus element (i.e. nys-icon is non focusable by default)\n private async _applyFocusBehavior(el: HTMLElement) {\n if (!this.focusable) return;\n\n const tagName = el.tagName.toLowerCase();\n if (tagName === \"nys-icon\") {\n if (\"updateComplete\" in el) {\n await (el as any).updateComplete;\n }\n const svg = el.shadowRoot?.querySelector(\"svg\");\n if (svg) {\n svg.setAttribute(\"tabindex\", \"0\");\n }\n } else {\n el.setAttribute(\"tabindex\", \"0\");\n }\n }\n\n // Checks if user's set position fit with current viewport (Does not account for overflow texts at this moment)\n private _doesPositionFit(position: typeof this._position) {\n const wrapper = this.shadowRoot?.querySelector(\".nys-tooltip__wrapper\");\n const tooltip = this.shadowRoot?.querySelector(\".nys-tooltip__content\");\n\n if (!wrapper || !tooltip || position == null) return;\n\n const triggerRect = wrapper.getBoundingClientRect();\n const tooltipRect = tooltip.getBoundingClientRect();\n\n // Define some margin buffer between tooltip and trigger (to avoid touching the edges too tightly)\n const margin = 8;\n\n // Available space on each side relative to trigger rect and viewport\n const spaceAvailable = {\n top: triggerRect.top - margin,\n left: triggerRect.left - margin,\n bottom: window.innerHeight - triggerRect.bottom - margin,\n right: window.innerWidth - triggerRect.right - margin,\n };\n\n // Check if tooltip fits on each side (compare available space vs tooltip size)\n const fits = {\n top: spaceAvailable.top >= tooltipRect.height,\n bottom: spaceAvailable.bottom >= tooltipRect.height,\n left: spaceAvailable.left >= tooltipRect.width,\n right: spaceAvailable.right >= tooltipRect.width,\n };\n\n return fits[position];\n }\n\n // Calculates the best placement based on available space (flips placement if it doesn't fit)\n private async autoPositionTooltip() {\n const wrapper = this.shadowRoot?.querySelector(\n \".nys-tooltip__wrapper\",\n ) as HTMLElement;\n const tooltip = this.shadowRoot?.querySelector(\n \".nys-tooltip__content\",\n ) as HTMLElement;\n\n if (!wrapper || !tooltip) return;\n\n const triggerRect = wrapper.getBoundingClientRect();\n const margin = 8;\n\n const spaceAvailable = {\n top: triggerRect.top - margin,\n left: triggerRect.left - margin,\n bottom: window.innerHeight - triggerRect.bottom - margin,\n right: window.innerWidth - triggerRect.right - margin,\n };\n\n // Default tryOrder for auto mode\n let tryOrder: Array<keyof typeof spaceAvailable> = [\n \"top\",\n \"bottom\",\n \"right\",\n \"left\",\n ];\n\n // If user explicitly set a preferred position (even if it didn’t fit),\n // favor it first before trying others\n if (this._userHasSetPosition && this._originalUserPosition) {\n const userPosition = this._originalUserPosition;\n if (userPosition === \"left\") {\n tryOrder = [\"left\", \"right\", \"top\", \"bottom\"];\n } else if (userPosition === \"right\") {\n tryOrder = [\"right\", \"left\", \"top\", \"bottom\"];\n } else if (userPosition === \"top\") {\n tryOrder = [\"top\", \"bottom\", \"right\", \"left\"];\n } else if (userPosition === \"bottom\") {\n tryOrder = [\"bottom\", \"top\", \"right\", \"left\"];\n }\n }\n\n // 1) Try to find the first side that fits\n for (const pos of tryOrder) {\n if (this._doesPositionFit(pos)) {\n this._setInternalPosition(pos);\n await this.updateComplete;\n this._shiftTooltipIntoViewport(tooltip);\n return;\n }\n }\n\n // 2) Fallback: pick the side with the most space\n let bestPosition: keyof typeof spaceAvailable = \"top\";\n let maxSpace = spaceAvailable.top;\n\n for (const pos of tryOrder) {\n if (spaceAvailable[pos] > maxSpace) {\n maxSpace = spaceAvailable[pos];\n bestPosition = pos;\n }\n }\n this._setInternalPosition(bestPosition);\n await this.updateComplete;\n this._shiftTooltipIntoViewport(tooltip);\n }\n\n // Sets flag to distinguish to position's setter that we are updating \"position\" prop internally\n private _setInternalPosition(bestPosition: typeof this._position) {\n this._internallyUpdatingPosition = true;\n this.position = bestPosition;\n this._internallyUpdatingPosition = false;\n }\n\n // Determines if text of tooltip over-extends outside of viewport edge and adjust tooltip for horizontal overflow\n private _shiftTooltipIntoViewport(tooltip: HTMLElement) {\n const wrapper = this.shadowRoot?.querySelector(\n \".nys-tooltip__wrapper\",\n ) as HTMLElement;\n\n const wrapperRect = wrapper.getBoundingClientRect();\n const tooltipRect = tooltip.getBoundingClientRect();\n\n const wrapperCenter = wrapperRect.left + wrapperRect.width / 2;\n\n const overflowLeft = tooltipRect.left < 0;\n const overflowRight = tooltipRect.right > window.innerWidth;\n\n this._resetTooltipPositioningStyles(tooltip);\n\n // Tooltip is past the viewport edge, shift it inwards\n if (overflowLeft) {\n tooltip.style.left = \"0px\";\n tooltip.style.transform = \"none\";\n } else if (overflowRight) {\n tooltip.style.right = \"0px\";\n tooltip.style.left = \"auto\";\n tooltip.style.transform = \"none\";\n }\n\n // Recalculate tooltip rect after any shift\n const newTooltipRect = tooltip.getBoundingClientRect();\n\n // Arrow offset relative to tooltip width to maintain accuracy on zoom and out-of-bounds\n const arrowOffsetRatio =\n (wrapperCenter - newTooltipRect.left) / newTooltipRect.width;\n const arrowOffsetPercent = Math.max(0, Math.min(1, arrowOffsetRatio)) * 100;\n\n tooltip.style.setProperty(\"--arrow-offset-x\", `${arrowOffsetPercent}%`);\n }\n\n // Reposition tooltip back to original set position (e.g. top, left, bottom, right) to avoid positioning issue base on last position\n private _resetTooltipPositioningStyles(tooltip: HTMLElement) {\n tooltip.style.left = \"\";\n tooltip.style.right = \"\";\n tooltip.style.transform = \"\";\n }\n\n render() {\n return html`\n <div class=\"nys-tooltip__main\">\n <div\n class=\"nys-tooltip__wrapper\"\n @mouseenter=${this._handleTooltipEnter}\n @mouseleave=${this._handleBlurOrMouseLeave}\n @focusin=${this._handleTooltipEnter}\n @focusout=${this._handleBlurOrMouseLeave}\n >\n <span class=\"nys-tooltip__trigger\">\n <slot></slot>\n </span>\n </div>\n ${this.text?.trim()\n ? html`<div\n id=${this.id}\n class=\"nys-tooltip__content\"\n role=\"tooltip\"\n aria-hidden=${!this._active}\n ?active=${this._active}\n >\n <div class=\"nys-tooltip__inner\">${this.text}</div>\n <span class=\"nys-tooltip__arrow\"></span>\n </div>`\n : \"\"}\n </div>\n `;\n }\n}\n\nif (!customElements.get(\"nys-tooltip\")) {\n customElements.define(\"nys-tooltip\", NysTooltip);\n}\n"],"names":["t","e","s","o","n$2","r","n","S","c","i","h","a","l","p","d","u","f","y","b","_a","styles","css","tooltipIdCounter","_NysTooltip","LitElement","tooltip","value","oldVal","slot","firstEl","changedProps","el","tagName","existingLabel","mergedLabel","svg","position","wrapper","_b","triggerRect","tooltipRect","margin","spaceAvailable","tryOrder","userPosition","pos","bestPosition","maxSpace","wrapperRect","wrapperCenter","overflowLeft","overflowRight","newTooltipRect","arrowOffsetRatio","arrowOffsetPercent","html","NysTooltip","__decorateClass","property","state"],"mappings":";;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,MAAMA,IAAE,YAAWC,IAAED,EAAE,eAAsBA,EAAE,aAAX,UAAqBA,EAAE,SAAS,iBAAe,wBAAuB,SAAS,aAAW,aAAY,cAAc,WAAUE,IAAE,OAAM,GAAGC,IAAE,oBAAI;AAAO,IAAAC,IAAC,MAAO;AAAA,EAAC,YAAY,GAAE,GAAE,GAAE;AAAC,QAAG,KAAK,eAAa,IAAG,MAAIF,EAAE,OAAM,MAAM,mEAAmE;AAAE,SAAK,UAAQ,GAAE,KAAK,IAAE;AAAA,EAAC;AAAA,EAAC,IAAI,aAAY;AAAC,QAAI,IAAE,KAAK;AAAE,UAAMA,IAAE,KAAK;AAAE,QAAGD,KAAY,MAAT,QAAW;AAAC,YAAMA,IAAWC,MAAT,UAAgBA,EAAE,WAAN;AAAa,MAAAD,MAAI,IAAEE,EAAE,IAAID,CAAC,IAAY,MAAT,YAAc,KAAK,IAAE,IAAE,IAAI,iBAAe,YAAY,KAAK,OAAO,GAAED,KAAGE,EAAE,IAAID,GAAE,CAAC;AAAA,IAAE;AAAC,WAAO;AAAA,EAAC;AAAA,EAAC,WAAU;AAAC,WAAO,KAAK;AAAA,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,KAAK,uBAAuB;AAAA,qBAC/B,KAAK,mBAAmB;AAAA,sBACvB,KAAK,uBAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,WAMxCpC,IAAA,KAAK,SAAL,QAAAA,EAAW,SACToC;AAAA,mBACO,KAAK,EAAE;AAAA;AAAA;AAAA,4BAGE,CAAC,KAAK,OAAO;AAAA,wBACjB,KAAK,OAAO;AAAA;AAAA,gDAEY,KAAK,IAAI;AAAA;AAAA,sBAG7C,EAAE;AAAA;AAAA;AAAA,EAGZ;AACF;AA9XEhC,EAAO,SAASH;AAhBX,IAAMoC,IAANjC;AACuBkC,EAAA;AAAA,EAA3BC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GADfF,EACiB,WAAA,MAAA,CAAA;AACAC,EAAA;AAAA,EAA3BC,EAAS,EAAE,MAAM,OAAA,CAAQ;AAAA,GAFfF,EAEiB,WAAA,QAAA,CAAA;AACgBC,EAAA;AAAA,EAA3CC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GAH/BF,EAGiC,WAAA,YAAA,CAAA;AACAC,EAAA;AAAA,EAA3CC,EAAS,EAAE,MAAM,SAAS,SAAS,IAAM;AAAA,GAJ/BF,EAIiC,WAAA,aAAA,CAAA;AAIpCC,EAAA;AAAA,EADPE,EAAA;AAAM,GAPIH,EAQH,WAAA,WAAA,CAAA;AAcJC,EAAA;AAAA,EADHC,EAAS,EAAE,MAAM,QAAQ,SAAS,IAAM;AAAA,GArB9BF,EAsBP,WAAA,YAAA,CAAA;AA0XD,eAAe,IAAI,aAAa,KACnC,eAAe,OAAO,eAAeA,CAAU;","x_google_ignoreList":[0,1,2,3]}
|
|
1
|
+
{"version":3,"file":"nys-tooltip.js","sources":["../../../node_modules/@lit/reactive-element/css-tag.js","../../../node_modules/@lit/reactive-element/reactive-element.js","../../../node_modules/@lit/reactive-element/decorators/property.js","../../../node_modules/@lit/reactive-element/decorators/state.js","../src/nys-tooltip.styles.ts","../src/nys-tooltip.ts"],"sourcesContent":["/**\n * @license\n * Copyright 2019 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */\nconst t=globalThis,e=t.ShadowRoot&&(void 0===t.ShadyCSS||t.ShadyCSS.nativeShadow)&&\"adoptedStyleSheets\"in Document.prototype&&\"replace\"in CSSStyleSheet.prototype,s=Symbol(),o=new WeakMap;class n{constructor(t,e,o){if(this._$cssResult$=!0,o!==s)throw Error(\"CSSResult is not constructable. Use `unsafeCSS` or `css` instead.\");this.cssText=t,this.t=e}get styleSheet(){let t=this.o;const s=this.t;if(e&&void 0===t){const e=void 0!==s&&1===s.length;e&&(t=o.get(s)),void 0===t&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),e&&o.set(s,t))}return t}toString(){return this.cssText}}const r=t=>new n(\"string\"==typeof t?t:t+\"\",void 0,s),i=(t,...e)=>{const o=1===t.length?t[0]:e.reduce(((e,s,o)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if(\"number\"==typeof t)return t;throw Error(\"Value passed to 'css' function must be a 'css' function result: \"+t+\". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.\")})(s)+t[o+1]),t[0]);return new n(o,t,s)},S=(s,o)=>{if(e)s.adoptedStyleSheets=o.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const e of o){const o=document.createElement(\"style\"),n=t.litNonce;void 0!==n&&o.setAttribute(\"nonce\",n),o.textContent=e.cssText,s.appendChild(o)}},c=e?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e=\"\";for(const s of t.cssRules)e+=s.cssText;return r(e)})(t):t;export{n as CSSResult,S as adoptStyles,i as css,c as getCompatibleStyle,e as supportsAdoptingStyleSheets,r as unsafeCSS};\n//# sourceMappingURL=css-tag.js.map\n","import{getCompatibleStyle as t,adoptStyles as s}from\"./css-tag.js\";export{CSSResult,css,supportsAdoptingStyleSheets,unsafeCSS}from\"./css-tag.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const{is:i,defineProperty:e,getOwnPropertyDescriptor:h,getOwnPropertyNames:r,getOwnPropertySymbols:o,getPrototypeOf:n}=Object,a=globalThis,c=a.trustedTypes,l=c?c.emptyScript:\"\",p=a.reactiveElementPolyfillSupport,d=(t,s)=>t,u={toAttribute(t,s){switch(s){case Boolean:t=t?l:null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,s){let i=t;switch(s){case Boolean:i=null!==t;break;case Number:i=null===t?null:Number(t);break;case Object:case Array:try{i=JSON.parse(t)}catch(t){i=null}}return i}},f=(t,s)=>!i(t,s),b={attribute:!0,type:String,converter:u,reflect:!1,useDefault:!1,hasChanged:f};Symbol.metadata??=Symbol(\"metadata\"),a.litPropertyMetadata??=new WeakMap;class y extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,s=b){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(t)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(t,s),!s.noAccessor){const i=Symbol(),h=this.getPropertyDescriptor(t,i,s);void 0!==h&&e(this.prototype,t,h)}}static getPropertyDescriptor(t,s,i){const{get:e,set:r}=h(this.prototype,t)??{get(){return this[s]},set(t){this[s]=t}};return{get:e,set(s){const h=e?.call(this);r?.call(this,s),this.requestUpdate(t,h,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??b}static _$Ei(){if(this.hasOwnProperty(d(\"elementProperties\")))return;const t=n(this);t.finalize(),void 0!==t.l&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(d(\"finalized\")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(d(\"properties\"))){const t=this.properties,s=[...r(t),...o(t)];for(const i of s)this.createProperty(i,t[i])}const t=this[Symbol.metadata];if(null!==t){const s=litPropertyMetadata.get(t);if(void 0!==s)for(const[t,i]of s)this.elementProperties.set(t,i)}this._$Eh=new Map;for(const[t,s]of this.elementProperties){const i=this._$Eu(t,s);void 0!==i&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(s){const i=[];if(Array.isArray(s)){const e=new Set(s.flat(1/0).reverse());for(const s of e)i.unshift(t(s))}else void 0!==s&&i.push(t(s));return i}static _$Eu(t,s){const i=s.attribute;return!1===i?void 0:\"string\"==typeof i?i:\"string\"==typeof t?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((t=>t(this)))}addController(t){(this._$EO??=new Set).add(t),void 0!==this.renderRoot&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){const t=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(t.set(i,this[i]),delete this[i]);t.size>0&&(this._$Ep=t)}createRenderRoot(){const t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return s(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((t=>t.hostConnected?.()))}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach((t=>t.hostDisconnected?.()))}attributeChangedCallback(t,s,i){this._$AK(t,i)}_$ET(t,s){const i=this.constructor.elementProperties.get(t),e=this.constructor._$Eu(t,i);if(void 0!==e&&!0===i.reflect){const h=(void 0!==i.converter?.toAttribute?i.converter:u).toAttribute(s,i.type);this._$Em=t,null==h?this.removeAttribute(e):this.setAttribute(e,h),this._$Em=null}}_$AK(t,s){const i=this.constructor,e=i._$Eh.get(t);if(void 0!==e&&this._$Em!==e){const t=i.getPropertyOptions(e),h=\"function\"==typeof t.converter?{fromAttribute:t.converter}:void 0!==t.converter?.fromAttribute?t.converter:u;this._$Em=e;const r=h.fromAttribute(s,t.type);this[e]=r??this._$Ej?.get(e)??r,this._$Em=null}}requestUpdate(t,s,i){if(void 0!==t){const e=this.constructor,h=this[t];if(i??=e.getPropertyOptions(t),!((i.hasChanged??f)(h,s)||i.useDefault&&i.reflect&&h===this._$Ej?.get(t)&&!this.hasAttribute(e._$Eu(t,i))))return;this.C(t,s,i)}!1===this.isUpdatePending&&(this._$ES=this._$EP())}C(t,s,{useDefault:i,reflect:e,wrapped:h},r){i&&!(this._$Ej??=new Map).has(t)&&(this._$Ej.set(t,r??s??this[t]),!0!==h||void 0!==r)||(this._$AL.has(t)||(this.hasUpdated||i||(s=void 0),this._$AL.set(t,s)),!0===e&&this._$Em!==t&&(this._$Eq??=new Set).add(t))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[t,s]of this._$Ep)this[t]=s;this._$Ep=void 0}const t=this.constructor.elementProperties;if(t.size>0)for(const[s,i]of t){const{wrapped:t}=i,e=this[s];!0!==t||this._$AL.has(s)||void 0===e||this.C(s,void 0,i,e)}}let t=!1;const s=this._$AL;try{t=this.shouldUpdate(s),t?(this.willUpdate(s),this._$EO?.forEach((t=>t.hostUpdate?.())),this.update(s)):this._$EM()}catch(s){throw t=!1,this._$EM(),s}t&&this._$AE(s)}willUpdate(t){}_$AE(t){this._$EO?.forEach((t=>t.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Eq&&=this._$Eq.forEach((t=>this._$ET(t,this[t]))),this._$EM()}updated(t){}firstUpdated(t){}}y.elementStyles=[],y.shadowRootOptions={mode:\"open\"},y[d(\"elementProperties\")]=new Map,y[d(\"finalized\")]=new Map,p?.({ReactiveElement:y}),(a.reactiveElementVersions??=[]).push(\"2.1.1\");export{y as ReactiveElement,s as adoptStyles,u as defaultConverter,t as getCompatibleStyle,f as notEqual};\n//# sourceMappingURL=reactive-element.js.map\n","import{defaultConverter as t,notEqual as e}from\"../reactive-element.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */const o={attribute:!0,type:String,converter:t,reflect:!1,hasChanged:e},r=(t=o,e,r)=>{const{kind:n,metadata:i}=r;let s=globalThis.litPropertyMetadata.get(i);if(void 0===s&&globalThis.litPropertyMetadata.set(i,s=new Map),\"setter\"===n&&((t=Object.create(t)).wrapped=!0),s.set(r.name,t),\"accessor\"===n){const{name:o}=r;return{set(r){const n=e.get.call(this);e.set.call(this,r),this.requestUpdate(o,n,t)},init(e){return void 0!==e&&this.C(o,void 0,t,e),e}}}if(\"setter\"===n){const{name:o}=r;return function(r){const n=this[o];e.call(this,r),this.requestUpdate(o,n,t)}}throw Error(\"Unsupported decorator location: \"+n)};function n(t){return(e,o)=>\"object\"==typeof o?r(t,e,o):((t,e,o)=>{const r=e.hasOwnProperty(o);return e.constructor.createProperty(o,t),r?Object.getOwnPropertyDescriptor(e,o):void 0})(t,e,o)}export{n as property,r as standardProperty};\n//# sourceMappingURL=property.js.map\n","import{property as t}from\"./property.js\";\n/**\n * @license\n * Copyright 2017 Google LLC\n * SPDX-License-Identifier: BSD-3-Clause\n */function r(r){return t({...r,state:!0,attribute:!1})}export{r as state};\n//# sourceMappingURL=state.js.map\n","import { css } from \"lit\";\n\nexport default css`\n :host {\n /* Global Tooltip Styles */\n --_nys-tooltip-color: var(--nys-color-text-reverse, #ffffff);\n --_nys-tooltip-background-color: var(--nys-color-ink, #1b1b1b);\n --_nys-tooltip-border-radius: var(--nys-radius-md, 4px);\n --_nys-tooltip-font-family: var(\n --nys-font-family-ui,\n var(\n --nys-font-family-sans,\n \"Proxima Nova\",\n \"Helvetica Neue\",\n \"Helvetica\",\n \"Arial\",\n sans-serif\n )\n );\n --_nys-tooltip-font-size: var(--nys-type-size-ui-sm, 14px);\n --_nys-tooltip-letter-spacing: var(--nys-font-letterspacing-ui-sm, 0.044px);\n --_nys-tooltip-line-height: var(--nys-font-lineheight-ui-sm, 24px);\n }\n\n .nys-tooltip__main {\n position: relative;\n width: fit-content;\n }\n\n .nys-tooltip__wrapper {\n width: fit-content;\n display: flex;\n cursor: pointer;\n }\n\n .nys-tooltip__trigger {\n display: flex;\n }\n\n .nys-tooltip__content {\n position: absolute;\n display: none;\n max-width: 400px;\n width: max-content;\n max-height: 120px;\n padding: var(--nys-space-50, 4px) var(--nys-space-100, 8px);\n background-color: var(--_nys-tooltip-background-color);\n border-radius: var(--_nys-tooltip-border-radius);\n cursor: auto;\n z-index: 1;\n }\n\n .nys-tooltip__inner {\n display: block;\n color: var(--_nys-tooltip-color);\n font-family: var(--_nys-tooltip-font-family);\n font-size: var(--_nys-tooltip-font-size);\n font-weight: 400;\n line-height: var(--_nys-tooltip-line-height);\n letter-spacing: var(--_nys-tooltip-letter-spacing);\n white-space: normal;\n word-break: break-word;\n overflow: hidden;\n text-overflow: ellipsis;\n display: -webkit-box;\n -webkit-line-clamp: 4;\n -webkit-box-orient: vertical;\n }\n\n /* Tooltip Arrow (default) */\n .nys-tooltip__arrow {\n position: absolute;\n width: 14px;\n height: 6px;\n background: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"15\" height=\"6\" viewBox=\"0 0 15 6\" fill=\"none\"><path d=\"M8.15079 5.44218C7.7763 5.76317 7.2237 5.76317 6.84921 5.44218L0.5 0H14.5L8.15079 5.44218Z\" fill=\"%231B1B1B\"/></svg>')\n no-repeat center;\n }\n\n .nys-tooltip__content[active] {\n display: block;\n }\n\n /* ===================== POSITIONING ===================== */\n /* Top */\n :host([position=\"top\"]) .nys-tooltip__content {\n bottom: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-bottom: 10px;\n }\n\n :host([position=\"top\"]) .nys-tooltip__arrow {\n top: 100%;\n left: var(--arrow-offset-x, 50%);\n transform: translateX(-50%);\n }\n\n /* Bottom */\n :host([position=\"bottom\"]) .nys-tooltip__content {\n top: 100%;\n left: 50%;\n transform: translateX(-50%);\n margin-top: 10px;\n }\n\n :host([position=\"bottom\"]) .nys-tooltip__arrow {\n bottom: 100%;\n left: var(--arrow-offset-x, 50%);\n transform: translateX(-50%) rotate(180deg);\n }\n\n /* Left */\n :host([position=\"left\"]) .nys-tooltip__content {\n left: auto;\n right: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-right: 10px;\n }\n\n :host([position=\"left\"]) .nys-tooltip__arrow {\n left: 100%;\n top: 50%;\n transform: translateY(-50%) rotate(-90deg);\n margin-left: -4px;\n }\n /* Right */\n :host([position=\"right\"]) .nys-tooltip__content {\n left: 100%;\n top: 50%;\n transform: translateY(-50%);\n margin-left: 10px;\n }\n\n :host([position=\"right\"]) .nys-tooltip__arrow {\n right: 100%;\n top: 50%;\n transform: translateY(-50%) rotate(90deg);\n margin-right: -4px;\n }\n\n :host([inverted]) .nys-tooltip__content {\n --_nys-tooltip-color: var(--nys-color-text, #1b1b1b);\n --_nys-tooltip-background-color: var(--nys-color-ink-reverse, #fff);\n }\n\n :host([inverted]) .nys-tooltip__arrow {\n background: url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"15\" height=\"6\" viewBox=\"0 0 15 6\" fill=\"none\"><path d=\"M8.15079 5.44218C7.7763 5.76317 7.2237 5.76317 6.84921 5.44218L0.5 0H14.5L8.15079 5.44218Z\" fill=\"white\"/></svg>')\n no-repeat center;\n }\n\n @media (max-width: 400px) {\n .nys-tooltip__content {\n max-width: calc(\n 100vw - 2rem\n ); /* 2rem = 32px = 16px margin on each side */\n }\n }\n`;\n","import { LitElement, html } from \"lit\";\nimport { property, state } from \"lit/decorators.js\";\nimport styles from \"./nys-tooltip.styles\";\n\nlet tooltipIdCounter = 0; // Counter for generating unique IDs\n\nexport class NysTooltip extends LitElement {\n @property({ type: String }) id = \"\";\n @property({ type: String }) text = \"\";\n @property({ type: Boolean, reflect: true }) inverted = false;\n @property({ type: Boolean, reflect: true }) focusable = false;\n\n // Track if tooltip is active (hovered or focused)\n @state()\n private _active = false;\n\n // Track if user set position is set explicitly\n private _userHasSetPosition = false;\n private _originalUserPosition: typeof this._position | null = null;\n // Internal flag to prevent dynamic positioning when not needed\n private _internallyUpdatingPosition = false;\n\n static styles = styles;\n\n /********************* Position Logic *********************/\n private _position: \"top\" | \"bottom\" | \"left\" | \"right\" | null = null;\n\n @property({ type: String, reflect: true })\n get position() {\n return this._position;\n }\n\n set position(value) {\n const oldVal = this._position;\n this._position = value;\n this.requestUpdate(\"position\", oldVal);\n\n // The \"_internallyUpdatingPosition\" flag allows user's set position to take preference\n if (!this._internallyUpdatingPosition) {\n this._userHasSetPosition = value !== null;\n this._originalUserPosition = value;\n }\n }\n\n /**************** Lifecycle Methods ****************/\n constructor() {\n super();\n }\n\n connectedCallback() {\n super.connectedCallback();\n\n // Generate a unique ID if not provided\n if (!this.id) {\n this.id = `nys-tooltip-${Date.now()}-${tooltipIdCounter++}`;\n }\n\n window.addEventListener(\"keydown\", this._handleEscapeKey);\n }\n\n disconnectedCallback() {\n super.disconnectedCallback();\n window.removeEventListener(\"keydown\", this._handleEscapeKey);\n }\n\n private get _firstAssignedEl(): HTMLElement | undefined {\n const slot = this.shadowRoot?.querySelector(\"slot\");\n return slot?.assignedElements({ flatten: true })[0] as\n | HTMLElement\n | undefined;\n }\n\n firstUpdated() {\n const slot = this.shadowRoot?.querySelector(\"slot\");\n if (slot) {\n slot.addEventListener(\"slotchange\", () => {\n const firstEl = this._firstAssignedEl;\n if (firstEl) {\n this._applyFocusBehavior(firstEl);\n }\n });\n }\n }\n\n updated(changedProps: Map<string, unknown>) {\n super.updated(changedProps);\n\n const firstEl = this._firstAssignedEl;\n if (!firstEl) return;\n\n // Accounts for tooltip's text change (for code editor changes & VO)\n if (changedProps.has(\"text\")) {\n this._passAria(firstEl);\n }\n if (changedProps.has(\"focusable\")) {\n this._applyFocusBehavior(firstEl);\n }\n }\n\n /******************** Event Handlers ********************/\n // When toggling tooltip, check if user has set position to give it preference it space allows. Otherwise dynamically position tooltip.\n private _handleTooltipEnter = () => {\n this._active = true;\n this._addScrollListeners();\n\n // Try to honor user's original preference first\n if (this._userHasSetPosition && this._originalUserPosition) {\n if (this._doesPositionFit(this._originalUserPosition)) {\n this.position = this._originalUserPosition;\n // Check if current tooltip position overflows to edge of screen\n this.updateComplete.then(() => {\n const tooltip = this.shadowRoot?.querySelector(\n \".nys-tooltip__content\",\n ) as HTMLElement;\n if (tooltip) this._shiftTooltipIntoViewport(tooltip);\n });\n return;\n }\n }\n\n // Otherwise fall back to auto logic\n this.autoPositionTooltip();\n };\n\n private _handleBlurOrMouseLeave = () => {\n this._active = false;\n this._removeScrollListeners();\n\n const tooltip = this.shadowRoot?.querySelector(\n \".nys-tooltip__content\",\n ) as HTMLElement;\n\n if (tooltip) {\n this._resetTooltipPositioningStyles(tooltip);\n }\n };\n\n // Listen to window scroll so a focus tooltip can auto position even when user move across the page\n private _addScrollListeners() {\n window.addEventListener(\"scroll\", this._handleScrollOrResize, true);\n window.addEventListener(\"resize\", this._handleScrollOrResize);\n }\n\n private _removeScrollListeners() {\n window.removeEventListener(\"scroll\", this._handleScrollOrResize, true);\n window.removeEventListener(\"resize\", this._handleScrollOrResize);\n }\n\n private _handleScrollOrResize = () => {\n if (!this._active) return;\n\n if (this._userHasSetPosition && this._originalUserPosition) {\n if (this._doesPositionFit(this._originalUserPosition)) {\n this._setInternalPosition(this._originalUserPosition);\n\n // Check if current tooltip position overflows to edge of screen\n this.updateComplete.then(() => {\n const tooltip = this.shadowRoot?.querySelector(\n \".nys-tooltip__content\",\n ) as HTMLElement;\n if (tooltip) this._shiftTooltipIntoViewport(tooltip);\n });\n } else {\n this.autoPositionTooltip();\n }\n } else {\n this.autoPositionTooltip();\n }\n };\n\n private _handleEscapeKey = (e: KeyboardEvent) => {\n if (e.key === \"Escape\" && this._active) {\n this._active = false;\n this._removeScrollListeners();\n\n const tooltip = this.shadowRoot?.querySelector(\n \".nys-tooltip__content\",\n ) as HTMLElement;\n if (tooltip) {\n this._resetTooltipPositioningStyles(tooltip);\n }\n }\n };\n\n /******************** Functions ********************/\n // We need to pass `ariaLabel` or `ariaDescription` to the nys-components so they can announce both their label and the tooltip's text\n private _passAria(el: HTMLElement) {\n const tagName = el.tagName.toLowerCase();\n\n if (tagName.startsWith(\"nys-\")) {\n if (tagName === \"nys-icon\") {\n // For nys-icon, use ariaLabel instead\n const existingLabel = el.getAttribute(\"ariaLabel\") || \"\";\n const mergedLabel = existingLabel\n ? `${existingLabel}, ${this.text}`\n : this.text;\n\n el.setAttribute(\"ariaLabel\", mergedLabel);\n } else {\n // For other components like nys-button, use ariaDescription\n el.setAttribute(\"ariaDescription\", this.text);\n }\n }\n }\n\n // Applies focus behavior to an otherwise non focus element (i.e. nys-icon is non focusable by default)\n private async _applyFocusBehavior(el: HTMLElement) {\n if (!this.focusable) return;\n\n const tagName = el.tagName.toLowerCase();\n if (tagName === \"nys-icon\") {\n if (\"updateComplete\" in el) {\n await (el as any).updateComplete;\n }\n const svg = el.shadowRoot?.querySelector(\"svg\");\n if (svg) {\n svg.setAttribute(\"tabindex\", \"0\");\n }\n } else {\n el.setAttribute(\"tabindex\", \"0\");\n }\n }\n\n // Checks if user's set position fit with current viewport (Does not account for overflow texts at this moment)\n private _doesPositionFit(position: typeof this._position) {\n const wrapper = this.shadowRoot?.querySelector(\".nys-tooltip__wrapper\");\n const tooltip = this.shadowRoot?.querySelector(\".nys-tooltip__content\");\n\n if (!wrapper || !tooltip || position == null) return;\n\n const triggerRect = wrapper.getBoundingClientRect();\n const tooltipRect = tooltip.getBoundingClientRect();\n\n // Define some margin buffer between tooltip and trigger (to avoid touching the edges too tightly)\n const margin = 8;\n\n // Available space on each side relative to trigger rect and viewport\n const spaceAvailable = {\n top: triggerRect.top - margin,\n left: triggerRect.left - margin,\n bottom: window.innerHeight - triggerRect.bottom - margin,\n right: window.innerWidth - triggerRect.right - margin,\n };\n\n // Check if tooltip fits on each side (compare available space vs tooltip size)\n const fits = {\n top: spaceAvailable.top >= tooltipRect.height,\n bottom: spaceAvailable.bottom >= tooltipRect.height,\n left: spaceAvailable.left >= tooltipRect.width,\n right: spaceAvailable.right >= tooltipRect.width,\n };\n\n return fits[position];\n }\n\n // Calculates the best placement based on available space (flips placement if it doesn't fit)\n private async autoPositionTooltip() {\n const wrapper = this.shadowRoot?.querySelector(\n \".nys-tooltip__wrapper\",\n ) as HTMLElement;\n const tooltip = this.shadowRoot?.querySelector(\n \".nys-tooltip__content\",\n ) as HTMLElement;\n\n if (!wrapper || !tooltip) return;\n\n const triggerRect = wrapper.getBoundingClientRect();\n const margin = 8;\n\n const spaceAvailable = {\n top: triggerRect.top - margin,\n left: triggerRect.left - margin,\n bottom: window.innerHeight - triggerRect.bottom - margin,\n right: window.innerWidth - triggerRect.right - margin,\n };\n\n // Default tryOrder for auto mode\n let tryOrder: Array<keyof typeof spaceAvailable> = [\n \"top\",\n \"bottom\",\n \"right\",\n \"left\",\n ];\n\n // If user explicitly set a preferred position (even if it didn’t fit),\n // favor it first before trying others\n if (this._userHasSetPosition && this._originalUserPosition) {\n const userPosition = this._originalUserPosition;\n if (userPosition === \"left\") {\n tryOrder = [\"left\", \"right\", \"top\", \"bottom\"];\n } else if (userPosition === \"right\") {\n tryOrder = [\"right\", \"left\", \"top\", \"bottom\"];\n } else if (userPosition === \"top\") {\n tryOrder = [\"top\", \"bottom\", \"right\", \"left\"];\n } else if (userPosition === \"bottom\") {\n tryOrder = [\"bottom\", \"top\", \"right\", \"left\"];\n }\n }\n\n // 1) Try to find the first side that fits\n for (const pos of tryOrder) {\n if (this._doesPositionFit(pos)) {\n this._setInternalPosition(pos);\n await this.updateComplete;\n this._shiftTooltipIntoViewport(tooltip);\n return;\n }\n }\n\n // 2) Fallback: pick the side with the most space\n let bestPosition: keyof typeof spaceAvailable = \"top\";\n let maxSpace = spaceAvailable.top;\n\n for (const pos of tryOrder) {\n if (spaceAvailable[pos] > maxSpace) {\n maxSpace = spaceAvailable[pos];\n bestPosition = pos;\n }\n }\n this._setInternalPosition(bestPosition);\n await this.updateComplete;\n this._shiftTooltipIntoViewport(tooltip);\n }\n\n // Sets flag to distinguish to position's setter that we are updating \"position\" prop internally\n private _setInternalPosition(bestPosition: typeof this._position) {\n this._internallyUpdatingPosition = true;\n this.position = bestPosition;\n this._internallyUpdatingPosition = false;\n }\n\n // Determines if text of tooltip over-extends outside of viewport edge and adjust tooltip for horizontal overflow\n private _shiftTooltipIntoViewport(tooltip: HTMLElement) {\n const wrapper = this.shadowRoot?.querySelector(\n \".nys-tooltip__wrapper\",\n ) as HTMLElement;\n\n const wrapperRect = wrapper.getBoundingClientRect();\n const tooltipRect = tooltip.getBoundingClientRect();\n\n const wrapperCenter = wrapperRect.left + wrapperRect.width / 2;\n\n const overflowLeft = tooltipRect.left < 0;\n const overflowRight = tooltipRect.right > window.innerWidth;\n\n this._resetTooltipPositioningStyles(tooltip);\n\n // Tooltip is past the viewport edge, shift it inwards\n if (overflowLeft) {\n tooltip.style.left = \"0px\";\n tooltip.style.transform = \"none\";\n } else if (overflowRight) {\n tooltip.style.right = \"0px\";\n tooltip.style.left = \"auto\";\n tooltip.style.transform = \"none\";\n }\n\n // Recalculate tooltip rect after any shift\n const newTooltipRect = tooltip.getBoundingClientRect();\n\n // Arrow offset relative to tooltip width to maintain accuracy on zoom and out-of-bounds\n const arrowOffsetRatio =\n (wrapperCenter - newTooltipRect.left) / newTooltipRect.width;\n const arrowOffsetPercent = Math.max(0, Math.min(1, arrowOffsetRatio)) * 100;\n\n tooltip.style.setProperty(\"--arrow-offset-x\", `${arrowOffsetPercent}%`);\n }\n\n // Reposition tooltip back to original set position (e.g. top, left, bottom, right) to avoid positioning issue base on last position\n private _resetTooltipPositioningStyles(tooltip: HTMLElement) {\n tooltip.style.left = \"\";\n tooltip.style.right = \"\";\n tooltip.style.transform = \"\";\n }\n\n render() {\n return html`\n <div class=\"nys-tooltip__main\">\n <div\n class=\"nys-tooltip__wrapper\"\n @mouseenter=${this._handleTooltipEnter}\n @mouseleave=${this._handleBlurOrMouseLeave}\n @focusin=${this._handleTooltipEnter}\n @focusout=${this._handleBlurOrMouseLeave}\n >\n <span class=\"nys-tooltip__trigger\">\n <slot></slot>\n </span>\n </div>\n ${this.text?.trim()\n ? html`<div\n id=${this.id}\n class=\"nys-tooltip__content\"\n role=\"tooltip\"\n aria-hidden=${!this._active}\n ?active=${this._active}\n >\n <div class=\"nys-tooltip__inner\">${this.text}</div>\n <span class=\"nys-tooltip__arrow\"></span>\n </div>`\n : \"\"}\n </div>\n `;\n }\n}\n\nif (!customElements.get(\"nys-tooltip\")) {\n customElements.define(\"nys-tooltip\", NysTooltip);\n}\n"],"names":["t","e","s","o","n$2","r","n","S","c","i","h","a","l","p","d","u","f","b","y","styles","css","tooltipIdCounter","_NysTooltip","LitElement","tooltip","value","oldVal","slot","firstEl","changedProps","el","tagName","existingLabel","mergedLabel","svg","position","wrapper","triggerRect","tooltipRect","margin","spaceAvailable","tryOrder","userPosition","pos","bestPosition","maxSpace","wrapperRect","wrapperCenter","overflowLeft","overflowRight","newTooltipRect","arrowOffsetRatio","arrowOffsetPercent","html","NysTooltip","__decorateClass","property","state"],"mappings":";;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,MAAMA,IAAE,YAAWC,IAAED,EAAE,eAAsBA,EAAE,aAAX,UAAqBA,EAAE,SAAS,iBAAe,wBAAuB,SAAS,aAAW,aAAY,cAAc,WAAUE,IAAE,OAAM,GAAGC,IAAE,oBAAI;AAAO,IAAAC,IAAC,MAAO;AAAA,EAAC,YAAY,GAAE,G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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nysds/nys-tooltip",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.11.0",
|
|
4
4
|
"description": "The Tooltip component from the NYS Design System.",
|
|
5
5
|
"module": "dist/nys-tooltip.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -22,13 +22,10 @@
|
|
|
22
22
|
"test:watch": "vite build && wtr --watch",
|
|
23
23
|
"lit-analyze": "lit-analyzer '**/*.ts'"
|
|
24
24
|
},
|
|
25
|
-
"peerDependencies": {
|
|
26
|
-
"lit": "^3.2.1"
|
|
27
|
-
},
|
|
28
25
|
"devDependencies": {
|
|
29
26
|
"lit": "^3.2.1",
|
|
30
27
|
"typescript": "^5.7.2",
|
|
31
|
-
"vite": "^
|
|
28
|
+
"vite": "^7.1.2"
|
|
32
29
|
},
|
|
33
30
|
"keywords": [
|
|
34
31
|
"new-york-state",
|