@turquoisehealth/pit-viper 2.122.1-dev.0 → 2.123.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 (38) hide show
  1. package/package.json +1 -1
  2. package/pv-components/dist/stats/vue/base/stats.html +1 -1
  3. package/pv-components/dist/stats/vue/visualizations/stats.html +1 -1
  4. package/pv-components/dist/stats/web/pv-button-stats.html +1 -1
  5. package/pv-components/dist/stats/web/pv-drawer-stats.html +1 -1
  6. package/pv-components/dist/stats/web/pv-expandable-content-stats.html +1 -1
  7. package/pv-components/dist/stats/web/pv-ghost-input-stats.html +1 -1
  8. package/pv-components/dist/stats/web/pv-insight-card-stats.html +1 -1
  9. package/pv-components/dist/stats/web/pv-multi-select-button-stats.html +1 -1
  10. package/pv-components/dist/stats/web/pv-pagination-stats.html +1 -1
  11. package/pv-components/dist/stats/web/pv-popover-v2-stats.html +1 -1
  12. package/pv-components/dist/stats/web/pv-select-button-stats.html +1 -1
  13. package/pv-components/dist/stats/web/pv-toast-stats.html +1 -1
  14. package/pv-components/dist/stats/web/pv-toggle-group-stats.html +1 -1
  15. package/pv-components/dist/stats/web/pv-tooltip-v2-stats.html +1 -1
  16. package/pv-components/dist/vue/base/components/base/PvButton/helpers.d.ts +0 -1
  17. package/pv-components/dist/vue/base/components/base/PvMenu/PvMenuControlPanel.vue.d.ts +0 -6
  18. package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +289 -206
  19. package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/types.d.ts +0 -31
  20. package/pv-components/dist/vue/base/components/base/PvPopoverV2/PvPopoverV2.vue.d.ts +1 -0
  21. package/pv-components/dist/vue/base/components/base/PvPopoverV2/types.d.ts +1 -6
  22. package/pv-components/dist/vue/base/components/base/PvSelectButton/PvSelectButton.vue.d.ts +177 -20
  23. package/pv-components/dist/vue/base/components/base/PvSelectButton/PvSelectButtonTrigger/PvSelectButtonTrigger.vue.d.ts +9 -4
  24. package/pv-components/dist/vue/base/pv-components-base.mjs +2713 -2704
  25. package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +3296 -4299
  26. package/pv-components/dist/web/components/pv-button/pv-button.js +43 -43
  27. package/pv-components/dist/web/components/pv-drawer/pv-drawer.js +159 -159
  28. package/pv-components/dist/web/components/pv-expandable-content/pv-expandable-content.js +87 -87
  29. package/pv-components/dist/web/components/pv-ghost-input/pv-ghost-input.js +76 -76
  30. package/pv-components/dist/web/components/pv-insight-card/pv-insight-card.js +78 -78
  31. package/pv-components/dist/web/components/pv-multi-select-button/pv-multi-select-button.js +2185 -7690
  32. package/pv-components/dist/web/components/pv-pagination/pv-pagination.js +92 -92
  33. package/pv-components/dist/web/components/pv-popover-v2/pv-popover-v2.js +768 -852
  34. package/pv-components/dist/web/components/pv-select-button/pv-select-button.js +2139 -7599
  35. package/pv-components/dist/web/components/pv-toast/pv-toast.js +58 -58
  36. package/pv-components/dist/web/components/pv-toggle-group/pv-toggle-group.js +1638 -1722
  37. package/pv-components/dist/web/components/pv-tooltip-v2/pv-tooltip-v2.js +1481 -1565
  38. package/pv-components/dist/web/pv-components.iife.js +50 -50
@@ -1,7 +1,7 @@
1
1
  import { ref as C, getCurrentInstance as A, defineComponent as b, computed as v, createElementBlock as m, openBlock as c, normalizeClass as g, createElementVNode as w, normalizeStyle as P, createBlock as y, Fragment as k, createCommentVNode as _, toDisplayString as $, createVNode as z, renderSlot as O, defineCustomElement as B } from "vue";
