@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
@@ -10,19 +10,19 @@ const M = [void 0, 10, 12, 20, 24, 32, 64], R = ["xlink:href"], k = /* @__PURE__
10
10
  size: { type: null }
11
11
  },
12
12
  setup(t) {
13
- const e = t, n = L(), o = T(null), s = _(() => ({
13
+ const e = t, n = L(), s = T(null), o = _(() => ({
14
14
  "pv-icon": !0,
15
15
  [`pv-icon-${e.size}`]: M.includes(e.size)
16
- })), i = _(() => n.value && o.value ? `${o.value}#${e.name}` : `#${e.name}`);
17
- return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (o.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), (r, l) => (p(), m(
16
+ })), r = _(() => n.value && s.value ? `${s.value}#${e.name}` : `#${e.name}`);
17
+ return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (s.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), (a, l) => (p(), m(
18
18
  "svg",
19
19
  {
20
20
  "data-testid": "pv-icon",
21
21
  "aria-hidden": "true",
22
- class: C(s.value)
22
+ class: C(o.value)
23
23
  },
24
24
  [
25
- S("use", { "xlink:href": i.value }, null, 8, R)
25
+ S("use", { "xlink:href": r.value }, null, 8, R)
26
26
  ],
27
27
  2
28
28
  /* CLASS */
@@ -46,7 +46,7 @@ const M = [void 0, 10, 12, 20, 24, 32, 64], R = ["xlink:href"], k = /* @__PURE__
46
46
  dark: "pv-spinner-dark",
47
47
  white: "pv-spinner-light"
48
48
  };
49
- return (o, s) => (p(), m(
49
+ return (s, o) => (p(), m(
50
50
  "div",
51
51
  {
52
52
  "data-testid": "pv-spinner",
@@ -58,11 +58,11 @@ const M = [void 0, 10, 12, 20, 24, 32, 64], R = ["xlink:href"], k = /* @__PURE__
58
58
  /* CLASS, STYLE */
59
59
  ));
60
60
  }
61
- }), H = ["ghost"], $ = {
61
+ }), $ = {
62
62
  md: "pv-button-small",
63
63
  lg: void 0,
64
64
  xl: "pv-button-large"
65
- }, F = (t) => t == null || !$.hasOwnProperty(t) ? null : $[t] || null, G = ["disabled"], q = {
65
+ }, H = (t) => t == null || !$.hasOwnProperty(t) ? null : $[t] || null, F = ["disabled"], G = {
66
66
  key: 1,
67
67
  "data-testid": "pv-button-label"
68
68
  }, w = /* @__PURE__ */ b({
@@ -78,15 +78,15 @@ const M = [void 0, 10, 12, 20, 24, 32, 64], R = ["xlink:href"], k = /* @__PURE__
78
78
  inverse: { type: Boolean, default: !1 }
79
79
  },
80
80
  setup(t) {
81
- const e = t, n = _(() => {
81
+ const e = ["ghost"], n = t, s = _(() => {
82
82
  const o = [];
83
- e.inverse && H.includes(e.variant) ? o.push(`pv-button-${e.variant}-inverse`) : o.push(`pv-button-${e.variant}`);
84
- const s = F(e.size);
85
- return s && o.push(s), o;
83
+ n.inverse && e.includes(n.variant) ? o.push(`pv-button-${n.variant}-inverse`) : o.push(`pv-button-${n.variant}`);
84
+ const r = H(n.size);
85
+ return r && o.push(r), o;
86
86
  });
87
- return (o, s) => (p(), m("button", {
87
+ return (o, r) => (p(), m("button", {
88
88
  type: "button",
89
- class: C(n.value),
89
+ class: C(s.value),
90
90
  disabled: t.disabled,
91
91
  "data-testid": "pv-button"
92
92
  }, [
@@ -104,7 +104,7 @@ const M = [void 0, 10, 12, 20, 24, 32, 64], R = ["xlink:href"], k = /* @__PURE__
104
104
  }, null, 8, ["name"])) : g("v-if", !0),
105
105
  t.label ? (p(), m(
106
106
  "span",
107
- q,
107
+ G,
108
108
  P(t.label),
109
109
  1
110
110
  /* TEXT */
@@ -118,50 +118,50 @@ const M = [void 0, 10, 12, 20, 24, 32, 64], R = ["xlink:href"], k = /* @__PURE__
118
118
  64
119
119
  /* STABLE_FRAGMENT */
120
120
  ))
