@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.
Files changed (129) hide show
  1. package/package.json +43 -13
  2. package/pv-components/dist/stats/vue/base/stats.html +4949 -0
  3. package/pv-components/dist/stats/vue/visualizations/stats.html +4949 -0
  4. package/pv-components/dist/stats/web/pv-accordion-stats.html +4949 -0
  5. package/pv-components/dist/stats/web/pv-action-bar-stats.html +4949 -0
  6. package/pv-components/dist/stats/web/pv-ai-button-stats.html +4949 -0
  7. package/pv-components/dist/stats/web/pv-avatar-group-stats.html +4949 -0
  8. package/pv-components/dist/stats/web/pv-avatar-stats.html +4949 -0
  9. package/pv-components/dist/stats/web/pv-banner-stats.html +4949 -0
  10. package/pv-components/dist/stats/web/pv-breadcrumbs-stats.html +4949 -0
  11. package/pv-components/dist/stats/web/pv-button-stats.html +4949 -0
  12. package/pv-components/dist/stats/web/pv-card-stats.html +4949 -0
  13. package/pv-components/dist/stats/web/pv-checkbox-stats.html +4949 -0
  14. package/pv-components/dist/stats/web/pv-company-label-stats.html +4949 -0
  15. package/pv-components/dist/stats/web/pv-company-logo-stats.html +4949 -0
  16. package/pv-components/dist/stats/web/pv-company-tag-stats.html +4949 -0
  17. package/pv-components/dist/stats/web/pv-counter-badge-stats.html +4949 -0
  18. package/pv-components/dist/stats/web/pv-date-picker-stats.html +4949 -0
  19. package/pv-components/dist/stats/web/pv-date-time-stats.html +4949 -0
  20. package/pv-components/dist/stats/web/pv-distribution-bar-stats.html +4949 -0
  21. package/pv-components/dist/stats/web/pv-drawer-stats.html +4949 -0
  22. package/pv-components/dist/stats/web/pv-dropdown-stats.html +4949 -0
  23. package/pv-components/dist/stats/web/pv-expandable-content-stats.html +4949 -0
  24. package/pv-components/dist/stats/web/pv-ghost-input-stats.html +4949 -0
  25. package/pv-components/dist/stats/web/pv-icon-stats.html +4949 -0
  26. package/pv-components/dist/stats/web/pv-input-stats.html +4949 -0
  27. package/pv-components/dist/stats/web/pv-insight-card-stats.html +4949 -0
  28. package/pv-components/dist/stats/web/pv-modal-stats.html +4949 -0
  29. package/pv-components/dist/stats/web/pv-multi-select-button-stats.html +4949 -0
  30. package/pv-components/dist/stats/web/pv-pagination-stats.html +4949 -0
  31. package/pv-components/dist/stats/web/pv-pill-stats.html +4949 -0
  32. package/pv-components/dist/stats/web/pv-popover-menu-stats.html +4949 -0
  33. package/pv-components/dist/stats/web/pv-popover-stats.html +4949 -0
  34. package/pv-components/dist/stats/web/pv-popover-v2-stats.html +4949 -0
  35. package/pv-components/dist/stats/web/pv-progress-bar-stats.html +4949 -0
  36. package/pv-components/dist/stats/web/pv-rating-stats.html +4949 -0
  37. package/pv-components/dist/stats/web/pv-release-badge-stats.html +4949 -0
  38. package/pv-components/dist/stats/web/pv-search-input-stats.html +4949 -0
  39. package/pv-components/dist/stats/web/pv-segmented-control-stats.html +4949 -0
  40. package/pv-components/dist/stats/web/pv-select-button-stats.html +4949 -0
  41. package/pv-components/dist/stats/web/pv-selectable-card-stats.html +4949 -0
  42. package/pv-components/dist/stats/web/pv-side-panel-stats.html +4949 -0
  43. package/pv-components/dist/stats/web/pv-skeleton-stats.html +4949 -0
  44. package/pv-components/dist/stats/web/pv-spinner-stats.html +4949 -0
  45. package/pv-components/dist/stats/web/pv-sprite-stats.html +4949 -0
  46. package/pv-components/dist/stats/web/pv-suggestion-tag-stats.html +4949 -0
  47. package/pv-components/dist/stats/web/pv-switch-stats.html +4949 -0
  48. package/pv-components/dist/stats/web/pv-tab-list-stats.html +4949 -0
  49. package/pv-components/dist/stats/web/pv-tabs-stats.html +4949 -0
  50. package/pv-components/dist/stats/web/pv-tag-stats.html +4949 -0
  51. package/pv-components/dist/stats/web/pv-text-area-stats.html +4949 -0
  52. package/pv-components/dist/stats/web/pv-toast-stats.html +4949 -0
  53. package/pv-components/dist/stats/web/pv-toggle-button-stats.html +4949 -0
  54. package/pv-components/dist/stats/web/pv-toggle-group-stats.html +4949 -0
  55. package/pv-components/dist/stats/web/pv-tooltip-stats.html +4949 -0
  56. package/pv-components/dist/stats/web/pv-tooltip-v2-stats.html +4949 -0
  57. package/pv-components/dist/stats/web/pv-tree-stats.html +4949 -0
  58. package/pv-components/dist/stats/web/pv-widget-stats.html +4949 -0
  59. package/pv-components/dist/vue/base/components/base/PvButton/helpers.d.ts +1 -0
  60. package/pv-components/dist/vue/base/components/base/PvMenu/PvMenuControlPanel.vue.d.ts +6 -0
  61. package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +206 -289
  62. package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/types.d.ts +31 -0
  63. package/pv-components/dist/vue/base/components/base/PvPopoverV2/PvPopoverV2.vue.d.ts +0 -1
  64. package/pv-components/dist/vue/base/components/base/PvPopoverV2/types.d.ts +6 -1
  65. package/pv-components/dist/vue/base/components/base/PvSelectButton/PvSelectButton.vue.d.ts +20 -177
  66. package/pv-components/dist/vue/base/components/base/PvSelectButton/PvSelectButtonTrigger/PvSelectButtonTrigger.vue.d.ts +4 -9
  67. package/pv-components/dist/vue/base/pv-components-base.mjs +4943 -11629
  68. package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +4791 -10741
  69. package/pv-components/dist/web/components/pv-accordion/pv-accordion.js +265 -0
  70. package/pv-components/dist/web/components/pv-action-bar/pv-action-bar.js +134 -0
  71. package/pv-components/dist/web/components/pv-ai-button/pv-ai-button.js +225 -0
  72. package/pv-components/dist/web/components/pv-avatar/pv-avatar.js +164 -0
  73. package/pv-components/dist/web/components/pv-avatar-group/pv-avatar-group.js +170 -0
  74. package/pv-components/dist/web/components/pv-banner/pv-banner.js +224 -0
  75. package/pv-components/dist/web/components/pv-breadcrumbs/pv-breadcrumbs.js +160 -0
  76. package/pv-components/dist/web/components/pv-button/pv-button.js +242 -0
  77. package/pv-components/dist/web/components/pv-card/pv-card.js +148 -0
  78. package/pv-components/dist/web/components/pv-checkbox/pv-checkbox.js +145 -0
  79. package/pv-components/dist/web/components/pv-company-label/pv-company-label.js +221 -0
  80. package/pv-components/dist/web/components/pv-company-logo/pv-company-logo.js +192 -0
  81. package/pv-components/dist/web/components/pv-company-tag/pv-company-tag.js +274 -0
  82. package/pv-components/dist/web/components/pv-counter-badge/pv-counter-badge.js +157 -0
  83. package/pv-components/dist/web/components/pv-date-picker/pv-date-picker.js +7550 -0
  84. package/pv-components/dist/web/components/pv-date-time/pv-date-time.js +645 -0
  85. package/pv-components/dist/web/components/pv-distribution-bar/pv-distribution-bar.js +177 -0
  86. package/pv-components/dist/web/components/pv-drawer/pv-drawer.js +556 -0
  87. package/pv-components/dist/web/components/pv-dropdown/pv-dropdown.js +1792 -0
  88. package/pv-components/dist/web/components/pv-expandable-content/pv-expandable-content.js +304 -0
  89. package/pv-components/dist/web/components/pv-ghost-input/pv-ghost-input.js +320 -0
  90. package/pv-components/dist/web/components/pv-icon/pv-icon.js +150 -0
  91. package/pv-components/dist/web/components/pv-input/pv-input.js +191 -0
  92. package/pv-components/dist/web/components/pv-insight-card/pv-insight-card.js +363 -0
  93. package/pv-components/dist/web/components/pv-modal/pv-modal.js +186 -0
  94. package/pv-components/dist/web/components/pv-multi-select-button/pv-multi-select-button.js +8326 -0
  95. package/pv-components/dist/web/components/pv-pagination/pv-pagination.js +355 -0
  96. package/pv-components/dist/web/components/pv-pill/pv-pill.js +229 -0
  97. package/pv-components/dist/web/components/pv-popover/pv-popover.js +1485 -0
  98. package/pv-components/dist/web/components/pv-popover-menu/pv-popover-menu.js +1507 -0
  99. package/pv-components/dist/web/components/pv-popover-v2/pv-popover-v2.js +1573 -0
  100. package/pv-components/dist/web/components/pv-progress-bar/pv-progress-bar.js +156 -0
  101. package/pv-components/dist/web/components/pv-rating/pv-rating.js +146 -0
  102. package/pv-components/dist/web/components/pv-release-badge/pv-release-badge.js +142 -0
  103. package/pv-components/dist/web/components/pv-search-input/pv-search-input.js +238 -0
  104. package/pv-components/dist/web/components/pv-segmented-control/pv-segmented-control.js +214 -0
  105. package/pv-components/dist/web/components/pv-select-button/pv-select-button.js +8093 -0
  106. package/pv-components/dist/web/components/pv-selectable-card/pv-selectable-card.js +153 -0
  107. package/pv-components/dist/web/components/pv-side-panel/pv-side-panel.js +148 -0
  108. package/pv-components/dist/web/components/pv-skeleton/pv-skeleton.js +1593 -0
  109. package/pv-components/dist/web/components/pv-spinner/pv-spinner.js +151 -0
  110. package/pv-components/dist/web/components/pv-sprite/pv-sprite.js +150 -0
  111. package/pv-components/dist/web/components/pv-suggestion-tag/pv-suggestion-tag.js +195 -0
  112. package/pv-components/dist/web/components/pv-switch/pv-switch.js +162 -0
  113. package/pv-components/dist/web/components/pv-tab-list/pv-tab-list.js +168 -0
  114. package/pv-components/dist/web/components/pv-tabs/pv-tabs.js +248 -0
  115. package/pv-components/dist/web/components/pv-tag/pv-tag.js +210 -0
  116. package/pv-components/dist/web/components/pv-text-area/pv-text-area.js +188 -0
  117. package/pv-components/dist/web/components/pv-toast/pv-toast.js +292 -0
  118. package/pv-components/dist/web/components/pv-toggle-button/pv-toggle-button.js +208 -0
  119. package/pv-components/dist/web/components/pv-toggle-group/pv-toggle-group.js +7479 -0
  120. package/pv-components/dist/web/components/pv-tooltip/pv-tooltip.js +158 -0
  121. package/pv-components/dist/web/components/pv-tooltip-v2/pv-tooltip-v2.js +7409 -0
  122. package/pv-components/dist/web/components/pv-tree/pv-tree.js +5107 -0
  123. package/pv-components/dist/web/components/pv-widget/pv-widget.js +159 -0
  124. package/pv-components/dist/web/pv-components.iife.js +50 -50
  125. package/pv-components/dist/web/vue.runtime.esm-browser.prod.js +7 -0
  126. package/pv-components/dist/vue/base/pv-components-base.js +0 -1555
  127. package/pv-components/dist/vue/base/pv-components-base.umd.js +0 -1555
  128. package/pv-components/dist/vue/visualizations/pv-components-visualizations.js +0 -185
  129. package/pv-components/dist/vue/visualizations/pv-components-visualizations.umd.js +0 -185
