@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,221 @@
1
+ import { defineComponent as _, ref as S, computed as f, watch as E, createElementBlock as h, openBlock as b, normalizeStyle as P, normalizeClass as y, createElementVNode as C, createVNode as w, toDisplayString as A, defineCustomElement as x } from "vue";
2
+ function $(e) {
3
+ return e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
4
+ }
5
+ const z = /\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;
6
+ function j(e) {
7
+ return Array.from(e.match(z) ?? []);
8
+ }
9
+ function I(e) {
10
+ const t = j(e);
11
+ if (t.length === 0)
12
+ return "";
13
+ const [n, ...o] = t;
14
+ return `${n.toLowerCase()}${o.map((a) => $(a)).join("")}`;
15
+ }
16
+ const O = {
17
+ xs: "12px",
18
+ sm: "16px",
19
+ md: "20px",
20
+ lg: "24px",
21
+ xl: "32px",
22
+ "2x": "40px"
23
+ }, L = {
24
+ class: "pv-flex",
25
+ "data-testid": "pv-company-logo"
26
+ }, N = ["src"], k = /* @__PURE__ */ _({
27
+ __name: "PvCompanyLogo",
28
+ props: {
29
+ basePath: { default: "https://static-assets.turquoise.health/shared-logos/prd/payers", type: String },
30
+ name: { type: String },
31
+ size: { default: "md", type: null },
32
+ srcPathOverride: { type: String },
33
+ toCamelCase: { type: Boolean, default: !0 }
34
+ },
35
+ setup(e) {
36
+ const t = e, n = S(!0), o = f(() => O[t.size] || "32px"), a = f(() => ({
37
+ "pv-icon": n.value,
38
+ [`pv-company-${t.size}`]: t.size && !n.value
39
+ })), l = f(() => ({
40
+ width: o.value
41
+ })), u = f(() => t.toCamelCase ? I(t.name) + ".svg" : t.name + ".svg"), s = f(() => t.srcPathOverride ? t.srcPathOverride : `${t.basePath}/${u.value}`);
42
+ return E(s, () => {
43
+ n.value = !0;
44
+ }), (c, r) => (b(), h("div", L, [
45
+ n.value ? (b(), h(
46
+ "div",
47
+ {
48
+ key: 0,
49
+ class: y(a.value),
50
+ style: P(l.value)
51
+ },
52
+ [
53
+ C("img", {
54
+ src: s.value,
55
+ alt: "",
56
+ onError: r[0] || (r[0] = (i) => n.value = !1)
57
+ }, null, 40, N)
58
+ ],
59
+ 6
60
+ /* CLASS, STYLE */
61
+ )) : (b(), h(
62
+ "div",
63
+ {
64
+ key: 1,
65
+ class: y(a.value)
66
+ },
67
+ null,
68
+ 2
69
+ /* CLASS */
70
+ ))
71
+ ]));
72
+ }
73
+ }), B = { class: "pv-flex" }, D = /* @__PURE__ */ _({
74
+ __name: "PvCompanyLabel",
75
+ props: {
76
+ size: { default: "md", type: String },
77
+ logo: { type: String },
78
+ label: { type: String }
79
+ },
80
+ setup(e) {
81
+ const t = {
82
+ xs: "pv-text-body-xs",
83
+ sm: "pv-text-body-md",
84
+ md: "pv-text-body-md"
85
+ };
86
+ return (n, o) => (b(), h("div", B, [
87
+ w(k, {
88
+ name: e.logo ? e.logo : e.label,
89
+ size: e.size
90
+ }, null, 8, ["name", "size"]),
91
+ C(
92
+ "span",
93
+ {
94
+ class: y(t[e.size])
95
+ },
96
+ A(e.label),
97
+ 3
98
+ /* TEXT, CLASS */
99
+ )
100
+ ]));
101
+ }
102
+ }), R = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
103
+ function T(e) {
104
+ return !R.has(e);
105
+ }
106
+ function v(e, t) {
107
+ const n = document.querySelector('link[href*="' + t + '"]');
108
+ if (!e.shadowRoot)
109
+ return !1;
110
+ if (n && e.shadowRoot) {
111
+ const o = n.href;
112
+ if (e.shadowRoot.querySelector(`link[href="${o}"]`))
113
+ return;
114
+ const a = document.createElement("link");
115
+ return a.rel = "stylesheet", a.href = o, e.shadowRoot.prepend(a), !0;
116
+ }
117
+ return !1;
118
+ }
119
+ function M(e) {
120
+ if (!v(e, "pit-viper-v2")) {
121
+ if (v(e, "pit-viper")) {
122
+ v(e, "pit-viper-v2-scoped");
123
+ return;
124
+ }
125
+ console.warn(
126
+ "No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
127
+ );
128
+ }
129
+ }
130
+ const q = (e) => ({ shadowRoot: T(e) });
131
+ function J(e, t) {
132
+ return t === null ? !1 : t === "" || t === "true" ? !0 : (t === "false" || console.warn(
133
+ `Invalid boolean attribute value for "${e}": "${t}". Expected "true", "false", or empty string.`
134
+ ), !1);
135
+ }
136
+ function U(e, t) {
137
+ const n = Number(t);
138
+ return isNaN(n) && console.warn(`Invalid number attribute value for "${e}": "${t}". Expected a valid number.`), n;
139
+ }
140
+ function V(e) {
141
+ const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), l = (e.__vccOpts || e).props;
142
+ return l && typeof l == "object" && Object.entries(l).forEach(([u, s]) => {
143
+ s === Boolean || s && s.type === Boolean ? t.add(u) : s === Number || s && s.type === Number ? n.add(u) : (s === Object || s === Array || s && (s.type === Object || s.type === Array)) && o.add(u);
144
+ }), { booleanProps: t, numberProps: n, jsonProps: o };
145
+ }
146
+ function g(e, t) {
147
+ try {
148
+ return JSON.parse(t);
149
+ } catch (n) {
150
+ return console.warn(
151
+ `Invalid JSON attribute value for "${e}": "${t}". Error: ${n instanceof Error ? n.message : String(n)}`
152
+ ), null;
153
+ }
154
+ }
155
+ function W(e) {
156
+ const t = e.__name || e.name;
157
+ if (!t)
158
+ throw new Error("Component must have a __name or name property");
159
+ const n = x(e, q(t)), { booleanProps: o, numberProps: a, jsonProps: l } = V(e);
160
+ class u extends n {
161
+ _hiddenInput = null;
162
+ constructor() {
163
+ super(), this._parseAttributes();
164
+ }
165
+ disconnectedCallback() {
166
+ this._hiddenInput?.remove(), super.disconnectedCallback?.();
167
+ }
168
+ /**
169
+ * Update the hidden input value
170
+ * Call this from the Vue component to sync form value
171
+ */
172
+ setHiddenInputValue(c) {
173
+ this._hiddenInput && (this._hiddenInput.value = c ?? "");
174
+ }
175
+ _parseAttributes() {
176
+ o.forEach((r) => {
177
+ const i = this.getAttribute(r);
178
+ this[r] = J(r, i);
179
+ }), a.forEach((r) => {
180
+ const i = this.getAttribute(r);
181
+ i !== null && (this[r] = U(r, i));
182
+ }), l.forEach((r) => {
183
+ const i = this.getAttribute(r);
184
+ if (i !== null) {
185
+ const p = g(r, i);
186
+ p !== null && (this[r] = p);
187
+ }
188
+ });
189
+ const c = this.getAttribute("data-json-props");
190
+ c && c.split(",").map((i) => i.trim()).filter(Boolean).forEach((i) => {
191
+ const p = i.replace(/-([a-z])/g, (d) => d[1].toUpperCase());
192
+ let m = this.getAttribute(i);
193
+ if (m === null) {
194
+ const d = p.replace(/([A-Z])/g, "-$1").toLowerCase();
195
+ m = this.getAttribute(d);
196
+ }
197
+ if (m !== null && !this[p]) {
198
+ const d = g(p, m);
199
+ d !== null && (this[p] = d);
200
+ }
201
+ });
202
+ }
203
+ connectedCallback() {
204
+ this._parseAttributes(), super.connectedCallback?.(), M(this);
205
+ const c = this.getAttribute("name");
206
+ c && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = c, this.after(this._hiddenInput));
207
+ }
208
+ }
209
+ return u;
210
+ }
211
+ function G(e) {
212
+ return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
213
+ }
214
+ function H(e) {
215
+ const t = e.__name || e.name;
216
+ if (!t)
217
+ throw new Error("Component must have a __name or name property");
218
+ const n = G(t), o = W(e);
219
+ customElements.get(n) || customElements.define(n, o);
220
+ }
221
+ H(D);
@@ -0,0 +1,192 @@
1
+ import { defineComponent as g, ref as C, computed as f, watch as E, createElementBlock as m, openBlock as b, normalizeStyle as P, normalizeClass as _, createElementVNode as w, defineCustomElement as S } from "vue";
2
+ function A(e) {
3
+ return e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
4
+ }
5
+ const $ = /\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;
6
+ function x(e) {
7
+ return Array.from(e.match($) ?? []);
8
+ }
9
+ function j(e) {
10
+ const t = x(e);
11
+ if (t.length === 0)
12
+ return "";
13
+ const [n, ...o] = t;
14
+ return `${n.toLowerCase()}${o.map((a) => A(a)).join("")}`;
15
+ }
16
+ const I = {
17
+ xs: "12px",
18
+ sm: "16px",
19
+ md: "20px",
20
+ lg: "24px",
21
+ xl: "32px",
22
+ "2x": "40px"
23
+ }, O = {
24
+ class: "pv-flex",
25
+ "data-testid": "pv-company-logo"
26
+ }, k = ["src"], L = /* @__PURE__ */ g({
27
+ __name: "PvCompanyLogo",
28
+ props: {
29
+ basePath: { default: "https://static-assets.turquoise.health/shared-logos/prd/payers", type: String },
30
+ name: { type: String },
31
+ size: { default: "md", type: null },
32
+ srcPathOverride: { type: String },
33
+ toCamelCase: { type: Boolean, default: !0 }
34
+ },
35
+ setup(e) {
36
+ const t = e, n = C(!0), o = f(() => I[t.size] || "32px"), a = f(() => ({
37
+ "pv-icon": n.value,
38
+ [`pv-company-${t.size}`]: t.size && !n.value
39
+ })), u = f(() => ({
40
+ width: o.value
41
+ })), l = f(() => t.toCamelCase ? j(t.name) + ".svg" : t.name + ".svg"), r = f(() => t.srcPathOverride ? t.srcPathOverride : `${t.basePath}/${l.value}`);
42
+ return E(r, () => {
43
+ n.value = !0;
44
+ }), (c, s) => (b(), m("div", O, [
45
+ n.value ? (b(), m(
46
+ "div",
47
+ {
48
+ key: 0,
49
+ class: _(a.value),
50
+ style: P(u.value)
51
+ },
52
+ [
53
+ w("img", {
54
+ src: r.value,
55
+ alt: "",
56
+ onError: s[0] || (s[0] = (i) => n.value = !1)
57
+ }, null, 40, k)
58
+ ],
59
+ 6
60
+ /* CLASS, STYLE */
61
+ )) : (b(), m(
62
+ "div",
63
+ {
64
+ key: 1,
65
+ class: _(a.value)
66
+ },
67
+ null,
68
+ 2
69
+ /* CLASS */
70
+ ))
71
+ ]));
72
+ }
73
+ }), N = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
74
+ function z(e) {
75
+ return !N.has(e);
76
+ }
77
+ function v(e, t) {
78
+ const n = document.querySelector('link[href*="' + t + '"]');
79
+ if (!e.shadowRoot)
80
+ return !1;
81
+ if (n && e.shadowRoot) {
82
+ const o = n.href;
83
+ if (e.shadowRoot.querySelector(`link[href="${o}"]`))
84
+ return;
85
+ const a = document.createElement("link");
86
+ return a.rel = "stylesheet", a.href = o, e.shadowRoot.prepend(a), !0;
87
+ }
88
+ return !1;
89
+ }
90
+ function B(e) {
91
+ if (!v(e, "pit-viper-v2")) {
92
+ if (v(e, "pit-viper")) {
93
+ v(e, "pit-viper-v2-scoped");
94
+ return;
95
+ }
96
+ console.warn(
97
+ "No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
98
+ );
99
+ }
100
+ }
101
+ const R = (e) => ({ shadowRoot: z(e) });
102
+ function D(e, t) {
103
+ return t === null ? !1 : t === "" || t === "true" ? !0 : (t === "false" || console.warn(
104
+ `Invalid boolean attribute value for "${e}": "${t}". Expected "true", "false", or empty string.`
105
+ ), !1);
106
+ }
107
+ function M(e, t) {
108
+ const n = Number(t);
109
+ return isNaN(n) && console.warn(`Invalid number attribute value for "${e}": "${t}". Expected a valid number.`), n;
110
+ }
111
+ function T(e) {
112
+ const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), u = (e.__vccOpts || e).props;
113
+ return u && typeof u == "object" && Object.entries(u).forEach(([l, r]) => {
114
+ 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)) && o.add(l);
115
+ }), { booleanProps: t, numberProps: n, jsonProps: o };
116
+ }
117
+ function y(e, t) {
118
+ try {
119
+ return JSON.parse(t);
120
+ } catch (n) {
121
+ return console.warn(
122
+ `Invalid JSON attribute value for "${e}": "${t}". Error: ${n instanceof Error ? n.message : String(n)}`
123
+ ), null;
124
+ }
125
+ }
126
+ function q(e) {
127
+ const t = e.__name || e.name;
128
+ if (!t)
129
+ throw new Error("Component must have a __name or name property");
130
+ const n = S(e, R(t)), { booleanProps: o, numberProps: a, jsonProps: u } = T(e);
131
+ class l extends n {
132
+ _hiddenInput = null;
133
+ constructor() {
134
+ super(), this._parseAttributes();
135
+ }
136
+ disconnectedCallback() {
137
+ this._hiddenInput?.remove(), super.disconnectedCallback?.();
138
+ }
139
+ /**
140
+ * Update the hidden input value
141
+ * Call this from the Vue component to sync form value
142
+ */
143
+ setHiddenInputValue(c) {
144
+ this._hiddenInput && (this._hiddenInput.value = c ?? "");
145
+ }
146
+ _parseAttributes() {
147
+ o.forEach((s) => {
148
+ const i = this.getAttribute(s);
149
+ this[s] = D(s, i);
150
+ }), a.forEach((s) => {
151
+ const i = this.getAttribute(s);
152
+ i !== null && (this[s] = M(s, i));
153
+ }), u.forEach((s) => {
154
+ const i = this.getAttribute(s);
155
+ if (i !== null) {
156
+ const p = y(s, i);
157
+ p !== null && (this[s] = p);
158
+ }
159
+ });
160
+ const c = this.getAttribute("data-json-props");
161
+ c && c.split(",").map((i) => i.trim()).filter(Boolean).forEach((i) => {
162
+ const p = i.replace(/-([a-z])/g, (d) => d[1].toUpperCase());
163
+ let h = this.getAttribute(i);
164
+ if (h === null) {
165
+ const d = p.replace(/([A-Z])/g, "-$1").toLowerCase();
166
+ h = this.getAttribute(d);
167
+ }
168
+ if (h !== null && !this[p]) {
169
+ const d = y(p, h);
170
+ d !== null && (this[p] = d);
171
+ }
172
+ });
173
+ }
174
+ connectedCallback() {
175
+ this._parseAttributes(), super.connectedCallback?.(), B(this);
176
+ const c = this.getAttribute("name");
177
+ c && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = c, this.after(this._hiddenInput));
178
+ }
179
+ }
180
+ return l;
181
+ }
182
+ function J(e) {
183
+ return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
184
+ }
185
+ function U(e) {
186
+ const t = e.__name || e.name;
187
+ if (!t)
188
+ throw new Error("Component must have a __name or name property");
189
+ const n = J(t), o = q(e);
190
+ customElements.get(n) || customElements.define(n, o);
191
+ }
192
+ U(L);
@@ -0,0 +1,274 @@
1
+ import { defineComponent as b, ref as _, computed as p, watch as S, createElementBlock as h, openBlock as f, normalizeStyle as E, normalizeClass as v, createElementVNode as C, getCurrentInstance as w, createVNode as A, createBlock as $, createCommentVNode as z, toDisplayString as I, withModifiers as k, defineCustomElement as x } from "vue";
2
+ function N(e) {
3
+ return e.charAt(0).toUpperCase() + e.slice(1).toLowerCase();
4
+ }
5
+ const O = /\p{Lu}?\p{Ll}+|[0-9]+|\p{Lu}+(?!\p{Ll})|\p{Emoji_Presentation}|\p{Extended_Pictographic}|\p{L}+/gu;
6
+ function L(e) {
7
+ return Array.from(e.match(O) ?? []);
8
+ }
9
+ function j(e) {
10
+ const t = L(e);
11
+ if (t.length === 0)
12
+ return "";
13
+ const [n, ...s] = t;
14
+ return `${n.toLowerCase()}${s.map((r) => N(r)).join("")}`;
15
+ }
16
+ const B = {
17
+ xs: "12px",
18
+ sm: "16px",
19
+ md: "20px",
20
+ lg: "24px",
21
+ xl: "32px",
22
+ "2x": "40px"
23
+ }, T = [void 0, 10, 12, 20, 24, 32, 64], R = {
24
+ class: "pv-flex",
25
+ "data-testid": "pv-company-logo"
26
+ }, D = ["src"], M = /* @__PURE__ */ b({
27
+ __name: "PvCompanyLogo",
28
+ props: {
29
+ basePath: { default: "https://static-assets.turquoise.health/shared-logos/prd/payers", type: String },
30
+ name: { type: String },
31
+ size: { default: "md", type: null },
32
+ srcPathOverride: { type: String },
33
+ toCamelCase: { type: Boolean, default: !0 }
34
+ },
35
+ setup(e) {
36
+ const t = e, n = _(!0), s = p(() => B[t.size] || "32px"), r = p(() => ({
37
+ "pv-icon": n.value,
38
+ [`pv-company-${t.size}`]: t.size && !n.value
39
+ })), c = p(() => ({
40
+ width: s.value
41
+ })), l = p(() => t.toCamelCase ? j(t.name) + ".svg" : t.name + ".svg"), o = p(() => t.srcPathOverride ? t.srcPathOverride : `${t.basePath}/${l.value}`);
42
+ return S(o, () => {
43
+ n.value = !0;
44
+ }), (u, a) => (f(), h("div", R, [
45
+ n.value ? (f(), h(
46
+ "div",
47
+ {
48
+ key: 0,
49
+ class: v(r.value),
50
+ style: E(c.value)
51
+ },
52
+ [
53
+ C("img", {
54
+ src: o.value,
55
+ alt: "",
56
+ onError: a[0] || (a[0] = (i) => n.value = !1)
57
+ }, null, 40, D)
58
+ ],
59
+ 6
60
+ /* CLASS, STYLE */
61
+ )) : (f(), h(
62
+ "div",
63
+ {
64
+ key: 1,
65
+ class: v(r.value)
66
+ },
67
+ null,
68
+ 2
69
+ /* CLASS */
70
+ ))
71
+ ]));
72
+ }
73
+ });
74
+ function V() {
75
+ const e = _(!1), n = w()?.root || {};
76
+ return "isCE" in n && n.isCE === !0 && (e.value = !0), e;
77
+ }
78
+ const W = ["xlink:href"], H = /* @__PURE__ */ b({
79
+ __name: "PvIcon",
80
+ props: {
81
+ name: { type: String },
82
+ size: { type: null }
83
+ },
84
+ setup(e) {
85
+ const t = e, n = V(), s = _(null), r = p(() => ({
86
+ "pv-icon": !0,
87
+ [`pv-icon-${t.size}`]: T.includes(t.size)
88
+ })), c = p(() => n.value && s.value ? `${s.value}#${t.name}` : `#${t.name}`);
89
+ return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (s.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), (l, o) => (f(), h(
90
+ "svg",
91
+ {
92
+ "data-testid": "pv-icon",
93
+ "aria-hidden": "true",
94
+ class: v(r.value)
95
+ },
96
+ [
97
+ C("use", { "xlink:href": c.value }, null, 8, W)
98
+ ],
99
+ 2
100
+ /* CLASS */
101
+ ));
102
+ }
103
+ }), G = /* @__PURE__ */ b({
104
+ __name: "PvCompanyTag",
105
+ props: {
106
+ companyName: { type: String },
107
+ size: { default: "md", type: String },
108
+ showClear: { type: Boolean, default: !1 }
109
+ },
110
+ emits: ["handle-close", "handle-click"],
111
+ setup(e) {
112
+ const t = e, n = p(() => {
113
+ switch (t.size) {
114
+ case "lg":
115
+ return "pv-tag-lg";
116
+ case "sm":
117
+ return "pv-tag-sm";
118
+ default:
119
+ return "";
120
+ }
121
+ });
122
+ return (s, r) => (f(), h(
123
+ "button",
124
+ {
125
+ class: v(["pv-tag-tertiary", n.value]),
126
+ onClick: r[1] || (r[1] = (c) => s.$emit("handle-click", e.companyName)),
127
+ "data-testid": "pv-company-tag"
128
+ },
129
+ [
130
+ A(M, {
131
+ class: v(e.size === "lg" ? "pv-company-sm" : "pv-company-xs"),
132
+ "data-testid": "pv-company-tag-icon",
133
+ size: e.size === "lg" ? "sm" : "xs",
134
+ name: e.companyName
135
+ }, null, 8, ["class", "size", "name"]),
136
+ C(
137
+ "span",
138
+ null,
139
+ I(e.companyName),
140
+ 1
141
+ /* TEXT */
142
+ ),
143
+ e.showClear ? (f(), $(H, {
144
+ key: 0,
145
+ "data-testid": "pv-company-tag-close-icon",
146
+ size: 12,
147
+ name: "close",
148
+ onClick: r[0] || (r[0] = k((c) => s.$emit("handle-close", e.companyName), ["stop"]))
149
+ })) : z("v-if", !0)
150
+ ],
151
+ 2
152
+ /* CLASS */
153
+ ));
154
+ }
155
+ }), q = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
156
+ function J(e) {
157
+ return !q.has(e);
158
+ }
159
+ function y(e, t) {
160
+ const n = document.querySelector('link[href*="' + t + '"]');
161
+ if (!e.shadowRoot)
162
+ return !1;
163
+ if (n && e.shadowRoot) {
164
+ const s = n.href;
165
+ if (e.shadowRoot.querySelector(`link[href="${s}"]`))
166
+ return;
167
+ const r = document.createElement("link");
168
+ return r.rel = "stylesheet", r.href = s, e.shadowRoot.prepend(r), !0;
169
+ }
170
+ return !1;
171
+ }
172
+ function U(e) {
173
+ if (!y(e, "pit-viper-v2")) {
174
+ if (y(e, "pit-viper")) {
175
+ y(e, "pit-viper-v2-scoped");
176
+ return;
177
+ }
178
+ console.warn(
179
+ "No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
180
+ );
181
+ }
182
+ }
183
+ const Z = (e) => ({ shadowRoot: J(e) });
184
+ function K(e, t) {
185
+ return t === null ? !1 : t === "" || t === "true" ? !0 : (t === "false" || console.warn(
186
+ `Invalid boolean attribute value for "${e}": "${t}". Expected "true", "false", or empty string.`
187
+ ), !1);
188
+ }
189
+ function F(e, t) {
190
+ const n = Number(t);
191
+ return isNaN(n) && console.warn(`Invalid number attribute value for "${e}": "${t}". Expected a valid number.`), n;
192
+ }
193
+ function Q(e) {
194
+ const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), c = (e.__vccOpts || e).props;
195
+ return c && typeof c == "object" && Object.entries(c).forEach(([l, o]) => {
196
+ o === Boolean || o && o.type === Boolean ? t.add(l) : o === Number || o && o.type === Number ? n.add(l) : (o === Object || o === Array || o && (o.type === Object || o.type === Array)) && s.add(l);
197
+ }), { booleanProps: t, numberProps: n, jsonProps: s };
198
+ }
199
+ function P(e, t) {
200
+ try {
201
+ return JSON.parse(t);
202
+ } catch (n) {
203
+ return console.warn(
204
+ `Invalid JSON attribute value for "${e}": "${t}". Error: ${n instanceof Error ? n.message : String(n)}`
205
+ ), null;
206
+ }
207
+ }
208
+ function X(e) {
209
+ const t = e.__name || e.name;
210
+ if (!t)
211
+ throw new Error("Component must have a __name or name property");
212
+ const n = x(e, Z(t)), { booleanProps: s, numberProps: r, jsonProps: c } = Q(e);
213
+ class l extends n {
214
+ _hiddenInput = null;
215
+ constructor() {
216
+ super(), this._parseAttributes();
217
+ }
218
+ disconnectedCallback() {
219
+ this._hiddenInput?.remove(), super.disconnectedCallback?.();
220
+ }
221
+ /**
222
+ * Update the hidden input value
223
+ * Call this from the Vue component to sync form value
224
+ */
225
+ setHiddenInputValue(u) {
226
+ this._hiddenInput && (this._hiddenInput.value = u ?? "");
227
+ }
228
+ _parseAttributes() {
229
+ s.forEach((a) => {
230
+ const i = this.getAttribute(a);
231
+ this[a] = K(a, i);
232
+ }), r.forEach((a) => {
233
+ const i = this.getAttribute(a);
234
+ i !== null && (this[a] = F(a, i));
235
+ }), c.forEach((a) => {
236
+ const i = this.getAttribute(a);
237
+ if (i !== null) {
238
+ const d = P(a, i);
239
+ d !== null && (this[a] = d);
240
+ }
241
+ });
242
+ const u = this.getAttribute("data-json-props");
243
+ u && u.split(",").map((i) => i.trim()).filter(Boolean).forEach((i) => {
244
+ const d = i.replace(/-([a-z])/g, (m) => m[1].toUpperCase());
245
+ let g = this.getAttribute(i);
246
+ if (g === null) {
247
+ const m = d.replace(/([A-Z])/g, "-$1").toLowerCase();
248
+ g = this.getAttribute(m);
249
+ }
250
+ if (g !== null && !this[d]) {
251
+ const m = P(d, g);
252
+ m !== null && (this[d] = m);
253
+ }
254
+ });
255
+ }
256
+ connectedCallback() {
257
+ this._parseAttributes(), super.connectedCallback?.(), U(this);
258
+ const u = this.getAttribute("name");
259
+ u && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = u, this.after(this._hiddenInput));
260
+ }
261
+ }
262
+ return l;
263
+ }
264
+ function Y(e) {
265
+ return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
266
+ }
267
+ function ee(e) {
268
+ const t = e.__name || e.name;
269
+ if (!t)
270
+ throw new Error("Component must have a __name or name property");
271
+ const n = Y(t), s = X(e);
272
+ customElements.get(n) || customElements.define(n, s);
273
+ }
274
+ ee(G);