@turquoisehealth/pit-viper 2.104.1 → 2.104.2-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/_site/assets/css/pit-viper-v2-scoped.css +19 -0
- package/_site/assets/css/pit-viper-v2.css +21 -0
- package/_site/assets/css/pit-viper.css +21 -0
- package/package.json +38 -11
- 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-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-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-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-widget-stats.html +4949 -0
- package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +3 -4
- package/pv-components/dist/vue/base/components/base/PvSelectButton/PvSelectButton.vue.d.ts +1 -1
- package/pv-components/dist/vue/base/components/base/PvTooltipV2/PvTooltipV2.vue.d.ts +1 -0
- package/pv-components/dist/vue/base/components/base/PvTooltipV2/types.d.ts +2 -1
- package/pv-components/dist/vue/base/pv-components-base.mjs +3429 -5665
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +3428 -5941
- package/pv-components/dist/web/components/pv-accordion/pv-accordion.js +186 -0
- package/pv-components/dist/web/components/pv-action-bar/pv-action-bar.js +66 -0
- package/pv-components/dist/web/components/pv-avatar/pv-avatar.js +96 -0
- package/pv-components/dist/web/components/pv-avatar-group/pv-avatar-group.js +102 -0
- package/pv-components/dist/web/components/pv-banner/pv-banner.js +155 -0
- package/pv-components/dist/web/components/pv-breadcrumbs/pv-breadcrumbs.js +92 -0
- package/pv-components/dist/web/components/pv-button/pv-button.js +173 -0
- package/pv-components/dist/web/components/pv-card/pv-card.js +80 -0
- package/pv-components/dist/web/components/pv-checkbox/pv-checkbox.js +77 -0
- package/pv-components/dist/web/components/pv-company-label/pv-company-label.js +153 -0
- package/pv-components/dist/web/components/pv-company-logo/pv-company-logo.js +124 -0
- package/pv-components/dist/web/components/pv-company-tag/pv-company-tag.js +204 -0
- package/pv-components/dist/web/components/pv-counter-badge/pv-counter-badge.js +89 -0
- package/pv-components/dist/web/components/pv-date-picker/pv-date-picker.js +7481 -0
- package/pv-components/dist/web/components/pv-date-time/pv-date-time.js +577 -0
- package/pv-components/dist/web/components/pv-drawer/pv-drawer.js +486 -0
- package/pv-components/dist/web/components/pv-dropdown/pv-dropdown.js +1724 -0
- package/pv-components/dist/web/components/pv-expandable-content/pv-expandable-content.js +235 -0
- package/pv-components/dist/web/components/pv-ghost-input/pv-ghost-input.js +251 -0
- package/pv-components/dist/web/components/pv-icon/pv-icon.js +81 -0
- package/pv-components/dist/web/components/pv-input/pv-input.js +123 -0
- package/pv-components/dist/web/components/pv-insight-card/pv-insight-card.js +293 -0
- package/pv-components/dist/web/components/pv-modal/pv-modal.js +118 -0
- package/pv-components/dist/web/components/pv-multi-select-button/pv-multi-select-button.js +2752 -0
- package/pv-components/dist/web/components/pv-pagination/pv-pagination.js +286 -0
- package/pv-components/dist/web/components/pv-pill/pv-pill.js +160 -0
- package/pv-components/dist/web/components/pv-popover/pv-popover.js +1417 -0
- package/pv-components/dist/web/components/pv-popover-menu/pv-popover-menu.js +1439 -0
- package/pv-components/dist/web/components/pv-popover-v2/pv-popover-v2.js +1421 -0
- package/pv-components/dist/web/components/pv-rating/pv-rating.js +78 -0
- package/pv-components/dist/web/components/pv-release-badge/pv-release-badge.js +74 -0
- package/pv-components/dist/web/components/pv-search-input/pv-search-input.js +170 -0
- package/pv-components/dist/web/components/pv-segmented-control/pv-segmented-control.js +145 -0
- package/pv-components/dist/web/components/pv-select-button/pv-select-button.js +2563 -0
- package/pv-components/dist/web/components/pv-selectable-card/pv-selectable-card.js +85 -0
- package/pv-components/dist/web/components/pv-side-panel/pv-side-panel.js +80 -0
- package/pv-components/dist/web/components/pv-skeleton/pv-skeleton.js +1525 -0
- package/pv-components/dist/web/components/pv-spinner/pv-spinner.js +83 -0
- package/pv-components/dist/web/components/pv-sprite/pv-sprite.js +82 -0
- package/pv-components/dist/web/components/pv-suggestion-tag/pv-suggestion-tag.js +126 -0
- package/pv-components/dist/web/components/pv-switch/pv-switch.js +94 -0
- package/pv-components/dist/web/components/pv-tab-list/pv-tab-list.js +100 -0
- package/pv-components/dist/web/components/pv-tabs/pv-tabs.js +178 -0
- package/pv-components/dist/web/components/pv-tag/pv-tag.js +141 -0
- package/pv-components/dist/web/components/pv-text-area/pv-text-area.js +120 -0
- package/pv-components/dist/web/components/pv-toast/pv-toast.js +223 -0
- package/pv-components/dist/web/components/pv-toggle-button/pv-toggle-button.js +139 -0
- package/pv-components/dist/web/components/pv-toggle-group/pv-toggle-group.js +2887 -0
- package/pv-components/dist/web/components/pv-tooltip/pv-tooltip.js +90 -0
- package/pv-components/dist/web/components/pv-tooltip-v2/pv-tooltip-v2.js +1489 -0
- package/pv-components/dist/web/components/pv-widget/pv-widget.js +91 -0
- package/pv-components/dist/web/pv-components.iife.js +21 -21
- package/pv-components/dist/web/vue.runtime.esm-browser.prod.js +7 -0
- package/pv-components/dist/vue/base/pv-components-base.js +0 -1546
- package/pv-components/dist/vue/base/pv-components-base.umd.js +0 -1546
- package/pv-components/dist/vue/charts/pv-components-charts.d.ts +0 -491
- package/pv-components/dist/vue/charts/pv-components-charts.js +0 -259
- package/pv-components/dist/vue/charts/pv-components-charts.mjs +0 -121834
- package/pv-components/dist/vue/charts/pv-components-charts.umd.js +0 -259
- package/pv-components/dist/vue/tables/pv-components-tables.d.ts +0 -299
- package/pv-components/dist/vue/tables/pv-components-tables.js +0 -223
- package/pv-components/dist/vue/tables/pv-components-tables.mjs +0 -47028
- package/pv-components/dist/vue/tables/pv-components-tables.umd.js +0 -223
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.js +0 -176
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.umd.js +0 -176
|
@@ -0,0 +1,293 @@
|
|
|
1
|
+
import { defineComponent as v, computed as u, createBlock as c, openBlock as o, resolveDynamicComponent as k, normalizeClass as f, withCtx as S, renderSlot as _, ref as g, onMounted as C, getCurrentInstance as x, createElementBlock as r, createElementVNode as y, normalizeStyle as P, Fragment as w, createCommentVNode as i, toDisplayString as p, withModifiers as $, defineCustomElement as E } from "vue";
|
|
2
|
+
const I = /* @__PURE__ */ v({
|
|
3
|
+
__name: "PvCard",
|
|
4
|
+
props: {
|
|
5
|
+
href: { type: String },
|
|
6
|
+
variant: { default: "primary", type: String },
|
|
7
|
+
interactive: { type: Boolean, default: !1 }
|
|
8
|
+
},
|
|
9
|
+
setup(e) {
|
|
10
|
+
const t = e, n = u(() => t.href ? "a" : t.interactive ? "button" : "div"), a = u(() => t.href || t.interactive ? "button" : "div");
|
|
11
|
+
return (s, l) => (o(), c(k(n.value), {
|
|
12
|
+
href: e.href,
|
|
13
|
+
type: a.value,
|
|
14
|
+
class: f([
|
|
15
|
+
"pv-card pv-inset-square-8 pv-inline-block",
|
|
16
|
+
{
|
|
17
|
+
"pv-card-secondary": e.variant === "secondary"
|
|
18
|
+
}
|
|
19
|
+
]),
|
|
20
|
+
"data-testid": "pv-card"
|
|
21
|
+
}, {
|
|
22
|
+
default: S(() => [
|
|
23
|
+
_(s.$slots, "default")
|
|
24
|
+
]),
|
|
25
|
+
_: 3
|
|
26
|
+
/* FORWARDED */
|
|
27
|
+
}, 8, ["href", "type", "class"]));
|
|
28
|
+
}
|
|
29
|
+
}), z = [void 0, 10, 12, 20, 24, 32, 64], B = ["xlink:href"], h = /* @__PURE__ */ v({
|
|
30
|
+
__name: "PvIcon",
|
|
31
|
+
props: {
|
|
32
|
+
name: { type: String },
|
|
33
|
+
size: { type: null }
|
|
34
|
+
},
|
|
35
|
+
setup(e) {
|
|
36
|
+
const t = e, n = g(!1), a = g(null), s = u(() => ({
|
|
37
|
+
"pv-icon": !0,
|
|
38
|
+
[`pv-icon-${t.size}`]: z.includes(t.size)
|
|
39
|
+
})), l = u(() => n.value && a.value ? `${a.value}#${t.name}` : `#${t.name}`);
|
|
40
|
+
return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (a.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), C(() => {
|
|
41
|
+
const d = x()?.root;
|
|
42
|
+
n.value = d && "isCE" in d && d.isCE;
|
|
43
|
+
}), (d, ee) => (o(), r(
|
|
44
|
+
"svg",
|
|
45
|
+
{
|
|
46
|
+
"data-testid": "pv-icon",
|
|
47
|
+
"aria-hidden": "true",
|
|
48
|
+
class: f(s.value)
|
|
49
|
+
},
|
|
50
|
+
[
|
|
51
|
+
y("use", { "xlink:href": l.value }, null, 8, B)
|
|
52
|
+
],
|
|
53
|
+
2
|
|
54
|
+
/* CLASS */
|
|
55
|
+
));
|
|
56
|
+
}
|
|
57
|
+
}), T = /* @__PURE__ */ v({
|
|
58
|
+
__name: "PvSpinner",
|
|
59
|
+
props: {
|
|
60
|
+
variant: { default: "primary", type: String },
|
|
61
|
+
size: { default: "lg", type: String }
|
|
62
|
+
},
|
|
63
|
+
setup(e) {
|
|
64
|
+
const t = {
|
|
65
|
+
xs: "0.75rem",
|
|
66
|
+
sm: "1rem",
|
|
67
|
+
md: "1.25rem",
|
|
68
|
+
lg: "1.5rem",
|
|
69
|
+
xl: "2rem"
|
|
70
|
+
}, n = {
|
|
71
|
+
primary: "pv-spinner",
|
|
72
|
+
dark: "pv-spinner-dark",
|
|
73
|
+
white: "pv-spinner-light"
|
|
74
|
+
};
|
|
75
|
+
return (a, s) => (o(), r(
|
|
76
|
+
"div",
|
|
77
|
+
{
|
|
78
|
+
"data-testid": "pv-spinner",
|
|
79
|
+
class: f(n[e.variant]),
|
|
80
|
+
style: P({ "--size": t[e.size] })
|
|
81
|
+
},
|
|
82
|
+
null,
|
|
83
|
+
6
|
|
84
|
+
/* CLASS, STYLE */
|
|
85
|
+
));
|
|
86
|
+
}
|
|
87
|
+
}), b = {
|
|
88
|
+
md: "pv-button-small",
|
|
89
|
+
lg: void 0,
|
|
90
|
+
xl: "pv-button-large"
|
|
91
|
+
}, L = (e) => e == null || !b.hasOwnProperty(e) ? null : b[e] || null, O = ["disabled"], R = {
|
|
92
|
+
key: 1,
|
|
93
|
+
"data-testid": "pv-button-label"
|
|
94
|
+
}, V = /* @__PURE__ */ v({
|
|
95
|
+
__name: "PvButton",
|
|
96
|
+
props: {
|
|
97
|
+
variant: { default: "primary", type: String },
|
|
98
|
+
disabled: { type: Boolean, default: !1 },
|
|
99
|
+
size: { default: "lg", type: String },
|
|
100
|
+
loading: { type: Boolean, default: !1 },
|
|
101
|
+
label: { type: String },
|
|
102
|
+
leftIcon: { type: String },
|
|
103
|
+
rightIcon: { type: String },
|
|
104
|
+
inverse: { type: Boolean, default: !1 }
|
|
105
|
+
},
|
|
106
|
+
setup(e) {
|
|
107
|
+
const t = ["ghost"], n = e, a = u(() => {
|
|
108
|
+
const s = [];
|
|
109
|
+
n.inverse && t.includes(n.variant) ? s.push(`pv-button-${n.variant}-inverse`) : s.push(`pv-button-${n.variant}`);
|
|
110
|
+
const l = L(n.size);
|
|
111
|
+
return l && s.push(l), s;
|
|
112
|
+
});
|
|
113
|
+
return (s, l) => (o(), r("button", {
|
|
114
|
+
type: "button",
|
|
115
|
+
class: f(a.value),
|
|
116
|
+
disabled: e.disabled,
|
|
117
|
+
"data-testid": "pv-button"
|
|
118
|
+
}, [
|
|
119
|
+
e.loading ? (o(), c(T, {
|
|
120
|
+
key: 0,
|
|
121
|
+
size: "sm"
|
|
122
|
+
})) : (o(), r(
|
|
123
|
+
w,
|
|
124
|
+
{ key: 1 },
|
|
125
|
+
[
|
|
126
|
+
e.leftIcon ? (o(), c(h, {
|
|
127
|
+
key: 0,
|
|
128
|
+
name: e.leftIcon,
|
|
129
|
+
"data-testid": "pv-button-left-icon"
|
|
130
|
+
}, null, 8, ["name"])) : i("v-if", !0),
|
|
131
|
+
e.label ? (o(), r(
|
|
132
|
+
"span",
|
|
133
|
+
R,
|
|
134
|
+
p(e.label),
|
|
135
|
+
1
|
|
136
|
+
/* TEXT */
|
|
137
|
+
)) : i("v-if", !0),
|
|
138
|
+
e.rightIcon ? (o(), c(h, {
|
|
139
|
+
key: 2,
|
|
140
|
+
name: e.rightIcon,
|
|
141
|
+
"data-testid": "pv-button-right-icon"
|
|
142
|
+
}, null, 8, ["name"])) : i("v-if", !0)
|
|
143
|
+
],
|
|
144
|
+
64
|
|
145
|
+
/* STABLE_FRAGMENT */
|
|
146
|
+
))
|
|
147
|
+
], 10, O));
|
|
148
|
+
}
|
|
149
|
+
}), A = {
|
|
150
|
+
class: "pv-flex-vertical",
|
|
151
|
+
style: { "--flex-align": "flex-start", "--flex-gap": "0.25rem" }
|
|
152
|
+
}, D = {
|
|
153
|
+
key: 0,
|
|
154
|
+
class: "pv-flex",
|
|
155
|
+
style: { "--flex-gap": "0.25rem" }
|
|
156
|
+
}, M = { class: "pv-text-body-sm" }, N = {
|
|
157
|
+
key: 1,
|
|
158
|
+
class: "pv-text-body-sm pv-text-tertiary"
|
|
159
|
+
}, G = {
|
|
160
|
+
key: 2,
|
|
161
|
+
class: "pv-heading-2"
|
|
162
|
+
}, H = {
|
|
163
|
+
key: 3,
|
|
164
|
+
class: "pv-text-body-md pv-text-secondary pv-text-subdued"
|
|
165
|
+
}, W = /* @__PURE__ */ v({
|
|
166
|
+
__name: "PvInsightCard",
|
|
167
|
+
props: {
|
|
168
|
+
icon: { default: "ai", type: String },
|
|
169
|
+
insight: { type: String },
|
|
170
|
+
upperLabel: { type: String },
|
|
171
|
+
title: { type: String },
|
|
172
|
+
description: { type: String },
|
|
173
|
+
showButton: { type: Boolean, default: !1 },
|
|
174
|
+
interactive: { type: Boolean, default: !1 }
|
|
175
|
+
},
|
|
176
|
+
emits: ["click", "icon-click"],
|
|
177
|
+
setup(e) {
|
|
178
|
+
const t = e, n = u(() => t.icon || t.insight);
|
|
179
|
+
return (a, s) => (o(), c(I, {
|
|
180
|
+
variant: "secondary",
|
|
181
|
+
interactive: e.interactive,
|
|
182
|
+
onClick: s[1] || (s[1] = (l) => a.$emit("click")),
|
|
183
|
+
class: "pv-relative"
|
|
184
|
+
}, {
|
|
185
|
+
default: S(() => [
|
|
186
|
+
y("div", A, [
|
|
187
|
+
n.value ? (o(), r("div", D, [
|
|
188
|
+
e.icon ? (o(), c(h, {
|
|
189
|
+
key: 0,
|
|
190
|
+
style: { color: "#218c88" },
|
|
191
|
+
name: e.icon,
|
|
192
|
+
size: 12
|
|
193
|
+
}, null, 8, ["name"])) : i("v-if", !0),
|
|
194
|
+
y(
|
|
195
|
+
"span",
|
|
196
|
+
M,
|
|
197
|
+
p(e.insight),
|
|
198
|
+
1
|
|
199
|
+
/* TEXT */
|
|
200
|
+
)
|
|
201
|
+
])) : i("v-if", !0),
|
|
202
|
+
e.upperLabel ? (o(), r(
|
|
203
|
+
"span",
|
|
204
|
+
N,
|
|
205
|
+
p(e.upperLabel),
|
|
206
|
+
1
|
|
207
|
+
/* TEXT */
|
|
208
|
+
)) : i("v-if", !0),
|
|
209
|
+
e.title ? (o(), r(
|
|
210
|
+
"span",
|
|
211
|
+
G,
|
|
212
|
+
p(e.title),
|
|
213
|
+
1
|
|
214
|
+
/* TEXT */
|
|
215
|
+
)) : i("v-if", !0),
|
|
216
|
+
e.description ? (o(), r(
|
|
217
|
+
"span",
|
|
218
|
+
H,
|
|
219
|
+
p(e.description),
|
|
220
|
+
1
|
|
221
|
+
/* TEXT */
|
|
222
|
+
)) : i("v-if", !0)
|
|
223
|
+
]),
|
|
224
|
+
e.showButton ? (o(), c(V, {
|
|
225
|
+
key: 0,
|
|
226
|
+
"left-icon": "new-tab",
|
|
227
|
+
variant: "ghost",
|
|
228
|
+
size: "md",
|
|
229
|
+
class: "pv-insight-button",
|
|
230
|
+
onClick: s[0] || (s[0] = $((l) => a.$emit("icon-click"), ["stop"]))
|
|
231
|
+
})) : i("v-if", !0)
|
|
232
|
+
]),
|
|
233
|
+
_: 1
|
|
234
|
+
/* STABLE */
|
|
235
|
+
}, 8, ["interactive"]));
|
|
236
|
+
}
|
|
237
|
+
}), j = ".pv-insight-button[data-v-6e9399e6]{position:absolute;top:.5rem;right:.5rem}", q = (e, t) => {
|
|
238
|
+
const n = e.__vccOpts || e;
|
|
239
|
+
for (const [a, s] of t)
|
|
240
|
+
n[a] = s;
|
|
241
|
+
return n;
|
|
242
|
+
}, F = /* @__PURE__ */ q(W, [["styles", [j]], ["__scopeId", "data-v-6e9399e6"]]), K = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
243
|
+
function U(e) {
|
|
244
|
+
return !K.has(e);
|
|
245
|
+
}
|
|
246
|
+
function m(e, t) {
|
|
247
|
+
const n = document.querySelector('link[href*="' + t + '"]');
|
|
248
|
+
if (!e.shadowRoot)
|
|
249
|
+
return !1;
|
|
250
|
+
if (n && e.shadowRoot) {
|
|
251
|
+
const a = n.href;
|
|
252
|
+
if (e.shadowRoot.querySelector(`link[href="${a}"]`))
|
|
253
|
+
return;
|
|
254
|
+
const s = document.createElement("link");
|
|
255
|
+
return s.rel = "stylesheet", s.href = a, e.shadowRoot.prepend(s), !0;
|
|
256
|
+
}
|
|
257
|
+
return !1;
|
|
258
|
+
}
|
|
259
|
+
function Z(e) {
|
|
260
|
+
if (!m(e, "pit-viper-v2")) {
|
|
261
|
+
if (m(e, "pit-viper")) {
|
|
262
|
+
m(e, "pit-viper-v2-scoped");
|
|
263
|
+
return;
|
|
264
|
+
}
|
|
265
|
+
console.warn(
|
|
266
|
+
"No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
|
|
267
|
+
);
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
const J = (e) => ({ shadowRoot: U(e) });
|
|
271
|
+
function Q(e) {
|
|
272
|
+
const t = e.__name || e.name;
|
|
273
|
+
if (!t)
|
|
274
|
+
throw new Error("Component must have a __name or name property");
|
|
275
|
+
const n = E(e, J(t));
|
|
276
|
+
class a extends n {
|
|
277
|
+
connectedCallback() {
|
|
278
|
+
super.connectedCallback?.(), Z(this);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
return a;
|
|
282
|
+
}
|
|
283
|
+
function X(e) {
|
|
284
|
+
return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
285
|
+
}
|
|
286
|
+
function Y(e) {
|
|
287
|
+
const t = e.__name || e.name;
|
|
288
|
+
if (!t)
|
|
289
|
+
throw new Error("Component must have a __name or name property");
|
|
290
|
+
const n = X(t), a = Q(e);
|
|
291
|
+
customElements.get(n) || customElements.define(n, a);
|
|
292
|
+
}
|
|
293
|
+
Y(F);
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { defineComponent as f, mergeModels as p, useTemplateRef as h, useModel as v, watch as y, createElementBlock as l, openBlock as r, createElementVNode as a, createCommentVNode as d, renderSlot as u, toDisplayString as m, defineCustomElement as C } from "vue";
|
|
2
|
+
const b = ["closedby"], w = { class: "pv-inset-squish-12" }, g = {
|
|
3
|
+
class: "pv-flex pv-flex-vertical pv-stack-16",
|
|
4
|
+
style: { "--flex-align": "flex-start" }
|
|
5
|
+
}, k = { class: "pv-heading-3" }, _ = {
|
|
6
|
+
key: 0,
|
|
7
|
+
class: "pv-text-body-md"
|
|
8
|
+
}, E = {
|
|
9
|
+
key: 0,
|
|
10
|
+
class: "pv-inset-squish-12 pv-border-top",
|
|
11
|
+
style: { "--color-border": "#d2d8dc" }
|
|
12
|
+
}, S = /* @__PURE__ */ f({
|
|
13
|
+
__name: "PvModal",
|
|
14
|
+
props: /* @__PURE__ */ p({
|
|
15
|
+
header: { type: String },
|
|
16
|
+
subheader: { type: String },
|
|
17
|
+
disableCloseOnClickOutside: { type: Boolean, default: !1 },
|
|
18
|
+
hideFooter: { type: Boolean, default: !1 }
|
|
19
|
+
}, {
|
|
20
|
+
modelValue: { type: Boolean, required: !0 },
|
|
21
|
+
modelModifiers: {}
|
|
22
|
+
}),
|
|
23
|
+
emits: ["update:modelValue"],
|
|
24
|
+
setup(e) {
|
|
25
|
+
const s = e, o = h("dialog"), t = v(e, "modelValue");
|
|
26
|
+
y(
|
|
27
|
+
() => t.value,
|
|
28
|
+
() => {
|
|
29
|
+
t.value ? o.value?.showModal() : o.value?.close();
|
|
30
|
+
}
|
|
31
|
+
);
|
|
32
|
+
const n = () => {
|
|
33
|
+
s.disableCloseOnClickOutside || (t.value = !1);
|
|
34
|
+
};
|
|
35
|
+
return (c, R) => (r(), l("dialog", {
|
|
36
|
+
class: "pv-modal-sm",
|
|
37
|
+
ref_key: "dialog",
|
|
38
|
+
ref: o,
|
|
39
|
+
closedby: e.disableCloseOnClickOutside ? void 0 : "any",
|
|
40
|
+
style: { "--max-width": "480px" },
|
|
41
|
+
onClose: n
|
|
42
|
+
}, [
|
|
43
|
+
a("div", w, [
|
|
44
|
+
a("div", g, [
|
|
45
|
+
a(
|
|
46
|
+
"span",
|
|
47
|
+
k,
|
|
48
|
+
m(e.header),
|
|
49
|
+
1
|
|
50
|
+
/* TEXT */
|
|
51
|
+
),
|
|
52
|
+
e.subheader ? (r(), l(
|
|
53
|
+
"span",
|
|
54
|
+
_,
|
|
55
|
+
m(e.subheader),
|
|
56
|
+
1
|
|
57
|
+
/* TEXT */
|
|
58
|
+
)) : d("v-if", !0)
|
|
59
|
+
]),
|
|
60
|
+
u(c.$slots, "body")
|
|
61
|
+
]),
|
|
62
|
+
e.hideFooter ? d("v-if", !0) : (r(), l("div", E, [
|
|
63
|
+
u(c.$slots, "footer")
|
|
64
|
+
]))
|
|
65
|
+
], 40, b));
|
|
66
|
+
}
|
|
67
|
+
}), M = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
68
|
+
function O(e) {
|
|
69
|
+
return !M.has(e);
|
|
70
|
+
}
|
|
71
|
+
function i(e, s) {
|
|
72
|
+
const o = document.querySelector('link[href*="' + s + '"]');
|
|
73
|
+
if (!e.shadowRoot)
|
|
74
|
+
return !1;
|
|
75
|
+
if (o && e.shadowRoot) {
|
|
76
|
+
const t = o.href;
|
|
77
|
+
if (e.shadowRoot.querySelector(`link[href="${t}"]`))
|
|
78
|
+
return;
|
|
79
|
+
const n = document.createElement("link");
|
|
80
|
+
return n.rel = "stylesheet", n.href = t, e.shadowRoot.prepend(n), !0;
|
|
81
|
+
}
|
|
82
|
+
return !1;
|
|
83
|
+
}
|
|
84
|
+
function x(e) {
|
|
85
|
+
if (!i(e, "pit-viper-v2")) {
|
|
86
|
+
if (i(e, "pit-viper")) {
|
|
87
|
+
i(e, "pit-viper-v2-scoped");
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
console.warn(
|
|
91
|
+
"No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
const P = (e) => ({ shadowRoot: O(e) });
|
|
96
|
+
function B(e) {
|
|
97
|
+
const s = e.__name || e.name;
|
|
98
|
+
if (!s)
|
|
99
|
+
throw new Error("Component must have a __name or name property");
|
|
100
|
+
const o = C(e, P(s));
|
|
101
|
+
class t extends o {
|
|
102
|
+
connectedCallback() {
|
|
103
|
+
super.connectedCallback?.(), x(this);
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return t;
|
|
107
|
+
}
|
|
108
|
+
function D(e) {
|
|
109
|
+
return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
110
|
+
}
|
|
111
|
+
function N(e) {
|
|
112
|
+
const s = e.__name || e.name;
|
|
113
|
+
if (!s)
|
|
114
|
+
throw new Error("Component must have a __name or name property");
|
|
115
|
+
const o = D(s), t = B(e);
|
|
116
|
+
customElements.get(o) || customElements.define(o, t);
|
|
117
|
+
}
|
|
118
|
+
N(S);
|