@turquoisehealth/pit-viper 2.104.1 → 2.104.2-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 (128) hide show
  1. package/_site/assets/css/pit-viper-v2-scoped.css +19 -0
  2. package/_site/assets/css/pit-viper-v2.css +21 -0
  3. package/_site/assets/css/pit-viper.css +21 -0
  4. package/package.json +38 -11
  5. package/pv-components/dist/stats/vue/base/stats.html +4949 -0
  6. package/pv-components/dist/stats/vue/visualizations/stats.html +4949 -0
  7. package/pv-components/dist/stats/web/pv-accordion-stats.html +4949 -0
  8. package/pv-components/dist/stats/web/pv-action-bar-stats.html +4949 -0
  9. package/pv-components/dist/stats/web/pv-avatar-group-stats.html +4949 -0
  10. package/pv-components/dist/stats/web/pv-avatar-stats.html +4949 -0
  11. package/pv-components/dist/stats/web/pv-banner-stats.html +4949 -0
  12. package/pv-components/dist/stats/web/pv-breadcrumbs-stats.html +4949 -0
  13. package/pv-components/dist/stats/web/pv-button-stats.html +4949 -0
  14. package/pv-components/dist/stats/web/pv-card-stats.html +4949 -0
  15. package/pv-components/dist/stats/web/pv-checkbox-stats.html +4949 -0
  16. package/pv-components/dist/stats/web/pv-company-label-stats.html +4949 -0
  17. package/pv-components/dist/stats/web/pv-company-logo-stats.html +4949 -0
  18. package/pv-components/dist/stats/web/pv-company-tag-stats.html +4949 -0
  19. package/pv-components/dist/stats/web/pv-counter-badge-stats.html +4949 -0
  20. package/pv-components/dist/stats/web/pv-date-picker-stats.html +4949 -0
  21. package/pv-components/dist/stats/web/pv-date-time-stats.html +4949 -0
  22. package/pv-components/dist/stats/web/pv-drawer-stats.html +4949 -0
  23. package/pv-components/dist/stats/web/pv-dropdown-stats.html +4949 -0
  24. package/pv-components/dist/stats/web/pv-expandable-content-stats.html +4949 -0
  25. package/pv-components/dist/stats/web/pv-ghost-input-stats.html +4949 -0
  26. package/pv-components/dist/stats/web/pv-icon-stats.html +4949 -0
  27. package/pv-components/dist/stats/web/pv-input-stats.html +4949 -0
  28. package/pv-components/dist/stats/web/pv-insight-card-stats.html +4949 -0
  29. package/pv-components/dist/stats/web/pv-modal-stats.html +4949 -0
  30. package/pv-components/dist/stats/web/pv-multi-select-button-stats.html +4949 -0
  31. package/pv-components/dist/stats/web/pv-pagination-stats.html +4949 -0
  32. package/pv-components/dist/stats/web/pv-pill-stats.html +4949 -0
  33. package/pv-components/dist/stats/web/pv-popover-menu-stats.html +4949 -0
  34. package/pv-components/dist/stats/web/pv-popover-stats.html +4949 -0
  35. package/pv-components/dist/stats/web/pv-popover-v2-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-widget-stats.html +4949 -0
  58. package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +3 -4
  59. package/pv-components/dist/vue/base/components/base/PvSelectButton/PvSelectButton.vue.d.ts +1 -1
  60. package/pv-components/dist/vue/base/components/base/PvTooltipV2/PvTooltipV2.vue.d.ts +1 -0
  61. package/pv-components/dist/vue/base/components/base/PvTooltipV2/types.d.ts +2 -1
  62. package/pv-components/dist/vue/base/pv-components-base.mjs +3429 -5665
  63. package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +3428 -5941
  64. package/pv-components/dist/web/components/pv-accordion/pv-accordion.js +186 -0
  65. package/pv-components/dist/web/components/pv-action-bar/pv-action-bar.js +66 -0
  66. package/pv-components/dist/web/components/pv-avatar/pv-avatar.js +96 -0
  67. package/pv-components/dist/web/components/pv-avatar-group/pv-avatar-group.js +102 -0
  68. package/pv-components/dist/web/components/pv-banner/pv-banner.js +155 -0
  69. package/pv-components/dist/web/components/pv-breadcrumbs/pv-breadcrumbs.js +92 -0
  70. package/pv-components/dist/web/components/pv-button/pv-button.js +173 -0
  71. package/pv-components/dist/web/components/pv-card/pv-card.js +80 -0
  72. package/pv-components/dist/web/components/pv-checkbox/pv-checkbox.js +77 -0
  73. package/pv-components/dist/web/components/pv-company-label/pv-company-label.js +153 -0
  74. package/pv-components/dist/web/components/pv-company-logo/pv-company-logo.js +124 -0
  75. package/pv-components/dist/web/components/pv-company-tag/pv-company-tag.js +204 -0
  76. package/pv-components/dist/web/components/pv-counter-badge/pv-counter-badge.js +89 -0
  77. package/pv-components/dist/web/components/pv-date-picker/pv-date-picker.js +7481 -0
  78. package/pv-components/dist/web/components/pv-date-time/pv-date-time.js +577 -0
  79. package/pv-components/dist/web/components/pv-drawer/pv-drawer.js +486 -0
  80. package/pv-components/dist/web/components/pv-dropdown/pv-dropdown.js +1724 -0
  81. package/pv-components/dist/web/components/pv-expandable-content/pv-expandable-content.js +235 -0
  82. package/pv-components/dist/web/components/pv-ghost-input/pv-ghost-input.js +251 -0
  83. package/pv-components/dist/web/components/pv-icon/pv-icon.js +81 -0
  84. package/pv-components/dist/web/components/pv-input/pv-input.js +123 -0
  85. package/pv-components/dist/web/components/pv-insight-card/pv-insight-card.js +293 -0
  86. package/pv-components/dist/web/components/pv-modal/pv-modal.js +118 -0
  87. package/pv-components/dist/web/components/pv-multi-select-button/pv-multi-select-button.js +2752 -0
  88. package/pv-components/dist/web/components/pv-pagination/pv-pagination.js +286 -0
  89. package/pv-components/dist/web/components/pv-pill/pv-pill.js +160 -0
  90. package/pv-components/dist/web/components/pv-popover/pv-popover.js +1417 -0
  91. package/pv-components/dist/web/components/pv-popover-menu/pv-popover-menu.js +1439 -0
  92. package/pv-components/dist/web/components/pv-popover-v2/pv-popover-v2.js +1421 -0
  93. package/pv-components/dist/web/components/pv-rating/pv-rating.js +78 -0
  94. package/pv-components/dist/web/components/pv-release-badge/pv-release-badge.js +74 -0
  95. package/pv-components/dist/web/components/pv-search-input/pv-search-input.js +170 -0
  96. package/pv-components/dist/web/components/pv-segmented-control/pv-segmented-control.js +145 -0
  97. package/pv-components/dist/web/components/pv-select-button/pv-select-button.js +2563 -0
  98. package/pv-components/dist/web/components/pv-selectable-card/pv-selectable-card.js +85 -0
  99. package/pv-components/dist/web/components/pv-side-panel/pv-side-panel.js +80 -0
  100. package/pv-components/dist/web/components/pv-skeleton/pv-skeleton.js +1525 -0
  101. package/pv-components/dist/web/components/pv-spinner/pv-spinner.js +83 -0
  102. package/pv-components/dist/web/components/pv-sprite/pv-sprite.js +82 -0
  103. package/pv-components/dist/web/components/pv-suggestion-tag/pv-suggestion-tag.js +126 -0
  104. package/pv-components/dist/web/components/pv-switch/pv-switch.js +94 -0
  105. package/pv-components/dist/web/components/pv-tab-list/pv-tab-list.js +100 -0
  106. package/pv-components/dist/web/components/pv-tabs/pv-tabs.js +178 -0
  107. package/pv-components/dist/web/components/pv-tag/pv-tag.js +141 -0
  108. package/pv-components/dist/web/components/pv-text-area/pv-text-area.js +120 -0
  109. package/pv-components/dist/web/components/pv-toast/pv-toast.js +223 -0
  110. package/pv-components/dist/web/components/pv-toggle-button/pv-toggle-button.js +139 -0
  111. package/pv-components/dist/web/components/pv-toggle-group/pv-toggle-group.js +2887 -0
  112. package/pv-components/dist/web/components/pv-tooltip/pv-tooltip.js +90 -0
  113. package/pv-components/dist/web/components/pv-tooltip-v2/pv-tooltip-v2.js +1489 -0
  114. package/pv-components/dist/web/components/pv-widget/pv-widget.js +91 -0
  115. package/pv-components/dist/web/pv-components.iife.js +21 -21
  116. package/pv-components/dist/web/vue.runtime.esm-browser.prod.js +7 -0
  117. package/pv-components/dist/vue/base/pv-components-base.js +0 -1546
  118. package/pv-components/dist/vue/base/pv-components-base.umd.js +0 -1546
  119. package/pv-components/dist/vue/charts/pv-components-charts.d.ts +0 -491
  120. package/pv-components/dist/vue/charts/pv-components-charts.js +0 -259
  121. package/pv-components/dist/vue/charts/pv-components-charts.mjs +0 -121834
  122. package/pv-components/dist/vue/charts/pv-components-charts.umd.js +0 -259
  123. package/pv-components/dist/vue/tables/pv-components-tables.d.ts +0 -299
  124. package/pv-components/dist/vue/tables/pv-components-tables.js +0 -223
  125. package/pv-components/dist/vue/tables/pv-components-tables.mjs +0 -47028
  126. package/pv-components/dist/vue/tables/pv-components-tables.umd.js +0 -223
  127. package/pv-components/dist/vue/visualizations/pv-components-visualizations.js +0 -176
  128. package/pv-components/dist/vue/visualizations/pv-components-visualizations.umd.js +0 -176
