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