@turquoisehealth/pit-viper 2.104.0 → 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 +23 -2
  2. package/_site/assets/css/pit-viper-v2.css +25 -2
  3. package/_site/assets/css/pit-viper.css +25 -2
  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,235 @@
1
+ import { defineComponent as u, ref as f, computed as c, onMounted as S, getCurrentInstance as x, createElementBlock as i, openBlock as s, normalizeClass as p, createElementVNode as b, normalizeStyle as h, createBlock as d, Fragment as C, createCommentVNode as v, toDisplayString as k, createVNode as E, renderSlot as P, defineCustomElement as z } from "vue";
2
+ const w = [void 0, 10, 12, 20, 24, 32, 64], I = ["xlink:href"], y = /* @__PURE__ */ u({
3
+ __name: "PvIcon",
4
+ props: {
5
+ name: { type: String },
6
+ size: { type: null }
7
+ },
8
+ setup(e) {
9
+ const a = e, t = f(!1), n = f(null), o = c(() => ({
10
+ "pv-icon": !0,
11
+ [`pv-icon-${a.size}`]: w.includes(a.size)
12
+ })), r = c(() => t.value && n.value ? `${n.value}#${a.name}` : `#${a.name}`);
13
+ return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (n.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), S(() => {
14
+ const l = x()?.root;
15
+ t.value = l && "isCE" in l && l.isCE;
16
+ }), (l, _) => (s(), i(
17
+ "svg",
18
+ {
19
+ "data-testid": "pv-icon",
20
+ "aria-hidden": "true",
21
+ class: p(o.value)
22
+ },
23
+ [
24
+ b("use", { "xlink:href": r.value }, null, 8, I)
25
+ ],
26
+ 2
27
+ /* CLASS */
28
+ ));
29
+ }
30
+ }), $ = /* @__PURE__ */ u({
31
+ __name: "PvSpinner",
32
+ props: {
33
+ variant: { default: "primary", type: String },
34
+ size: { default: "lg", type: String }
35
+ },
36
+ setup(e) {
37
+ const a = {
38
+ xs: "0.75rem",
39
+ sm: "1rem",
40
+ md: "1.25rem",
41
+ lg: "1.5rem",
42
+ xl: "2rem"
43
+ }, t = {
44
+ primary: "pv-spinner",
45
+ dark: "pv-spinner-dark",
46
+ white: "pv-spinner-light"
47
+ };
48
+ return (n, o) => (s(), i(
49
+ "div",
50
+ {
51
+ "data-testid": "pv-spinner",
52
+ class: p(t[e.variant]),
53
+ style: h({ "--size": a[e.size] })
54
+ },
55
+ null,
56
+ 6
57
+ /* CLASS, STYLE */
58
+ ));
59
+ }
60
+ }), g = {
61
+ md: "pv-button-small",
62
+ lg: void 0,
63
+ xl: "pv-button-large"
64
+ }, B = (e) => e == null || !g.hasOwnProperty(e) ? null : g[e] || null, T = ["disabled"], O = {
65
+ key: 1,
66
+ "data-testid": "pv-button-label"
67
+ }, M = /* @__PURE__ */ u({
68
+ __name: "PvButton",
69
+ props: {
70
+ variant: { default: "primary", type: String },
71
+ disabled: { type: Boolean, default: !1 },
72
+ size: { default: "lg", type: String },
73
+ loading: { type: Boolean, default: !1 },
74
+ label: { type: String },
75
+ leftIcon: { type: String },
76
+ rightIcon: { type: String },
77
+ inverse: { type: Boolean, default: !1 }
78
+ },
79
+ setup(e) {
80
+ const a = ["ghost"], t = e, n = c(() => {
81
+ const o = [];
82
+ t.inverse && a.includes(t.variant) ? o.push(`pv-button-${t.variant}-inverse`) : o.push(`pv-button-${t.variant}`);
83
+ const r = B(t.size);
84
+ return r && o.push(r), o;
85
+ });
86
+ return (o, r) => (s(), i("button", {
87
+ type: "button",
88
+ class: p(n.value),
89
+ disabled: e.disabled,
90
+ "data-testid": "pv-button"
91
+ }, [
92
+ e.loading ? (s(), d($, {
93
+ key: 0,
94
+ size: "sm"
95
+ })) : (s(), i(
96
+ C,
97
+ { key: 1 },
98
+ [
99
+ e.leftIcon ? (s(), d(y, {
100
+ key: 0,
101
+ name: e.leftIcon,
102
+ "data-testid": "pv-button-left-icon"
103
+ }, null, 8, ["name"])) : v("v-if", !0),
104
+ e.label ? (s(), i(
105
+ "span",
106
+ O,
107
+ k(e.label),
108
+ 1
109
+ /* TEXT */
110
+ )) : v("v-if", !0),
111
+ e.rightIcon ? (s(), d(y, {
112
+ key: 2,
113
+ name: e.rightIcon,
114
+ "data-testid": "pv-button-right-icon"
115
+ }, null, 8, ["name"])) : v("v-if", !0)
116
+ ],
117
+ 64
118
+ /* STABLE_FRAGMENT */
119
+ ))
120
+ ], 10, T));
121
+ }
122
+ }), N = /* @__PURE__ */ u({
123
+ __name: "PvExpandableContent",
124
+ props: {
125
+ lines: { default: 4, type: Number },
126
+ size: { default: "md", type: String },
127
+ variant: { default: "primary", type: String },
128
+ defaultOpen: { type: Boolean, default: !1 }
129
+ },
130
+ setup(e) {
131
+ const a = {
132
+ none: "0",
133
+ xs: "4px",
134
+ sm: "8px",
135
+ md: "12px",
136
+ lg: "16px"
137
+ }, t = e, n = f(t.defaultOpen), o = () => {
138
+ n.value = !n.value;
139
+ }, r = c(() => ({
140
+ "--lines": n.value ? "none" : t.lines,
141
+ "max-height": n.value ? "100vh" : `${t.lines * 1.5}em`
142
+ }));
143
+ return (l, _) => (s(), i(
144
+ "div",
145
+ {
146
+ class: p([
147
+ "pv-inset-square expandable-content",
148
+ {
149
+ "pv-surface-accent": e.variant === "ghost"
150
+ }
151
+ ]),
152
+ style: h({ "--inset-size": a[e.size] })
153
+ },
154
+ [
155
+ b(
156
+ "p",
157
+ {
158
+ class: "pv-line-clamp pv-text-body-md pv-stack-8",
159
+ style: h(r.value)
160
+ },
161
+ [
162
+ P(l.$slots, "default", {}, void 0, !0)
163
+ ],
164
+ 4
165
+ /* STYLE */
166
+ ),
167
+ E(M, {
168
+ label: n.value ? "Show Less" : "Show More",
169
+ variant: "ghost",
170
+ size: "md",
171
+ onClick: o,
172
+ "left-icon": n.value ? "chevron-up" : "chevron-down"
173
+ }, null, 8, ["label", "left-icon"])
174
+ ],
175
+ 6
176
+ /* CLASS, STYLE */
177
+ ));
178
+ }
179
+ }), R = ".expandable-content[data-v-2f840307]{border-radius:.5rem}.expandable-content .pv-line-clamp[data-v-2f840307]{transition:max-height .3s ease-in-out}", V = (e, a) => {
180
+ const t = e.__vccOpts || e;
181
+ for (const [n, o] of a)
182
+ t[n] = o;
183
+ return t;
184
+ }, A = /* @__PURE__ */ V(N, [["styles", [R]], ["__scopeId", "data-v-2f840307"]]), L = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
185
+ function D(e) {
186
+ return !L.has(e);
187
+ }
188
+ function m(e, a) {
189
+ const t = document.querySelector('link[href*="' + a + '"]');
190
+ if (!e.shadowRoot)
191
+ return !1;
192
+ if (t && e.shadowRoot) {
193
+ const n = t.href;
194
+ if (e.shadowRoot.querySelector(`link[href="${n}"]`))
195
+ return;
196
+ const o = document.createElement("link");
197
+ return o.rel = "stylesheet", o.href = n, e.shadowRoot.prepend(o), !0;
198
+ }
199
+ return !1;
200
+ }
201
+ function G(e) {
202
+ if (!m(e, "pit-viper-v2")) {
203
+ if (m(e, "pit-viper")) {
204
+ m(e, "pit-viper-v2-scoped");
205
+ return;
206
+ }
207
+ console.warn(
208
+ "No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
209
+ );
210
+ }
211
+ }
212
+ const H = (e) => ({ shadowRoot: D(e) });
213
+ function W(e) {
214
+ const a = e.__name || e.name;
215
+ if (!a)
216
+ throw new Error("Component must have a __name or name property");
217
+ const t = z(e, H(a));
218
+ class n extends t {
219
+ connectedCallback() {
220
+ super.connectedCallback?.(), G(this);
221
+ }
222
+ }
223
+ return n;
224
+ }
225
+ function j(e) {
226
+ return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
227
+ }
228
+ function q(e) {
229
+ const a = e.__name || e.name;
230
+ if (!a)
231
+ throw new Error("Component must have a __name or name property");
232
+ const t = j(a), n = W(e);
233
+ customElements.get(t) || customElements.define(t, n);
234
+ }
235
+ q(A);
@@ -0,0 +1,251 @@
1
+ import { defineComponent as m, ref as y, computed as b, onMounted as k, getCurrentInstance as E, createElementBlock as r, openBlock as l, normalizeClass as S, createElementVNode as w, normalizeStyle as P, createBlock as d, Fragment as I, createCommentVNode as p, toDisplayString as $, mergeModels as T, useTemplateRef as z, useModel as B, watch as M, renderSlot as R, withDirectives as V, mergeProps as D, vModelText as A, defineCustomElement as N } from "vue";
2
+ const O = [void 0, 10, 12, 20, 24, 32, 64], W = ["xlink:href"], C = /* @__PURE__ */ m({
3
+ __name: "PvIcon",
4
+ props: {
5
+ name: { type: String },
6
+ size: { type: null }
7
+ },
8
+ setup(e) {
9
+ const t = e, n = y(!1), o = y(null), a = b(() => ({
10
+ "pv-icon": !0,
11
+ [`pv-icon-${t.size}`]: O.includes(t.size)
12
+ })), s = b(() => n.value && o.value ? `${o.value}#${t.name}` : `#${t.name}`);
13
+ return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (o.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), k(() => {
14
+ const i = E()?.root;
15
+ n.value = i && "isCE" in i && i.isCE;
16
+ }), (i, x) => (l(), r(
17
+ "svg",
18
+ {
19
+ "data-testid": "pv-icon",
20
+ "aria-hidden": "true",
21
+ class: S(a.value)
22
+ },
23
+ [
24
+ w("use", { "xlink:href": s.value }, null, 8, W)
25
+ ],
26
+ 2
27
+ /* CLASS */
28
+ ));
29
+ }
30
+ }), L = /* @__PURE__ */ m({
31
+ __name: "PvSpinner",
32
+ props: {
33
+ variant: { default: "primary", type: String },
34
+ size: { default: "lg", type: String }
35
+ },
36
+ setup(e) {
37
+ const t = {
38
+ xs: "0.75rem",
39
+ sm: "1rem",
40
+ md: "1.25rem",
41
+ lg: "1.5rem",
42
+ xl: "2rem"
43
+ }, n = {
44
+ primary: "pv-spinner",
45
+ dark: "pv-spinner-dark",
46
+ white: "pv-spinner-light"
47
+ };
48
+ return (o, a) => (l(), r(
49
+ "div",
50
+ {
51
+ "data-testid": "pv-spinner",
52
+ class: S(n[e.variant]),
53
+ style: P({ "--size": t[e.size] })
54
+ },
55
+ null,
56
+ 6
57
+ /* CLASS, STYLE */
58
+ ));
59
+ }
60
+ }), _ = {
61
+ md: "pv-button-small",
62
+ lg: void 0,
63
+ xl: "pv-button-large"
64
+ }, G = (e) => e == null || !_.hasOwnProperty(e) ? null : _[e] || null, H = ["disabled"], j = {
65
+ key: 1,
66
+ "data-testid": "pv-button-label"
67
+ }, q = /* @__PURE__ */ m({
68
+ __name: "PvButton",
69
+ props: {
70
+ variant: { default: "primary", type: String },
71
+ disabled: { type: Boolean, default: !1 },
72
+ size: { default: "lg", type: String },
73
+ loading: { type: Boolean, default: !1 },
74
+ label: { type: String },
75
+ leftIcon: { type: String },
76
+ rightIcon: { type: String },
77
+ inverse: { type: Boolean, default: !1 }
78
+ },
79
+ setup(e) {
80
+ const t = ["ghost"], n = e, o = b(() => {
81
+ const a = [];
82
+ n.inverse && t.includes(n.variant) ? a.push(`pv-button-${n.variant}-inverse`) : a.push(`pv-button-${n.variant}`);
83
+ const s = G(n.size);
84
+ return s && a.push(s), a;
85
+ });
86
+ return (a, s) => (l(), r("button", {
87
+ type: "button",
88
+ class: S(o.value),
89
+ disabled: e.disabled,
90
+ "data-testid": "pv-button"
91
+ }, [
92
+ e.loading ? (l(), d(L, {
93
+ key: 0,
94
+ size: "sm"
95
+ })) : (l(), r(
96
+ I,
97
+ { key: 1 },
98
+ [
99
+ e.leftIcon ? (l(), d(C, {
100
+ key: 0,
101
+ name: e.leftIcon,
102
+ "data-testid": "pv-button-left-icon"
103
+ }, null, 8, ["name"])) : p("v-if", !0),
104
+ e.label ? (l(), r(
105
+ "span",
106
+ j,
107
+ $(e.label),
108
+ 1
109
+ /* TEXT */
110
+ )) : p("v-if", !0),
111
+ e.rightIcon ? (l(), d(C, {
112
+ key: 2,
113
+ name: e.rightIcon,
114
+ "data-testid": "pv-button-right-icon"
115
+ }, null, 8, ["name"])) : p("v-if", !0)
116
+ ],
117
+ 64
118
+ /* STABLE_FRAGMENT */
119
+ ))
120
+ ], 10, H));
121
+ }
122
+ }), F = ["data-style"], U = ["placeholder", "disabled", "name"], K = /* @__PURE__ */ m({
123
+ __name: "PvGhostInput",
124
+ props: /* @__PURE__ */ T({
125
+ variant: { default: "h1", type: null },
126
+ placeholder: { type: String },
127
+ disabled: { type: Boolean },
128
+ showEditIcon: { type: Boolean }
129
+ }, {
130
+ modelValue: {},
131
+ modelModifiers: {}
132
+ }),
133
+ emits: ["update:modelValue"],
134
+ setup(e) {
135
+ const t = z("inputRef"), n = {
136
+ h1: "ghost-input-h1",
137
+ h2: "ghost-input-h2",
138
+ h3: "ghost-input-h3",
139
+ h4: "ghost-input-h4",
140
+ "text-lg": "ghost-input-text-large",
141
+ "text-md": "ghost-input-text-medium",
142
+ "text-sm": "ghost-input-text-small",
143
+ caption: "ghost-input-caption"
144
+ }, o = {
145
+ h1: "h1",
146
+ h2: "h2",
147
+ h3: "h3",
148
+ h4: "h4",
149
+ "text-sm": "text-small",
150
+ "text-md": "text-medium",
151
+ "text-lg": "text-large",
152
+ caption: "caption"
153
+ }, a = e, s = B(e, "modelValue"), i = y(0), x = () => {
154
+ t.value?.focus();
155
+ };
156
+ k(() => {
157
+ s.value && s.value.length > 0 ? c(s.value) : a.placeholder ? c(a.placeholder) : i.value = 240;
158
+ }), M(
159
+ () => s.value,
160
+ () => {
161
+ s.value && s.value.length > 0 ? c(s.value) : a.placeholder ? c(a.placeholder) : i.value = 240;
162
+ }
163
+ );
164
+ const c = (h) => {
165
+ if (!t.value) return;
166
+ const u = document.createElement("canvas").getContext("2d");
167
+ if (!u) return;
168
+ const f = getComputedStyle(t.value);
169
+ u.font = `${f.fontWeight} ${f.fontSize} ${f.fontFamily}`, i.value = u.measureText(h).width + 10;
170
+ };
171
+ return (h, v) => (l(), r("div", {
172
+ class: "pv-ghost-input pv-full-width",
173
+ "data-testid": "pv-ghost-input",
174
+ "data-style": o[e.variant]
175
+ }, [
176
+ R(h.$slots, "action"),
177
+ V(w("input", D({
178
+ ref_key: "inputRef",
179
+ ref: t
180
+ }, a, {
181
+ "onUpdate:modelValue": v[0] || (v[0] = (u) => s.value = u),
182
+ type: "text",
183
+ style: {
184
+ width: i.value + "px"
185
+ },
186
+ placeholder: e.placeholder,
187
+ disabled: e.disabled,
188
+ name: n[e.variant]
189
+ }), null, 16, U), [
190
+ [A, s.value]
191
+ ]),
192
+ e.showEditIcon ? (l(), d(q, {
193
+ key: 0,
194
+ "left-icon": "edit",
195
+ variant: "ghost",
196
+ onClick: x
197
+ })) : p("v-if", !0)
198
+ ], 8, F));
199
+ }
200
+ }), Z = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
201
+ function J(e) {
202
+ return !Z.has(e);
203
+ }
204
+ function g(e, t) {
205
+ const n = document.querySelector('link[href*="' + t + '"]');
206
+ if (!e.shadowRoot)
207
+ return !1;
208
+ if (n && e.shadowRoot) {
209
+ const o = n.href;
210
+ if (e.shadowRoot.querySelector(`link[href="${o}"]`))
211
+ return;
212
+ const a = document.createElement("link");
213
+ return a.rel = "stylesheet", a.href = o, e.shadowRoot.prepend(a), !0;
214
+ }
215
+ return !1;
216
+ }
217
+ function Q(e) {
218
+ if (!g(e, "pit-viper-v2")) {
219
+ if (g(e, "pit-viper")) {
220
+ g(e, "pit-viper-v2-scoped");
221
+ return;
222
+ }
223
+ console.warn(
224
+ "No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
225
+ );
226
+ }
227
+ }
228
+ const X = (e) => ({ shadowRoot: J(e) });
229
+ function Y(e) {
230
+ const t = e.__name || e.name;
231
+ if (!t)
232
+ throw new Error("Component must have a __name or name property");
233
+ const n = N(e, X(t));
234
+ class o extends n {
235
+ connectedCallback() {
236
+ super.connectedCallback?.(), Q(this);
237
+ }
238
+ }
239
+ return o;
240
+ }
241
+ function ee(e) {
242
+ return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
243
+ }
244
+ function te(e) {
245
+ const t = e.__name || e.name;
246
+ if (!t)
247
+ throw new Error("Component must have a __name or name property");
248
+ const n = ee(t), o = Y(e);
249
+ customElements.get(n) || customElements.define(n, o);
250
+ }
251
+ te(K);
@@ -0,0 +1,81 @@
1
+ import { defineComponent as u, ref as c, computed as i, onMounted as p, getCurrentInstance as m, createElementBlock as f, openBlock as _, normalizeClass as h, createElementVNode as v, defineCustomElement as d } from "vue";
2
+ const C = [void 0, 10, 12, 20, 24, 32, 64], E = ["xlink:href"], P = /* @__PURE__ */ u({
3
+ __name: "PvIcon",
4
+ props: {
5
+ name: { type: String },
6
+ size: { type: null }
7
+ },
8
+ setup(e) {
9
+ const t = e, n = c(!1), o = c(null), r = i(() => ({
10
+ "pv-icon": !0,
11
+ [`pv-icon-${t.size}`]: C.includes(t.size)
12
+ })), l = i(() => n.value && o.value ? `${o.value}#${t.name}` : `#${t.name}`);
13
+ return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (o.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), p(() => {
14
+ const s = m()?.root;
15
+ n.value = s && "isCE" in s && s.isCE;
16
+ }), (s, A) => (_(), f(
17
+ "svg",
18
+ {
19
+ "data-testid": "pv-icon",
20
+ "aria-hidden": "true",
21
+ class: h(r.value)
22
+ },
23
+ [
24
+ v("use", { "xlink:href": l.value }, null, 8, E)
25
+ ],
26
+ 2
27
+ /* CLASS */
28
+ ));
29
+ }
30
+ }), S = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
31
+ function g(e) {
32
+ return !S.has(e);
33
+ }
34
+ function a(e, t) {
35
+ const n = document.querySelector('link[href*="' + t + '"]');
36
+ if (!e.shadowRoot)
37
+ return !1;
38
+ if (n && e.shadowRoot) {
39
+ const o = n.href;
40
+ if (e.shadowRoot.querySelector(`link[href="${o}"]`))
41
+ return;
42
+ const r = document.createElement("link");
43
+ return r.rel = "stylesheet", r.href = o, e.shadowRoot.prepend(r), !0;
44
+ }
45
+ return !1;
46
+ }
47
+ function w(e) {
48
+ if (!a(e, "pit-viper-v2")) {
49
+ if (a(e, "pit-viper")) {
50
+ a(e, "pit-viper-v2-scoped");
51
+ return;
52
+ }
53
+ console.warn(
54
+ "No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
55
+ );
56
+ }
57
+ }
58
+ const b = (e) => ({ shadowRoot: g(e) });
59
+ function y(e) {
60
+ const t = e.__name || e.name;
61
+ if (!t)
62
+ throw new Error("Component must have a __name or name property");
63
+ const n = d(e, b(t));
64
+ class o extends n {
65
+ connectedCallback() {
66
+ super.connectedCallback?.(), w(this);
67
+ }
68
+ }
69
+ return o;
70
+ }
71
+ function k(e) {
72
+ return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
73
+ }
74
+ function R(e) {
75
+ const t = e.__name || e.name;
76
+ if (!t)
77
+ throw new Error("Component must have a __name or name property");
78
+ const n = k(t), o = y(e);
79
+ customElements.get(n) || customElements.define(n, o);
80
+ }
81
+ R(P);
@@ -0,0 +1,123 @@
1
+ import { defineComponent as u, mergeModels as c, useModel as m, createElementBlock as a, openBlock as l, Fragment as p, createCommentVNode as s, withDirectives as f, renderSlot as v, createElementVNode as h, normalizeClass as d, vModelDynamic as y, toDisplayString as b, defineCustomElement as w } from "vue";
2
+ const S = ["for"], g = ["disabled", "type", "placeholder", "id", "data-invalid"], C = /* @__PURE__ */ u({
3
+ __name: "PvInput",
4
+ props: /* @__PURE__ */ c({
5
+ error: { type: Boolean },
6
+ disabled: { type: Boolean },
7
+ placeholder: { type: String },
8
+ type: { default: "text", type: String },
9
+ id: { default: Math.random().toString(), type: String },
10
+ lowerLabel: { type: String },
11
+ variant: { default: "white", type: String }
12
+ }, {
13
+ modelValue: {},
14
+ modelModifiers: {}
15
+ }),
16
+ emits: ["update:modelValue"],
17
+ setup(e) {
18
+ const t = m(e, "modelValue");
19
+ return (o, n) => (l(), a(
20
+ p,
21
+ null,
22
+ [
23
+ o.$slots.label ? (l(), a("label", {
24
+ key: 0,
25
+ "data-testid": "pv-input-label",
26
+ class: "pv-label pv-stack-8",
27
+ for: e.id
28
+ }, [
29
+ v(o.$slots, "label")
30
+ ], 8, S)) : s("v-if", !0),
31
+ f(h("input", {
32
+ "onUpdate:modelValue": n[0] || (n[0] = (r) => t.value = r),
33
+ "data-testid": "pv-input",
34
+ class: d([
35
+ "pv-input-text",
36
+ {
37
+ "pv-stack-8": e.lowerLabel,
38
+ "pv-surface-accent": e.variant === "grey"
39
+ }
40
+ ]),
41
+ disabled: e.disabled,
42
+ type: e.type,
43
+ placeholder: e.placeholder,
44
+ id: e.id,
45
+ "data-invalid": e.error ? !0 : void 0
46
+ }, null, 10, g), [
47
+ [y, t.value]
48
+ ]),
49
+ e.lowerLabel ? (l(), a(
50
+ "p",
51
+ {
52
+ key: 1,
53
+ "data-testid": "pv-input-lower-label",
54
+ style: { "margin-left": "12px" },
55
+ class: d([
56
+ "pv-text-body-xs",
57
+ {
58
+ "pv-text-red": e.error,
59
+ "pv-text-subdued": !e.error
60
+ }
61
+ ])
62
+ },
63
+ b(e.lowerLabel),
64
+ 3
65
+ /* TEXT, CLASS */
66
+ )) : s("v-if", !0)
67
+ ],
68
+ 64
69
+ /* STABLE_FRAGMENT */
70
+ ));
71
+ }
72
+ }), E = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
73
+ function k(e) {
74
+ return !E.has(e);
75
+ }
76
+ function i(e, t) {
77
+ const o = document.querySelector('link[href*="' + t + '"]');
78
+ if (!e.shadowRoot)
79
+ return !1;
80
+ if (o && e.shadowRoot) {
81
+ const n = o.href;
82
+ if (e.shadowRoot.querySelector(`link[href="${n}"]`))
83
+ return;
84
+ const r = document.createElement("link");
85
+ return r.rel = "stylesheet", r.href = n, e.shadowRoot.prepend(r), !0;
86
+ }
87
+ return !1;
88
+ }
89
+ function M(e) {
90
+ if (!i(e, "pit-viper-v2")) {
91
+ if (i(e, "pit-viper")) {
92
+ i(e, "pit-viper-v2-scoped");
93
+ return;
94
+ }
95
+ console.warn(
96
+ "No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
97
+ );
98
+ }
99
+ }
100
+ const D = (e) => ({ shadowRoot: k(e) });
101
+ function x(e) {
102
+ const t = e.__name || e.name;
103
+ if (!t)
104
+ throw new Error("Component must have a __name or name property");
105
+ const o = w(e, D(t));
106
+ class n extends o {
107
+ connectedCallback() {
108
+ super.connectedCallback?.(), M(this);
109
+ }
110
+ }
111
+ return n;
112
+ }
113
+ function P(e) {
114
+ return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
115
+ }
116
+ function V(e) {
117
+ const t = e.__name || e.name;
118
+ if (!t)
119
+ throw new Error("Component must have a __name or name property");
120
+ const o = P(t), n = x(e);
121
+ customElements.get(o) || customElements.define(o, n);
122
+ }
123
+ V(C);