@viasat/beam-web-components 2.49.0 → 2.50.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/Accordion/Accordion.js +3 -3
- package/Accordion/AccordionGroup.js +3 -3
- package/Accordion/index.js +1 -1
- package/Alert/Alert.js +5 -5
- package/Avatar/Avatar.js +2 -2
- package/Avatar/AvatarGroup.js +2 -2
- package/Avatar/index.js +1 -1
- package/Badge/Badge.js +2 -2
- package/BadgeDot/BadgeDot.js +2 -2
- package/Box/Box.js +2 -2
- package/Breadcrumbs/Breadcrumbs.js +3 -3
- package/Breadcrumbs/BreadcrumbsItem.js +3 -3
- package/Breadcrumbs/index.js +1 -1
- package/Button/Button.js +2 -2
- package/CloseButton/CloseButton.js +2 -2
- package/Divider/Divider.js +2 -2
- package/EmptyState/EmptyState.js +2 -2
- package/HelperText/HelperText.js +3 -3
- package/HelperText/index.js +1 -1
- package/Icon/Icon.js +2 -2
- package/InputChoiceGroup/InputChoiceGroup.js +2 -2
- package/Label/Label.js +2 -2
- package/Link/Link.js +2 -2
- package/List/List.js +2 -2
- package/List/ListItem.js +2 -2
- package/ProgressBar/ProgressBar.js +2 -2
- package/SegmentedControl/SegmentedControl.js +2 -2
- package/SegmentedControl/SegmentedControlItem.js +10 -10
- package/SegmentedControl/SegmentedControlList.js +2 -2
- package/SegmentedControl/SegmentedControlPanel.js +2 -2
- package/Spinner/Spinner.js +2 -2
- package/Text/Text.js +2 -2
- package/TextField/TextField.js +6 -6
- package/Tooltip/Tooltip.js +9 -9
- package/chunks/{Accordion.BF2pHMSP.js → Accordion.fbo-T2zU.js} +4 -4
- package/chunks/{Avatar.kVWwOxWe.js → Avatar.DkegKDfD.js} +2 -2
- package/chunks/{BreadcrumbsItem.BoIbfnh6.js → BreadcrumbsItem.xWwSJgcO.js} +2 -2
- package/chunks/{HelperText.3YJvB8x0.js → HelperText.Cc_6DlKP.js} +5 -5
- package/chunks/classNames.m6VYRyOu.js +18 -0
- package/chunks/{classNames.BQclmCHG.js → register-custom-element.D_kw6JXe.js} +34 -29
- package/custom-elements.json +1661 -1661
- package/local/Accordion/Accordion.js +4 -4
- package/local/Accordion/AccordionGroup.js +4 -4
- package/local/Accordion/index.js +1 -1
- package/local/Alert/Alert.js +11 -11
- package/local/Avatar/Avatar.js +3 -3
- package/local/Avatar/AvatarGroup.js +3 -3
- package/local/Avatar/index.js +1 -1
- package/local/Badge/Badge.js +2 -2
- package/local/BadgeDot/BadgeDot.js +2 -2
- package/local/Box/Box.js +2 -2
- package/local/Breadcrumbs/Breadcrumbs.js +3 -3
- package/local/Breadcrumbs/BreadcrumbsItem.js +3 -3
- package/local/Breadcrumbs/index.js +1 -1
- package/local/Button/Button.js +3 -3
- package/local/CloseButton/CloseButton.js +2 -2
- package/local/Divider/Divider.js +7 -7
- package/local/EmptyState/EmptyState.js +2 -2
- package/local/HelperText/HelperText.js +3 -3
- package/local/HelperText/index.js +1 -1
- package/local/Icon/Icon.js +2 -2
- package/local/InputChoiceGroup/InputChoiceGroup.js +3 -3
- package/local/Label/Label.js +2 -2
- package/local/Link/Link.js +2 -2
- package/local/List/List.js +3 -3
- package/local/List/ListItem.js +3 -3
- package/local/ProgressBar/ProgressBar.js +2 -2
- package/local/SegmentedControl/SegmentedControl.js +3 -3
- package/local/SegmentedControl/SegmentedControlItem.js +7 -7
- package/local/SegmentedControl/SegmentedControlList.js +2 -2
- package/local/SegmentedControl/SegmentedControlPanel.js +2 -2
- package/local/Spinner/Spinner.js +2 -2
- package/local/Text/Text.js +2 -2
- package/local/TextField/TextField.js +7 -7
- package/local/Tooltip/Tooltip.js +8 -8
- package/local/chunks/{Accordion.DM6Nkgnh.js → Accordion.QupR4x7N.js} +9 -9
- package/local/chunks/{Avatar.BT61pkbV.js → Avatar.D0_A6fGG.js} +2 -2
- package/local/chunks/{BreadcrumbsItem.CsPbcOZ5.js → BreadcrumbsItem.Ds7TtgQn.js} +2 -2
- package/local/chunks/classNames.Ciobzb4w.js +30 -0
- package/local/chunks/{index.CUGawMXL.js → index.BoeGm2HZ.js} +8 -8
- package/local/chunks/register-custom-element.AOEv8hcs.js +133 -0
- package/local/chunks/{state.CqiuSzAl.js → state.Dr3yBpId.js} +1 -1
- package/local/wip/Checkbox/Checkbox.js +2 -2
- package/local/wip/Checkbox/CheckboxGroup/CheckboxGroup.js +1 -1
- package/local/wip/FileUpload/FileUpload.Button.js +2 -2
- package/local/wip/FileUpload/FileUpload.Dropzone.js +3 -3
- package/local/wip/FileUpload/FileUpload.List.Item.js +3 -3
- package/local/wip/FileUpload/FileUpload.List.js +2 -2
- package/local/wip/FileUpload/FileUpload.js +8 -8
- package/local/wip/Form/Form.decorator.js +3 -3
- package/local/wip/Form/Form.js +122 -110
- package/local/wip/NativeSelect/NativeSelect.js +10 -10
- package/local/wip/RadioButton/RadioButton.js +2 -2
- package/local/wip/RadioButton/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/local/wip/Switch/Switch.js +2 -2
- package/local/wip/Switch/SwitchGroup/SwitchGroup.js +1 -1
- package/local/wip/TextArea/TextArea.js +8 -8
- package/package.json +6 -6
- package/vscode.html-custom-data.json +229 -229
- package/wip/Checkbox/Checkbox.js +2 -2
- package/wip/Checkbox/CheckboxGroup/CheckboxGroup.js +1 -1
- package/wip/FileUpload/FileUpload.Button.js +2 -2
- package/wip/FileUpload/FileUpload.Dropzone.js +2 -2
- package/wip/FileUpload/FileUpload.List.Item.js +3 -3
- package/wip/FileUpload/FileUpload.List.js +2 -2
- package/wip/FileUpload/FileUpload.js +12 -12
- package/wip/Form/Form.decorator.js +1 -1
- package/wip/Form/Form.js +124 -112
- package/wip/NativeSelect/NativeSelect.js +9 -9
- package/wip/RadioButton/RadioButton.js +2 -2
- package/wip/RadioButton/RadioButtonGroup/RadioButtonGroup.js +1 -1
- package/wip/Switch/Switch.js +5 -5
- package/wip/Switch/SwitchGroup/SwitchGroup.js +1 -1
- package/wip/TextArea/TextArea.js +5 -5
- package/chunks/register-custom-element.DHGKOhmA.js +0 -17
- package/local/chunks/classNames.CARKFDmR.js +0 -106
- package/local/chunks/register-custom-element.vod7zfGv.js +0 -51
package/local/wip/Form/Form.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { e as
|
|
2
|
-
import { a as
|
|
3
|
-
import { n as
|
|
4
|
-
import { r as
|
|
5
|
-
import { e as H, n as
|
|
6
|
-
import { bmFormContext as
|
|
7
|
-
const
|
|
1
|
+
import { e as V } from "../../chunks/provide.i2FlUkOu.js";
|
|
2
|
+
import { a as z, x as L } from "../../chunks/lit-element.CJtt9wj5.js";
|
|
3
|
+
import { a as S, t as N, n as d, c as D } from "../../chunks/register-custom-element.AOEv8hcs.js";
|
|
4
|
+
import { r as $ } from "../../chunks/state.Dr3yBpId.js";
|
|
5
|
+
import { e as H, n as K } from "../../chunks/ref.B7e1Hu4F.js";
|
|
6
|
+
import { bmFormContext as q, bmFormInitials as G } from "./Form.context.js";
|
|
7
|
+
const P = async (t, e) => (await Promise.all(
|
|
8
8
|
e.map(
|
|
9
9
|
async (s) => {
|
|
10
10
|
const { validator: o } = s;
|
|
@@ -24,15 +24,15 @@ const K = async (t, e) => (await Promise.all(
|
|
|
24
24
|
isCheckBoxGroup: s,
|
|
25
25
|
selectedBoxes: r ? [t] : []
|
|
26
26
|
};
|
|
27
|
-
const o = Array.from(t), n = o.every((
|
|
28
|
-
const { type:
|
|
29
|
-
return
|
|
27
|
+
const o = Array.from(t), n = o.every((h) => {
|
|
28
|
+
const { type: p } = h;
|
|
29
|
+
return p === "checkbox";
|
|
30
30
|
}), a = !!o.length && n;
|
|
31
31
|
if (!a) return { isCheckBoxGroup: a, selectedBoxes: [] };
|
|
32
|
-
const
|
|
33
|
-
({ checked:
|
|
32
|
+
const l = o.filter(
|
|
33
|
+
({ checked: h }) => h
|
|
34
34
|
);
|
|
35
|
-
return { isCheckBoxGroup: a, selectedBoxes:
|
|
35
|
+
return { isCheckBoxGroup: a, selectedBoxes: l };
|
|
36
36
|
}, E = (t) => {
|
|
37
37
|
const { type: e, multiple: r, options: s } = t, o = e === "select-multiple" && r;
|
|
38
38
|
if (!o) return { isMultiSelect: o, selectedOptions: [] };
|
|
@@ -41,7 +41,7 @@ const K = async (t, e) => (await Promise.all(
|
|
|
41
41
|
({ selected: a }) => a
|
|
42
42
|
);
|
|
43
43
|
return { isMultiSelect: o, selectedOptions: n };
|
|
44
|
-
},
|
|
44
|
+
}, R = new RegExp(
|
|
45
45
|
[
|
|
46
46
|
"(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:",
|
|
47
47
|
"\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:",
|
|
@@ -55,23 +55,23 @@ const K = async (t, e) => (await Promise.all(
|
|
|
55
55
|
"[-\b\v\f-!-ZS-]|\\\\[-",
|
|
56
56
|
" \v\f-])+)\\])"
|
|
57
57
|
].join("")
|
|
58
|
-
),
|
|
58
|
+
), T = (t) => ({
|
|
59
59
|
name: "min",
|
|
60
60
|
validator: (e) => {
|
|
61
61
|
const { value: r, message: s } = t, { value: o } = e;
|
|
62
62
|
return { error: !!o && Number(o) < r, message: s };
|
|
63
63
|
}
|
|
64
|
-
}),
|
|
64
|
+
}), j = (t) => ({
|
|
65
65
|
name: "max",
|
|
66
66
|
validator: (e) => {
|
|
67
67
|
const { value: r, message: s } = t, { value: o } = e;
|
|
68
68
|
return { error: !!o && Number(o) > r, message: s };
|
|
69
69
|
}
|
|
70
|
-
}),
|
|
70
|
+
}), A = (t) => ({
|
|
71
71
|
name: "email",
|
|
72
72
|
validator: (e) => {
|
|
73
73
|
const { message: r } = t || {}, { value: s } = e;
|
|
74
|
-
return { error: !!s && !
|
|
74
|
+
return { error: !!s && !R.test(s), message: r };
|
|
75
75
|
}
|
|
76
76
|
}), U = (t) => ({
|
|
77
77
|
name: "pattern",
|
|
@@ -89,83 +89,95 @@ const K = async (t, e) => (await Promise.all(
|
|
|
89
89
|
if (o) return { error: !n, message: r };
|
|
90
90
|
const {
|
|
91
91
|
isMultiSelect: a,
|
|
92
|
-
selectedOptions: { length:
|
|
92
|
+
selectedOptions: { length: l }
|
|
93
93
|
} = E(e);
|
|
94
|
-
return a ? { error: !
|
|
94
|
+
return a ? { error: !l, message: r } : { error: !s, message: r };
|
|
95
95
|
}
|
|
96
|
-
}),
|
|
96
|
+
}), Z = (t) => ({
|
|
97
97
|
name: "minLength",
|
|
98
98
|
validator: (e) => {
|
|
99
99
|
const { length: r, message: s } = t, { value: o } = e, n = !!o && o.length < r, {
|
|
100
100
|
isCheckBoxGroup: a,
|
|
101
|
-
selectedBoxes: { length:
|
|
101
|
+
selectedBoxes: { length: l }
|
|
102
102
|
} = F(e);
|
|
103
103
|
if (a)
|
|
104
|
-
return { error: !!
|
|
104
|
+
return { error: !!l && l < r, message: s };
|
|
105
105
|
const {
|
|
106
|
-
isMultiSelect:
|
|
107
|
-
selectedOptions: { length:
|
|
106
|
+
isMultiSelect: h,
|
|
107
|
+
selectedOptions: { length: p }
|
|
108
108
|
} = E(e);
|
|
109
|
-
return
|
|
109
|
+
return h ? { error: !!p && p < r, message: s } : { error: n, message: s };
|
|
110
110
|
}
|
|
111
|
-
}),
|
|
111
|
+
}), J = (t) => ({
|
|
112
112
|
name: "maxLength",
|
|
113
113
|
validator: (e) => {
|
|
114
114
|
const { length: r, message: s } = t, { value: o } = e, n = !!o && o.length > r, {
|
|
115
115
|
isCheckBoxGroup: a,
|
|
116
|
-
selectedBoxes: { length:
|
|
116
|
+
selectedBoxes: { length: l }
|
|
117
117
|
} = F(e);
|
|
118
118
|
if (a)
|
|
119
|
-
return { error: !!
|
|
119
|
+
return { error: !!l && l > r, message: s };
|
|
120
120
|
const {
|
|
121
|
-
isMultiSelect:
|
|
122
|
-
selectedOptions: { length:
|
|
121
|
+
isMultiSelect: h,
|
|
122
|
+
selectedOptions: { length: p }
|
|
123
123
|
} = E(e);
|
|
124
|
-
return
|
|
124
|
+
return h ? { error: !!p && p > r, message: s } : { error: n, message: s };
|
|
125
125
|
}
|
|
126
|
-
}),
|
|
126
|
+
}), Q = (t) => ({
|
|
127
127
|
name: "define",
|
|
128
128
|
validator: (e) => t(e)
|
|
129
|
-
}),
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
129
|
+
}), X = (t) => {
|
|
130
|
+
const e = /^(\d{4})-(\d{2})-(\d{2})$/.exec(t);
|
|
131
|
+
return e ? N(Number(e[1]), Number(e[2]), Number(e[3])) : null;
|
|
132
|
+
}, Y = (t) => ({
|
|
133
|
+
name: "dateRange",
|
|
134
|
+
validator: (e) => {
|
|
135
|
+
const { min: r, max: s, message: o } = t, { value: n } = e, a = n ? X(n) : null;
|
|
136
|
+
if (a === null) return { error: !1, message: o };
|
|
137
|
+
const l = r && !Number.isNaN(r.getTime()) ? S(r) : null, h = s && !Number.isNaN(s.getTime()) ? S(s) : null;
|
|
138
|
+
return l !== null && h !== null && l > h ? { error: !1, message: o } : { error: l !== null && a < l || h !== null && a > h, message: o };
|
|
139
|
+
}
|
|
140
|
+
}), ce = {
|
|
141
|
+
min: T,
|
|
142
|
+
max: j,
|
|
143
|
+
email: A,
|
|
144
|
+
define: Q,
|
|
134
145
|
pattern: U,
|
|
135
146
|
required: I,
|
|
136
|
-
minLength:
|
|
137
|
-
maxLength:
|
|
147
|
+
minLength: Z,
|
|
148
|
+
maxLength: J,
|
|
149
|
+
dateRange: Y
|
|
138
150
|
};
|
|
139
|
-
var
|
|
151
|
+
var ee = Object.defineProperty, te = Object.getOwnPropertyDescriptor, W = (t) => {
|
|
140
152
|
throw TypeError(t);
|
|
141
|
-
},
|
|
142
|
-
for (var o = s > 1 ? void 0 : s ?
|
|
153
|
+
}, u = (t, e, r, s) => {
|
|
154
|
+
for (var o = s > 1 ? void 0 : s ? te(e, r) : e, n = t.length - 1, a; n >= 0; n--)
|
|
143
155
|
(a = t[n]) && (o = (s ? a(e, r, o) : a(o)) || o);
|
|
144
|
-
return s && o &&
|
|
145
|
-
},
|
|
146
|
-
let
|
|
156
|
+
return s && o && ee(e, r, o), o;
|
|
157
|
+
}, re = (t, e, r) => e.has(t) || W("Cannot " + r), i = (t, e, r) => (re(t, e, "read from private field"), r ? r.call(t) : e.get(t)), m = (t, e, r) => e.has(t) ? W("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, r), y, M, g, w, f, _, v, k, b, B, C, O;
|
|
158
|
+
let c = class extends z {
|
|
147
159
|
constructor() {
|
|
148
|
-
super(...arguments), this.validationMode = "onBlur", this.initialValues = {}, this.required = !1, this.disabled = !1, this.readOnly = !1, this.formMeta = {}, this.formRef = H(), this._actionFired = !1,
|
|
160
|
+
super(...arguments), this.validationMode = "onBlur", this.initialValues = {}, this.required = !1, this.disabled = !1, this.readOnly = !1, this.formMeta = {}, this.formRef = H(), this._actionFired = !1, m(this, y, () => !!this._actionFired), this.formContext = G, m(this, M, (t) => {
|
|
149
161
|
const { field: e } = t, { name: r } = e;
|
|
150
162
|
r && (this.formMeta = { ...this.formMeta, [r]: t });
|
|
151
|
-
}),
|
|
163
|
+
}), m(this, g, (t) => {
|
|
152
164
|
const { validators: e, errorSetter: r } = this.formMeta[t] || {};
|
|
153
165
|
e != null && e.length && r([]);
|
|
154
|
-
}),
|
|
166
|
+
}), m(this, w, () => {
|
|
155
167
|
Object.keys(this.formMeta).forEach((t) => {
|
|
156
168
|
const { initializer: e } = this.formMeta[t];
|
|
157
|
-
e(), i(this,
|
|
169
|
+
e(), i(this, g).call(this, t);
|
|
158
170
|
});
|
|
159
|
-
}),
|
|
171
|
+
}), m(this, f, async (t) => {
|
|
160
172
|
const { field: e, validators: r, errorSetter: s } = this.formMeta[t] || {}, { disabled: o } = e || {};
|
|
161
173
|
if (!(r != null && r.length) || o) return [];
|
|
162
|
-
const n = await
|
|
174
|
+
const n = await P(e, r);
|
|
163
175
|
return s(n), n;
|
|
164
|
-
}),
|
|
176
|
+
}), m(this, _, async () => await Promise.all(
|
|
165
177
|
Object.keys(this.formMeta).map(
|
|
166
178
|
async (t) => await i(this, f).call(this, t)
|
|
167
179
|
)
|
|
168
|
-
)),
|
|
180
|
+
)), m(this, v, async () => {
|
|
169
181
|
(await i(this, _).call(this)).some((r) => !!r.length) || this.dispatchEvent(
|
|
170
182
|
new CustomEvent("submit", {
|
|
171
183
|
bubbles: !0,
|
|
@@ -178,17 +190,17 @@ let l = class extends V {
|
|
|
178
190
|
}, {})
|
|
179
191
|
})
|
|
180
192
|
);
|
|
181
|
-
}),
|
|
182
|
-
if (i(this,
|
|
183
|
-
this._actionFired = !i(this,
|
|
193
|
+
}), m(this, k, async ({ target: t }) => {
|
|
194
|
+
if (i(this, y).call(this)) {
|
|
195
|
+
this._actionFired = !i(this, y).call(this);
|
|
184
196
|
return;
|
|
185
197
|
}
|
|
186
198
|
const { name: e } = t;
|
|
187
199
|
this.validationMode === "onBlur" && await i(this, f).call(this, e);
|
|
188
|
-
}),
|
|
200
|
+
}), m(this, b, async ({ target: t }) => {
|
|
189
201
|
const { name: e } = t;
|
|
190
|
-
this.validationMode === "onChange" ? await i(this, f).call(this, e) : i(this,
|
|
191
|
-
}),
|
|
202
|
+
this.validationMode === "onChange" ? await i(this, f).call(this, e) : i(this, g).call(this, e);
|
|
203
|
+
}), m(this, B, async ({ target: t }) => {
|
|
192
204
|
const { type: e } = t;
|
|
193
205
|
switch (e) {
|
|
194
206
|
case "reset":
|
|
@@ -196,10 +208,10 @@ let l = class extends V {
|
|
|
196
208
|
case "submit":
|
|
197
209
|
return i(this, v).call(this);
|
|
198
210
|
}
|
|
199
|
-
}),
|
|
211
|
+
}), m(this, C, async (t) => {
|
|
200
212
|
const { target: e, key: r } = t, { name: s } = e;
|
|
201
213
|
r === "Enter" && this.formMeta[s] && await i(this, v).call(this);
|
|
202
|
-
}),
|
|
214
|
+
}), m(this, O, (t) => {
|
|
203
215
|
const e = t.target, { name: r } = document.activeElement || {}, s = e.closest("[type=reset]") || e.closest("[type=submit]");
|
|
204
216
|
this.formMeta[r] && (this._actionFired = !!s);
|
|
205
217
|
});
|
|
@@ -210,22 +222,22 @@ let l = class extends V {
|
|
|
210
222
|
readOnly: this.readOnly,
|
|
211
223
|
disabled: this.disabled,
|
|
212
224
|
initialValues: this.initialValues,
|
|
213
|
-
registerField: i(this,
|
|
225
|
+
registerField: i(this, M),
|
|
214
226
|
formBlurHandler: i(this, k),
|
|
215
|
-
formChangeHandler: i(this,
|
|
227
|
+
formChangeHandler: i(this, b)
|
|
216
228
|
});
|
|
217
229
|
}
|
|
218
230
|
render() {
|
|
219
|
-
return
|
|
231
|
+
return L`
|
|
220
232
|
<form
|
|
221
233
|
novalidate
|
|
222
|
-
${
|
|
234
|
+
${K(this.formRef)}
|
|
223
235
|
action="${this.action}"
|
|
224
236
|
method="${this.method}"
|
|
225
237
|
target="${this.target}"
|
|
226
238
|
enctype="${this.enctype}"
|
|
227
|
-
@click="${i(this,
|
|
228
|
-
@keydown="${i(this,
|
|
239
|
+
@click="${i(this, B)}"
|
|
240
|
+
@keydown="${i(this, C)}"
|
|
229
241
|
@mousedown="${i(this, O)}"
|
|
230
242
|
>
|
|
231
243
|
<slot></slot>
|
|
@@ -233,56 +245,56 @@ let l = class extends V {
|
|
|
233
245
|
`;
|
|
234
246
|
}
|
|
235
247
|
};
|
|
236
|
-
g = /* @__PURE__ */ new WeakMap();
|
|
237
|
-
x = /* @__PURE__ */ new WeakMap();
|
|
238
248
|
y = /* @__PURE__ */ new WeakMap();
|
|
249
|
+
M = /* @__PURE__ */ new WeakMap();
|
|
250
|
+
g = /* @__PURE__ */ new WeakMap();
|
|
239
251
|
w = /* @__PURE__ */ new WeakMap();
|
|
240
252
|
f = /* @__PURE__ */ new WeakMap();
|
|
241
253
|
_ = /* @__PURE__ */ new WeakMap();
|
|
242
254
|
v = /* @__PURE__ */ new WeakMap();
|
|
243
255
|
k = /* @__PURE__ */ new WeakMap();
|
|
256
|
+
b = /* @__PURE__ */ new WeakMap();
|
|
244
257
|
B = /* @__PURE__ */ new WeakMap();
|
|
245
258
|
C = /* @__PURE__ */ new WeakMap();
|
|
246
|
-
b = /* @__PURE__ */ new WeakMap();
|
|
247
259
|
O = /* @__PURE__ */ new WeakMap();
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
],
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
],
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
],
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
],
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
],
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
],
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
],
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
],
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
],
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
],
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
],
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
],
|
|
260
|
+
u([
|
|
261
|
+
d({ type: String })
|
|
262
|
+
], c.prototype, "validationMode", 2);
|
|
263
|
+
u([
|
|
264
|
+
d({ type: Object })
|
|
265
|
+
], c.prototype, "initialValues", 2);
|
|
266
|
+
u([
|
|
267
|
+
d({ type: Boolean })
|
|
268
|
+
], c.prototype, "required", 2);
|
|
269
|
+
u([
|
|
270
|
+
d({ type: Boolean })
|
|
271
|
+
], c.prototype, "disabled", 2);
|
|
272
|
+
u([
|
|
273
|
+
d({ type: Boolean })
|
|
274
|
+
], c.prototype, "readOnly", 2);
|
|
275
|
+
u([
|
|
276
|
+
d({ type: String })
|
|
277
|
+
], c.prototype, "action", 2);
|
|
278
|
+
u([
|
|
279
|
+
d({ type: String })
|
|
280
|
+
], c.prototype, "method", 2);
|
|
281
|
+
u([
|
|
282
|
+
d({ type: String })
|
|
283
|
+
], c.prototype, "target", 2);
|
|
284
|
+
u([
|
|
285
|
+
d({ type: String })
|
|
286
|
+
], c.prototype, "enctype", 2);
|
|
287
|
+
u([
|
|
288
|
+
$()
|
|
289
|
+
], c.prototype, "_actionFired", 2);
|
|
290
|
+
u([
|
|
291
|
+
V({ context: q }),
|
|
292
|
+
$()
|
|
293
|
+
], c.prototype, "formContext", 2);
|
|
294
|
+
c = u([
|
|
295
|
+
D("bm-form")
|
|
296
|
+
], c);
|
|
285
297
|
export {
|
|
286
|
-
|
|
287
|
-
|
|
298
|
+
c as BmForm,
|
|
299
|
+
ce as validators
|
|
288
300
|
};
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { r as C, x as O } from "../../chunks/lit-element.CJtt9wj5.js";
|
|
2
|
-
import { n as s, c as
|
|
2
|
+
import { i as T, n as s, p as h, e as D, c as S } from "../../chunks/register-custom-element.AOEv8hcs.js";
|
|
3
3
|
import { o as x } from "../../chunks/query-assigned-elements.Drkgpk9q.js";
|
|
4
|
-
import { n as
|
|
5
|
-
import {
|
|
4
|
+
import { n as k } from "../../chunks/ref.B7e1Hu4F.js";
|
|
5
|
+
import { c as w, g as L } from "../../chunks/classNames.Ciobzb4w.js";
|
|
6
6
|
import { d as y } from "../../chunks/input.D7RpzZmn.js";
|
|
7
7
|
import { t as E } from "../../chunks/constants.ZIKMMCJH.js";
|
|
8
8
|
import { r as _ } from "../../chunks/delegate.baxDQosr.js";
|
|
9
9
|
import { b as Q } from "../../chunks/helpers.y-1K1Ev-.js";
|
|
10
10
|
import { FormField as U } from "../Form/Form.decorator.js";
|
|
11
|
-
import "../../chunks/index.
|
|
11
|
+
import "../../chunks/index.BoeGm2HZ.js";
|
|
12
12
|
const $ = (e, i) => {
|
|
13
|
-
if (!
|
|
13
|
+
if (!T() || !e) return;
|
|
14
14
|
const { options: r = [] } = e;
|
|
15
15
|
Array.prototype.forEach.call(r, (o) => {
|
|
16
16
|
const { disabled: c, dataset: l } = o, { disabled: d } = l;
|
|
@@ -57,7 +57,7 @@ let t = class extends U {
|
|
|
57
57
|
});
|
|
58
58
|
}
|
|
59
59
|
updated(e) {
|
|
60
|
-
const [i] = this._selectLabel, [r] = this._selectHelperText, { decorate: o } =
|
|
60
|
+
const [i] = this._selectLabel, [r] = this._selectHelperText, { decorate: o } = D(i), { decorate: c } = D(r), l = h(e, ["value"]), d = h(e, ["validationRules"]), f = h(e, ["formContext", "disabled"]), j = h(e, [
|
|
61
61
|
"formContext",
|
|
62
62
|
"required",
|
|
63
63
|
"hideRequiredMarker"
|
|
@@ -70,11 +70,11 @@ let t = class extends U {
|
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
render() {
|
|
73
|
-
const { ariaInvalid: e } = this, { length: i } = this.validationErrors(), r = typeof this.error == "string" || !!i, o =
|
|
73
|
+
const { ariaInvalid: e } = this, { length: i } = this.validationErrors(), r = typeof this.error == "string" || !!i, o = w(
|
|
74
74
|
this.helperTextId,
|
|
75
75
|
this.error && this.errorId,
|
|
76
76
|
this.validationErrorShown() && this.validationErrorsId
|
|
77
|
-
), c =
|
|
77
|
+
), c = w(
|
|
78
78
|
q,
|
|
79
79
|
r && `${u}error`,
|
|
80
80
|
this.theme && E(this.theme),
|
|
@@ -91,7 +91,7 @@ let t = class extends U {
|
|
|
91
91
|
<select
|
|
92
92
|
id="${this.id}"
|
|
93
93
|
name="${this.name}"
|
|
94
|
-
${
|
|
94
|
+
${k(this.formFieldRef)}
|
|
95
95
|
?required="${m(this, v).call(this)}"
|
|
96
96
|
?disabled="${m(this, n).call(this)}"
|
|
97
97
|
@keydown="${m(this, g)}"
|
|
@@ -160,7 +160,7 @@ a([
|
|
|
160
160
|
x({ slot: "helper-text" })
|
|
161
161
|
], t.prototype, "_selectHelperText", 2);
|
|
162
162
|
t = a([
|
|
163
|
-
|
|
163
|
+
S("bm-native-select")
|
|
164
164
|
], t);
|
|
165
165
|
export {
|
|
166
166
|
t as BmNativeSelect
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as g } from "../../chunks/consume.Ce9k1-wN.js";
|
|
2
2
|
import { r as y, a as _, E as d, x as l } from "../../chunks/lit-element.CJtt9wj5.js";
|
|
3
|
-
import { n as a, c as x } from "../../chunks/register-custom-element.
|
|
3
|
+
import { n as a, c as x } from "../../chunks/register-custom-element.AOEv8hcs.js";
|
|
4
4
|
import { e as w, n as z } from "../../chunks/ref.B7e1Hu4F.js";
|
|
5
|
-
import { c as k, g as C } from "../../chunks/classNames.
|
|
5
|
+
import { c as k, g as C } from "../../chunks/classNames.Ciobzb4w.js";
|
|
6
6
|
import { t as $ } from "../../chunks/constants.ZIKMMCJH.js";
|
|
7
7
|
import { r as S } from "../../chunks/delegate.baxDQosr.js";
|
|
8
8
|
import { inputChoiceGroupContext as P } from "../../InputChoiceGroup/InputChoiceGroup.context.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as c } from "../../../chunks/delegate.baxDQosr.js";
|
|
2
|
-
import { c as u } from "../../../chunks/register-custom-element.
|
|
2
|
+
import { c as u } from "../../../chunks/register-custom-element.AOEv8hcs.js";
|
|
3
3
|
import { InputChoiceGroup as l } from "../../../InputChoiceGroup/InputChoiceGroup.js";
|
|
4
4
|
var h = Object.getOwnPropertyDescriptor, f = (t, e, o, s) => {
|
|
5
5
|
for (var n = s > 1 ? void 0 : s ? h(e, o) : e, a = t.length - 1, i; a >= 0; a--)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { c as _ } from "../../chunks/consume.Ce9k1-wN.js";
|
|
2
2
|
import { r as z, a as C, x as n, E as w } from "../../chunks/lit-element.CJtt9wj5.js";
|
|
3
|
-
import { n as a, c as S } from "../../chunks/register-custom-element.
|
|
3
|
+
import { n as a, d as y, c as S } from "../../chunks/register-custom-element.AOEv8hcs.js";
|
|
4
4
|
import { e as T, n as $ } from "../../chunks/ref.B7e1Hu4F.js";
|
|
5
|
-
import { c as O, g as B
|
|
5
|
+
import { c as O, g as B } from "../../chunks/classNames.Ciobzb4w.js";
|
|
6
6
|
import { t as P } from "../../chunks/constants.ZIKMMCJH.js";
|
|
7
7
|
import { r as L } from "../../chunks/delegate.baxDQosr.js";
|
|
8
8
|
import { inputChoiceGroupContext as E } from "../../InputChoiceGroup/InputChoiceGroup.context.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as u } from "../../../chunks/register-custom-element.
|
|
1
|
+
import { c as u } from "../../../chunks/register-custom-element.AOEv8hcs.js";
|
|
2
2
|
import { InputChoiceGroup as l } from "../../../InputChoiceGroup/InputChoiceGroup.js";
|
|
3
3
|
var n = Object.getOwnPropertyDescriptor, a = (t, o, m, p) => {
|
|
4
4
|
for (var r = p > 1 ? void 0 : p ? n(o, m) : o, e = t.length - 1, s; e >= 0; e--)
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { r as R, x as _, E as D } from "../../chunks/lit-element.CJtt9wj5.js";
|
|
2
|
-
import { n as a, c as L } from "../../chunks/register-custom-element.
|
|
2
|
+
import { n as a, p as b, e as N, c as L } from "../../chunks/register-custom-element.AOEv8hcs.js";
|
|
3
3
|
import { o as j } from "../../chunks/query-assigned-elements.Drkgpk9q.js";
|
|
4
|
-
import { e as W, n as
|
|
5
|
-
import {
|
|
4
|
+
import { e as W, n as I } from "../../chunks/ref.B7e1Hu4F.js";
|
|
5
|
+
import { c as C, g as V } from "../../chunks/classNames.Ciobzb4w.js";
|
|
6
6
|
import { t as G } from "../../chunks/constants.ZIKMMCJH.js";
|
|
7
7
|
import { r as B } from "../../chunks/delegate.baxDQosr.js";
|
|
8
8
|
import { FormField as H } from "../Form/Form.decorator.js";
|
|
@@ -54,12 +54,12 @@ let t = class extends H {
|
|
|
54
54
|
o(this, f).call(this), o(this, g).call(this), this.validateFieldOnChange(e);
|
|
55
55
|
}), p(this, w, (e) => e ? _`
|
|
56
56
|
<div class="${x}counter">
|
|
57
|
-
<span ${
|
|
57
|
+
<span ${I(this.formFieldCounterRef)}></span>/<span>${e}</span>
|
|
58
58
|
</div>
|
|
59
59
|
` : D);
|
|
60
60
|
}
|
|
61
61
|
updated(e) {
|
|
62
|
-
const [r] = this._textAreaLabel, [i] = this._textAreaHelperText, { decorate: s } =
|
|
62
|
+
const [r] = this._textAreaLabel, [i] = this._textAreaHelperText, { decorate: s } = N(r), { decorate: c } = N(i), n = b(e, ["value"]), u = b(e, ["maxCount"]), T = b(e, ["autoResize"]), Y = b(e, ["validationRules"]), P = b(e, ["formContext", "disabled"]), $ = b(e, [
|
|
63
63
|
"formContext",
|
|
64
64
|
"required",
|
|
65
65
|
"hideRequiredMarker"
|
|
@@ -75,11 +75,11 @@ let t = class extends H {
|
|
|
75
75
|
};
|
|
76
76
|
}
|
|
77
77
|
render() {
|
|
78
|
-
const { ariaInvalid: e } = this, { length: r } = this.validationErrors(), i = typeof this.error == "string" || !!r, s =
|
|
78
|
+
const { ariaInvalid: e } = this, { length: r } = this.validationErrors(), i = typeof this.error == "string" || !!r, s = C(
|
|
79
79
|
this.helperTextId,
|
|
80
80
|
this.error && this.errorId,
|
|
81
81
|
this.validationErrorShown() && this.validationErrorsId
|
|
82
|
-
), c =
|
|
82
|
+
), c = C(
|
|
83
83
|
F,
|
|
84
84
|
i && `${d}error`,
|
|
85
85
|
this.theme && G(this.theme),
|
|
@@ -102,7 +102,7 @@ let t = class extends H {
|
|
|
102
102
|
name="${this.name}"
|
|
103
103
|
rows="${this.rows}"
|
|
104
104
|
cols="${this.cols}"
|
|
105
|
-
${
|
|
105
|
+
${I(this.formFieldRef)}
|
|
106
106
|
maxlength="${this.maxCount}"
|
|
107
107
|
@input="${o(this, y)}"
|
|
108
108
|
?required="${o(this, z).call(this)}"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@viasat/beam-web-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.50.0",
|
|
4
4
|
"description": "Framework-agnostic web components for the Beam Design System built with Lit, compatible with Angular, Vue, Svelte, and vanilla JavaScript",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Viasat",
|
|
@@ -64,11 +64,11 @@
|
|
|
64
64
|
"access": "public"
|
|
65
65
|
},
|
|
66
66
|
"dependencies": {
|
|
67
|
-
"@viasat/beam-fonts": "2.
|
|
68
|
-
"@viasat/beam-shared": "2.
|
|
69
|
-
"@viasat/beam-styles": "2.
|
|
70
|
-
"@viasat/beam-tokens": "2.
|
|
71
|
-
"@viasat/beam-icons": "2.
|
|
67
|
+
"@viasat/beam-fonts": "2.50.0",
|
|
68
|
+
"@viasat/beam-shared": "2.50.0",
|
|
69
|
+
"@viasat/beam-styles": "2.50.0",
|
|
70
|
+
"@viasat/beam-tokens": "2.50.0",
|
|
71
|
+
"@viasat/beam-icons": "2.50.0",
|
|
72
72
|
"clsx": "^1.2.1",
|
|
73
73
|
"lit": "^3.1.0",
|
|
74
74
|
"@lit/context": "^1.1.1",
|