@turquoisehealth/pit-viper 2.122.1-dev.0 → 2.123.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/package.json +1 -1
- package/pv-components/dist/stats/vue/base/stats.html +1 -1
- package/pv-components/dist/stats/vue/visualizations/stats.html +1 -1
- package/pv-components/dist/stats/web/pv-button-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-drawer-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-expandable-content-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-ghost-input-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-insight-card-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-multi-select-button-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-pagination-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-popover-v2-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-select-button-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-toast-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-toggle-group-stats.html +1 -1
- package/pv-components/dist/stats/web/pv-tooltip-v2-stats.html +1 -1
- package/pv-components/dist/vue/base/components/base/PvButton/helpers.d.ts +0 -1
- package/pv-components/dist/vue/base/components/base/PvMenu/PvMenuControlPanel.vue.d.ts +0 -6
- package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +289 -206
- package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/types.d.ts +0 -31
- package/pv-components/dist/vue/base/components/base/PvPopoverV2/PvPopoverV2.vue.d.ts +1 -0
- package/pv-components/dist/vue/base/components/base/PvPopoverV2/types.d.ts +1 -6
- package/pv-components/dist/vue/base/components/base/PvSelectButton/PvSelectButton.vue.d.ts +177 -20
- package/pv-components/dist/vue/base/components/base/PvSelectButton/PvSelectButtonTrigger/PvSelectButtonTrigger.vue.d.ts +9 -4
- package/pv-components/dist/vue/base/pv-components-base.mjs +2713 -2704
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +3296 -4299
- package/pv-components/dist/web/components/pv-button/pv-button.js +43 -43
- package/pv-components/dist/web/components/pv-drawer/pv-drawer.js +159 -159
- package/pv-components/dist/web/components/pv-expandable-content/pv-expandable-content.js +87 -87
- package/pv-components/dist/web/components/pv-ghost-input/pv-ghost-input.js +76 -76
- package/pv-components/dist/web/components/pv-insight-card/pv-insight-card.js +78 -78
- package/pv-components/dist/web/components/pv-multi-select-button/pv-multi-select-button.js +2185 -7690
- package/pv-components/dist/web/components/pv-pagination/pv-pagination.js +92 -92
- package/pv-components/dist/web/components/pv-popover-v2/pv-popover-v2.js +768 -852
- package/pv-components/dist/web/components/pv-select-button/pv-select-button.js +2139 -7599
- package/pv-components/dist/web/components/pv-toast/pv-toast.js +58 -58
- package/pv-components/dist/web/components/pv-toggle-group/pv-toggle-group.js +1638 -1722
- package/pv-components/dist/web/components/pv-tooltip-v2/pv-tooltip-v2.js +1481 -1565
- package/pv-components/dist/web/pv-components.iife.js +50 -50
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import { ref as S, getCurrentInstance as w, defineComponent as
|
|
1
|
+
import { ref as S, getCurrentInstance as w, defineComponent as g, computed as _, createElementBlock as m, openBlock as p, normalizeClass as P, createElementVNode as x, normalizeStyle as $, createBlock as v, Fragment as A, createCommentVNode as b, toDisplayString as k, mergeModels as B, useTemplateRef as T, useModel as z, onMounted as O, watch as j, renderSlot as M, withDirectives as N, mergeProps as R, vModelText as V, defineCustomElement as W } from "vue";
|
|
2
2
|
function D() {
|
|
3
3
|
const t = S(!1), n = w()?.root || {};
|
|
4
4
|
return "isCE" in n && n.isCE === !0 && (t.value = !0), t;
|
|
5
5
|
}
|
|
6
|
-
const L = [void 0, 10, 12, 20, 24, 32, 64], G = ["xlink:href"], C = /* @__PURE__ */
|
|
6
|
+
const L = [void 0, 10, 12, 20, 24, 32, 64], G = ["xlink:href"], C = /* @__PURE__ */ g({
|
|
7
7
|
__name: "PvIcon",
|
|
8
8
|
props: {
|
|
9
9
|
name: { type: String },
|
|
10
10
|
size: { type: null }
|
|
11
11
|
},
|
|
12
12
|
setup(t) {
|
|
13
|
-
const e = t, n = D(),
|
|
13
|
+
const e = t, n = D(), a = S(null), s = _(() => ({
|
|
14
14
|
"pv-icon": !0,
|
|
15
15
|
[`pv-icon-${e.size}`]: L.includes(e.size)
|
|
16
|
-
})),
|
|
17
|
-
return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (
|
|
16
|
+
})), o = _(() => n.value && a.value ? `${a.value}#${e.name}` : `#${e.name}`);
|
|
17
|
+
return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (a.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), (d, l) => (p(), m(
|
|
18
18
|
"svg",
|
|
19
19
|
{
|
|
20
20
|
"data-testid": "pv-icon",
|
|
21
21
|
"aria-hidden": "true",
|
|
22
|
-
class: P(
|
|
22
|
+
class: P(s.value)
|
|
23
23
|
},
|
|
24
24
|
[
|
|
25
|
-
x("use", { "xlink:href":
|
|
25
|
+
x("use", { "xlink:href": o.value }, null, 8, G)
|
|
26
26
|
],
|
|
27
27
|
2
|
|
28
28
|
/* CLASS */
|
|
29
29
|
));
|
|
30
30
|
}
|
|
31
|
-
}), H = /* @__PURE__ */
|
|
31
|
+
}), H = /* @__PURE__ */ g({
|
|
32
32
|
__name: "PvSpinner",
|
|
33
33
|
props: {
|
|
34
34
|
variant: { default: "primary", type: String },
|
|
@@ -46,7 +46,7 @@ const L = [void 0, 10, 12, 20, 24, 32, 64], G = ["xlink:href"], C = /* @__PURE__
|
|
|
46
46
|
dark: "pv-spinner-dark",
|
|
47
47
|
white: "pv-spinner-light"
|
|
48
48
|
};
|
|
49
|
-
return (
|
|
49
|
+
return (a, s) => (p(), m(
|
|
50
50
|
"div",
|
|
51
51
|
{
|
|
52
52
|
"data-testid": "pv-spinner",
|
|
@@ -58,14 +58,14 @@ const L = [void 0, 10, 12, 20, 24, 32, 64], G = ["xlink:href"], C = /* @__PURE__
|
|
|
58
58
|
/* CLASS, STYLE */
|
|
59
59
|
));
|
|
60
60
|
}
|
|
61
|
-
}),
|
|
61
|
+
}), E = {
|
|
62
62
|
md: "pv-button-small",
|
|
63
63
|
lg: void 0,
|
|
64
64
|
xl: "pv-button-large"
|
|
65
|
-
},
|
|
65
|
+
}, J = (t) => t == null || !E.hasOwnProperty(t) ? null : E[t] || null, U = ["disabled"], q = {
|
|
66
66
|
key: 1,
|
|
67
67
|
"data-testid": "pv-button-label"
|
|
68
|
-
},
|
|
68
|
+
}, F = /* @__PURE__ */ g({
|
|
69
69
|
__name: "PvButton",
|
|
70
70
|
props: {
|
|
71
71
|
variant: { default: "primary", type: String },
|
|
@@ -78,15 +78,15 @@ const L = [void 0, 10, 12, 20, 24, 32, 64], G = ["xlink:href"], C = /* @__PURE__
|
|
|
78
78
|
inverse: { type: Boolean, default: !1 }
|
|
79
79
|
},
|
|
80
80
|
setup(t) {
|
|
81
|
-
const e =
|
|
81
|
+
const e = ["ghost"], n = t, a = _(() => {
|
|
82
82
|
const s = [];
|
|
83
|
-
|
|
84
|
-
const o =
|
|
83
|
+
n.inverse && e.includes(n.variant) ? s.push(`pv-button-${n.variant}-inverse`) : s.push(`pv-button-${n.variant}`);
|
|
84
|
+
const o = J(n.size);
|
|
85
85
|
return o && s.push(o), s;
|
|
86
86
|
});
|
|
87
87
|
return (s, o) => (p(), m("button", {
|
|
88
88
|
type: "button",
|
|
89
|
-
class: P(
|
|
89
|
+
class: P(a.value),
|
|
90
90
|
disabled: t.disabled,
|
|
91
91
|
"data-testid": "pv-button"
|
|
92
92
|
}, [
|
|
@@ -101,26 +101,26 @@ const L = [void 0, 10, 12, 20, 24, 32, 64], G = ["xlink:href"], C = /* @__PURE__
|
|
|
101
101
|
key: 0,
|
|
102
102
|
name: t.leftIcon,
|
|
103
103
|
"data-testid": "pv-button-left-icon"
|
|
104
|
-
}, null, 8, ["name"])) :
|
|
104
|
+
}, null, 8, ["name"])) : b("v-if", !0),
|
|
105
105
|
t.label ? (p(), m(
|
|
106
106
|
"span",
|
|
107
|
-
|
|
107
|
+
q,
|
|
108
108
|
k(t.label),
|
|
109
109
|
1
|
|
110
110
|
/* TEXT */
|
|
111
|
-
)) :
|
|
111
|
+
)) : b("v-if", !0),
|
|
112
112
|
t.rightIcon ? (p(), v(C, {
|
|
113
113
|
key: 2,
|
|
114
114
|
name: t.rightIcon,
|
|
115
115
|
"data-testid": "pv-button-right-icon"
|
|
116
|
-
}, null, 8, ["name"])) :
|
|
116
|
+
}, null, 8, ["name"])) : b("v-if", !0)
|
|
117
117
|
],
|
|
118
118
|
64
|
|
119
119
|
/* STABLE_FRAGMENT */
|
|
120
120
|
))
|
|
121
|
-
], 10,
|
|
121
|
+
], 10, U));
|
|
122
122
|
}
|
|
123
|
-
}),
|
|
123
|
+
}), Z = ["data-style"], K = ["placeholder", "disabled", "name"], Q = /* @__PURE__ */ g({
|
|
124
124
|
__name: "PvGhostInput",
|
|
125
125
|
props: /* @__PURE__ */ B({
|
|
126
126
|
variant: { default: "h1", type: null },
|
|
@@ -142,7 +142,7 @@ const L = [void 0, 10, 12, 20, 24, 32, 64], G = ["xlink:href"], C = /* @__PURE__
|
|
|
142
142
|
"text-md": "ghost-input-text-medium",
|
|
143
143
|
"text-sm": "ghost-input-text-small",
|
|
144
144
|
caption: "ghost-input-caption"
|
|
145
|
-
},
|
|
145
|
+
}, a = {
|
|
146
146
|
h1: "h1",
|
|
147
147
|
h2: "h2",
|
|
148
148
|
h3: "h3",
|
|
@@ -151,35 +151,35 @@ const L = [void 0, 10, 12, 20, 24, 32, 64], G = ["xlink:href"], C = /* @__PURE__
|
|
|
151
151
|
"text-md": "text-medium",
|
|
152
152
|
"text-lg": "text-large",
|
|
153
153
|
caption: "caption"
|
|
154
|
-
},
|
|
154
|
+
}, s = t, o = z(t, "modelValue"), d = S(0), l = () => {
|
|
155
155
|
e.value?.focus();
|
|
156
156
|
};
|
|
157
157
|
O(() => {
|
|
158
|
-
|
|
158
|
+
o.value && o.value.length > 0 ? c(o.value) : s.placeholder ? c(s.placeholder) : d.value = 240;
|
|
159
159
|
}), j(
|
|
160
|
-
() =>
|
|
160
|
+
() => o.value,
|
|
161
161
|
() => {
|
|
162
|
-
|
|
162
|
+
o.value && o.value.length > 0 ? c(o.value) : s.placeholder ? c(s.placeholder) : d.value = 240;
|
|
163
163
|
}
|
|
164
164
|
);
|
|
165
|
-
const c = (
|
|
165
|
+
const c = (i) => {
|
|
166
166
|
if (!e.value) return;
|
|
167
167
|
const u = document.createElement("canvas").getContext("2d");
|
|
168
168
|
if (!u) return;
|
|
169
169
|
const h = getComputedStyle(e.value);
|
|
170
|
-
u.font = `${h.fontWeight} ${h.fontSize} ${h.fontFamily}`, d.value = u.measureText(
|
|
170
|
+
u.font = `${h.fontWeight} ${h.fontSize} ${h.fontFamily}`, d.value = u.measureText(i).width + 10;
|
|
171
171
|
};
|
|
172
|
-
return (
|
|
172
|
+
return (i, r) => (p(), m("div", {
|
|
173
173
|
class: "pv-ghost-input pv-full-width",
|
|
174
174
|
"data-testid": "pv-ghost-input",
|
|
175
|
-
"data-style":
|
|
175
|
+
"data-style": a[t.variant]
|
|
176
176
|
}, [
|
|
177
|
-
M(
|
|
177
|
+
M(i.$slots, "action"),
|
|
178
178
|
N(x("input", R({
|
|
179
179
|
ref_key: "inputRef",
|
|
180
180
|
ref: e
|
|
181
|
-
},
|
|
182
|
-
"onUpdate:modelValue":
|
|
181
|
+
}, s, {
|
|
182
|
+
"onUpdate:modelValue": r[0] || (r[0] = (u) => o.value = u),
|
|
183
183
|
type: "text",
|
|
184
184
|
style: {
|
|
185
185
|
width: d.value + "px"
|
|
@@ -187,35 +187,35 @@ const L = [void 0, 10, 12, 20, 24, 32, 64], G = ["xlink:href"], C = /* @__PURE__
|
|
|
187
187
|
placeholder: t.placeholder,
|
|
188
188
|
disabled: t.disabled,
|
|
189
189
|
name: n[t.variant]
|
|
190
|
-
}), null, 16,
|
|
191
|
-
[V,
|
|
190
|
+
}), null, 16, K), [
|
|
191
|
+
[V, o.value]
|
|
192
192
|
]),
|
|
193
|
-
t.showEditIcon ? (p(), v(
|
|
193
|
+
t.showEditIcon ? (p(), v(F, {
|
|
194
194
|
key: 0,
|
|
195
195
|
"left-icon": "edit",
|
|
196
196
|
variant: "ghost",
|
|
197
197
|
onClick: l
|
|
198
|
-
})) :
|
|
199
|
-
], 8,
|
|
198
|
+
})) : b("v-if", !0)
|
|
199
|
+
], 8, Z));
|
|
200
200
|
}
|
|
201
|
-
}),
|
|
202
|
-
function
|
|
203
|
-
return !
|
|
201
|
+
}), X = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
202
|
+
function Y(t) {
|
|
203
|
+
return !X.has(t);
|
|
204
204
|
}
|
|
205
205
|
function y(t, e) {
|
|
206
206
|
const n = document.querySelector('link[href*="' + e + '"]');
|
|
207
207
|
if (!t.shadowRoot)
|
|
208
208
|
return !1;
|
|
209
209
|
if (n && t.shadowRoot) {
|
|
210
|
-
const
|
|
211
|
-
if (t.shadowRoot.querySelector(`link[href="${
|
|
210
|
+
const a = n.href;
|
|
211
|
+
if (t.shadowRoot.querySelector(`link[href="${a}"]`))
|
|
212
212
|
return;
|
|
213
|
-
const
|
|
214
|
-
return
|
|
213
|
+
const s = document.createElement("link");
|
|
214
|
+
return s.rel = "stylesheet", s.href = a, t.shadowRoot.prepend(s), !0;
|
|
215
215
|
}
|
|
216
216
|
return !1;
|
|
217
217
|
}
|
|
218
|
-
function
|
|
218
|
+
function tt(t) {
|
|
219
219
|
if (!y(t, "pit-viper-v2")) {
|
|
220
220
|
if (y(t, "pit-viper")) {
|
|
221
221
|
y(t, "pit-viper-v2-scoped");
|
|
@@ -226,21 +226,21 @@ function et(t) {
|
|
|
226
226
|
);
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
|
-
const
|
|
230
|
-
function
|
|
229
|
+
const et = (t) => ({ shadowRoot: Y(t) });
|
|
230
|
+
function nt(t, e) {
|
|
231
231
|
return e === null ? !1 : e === "" || e === "true" ? !0 : (e === "false" || console.warn(
|
|
232
232
|
`Invalid boolean attribute value for "${t}": "${e}". Expected "true", "false", or empty string.`
|
|
233
233
|
), !1);
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function st(t, e) {
|
|
236
236
|
const n = Number(e);
|
|
237
237
|
return isNaN(n) && console.warn(`Invalid number attribute value for "${t}": "${e}". Expected a valid number.`), n;
|
|
238
238
|
}
|
|
239
|
-
function
|
|
240
|
-
const e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(),
|
|
241
|
-
return
|
|
242
|
-
l === Boolean || l && l.type === Boolean ? e.add(d) : l === Number || l && l.type === Number ? n.add(d) : (l === Object || l === Array || l && (l.type === Object || l.type === Array)) &&
|
|
243
|
-
}), { booleanProps: e, numberProps: n, jsonProps:
|
|
239
|
+
function ot(t) {
|
|
240
|
+
const e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), o = (t.__vccOpts || t).props;
|
|
241
|
+
return o && typeof o == "object" && Object.entries(o).forEach(([d, l]) => {
|
|
242
|
+
l === Boolean || l && l.type === Boolean ? e.add(d) : l === Number || l && l.type === Number ? n.add(d) : (l === Object || l === Array || l && (l.type === Object || l.type === Array)) && a.add(d);
|
|
243
|
+
}), { booleanProps: e, numberProps: n, jsonProps: a };
|
|
244
244
|
}
|
|
245
245
|
function I(t, e) {
|
|
246
246
|
try {
|
|
@@ -251,11 +251,11 @@ function I(t, e) {
|
|
|
251
251
|
), null;
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
function
|
|
254
|
+
function at(t) {
|
|
255
255
|
const e = t.__name || t.name;
|
|
256
256
|
if (!e)
|
|
257
257
|
throw new Error("Component must have a __name or name property");
|
|
258
|
-
const n = W(t,
|
|
258
|
+
const n = W(t, et(e)), { booleanProps: a, numberProps: s, jsonProps: o } = ot(t);
|
|
259
259
|
class d extends n {
|
|
260
260
|
_hiddenInput = null;
|
|
261
261
|
constructor() {
|
|
@@ -272,23 +272,23 @@ function rt(t) {
|
|
|
272
272
|
this._hiddenInput && (this._hiddenInput.value = c ?? "");
|
|
273
273
|
}
|
|
274
274
|
_parseAttributes() {
|
|
275
|
-
|
|
276
|
-
const
|
|
277
|
-
this[
|
|
278
|
-
}),
|
|
279
|
-
const
|
|
280
|
-
|
|
281
|
-
}),
|
|
282
|
-
const
|
|
283
|
-
if (
|
|
284
|
-
const u = I(
|
|
285
|
-
u !== null && (this[
|
|
275
|
+
a.forEach((i) => {
|
|
276
|
+
const r = this.getAttribute(i);
|
|
277
|
+
this[i] = nt(i, r);
|
|
278
|
+
}), s.forEach((i) => {
|
|
279
|
+
const r = this.getAttribute(i);
|
|
280
|
+
r !== null && (this[i] = st(i, r));
|
|
281
|
+
}), o.forEach((i) => {
|
|
282
|
+
const r = this.getAttribute(i);
|
|
283
|
+
if (r !== null) {
|
|
284
|
+
const u = I(i, r);
|
|
285
|
+
u !== null && (this[i] = u);
|
|
286
286
|
}
|
|
287
287
|
});
|
|
288
288
|
const c = this.getAttribute("data-json-props");
|
|
289
|
-
c && c.split(",").map((
|
|
290
|
-
const u =
|
|
291
|
-
let h = this.getAttribute(
|
|
289
|
+
c && c.split(",").map((r) => r.trim()).filter(Boolean).forEach((r) => {
|
|
290
|
+
const u = r.replace(/-([a-z])/g, (f) => f[1].toUpperCase());
|
|
291
|
+
let h = this.getAttribute(r);
|
|
292
292
|
if (h === null) {
|
|
293
293
|
const f = u.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
294
294
|
h = this.getAttribute(f);
|
|
@@ -300,7 +300,7 @@ function rt(t) {
|
|
|
300
300
|
});
|
|
301
301
|
}
|
|
302
302
|
connectedCallback() {
|
|
303
|
-
this._parseAttributes(), super.connectedCallback?.(),
|
|
303
|
+
this._parseAttributes(), super.connectedCallback?.(), tt(this);
|
|
304
304
|
const c = this.getAttribute("name");
|
|
305
305
|
c && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = c, this.after(this._hiddenInput));
|
|
306
306
|
}
|
|
@@ -310,11 +310,11 @@ function rt(t) {
|
|
|
310
310
|
function it(t) {
|
|
311
311
|
return t.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
312
312
|
}
|
|
313
|
-
function
|
|
313
|
+
function rt(t) {
|
|
314
314
|
const e = t.__name || t.name;
|
|
315
315
|
if (!e)
|
|
316
316
|
throw new Error("Component must have a __name or name property");
|
|
317
|
-
const n = it(e),
|
|
318
|
-
customElements.get(n) || customElements.define(n,
|
|
317
|
+
const n = it(e), a = at(t);
|
|
318
|
+
customElements.get(n) || customElements.define(n, a);
|
|
319
319
|
}
|
|
320
|
-
|
|
320
|
+
rt(Q);
|