121
- ], 10, G));
121
+ ], 10, F));
122
122
  }
123
123
  }), A = {
124
124
  short: 5,
125
125
  long: 7
126
- }, J = ({
126
+ }, q = ({
127
127
  variant: t = "long"
128
128
  } = {}) => ({
129
129
  getPaginations: ({
130
- currentPage: o,
131
- pages: s
130
+ currentPage: s,
131
+ pages: o
132
132
  }) => {
133
- if (s <= A[t])
134
- return Array.from({ length: s }, (d, h) => ({
133
+ if (o <= A[t])
134
+ return Array.from({ length: o }, (d, h) => ({
135
135
  page: h + 1,
136
136
  label: (h + 1).toString()
137
137
  }));
138
- const i = [
138
+ const r = [
139
139
  {
140
140
  page: 1,
141
141
  label: "1"
142
142
  }
143
- ], r = A[t] - 3, l = Math.floor(r / 2);
144
- let u = o - l, a = o + l;
145
- const c = u > 2, f = a < s - 1;
146
- if (u <= 2 && (u = 2, a = u + r - 1), a >= s - 1 && (a = s - 1, u = a - r + 1), c && i.push({
143
+ ], a = A[t] - 3, l = Math.floor(a / 2);
144
+ let u = s - l, i = s + l;
145
+ const c = u > 2, f = i < o - 1;
146
+ if (u <= 2 && (u = 2, i = u + a - 1), i >= o - 1 && (i = o - 1, u = i - a + 1), c && r.push({
147
147
  page: 0,
148
148
  label: "..."
149
149
  }), c && f)
150
- for (let d = u + 1; d <= a - 1; d++)
151
- i.push({ page: d, label: d.toString() });
150
+ for (let d = u + 1; d <= i - 1; d++)
151
+ r.push({ page: d, label: d.toString() });
152
152
  else
153
- for (let d = u; d <= a; d++)
154
- i.push({ page: d, label: d.toString() });
155
- return f && i.push({
153
+ for (let d = u; d <= i; d++)
154
+ r.push({ page: d, label: d.toString() });
155
+ return f && r.push({
156
156
  page: 0,
157
157
  label: "..."
158
- }), s > 1 && i.push({ page: s, label: s.toString() }), i;
158
+ }), o > 1 && r.push({ page: o, label: o.toString() }), r;
159
159
  }
160
- }), U = ["data-style"], Z = ["data-testid", "aria-current"], K = {
160
+ }), J = ["data-style"], U = ["data-testid", "aria-current"], Z = {
161
161
  key: 0,
162
162
  class: "dots-button",
163
163
  disabled: ""
164
- }, Q = ["onClick"], X = /* @__PURE__ */ b({
164
+ }, K = ["onClick"], Q = /* @__PURE__ */ b({
165
165
  __name: "PvPagination",
166
166
  props: /* @__PURE__ */ x({
167
167
  size: { default: "lg", type: String },
@@ -174,10 +174,10 @@ const M = [void 0, 10, 12, 20, 24, 32, 64], R = ["xlink:href"], k = /* @__PURE__
174
174
  }),
175
175
  emits: ["update:modelValue"],
176
176
  setup(t) {
177
- const e = t, { getPaginations: n } = J({
177
+ const e = t, { getPaginations: n } = q({
178
178
  variant: e.variant
179
- }), o = B(t, "modelValue");
180
- return (s, i) => (p(), m("ol", {
179
+ }), s = B(t, "modelValue");
180
+ return (o, r) => (p(), m("ol", {
181
181
  role: "list",
182
182
  class: "pv-pagination",
183
183
  "data-testid": "pv-pagination",
@@ -186,71 +186,71 @@ const M = [void 0, 10, 12, 20, 24, 32, 64], R = ["xlink:href"], k = /* @__PURE__
186
186
  S("li", null, [
187
187
  I(w, {
188
188
  "data-testid": "pagination-left-arrow-icon",
189
- disabled: o.value === 1,
189
+ disabled: s.value === 1,
190
190
  "left-icon": "chevron-left",
191
191
  variant: "ghost",
192
- onClick: i[0] || (i[0] = (r) => s.$emit("update:modelValue", o.value - 1))
192
+ onClick: r[0] || (r[0] = (a) => o.$emit("update:modelValue", s.value - 1))
193
193
  }, null, 8, ["disabled"])
194
194
  ]),
195
195
  (p(!0), m(
196
196
  O,
197
197
  null,
198
198
  j(V(n)({
199
- currentPage: o.value,
199
+ currentPage: s.value,
200
200
  pages: t.maxPages
201
- }), (r) => (p(), m("li", {
202
- key: r.page,
203
- "data-testid": `pagination-button-${r.page}`,
204
- "aria-current": r.page === o.value ? "page" : void 0
201
+ }), (a) => (p(), m("li", {
202
+ key: a.page,
203
+ "data-testid": `pagination-button-${a.page}`,
204
+ "aria-current": a.page === s.value ? "page" : void 0
205
205
  }, [
206
- r.label === "..." ? (p(), m(
206
+ a.label === "..." ? (p(), m(
207
207
  "button",
208
- K,
209
- P(r.label),
208
+ Z,
209
+ P(a.label),
210
210
  1
211
211
  /* TEXT */
212
212
  )) : (p(), m("button", {
213
213
  key: 1,
214
- onClick: (l) => s.$emit("update:modelValue", r.page)
215
- }, P(r.label), 9, Q))
216
- ], 8, Z))),
214
+ onClick: (l) => o.$emit("update:modelValue", a.page)
215
+ }, P(a.label), 9, K))
216
+ ], 8, U))),
217
217
  128
