@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,265 @@
|
|
|
1
|
+
import { defineComponent as S, computed as f, createElementBlock as g, openBlock as p, normalizeClass as A, toDisplayString as C, ref as $, getCurrentInstance as I, createElementVNode as h, mergeModels as P, useModel as O, normalizeStyle as B, createBlock as y, createCommentVNode as b, renderSlot as x, Fragment as z, defineCustomElement as j } from "vue";
|
|
2
|
+
const N = /* @__PURE__ */ S({
|
|
3
|
+
__name: "PvCounterBadge",
|
|
4
|
+
props: {
|
|
5
|
+
value: { type: Number },
|
|
6
|
+
prefix: { default: "", type: String },
|
|
7
|
+
variant: { default: "primary", type: null },
|
|
8
|
+
size: { default: "sm", type: String },
|
|
9
|
+
maxValue: { default: 99, type: Number }
|
|
10
|
+
},
|
|
11
|
+
setup(e) {
|
|
12
|
+
const t = e, n = f(() => t.size == "md" ? "md" : (t.size == "sm", "sm")), o = f(() => t.maxValue && t.value && t.value > t.maxValue ? `${t.maxValue}+` : t.value != null ? `${t.prefix}${t.value}` : "-"), s = f(() => ({
|
|
13
|
+
"pv-inline-block pv-inset-square pv-radius pv-text-center": !0,
|
|
14
|
+
"pv-badge-md pv-text-body-md": n.value == "md",
|
|
15
|
+
"pv-badge-sm pv-text-body-sm": n.value == "sm",
|
|
16
|
+
"pv-surface-brand-inverse pv-text-inverse": t.variant == "primary",
|
|
17
|
+
"pv-surface pv-bordered": t.variant == "secondary",
|
|
18
|
+
"pv-surface-lighten-5": t.variant == "tertiary",
|
|
19
|
+
"pv-text-secondary": t.variant == "ghost" || t.variant == "tertiary",
|
|
20
|
+
"pv-surface": t.variant == "ghost"
|
|
21
|
+
}));
|
|
22
|
+
return (u, a) => (p(), g(
|
|
23
|
+
"div",
|
|
24
|
+
{
|
|
25
|
+
class: A(s.value),
|
|
26
|
+
"data-testid": "pv-counter-badge"
|
|
27
|
+
},
|
|
28
|
+
C(o.value),
|
|
29
|
+
3
|
|
30
|
+
/* TEXT, CLASS */
|
|
31
|
+
));
|
|
32
|
+
}
|
|
33
|
+
}), V = ".pv-badge-md[data-v-fc3c1104]{--inset-size: 2px 2px;min-height:20px;max-height:20px;min-width:20px;font-weight:500}.pv-badge-sm[data-v-fc3c1104]{--inset-size: 0 2px;min-height:16px;max-height:16px;min-width:16px;font-weight:500}.pv-surface-lighten-5[data-v-fc3c1104]{background-color:#e0e5e4}.pv-text-secondary[data-v-fc3c1104]{color:#4b595c}", k = (e, t) => {
|
|
34
|
+
const n = e.__vccOpts || e;
|
|
35
|
+
for (const [o, s] of t)
|
|
36
|
+
n[o] = s;
|
|
37
|
+
return n;
|
|
38
|
+
}, T = /* @__PURE__ */ k(N, [["styles", [V]], ["__scopeId", "data-v-fc3c1104"]]);
|
|
39
|
+
function M() {
|
|
40
|
+
const e = $(!1), n = I()?.root || {};
|
|
41
|
+
return "isCE" in n && n.isCE === !0 && (e.value = !0), e;
|
|
42
|
+
}
|
|
43
|
+
const W = [void 0, 10, 12, 20, 24, 32, 64], L = ["xlink:href"], E = /* @__PURE__ */ S({
|
|
44
|
+
__name: "PvIcon",
|
|
45
|
+
props: {
|
|
46
|
+
name: { type: String },
|
|
47
|
+
size: { type: null }
|
|
48
|
+
},
|
|
49
|
+
setup(e) {
|
|
50
|
+
const t = e, n = M(), o = $(null), s = f(() => ({
|
|
51
|
+
"pv-icon": !0,
|
|
52
|
+
[`pv-icon-${t.size}`]: W.includes(t.size)
|
|
53
|
+
})), u = f(() => n.value && o.value ? `${o.value}#${t.name}` : `#${t.name}`);
|
|
54
|
+
return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (o.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), (a, r) => (p(), g(
|
|
55
|
+
"svg",
|
|
56
|
+
{
|
|
57
|
+
"data-testid": "pv-icon",
|
|
58
|
+
"aria-hidden": "true",
|
|
59
|
+
class: A(s.value)
|
|
60
|
+
},
|
|
61
|
+
[
|
|
62
|
+
h("use", { "xlink:href": u.value }, null, 8, L)
|
|
63
|
+
],
|
|
64
|
+
2
|
|
65
|
+
/* CLASS */
|
|
66
|
+
));
|
|
67
|
+
}
|
|
68
|
+
}), R = ["open"], D = /* @__PURE__ */ S({
|
|
69
|
+
__name: "PvAccordion",
|
|
70
|
+
props: /* @__PURE__ */ P({
|
|
71
|
+
chevronPosition: { default: "right", type: null },
|
|
72
|
+
chevronVariant: { default: "vertical", type: String },
|
|
73
|
+
defaultOpen: { type: Boolean },
|
|
74
|
+
counter: { type: Number },
|
|
75
|
+
enableTriggerSlot: { type: Boolean, default: !1 },
|
|
76
|
+
enableTriggerFullWidth: { type: Boolean, default: !1 },
|
|
77
|
+
header: { type: String },
|
|
78
|
+
summaryStyles: { type: Object }
|
|
79
|
+
}, {
|
|
80
|
+
modelValue: { type: Boolean },
|
|
81
|
+
modelModifiers: {}
|
|
82
|
+
}),
|
|
83
|
+
emits: /* @__PURE__ */ P(["summary-mouseenter", "summary-mouseleave"], ["update:modelValue"]),
|
|
84
|
+
setup(e) {
|
|
85
|
+
const t = e, n = O(e, "modelValue");
|
|
86
|
+
t.defaultOpen !== void 0 && (n.value = t.defaultOpen);
|
|
87
|
+
const o = (a) => {
|
|
88
|
+
const r = a.target;
|
|
89
|
+
n.value = r.open;
|
|
90
|
+
}, s = {
|
|
91
|
+
width: t.enableTriggerFullWidth ? "100%" : "fit-content"
|
|
92
|
+
}, u = f(() => t.chevronVariant === "horizontal" ? n.value ? "chevron-down" : "chevron-right" : n.value ? "chevron-up" : "chevron-down");
|
|
93
|
+
return (a, r) => (p(), g("details", {
|
|
94
|
+
"data-testid": "pv-accordion",
|
|
95
|
+
class: "pv-accordion",
|
|
96
|
+
open: n.value,
|
|
97
|
+
onToggle: o
|
|
98
|
+
}, [
|
|
99
|
+
h(
|
|
100
|
+
"summary",
|
|
101
|
+
{
|
|
102
|
+
class: "pv-flex pv-relative",
|
|
103
|
+
style: B({ ...s, ...e.summaryStyles }),
|
|
104
|
+
onMouseenter: r[0] || (r[0] = (c) => a.$emit("summary-mouseenter")),
|
|
105
|
+
onMouseleave: r[1] || (r[1] = (c) => a.$emit("summary-mouseleave"))
|
|
106
|
+
},
|
|
107
|
+
[
|
|
108
|
+
e.chevronPosition === "left" ? (p(), y(E, {
|
|
109
|
+
key: 0,
|
|
110
|
+
name: u.value
|
|
111
|
+
}, null, 8, ["name"])) : b("v-if", !0),
|
|
112
|
+
e.enableTriggerSlot ? x(a.$slots, "trigger", { key: 1 }, void 0, !0) : (p(), g(
|
|
113
|
+
z,
|
|
114
|
+
{ key: 2 },
|
|
115
|
+
[
|
|
116
|
+
h(
|
|
117
|
+
"span",
|
|
118
|
+
null,
|
|
119
|
+
C(e.header),
|
|
120
|
+
1
|
|
121
|
+
/* TEXT */
|
|
122
|
+
),
|
|
123
|
+
e.counter ? (p(), y(T, {
|
|
124
|
+
key: 0,
|
|
125
|
+
value: e.counter,
|
|
126
|
+
variant: "secondary",
|
|
127
|
+
size: "sm"
|
|
128
|
+
}, null, 8, ["value"])) : b("v-if", !0)
|
|
129
|
+
],
|
|
130
|
+
64
|
|
131
|
+
/* STABLE_FRAGMENT */
|
|
132
|
+
)),
|
|
133
|
+
e.chevronPosition === "right" ? (p(), y(E, {
|
|
134
|
+
key: 3,
|
|
135
|
+
name: u.value
|
|
136
|
+
}, null, 8, ["name"])) : b("v-if", !0)
|
|
137
|
+
],
|
|
138
|
+
36
|
|
139
|
+
/* STYLE, NEED_HYDRATION */
|
|
140
|
+
),
|
|
141
|
+
h("div", null, [
|
|
142
|
+
x(a.$slots, "default", {}, void 0, !0)
|
|
143
|
+
])
|
|
144
|
+
], 40, R));
|
|
145
|
+
}
|
|
146
|
+
}), H = "summary[data-v-d8e1ce50]{background-image:none;padding-right:2px}", G = /* @__PURE__ */ k(D, [["styles", [H]], ["__scopeId", "data-v-d8e1ce50"]]), q = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
147
|
+
function F(e) {
|
|
148
|
+
return !q.has(e);
|
|
149
|
+
}
|
|
150
|
+
function _(e, t) {
|
|
151
|
+
const n = document.querySelector('link[href*="' + t + '"]');
|
|
152
|
+
if (!e.shadowRoot)
|
|
153
|
+
return !1;
|
|
154
|
+
if (n && e.shadowRoot) {
|
|
155
|
+
const o = n.href;
|
|
156
|
+
if (e.shadowRoot.querySelector(`link[href="${o}"]`))
|
|
157
|
+
return;
|
|
158
|
+
const s = document.createElement("link");
|
|
159
|
+
return s.rel = "stylesheet", s.href = o, e.shadowRoot.prepend(s), !0;
|
|
160
|
+
}
|
|
161
|
+
return !1;
|
|
162
|
+
}
|
|
163
|
+
function J(e) {
|
|
164
|
+
if (!_(e, "pit-viper-v2")) {
|
|
165
|
+
if (_(e, "pit-viper")) {
|
|
166
|
+
_(e, "pit-viper-v2-scoped");
|
|
167
|
+
return;
|
|
168
|
+
}
|
|
169
|
+
console.warn(
|
|
170
|
+
"No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
|
|
171
|
+
);
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
const U = (e) => ({ shadowRoot: F(e) });
|
|
175
|
+
function Z(e, t) {
|
|
176
|
+
return t === null ? !1 : t === "" || t === "true" ? !0 : (t === "false" || console.warn(
|
|
177
|
+
`Invalid boolean attribute value for "${e}": "${t}". Expected "true", "false", or empty string.`
|
|
178
|
+
), !1);
|
|
179
|
+
}
|
|
180
|
+
function K(e, t) {
|
|
181
|
+
const n = Number(t);
|
|
182
|
+
return isNaN(n) && console.warn(`Invalid number attribute value for "${e}": "${t}". Expected a valid number.`), n;
|
|
183
|
+
}
|
|
184
|
+
function Q(e) {
|
|
185
|
+
const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), u = (e.__vccOpts || e).props;
|
|
186
|
+
return u && typeof u == "object" && Object.entries(u).forEach(([a, r]) => {
|
|
187
|
+
r === Boolean || r && r.type === Boolean ? t.add(a) : r === Number || r && r.type === Number ? n.add(a) : (r === Object || r === Array || r && (r.type === Object || r.type === Array)) && o.add(a);
|
|
188
|
+
}), { booleanProps: t, numberProps: n, jsonProps: o };
|
|
189
|
+
}
|
|
190
|
+
function w(e, t) {
|
|
191
|
+
try {
|
|
192
|
+
return JSON.parse(t);
|
|
193
|
+
} catch (n) {
|
|
194
|
+
return console.warn(
|
|
195
|
+
`Invalid JSON attribute value for "${e}": "${t}". Error: ${n instanceof Error ? n.message : String(n)}`
|
|
196
|
+
), null;
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
function X(e) {
|
|
200
|
+
const t = e.__name || e.name;
|
|
201
|
+
if (!t)
|
|
202
|
+
throw new Error("Component must have a __name or name property");
|
|
203
|
+
const n = j(e, U(t)), { booleanProps: o, numberProps: s, jsonProps: u } = Q(e);
|
|
204
|
+
class a extends n {
|
|
205
|
+
_hiddenInput = null;
|
|
206
|
+
constructor() {
|
|
207
|
+
super(), this._parseAttributes();
|
|
208
|
+
}
|
|
209
|
+
disconnectedCallback() {
|
|
210
|
+
this._hiddenInput?.remove(), super.disconnectedCallback?.();
|
|
211
|
+
}
|
|
212
|
+
/**
|
|
213
|
+
* Update the hidden input value
|
|
214
|
+
* Call this from the Vue component to sync form value
|
|
215
|
+
*/
|
|
216
|
+
setHiddenInputValue(c) {
|
|
217
|
+
this._hiddenInput && (this._hiddenInput.value = c ?? "");
|
|
218
|
+
}
|
|
219
|
+
_parseAttributes() {
|
|
220
|
+
o.forEach((i) => {
|
|
221
|
+
const l = this.getAttribute(i);
|
|
222
|
+
this[i] = Z(i, l);
|
|
223
|
+
}), s.forEach((i) => {
|
|
224
|
+
const l = this.getAttribute(i);
|
|
225
|
+
l !== null && (this[i] = K(i, l));
|
|
226
|
+
}), u.forEach((i) => {
|
|
227
|
+
const l = this.getAttribute(i);
|
|
228
|
+
if (l !== null) {
|
|
229
|
+
const d = w(i, l);
|
|
230
|
+
d !== null && (this[i] = d);
|
|
231
|
+
}
|
|
232
|
+
});
|
|
233
|
+
const c = this.getAttribute("data-json-props");
|
|
234
|
+
c && c.split(",").map((l) => l.trim()).filter(Boolean).forEach((l) => {
|
|
235
|
+
const d = l.replace(/-([a-z])/g, (m) => m[1].toUpperCase());
|
|
236
|
+
let v = this.getAttribute(l);
|
|
237
|
+
if (v === null) {
|
|
238
|
+
const m = d.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
239
|
+
v = this.getAttribute(m);
|
|
240
|
+
}
|
|
241
|
+
if (v !== null && !this[d]) {
|
|
242
|
+
const m = w(d, v);
|
|
243
|
+
m !== null && (this[d] = m);
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
connectedCallback() {
|
|
248
|
+
this._parseAttributes(), super.connectedCallback?.(), J(this);
|
|
249
|
+
const c = this.getAttribute("name");
|
|
250
|
+
c && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = c, this.after(this._hiddenInput));
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
return a;
|
|
254
|
+
}
|
|
255
|
+
function Y(e) {
|
|
256
|
+
return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
257
|
+
}
|
|
258
|
+
function ee(e) {
|
|
259
|
+
const t = e.__name || e.name;
|
|
260
|
+
if (!t)
|
|
261
|
+
throw new Error("Component must have a __name or name property");
|
|
262
|
+
const n = Y(t), o = X(e);
|
|
263
|
+
customElements.get(n) || customElements.define(n, o);
|
|
264
|
+
}
|
|
265
|
+
ee(G);
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
import { defineComponent as b, createElementBlock as _, openBlock as v, renderSlot as w, defineCustomElement as E } from "vue";
|
|
2
|
+
const y = ["data-style"], A = /* @__PURE__ */ b({
|
|
3
|
+
__name: "PvActionBar",
|
|
4
|
+
props: {
|
|
5
|
+
variant: { default: "white", type: String }
|
|
6
|
+
},
|
|
7
|
+
setup(t) {
|
|
8
|
+
return (e, n) => (v(), _("div", {
|
|
9
|
+
class: "pv-action-bar-container",
|
|
10
|
+
"data-style": t.variant === "white" ? "white" : void 0
|
|
11
|
+
}, [
|
|
12
|
+
w(e.$slots, "default")
|
|
13
|
+
], 8, y));
|
|
14
|
+
}
|
|
15
|
+
}), g = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
16
|
+
function C(t) {
|
|
17
|
+
return !g.has(t);
|
|
18
|
+
}
|
|
19
|
+
function h(t, e) {
|
|
20
|
+
const n = document.querySelector('link[href*="' + e + '"]');
|
|
21
|
+
if (!t.shadowRoot)
|
|
22
|
+
return !1;
|
|
23
|
+
if (n && t.shadowRoot) {
|
|
24
|
+
const i = n.href;
|
|
25
|
+
if (t.shadowRoot.querySelector(`link[href="${i}"]`))
|
|
26
|
+
return;
|
|
27
|
+
const u = document.createElement("link");
|
|
28
|
+
return u.rel = "stylesheet", u.href = i, t.shadowRoot.prepend(u), !0;
|
|
29
|
+
}
|
|
30
|
+
return !1;
|
|
31
|
+
}
|
|
32
|
+
function P(t) {
|
|
33
|
+
if (!h(t, "pit-viper-v2")) {
|
|
34
|
+
if (h(t, "pit-viper")) {
|
|
35
|
+
h(t, "pit-viper-v2-scoped");
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
console.warn(
|
|
39
|
+
"No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
const S = (t) => ({ shadowRoot: C(t) });
|
|
44
|
+
function I(t, e) {
|
|
45
|
+
return e === null ? !1 : e === "" || e === "true" ? !0 : (e === "false" || console.warn(
|
|
46
|
+
`Invalid boolean attribute value for "${t}": "${e}". Expected "true", "false", or empty string.`
|
|
47
|
+
), !1);
|
|
48
|
+
}
|
|
49
|
+
function j(t, e) {
|
|
50
|
+
const n = Number(e);
|
|
51
|
+
return isNaN(n) && console.warn(`Invalid number attribute value for "${t}": "${e}". Expected a valid number.`), n;
|
|
52
|
+
}
|
|
53
|
+
function O(t) {
|
|
54
|
+
const e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), p = (t.__vccOpts || t).props;
|
|
55
|
+
return p && typeof p == "object" && Object.entries(p).forEach(([f, r]) => {
|
|
56
|
+
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);
|
|
57
|
+
}), { booleanProps: e, numberProps: n, jsonProps: i };
|
|
58
|
+
}
|
|
59
|
+
function m(t, e) {
|
|
60
|
+
try {
|
|
61
|
+
return JSON.parse(e);
|
|
62
|
+
} catch (n) {
|
|
63
|
+
return console.warn(
|
|
64
|
+
`Invalid JSON attribute value for "${t}": "${e}". Error: ${n instanceof Error ? n.message : String(n)}`
|
|
65
|
+
), null;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
function $(t) {
|
|
69
|
+
const e = t.__name || t.name;
|
|
70
|
+
if (!e)
|
|
71
|
+
throw new Error("Component must have a __name or name property");
|
|
72
|
+
const n = E(t, S(e)), { booleanProps: i, numberProps: u, jsonProps: p } = O(t);
|
|
73
|
+
class f extends n {
|
|
74
|
+
_hiddenInput = null;
|
|
75
|
+
constructor() {
|
|
76
|
+
super(), this._parseAttributes();
|
|
77
|
+
}
|
|
78
|
+
disconnectedCallback() {
|
|
79
|
+
this._hiddenInput?.remove(), super.disconnectedCallback?.();
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Update the hidden input value
|
|
83
|
+
* Call this from the Vue component to sync form value
|
|
84
|
+
*/
|
|
85
|
+
setHiddenInputValue(a) {
|
|
86
|
+
this._hiddenInput && (this._hiddenInput.value = a ?? "");
|
|
87
|
+
}
|
|
88
|
+
_parseAttributes() {
|
|
89
|
+
i.forEach((o) => {
|
|
90
|
+
const s = this.getAttribute(o);
|
|
91
|
+
this[o] = I(o, s);
|
|
92
|
+
}), u.forEach((o) => {
|
|
93
|
+
const s = this.getAttribute(o);
|
|
94
|
+
s !== null && (this[o] = j(o, s));
|
|
95
|
+
}), p.forEach((o) => {
|
|
96
|
+
const s = this.getAttribute(o);
|
|
97
|
+
if (s !== null) {
|
|
98
|
+
const c = m(o, s);
|
|
99
|
+
c !== null && (this[o] = c);
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
const a = this.getAttribute("data-json-props");
|
|
103
|
+
a && a.split(",").map((s) => s.trim()).filter(Boolean).forEach((s) => {
|
|
104
|
+
const c = s.replace(/-([a-z])/g, (l) => l[1].toUpperCase());
|
|
105
|
+
let d = this.getAttribute(s);
|
|
106
|
+
if (d === null) {
|
|
107
|
+
const l = c.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
108
|
+
d = this.getAttribute(l);
|
|
109
|
+
}
|
|
110
|
+
if (d !== null && !this[c]) {
|
|
111
|
+
const l = m(c, d);
|
|
112
|
+
l !== null && (this[c] = l);
|
|
113
|
+
}
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
connectedCallback() {
|
|
117
|
+
this._parseAttributes(), super.connectedCallback?.(), P(this);
|
|
118
|
+
const a = this.getAttribute("name");
|
|
119
|
+
a && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = a, this.after(this._hiddenInput));
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return f;
|
|
123
|
+
}
|
|
124
|
+
function k(t) {
|
|
125
|
+
return t.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
126
|
+
}
|
|
127
|
+
function N(t) {
|
|
128
|
+
const e = t.__name || t.name;
|
|
129
|
+
if (!e)
|
|
130
|
+
throw new Error("Component must have a __name or name property");
|
|
131
|
+
const n = k(e), i = $(t);
|
|
132
|
+
customElements.get(n) || customElements.define(n, i);
|
|
133
|
+
}
|
|
134
|
+
N(A);
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { ref as S, getCurrentInstance as C, defineComponent as _, computed as v, createElementBlock as m, openBlock as f, normalizeClass as g, createElementVNode as E, normalizeStyle as A, createBlock as w, Fragment as I, createVNode as k, createCommentVNode as z, toDisplayString as $, defineCustomElement as O } from "vue";
|
|
2
|
+
function B() {
|
|
3
|
+
const e = S(!1), n = C()?.root || {};
|
|
4
|
+
return "isCE" in n && n.isCE === !0 && (e.value = !0), e;
|
|
5
|
+
}
|
|
6
|
+
const j = [void 0, 10, 12, 20, 24, 32, 64], x = ["xlink:href"], T = /* @__PURE__ */ _({
|
|
7
|
+
__name: "PvIcon",
|
|
8
|
+
props: {
|
|
9
|
+
name: { type: String },
|
|
10
|
+
size: { type: null }
|
|
11
|
+
},
|
|
12
|
+
setup(e) {
|
|
13
|
+
const t = e, n = B(), s = S(null), r = v(() => ({
|
|
14
|
+
"pv-icon": !0,
|
|
15
|
+
[`pv-icon-${t.size}`]: j.includes(t.size)
|
|
16
|
+
})), l = v(() => n.value && s.value ? `${s.value}#${t.name}` : `#${t.name}`);
|
|
17
|
+
return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (s.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), (p, o) => (f(), m(
|
|
18
|
+
"svg",
|
|
19
|
+
{
|
|
20
|
+
"data-testid": "pv-icon",
|
|
21
|
+
"aria-hidden": "true",
|
|
22
|
+
class: g(r.value)
|
|
23
|
+
},
|
|
24
|
+
[
|
|
25
|
+
E("use", { "xlink:href": l.value }, null, 8, x)
|
|
26
|
+
],
|
|
27
|
+
2
|
|
28
|
+
/* CLASS */
|
|
29
|
+
));
|
|
30
|
+
}
|
|
31
|
+
}), N = /* @__PURE__ */ _({
|
|
32
|
+
__name: "PvSpinner",
|
|
33
|
+
props: {
|
|
34
|
+
variant: { default: "primary", type: String },
|
|
35
|
+
size: { default: "lg", type: String }
|
|
36
|
+
},
|
|
37
|
+
setup(e) {
|
|
38
|
+
const t = {
|
|
39
|
+
xs: "0.75rem",
|
|
40
|
+
sm: "1rem",
|
|
41
|
+
md: "1.25rem",
|
|
42
|
+
lg: "1.5rem",
|
|
43
|
+
xl: "2rem"
|
|
44
|
+
}, n = {
|
|
45
|
+
primary: "pv-spinner",
|
|
46
|
+
dark: "pv-spinner-dark",
|
|
47
|
+
white: "pv-spinner-light"
|
|
48
|
+
};
|
|
49
|
+
return (s, r) => (f(), m(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
"data-testid": "pv-spinner",
|
|
53
|
+
class: g(n[e.variant]),
|
|
54
|
+
style: A({ "--size": t[e.size] })
|
|
55
|
+
},
|
|
56
|
+
null,
|
|
57
|
+
6
|
|
58
|
+
/* CLASS, STYLE */
|
|
59
|
+
));
|
|
60
|
+
}
|
|
61
|
+
}), y = {
|
|
62
|
+
md: "pv-button-small",
|
|
63
|
+
lg: void 0,
|
|
64
|
+
xl: "pv-button-large"
|
|
65
|
+
}, L = (e) => e == null || !y.hasOwnProperty(e) ? null : y[e] || null, R = ["disabled"], D = { key: 0 }, V = /* @__PURE__ */ _({
|
|
66
|
+
__name: "PvAiButton",
|
|
67
|
+
props: {
|
|
68
|
+
size: { default: "md", type: String },
|
|
69
|
+
label: { default: "Ask Turquoise", type: String },
|
|
70
|
+
loading: { type: Boolean },
|
|
71
|
+
disabled: { type: Boolean }
|
|
72
|
+
},
|
|
73
|
+
setup(e) {
|
|
74
|
+
const t = e, n = v(() => {
|
|
75
|
+
const s = ["pv-button-ai"], r = L(t.size);
|
|
76
|
+
return r && s.push(r), s;
|
|
77
|
+
});
|
|
78
|
+
return (s, r) => (f(), m("button", {
|
|
79
|
+
disabled: e.disabled,
|
|
80
|
+
class: g(n.value)
|
|
81
|
+
}, [
|
|
82
|
+
e.loading ? (f(), w(N, {
|
|
83
|
+
key: 0,
|
|
84
|
+
size: e.size
|
|
85
|
+
}, null, 8, ["size"])) : (f(), m(
|
|
86
|
+
I,
|
|
87
|
+
{ key: 1 },
|
|
88
|
+
[
|
|
89
|
+
k(T, {
|
|
90
|
+
class: "pv-text-brand",
|
|
91
|
+
name: "ai-filled"
|
|
92
|
+
}),
|
|
93
|
+
e.label ? (f(), m(
|
|
94
|
+
"span",
|
|
95
|
+
D,
|
|
96
|
+
$(e.label),
|
|
97
|
+
1
|
|
98
|
+
/* TEXT */
|
|
99
|
+
)) : z("v-if", !0)
|
|
100
|
+
],
|
|
101
|
+
64
|
|
102
|
+
/* STABLE_FRAGMENT */
|
|
103
|
+
))
|
|
104
|
+
], 10, R));
|
|
105
|
+
}
|
|
106
|
+
}), W = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
107
|
+
function H(e) {
|
|
108
|
+
return !W.has(e);
|
|
109
|
+
}
|
|
110
|
+
function b(e, t) {
|
|
111
|
+
const n = document.querySelector('link[href*="' + t + '"]');
|
|
112
|
+
if (!e.shadowRoot)
|
|
113
|
+
return !1;
|
|
114
|
+
if (n && e.shadowRoot) {
|
|
115
|
+
const s = n.href;
|
|
116
|
+
if (e.shadowRoot.querySelector(`link[href="${s}"]`))
|
|
117
|
+
return;
|
|
118
|
+
const r = document.createElement("link");
|
|
119
|
+
return r.rel = "stylesheet", r.href = s, e.shadowRoot.prepend(r), !0;
|
|
120
|
+
}
|
|
121
|
+
return !1;
|
|
122
|
+
}
|
|
123
|
+
function M(e) {
|
|
124
|
+
if (!b(e, "pit-viper-v2")) {
|
|
125
|
+
if (b(e, "pit-viper")) {
|
|
126
|
+
b(e, "pit-viper-v2-scoped");
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
console.warn(
|
|
130
|
+
"No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
|
|
131
|
+
);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
const G = (e) => ({ shadowRoot: H(e) });
|
|
135
|
+
function q(e, t) {
|
|
136
|
+
return t === null ? !1 : t === "" || t === "true" ? !0 : (t === "false" || console.warn(
|
|
137
|
+
`Invalid boolean attribute value for "${e}": "${t}". Expected "true", "false", or empty string.`
|
|
138
|
+
), !1);
|
|
139
|
+
}
|
|
140
|
+
function J(e, t) {
|
|
141
|
+
const n = Number(t);
|
|
142
|
+
return isNaN(n) && console.warn(`Invalid number attribute value for "${e}": "${t}". Expected a valid number.`), n;
|
|
143
|
+
}
|
|
144
|
+
function U(e) {
|
|
145
|
+
const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), l = (e.__vccOpts || e).props;
|
|
146
|
+
return l && typeof l == "object" && Object.entries(l).forEach(([p, o]) => {
|
|
147
|
+
o === Boolean || o && o.type === Boolean ? t.add(p) : o === Number || o && o.type === Number ? n.add(p) : (o === Object || o === Array || o && (o.type === Object || o.type === Array)) && s.add(p);
|
|
148
|
+
}), { booleanProps: t, numberProps: n, jsonProps: s };
|
|
149
|
+
}
|
|
150
|
+
function P(e, t) {
|
|
151
|
+
try {
|
|
152
|
+
return JSON.parse(t);
|
|
153
|
+
} catch (n) {
|
|
154
|
+
return console.warn(
|
|
155
|
+
`Invalid JSON attribute value for "${e}": "${t}". Error: ${n instanceof Error ? n.message : String(n)}`
|
|
156
|
+
), null;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function Z(e) {
|
|
160
|
+
const t = e.__name || e.name;
|
|
161
|
+
if (!t)
|
|
162
|
+
throw new Error("Component must have a __name or name property");
|
|
163
|
+
const n = O(e, G(t)), { booleanProps: s, numberProps: r, jsonProps: l } = U(e);
|
|
164
|
+
class p extends n {
|
|
165
|
+
_hiddenInput = null;
|
|
166
|
+
constructor() {
|
|
167
|
+
super(), this._parseAttributes();
|
|
168
|
+
}
|
|
169
|
+
disconnectedCallback() {
|
|
170
|
+
this._hiddenInput?.remove(), super.disconnectedCallback?.();
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Update the hidden input value
|
|
174
|
+
* Call this from the Vue component to sync form value
|
|
175
|
+
*/
|
|
176
|
+
setHiddenInputValue(c) {
|
|
177
|
+
this._hiddenInput && (this._hiddenInput.value = c ?? "");
|
|
178
|
+
}
|
|
179
|
+
_parseAttributes() {
|
|
180
|
+
s.forEach((i) => {
|
|
181
|
+
const a = this.getAttribute(i);
|
|
182
|
+
this[i] = q(i, a);
|
|
183
|
+
}), r.forEach((i) => {
|
|
184
|
+
const a = this.getAttribute(i);
|
|
185
|
+
a !== null && (this[i] = J(i, a));
|
|
186
|
+
}), l.forEach((i) => {
|
|
187
|
+
const a = this.getAttribute(i);
|
|
188
|
+
if (a !== null) {
|
|
189
|
+
const u = P(i, a);
|
|
190
|
+
u !== null && (this[i] = u);
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
const c = this.getAttribute("data-json-props");
|
|
194
|
+
c && c.split(",").map((a) => a.trim()).filter(Boolean).forEach((a) => {
|
|
195
|
+
const u = a.replace(/-([a-z])/g, (d) => d[1].toUpperCase());
|
|
196
|
+
let h = this.getAttribute(a);
|
|
197
|
+
if (h === null) {
|
|
198
|
+
const d = u.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
199
|
+
h = this.getAttribute(d);
|
|
200
|
+
}
|
|
201
|
+
if (h !== null && !this[u]) {
|
|
202
|
+
const d = P(u, h);
|
|
203
|
+
d !== null && (this[u] = d);
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
}
|
|
207
|
+
connectedCallback() {
|
|
208
|
+
this._parseAttributes(), super.connectedCallback?.(), M(this);
|
|
209
|
+
const c = this.getAttribute("name");
|
|
210
|
+
c && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = c, this.after(this._hiddenInput));
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
return p;
|
|
214
|
+
}
|
|
215
|
+
function F(e) {
|
|
216
|
+
return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
217
|
+
}
|
|
218
|
+
function K(e) {
|
|
219
|
+
const t = e.__name || e.name;
|
|
220
|
+
if (!t)
|
|
221
|
+
throw new Error("Component must have a __name or name property");
|
|
222
|
+
const n = F(t), s = Z(e);
|
|
223
|
+
customElements.get(n) || customElements.define(n, s);
|
|
224
|
+
}
|
|
225
|
+
K(V);
|