2
2
  function j() {
3
- const e = C(!1), n = A()?.root || {};
4
- return "isCE" in n && n.isCE === !0 && (e.value = !0), e;
3
+ const e = C(!1), t = A()?.root || {};
4
+ return "isCE" in t && t.isCE === !0 && (e.value = !0), e;
5
5
  }
6
6
  const N = [void 0, 10, 12, 20, 24, 32, 64], T = ["xlink:href"], E = /* @__PURE__ */ b({
7
7
  __name: "PvIcon",
@@ -10,10 +10,10 @@ const N = [void 0, 10, 12, 20, 24, 32, 64], T = ["xlink:href"], E = /* @__PURE__
10
10
  size: { type: null }
11
11
  },
12
12
  setup(e) {
13
- const t = e, n = j(), s = C(null), r = v(() => ({
13
+ const n = e, t = j(), s = C(null), r = v(() => ({
14
14
  "pv-icon": !0,
15
- [`pv-icon-${t.size}`]: N.includes(t.size)
16
- })), l = v(() => n.value && s.value ? `${s.value}#${t.name}` : `#${t.name}`);
15
+ [`pv-icon-${n.size}`]: N.includes(n.size)
16
+ })), a = v(() => t.value && s.value ? `${s.value}#${n.name}` : `#${n.name}`);
17
17
  return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (s.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), (u, o) => (c(), m(
18
18
  "svg",
19
19
  {
@@ -22,7 +22,7 @@ const N = [void 0, 10, 12, 20, 24, 32, 64], T = ["xlink:href"], E = /* @__PURE__
22
22
  class: g(r.value)
23
23
  },
24
24
  [
25
- w("use", { "xlink:href": l.value }, null, 8, T)
25
+ w("use", { "xlink:href": a.value }, null, 8, T)
26
26
  ],
27
27
  2
28
28
  /* CLASS */
@@ -35,13 +35,13 @@ const N = [void 0, 10, 12, 20, 24, 32, 64], T = ["xlink:href"], E = /* @__PURE__
35
35
  size: { default: "lg", type: String }
36
36
  },
37
37
  setup(e) {
38
- const t = {
38
+ const n = {
39
39
  xs: "0.75rem",
40
40
  sm: "1rem",
41
41
  md: "1.25rem",
42
42
  lg: "1.5rem",
43
43
  xl: "2rem"
44
- }, n = {
44
+ }, t = {
45
45
  primary: "pv-spinner",
46
46
  dark: "pv-spinner-dark",
47
47
  white: "pv-spinner-light"
@@ -50,22 +50,22 @@ const N = [void 0, 10, 12, 20, 24, 32, 64], T = ["xlink:href"], E = /* @__PURE__
50
50
  "div",
51
51
  {
52
52
  "data-testid": "pv-spinner",
53
- class: g(n[e.variant]),
54
- style: P({ "--size": t[e.size] })
53
+ class: g(t[e.variant]),
54
+ style: P({ "--size": n[e.size] })
55
55
  },
56
56
  null,
57
57
  6
58
58
  /* CLASS, STYLE */
59
59
  ));
60
60
  }