218
218
  /* KEYED_FRAGMENT */
219
219
  )),
220
220
  S("li", null, [
221
221
  I(w, {
222
222
  "data-testid": "pagination-right-arrow-icon",
223
- disabled: o.value === t.maxPages,
223
+ disabled: s.value === t.maxPages,
224
224
  "left-icon": "chevron-right",
225
225
  variant: "ghost",
226
- onClick: i[1] || (i[1] = (r) => s.$emit("update:modelValue", o.value + 1))
226
+ onClick: r[1] || (r[1] = (a) => o.$emit("update:modelValue", s.value + 1))
227
227
  }, null, 8, ["disabled"])
228
228
  ])
229
- ], 8, U));
229
+ ], 8, J));
230
230
  }
231
- }), Y = ".dots-button[data-v-e63422b9]{background-color:transparent;color:#4b595c}", tt = (t, e) => {
231
+ }), X = ".dots-button[data-v-e63422b9]{background-color:transparent;color:#4b595c}", Y = (t, e) => {
232
232
  const n = t.__vccOpts || t;
233
- for (const [o, s] of e)
234
- n[o] = s;
233
+ for (const [s, o] of e)
234
+ n[s] = o;
235
235
  return n;
236
- }, et = /* @__PURE__ */ tt(X, [["styles", [Y]], ["__scopeId", "data-v-e63422b9"]]), nt = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
237
- function ot(t) {
238
- return !nt.has(t);
236
+ }, tt = /* @__PURE__ */ Y(Q, [["styles", [X]], ["__scopeId", "data-v-e63422b9"]]), et = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
237
+ function nt(t) {
238
+ return !et.has(t);
239
239
  }
240
240
  function y(t, e) {
241
241
  const n = document.querySelector('link[href*="' + e + '"]');
242
242
  if (!t.shadowRoot)
243
243
  return !1;
244
244
  if (n && t.shadowRoot) {
245
- const o = n.href;
246
- if (t.shadowRoot.querySelector(`link[href="${o}"]`))
245
+ const s = n.href;
246
+ if (t.shadowRoot.querySelector(`link[href="${s}"]`))
247
247
  return;
248
- const s = document.createElement("link");
249
- return s.rel = "stylesheet", s.href = o, t.shadowRoot.prepend(s), !0;
248
+ const o = document.createElement("link");
249
+ return o.rel = "stylesheet", o.href = s, t.shadowRoot.prepend(o), !0;
250
250
  }
251
251
  return !1;
252
252
  }