@@ -0,0 +1,168 @@
1
+ import { defineComponent as y, createElementBlock as h, openBlock as b, createElementVNode as _, Fragment as g, renderList as E, toDisplayString as w, defineCustomElement as A } from "vue";
2
+ const C = {
3
+ role: "list",
4
+ class: "pv-tab-list"
5
+ }, P = ["onClick", "data-active"], S = {
6
+ class: "pv-text-body-xs",
7
+ style: { "font-weight": "500" }
8
+ }, k = /* @__PURE__ */ y({
9
+ __name: "PvTabList",
10
+ props: {
11
+ modelValue: { type: String },
12
+ options: { type: Array }
13
+ },
14
+ emits: ["update:modelValue"],
15
+ setup(t, { emit: e }) {
16
+ const n = e, o = (a) => {
17
+ n("update:modelValue", a);
18
+ };
19
+ return (a, p) => (b(), h("div", null, [
20
+ _("ul", C, [
21
+ (b(!0), h(
22
+ g,
23
+ null,
24
+ E(t.options, (c) => (b(), h("li", {
25
+ key: c.value,
26
+ style: { cursor: "pointer" },
27
+ onClick: (r) => o(c.value),
28
+ "data-active": t.modelValue === c.value ? !0 : null
29
+ }, [
30
+ _(
31
+ "button",
32
+ S,
33
+ w(c.label),
34
+ 1
35
+ /* TEXT */
36
+ )
37
+ ], 8, P))),
38
+ 128
39
+ /* KEYED_FRAGMENT */
40
+ ))
41
+ ])
42
+ ]));
43
+ }
44
+ }), I = '.pv-tab-list[data-v-498bf523]{border:none}.pv-tab-list :where(li)[data-active][data-v-498bf523]:after{content:"";display:block;height:2px;width:100%;position:absolute;bottom:0;left:0;right:0;background-color:#176f6f}', O = (t, e) => {
45
+ const n = t.__vccOpts || t;
46
+ for (const [o, a] of e)
47
+ n[o] = a;
48
+ return n;
49
+ }, j = /* @__PURE__ */ O(k, [["styles", [I]], ["__scopeId", "data-v-498bf523"]]), $ = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
50
+ function N(t) {
51
+ return !$.has(t);
52
+ }
53
+ function m(t, e) {
54
+ const n = document.querySelector('link[href*="' + e + '"]');
55
+ if (!t.shadowRoot)
56
+ return !1;
57
+ if (n && t.shadowRoot) {
58
+ const o = n.href;
59
+ if (t.shadowRoot.querySelector(`link[href="${o}"]`))
60
+ return;
61
+ const a = document.createElement("link");
62
+ return a.rel = "stylesheet", a.href = o, t.shadowRoot.prepend(a), !0;
63
+ }
64
+ return !1;
65
+ }
66
+ function x(t) {
67
+ if (!m(t, "pit-viper-v2")) {
68
+ if (m(t, "pit-viper")) {
69
+ m(t, "pit-viper-v2-scoped");
70
+ return;
71
+ }
72
+ console.warn(
73
+ "No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
74
+ );
75
+ }
76
+ }
77
+ const B = (t) => ({ shadowRoot: N(t) });
78
+ function D(t, e) {
79
+ return e === null ? !1 : e === "" || e === "true" ? !0 : (e === "false" || console.warn(
80
+ `Invalid boolean attribute value for "${t}": "${e}". Expected "true", "false", or empty string.`
81
+ ), !1);
82
+ }
83
+ function L(t, e) {
84
+ const n = Number(e);
85
+ return isNaN(n) && console.warn(`Invalid number attribute value for "${t}": "${e}". Expected a valid number.`), n;
86
+ }
87
+ function R(t) {
88
+ const e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), p = (t.__vccOpts || t).props;
89
+ return p && typeof p == "object" && Object.entries(p).forEach(([c, r]) => {
90
+ r === Boolean || r && r.type === Boolean ? e.add(c) : r === Number || r && r.type === Number ? n.add(c) : (r === Object || r === Array || r && (r.type === Object || r.type === Array)) && o.add(c);
91
+ }), { booleanProps: e, numberProps: n, jsonProps: o };
92
+ }
93
+ function v(t, e) {
94
+ try {
95
+ return JSON.parse(e);
96
+ } catch (n) {
97
+ return console.warn(
98
+ `Invalid JSON attribute value for "${t}": "${e}". Error: ${n instanceof Error ? n.message : String(n)}`
99
+ ), null;
100
+ }
101
+ }
102
+ function V(t) {
103
+ const e = t.__name || t.name;
104
+ if (!e)
105
+ throw new Error("Component must have a __name or name property");
106
+ const n = A(t, B(e)), { booleanProps: o, numberProps: a, jsonProps: p } = R(t);
107
+ class c extends n {
108
+ _hiddenInput = null;
109
+ constructor() {
110
+ super(), this._parseAttributes();
111
+ }
112
+ disconnectedCallback() {
113
+ this._hiddenInput?.remove(), super.disconnectedCallback?.();
114
+ }
115
+ /**
116
+ * Update the hidden input value
117
+ * Call this from the Vue component to sync form value
118
+ */
119
+ setHiddenInputValue(l) {
120
+ this._hiddenInput && (this._hiddenInput.value = l ?? "");
121
+ }
122
+ _parseAttributes() {
123
+ o.forEach((s) => {
124
+ const i = this.getAttribute(s);
125
+ this[s] = D(s, i);
126
+ }), a.forEach((s) => {
127
+ const i = this.getAttribute(s);
128
+ i !== null && (this[s] = L(s, i));
129
+ }), p.forEach((s) => {
130
+ const i = this.getAttribute(s);
131
+ if (i !== null) {
132
+ const u = v(s, i);
133
+ u !== null && (this[s] = u);
134
+ }
135
+ });
136
+ const l = this.getAttribute("data-json-props");
137
+ l && l.split(",").map((i) => i.trim()).filter(Boolean).forEach((i) => {
138
+ const u = i.replace(/-([a-z])/g, (d) => d[1].toUpperCase());
139
+ let f = this.getAttribute(i);
140
+ if (f === null) {
141
+ const d = u.replace(/([A-Z])/g, "-$1").toLowerCase();
142
+ f = this.getAttribute(d);
143
+ }
144
+ if (f !== null && !this[u]) {
145
+ const d = v(u, f);
146
+ d !== null && (this[u] = d);
147
+ }
148
+ });
149
+ }
150
+ connectedCallback() {
151
+ this._parseAttributes(), super.connectedCallback?.(), x(this);
152
+ const l = this.getAttribute("name");
153
+ l && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = l, this.after(this._hiddenInput));
154
+ }
155
+ }
156
+ return c;
157
+ }
158
+ function M(t) {
159
+ return t.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
160
+ }
161
+ function T(t) {
162
+ const e = t.__name || t.name;
163
+ if (!e)
164
+ throw new Error("Component must have a __name or name property");
165
+ const n = M(e), o = V(t);
166
+ customElements.get(n) || customElements.define(n, o);
167
+ }
168
+ T(j);
@@ -0,0 +1,248 @@
1
+ import { defineComponent as _, computed as m, createElementBlock as v, openBlock as d, normalizeClass as g, toDisplayString as P, ref as E, getCurrentInstance as A, createElementVNode as S, mergeModels as w, useModel as k, Fragment as I, renderList as $, createBlock as y, createCommentVNode as x, createTextVNode as z, defineCustomElement as O } from "vue";
2
+ const N = /* @__PURE__ */ _({
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(t) {
12
+ const e = t, n = m(() => e.size == "md" ? "md" : (e.size == "sm", "sm")), r = m(() => e.maxValue && e.value && e.value > e.maxValue ? `${e.maxValue}+` : e.value != null ? `${e.prefix}${e.value}` : "-"), s = m(() => ({
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": e.variant == "primary",
17
+ "pv-surface pv-bordered": e.variant == "secondary",
18
+ "pv-surface-lighten-5": e.variant == "tertiary",
19
+ "pv-text-secondary": e.variant == "ghost" || e.variant == "tertiary",
20
+ "pv-surface": e.variant == "ghost"
21
+ }));
22
+ return (l, o) => (d(), v(
23
+ "div",
24
+ {
25
+ class: g(s.value),
26
+ "data-testid": "pv-counter-badge"
27
+ },
28
+ P(r.value),
29
+ 3
30
+ /* TEXT, CLASS */
31
+ ));
32
+ }
33
+ }), j = ".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}", T = (t, e) => {
34
+ const n = t.__vccOpts || t;
35
+ for (const [r, s] of e)
36
+ n[r] = s;
37
+ return n;
38
+ }, V = /* @__PURE__ */ T(N, [["styles", [j]], ["__scopeId", "data-v-fc3c1104"]]);
39
+ function B() {
40
+ const t = E(!1), n = A()?.root || {};
41
+ return "isCE" in n && n.isCE === !0 && (t.value = !0), t;
42
+ }
43
+ const L = [void 0, 10, 12, 20, 24, 32, 64], M = ["xlink:href"], R = /* @__PURE__ */ _({
44
+ __name: "PvIcon",
45
+ props: {
46
+ name: { type: String },
47
+ size: { type: null }
48
+ },
49
+ setup(t) {
50
+ const e = t, n = B(), r = E(null), s = m(() => ({
51
+ "pv-icon": !0,
52
+ [`pv-icon-${e.size}`]: L.includes(e.size)
53
+ })), l = m(() => n.value && r.value ? `${r.value}#${e.name}` : `#${e.name}`);
54
+ return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (r.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), (o, a) => (d(), v(
55
+ "svg",
56
+ {
57
+ "data-testid": "pv-icon",
58
+ "aria-hidden": "true",
59
+ class: g(s.value)
60
+ },
61
+ [
62
+ S("use", { "xlink:href": l.value }, null, 8, M)
63
+ ],
64
+ 2
65
+ /* CLASS */
66
+ ));
67
+ }
68
+ }), D = ["data-active", "onClick"], W = { type: "button" }, H = /* @__PURE__ */ _({
69
+ __name: "PvTabs",
70
+ props: /* @__PURE__ */ w({
71
+ tabs: { type: Array },
72
+ size: { default: "lg", type: String }
73
+ }, {
74
+ modelValue: { required: !0 },
75
+ modelModifiers: {}
76
+ }),
77
+ emits: ["update:modelValue"],
78
+ setup(t) {
79
+ const e = k(t, "modelValue"), n = (s) => {
80
+ e.value = s;
81
+ }, r = (s) => s.label === e.value ? !0 : null;
82
+ return (s, l) => (d(), v(
83
+ "ul",
84
+ {
85
+ "data-testid": "pv-tabs",
86
+ role: "list",
87
+ class: g({
88
+ "pv-tab-list-small": t.size === "lg",
89
+ "pv-tab-list": t.size === "xl"
90
+ })
91
+ },
92
+ [
93
+ (d(!0), v(
94
+ I,
95
+ null,
96
+ $(t.tabs, (o) => (d(), v("li", {
97
+ key: o.label,
98
+ "data-active": r(o),
99
+ "data-testid": "pv-tab",
100
+ type: "button",
101
+ onClick: () => n(o.label)
102
+ }, [
103
+ S("button", W, [
104
+ o.icon ? (d(), y(R, {
105
+ key: 0,
106
+ name: o.icon
107
+ }, null, 8, ["name"])) : x("v-if", !0),
108
+ z(
109
+ " " + P(o.label) + " ",
110
+ 1
111
+ /* TEXT */
112
+ ),
113
+ o.counter ? (d(), y(V, {
114
+ key: 1,
115
+ value: o.counter,
116
+ variant: r(o) ? "primary" : "tertiary",
117
+ size: "sm"
118
+ }, null, 8, ["value", "variant"])) : x("v-if", !0)
119
+ ])
120
+ ], 8, D))),
121
+ 128
122
+ /* KEYED_FRAGMENT */
123
+ ))
124
+ ],
125
+ 2
126
+ /* CLASS */
127
+ ));
128
+ }
129
+ }), q = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
130
+ function G(t) {
131
+ return !q.has(t);
132
+ }
133
+ function b(t, e) {
134
+ const n = document.querySelector('link[href*="' + e + '"]');
135
+ if (!t.shadowRoot)
136
+ return !1;
137
+ if (n && t.shadowRoot) {
138
+ const r = n.href;
139
+ if (t.shadowRoot.querySelector(`link[href="${r}"]`))
140
+ return;
141
+ const s = document.createElement("link");
142
+ return s.rel = "stylesheet", s.href = r, t.shadowRoot.prepend(s), !0;
143
+ }
144
+ return !1;
145
+ }
146
+ function J(t) {
147
+ if (!b(t, "pit-viper-v2")) {
148
+ if (b(t, "pit-viper")) {
149
+ b(t, "pit-viper-v2-scoped");
150
+ return;
151
+ }
152
+ console.warn(
153
+ "No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
154
+ );
155
+ }
156
+ }
157
+ const U = (t) => ({ shadowRoot: G(t) });
158
+ function Z(t, e) {
159
+ return e === null ? !1 : e === "" || e === "true" ? !0 : (e === "false" || console.warn(
160
+ `Invalid boolean attribute value for "${t}": "${e}". Expected "true", "false", or empty string.`
161
+ ), !1);
162
+ }
163
+ function F(t, e) {
164
+ const n = Number(e);
165
+ return isNaN(n) && console.warn(`Invalid number attribute value for "${t}": "${e}". Expected a valid number.`), n;
166
+ }
167
+ function K(t) {
168
+ const e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), l = (t.__vccOpts || t).props;
169
+ return l && typeof l == "object" && Object.entries(l).forEach(([o, a]) => {
170
+ a === Boolean || a && a.type === Boolean ? e.add(o) : a === Number || a && a.type === Number ? n.add(o) : (a === Object || a === Array || a && (a.type === Object || a.type === Array)) && r.add(o);
171
+ }), { booleanProps: e, numberProps: n, jsonProps: r };
172
+ }
173
+ function C(t, e) {
174
+ try {
175
+ return JSON.parse(e);
176
+ } catch (n) {
177
+ return console.warn(
178
+ `Invalid JSON attribute value for "${t}": "${e}". Error: ${n instanceof Error ? n.message : String(n)}`
179
+ ), null;
180
+ }
181
+ }
182
+ function Q(t) {
183
+ const e = t.__name || t.name;
184
+ if (!e)
185
+ throw new Error("Component must have a __name or name property");
186
+ const n = O(t, U(e)), { booleanProps: r, numberProps: s, jsonProps: l } = K(t);
187
+ class o extends n {
188
+ _hiddenInput = null;
189
+ constructor() {
190
+ super(), this._parseAttributes();
191
+ }
192
+ disconnectedCallback() {
193
+ this._hiddenInput?.remove(), super.disconnectedCallback?.();
194
+ }
195
+ /**
196
+ * Update the hidden input value
197
+ * Call this from the Vue component to sync form value
198
+ */
199
+ setHiddenInputValue(u) {
200
+ this._hiddenInput && (this._hiddenInput.value = u ?? "");
201
+ }
202
+ _parseAttributes() {
203
+ r.forEach((i) => {
204
+ const c = this.getAttribute(i);
205
+ this[i] = Z(i, c);
206
+ }), s.forEach((i) => {
207
+ const c = this.getAttribute(i);
208
+ c !== null && (this[i] = F(i, c));
209
+ }), l.forEach((i) => {
210
+ const c = this.getAttribute(i);
211
+ if (c !== null) {
212
+ const p = C(i, c);
213
+ p !== null && (this[i] = p);
214
+ }
215
+ });
216
+ const u = this.getAttribute("data-json-props");
217
+ u && u.split(",").map((c) => c.trim()).filter(Boolean).forEach((c) => {
218
+ const p = c.replace(/-([a-z])/g, (f) => f[1].toUpperCase());
219
+ let h = this.getAttribute(c);
220
+ if (h === null) {
221
+ const f = p.replace(/([A-Z])/g, "-$1").toLowerCase();
222
+ h = this.getAttribute(f);
223
+ }
224
+ if (h !== null && !this[p]) {
225
+ const f = C(p, h);
226
+ f !== null && (this[p] = f);
227
+ }
228
+ });
229
+ }
230
+ connectedCallback() {
231
+ this._parseAttributes(), super.connectedCallback?.(), J(this);
232
+ const u = this.getAttribute("name");
233
+ u && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = u, this.after(this._hiddenInput));
234
+ }
235
+ }
236
+ return o;
237
+ }
238
+ function X(t) {
239
+ return t.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
240
+ }
241
+ function Y(t) {
242
+ const e = t.__name || t.name;
243
+ if (!e)
244
+ throw new Error("Component must have a __name or name property");
245
+ const n = X(e), r = Q(t);
246
+ customElements.get(n) || customElements.define(n, r);
247
+ }
248
+ Y(H);
@@ -0,0 +1,210 @@
1
+ import { ref as C, getCurrentInstance as A, defineComponent as E, computed as m, createElementBlock as P, openBlock as h, normalizeClass as S, createElementVNode as w, createBlock as v, createCommentVNode as g, toDisplayString as I, withModifiers as $, defineCustomElement as k } from "vue";
2
+ function O() {
3
+ const e = C(!1), n = A()?.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], B = ["xlink:href"], y = /* @__PURE__ */ E({
7
+ __name: "PvIcon",
8
+ props: {
9
+ name: { type: String },
10
+ size: { type: null }
11
+ },
12
+ setup(e) {
13
+ const t = e, n = O(), s = C(null), c = m(() => ({
14
+ "pv-icon": !0,
15
+ [`pv-icon-${t.size}`]: j.includes(t.size)
16
+ })), o = m(() => n.value && s.value ? `${s.value}#${t.name}` : `#${t.name}`);
17
+ return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (s.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), (l, r) => (h(), P(
18
+ "svg",
19
+ {
20
+ "data-testid": "pv-icon",
21
+ "aria-hidden": "true",
22
+ class: S(c.value)
23
+ },
24
+ [
25
+ w("use", { "xlink:href": o.value }, null, 8, B)
26
+ ],
27
+ 2
28
+ /* CLASS */
29
+ ));
30
+ }
31
+ }), z = ["data-style"], N = { class: "pv-truncate" }, x = /* @__PURE__ */ E({
32
+ __name: "PvTag",
33
+ props: {
34
+ size: { default: "md", type: String },
35
+ variant: { default: "tertiary", type: String },
36
+ icon: { type: String },
37
+ label: { type: String },
38
+ showClear: { type: Boolean },
39
+ rounded: { type: Boolean }
40
+ },
41
+ emits: ["handle-close", "handle-click"],
42
+ setup(e) {
43
+ const t = e, n = m(() => {
44
+ switch (t.size) {
45
+ case "lg":
46
+ return "pv-tag-lg";
47
+ case "sm":
48
+ return "pv-tag-sm";
49
+ default:
50
+ return "";
51
+ }
52
+ }), s = m(() => {
53
+ switch (t.variant) {
54
+ case "primary":
55
+ return "pv-tag-primary";
56
+ case "tertiary":
57
+ return "pv-tag-tertiary";
58
+ default:
59
+ return "";
60
+ }
61
+ });
62
+ return (c, o) => (h(), P("button", {
63
+ class: S([s.value, n.value, "pv-flex"]),
64
+ onClick: o[1] || (o[1] = (l) => c.$emit("handle-click", e.label)),
65
+ style: { "max-width": "100%", "--flex-gap": "4px" },
66
+ "data-testid": "pv-tag",
67
+ "data-style": e.rounded ? "rounded" : void 0
68
+ }, [
69
+ e.icon ? (h(), v(y, {
70
+ key: 0,
71
+ "data-testid": "pv-tag-icon",
72
+ name: e.icon,
73
+ size: 12
74
+ }, null, 8, ["name"])) : g("v-if", !0),
75
+ w(
76
+ "span",
77
+ N,
78
+ I(e.label),
79
+ 1
80
+ /* TEXT */
81
+ ),
82
+ e.showClear ? (h(), v(y, {
83
+ key: 1,
84
+ "data-testid": "pv-tag-close-icon",
85
+ size: 12,
86
+ name: "close",
87
+ onClick: o[0] || (o[0] = $((l) => c.$emit("handle-close", e.label), ["stop"]))
88
+ })) : g("v-if", !0)
89
+ ], 10, z));
90
+ }
91
+ }), T = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
92
+ function L(e) {
93
+ return !T.has(e);
94
+ }
95
+ function b(e, t) {
96
+ const n = document.querySelector('link[href*="' + t + '"]');
97
+ if (!e.shadowRoot)
98
+ return !1;
99
+ if (n && e.shadowRoot) {
100
+ const s = n.href;
101
+ if (e.shadowRoot.querySelector(`link[href="${s}"]`))
102
+ return;
103
+ const c = document.createElement("link");
104
+ return c.rel = "stylesheet", c.href = s, e.shadowRoot.prepend(c), !0;
105
+ }
106
+ return !1;
107
+ }
108
+ function R(e) {
109
+ if (!b(e, "pit-viper-v2")) {
110
+ if (b(e, "pit-viper")) {
111
+ b(e, "pit-viper-v2-scoped");
112
+ return;
113
+ }
114
+ console.warn(
115
+ "No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
116
+ );
117
+ }
118
+ }
119
+ const D = (e) => ({ shadowRoot: L(e) });
120
+ function W(e, t) {
121
+ return t === null ? !1 : t === "" || t === "true" ? !0 : (t === "false" || console.warn(
122
+ `Invalid boolean attribute value for "${e}": "${t}". Expected "true", "false", or empty string.`
123
+ ), !1);
124
+ }
125
+ function H(e, t) {
126
+ const n = Number(t);
127
+ return isNaN(n) && console.warn(`Invalid number attribute value for "${e}": "${t}". Expected a valid number.`), n;
128
+ }
129
+ function M(e) {
130
+ const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), o = (e.__vccOpts || e).props;
131
+ return o && typeof o == "object" && Object.entries(o).forEach(([l, r]) => {
132
+ r === Boolean || r && r.type === Boolean ? t.add(l) : r === Number || r && r.type === Number ? n.add(l) : (r === Object || r === Array || r && (r.type === Object || r.type === Array)) && s.add(l);
133
+ }), { booleanProps: t, numberProps: n, jsonProps: s };
134
+ }
135
+ function _(e, t) {
136
+ try {
137
+ return JSON.parse(t);
138
+ } catch (n) {
139
+ return console.warn(
140
+ `Invalid JSON attribute value for "${e}": "${t}". Error: ${n instanceof Error ? n.message : String(n)}`
141
+ ), null;
142
+ }
143
+ }
144
+ function V(e) {
145
+ const t = e.__name || e.name;
146
+ if (!t)
147
+ throw new Error("Component must have a __name or name property");
148
+ const n = k(e, D(t)), { booleanProps: s, numberProps: c, jsonProps: o } = M(e);
149
+ class l extends n {
150
+ _hiddenInput = null;
151
+ constructor() {
152
+ super(), this._parseAttributes();
153
+ }
154
+ disconnectedCallback() {
155
+ this._hiddenInput?.remove(), super.disconnectedCallback?.();
156
+ }
157
+ /**
158
+ * Update the hidden input value
159
+ * Call this from the Vue component to sync form value
160
+ */
161
+ setHiddenInputValue(u) {
162
+ this._hiddenInput && (this._hiddenInput.value = u ?? "");
163
+ }
164
+ _parseAttributes() {
165
+ s.forEach((i) => {
166
+ const a = this.getAttribute(i);
167
+ this[i] = W(i, a);
168
+ }), c.forEach((i) => {
169
+ const a = this.getAttribute(i);
170
+ a !== null && (this[i] = H(i, a));
171
+ }), o.forEach((i) => {
172
+ const a = this.getAttribute(i);
173
+ if (a !== null) {
174
+ const d = _(i, a);
175
+ d !== null && (this[i] = d);
176
+ }
177
+ });
178
+ const u = this.getAttribute("data-json-props");
179
+ u && u.split(",").map((a) => a.trim()).filter(Boolean).forEach((a) => {
180
+ const d = a.replace(/-([a-z])/g, (p) => p[1].toUpperCase());
181
+ let f = this.getAttribute(a);
182
+ if (f === null) {
183
+ const p = d.replace(/([A-Z])/g, "-$1").toLowerCase();
184
+ f = this.getAttribute(p);
185
+ }
186
+ if (f !== null && !this[d]) {
187
+ const p = _(d, f);
188
+ p !== null && (this[d] = p);
189
+ }
190
+ });
191
+ }
192
+ connectedCallback() {
193
+ this._parseAttributes(), super.connectedCallback?.(), R(this);
194
+ const u = this.getAttribute("name");
195
+ u && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = u, this.after(this._hiddenInput));
196
+ }
197
+ }
198
+ return l;
199
+ }
200
+ function G(e) {
201
+ return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
202
+ }
203
+ function J(e) {
204
+ const t = e.__name || e.name;
205
+ if (!t)
206
+ throw new Error("Component must have a __name or name property");
207
+ const n = G(t), s = V(e);
208
+ customElements.get(n) || customElements.define(n, s);
209
+ }
210
+ J(x);