@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.
- package/package.json +43 -13
- package/pv-components/dist/stats/vue/base/stats.html +4949 -0
- package/pv-components/dist/stats/vue/visualizations/stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-accordion-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-action-bar-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-ai-button-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-avatar-group-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-avatar-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-banner-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-breadcrumbs-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-button-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-card-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-checkbox-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-company-label-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-company-logo-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-company-tag-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-counter-badge-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-date-picker-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-date-time-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-distribution-bar-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-drawer-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-dropdown-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-expandable-content-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-ghost-input-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-icon-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-input-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-insight-card-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-modal-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-multi-select-button-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-pagination-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-pill-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-popover-menu-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-popover-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-popover-v2-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-progress-bar-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-rating-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-release-badge-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-search-input-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-segmented-control-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-select-button-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-selectable-card-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-side-panel-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-skeleton-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-spinner-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-sprite-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-suggestion-tag-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-switch-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-tab-list-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-tabs-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-tag-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-text-area-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-toast-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-toggle-button-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-toggle-group-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-tooltip-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-tooltip-v2-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-tree-stats.html +4949 -0
- package/pv-components/dist/stats/web/pv-widget-stats.html +4949 -0
- package/pv-components/dist/vue/base/components/base/PvButton/helpers.d.ts +1 -0
- package/pv-components/dist/vue/base/components/base/PvMenu/PvMenuControlPanel.vue.d.ts +6 -0
- package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/PvMultiSelectButton.vue.d.ts +206 -289
- package/pv-components/dist/vue/base/components/base/PvMultiSelectButton/types.d.ts +31 -0
- package/pv-components/dist/vue/base/components/base/PvPopoverV2/PvPopoverV2.vue.d.ts +0 -1
- package/pv-components/dist/vue/base/components/base/PvPopoverV2/types.d.ts +6 -1
- package/pv-components/dist/vue/base/components/base/PvSelectButton/PvSelectButton.vue.d.ts +20 -177
- package/pv-components/dist/vue/base/components/base/PvSelectButton/PvSelectButtonTrigger/PvSelectButtonTrigger.vue.d.ts +4 -9
- package/pv-components/dist/vue/base/pv-components-base.mjs +4943 -11629
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.mjs +4791 -10741
- package/pv-components/dist/web/components/pv-accordion/pv-accordion.js +265 -0
- package/pv-components/dist/web/components/pv-action-bar/pv-action-bar.js +134 -0
- package/pv-components/dist/web/components/pv-ai-button/pv-ai-button.js +225 -0
- package/pv-components/dist/web/components/pv-avatar/pv-avatar.js +164 -0
- package/pv-components/dist/web/components/pv-avatar-group/pv-avatar-group.js +170 -0
- package/pv-components/dist/web/components/pv-banner/pv-banner.js +224 -0
- package/pv-components/dist/web/components/pv-breadcrumbs/pv-breadcrumbs.js +160 -0
- package/pv-components/dist/web/components/pv-button/pv-button.js +242 -0
- package/pv-components/dist/web/components/pv-card/pv-card.js +148 -0
- package/pv-components/dist/web/components/pv-checkbox/pv-checkbox.js +145 -0
- package/pv-components/dist/web/components/pv-company-label/pv-company-label.js +221 -0
- package/pv-components/dist/web/components/pv-company-logo/pv-company-logo.js +192 -0
- package/pv-components/dist/web/components/pv-company-tag/pv-company-tag.js +274 -0
- package/pv-components/dist/web/components/pv-counter-badge/pv-counter-badge.js +157 -0
- package/pv-components/dist/web/components/pv-date-picker/pv-date-picker.js +7550 -0
- package/pv-components/dist/web/components/pv-date-time/pv-date-time.js +645 -0
- package/pv-components/dist/web/components/pv-distribution-bar/pv-distribution-bar.js +177 -0
- package/pv-components/dist/web/components/pv-drawer/pv-drawer.js +556 -0
- package/pv-components/dist/web/components/pv-dropdown/pv-dropdown.js +1792 -0
- package/pv-components/dist/web/components/pv-expandable-content/pv-expandable-content.js +304 -0
- package/pv-components/dist/web/components/pv-ghost-input/pv-ghost-input.js +320 -0
- package/pv-components/dist/web/components/pv-icon/pv-icon.js +150 -0
- package/pv-components/dist/web/components/pv-input/pv-input.js +191 -0
- package/pv-components/dist/web/components/pv-insight-card/pv-insight-card.js +363 -0
- package/pv-components/dist/web/components/pv-modal/pv-modal.js +186 -0
- package/pv-components/dist/web/components/pv-multi-select-button/pv-multi-select-button.js +8326 -0
- package/pv-components/dist/web/components/pv-pagination/pv-pagination.js +355 -0
- package/pv-components/dist/web/components/pv-pill/pv-pill.js +229 -0
- package/pv-components/dist/web/components/pv-popover/pv-popover.js +1485 -0
- package/pv-components/dist/web/components/pv-popover-menu/pv-popover-menu.js +1507 -0
- package/pv-components/dist/web/components/pv-popover-v2/pv-popover-v2.js +1573 -0
- package/pv-components/dist/web/components/pv-progress-bar/pv-progress-bar.js +156 -0
- package/pv-components/dist/web/components/pv-rating/pv-rating.js +146 -0
- package/pv-components/dist/web/components/pv-release-badge/pv-release-badge.js +142 -0
- package/pv-components/dist/web/components/pv-search-input/pv-search-input.js +238 -0
- package/pv-components/dist/web/components/pv-segmented-control/pv-segmented-control.js +214 -0
- package/pv-components/dist/web/components/pv-select-button/pv-select-button.js +8093 -0
- package/pv-components/dist/web/components/pv-selectable-card/pv-selectable-card.js +153 -0
- package/pv-components/dist/web/components/pv-side-panel/pv-side-panel.js +148 -0
- package/pv-components/dist/web/components/pv-skeleton/pv-skeleton.js +1593 -0
- package/pv-components/dist/web/components/pv-spinner/pv-spinner.js +151 -0
- package/pv-components/dist/web/components/pv-sprite/pv-sprite.js +150 -0
- package/pv-components/dist/web/components/pv-suggestion-tag/pv-suggestion-tag.js +195 -0
- package/pv-components/dist/web/components/pv-switch/pv-switch.js +162 -0
- package/pv-components/dist/web/components/pv-tab-list/pv-tab-list.js +168 -0
- package/pv-components/dist/web/components/pv-tabs/pv-tabs.js +248 -0
- package/pv-components/dist/web/components/pv-tag/pv-tag.js +210 -0
- package/pv-components/dist/web/components/pv-text-area/pv-text-area.js +188 -0
- package/pv-components/dist/web/components/pv-toast/pv-toast.js +292 -0
- package/pv-components/dist/web/components/pv-toggle-button/pv-toggle-button.js +208 -0
- package/pv-components/dist/web/components/pv-toggle-group/pv-toggle-group.js +7479 -0
- package/pv-components/dist/web/components/pv-tooltip/pv-tooltip.js +158 -0
- package/pv-components/dist/web/components/pv-tooltip-v2/pv-tooltip-v2.js +7409 -0
- package/pv-components/dist/web/components/pv-tree/pv-tree.js +5107 -0
- package/pv-components/dist/web/components/pv-widget/pv-widget.js +159 -0
- package/pv-components/dist/web/pv-components.iife.js +50 -50
- package/pv-components/dist/web/vue.runtime.esm-browser.prod.js +7 -0
- package/pv-components/dist/vue/base/pv-components-base.js +0 -1555
- package/pv-components/dist/vue/base/pv-components-base.umd.js +0 -1555
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.js +0 -185
- package/pv-components/dist/vue/visualizations/pv-components-visualizations.umd.js +0 -185
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { defineComponent as g, createElementBlock as d, openBlock as h, Fragment as _, renderList as A, toDisplayString as y, createTextVNode as v, defineCustomElement as w } from "vue";
|
|
2
|
+
const C = {
|
|
3
|
+
class: "pv-breadcrumbs",
|
|
4
|
+
role: "list",
|
|
5
|
+
"data-testid": "pv-breadcrumbs"
|
|
6
|
+
}, P = ["href"], S = /* @__PURE__ */ g({
|
|
7
|
+
__name: "PvBreadcrumbs",
|
|
8
|
+
props: {
|
|
9
|
+
options: { type: Array }
|
|
10
|
+
},
|
|
11
|
+
setup(e) {
|
|
12
|
+
return (t, r) => (h(), d("ul", C, [
|
|
13
|
+
(h(!0), d(
|
|
14
|
+
_,
|
|
15
|
+
null,
|
|
16
|
+
A(e.options, (n) => (h(), d("li", {
|
|
17
|
+
key: n.label
|
|
18
|
+
}, [
|
|
19
|
+
n.href ? (h(), d("a", {
|
|
20
|
+
key: 0,
|
|
21
|
+
href: n.href
|
|
22
|
+
}, y(n.label), 9, P)) : (h(), d(
|
|
23
|
+
_,
|
|
24
|
+
{ key: 1 },
|
|
25
|
+
[
|
|
26
|
+
v(
|
|
27
|
+
y(n.label),
|
|
28
|
+
1
|
|
29
|
+
/* TEXT */
|
|
30
|
+
)
|
|
31
|
+
],
|
|
32
|
+
64
|
|
33
|
+
/* STABLE_FRAGMENT */
|
|
34
|
+
))
|
|
35
|
+
]))),
|
|
36
|
+
128
|
|
37
|
+
/* KEYED_FRAGMENT */
|
|
38
|
+
))
|
|
39
|
+
]));
|
|
40
|
+
}
|
|
41
|
+
}), I = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
42
|
+
function j(e) {
|
|
43
|
+
return !I.has(e);
|
|
44
|
+
}
|
|
45
|
+
function b(e, t) {
|
|
46
|
+
const r = document.querySelector('link[href*="' + t + '"]');
|
|
47
|
+
if (!e.shadowRoot)
|
|
48
|
+
return !1;
|
|
49
|
+
if (r && e.shadowRoot) {
|
|
50
|
+
const n = r.href;
|
|
51
|
+
if (e.shadowRoot.querySelector(`link[href="${n}"]`))
|
|
52
|
+
return;
|
|
53
|
+
const u = document.createElement("link");
|
|
54
|
+
return u.rel = "stylesheet", u.href = n, e.shadowRoot.prepend(u), !0;
|
|
55
|
+
}
|
|
56
|
+
return !1;
|
|
57
|
+
}
|
|
58
|
+
function k(e) {
|
|
59
|
+
if (!b(e, "pit-viper-v2")) {
|
|
60
|
+
if (b(e, "pit-viper")) {
|
|
61
|
+
b(e, "pit-viper-v2-scoped");
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
console.warn(
|
|
65
|
+
"No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
|
|
66
|
+
);
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
const O = (e) => ({ shadowRoot: j(e) });
|
|
70
|
+
function N(e, t) {
|
|
71
|
+
return t === null ? !1 : t === "" || t === "true" ? !0 : (t === "false" || console.warn(
|
|
72
|
+
`Invalid boolean attribute value for "${e}": "${t}". Expected "true", "false", or empty string.`
|
|
73
|
+
), !1);
|
|
74
|
+
}
|
|
75
|
+
function $(e, t) {
|
|
76
|
+
const r = Number(t);
|
|
77
|
+
return isNaN(r) && console.warn(`Invalid number attribute value for "${e}": "${t}". Expected a valid number.`), r;
|
|
78
|
+
}
|
|
79
|
+
function B(e) {
|
|
80
|
+
const t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), p = (e.__vccOpts || e).props;
|
|
81
|
+
return p && typeof p == "object" && Object.entries(p).forEach(([f, s]) => {
|
|
82
|
+
s === Boolean || s && s.type === Boolean ? t.add(f) : s === Number || s && s.type === Number ? r.add(f) : (s === Object || s === Array || s && (s.type === Object || s.type === Array)) && n.add(f);
|
|
83
|
+
}), { booleanProps: t, numberProps: r, jsonProps: n };
|
|
84
|
+
}
|
|
85
|
+
function E(e, t) {
|
|
86
|
+
try {
|
|
87
|
+
return JSON.parse(t);
|
|
88
|
+
} catch (r) {
|
|
89
|
+
return console.warn(
|
|
90
|
+
`Invalid JSON attribute value for "${e}": "${t}". Error: ${r instanceof Error ? r.message : String(r)}`
|
|
91
|
+
), null;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
function D(e) {
|
|
95
|
+
const t = e.__name || e.name;
|
|
96
|
+
if (!t)
|
|
97
|
+
throw new Error("Component must have a __name or name property");
|
|
98
|
+
const r = w(e, O(t)), { booleanProps: n, numberProps: u, jsonProps: p } = B(e);
|
|
99
|
+
class f extends r {
|
|
100
|
+
_hiddenInput = null;
|
|
101
|
+
constructor() {
|
|
102
|
+
super(), this._parseAttributes();
|
|
103
|
+
}
|
|
104
|
+
disconnectedCallback() {
|
|
105
|
+
this._hiddenInput?.remove(), super.disconnectedCallback?.();
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* Update the hidden input value
|
|
109
|
+
* Call this from the Vue component to sync form value
|
|
110
|
+
*/
|
|
111
|
+
setHiddenInputValue(a) {
|
|
112
|
+
this._hiddenInput && (this._hiddenInput.value = a ?? "");
|
|
113
|
+
}
|
|
114
|
+
_parseAttributes() {
|
|
115
|
+
n.forEach((o) => {
|
|
116
|
+
const i = this.getAttribute(o);
|
|
117
|
+
this[o] = N(o, i);
|
|
118
|
+
}), u.forEach((o) => {
|
|
119
|
+
const i = this.getAttribute(o);
|
|
120
|
+
i !== null && (this[o] = $(o, i));
|
|
121
|
+
}), p.forEach((o) => {
|
|
122
|
+
const i = this.getAttribute(o);
|
|
123
|
+
if (i !== null) {
|
|
124
|
+
const c = E(o, i);
|
|
125
|
+
c !== null && (this[o] = c);
|
|
126
|
+
}
|
|
127
|
+
});
|
|
128
|
+
const a = this.getAttribute("data-json-props");
|
|
129
|
+
a && a.split(",").map((i) => i.trim()).filter(Boolean).forEach((i) => {
|
|
130
|
+
const c = i.replace(/-([a-z])/g, (l) => l[1].toUpperCase());
|
|
131
|
+
let m = this.getAttribute(i);
|
|
132
|
+
if (m === null) {
|
|
133
|
+
const l = c.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
134
|
+
m = this.getAttribute(l);
|
|
135
|
+
}
|
|
136
|
+
if (m !== null && !this[c]) {
|
|
137
|
+
const l = E(c, m);
|
|
138
|
+
l !== null && (this[c] = l);
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
connectedCallback() {
|
|
143
|
+
this._parseAttributes(), super.connectedCallback?.(), k(this);
|
|
144
|
+
const a = this.getAttribute("name");
|
|
145
|
+
a && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = a, this.after(this._hiddenInput));
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
return f;
|
|
149
|
+
}
|
|
150
|
+
function x(e) {
|
|
151
|
+
return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
152
|
+
}
|
|
153
|
+
function R(e) {
|
|
154
|
+
const t = e.__name || e.name;
|
|
155
|
+
if (!t)
|
|
156
|
+
throw new Error("Component must have a __name or name property");
|
|
157
|
+
const r = x(t), n = D(e);
|
|
158
|
+
customElements.get(r) || customElements.define(r, n);
|
|
159
|
+
}
|
|
160
|
+
R(S);
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
import { ref as I, getCurrentInstance as A, defineComponent as _, computed as y, createElementBlock as m, openBlock as l, normalizeClass as S, createElementVNode as w, normalizeStyle as k, createBlock as b, Fragment as $, createCommentVNode as v, toDisplayString as B, defineCustomElement as z } from "vue";
|
|
2
|
+
function O() {
|
|
3
|
+
const t = I(!1), n = A()?.root || {};
|
|
4
|
+
return "isCE" in n && n.isCE === !0 && (t.value = !0), t;
|
|
5
|
+
}
|
|
6
|
+
const j = [void 0, 10, 12, 20, 24, 32, 64], x = ["xlink:href"], P = /* @__PURE__ */ _({
|
|
7
|
+
__name: "PvIcon",
|
|
8
|
+
props: {
|
|
9
|
+
name: { type: String },
|
|
10
|
+
size: { type: null }
|
|
11
|
+
},
|
|
12
|
+
setup(t) {
|
|
13
|
+
const e = t, n = O(), s = I(null), r = y(() => ({
|
|
14
|
+
"pv-icon": !0,
|
|
15
|
+
[`pv-icon-${e.size}`]: j.includes(e.size)
|
|
16
|
+
})), c = y(() => n.value && s.value ? `${s.value}#${e.name}` : `#${e.name}`);
|
|
17
|
+
return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (s.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), (d, o) => (l(), m(
|
|
18
|
+
"svg",
|
|
19
|
+
{
|
|
20
|
+
"data-testid": "pv-icon",
|
|
21
|
+
"aria-hidden": "true",
|
|
22
|
+
class: S(r.value)
|
|
23
|
+
},
|
|
24
|
+
[
|
|
25
|
+
w("use", { "xlink:href": c.value }, null, 8, x)
|
|
26
|
+
],
|
|
27
|
+
2
|
|
28
|
+
/* CLASS */
|
|
29
|
+
));
|
|
30
|
+
}
|
|
31
|
+
}), T = /* @__PURE__ */ _({
|
|
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 (s, r) => (l(), m(
|
|
50
|
+
"div",
|
|
51
|
+
{
|
|
52
|
+
"data-testid": "pv-spinner",
|
|
53
|
+
class: S(n[t.variant]),
|
|
54
|
+
style: k({ "--size": e[t.size] })
|
|
55
|
+
},
|
|
56
|
+
null,
|
|
57
|
+
6
|
|
58
|
+
/* CLASS, STYLE */
|
|
59
|
+
));
|
|
60
|
+
}
|
|
61
|
+
}), N = ["ghost"], C = {
|
|
62
|
+
md: "pv-button-small",
|
|
63
|
+
lg: void 0,
|
|
64
|
+
xl: "pv-button-large"
|
|
65
|
+
}, L = (t) => t == null || !C.hasOwnProperty(t) ? null : C[t] || null, R = ["disabled"], D = {
|
|
66
|
+
key: 1,
|
|
67
|
+
"data-testid": "pv-button-label"
|
|
68
|
+
}, V = /* @__PURE__ */ _({
|
|
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 = y(() => {
|
|
82
|
+
const s = [];
|
|
83
|
+
e.inverse && N.includes(e.variant) ? s.push(`pv-button-${e.variant}-inverse`) : s.push(`pv-button-${e.variant}`);
|
|
84
|
+
const r = L(e.size);
|
|
85
|
+
return r && s.push(r), s;
|
|
86
|
+
});
|
|
87
|
+
return (s, r) => (l(), m("button", {
|
|
88
|
+
type: "button",
|
|
89
|
+
class: S(n.value),
|
|
90
|
+
disabled: t.disabled,
|
|
91
|
+
"data-testid": "pv-button"
|
|
92
|
+
}, [
|
|
93
|
+
t.loading ? (l(), b(T, {
|
|
94
|
+
key: 0,
|
|
95
|
+
size: "sm"
|
|
96
|
+
})) : (l(), m(
|
|
97
|
+
$,
|
|
98
|
+
{ key: 1 },
|
|
99
|
+
[
|
|
100
|
+
t.leftIcon ? (l(), b(P, {
|
|
101
|
+
key: 0,
|
|
102
|
+
name: t.leftIcon,
|
|
103
|
+
"data-testid": "pv-button-left-icon"
|
|
104
|
+
}, null, 8, ["name"])) : v("v-if", !0),
|
|
105
|
+
t.label ? (l(), m(
|
|
106
|
+
"span",
|
|
107
|
+
D,
|
|
108
|
+
B(t.label),
|
|
109
|
+
1
|
|
110
|
+
/* TEXT */
|
|
111
|
+
)) : v("v-if", !0),
|
|
112
|
+
t.rightIcon ? (l(), b(P, {
|
|
113
|
+
key: 2,
|
|
114
|
+
name: t.rightIcon,
|
|
115
|
+
"data-testid": "pv-button-right-icon"
|
|
116
|
+
}, null, 8, ["name"])) : v("v-if", !0)
|
|
117
|
+
],
|
|
118
|
+
64
|
|
119
|
+
/* STABLE_FRAGMENT */
|
|
120
|
+
))
|
|
121
|
+
], 10, R));
|
|
122
|
+
}
|
|
123
|
+
}), W = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
124
|
+
function H(t) {
|
|
125
|
+
return !W.has(t);
|
|
126
|
+
}
|
|
127
|
+
function g(t, e) {
|
|
128
|
+
const n = document.querySelector('link[href*="' + e + '"]');
|
|
129
|
+
if (!t.shadowRoot)
|
|
130
|
+
return !1;
|
|
131
|
+
if (n && t.shadowRoot) {
|
|
132
|
+
const s = n.href;
|
|
133
|
+
if (t.shadowRoot.querySelector(`link[href="${s}"]`))
|
|
134
|
+
return;
|
|
135
|
+
const r = document.createElement("link");
|
|
136
|
+
return r.rel = "stylesheet", r.href = s, t.shadowRoot.prepend(r), !0;
|
|
137
|
+
}
|
|
138
|
+
return !1;
|
|
139
|
+
}
|
|
140
|
+
function M(t) {
|
|
141
|
+
if (!g(t, "pit-viper-v2")) {
|
|
142
|
+
if (g(t, "pit-viper")) {
|
|
143
|
+
g(t, "pit-viper-v2-scoped");
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
console.warn(
|
|
147
|
+
"No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
const G = (t) => ({ shadowRoot: H(t) });
|
|
152
|
+
function J(t, e) {
|
|
153
|
+
return e === null ? !1 : e === "" || e === "true" ? !0 : (e === "false" || console.warn(
|
|
154
|
+
`Invalid boolean attribute value for "${t}": "${e}". Expected "true", "false", or empty string.`
|
|
155
|
+
), !1);
|
|
156
|
+
}
|
|
157
|
+
function q(t, e) {
|
|
158
|
+
const n = Number(e);
|
|
159
|
+
return isNaN(n) && console.warn(`Invalid number attribute value for "${t}": "${e}". Expected a valid number.`), n;
|
|
160
|
+
}
|
|
161
|
+
function U(t) {
|
|
162
|
+
const e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), c = (t.__vccOpts || t).props;
|
|
163
|
+
return c && typeof c == "object" && Object.entries(c).forEach(([d, o]) => {
|
|
164
|
+
o === Boolean || o && o.type === Boolean ? e.add(d) : o === Number || o && o.type === Number ? n.add(d) : (o === Object || o === Array || o && (o.type === Object || o.type === Array)) && s.add(d);
|
|
165
|
+
}), { booleanProps: e, numberProps: n, jsonProps: s };
|
|
166
|
+
}
|
|
167
|
+
function E(t, e) {
|
|
168
|
+
try {
|
|
169
|
+
return JSON.parse(e);
|
|
170
|
+
} catch (n) {
|
|
171
|
+
return console.warn(
|
|
172
|
+
`Invalid JSON attribute value for "${t}": "${e}". Error: ${n instanceof Error ? n.message : String(n)}`
|
|
173
|
+
), null;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
function Z(t) {
|
|
177
|
+
const e = t.__name || t.name;
|
|
178
|
+
if (!e)
|
|
179
|
+
throw new Error("Component must have a __name or name property");
|
|
180
|
+
const n = z(t, G(e)), { booleanProps: s, numberProps: r, jsonProps: c } = U(t);
|
|
181
|
+
class d extends n {
|
|
182
|
+
_hiddenInput = null;
|
|
183
|
+
constructor() {
|
|
184
|
+
super(), this._parseAttributes();
|
|
185
|
+
}
|
|
186
|
+
disconnectedCallback() {
|
|
187
|
+
this._hiddenInput?.remove(), super.disconnectedCallback?.();
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Update the hidden input value
|
|
191
|
+
* Call this from the Vue component to sync form value
|
|
192
|
+
*/
|
|
193
|
+
setHiddenInputValue(u) {
|
|
194
|
+
this._hiddenInput && (this._hiddenInput.value = u ?? "");
|
|
195
|
+
}
|
|
196
|
+
_parseAttributes() {
|
|
197
|
+
s.forEach((i) => {
|
|
198
|
+
const a = this.getAttribute(i);
|
|
199
|
+
this[i] = J(i, a);
|
|
200
|
+
}), r.forEach((i) => {
|
|
201
|
+
const a = this.getAttribute(i);
|
|
202
|
+
a !== null && (this[i] = q(i, a));
|
|
203
|
+
}), c.forEach((i) => {
|
|
204
|
+
const a = this.getAttribute(i);
|
|
205
|
+
if (a !== null) {
|
|
206
|
+
const p = E(i, a);
|
|
207
|
+
p !== null && (this[i] = p);
|
|
208
|
+
}
|
|
209
|
+
});
|
|
210
|
+
const u = this.getAttribute("data-json-props");
|
|
211
|
+
u && u.split(",").map((a) => a.trim()).filter(Boolean).forEach((a) => {
|
|
212
|
+
const p = a.replace(/-([a-z])/g, (f) => f[1].toUpperCase());
|
|
213
|
+
let h = this.getAttribute(a);
|
|
214
|
+
if (h === null) {
|
|
215
|
+
const f = p.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
216
|
+
h = this.getAttribute(f);
|
|
217
|
+
}
|
|
218
|
+
if (h !== null && !this[p]) {
|
|
219
|
+
const f = E(p, h);
|
|
220
|
+
f !== null && (this[p] = f);
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
connectedCallback() {
|
|
225
|
+
this._parseAttributes(), super.connectedCallback?.(), M(this);
|
|
226
|
+
const u = this.getAttribute("name");
|
|
227
|
+
u && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = u, this.after(this._hiddenInput));
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
return d;
|
|
231
|
+
}
|
|
232
|
+
function F(t) {
|
|
233
|
+
return t.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
234
|
+
}
|
|
235
|
+
function K(t) {
|
|
236
|
+
const e = t.__name || t.name;
|
|
237
|
+
if (!e)
|
|
238
|
+
throw new Error("Component must have a __name or name property");
|
|
239
|
+
const n = F(e), s = Z(t);
|
|
240
|
+
customElements.get(n) || customElements.define(n, s);
|
|
241
|
+
}
|
|
242
|
+
K(V);
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
import { defineComponent as v, computed as m, createBlock as y, openBlock as _, resolveDynamicComponent as C, normalizeClass as E, withCtx as g, renderSlot as w, defineCustomElement as A } from "vue";
|
|
2
|
+
const S = /* @__PURE__ */ v({
|
|
3
|
+
__name: "PvCard",
|
|
4
|
+
props: {
|
|
5
|
+
href: { type: String },
|
|
6
|
+
variant: { default: "primary", type: String },
|
|
7
|
+
interactive: { type: Boolean, default: !1 }
|
|
8
|
+
},
|
|
9
|
+
setup(t) {
|
|
10
|
+
const e = t, n = m(() => e.href ? "a" : e.interactive ? "button" : "div"), i = m(() => e.href || e.interactive ? "button" : "div");
|
|
11
|
+
return (a, l) => (_(), y(C(n.value), {
|
|
12
|
+
href: t.href,
|
|
13
|
+
type: i.value,
|
|
14
|
+
class: E([
|
|
15
|
+
"pv-card pv-inset-square-8 pv-inline-block",
|
|
16
|
+
{
|
|
17
|
+
"pv-card-secondary": t.variant === "secondary"
|
|
18
|
+
}
|
|
19
|
+
]),
|
|
20
|
+
"data-testid": "pv-card"
|
|
21
|
+
}, {
|
|
22
|
+
default: g(() => [
|
|
23
|
+
w(a.$slots, "default")
|
|
24
|
+
]),
|
|
25
|
+
_: 3
|
|
26
|
+
/* FORWARDED */
|
|
27
|
+
}, 8, ["href", "type", "class"]));
|
|
28
|
+
}
|
|
29
|
+
}), P = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
30
|
+
function I(t) {
|
|
31
|
+
return !P.has(t);
|
|
32
|
+
}
|
|
33
|
+
function h(t, e) {
|
|
34
|
+
const n = document.querySelector('link[href*="' + e + '"]');
|
|
35
|
+
if (!t.shadowRoot)
|
|
36
|
+
return !1;
|
|
37
|
+
if (n && t.shadowRoot) {
|
|
38
|
+
const i = n.href;
|
|
39
|
+
if (t.shadowRoot.querySelector(`link[href="${i}"]`))
|
|
40
|
+
return;
|
|
41
|
+
const a = document.createElement("link");
|
|
42
|
+
return a.rel = "stylesheet", a.href = i, t.shadowRoot.prepend(a), !0;
|
|
43
|
+
}
|
|
44
|
+
return !1;
|
|
45
|
+
}
|
|
46
|
+
function j(t) {
|
|
47
|
+
if (!h(t, "pit-viper-v2")) {
|
|
48
|
+
if (h(t, "pit-viper")) {
|
|
49
|
+
h(t, "pit-viper-v2-scoped");
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
console.warn(
|
|
53
|
+
"No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
|
|
54
|
+
);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
const O = (t) => ({ shadowRoot: I(t) });
|
|
58
|
+
function k(t, e) {
|
|
59
|
+
return e === null ? !1 : e === "" || e === "true" ? !0 : (e === "false" || console.warn(
|
|
60
|
+
`Invalid boolean attribute value for "${t}": "${e}". Expected "true", "false", or empty string.`
|
|
61
|
+
), !1);
|
|
62
|
+
}
|
|
63
|
+
function $(t, e) {
|
|
64
|
+
const n = Number(e);
|
|
65
|
+
return isNaN(n) && console.warn(`Invalid number attribute value for "${t}": "${e}". Expected a valid number.`), n;
|
|
66
|
+
}
|
|
67
|
+
function N(t) {
|
|
68
|
+
const e = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), l = (t.__vccOpts || t).props;
|
|
69
|
+
return l && typeof l == "object" && Object.entries(l).forEach(([f, r]) => {
|
|
70
|
+
r === Boolean || r && r.type === Boolean ? e.add(f) : r === Number || r && r.type === Number ? n.add(f) : (r === Object || r === Array || r && (r.type === Object || r.type === Array)) && i.add(f);
|
|
71
|
+
}), { booleanProps: e, numberProps: n, jsonProps: i };
|
|
72
|
+
}
|
|
73
|
+
function b(t, e) {
|
|
74
|
+
try {
|
|
75
|
+
return JSON.parse(e);
|
|
76
|
+
} catch (n) {
|
|
77
|
+
return console.warn(
|
|
78
|
+
`Invalid JSON attribute value for "${t}": "${e}". Error: ${n instanceof Error ? n.message : String(n)}`
|
|
79
|
+
), null;
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
function B(t) {
|
|
83
|
+
const e = t.__name || t.name;
|
|
84
|
+
if (!e)
|
|
85
|
+
throw new Error("Component must have a __name or name property");
|
|
86
|
+
const n = A(t, O(e)), { booleanProps: i, numberProps: a, jsonProps: l } = N(t);
|
|
87
|
+
class f extends n {
|
|
88
|
+
_hiddenInput = null;
|
|
89
|
+
constructor() {
|
|
90
|
+
super(), this._parseAttributes();
|
|
91
|
+
}
|
|
92
|
+
disconnectedCallback() {
|
|
93
|
+
this._hiddenInput?.remove(), super.disconnectedCallback?.();
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Update the hidden input value
|
|
97
|
+
* Call this from the Vue component to sync form value
|
|
98
|
+
*/
|
|
99
|
+
setHiddenInputValue(c) {
|
|
100
|
+
this._hiddenInput && (this._hiddenInput.value = c ?? "");
|
|
101
|
+
}
|
|
102
|
+
_parseAttributes() {
|
|
103
|
+
i.forEach((o) => {
|
|
104
|
+
const s = this.getAttribute(o);
|
|
105
|
+
this[o] = k(o, s);
|
|
106
|
+
}), a.forEach((o) => {
|
|
107
|
+
const s = this.getAttribute(o);
|
|
108
|
+
s !== null && (this[o] = $(o, s));
|
|
109
|
+
}), l.forEach((o) => {
|
|
110
|
+
const s = this.getAttribute(o);
|
|
111
|
+
if (s !== null) {
|
|
112
|
+
const u = b(o, s);
|
|
113
|
+
u !== null && (this[o] = u);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
const c = this.getAttribute("data-json-props");
|
|
117
|
+
c && c.split(",").map((s) => s.trim()).filter(Boolean).forEach((s) => {
|
|
118
|
+
const u = s.replace(/-([a-z])/g, (p) => p[1].toUpperCase());
|
|
119
|
+
let d = this.getAttribute(s);
|
|
120
|
+
if (d === null) {
|
|
121
|
+
const p = u.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
122
|
+
d = this.getAttribute(p);
|
|
123
|
+
}
|
|
124
|
+
if (d !== null && !this[u]) {
|
|
125
|
+
const p = b(u, d);
|
|
126
|
+
p !== null && (this[u] = p);
|
|
127
|
+
}
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
connectedCallback() {
|
|
131
|
+
this._parseAttributes(), super.connectedCallback?.(), j(this);
|
|
132
|
+
const c = this.getAttribute("name");
|
|
133
|
+
c && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = c, this.after(this._hiddenInput));
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return f;
|
|
137
|
+
}
|
|
138
|
+
function D(t) {
|
|
139
|
+
return t.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
140
|
+
}
|
|
141
|
+
function R(t) {
|
|
142
|
+
const e = t.__name || t.name;
|
|
143
|
+
if (!e)
|
|
144
|
+
throw new Error("Component must have a __name or name property");
|
|
145
|
+
const n = D(e), i = B(t);
|
|
146
|
+
customElements.get(n) || customElements.define(n, i);
|
|
147
|
+
}
|
|
148
|
+
R(S);
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { defineComponent as b, mergeModels as _, useModel as v, withDirectives as y, createElementBlock as E, openBlock as w, vModelCheckbox as C, defineCustomElement as g } from "vue";
|
|
2
|
+
const A = ["disabled", "indeterminate"], P = /* @__PURE__ */ b({
|
|
3
|
+
__name: "PvCheckbox",
|
|
4
|
+
props: /* @__PURE__ */ _({
|
|
5
|
+
disabled: { type: Boolean },
|
|
6
|
+
indeterminate: { type: Boolean }
|
|
7
|
+
}, {
|
|
8
|
+
modelValue: { type: Boolean },
|
|
9
|
+
modelModifiers: {}
|
|
10
|
+
}),
|
|
11
|
+
emits: ["update:modelValue"],
|
|
12
|
+
setup(e) {
|
|
13
|
+
const t = v(e, "modelValue");
|
|
14
|
+
return (n, o) => y((w(), E("input", {
|
|
15
|
+
ref: "checkbox-ref",
|
|
16
|
+
"onUpdate:modelValue": o[0] || (o[0] = (a) => t.value = a),
|
|
17
|
+
class: "pv-checkbox",
|
|
18
|
+
type: "checkbox",
|
|
19
|
+
name: "checkbox",
|
|
20
|
+
disabled: e.disabled,
|
|
21
|
+
indeterminate: e.indeterminate
|
|
22
|
+
}, null, 8, A)), [
|
|
23
|
+
[C, t.value]
|
|
24
|
+
]);
|
|
25
|
+
}
|
|
26
|
+
}), k = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
27
|
+
function S(e) {
|
|
28
|
+
return !k.has(e);
|
|
29
|
+
}
|
|
30
|
+
function h(e, t) {
|
|
31
|
+
const n = document.querySelector('link[href*="' + t + '"]');
|
|
32
|
+
if (!e.shadowRoot)
|
|
33
|
+
return !1;
|
|
34
|
+
if (n && e.shadowRoot) {
|
|
35
|
+
const o = n.href;
|
|
36
|
+
if (e.shadowRoot.querySelector(`link[href="${o}"]`))
|
|
37
|
+
return;
|
|
38
|
+
const a = document.createElement("link");
|
|
39
|
+
return a.rel = "stylesheet", a.href = o, e.shadowRoot.prepend(a), !0;
|
|
40
|
+
}
|
|
41
|
+
return !1;
|
|
42
|
+
}
|
|
43
|
+
function I(e) {
|
|
44
|
+
if (!h(e, "pit-viper-v2")) {
|
|
45
|
+
if (h(e, "pit-viper")) {
|
|
46
|
+
h(e, "pit-viper-v2-scoped");
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
console.warn(
|
|
50
|
+
"No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
|
|
51
|
+
);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
const j = (e) => ({ shadowRoot: S(e) });
|
|
55
|
+
function O(e, t) {
|
|
56
|
+
return t === null ? !1 : t === "" || t === "true" ? !0 : (t === "false" || console.warn(
|
|
57
|
+
`Invalid boolean attribute value for "${e}": "${t}". Expected "true", "false", or empty string.`
|
|
58
|
+
), !1);
|
|
59
|
+
}
|
|
60
|
+
function x(e, t) {
|
|
61
|
+
const n = Number(t);
|
|
62
|
+
return isNaN(n) && console.warn(`Invalid number attribute value for "${e}": "${t}". Expected a valid number.`), n;
|
|
63
|
+
}
|
|
64
|
+
function B(e) {
|
|
65
|
+
const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), d = (e.__vccOpts || e).props;
|
|
66
|
+
return d && typeof d == "object" && Object.entries(d).forEach(([p, r]) => {
|
|
67
|
+
r === Boolean || r && r.type === Boolean ? t.add(p) : r === Number || r && r.type === Number ? n.add(p) : (r === Object || r === Array || r && (r.type === Object || r.type === Array)) && o.add(p);
|
|
68
|
+
}), { booleanProps: t, numberProps: n, jsonProps: o };
|
|
69
|
+
}
|
|
70
|
+
function m(e, t) {
|
|
71
|
+
try {
|
|
72
|
+
return JSON.parse(t);
|
|
73
|
+
} catch (n) {
|
|
74
|
+
return console.warn(
|
|
75
|
+
`Invalid JSON attribute value for "${e}": "${t}". Error: ${n instanceof Error ? n.message : String(n)}`
|
|
76
|
+
), null;
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function $(e) {
|
|
80
|
+
const t = e.__name || e.name;
|
|
81
|
+
if (!t)
|
|
82
|
+
throw new Error("Component must have a __name or name property");
|
|
83
|
+
const n = g(e, j(t)), { booleanProps: o, numberProps: a, jsonProps: d } = B(e);
|
|
84
|
+
class p extends n {
|
|
85
|
+
_hiddenInput = null;
|
|
86
|
+
constructor() {
|
|
87
|
+
super(), this._parseAttributes();
|
|
88
|
+
}
|
|
89
|
+
disconnectedCallback() {
|
|
90
|
+
this._hiddenInput?.remove(), super.disconnectedCallback?.();
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Update the hidden input value
|
|
94
|
+
* Call this from the Vue component to sync form value
|
|
95
|
+
*/
|
|
96
|
+
setHiddenInputValue(c) {
|
|
97
|
+
this._hiddenInput && (this._hiddenInput.value = c ?? "");
|
|
98
|
+
}
|
|
99
|
+
_parseAttributes() {
|
|
100
|
+
o.forEach((s) => {
|
|
101
|
+
const i = this.getAttribute(s);
|
|
102
|
+
this[s] = O(s, i);
|
|
103
|
+
}), a.forEach((s) => {
|
|
104
|
+
const i = this.getAttribute(s);
|
|
105
|
+
i !== null && (this[s] = x(s, i));
|
|
106
|
+
}), d.forEach((s) => {
|
|
107
|
+
const i = this.getAttribute(s);
|
|
108
|
+
if (i !== null) {
|
|
109
|
+
const u = m(s, i);
|
|
110
|
+
u !== null && (this[s] = u);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
const c = this.getAttribute("data-json-props");
|
|
114
|
+
c && c.split(",").map((i) => i.trim()).filter(Boolean).forEach((i) => {
|
|
115
|
+
const u = i.replace(/-([a-z])/g, (l) => l[1].toUpperCase());
|
|
116
|
+
let f = this.getAttribute(i);
|
|
117
|
+
if (f === null) {
|
|
118
|
+
const l = u.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
119
|
+
f = this.getAttribute(l);
|
|
120
|
+
}
|
|
121
|
+
if (f !== null && !this[u]) {
|
|
122
|
+
const l = m(u, f);
|
|
123
|
+
l !== null && (this[u] = l);
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
connectedCallback() {
|
|
128
|
+
this._parseAttributes(), super.connectedCallback?.(), I(this);
|
|
129
|
+
const c = this.getAttribute("name");
|
|
130
|
+
c && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = c, this.after(this._hiddenInput));
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
return p;
|
|
134
|
+
}
|
|
135
|
+
function N(e) {
|
|
136
|
+
return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
137
|
+
}
|
|
138
|
+
function M(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 n = N(t), o = $(e);
|
|
143
|
+
customElements.get(n) || customElements.define(n, o);
|
|
144
|
+
}
|
|
145
|
+
M(P);
|