@@ -0,0 +1,78 @@
1
+ import { defineComponent as s, computed as i, createElementBlock as c, openBlock as l, normalizeStyle as u, createElementVNode as m, defineCustomElement as p } from "vue";
2
+ const d = ["data-rating"], f = ["value"], h = /* @__PURE__ */ s({
3
+ __name: "PvRating",
4
+ props: {
5
+ variant: { default: "dot", type: null },
6
+ value: { type: Number },
7
+ size: { default: 20, type: null }
8
+ },
9
+ setup(e) {
10
+ const t = e, n = i(() => t.variant === "dot" ? "dot" : void 0);
11
+ return (o, r) => (l(), c("div", {
12
+ class: "pv-rating",
13
+ "data-testid": "pv-rating",
14
+ style: u({
15
+ "--height": `${e.size}px`
16
+ }),
17
+ "data-rating": n.value
18
+ }, [
19
+ m("meter", {
20
+ id: "rating",
21
+ min: "0",
22
+ max: "5",
23
+ value: e.value
24
+ }, "4.0 stars", 8, f)
25
+ ], 12, d));
26
+ }
27
+ }), v = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
28
+ function _(e) {
29
+ return !v.has(e);
30
+ }
31
+ function a(e, t) {
32
+ const n = document.querySelector('link[href*="' + t + '"]');
33
+ if (!e.shadowRoot)
34
+ return !1;
35
+ if (n && e.shadowRoot) {
36
+ const o = n.href;
37
+ if (e.shadowRoot.querySelector(`link[href="${o}"]`))
38
+ return;
39
+ const r = document.createElement("link");
40
+ return r.rel = "stylesheet", r.href = o, e.shadowRoot.prepend(r), !0;
41
+ }
42
+ return !1;
43
+ }
44
+ function y(e) {
45
+ if (!a(e, "pit-viper-v2")) {
46
+ if (a(e, "pit-viper")) {
47
+ a(e, "pit-viper-v2-scoped");
48
+ return;
49
+ }
50
+ console.warn(
51
+ "No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
52
+ );
53
+ }
54
+ }
55
+ const g = (e) => ({ shadowRoot: _(e) });
56
+ function E(e) {
57
+ const t = e.__name || e.name;
58
+ if (!t)
59
+ throw new Error("Component must have a __name or name property");
60
+ const n = p(e, g(t));
61
+ class o extends n {
62
+ connectedCallback() {
63
+ super.connectedCallback?.(), y(this);
64
+ }
65
+ }
66
+ return o;
67
+ }
68
+ function w(e) {
69
+ return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
70
+ }
71
+ function C(e) {
72
+ const t = e.__name || e.name;
73
+ if (!t)
74
+ throw new Error("Component must have a __name or name property");
75
+ const n = w(t), o = E(e);
76
+ customElements.get(n) || customElements.define(n, o);
77
+ }
78
+ C(h);
@@ -0,0 +1,74 @@
1
+ import { defineComponent as i, computed as a, createElementBlock as l, openBlock as c, normalizeClass as u, toDisplayString as p, defineCustomElement as m } from "vue";
2
+ const f = /* @__PURE__ */ i({
3
+ __name: "PvReleaseBadge",
4
+ props: {
5
+ variant: { type: String },
6
+ inverse: { type: Boolean }
7
+ },
8
+ setup(e) {
9
+ const t = e, n = a(() => t.variant == "release-alpha" ? "ALPHA" : t.variant == "release-beta" ? "BETA" : ""), r = a(() => t.inverse ? "pv-tag-inverse" : {
10
+ "pv-tag-yellow": t.variant == "release-alpha",
11
+ "pv-tag-purple": t.variant == "release-beta"
12
+ });
13
+ return (o, E) => (c(), l(
14
+ "div",
15
+ {
16
+ class: u(r.value)
17
+ },
18
+ p(n.value),
19
+ 3
20
+ /* TEXT, CLASS */
21
+ ));
22
+ }
23
+ }), v = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
24
+ function h(e) {
25
+ return !v.has(e);
26
+ }
27
+ function s(e, t) {
28
+ const n = document.querySelector('link[href*="' + t + '"]');
29
+ if (!e.shadowRoot)
30
+ return !1;
31
+ if (n && e.shadowRoot) {
32
+ const r = n.href;
33
+ if (e.shadowRoot.querySelector(`link[href="${r}"]`))
34
+ return;
35
+ const o = document.createElement("link");
36
+ return o.rel = "stylesheet", o.href = r, e.shadowRoot.prepend(o), !0;
37
+ }
38
+ return !1;
39
+ }
40
+ function d(e) {
41
+ if (!s(e, "pit-viper-v2")) {
42
+ if (s(e, "pit-viper")) {
43
+ s(e, "pit-viper-v2-scoped");
44
+ return;
45
+ }
46
+ console.warn(
47
+ "No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
48
+ );
49
+ }
50
+ }
51
+ const _ = (e) => ({ shadowRoot: h(e) });
52
+ function y(e) {
53
+ const t = e.__name || e.name;
54
+ if (!t)
55
+ throw new Error("Component must have a __name or name property");
56
+ const n = m(e, _(t));
57
+ class r extends n {
58
+ connectedCallback() {
59
+ super.connectedCallback?.(), d(this);
60
+ }
61
+ }
62
+ return r;
63
+ }
64
+ function w(e) {
65
+ return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
66
+ }
67
+ function C(e) {
68
+ const t = e.__name || e.name;
69
+ if (!t)
70
+ throw new Error("Component must have a __name or name property");
71
+ const n = w(t), r = y(e);
72
+ customElements.get(n) || customElements.define(n, r);
73
+ }
74
+ C(f);
@@ -0,0 +1,170 @@
1
+ import { watch as k, getCurrentScope as M, onScopeDispose as T, computed as y, toValue as d, unref as D, defineComponent as g, mergeModels as A, useTemplateRef as O, useModel as P, onMounted as V, createElementBlock as m, openBlock as h, withDirectives as j, createCommentVNode as I, createElementVNode as L, normalizeClass as N, vModelText as R, toDisplayString as W, defineCustomElement as _ } from "vue";
2
+ function x(e) {
3
+ return M() ? (T(e), !0) : !1;
4
+ }
5
+ const B = typeof window < "u" && typeof document < "u";
6
+ typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
7
+ const G = Object.prototype.toString, H = (e) => G.call(e) === "[object Object]";
8
+ function p(e) {
9
+ return Array.isArray(e) ? e : [e];
10
+ }
11
+ function q(e, t, n) {
12
+ return k(
13
+ e,
14
+ t,
15
+ {
16
+ ...n,
17
+ immediate: !0
18
+ }
19
+ );
20
+ }
21
+ const S = B ? window : void 0;
22
+ function K(e) {
23
+ var t;
24
+ const n = d(e);
25
+ return (t = n?.$el) != null ? t : n;
26
+ }
27
+ function U(...e) {
28
+ const t = [], n = () => {
29
+ t.forEach((o) => o()), t.length = 0;
30
+ }, l = (o, r, u, i) => (o.addEventListener(r, u, i), () => o.removeEventListener(r, u, i)), s = y(() => {
31
+ const o = p(d(e[0])).filter((r) => r != null);
32
+ return o.every((r) => typeof r != "string") ? o : void 0;
33
+ }), a = q(
34
+ () => {
35
+ var o, r;
36
+ return [
37
+ (r = (o = s.value) == null ? void 0 : o.map((u) => K(u))) != null ? r : [S].filter((u) => u != null),
38
+ p(d(s.value ? e[1] : e[0])),
39
+ p(D(s.value ? e[2] : e[1])),
40
+ // @ts-expect-error - TypeScript gets the correct types, but somehow still complains
41
+ d(s.value ? e[3] : e[2])
42
+ ];
43
+ },
44
+ ([o, r, u, i]) => {
45
+ if (n(), !o?.length || !r?.length || !u?.length)
46
+ return;
47
+ const b = H(i) ? { ...i } : i;
48
+ t.push(
49
+ ...o.flatMap(
50
+ (E) => r.flatMap(
51
+ (C) => u.map((w) => l(E, C, w, b))
52
+ )
53
+ )
54
+ );
55
+ },
56
+ { flush: "post" }
57
+ ), c = () => {
58
+ a(), n();
59
+ };
60
+ return x(n), c;
61
+ }
62
+ function $(e) {
63
+ return typeof e == "function" ? e : typeof e == "string" ? (t) => t.key === e : Array.isArray(e) ? (t) => e.includes(t.key) : () => !0;
64
+ }
65
+ function z(...e) {
66
+ let t, n, l = {};
67
+ e.length === 3 ? (t = e[0], n = e[1], l = e[2]) : e.length === 2 ? typeof e[1] == "object" ? (t = !0, n = e[0], l = e[1]) : (t = e[0], n = e[1]) : (t = !0, n = e[0]);
68
+ const {
69
+ target: s = S,
70
+ eventName: a = "keydown",
71
+ passive: c = !1,
72
+ dedupe: o = !1
73
+ } = l, r = $(t);
74
+ return U(s, a, (i) => {
75
+ i.repeat && d(o) || r(i) && n(i);
76
+ }, c);
77
+ }
78
+ const Z = { class: "pv-relative" }, J = ["disabled", "placeholder"], Q = {
79
+ key: 0,
80
+ "data-testid": "pv-search-input-shortcut",
81
+ class: "pv-kbd"
82
+ }, v = "/", X = /* @__PURE__ */ g({
83
+ __name: "PvSearchInput",
84
+ props: /* @__PURE__ */ A({
85
+ placeholder: { default: "Search", type: String },
86
+ disabled: { type: Boolean, default: !1 },
87
+ displayShortcut: { type: Boolean }
88
+ }, {
89
+ modelValue: { required: !1, default: "" },
90
+ modelModifiers: {}
91
+ }),
92
+ emits: ["update:modelValue"],
93
+ setup(e, { expose: t }) {
94
+ const n = e, l = O("search-input"), s = P(e, "modelValue"), a = y(() => ({
95
+ "pv-input-search": !0,
96
+ "pv-full-width": !0,
97
+ "pv-input-padded-end": !0
98
+ }));
99
+ return V(() => {
100
+ n.displayShortcut && z(v, (c) => {
101
+ const o = c.target, r = o instanceof HTMLInputElement || o instanceof HTMLTextAreaElement || (o?.isContentEditable ?? !1), u = document.activeElement === l.value;
102
+ (!r || u) && (u || (c.preventDefault(), l.value?.focus()));
103
+ });
104
+ }), t({ input: l }), (c, o) => (h(), m("div", Z, [
105
+ j(L("input", {
106
+ ref: "search-input",
107
+ "onUpdate:modelValue": o[0] || (o[0] = (r) => s.value = r),
108
+ "data-testid": "pv-search-input",
109
+ type: "text",
110
+ disabled: e.disabled,
111
+ class: N(a.value),
112
+ placeholder: e.placeholder
113
+ }, null, 10, J), [
114
+ [R, s.value]
115
+ ]),
116
+ e.displayShortcut ? (h(), m("kbd", Q, W(v))) : I("v-if", !0)
117
+ ]));
118
+ }
119
+ }), Y = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
120
+ function F(e) {
121
+ return !Y.has(e);
122
+ }
123
+ function f(e, t) {
124
+ const n = document.querySelector('link[href*="' + t + '"]');
125
+ if (!e.shadowRoot)
126
+ return !1;
127
+ if (n && e.shadowRoot) {
128
+ const l = n.href;
129
+ if (e.shadowRoot.querySelector(`link[href="${l}"]`))
130
+ return;
131
+ const s = document.createElement("link");
132
+ return s.rel = "stylesheet", s.href = l, e.shadowRoot.prepend(s), !0;
133
+ }
134
+ return !1;
135
+ }
136
+ function ee(e) {
137
+ if (!f(e, "pit-viper-v2")) {
138
+ if (f(e, "pit-viper")) {
139
+ f(e, "pit-viper-v2-scoped");
140
+ return;
141
+ }
142
+ console.warn(
143
+ "No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
144
+ );
145
+ }
146
+ }
147
+ const te = (e) => ({ shadowRoot: F(e) });
148
+ function ne(e) {
149
+ const t = e.__name || e.name;
150
+ if (!t)
151
+ throw new Error("Component must have a __name or name property");
152
+ const n = _(e, te(t));
153
+ class l extends n {
154
+ connectedCallback() {
155
+ super.connectedCallback?.(), ee(this);
156
+ }
157
+ }
158
+ return l;
159
+ }
160
+ function oe(e) {
161
+ return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
162
+ }
163
+ function re(e) {
164
+ const t = e.__name || e.name;
165
+ if (!t)
166
+ throw new Error("Component must have a __name or name property");
167
+ const n = oe(t), l = ne(e);
168
+ customElements.get(n) || customElements.define(n, l);
169
+ }
170
+ re(X);
@@ -0,0 +1,145 @@
1
+ import { defineComponent as _, ref as m, computed as d, onMounted as g, getCurrentInstance as C, createElementBlock as c, openBlock as l, normalizeClass as h, createElementVNode as y, mergeModels as k, useModel as E, Fragment as v, renderList as P, createBlock as f, createCommentVNode as i, createTextVNode as S, toDisplayString as b, defineCustomElement as w } from "vue";
2
+ const V = [void 0, 10, 12, 20, 24, 32, 64], $ = ["xlink:href"], p = /* @__PURE__ */ _({
3
+ __name: "PvIcon",
4
+ props: {
5
+ name: { type: String },
6
+ size: { type: null }
7
+ },
8
+ setup(e) {
9
+ const t = e, r = m(!1), n = m(null), s = d(() => ({
10
+ "pv-icon": !0,
11
+ [`pv-icon-${t.size}`]: V.includes(t.size)
12
+ })), o = d(() => r.value && n.value ? `${n.value}#${t.name}` : `#${t.name}`);
13
+ return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (n.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), g(() => {
14
+ const a = C()?.root;
15
+ r.value = a && "isCE" in a && a.isCE;
16
+ }), (a, O) => (l(), c(
17
+ "svg",
18
+ {
19
+ "data-testid": "pv-icon",
20
+ "aria-hidden": "true",
21
+ class: h(s.value)
22
+ },
23
+ [
24
+ y("use", { "xlink:href": o.value }, null, 8, $)
25
+ ],
26
+ 2
27
+ /* CLASS */
28
+ ));
29
+ }
30
+ }), A = ["onClick", "data-active"], M = /* @__PURE__ */ _({
31
+ __name: "PvSegmentedControl",
32
+ props: /* @__PURE__ */ k({
33
+ size: { default: "lg", type: String },
34
+ options: { default: () => [], type: Array }
35
+ }, {
36
+ modelValue: { required: !0 },
37
+ modelModifiers: {}
38
+ }),
39
+ emits: ["update:modelValue"],
40
+ setup(e) {
41
+ const t = E(e, "modelValue"), r = (n) => {
42
+ t.value = n;
43
+ };
44
+ return (n, s) => (l(), c(
45
+ "div",
46
+ {
47
+ class: h([
48
+ "pv-segmented-control",
49
+ {
50
+ "pv-segmented-control-large": e.size === "xl"
51
+ }
52
+ ])
53
+ },
54
+ [
55
+ (l(!0), c(
56
+ v,
57
+ null,
58
+ P(e.options, (o) => (l(), c("button", {
59
+ key: o.value,
60
+ class: "pv-full-width",
61
+ onClick: (a) => r(o.value),
62
+ "data-active": t.value === o.value ? !0 : null
63
+ }, [
64
+ o.iconPosition == "left" && o.icon ? (l(), f(p, {
65
+ key: 0,
66
+ name: o.icon
67
+ }, null, 8, ["name"])) : i("v-if", !0),
68
+ o.label ? (l(), c(
69
+ v,
70
+ { key: 1 },
71
+ [
72
+ S(
73
+ b(o.label),
74
+ 1
75
+ /* TEXT */
76
+ )
77
+ ],
78
+ 64
79
+ /* STABLE_FRAGMENT */
80
+ )) : i("v-if", !0),
81
+ o.iconPosition == "right" && o.icon ? (l(), f(p, {
82
+ key: 2,
83
+ name: o.icon
84
+ }, null, 8, ["name"])) : i("v-if", !0)
85
+ ], 8, A))),
86
+ 128
87
+ /* KEYED_FRAGMENT */
88
+ ))
89
+ ],
90
+ 2
91
+ /* CLASS */
92
+ ));
93
+ }
94
+ }), R = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
95
+ function T(e) {
96
+ return !R.has(e);
97
+ }
98
+ function u(e, t) {
99
+ const r = document.querySelector('link[href*="' + t + '"]');
100
+ if (!e.shadowRoot)
101
+ return !1;
102
+ if (r && e.shadowRoot) {
103
+ const n = r.href;
104
+ if (e.shadowRoot.querySelector(`link[href="${n}"]`))
105
+ return;
106
+ const s = document.createElement("link");
107
+ return s.rel = "stylesheet", s.href = n, e.shadowRoot.prepend(s), !0;
108
+ }
109
+ return !1;
110
+ }
111
+ function x(e) {
112
+ if (!u(e, "pit-viper-v2")) {
113
+ if (u(e, "pit-viper")) {
114
+ u(e, "pit-viper-v2-scoped");
115
+ return;
116
+ }
117
+ console.warn(
118
+ "No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
119
+ );
120
+ }
121
+ }
122
+ const z = (e) => ({ shadowRoot: T(e) });
123
+ function I(e) {
124
+ const t = e.__name || e.name;
125
+ if (!t)
126
+ throw new Error("Component must have a __name or name property");
127
+ const r = w(e, z(t));
128
+ class n extends r {
129
+ connectedCallback() {
130
+ super.connectedCallback?.(), x(this);
131
+ }
132
+ }
133
+ return n;
134
+ }
135
+ function L(e) {
136
+ return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
137
+ }
138
+ function N(e) {
139
+ const t = e.__name || e.name;
140
+ if (!t)
141
+ throw new Error("Component must have a __name or name property");
142
+ const r = L(t), n = I(e);
143
+ customElements.get(r) || customElements.define(r, n);
144
+ }
145
+ N(M);