@mattilsynet/design 1.3.0 → 1.3.2
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/mtds/alert/alert.stories.d.ts +2 -2
- package/mtds/app/app-observer.js +1 -1
- package/mtds/app/app-toggle.js +26 -14
- package/mtds/app/app-toggle.js.map +1 -1
- package/mtds/app/app-toggle2.js +14 -26
- package/mtds/app/app-toggle2.js.map +1 -1
- package/mtds/app/app.js +1 -1
- package/mtds/app/app.stories.d.ts +2 -2
- package/mtds/avatar/avatar.stories.d.ts +2 -2
- package/mtds/badge/badge.stories.d.ts +2 -2
- package/mtds/breadcrumbs/breadcrumbs.stories.d.ts +2 -2
- package/mtds/button/button.stories.d.ts +2 -2
- package/mtds/card/card.stories.d.ts +2 -2
- package/mtds/chip/chip.stories.d.ts +2 -2
- package/mtds/details/details.stories.d.ts +1 -1
- package/mtds/dialog/dialog.stories.d.ts +1 -1
- package/mtds/divider/divider.stories.d.ts +1 -1
- package/mtds/errorsummary/errorsummary.stories.d.ts +2 -2
- package/mtds/external/@u-elements/u-combobox/dist/u-combobox.js +151 -152
- package/mtds/external/@u-elements/u-combobox/dist/u-combobox.js.map +1 -1
- package/mtds/external/@u-elements/u-datalist/dist/u-datalist.js +55 -57
- package/mtds/external/@u-elements/u-datalist/dist/u-datalist.js.map +1 -1
- package/mtds/field/field-observer.js +22 -22
- package/mtds/field/field-observer.js.map +1 -1
- package/mtds/field/field.js +4 -3
- package/mtds/field/field.js.map +1 -1
- package/mtds/field/field.stories.d.ts +3 -2
- package/mtds/fieldset/fieldset-observer.js +20 -15
- package/mtds/fieldset/fieldset-observer.js.map +1 -1
- package/mtds/fieldset/fieldset.stories.d.ts +1 -1
- package/mtds/helptext/helptext.stories.d.ts +1 -1
- package/mtds/illustrations/bread.svg +1 -0
- package/mtds/illustrations/drop-apple-bread.svg +1 -0
- package/mtds/illustrations/drop-apple.svg +1 -0
- package/mtds/illustrations/fork-knife-spoon.svg +1 -0
- package/mtds/illustrations/fork-knife.svg +1 -0
- package/mtds/illustrations/fork.svg +1 -0
- package/mtds/illustrations/heart-cat.svg +1 -0
- package/mtds/illustrations/heart.svg +1 -0
- package/mtds/illustrations/hearts-blue.svg +1 -0
- package/mtds/illustrations/hearts-green.svg +1 -0
- package/mtds/illustrations/hearts-red.svg +1 -0
- package/mtds/illustrations/{illustrations.json → index.json} +139 -1
- package/mtds/illustrations/inspector-ai.svg +1 -0
- package/mtds/illustrations/inspector-cow.svg +1 -0
- package/mtds/illustrations/knife.svg +1 -0
- package/mtds/illustrations/person-flask-water-fish-pig.svg +1 -0
- package/mtds/illustrations/plane.svg +1 -0
- package/mtds/illustrations/plant-dog-fish.svg +1 -0
- package/mtds/illustrations/postits.svg +1 -0
- package/mtds/illustrations/pregnant-fork-plant.svg +1 -0
- package/mtds/illustrations/pregnant-fork.svg +1 -0
- package/mtds/illustrations/ship.svg +1 -0
- package/mtds/illustrations/spoon.svg +1 -0
- package/mtds/illustrations/star-1.svg +1 -0
- package/mtds/illustrations/star-2.svg +1 -0
- package/mtds/illustrations/stars.svg +1 -0
- package/mtds/illustrations/turnip-meat.svg +1 -0
- package/mtds/index.d.ts +1 -0
- package/mtds/index.iife.js +8 -7
- package/mtds/input/input.stories.d.ts +2 -2
- package/mtds/layout/layout.stories.d.ts +2 -2
- package/mtds/link/link.stories.d.ts +1 -1
- package/mtds/logo/logo.stories.d.ts +2 -2
- package/mtds/package.json.js +1 -1
- package/mtds/pagination/pagination.stories.d.ts +1 -1
- package/mtds/popover/popover.stories.d.ts +1 -1
- package/mtds/progress/progress.stories.d.ts +2 -2
- package/mtds/react.d.ts +2 -1
- package/mtds/react.js +48 -46
- package/mtds/react.js.map +1 -1
- package/mtds/skeleton/skeleton.stories.d.ts +1 -1
- package/mtds/spinner/spinner.stories.d.ts +2 -2
- package/mtds/steps/steps-observer.d.ts +1 -0
- package/mtds/steps/steps.d.ts +8 -0
- package/mtds/steps/steps.js +11 -0
- package/mtds/steps/steps.js.map +1 -0
- package/mtds/steps/steps.stories.d.ts +20 -0
- package/mtds/styles.css +1 -1
- package/mtds/styles.json +40 -39
- package/mtds/styles.module.css.js +40 -38
- package/mtds/styles.module.css.js.map +1 -1
- package/mtds/table/table.stories.d.ts +2 -2
- package/mtds/tabs/tabs.stories.d.ts +3 -1
- package/mtds/tag/tag.stories.d.ts +2 -2
- package/mtds/togglegroup/togglegroup.stories.d.ts +1 -1
- package/mtds/tooltip/tooltip.stories.d.ts +2 -2
- package/mtds/typography/typography.d.ts +1 -0
- package/mtds/typography/typography.js.map +1 -1
- package/mtds/typography/typography.stories.d.ts +2 -2
- package/mtds/validation/validation.stories.d.ts +1 -1
- package/package.json +10 -14
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
var
|
|
1
|
+
var W = Object.defineProperty, C = Object.getOwnPropertySymbols, X = Object.prototype.hasOwnProperty, Y = Object.prototype.propertyIsEnumerable, O = (t, e, i) => e in t ? W(t, e, { enumerable: !0, configurable: !0, writable: !0, value: i }) : t[e] = i, q = (t, e) => {
|
|
2
2
|
for (var i in e || (e = {}))
|
|
3
|
-
|
|
3
|
+
X.call(e, i) && O(t, i, e[i]);
|
|
4
4
|
if (C)
|
|
5
5
|
for (var i of C(e))
|
|
6
|
-
|
|
6
|
+
Y.call(e, i) && O(t, i, e[i]);
|
|
7
7
|
return t;
|
|
8
|
-
},
|
|
9
|
-
|
|
10
|
-
/^Mac/i.test(((
|
|
11
|
-
var
|
|
8
|
+
}, h = typeof window < "u" && typeof window.document < "u" && typeof window.navigator < "u", y = h && /android/i.test(navigator.userAgent), T = h && /iPad|iPhone|iPod/.test(navigator.userAgent), k;
|
|
9
|
+
h && // @ts-expect-error Typescript has not implemented userAgentData yet https://stackoverflow.com/a/71392474
|
|
10
|
+
/^Mac/i.test(((k = navigator.userAgentData) == null ? void 0 : k.platform) || navigator.platform);
|
|
11
|
+
var z = `${y ? "data" : "aria"}-labelledby`, G = ":host(:not([hidden])) { display: block }", J = "outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color", D = typeof HTMLElement > "u" ? class {
|
|
12
12
|
} : HTMLElement;
|
|
13
13
|
function r(t, e, i) {
|
|
14
14
|
return i === void 0 ? t.getAttribute(e) : (i === null ? t.removeAttribute(e) : t.getAttribute(e) !== i && t.setAttribute(e, i), null);
|
|
@@ -16,11 +16,11 @@ function r(t, e, i) {
|
|
|
16
16
|
var M = (t, e, i) => {
|
|
17
17
|
for (const o of i[0].split(","))
|
|
18
18
|
i[0] = o, Element.prototype[`${t}EventListener`].apply(e, i);
|
|
19
|
-
}, m = (t, ...e) => M("add", t, e), E = (t, ...e) => M("remove", t, e),
|
|
20
|
-
|
|
19
|
+
}, m = (t, ...e) => M("add", t, e), E = (t, ...e) => M("remove", t, e), Q = (t, e) => t.attachShadow({ mode: "open" }).append(
|
|
20
|
+
I("slot"),
|
|
21
21
|
// Unnamed slot does automatically render all top element nodes
|
|
22
|
-
|
|
23
|
-
), _ = /* @__PURE__ */ new WeakMap(),
|
|
22
|
+
I("style", e)
|
|
23
|
+
), _ = /* @__PURE__ */ new WeakMap(), P = (t, e) => {
|
|
24
24
|
if (e === void 0) return _.get(t);
|
|
25
25
|
try {
|
|
26
26
|
_.get(t).disconnect(), _.delete(t);
|
|
@@ -36,22 +36,21 @@ var M = (t, e, i) => {
|
|
|
36
36
|
var e;
|
|
37
37
|
const i = ((e = t.getRootNode) == null ? void 0 : e.call(t)) || t.ownerDocument;
|
|
38
38
|
return i instanceof Document || i instanceof ShadowRoot ? i : document;
|
|
39
|
-
},
|
|
39
|
+
}, Z = 0, S = (t) => t ? (t.id || (t.id = `:${t.nodeName.toLowerCase()}${(++Z).toString(32)}`), t.id) : "", I = (t, e, i) => {
|
|
40
40
|
const o = document.createElement(t);
|
|
41
41
|
return e && (o.textContent = e), o;
|
|
42
42
|
}, B = {
|
|
43
|
-
define: (t, e) => !
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}, tt = (t, e, i = "") => {
|
|
43
|
+
define: (t, e) => !h || window.customElements.get(t) || window.customElements.define(t, e)
|
|
44
|
+
}, l, tt = 0, N = (t) => {
|
|
45
|
+
l || (l = I("div"), l.style.cssText = "position:fixed;overflow:hidden;width:1px;white-space:nowrap", r(l, "aria-live", "assertive")), l.isConnected || document.body.append(l), t && (l.textContent = `${t}${tt++ % 2 ? " " : ""}`);
|
|
46
|
+
}, et = (t, e, i = "") => {
|
|
48
47
|
var o, s;
|
|
49
48
|
const n = { bubbles: !0, composed: !0, data: e, inputType: i }, a = HTMLInputElement.prototype;
|
|
50
49
|
t.dispatchEvent(new InputEvent("beforeinput", n)), (s = (o = Object.getOwnPropertyDescriptor(a, "value")) == null ? void 0 : o.set) == null || s.call(t, e), t.dispatchEvent(new InputEvent("input", n)), t.dispatchEvent(new Event("change", { bubbles: !0 }));
|
|
51
|
-
}, w = "disabled",
|
|
50
|
+
}, w = "disabled", p = "selected", it = class extends D {
|
|
52
51
|
// Using ES2015 syntax for backwards compatibility
|
|
53
52
|
static get observedAttributes() {
|
|
54
|
-
return [w,
|
|
53
|
+
return [w, p];
|
|
55
54
|
}
|
|
56
55
|
connectedCallback() {
|
|
57
56
|
T || (this.tabIndex = -1), this.hasAttribute("role") || r(this, "role", "option"), this.attributeChangedCallback();
|
|
@@ -61,10 +60,10 @@ var M = (t, e, i) => {
|
|
|
61
60
|
}
|
|
62
61
|
/** Sets or retrieves whether the option in the list box is the default item. */
|
|
63
62
|
get defaultSelected() {
|
|
64
|
-
return this[
|
|
63
|
+
return this[p];
|
|
65
64
|
}
|
|
66
65
|
set defaultSelected(t) {
|
|
67
|
-
this[
|
|
66
|
+
this[p] = t;
|
|
68
67
|
}
|
|
69
68
|
get disabled() {
|
|
70
69
|
return r(this, w) !== null;
|
|
@@ -92,10 +91,10 @@ var M = (t, e, i) => {
|
|
|
92
91
|
r(this, "label", t);
|
|
93
92
|
}
|
|
94
93
|
get selected() {
|
|
95
|
-
return r(this,
|
|
94
|
+
return r(this, p) !== null;
|
|
96
95
|
}
|
|
97
96
|
set selected(t) {
|
|
98
|
-
r(this,
|
|
97
|
+
r(this, p, t ? "" : null);
|
|
99
98
|
}
|
|
100
99
|
/** Sets or retrieves the text string specified by the option tag. */
|
|
101
100
|
get text() {
|
|
@@ -114,28 +113,29 @@ var M = (t, e, i) => {
|
|
|
114
113
|
r(this, "value", t);
|
|
115
114
|
}
|
|
116
115
|
};
|
|
117
|
-
B.define("u-option",
|
|
118
|
-
var A,
|
|
116
|
+
B.define("u-option", it);
|
|
117
|
+
var A, $ = 0, x = !1, ot = T || y, U = "click,focusout,input,keydown,mousedown,mouseup", V = "focus,focusin,blur,focusout", g = {
|
|
119
118
|
singular: "%d hit",
|
|
120
119
|
plural: "%d hits"
|
|
121
120
|
}, rt = class extends D {
|
|
122
121
|
constructor() {
|
|
123
|
-
super(), this._texts =
|
|
122
|
+
super(), this._texts = q({}, g), this._value = "", Q(
|
|
124
123
|
this,
|
|
125
|
-
`${
|
|
124
|
+
`${G}
|
|
126
125
|
::slotted(u-option) { display: block; cursor: pointer }
|
|
127
|
-
::slotted(u-option:focus) { ${
|
|
126
|
+
::slotted(u-option:focus) { ${J} }
|
|
128
127
|
::slotted(u-option[aria-hidden="true"]),
|
|
129
128
|
::slotted(u-option[disabled]),
|
|
130
129
|
::slotted(u-option[hidden]) { display: none !important }`
|
|
131
130
|
);
|
|
132
131
|
}
|
|
132
|
+
// Used to prevent unnecessary announcements
|
|
133
133
|
// Using ES2015 syntax for backwards compatibility
|
|
134
134
|
static get observedAttributes() {
|
|
135
135
|
return ["id", ...Object.keys(g).map((t) => `data-sr-${t}`)];
|
|
136
136
|
}
|
|
137
137
|
connectedCallback() {
|
|
138
|
-
this.hidden = !0, this._root = H(this), r(this, "role", "listbox"), r(this, "tabindex", "-1"), m(this._root, "focusin", this), m(this._root, "focus", this, !0),
|
|
138
|
+
this.hidden = !0, this._root = H(this), r(this, "role", "listbox"), r(this, "tabindex", "-1"), m(this._root, "focusin", this), m(this._root, "focus", this, !0), P(this, {
|
|
139
139
|
attributeFilter: ["disabled", "hidden", "label", "value"],
|
|
140
140
|
attributes: !0,
|
|
141
141
|
childList: !0,
|
|
@@ -143,74 +143,72 @@ var A, it = 0, l, $ = 0, I = !1, ot = T || y, N = "click,focusout,input,keydown,
|
|
|
143
143
|
}), setTimeout(() => this.attributeChangedCallback());
|
|
144
144
|
}
|
|
145
145
|
disconnectedCallback() {
|
|
146
|
-
E(this._root || this, "focus", this, !0), E(this._root || this, "focusin", this),
|
|
146
|
+
E(this._root || this, "focus", this, !0), E(this._root || this, "focusin", this), P(this, !1), L(this), this._root = void 0;
|
|
147
147
|
}
|
|
148
148
|
attributeChangedCallback(t, e, i) {
|
|
149
149
|
const o = t == null ? void 0 : t.split("data-sr-")[1], s = `input[list="${this.id}"]`;
|
|
150
150
|
if (g[o]) this._texts[o] = i || g[o];
|
|
151
151
|
else if (this._root)
|
|
152
152
|
for (const n of this._root.querySelectorAll(s))
|
|
153
|
-
|
|
153
|
+
R(this, n);
|
|
154
154
|
}
|
|
155
155
|
handleEvent(t) {
|
|
156
156
|
const { target: e, type: i } = t;
|
|
157
|
-
t.defaultPrevented || (i === "click" && st(this, t), (i === "focus" || i === "focusin") && nt(this, t), (i === "blur" || i === "focusout") && at(this, t), i === "keydown" && ut(this, t), i === "mousedown" && (
|
|
157
|
+
t.defaultPrevented || (i === "click" && st(this, t), (i === "focus" || i === "focusin") && nt(this, t), (i === "blur" || i === "focusout") && at(this, t), i === "keydown" && ut(this, t), i === "mousedown" && (x = this.contains(e)), i === "mouseup" && (x = !1), (i === "mutation" || i === "input") && (clearTimeout($), $ = setTimeout(j, 0, this, t)));
|
|
158
158
|
}
|
|
159
159
|
get options() {
|
|
160
160
|
return this.getElementsByTagName("u-option");
|
|
161
161
|
}
|
|
162
|
-
},
|
|
162
|
+
}, F = (t) => t.checkVisibility ? t.checkVisibility() : !!(t.offsetHeight && t.offsetHeight), v = (t, e) => {
|
|
163
163
|
var i;
|
|
164
|
-
t.hidden === e && (t.hidden = !e, t._input &&
|
|
165
|
-
},
|
|
166
|
-
t._input && (E(t._input || t,
|
|
167
|
-
},
|
|
168
|
-
m(e,
|
|
164
|
+
t.hidden === e && (t.hidden = !e, t._input && R(t, t._input, e), t.popover && ((i = t._input) != null && i.isConnected) && (r(t._input, "popovertarget", S(t)), r(t, "popover", "manual"), t.togglePopover(e)), e && j(t));
|
|
165
|
+
}, L = (t) => {
|
|
166
|
+
t._input && (E(t._input || t, V, t), E(t._root || t, U, t), v(t, !1), t._input = void 0);
|
|
167
|
+
}, R = (t, e, i = !1) => {
|
|
168
|
+
m(e, V, t, !0), r(e, "aria-autocomplete", "list"), r(e, "aria-controls", S(t)), r(e, "aria-expanded", `${ot ? i : "true"}`), r(e, "autocomplete", "off"), r(e, "role", "combobox");
|
|
169
169
|
}, nt = (t, e) => {
|
|
170
170
|
var i;
|
|
171
171
|
const o = e.target instanceof HTMLInputElement;
|
|
172
|
-
o && e.isTrusted && e.stopImmediatePropagation(),
|
|
172
|
+
o && e.isTrusted && e.stopImmediatePropagation(), t._input !== e.target && o && e.target.list === t && (t._input && L(t), t._input = e.target, t._input.dispatchEvent(new FocusEvent("focus")), t._input.dispatchEvent(new FocusEvent("focusin", { bubbles: !0 })), r(t, z, S((i = t._input.labels) == null ? void 0 : i[0])), m(t._root || t, U, t), v(t, !0), N());
|
|
173
173
|
}, at = (t, e) => {
|
|
174
|
-
!y && !
|
|
175
|
-
},
|
|
174
|
+
!y && !x && t._input && setTimeout(K, 0, t), e.target === t._input && e.isTrusted && e.stopImmediatePropagation();
|
|
175
|
+
}, K = (t) => {
|
|
176
176
|
var e;
|
|
177
177
|
const i = ((e = t._root) == null ? void 0 : e.activeElement) || null, o = t._input;
|
|
178
178
|
o && o !== i && !t.contains(i) && (o.dispatchEvent(new FocusEvent("blur", { relatedTarget: i })), o.dispatchEvent(
|
|
179
179
|
new FocusEvent("focusout", { bubbles: !0, relatedTarget: i })
|
|
180
|
-
),
|
|
180
|
+
), L(t));
|
|
181
181
|
}, st = (t, { target: e }) => {
|
|
182
182
|
var i;
|
|
183
|
-
if (!t._input || t._input === e) return
|
|
183
|
+
if (!t._input || t._input === e) return v(t, !0);
|
|
184
184
|
for (const o of t.options)
|
|
185
185
|
if (o.contains(e))
|
|
186
|
-
return r(t, "aria-multiselectable") !== "true" && ((i = t._input) == null || i.focus(),
|
|
187
|
-
y &&
|
|
186
|
+
return r(t, "aria-multiselectable") !== "true" && ((i = t._input) == null || i.focus(), v(t, !1)), et(t._input, o.value);
|
|
187
|
+
y && K(t);
|
|
188
188
|
}, ut = (t, e) => {
|
|
189
189
|
var i;
|
|
190
190
|
if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.key === "Tab")
|
|
191
191
|
return;
|
|
192
|
-
|
|
193
|
-
const { key: o, target: s } = e, n = [...t.options].filter(
|
|
192
|
+
v(t, e.key !== "Escape");
|
|
193
|
+
const { key: o, target: s } = e, n = [...t.options].filter(F), a = n.indexOf(s);
|
|
194
194
|
let d = -1;
|
|
195
195
|
if (o === "ArrowDown" && (d = (a + 1) % n.length), o === "ArrowUp" && (d = (~a ? a : n.length) - 1), ~a && ((o === "Home" || o === "PageUp") && (d = 0), (o === "End" || o === "PageDown") && (d = n.length - 1), o === "Enter"))
|
|
196
196
|
return n[a].click(), e.preventDefault();
|
|
197
197
|
if (n[d]) for (const c of n) c.tabIndex = -1;
|
|
198
198
|
n[d] && e.preventDefault(), (i = n[d] || t._input) == null || i.focus();
|
|
199
|
-
},
|
|
199
|
+
}, j = (t, e) => {
|
|
200
200
|
const { _texts: i, _root: o, _input: s, options: n } = t, a = (s == null ? void 0 : s.value.toLowerCase().trim()) || "", d = !t.hasAttribute("data-nofilter"), c = [];
|
|
201
201
|
for (const u of n) {
|
|
202
|
-
const
|
|
203
|
-
r(u, "aria-hidden",
|
|
202
|
+
const b = `${u.disabled || u.hidden || d && !u.label.toLowerCase().includes(a)}`;
|
|
203
|
+
r(u, "aria-hidden", b), F(u) && c.push(u);
|
|
204
204
|
}
|
|
205
|
-
const { length:
|
|
205
|
+
const { length: f } = c;
|
|
206
206
|
clearTimeout(A), A = setTimeout(() => {
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
a !== t._value && l && (l.textContent = p), t._value = a;
|
|
211
|
-
}, 1e3), T && c.forEach((u, p) => r(u, "title", `${p + 1}/${b}`));
|
|
207
|
+
const u = `${!f && t.innerText.trim() || `${i[f === 1 ? "singular" : "plural"]}`.replace("%d", `${f}`)}`;
|
|
208
|
+
(e == null ? void 0 : e.type) === "input" && a !== t._value && !t.hidden && (o == null ? void 0 : o.activeElement) === s && N(u), t._value = a;
|
|
209
|
+
}, 1e3), T && c.forEach((u, b) => r(u, "title", `${b + 1}/${f}`));
|
|
212
210
|
};
|
|
213
|
-
|
|
211
|
+
h && Object.defineProperty(HTMLInputElement.prototype, "list", {
|
|
214
212
|
configurable: !0,
|
|
215
213
|
enumerable: !0,
|
|
216
214
|
get() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"u-datalist.js","sources":["../../../../../node_modules/@u-elements/u-datalist/dist/u-datalist.js"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\n\n// ../utils.ts\nvar IS_BROWSER = typeof window !== \"undefined\" && typeof window.document !== \"undefined\" && typeof window.navigator !== \"undefined\";\nvar IS_ANDROID = IS_BROWSER && /android/i.test(navigator.userAgent);\nvar IS_IOS = IS_BROWSER && /iPad|iPhone|iPod/.test(navigator.userAgent);\nvar _a;\nIS_BROWSER && // @ts-expect-error Typescript has not implemented userAgentData yet https://stackoverflow.com/a/71392474\n/^Mac/i.test(((_a = navigator.userAgentData) == null ? void 0 : _a.platform) || navigator.platform);\nvar SAFE_LABELLEDBY = `${IS_ANDROID ? \"data\" : \"aria\"}-labelledby`;\nvar DISPLAY_BLOCK = \":host(:not([hidden])) { display: block }\";\nvar FOCUS_OUTLINE = \"outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color\";\nvar UHTMLElement = typeof HTMLElement === \"undefined\" ? class {\n} : HTMLElement;\nfunction attr(el, name, value) {\n if (value === void 0) return el.getAttribute(name);\n if (value === null) el.removeAttribute(name);\n else if (el.getAttribute(name) !== value) el.setAttribute(name, value);\n return null;\n}\nvar events = (action, element, rest) => {\n for (const type of rest[0].split(\",\")) {\n rest[0] = type;\n Element.prototype[`${action}EventListener`].apply(element, rest);\n }\n};\nvar on = (element, ...rest) => events(\"add\", element, rest);\nvar off = (element, ...rest) => events(\"remove\", element, rest);\nvar attachStyle = (element, css) => element.attachShadow({ mode: \"open\" }).append(\n createElement(\"slot\"),\n // Unnamed slot does automatically render all top element nodes\n createElement(\"style\", css)\n);\nvar observers = /* @__PURE__ */ new WeakMap();\nvar mutationObserver = (element, options) => {\n if (options === void 0) return observers.get(element);\n try {\n observers.get(element).disconnect();\n observers.delete(element);\n } catch (err) {\n }\n if (options) {\n const observer = new MutationObserver(\n (detail) => element.handleEvent({ type: \"mutation\", detail })\n );\n observer.observe(element, options);\n observers.set(element, observer);\n }\n};\nvar getRoot = (node) => {\n var _a2;\n const root = ((_a2 = node.getRootNode) == null ? void 0 : _a2.call(node)) || node.ownerDocument;\n return root instanceof Document || root instanceof ShadowRoot ? root : document;\n};\nvar id = 0;\nvar useId = (el) => {\n if (!el) return \"\";\n if (!el.id) el.id = `:${el.nodeName.toLowerCase()}${(++id).toString(32)}`;\n return el.id;\n};\nvar createElement = (tagName, text, attrs) => {\n const el = document.createElement(tagName);\n if (text) el.textContent = text;\n return el;\n};\nvar customElements = {\n define: (name, instance) => !IS_BROWSER || window.customElements.get(name) || window.customElements.define(name, instance)\n};\nvar createAriaLive = (mode) => {\n const live = createElement(\"div\");\n live.style.cssText = \"position:fixed;overflow:hidden;width:1px;white-space:nowrap\";\n attr(live, \"aria-live\", mode);\n return live;\n};\nvar setValue = (input, data, type = \"\") => {\n var _a2, _b;\n const event = { bubbles: true, composed: true, data, inputType: type };\n const proto = HTMLInputElement.prototype;\n input.dispatchEvent(new InputEvent(\"beforeinput\", event));\n (_b = (_a2 = Object.getOwnPropertyDescriptor(proto, \"value\")) == null ? void 0 : _a2.set) == null ? void 0 : _b.call(input, data);\n input.dispatchEvent(new InputEvent(\"input\", event));\n input.dispatchEvent(new Event(\"change\", { bubbles: true }));\n};\n\n// u-option.ts\nvar DISABLED = \"disabled\";\nvar SELECTED = \"selected\";\nvar UHTMLOptionElement = class extends UHTMLElement {\n // Using ES2015 syntax for backwards compatibility\n static get observedAttributes() {\n return [DISABLED, SELECTED];\n }\n connectedCallback() {\n if (!IS_IOS) this.tabIndex = -1;\n if (!this.hasAttribute(\"role\")) attr(this, \"role\", \"option\");\n this.attributeChangedCallback();\n }\n attributeChangedCallback() {\n attr(this, \"aria-disabled\", `${this.disabled}`);\n attr(this, \"aria-selected\", `${this.selected}`);\n }\n /** Sets or retrieves whether the option in the list box is the default item. */\n get defaultSelected() {\n return this[SELECTED];\n }\n set defaultSelected(value) {\n this[SELECTED] = value;\n }\n get disabled() {\n return attr(this, DISABLED) !== null;\n }\n set disabled(value) {\n attr(this, DISABLED, value ? \"\" : null);\n }\n /** Retrieves a reference to the form that the object is embedded in. */\n get form() {\n return this.closest(\"form\");\n }\n /** Sets or retrieves the ordinal position of an option in a list box. */\n get index() {\n var _a2;\n return [\n ...((_a2 = this.parentElement) == null ? void 0 : _a2.options) || [this]\n ].indexOf(this);\n }\n /** Sets or retrieves a value that you can use to implement your own label functionality for the object. */\n get label() {\n var _a2;\n return (_a2 = attr(this, \"label\")) != null ? _a2 : this.text;\n }\n set label(value) {\n attr(this, \"label\", value);\n }\n get selected() {\n return attr(this, SELECTED) !== null;\n }\n set selected(value) {\n attr(this, SELECTED, value ? \"\" : null);\n }\n /** Sets or retrieves the text string specified by the option tag. */\n get text() {\n var _a2;\n return ((_a2 = this.textContent) == null ? void 0 : _a2.trim()) || \"\";\n }\n set text(text) {\n this.textContent = text;\n }\n /** Sets or retrieves the value which is returned to the server when the form control is submitted. */\n get value() {\n var _a2;\n return (_a2 = attr(this, \"value\")) != null ? _a2 : this.text;\n }\n set value(value) {\n attr(this, \"value\", value);\n }\n};\ncustomElements.define(\"u-option\", UHTMLOptionElement);\n\n// u-datalist.ts\nvar LIVE_TIMER;\nvar LIVE_SR_FIX = 0;\nvar LIVE;\nvar INPUT_DEBOUNCE = 0;\nvar IS_PRESS = false;\nvar IS_MOBILE = IS_IOS || IS_ANDROID;\nvar EVENTS = \"click,focusout,input,keydown,mousedown,mouseup\";\nvar EVENTS_INPUT = \"focus,focusin,blur,focusout\";\nvar TEXTS = {\n singular: \"%d hit\",\n plural: \"%d hits\"\n};\nvar UHTMLDataListElement = class extends UHTMLElement {\n constructor() {\n super();\n this._texts = __spreadValues({}, TEXTS);\n this._value = \"\";\n attachStyle(\n this,\n `${DISPLAY_BLOCK}\n\t\t\t::slotted(u-option) { display: block; cursor: pointer }\n\t\t\t::slotted(u-option:focus) { ${FOCUS_OUTLINE} }\n\t\t\t::slotted(u-option[aria-hidden=\"true\"]),\n\t\t\t::slotted(u-option[disabled]),\n\t\t\t::slotted(u-option[hidden]) { display: none !important }`\n );\n }\n // Using ES2015 syntax for backwards compatibility\n static get observedAttributes() {\n return [\"id\", ...Object.keys(TEXTS).map((key) => `data-sr-${key}`)];\n }\n connectedCallback() {\n this.hidden = true;\n this._root = getRoot(this);\n attr(this, \"role\", \"listbox\");\n attr(this, \"tabindex\", \"-1\");\n on(this._root, \"focusin\", this);\n on(this._root, \"focus\", this, true);\n mutationObserver(this, {\n attributeFilter: [\"disabled\", \"hidden\", \"label\", \"value\"],\n attributes: true,\n childList: true,\n subtree: true\n });\n setTimeout(() => this.attributeChangedCallback());\n }\n disconnectedCallback() {\n off(this._root || this, \"focus\", this, true);\n off(this._root || this, \"focusin\", this);\n mutationObserver(this, false);\n disconnectInput(this);\n this._root = void 0;\n }\n attributeChangedCallback(prop, _prev, next) {\n const text = prop == null ? void 0 : prop.split(\"data-sr-\")[1];\n const css = `input[list=\"${this.id}\"]`;\n if (TEXTS[text]) this._texts[text] = next || TEXTS[text];\n else if (this._root)\n for (const input of this._root.querySelectorAll(css))\n setupInput(this, input);\n }\n handleEvent(event) {\n const { target, type } = event;\n if (event.defaultPrevented) return;\n if (type === \"click\") onClick(this, event);\n if (type === \"focus\" || type === \"focusin\") onFocus(this, event);\n if (type === \"blur\" || type === \"focusout\") onBlur(this, event);\n if (type === \"keydown\") onKeyDown(this, event);\n if (type === \"mousedown\") IS_PRESS = this.contains(target);\n if (type === \"mouseup\") IS_PRESS = false;\n if (type === \"mutation\" || type === \"input\") {\n clearTimeout(INPUT_DEBOUNCE);\n INPUT_DEBOUNCE = setTimeout(onInput, 0, this, event);\n }\n }\n get options() {\n return this.getElementsByTagName(\"u-option\");\n }\n};\nvar isVisible = (el) => el.checkVisibility ? el.checkVisibility() : !!(el.offsetHeight && el.offsetHeight);\nvar setExpanded = (self, open) => {\n var _a2;\n if (self.hidden !== open) return;\n self.hidden = !open;\n if (self._input) setupInput(self, self._input, open);\n if (self.popover && ((_a2 = self._input) == null ? void 0 : _a2.isConnected)) {\n attr(self._input, \"popovertarget\", useId(self));\n attr(self, \"popover\", \"manual\");\n self.togglePopover(open);\n }\n if (open) onInput(self);\n};\nvar disconnectInput = (self) => {\n if (!self._input) return;\n off(self._input || self, EVENTS_INPUT, self);\n off(self._root || self, EVENTS, self);\n setExpanded(self, false);\n self._input = void 0;\n};\nvar setupInput = (self, input, open = false) => {\n on(input, EVENTS_INPUT, self, true);\n attr(input, \"aria-autocomplete\", \"list\");\n attr(input, \"aria-controls\", useId(self));\n attr(input, \"aria-expanded\", `${IS_MOBILE ? open : \"true\"}`);\n attr(input, \"autocomplete\", \"off\");\n attr(input, \"role\", \"combobox\");\n};\nvar onFocus = (self, event) => {\n var _a2;\n const isInput = event.target instanceof HTMLInputElement;\n if (isInput && event.isTrusted) event.stopImmediatePropagation();\n if (!LIVE) LIVE = createAriaLive(\"assertive\");\n if (!LIVE.isConnected) document.body.appendChild(LIVE);\n if (self._input !== event.target && isInput && event.target.list === self) {\n if (self._input) disconnectInput(self);\n self._input = event.target;\n self._input.dispatchEvent(new FocusEvent(\"focus\"));\n self._input.dispatchEvent(new FocusEvent(\"focusin\", { bubbles: true }));\n attr(self, SAFE_LABELLEDBY, useId((_a2 = self._input.labels) == null ? void 0 : _a2[0]));\n on(self._root || self, EVENTS, self);\n setExpanded(self, true);\n }\n};\nvar onBlur = (self, event) => {\n if (!IS_ANDROID && !IS_PRESS && self._input) setTimeout(onBlurred, 0, self);\n if (event.target === self._input && event.isTrusted)\n event.stopImmediatePropagation();\n};\nvar onBlurred = (self) => {\n var _a2;\n const relatedTarget = ((_a2 = self._root) == null ? void 0 : _a2.activeElement) || null;\n const input = self._input;\n if (input && input !== relatedTarget && !self.contains(relatedTarget)) {\n input.dispatchEvent(new FocusEvent(\"blur\", { relatedTarget }));\n input.dispatchEvent(\n new FocusEvent(\"focusout\", { bubbles: true, relatedTarget })\n );\n disconnectInput(self);\n }\n};\nvar onClick = (self, { target }) => {\n var _a2;\n if (!self._input || self._input === target) return setExpanded(self, true);\n for (const opt of self.options)\n if (opt.contains(target)) {\n if (attr(self, \"aria-multiselectable\") !== \"true\") {\n (_a2 = self._input) == null ? void 0 : _a2.focus();\n setExpanded(self, false);\n }\n return setValue(self._input, opt.value);\n }\n if (IS_ANDROID) onBlurred(self);\n};\nvar onKeyDown = (self, e) => {\n var _a2;\n if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.key === \"Tab\")\n return;\n setExpanded(self, e.key !== \"Escape\");\n const { key, target } = e;\n const options = [...self.options].filter(isVisible);\n const prev = options.indexOf(target);\n let next = -1;\n if (key === \"ArrowDown\") next = (prev + 1) % options.length;\n if (key === \"ArrowUp\") next = (~prev ? prev : options.length) - 1;\n if (~prev) {\n if (key === \"Home\" || key === \"PageUp\") next = 0;\n if (key === \"End\" || key === \"PageDown\") next = options.length - 1;\n if (key === \"Enter\") {\n options[prev].click();\n return e.preventDefault();\n }\n }\n if (options[next]) for (const option of options) option.tabIndex = -1;\n if (options[next]) e.preventDefault();\n (_a2 = options[next] || self._input) == null ? void 0 : _a2.focus();\n};\nvar onInput = (self, e) => {\n const { _texts, _root, _input, options } = self;\n const value = (_input == null ? void 0 : _input.value.toLowerCase().trim()) || \"\";\n const filter = !self.hasAttribute(\"data-nofilter\");\n const visible = [];\n for (const opt of options) {\n const hidden = `${opt.disabled || opt.hidden || filter && !opt.label.toLowerCase().includes(value)}`;\n attr(opt, \"aria-hidden\", hidden);\n if (isVisible(opt)) visible.push(opt);\n }\n const { length: total } = visible;\n clearTimeout(LIVE_TIMER);\n LIVE_TIMER = setTimeout(() => {\n if (self.hidden || (e == null ? void 0 : e.type) !== \"input\" || (_root == null ? void 0 : _root.activeElement) !== _input)\n return;\n const hitsText = `${`${_texts[total === 1 ? \"singular\" : \"plural\"]}`.replace(\"%d\", `${total}`)}`;\n const liveText = `${!total && self.innerText.trim() || hitsText}${++LIVE_SR_FIX % 2 ? \"\\xA0\" : \"\"}`;\n if (value !== self._value && LIVE) LIVE.textContent = liveText;\n self._value = value;\n }, 1e3);\n if (IS_IOS)\n visible.forEach((opt, idx) => attr(opt, \"title\", `${idx + 1}/${total}`));\n};\nif (IS_BROWSER)\n Object.defineProperty(HTMLInputElement.prototype, \"list\", {\n configurable: true,\n enumerable: true,\n get() {\n return getRoot(this).getElementById(attr(this, \"list\") || \"\");\n }\n });\ncustomElements.define(\"u-datalist\", UHTMLDataListElement);\n\nexport { UHTMLDataListElement };\n"],"names":["__defProp","__getOwnPropSymbols","__hasOwnProp","__propIsEnum","__defNormalProp","obj","key","value","__spreadValues","a","b","prop","IS_BROWSER","IS_ANDROID","IS_IOS","_a","SAFE_LABELLEDBY","DISPLAY_BLOCK","FOCUS_OUTLINE","UHTMLElement","attr","el","name","events","action","element","rest","type","on","off","attachStyle","css","createElement","observers","mutationObserver","options","observer","detail","getRoot","node","_a2","root","id","useId","tagName","text","attrs","customElements","instance","createAriaLive","mode","live","setValue","input","data","_b","event","proto","DISABLED","SELECTED","UHTMLOptionElement","LIVE_TIMER","LIVE_SR_FIX","LIVE","INPUT_DEBOUNCE","IS_PRESS","IS_MOBILE","EVENTS","EVENTS_INPUT","TEXTS","UHTMLDataListElement","disconnectInput","_prev","next","setupInput","target","onClick","onFocus","onBlur","onKeyDown","onInput","isVisible","setExpanded","self","open","isInput","onBlurred","relatedTarget","opt","prev","option","_texts","_root","_input","filter","visible","hidden","total","hitsText","liveText","idx"],"mappings":"AAAA,IAAIA,IAAY,OAAO,gBACnBC,IAAsB,OAAO,uBAC7BC,IAAe,OAAO,UAAU,gBAChCC,IAAe,OAAO,UAAU,sBAChCC,IAAkB,CAACC,GAAKC,GAAKC,MAAUD,KAAOD,IAAML,EAAUK,GAAKC,GAAK,EAAE,YAAY,IAAM,cAAc,IAAM,UAAU,IAAM,OAAAC,EAAK,CAAE,IAAIF,EAAIC,CAAG,IAAIC,GACtJC,IAAiB,CAACC,GAAGC,MAAM;AAC7B,WAASC,KAAQD,MAAMA,IAAI,CAAA;AACzB,IAAIR,EAAa,KAAKQ,GAAGC,CAAI,KAC3BP,EAAgBK,GAAGE,GAAMD,EAAEC,CAAI,CAAC;AACpC,MAAIV;AACF,aAASU,KAAQV,EAAoBS,CAAC;AACpC,MAAIP,EAAa,KAAKO,GAAGC,CAAI,KA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,MAAMA,EAAK,cAAcoC,IACtDhB,EAAK,SAAS5E;AAAA,EACf,GAAE,GAAG,GACFO,KACFiF,EAAQ,QAAQ,CAACP,GAAKY,MAAQhF,EAAKoE,GAAK,SAAS,GAAGY,IAAM,CAAC,IAAIH,CAAK,EAAE,CAAC;AAC3E;AACIrF,KACF,OAAO,eAAe,iBAAiB,WAAW,QAAQ;AAAA,EACxD,cAAc;AAAA,EACd,YAAY;AAAA,EACZ,MAAM;AACJ,WAAO0B,EAAQ,IAAI,EAAE,eAAelB,EAAK,MAAM,MAAM,KAAK,EAAE;AAAA,EAClE;AACA,CAAG;AACH2B,EAAe,OAAO,cAAcuB,EAAoB;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"u-datalist.js","sources":["../../../../../node_modules/@u-elements/u-datalist/dist/u-datalist.js"],"sourcesContent":["var __defProp = Object.defineProperty;\nvar __getOwnPropSymbols = Object.getOwnPropertySymbols;\nvar __hasOwnProp = Object.prototype.hasOwnProperty;\nvar __propIsEnum = Object.prototype.propertyIsEnumerable;\nvar __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\nvar __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n};\n\n// ../utils.ts\nvar IS_BROWSER = typeof window !== \"undefined\" && typeof window.document !== \"undefined\" && typeof window.navigator !== \"undefined\";\nvar IS_ANDROID = IS_BROWSER && /android/i.test(navigator.userAgent);\nvar IS_IOS = IS_BROWSER && /iPad|iPhone|iPod/.test(navigator.userAgent);\nvar _a;\nIS_BROWSER && // @ts-expect-error Typescript has not implemented userAgentData yet https://stackoverflow.com/a/71392474\n/^Mac/i.test(((_a = navigator.userAgentData) == null ? void 0 : _a.platform) || navigator.platform);\nvar SAFE_LABELLEDBY = `${IS_ANDROID ? \"data\" : \"aria\"}-labelledby`;\nvar DISPLAY_BLOCK = \":host(:not([hidden])) { display: block }\";\nvar FOCUS_OUTLINE = \"outline: 1px dotted; outline: 5px auto Highlight; outline: 5px auto -webkit-focus-ring-color\";\nvar UHTMLElement = typeof HTMLElement === \"undefined\" ? class {\n} : HTMLElement;\nfunction attr(el, name, value) {\n if (value === void 0) return el.getAttribute(name);\n if (value === null) el.removeAttribute(name);\n else if (el.getAttribute(name) !== value) el.setAttribute(name, value);\n return null;\n}\nvar events = (action, element, rest) => {\n for (const type of rest[0].split(\",\")) {\n rest[0] = type;\n Element.prototype[`${action}EventListener`].apply(element, rest);\n }\n};\nvar on = (element, ...rest) => events(\"add\", element, rest);\nvar off = (element, ...rest) => events(\"remove\", element, rest);\nvar attachStyle = (element, css) => element.attachShadow({ mode: \"open\" }).append(\n createElement(\"slot\"),\n // Unnamed slot does automatically render all top element nodes\n createElement(\"style\", css)\n);\nvar observers = /* @__PURE__ */ new WeakMap();\nvar mutationObserver = (element, options) => {\n if (options === void 0) return observers.get(element);\n try {\n observers.get(element).disconnect();\n observers.delete(element);\n } catch (err) {\n }\n if (options) {\n const observer = new MutationObserver(\n (detail) => element.handleEvent({ type: \"mutation\", detail })\n );\n observer.observe(element, options);\n observers.set(element, observer);\n }\n};\nvar getRoot = (node) => {\n var _a2;\n const root = ((_a2 = node.getRootNode) == null ? void 0 : _a2.call(node)) || node.ownerDocument;\n return root instanceof Document || root instanceof ShadowRoot ? root : document;\n};\nvar id = 0;\nvar useId = (el) => {\n if (!el) return \"\";\n if (!el.id) el.id = `:${el.nodeName.toLowerCase()}${(++id).toString(32)}`;\n return el.id;\n};\nvar createElement = (tagName, text, attrs) => {\n const el = document.createElement(tagName);\n if (text) el.textContent = text;\n return el;\n};\nvar customElements = {\n define: (name, instance) => !IS_BROWSER || window.customElements.get(name) || window.customElements.define(name, instance)\n};\nvar LIVE;\nvar LIVE_SR_FIX = 0;\nvar speak = (text) => {\n if (!LIVE) {\n LIVE = createElement(\"div\");\n LIVE.style.cssText = \"position:fixed;overflow:hidden;width:1px;white-space:nowrap\";\n attr(LIVE, \"aria-live\", \"assertive\");\n }\n if (!LIVE.isConnected) document.body.append(LIVE);\n if (text) LIVE.textContent = `${text}${LIVE_SR_FIX++ % 2 ? \"\\xA0\" : \"\"}`;\n};\nvar setValue = (input, data, type = \"\") => {\n var _a2, _b;\n const event = { bubbles: true, composed: true, data, inputType: type };\n const proto = HTMLInputElement.prototype;\n input.dispatchEvent(new InputEvent(\"beforeinput\", event));\n (_b = (_a2 = Object.getOwnPropertyDescriptor(proto, \"value\")) == null ? void 0 : _a2.set) == null ? void 0 : _b.call(input, data);\n input.dispatchEvent(new InputEvent(\"input\", event));\n input.dispatchEvent(new Event(\"change\", { bubbles: true }));\n};\n\n// u-option.ts\nvar DISABLED = \"disabled\";\nvar SELECTED = \"selected\";\nvar UHTMLOptionElement = class extends UHTMLElement {\n // Using ES2015 syntax for backwards compatibility\n static get observedAttributes() {\n return [DISABLED, SELECTED];\n }\n connectedCallback() {\n if (!IS_IOS) this.tabIndex = -1;\n if (!this.hasAttribute(\"role\")) attr(this, \"role\", \"option\");\n this.attributeChangedCallback();\n }\n attributeChangedCallback() {\n attr(this, \"aria-disabled\", `${this.disabled}`);\n attr(this, \"aria-selected\", `${this.selected}`);\n }\n /** Sets or retrieves whether the option in the list box is the default item. */\n get defaultSelected() {\n return this[SELECTED];\n }\n set defaultSelected(value) {\n this[SELECTED] = value;\n }\n get disabled() {\n return attr(this, DISABLED) !== null;\n }\n set disabled(value) {\n attr(this, DISABLED, value ? \"\" : null);\n }\n /** Retrieves a reference to the form that the object is embedded in. */\n get form() {\n return this.closest(\"form\");\n }\n /** Sets or retrieves the ordinal position of an option in a list box. */\n get index() {\n var _a2;\n return [\n ...((_a2 = this.parentElement) == null ? void 0 : _a2.options) || [this]\n ].indexOf(this);\n }\n /** Sets or retrieves a value that you can use to implement your own label functionality for the object. */\n get label() {\n var _a2;\n return (_a2 = attr(this, \"label\")) != null ? _a2 : this.text;\n }\n set label(value) {\n attr(this, \"label\", value);\n }\n get selected() {\n return attr(this, SELECTED) !== null;\n }\n set selected(value) {\n attr(this, SELECTED, value ? \"\" : null);\n }\n /** Sets or retrieves the text string specified by the option tag. */\n get text() {\n var _a2;\n return ((_a2 = this.textContent) == null ? void 0 : _a2.trim()) || \"\";\n }\n set text(text) {\n this.textContent = text;\n }\n /** Sets or retrieves the value which is returned to the server when the form control is submitted. */\n get value() {\n var _a2;\n return (_a2 = attr(this, \"value\")) != null ? _a2 : this.text;\n }\n set value(value) {\n attr(this, \"value\", value);\n }\n};\ncustomElements.define(\"u-option\", UHTMLOptionElement);\n\n// u-datalist.ts\nvar LIVE_TIMER;\nvar INPUT_DEBOUNCE = 0;\nvar IS_PRESS = false;\nvar IS_MOBILE = IS_IOS || IS_ANDROID;\nvar EVENTS = \"click,focusout,input,keydown,mousedown,mouseup\";\nvar EVENTS_INPUT = \"focus,focusin,blur,focusout\";\nvar TEXTS = {\n singular: \"%d hit\",\n plural: \"%d hits\"\n};\nvar UHTMLDataListElement = class extends UHTMLElement {\n constructor() {\n super();\n this._texts = __spreadValues({}, TEXTS);\n this._value = \"\";\n attachStyle(\n this,\n `${DISPLAY_BLOCK}\n\t\t\t::slotted(u-option) { display: block; cursor: pointer }\n\t\t\t::slotted(u-option:focus) { ${FOCUS_OUTLINE} }\n\t\t\t::slotted(u-option[aria-hidden=\"true\"]),\n\t\t\t::slotted(u-option[disabled]),\n\t\t\t::slotted(u-option[hidden]) { display: none !important }`\n );\n }\n // Used to prevent unnecessary announcements\n // Using ES2015 syntax for backwards compatibility\n static get observedAttributes() {\n return [\"id\", ...Object.keys(TEXTS).map((key) => `data-sr-${key}`)];\n }\n connectedCallback() {\n this.hidden = true;\n this._root = getRoot(this);\n attr(this, \"role\", \"listbox\");\n attr(this, \"tabindex\", \"-1\");\n on(this._root, \"focusin\", this);\n on(this._root, \"focus\", this, true);\n mutationObserver(this, {\n attributeFilter: [\"disabled\", \"hidden\", \"label\", \"value\"],\n attributes: true,\n childList: true,\n subtree: true\n });\n setTimeout(() => this.attributeChangedCallback());\n }\n disconnectedCallback() {\n off(this._root || this, \"focus\", this, true);\n off(this._root || this, \"focusin\", this);\n mutationObserver(this, false);\n disconnectInput(this);\n this._root = void 0;\n }\n attributeChangedCallback(prop, _prev, next) {\n const text = prop == null ? void 0 : prop.split(\"data-sr-\")[1];\n const css = `input[list=\"${this.id}\"]`;\n if (TEXTS[text]) this._texts[text] = next || TEXTS[text];\n else if (this._root)\n for (const input of this._root.querySelectorAll(css))\n setupInput(this, input);\n }\n handleEvent(event) {\n const { target, type } = event;\n if (event.defaultPrevented) return;\n if (type === \"click\") onClick(this, event);\n if (type === \"focus\" || type === \"focusin\") onFocus(this, event);\n if (type === \"blur\" || type === \"focusout\") onBlur(this, event);\n if (type === \"keydown\") onKeyDown(this, event);\n if (type === \"mousedown\") IS_PRESS = this.contains(target);\n if (type === \"mouseup\") IS_PRESS = false;\n if (type === \"mutation\" || type === \"input\") {\n clearTimeout(INPUT_DEBOUNCE);\n INPUT_DEBOUNCE = setTimeout(onInput, 0, this, event);\n }\n }\n get options() {\n return this.getElementsByTagName(\"u-option\");\n }\n};\nvar isVisible = (el) => el.checkVisibility ? el.checkVisibility() : !!(el.offsetHeight && el.offsetHeight);\nvar setExpanded = (self, open) => {\n var _a2;\n if (self.hidden !== open) return;\n self.hidden = !open;\n if (self._input) setupInput(self, self._input, open);\n if (self.popover && ((_a2 = self._input) == null ? void 0 : _a2.isConnected)) {\n attr(self._input, \"popovertarget\", useId(self));\n attr(self, \"popover\", \"manual\");\n self.togglePopover(open);\n }\n if (open) onInput(self);\n};\nvar disconnectInput = (self) => {\n if (!self._input) return;\n off(self._input || self, EVENTS_INPUT, self);\n off(self._root || self, EVENTS, self);\n setExpanded(self, false);\n self._input = void 0;\n};\nvar setupInput = (self, input, open = false) => {\n on(input, EVENTS_INPUT, self, true);\n attr(input, \"aria-autocomplete\", \"list\");\n attr(input, \"aria-controls\", useId(self));\n attr(input, \"aria-expanded\", `${IS_MOBILE ? open : \"true\"}`);\n attr(input, \"autocomplete\", \"off\");\n attr(input, \"role\", \"combobox\");\n};\nvar onFocus = (self, event) => {\n var _a2;\n const isInput = event.target instanceof HTMLInputElement;\n if (isInput && event.isTrusted) event.stopImmediatePropagation();\n if (self._input !== event.target && isInput && event.target.list === self) {\n if (self._input) disconnectInput(self);\n self._input = event.target;\n self._input.dispatchEvent(new FocusEvent(\"focus\"));\n self._input.dispatchEvent(new FocusEvent(\"focusin\", { bubbles: true }));\n attr(self, SAFE_LABELLEDBY, useId((_a2 = self._input.labels) == null ? void 0 : _a2[0]));\n on(self._root || self, EVENTS, self);\n setExpanded(self, true);\n speak();\n }\n};\nvar onBlur = (self, event) => {\n if (!IS_ANDROID && !IS_PRESS && self._input) setTimeout(onBlurred, 0, self);\n if (event.target === self._input && event.isTrusted)\n event.stopImmediatePropagation();\n};\nvar onBlurred = (self) => {\n var _a2;\n const relatedTarget = ((_a2 = self._root) == null ? void 0 : _a2.activeElement) || null;\n const input = self._input;\n if (input && input !== relatedTarget && !self.contains(relatedTarget)) {\n input.dispatchEvent(new FocusEvent(\"blur\", { relatedTarget }));\n input.dispatchEvent(\n new FocusEvent(\"focusout\", { bubbles: true, relatedTarget })\n );\n disconnectInput(self);\n }\n};\nvar onClick = (self, { target }) => {\n var _a2;\n if (!self._input || self._input === target) return setExpanded(self, true);\n for (const opt of self.options)\n if (opt.contains(target)) {\n if (attr(self, \"aria-multiselectable\") !== \"true\") {\n (_a2 = self._input) == null ? void 0 : _a2.focus();\n setExpanded(self, false);\n }\n return setValue(self._input, opt.value);\n }\n if (IS_ANDROID) onBlurred(self);\n};\nvar onKeyDown = (self, e) => {\n var _a2;\n if (e.altKey || e.ctrlKey || e.metaKey || e.shiftKey || e.key === \"Tab\")\n return;\n setExpanded(self, e.key !== \"Escape\");\n const { key, target } = e;\n const options = [...self.options].filter(isVisible);\n const prev = options.indexOf(target);\n let next = -1;\n if (key === \"ArrowDown\") next = (prev + 1) % options.length;\n if (key === \"ArrowUp\") next = (~prev ? prev : options.length) - 1;\n if (~prev) {\n if (key === \"Home\" || key === \"PageUp\") next = 0;\n if (key === \"End\" || key === \"PageDown\") next = options.length - 1;\n if (key === \"Enter\") {\n options[prev].click();\n return e.preventDefault();\n }\n }\n if (options[next]) for (const option of options) option.tabIndex = -1;\n if (options[next]) e.preventDefault();\n (_a2 = options[next] || self._input) == null ? void 0 : _a2.focus();\n};\nvar onInput = (self, e) => {\n const { _texts, _root, _input, options } = self;\n const value = (_input == null ? void 0 : _input.value.toLowerCase().trim()) || \"\";\n const filter = !self.hasAttribute(\"data-nofilter\");\n const visible = [];\n for (const opt of options) {\n const hidden = `${opt.disabled || opt.hidden || filter && !opt.label.toLowerCase().includes(value)}`;\n attr(opt, \"aria-hidden\", hidden);\n if (isVisible(opt)) visible.push(opt);\n }\n const { length: total } = visible;\n clearTimeout(LIVE_TIMER);\n LIVE_TIMER = setTimeout(() => {\n const text = `${!total && self.innerText.trim() || `${_texts[total === 1 ? \"singular\" : \"plural\"]}`.replace(\"%d\", `${total}`)}`;\n const isType = (e == null ? void 0 : e.type) === \"input\" && value !== self._value;\n if (isType && !self.hidden && (_root == null ? void 0 : _root.activeElement) === _input) speak(text);\n self._value = value;\n }, 1e3);\n if (IS_IOS)\n visible.forEach((opt, idx) => attr(opt, \"title\", `${idx + 1}/${total}`));\n};\nif (IS_BROWSER)\n Object.defineProperty(HTMLInputElement.prototype, \"list\", {\n configurable: true,\n enumerable: true,\n get() {\n return getRoot(this).getElementById(attr(this, \"list\") || \"\");\n }\n });\ncustomElements.define(\"u-datalist\", UHTMLDataListElement);\n\nexport { UHTMLDataListElement };\n"],"names":["__defProp","__getOwnPropSymbols","__hasOwnProp","__propIsEnum","__defNormalProp","obj","key","value","__spreadValues","a","b","prop","IS_BROWSER","IS_ANDROID","IS_IOS","_a","SAFE_LABELLEDBY","DISPLAY_BLOCK","FOCUS_OUTLINE","UHTMLElement","attr","el","name","events","action","element","rest","type","on","off","attachStyle","css","createElement","observers","mutationObserver","options","observer","detail","getRoot","node","_a2","root","id","useId","tagName","text","attrs","customElements","instance","LIVE","LIVE_SR_FIX","speak","setValue","input","data","_b","event","proto","DISABLED","SELECTED","UHTMLOptionElement","LIVE_TIMER","INPUT_DEBOUNCE","IS_PRESS","IS_MOBILE","EVENTS","EVENTS_INPUT","TEXTS","UHTMLDataListElement","disconnectInput","_prev","next","setupInput","target","onClick","onFocus","onBlur","onKeyDown","onInput","isVisible","setExpanded","self","open","isInput","onBlurred","relatedTarget","opt","prev","option","_texts","_root","_input","filter","visible","hidden","total","idx"],"mappings":"AAAA,IAAIA,IAAY,OAAO,gBACnBC,IAAsB,OAAO,uBAC7BC,IAAe,OAAO,UAAU,gBAChCC,IAAe,OAAO,UAAU,sBAChCC,IAAkB,CAACC,GAAKC,GAAKC,MAAUD,KAAOD,IAAML,EAAUK,GAAKC,GAAK,EAAE,YAAY,IAAM,cAAc,IAAM,UAAU,IAAM,OAAAC,EAAK,CAAE,IAAIF,EAAIC,CAAG,IAAIC,GACtJC,IAAiB,CAACC,GAAGC,MAAM;AAC7B,WAASC,KAAQD,MAAMA,IAAI,CAAA;AACzB,IAAIR,EAAa,KAAKQ,GAAGC,CAAI,KAC3BP,EAAgBK,GAAGE,GAAMD,EAAEC,CAAI,CAAC;AACpC,MAAIV;AACF,aAASU,KAAQV,EAAoBS,CAAC;AACpC,MAAIP,EAAa,KAAKO,GAAGC,CAAI,KAC3BP,EAAgBK,GAAGE,GAAMD,EAAEC,CAAI,CAAC;AAEtC,SAAOF;AACT,GAGIG,IAAa,OAAO,SAAW,OAAe,OAAO,OAAO,WAAa,OAAe,OAAO,OAAO,YAAc,KACpHC,IAAaD,KAAc,WAAW,KAAK,UAAU,SAAS,GAC9DE,IAASF,KAAc,mBAAmB,KAAK,UAAU,SAAS,GAClEG;AACJ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,YAAY;AAAA,EACZ,MAAM;AACJ,WAAO0B,EAAQ,IAAI,EAAE,eAAelB,EAAK,MAAM,MAAM,KAAK,EAAE;AAAA,EAClE;AACA,CAAG;AACH2B,EAAe,OAAO,cAAcqB,EAAoB;","x_google_ignoreList":[0]}
|
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { UHTMLComboboxElement as p } from "../external/@u-elements/u-combobox/dist/u-combobox.js";
|
|
2
|
-
import { UHTMLDataListElement as
|
|
2
|
+
import { UHTMLDataListElement as C } from "../external/@u-elements/u-datalist/dist/u-datalist.js";
|
|
3
3
|
import h from "../styles.module.css.js";
|
|
4
|
-
import { onLoaded as
|
|
5
|
-
const v = h.field.split(" ")[0],
|
|
4
|
+
import { onLoaded as I, onMutation as S, on as l, QUICK_EVENT as m, isInputLike as g, attr as i, useId as b, anchorPosition as u } from "../utils.js";
|
|
5
|
+
const v = h.field.split(" ")[0], x = h.validation.split(" "), E = x[0], a = (t, o) => {
|
|
6
6
|
var n;
|
|
7
7
|
return ((n = t.getPropertyValue(`--mtds-text-${o}`)) == null ? void 0 : n.slice(1, -1)) || "";
|
|
8
8
|
};
|
|
9
|
-
function
|
|
9
|
+
function M(t) {
|
|
10
10
|
for (const o of t)
|
|
11
11
|
if (o.isConnected) {
|
|
12
|
-
const n = [],
|
|
12
|
+
const n = [], s = [];
|
|
13
13
|
let c = null, r = null, d = !0;
|
|
14
14
|
for (const e of o.getElementsByTagName("*"))
|
|
15
|
-
e instanceof HTMLLabelElement ? n.push(e) : e instanceof p ? c = e : g(e) ? r = e : e.hasAttribute("data-description") ?
|
|
15
|
+
e instanceof HTMLLabelElement ? n.push(e) : e instanceof p ? c = e : g(e) ? r = e : e.hasAttribute("data-description") ? s.push(e) : e.classList.contains(E) ? (d = i(e, "data-color") === "success" || !e.clientWidth || !e.clientHeight, s.unshift(e)) : e instanceof HTMLParagraphElement && (s.some((f) => f.contains(e)) || s.push(e));
|
|
16
16
|
if (r) {
|
|
17
17
|
for (const e of n) e.htmlFor = b(r);
|
|
18
|
-
A(c),
|
|
18
|
+
A(c), L(r), y(r), i(r, "aria-describedby", s.map(b).join(" ") || null), i(r, "aria-invalid", `${!d}`);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
}
|
|
@@ -29,42 +29,42 @@ function A(t) {
|
|
|
29
29
|
var n;
|
|
30
30
|
if (!(t != null && t.list) || (n = t.list) != null && n.hasAttribute("popover")) return;
|
|
31
31
|
const o = window.getComputedStyle(t);
|
|
32
|
-
|
|
32
|
+
i(t, "data-sr-added", a(o, "combobox-added")), i(t, "data-sr-empty", a(o, "combobox-empty")), i(t, "data-sr-found", a(o, "combobox-found")), i(t, "data-sr-invalid", a(o, "combobox-invalid")), i(t, "data-sr-of", a(o, "combobox-of")), i(t, "data-sr-remove", a(o, "combobox-remove")), i(t, "data-sr-removed", a(o, "combobox-removed")), i(t.list, "data-sr-plural", a(o, "datalist-plural")), i(t.list, "data-sr-singular", a(o, "datalist-singular")), i(t.list, "popover", "manual");
|
|
33
33
|
}
|
|
34
|
-
function
|
|
35
|
-
const o = t == null ? void 0 : t.nextElementSibling, n = o &&
|
|
34
|
+
function L(t) {
|
|
35
|
+
const o = t == null ? void 0 : t.nextElementSibling, n = o && i(o, "data-count");
|
|
36
36
|
if (o && n) {
|
|
37
|
-
const
|
|
37
|
+
const s = Number(n) - t.value.length, c = s < 0, r = i(o, "aria-live") === "polite", d = window.getComputedStyle(o || t), e = a(d, "count-over"), f = a(d, "count-under");
|
|
38
38
|
if (r !== c) {
|
|
39
|
-
|
|
39
|
+
i(o, "aria-live", c ? "polite" : "off");
|
|
40
40
|
for (const T of x) o.classList.toggle(T, c);
|
|
41
41
|
}
|
|
42
42
|
o.textContent = (c ? e : f).replace(
|
|
43
43
|
"%d",
|
|
44
|
-
`${Math.abs(
|
|
44
|
+
`${Math.abs(s)}`
|
|
45
45
|
);
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
function H({ target: t, newState: o }) {
|
|
49
|
-
if (t instanceof
|
|
50
|
-
const n = t.getRootNode(),
|
|
49
|
+
if (t instanceof C) {
|
|
50
|
+
const n = t.getRootNode(), s = n == null ? void 0 : n.querySelector(
|
|
51
51
|
`[popovertarget="${t.id}"]`
|
|
52
52
|
);
|
|
53
|
-
o === "closed" ? u(t, !1) :
|
|
53
|
+
o === "closed" ? u(t, !1) : s && (t.style.width = `${s.clientWidth}px`, u(t, s, "bottom", !0));
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
function
|
|
57
|
-
g(t) && (
|
|
56
|
+
function $({ target: t }) {
|
|
57
|
+
g(t) && (L(t), y(t));
|
|
58
58
|
}
|
|
59
|
-
function
|
|
59
|
+
function N(t) {
|
|
60
60
|
var o, n;
|
|
61
61
|
(n = (o = t.target) == null ? void 0 : o.closest) != null && n.call(o, `.${v}`) && t.preventDefault();
|
|
62
62
|
}
|
|
63
|
-
function
|
|
63
|
+
function w({ target: t }) {
|
|
64
64
|
const o = t instanceof p && t.list;
|
|
65
65
|
o && !(o != null && o.hidden) && setTimeout(() => u(o, t, 2, !0), 10);
|
|
66
66
|
}
|
|
67
|
-
|
|
68
|
-
|
|
67
|
+
I(() => {
|
|
68
|
+
S(document.documentElement, v, M), l(document, "beforechange", w, m), l(document, "input", $, m), l(document, "invalid", N, !0), l(document, "toggle", H, m);
|
|
69
69
|
});
|
|
70
70
|
//# sourceMappingURL=field-observer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-observer.js","sources":["../../designsystem/field/field-observer.ts"],"sourcesContent":["import { UHTMLComboboxElement } from \"@u-elements/u-combobox\";\nimport { UHTMLDataListElement } from \"@u-elements/u-datalist\";\nimport styles from \"../styles.module.css\";\nimport {\n\tQUICK_EVENT,\n\tanchorPosition,\n\tattr,\n\tisInputLike,\n\ton,\n\tonLoaded,\n\tonMutation,\n\tuseId,\n} from \"../utils\";\n\nconst CSS_FIELD = styles.field.split(\" \")[0];\nconst
|
|
1
|
+
{"version":3,"file":"field-observer.js","sources":["../../designsystem/field/field-observer.ts"],"sourcesContent":["import { UHTMLComboboxElement } from \"@u-elements/u-combobox\";\nimport { UHTMLDataListElement } from \"@u-elements/u-datalist\";\nimport styles from \"../styles.module.css\";\nimport {\n\tQUICK_EVENT,\n\tanchorPosition,\n\tattr,\n\tisInputLike,\n\ton,\n\tonLoaded,\n\tonMutation,\n\tuseId,\n} from \"../utils\";\n\nconst CSS_FIELD = styles.field.split(\" \")[0];\nconst CSS_VALIDATIONS = styles.validation.split(\" \");\nconst CSS_VALIDATION = CSS_VALIDATIONS[0];\n\nconst getText = (style: CSSStyleDeclaration, key: string) =>\n\tstyle.getPropertyValue(`--mtds-text-${key}`)?.slice(1, -1) || \"\"; // slice to trim quotes\n\nfunction handleMutation(fields: HTMLCollectionOf<Element>) {\n\tfor (const field of fields)\n\t\tif (field.isConnected) {\n\t\t\tconst labels: HTMLLabelElement[] = [];\n\t\t\tconst descs: Element[] = [];\n\t\t\tlet combobox: UHTMLComboboxElement | null = null;\n\t\t\tlet input: HTMLInputElement | null = null;\n\t\t\tlet valid = true;\n\n\t\t\tfor (const el of field.getElementsByTagName(\"*\")) {\n\t\t\t\tif (el instanceof HTMLLabelElement) labels.push(el);\n\t\t\t\telse if (el instanceof UHTMLComboboxElement) combobox = el;\n\t\t\t\telse if (isInputLike(el)) input = el;\n\t\t\t\telse if (el.hasAttribute(\"data-description\")) descs.push(el);\n\t\t\t\telse if (el.classList.contains(CSS_VALIDATION)) {\n\t\t\t\t\tvalid =\n\t\t\t\t\t\tattr(el, \"data-color\") === \"success\" ||\n\t\t\t\t\t\t!el.clientWidth ||\n\t\t\t\t\t\t!el.clientHeight; // Only set invalid if Validation is visible\n\t\t\t\t\tdescs.unshift(el);\n\t\t\t\t} else if (el instanceof HTMLParagraphElement)\n\t\t\t\t\tdescs.some((desc) => desc.contains(el)) || descs.push(el); // Only add if not already inside description\n\t\t\t}\n\n\t\t\tif (input) {\n\t\t\t\tfor (const label of labels) label.htmlFor = useId(input);\n\t\t\t\trenderCombobox(combobox);\n\t\t\t\trenderCounter(input);\n\t\t\t\trenderTextareaSize(input);\n\t\t\t\tattr(input, \"aria-describedby\", descs.map(useId).join(\" \") || null); // Remove if empty\n\t\t\t\tattr(input, \"aria-invalid\", `${!valid}`);\n\t\t\t}\n\t\t}\n}\n\n// iOS does not support field-sizing: content, so we need to manually resize\nfunction renderTextareaSize(textarea: Element) {\n\tif (textarea instanceof HTMLTextAreaElement) {\n\t\ttextarea.style.setProperty(\"--mtds-textarea-height\", \"auto\");\n\t\ttextarea.style.setProperty(\n\t\t\t\"--mtds-textarea-height\",\n\t\t\t`${textarea.scrollHeight}px`,\n\t\t);\n\t}\n}\n\n// Setup translations from CSS custom properties\nfunction renderCombobox(el: UHTMLComboboxElement | null) {\n\tif (!el?.list || el.list?.hasAttribute(\"popover\")) return;\n\tconst style = window.getComputedStyle(el);\n\tattr(el, \"data-sr-added\", getText(style, \"combobox-added\"));\n\tattr(el, \"data-sr-empty\", getText(style, \"combobox-empty\"));\n\tattr(el, \"data-sr-found\", getText(style, \"combobox-found\"));\n\tattr(el, \"data-sr-invalid\", getText(style, \"combobox-invalid\"));\n\tattr(el, \"data-sr-of\", getText(style, \"combobox-of\"));\n\tattr(el, \"data-sr-remove\", getText(style, \"combobox-remove\"));\n\tattr(el, \"data-sr-removed\", getText(style, \"combobox-removed\"));\n\tattr(el.list, \"data-sr-plural\", getText(style, \"datalist-plural\"));\n\tattr(el.list, \"data-sr-singular\", getText(style, \"datalist-singular\"));\n\tattr(el.list, \"popover\", \"manual\");\n}\n\nfunction renderCounter(input: HTMLInputElement) {\n\tconst el = input?.nextElementSibling;\n\tconst limit = el && attr(el, \"data-count\");\n\n\tif (el && limit) {\n\t\tconst remainder = Number(limit) - input.value.length;\n\t\tconst nextInvalid = remainder < 0;\n\t\tconst prevInvalid = attr(el, \"aria-live\") === \"polite\";\n\t\tconst style = window.getComputedStyle(el || input);\n\t\tconst over = getText(style, \"count-over\");\n\t\tconst under = getText(style, \"count-under\");\n\n\t\tif (prevInvalid !== nextInvalid) {\n\t\t\tattr(el, \"aria-live\", nextInvalid ? \"polite\" : \"off\");\n\t\t\tfor (const css of CSS_VALIDATIONS) el.classList.toggle(css, nextInvalid);\n\t\t}\n\t\tel.textContent = (nextInvalid ? over : under).replace(\n\t\t\t\"%d\",\n\t\t\t`${Math.abs(remainder)}`,\n\t\t);\n\t}\n}\n\nfunction handleToggle({ target: el, newState }: Event & { newState?: string }) {\n\tif (el instanceof UHTMLDataListElement) {\n\t\tconst root = el.getRootNode() as ShadowRoot | null;\n\t\tconst anchor = root?.querySelector<HTMLElement>(\n\t\t\t`[popovertarget=\"${el.id}\"]`,\n\t\t);\n\n\t\tif (newState === \"closed\") anchorPosition(el, false);\n\t\telse if (anchor) {\n\t\t\tel.style.width = `${anchor.clientWidth}px`;\n\t\t\tanchorPosition(el, anchor, \"bottom\", true);\n\t\t}\n\t}\n}\n// Update when typing\nfunction handleInput({ target }: Event) {\n\tif (isInputLike(target)) {\n\t\trenderCounter(target);\n\t\trenderTextareaSize(target);\n\t}\n}\n\n// Prevent browsers from showing default validation bubbles\nfunction handleInvalid(event: Event) {\n\tif ((event.target as Element)?.closest?.(`.${CSS_FIELD}`))\n\t\tevent.preventDefault();\n}\n\n// Position combobox when changing content\nfunction handleBeforeChange({ target: el }: Event) {\n\tconst list = el instanceof UHTMLComboboxElement && el.list;\n\tif (list && !list?.hidden)\n\t\tsetTimeout(() => anchorPosition(list, el, 2, true), 10); // Reposition list if not hidden\n}\n\nonLoaded(() => {\n\tonMutation(document.documentElement, CSS_FIELD, handleMutation);\n\ton(document, \"beforechange\", handleBeforeChange, QUICK_EVENT);\n\ton(document, \"input\", handleInput, QUICK_EVENT);\n\ton(document, \"invalid\", handleInvalid, true); // Use capture as invalid does noe bubble\n\ton(document, \"toggle\", handleToggle, QUICK_EVENT); // Use capture since toggle does not bubble\n});\n"],"names":["CSS_FIELD","styles","CSS_VALIDATIONS","CSS_VALIDATION","getText","style","key","_a","handleMutation","fields","field","labels","descs","combobox","input","valid","el","UHTMLComboboxElement","isInputLike","attr","desc","label","useId","renderCombobox","renderCounter","renderTextareaSize","textarea","limit","remainder","nextInvalid","prevInvalid","over","under","css","handleToggle","newState","UHTMLDataListElement","root","anchor","anchorPosition","handleInput","target","handleInvalid","event","_b","handleBeforeChange","list","onLoaded","onMutation","on","QUICK_EVENT"],"mappings":";;;;AAcA,MAAMA,IAAYC,EAAO,MAAM,MAAM,GAAG,EAAE,CAAC,GACrCC,IAAkBD,EAAO,WAAW,MAAM,GAAG,GAC7CE,IAAiBD,EAAgB,CAAC,GAElCE,IAAU,CAACC,GAA4BC,MAAA;;AAC5C,WAAAC,IAAAF,EAAM,iBAAiB,eAAeC,CAAG,EAAE,MAA3C,gBAAAC,EAA8C,MAAM,GAAG,QAAO;AAAA;AAE/D,SAASC,EAAeC,GAAmC;AAC1D,aAAWC,KAASD;AACnB,QAAIC,EAAM,aAAa;AACtB,YAAMC,IAA6B,CAAC,GAC9BC,IAAmB,CAAC;AAC1B,UAAIC,IAAwC,MACxCC,IAAiC,MACjCC,IAAQ;AAEZ,iBAAWC,KAAMN,EAAM,qBAAqB,GAAG;AAC9C,QAAIM,aAAc,mBAAyBL,EAAA,KAAKK,CAAE,IACzCA,aAAcC,IAAiCJ,IAAAG,IAC/CE,EAAYF,CAAE,IAAWF,IAAAE,IACzBA,EAAG,aAAa,kBAAkB,IAAGJ,EAAM,KAAKI,CAAE,IAClDA,EAAG,UAAU,SAASb,CAAc,KAE3CY,IAAAI,EAAKH,GAAI,YAAY,MAAM,aAC3B,CAACA,EAAG,eACJ,CAACA,EAAG,cACLJ,EAAM,QAAQI,CAAE,KACNA,aAAc,yBAClBJ,EAAA,KAAK,CAACQ,MAASA,EAAK,SAASJ,CAAE,CAAC,KAAKJ,EAAM,KAAKI,CAAE;AAG1D,UAAIF,GAAO;AACV,mBAAWO,KAASV,EAAc,CAAAU,EAAA,UAAUC,EAAMR,CAAK;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e;AACvB;AAGA,SAASE,EAAmB,EAAE,QAAQ7B,KAAa;AAC5C,QAAA8B,IAAO9B,aAAcC,KAAwBD,EAAG;AAClD,EAAA8B,KAAQ,EAACA,KAAA,QAAAA,EAAM,WAClB,WAAW,MAAMP,EAAeO,GAAM9B,GAAI,GAAG,EAAI,GAAG,EAAE;AACxD;AAEA+B,EAAS,MAAM;AACH,EAAAC,EAAA,SAAS,iBAAiBhD,GAAWQ,CAAc,GAC3DyC,EAAA,UAAU,gBAAgBJ,GAAoBK,CAAW,GACzDD,EAAA,UAAU,SAAST,GAAaU,CAAW,GAC3CD,EAAA,UAAU,WAAWP,GAAe,EAAI,GACxCO,EAAA,UAAU,UAAUf,GAAcgB,CAAW;AACjD,CAAC;"}
|
package/mtds/field/field.js
CHANGED
|
@@ -14,7 +14,6 @@ import "../dialog/dialog.js";
|
|
|
14
14
|
import "../divider/divider.js";
|
|
15
15
|
import "../errorsummary/errorsummary.js";
|
|
16
16
|
import "../fieldset/fieldset.js";
|
|
17
|
-
import "../typography/typography.js";
|
|
18
17
|
import { HelpText as w } from "../helptext/helptext.js";
|
|
19
18
|
import "../input/input.js";
|
|
20
19
|
import "../layout/layout.js";
|
|
@@ -25,10 +24,12 @@ import "../popover/popover.js";
|
|
|
25
24
|
import "../progress/progress.js";
|
|
26
25
|
import "../skeleton/skeleton.js";
|
|
27
26
|
import "../spinner/spinner.js";
|
|
27
|
+
import "../steps/steps.js";
|
|
28
28
|
import "../table/table.js";
|
|
29
29
|
import "../tabs/tabs.js";
|
|
30
30
|
import "../tag/tag.js";
|
|
31
31
|
import "../togglegroup/togglegroup.js";
|
|
32
|
+
import "../typography/typography.js";
|
|
32
33
|
import "../validation/validation.js";
|
|
33
34
|
import n from "../styles.module.css.js";
|
|
34
35
|
import { toCustomElementProps as f } from "../utils.js";
|
|
@@ -92,14 +93,14 @@ const E = e(function({
|
|
|
92
93
|
function(o, t) {
|
|
93
94
|
return /* @__PURE__ */ i("u-combobox", { ref: t, ...f(o) });
|
|
94
95
|
}
|
|
95
|
-
),
|
|
96
|
+
), Fi = Object.assign(E, {
|
|
96
97
|
Affixes: j,
|
|
97
98
|
Combobox: T,
|
|
98
99
|
Datalist: P,
|
|
99
100
|
Option: R
|
|
100
101
|
});
|
|
101
102
|
export {
|
|
102
|
-
|
|
103
|
+
Fi as Field,
|
|
103
104
|
E as FieldComp
|
|
104
105
|
};
|
|
105
106
|
//# sourceMappingURL=field.js.map
|
package/mtds/field/field.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field.js","sources":["../../designsystem/field/field.tsx"],"sourcesContent":["import type {\n\tReactUcombobox,\n\tUHTMLComboboxElement,\n} from \"@u-elements/u-combobox\";\nimport clsx from \"clsx\";\nimport { type JSX, forwardRef } from \"react\";\nimport { HelpText } from \"../react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\nimport { toCustomElementProps } from \"../utils\";\n\ntype FieldBaseProps = {\n\tcount?: number;\n\tdescription?: React.ReactNode;\n\terror?: React.ReactNode; // Kept for backwards compatibility\n\thelpText?: React.ReactNode;\n\thelpTextLabel?: string;\n\tlabel?: React.ReactNode;\n\toptions?: Array<string | { label: string; value: string }>;\n\tprefix?: string;\n\treadOnly?: boolean; // Allow readoOnly also on <select>\n\tsuffix?: string;\n\tvalidation?: React.ReactNode;\n};\n\nexport type FieldProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<As, FieldBaseProps>;\n\ntype FieldComponent = <As extends React.ElementType = \"div\">(\n\tprops: FieldProps<As>,\n) => JSX.Element;\n\nexport const FieldComp: FieldComponent = forwardRef<null>(function Field<\n\tAs extends React.ElementType = \"div\",\n>(\n\t{\n\t\t\"data-size\": size,\n\t\tas,\n\t\tclassName,\n\t\tcount,\n\t\tdescription,\n\t\terror,\n\t\thelpText,\n\t\thelpTextLabel,\n\t\tlabel,\n\t\toptions,\n\t\tprefix,\n\t\tstyle,\n\t\tsuffix,\n\t\tvalidation,\n\t\t...rest\n\t}: FieldProps<As>,\n\tref?: PolymorphicRef<As>,\n) {\n\tconst Tag = as || \"div\";\n\tconst affixes = !!suffix || !!prefix;\n\tconst valid = validation || error; // error kept for backwards compatibility\n\tconst shared = {\n\t\t\"data-size\": size,\n\t\tclassName: clsx(styles.field, className),\n\t\tstyle,\n\t};\n\n\t// Render options if select\n\tif (as === \"select\" && !rest.children)\n\t\tObject.assign(rest, {\n\t\t\tchildren: (\n\t\t\t\t<>\n\t\t\t\t\t{options\n\t\t\t\t\t\t?.map((o) => (typeof o === \"string\" ? { label: o, value: o } : o))\n\t\t\t\t\t\t.map(({ label, value }) => (\n\t\t\t\t\t\t\t<option key={value} value={value}>\n\t\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t))}\n\t\t\t\t</>\n\t\t\t),\n\t\t});\n\n\t// Using suppressHydrationWarning to avoid Next.js vs field-observer.ts hydration conflict\n\treturn as ? (\n\t\t<div {...shared}>\n\t\t\t{!!label && <label suppressHydrationWarning>{label}</label>}\n\t\t\t{!!helpText && <HelpText aria-label={helpTextLabel}>{helpText}</HelpText>}\n\t\t\t{!!description && <p>{description}</p>}\n\t\t\t{affixes ? (\n\t\t\t\t<FieldAffixes>\n\t\t\t\t\t{!!prefix && <span>{prefix}</span>}\n\t\t\t\t\t<Tag className={styles.input} ref={ref} {...rest} />\n\t\t\t\t\t{!!suffix && <span>{suffix}</span>}\n\t\t\t\t</FieldAffixes>\n\t\t\t) : (\n\t\t\t\t<Tag\n\t\t\t\t\tclassName={styles.input}\n\t\t\t\t\tsuppressHydrationWarning\n\t\t\t\t\tref={ref}\n\t\t\t\t\t{...rest}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{!!valid && <div className={styles.validation}>{valid}</div>}\n\t\t\t{!!count && <p data-count={count} />}\n\t\t</div>\n\t) : (\n\t\t<div ref={ref} {...shared} {...rest} />\n\t);\n}) as FieldComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nconst FieldAffixes = forwardRef<HTMLDivElement, FieldProps>(\n\tfunction FieldAffixes({ className, ...rest }, ref) {\n\t\treturn (\n\t\t\t<div className={clsx(styles.affixes, className)} ref={ref} {...rest} />\n\t\t);\n\t},\n);\n\nexport type FieldDatalistProps = React.ComponentPropsWithoutRef<\"datalist\"> & {\n\t\"data-nofilter\"?: boolean;\n};\n\nconst FieldDatalist = forwardRef<HTMLDataListElement, FieldDatalistProps>(\n\tfunction FieldDatalist(props, ref) {\n\t\treturn <u-datalist ref={ref} {...toCustomElementProps(props)} />;\n\t},\n);\n\nexport type FieldOptionProps = React.ComponentPropsWithoutRef<\"option\">;\n\nconst FieldOption = forwardRef<HTMLOptionElement, FieldOptionProps>(\n\tfunction FieldOption(props, ref) {\n\t\treturn <u-option ref={ref} {...toCustomElementProps(props)} />;\n\t},\n);\n\nexport type FieldComboboxProps = ReactUcombobox & {\n\t\"data-multiple\"?: boolean;\n\t\"data-creatable\"?: boolean;\n};\n\nconst FieldCombobox = forwardRef<UHTMLComboboxElement, FieldComboboxProps>(\n\tfunction FieldCombobox(props, ref) {\n\t\treturn <u-combobox ref={ref} {...toCustomElementProps(props)} />;\n\t},\n);\n\nexport const Field = Object.assign(FieldComp, {\n\tAffixes: FieldAffixes,\n\tCombobox: FieldCombobox,\n\tDatalist: FieldDatalist,\n\tOption: FieldOption,\n});\n"],"names":["FieldComp","forwardRef","size","as","className","count","description","error","helpText","helpTextLabel","label","options","prefix","style","suffix","validation","rest","ref","Tag","affixes","valid","shared","clsx","styles","jsx","Fragment","o","value","jsxs","HelpText","FieldAffixes","FieldDatalist","props","toCustomElementProps","FieldOption","FieldCombobox","Field"],"mappings":"
|
|
1
|
+
{"version":3,"file":"field.js","sources":["../../designsystem/field/field.tsx"],"sourcesContent":["import type {\n\tReactUcombobox,\n\tUHTMLComboboxElement,\n} from \"@u-elements/u-combobox\";\nimport clsx from \"clsx\";\nimport { type JSX, forwardRef } from \"react\";\nimport { HelpText } from \"../react\";\nimport type {\n\tPolymorphicComponentPropWithRef,\n\tPolymorphicRef,\n} from \"../react-types\";\nimport styles from \"../styles.module.css\";\nimport { toCustomElementProps } from \"../utils\";\n\ntype FieldBaseProps = {\n\tcount?: number;\n\tdescription?: React.ReactNode;\n\terror?: React.ReactNode; // Kept for backwards compatibility\n\thelpText?: React.ReactNode;\n\thelpTextLabel?: string;\n\tlabel?: React.ReactNode;\n\toptions?: Array<string | { label: string; value: string }>;\n\tprefix?: string;\n\treadOnly?: boolean; // Allow readoOnly also on <select>\n\tsuffix?: string;\n\tvalidation?: React.ReactNode;\n};\n\nexport type FieldProps<As extends React.ElementType = \"div\"> =\n\tPolymorphicComponentPropWithRef<As, FieldBaseProps>;\n\ntype FieldComponent = <As extends React.ElementType = \"div\">(\n\tprops: FieldProps<As>,\n) => JSX.Element;\n\nexport const FieldComp: FieldComponent = forwardRef<null>(function Field<\n\tAs extends React.ElementType = \"div\",\n>(\n\t{\n\t\t\"data-size\": size,\n\t\tas,\n\t\tclassName,\n\t\tcount,\n\t\tdescription,\n\t\terror,\n\t\thelpText,\n\t\thelpTextLabel,\n\t\tlabel,\n\t\toptions,\n\t\tprefix,\n\t\tstyle,\n\t\tsuffix,\n\t\tvalidation,\n\t\t...rest\n\t}: FieldProps<As>,\n\tref?: PolymorphicRef<As>,\n) {\n\tconst Tag = as || \"div\";\n\tconst affixes = !!suffix || !!prefix;\n\tconst valid = validation || error; // error kept for backwards compatibility\n\tconst shared = {\n\t\t\"data-size\": size,\n\t\tclassName: clsx(styles.field, className),\n\t\tstyle,\n\t};\n\n\t// Render options if select\n\tif (as === \"select\" && !rest.children)\n\t\tObject.assign(rest, {\n\t\t\tchildren: (\n\t\t\t\t<>\n\t\t\t\t\t{options\n\t\t\t\t\t\t?.map((o) => (typeof o === \"string\" ? { label: o, value: o } : o))\n\t\t\t\t\t\t.map(({ label, value }) => (\n\t\t\t\t\t\t\t<option key={value} value={value}>\n\t\t\t\t\t\t\t\t{label}\n\t\t\t\t\t\t\t</option>\n\t\t\t\t\t\t))}\n\t\t\t\t</>\n\t\t\t),\n\t\t});\n\n\t// Using suppressHydrationWarning to avoid Next.js vs field-observer.ts hydration conflict\n\treturn as ? (\n\t\t<div {...shared}>\n\t\t\t{!!label && <label suppressHydrationWarning>{label}</label>}\n\t\t\t{!!helpText && <HelpText aria-label={helpTextLabel}>{helpText}</HelpText>}\n\t\t\t{!!description && <p>{description}</p>}\n\t\t\t{affixes ? (\n\t\t\t\t<FieldAffixes>\n\t\t\t\t\t{!!prefix && <span>{prefix}</span>}\n\t\t\t\t\t<Tag className={styles.input} ref={ref} {...rest} />\n\t\t\t\t\t{!!suffix && <span>{suffix}</span>}\n\t\t\t\t</FieldAffixes>\n\t\t\t) : (\n\t\t\t\t<Tag\n\t\t\t\t\tclassName={styles.input}\n\t\t\t\t\tsuppressHydrationWarning\n\t\t\t\t\tref={ref}\n\t\t\t\t\t{...rest}\n\t\t\t\t/>\n\t\t\t)}\n\t\t\t{!!valid && <div className={styles.validation}>{valid}</div>}\n\t\t\t{!!count && <p data-count={count} />}\n\t\t</div>\n\t) : (\n\t\t<div ref={ref} {...shared} {...rest} />\n\t);\n}) as FieldComponent; // Needed to tell Typescript this does not return ReactNode but acutally JSX.Element\n\nconst FieldAffixes = forwardRef<HTMLDivElement, FieldProps>(\n\tfunction FieldAffixes({ className, ...rest }, ref) {\n\t\treturn (\n\t\t\t<div className={clsx(styles.affixes, className)} ref={ref} {...rest} />\n\t\t);\n\t},\n);\n\nexport type FieldDatalistProps = React.ComponentPropsWithoutRef<\"datalist\"> & {\n\t\"data-nofilter\"?: boolean;\n};\n\nconst FieldDatalist = forwardRef<HTMLDataListElement, FieldDatalistProps>(\n\tfunction FieldDatalist(props, ref) {\n\t\treturn <u-datalist ref={ref} {...toCustomElementProps(props)} />;\n\t},\n);\n\nexport type FieldOptionProps = React.ComponentPropsWithoutRef<\"option\">;\n\nconst FieldOption = forwardRef<HTMLOptionElement, FieldOptionProps>(\n\tfunction FieldOption(props, ref) {\n\t\treturn <u-option ref={ref} {...toCustomElementProps(props)} />;\n\t},\n);\n\nexport type FieldComboboxProps = ReactUcombobox & {\n\t\"data-multiple\"?: boolean;\n\t\"data-creatable\"?: boolean;\n};\n\nconst FieldCombobox = forwardRef<UHTMLComboboxElement, FieldComboboxProps>(\n\tfunction FieldCombobox(props, ref) {\n\t\treturn <u-combobox ref={ref} {...toCustomElementProps(props)} />;\n\t},\n);\n\nexport const Field = Object.assign(FieldComp, {\n\tAffixes: FieldAffixes,\n\tCombobox: FieldCombobox,\n\tDatalist: FieldDatalist,\n\tOption: FieldOption,\n});\n"],"names":["FieldComp","forwardRef","size","as","className","count","description","error","helpText","helpTextLabel","label","options","prefix","style","suffix","validation","rest","ref","Tag","affixes","valid","shared","clsx","styles","jsx","Fragment","o","value","jsxs","HelpText","FieldAffixes","FieldDatalist","props","toCustomElementProps","FieldOption","FieldCombobox","Field"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCa,MAAAA,IAA4BC,EAAiB,SAGzD;AAAA,EACC,aAAaC;AAAA,EACb,IAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,YAAAC;AAAA,EACA,GAAGC;AACJ,GACAC,GACC;AACD,QAAMC,IAAMf,KAAM,OACZgB,IAAU,CAAC,CAACL,KAAU,CAAC,CAACF,GACxBQ,IAAQL,KAAcR,GACtBc,IAAS;AAAA,IACd,aAAanB;AAAA,IACb,WAAWoB,EAAKC,EAAO,OAAOnB,CAAS;AAAA,IACvC,OAAAS;AAAA,EACD;AAGI,SAAAV,MAAO,YAAY,CAACa,EAAK,YAC5B,OA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