@turquoisehealth/pit-viper 2.122.0 → 2.122.1-dev.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/components/base/PvButton/helpers.d.ts +1 -0
- package/pv-components/dist/vue/base/components/base/PvMenu/PvMenuControlPanel.vue.d.ts +6 -0
- package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +206 -289
- package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/types.d.ts +31 -0
- package/pv-components/dist/vue/base/components/base/PvPopoverV2/PvPopoverV2.vue.d.ts +0 -1
- package/pv-components/dist/vue/base/components/base/PvPopoverV2/types.d.ts +6 -1
- package/pv-components/dist/vue/base/components/base/PvSelectButton/PvSelectButton.vue.d.ts +20 -177
- package/pv-components/dist/vue/base/components/base/PvSelectButton/PvSelectButtonTrigger/PvSelectButtonTrigger.vue.d.ts +4 -9
- package/pv-components/dist/vue/base/pv-components-base.mjs +4943 -11629
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +4791 -10741
- 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 +8326 -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 +1573 -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 +8093 -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 +7479 -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 +7409 -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 +50 -50
- 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((o) => o()), t.length = 0;
|
|
35
|
+
}, s = (o, r, i, u) => (o.addEventListener(r, i, u), () => o.removeEventListener(r, i, u)), l = _(() => {
|
|
36
|
+
const o = B(S(e[0])).filter((r) => r != null);
|
|
37
|
+
return o.every((r) => typeof r != "string") ? o : void 0;
|
|
38
|
+
}), p = fe(
|
|
39
|
+
() => {
|
|
40
|
+
var o, r;
|
|
41
|
+
return [
|
|
42
|
+
(r = (o = l.value) == null ? void 0 : o.map((i) => k(i))) != null ? r : [z].filter((i) => i != null),
|
|
43
|
+
B(S(l.value ? e[1] : e[0])),
|
|
44
|
+
B(te(l.value ? e[2] : e[1])),
|
|
45
|
+
// @ts-expect-error - TypeScript gets the correct types, but somehow still complains
|
|
46
|
+
S(l.value ? e[3] : e[2])
|
|
47
|
+
];
|
|
48
|
+
},
|
|
49
|
+
([o, r, i, u]) => {
|
|
50
|
+
if (n(), !o?.length || !r?.length || !i?.length)
|
|
51
|
+
return;
|
|
52
|
+
const h = ce(u) ? { ...u } : u;
|
|
53
|
+
t.push(
|
|
54
|
+
...o.flatMap(
|
|
55
|
+
(g) => r.flatMap(
|
|
56
|
+
(v) => i.map(($) => s(g, v, $, h))
|
|
57
|
+
)
|
|
58
|
+
)
|
|
59
|
+
);
|
|
60
|
+
},
|
|
61
|
+
{ flush: "post" }
|
|
62
|
+
), c = () => {
|
|
63
|
+
p(), n();
|
|
64
|
+
};
|
|
65
|
+
return ae(n), c;
|
|
66
|
+
}
|
|
67
|
+
let R = !1;
|
|
68
|
+
function he(e, t, n = {}) {
|
|
69
|
+
const { window: s = z, ignore: l = [], capture: p = !0, detectIframe: c = !1, controls: o = !1 } = n;
|
|
70
|
+
if (!s)
|
|
71
|
+
return o ? { stop: P, cancel: P, trigger: P } : P;
|
|
72
|
+
if (de && !R) {
|
|
73
|
+
R = !0;
|
|
74
|
+
const a = { passive: !0 };
|
|
75
|
+
Array.from(s.document.body.children).forEach((d) => d.addEventListener("click", P, a)), s.document.documentElement.addEventListener("click", P, a);
|
|
76
|
+
}
|
|
77
|
+
let r = !0;
|
|
78
|
+
const i = (a) => S(l).some((d) => {
|
|
79
|
+
if (typeof d == "string")
|
|
80
|
+
return Array.from(s.document.querySelectorAll(d)).some((m) => m === a.target || a.composedPath().includes(m));
|
|
81
|
+
{
|
|
82
|
+
const m = k(d);
|
|
83
|
+
return m && (a.target === m || a.composedPath().includes(m));
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
function u(a) {
|
|
87
|
+
const d = S(a);
|
|
88
|
+
return d && d.$.subTree.shapeFlag === 16;
|
|
89
|
+
}
|
|
90
|
+
function h(a, d) {
|
|
91
|
+
const m = S(a), O = m.$.subTree && m.$.subTree.children;
|
|
92
|
+
return O == null || !Array.isArray(O) ? !1 : O.some((N) => N.el === d.target || d.composedPath().includes(N.el));
|
|
93
|
+
}
|
|
94
|
+
const g = (a) => {
|
|
95
|
+
const d = k(e);
|
|
96
|
+
if (a.target != null && !(!(d instanceof Element) && u(e) && h(e, a)) && !(!d || d === a.target || a.composedPath().includes(d))) {
|
|
97
|
+
if ("detail" in a && a.detail === 0 && (r = !i(a)), !r) {
|
|
98
|
+
r = !0;
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
t(a);
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
let v = !1;
|
|
105
|
+
const $ = [
|
|
106
|
+
I(s, "click", (a) => {
|
|
107
|
+
v || (v = !0, setTimeout(() => {
|
|
108
|
+
v = !1;
|
|
109
|
+
}, 0), g(a));
|
|
110
|
+
}, { passive: !0, capture: p }),
|
|
111
|
+
I(s, "pointerdown", (a) => {
|
|
112
|
+
const d = k(e);
|
|
113
|
+
r = !i(a) && !!(d && !a.composedPath().includes(d));
|
|
114
|
+
}, { passive: !0 }),
|
|
115
|
+
c && I(s, "blur", (a) => {
|
|
116
|
+
setTimeout(() => {
|
|
117
|
+
var d;
|
|
118
|
+
const m = k(e);
|
|
119
|
+
((d = s.document.activeElement) == null ? void 0 : d.tagName) === "IFRAME" && !m?.contains(s.document.activeElement) && t(a);
|
|
120
|
+
}, 0);
|
|
121
|
+
}, { passive: !0 })
|
|
122
|
+
].filter(Boolean), L = () => $.forEach((a) => a());
|
|
123
|
+
return o ? {
|
|
124
|
+
stop: L,
|
|
125
|
+
cancel: () => {
|
|
126
|
+
r = !1;
|
|
127
|
+
},
|
|
128
|
+
trigger: (a) => {
|
|
129
|
+
r = !0, g(a), r = !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, s = {};
|
|
138
|
+
e.length === 3 ? (t = e[0], n = e[1], s = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, n = e[0], s = e[1]) : (t = e[0], n = e[1]) : (t = !0, n = e[0]);
|
|
139
|
+
const {
|
|
140
|
+
target: l = z,
|
|
141
|
+
eventName: p = "keydown",
|
|
142
|
+
passive: c = !1,
|
|
143
|
+
dedupe: o = !1
|
|
144
|
+
} = s, r = ve(t);
|
|
145
|
+
return I(l, p, (u) => {
|
|
146
|
+
u.repeat && S(o) || r(u) && n(u);
|
|
147
|
+
}, c);
|
|
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, s = J("search-input"), l = V(e, "modelValue"), p = _(() => ({
|
|
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, (c) => {
|
|
172
|
+
const o = c.target, r = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || (o?.isContentEditable ?? !1), i = document.activeElement === s.value;
|
|
173
|
+
(!r || i) && (i || (c.preventDefault(), s.value?.focus()));
|
|
174
|
+
});
|
|
175
|
+
}), t({ input: s }), (c, o) => (f(), b("div", me, [
|
|
176
|
+
ne(w("input", {
|
|
177
|
+
ref: "search-input",
|
|
178
|
+
"onUpdate:modelValue": o[0] || (o[0] = (r) => l.value = r),
|
|
179
|
+
"data-testid": "pv-search-input",
|
|
180
|
+
type: "text",
|
|
181
|
+
disabled: e.disabled,
|
|
182
|
+
class: A(p.value),
|
|
183
|
+
placeholder: e.placeholder
|
|
184
|
+
}, null, 10, be), [
|
|
185
|
+
[se, l.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(), s = F(null), l = _(() => ({
|
|
203
|
+
"pv-icon": !0,
|
|
204
|
+
[`pv-icon-${t.size}`]: we.includes(t.size)
|
|
205
|
+
})), p = _(() => n.value && s.value ? `${s.value}#${t.name}` : `#${t.name}`);
|
|
206
|
+
return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (s.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), (c, o) => (f(), b(
|
|
207
|
+
"svg",
|
|
208
|
+
{
|
|
209
|
+
"data-testid": "pv-icon",
|
|
210
|
+
"aria-hidden": "true",
|
|
211
|
+
class: A(l.value)
|
|
212
|
+
},
|
|
213
|
+
[
|
|
214
|
+
w("use", { "xlink:href": p.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 (s, l) => (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
|
+
}), _e = ["ghost"], q = {
|
|
251
|
+
md: "pv-button-small",
|
|
252
|
+
lg: void 0,
|
|
253
|
+
xl: "pv-button-large"
|
|
254
|
+
}, Ee = (e) => e == null || !q.hasOwnProperty(e) ? null : q[e] || null, Ie = ["disabled"], Ce = {
|
|
255
|
+
key: 1,
|
|
256
|
+
"data-testid": "pv-button-label"
|
|
257
|
+
}, Ae = /* @__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 = e, n = _(() => {
|
|
271
|
+
const s = [];
|
|
272
|
+
t.inverse && _e.includes(t.variant) ? s.push(`pv-button-${t.variant}-inverse`) : s.push(`pv-button-${t.variant}`);
|
|
273
|
+
const l = Ee(t.size);
|
|
274
|
+
return l && s.push(l), s;
|
|
275
|
+
});
|
|
276
|
+
return (s, l) => (f(), b("button", {
|
|
277
|
+
type: "button",
|
|
278
|
+
class: A(n.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
|
+
Ce,
|
|
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, Ie));
|
|
311
|
+
}
|
|
312
|
+
}), $e = {
|
|
313
|
+
class: "pv-inset-squish-12 pv-border-bottom",
|
|
314
|
+
style: { "flex-shrink": "0" }
|
|
315
|
+
}, Oe = {
|
|
316
|
+
class: "pv-flex-vertical pv-stack-16",
|
|
317
|
+
style: { "--flex-align": "flex-start" }
|
|
318
|
+
}, Te = { class: "pv-flex pv-full-width" }, xe = { class: "pv-full-width pv-heading-3" }, Be = {
|
|
319
|
+
key: 0,
|
|
320
|
+
class: "pv-text-body-md"
|
|
321
|
+
}, Me = {
|
|
322
|
+
key: 0,
|
|
323
|
+
class: "pv-inset-inline-16"
|
|
324
|
+
}, je = {
|
|
325
|
+
class: "pv-inset-inline-16",
|
|
326
|
+
style: { flex: "1", "overflow-y": "auto", "min-height": "0" }
|
|
327
|
+
}, Ve = {
|
|
328
|
+
key: 0,
|
|
329
|
+
class: "pv-inset-squish-12 pv-border-top",
|
|
330
|
+
style: { "flex-shrink": "0" }
|
|
331
|
+
}, ze = /* @__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, s = t, l = J("sidePanel"), p = V(e, "searchInput"), c = V(e, "modelValue");
|
|
350
|
+
K(() => {
|
|
351
|
+
c.value && l?.value?.setAttribute("open", "true"), n.closeOnClickOutside && o();
|
|
352
|
+
});
|
|
353
|
+
const o = () => {
|
|
354
|
+
l.value && he(
|
|
355
|
+
l.value,
|
|
356
|
+
() => {
|
|
357
|
+
c.value && (s("click-outside"), r());
|
|
358
|
+
},
|
|
359
|
+
{ ignore: [".pv-click-outside-ignore"] }
|
|
360
|
+
);
|
|
361
|
+
}, r = () => {
|
|
362
|
+
l?.value?.removeAttribute("open"), c.value = !1;
|
|
363
|
+
};
|
|
364
|
+
return U(
|
|
365
|
+
() => c.value,
|
|
366
|
+
() => {
|
|
367
|
+
c.value ? l?.value?.setAttribute("open", "true") : l?.value?.removeAttribute("open");
|
|
368
|
+
}
|
|
369
|
+
), X("Escape", () => {
|
|
370
|
+
l.value && c.value && r();
|
|
371
|
+
}), (i, u) => (f(), b(
|
|
372
|
+
"div",
|
|
373
|
+
{
|
|
374
|
+
class: "pv-drawer pv-surface",
|
|
375
|
+
ref_key: "sidePanel",
|
|
376
|
+
ref: l,
|
|
377
|
+
"data-testid": "pv-drawer",
|
|
378
|
+
style: { display: "flex", "flex-direction": "column", height: "100%" }
|
|
379
|
+
},
|
|
380
|
+
[
|
|
381
|
+
y(" Header Section (Fixed) "),
|
|
382
|
+
w("div", $e, [
|
|
383
|
+
i.$slots.header ? x(i.$slots, "header", { key: 0 }) : (f(), b(
|
|
384
|
+
Z,
|
|
385
|
+
{ key: 1 },
|
|
386
|
+
[
|
|
387
|
+
w("div", Oe, [
|
|
388
|
+
w("div", Te, [
|
|
389
|
+
w(
|
|
390
|
+
"span",
|
|
391
|
+
xe,
|
|
392
|
+
C(e.header),
|
|
393
|
+
1
|
|
394
|
+
/* TEXT */
|
|
395
|
+
),
|
|
396
|
+
D(Ae, {
|
|
397
|
+
"left-icon": "close",
|
|
398
|
+
size: "md",
|
|
399
|
+
onClick: r,
|
|
400
|
+
"data-testid": "pv-side-panel-close-button",
|
|
401
|
+
variant: "ghost"
|
|
402
|
+
})
|
|
403
|
+
]),
|
|
404
|
+
e.subheader ? (f(), b(
|
|
405
|
+
"span",
|
|
406
|
+
Be,
|
|
407
|
+
C(e.subheader),
|
|
408
|
+
1
|
|
409
|
+
/* TEXT */
|
|
410
|
+
)) : y("v-if", !0)
|
|
411
|
+
]),
|
|
412
|
+
e.showSearchbar && p.value !== void 0 ? (f(), b("div", Me, [
|
|
413
|
+
D(ge, ie({
|
|
414
|
+
"data-testid": "pv-side-panel-input-search",
|
|
415
|
+
modelValue: p.value,
|
|
416
|
+
"onUpdate:modelValue": u[0] || (u[0] = (h) => p.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", je, [
|
|
426
|
+
x(i.$slots, "default")
|
|
427
|
+
]),
|
|
428
|
+
y(" Footer Section (Fixed) "),
|
|
429
|
+
i.$slots.footer ? (f(), b("div", Ve, [
|
|
430
|
+
x(i.$slots, "footer")
|
|
431
|
+
])) : y("v-if", !0)
|
|
432
|
+
],
|
|
433
|
+
512
|
|
434
|
+
/* NEED_PATCH */
|
|
435
|
+
));
|
|
436
|
+
}
|
|
437
|
+
}), Le = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
438
|
+
function Ne(e) {
|
|
439
|
+
return !Le.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 s = n.href;
|
|
447
|
+
if (e.shadowRoot.querySelector(`link[href="${s}"]`))
|
|
448
|
+
return;
|
|
449
|
+
const l = document.createElement("link");
|
|
450
|
+
return l.rel = "stylesheet", l.href = s, e.shadowRoot.prepend(l), !0;
|
|
451
|
+
}
|
|
452
|
+
return !1;
|
|
453
|
+
}
|
|
454
|
+
function De(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 Re = (e) => ({ shadowRoot: Ne(e) });
|
|
466
|
+
function We(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 He(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 qe(e) {
|
|
476
|
+
const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), p = (e.__vccOpts || e).props;
|
|
477
|
+
return p && typeof p == "object" && Object.entries(p).forEach(([c, o]) => {
|
|
478
|
+
o === Boolean || o && o.type === Boolean ? t.add(c) : o === Number || o && o.type === Number ? n.add(c) : (o === Object || o === Array || o && (o.type === Object || o.type === Array)) && s.add(c);
|
|
479
|
+
}), { booleanProps: t, numberProps: n, jsonProps: s };
|
|
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 Ge(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, Re(t)), { booleanProps: s, numberProps: l, jsonProps: p } = qe(e);
|
|
495
|
+
class c 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(r) {
|
|
508
|
+
this._hiddenInput && (this._hiddenInput.value = r ?? "");
|
|
509
|
+
}
|
|
510
|
+
_parseAttributes() {
|
|
511
|
+
s.forEach((i) => {
|
|
512
|
+
const u = this.getAttribute(i);
|
|
513
|
+
this[i] = We(i, u);
|
|
514
|
+
}), l.forEach((i) => {
|
|
515
|
+
const u = this.getAttribute(i);
|
|
516
|
+
u !== null && (this[i] = He(i, u));
|
|
517
|
+
}), p.forEach((i) => {
|
|
518
|
+
const u = this.getAttribute(i);
|
|
519
|
+
if (u !== null) {
|
|
520
|
+
const h = G(i, u);
|
|
521
|
+
h !== null && (this[i] = h);
|
|
522
|
+
}
|
|
523
|
+
});
|
|
524
|
+
const r = this.getAttribute("data-json-props");
|
|
525
|
+
r && r.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?.(), De(this);
|
|
540
|
+
const r = this.getAttribute("name");
|
|
541
|
+
r && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = r, this.after(this._hiddenInput));
|
|
542
|
+
}
|
|
543
|
+
}
|
|
544
|
+
return c;
|
|
545
|
+
}
|
|
546
|
+
function Ue(e) {
|
|
547
|
+
return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
548
|
+
}
|
|
549
|
+
function Je(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 = Ue(t), s = Ge(e);
|
|
554
|
+
customElements.get(n) || customElements.define(n, s);
|
|
555
|
+
}
|
|
556
|
+
Je(ze);
|