61
- }), M = ["ghost"], x = {
61
+ }), x = {
62
62
  md: "pv-button-small",
63
63
  lg: void 0,
64
64
  xl: "pv-button-large"
65
- }, R = (e) => e == null || !x.hasOwnProperty(e) ? null : x[e] || null, V = ["disabled"], D = {
65
+ }, M = (e) => e == null || !x.hasOwnProperty(e) ? null : x[e] || null, R = ["disabled"], V = {
66
66
  key: 1,
67
67
  "data-testid": "pv-button-label"
68
- }, W = /* @__PURE__ */ b({
68
+ }, D = /* @__PURE__ */ b({
69
69
  __name: "PvButton",
70
70
  props: {
71
71
  variant: { default: "primary", type: String },
@@ -78,15 +78,15 @@ const N = [void 0, 10, 12, 20, 24, 32, 64], T = ["xlink:href"], E = /* @__PURE__
78
78
  inverse: { type: Boolean, default: !1 }
79
79
  },
80
80
  setup(e) {
81
- const t = e, n = v(() => {
82
- const s = [];
83
- t.inverse && M.includes(t.variant) ? s.push(`pv-button-${t.variant}-inverse`) : s.push(`pv-button-${t.variant}`);
84
- const r = R(t.size);
85
- return r && s.push(r), s;
81
+ const n = ["ghost"], t = e, s = v(() => {
82
+ const r = [];
83
+ t.inverse && n.includes(t.variant) ? r.push(`pv-button-${t.variant}-inverse`) : r.push(`pv-button-${t.variant}`);
84
+ const a = M(t.size);
85
+ return a && r.push(a), r;
86
86
  });
87
- return (s, r) => (c(), m("button", {
87
+ return (r, a) => (c(), m("button", {
88
88
  type: "button",
89
- class: g(n.value),
89
+ class: g(s.value),
90
90
  disabled: e.disabled,
91
91
  "data-testid": "pv-button"
92
92
  }, [
@@ -104,7 +104,7 @@ const N = [void 0, 10, 12, 20, 24, 32, 64], T = ["xlink:href"], E = /* @__PURE__
104
104
  }, null, 8, ["name"])) : _("v-if", !0),
105
105
  e.label ? (c(), m(
106
106
  "span",
107
- D,
107
+ V,
108
108
  $(e.label),
109
109
  1
110
110
  /* TEXT */
@@ -118,9 +118,9 @@ const N = [void 0, 10, 12, 20, 24, 32, 64], T = ["xlink:href"], E = /* @__PURE__
118
118
  64
119
119
  /* STABLE_FRAGMENT */
120
120
  ))
121
- ], 10, V));
121
+ ], 10, R));
122
122
  }
123
- }), H = /* @__PURE__ */ b({
123
+ }), W = /* @__PURE__ */ b({
124
124
  __name: "PvExpandableContent",
125
125
  props: {
126
126
  lines: { default: 4, type: Number },
@@ -129,17 +129,17 @@ const N = [void 0, 10, 12, 20, 24, 32, 64], T = ["xlink:href"], E = /* @__PURE__
129
129
  defaultOpen: { type: Boolean, default: !1 }
130
130
  },
131
131
  setup(e) {
132
- const t = {
132
+ const n = {
133
133
  none: "0",
134
134
  xs: "4px",
135
135
  sm: "8px",
136
136
  md: "12px",
137
137
  lg: "16px"
138
- }, n = e, s = C(n.defaultOpen), r = () => {
138
+ }, t = e, s = C(t.defaultOpen), r = () => {
139
139
  s.value = !s.value;
140
- }, l = v(() => ({
141
- "--lines": s.value ? "none" : n.lines,
142
- "max-height": s.value ? "100vh" : `${n.lines * 1.5}em`
140
+ }, a = v(() => ({
141
+ "--lines": s.value ? "none" : t.lines,
142
+ "max-height": s.value ? "100vh" : `${t.lines * 1.5}em`
143
143
  }));
144
144
  return (u, o) => (c(), m(
145
145
  "div",
@@ -150,14 +150,14 @@ const N = [void 0, 10, 12, 20, 24, 32, 64], T = ["xlink:href"], E = /* @__PURE__
150
150
  "pv-surface-accent": e.variant === "ghost"
151
151
  }
152
152
  ]),
153
- style: P({ "--inset-size": t[e.size] })
153
+ style: P({ "--inset-size": n[e.size] })
154
154
  },
155
155
  [
156
156
  w(
157
157
  "p",
158
158
  {
159
159
  class: "pv-line-clamp pv-text-body-md pv-stack-8",
160
- style: P(l.value)
160
+ style: P(a.value)
161
161
  },
162
162
  [
163
163
  O(u.$slots, "default", {}, void 0, !0)
@@ -165,7 +165,7 @@ const N = [void 0, 10, 12, 20, 24, 32, 64], T = ["xlink:href"], E = /* @__PURE__
165
165
  4
166
166
  /* STYLE */
167
167
  ),
168
- z(W, {
168
+ z(D, {
169
169
  label: s.value ? "Show Less" : "Show More",
170
170
  variant: "ghost",
171
171
  size: "md",
@@ -177,21 +177,21 @@ const N = [void 0, 10, 12, 20, 24, 32, 64], T = ["xlink:href"], E = /* @__PURE__
177
177
  /* CLASS, STYLE */
178
178
  ));
179
179
  }
180
- }), G = ".expandable-content[data-v-2f840307]{border-radius:.5rem}.expandable-content .pv-line-clamp[data-v-2f840307]{transition:max-height .3s ease-in-out}", q = (e, t) => {
181
- const n = e.__vccOpts || e;
182
- for (const [s, r] of t)
183
- n[s] = r;
184
- return n;
185
- }, J = /* @__PURE__ */ q(H, [["styles", [G]], ["__scopeId", "data-v-2f840307"]]), U = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
186
- function Z(e) {
187
- return !U.has(e);
180
+ }), H = ".expandable-content[data-v-2f840307]{border-radius:.5rem}.expandable-content .pv-line-clamp[data-v-2f840307]{transition:max-height .3s ease-in-out}", G = (e, n) => {
181
+ const t = e.__vccOpts || e;
182
+ for (const [s, r] of n)
183
+ t[s] = r;
184
+ return t;
185
+ }, q = /* @__PURE__ */ G(W, [["styles", [H]], ["__scopeId", "data-v-2f840307"]]), J = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
186
+ function U(e) {
187
+ return !J.has(e);
188
188
  }
