@optionfactory/fml 9.0.0-rc6 → 9.0.0-rc7
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/dist/fml.css +4 -4
- package/dist/fml.css.map +1 -1
- package/dist/fml.iife.js +37 -3
- package/dist/fml.iife.js.map +1 -1
- package/dist/fml.iife.min.js +1 -1
- package/dist/fml.iife.min.js.map +1 -1
- package/dist/ful.css +4 -4
- package/dist/ful.css.map +1 -1
- package/dist/ful.iife.js +37 -3
- package/dist/ful.iife.js.map +1 -1
- package/dist/ful.iife.min.js +1 -1
- package/dist/ful.iife.min.js.map +1 -1
- package/dist/ful.min.mjs +1 -1
- package/dist/ful.min.mjs.map +1 -1
- package/dist/ful.mjs +37 -3
- package/dist/ful.mjs.map +1 -1
- package/dist/web-types.json +1 -1
- package/package.json +1 -1
package/dist/ful.mjs
CHANGED
|
@@ -2859,6 +2859,14 @@ class Select extends Field {
|
|
|
2859
2859
|
if (!this._interactive()) {
|
|
2860
2860
|
return;
|
|
2861
2861
|
}
|
|
2862
|
+
//a click on another control inside the select is that control's, not
|
|
2863
|
+
//the select's: a tooltip marker slotted into `info`, a button a page
|
|
2864
|
+
//put in an affix. Without this, reading the note beside a select
|
|
2865
|
+
//also stole the focus and dropped the dropdown over the note
|
|
2866
|
+
const elsewhere = e.target.closest('button, a[href], input, select, textarea');
|
|
2867
|
+
if (elsewhere && elsewhere !== this.#input) {
|
|
2868
|
+
return;
|
|
2869
|
+
}
|
|
2862
2870
|
if (this.#ddmenu.shown) {
|
|
2863
2871
|
this.#close();
|
|
2864
2872
|
return;
|
|
@@ -3994,8 +4002,13 @@ class Table extends ParsedElement {
|
|
|
3994
4002
|
//started is stale, and neither renders nor updates the request a later
|
|
3995
4003
|
//reload replays, whichever order the responses arrive in
|
|
3996
4004
|
const claim = this.#loads.take();
|
|
3997
|
-
|
|
3998
|
-
|
|
4005
|
+
//the rows stay while the table revalidates. Emptying the body and raising
|
|
4006
|
+
//the spinner row in its place collapsed the table to one tall row and
|
|
4007
|
+
//expanded it again on every sort, page and reload: two layout jumps for
|
|
4008
|
+
//what is the same table with newer rows in it. The spinner is for the load
|
|
4009
|
+
//with nothing to show yet, the first one and the one after a failure; the
|
|
4010
|
+
//rest announce themselves through aria-busy, which the stylesheet reads
|
|
4011
|
+
this.#loading.toggleAttribute('hidden', this.#body.childElementCount > 0);
|
|
3999
4012
|
this.#feedback.setAttribute('hidden', '');
|
|
4000
4013
|
this.#noAutoload.setAttribute('hidden', '');
|
|
4001
4014
|
this.setAttribute('aria-busy', 'true');
|
|
@@ -4013,6 +4026,10 @@ class Table extends ParsedElement {
|
|
|
4013
4026
|
return;
|
|
4014
4027
|
}
|
|
4015
4028
|
this.#loading.setAttribute('hidden', '');
|
|
4029
|
+
//the rows the failed load was replacing go with it: what the table
|
|
4030
|
+
//holds is no longer what the request asked for, and leaving them
|
|
4031
|
+
//under the error would say the opposite
|
|
4032
|
+
this.#body.replaceChildren();
|
|
4016
4033
|
this.#feedback.removeAttribute('hidden');
|
|
4017
4034
|
this.#feedback.querySelector('[data-ref=feedback-error]').textContent = Failure.problemsText(
|
|
4018
4035
|
error,
|
|
@@ -4159,6 +4176,20 @@ class ChoiceButton {
|
|
|
4159
4176
|
//menu is where the localized words live
|
|
4160
4177
|
this.#button.textContent = this.#display(choice);
|
|
4161
4178
|
Attributes.set(this.#button, 'aria-label', this.#labelFor(choice));
|
|
4179
|
+
this.#mark();
|
|
4180
|
+
}
|
|
4181
|
+
/**
|
|
4182
|
+
* Marks the item the button currently holds, which is what a menu of one
|
|
4183
|
+
* choice among several owes the reader: the glyph on the button says which
|
|
4184
|
+
* one it is only to somebody who already knows the glyphs. The items are
|
|
4185
|
+
* `menuitemradio`, so the state is `aria-checked` rather than the
|
|
4186
|
+
* `aria-selected` a listbox would use, and the stylesheet draws it off that.
|
|
4187
|
+
*/
|
|
4188
|
+
#mark() {
|
|
4189
|
+
const current = this.value;
|
|
4190
|
+
for (const item of this.#items()) {
|
|
4191
|
+
item.setAttribute('aria-checked', String(item.getAttribute('value') === current));
|
|
4192
|
+
}
|
|
4162
4193
|
}
|
|
4163
4194
|
/** The host's disabled claim, composed with the pin: lifting one cannot lift the other. */
|
|
4164
4195
|
set claimed(claimed) {
|
|
@@ -4171,7 +4202,9 @@ class ChoiceButton {
|
|
|
4171
4202
|
const li = document.createElement('li');
|
|
4172
4203
|
li.setAttribute('role', 'none');
|
|
4173
4204
|
const a = document.createElement('a');
|
|
4174
|
-
|
|
4205
|
+
//one choice among several, which is what a radio item is: the
|
|
4206
|
+
//state belongs on the item, not on the button alone
|
|
4207
|
+
a.setAttribute('role', 'menuitemradio');
|
|
4175
4208
|
a.setAttribute('tabindex', '-1');
|
|
4176
4209
|
a.setAttribute('value', choice);
|
|
4177
4210
|
const word = this.#labelFor(choice);
|
|
@@ -4189,6 +4222,7 @@ class ChoiceButton {
|
|
|
4189
4222
|
return li;
|
|
4190
4223
|
}),
|
|
4191
4224
|
);
|
|
4225
|
+
this.#mark();
|
|
4192
4226
|
}
|
|
4193
4227
|
#sync() {
|
|
4194
4228
|
const pinned = this.pinned;
|