@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,188 @@
|
|
|
1
|
+
import { defineComponent as g, mergeModels as w, useModel as E, createElementBlock as h, openBlock as m, Fragment as S, createCommentVNode as v, withDirectives as A, renderSlot as C, createElementVNode as P, mergeProps as k, vModelText as I, normalizeClass as j, toDisplayString as $, defineCustomElement as N } from "vue";
|
|
2
|
+
const O = ["for"], x = ["rows", "disabled", "placeholder", "id", "data-invalid"], B = /* @__PURE__ */ g({
|
|
3
|
+
__name: "PvTextArea",
|
|
4
|
+
props: /* @__PURE__ */ w({
|
|
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 t = E(e, "modelValue");
|
|
19
|
+
return (r, n) => (m(), h(
|
|
20
|
+
S,
|
|
21
|
+
null,
|
|
22
|
+
[
|
|
23
|
+
r.$slots.label ? (m(), h("label", {
|
|
24
|
+
key: 0,
|
|
25
|
+
class: "pv-label pv-stack-8",
|
|
26
|
+
for: e.id
|
|
27
|
+
}, [
|
|
28
|
+
C(r.$slots, "label")
|
|
29
|
+
], 8, O)) : v("v-if", !0),
|
|
30
|
+
A(P("textarea", k(r.$attrs, {
|
|
31
|
+
"onUpdate:modelValue": n[0] || (n[0] = (a) => t.value = a),
|
|
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, x), [
|
|
45
|
+
[I, t.value]
|
|
46
|
+
]),
|
|
47
|
+
e.lowerLabel ? (m(), h(
|
|
48
|
+
"p",
|
|
49
|
+
{
|
|
50
|
+
key: 1,
|
|
51
|
+
style: { "margin-left": "12px" },
|
|
52
|
+
class: j([
|
|
53
|
+
"pv-text-body-xs",
|
|
54
|
+
{
|
|
55
|
+
"pv-text-red": e.error,
|
|
56
|
+
"pv-text-subdued": !e.error
|
|
57
|
+
}
|
|
58
|
+
])
|
|
59
|
+
},
|
|
60
|
+
$(e.lowerLabel),
|
|
61
|
+
3
|
|
62
|
+
/* TEXT, CLASS */
|
|
63
|
+
)) : v("v-if", !0)
|
|
64
|
+
],
|
|
65
|
+
64
|
|
66
|
+
/* STABLE_FRAGMENT */
|
|
67
|
+
));
|
|
68
|
+
}
|
|
69
|
+
}), M = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
70
|
+
function D(e) {
|
|
71
|
+
return !M.has(e);
|
|
72
|
+
}
|
|
73
|
+
function b(e, t) {
|
|
74
|
+
const r = document.querySelector('link[href*="' + t + '"]');
|
|
75
|
+
if (!e.shadowRoot)
|
|
76
|
+
return !1;
|
|
77
|
+
if (r && e.shadowRoot) {
|
|
78
|
+
const n = r.href;
|
|
79
|
+
if (e.shadowRoot.querySelector(`link[href="${n}"]`))
|
|
80
|
+
return;
|
|
81
|
+
const a = document.createElement("link");
|
|
82
|
+
return a.rel = "stylesheet", a.href = n, e.shadowRoot.prepend(a), !0;
|
|
83
|
+
}
|
|
84
|
+
return !1;
|
|
85
|
+
}
|
|
86
|
+
function L(e) {
|
|
87
|
+
if (!b(e, "pit-viper-v2")) {
|
|
88
|
+
if (b(e, "pit-viper")) {
|
|
89
|
+
b(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 V = (e) => ({ shadowRoot: D(e) });
|
|
98
|
+
function R(e, t) {
|
|
99
|
+
return t === null ? !1 : t === "" || t === "true" ? !0 : (t === "false" || console.warn(
|
|
100
|
+
`Invalid boolean attribute value for "${e}": "${t}". Expected "true", "false", or empty string.`
|
|
101
|
+
), !1);
|
|
102
|
+
}
|
|
103
|
+
function T(e, t) {
|
|
104
|
+
const r = Number(t);
|
|
105
|
+
return isNaN(r) && console.warn(`Invalid number attribute value for "${e}": "${t}". Expected a valid number.`), r;
|
|
106
|
+
}
|
|
107
|
+
function _(e) {
|
|
108
|
+
const t = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), d = (e.__vccOpts || e).props;
|
|
109
|
+
return d && typeof d == "object" && Object.entries(d).forEach(([f, o]) => {
|
|
110
|
+
o === Boolean || o && o.type === Boolean ? t.add(f) : o === Number || o && o.type === Number ? r.add(f) : (o === Object || o === Array || o && (o.type === Object || o.type === Array)) && n.add(f);
|
|
111
|
+
}), { booleanProps: t, numberProps: r, jsonProps: n };
|
|
112
|
+
}
|
|
113
|
+
function y(e, t) {
|
|
114
|
+
try {
|
|
115
|
+
return JSON.parse(t);
|
|
116
|
+
} catch (r) {
|
|
117
|
+
return console.warn(
|
|
118
|
+
`Invalid JSON attribute value for "${e}": "${t}". Error: ${r instanceof Error ? r.message : String(r)}`
|
|
119
|
+
), null;
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
function J(e) {
|
|
123
|
+
const t = e.__name || e.name;
|
|
124
|
+
if (!t)
|
|
125
|
+
throw new Error("Component must have a __name or name property");
|
|
126
|
+
const r = N(e, V(t)), { booleanProps: n, numberProps: a, jsonProps: d } = _(e);
|
|
127
|
+
class f extends r {
|
|
128
|
+
_hiddenInput = null;
|
|
129
|
+
constructor() {
|
|
130
|
+
super(), this._parseAttributes();
|
|
131
|
+
}
|
|
132
|
+
disconnectedCallback() {
|
|
133
|
+
this._hiddenInput?.remove(), super.disconnectedCallback?.();
|
|
134
|
+
}
|
|
135
|
+
/**
|
|
136
|
+
* Update the hidden input value
|
|
137
|
+
* Call this from the Vue component to sync form value
|
|
138
|
+
*/
|
|
139
|
+
setHiddenInputValue(l) {
|
|
140
|
+
this._hiddenInput && (this._hiddenInput.value = l ?? "");
|
|
141
|
+
}
|
|
142
|
+
_parseAttributes() {
|
|
143
|
+
n.forEach((s) => {
|
|
144
|
+
const i = this.getAttribute(s);
|
|
145
|
+
this[s] = R(s, i);
|
|
146
|
+
}), a.forEach((s) => {
|
|
147
|
+
const i = this.getAttribute(s);
|
|
148
|
+
i !== null && (this[s] = T(s, i));
|
|
149
|
+
}), d.forEach((s) => {
|
|
150
|
+
const i = this.getAttribute(s);
|
|
151
|
+
if (i !== null) {
|
|
152
|
+
const c = y(s, i);
|
|
153
|
+
c !== null && (this[s] = c);
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
const l = this.getAttribute("data-json-props");
|
|
157
|
+
l && l.split(",").map((i) => i.trim()).filter(Boolean).forEach((i) => {
|
|
158
|
+
const c = i.replace(/-([a-z])/g, (u) => u[1].toUpperCase());
|
|
159
|
+
let p = this.getAttribute(i);
|
|
160
|
+
if (p === null) {
|
|
161
|
+
const u = c.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
162
|
+
p = this.getAttribute(u);
|
|
163
|
+
}
|
|
164
|
+
if (p !== null && !this[c]) {
|
|
165
|
+
const u = y(c, p);
|
|
166
|
+
u !== null && (this[c] = u);
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
connectedCallback() {
|
|
171
|
+
this._parseAttributes(), super.connectedCallback?.(), L(this);
|
|
172
|
+
const l = this.getAttribute("name");
|
|
173
|
+
l && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = l, this.after(this._hiddenInput));
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return f;
|
|
177
|
+
}
|
|
178
|
+
function U(e) {
|
|
179
|
+
return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
180
|
+
}
|
|
181
|
+
function W(e) {
|
|
182
|
+
const t = e.__name || e.name;
|
|
183
|
+
if (!t)
|
|
184
|
+
throw new Error("Component must have a __name or name property");
|
|
185
|
+
const r = U(t), n = J(e);
|
|
186
|
+
customElements.get(r) || customElements.define(r, n);
|
|
187
|
+
}
|
|
188
|
+
W(B);
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
import { ref as k, getCurrentInstance as w, defineComponent as v, computed as _, createElementBlock as m, openBlock as l, normalizeClass as b, createElementVNode as A, normalizeStyle as z, createBlock as g, Fragment as B, createCommentVNode as y, toDisplayString as $, createVNode as C, renderSlot as O, defineCustomElement as T } from "vue";
|
|
2
|
+
function j() {
|
|
3
|
+
const e = k(!1), n = w()?.root || {};
|
|
4
|
+
return "isCE" in n && n.isCE === !0 && (e.value = !0), e;
|
|
5
|
+
}
|
|
6
|
+
const x = [void 0, 10, 12, 20, 24, 32, 64], N = ["xlink:href"], P = /* @__PURE__ */ v({
|
|
7
|
+
__name: "PvIcon",
|
|
8
|
+
props: {
|
|
9
|
+
name: { type: String },
|
|
10
|
+
size: { type: null }
|
|
11
|
+
},
|
|
12
|
+
setup(e) {
|
|
13
|
+
const t = e, n = j(), s = k(null), r = _(() => ({
|
|
14
|
+
"pv-icon": !0,
|
|
15
|
+
[`pv-icon-${t.size}`]: x.includes(t.size)
|
|
16
|
+
})), c = _(() => n.value && s.value ? `${s.value}#${t.name}` : `#${t.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: b(r.value)
|
|
23
|
+
},
|
|
24
|
+
[
|
|
25
|
+
A("use", { "xlink:href": c.value }, null, 8, N)
|
|
26
|
+
],
|
|
27
|
+
2
|
|
28
|
+
/* CLASS */
|
|
29
|
+
));
|
|
30
|
+
}
|
|
31
|
+
}), V = /* @__PURE__ */ v({
|
|
32
|
+
__name: "PvSpinner",
|
|
33
|
+
props: {
|
|
34
|
+
variant: { default: "primary", type: String },
|
|
35
|
+
size: { default: "lg", type: String }
|
|
36
|
+
},
|
|
37
|
+
setup(e) {
|
|
38
|
+
const t = {
|
|
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: b(n[e.variant]),
|
|
54
|
+
style: z({ "--size": t[e.size] })
|
|
55
|
+
},
|
|
56
|
+
null,
|
|
57
|
+
6
|
|
58
|
+
/* CLASS, STYLE */
|
|
59
|
+
));
|
|
60
|
+
}
|
|
61
|
+
}), L = ["ghost"], E = {
|
|
62
|
+
md: "pv-button-small",
|
|
63
|
+
lg: void 0,
|
|
64
|
+
xl: "pv-button-large"
|
|
65
|
+
}, R = (e) => e == null || !E.hasOwnProperty(e) ? null : E[e] || null, D = ["disabled"], W = {
|
|
66
|
+
key: 1,
|
|
67
|
+
"data-testid": "pv-button-label"
|
|
68
|
+
}, H = /* @__PURE__ */ v({
|
|
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(e) {
|
|
81
|
+
const t = e, n = _(() => {
|
|
82
|
+
const s = [];
|
|
83
|
+
t.inverse && L.includes(t.variant) ? s.push(`pv-button-${t.variant}-inverse`) : s.push(`pv-button-${t.variant}`);
|
|
84
|
+
const r = R(t.size);
|
|
85
|
+
return r && s.push(r), s;
|
|
86
|
+
});
|
|
87
|
+
return (s, r) => (l(), m("button", {
|
|
88
|
+
type: "button",
|
|
89
|
+
class: b(n.value),
|
|
90
|
+
disabled: e.disabled,
|
|
91
|
+
"data-testid": "pv-button"
|
|
92
|
+
}, [
|
|
93
|
+
e.loading ? (l(), g(V, {
|
|
94
|
+
key: 0,
|
|
95
|
+
size: "sm"
|
|
96
|
+
})) : (l(), m(
|
|
97
|
+
B,
|
|
98
|
+
{ key: 1 },
|
|
99
|
+
[
|
|
100
|
+
e.leftIcon ? (l(), g(P, {
|
|
101
|
+
key: 0,
|
|
102
|
+
name: e.leftIcon,
|
|
103
|
+
"data-testid": "pv-button-left-icon"
|
|
104
|
+
}, null, 8, ["name"])) : y("v-if", !0),
|
|
105
|
+
e.label ? (l(), m(
|
|
106
|
+
"span",
|
|
107
|
+
W,
|
|
108
|
+
$(e.label),
|
|
109
|
+
1
|
|
110
|
+
/* TEXT */
|
|
111
|
+
)) : y("v-if", !0),
|
|
112
|
+
e.rightIcon ? (l(), g(P, {
|
|
113
|
+
key: 2,
|
|
114
|
+
name: e.rightIcon,
|
|
115
|
+
"data-testid": "pv-button-right-icon"
|
|
116
|
+
}, null, 8, ["name"])) : y("v-if", !0)
|
|
117
|
+
],
|
|
118
|
+
64
|
|
119
|
+
/* STABLE_FRAGMENT */
|
|
120
|
+
))
|
|
121
|
+
], 10, D));
|
|
122
|
+
}
|
|
123
|
+
}), M = { class: "pv-text-body-md" }, G = /* @__PURE__ */ v({
|
|
124
|
+
__name: "PvToast",
|
|
125
|
+
props: {
|
|
126
|
+
variant: { default: "info", type: String },
|
|
127
|
+
icon: { type: String },
|
|
128
|
+
label: { type: String }
|
|
129
|
+
},
|
|
130
|
+
emits: ["handle-close"],
|
|
131
|
+
setup(e) {
|
|
132
|
+
const t = {
|
|
133
|
+
info: "pv-toast-info",
|
|
134
|
+
success: "pv-toast-success",
|
|
135
|
+
error: "pv-toast-error",
|
|
136
|
+
dark: "pv-toast-dark"
|
|
137
|
+
}, n = {
|
|
138
|
+
info: "check-circle",
|
|
139
|
+
success: "check-circle",
|
|
140
|
+
error: "alert-circle",
|
|
141
|
+
dark: "ai"
|
|
142
|
+
};
|
|
143
|
+
return (s, r) => (l(), m(
|
|
144
|
+
"div",
|
|
145
|
+
{
|
|
146
|
+
class: b(t[e.variant])
|
|
147
|
+
},
|
|
148
|
+
[
|
|
149
|
+
C(P, {
|
|
150
|
+
name: e.icon ? e.icon : n[e.variant],
|
|
151
|
+
size: 20
|
|
152
|
+
}, null, 8, ["name"]),
|
|
153
|
+
A(
|
|
154
|
+
"p",
|
|
155
|
+
M,
|
|
156
|
+
$(e.label),
|
|
157
|
+
1
|
|
158
|
+
/* TEXT */
|
|
159
|
+
),
|
|
160
|
+
O(s.$slots, "default"),
|
|
161
|
+
C(H, {
|
|
162
|
+
variant: "ghost",
|
|
163
|
+
inverse: e.variant === "dark",
|
|
164
|
+
size: "lg",
|
|
165
|
+
"left-icon": "close",
|
|
166
|
+
onClick: r[0] || (r[0] = (c) => s.$emit("handle-close"))
|
|
167
|
+
}, null, 8, ["inverse"])
|
|
168
|
+
],
|
|
169
|
+
2
|
|
170
|
+
/* CLASS */
|
|
171
|
+
));
|
|
172
|
+
}
|
|
173
|
+
}), J = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
174
|
+
function q(e) {
|
|
175
|
+
return !J.has(e);
|
|
176
|
+
}
|
|
177
|
+
function S(e, t) {
|
|
178
|
+
const n = document.querySelector('link[href*="' + t + '"]');
|
|
179
|
+
if (!e.shadowRoot)
|
|
180
|
+
return !1;
|
|
181
|
+
if (n && e.shadowRoot) {
|
|
182
|
+
const s = n.href;
|
|
183
|
+
if (e.shadowRoot.querySelector(`link[href="${s}"]`))
|
|
184
|
+
return;
|
|
185
|
+
const r = document.createElement("link");
|
|
186
|
+
return r.rel = "stylesheet", r.href = s, e.shadowRoot.prepend(r), !0;
|
|
187
|
+
}
|
|
188
|
+
return !1;
|
|
189
|
+
}
|
|
190
|
+
function U(e) {
|
|
191
|
+
if (!S(e, "pit-viper-v2")) {
|
|
192
|
+
if (S(e, "pit-viper")) {
|
|
193
|
+
S(e, "pit-viper-v2-scoped");
|
|
194
|
+
return;
|
|
195
|
+
}
|
|
196
|
+
console.warn(
|
|
197
|
+
"No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
|
|
198
|
+
);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
const Z = (e) => ({ shadowRoot: q(e) });
|
|
202
|
+
function F(e, t) {
|
|
203
|
+
return t === null ? !1 : t === "" || t === "true" ? !0 : (t === "false" || console.warn(
|
|
204
|
+
`Invalid boolean attribute value for "${e}": "${t}". Expected "true", "false", or empty string.`
|
|
205
|
+
), !1);
|
|
206
|
+
}
|
|
207
|
+
function K(e, t) {
|
|
208
|
+
const n = Number(t);
|
|
209
|
+
return isNaN(n) && console.warn(`Invalid number attribute value for "${e}": "${t}". Expected a valid number.`), n;
|
|
210
|
+
}
|
|
211
|
+
function Q(e) {
|
|
212
|
+
const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Set(), c = (e.__vccOpts || e).props;
|
|
213
|
+
return c && typeof c == "object" && Object.entries(c).forEach(([d, o]) => {
|
|
214
|
+
o === Boolean || o && o.type === Boolean ? t.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);
|
|
215
|
+
}), { booleanProps: t, numberProps: n, jsonProps: s };
|
|
216
|
+
}
|
|
217
|
+
function I(e, t) {
|
|
218
|
+
try {
|
|
219
|
+
return JSON.parse(t);
|
|
220
|
+
} catch (n) {
|
|
221
|
+
return console.warn(
|
|
222
|
+
`Invalid JSON attribute value for "${e}": "${t}". Error: ${n instanceof Error ? n.message : String(n)}`
|
|
223
|
+
), null;
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
function X(e) {
|
|
227
|
+
const t = e.__name || e.name;
|
|
228
|
+
if (!t)
|
|
229
|
+
throw new Error("Component must have a __name or name property");
|
|
230
|
+
const n = T(e, Z(t)), { booleanProps: s, numberProps: r, jsonProps: c } = Q(e);
|
|
231
|
+
class d extends n {
|
|
232
|
+
_hiddenInput = null;
|
|
233
|
+
constructor() {
|
|
234
|
+
super(), this._parseAttributes();
|
|
235
|
+
}
|
|
236
|
+
disconnectedCallback() {
|
|
237
|
+
this._hiddenInput?.remove(), super.disconnectedCallback?.();
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Update the hidden input value
|
|
241
|
+
* Call this from the Vue component to sync form value
|
|
242
|
+
*/
|
|
243
|
+
setHiddenInputValue(u) {
|
|
244
|
+
this._hiddenInput && (this._hiddenInput.value = u ?? "");
|
|
245
|
+
}
|
|
246
|
+
_parseAttributes() {
|
|
247
|
+
s.forEach((i) => {
|
|
248
|
+
const a = this.getAttribute(i);
|
|
249
|
+
this[i] = F(i, a);
|
|
250
|
+
}), r.forEach((i) => {
|
|
251
|
+
const a = this.getAttribute(i);
|
|
252
|
+
a !== null && (this[i] = K(i, a));
|
|
253
|
+
}), c.forEach((i) => {
|
|
254
|
+
const a = this.getAttribute(i);
|
|
255
|
+
if (a !== null) {
|
|
256
|
+
const p = I(i, a);
|
|
257
|
+
p !== null && (this[i] = p);
|
|
258
|
+
}
|
|
259
|
+
});
|
|
260
|
+
const u = this.getAttribute("data-json-props");
|
|
261
|
+
u && u.split(",").map((a) => a.trim()).filter(Boolean).forEach((a) => {
|
|
262
|
+
const p = a.replace(/-([a-z])/g, (f) => f[1].toUpperCase());
|
|
263
|
+
let h = this.getAttribute(a);
|
|
264
|
+
if (h === null) {
|
|
265
|
+
const f = p.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
266
|
+
h = this.getAttribute(f);
|
|
267
|
+
}
|
|
268
|
+
if (h !== null && !this[p]) {
|
|
269
|
+
const f = I(p, h);
|
|
270
|
+
f !== null && (this[p] = f);
|
|
271
|
+
}
|
|
272
|
+
});
|
|
273
|
+
}
|
|
274
|
+
connectedCallback() {
|
|
275
|
+
this._parseAttributes(), super.connectedCallback?.(), U(this);
|
|
276
|
+
const u = this.getAttribute("name");
|
|
277
|
+
u && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = u, this.after(this._hiddenInput));
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
return d;
|
|
281
|
+
}
|
|
282
|
+
function Y(e) {
|
|
283
|
+
return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
284
|
+
}
|
|
285
|
+
function ee(e) {
|
|
286
|
+
const t = e.__name || e.name;
|
|
287
|
+
if (!t)
|
|
288
|
+
throw new Error("Component must have a __name or name property");
|
|
289
|
+
const n = Y(t), s = X(e);
|
|
290
|
+
customElements.get(n) || customElements.define(n, s);
|
|
291
|
+
}
|
|
292
|
+
ee(G);
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
import { ref as E, getCurrentInstance as A, defineComponent as I, computed as h, createElementBlock as g, openBlock as p, normalizeClass as P, createElementVNode as C, mergeModels as w, useModel as $, withDirectives as k, createBlock as y, createCommentVNode as b, vModelDynamic as B, toDisplayString as O, defineCustomElement as j } from "vue";
|
|
2
|
+
function x() {
|
|
3
|
+
const e = E(!1), n = A()?.root || {};
|
|
4
|
+
return "isCE" in n && n.isCE === !0 && (e.value = !0), e;
|
|
5
|
+
}
|
|
6
|
+
const N = [void 0, 10, 12, 20, 24, 32, 64], M = ["xlink:href"], S = /* @__PURE__ */ I({
|
|
7
|
+
__name: "PvIcon",
|
|
8
|
+
props: {
|
|
9
|
+
name: { type: String },
|
|
10
|
+
size: { type: null }
|
|
11
|
+
},
|
|
12
|
+
setup(e) {
|
|
13
|
+
const t = e, n = x(), o = E(null), a = h(() => ({
|
|
14
|
+
"pv-icon": !0,
|
|
15
|
+
[`pv-icon-${t.size}`]: N.includes(t.size)
|
|
16
|
+
})), l = h(() => n.value && o.value ? `${o.value}#${t.name}` : `#${t.name}`);
|
|
17
|
+
return globalThis.__PV_GLOBAL_SPRITE_PATH__ && (o.value = globalThis.__PV_GLOBAL_SPRITE_PATH__), (c, r) => (p(), g(
|
|
18
|
+
"svg",
|
|
19
|
+
{
|
|
20
|
+
"data-testid": "pv-icon",
|
|
21
|
+
"aria-hidden": "true",
|
|
22
|
+
class: P(a.value)
|
|
23
|
+
},
|
|
24
|
+
[
|
|
25
|
+
C("use", { "xlink:href": l.value }, null, 8, M)
|
|
26
|
+
],
|
|
27
|
+
2
|
|
28
|
+
/* CLASS */
|
|
29
|
+
));
|
|
30
|
+
}
|
|
31
|
+
}), T = ["for"], V = ["id", "type", "value", "name", "disabled"], z = { key: 1 }, D = /* @__PURE__ */ I({
|
|
32
|
+
__name: "PvToggleButton",
|
|
33
|
+
props: /* @__PURE__ */ w({
|
|
34
|
+
size: { default: "xl", type: String },
|
|
35
|
+
variant: { default: "secondary", type: String },
|
|
36
|
+
rounded: { type: Boolean },
|
|
37
|
+
disabled: { type: Boolean },
|
|
38
|
+
value: { type: String },
|
|
39
|
+
label: { type: String },
|
|
40
|
+
leftIcon: { type: String },
|
|
41
|
+
rightIcon: { type: String },
|
|
42
|
+
id: { type: String },
|
|
43
|
+
name: { type: String },
|
|
44
|
+
deselect: { type: Boolean, default: !0 }
|
|
45
|
+
}, {
|
|
46
|
+
modelValue: { type: [Boolean, String] },
|
|
47
|
+
modelModifiers: {}
|
|
48
|
+
}),
|
|
49
|
+
emits: ["update:modelValue"],
|
|
50
|
+
setup(e) {
|
|
51
|
+
const t = e, n = $(e, "modelValue"), o = h(() => ({
|
|
52
|
+
[`pv-toggle${t.variant == "secondary" ? "" : "-" + t.variant}`]: !0,
|
|
53
|
+
"pv-toggle-round": t.rounded,
|
|
54
|
+
"pv-toggle-small": t.size === "lg"
|
|
55
|
+
})), a = h(() => t.id ? t.id : `${t.label}-${Math.random()}`);
|
|
56
|
+
return (l, c) => (p(), g("label", {
|
|
57
|
+
"data-testid": "pv-toggle-button",
|
|
58
|
+
class: P(o.value),
|
|
59
|
+
for: a.value
|
|
60
|
+
}, [
|
|
61
|
+
k(C("input", {
|
|
62
|
+
"onUpdate:modelValue": c[0] || (c[0] = (r) => n.value = r),
|
|
63
|
+
class: "pv-hide",
|
|
64
|
+
id: a.value,
|
|
65
|
+
type: e.deselect ? "checkbox" : "radio",
|
|
66
|
+
value: e.value,
|
|
67
|
+
name: e.name,
|
|
68
|
+
disabled: e.disabled
|
|
69
|
+
}, null, 8, V), [
|
|
70
|
+
[B, n.value]
|
|
71
|
+
]),
|
|
72
|
+
e.leftIcon ? (p(), y(S, {
|
|
73
|
+
key: 0,
|
|
74
|
+
name: e.leftIcon
|
|
75
|
+
}, null, 8, ["name"])) : b("v-if", !0),
|
|
76
|
+
e.label ? (p(), g(
|
|
77
|
+
"span",
|
|
78
|
+
z,
|
|
79
|
+
O(e.label),
|
|
80
|
+
1
|
|
81
|
+
/* TEXT */
|
|
82
|
+
)) : b("v-if", !0),
|
|
83
|
+
e.rightIcon ? (p(), y(S, {
|
|
84
|
+
key: 2,
|
|
85
|
+
name: e.rightIcon
|
|
86
|
+
}, null, 8, ["name"])) : b("v-if", !0)
|
|
87
|
+
], 10, T));
|
|
88
|
+
}
|
|
89
|
+
}), L = /* @__PURE__ */ new Set(["PvIcon", "PvPopoverMenu", "PvPopover"]);
|
|
90
|
+
function R(e) {
|
|
91
|
+
return !L.has(e);
|
|
92
|
+
}
|
|
93
|
+
function v(e, t) {
|
|
94
|
+
const n = document.querySelector('link[href*="' + t + '"]');
|
|
95
|
+
if (!e.shadowRoot)
|
|
96
|
+
return !1;
|
|
97
|
+
if (n && e.shadowRoot) {
|
|
98
|
+
const o = n.href;
|
|
99
|
+
if (e.shadowRoot.querySelector(`link[href="${o}"]`))
|
|
100
|
+
return;
|
|
101
|
+
const a = document.createElement("link");
|
|
102
|
+
return a.rel = "stylesheet", a.href = o, e.shadowRoot.prepend(a), !0;
|
|
103
|
+
}
|
|
104
|
+
return !1;
|
|
105
|
+
}
|
|
106
|
+
function W(e) {
|
|
107
|
+
if (!v(e, "pit-viper-v2")) {
|
|
108
|
+
if (v(e, "pit-viper")) {
|
|
109
|
+
v(e, "pit-viper-v2-scoped");
|
|
110
|
+
return;
|
|
111
|
+
}
|
|
112
|
+
console.warn(
|
|
113
|
+
"No global styles found for Pit Viper components. Make sure to include pit-viper.css or pit-viper-v2.css in your project."
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
const H = (e) => ({ shadowRoot: R(e) });
|
|
118
|
+
function G(e, t) {
|
|
119
|
+
return t === null ? !1 : t === "" || t === "true" ? !0 : (t === "false" || console.warn(
|
|
120
|
+
`Invalid boolean attribute value for "${e}": "${t}". Expected "true", "false", or empty string.`
|
|
121
|
+
), !1);
|
|
122
|
+
}
|
|
123
|
+
function J(e, t) {
|
|
124
|
+
const n = Number(t);
|
|
125
|
+
return isNaN(n) && console.warn(`Invalid number attribute value for "${e}": "${t}". Expected a valid number.`), n;
|
|
126
|
+
}
|
|
127
|
+
function U(e) {
|
|
128
|
+
const t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), l = (e.__vccOpts || e).props;
|
|
129
|
+
return l && typeof l == "object" && Object.entries(l).forEach(([c, r]) => {
|
|
130
|
+
r === Boolean || r && r.type === Boolean ? t.add(c) : r === Number || r && r.type === Number ? n.add(c) : (r === Object || r === Array || r && (r.type === Object || r.type === Array)) && o.add(c);
|
|
131
|
+
}), { booleanProps: t, numberProps: n, jsonProps: o };
|
|
132
|
+
}
|
|
133
|
+
function _(e, t) {
|
|
134
|
+
try {
|
|
135
|
+
return JSON.parse(t);
|
|
136
|
+
} catch (n) {
|
|
137
|
+
return console.warn(
|
|
138
|
+
`Invalid JSON attribute value for "${e}": "${t}". Error: ${n instanceof Error ? n.message : String(n)}`
|
|
139
|
+
), null;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function q(e) {
|
|
143
|
+
const t = e.__name || e.name;
|
|
144
|
+
if (!t)
|
|
145
|
+
throw new Error("Component must have a __name or name property");
|
|
146
|
+
const n = j(e, H(t)), { booleanProps: o, numberProps: a, jsonProps: l } = U(e);
|
|
147
|
+
class c extends n {
|
|
148
|
+
_hiddenInput = null;
|
|
149
|
+
constructor() {
|
|
150
|
+
super(), this._parseAttributes();
|
|
151
|
+
}
|
|
152
|
+
disconnectedCallback() {
|
|
153
|
+
this._hiddenInput?.remove(), super.disconnectedCallback?.();
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Update the hidden input value
|
|
157
|
+
* Call this from the Vue component to sync form value
|
|
158
|
+
*/
|
|
159
|
+
setHiddenInputValue(u) {
|
|
160
|
+
this._hiddenInput && (this._hiddenInput.value = u ?? "");
|
|
161
|
+
}
|
|
162
|
+
_parseAttributes() {
|
|
163
|
+
o.forEach((s) => {
|
|
164
|
+
const i = this.getAttribute(s);
|
|
165
|
+
this[s] = G(s, i);
|
|
166
|
+
}), a.forEach((s) => {
|
|
167
|
+
const i = this.getAttribute(s);
|
|
168
|
+
i !== null && (this[s] = J(s, i));
|
|
169
|
+
}), l.forEach((s) => {
|
|
170
|
+
const i = this.getAttribute(s);
|
|
171
|
+
if (i !== null) {
|
|
172
|
+
const d = _(s, i);
|
|
173
|
+
d !== null && (this[s] = d);
|
|
174
|
+
}
|
|
175
|
+
});
|
|
176
|
+
const u = this.getAttribute("data-json-props");
|
|
177
|
+
u && u.split(",").map((i) => i.trim()).filter(Boolean).forEach((i) => {
|
|
178
|
+
const d = i.replace(/-([a-z])/g, (f) => f[1].toUpperCase());
|
|
179
|
+
let m = this.getAttribute(i);
|
|
180
|
+
if (m === null) {
|
|
181
|
+
const f = d.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
182
|
+
m = this.getAttribute(f);
|
|
183
|
+
}
|
|
184
|
+
if (m !== null && !this[d]) {
|
|
185
|
+
const f = _(d, m);
|
|
186
|
+
f !== null && (this[d] = f);
|
|
187
|
+
}
|
|
188
|
+
});
|
|
189
|
+
}
|
|
190
|
+
connectedCallback() {
|
|
191
|
+
this._parseAttributes(), super.connectedCallback?.(), W(this);
|
|
192
|
+
const u = this.getAttribute("name");
|
|
193
|
+
u && (this._hiddenInput = document.createElement("input"), this._hiddenInput.type = "hidden", this._hiddenInput.name = u, this.after(this._hiddenInput));
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
return c;
|
|
197
|
+
}
|
|
198
|
+
function Z(e) {
|
|
199
|
+
return e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, "");
|
|
200
|
+
}
|
|
201
|
+
function K(e) {
|
|
202
|
+
const t = e.__name || e.name;
|
|
203
|
+
if (!t)
|
|
204
|
+
throw new Error("Component must have a __name or name property");
|
|
205
|
+
const n = Z(t), o = q(e);
|
|
206
|
+
customElements.get(n) || customElements.define(n, o);
|
|
207
|
+
}
|
|
208
|
+
K(D);
|