189
- function S(e, t) {
190
- const n = document.querySelector('link[href*="' + t + '"]');
189
+ function S(e, n) {
190
+ const t = document.querySelector('link[href*="' + n + '"]');
191
191
  if (!e.shadowRoot)
192
192
  return !1;
193
- if (n && e.shadowRoot) {
194
- const s = n.href;
193
+ if (t && e.shadowRoot) {
194
+ const s = t.href;
195
195
  if (e.shadowRoot.querySelector(`link[href="${s}"]`))
196
196
  return;
197
197
  const r = document.createElement("link");
@@ -199,7 +199,7 @@ function S(e, t) {
199
199
  }
200
200
  return !1;
201
201
  }
202
- function F(e) {
202
+ function Z(e) {
203
203
  if (!S(e, "pit-viper-v2")) {
204
204
  if (S(e, "pit-viper")) {
205
205
  S(e, "pit-viper-v2-scoped");
@@ -210,37 +210,37 @@ function F(e) {
210
210
  );
211
211
  }
212
212
  }
213
- const K = (e) => ({ shadowRoot: Z(e) });
214
- function Q(e, t) {
215
- return t === null ? !1 : t === "" || t === "true" ? !0 : (t === "false" || console.warn(
216
- `Invalid boolean attribute value for "${e}": "${t}". Expected "true", "false", or empty string.`
213
+ const F = (e) => ({ shadowRoot: U(e) });
214
+ function K(e, n) {
215
+ return n === null ? !1 : n === "" || n === "true" ? !0 : (n === "false" || console.warn(
216
+ `Invalid boolean attribute value for "${e}": "${n}". Expected "true", "false", or empty string.`
217
217
  ), !1);
218
218
  }
219
- function X(e, t) {
220
- const n = Number(t);
221
- return isNaN(n) && console.warn(`Invalid number attribute value for "${e}": "${t}". Expected a valid number.`), n;
219
+ function Q(e, n) {
220
+ const t = Number(n);
221
+ return isNaN(t) && console.warn(`Invalid number attribute value for "${e}": "${n}". Expected a valid number.`), t;
222
222
  }
223
- function Y(e) {
224
- const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), l = (e.__vccOpts || e).props;
225
- return l && typeof l == "object" && Object.entries(l).forEach(([u, o]) => {
226
- o === Boolean || o && o.type === Boolean ? t.add(u) : o === Number || o && o.type === Number ? n.add(u) : (o === Object || o === Array || o && (o.type === Object || o.type === Array)) && s.add(u);
227
- }), { booleanProps: t, numberProps: n, jsonProps: s };
223
+ function X(e) {
224
+ const n = /* @__PURE__ */ new Set(), t = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), a = (e.__vccOpts || e).props;
225
+ return a && typeof a == "object" && Object.entries(a).forEach(([u, o]) => {
226
+ o === Boolean || o && o.type === Boolean ? n.add(u) : o === Number || o && o.type === Number ? t.add(u) : (o === Object || o === Array || o && (o.type === Object || o.type === Array)) && s.add(u);
227
+ }), { booleanProps: n, numberProps: t, jsonProps: s };
228
228
  }
229
- function I(e, t) {
229
+ function I(e, n) {
230
230
  try {
231
- return JSON.parse(t);
232
- } catch (n) {
231
+ return JSON.parse(n);
232
+ } catch (t) {
233
233
  return console.warn(
234
- `Invalid JSON attribute value for "${e}": "${t}". Error: ${n instanceof Error ? n.message : String(n)}`
234
+ `Invalid JSON attribute value for "${e}": "${n}". Error: ${t instanceof Error ? t.message : String(t)}`
235
235
  ), null;
236
236
  }
237
237
  }
238
- function ee(e) {
239
- const t = e.__name || e.name;
240
- if (!t)
238
+ function Y(e) {
239
+ const n = e.__name || e.name;
240
+ if (!n)
241
241
  throw new Error("Component must have a __name or name property");
242
- const n = B(e, K(t)), { booleanProps: s, numberProps: r, jsonProps: l } = Y(e);
243
- class u extends n {
242
+ const t = B(e, F(n)), { booleanProps: s, numberProps: r, jsonProps: a } = X(e);
243
+ class u extends t {
244
244
  _hiddenInput = null;
245
245
  constructor() {
246
246
  super(), this._parseAttributes();
@@ -256,23 +256,23 @@ function ee(e) {
256
256
  this._hiddenInput && (this._hiddenInput.value = p ?? "");
257
257
  }
258
258
  _parseAttributes() {
259
- s.forEach((a) => {
260
- const i = this.getAttribute(a);
261
- this[a] = Q(a, i);
262
- }), r.forEach((a) => {
263
- const i = this.getAttribute(a);
264
- i !== null && (this[a] = X(a, i));
265
- }), l.forEach((a) => {
266
- const i = this.getAttribute(a);
267
- if (i !== null) {
268
- const d = I(a, i);
269
- d !== null && (this[a] = d);
259
+ s.forEach((i) => {
260
+ const l = this.getAttribute(i);
261
+ this[i] = K(i, l);
262
+ }), r.forEach((i) => {
263
+ const l = this.getAttribute(i);
264
+ l !== null && (this[i] = Q(i, l));
265
+ }), a.forEach((i) => {
266
+ const l = this.getAttribute(i);
267
+ if (l !== null) {
268
+ const d = I(i, l);
269
+ d !== null && (this[i] = d);
270
270
  }
271
271
  });
272
272
  const p = this.getAttribute("data-json-props");
273
- p && p.split(",").map((i) => i.trim()).filter(Boolean).forEach((i) => {
274
- const d = i.replace(/-([a-z])/g, (f) => f[1].toUpperCase());
275
- let h = this.getAttribute(i);
273
+ p && p.split(",").map((l) => l.trim()).filter(Boolean).forEach((l) => {
274
+ const d = l.replace(/-([a-z])/g, (f) => f[1].toUpperCase());
275
+ let h = this.getAttribute(l);
276
276
  if (h === null) {
277
277
  const f = d.replace(/([A-Z])/g, "-$1").toLowerCase();
278
278
  h = this.getAttribute(f);
@@ -284,21 +284,21 @@ function ee(e) {
284
284
  });
285
285
  }
286
286
  connectedCallback() {
287
- this._parseAttributes(), super.connectedCallback?.(), F(this);
287
+ this._parseAttributes(), super.connectedCallback?.(), Z(this);
288
288
  const p = this.getAttribute("name");
289
289
  p && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = p, this.after(this._hiddenInput));
290
290
  }
291
291
  }
292
292
  return u;
293
293
  }
294
- function te(e) {
294
+ function ee(e) {
295
295
  return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
296
296
  }
297
- function ne(e) {
298
- const t = e.__name || e.name;
299
- if (!t)
297
+ function te(e) {
298
+ const n = e.__name || e.name;
299
+ if (!n)
300
300
  throw new Error("Component must have a __name or name property");
301
- const n = te(t), s = ee(e);
302
- customElements.get(n) || customElements.define(n, s);
301
+ const t = ee(n), s = Y(e);
302
+ customElements.get(t) || customElements.define(t, s);
303
303
  }
304
- ne(J);
304
+ te(q);