@rcarls/rc-field 0.0.0 → 0.7.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/CHANGELOG.md +139 -0
- package/README.md +116 -6
- package/dist/custom-elements.json +1099 -0
- package/dist/rc-field-T33bxLJH.js +375 -0
- package/dist/rc-field-T33bxLJH.js.map +1 -0
- package/dist/rc-field-define.js +6 -0
- package/dist/rc-field-define.js.map +1 -0
- package/dist/rc-field.js +5 -0
- package/dist/rc-field.js.map +1 -0
- package/dist/types/packages/rc-field/src/define.d.ts +1 -0
- package/dist/types/packages/rc-field/src/index.d.ts +1 -0
- package/dist/types/packages/rc-field/src/rc-field.d.ts +187 -0
- package/dist/types/packages/rc-field/src/rc-field.styles.d.ts +2 -0
- package/package.json +58 -7
|
@@ -0,0 +1,375 @@
|
|
|
1
|
+
import { css as v, LitElement as g, html as m } from "lit";
|
|
2
|
+
import { property as _, state as a } from "lit/decorators.js";
|
|
3
|
+
import { NativeChildController as b, cssText as y } from "@rcarls/rc-common";
|
|
4
|
+
const C = v`:host{color-scheme:inherit;display:inline-block}[hidden]{display:none!important}#field{box-sizing:border-box;min-block-size:var(--rc-field-min-block-size,var(--rc-control-block-size,2.5rem));padding:var(--rc-field-padding,var(--rc-control-padding-block,.5rem) var(--rc-control-padding-inline,.75rem));border:var(--rc-field-border,var(--rc-border,1px solid ButtonBorder));border-radius:var(--rc-field-radius,var(--rc-control-radius,.125rem));background:var(--rc-field-background,var(--rc-field,Field));color:var(--rc-field-color,var(--rc-field-text,FieldText));font-family:var(--rc-font-family,inherit);font-size:var(--rc-font-size,1em);font-weight:var(--rc-font-weight,400);line-height:var(--rc-line-height,normal);align-items:center;gap:0;display:flex}#field.empty{background:0 0;border:0;min-block-size:0;padding:0}#content{flex-direction:column;flex:auto;min-inline-size:0;display:flex}#label{color:var(--rc-field-label-color,var(--rc-field-text,CanvasText));line-height:1.25}#control{align-items:center;gap:0;min-inline-size:0;display:flex}#leading,#trailing,#prefix,#suffix{flex:none;align-items:center;display:inline-flex}#leading:not(.empty-slot){margin-inline-end:var(--rc-field-gap,var(--rc-control-gap,.5rem))}#trailing:not(.empty-slot){margin-inline-start:var(--rc-field-gap,var(--rc-control-gap,.5rem))}#prefix:not(.empty-slot){margin-inline-end:var(--rc-field-control-gap,var(--rc-control-gap,.25rem))}#suffix:not(.empty-slot){margin-inline-start:var(--rc-field-control-gap,var(--rc-control-gap,.25rem))}#leading.empty-slot,#trailing.empty-slot,#prefix.empty-slot,#suffix.empty-slot{display:none}::slotted(input),::slotted(select),::slotted(textarea),::slotted([data-rc-field-control]){box-sizing:border-box;min-inline-size:0;max-inline-size:100%;color:inherit;font:inherit;box-shadow:none;-webkit-tap-highlight-color:transparent;background:0 0;border:0;border-radius:0;outline:0;flex:auto;padding:0}::slotted(textarea){resize:block;min-block-size:4lh}::slotted([data-rc-field-control]){display:block}#supporting{gap:var(--rc-field-supporting-gap,var(--rc-control-gap,.5rem));padding-block-start:var(--rc-field-supporting-padding-block-start,.25rem);padding-inline:var(--rc-field-supporting-padding-inline,var(--rc-control-padding-inline,.75rem));color:var(--rc-field-supporting-color,var(--rc-field-text,CanvasText));font-size:var(--rc-field-supporting-font-size,.75rem);grid-template-columns:minmax(0,1fr) auto;line-height:1.333;display:grid}#error{color:var(--rc-field-error-color,red)}#counter{white-space:nowrap;grid-area:1/2}:host([data-invalid]) #field{border-color:var(--rc-field-error-color,red)}:host([data-disabled]){opacity:var(--rc-field-disabled-opacity,var(--rc-disabled-opacity,.6))}:host([data-focused]) #field{outline:var(--rc-field-focus-outline,var(--rc-focus-ring,2px solid Highlight));outline-offset:var(--rc-field-focus-outline-offset,var(--rc-focus-ring-offset,0))}@media (forced-colors:active){:host([data-invalid]) #field{border-color:mark}:host([data-focused]) #field{outline-color:highlight}}`;
|
|
5
|
+
var x = Object.defineProperty, o = (u, t, e, s) => {
|
|
6
|
+
for (var i = void 0, r = u.length - 1, d; r >= 0; r--)
|
|
7
|
+
(d = u[r]) && (i = d(t, e, i) || i);
|
|
8
|
+
return i && x(t, e, i), i;
|
|
9
|
+
};
|
|
10
|
+
const S = [
|
|
11
|
+
":scope > input",
|
|
12
|
+
":scope > textarea",
|
|
13
|
+
":scope > select",
|
|
14
|
+
":scope > [data-rc-field-control] > input",
|
|
15
|
+
":scope > [data-rc-field-control] > textarea",
|
|
16
|
+
":scope > [data-rc-field-control] > select",
|
|
17
|
+
":scope > fieldset"
|
|
18
|
+
].join(", "), L = y`@layer rc-base{rc-field>fieldset{box-sizing:border-box;align-items:center;gap:0 var(--rc-field-control-gap,var(--rc-control-gap,.25rem));border:0;flex-wrap:wrap;flex:auto;min-inline-size:0;margin:0;padding:0;display:flex}rc-field>fieldset>legend{float:inline-start;box-sizing:border-box;color:var(--rc-field-label-color,var(--rc-field-text,CanvasText));flex:0 0 100%;margin:0;padding:0;line-height:1.25}rc-field>fieldset>:is(input,textarea,select){box-sizing:border-box;min-inline-size:0;max-inline-size:100%;color:inherit;font:inherit;box-shadow:none;-webkit-tap-highlight-color:transparent;background:0 0;border:0;border-radius:0;outline:0;padding:0}rc-field>fieldset>:is(input,textarea){flex:1 1 0}rc-field>fieldset>:is(select,[data-rc-field-control]){flex:none}}`, E = /* @__PURE__ */ new Set([
|
|
19
|
+
"date",
|
|
20
|
+
"datetime-local",
|
|
21
|
+
"email",
|
|
22
|
+
"month",
|
|
23
|
+
"number",
|
|
24
|
+
"password",
|
|
25
|
+
"search",
|
|
26
|
+
"tel",
|
|
27
|
+
"text",
|
|
28
|
+
"time",
|
|
29
|
+
"url",
|
|
30
|
+
"week"
|
|
31
|
+
]);
|
|
32
|
+
let I = 0;
|
|
33
|
+
function p(u) {
|
|
34
|
+
return [...u.elements].filter(
|
|
35
|
+
(t) => t instanceof HTMLInputElement || t instanceof HTMLTextAreaElement || t instanceof HTMLSelectElement
|
|
36
|
+
);
|
|
37
|
+
}
|
|
38
|
+
var l;
|
|
39
|
+
const n = (l = class extends g {
|
|
40
|
+
constructor() {
|
|
41
|
+
super(...arguments), this.counter = !1, this.invalid = !1, this._hasControl = !1, this._hasLabel = !1, this._hasLeading = !1, this._hasTrailing = !1, this._hasPrefix = !1, this._hasSuffix = !1, this._hasHint = !1, this._hasError = !1, this._focused = !1, this._populated = !1, this._disabled = !1, this._readOnly = !1, this._required = !1, this._multiline = !1, this._grouped = !1, this._validationAttempted = !1, this._nativeInvalid = !1, this._validationMessage = "", this._$controlRef = null, this._$controlProviderRef = null, this._$groupRef = null, this._groupObserver = null, this._$formRef = null, this._controlObserver = null, this._compositionObserver = null, this._managedDescriptionIds = /* @__PURE__ */ new Set(), this._managedIds = [], this._managedLabel = null, this._managedControlId = null, this._managedAriaInvalid = /* @__PURE__ */ new Set(), this._controlController = new b(this, {
|
|
42
|
+
selector: S,
|
|
43
|
+
observe: { childList: !0, subtree: !0 },
|
|
44
|
+
onChange: (t, e) => this._setupRoot(t, e),
|
|
45
|
+
onMissing: () => {
|
|
46
|
+
}
|
|
47
|
+
}), this._onControlInput = () => {
|
|
48
|
+
this._syncState(), !this.controls.some((t) => !t.validity.valid) && (this._nativeInvalid = !1, this._validationMessage = "", this._syncState(), this._syncAssociations());
|
|
49
|
+
}, this._onControlChange = () => this.sync(), this._onControlFocus = () => {
|
|
50
|
+
this._focused = !0, this._reflectStates();
|
|
51
|
+
}, this._onControlBlur = () => {
|
|
52
|
+
this._focused = !1, this._syncState();
|
|
53
|
+
}, this._onProviderFocusIn = () => {
|
|
54
|
+
this._focused = !0, this._reflectStates();
|
|
55
|
+
}, this._onProviderFocusOut = () => {
|
|
56
|
+
this._focused = !1, this._syncState();
|
|
57
|
+
}, this._onGroupFocusIn = () => {
|
|
58
|
+
this._focused = !0, this._reflectStates();
|
|
59
|
+
}, this._onGroupFocusOut = (t) => {
|
|
60
|
+
const e = t.relatedTarget;
|
|
61
|
+
e instanceof Node && this.group?.contains(e) || (this._focused = !1, this._syncState());
|
|
62
|
+
}, this._onControlInvalid = (t) => {
|
|
63
|
+
const e = t.target, s = e instanceof HTMLInputElement || e instanceof HTMLTextAreaElement || e instanceof HTMLSelectElement ? e.validationMessage : this.control?.validationMessage ?? "";
|
|
64
|
+
this._validationAttempted = !0, this._nativeInvalid = !0, this._validationMessage = s, this._syncState(), this._syncAssociations();
|
|
65
|
+
}, this._onCompositionEnd = () => this._syncState(), this._onFormReset = () => {
|
|
66
|
+
this._validationAttempted = !1, this._nativeInvalid = !1, this._validationMessage = "", this._queueSync();
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
static _ensureBaseStyles(t) {
|
|
70
|
+
if (!(t instanceof Document || t instanceof ShadowRoot) || l._styledRoots.has(t))
|
|
71
|
+
return;
|
|
72
|
+
l._styledRoots.add(t);
|
|
73
|
+
const e = (t instanceof Document ? t : t.ownerDocument).createElement("style");
|
|
74
|
+
e.setAttribute("data-rc-light-dom-base", "rc-field"), e.textContent = L, t instanceof Document ? t.head.append(e) : t.append(e);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Returns the native control, or `null` when the field is incomplete. In a group, this is the
|
|
78
|
+
* primary control: the first text-like input or textarea, or else the first control.
|
|
79
|
+
*/
|
|
80
|
+
get control() {
|
|
81
|
+
return this._$controlRef?.deref() ?? null;
|
|
82
|
+
}
|
|
83
|
+
/** Returns the `<fieldset>` that groups the field's controls, or `null` for a single control. */
|
|
84
|
+
get group() {
|
|
85
|
+
return this._$groupRef?.deref() ?? null;
|
|
86
|
+
}
|
|
87
|
+
/** Returns every native control the field manages, in source order. */
|
|
88
|
+
get controls() {
|
|
89
|
+
const t = this.group;
|
|
90
|
+
if (t)
|
|
91
|
+
return p(t);
|
|
92
|
+
const e = this.control;
|
|
93
|
+
return e ? [e] : [];
|
|
94
|
+
}
|
|
95
|
+
connectedCallback() {
|
|
96
|
+
super.connectedCallback(), l._ensureBaseStyles(this.getRootNode()), this._compositionObserver ??= new MutationObserver(() => this._queueSync()), this._compositionObserver.observe(this, {
|
|
97
|
+
childList: !0,
|
|
98
|
+
attributes: !0,
|
|
99
|
+
attributeFilter: ["slot"]
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
disconnectedCallback() {
|
|
103
|
+
this._compositionObserver?.disconnect();
|
|
104
|
+
const t = this.group;
|
|
105
|
+
t ? this._teardownGroup(t) : this._teardownControl(this.control), super.disconnectedCallback();
|
|
106
|
+
}
|
|
107
|
+
willUpdate(t) {
|
|
108
|
+
(t.has("invalid") || t.has("counter")) && (this._syncState(), this._syncAssociations());
|
|
109
|
+
}
|
|
110
|
+
/** Focuses the native control. */
|
|
111
|
+
focus(t) {
|
|
112
|
+
(this._$controlProviderRef?.deref() ?? this.control)?.focus(t);
|
|
113
|
+
}
|
|
114
|
+
/** Removes focus from the native control. */
|
|
115
|
+
blur() {
|
|
116
|
+
(this._$controlProviderRef?.deref() ?? this.control)?.blur();
|
|
117
|
+
}
|
|
118
|
+
/** Re-reads native value, validity, attributes, slots, and accessible relationships. */
|
|
119
|
+
sync() {
|
|
120
|
+
this._controlController.sync(), this._syncGroupControl(), this._syncSlots(), this._syncForm(), this._syncState(), this._syncAssociations();
|
|
121
|
+
}
|
|
122
|
+
_setupRoot(t, e) {
|
|
123
|
+
e instanceof HTMLFieldSetElement ? this._teardownGroup(e) : e && this._teardownControl(e), t instanceof HTMLFieldSetElement ? this._setupGroup(t) : this._setupControl(t);
|
|
124
|
+
}
|
|
125
|
+
_setupGroup(t) {
|
|
126
|
+
this._$groupRef = new WeakRef(t), this._$controlProviderRef = null, this._grouped = !0, this._focused = t.matches(":focus-within"), this._validationAttempted = !1, this._nativeInvalid = !1, this._validationMessage = "", t.addEventListener("input", this._onControlInput), t.addEventListener("change", this._onControlChange), t.addEventListener("focusin", this._onGroupFocusIn), t.addEventListener("focusout", this._onGroupFocusOut), t.addEventListener("invalid", this._onControlInvalid, !0), t.addEventListener("compositionend", this._onCompositionEnd), this._groupObserver ??= new MutationObserver(() => this._queueSync()), this._groupObserver.observe(t, {
|
|
127
|
+
childList: !0,
|
|
128
|
+
subtree: !0,
|
|
129
|
+
attributes: !0,
|
|
130
|
+
attributeFilter: ["disabled", "maxlength", "placeholder", "readonly", "required", "type"]
|
|
131
|
+
}), this.sync(), this._warnGroupComposition(t);
|
|
132
|
+
}
|
|
133
|
+
_teardownGroup(t) {
|
|
134
|
+
t.removeEventListener("input", this._onControlInput), t.removeEventListener("change", this._onControlChange), t.removeEventListener("focusin", this._onGroupFocusIn), t.removeEventListener("focusout", this._onGroupFocusOut), t.removeEventListener("invalid", this._onControlInvalid, !0), t.removeEventListener("compositionend", this._onCompositionEnd), this._groupObserver?.disconnect(), this._$groupRef = null, this._grouped = !1, this._$formRef?.deref()?.removeEventListener("reset", this._onFormReset), this._$formRef = null, this._restoreAssociations(t), this._$controlRef = null;
|
|
135
|
+
}
|
|
136
|
+
/** Re-resolves a group's primary control after its contents change. */
|
|
137
|
+
_syncGroupControl() {
|
|
138
|
+
const t = this.group;
|
|
139
|
+
if (!t)
|
|
140
|
+
return;
|
|
141
|
+
const e = p(t), s = e.find(
|
|
142
|
+
(i) => i instanceof HTMLTextAreaElement || i instanceof HTMLInputElement && E.has(i.type)
|
|
143
|
+
) ?? e[0] ?? null;
|
|
144
|
+
this._$controlRef = s ? new WeakRef(s) : null, this._hasControl = s !== null;
|
|
145
|
+
}
|
|
146
|
+
_setupControl(t) {
|
|
147
|
+
this._$controlRef = t ? new WeakRef(t) : null;
|
|
148
|
+
const e = t?.parentElement?.matches("[data-rc-field-control]") ? t.parentElement : null;
|
|
149
|
+
if (this._$controlProviderRef = e ? new WeakRef(e) : null, this._hasControl = t !== null, this._focused = !1, this._validationAttempted = !1, this._nativeInvalid = !1, this._validationMessage = "", !t) {
|
|
150
|
+
this._syncSlots(), this._syncState();
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
t.addEventListener("input", this._onControlInput), t.addEventListener("change", this._onControlChange), t.addEventListener("focus", this._onControlFocus), t.addEventListener("blur", this._onControlBlur), t.addEventListener("invalid", this._onControlInvalid), t.addEventListener("compositionend", this._onCompositionEnd), e?.addEventListener("focusin", this._onProviderFocusIn), e?.addEventListener("focusout", this._onProviderFocusOut), this._controlObserver ??= new MutationObserver(() => this._queueSync()), this._controlObserver.observe(t, {
|
|
154
|
+
attributes: !0,
|
|
155
|
+
attributeFilter: ["disabled", "maxlength", "placeholder", "readonly", "required", "type"]
|
|
156
|
+
}), this.sync(), this._warnComposition(t);
|
|
157
|
+
}
|
|
158
|
+
_teardownControl(t) {
|
|
159
|
+
if (!t)
|
|
160
|
+
return;
|
|
161
|
+
t.removeEventListener("input", this._onControlInput), t.removeEventListener("change", this._onControlChange), t.removeEventListener("focus", this._onControlFocus), t.removeEventListener("blur", this._onControlBlur), t.removeEventListener("invalid", this._onControlInvalid), t.removeEventListener("compositionend", this._onCompositionEnd);
|
|
162
|
+
const e = this._$controlProviderRef?.deref();
|
|
163
|
+
e?.removeEventListener("focusin", this._onProviderFocusIn), e?.removeEventListener("focusout", this._onProviderFocusOut), this._$controlProviderRef = null, this._controlObserver?.disconnect(), this._$formRef?.deref()?.removeEventListener("reset", this._onFormReset), this._$formRef = null, this._restoreAssociations(t);
|
|
164
|
+
}
|
|
165
|
+
_syncForm() {
|
|
166
|
+
const t = this.control?.form ?? null, e = this._$formRef?.deref() ?? null;
|
|
167
|
+
t !== e && (e?.removeEventListener("reset", this._onFormReset), t?.addEventListener("reset", this._onFormReset), this._$formRef = t ? new WeakRef(t) : null);
|
|
168
|
+
}
|
|
169
|
+
_queueSync() {
|
|
170
|
+
queueMicrotask(() => {
|
|
171
|
+
this.isConnected && this.sync();
|
|
172
|
+
});
|
|
173
|
+
}
|
|
174
|
+
_syncState() {
|
|
175
|
+
const t = this.control;
|
|
176
|
+
this._hasControl = t !== null, this._populated = t instanceof HTMLSelectElement ? t.multiple ? t.selectedOptions.length > 0 : !!t.selectedOptions[0]?.label.trim() : !!t?.value;
|
|
177
|
+
const e = this.group, s = this.controls;
|
|
178
|
+
if (this._disabled = e ? e.disabled || s.length > 0 && s.every((i) => i.disabled) : this._effectiveDisabled(t), this._readOnly = t instanceof HTMLSelectElement ? !1 : t?.readOnly ?? !1, this._required = s.some((i) => i.required), this._multiline = !e && t instanceof HTMLTextAreaElement, t && this._validationAttempted) {
|
|
179
|
+
const i = s.find((r) => !r.validity.valid);
|
|
180
|
+
this._nativeInvalid = i !== void 0, this._validationMessage = i?.validationMessage ?? "";
|
|
181
|
+
}
|
|
182
|
+
this._reflectStates();
|
|
183
|
+
}
|
|
184
|
+
/**
|
|
185
|
+
* A control provider may disable its native control for a reason unrelated to the field's
|
|
186
|
+
* own enabled/disabled intent (`rc-select`'s picker guard force-disables a `multiple` native
|
|
187
|
+
* select to defeat a GeckoView label-activation bug, entirely independent of author intent).
|
|
188
|
+
* Prefer the provider's own `disabled` property, when it exposes one, over the raw control's
|
|
189
|
+
* — the same precedence `focus()`/`blur()` already give the provider over the control.
|
|
190
|
+
*/
|
|
191
|
+
_effectiveDisabled(t) {
|
|
192
|
+
const e = this._$controlProviderRef?.deref();
|
|
193
|
+
return e && "disabled" in e && typeof e.disabled == "boolean" ? e.disabled : t?.disabled ?? !1;
|
|
194
|
+
}
|
|
195
|
+
_reflectStates() {
|
|
196
|
+
this.toggleAttribute("data-focused", this._focused), this.toggleAttribute("data-populated", this._populated), this.toggleAttribute("data-disabled", this._disabled), this.toggleAttribute("data-readonly", this._readOnly), this.toggleAttribute("data-required", this._required), this.toggleAttribute("data-invalid", this._effectiveInvalid()), this.toggleAttribute("data-multiline", this._multiline), this.toggleAttribute("data-has-label", this._hasLabel), this.toggleAttribute("data-validation-attempted", this._validationAttempted), this.toggleAttribute("data-control-provider", this._$controlProviderRef?.deref() !== void 0), this.toggleAttribute("data-group", this._grouped);
|
|
197
|
+
}
|
|
198
|
+
_effectiveInvalid() {
|
|
199
|
+
return this.invalid || this._validationAttempted && this._nativeInvalid;
|
|
200
|
+
}
|
|
201
|
+
_syncSlots() {
|
|
202
|
+
this._hasLabel = this._hasSlottedContent("label"), this._hasLeading = this._hasSlottedContent("leading"), this._hasTrailing = this._hasSlottedContent("trailing"), this._hasPrefix = this._hasSlottedContent("prefix"), this._hasSuffix = this._hasSlottedContent("suffix"), this._hasHint = this._hasSlottedContent("hint"), this._hasError = this._hasSlottedContent("error");
|
|
203
|
+
}
|
|
204
|
+
_hasSlottedContent(t) {
|
|
205
|
+
return this.querySelector(`:scope > [slot='${t}']`) !== null;
|
|
206
|
+
}
|
|
207
|
+
_syncAssociations() {
|
|
208
|
+
const t = this.control;
|
|
209
|
+
if (!t)
|
|
210
|
+
return;
|
|
211
|
+
const e = this.group, s = e ?? t;
|
|
212
|
+
this._restoreAssociations(s, !1);
|
|
213
|
+
const i = this.querySelector(":scope > label[slot='label']");
|
|
214
|
+
if (i && !i.htmlFor && !e) {
|
|
215
|
+
const c = this._ensureId(t, "control");
|
|
216
|
+
i.htmlFor = c, this._managedLabel = { $label: i, htmlFor: c };
|
|
217
|
+
}
|
|
218
|
+
const r = [], d = this.querySelector(":scope > [slot='hint']"), f = this.querySelector(":scope > [slot='error']");
|
|
219
|
+
if (d && !this._effectiveInvalid() && r.push(this._ensureId(d, "hint")), f && this._effectiveInvalid() && r.push(this._ensureId(f, "error")), r.length) {
|
|
220
|
+
const c = (s.getAttribute("aria-describedby") ?? "").split(/\s+/).filter(Boolean), h = [.../* @__PURE__ */ new Set([...c, ...r])];
|
|
221
|
+
s.setAttribute("aria-describedby", h.join(" ")), this._managedDescriptionIds = new Set(r);
|
|
222
|
+
}
|
|
223
|
+
if (this._effectiveInvalid()) {
|
|
224
|
+
const c = e ? this.controls.filter((h) => this._validationAttempted && !h.validity.valid) : [t];
|
|
225
|
+
for (const h of c.length ? c : [t])
|
|
226
|
+
h.hasAttribute("aria-invalid") || (h.setAttribute("aria-invalid", "true"), this._managedAriaInvalid.add(h));
|
|
227
|
+
}
|
|
228
|
+
}
|
|
229
|
+
_restoreAssociations(t, e = !0) {
|
|
230
|
+
if (this._managedDescriptionIds.size) {
|
|
231
|
+
const i = (t.getAttribute("aria-describedby") ?? "").split(/\s+/).filter((r) => r && !this._managedDescriptionIds.has(r));
|
|
232
|
+
i.length ? t.setAttribute("aria-describedby", i.join(" ")) : t.removeAttribute("aria-describedby");
|
|
233
|
+
}
|
|
234
|
+
this._managedDescriptionIds.clear();
|
|
235
|
+
for (const i of this._managedAriaInvalid)
|
|
236
|
+
i.getAttribute("aria-invalid") === "true" && i.removeAttribute("aria-invalid");
|
|
237
|
+
this._managedAriaInvalid.clear();
|
|
238
|
+
const s = this._managedLabel;
|
|
239
|
+
if (s && s.$label.htmlFor === s.htmlFor && s.$label.removeAttribute("for"), this._managedLabel = null, e) {
|
|
240
|
+
for (const { $element: i, id: r } of this._managedIds)
|
|
241
|
+
i.id === r && i.removeAttribute("id");
|
|
242
|
+
this._managedIds = [], this._managedControlId && t.id === this._managedControlId && t.removeAttribute("id"), this._managedControlId = null;
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
_ensureId(t, e) {
|
|
246
|
+
if (t.id)
|
|
247
|
+
return t.id;
|
|
248
|
+
const s = `rc-field-${++I}-${e}`;
|
|
249
|
+
return t.id = s, t === this.control ? this._managedControlId = s : this._managedIds.push({ $element: t, id: s }), s;
|
|
250
|
+
}
|
|
251
|
+
_warnGroupComposition(t) {
|
|
252
|
+
}
|
|
253
|
+
_warnComposition(t) {
|
|
254
|
+
}
|
|
255
|
+
_handleSurfaceClick(t) {
|
|
256
|
+
const e = this.control, s = t.composedPath()[0];
|
|
257
|
+
if (!e || !(s instanceof Element) || s === e)
|
|
258
|
+
return;
|
|
259
|
+
const i = this._$controlProviderRef?.deref();
|
|
260
|
+
if (i && s.closest("label[slot='label']")) {
|
|
261
|
+
t.preventDefault(), i.focus();
|
|
262
|
+
return;
|
|
263
|
+
}
|
|
264
|
+
s.closest("button, a, input, textarea, select, [contenteditable], [tabindex]") || (i ?? e).focus();
|
|
265
|
+
}
|
|
266
|
+
_slotClass(t) {
|
|
267
|
+
return t ? "" : "empty-slot";
|
|
268
|
+
}
|
|
269
|
+
render() {
|
|
270
|
+
const t = this._effectiveInvalid(), e = this.control, s = e?.value.length ?? 0, i = e instanceof HTMLSelectElement ? -1 : e?.maxLength ?? -1, r = i >= 0 ? `${s} / ${i}` : String(s), d = t && (this._hasError || this._validationMessage), f = this._hasHint || d || this.counter;
|
|
271
|
+
return m`
|
|
272
|
+
<div
|
|
273
|
+
id="field"
|
|
274
|
+
part="field"
|
|
275
|
+
class=${this._hasControl ? "" : "empty"}
|
|
276
|
+
@click=${this._handleSurfaceClick}
|
|
277
|
+
>
|
|
278
|
+
<span id="leading" part="leading" class=${this._slotClass(this._hasLeading)}>
|
|
279
|
+
<slot name="leading" @slotchange=${this._queueSync}></slot>
|
|
280
|
+
</span>
|
|
281
|
+
<span id="content" part="content">
|
|
282
|
+
<span id="label" part="label" class=${this._slotClass(this._hasLabel)}>
|
|
283
|
+
<slot name="label" @slotchange=${this._queueSync}></slot>
|
|
284
|
+
</span>
|
|
285
|
+
<span id="control" part="control">
|
|
286
|
+
<span id="prefix" part="prefix" class=${this._slotClass(this._hasPrefix)}>
|
|
287
|
+
<slot name="prefix" @slotchange=${this._queueSync}></slot>
|
|
288
|
+
</span>
|
|
289
|
+
<slot @slotchange=${this._queueSync}></slot>
|
|
290
|
+
<span id="suffix" part="suffix" class=${this._slotClass(this._hasSuffix)}>
|
|
291
|
+
<slot name="suffix" @slotchange=${this._queueSync}></slot>
|
|
292
|
+
</span>
|
|
293
|
+
</span>
|
|
294
|
+
</span>
|
|
295
|
+
<span id="trailing" part="trailing" class=${this._slotClass(this._hasTrailing)}>
|
|
296
|
+
<slot name="trailing" @slotchange=${this._queueSync}></slot>
|
|
297
|
+
</span>
|
|
298
|
+
</div>
|
|
299
|
+
<div id="supporting" part="supporting-text" ?hidden=${!f}>
|
|
300
|
+
<span id="hint" part="hint" ?hidden=${d}>
|
|
301
|
+
<slot name="hint" @slotchange=${this._queueSync}></slot>
|
|
302
|
+
</span>
|
|
303
|
+
<span id="error" part="error" ?hidden=${!d}>
|
|
304
|
+
<slot name="error" @slotchange=${this._queueSync}>${this._validationMessage}</slot>
|
|
305
|
+
</span>
|
|
306
|
+
<span id="counter" part="counter" ?hidden=${!this.counter}>${r}</span>
|
|
307
|
+
</div>
|
|
308
|
+
`;
|
|
309
|
+
}
|
|
310
|
+
}, l.styles = [C], l._styledRoots = /* @__PURE__ */ new WeakSet(), l);
|
|
311
|
+
o([
|
|
312
|
+
_({ type: Boolean, reflect: !0 })
|
|
313
|
+
], n.prototype, "counter");
|
|
314
|
+
o([
|
|
315
|
+
_({ type: Boolean, reflect: !0 })
|
|
316
|
+
], n.prototype, "invalid");
|
|
317
|
+
o([
|
|
318
|
+
a()
|
|
319
|
+
], n.prototype, "_hasControl");
|
|
320
|
+
o([
|
|
321
|
+
a()
|
|
322
|
+
], n.prototype, "_hasLabel");
|
|
323
|
+
o([
|
|
324
|
+
a()
|
|
325
|
+
], n.prototype, "_hasLeading");
|
|
326
|
+
o([
|
|
327
|
+
a()
|
|
328
|
+
], n.prototype, "_hasTrailing");
|
|
329
|
+
o([
|
|
330
|
+
a()
|
|
331
|
+
], n.prototype, "_hasPrefix");
|
|
332
|
+
o([
|
|
333
|
+
a()
|
|
334
|
+
], n.prototype, "_hasSuffix");
|
|
335
|
+
o([
|
|
336
|
+
a()
|
|
337
|
+
], n.prototype, "_hasHint");
|
|
338
|
+
o([
|
|
339
|
+
a()
|
|
340
|
+
], n.prototype, "_hasError");
|
|
341
|
+
o([
|
|
342
|
+
a()
|
|
343
|
+
], n.prototype, "_focused");
|
|
344
|
+
o([
|
|
345
|
+
a()
|
|
346
|
+
], n.prototype, "_populated");
|
|
347
|
+
o([
|
|
348
|
+
a()
|
|
349
|
+
], n.prototype, "_disabled");
|
|
350
|
+
o([
|
|
351
|
+
a()
|
|
352
|
+
], n.prototype, "_readOnly");
|
|
353
|
+
o([
|
|
354
|
+
a()
|
|
355
|
+
], n.prototype, "_required");
|
|
356
|
+
o([
|
|
357
|
+
a()
|
|
358
|
+
], n.prototype, "_multiline");
|
|
359
|
+
o([
|
|
360
|
+
a()
|
|
361
|
+
], n.prototype, "_grouped");
|
|
362
|
+
o([
|
|
363
|
+
a()
|
|
364
|
+
], n.prototype, "_validationAttempted");
|
|
365
|
+
o([
|
|
366
|
+
a()
|
|
367
|
+
], n.prototype, "_nativeInvalid");
|
|
368
|
+
o([
|
|
369
|
+
a()
|
|
370
|
+
], n.prototype, "_validationMessage");
|
|
371
|
+
let F = n;
|
|
372
|
+
export {
|
|
373
|
+
F as R
|
|
374
|
+
};
|
|
375
|
+
//# sourceMappingURL=rc-field-T33bxLJH.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rc-field-T33bxLJH.js","sources":["../src/rc-field.styles.ts","../src/rc-field.ts"],"sourcesContent":["import { css } from 'lit';\n\nexport const fieldStyles = css`\n :host {\n display: inline-block;\n color-scheme: inherit;\n }\n\n [hidden] {\n display: none !important;\n }\n\n #field {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n min-block-size: var(--rc-field-min-block-size, var(--rc-control-block-size, 2.5rem));\n gap: 0;\n padding: var(\n --rc-field-padding,\n var(--rc-control-padding-block, 0.5rem) var(--rc-control-padding-inline, 0.75rem)\n );\n border: var(--rc-field-border, var(--rc-border, 1px solid ButtonBorder));\n border-radius: var(--rc-field-radius, var(--rc-control-radius, 0.125rem));\n background: var(--rc-field-background, var(--rc-field, Field));\n color: var(--rc-field-color, var(--rc-field-text, FieldText));\n font-family: var(--rc-font-family, inherit);\n font-size: var(--rc-font-size, 1em);\n font-weight: var(--rc-font-weight, 400);\n line-height: var(--rc-line-height, normal);\n }\n\n #field.empty {\n min-block-size: 0;\n padding: 0;\n border: 0;\n background: none;\n }\n\n #content {\n display: flex;\n flex: 1 1 auto;\n min-inline-size: 0;\n flex-direction: column;\n }\n\n #label {\n color: var(--rc-field-label-color, var(--rc-field-text, CanvasText));\n line-height: 1.25;\n }\n\n #control {\n display: flex;\n min-inline-size: 0;\n align-items: center;\n gap: 0;\n }\n\n #leading,\n #trailing,\n #prefix,\n #suffix {\n display: inline-flex;\n flex: none;\n align-items: center;\n }\n\n #leading:not(.empty-slot) {\n margin-inline-end: var(--rc-field-gap, var(--rc-control-gap, 0.5rem));\n }\n\n #trailing:not(.empty-slot) {\n margin-inline-start: var(--rc-field-gap, var(--rc-control-gap, 0.5rem));\n }\n\n #prefix:not(.empty-slot) {\n margin-inline-end: var(--rc-field-control-gap, var(--rc-control-gap, 0.25rem));\n }\n\n #suffix:not(.empty-slot) {\n margin-inline-start: var(--rc-field-control-gap, var(--rc-control-gap, 0.25rem));\n }\n\n /*\n * Must repeat the #leading/#trailing/#prefix/#suffix id selectors: a class alone\n * (0,1,0) can never beat their own display:inline-flex rule above, an id selector\n * (1,0,0) — an empty slot region reflowed as an invisible box but kept its\n * inline-flex layout box (and any margin set for the non-empty case), silently\n * eating into the control's available width.\n */\n #leading.empty-slot,\n #trailing.empty-slot,\n #prefix.empty-slot,\n #suffix.empty-slot {\n display: none;\n }\n\n ::slotted(input),\n ::slotted(select),\n ::slotted(textarea),\n ::slotted([data-rc-field-control]) {\n box-sizing: border-box;\n flex: 1 1 auto;\n min-inline-size: 0;\n max-inline-size: 100%;\n padding: 0;\n border: 0;\n border-radius: 0;\n outline: 0;\n background: transparent;\n color: inherit;\n font: inherit;\n box-shadow: none;\n /*\n * Chromium's own tap-highlight flash on touch is not an outline and\n * isn't covered by outline: 0 above; Firefox has no equivalent\n * behavior, which is why an unstyled control only flashes on Chrome.\n */\n -webkit-tap-highlight-color: transparent;\n }\n\n ::slotted(textarea) {\n min-block-size: 4lh;\n resize: block;\n }\n\n ::slotted([data-rc-field-control]) {\n display: block;\n }\n\n #supporting {\n display: grid;\n grid-template-columns: minmax(0, 1fr) auto;\n gap: var(--rc-field-supporting-gap, var(--rc-control-gap, 0.5rem));\n padding-block-start: var(--rc-field-supporting-padding-block-start, 0.25rem);\n padding-inline: var(\n --rc-field-supporting-padding-inline,\n var(--rc-control-padding-inline, 0.75rem)\n );\n color: var(--rc-field-supporting-color, var(--rc-field-text, CanvasText));\n font-size: var(--rc-field-supporting-font-size, 0.75rem);\n line-height: 1.333;\n }\n\n #error {\n /*\n * Falls back to the validation red a user agent uses for an invalid\n * control, not to a system color. Mark is the background of highlighted\n * text, which renders as pure yellow and is unreadable as a foreground.\n */\n color: var(--rc-field-error-color, red);\n }\n\n #counter {\n grid-column: 2;\n grid-row: 1;\n white-space: nowrap;\n }\n\n :host([data-invalid]) #field {\n border-color: var(--rc-field-error-color, red);\n }\n\n :host([data-disabled]) {\n opacity: var(--rc-field-disabled-opacity, var(--rc-disabled-opacity, 0.6));\n }\n\n :host([data-focused]) #field {\n outline: var(--rc-field-focus-outline, var(--rc-focus-ring, 2px solid Highlight));\n outline-offset: var(--rc-field-focus-outline-offset, var(--rc-focus-ring-offset, 0));\n }\n\n @media (forced-colors: active) {\n :host([data-invalid]) #field {\n border-color: Mark;\n }\n\n :host([data-focused]) #field {\n outline-color: Highlight;\n }\n }\n`;\n\nexport default fieldStyles;\n","import { LitElement, html, type PropertyValues } from 'lit';\nimport { property, state } from 'lit/decorators.js';\n\nimport {\n cssText,\n getDirectChildren,\n NativeChildController,\n warnMissingDirectChild,\n} from '@rcarls/rc-common';\n\nimport fieldStyles from './rc-field.styles.js';\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'rc-field': RCField;\n }\n}\n\nexport type RCFieldControl = HTMLInputElement | HTMLTextAreaElement | HTMLSelectElement;\n\nconst CONTROL_SELECTOR = [\n ':scope > input',\n ':scope > textarea',\n ':scope > select',\n ':scope > [data-rc-field-control] > input',\n ':scope > [data-rc-field-control] > textarea',\n ':scope > [data-rc-field-control] > select',\n ':scope > fieldset',\n].join(', ');\n\n/**\n * Structural light-DOM CSS for group mode. `::slotted()` reaches only the fieldset, so its\n * legend and controls are laid out from the containing document or shadow root, in `rc-base`\n * below every theme layer.\n */\nconst LIGHT_DOM_CSS = cssText`\n@layer rc-base {\n rc-field > fieldset {\n box-sizing: border-box;\n display: flex;\n flex: 1 1 auto;\n flex-wrap: wrap;\n align-items: center;\n gap: 0 var(--rc-field-control-gap, var(--rc-control-gap, 0.25rem));\n min-inline-size: 0;\n margin: 0;\n padding: 0;\n border: 0;\n }\n\n /* A floated legend is not the fieldset's rendered legend, so it lays out as a flex item\n on its own row, where the field label sits. */\n rc-field > fieldset > legend {\n float: inline-start;\n flex: 0 0 100%;\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n color: var(--rc-field-label-color, var(--rc-field-text, CanvasText));\n line-height: 1.25;\n }\n\n rc-field > fieldset > :is(input, textarea, select) {\n box-sizing: border-box;\n min-inline-size: 0;\n max-inline-size: 100%;\n padding: 0;\n border: 0;\n border-radius: 0;\n outline: 0;\n background: transparent;\n color: inherit;\n font: inherit;\n box-shadow: none;\n -webkit-tap-highlight-color: transparent;\n }\n\n /* Text-like controls grow; selects and enhanced controls attach as leading or trailing\n addons in source order. */\n rc-field > fieldset > :is(input, textarea) {\n flex: 1 1 0;\n }\n\n rc-field > fieldset > :is(select, [data-rc-field-control]) {\n flex: none;\n }\n}\n`;\n\nconst TEXT_INPUT_TYPES = new Set([\n 'date',\n 'datetime-local',\n 'email',\n 'month',\n 'number',\n 'password',\n 'search',\n 'tel',\n 'text',\n 'time',\n 'url',\n 'week',\n]);\n\nlet fieldId = 0;\n\n/** The native controls a fieldset groups, including those owned by enhancing providers. */\nfunction groupControls($group: HTMLFieldSetElement): RCFieldControl[] {\n return [...$group.elements].filter(\n ($element): $element is RCFieldControl =>\n $element instanceof HTMLInputElement ||\n $element instanceof HTMLTextAreaElement ||\n $element instanceof HTMLSelectElement,\n );\n}\n\n/**\n * Accessible field wrapper for a native input, textarea, or select with labels and supporting\n * text.\n *\n * The native control remains connected in light DOM and owns its value, form association,\n * autofill, constraint validation, and native events. `rc-field` derives visual state from that\n * control and wires a slotted label, hint, and error without replacing author-provided ARIA\n * references. Programmatic native value writes are visible after calling `sync()`.\n *\n * Derived host attributes expose `data-focused`, `data-populated`, `data-disabled`,\n * `data-readonly`, `data-required`, `data-invalid`, `data-multiline`, `data-has-label`, and\n * `data-validation-attempted` for themes.\n *\n * A direct `<fieldset>` child groups several native controls into one field, such as an amount\n * and its unit. Its `<legend>` names the group and shows as the field label, and each control\n * keeps its own accessible name. The first text-like input or textarea is the primary control,\n * and the others attach before or after it in source order. Supporting text describes the\n * fieldset.\n *\n * @see {@link https://richardcarls.github.io/rc-webcomponents/components/rc-field rc-field docs}\n * @see {@link https://m3.material.io/components/text-fields/overview Material Design 3 text fields}\n *\n * @slot - Required native `<input>`, `<textarea>`, or `<select>` control. An enhancing direct\n * child marked `data-rc-field-control` may own the native control as its direct child. A\n * `<fieldset>` with a `<legend>` instead groups several controls into one field.\n * @slot label - Visible label; use a native `<label>` unless an ancestor label wraps the field\n * @slot leading - Leading icon or control outside the editable content\n * @slot trailing - Trailing icon or control outside the editable content\n * @slot prefix - Text or content immediately before the native control\n * @slot suffix - Text or content immediately after the native control\n * @slot hint - Supporting guidance associated with the native control\n * @slot error - Error text shown and associated after validation is attempted\n *\n * @attr counter - Shows the current native value length and `maxlength`, when present\n * @attr invalid - Forces invalid presentation and supplies native `aria-invalid` when absent\n * @attr [data-focused] - Present while the native control has focus\n * @attr [data-populated] - Present while the native control has a value, or a single select's\n * selected option has visible label text\n * @attr [data-disabled] - Mirrors the native control's disabled state\n * @attr [data-readonly] - Mirrors the native control's readonly state\n * @attr [data-required] - Mirrors the native control's required state\n * @attr [data-invalid] - Present while an attempted or forced validation state is invalid\n * @attr [data-multiline] - Present when the native control is a textarea\n * @attr [data-has-label] - Present when the field has content in its label slot\n * @attr [data-validation-attempted] - Present after the native control dispatches `invalid`\n * @attr [data-control-provider] - Present when an enhancing direct child owns the native control\n * @attr [data-group] - Present when a `<fieldset>` groups several controls into the field\n *\n * @cssprop [--rc-field-min-block-size=var(--rc-control-block-size, 2.5rem)] - Minimum field surface block size\n * @cssprop [--rc-field-gap=var(--rc-control-gap, 0.5rem)] - Gap between leading, content, and trailing regions\n * @cssprop [--rc-field-padding=var(--rc-control-padding-block, 0.5rem) var(--rc-control-padding-inline, 0.75rem)] - Field surface padding\n * @cssprop [--rc-field-border=var(--rc-border, 1px solid ButtonBorder)] - Field surface border\n * @cssprop [--rc-field-radius=var(--rc-control-radius, 0.125rem)] - Field surface corner radius\n * @cssprop [--rc-field-background=var(--rc-field, Field)] - Field surface background\n * @cssprop [--rc-field-color=var(--rc-field-text, FieldText)] - Input and affix text color\n * @cssprop [--rc-field-label-color=var(--rc-field-text, CanvasText)] - Label color\n * @cssprop [--rc-field-control-gap=var(--rc-control-gap, 0.25rem)] - Gap between control and prefix or suffix\n * @cssprop [--rc-field-supporting-gap=var(--rc-control-gap, 0.5rem)] - Gap between supporting text and counter\n * @cssprop [--rc-field-supporting-padding-block-start=0.25rem] - Supporting text top padding\n * @cssprop [--rc-field-supporting-padding-inline=var(--rc-control-padding-inline, 0.75rem)] - Supporting text inline padding\n * @cssprop [--rc-field-supporting-color=var(--rc-field-text, CanvasText)] - Hint and counter color\n * @cssprop [--rc-field-supporting-font-size=0.75rem] - Hint, error, and counter font size\n * @cssprop [--rc-field-error-color=Mark] - Invalid outline, label, and error color\n * @cssprop [--rc-field-disabled-opacity=var(--rc-disabled-opacity, 0.6)] - Disabled field opacity\n * @cssprop [--rc-field-focus-outline=var(--rc-focus-ring, 2px solid Highlight)] - Focus outline\n * @cssprop [--rc-field-focus-outline-offset=var(--rc-focus-ring-offset, 0)] - Focus outline offset\n *\n * @csspart field - Field surface\n * @csspart content - Label and editable content column\n * @csspart label - Label container\n * @csspart control - Native control, prefix, and suffix row\n * @csspart leading - Leading content container\n * @csspart trailing - Trailing content container\n * @csspart prefix - Prefix content container\n * @csspart suffix - Suffix content container\n * @csspart supporting-text - Supporting text row\n * @csspart hint - Hint container\n * @csspart error - Error container\n * @csspart counter - Character counter\n */\nexport class RCField extends LitElement {\n static styles = [fieldStyles];\n\n private static readonly _styledRoots = new WeakSet<Document | ShadowRoot>();\n\n private static _ensureBaseStyles(root: Node): void {\n if (\n !(root instanceof Document || root instanceof ShadowRoot) ||\n RCField._styledRoots.has(root)\n ) {\n return;\n }\n\n RCField._styledRoots.add(root);\n\n const $style = (root instanceof Document ? root : root.ownerDocument).createElement('style');\n\n $style.setAttribute('data-rc-light-dom-base', 'rc-field');\n $style.textContent = LIGHT_DOM_CSS;\n\n if (root instanceof Document) {\n root.head.append($style);\n } else {\n root.append($style);\n }\n }\n\n /** Shows the current native value length and `maxlength`, when present. */\n @property({ type: Boolean, reflect: true })\n counter = false;\n\n /** Forces invalid presentation and supplies native `aria-invalid` when absent. */\n @property({ type: Boolean, reflect: true })\n invalid = false;\n\n @state()\n private _hasControl = false;\n\n @state()\n private _hasLabel = false;\n\n @state()\n private _hasLeading = false;\n\n @state()\n private _hasTrailing = false;\n\n @state()\n private _hasPrefix = false;\n\n @state()\n private _hasSuffix = false;\n\n @state()\n private _hasHint = false;\n\n @state()\n private _hasError = false;\n\n @state()\n private _focused = false;\n\n @state()\n private _populated = false;\n\n @state()\n private _disabled = false;\n\n @state()\n private _readOnly = false;\n\n @state()\n private _required = false;\n\n @state()\n private _multiline = false;\n\n @state()\n private _grouped = false;\n\n @state()\n private _validationAttempted = false;\n\n @state()\n private _nativeInvalid = false;\n\n @state()\n private _validationMessage = '';\n\n private _$controlRef: WeakRef<RCFieldControl> | null = null;\n\n private _$controlProviderRef: WeakRef<HTMLElement> | null = null;\n\n private _$groupRef: WeakRef<HTMLFieldSetElement> | null = null;\n\n private _groupObserver: MutationObserver | null = null;\n\n private _$formRef: WeakRef<HTMLFormElement> | null = null;\n\n private _controlObserver: MutationObserver | null = null;\n\n private _compositionObserver: MutationObserver | null = null;\n\n private _managedDescriptionIds = new Set<string>();\n\n private _managedIds: Array<{ $element: HTMLElement; id: string }> = [];\n\n private _managedLabel: { $label: HTMLLabelElement; htmlFor: string } | null = null;\n\n private _managedControlId: string | null = null;\n\n private _managedAriaInvalid = new Set<RCFieldControl>();\n\n private readonly _controlController = new NativeChildController<\n RCFieldControl | HTMLFieldSetElement\n >(this, {\n selector: CONTROL_SELECTOR,\n observe: { childList: true, subtree: true },\n onChange: ($root, $previousRoot) => this._setupRoot($root, $previousRoot),\n onMissing: () => {\n if (import.meta.env.DEV) {\n warnMissingDirectChild(this, {\n selector: CONTROL_SELECTOR,\n childDescription:\n 'native <input> or <textarea>, optionally inside a data-rc-field-control provider, ' +\n 'or a <fieldset> grouping several controls',\n });\n }\n },\n });\n\n /**\n * Returns the native control, or `null` when the field is incomplete. In a group, this is the\n * primary control: the first text-like input or textarea, or else the first control.\n */\n get control(): RCFieldControl | null {\n return this._$controlRef?.deref() ?? null;\n }\n\n /** Returns the `<fieldset>` that groups the field's controls, or `null` for a single control. */\n get group(): HTMLFieldSetElement | null {\n return this._$groupRef?.deref() ?? null;\n }\n\n /** Returns every native control the field manages, in source order. */\n get controls(): RCFieldControl[] {\n const $group = this.group;\n\n if ($group) {\n return groupControls($group);\n }\n\n const $control = this.control;\n\n return $control ? [$control] : [];\n }\n\n override connectedCallback(): void {\n super.connectedCallback();\n RCField._ensureBaseStyles(this.getRootNode());\n\n this._compositionObserver ??= new MutationObserver(() => this._queueSync());\n\n this._compositionObserver.observe(this, {\n childList: true,\n attributes: true,\n attributeFilter: ['slot'],\n });\n }\n\n override disconnectedCallback(): void {\n this._compositionObserver?.disconnect();\n\n const $group = this.group;\n\n if ($group) {\n this._teardownGroup($group);\n } else {\n this._teardownControl(this.control);\n }\n\n super.disconnectedCallback();\n }\n\n protected override willUpdate(changed: PropertyValues<this>): void {\n if (changed.has('invalid') || changed.has('counter')) {\n this._syncState();\n this._syncAssociations();\n }\n }\n\n /** Focuses the native control. */\n override focus(options?: FocusOptions): void {\n (this._$controlProviderRef?.deref() ?? this.control)?.focus(options);\n }\n\n /** Removes focus from the native control. */\n override blur(): void {\n (this._$controlProviderRef?.deref() ?? this.control)?.blur();\n }\n\n /** Re-reads native value, validity, attributes, slots, and accessible relationships. */\n public sync(): void {\n this._controlController.sync();\n this._syncGroupControl();\n this._syncSlots();\n this._syncForm();\n this._syncState();\n this._syncAssociations();\n }\n\n private _setupRoot(\n $root: RCFieldControl | HTMLFieldSetElement | null,\n $previousRoot: RCFieldControl | HTMLFieldSetElement | null,\n ): void {\n if ($previousRoot instanceof HTMLFieldSetElement) {\n this._teardownGroup($previousRoot);\n } else if ($previousRoot) {\n this._teardownControl($previousRoot);\n }\n\n if ($root instanceof HTMLFieldSetElement) {\n this._setupGroup($root);\n } else {\n this._setupControl($root);\n }\n }\n\n private _setupGroup($group: HTMLFieldSetElement): void {\n this._$groupRef = new WeakRef($group);\n this._$controlProviderRef = null;\n this._grouped = true;\n this._focused = $group.matches(':focus-within');\n this._validationAttempted = false;\n this._nativeInvalid = false;\n this._validationMessage = '';\n\n $group.addEventListener('input', this._onControlInput);\n $group.addEventListener('change', this._onControlChange);\n $group.addEventListener('focusin', this._onGroupFocusIn);\n $group.addEventListener('focusout', this._onGroupFocusOut);\n $group.addEventListener('invalid', this._onControlInvalid, true);\n $group.addEventListener('compositionend', this._onCompositionEnd);\n\n this._groupObserver ??= new MutationObserver(() => this._queueSync());\n\n this._groupObserver.observe($group, {\n childList: true,\n subtree: true,\n attributes: true,\n attributeFilter: ['disabled', 'maxlength', 'placeholder', 'readonly', 'required', 'type'],\n });\n\n this.sync();\n this._warnGroupComposition($group);\n }\n\n private _teardownGroup($group: HTMLFieldSetElement): void {\n $group.removeEventListener('input', this._onControlInput);\n $group.removeEventListener('change', this._onControlChange);\n $group.removeEventListener('focusin', this._onGroupFocusIn);\n $group.removeEventListener('focusout', this._onGroupFocusOut);\n $group.removeEventListener('invalid', this._onControlInvalid, true);\n $group.removeEventListener('compositionend', this._onCompositionEnd);\n this._groupObserver?.disconnect();\n this._$groupRef = null;\n this._grouped = false;\n this._$formRef?.deref()?.removeEventListener('reset', this._onFormReset);\n this._$formRef = null;\n this._restoreAssociations($group);\n this._$controlRef = null;\n }\n\n /** Re-resolves a group's primary control after its contents change. */\n private _syncGroupControl(): void {\n const $group = this.group;\n\n if (!$group) {\n return;\n }\n\n const $controls = groupControls($group);\n const $primary =\n $controls.find(\n ($control) =>\n $control instanceof HTMLTextAreaElement ||\n ($control instanceof HTMLInputElement && TEXT_INPUT_TYPES.has($control.type)),\n ) ??\n $controls[0] ??\n null;\n\n this._$controlRef = $primary ? new WeakRef($primary) : null;\n this._hasControl = $primary !== null;\n }\n\n private _setupControl($control: RCFieldControl | null): void {\n this._$controlRef = $control ? new WeakRef($control) : null;\n\n const $provider = $control?.parentElement?.matches('[data-rc-field-control]')\n ? $control.parentElement\n : null;\n\n this._$controlProviderRef = $provider ? new WeakRef($provider) : null;\n this._hasControl = $control !== null;\n this._focused = false;\n this._validationAttempted = false;\n this._nativeInvalid = false;\n this._validationMessage = '';\n\n if (!$control) {\n this._syncSlots();\n this._syncState();\n\n return;\n }\n\n $control.addEventListener('input', this._onControlInput);\n $control.addEventListener('change', this._onControlChange);\n $control.addEventListener('focus', this._onControlFocus);\n $control.addEventListener('blur', this._onControlBlur);\n $control.addEventListener('invalid', this._onControlInvalid);\n $control.addEventListener('compositionend', this._onCompositionEnd);\n\n $provider?.addEventListener('focusin', this._onProviderFocusIn);\n $provider?.addEventListener('focusout', this._onProviderFocusOut);\n\n this._controlObserver ??= new MutationObserver(() => this._queueSync());\n\n this._controlObserver.observe($control, {\n attributes: true,\n attributeFilter: ['disabled', 'maxlength', 'placeholder', 'readonly', 'required', 'type'],\n });\n\n this.sync();\n this._warnComposition($control);\n }\n\n private _teardownControl($control: RCFieldControl | null): void {\n if (!$control) {\n return;\n }\n\n $control.removeEventListener('input', this._onControlInput);\n $control.removeEventListener('change', this._onControlChange);\n $control.removeEventListener('focus', this._onControlFocus);\n $control.removeEventListener('blur', this._onControlBlur);\n $control.removeEventListener('invalid', this._onControlInvalid);\n $control.removeEventListener('compositionend', this._onCompositionEnd);\n\n const $provider = this._$controlProviderRef?.deref();\n\n $provider?.removeEventListener('focusin', this._onProviderFocusIn);\n $provider?.removeEventListener('focusout', this._onProviderFocusOut);\n this._$controlProviderRef = null;\n this._controlObserver?.disconnect();\n this._$formRef?.deref()?.removeEventListener('reset', this._onFormReset);\n this._$formRef = null;\n this._restoreAssociations($control);\n }\n\n private _syncForm(): void {\n const $form = this.control?.form ?? null;\n const $previousForm = this._$formRef?.deref() ?? null;\n\n if ($form === $previousForm) {\n return;\n }\n\n $previousForm?.removeEventListener('reset', this._onFormReset);\n $form?.addEventListener('reset', this._onFormReset);\n this._$formRef = $form ? new WeakRef($form) : null;\n }\n\n private _queueSync(): void {\n queueMicrotask(() => {\n if (this.isConnected) {\n this.sync();\n }\n });\n }\n\n private readonly _onControlInput = (): void => {\n this._syncState();\n\n if (this.controls.some(($control) => !$control.validity.valid)) {\n return;\n }\n\n this._nativeInvalid = false;\n this._validationMessage = '';\n this._syncState();\n this._syncAssociations();\n };\n\n private readonly _onControlChange = (): void => this.sync();\n\n private readonly _onControlFocus = (): void => {\n this._focused = true;\n this._reflectStates();\n };\n\n private readonly _onControlBlur = (): void => {\n this._focused = false;\n this._syncState();\n };\n\n private readonly _onProviderFocusIn = (): void => {\n this._focused = true;\n this._reflectStates();\n };\n\n private readonly _onProviderFocusOut = (): void => {\n this._focused = false;\n this._syncState();\n };\n\n private readonly _onGroupFocusIn = (): void => {\n this._focused = true;\n this._reflectStates();\n };\n\n /** Moving focus between the group's own controls keeps the field focused. */\n private readonly _onGroupFocusOut = (event: FocusEvent): void => {\n const $next = event.relatedTarget;\n\n if ($next instanceof Node && this.group?.contains($next)) {\n return;\n }\n\n this._focused = false;\n this._syncState();\n };\n\n private readonly _onControlInvalid = (event: Event): void => {\n const $target = event.target;\n\n const message =\n $target instanceof HTMLInputElement ||\n $target instanceof HTMLTextAreaElement ||\n $target instanceof HTMLSelectElement\n ? $target.validationMessage\n : (this.control?.validationMessage ?? '');\n\n this._validationAttempted = true;\n this._nativeInvalid = true;\n this._validationMessage = message;\n this._syncState();\n this._syncAssociations();\n };\n\n private readonly _onCompositionEnd = (): void => this._syncState();\n\n private readonly _onFormReset = (): void => {\n this._validationAttempted = false;\n this._nativeInvalid = false;\n this._validationMessage = '';\n this._queueSync();\n };\n\n private _syncState(): void {\n const $control = this.control;\n\n this._hasControl = $control !== null;\n\n this._populated =\n $control instanceof HTMLSelectElement\n ? $control.multiple\n ? $control.selectedOptions.length > 0\n : Boolean($control.selectedOptions[0]?.label.trim())\n : Boolean($control?.value);\n\n const $group = this.group;\n const $controls = this.controls;\n\n this._disabled = $group\n ? $group.disabled || ($controls.length > 0 && $controls.every(($item) => $item.disabled))\n : this._effectiveDisabled($control);\n\n this._readOnly = $control instanceof HTMLSelectElement ? false : ($control?.readOnly ?? false);\n this._required = $controls.some(($item) => $item.required);\n this._multiline = !$group && $control instanceof HTMLTextAreaElement;\n\n if ($control && this._validationAttempted) {\n const $invalid = $controls.find(($item) => !$item.validity.valid);\n\n this._nativeInvalid = $invalid !== undefined;\n this._validationMessage = $invalid?.validationMessage ?? '';\n }\n\n this._reflectStates();\n }\n\n /**\n * A control provider may disable its native control for a reason unrelated to the field's\n * own enabled/disabled intent (`rc-select`'s picker guard force-disables a `multiple` native\n * select to defeat a GeckoView label-activation bug, entirely independent of author intent).\n * Prefer the provider's own `disabled` property, when it exposes one, over the raw control's\n * — the same precedence `focus()`/`blur()` already give the provider over the control.\n */\n private _effectiveDisabled($control: RCFieldControl | null): boolean {\n const $provider = this._$controlProviderRef?.deref();\n\n if ($provider && 'disabled' in $provider && typeof $provider.disabled === 'boolean') {\n return $provider.disabled;\n }\n\n return $control?.disabled ?? false;\n }\n\n private _reflectStates(): void {\n this.toggleAttribute('data-focused', this._focused);\n this.toggleAttribute('data-populated', this._populated);\n this.toggleAttribute('data-disabled', this._disabled);\n this.toggleAttribute('data-readonly', this._readOnly);\n this.toggleAttribute('data-required', this._required);\n this.toggleAttribute('data-invalid', this._effectiveInvalid());\n this.toggleAttribute('data-multiline', this._multiline);\n this.toggleAttribute('data-has-label', this._hasLabel);\n this.toggleAttribute('data-validation-attempted', this._validationAttempted);\n this.toggleAttribute('data-control-provider', this._$controlProviderRef?.deref() !== undefined);\n this.toggleAttribute('data-group', this._grouped);\n }\n\n private _effectiveInvalid(): boolean {\n return this.invalid || (this._validationAttempted && this._nativeInvalid);\n }\n\n private _syncSlots(): void {\n this._hasLabel = this._hasSlottedContent('label');\n this._hasLeading = this._hasSlottedContent('leading');\n this._hasTrailing = this._hasSlottedContent('trailing');\n this._hasPrefix = this._hasSlottedContent('prefix');\n this._hasSuffix = this._hasSlottedContent('suffix');\n this._hasHint = this._hasSlottedContent('hint');\n this._hasError = this._hasSlottedContent('error');\n }\n\n private _hasSlottedContent(slotName: string): boolean {\n return this.querySelector(`:scope > [slot='${slotName}']`) !== null;\n }\n\n private _syncAssociations(): void {\n const $control = this.control;\n\n if (!$control) {\n return;\n }\n\n const $group = this.group;\n // A group's description belongs to the fieldset, announced on entering the group.\n const $described: HTMLElement = $group ?? $control;\n\n this._restoreAssociations($described, false);\n\n const $label = this.querySelector<HTMLLabelElement>(\":scope > label[slot='label']\");\n\n if ($label && !$label.htmlFor && !$group) {\n const controlId = this._ensureId($control, 'control');\n\n $label.htmlFor = controlId;\n this._managedLabel = { $label, htmlFor: controlId };\n }\n\n const descriptionIds: string[] = [];\n const $hint = this.querySelector<HTMLElement>(\":scope > [slot='hint']\");\n const $error = this.querySelector<HTMLElement>(\":scope > [slot='error']\");\n\n if ($hint && !this._effectiveInvalid()) {\n descriptionIds.push(this._ensureId($hint, 'hint'));\n }\n\n if ($error && this._effectiveInvalid()) {\n descriptionIds.push(this._ensureId($error, 'error'));\n }\n\n if (descriptionIds.length) {\n const authorIds = ($described.getAttribute('aria-describedby') ?? '')\n .split(/\\s+/)\n .filter(Boolean);\n const ids = [...new Set([...authorIds, ...descriptionIds])];\n\n $described.setAttribute('aria-describedby', ids.join(' '));\n this._managedDescriptionIds = new Set(descriptionIds);\n }\n\n if (this._effectiveInvalid()) {\n // A forced `invalid` marks the primary control; native failures mark each failing one.\n const $invalid = $group\n ? this.controls.filter(($item) => this._validationAttempted && !$item.validity.valid)\n : [$control];\n\n for (const $item of $invalid.length ? $invalid : [$control]) {\n if (!$item.hasAttribute('aria-invalid')) {\n $item.setAttribute('aria-invalid', 'true');\n this._managedAriaInvalid.add($item);\n }\n }\n }\n }\n\n private _restoreAssociations($described: HTMLElement, restoreIds = true): void {\n if (this._managedDescriptionIds.size) {\n const ids = ($described.getAttribute('aria-describedby') ?? '')\n .split(/\\s+/)\n .filter((id) => id && !this._managedDescriptionIds.has(id));\n\n if (ids.length) {\n $described.setAttribute('aria-describedby', ids.join(' '));\n } else {\n $described.removeAttribute('aria-describedby');\n }\n }\n\n this._managedDescriptionIds.clear();\n\n for (const $item of this._managedAriaInvalid) {\n if ($item.getAttribute('aria-invalid') === 'true') {\n $item.removeAttribute('aria-invalid');\n }\n }\n\n this._managedAriaInvalid.clear();\n\n const managedLabel = this._managedLabel;\n\n if (managedLabel && managedLabel.$label.htmlFor === managedLabel.htmlFor) {\n managedLabel.$label.removeAttribute('for');\n }\n\n this._managedLabel = null;\n\n if (restoreIds) {\n for (const { $element, id } of this._managedIds) {\n if ($element.id === id) {\n $element.removeAttribute('id');\n }\n }\n\n this._managedIds = [];\n\n if (this._managedControlId && $described.id === this._managedControlId) {\n $described.removeAttribute('id');\n }\n\n this._managedControlId = null;\n }\n }\n\n private _ensureId($element: HTMLElement, purpose: string): string {\n if ($element.id) {\n return $element.id;\n }\n\n const id = `rc-field-${++fieldId}-${purpose}`;\n\n $element.id = id;\n\n if ($element === this.control) {\n this._managedControlId = id;\n } else {\n this._managedIds.push({ $element, id });\n }\n\n return id;\n }\n\n private _warnGroupComposition($group: HTMLFieldSetElement): void {\n if (!import.meta.env.DEV) {\n return;\n }\n\n if (!$group.querySelector(':scope > legend')) {\n console.warn(\n '[rc-field] A grouped field needs a <legend> as the first child of its <fieldset> to name the group.',\n $group,\n );\n }\n\n if (this.querySelector(\":scope > [slot='label']\")) {\n console.warn(\n '[rc-field] A grouped field is labeled by its <legend>; remove the slotted label.',\n this,\n );\n }\n\n for (const $control of groupControls($group)) {\n if (\n !$control.labels?.length &&\n !$control.getAttribute('aria-label') &&\n !$control.getAttribute('aria-labelledby')\n ) {\n console.warn(\n '[rc-field] Each grouped control needs its own accessible name, such as aria-label.',\n $control,\n );\n }\n }\n }\n\n private _warnComposition($control: RCFieldControl): void {\n if (!import.meta.env.DEV) {\n return;\n }\n\n const $controls = getDirectChildren<RCFieldControl>(this, CONTROL_SELECTOR);\n\n if ($controls.length > 1) {\n console.warn(\n '[rc-field] Multiple native controls found. Place exactly one input or textarea inside <rc-field>.',\n this,\n );\n }\n\n if ($control instanceof HTMLInputElement && !TEXT_INPUT_TYPES.has($control.type)) {\n console.warn(\n `[rc-field] Input type \"${$control.type}\" is not a text-field control. Use a text-like input or textarea.`,\n $control,\n );\n }\n\n if (\n !$control.labels?.length &&\n !$control.getAttribute('aria-label') &&\n !$control.getAttribute('aria-labelledby')\n ) {\n console.warn(\n '[rc-field] Native control has no accessible name. Add a slotted label, an ancestor label, aria-label, or aria-labelledby.',\n $control,\n );\n }\n }\n\n private _handleSurfaceClick(event: MouseEvent): void {\n const $control = this.control;\n const $origin = event.composedPath()[0];\n\n if (!$control || !($origin instanceof Element) || $origin === $control) {\n return;\n }\n\n const $provider = this._$controlProviderRef?.deref();\n\n if ($provider && $origin.closest(\"label[slot='label']\")) {\n event.preventDefault();\n $provider.focus();\n\n return;\n }\n\n if ($origin.closest('button, a, input, textarea, select, [contenteditable], [tabindex]')) {\n return;\n }\n\n ($provider ?? $control).focus();\n }\n\n private _slotClass(hasContent: boolean): string {\n return hasContent ? '' : 'empty-slot';\n }\n\n protected override render() {\n const invalid = this._effectiveInvalid();\n const $control = this.control;\n const length = $control?.value.length ?? 0;\n const maxLength = $control instanceof HTMLSelectElement ? -1 : ($control?.maxLength ?? -1);\n const counterText = maxLength >= 0 ? `${length} / ${maxLength}` : String(length);\n const hasError = invalid && (this._hasError || this._validationMessage);\n const hasSupporting = this._hasHint || hasError || this.counter;\n\n return html`\n <div\n id=\"field\"\n part=\"field\"\n class=${this._hasControl ? '' : 'empty'}\n @click=${this._handleSurfaceClick}\n >\n <span id=\"leading\" part=\"leading\" class=${this._slotClass(this._hasLeading)}>\n <slot name=\"leading\" @slotchange=${this._queueSync}></slot>\n </span>\n <span id=\"content\" part=\"content\">\n <span id=\"label\" part=\"label\" class=${this._slotClass(this._hasLabel)}>\n <slot name=\"label\" @slotchange=${this._queueSync}></slot>\n </span>\n <span id=\"control\" part=\"control\">\n <span id=\"prefix\" part=\"prefix\" class=${this._slotClass(this._hasPrefix)}>\n <slot name=\"prefix\" @slotchange=${this._queueSync}></slot>\n </span>\n <slot @slotchange=${this._queueSync}></slot>\n <span id=\"suffix\" part=\"suffix\" class=${this._slotClass(this._hasSuffix)}>\n <slot name=\"suffix\" @slotchange=${this._queueSync}></slot>\n </span>\n </span>\n </span>\n <span id=\"trailing\" part=\"trailing\" class=${this._slotClass(this._hasTrailing)}>\n <slot name=\"trailing\" @slotchange=${this._queueSync}></slot>\n </span>\n </div>\n <div id=\"supporting\" part=\"supporting-text\" ?hidden=${!hasSupporting}>\n <span id=\"hint\" part=\"hint\" ?hidden=${hasError}>\n <slot name=\"hint\" @slotchange=${this._queueSync}></slot>\n </span>\n <span id=\"error\" part=\"error\" ?hidden=${!hasError}>\n <slot name=\"error\" @slotchange=${this._queueSync}>${this._validationMessage}</slot>\n </span>\n <span id=\"counter\" part=\"counter\" ?hidden=${!this.counter}>${counterText}</span>\n </div>\n `;\n }\n}\n"],"names":["fieldStyles","css","CONTROL_SELECTOR","LIGHT_DOM_CSS","cssText","TEXT_INPUT_TYPES","fieldId","groupControls","$group","$element","_RCField","_a","LitElement","NativeChildController","$root","$previousRoot","$control","event","$next","$target","message","root","$style","changed","options","$controls","$primary","$provider","$form","$previousForm","$item","$invalid","slotName","$described","$label","controlId","descriptionIds","$hint","$error","authorIds","ids","restoreIds","id","managedLabel","purpose","$origin","has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A,YAAA;AAGA4C,EAAA;AAAA,EADPE,EAAA;AAAM,GAlDI9C,EAmDH,WAAA,YAAA;AAGA4C,EAAA;AAAA,EADPE,EAAA;AAAM,GArDI9C,EAsDH,WAAA,UAAA;AAGA4C,EAAA;AAAA,EADPE,EAAA;AAAM,GAxDI9C,EAyDH,WAAA,WAAA;AAGA4C,EAAA;AAAA,EADPE,EAAA;AAAM,GA3DI9C,EA4DH,WAAA,UAAA;AAGA4C,EAAA;AAAA,EADPE,EAAA;AAAM,GA9DI9C,EA+DH,WAAA,YAAA;AAGA4C,EAAA;AAAA,EADPE,EAAA;AAAM,GAjEI9C,EAkEH,WAAA,WAAA;AAGA4C,EAAA;AAAA,EADPE,EAAA;AAAM,GApEI9C,EAqEH,WAAA,WAAA;AAGA4C,EAAA;AAAA,EADPE,EAAA;AAAM,GAvEI9C,EAwEH,WAAA,WAAA;AAGA4C,EAAA;AAAA,EADPE,EAAA;AAAM,GA1EI9C,EA2EH,WAAA,YAAA;AAGA4C,EAAA;AAAA,EADPE,EAAA;AAAM,GA7EI9C,EA8EH,WAAA,UAAA;AAGA4C,EAAA;AAAA,EADPE,EAAA;AAAM,GAhFI9C,EAiFH,WAAA,sBAAA;AAGA4C,EAAA;AAAA,EADPE,EAAA;AAAM,GAnFI9C,EAoFH,WAAA,gBAAA;AAGA4C,EAAA;AAAA,EADPE,EAAA;AAAM,GAtFI9C,EAuFH,WAAA,oBAAA;AAvFH,IAAM+C,IAAN/C;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rc-field-define.js","sources":["../src/define.ts"],"sourcesContent":["import { RCField } from './index.js';\n\ncustomElements.get('rc-field') || customElements.define('rc-field', RCField);\n\nexport * from './index.js';\n"],"names":["RCField"],"mappings":";AAEA,eAAe,IAAI,UAAU,KAAK,eAAe,OAAO,YAAYA,CAAO;"}
|
package/dist/rc-field.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rc-field.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './index.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './rc-field.js';
|