@turquoisehealth/pit-viper 2.104.2-dev.0 → 2.105.1

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 (122) hide show
  1. package/_site/assets/css/pit-viper-v2-scoped.css +0 -19
  2. package/_site/assets/css/pit-viper-v2.css +0 -21
  3. package/_site/assets/css/pit-viper.css +0 -21
  4. package/_site/assets/js/pit-viper.js +147 -0
  5. package/package.json +11 -38
  6. package/pv-components/dist/stats/vue/base/stats.html +15 -15
  7. package/pv-components/dist/stats/vue/visualizations/stats.html +15 -15
  8. package/pv-components/dist/stats/web/pv-accordion-stats.html +15 -15
  9. package/pv-components/dist/stats/web/pv-action-bar-stats.html +15 -15
  10. package/pv-components/dist/stats/web/pv-avatar-group-stats.html +15 -15
  11. package/pv-components/dist/stats/web/pv-avatar-stats.html +15 -15
  12. package/pv-components/dist/stats/web/pv-banner-stats.html +15 -15
  13. package/pv-components/dist/stats/web/pv-breadcrumbs-stats.html +15 -15
  14. package/pv-components/dist/stats/web/pv-button-stats.html +15 -15
  15. package/pv-components/dist/stats/web/pv-card-stats.html +15 -15
  16. package/pv-components/dist/stats/web/pv-checkbox-stats.html +15 -15
  17. package/pv-components/dist/stats/web/pv-company-label-stats.html +15 -15
  18. package/pv-components/dist/stats/web/pv-company-logo-stats.html +15 -15
  19. package/pv-components/dist/stats/web/pv-company-tag-stats.html +15 -15
  20. package/pv-components/dist/stats/web/pv-counter-badge-stats.html +15 -15
  21. package/pv-components/dist/stats/web/pv-date-picker-stats.html +15 -15
  22. package/pv-components/dist/stats/web/pv-date-time-stats.html +15 -15
  23. package/pv-components/dist/stats/web/pv-drawer-stats.html +15 -15
  24. package/pv-components/dist/stats/web/pv-dropdown-stats.html +15 -15
  25. package/pv-components/dist/stats/web/pv-expandable-content-stats.html +15 -15
  26. package/pv-components/dist/stats/web/pv-ghost-input-stats.html +15 -15
  27. package/pv-components/dist/stats/web/pv-icon-stats.html +15 -15
  28. package/pv-components/dist/stats/web/pv-input-stats.html +15 -15
  29. package/pv-components/dist/stats/web/pv-insight-card-stats.html +15 -15
  30. package/pv-components/dist/stats/web/pv-modal-stats.html +15 -15
  31. package/pv-components/dist/stats/web/pv-multi-select-button-stats.html +15 -15
  32. package/pv-components/dist/stats/web/pv-pagination-stats.html +15 -15
  33. package/pv-components/dist/stats/web/pv-pill-stats.html +15 -15
  34. package/pv-components/dist/stats/web/pv-popover-stats.html +15 -15
  35. package/pv-components/dist/stats/web/pv-popover-v2-stats.html +15 -15
  36. package/pv-components/dist/stats/web/pv-rating-stats.html +15 -15
  37. package/pv-components/dist/stats/web/pv-release-badge-stats.html +15 -15
  38. package/pv-components/dist/stats/web/pv-search-input-stats.html +15 -15
  39. package/pv-components/dist/stats/web/pv-segmented-control-stats.html +15 -15
  40. package/pv-components/dist/stats/web/pv-select-button-stats.html +15 -15
  41. package/pv-components/dist/stats/web/pv-selectable-card-stats.html +15 -15
  42. package/pv-components/dist/stats/web/pv-side-panel-stats.html +15 -15
  43. package/pv-components/dist/stats/web/pv-skeleton-stats.html +15 -15
  44. package/pv-components/dist/stats/web/pv-spinner-stats.html +15 -15
  45. package/pv-components/dist/stats/web/pv-sprite-stats.html +15 -15
  46. package/pv-components/dist/stats/web/pv-suggestion-tag-stats.html +15 -15
  47. package/pv-components/dist/stats/web/pv-switch-stats.html +15 -15
  48. package/pv-components/dist/stats/web/pv-tab-list-stats.html +15 -15
  49. package/pv-components/dist/stats/web/pv-tabs-stats.html +15 -15
  50. package/pv-components/dist/stats/web/pv-tag-stats.html +15 -15
  51. package/pv-components/dist/stats/web/pv-text-area-stats.html +15 -15
  52. package/pv-components/dist/stats/web/pv-toast-stats.html +15 -15
  53. package/pv-components/dist/stats/web/pv-toggle-button-stats.html +15 -15
  54. package/pv-components/dist/stats/web/pv-toggle-group-stats.html +15 -15
  55. package/pv-components/dist/stats/web/pv-tooltip-stats.html +15 -15
  56. package/pv-components/dist/stats/web/pv-tooltip-v2-stats.html +15 -15
  57. package/pv-components/dist/stats/web/pv-widget-stats.html +15 -15
  58. package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +4 -3
  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 +0 -1
  61. package/pv-components/dist/vue/base/components/base/PvTooltipV2/types.d.ts +1 -2
  62. package/pv-components/dist/vue/base/components/base/index.d.ts +1 -0
  63. package/pv-components/dist/vue/base/pv-components-base.js +1546 -0
  64. package/pv-components/dist/vue/base/pv-components-base.mjs +6653 -4387
  65. package/pv-components/dist/vue/base/pv-components-base.umd.js +1546 -0
  66. package/pv-components/dist/vue/visualizations/pv-components-visualizations.js +176 -0
  67. package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +5920 -3407
  68. package/pv-components/dist/vue/visualizations/pv-components-visualizations.umd.js +176 -0
  69. package/pv-components/dist/web/pv-components.iife.js +31 -31
  70. package/pv-components/dist/stats/web/pv-popover-menu-stats.html +0 -4949
  71. package/pv-components/dist/web/components/pv-accordion/pv-accordion.js +0 -186
  72. package/pv-components/dist/web/components/pv-action-bar/pv-action-bar.js +0 -66
  73. package/pv-components/dist/web/components/pv-avatar/pv-avatar.js +0 -96
  74. package/pv-components/dist/web/components/pv-avatar-group/pv-avatar-group.js +0 -102
  75. package/pv-components/dist/web/components/pv-banner/pv-banner.js +0 -155
  76. package/pv-components/dist/web/components/pv-breadcrumbs/pv-breadcrumbs.js +0 -92
  77. package/pv-components/dist/web/components/pv-button/pv-button.js +0 -173
  78. package/pv-components/dist/web/components/pv-card/pv-card.js +0 -80
  79. package/pv-components/dist/web/components/pv-checkbox/pv-checkbox.js +0 -77
  80. package/pv-components/dist/web/components/pv-company-label/pv-company-label.js +0 -153
  81. package/pv-components/dist/web/components/pv-company-logo/pv-company-logo.js +0 -124
  82. package/pv-components/dist/web/components/pv-company-tag/pv-company-tag.js +0 -204
  83. package/pv-components/dist/web/components/pv-counter-badge/pv-counter-badge.js +0 -89
  84. package/pv-components/dist/web/components/pv-date-picker/pv-date-picker.js +0 -7481
  85. package/pv-components/dist/web/components/pv-date-time/pv-date-time.js +0 -577
  86. package/pv-components/dist/web/components/pv-drawer/pv-drawer.js +0 -486
  87. package/pv-components/dist/web/components/pv-dropdown/pv-dropdown.js +0 -1724
  88. package/pv-components/dist/web/components/pv-expandable-content/pv-expandable-content.js +0 -235
  89. package/pv-components/dist/web/components/pv-ghost-input/pv-ghost-input.js +0 -251
  90. package/pv-components/dist/web/components/pv-icon/pv-icon.js +0 -81
  91. package/pv-components/dist/web/components/pv-input/pv-input.js +0 -123
  92. package/pv-components/dist/web/components/pv-insight-card/pv-insight-card.js +0 -293
  93. package/pv-components/dist/web/components/pv-modal/pv-modal.js +0 -118
  94. package/pv-components/dist/web/components/pv-multi-select-button/pv-multi-select-button.js +0 -2752
  95. package/pv-components/dist/web/components/pv-pagination/pv-pagination.js +0 -286
  96. package/pv-components/dist/web/components/pv-pill/pv-pill.js +0 -160
  97. package/pv-components/dist/web/components/pv-popover/pv-popover.js +0 -1417
  98. package/pv-components/dist/web/components/pv-popover-menu/pv-popover-menu.js +0 -1439
  99. package/pv-components/dist/web/components/pv-popover-v2/pv-popover-v2.js +0 -1421
  100. package/pv-components/dist/web/components/pv-rating/pv-rating.js +0 -78
  101. package/pv-components/dist/web/components/pv-release-badge/pv-release-badge.js +0 -74
  102. package/pv-components/dist/web/components/pv-search-input/pv-search-input.js +0 -170
  103. package/pv-components/dist/web/components/pv-segmented-control/pv-segmented-control.js +0 -145
  104. package/pv-components/dist/web/components/pv-select-button/pv-select-button.js +0 -2563
  105. package/pv-components/dist/web/components/pv-selectable-card/pv-selectable-card.js +0 -85
  106. package/pv-components/dist/web/components/pv-side-panel/pv-side-panel.js +0 -80
  107. package/pv-components/dist/web/components/pv-skeleton/pv-skeleton.js +0 -1525
  108. package/pv-components/dist/web/components/pv-spinner/pv-spinner.js +0 -83
  109. package/pv-components/dist/web/components/pv-sprite/pv-sprite.js +0 -82
  110. package/pv-components/dist/web/components/pv-suggestion-tag/pv-suggestion-tag.js +0 -126
  111. package/pv-components/dist/web/components/pv-switch/pv-switch.js +0 -94
  112. package/pv-components/dist/web/components/pv-tab-list/pv-tab-list.js +0 -100
  113. package/pv-components/dist/web/components/pv-tabs/pv-tabs.js +0 -178
  114. package/pv-components/dist/web/components/pv-tag/pv-tag.js +0 -141
  115. package/pv-components/dist/web/components/pv-text-area/pv-text-area.js +0 -120
  116. package/pv-components/dist/web/components/pv-toast/pv-toast.js +0 -223
  117. package/pv-components/dist/web/components/pv-toggle-button/pv-toggle-button.js +0 -139
  118. package/pv-components/dist/web/components/pv-toggle-group/pv-toggle-group.js +0 -2887
  119. package/pv-components/dist/web/components/pv-tooltip/pv-tooltip.js +0 -90
  120. package/pv-components/dist/web/components/pv-tooltip-v2/pv-tooltip-v2.js +0 -1489
  121. package/pv-components/dist/web/components/pv-widget/pv-widget.js +0 -91
  122. package/pv-components/dist/web/vue.runtime.esm-browser.prod.js +0 -7
