@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,164 @@
|
|
|
1
|
+
import { defineComponent as g, createElementBlock as h, openBlock as m, normalizeClass as y, createCommentVNode as E, Fragment as _, createTextVNode as C, toDisplayString as A, defineCustomElement as S } from "vue";
|
|
2
|
+
const w = ["src"], P = /* @__PURE__ */ g({
|
|
3
|
+
__name: "PvAvatar",
|
|
4
|
+
props: {
|
|
5
|
+
size: { default: "lg", type: String },
|
|
6
|
+
image: { type: String },
|
|
7
|
+
initials: { type: String }
|
|
8
|
+
},
|
|
9
|
+
setup(t) {
|
|
10
|
+
const e = {
|
|
11
|
+
sm: "pv-avatar-16",
|
|
12
|
+
md: "pv-avatar-20",
|
|
13
|
+
lg: "pv-avatar-xs",
|
|
14
|
+
xl: "pv-avatar-sm",
|
|
15
|
+
"2x": "pv-avatar-md"
|
|
16
|
+
};
|
|
17
|
+
return (n, i) => (m(), h(
|
|
18
|
+
"div",
|
|
19
|
+
{
|
|
20
|
+
class: y(e[t.size]),
|
|
21
|
+
"data-testid": "pv-avatar"
|
|
22
|
+
},
|
|
23
|
+
[
|
|
24
|
+
t.initials ? (m(), h(
|
|
25
|
+
_,
|
|
26
|
+
{ key: 0 },
|
|
27
|
+
[
|
|
28
|
+
C(
|
|
29
|
+
A(t.initials),
|
|
30
|
+
1
|
|
31
|
+
/* TEXT */
|
|
32
|
+
)
|
|
33
|
+
],
|
|
34
|
+
64
|
|
35
|
+
/* STABLE_FRAGMENT */
|
|
36
|
+
)) : t.image ? (m(), h("img", {
|
|
37
|
+
key: 1,
|
|
38
|
+
src: t.image
|
|
39
|
+
}, null, 8, w)) : E("v-if", !0)
|
|
40
|
+
],
|
|
41
|
+
2
|
|
42
|
+
/* CLASS */
|
|
43
|
+
));
|
|
44
|
+
}
|
|
45
|
+
}), I = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
46
|
+
function j(t) {
|
|
47
|
+
return !I.has(t);
|
|
48
|
+
}
|
|
49
|
+
function b(t, e) {
|
|
50
|
+
const n = document.querySelector('link[href*="' + e + '"]');
|
|
51
|
+
if (!t.shadowRoot)
|
|
52
|
+
return !1;
|
|
53
|
+
if (n && t.shadowRoot) {
|
|
54
|
+
const i = n.href;
|
|
55
|
+
if (t.shadowRoot.querySelector(`link[href="${i}"]`))
|
|
56
|
+
return;
|
|
57
|
+
const u = document.createElement("link");
|
|
58
|
+
return u.rel = "stylesheet", u.href = i, t.shadowRoot.prepend(u), !0;
|
|
59
|
+
}
|
|
60
|
+
return !1;
|
|
61
|
+
}
|
|
62
|
+
function k(t) {
|
|
63
|
+
if (!b(t, "pit-viper-v2")) {
|
|
64
|
+
if (b(t, "pit-viper")) {
|
|
65
|
+
b(t, "pit-viper-v2-scoped");
|
|
66
|
+
return;
|
|
67
|
+
}
|
|
68
|
+
console.warn(
|
|
69
|
+
"No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
const O = (t) => ({ shadowRoot: j(t) });
|
|
74
|
+
function N(t, e) {
|
|
75
|
+
return e === null ? !1 : e === "" || e === "true" ? !0 : (e === "false" || console.warn(
|
|
76
|
+
`Invalid boolean attribute value for "${t}": "${e}". Expected "true", "false", or empty string.`
|
|
77
|
+
), !1);
|
|
78
|
+
}
|
|
79
|
+
function $(t, e) {
|
|
80
|
+
const n = Number(e);
|
|
81
|
+
return isNaN(n) && console.warn(`Invalid number attribute value for "${t}": "${e}". Expected a valid number.`), n;
|
|
82
|
+
}
|
|
83
|
+
function x(t) {
|
|
84
|
+
const e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), p = (t.__vccOpts || t).props;
|
|
85
|
+
return p && typeof p == "object" && Object.entries(p).forEach(([f, r]) => {
|
|
86
|
+
r === Boolean || r && r.type === Boolean ? e.add(f) : r === Number || r && r.type === Number ? n.add(f) : (r === Object || r === Array || r && (r.type === Object || r.type === Array)) && i.add(f);
|
|
87
|
+
}), { booleanProps: e, numberProps: n, jsonProps: i };
|
|
88
|
+
}
|
|
89
|
+
function v(t, e) {
|
|
90
|
+
try {
|
|
91
|
+
return JSON.parse(e);
|
|
92
|
+
} catch (n) {
|
|
93
|
+
return console.warn(
|
|
94
|
+
`Invalid JSON attribute value for "${t}": "${e}". Error: ${n instanceof Error ? n.message : String(n)}`
|
|
95
|
+
), null;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function B(t) {
|
|
99
|
+
const e = t.__name || t.name;
|
|
100
|
+
if (!e)
|
|
101
|
+
throw new Error("Component must have a __name or name property");
|
|
102
|
+
const n = S(t, O(e)), { booleanProps: i, numberProps: u, jsonProps: p } = x(t);
|
|
103
|
+
class f extends n {
|
|
104
|
+
_hiddenInput = null;
|
|
105
|
+
constructor() {
|
|
106
|
+
super(), this._parseAttributes();
|
|
107
|
+
}
|
|
108
|
+
disconnectedCallback() {
|
|
109
|
+
this._hiddenInput?.remove(), super.disconnectedCallback?.();
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Update the hidden input value
|
|
113
|
+
* Call this from the Vue component to sync form value
|
|
114
|
+
*/
|
|
115
|
+
setHiddenInputValue(a) {
|
|
116
|
+
this._hiddenInput && (this._hiddenInput.value = a ?? "");
|
|
117
|
+
}
|
|
118
|
+
_parseAttributes() {
|
|
119
|
+
i.forEach((s) => {
|
|
120
|
+
const o = this.getAttribute(s);
|
|
121
|
+
this[s] = N(s, o);
|
|
122
|
+
}), u.forEach((s) => {
|
|
123
|
+
const o = this.getAttribute(s);
|
|
124
|
+
o !== null && (this[s] = $(s, o));
|
|
125
|
+
}), p.forEach((s) => {
|
|
126
|
+
const o = this.getAttribute(s);
|
|
127
|
+
if (o !== null) {
|
|
128
|
+
const c = v(s, o);
|
|
129
|
+
c !== null && (this[s] = c);
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
const a = this.getAttribute("data-json-props");
|
|
133
|
+
a && a.split(",").map((o) => o.trim()).filter(Boolean).forEach((o) => {
|
|
134
|
+
const c = o.replace(/-([a-z])/g, (l) => l[1].toUpperCase());
|
|
135
|
+
let d = this.getAttribute(o);
|
|
136
|
+
if (d === null) {
|
|
137
|
+
const l = c.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
138
|
+
d = this.getAttribute(l);
|
|
139
|
+
}
|
|
140
|
+
if (d !== null && !this[c]) {
|
|
141
|
+
const l = v(c, d);
|
|
142
|
+
l !== null && (this[c] = l);
|
|
143
|
+
}
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
connectedCallback() {
|
|
147
|
+
this._parseAttributes(), super.connectedCallback?.(), k(this);
|
|
148
|
+
const a = this.getAttribute("name");
|
|
149
|
+
a && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = a, this.after(this._hiddenInput));
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return f;
|
|
153
|
+
}
|
|
154
|
+
function D(t) {
|
|
155
|
+
return t.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
156
|
+
}
|
|
157
|
+
function z(t) {
|
|
158
|
+
const e = t.__name || t.name;
|
|
159
|
+
if (!e)
|
|
160
|
+
throw new Error("Component must have a __name or name property");
|
|
161
|
+
const n = D(e), i = B(t);
|
|
162
|
+
customElements.get(n) || customElements.define(n, i);
|
|
163
|
+
}
|
|
164
|
+
z(P);
|
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
import { defineComponent as g, computed as v, createElementBlock as f, openBlock as m, Fragment as _, renderList as E, createTextVNode as A, toDisplayString as w, defineCustomElement as C } from "vue";
|
|
2
|
+
const P = ["data-more"], S = ["src"], I = {
|
|
3
|
+
key: 2,
|
|
4
|
+
class: "pv-avatar-sm"
|
|
5
|
+
}, k = /* @__PURE__ */ g({
|
|
6
|
+
__name: "PvAvatarGroup",
|
|
7
|
+
props: {
|
|
8
|
+
items: { type: Array },
|
|
9
|
+
maxDisplayed: { type: Number }
|
|
10
|
+
},
|
|
11
|
+
setup(t) {
|
|
12
|
+
const e = t, r = v(() => e.maxDisplayed >= 7 ? 7 : e.maxDisplayed), s = v(() => {
|
|
13
|
+
const a = e.items.length - r.value;
|
|
14
|
+
return a > 0 ? a : 0;
|
|
15
|
+
});
|
|
16
|
+
return (a, p) => (m(), f("ul", {
|
|
17
|
+
class: "pv-avatar-group",
|
|
18
|
+
role: "list",
|
|
19
|
+
"data-more": s.value <= 0 ? void 0 : s.value,
|
|
20
|
+
"data-testid": "pv-avatar-group"
|
|
21
|
+
}, [
|
|
22
|
+
(m(!0), f(
|
|
23
|
+
_,
|
|
24
|
+
null,
|
|
25
|
+
E(t.items.slice(0, r.value), (c, n) => (m(), f("li", {
|
|
26
|
+
key: n,
|
|
27
|
+
"data-testid": "pv-avatar-group-item"
|
|
28
|
+
}, [
|
|
29
|
+
c.initials ? (m(), f(
|
|
30
|
+
_,
|
|
31
|
+
{ key: 0 },
|
|
32
|
+
[
|
|
33
|
+
A(
|
|
34
|
+
w(c.initials),
|
|
35
|
+
1
|
|
36
|
+
/* TEXT */
|
|
37
|
+
)
|
|
38
|
+
],
|
|
39
|
+
64
|
|
40
|
+
/* STABLE_FRAGMENT */
|
|
41
|
+
)) : c.image ? (m(), f("img", {
|
|
42
|
+
key: 1,
|
|
43
|
+
src: c.image
|
|
44
|
+
}, null, 8, S)) : (m(), f("div", I))
|
|
45
|
+
]))),
|
|
46
|
+
128
|
|
47
|
+
/* KEYED_FRAGMENT */
|
|
48
|
+
))
|
|
49
|
+
], 8, P));
|
|
50
|
+
}
|
|
51
|
+
}), j = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
52
|
+
function N(t) {
|
|
53
|
+
return !j.has(t);
|
|
54
|
+
}
|
|
55
|
+
function b(t, e) {
|
|
56
|
+
const r = document.querySelector('link[href*="' + e + '"]');
|
|
57
|
+
if (!t.shadowRoot)
|
|
58
|
+
return !1;
|
|
59
|
+
if (r && t.shadowRoot) {
|
|
60
|
+
const s = r.href;
|
|
61
|
+
if (t.shadowRoot.querySelector(`link[href="${s}"]`))
|
|
62
|
+
return;
|
|
63
|
+
const a = document.createElement("link");
|
|
64
|
+
return a.rel = "stylesheet", a.href = s, t.shadowRoot.prepend(a), !0;
|
|
65
|
+
}
|
|
66
|
+
return !1;
|
|
67
|
+
}
|
|
68
|
+
function O(t) {
|
|
69
|
+
if (!b(t, "pit-viper-v2")) {
|
|
70
|
+
if (b(t, "pit-viper")) {
|
|
71
|
+
b(t, "pit-viper-v2-scoped");
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
console.warn(
|
|
75
|
+
"No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
|
|
76
|
+
);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const x = (t) => ({ shadowRoot: N(t) });
|
|
80
|
+
function D(t, e) {
|
|
81
|
+
return e === null ? !1 : e === "" || e === "true" ? !0 : (e === "false" || console.warn(
|
|
82
|
+
`Invalid boolean attribute value for "${t}": "${e}". Expected "true", "false", or empty string.`
|
|
83
|
+
), !1);
|
|
84
|
+
}
|
|
85
|
+
function $(t, e) {
|
|
86
|
+
const r = Number(e);
|
|
87
|
+
return isNaN(r) && console.warn(`Invalid number attribute value for "${t}": "${e}". Expected a valid number.`), r;
|
|
88
|
+
}
|
|
89
|
+
function B(t) {
|
|
90
|
+
const e = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), p = (t.__vccOpts || t).props;
|
|
91
|
+
return p && typeof p == "object" && Object.entries(p).forEach(([c, n]) => {
|
|
92
|
+
n === Boolean || n && n.type === Boolean ? e.add(c) : n === Number || n && n.type === Number ? r.add(c) : (n === Object || n === Array || n && (n.type === Object || n.type === Array)) && s.add(c);
|
|
93
|
+
}), { booleanProps: e, numberProps: r, jsonProps: s };
|
|
94
|
+
}
|
|
95
|
+
function y(t, e) {
|
|
96
|
+
try {
|
|
97
|
+
return JSON.parse(e);
|
|
98
|
+
} catch (r) {
|
|
99
|
+
return console.warn(
|
|
100
|
+
`Invalid JSON attribute value for "${t}": "${e}". Error: ${r instanceof Error ? r.message : String(r)}`
|
|
101
|
+
), null;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function R(t) {
|
|
105
|
+
const e = t.__name || t.name;
|
|
106
|
+
if (!e)
|
|
107
|
+
throw new Error("Component must have a __name or name property");
|
|
108
|
+
const r = C(t, x(e)), { booleanProps: s, numberProps: a, jsonProps: p } = B(t);
|
|
109
|
+
class c extends r {
|
|
110
|
+
_hiddenInput = null;
|
|
111
|
+
constructor() {
|
|
112
|
+
super(), this._parseAttributes();
|
|
113
|
+
}
|
|
114
|
+
disconnectedCallback() {
|
|
115
|
+
this._hiddenInput?.remove(), super.disconnectedCallback?.();
|
|
116
|
+
}
|
|
117
|
+
/**
|
|
118
|
+
* Update the hidden input value
|
|
119
|
+
* Call this from the Vue component to sync form value
|
|
120
|
+
*/
|
|
121
|
+
setHiddenInputValue(u) {
|
|
122
|
+
this._hiddenInput && (this._hiddenInput.value = u ?? "");
|
|
123
|
+
}
|
|
124
|
+
_parseAttributes() {
|
|
125
|
+
s.forEach((o) => {
|
|
126
|
+
const i = this.getAttribute(o);
|
|
127
|
+
this[o] = D(o, i);
|
|
128
|
+
}), a.forEach((o) => {
|
|
129
|
+
const i = this.getAttribute(o);
|
|
130
|
+
i !== null && (this[o] = $(o, i));
|
|
131
|
+
}), p.forEach((o) => {
|
|
132
|
+
const i = this.getAttribute(o);
|
|
133
|
+
if (i !== null) {
|
|
134
|
+
const l = y(o, i);
|
|
135
|
+
l !== null && (this[o] = l);
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
const u = this.getAttribute("data-json-props");
|
|
139
|
+
u && u.split(",").map((i) => i.trim()).filter(Boolean).forEach((i) => {
|
|
140
|
+
const l = i.replace(/-([a-z])/g, (d) => d[1].toUpperCase());
|
|
141
|
+
let h = this.getAttribute(i);
|
|
142
|
+
if (h === null) {
|
|
143
|
+
const d = l.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
144
|
+
h = this.getAttribute(d);
|
|
145
|
+
}
|
|
146
|
+
if (h !== null && !this[l]) {
|
|
147
|
+
const d = y(l, h);
|
|
148
|
+
d !== null && (this[l] = d);
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
connectedCallback() {
|
|
153
|
+
this._parseAttributes(), super.connectedCallback?.(), O(this);
|
|
154
|
+
const u = this.getAttribute("name");
|
|
155
|
+
u && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = u, this.after(this._hiddenInput));
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
return c;
|
|
159
|
+
}
|
|
160
|
+
function L(t) {
|
|
161
|
+
return t.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
162
|
+
}
|
|
163
|
+
function M(t) {
|
|
164
|
+
const e = t.__name || t.name;
|
|
165
|
+
if (!e)
|
|
166
|
+
throw new Error("Component must have a __name or name property");
|
|
167
|
+
const r = L(e), s = R(t);
|
|
168
|
+
customElements.get(r) || customElements.define(r, s);
|
|
169
|
+
}
|
|
170
|
+
M(k);
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
import { ref as I, getCurrentInstance as k, defineComponent as $, computed as S, createElementBlock as _, openBlock as b, normalizeClass as y, createElementVNode as h, unref as f, renderSlot as C, createBlock as j, createCommentVNode as E, toDisplayString as A, defineCustomElement as O } from "vue";
|
|
2
|
+
function N() {
|
|
3
|
+
const e = I(!1), n = k()?.root || {};
|
|
4
|
+
return "isCE" in n && n.isCE === !0 && (e.value = !0), e;
|
|
5
|
+
}
|
|
6
|
+
const T = [void 0, 10, 12, 20, 24, 32, 64], x = ["xlink:href"], z = /* @__PURE__ */ $({
|
|
7
|
+
__name: "PvIcon",
|
|
8
|
+
props: {
|
|
9
|
+
name: { type: String },
|
|
10
|
+
size: { type: null }
|
|
11
|
+
},
|
|
12
|
+
setup(e) {
|
|
13
|
+
const t = e, n = N(), r = I(null), a = S(() => ({
|
|
14
|
+
"pv-icon": !0,
|
|
15
|
+
[`pv-icon-${t.size}`]: T.includes(t.size)
|
|
16
|
+
})), c = S(() => n.value && r.value ? `${r.value}#${t.name}` : `#${t.name}`);
|
|
17
|
+
return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (r.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), (p, s) => (b(), _(
|
|
18
|
+
"svg",
|
|
19
|
+
{
|
|
20
|
+
"data-testid": "pv-icon",
|
|
21
|
+
"aria-hidden": "true",
|
|
22
|
+
class: y(a.value)
|
|
23
|
+
},
|
|
24
|
+
[
|
|
25
|
+
h("use", { "xlink:href": c.value }, null, 8, x)
|
|
26
|
+
],
|
|
27
|
+
2
|
|
28
|
+
/* CLASS */
|
|
29
|
+
));
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
var g = /* @__PURE__ */ ((e) => (e.Vertical = "Vertical", e.Horizontal = "Horizontal", e))(g || {}), m = /* @__PURE__ */ ((e) => (e.Primary = "Primary", e.Secondary = "Secondary", e.Tertiary = "Tertiary", e))(m || {});
|
|
33
|
+
const H = ["title"], B = ["title"], L = { class: "pv-flex" }, R = /* @__PURE__ */ $({
|
|
34
|
+
__name: "PvBanner",
|
|
35
|
+
props: {
|
|
36
|
+
label: { type: String },
|
|
37
|
+
description: { type: String },
|
|
38
|
+
icon: { type: String },
|
|
39
|
+
variant: { default: m.Primary, type: null },
|
|
40
|
+
orientation: { default: g.Horizontal, type: null }
|
|
41
|
+
},
|
|
42
|
+
setup(e) {
|
|
43
|
+
return (t, n) => (b(), _(
|
|
44
|
+
"div",
|
|
45
|
+
{
|
|
46
|
+
"data-testid": "pv-banner",
|
|
47
|
+
class: y([
|
|
48
|
+
{
|
|
49
|
+
"pv-banner-primary": e.variant === f(m).Primary,
|
|
50
|
+
"pv-banner-secondary": e.variant === f(m).Secondary,
|
|
51
|
+
"pv-banner-tertiary": e.variant === f(m).Tertiary,
|
|
52
|
+
"pv-flex pv-space-between": e.orientation === f(g).Horizontal
|
|
53
|
+
}
|
|
54
|
+
])
|
|
55
|
+
},
|
|
56
|
+
[
|
|
57
|
+
h(
|
|
58
|
+
"div",
|
|
59
|
+
{
|
|
60
|
+
class: y([
|
|
61
|
+
"pv-flex",
|
|
62
|
+
{
|
|
63
|
+
"pv-stack-16": e.orientation === f(g).Vertical && t.$slots.action
|
|
64
|
+
}
|
|
65
|
+
])
|
|
66
|
+
},
|
|
67
|
+
[
|
|
68
|
+
C(t.$slots, "left"),
|
|
69
|
+
e.icon ? (b(), j(z, {
|
|
70
|
+
key: 0,
|
|
71
|
+
"data-testid": "pv-banner-icon",
|
|
72
|
+
class: "pv-text-brand",
|
|
73
|
+
name: e.icon
|
|
74
|
+
}, null, 8, ["name"])) : E("v-if", !0),
|
|
75
|
+
h("div", null, [
|
|
76
|
+
h("p", {
|
|
77
|
+
class: y([
|
|
78
|
+
" pv-text-title-md pv-line-clamp",
|
|
79
|
+
{
|
|
80
|
+
"pv-stack-4": e.description
|
|
81
|
+
}
|
|
82
|
+
]),
|
|
83
|
+
style: { "--lines": "2", "font-weight": "500" },
|
|
84
|
+
title: e.label
|
|
85
|
+
}, A(e.label), 11, H),
|
|
86
|
+
e.description ? (b(), _("p", {
|
|
87
|
+
key: 0,
|
|
88
|
+
class: "pv-text-body-sm pv-line-clamp",
|
|
89
|
+
style: { "--lines": "2" },
|
|
90
|
+
title: e.description
|
|
91
|
+
}, A(e.description), 9, B)) : E("v-if", !0)
|
|
92
|
+
])
|
|
93
|
+
],
|
|
94
|
+
2
|
|
95
|
+
/* CLASS */
|
|
96
|
+
),
|
|
97
|
+
h("div", L, [
|
|
98
|
+
C(t.$slots, "action")
|
|
99
|
+
])
|
|
100
|
+
],
|
|
101
|
+
2
|
|
102
|
+
/* CLASS */
|
|
103
|
+
));
|
|
104
|
+
}
|
|
105
|
+
}), D = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
106
|
+
function W(e) {
|
|
107
|
+
return !D.has(e);
|
|
108
|
+
}
|
|
109
|
+
function P(e, t) {
|
|
110
|
+
const n = document.querySelector('link[href*="' + t + '"]');
|
|
111
|
+
if (!e.shadowRoot)
|
|
112
|
+
return !1;
|
|
113
|
+
if (n && e.shadowRoot) {
|
|
114
|
+
const r = n.href;
|
|
115
|
+
if (e.shadowRoot.querySelector(`link[href="${r}"]`))
|
|
116
|
+
return;
|
|
117
|
+
const a = document.createElement("link");
|
|
118
|
+
return a.rel = "stylesheet", a.href = r, e.shadowRoot.prepend(a), !0;
|
|
119
|
+
}
|
|
120
|
+
return !1;
|
|
121
|
+
}
|
|
122
|
+
function V(e) {
|
|
123
|
+
if (!P(e, "pit-viper-v2")) {
|
|
124
|
+
if (P(e, "pit-viper")) {
|
|
125
|
+
P(e, "pit-viper-v2-scoped");
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
console.warn(
|
|
129
|
+
"No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
|
|
130
|
+
);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
const G = (e) => ({ shadowRoot: W(e) });
|
|
134
|
+
function M(e, t) {
|
|
135
|
+
return t === null ? !1 : t === "" || t === "true" ? !0 : (t === "false" || console.warn(
|
|
136
|
+
`Invalid boolean attribute value for "${e}": "${t}". Expected "true", "false", or empty string.`
|
|
137
|
+
), !1);
|
|
138
|
+
}
|
|
139
|
+
function J(e, t) {
|
|
140
|
+
const n = Number(t);
|
|
141
|
+
return isNaN(n) && console.warn(`Invalid number attribute value for "${e}": "${t}". Expected a valid number.`), n;
|
|
142
|
+
}
|
|
143
|
+
function q(e) {
|
|
144
|
+
const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), c = (e.__vccOpts || e).props;
|
|
145
|
+
return c && typeof c == "object" && Object.entries(c).forEach(([p, s]) => {
|
|
146
|
+
s === Boolean || s && s.type === Boolean ? t.add(p) : s === Number || s && s.type === Number ? n.add(p) : (s === Object || s === Array || s && (s.type === Object || s.type === Array)) && r.add(p);
|
|
147
|
+
}), { booleanProps: t, numberProps: n, jsonProps: r };
|
|
148
|
+
}
|
|
149
|
+
function w(e, t) {
|
|
150
|
+
try {
|
|
151
|
+
return JSON.parse(t);
|
|
152
|
+
} catch (n) {
|
|
153
|
+
return console.warn(
|
|
154
|
+
`Invalid JSON attribute value for "${e}": "${t}". Error: ${n instanceof Error ? n.message : String(n)}`
|
|
155
|
+
), null;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
function U(e) {
|
|
159
|
+
const t = e.__name || e.name;
|
|
160
|
+
if (!t)
|
|
161
|
+
throw new Error("Component must have a __name or name property");
|
|
162
|
+
const n = O(e, G(t)), { booleanProps: r, numberProps: a, jsonProps: c } = q(e);
|
|
163
|
+
class p extends n {
|
|
164
|
+
_hiddenInput = null;
|
|
165
|
+
constructor() {
|
|
166
|
+
super(), this._parseAttributes();
|
|
167
|
+
}
|
|
168
|
+
disconnectedCallback() {
|
|
169
|
+
this._hiddenInput?.remove(), super.disconnectedCallback?.();
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Update the hidden input value
|
|
173
|
+
* Call this from the Vue component to sync form value
|
|
174
|
+
*/
|
|
175
|
+
setHiddenInputValue(l) {
|
|
176
|
+
this._hiddenInput && (this._hiddenInput.value = l ?? "");
|
|
177
|
+
}
|
|
178
|
+
_parseAttributes() {
|
|
179
|
+
r.forEach((o) => {
|
|
180
|
+
const i = this.getAttribute(o);
|
|
181
|
+
this[o] = M(o, i);
|
|
182
|
+
}), a.forEach((o) => {
|
|
183
|
+
const i = this.getAttribute(o);
|
|
184
|
+
i !== null && (this[o] = J(o, i));
|
|
185
|
+
}), c.forEach((o) => {
|
|
186
|
+
const i = this.getAttribute(o);
|
|
187
|
+
if (i !== null) {
|
|
188
|
+
const u = w(o, i);
|
|
189
|
+
u !== null && (this[o] = u);
|
|
190
|
+
}
|
|
191
|
+
});
|
|
192
|
+
const l = this.getAttribute("data-json-props");
|
|
193
|
+
l && l.split(",").map((i) => i.trim()).filter(Boolean).forEach((i) => {
|
|
194
|
+
const u = i.replace(/-([a-z])/g, (d) => d[1].toUpperCase());
|
|
195
|
+
let v = this.getAttribute(i);
|
|
196
|
+
if (v === null) {
|
|
197
|
+
const d = u.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
198
|
+
v = this.getAttribute(d);
|
|
199
|
+
}
|
|
200
|
+
if (v !== null && !this[u]) {
|
|
201
|
+
const d = w(u, v);
|
|
202
|
+
d !== null && (this[u] = d);
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
connectedCallback() {
|
|
207
|
+
this._parseAttributes(), super.connectedCallback?.(), V(this);
|
|
208
|
+
const l = this.getAttribute("name");
|
|
209
|
+
l && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = l, this.after(this._hiddenInput));
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
return p;
|
|
213
|
+
}
|
|
214
|
+
function Z(e) {
|
|
215
|
+
return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
216
|
+
}
|
|
217
|
+
function K(e) {
|
|
218
|
+
const t = e.__name || e.name;
|
|
219
|
+
if (!t)
|
|
220
|
+
throw new Error("Component must have a __name or name property");
|
|
221
|
+
const n = Z(t), r = U(e);
|
|
222
|
+
customElements.get(n) || customElements.define(n, r);
|
|
223
|
+
}
|
|
224
|
+
K(R);
|