@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,150 @@
1
+ import { ref as _, getCurrentInstance as v, defineComponent as E, computed as m, createElementBlock as g, openBlock as P, normalizeClass as A, createElementVNode as C, defineCustomElement as y } from "vue";
2
+ function S() {
3
+ const e = _(!1), n = v()?.root || {};
4
+ return "isCE" in n && n.isCE === !0 && (e.value = !0), e;
5
+ }
6
+ const w = [void 0, 10, 12, 20, 24, 32, 64], I = ["xlink:href"], O = /* @__PURE__ */ E({
7
+ __name: "PvIcon",
8
+ props: {
9
+ name: { type: String },
10
+ size: { type: null }
11
+ },
12
+ setup(e) {
13
+ const t = e, n = S(), s = _(null), c = m(() => ({
14
+ "pv-icon": !0,
15
+ [`pv-icon-${t.size}`]: w.includes(t.size)
16
+ })), a = 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__), (p, r) => (P(), g(
18
+ "svg",
19
+ {
20
+ "data-testid": "pv-icon",
21
+ "aria-hidden": "true",
22
+ class: A(c.value)
23
+ },
24
+ [
25
+ C("use", { "xlink:href": a.value }, null, 8, I)
26
+ ],
27
+ 2
28
+ /* CLASS */
29
+ ));
30
+ }
31
+ }), $ = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
32
+ function j(e) {
33
+ return !$.has(e);
34
+ }
35
+ function h(e, t) {
36
+ const n = document.querySelector('link[href*="' + t + '"]');
37
+ if (!e.shadowRoot)
38
+ return !1;
39
+ if (n && e.shadowRoot) {
40
+ const s = n.href;
41
+ if (e.shadowRoot.querySelector(`link[href="${s}"]`))
42
+ return;
43
+ const c = document.createElement("link");
44
+ return c.rel = "stylesheet", c.href = s, e.shadowRoot.prepend(c), !0;
45
+ }
46
+ return !1;
47
+ }
48
+ function k(e) {
49
+ if (!h(e, "pit-viper-v2")) {
50
+ if (h(e, "pit-viper")) {
51
+ h(e, "pit-viper-v2-scoped");
52
+ return;
53
+ }
54
+ console.warn(
55
+ "No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
56
+ );
57
+ }
58
+ }
59
+ const N = (e) => ({ shadowRoot: j(e) });
60
+ function B(e, t) {
61
+ return t === null ? !1 : t === "" || t === "true" ? !0 : (t === "false" || console.warn(
62
+ `Invalid boolean attribute value for "${e}": "${t}". Expected "true", "false", or empty string.`
63
+ ), !1);
64
+ }
65
+ function T(e, t) {
66
+ const n = Number(t);
67
+ return isNaN(n) && console.warn(`Invalid number attribute value for "${e}": "${t}". Expected a valid number.`), n;
68
+ }
69
+ function L(e) {
70
+ const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), a = (e.__vccOpts || e).props;
71
+ return a && typeof a == "object" && Object.entries(a).forEach(([p, r]) => {
72
+ r === Boolean || r && r.type === Boolean ? t.add(p) : r === Number || r && r.type === Number ? n.add(p) : (r === Object || r === Array || r && (r.type === Object || r.type === Array)) && s.add(p);
73
+ }), { booleanProps: t, numberProps: n, jsonProps: s };
74
+ }
75
+ function b(e, t) {
76
+ try {
77
+ return JSON.parse(t);
78
+ } catch (n) {
79
+ return console.warn(
80
+ `Invalid JSON attribute value for "${e}": "${t}". Error: ${n instanceof Error ? n.message : String(n)}`
81
+ ), null;
82
+ }
83
+ }
84
+ function R(e) {
85
+ const t = e.__name || e.name;
86
+ if (!t)
87
+ throw new Error("Component must have a __name or name property");
88
+ const n = y(e, N(t)), { booleanProps: s, numberProps: c, jsonProps: a } = L(e);
89
+ class p extends n {
90
+ _hiddenInput = null;
91
+ constructor() {
92
+ super(), this._parseAttributes();
93
+ }
94
+ disconnectedCallback() {
95
+ this._hiddenInput?.remove(), super.disconnectedCallback?.();
96
+ }
97
+ /**
98
+ * Update the hidden input value
99
+ * Call this from the Vue component to sync form value
100
+ */
101
+ setHiddenInputValue(u) {
102
+ this._hiddenInput && (this._hiddenInput.value = u ?? "");
103
+ }
104
+ _parseAttributes() {
105
+ s.forEach((o) => {
106
+ const i = this.getAttribute(o);
107
+ this[o] = B(o, i);
108
+ }), c.forEach((o) => {
109
+ const i = this.getAttribute(o);
110
+ i !== null && (this[o] = T(o, i));
111
+ }), a.forEach((o) => {
112
+ const i = this.getAttribute(o);
113
+ if (i !== null) {
114
+ const l = b(o, i);
115
+ l !== null && (this[o] = l);
116
+ }
117
+ });
118
+ const u = this.getAttribute("data-json-props");
119
+ u && u.split(",").map((i) => i.trim()).filter(Boolean).forEach((i) => {
120
+ const l = i.replace(/-([a-z])/g, (f) => f[1].toUpperCase());
121
+ let d = this.getAttribute(i);
122
+ if (d === null) {
123
+ const f = l.replace(/([A-Z])/g, "-$1").toLowerCase();
124
+ d = this.getAttribute(f);
125
+ }
126
+ if (d !== null && !this[l]) {
127
+ const f = b(l, d);
128
+ f !== null && (this[l] = f);
129
+ }
130
+ });
131
+ }
132
+ connectedCallback() {
133
+ this._parseAttributes(), super.connectedCallback?.(), k(this);
134
+ const u = this.getAttribute("name");
135
+ u && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = u, this.after(this._hiddenInput));
136
+ }
137
+ }
138
+ return p;
139
+ }
140
+ function x(e) {
141
+ return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
142
+ }
143
+ function z(e) {
144
+ const t = e.__name || e.name;
145
+ if (!t)
146
+ throw new Error("Component must have a __name or name property");
147
+ const n = x(t), s = R(e);
148
+ customElements.get(n) || customElements.define(n, s);
149
+ }
150
+ z(O);
@@ -0,0 +1,191 @@
1
+ import { defineComponent as w, mergeModels as E, useModel as S, createElementBlock as h, openBlock as m, Fragment as C, createCommentVNode as v, withDirectives as A, renderSlot as P, createElementVNode as I, normalizeClass as y, vModelDynamic as k, toDisplayString as j, defineCustomElement as O } from "vue";
2
+ const $ = ["for"], N = ["disabled", "type", "placeholder", "id", "data-invalid"], x = /* @__PURE__ */ w({
3
+ __name: "PvInput",
4
+ props: /* @__PURE__ */ E({
5
+ error: { type: Boolean },
6
+ disabled: { type: Boolean },
7
+ placeholder: { type: String },
8
+ type: { default: "text", type: String },
9
+ id: { default: Math.random().toString(), type: String },
10
+ lowerLabel: { type: String },
11
+ variant: { default: "white", type: String }
12
+ }, {
13
+ modelValue: {},
14
+ modelModifiers: {}
15
+ }),
16
+ emits: ["update:modelValue"],
17
+ setup(e) {
18
+ const t = S(e, "modelValue");
19
+ return (n, r) => (m(), h(
20
+ C,
21
+ null,
22
+ [
23
+ n.$slots.label ? (m(), h("label", {
24
+ key: 0,
25
+ "data-testid": "pv-input-label",
26
+ class: "pv-label pv-stack-8",
27
+ for: e.id
28
+ }, [
29
+ P(n.$slots, "label")
30
+ ], 8, $)) : v("v-if", !0),
31
+ A(I("input", {
32
+ "onUpdate:modelValue": r[0] || (r[0] = (a) => t.value = a),
33
+ "data-testid": "pv-input",
34
+ class: y([
35
+ "pv-input-text",
36
+ {
37
+ "pv-stack-8": e.lowerLabel,
38
+ "pv-surface-accent": e.variant === "grey"
39
+ }
40
+ ]),
41
+ disabled: e.disabled,
42
+ type: e.type,
43
+ placeholder: e.placeholder,
44
+ id: e.id,
45
+ "data-invalid": e.error ? !0 : void 0
46
+ }, null, 10, N), [
47
+ [k, t.value]
48
+ ]),
49
+ e.lowerLabel ? (m(), h(
50
+ "p",
51
+ {
52
+ key: 1,
53
+ "data-testid": "pv-input-lower-label",
54
+ style: { "margin-left": "12px" },
55
+ class: y([
56
+ "pv-text-body-xs",
57
+ {
58
+ "pv-text-red": e.error,
59
+ "pv-text-subdued": !e.error
60
+ }
61
+ ])
62
+ },
63
+ j(e.lowerLabel),
64
+ 3
65
+ /* TEXT, CLASS */
66
+ )) : v("v-if", !0)
67
+ ],
68
+ 64
69
+ /* STABLE_FRAGMENT */
70
+ ));
71
+ }
72
+ }), B = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
73
+ function M(e) {
74
+ return !B.has(e);
75
+ }
76
+ function b(e, t) {
77
+ const n = document.querySelector('link[href*="' + t + '"]');
78
+ if (!e.shadowRoot)
79
+ return !1;
80
+ if (n && e.shadowRoot) {
81
+ const r = n.href;
82
+ if (e.shadowRoot.querySelector(`link[href="${r}"]`))
83
+ return;
84
+ const a = document.createElement("link");
85
+ return a.rel = "stylesheet", a.href = r, e.shadowRoot.prepend(a), !0;
86
+ }
87
+ return !1;
88
+ }
89
+ function D(e) {
90
+ if (!b(e, "pit-viper-v2")) {
91
+ if (b(e, "pit-viper")) {
92
+ b(e, "pit-viper-v2-scoped");
93
+ return;
94
+ }
95
+ console.warn(
96
+ "No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
97
+ );
98
+ }
99
+ }
100
+ const L = (e) => ({ shadowRoot: M(e) });
101
+ function V(e, t) {
102
+ return t === null ? !1 : t === "" || t === "true" ? !0 : (t === "false" || console.warn(
103
+ `Invalid boolean attribute value for "${e}": "${t}". Expected "true", "false", or empty string.`
104
+ ), !1);
105
+ }
106
+ function R(e, t) {
107
+ const n = Number(t);
108
+ return isNaN(n) && console.warn(`Invalid number attribute value for "${e}": "${t}". Expected a valid number.`), n;
109
+ }
110
+ function _(e) {
111
+ const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), d = (e.__vccOpts || e).props;
112
+ return d && typeof d == "object" && Object.entries(d).forEach(([p, o]) => {
113
+ 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)) && r.add(p);
114
+ }), { booleanProps: t, numberProps: n, jsonProps: r };
115
+ }
116
+ function g(e, t) {
117
+ try {
118
+ return JSON.parse(t);
119
+ } catch (n) {
120
+ return console.warn(
121
+ `Invalid JSON attribute value for "${e}": "${t}". Error: ${n instanceof Error ? n.message : String(n)}`
122
+ ), null;
123
+ }
124
+ }
125
+ function J(e) {
126
+ const t = e.__name || e.name;
127
+ if (!t)
128
+ throw new Error("Component must have a __name or name property");
129
+ const n = O(e, L(t)), { booleanProps: r, numberProps: a, jsonProps: d } = _(e);
130
+ class p extends n {
131
+ _hiddenInput = null;
132
+ constructor() {
133
+ super(), this._parseAttributes();
134
+ }
135
+ disconnectedCallback() {
136
+ this._hiddenInput?.remove(), super.disconnectedCallback?.();
137
+ }
138
+ /**
139
+ * Update the hidden input value
140
+ * Call this from the Vue component to sync form value
141
+ */
142
+ setHiddenInputValue(l) {
143
+ this._hiddenInput && (this._hiddenInput.value = l ?? "");
144
+ }
145
+ _parseAttributes() {
146
+ r.forEach((s) => {
147
+ const i = this.getAttribute(s);
148
+ this[s] = V(s, i);
149
+ }), a.forEach((s) => {
150
+ const i = this.getAttribute(s);
151
+ i !== null && (this[s] = R(s, i));
152
+ }), d.forEach((s) => {
153
+ const i = this.getAttribute(s);
154
+ if (i !== null) {
155
+ const u = g(s, i);
156
+ u !== null && (this[s] = u);
157
+ }
158
+ });
159
+ const l = this.getAttribute("data-json-props");
160
+ l && l.split(",").map((i) => i.trim()).filter(Boolean).forEach((i) => {
161
+ const u = i.replace(/-([a-z])/g, (c) => c[1].toUpperCase());
162
+ let f = this.getAttribute(i);
163
+ if (f === null) {
164
+ const c = u.replace(/([A-Z])/g, "-$1").toLowerCase();
165
+ f = this.getAttribute(c);
166
+ }
167
+ if (f !== null && !this[u]) {
168
+ const c = g(u, f);
169
+ c !== null && (this[u] = c);
170
+ }
171
+ });
172
+ }
173
+ connectedCallback() {
174
+ this._parseAttributes(), super.connectedCallback?.(), D(this);
175
+ const l = this.getAttribute("name");
176
+ l && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = l, this.after(this._hiddenInput));
177
+ }
178
+ }
179
+ return p;
180
+ }
181
+ function U(e) {
182
+ return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
183
+ }
184
+ function W(e) {
185
+ const t = e.__name || e.name;
186
+ if (!t)
187
+ throw new Error("Component must have a __name or name property");
188
+ const n = U(t), r = J(e);
189
+ customElements.get(n) || customElements.define(n, r);
190
+ }
191
+ W(x);
@@ -0,0 +1,363 @@
1
+ import { defineComponent as g, computed as b, createBlock as v, openBlock as i, resolveDynamicComponent as x, normalizeClass as S, withCtx as $, renderSlot as A, ref as w, getCurrentInstance as B, createElementBlock as p, createElementVNode as k, normalizeStyle as z, Fragment as O, createCommentVNode as u, toDisplayString as y, withModifiers as j, defineCustomElement as T } from "vue";
2
+ const L = /* @__PURE__ */ g({
3
+ __name: "PvCard",
4
+ props: {
5
+ href: { type: String },
6
+ variant: { default: "primary", type: String },
7
+ interactive: { type: Boolean, default: !1 }
8
+ },
9
+ setup(t) {
10
+ const e = t, n = b(() => e.href ? "a" : e.interactive ? "button" : "div"), s = b(() => e.href || e.interactive ? "button" : "div");
11
+ return (r, c) => (i(), v(x(n.value), {
12
+ href: t.href,
13
+ type: s.value,
14
+ class: S([
15
+ "pv-card pv-inset-square-8 pv-inline-block",
16
+ {
17
+ "pv-card-secondary": t.variant === "secondary"
18
+ }
19
+ ]),
20
+ "data-testid": "pv-card"
21
+ }, {
22
+ default: $(() => [
23
+ A(r.$slots, "default")
24
+ ]),
25
+ _: 3
26
+ /* FORWARDED */
27
+ }, 8, ["href", "type", "class"]));
28
+ }
29
+ });
30
+ function N() {
31
+ const t = w(!1), n = B()?.root || {};
32
+ return "isCE" in n && n.isCE === !0 && (t.value = !0), t;
33
+ }
34
+ const D = [void 0, 10, 12, 20, 24, 32, 64], R = ["xlink:href"], P = /* @__PURE__ */ g({
35
+ __name: "PvIcon",
36
+ props: {
37
+ name: { type: String },
38
+ size: { type: null }
39
+ },
40
+ setup(t) {
41
+ const e = t, n = N(), s = w(null), r = b(() => ({
42
+ "pv-icon": !0,
43
+ [`pv-icon-${e.size}`]: D.includes(e.size)
44
+ })), c = b(() => n.value && s.value ? `${s.value}#${e.name}` : `#${e.name}`);
45
+ return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (s.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), (h, o) => (i(), p(
46
+ "svg",
47
+ {
48
+ "data-testid": "pv-icon",
49
+ "aria-hidden": "true",
50
+ class: S(r.value)
51
+ },
52
+ [
53
+ k("use", { "xlink:href": c.value }, null, 8, R)
54
+ ],
55
+ 2
56
+ /* CLASS */
57
+ ));
58
+ }
59
+ }), V = /* @__PURE__ */ g({
60
+ __name: "PvSpinner",
61
+ props: {
62
+ variant: { default: "primary", type: String },
63
+ size: { default: "lg", type: String }
64
+ },
65
+ setup(t) {
66
+ const e = {
67
+ xs: "0.75rem",
68
+ sm: "1rem",
69
+ md: "1.25rem",
70
+ lg: "1.5rem",
71
+ xl: "2rem"
72
+ }, n = {
73
+ primary: "pv-spinner",
74
+ dark: "pv-spinner-dark",
75
+ white: "pv-spinner-light"
76
+ };
77
+ return (s, r) => (i(), p(
78
+ "div",
79
+ {
80
+ "data-testid": "pv-spinner",
81
+ class: S(n[t.variant]),
82
+ style: z({ "--size": e[t.size] })
83
+ },
84
+ null,
85
+ 6
86
+ /* CLASS, STYLE */
87
+ ));
88
+ }
89
+ }), M = ["ghost"], I = {
90
+ md: "pv-button-small",
91
+ lg: void 0,
92
+ xl: "pv-button-large"
93
+ }, W = (t) => t == null || !I.hasOwnProperty(t) ? null : I[t] || null, H = ["disabled"], G = {
94
+ key: 1,
95
+ "data-testid": "pv-button-label"
96
+ }, q = /* @__PURE__ */ g({
97
+ __name: "PvButton",
98
+ props: {
99
+ variant: { default: "primary", type: String },
100
+ disabled: { type: Boolean, default: !1 },
101
+ size: { default: "lg", type: String },
102
+ loading: { type: Boolean, default: !1 },
103
+ label: { type: String },
104
+ leftIcon: { type: String },
105
+ rightIcon: { type: String },
106
+ inverse: { type: Boolean, default: !1 }
107
+ },
108
+ setup(t) {
109
+ const e = t, n = b(() => {
110
+ const s = [];
111
+ e.inverse && M.includes(e.variant) ? s.push(`pv-button-${e.variant}-inverse`) : s.push(`pv-button-${e.variant}`);
112
+ const r = W(e.size);
113
+ return r && s.push(r), s;
114
+ });
115
+ return (s, r) => (i(), p("button", {
116
+ type: "button",
117
+ class: S(n.value),
118
+ disabled: t.disabled,
119
+ "data-testid": "pv-button"
120
+ }, [
121
+ t.loading ? (i(), v(V, {
122
+ key: 0,
123
+ size: "sm"
124
+ })) : (i(), p(
125
+ O,
126
+ { key: 1 },
127
+ [
128
+ t.leftIcon ? (i(), v(P, {
129
+ key: 0,
130
+ name: t.leftIcon,
131
+ "data-testid": "pv-button-left-icon"
132
+ }, null, 8, ["name"])) : u("v-if", !0),
133
+ t.label ? (i(), p(
134
+ "span",
135
+ G,
136
+ y(t.label),
137
+ 1
138
+ /* TEXT */
139
+ )) : u("v-if", !0),
140
+ t.rightIcon ? (i(), v(P, {
141
+ key: 2,
142
+ name: t.rightIcon,
143
+ "data-testid": "pv-button-right-icon"
144
+ }, null, 8, ["name"])) : u("v-if", !0)
145
+ ],
146
+ 64
147
+ /* STABLE_FRAGMENT */
148
+ ))
149
+ ], 10, H));
150
+ }
151
+ }), J = {
152
+ class: "pv-flex-vertical",
153
+ style: { "--flex-align": "flex-start", "--flex-gap": "0.25rem" }
154
+ }, U = {
155
+ key: 0,
156
+ class: "pv-flex",
157
+ style: { "--flex-gap": "0.25rem" }
158
+ }, Z = { class: "pv-text-body-sm" }, F = {
159
+ key: 1,
160
+ class: "pv-text-body-sm pv-text-tertiary"
161
+ }, K = {
162
+ key: 2,
163
+ class: "pv-heading-2"
164
+ }, Q = {
165
+ key: 3,
166
+ class: "pv-text-body-md pv-text-secondary pv-text-subdued"
167
+ }, X = /* @__PURE__ */ g({
168
+ __name: "PvInsightCard",
169
+ props: {
170
+ icon: { default: "ai", type: String },
171
+ insight: { type: String },
172
+ upperLabel: { type: String },
173
+ title: { type: String },
174
+ description: { type: String },
175
+ showButton: { type: Boolean, default: !1 },
176
+ interactive: { type: Boolean, default: !1 }
177
+ },
178
+ emits: ["click", "icon-click"],
179
+ setup(t) {
180
+ const e = t, n = b(() => e.icon || e.insight);
181
+ return (s, r) => (i(), v(L, {
182
+ variant: "secondary",
183
+ interactive: t.interactive,
184
+ onClick: r[1] || (r[1] = (c) => s.$emit("click")),
185
+ class: "pv-relative"
186
+ }, {
187
+ default: $(() => [
188
+ k("div", J, [
189
+ n.value ? (i(), p("div", U, [
190
+ t.icon ? (i(), v(P, {
191
+ key: 0,
192
+ style: { color: "#218c88" },
193
+ name: t.icon,
194
+ size: 12
195
+ }, null, 8, ["name"])) : u("v-if", !0),
196
+ k(
197
+ "span",
198
+ Z,
199
+ y(t.insight),
200
+ 1
201
+ /* TEXT */
202
+ )
203
+ ])) : u("v-if", !0),
204
+ t.upperLabel ? (i(), p(
205
+ "span",
206
+ F,
207
+ y(t.upperLabel),
208
+ 1
209
+ /* TEXT */
210
+ )) : u("v-if", !0),
211
+ t.title ? (i(), p(
212
+ "span",
213
+ K,
214
+ y(t.title),
215
+ 1
216
+ /* TEXT */
217
+ )) : u("v-if", !0),
218
+ t.description ? (i(), p(
219
+ "span",
220
+ Q,
221
+ y(t.description),
222
+ 1
223
+ /* TEXT */
224
+ )) : u("v-if", !0)
225
+ ]),
226
+ t.showButton ? (i(), v(q, {
227
+ key: 0,
228
+ "left-icon": "new-tab",
229
+ variant: "ghost",
230
+ size: "md",
231
+ class: "pv-insight-button",
232
+ onClick: r[0] || (r[0] = j((c) => s.$emit("icon-click"), ["stop"]))
233
+ })) : u("v-if", !0)
234
+ ]),
235
+ _: 1
236
+ /* STABLE */
237
+ }, 8, ["interactive"]));
238
+ }
239
+ }), Y = ".pv-insight-button[data-v-6e9399e6]{position:absolute;top:.5rem;right:.5rem}", tt = (t, e) => {
240
+ const n = t.__vccOpts || t;
241
+ for (const [s, r] of e)
242
+ n[s] = r;
243
+ return n;
244
+ }, et = /* @__PURE__ */ tt(X, [["styles", [Y]], ["__scopeId", "data-v-6e9399e6"]]), nt = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
245
+ function st(t) {
246
+ return !nt.has(t);
247
+ }
248
+ function C(t, e) {
249
+ const n = document.querySelector('link[href*="' + e + '"]');
250
+ if (!t.shadowRoot)
251
+ return !1;
252
+ if (n && t.shadowRoot) {
253
+ const s = n.href;
254
+ if (t.shadowRoot.querySelector(`link[href="${s}"]`))
255
+ return;
256
+ const r = document.createElement("link");
257
+ return r.rel = "stylesheet", r.href = s, t.shadowRoot.prepend(r), !0;
258
+ }
259
+ return !1;
260
+ }
261
+ function rt(t) {
262
+ if (!C(t, "pit-viper-v2")) {
263
+ if (C(t, "pit-viper")) {
264
+ C(t, "pit-viper-v2-scoped");
265
+ return;
266
+ }
267
+ console.warn(
268
+ "No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
269
+ );
270
+ }
271
+ }
272
+ const it = (t) => ({ shadowRoot: st(t) });
273
+ function ot(t, e) {
274
+ return e === null ? !1 : e === "" || e === "true" ? !0 : (e === "false" || console.warn(
275
+ `Invalid boolean attribute value for "${t}": "${e}". Expected "true", "false", or empty string.`
276
+ ), !1);
277
+ }
278
+ function at(t, e) {
279
+ const n = Number(e);
280
+ return isNaN(n) && console.warn(`Invalid number attribute value for "${t}": "${e}". Expected a valid number.`), n;
281
+ }
282
+ function lt(t) {
283
+ const e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), c = (t.__vccOpts || t).props;
284
+ return c && typeof c == "object" && Object.entries(c).forEach(([h, o]) => {
285
+ o === Boolean || o && o.type === Boolean ? e.add(h) : o === Number || o && o.type === Number ? n.add(h) : (o === Object || o === Array || o && (o.type === Object || o.type === Array)) && s.add(h);
286
+ }), { booleanProps: e, numberProps: n, jsonProps: s };
287
+ }
288
+ function E(t, e) {
289
+ try {
290
+ return JSON.parse(e);
291
+ } catch (n) {
292
+ return console.warn(
293
+ `Invalid JSON attribute value for "${t}": "${e}". Error: ${n instanceof Error ? n.message : String(n)}`
294
+ ), null;
295
+ }
296
+ }
297
+ function ct(t) {
298
+ const e = t.__name || t.name;
299
+ if (!e)
300
+ throw new Error("Component must have a __name or name property");
301
+ const n = T(t, it(e)), { booleanProps: s, numberProps: r, jsonProps: c } = lt(t);
302
+ class h extends n {
303
+ _hiddenInput = null;
304
+ constructor() {
305
+ super(), this._parseAttributes();
306
+ }
307
+ disconnectedCallback() {
308
+ this._hiddenInput?.remove(), super.disconnectedCallback?.();
309
+ }
310
+ /**
311
+ * Update the hidden input value
312
+ * Call this from the Vue component to sync form value
313
+ */
314
+ setHiddenInputValue(d) {
315
+ this._hiddenInput && (this._hiddenInput.value = d ?? "");
316
+ }
317
+ _parseAttributes() {
318
+ s.forEach((a) => {
319
+ const l = this.getAttribute(a);
320
+ this[a] = ot(a, l);
321
+ }), r.forEach((a) => {
322
+ const l = this.getAttribute(a);
323
+ l !== null && (this[a] = at(a, l));
324
+ }), c.forEach((a) => {
325
+ const l = this.getAttribute(a);
326
+ if (l !== null) {
327
+ const f = E(a, l);
328
+ f !== null && (this[a] = f);
329
+ }
330
+ });
331
+ const d = this.getAttribute("data-json-props");
332
+ d && d.split(",").map((l) => l.trim()).filter(Boolean).forEach((l) => {
333
+ const f = l.replace(/-([a-z])/g, (m) => m[1].toUpperCase());
334
+ let _ = this.getAttribute(l);
335
+ if (_ === null) {
336
+ const m = f.replace(/([A-Z])/g, "-$1").toLowerCase();
337
+ _ = this.getAttribute(m);
338
+ }
339
+ if (_ !== null && !this[f]) {
340
+ const m = E(f, _);
341
+ m !== null && (this[f] = m);
342
+ }
343
+ });
344
+ }
345
+ connectedCallback() {
346
+ this._parseAttributes(), super.connectedCallback?.(), rt(this);
347
+ const d = this.getAttribute("name");
348
+ d && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = d, this.after(this._hiddenInput));
349
+ }
350
+ }
351
+ return h;
352
+ }
353
+ function ut(t) {
354
+ return t.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
355
+ }
356
+ function pt(t) {
357
+ const e = t.__name || t.name;
358
+ if (!e)
359
+ throw new Error("Component must have a __name or name property");
360
+ const n = ut(e), s = ct(t);
361
+ customElements.get(n) || customElements.define(n, s);
362
+ }
363
+ pt(et);