@turquoisehealth/pit-viper 2.122.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 +43 -13
- package/pv-components/dist/stats/vue/base/stats.html +4949 -0
- package/pv-components/dist/stats/vue/visualizations/stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-accordion-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-action-bar-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-ai-button-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-avatar-group-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-avatar-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-banner-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-breadcrumbs-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-button-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-card-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-checkbox-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-company-label-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-company-logo-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-company-tag-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-counter-badge-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-date-picker-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-date-time-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-distribution-bar-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-drawer-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-dropdown-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-expandable-content-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-ghost-input-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-icon-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-input-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-insight-card-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-modal-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-multi-select-button-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-pagination-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-pill-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-popover-menu-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-popover-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-popover-v2-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-progress-bar-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-rating-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-release-badge-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-search-input-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-segmented-control-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-select-button-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-selectable-card-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-side-panel-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-skeleton-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-spinner-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-sprite-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-suggestion-tag-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-switch-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-tab-list-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-tabs-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-tag-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-text-area-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-toast-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-toggle-button-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-toggle-group-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-tooltip-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-tooltip-v2-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-tree-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-widget-stats.html +4949 -0
- package/pv-components/dist/vue/base/pv-components-base.mjs +4862 -11539
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +4751 -11704
- package/pv-components/dist/web/components/pv-accordion/pv-accordion.js +265 -0
- package/pv-components/dist/web/components/pv-action-bar/pv-action-bar.js +134 -0
- package/pv-components/dist/web/components/pv-ai-button/pv-ai-button.js +225 -0
- package/pv-components/dist/web/components/pv-avatar/pv-avatar.js +164 -0
- package/pv-components/dist/web/components/pv-avatar-group/pv-avatar-group.js +170 -0
- package/pv-components/dist/web/components/pv-banner/pv-banner.js +224 -0
- package/pv-components/dist/web/components/pv-breadcrumbs/pv-breadcrumbs.js +160 -0
- package/pv-components/dist/web/components/pv-button/pv-button.js +242 -0
- package/pv-components/dist/web/components/pv-card/pv-card.js +148 -0
- package/pv-components/dist/web/components/pv-checkbox/pv-checkbox.js +145 -0
- package/pv-components/dist/web/components/pv-company-label/pv-company-label.js +221 -0
- package/pv-components/dist/web/components/pv-company-logo/pv-company-logo.js +192 -0
- package/pv-components/dist/web/components/pv-company-tag/pv-company-tag.js +274 -0
- package/pv-components/dist/web/components/pv-counter-badge/pv-counter-badge.js +157 -0
- package/pv-components/dist/web/components/pv-date-picker/pv-date-picker.js +7550 -0
- package/pv-components/dist/web/components/pv-date-time/pv-date-time.js +645 -0
- package/pv-components/dist/web/components/pv-distribution-bar/pv-distribution-bar.js +177 -0
- package/pv-components/dist/web/components/pv-drawer/pv-drawer.js +556 -0
- package/pv-components/dist/web/components/pv-dropdown/pv-dropdown.js +1792 -0
- package/pv-components/dist/web/components/pv-expandable-content/pv-expandable-content.js +304 -0
- package/pv-components/dist/web/components/pv-ghost-input/pv-ghost-input.js +320 -0
- package/pv-components/dist/web/components/pv-icon/pv-icon.js +150 -0
- package/pv-components/dist/web/components/pv-input/pv-input.js +191 -0
- package/pv-components/dist/web/components/pv-insight-card/pv-insight-card.js +363 -0
- package/pv-components/dist/web/components/pv-modal/pv-modal.js +186 -0
- package/pv-components/dist/web/components/pv-multi-select-button/pv-multi-select-button.js +2821 -0
- package/pv-components/dist/web/components/pv-pagination/pv-pagination.js +355 -0
- package/pv-components/dist/web/components/pv-pill/pv-pill.js +229 -0
- package/pv-components/dist/web/components/pv-popover/pv-popover.js +1485 -0
- package/pv-components/dist/web/components/pv-popover-menu/pv-popover-menu.js +1507 -0
- package/pv-components/dist/web/components/pv-popover-v2/pv-popover-v2.js +1489 -0
- package/pv-components/dist/web/components/pv-progress-bar/pv-progress-bar.js +156 -0
- package/pv-components/dist/web/components/pv-rating/pv-rating.js +146 -0
- package/pv-components/dist/web/components/pv-release-badge/pv-release-badge.js +142 -0
- package/pv-components/dist/web/components/pv-search-input/pv-search-input.js +238 -0
- package/pv-components/dist/web/components/pv-segmented-control/pv-segmented-control.js +214 -0
- package/pv-components/dist/web/components/pv-select-button/pv-select-button.js +2633 -0
- package/pv-components/dist/web/components/pv-selectable-card/pv-selectable-card.js +153 -0
- package/pv-components/dist/web/components/pv-side-panel/pv-side-panel.js +148 -0
- package/pv-components/dist/web/components/pv-skeleton/pv-skeleton.js +1593 -0
- package/pv-components/dist/web/components/pv-spinner/pv-spinner.js +151 -0
- package/pv-components/dist/web/components/pv-sprite/pv-sprite.js +150 -0
- package/pv-components/dist/web/components/pv-suggestion-tag/pv-suggestion-tag.js +195 -0
- package/pv-components/dist/web/components/pv-switch/pv-switch.js +162 -0
- package/pv-components/dist/web/components/pv-tab-list/pv-tab-list.js +168 -0
- package/pv-components/dist/web/components/pv-tabs/pv-tabs.js +248 -0
- package/pv-components/dist/web/components/pv-tag/pv-tag.js +210 -0
- package/pv-components/dist/web/components/pv-text-area/pv-text-area.js +188 -0
- package/pv-components/dist/web/components/pv-toast/pv-toast.js +292 -0
- package/pv-components/dist/web/components/pv-toggle-button/pv-toggle-button.js +208 -0
- package/pv-components/dist/web/components/pv-toggle-group/pv-toggle-group.js +7395 -0
- package/pv-components/dist/web/components/pv-tooltip/pv-tooltip.js +158 -0
- package/pv-components/dist/web/components/pv-tooltip-v2/pv-tooltip-v2.js +7325 -0
- package/pv-components/dist/web/components/pv-tree/pv-tree.js +5107 -0
- package/pv-components/dist/web/components/pv-widget/pv-widget.js +159 -0
- package/pv-components/dist/web/pv-components.iife.js +46 -46
- package/pv-components/dist/web/vue.runtime.esm-browser.prod.js +7 -0
- package/pv-components/dist/vue/base/pv-components-base.js +0 -1555
- package/pv-components/dist/vue/base/pv-components-base.umd.js +0 -1555
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.js +0 -185
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.umd.js +0 -185
|
@@ -0,0 +1,556 @@
|
|
|
1
|
+
import { watch as U, getCurrentScope as Y, onScopeDispose as ee, computed as _, toValue as S, unref as te, defineComponent as E, mergeModels as j, useTemplateRef as J, useModel as V, onMounted as K, createElementBlock as b, openBlock as f, withDirectives as ne, createCommentVNode as y, createElementVNode as w, normalizeClass as A, vModelText as se, toDisplayString as C, ref as F, getCurrentInstance as oe, normalizeStyle as re, createBlock as T, Fragment as Z, renderSlot as x, createVNode as D, mergeProps as ie, defineCustomElement as le } from "vue";
|
|
2
|
+
function ae(e) {
|
|
3
|
+
return Y() ? (ee(e), !0) : !1;
|
|
4
|
+
}
|
|
5
|
+
const Q = typeof window < "u" && typeof document < "u";
|
|
6
|
+
typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
|
|
7
|
+
const ue = Object.prototype.toString, ce = (e) => ue.call(e) === "[object Object]", P = () => {
|
|
8
|
+
}, de = /* @__PURE__ */ pe();
|
|
9
|
+
function pe() {
|
|
10
|
+
var e, t;
|
|
11
|
+
return Q && ((e = window?.navigator) == null ? void 0 : e.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((t = window?.navigator) == null ? void 0 : t.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window?.navigator.userAgent));
|
|
12
|
+
}
|
|
13
|
+
function B(e) {
|
|
14
|
+
return Array.isArray(e) ? e : [e];
|
|
15
|
+
}
|
|
16
|
+
function fe(e, t, n) {
|
|
17
|
+
return U(
|
|
18
|
+
e,
|
|
19
|
+
t,
|
|
20
|
+
{
|
|
21
|
+
...n,
|
|
22
|
+
immediate: !0
|
|
23
|
+
}
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
const z = Q ? window : void 0;
|
|
27
|
+
function k(e) {
|
|
28
|
+
var t;
|
|
29
|
+
const n = S(e);
|
|
30
|
+
return (t = n?.$el) != null ? t : n;
|
|
31
|
+
}
|
|
32
|
+
function I(...e) {
|
|
33
|
+
const t = [], n = () => {
|
|
34
|
+
t.forEach((s) => s()), t.length = 0;
|
|
35
|
+
}, r = (s, o, l, u) => (s.addEventListener(o, l, u), () => s.removeEventListener(o, l, u)), i = _(() => {
|
|
36
|
+
const s = B(S(e[0])).filter((o) => o != null);
|
|
37
|
+
return s.every((o) => typeof o != "string") ? s : void 0;
|
|
38
|
+
}), c = fe(
|
|
39
|
+
() => {
|
|
40
|
+
var s, o;
|
|
41
|
+
return [
|
|
42
|
+
(o = (s = i.value) == null ? void 0 : s.map((l) => k(l))) != null ? o : [z].filter((l) => l != null),
|
|
43
|
+
B(S(i.value ? e[1] : e[0])),
|
|
44
|
+
B(te(i.value ? e[2] : e[1])),
|
|
45
|
+
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
46
|
+
S(i.value ? e[3] : e[2])
|
|
47
|
+
];
|
|
48
|
+
},
|
|
49
|
+
([s, o, l, u]) => {
|
|
50
|
+
if (n(), !s?.length || !o?.length || !l?.length)
|
|
51
|
+
return;
|
|
52
|
+
const h = ce(u) ? { ...u } : u;
|
|
53
|
+
t.push(
|
|
54
|
+
...s.flatMap(
|
|
55
|
+
(g) => o.flatMap(
|
|
56
|
+
(v) => l.map(($) => r(g, v, $, h))
|
|
57
|
+
)
|
|
58
|
+
)
|
|
59
|
+
);
|
|
60
|
+
},
|
|
61
|
+
{ flush: "post" }
|
|
62
|
+
), d = () => {
|
|
63
|
+
c(), n();
|
|
64
|
+
};
|
|
65
|
+
return ae(n), d;
|
|
66
|
+
}
|
|
67
|
+
let R = !1;
|
|
68
|
+
function he(e, t, n = {}) {
|
|
69
|
+
const { window: r = z, ignore: i = [], capture: c = !0, detectIframe: d = !1, controls: s = !1 } = n;
|
|
70
|
+
if (!r)
|
|
71
|
+
return s ? { stop: P, cancel: P, trigger: P } : P;
|
|
72
|
+
if (de && !R) {
|
|
73
|
+
R = !0;
|
|
74
|
+
const a = { passive: !0 };
|
|
75
|
+
Array.from(r.document.body.children).forEach((p) => p.addEventListener("click", P, a)), r.document.documentElement.addEventListener("click", P, a);
|
|
76
|
+
}
|
|
77
|
+
let o = !0;
|
|
78
|
+
const l = (a) => S(i).some((p) => {
|
|
79
|
+
if (typeof p == "string")
|
|
80
|
+
return Array.from(r.document.querySelectorAll(p)).some((m) => m === a.target || a.composedPath().includes(m));
|
|
81
|
+
{
|
|
82
|
+
const m = k(p);
|
|
83
|
+
return m && (a.target === m || a.composedPath().includes(m));
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
function u(a) {
|
|
87
|
+
const p = S(a);
|
|
88
|
+
return p && p.$.subTree.shapeFlag === 16;
|
|
89
|
+
}
|
|
90
|
+
function h(a, p) {
|
|
91
|
+
const m = S(a), O = m.$.subTree && m.$.subTree.children;
|
|
92
|
+
return O == null || !Array.isArray(O) ? !1 : O.some((N) => N.el === p.target || p.composedPath().includes(N.el));
|
|
93
|
+
}
|
|
94
|
+
const g = (a) => {
|
|
95
|
+
const p = k(e);
|
|
96
|
+
if (a.target != null && !(!(p instanceof Element) && u(e) && h(e, a)) && !(!p || p === a.target || a.composedPath().includes(p))) {
|
|
97
|
+
if ("detail" in a && a.detail === 0 && (o = !l(a)), !o) {
|
|
98
|
+
o = !0;
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
t(a);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
let v = !1;
|
|
105
|
+
const $ = [
|
|
106
|
+
I(r, "click", (a) => {
|
|
107
|
+
v || (v = !0, setTimeout(() => {
|
|
108
|
+
v = !1;
|
|
109
|
+
}, 0), g(a));
|
|
110
|
+
}, { passive: !0, capture: c }),
|
|
111
|
+
I(r, "pointerdown", (a) => {
|
|
112
|
+
const p = k(e);
|
|
113
|
+
o = !l(a) && !!(p && !a.composedPath().includes(p));
|
|
114
|
+
}, { passive: !0 }),
|
|
115
|
+
d && I(r, "blur", (a) => {
|
|
116
|
+
setTimeout(() => {
|
|
117
|
+
var p;
|
|
118
|
+
const m = k(e);
|
|
119
|
+
((p = r.document.activeElement) == null ? void 0 : p.tagName) === "IFRAME" && !m?.contains(r.document.activeElement) && t(a);
|
|
120
|
+
}, 0);
|
|
121
|
+
}, { passive: !0 })
|
|
122
|
+
].filter(Boolean), L = () => $.forEach((a) => a());
|
|
123
|
+
return s ? {
|
|
124
|
+
stop: L,
|
|
125
|
+
cancel: () => {
|
|
126
|
+
o = !1;
|
|
127
|
+
},
|
|
128
|
+
trigger: (a) => {
|
|
129
|
+
o = !0, g(a), o = !1;
|
|
130
|
+
}
|
|
131
|
+
} : L;
|
|
132
|
+
}
|
|
133
|
+
function ve(e) {
|
|
134
|
+
return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
|
|
135
|
+
}
|
|
136
|
+
function X(...e) {
|
|
137
|
+
let t, n, r = {};
|
|
138
|
+
e.length === 3 ? (t = e[0], n = e[1], r = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, n = e[0], r = e[1]) : (t = e[0], n = e[1]) : (t = !0, n = e[0]);
|
|
139
|
+
const {
|
|
140
|
+
target: i = z,
|
|
141
|
+
eventName: c = "keydown",
|
|
142
|
+
passive: d = !1,
|
|
143
|
+
dedupe: s = !1
|
|
144
|
+
} = r, o = ve(t);
|
|
145
|
+
return I(i, c, (u) => {
|
|
146
|
+
u.repeat && S(s) || o(u) && n(u);
|
|
147
|
+
}, d);
|
|
148
|
+
}
|
|
149
|
+
const me = { class: "pv-relative" }, be = ["disabled", "placeholder"], ye = {
|
|
150
|
+
key: 0,
|
|
151
|
+
"data-testid": "pv-search-input-shortcut",
|
|
152
|
+
class: "pv-kbd"
|
|
153
|
+
}, W = "/", ge = /* @__PURE__ */ E({
|
|
154
|
+
__name: "PvSearchInput",
|
|
155
|
+
props: /* @__PURE__ */ j({
|
|
156
|
+
placeholder: { default: "Search", type: String },
|
|
157
|
+
disabled: { type: Boolean, default: !1 },
|
|
158
|
+
displayShortcut: { type: Boolean }
|
|
159
|
+
}, {
|
|
160
|
+
modelValue: { required: !1, default: "" },
|
|
161
|
+
modelModifiers: {}
|
|
162
|
+
}),
|
|
163
|
+
emits: ["update:modelValue"],
|
|
164
|
+
setup(e, { expose: t }) {
|
|
165
|
+
const n = e, r = J("search-input"), i = V(e, "modelValue"), c = _(() => ({
|
|
166
|
+
"pv-input-search": !0,
|
|
167
|
+
"pv-full-width": !0,
|
|
168
|
+
"pv-input-padded-end": !0
|
|
169
|
+
}));
|
|
170
|
+
return K(() => {
|
|
171
|
+
n.displayShortcut && X(W, (d) => {
|
|
172
|
+
const s = d.target, o = s instanceof HTMLInputElement || s instanceof HTMLTextAreaElement || (s?.isContentEditable ?? !1), l = document.activeElement === r.value;
|
|
173
|
+
(!o || l) && (l || (d.preventDefault(), r.value?.focus()));
|
|
174
|
+
});
|
|
175
|
+
}), t({ input: r }), (d, s) => (f(), b("div", me, [
|
|
176
|
+
ne(w("input", {
|
|
177
|
+
ref: "search-input",
|
|
178
|
+
"onUpdate:modelValue": s[0] || (s[0] = (o) => i.value = o),
|
|
179
|
+
"data-testid": "pv-search-input",
|
|
180
|
+
type: "text",
|
|
181
|
+
disabled: e.disabled,
|
|
182
|
+
class: A(c.value),
|
|
183
|
+
placeholder: e.placeholder
|
|
184
|
+
}, null, 10, be), [
|
|
185
|
+
[se, i.value]
|
|
186
|
+
]),
|
|
187
|
+
e.displayShortcut ? (f(), b("kbd", ye, C(W))) : y("v-if", !0)
|
|
188
|
+
]));
|
|
189
|
+
}
|
|
190
|
+
});
|
|
191
|
+
function Se() {
|
|
192
|
+
const e = F(!1), n = oe()?.root || {};
|
|
193
|
+
return "isCE" in n && n.isCE === !0 && (e.value = !0), e;
|
|
194
|
+
}
|
|
195
|
+
const we = [void 0, 10, 12, 20, 24, 32, 64], Pe = ["xlink:href"], H = /* @__PURE__ */ E({
|
|
196
|
+
__name: "PvIcon",
|
|
197
|
+
props: {
|
|
198
|
+
name: { type: String },
|
|
199
|
+
size: { type: null }
|
|
200
|
+
},
|
|
201
|
+
setup(e) {
|
|
202
|
+
const t = e, n = Se(), r = F(null), i = _(() => ({
|
|
203
|
+
"pv-icon": !0,
|
|
204
|
+
[`pv-icon-${t.size}`]: we.includes(t.size)
|
|
205
|
+
})), c = _(() => n.value && r.value ? `${r.value}#${t.name}` : `#${t.name}`);
|
|
206
|
+
return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (r.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), (d, s) => (f(), b(
|
|
207
|
+
"svg",
|
|
208
|
+
{
|
|
209
|
+
"data-testid": "pv-icon",
|
|
210
|
+
"aria-hidden": "true",
|
|
211
|
+
class: A(i.value)
|
|
212
|
+
},
|
|
213
|
+
[
|
|
214
|
+
w("use", { "xlink:href": c.value }, null, 8, Pe)
|
|
215
|
+
],
|
|
216
|
+
2
|
|
217
|
+
/* CLASS */
|
|
218
|
+
));
|
|
219
|
+
}
|
|
220
|
+
}), ke = /* @__PURE__ */ E({
|
|
221
|
+
__name: "PvSpinner",
|
|
222
|
+
props: {
|
|
223
|
+
variant: { default: "primary", type: String },
|
|
224
|
+
size: { default: "lg", type: String }
|
|
225
|
+
},
|
|
226
|
+
setup(e) {
|
|
227
|
+
const t = {
|
|
228
|
+
xs: "0.75rem",
|
|
229
|
+
sm: "1rem",
|
|
230
|
+
md: "1.25rem",
|
|
231
|
+
lg: "1.5rem",
|
|
232
|
+
xl: "2rem"
|
|
233
|
+
}, n = {
|
|
234
|
+
primary: "pv-spinner",
|
|
235
|
+
dark: "pv-spinner-dark",
|
|
236
|
+
white: "pv-spinner-light"
|
|
237
|
+
};
|
|
238
|
+
return (r, i) => (f(), b(
|
|
239
|
+
"div",
|
|
240
|
+
{
|
|
241
|
+
"data-testid": "pv-spinner",
|
|
242
|
+
class: A(n[e.variant]),
|
|
243
|
+
style: re({ "--size": t[e.size] })
|
|
244
|
+
},
|
|
245
|
+
null,
|
|
246
|
+
6
|
|
247
|
+
/* CLASS, STYLE */
|
|
248
|
+
));
|
|
249
|
+
}
|
|
250
|
+
}), q = {
|
|
251
|
+
md: "pv-button-small",
|
|
252
|
+
lg: void 0,
|
|
253
|
+
xl: "pv-button-large"
|
|
254
|
+
}, _e = (e) => e == null || !q.hasOwnProperty(e) ? null : q[e] || null, Ee = ["disabled"], Ie = {
|
|
255
|
+
key: 1,
|
|
256
|
+
"data-testid": "pv-button-label"
|
|
257
|
+
}, Ce = /* @__PURE__ */ E({
|
|
258
|
+
__name: "PvButton",
|
|
259
|
+
props: {
|
|
260
|
+
variant: { default: "primary", type: String },
|
|
261
|
+
disabled: { type: Boolean, default: !1 },
|
|
262
|
+
size: { default: "lg", type: String },
|
|
263
|
+
loading: { type: Boolean, default: !1 },
|
|
264
|
+
label: { type: String },
|
|
265
|
+
leftIcon: { type: String },
|
|
266
|
+
rightIcon: { type: String },
|
|
267
|
+
inverse: { type: Boolean, default: !1 }
|
|
268
|
+
},
|
|
269
|
+
setup(e) {
|
|
270
|
+
const t = ["ghost"], n = e, r = _(() => {
|
|
271
|
+
const i = [];
|
|
272
|
+
n.inverse && t.includes(n.variant) ? i.push(`pv-button-${n.variant}-inverse`) : i.push(`pv-button-${n.variant}`);
|
|
273
|
+
const c = _e(n.size);
|
|
274
|
+
return c && i.push(c), i;
|
|
275
|
+
});
|
|
276
|
+
return (i, c) => (f(), b("button", {
|
|
277
|
+
type: "button",
|
|
278
|
+
class: A(r.value),
|
|
279
|
+
disabled: e.disabled,
|
|
280
|
+
"data-testid": "pv-button"
|
|
281
|
+
}, [
|
|
282
|
+
e.loading ? (f(), T(ke, {
|
|
283
|
+
key: 0,
|
|
284
|
+
size: "sm"
|
|
285
|
+
})) : (f(), b(
|
|
286
|
+
Z,
|
|
287
|
+
{ key: 1 },
|
|
288
|
+
[
|
|
289
|
+
e.leftIcon ? (f(), T(H, {
|
|
290
|
+
key: 0,
|
|
291
|
+
name: e.leftIcon,
|
|
292
|
+
"data-testid": "pv-button-left-icon"
|
|
293
|
+
}, null, 8, ["name"])) : y("v-if", !0),
|
|
294
|
+
e.label ? (f(), b(
|
|
295
|
+
"span",
|
|
296
|
+
Ie,
|
|
297
|
+
C(e.label),
|
|
298
|
+
1
|
|
299
|
+
/* TEXT */
|
|
300
|
+
)) : y("v-if", !0),
|
|
301
|
+
e.rightIcon ? (f(), T(H, {
|
|
302
|
+
key: 2,
|
|
303
|
+
name: e.rightIcon,
|
|
304
|
+
"data-testid": "pv-button-right-icon"
|
|
305
|
+
}, null, 8, ["name"])) : y("v-if", !0)
|
|
306
|
+
],
|
|
307
|
+
64
|
|
308
|
+
/* STABLE_FRAGMENT */
|
|
309
|
+
))
|
|
310
|
+
], 10, Ee));
|
|
311
|
+
}
|
|
312
|
+
}), Ae = {
|
|
313
|
+
class: "pv-inset-squish-12 pv-border-bottom",
|
|
314
|
+
style: { "flex-shrink": "0" }
|
|
315
|
+
}, $e = {
|
|
316
|
+
class: "pv-flex-vertical pv-stack-16",
|
|
317
|
+
style: { "--flex-align": "flex-start" }
|
|
318
|
+
}, Oe = { class: "pv-flex pv-full-width" }, Te = { class: "pv-full-width pv-heading-3" }, xe = {
|
|
319
|
+
key: 0,
|
|
320
|
+
class: "pv-text-body-md"
|
|
321
|
+
}, Be = {
|
|
322
|
+
key: 0,
|
|
323
|
+
class: "pv-inset-inline-16"
|
|
324
|
+
}, Me = {
|
|
325
|
+
class: "pv-inset-inline-16",
|
|
326
|
+
style: { flex: "1", "overflow-y": "auto", "min-height": "0" }
|
|
327
|
+
}, je = {
|
|
328
|
+
key: 0,
|
|
329
|
+
class: "pv-inset-squish-12 pv-border-top",
|
|
330
|
+
style: { "flex-shrink": "0" }
|
|
331
|
+
}, Ve = /* @__PURE__ */ E({
|
|
332
|
+
__name: "PvDrawer",
|
|
333
|
+
props: /* @__PURE__ */ j({
|
|
334
|
+
header: { type: String },
|
|
335
|
+
subheader: { type: String },
|
|
336
|
+
showSearchbar: { type: Boolean },
|
|
337
|
+
closeOnClickOutside: { type: Boolean, default: !1 },
|
|
338
|
+
searchInputProps: { type: Object }
|
|
339
|
+
}, {
|
|
340
|
+
searchInput: {
|
|
341
|
+
required: !1
|
|
342
|
+
},
|
|
343
|
+
searchInputModifiers: {},
|
|
344
|
+
modelValue: { type: Boolean, required: !0 },
|
|
345
|
+
modelModifiers: {}
|
|
346
|
+
}),
|
|
347
|
+
emits: /* @__PURE__ */ j(["click-outside"], ["update:searchInput", "update:modelValue"]),
|
|
348
|
+
setup(e, { emit: t }) {
|
|
349
|
+
const n = e, r = t, i = J("sidePanel"), c = V(e, "searchInput"), d = V(e, "modelValue");
|
|
350
|
+
K(() => {
|
|
351
|
+
d.value && i?.value?.setAttribute("open", "true"), n.closeOnClickOutside && s();
|
|
352
|
+
});
|
|
353
|
+
const s = () => {
|
|
354
|
+
i.value && he(
|
|
355
|
+
i.value,
|
|
356
|
+
() => {
|
|
357
|
+
d.value && (r("click-outside"), o());
|
|
358
|
+
},
|
|
359
|
+
{ ignore: [".pv-click-outside-ignore"] }
|
|
360
|
+
);
|
|
361
|
+
}, o = () => {
|
|
362
|
+
i?.value?.removeAttribute("open"), d.value = !1;
|
|
363
|
+
};
|
|
364
|
+
return U(
|
|
365
|
+
() => d.value,
|
|
366
|
+
() => {
|
|
367
|
+
d.value ? i?.value?.setAttribute("open", "true") : i?.value?.removeAttribute("open");
|
|
368
|
+
}
|
|
369
|
+
), X("Escape", () => {
|
|
370
|
+
i.value && d.value && o();
|
|
371
|
+
}), (l, u) => (f(), b(
|
|
372
|
+
"div",
|
|
373
|
+
{
|
|
374
|
+
class: "pv-drawer pv-surface",
|
|
375
|
+
ref_key: "sidePanel",
|
|
376
|
+
ref: i,
|
|
377
|
+
"data-testid": "pv-drawer",
|
|
378
|
+
style: { display: "flex", "flex-direction": "column", height: "100%" }
|
|
379
|
+
},
|
|
380
|
+
[
|
|
381
|
+
y(" Header Section (Fixed) "),
|
|
382
|
+
w("div", Ae, [
|
|
383
|
+
l.$slots.header ? x(l.$slots, "header", { key: 0 }) : (f(), b(
|
|
384
|
+
Z,
|
|
385
|
+
{ key: 1 },
|
|
386
|
+
[
|
|
387
|
+
w("div", $e, [
|
|
388
|
+
w("div", Oe, [
|
|
389
|
+
w(
|
|
390
|
+
"span",
|
|
391
|
+
Te,
|
|
392
|
+
C(e.header),
|
|
393
|
+
1
|
|
394
|
+
/* TEXT */
|
|
395
|
+
),
|
|
396
|
+
D(Ce, {
|
|
397
|
+
"left-icon": "close",
|
|
398
|
+
size: "md",
|
|
399
|
+
onClick: o,
|
|
400
|
+
"data-testid": "pv-side-panel-close-button",
|
|
401
|
+
variant: "ghost"
|
|
402
|
+
})
|
|
403
|
+
]),
|
|
404
|
+
e.subheader ? (f(), b(
|
|
405
|
+
"span",
|
|
406
|
+
xe,
|
|
407
|
+
C(e.subheader),
|
|
408
|
+
1
|
|
409
|
+
/* TEXT */
|
|
410
|
+
)) : y("v-if", !0)
|
|
411
|
+
]),
|
|
412
|
+
e.showSearchbar && c.value !== void 0 ? (f(), b("div", Be, [
|
|
413
|
+
D(ge, ie({
|
|
414
|
+
"data-testid": "pv-side-panel-input-search",
|
|
415
|
+
modelValue: c.value,
|
|
416
|
+
"onUpdate:modelValue": u[0] || (u[0] = (h) => c.value = h)
|
|
417
|
+
}, n.searchInputProps), null, 16, ["modelValue"])
|
|
418
|
+
])) : y("v-if", !0)
|
|
419
|
+
],
|
|
420
|
+
64
|
|
421
|
+
/* STABLE_FRAGMENT */
|
|
422
|
+
))
|
|
423
|
+
]),
|
|
424
|
+
y(" Main Content Section (Scrollable) "),
|
|
425
|
+
w("div", Me, [
|
|
426
|
+
x(l.$slots, "default")
|
|
427
|
+
]),
|
|
428
|
+
y(" Footer Section (Fixed) "),
|
|
429
|
+
l.$slots.footer ? (f(), b("div", je, [
|
|
430
|
+
x(l.$slots, "footer")
|
|
431
|
+
])) : y("v-if", !0)
|
|
432
|
+
],
|
|
433
|
+
512
|
|
434
|
+
/* NEED_PATCH */
|
|
435
|
+
));
|
|
436
|
+
}
|
|
437
|
+
}), ze = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
438
|
+
function Le(e) {
|
|
439
|
+
return !ze.has(e);
|
|
440
|
+
}
|
|
441
|
+
function M(e, t) {
|
|
442
|
+
const n = document.querySelector('link[href*="' + t + '"]');
|
|
443
|
+
if (!e.shadowRoot)
|
|
444
|
+
return !1;
|
|
445
|
+
if (n && e.shadowRoot) {
|
|
446
|
+
const r = n.href;
|
|
447
|
+
if (e.shadowRoot.querySelector(`link[href="${r}"]`))
|
|
448
|
+
return;
|
|
449
|
+
const i = document.createElement("link");
|
|
450
|
+
return i.rel = "stylesheet", i.href = r, e.shadowRoot.prepend(i), !0;
|
|
451
|
+
}
|
|
452
|
+
return !1;
|
|
453
|
+
}
|
|
454
|
+
function Ne(e) {
|
|
455
|
+
if (!M(e, "pit-viper-v2")) {
|
|
456
|
+
if (M(e, "pit-viper")) {
|
|
457
|
+
M(e, "pit-viper-v2-scoped");
|
|
458
|
+
return;
|
|
459
|
+
}
|
|
460
|
+
console.warn(
|
|
461
|
+
"No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
|
|
462
|
+
);
|
|
463
|
+
}
|
|
464
|
+
}
|
|
465
|
+
const De = (e) => ({ shadowRoot: Le(e) });
|
|
466
|
+
function Re(e, t) {
|
|
467
|
+
return t === null ? !1 : t === "" || t === "true" ? !0 : (t === "false" || console.warn(
|
|
468
|
+
`Invalid boolean attribute value for "${e}": "${t}". Expected "true", "false", or empty string.`
|
|
469
|
+
), !1);
|
|
470
|
+
}
|
|
471
|
+
function We(e, t) {
|
|
472
|
+
const n = Number(t);
|
|
473
|
+
return isNaN(n) && console.warn(`Invalid number attribute value for "${e}": "${t}". Expected a valid number.`), n;
|
|
474
|
+
}
|
|
475
|
+
function He(e) {
|
|
476
|
+
const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), c = (e.__vccOpts || e).props;
|
|
477
|
+
return c && typeof c == "object" && Object.entries(c).forEach(([d, s]) => {
|
|
478
|
+
s === Boolean || s && s.type === Boolean ? t.add(d) : s === Number || s && s.type === Number ? n.add(d) : (s === Object || s === Array || s && (s.type === Object || s.type === Array)) && r.add(d);
|
|
479
|
+
}), { booleanProps: t, numberProps: n, jsonProps: r };
|
|
480
|
+
}
|
|
481
|
+
function G(e, t) {
|
|
482
|
+
try {
|
|
483
|
+
return JSON.parse(t);
|
|
484
|
+
} catch (n) {
|
|
485
|
+
return console.warn(
|
|
486
|
+
`Invalid JSON attribute value for "${e}": "${t}". Error: ${n instanceof Error ? n.message : String(n)}`
|
|
487
|
+
), null;
|
|
488
|
+
}
|
|
489
|
+
}
|
|
490
|
+
function qe(e) {
|
|
491
|
+
const t = e.__name || e.name;
|
|
492
|
+
if (!t)
|
|
493
|
+
throw new Error("Component must have a __name or name property");
|
|
494
|
+
const n = le(e, De(t)), { booleanProps: r, numberProps: i, jsonProps: c } = He(e);
|
|
495
|
+
class d extends n {
|
|
496
|
+
_hiddenInput = null;
|
|
497
|
+
constructor() {
|
|
498
|
+
super(), this._parseAttributes();
|
|
499
|
+
}
|
|
500
|
+
disconnectedCallback() {
|
|
501
|
+
this._hiddenInput?.remove(), super.disconnectedCallback?.();
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Update the hidden input value
|
|
505
|
+
* Call this from the Vue component to sync form value
|
|
506
|
+
*/
|
|
507
|
+
setHiddenInputValue(o) {
|
|
508
|
+
this._hiddenInput && (this._hiddenInput.value = o ?? "");
|
|
509
|
+
}
|
|
510
|
+
_parseAttributes() {
|
|
511
|
+
r.forEach((l) => {
|
|
512
|
+
const u = this.getAttribute(l);
|
|
513
|
+
this[l] = Re(l, u);
|
|
514
|
+
}), i.forEach((l) => {
|
|
515
|
+
const u = this.getAttribute(l);
|
|
516
|
+
u !== null && (this[l] = We(l, u));
|
|
517
|
+
}), c.forEach((l) => {
|
|
518
|
+
const u = this.getAttribute(l);
|
|
519
|
+
if (u !== null) {
|
|
520
|
+
const h = G(l, u);
|
|
521
|
+
h !== null && (this[l] = h);
|
|
522
|
+
}
|
|
523
|
+
});
|
|
524
|
+
const o = this.getAttribute("data-json-props");
|
|
525
|
+
o && o.split(",").map((u) => u.trim()).filter(Boolean).forEach((u) => {
|
|
526
|
+
const h = u.replace(/-([a-z])/g, (v) => v[1].toUpperCase());
|
|
527
|
+
let g = this.getAttribute(u);
|
|
528
|
+
if (g === null) {
|
|
529
|
+
const v = h.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
530
|
+
g = this.getAttribute(v);
|
|
531
|
+
}
|
|
532
|
+
if (g !== null && !this[h]) {
|
|
533
|
+
const v = G(h, g);
|
|
534
|
+
v !== null && (this[h] = v);
|
|
535
|
+
}
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
connectedCallback() {
|
|
539
|
+
this._parseAttributes(), super.connectedCallback?.(), Ne(this);
|
|
540
|
+
const o = this.getAttribute("name");
|
|
541
|
+
o && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = o, this.after(this._hiddenInput));
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
return d;
|
|
545
|
+
}
|
|
546
|
+
function Ge(e) {
|
|
547
|
+
return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
548
|
+
}
|
|
549
|
+
function Ue(e) {
|
|
550
|
+
const t = e.__name || e.name;
|
|
551
|
+
if (!t)
|
|
552
|
+
throw new Error("Component must have a __name or name property");
|
|
553
|
+
const n = Ge(t), r = qe(e);
|
|
554
|
+
customElements.get(n) || customElements.define(n, r);
|
|
555
|
+
}
|
|
556
|
+
Ue(Ve);
|