@@ -1,141 +0,0 @@
1
- import { defineComponent as v, ref as u, computed as l, onMounted as y, getCurrentInstance as C, createElementBlock as f, openBlock as i, normalizeClass as h, createElementVNode as g, createBlock as d, createCommentVNode as m, toDisplayString as _, withModifiers as S, defineCustomElement as w } from "vue";
2
- const k = [void 0, 10, 12, 20, 24, 32, 64], E = ["xlink:href"], p = /* @__PURE__ */ v({
3
- __name: "PvIcon",
4
- props: {
5
- name: { type: String },
6
- size: { type: null }
7
- },
8
- setup(e) {
9
- const t = e, n = u(!1), o = u(null), a = l(() => ({
10
- "pv-icon": !0,
11
- [`pv-icon-${t.size}`]: k.includes(t.size)
12
- })), s = l(() => n.value && o.value ? `${o.value}#${t.name}` : `#${t.name}`);
13
- return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (o.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), y(() => {
14
- const r = C()?.root;
15
- n.value = r && "isCE" in r && r.isCE;
16
- }), (r, D) => (i(), f(
17
- "svg",
18
- {
19
- "data-testid": "pv-icon",
20
- "aria-hidden": "true",
21
- class: h(a.value)
22
- },
23
- [
24
- g("use", { "xlink:href": s.value }, null, 8, E)
25
- ],
26
- 2
27
- /* CLASS */
28
- ));
29
- }
30
- }), b = ["data-style"], P = { class: "pv-truncate" }, $ = /* @__PURE__ */ v({
31
- __name: "PvTag",
32
- props: {
33
- size: { default: "md", type: String },
34
- variant: { default: "tertiary", type: String },
35
- icon: { type: String },
36
- label: { type: String },
37
- showClear: { type: Boolean },
38
- rounded: { type: Boolean }
39
- },
40
- emits: ["handle-close", "handle-click"],
41
- setup(e) {
42
- const t = e, n = l(() => {
43
- switch (t.size) {
44
- case "lg":
45
- return "pv-tag-lg";
46
- case "sm":
47
- return "pv-tag-sm";
48
- default:
49
- return "";
50
- }
51
- }), o = l(() => {
52
- switch (t.variant) {
53
- case "primary":
54
- return "pv-tag-primary";
55
- case "tertiary":
56
- return "pv-tag-tertiary";
57
- default:
58
- return "";
59
- }
60
- });
61
- return (a, s) => (i(), f("button", {
62
- class: h([o.value, n.value, "pv-flex"]),
63
- onClick: s[1] || (s[1] = (r) => a.$emit("handle-click", e.label)),
64
- style: { "max-width": "100%", "--flex-gap": "4px" },
65
- "data-testid": "pv-tag",
66
- "data-style": e.rounded ? "rounded" : void 0
67
- }, [
68
- e.icon ? (i(), d(p, {
69
- key: 0,
70
- "data-testid": "pv-tag-icon",
71
- name: e.icon,
72
- size: 12
73
- }, null, 8, ["name"])) : m("v-if", !0),
74
- g(
75
- "span",
76
- P,
77
- _(e.label),
78
- 1
79
- /* TEXT */
80
- ),
81
- e.showClear ? (i(), d(p, {
82
- key: 1,
83
- "data-testid": "pv-tag-close-icon",
84
- size: 12,
85
- name: "close",
86
- onClick: s[0] || (s[0] = S((r) => a.$emit("handle-close", e.label), ["stop"]))
87
- })) : m("v-if", !0)
88
- ], 10, b));
89
- }
90
- }), z = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
91
- function B(e) {
92
- return !z.has(e);
93
- }
94
- function c(e, t) {
95
- const n = document.querySelector('link[href*="' + t + '"]');
96
- if (!e.shadowRoot)
97
- return !1;
98
- if (n && e.shadowRoot) {
99
- const o = n.href;
100
- if (e.shadowRoot.querySelector(`link[href="${o}"]`))
101
- return;
102
- const a = document.createElement("link");
103
- return a.rel = "stylesheet", a.href = o, e.shadowRoot.prepend(a), !0;
104
- }
105
- return !1;
106
- }
107
- function R(e) {
108
- if (!c(e, "pit-viper-v2")) {
109
- if (c(e, "pit-viper")) {
110
- c(e, "pit-viper-v2-scoped");
111
- return;
112
- }
113
- console.warn(
114
- "No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
115
- );
116
- }
117
- }
118
- const T = (e) => ({ shadowRoot: B(e) });
119
- function x(e) {
120
- const t = e.__name || e.name;
121
- if (!t)
122
- throw new Error("Component must have a __name or name property");
123
- const n = w(e, T(t));
124
- class o extends n {
125
- connectedCallback() {
126
- super.connectedCallback?.(), R(this);
127
- }
128
- }
129
- return o;
130
- }
131
- function A(e) {
132
- return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
133
- }
134
- function I(e) {
135
- const t = e.__name || e.name;
136
- if (!t)
137
- throw new Error("Component must have a __name or name property");
138
- const n = A(t), o = x(e);
139
- customElements.get(n) || customElements.define(n, o);
140
- }
141
- I($);
@@ -1,120 +0,0 @@
1
- import { defineComponent as d, mergeModels as c, useModel as u, createElementBlock as a, openBlock as l, Fragment as m, createCommentVNode as i, withDirectives as f, renderSlot as v, createElementVNode as p, mergeProps as h, vModelText as b, normalizeClass as w, toDisplayString as y, defineCustomElement as g } from "vue";
2
- const S = ["for"], C = ["rows", "disabled", "placeholder", "id", "data-invalid"], E = /* @__PURE__ */ d({
3
- __name: "PvTextArea",
4
- props: /* @__PURE__ */ c({
5
- error: { type: Boolean },
6
- disabled: { type: Boolean },
7
- placeholder: { type: String },
8
- id: { default: Math.random().toString(), type: String },
9
- lowerLabel: { type: String },
10
- variant: { default: "white", type: String },
11
- rows: { default: 4, type: Number }
12
- }, {
13
- modelValue: {},
14
- modelModifiers: {}
15
- }),
16
- emits: ["update:modelValue"],
17
- setup(e) {
18
- const o = u(e, "modelValue");
19
- return (t, r) => (l(), a(
20
- m,
21
- null,
22
- [
23
- t.$slots.label ? (l(), a("label", {
24
- key: 0,
25
- class: "pv-label pv-stack-8",
26
- for: e.id
27
- }, [
28
- v(t.$slots, "label")
29
- ], 8, S)) : i("v-if", !0),
30
- f(p("textarea", h(t.$attrs, {
31
- "onUpdate:modelValue": r[0] || (r[0] = (n) => o.value = n),
32
- class: [
33
- "pv-textarea",
34
- {
35
- "pv-stack-8": e.lowerLabel,
36
- "pv-surface-accent": e.variant === "grey"
37
- }
38
- ],
39
- rows: e.rows,
40
- disabled: e.disabled,
41
- placeholder: e.placeholder,
42
- id: e.id,
43
- "data-invalid": e.error ? !0 : void 0
44
- }), null, 16, C), [
45
- [b, o.value]
46
- ]),
47
- e.lowerLabel ? (l(), a(
48
- "p",
49
- {
50
- key: 1,
51
- style: { "margin-left": "12px" },
52
- class: w([
53
- "pv-text-body-xs",
54
- {
55
- "pv-text-red": e.error,
56
- "pv-text-subdued": !e.error
57
- }
58
- ])
59
- },
60
- y(e.lowerLabel),
61
- 3
62
- /* TEXT, CLASS */
63
- )) : i("v-if", !0)
64
- ],
65
- 64
66
- /* STABLE_FRAGMENT */
67
- ));
68
- }
69
- }), k = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
70
- function M(e) {
71
- return !k.has(e);
72
- }
73
- function s(e, o) {
74
- const t = document.querySelector('link[href*="' + o + '"]');
75
- if (!e.shadowRoot)
76
- return !1;
77
- if (t && e.shadowRoot) {
78
- const r = t.href;
79
- if (e.shadowRoot.querySelector(`link[href="${r}"]`))
80
- return;
81
- const n = document.createElement("link");
82
- return n.rel = "stylesheet", n.href = r, e.shadowRoot.prepend(n), !0;
83
- }
84
- return !1;
85
- }
86
- function x(e) {
87
- if (!s(e, "pit-viper-v2")) {
88
- if (s(e, "pit-viper")) {
89
- s(e, "pit-viper-v2-scoped");
90
- return;
91
- }
92
- console.warn(
93
- "No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
94
- );
95
- }
96
- }
97
- const P = (e) => ({ shadowRoot: M(e) });
98
- function D(e) {
99
- const o = e.__name || e.name;
100
- if (!o)
101
- throw new Error("Component must have a __name or name property");
102
- const t = g(e, P(o));
103
- class r extends t {
104
- connectedCallback() {
105
- super.connectedCallback?.(), x(this);
106
- }
107
- }
108
- return r;
109
- }
110
- function N(e) {
111
- return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
112
- }
113
- function V(e) {
114
- const o = e.__name || e.name;
115
- if (!o)
116
- throw new Error("Component must have a __name or name property");
117
- const t = N(o), r = D(e);
118
- customElements.get(t) || customElements.define(t, r);
119
- }
120
- V(E);
@@ -1,223 +0,0 @@
1
- import { defineComponent as c, ref as h, computed as v, onMounted as k, getCurrentInstance as C, createElementBlock as i, openBlock as a, normalizeClass as u, createElementVNode as b, normalizeStyle as _, createBlock as d, Fragment as P, createCommentVNode as p, toDisplayString as S, createVNode as g, renderSlot as E, defineCustomElement as z } from "vue";
2
- const $ = [void 0, 10, 12, 20, 24, 32, 64], w = ["xlink:href"], f = /* @__PURE__ */ c({
3
- __name: "PvIcon",
4
- props: {
5
- name: { type: String },
6
- size: { type: null }
7
- },
8
- setup(e) {
9
- const n = e, t = h(!1), o = h(null), s = v(() => ({
10
- "pv-icon": !0,
11
- [`pv-icon-${n.size}`]: $.includes(n.size)
12
- })), r = v(() => t.value && o.value ? `${o.value}#${n.name}` : `#${n.name}`);
13
- return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (o.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), k(() => {
14
- const l = C()?.root;
15
- t.value = l && "isCE" in l && l.isCE;
16
- }), (l, W) => (a(), i(
17
- "svg",
18
- {
19
- "data-testid": "pv-icon",
20
- "aria-hidden": "true",
21
- class: u(s.value)
22
- },
23
- [
24
- b("use", { "xlink:href": r.value }, null, 8, w)
25
- ],
26
- 2
27
- /* CLASS */
28
- ));
29
- }
30
- }), I = /* @__PURE__ */ c({
31
- __name: "PvSpinner",
32
- props: {
33
- variant: { default: "primary", type: String },
34
- size: { default: "lg", type: String }
35
- },
36
- setup(e) {
37
- const n = {
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 (o, s) => (a(), i(
49
- "div",
50
- {
51
- "data-testid": "pv-spinner",
52
- class: u(t[e.variant]),
53
- style: _({ "--size": n[e.size] })
54
- },
55
- null,
56
- 6
57
- /* CLASS, STYLE */
58
- ));
59
- }
60
- }), y = {
61
- md: "pv-button-small",
62
- lg: void 0,
63
- xl: "pv-button-large"
64
- }, T = (e) => e == null || !y.hasOwnProperty(e) ? null : y[e] || null, B = ["disabled"], x = {
65
- key: 1,
66
- "data-testid": "pv-button-label"
67
- }, V = /* @__PURE__ */ c({
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 n = ["ghost"], t = e, o = v(() => {
81
- const s = [];
82
- t.inverse && n.includes(t.variant) ? s.push(`pv-button-${t.variant}-inverse`) : s.push(`pv-button-${t.variant}`);
83
- const r = T(t.size);
84
- return r && s.push(r), s;
85
- });
86
- return (s, r) => (a(), i("button", {
87
- type: "button",
88
- class: u(o.value),
89
- disabled: e.disabled,
90
- "data-testid": "pv-button"
91
- }, [
92
- e.loading ? (a(), d(I, {
93
- key: 0,
94
- size: "sm"
95
- })) : (a(), i(
96
- P,
97
- { key: 1 },
98
- [
99
- e.leftIcon ? (a(), d(f, {
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 ? (a(), i(
105
- "span",
106
- x,
107
- S(e.label),
108
- 1
109
- /* TEXT */
110
- )) : p("v-if", !0),
111
- e.rightIcon ? (a(), d(f, {
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, B));
121
- }
122
- }), R = { class: "pv-text-body-md" }, A = /* @__PURE__ */ c({
123
- __name: "PvToast",
124
- props: {
125
- variant: { default: "info", type: String },
126
- icon: { type: String },
127
- label: { type: String }
128
- },
129
- emits: ["handle-close"],
130
- setup(e) {
131
- const n = {
132
- info: "pv-toast-info",
133
- success: "pv-toast-success",
134
- error: "pv-toast-error",
135
- dark: "pv-toast-dark"
136
- }, t = {
137
- info: "check-circle",
138
- success: "check-circle",
139
- error: "alert-circle",
140
- dark: "ai"
141
- };
142
- return (o, s) => (a(), i(
143
- "div",
144
- {
145
- class: u(n[e.variant])
146
- },
147
- [
148
- g(f, {
149
- name: e.icon ? e.icon : t[e.variant],
150
- size: 20
151
- }, null, 8, ["name"]),
152
- b(
153
- "p",
154
- R,
155
- S(e.label),
156
- 1
157
- /* TEXT */
158
- ),
159
- E(o.$slots, "default"),
160
- g(V, {
161
- variant: "ghost",
162
- inverse: e.variant === "dark",
163
- size: "lg",
164
- "left-icon": "close",
165
- onClick: s[0] || (s[0] = (r) => o.$emit("handle-close"))
166
- }, null, 8, ["inverse"])
167
- ],
168
- 2
169
- /* CLASS */
170
- ));
171
- }
172
- }), N = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
173
- function O(e) {
174
- return !N.has(e);
175
- }
176
- function m(e, n) {
177
- const t = document.querySelector('link[href*="' + n + '"]');
178
- if (!e.shadowRoot)
179
- return !1;
180
- if (t && e.shadowRoot) {
181
- const o = t.href;
182
- if (e.shadowRoot.querySelector(`link[href="${o}"]`))
183
- return;
184
- const s = document.createElement("link");
185
- return s.rel = "stylesheet", s.href = o, e.shadowRoot.prepend(s), !0;
186
- }
187
- return !1;
188
- }
189
- function D(e) {
190
- if (!m(e, "pit-viper-v2")) {
191
- if (m(e, "pit-viper")) {
192
- m(e, "pit-viper-v2-scoped");
193
- return;
194
- }
195
- console.warn(
196
- "No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
197
- );
198
- }
199
- }
200
- const L = (e) => ({ shadowRoot: O(e) });
201
- function M(e) {
202
- const n = e.__name || e.name;
203
- if (!n)
204
- throw new Error("Component must have a __name or name property");
205
- const t = z(e, L(n));
206
- class o extends t {
207
- connectedCallback() {
208
- super.connectedCallback?.(), D(this);
209
- }
210
- }
211
- return o;
212
- }
213
- function G(e) {
214
- return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
215
- }
216
- function H(e) {
217
- const n = e.__name || e.name;
218
- if (!n)
219
- throw new Error("Component must have a __name or name property");
220
- const t = G(n), o = M(e);
221
- customElements.get(t) || customElements.define(t, o);
222
- }
223
- H(A);
@@ -1,139 +0,0 @@
1
- import { defineComponent as h, ref as v, computed as s, onMounted as S, getCurrentInstance as b, createElementBlock as d, openBlock as r, normalizeClass as g, createElementVNode as y, mergeModels as _, useModel as C, withDirectives as E, createBlock as f, createCommentVNode as c, vModelDynamic as k, toDisplayString as P, defineCustomElement as w } from "vue";
2
- const I = [void 0, 10, 12, 20, 24, 32, 64], B = ["xlink:href"], p = /* @__PURE__ */ h({
3
- __name: "PvIcon",
4
- props: {
5
- name: { type: String },
6
- size: { type: null }
7
- },
8
- setup(e) {
9
- const t = e, n = v(!1), o = v(null), a = s(() => ({
10
- "pv-icon": !0,
11
- [`pv-icon-${t.size}`]: I.includes(t.size)
12
- })), i = s(() => n.value && o.value ? `${o.value}#${t.name}` : `#${t.name}`);
13
- return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (o.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), S(() => {
14
- const l = b()?.root;
15
- n.value = l && "isCE" in l && l.isCE;
16
- }), (l, m) => (r(), d(
17
- "svg",
18
- {
19
- "data-testid": "pv-icon",
20
- "aria-hidden": "true",
21
- class: g(a.value)
22
- },
23
- [
24
- y("use", { "xlink:href": i.value }, null, 8, B)
25
- ],
26
- 2
27
- /* CLASS */
28
- ));
29
- }
30
- }), $ = ["for"], M = ["id", "type", "value", "name", "disabled"], V = { key: 1 }, x = /* @__PURE__ */ h({
31
- __name: "PvToggleButton",
32
- props: /* @__PURE__ */ _({
33
- size: { default: "xl", type: String },
34
- variant: { default: "secondary", type: String },
35
- rounded: { type: Boolean },
36
- disabled: { type: Boolean },
37
- value: { type: String },
38
- label: { type: String },
39
- leftIcon: { type: String },
40
- rightIcon: { type: String },
41
- id: { type: String },
42
- name: { type: String },
43
- deselect: { type: Boolean, default: !0 }
44
- }, {
45
- modelValue: { type: [Boolean, String] },
46
- modelModifiers: {}
47
- }),
48
- emits: ["update:modelValue"],
49
- setup(e) {
50
- const t = e, n = C(e, "modelValue"), o = s(() => ({
51
- [`pv-toggle${t.variant == "secondary" ? "" : "-" + t.variant}`]: !0,
52
- "pv-toggle-round": t.rounded,
53
- "pv-toggle-small": t.size === "lg"
54
- })), a = s(() => t.id ? t.id : `${t.label}-${Math.random()}`);
55
- return (i, l) => (r(), d("label", {
56
- "data-testid": "pv-toggle-button",
57
- class: g(o.value),
58
- for: a.value
59
- }, [
60
- E(y("input", {
61
- "onUpdate:modelValue": l[0] || (l[0] = (m) => n.value = m),
62
- class: "pv-hide",
63
- id: a.value,
64
- type: e.deselect ? "checkbox" : "radio",
65
- value: e.value,
66
- name: e.name,
67
- disabled: e.disabled
68
- }, null, 8, M), [
69
- [k, n.value]
70
- ]),
71
- e.leftIcon ? (r(), f(p, {
72
- key: 0,
73
- name: e.leftIcon
74
- }, null, 8, ["name"])) : c("v-if", !0),
75
- e.label ? (r(), d(
76
- "span",
77
- V,
78
- P(e.label),
79
- 1
80
- /* TEXT */
81
- )) : c("v-if", !0),
82
- e.rightIcon ? (r(), f(p, {
83
- key: 2,
84
- name: e.rightIcon
85
- }, null, 8, ["name"])) : c("v-if", !0)
86
- ], 10, $));
87
- }
88
- }), D = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
89
- function R(e) {
90
- return !D.has(e);
91
- }
92
- function u(e, t) {
93
- const n = document.querySelector('link[href*="' + t + '"]');
94
- if (!e.shadowRoot)
95
- return !1;
96
- if (n && e.shadowRoot) {
97
- const o = n.href;
98
- if (e.shadowRoot.querySelector(`link[href="${o}"]`))
99
- return;
100
- const a = document.createElement("link");
101
- return a.rel = "stylesheet", a.href = o, e.shadowRoot.prepend(a), !0;
102
- }
103
- return !1;
104
- }
105
- function T(e) {
106
- if (!u(e, "pit-viper-v2")) {
107
- if (u(e, "pit-viper")) {
108
- u(e, "pit-viper-v2-scoped");
109
- return;
110
- }
111
- console.warn(
112
- "No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
113
- );
114
- }
115
- }
116
- const z = (e) => ({ shadowRoot: R(e) });
117
- function A(e) {
118
- const t = e.__name || e.name;
119
- if (!t)
120
- throw new Error("Component must have a __name or name property");
121
- const n = w(e, z(t));
122
- class o extends n {
123
- connectedCallback() {
124
- super.connectedCallback?.(), T(this);
125
- }
126
- }
127
- return o;
128
- }
129
- function L(e) {
130
- return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
131
- }
132
- function N(e) {
133
- const t = e.__name || e.name;
134
- if (!t)
135
- throw new Error("Component must have a __name or name property");
136
- const n = L(t), o = A(e);
137
- customElements.get(n) || customElements.define(n, o);
138
- }
139
- N(x);