253
- function st(t) {
253
+ function ot(t) {
254
254
  if (!y(t, "pit-viper-v2")) {
255
255
  if (y(t, "pit-viper")) {
256
256
  y(t, "pit-viper-v2-scoped");
@@ -261,21 +261,21 @@ function st(t) {
261
261
  );
262
262
  }
263
263
  }
264
- const rt = (t) => ({ shadowRoot: ot(t) });
265
- function at(t, e) {
264
+ const st = (t) => ({ shadowRoot: nt(t) });
265
+ function rt(t, e) {
266
266
  return e === null ? !1 : e === "" || e === "true" ? !0 : (e === "false" || console.warn(
267
267
  `Invalid boolean attribute value for "${t}": "${e}". Expected "true", "false", or empty string.`
268
268
  ), !1);
269
269
  }
270
- function it(t, e) {
270
+ function at(t, e) {
271
271
  const n = Number(e);
272
272
  return isNaN(n) && console.warn(`Invalid number attribute value for "${t}": "${e}". Expected a valid number.`), n;
273
273
  }
274
- function lt(t) {
275
- const e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), i = (t.__vccOpts || t).props;
276
- return i && typeof i == "object" && Object.entries(i).forEach(([r, l]) => {
277
- l === Boolean || l && l.type === Boolean ? e.add(r) : l === Number || l && l.type === Number ? n.add(r) : (l === Object || l === Array || l && (l.type === Object || l.type === Array)) && o.add(r);
278
- }), { booleanProps: e, numberProps: n, jsonProps: o };
274
+ function it(t) {
275
+ const e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), r = (t.__vccOpts || t).props;
276
+ return r && typeof r == "object" && Object.entries(r).forEach(([a, l]) => {
277
+ l === Boolean || l && l.type === Boolean ? e.add(a) : l === Number || l && l.type === Number ? n.add(a) : (l === Object || l === Array || l && (l.type === Object || l.type === Array)) && s.add(a);
278
+ }), { booleanProps: e, numberProps: n, jsonProps: s };
279
279
  }
280
280
  function E(t, e) {
281
281
  try {
@@ -286,12 +286,12 @@ function E(t, e) {
286
286
  ), null;
287
287
  }
288
288
  }
289
- function ut(t) {
289
+ function lt(t) {
290
290
  const e = t.__name || t.name;
291
291
  if (!e)
292
292
  throw new Error("Component must have a __name or name property");
293
- const n = D(t, rt(e)), { booleanProps: o, numberProps: s, jsonProps: i } = lt(t);
294
- class r extends n {
293
+ const n = D(t, st(e)), { booleanProps: s, numberProps: o, jsonProps: r } = it(t);
294
+ class a extends n {
295
295
  _hiddenInput = null;
296
296
  constructor() {
297
297
  super(), this._parseAttributes();
@@ -307,17 +307,17 @@ function ut(t) {
307
307
  this._hiddenInput && (this._hiddenInput.value = u ?? "");
308
308
  }
309
309
  _parseAttributes() {
310
- o.forEach((a) => {
311
- const c = this.getAttribute(a);
312
- this[a] = at(a, c);
313
- }), s.forEach((a) => {
314
- const c = this.getAttribute(a);
315
- c !== null && (this[a] = it(a, c));
316
- }), i.forEach((a) => {
317
- const c = this.getAttribute(a);
310
+ s.forEach((i) => {
311
+ const c = this.getAttribute(i);
312
+ this[i] = rt(i, c);
313
+ }), o.forEach((i) => {
314
+ const c = this.getAttribute(i);
315
+ c !== null && (this[i] = at(i, c));
316
+ }), r.forEach((i) => {
317
+ const c = this.getAttribute(i);
318
318
  if (c !== null) {
319
- const f = E(a, c);
320
- f !== null && (this[a] = f);
319
+ const f = E(i, c);
320
+ f !== null && (this[i] = f);
321
321
  }
322
322
  });
323
323
  const u = this.getAttribute("data-json-props");
@@ -335,21 +335,21 @@ function ut(t) {
335
335
  });
336
336
  }
337
337
  connectedCallback() {
338
- this._parseAttributes(), super.connectedCallback?.(), st(this);
338
+ this._parseAttributes(), super.connectedCallback?.(), ot(this);
339
339
  const u = this.getAttribute("name");
340
340
  u && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = u, this.after(this._hiddenInput));
341
341
  }
342
342
  }
343
- return r;
343
+ return a;
344
344
  }
345
- function ct(t) {
345
+ function ut(t) {
346
346
  return t.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
347
347
  }
348
- function dt(t) {
348
+ function ct(t) {
349
349
  const e = t.__name || t.name;
350
350
  if (!e)
351
351
  throw new Error("Component must have a __name or name property");
352
- const n = ct(e), o = ut(t);
353
- customElements.get(n) || customElements.define(n, o);
352
+ const n = ut(e), s = lt(t);
353
+ customElements.get(n) || customElements.define(n, s);
354
354
  }
355
- dt(et);
355
+ ct(tt);