@sbb-esta/lyne-elements 3.12.0 → 3.12.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"form-associated-input-mixin.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/mixins/form-associated-input-mixin.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EAGhB,MAAM,KAAK,CAAC;AAIb,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAI1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAG5D,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EAEtB,MAAM,4BAA4B,CAAC;;AAIpC,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,+BAAgC,SAAQ,oCAErE;IACC,gBAAuB,mBAAmB,QAAQ;IAElD,IAAW,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE;IAChC,IAAW,KAAK,IAAI,MAAM,CAAC;IAE3B,IAAW,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE;IACpC,IAAW,QAAQ,IAAI,OAAO,CAAC;IAE/B,IAAW,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE;IACpC,IAAW,QAAQ,IAAI,OAAO,CAAC;IAE/B,IAAW,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE;IACtC,IAAW,WAAW,IAAI,MAAM,CAAC;IAEjC;;;;OAIG;IACI,MAAM,IAAI,IAAI;IAEd,iBAAiB,IAAI,IAAI;IACzB,wBAAwB,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,EAAE,MAAM,EAAE,iBAAiB,GAAG,IAAI;IAEhG,SAAS,CAAC,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IACjD,SAAS,CAAC,QAAQ,EAAE,qBAAqB,CAAC;CAC3C;AAgBD;;GAEG;AAEH,eAAO,MAAM,2BAA2B,GAAI,CAAC,SAAS,mBAAmB,CAAC,UAAU,CAAC,EACnF,YAAY,CAAC,KACZ,mBAAmB,CAAC,+BAA+B,CAAC,GAAG,CAqXzD,CAAC"}
1
+ {"version":3,"file":"form-associated-input-mixin.d.ts","sourceRoot":"","sources":["../../../../src/elements/core/mixins/form-associated-input-mixin.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EAGhB,MAAM,KAAK,CAAC;AAIb,OAAO,EAAE,qBAAqB,EAA8B,MAAM,mBAAmB,CAAC;AAItF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAG5D,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EAEtB,MAAM,4BAA4B,CAAC;;AAIpC,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,+BAAgC,SAAQ,oCAErE;IACC,gBAAuB,mBAAmB,QAAQ;IAElD,IAAW,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE;IAChC,IAAW,KAAK,IAAI,MAAM,CAAC;IAE3B,IAAW,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE;IACpC,IAAW,QAAQ,IAAI,OAAO,CAAC;IAE/B,IAAW,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE;IACpC,IAAW,QAAQ,IAAI,OAAO,CAAC;IAE/B,IAAW,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE;IACtC,IAAW,WAAW,IAAI,MAAM,CAAC;IAEjC;;;;OAIG;IACI,MAAM,IAAI,IAAI;IAEd,iBAAiB,IAAI,IAAI;IACzB,wBAAwB,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,EAAE,MAAM,EAAE,iBAAiB,GAAG,IAAI;IAEhG,SAAS,CAAC,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IACjD,SAAS,CAAC,QAAQ,EAAE,qBAAqB,CAAC;CAC3C;AAgBD;;GAEG;AAEH,eAAO,MAAM,2BAA2B,GAAI,CAAC,SAAS,mBAAmB,CAAC,UAAU,CAAC,EACnF,YAAY,CAAC,KACZ,mBAAmB,CAAC,+BAA+B,CAAC,GAAG,CAmazD,CAAC"}
@@ -1,24 +1,24 @@
1
- import { __esDecorate as r, __runInitializers as p } from "tslib";
2
- import { isServer as l, html as f } from "lit";
1
+ import { __esDecorate as l, __runInitializers as f } from "tslib";
2
+ import { isServer as r, html as m } from "lit";
3
3
  import { property as c, eventOptions as b } from "lit/decorators.js";
4
- import { sbbInputModalityDetector as m } from "../a11y.js";
5
- import { SbbLanguageController as g } from "../controllers.js";
6
- import { isWebkit as v } from "../dom.js";
7
- import { i18nInputRequired as _ } from "../i18n.js";
8
- import { SbbDisabledMixin as y } from "./disabled-mixin.js";
9
- import { SbbElementInternalsMixin as C } from "./element-internals-mixin.js";
10
- import { SbbFormAssociatedMixin as E } from "./form-associated-mixin.js";
11
- import { SbbReadonlyMixin as x } from "./readonly-mixin.js";
12
- import { SbbRequiredMixin as S } from "./required-mixin.js";
13
- const k = () => {
14
- if (l)
4
+ import { sbbInputModalityDetector as p } from "../a11y.js";
5
+ import { SbbLanguageController as g, SbbMediaQueryPointerCoarse as _ } from "../controllers.js";
6
+ import { isWebkit as v, isBlink as y } from "../dom.js";
7
+ import { i18nInputRequired as C } from "../i18n.js";
8
+ import { SbbDisabledMixin as E } from "./disabled-mixin.js";
9
+ import { SbbElementInternalsMixin as S } from "./element-internals-mixin.js";
10
+ import { SbbFormAssociatedMixin as x } from "./form-associated-mixin.js";
11
+ import { SbbReadonlyMixin as k } from "./readonly-mixin.js";
12
+ import { SbbRequiredMixin as w } from "./required-mixin.js";
13
+ const A = () => {
14
+ if (r)
15
15
  return !1;
16
16
  const a = document.createElement("div");
17
17
  return a.setAttribute("contenteditable", "PLAINTEXT-ONLY"), a.contentEditable === "plaintext-only";
18
- }, w = k(), H = (a) => (() => {
18
+ }, O = A(), z = (a) => (() => {
19
19
  var s;
20
- let d = x(y(S(E(C(a))))), n = [], o, h, u;
21
- return s = class extends d {
20
+ let h = k(E(w(x(S(a))))), n = [], d, u, o;
21
+ return s = class extends h {
22
22
  /**
23
23
  * Form type of element.
24
24
  * @default 'text'
@@ -30,7 +30,7 @@ const k = () => {
30
30
  * The value of the input. Reflects the current text value of this input.
31
31
  */
32
32
  set value(e) {
33
- this._value = this._cleanText(e), this.hasUpdated && (this.innerHTML = this._value), this.dispatchEvent(new Event("displayvaluechange", { bubbles: !0, composed: !0 }));
33
+ this._value = this._cleanText(e), this.hasUpdated && this._assignValue(this._value), this.dispatchEvent(new Event("displayvaluechange", { bubbles: !0, composed: !0 }));
34
34
  }
35
35
  get value() {
36
36
  return this._value ?? "";
@@ -42,11 +42,11 @@ const k = () => {
42
42
  return this.getAttribute("placeholder") ?? "";
43
43
  }
44
44
  constructor() {
45
- super(), this._shouldEmitChange = (p(this, n), !1), this._shouldTriggerSubmit = !1, this.language = new g(this), this._value = "", this.addEventListener?.("input", () => {
45
+ super(), this._shouldEmitChange = (f(this, n), !1), this._shouldTriggerSubmit = !1, this.language = new g(this), this._value = "", this.addEventListener?.("input", () => {
46
46
  const e = this._value;
47
47
  this._value = this._cleanText(this.textContent ?? ""), this.requestUpdate("value", e), this.internals.states.add("interacted"), this._shouldEmitChange = !0;
48
48
  }, { capture: !0 }), this.addEventListener?.("change", () => this._shouldEmitChange = !1, { capture: !0 }), this.addEventListener?.("keydown", (e) => {
49
- if ((e.key === "Enter" || e.key === `
49
+ if (this._requiresEmptyPatch() && this._assignValue(""), (e.key === "Enter" || e.key === `
50
50
  `) && e.isTrusted)
51
51
  e.preventDefault(), e.stopImmediatePropagation(), this._shouldTriggerSubmit = this.dispatchEvent(new KeyboardEvent("keydown", e));
52
52
  else if (v && this.value && (e.key === "Backspace" || e.key === "Delete") && e.isTrusted) {
@@ -58,33 +58,37 @@ const k = () => {
58
58
  t.startOffset !== t.endOffset ? (t.deleteContents(), this._dispatchInputEvent()) : e.key === "Backspace" && t.startOffset > 0 ? (t.setStart(t.startContainer, t.startOffset - 1), t.deleteContents(), this._dispatchInputEvent()) : e.key === "Delete" && t.endOffset < this.value.length && (t.setEnd(t.endContainer, t.endOffset + 1), t.deleteContents(), this._dispatchInputEvent());
59
59
  }
60
60
  }, { capture: !0 }), this.addEventListener?.("keyup", (e) => {
61
- (e.key === "Enter" || e.key === `
62
- `) && (this._emitChangeIfNecessary(), this._shouldTriggerSubmit && (this._shouldTriggerSubmit = !1, this.form?.requestSubmit()));
61
+ e.key === "Enter" || e.key === `
62
+ ` ? (this._emitChangeIfNecessary(), this._shouldTriggerSubmit && (this._shouldTriggerSubmit = !1, this.form?.requestSubmit())) : this._requiresEmptyPatch() && this._setCursorAt(0);
63
63
  }, { capture: !0 }), this.addEventListener?.("paste", (e) => {
64
- e.preventDefault();
64
+ e.preventDefault(), this._requiresEmptyPatch() && this._assignValue("");
65
65
  const t = this._cleanText(e.clipboardData?.getData("text/plain") ?? ""), i = window.getSelection()?.getRangeAt(0);
66
66
  !i || !t || (i.deleteContents(), i.insertNode(document.createTextNode(this.preparePastedText(t))), i.setStart(i.endContainer, i.endOffset), this._dispatchInputEvent());
67
67
  }), this.addEventListener?.("focus", () => {
68
- m.mostRecentModality === "keyboard" && window.getSelection()?.selectAllChildren(this);
68
+ p.mostRecentModality === "keyboard" && window.getSelection()?.selectAllChildren(this);
69
+ }), this.addEventListener?.("touchend", () => {
70
+ this._requiresEmptyPatch() && (this._assignValue("&nbsp;"), this._setCursorAt(0));
71
+ }), this.addEventListener?.("click", () => {
72
+ this._requiresEmptyPatch() && p.mostRecentModality === "touch" && this._setCursorAt(0);
69
73
  }), this.addEventListener?.("blur", () => {
70
- window.getSelection()?.removeAllRanges(), this._emitChangeIfNecessary(), this.scrollLeft = 0;
74
+ window.getSelection()?.removeAllRanges(), this.value === "" && this._assignValue(""), this._emitChangeIfNecessary(), this.scrollLeft = 0;
71
75
  }, { capture: !0 });
72
76
  }
73
77
  isDisabledExternally() {
74
78
  return this.formDisabled;
75
79
  }
76
80
  connectedCallback() {
77
- super.connectedCallback(), this.internals.ariaMultiLine = "false", this._updateContenteditable(), this.innerHTML = this.value;
81
+ super.connectedCallback(), this.internals.ariaMultiLine = "false", this._updateContenteditable(), this._assignValue(this.value);
78
82
  }
79
83
  focus(e) {
80
84
  if (super.focus(e), this._canSelect()) {
81
85
  const t = window.getSelection();
82
86
  if (!t)
83
87
  return;
84
- let i = t.rangeCount > 0 ? t.getRangeAt(0) : null;
88
+ const i = t.rangeCount > 0 ? t.getRangeAt(0) : null;
85
89
  if (i && i.startOffset !== 0)
86
90
  return;
87
- i = document.createRange(), i.setStart(this.firstChild, this.textContent.length), i.collapse(!0), t.removeAllRanges(), t.addRange(i);
91
+ this._setCursorAt(this.textContent.length);
88
92
  }
89
93
  }
90
94
  attributeChangedCallback(e, t, i) {
@@ -119,7 +123,7 @@ const k = () => {
119
123
  window.getSelection()?.selectAllChildren(this);
120
124
  }
121
125
  firstUpdated(e) {
122
- super.firstUpdated(e), this.value && !this.innerHTML.length && (this.innerHTML = this.value);
126
+ super.firstUpdated(e), this.value && !this.innerHTML.length && this._assignValue(this.value);
123
127
  }
124
128
  requestUpdate(e, t, i) {
125
129
  super.requestUpdate(e, t, i), this.isConnected && (e === "disabled" || e === "formDisabled" || e === "readOnly") && this._updateContenteditable();
@@ -128,11 +132,24 @@ const k = () => {
128
132
  return super.shouldValidate(e) || e === "value" || e === "required";
129
133
  }
130
134
  validate() {
131
- super.validate(), this.required && !this.value ? this.setValidityFlag("valueMissing", _[this.language.current]) : this.removeValidityFlag("valueMissing");
135
+ super.validate(), this.required && !this.value ? this.setValidityFlag("valueMissing", C[this.language.current]) : this.removeValidityFlag("valueMissing");
132
136
  }
133
137
  preparePastedText(e) {
134
138
  return e;
135
139
  }
140
+ _requiresEmptyPatch() {
141
+ return r ? !1 : y && this.value === "" && window.matchMedia(_).matches;
142
+ }
143
+ _assignValue(e) {
144
+ this.innerHTML = e;
145
+ }
146
+ _setCursorAt(e) {
147
+ const t = window.getSelection();
148
+ if (!t)
149
+ return;
150
+ const i = document.createRange();
151
+ i.setStart(this.firstChild, e), i.collapse(!0), t.removeAllRanges(), t.addRange(i);
152
+ }
136
153
  _cleanText(e) {
137
154
  return e === null ? "" : `${e}`.replace(/[\n\r]+/g, "");
138
155
  }
@@ -145,9 +162,9 @@ const k = () => {
145
162
  e.remove();
146
163
  }
147
164
  _updateContenteditable() {
148
- if (!l && this.isConnected) {
165
+ if (!r && this.isConnected) {
149
166
  this.internals.ariaReadOnly = this.readOnly ? "true" : null, this.internals.ariaDisabled = this.disabled ? "true" : null;
150
- const e = this.disabled || this.readOnly ? "false" : w ? "plaintext-only" : "true";
167
+ const e = this.disabled || this.readOnly ? "false" : O ? "plaintext-only" : "true";
151
168
  this.setAttribute("contenteditable", e), this.readOnly ? this.setAttribute("tabindex", "0") : this.removeAttribute("tabindex");
152
169
  }
153
170
  }
@@ -155,20 +172,20 @@ const k = () => {
155
172
  this._shouldEmitChange && (this._shouldEmitChange = !1, this.dispatchEvent(new Event("change", { bubbles: !0 })));
156
173
  }
157
174
  _canSelect() {
158
- return !l && !this.disabled && !this.readOnly && !!this.value;
175
+ return !r && !this.disabled && !this.readOnly && !!this.value;
159
176
  }
160
177
  render() {
161
- return f`<slot @slotchange=${this._cleanChildren}></slot>`;
178
+ return m`<slot @slotchange=${this._cleanChildren}></slot>`;
162
179
  }
163
180
  }, (() => {
164
- const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(d[Symbol.metadata] ?? null) : void 0;
165
- o = [c()], h = [c({ attribute: !1 })], u = [b({ passive: !0 })], r(s, null, o, { kind: "setter", name: "value", static: !1, private: !1, access: { has: (t) => "value" in t, set: (t, i) => {
181
+ const e = typeof Symbol == "function" && Symbol.metadata ? Object.create(h[Symbol.metadata] ?? null) : void 0;
182
+ d = [c()], u = [c({ attribute: !1 })], o = [b({ passive: !0 })], l(s, null, d, { kind: "setter", name: "value", static: !1, private: !1, access: { has: (t) => "value" in t, set: (t, i) => {
166
183
  t.value = i;
167
- } }, metadata: e }, null, n), r(s, null, h, { kind: "setter", name: "placeholder", static: !1, private: !1, access: { has: (t) => "placeholder" in t, set: (t, i) => {
184
+ } }, metadata: e }, null, n), l(s, null, u, { kind: "setter", name: "placeholder", static: !1, private: !1, access: { has: (t) => "placeholder" in t, set: (t, i) => {
168
185
  t.placeholder = i;
169
- } }, metadata: e }, null, n), r(s, null, u, { kind: "method", name: "_cleanChildren", static: !1, private: !1, access: { has: (t) => "_cleanChildren" in t, get: (t) => t._cleanChildren }, metadata: e }, null, n), e && Object.defineProperty(s, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
186
+ } }, metadata: e }, null, n), l(s, null, o, { kind: "method", name: "_cleanChildren", static: !1, private: !1, access: { has: (t) => "_cleanChildren" in t, get: (t) => t._cleanChildren }, metadata: e }, null, n), e && Object.defineProperty(s, Symbol.metadata, { enumerable: !0, configurable: !0, writable: !0, value: e });
170
187
  })(), s.role = "textbox", s.formFieldAssociated = !0, s;
171
188
  })();
172
189
  export {
173
- H as SbbFormAssociatedInputMixin
190
+ z as SbbFormAssociatedInputMixin
174
191
  };
@@ -8777,6 +8777,64 @@
8777
8777
  "module": "core/mixins/form-associated-input-mixin.js"
8778
8778
  }
8779
8779
  },
8780
+ {
8781
+ "kind": "method",
8782
+ "name": "_requiresEmptyPatch",
8783
+ "privacy": "private",
8784
+ "return": {
8785
+ "type": {
8786
+ "text": "boolean"
8787
+ }
8788
+ },
8789
+ "inheritedFrom": {
8790
+ "name": "SbbFormAssociatedInputMixin",
8791
+ "module": "core/mixins/form-associated-input-mixin.js"
8792
+ }
8793
+ },
8794
+ {
8795
+ "kind": "method",
8796
+ "name": "_assignValue",
8797
+ "privacy": "private",
8798
+ "return": {
8799
+ "type": {
8800
+ "text": "void"
8801
+ }
8802
+ },
8803
+ "parameters": [
8804
+ {
8805
+ "name": "value",
8806
+ "type": {
8807
+ "text": "string"
8808
+ }
8809
+ }
8810
+ ],
8811
+ "inheritedFrom": {
8812
+ "name": "SbbFormAssociatedInputMixin",
8813
+ "module": "core/mixins/form-associated-input-mixin.js"
8814
+ }
8815
+ },
8816
+ {
8817
+ "kind": "method",
8818
+ "name": "_setCursorAt",
8819
+ "privacy": "private",
8820
+ "return": {
8821
+ "type": {
8822
+ "text": "void"
8823
+ }
8824
+ },
8825
+ "parameters": [
8826
+ {
8827
+ "name": "position",
8828
+ "type": {
8829
+ "text": "number"
8830
+ }
8831
+ }
8832
+ ],
8833
+ "inheritedFrom": {
8834
+ "name": "SbbFormAssociatedInputMixin",
8835
+ "module": "core/mixins/form-associated-input-mixin.js"
8836
+ }
8837
+ },
8780
8838
  {
8781
8839
  "kind": "method",
8782
8840
  "name": "_cleanText",
@@ -14729,13 +14787,22 @@
14729
14787
  "text": "(T = string | string[]) | null"
14730
14788
  },
14731
14789
  "privacy": "public",
14732
- "default": "null",
14733
14790
  "description": "Value of the form element.",
14734
14791
  "attribute": "value",
14735
14792
  "inheritedFrom": {
14736
14793
  "name": "SbbFormAssociatedMixin",
14737
14794
  "module": "core/mixins/form-associated-mixin.js"
14738
- }
14795
+ },
14796
+ "default": "null"
14797
+ },
14798
+ {
14799
+ "kind": "field",
14800
+ "name": "_value",
14801
+ "type": {
14802
+ "text": "T | T[] | null"
14803
+ },
14804
+ "privacy": "private",
14805
+ "default": "null"
14739
14806
  },
14740
14807
  {
14741
14808
  "kind": "field",
@@ -14880,21 +14947,21 @@
14880
14947
  },
14881
14948
  {
14882
14949
  "kind": "field",
14883
- "name": "_options",
14950
+ "name": "_isValueManuallyAssigned",
14884
14951
  "type": {
14885
- "text": "SbbOptionElement<T>[]"
14952
+ "text": "boolean"
14886
14953
  },
14887
14954
  "privacy": "private",
14888
- "description": "Gets all the SbbOptionElement projected in the select.",
14889
- "readonly": true
14955
+ "default": "false"
14890
14956
  },
14891
14957
  {
14892
14958
  "kind": "field",
14893
- "name": "_filteredOptions",
14959
+ "name": "options",
14894
14960
  "type": {
14895
14961
  "text": "SbbOptionElement<T>[]"
14896
14962
  },
14897
- "privacy": "private",
14963
+ "privacy": "public",
14964
+ "description": "Returns all SbbOptionElements from this sbb-select instance.",
14898
14965
  "readonly": true
14899
14966
  },
14900
14967
  {
@@ -14958,6 +15025,16 @@
14958
15025
  },
14959
15026
  "description": "Gets the current displayed value."
14960
15027
  },
15028
+ {
15029
+ "kind": "method",
15030
+ "name": "_selectableOptions",
15031
+ "privacy": "private",
15032
+ "return": {
15033
+ "type": {
15034
+ "text": "SbbOptionElement<T>[]"
15035
+ }
15036
+ }
15037
+ },
14961
15038
  {
14962
15039
  "kind": "method",
14963
15040
  "name": "_onOptionChanged",
@@ -15004,15 +15081,7 @@
15004
15081
  "type": {
15005
15082
  "text": "void"
15006
15083
  }
15007
- },
15008
- "parameters": [
15009
- {
15010
- "name": "selected",
15011
- "type": {
15012
- "text": "SbbOptionElement<T> | SbbOptionElement<T>[] | null"
15013
- }
15014
- }
15015
- ]
15084
+ }
15016
15085
  },
15017
15086
  {
15018
15087
  "kind": "method",
@@ -15054,40 +15123,17 @@
15054
15123
  },
15055
15124
  {
15056
15125
  "kind": "method",
15057
- "name": "_onValueChanged",
15058
- "privacy": "private",
15059
- "return": {
15060
- "type": {
15061
- "text": "void"
15062
- }
15063
- },
15064
- "parameters": [
15065
- {
15066
- "name": "newValue",
15067
- "type": {
15068
- "text": "T | T[]"
15069
- }
15070
- }
15071
- ],
15072
- "description": "Sets the _displayValue by checking the internal sbb-options and setting the correct `selected` value on them."
15073
- },
15074
- {
15075
- "kind": "method",
15076
- "name": "_readFormData",
15077
- "privacy": "private",
15126
+ "name": "formState",
15127
+ "privacy": "protected",
15078
15128
  "return": {
15079
15129
  "type": {
15080
- "text": "Promise<T[]>"
15130
+ "text": "FormRestoreState"
15081
15131
  }
15082
15132
  },
15083
- "parameters": [
15084
- {
15085
- "name": "formData",
15086
- "type": {
15087
- "text": "FormData"
15088
- }
15089
- }
15090
- ]
15133
+ "inheritedFrom": {
15134
+ "name": "SbbFormAssociatedMixin",
15135
+ "module": "core/mixins/form-associated-mixin.js"
15136
+ }
15091
15137
  },
15092
15138
  {
15093
15139
  "kind": "method",
@@ -15228,7 +15274,7 @@
15228
15274
  },
15229
15275
  "parameters": [
15230
15276
  {
15231
- "name": "optionSelectionChange",
15277
+ "name": "option",
15232
15278
  "type": {
15233
15279
  "text": "SbbOptionElement<T>"
15234
15280
  }
@@ -15475,7 +15521,27 @@
15475
15521
  },
15476
15522
  {
15477
15523
  "kind": "method",
15478
- "name": "_setValueFromSelected",
15524
+ "name": "_updateOptionsFromValue",
15525
+ "privacy": "private",
15526
+ "return": {
15527
+ "type": {
15528
+ "text": "void"
15529
+ }
15530
+ }
15531
+ },
15532
+ {
15533
+ "kind": "method",
15534
+ "name": "_updateValueFromOptions",
15535
+ "privacy": "private",
15536
+ "return": {
15537
+ "type": {
15538
+ "text": "void"
15539
+ }
15540
+ }
15541
+ },
15542
+ {
15543
+ "kind": "method",
15544
+ "name": "_onSlotChange",
15479
15545
  "privacy": "private",
15480
15546
  "return": {
15481
15547
  "type": {
@@ -15955,20 +16021,6 @@
15955
16021
  "module": "core/mixins/form-associated-mixin.js"
15956
16022
  }
15957
16023
  },
15958
- {
15959
- "kind": "method",
15960
- "name": "formState",
15961
- "privacy": "protected",
15962
- "return": {
15963
- "type": {
15964
- "text": "FormRestoreState"
15965
- }
15966
- },
15967
- "inheritedFrom": {
15968
- "name": "SbbFormAssociatedMixin",
15969
- "module": "core/mixins/form-associated-mixin.js"
15970
- }
15971
- },
15972
16024
  {
15973
16025
  "kind": "method",
15974
16026
  "name": "setValidityFlag",
@@ -16264,11 +16316,10 @@
16264
16316
  },
16265
16317
  {
16266
16318
  "name": "value",
16319
+ "description": "Value of the form element.",
16267
16320
  "type": {
16268
- "text": "T | T[] | null"
16321
+ "text": "T[] | T | null"
16269
16322
  },
16270
- "default": "null",
16271
- "description": "Value of the form element.",
16272
16323
  "fieldName": "value"
16273
16324
  },
16274
16325
  {
@@ -20220,6 +20271,64 @@
20220
20271
  "module": "core/mixins/form-associated-input-mixin.js"
20221
20272
  }
20222
20273
  },
20274
+ {
20275
+ "kind": "method",
20276
+ "name": "_requiresEmptyPatch",
20277
+ "privacy": "private",
20278
+ "return": {
20279
+ "type": {
20280
+ "text": "boolean"
20281
+ }
20282
+ },
20283
+ "inheritedFrom": {
20284
+ "name": "SbbFormAssociatedInputMixin",
20285
+ "module": "core/mixins/form-associated-input-mixin.js"
20286
+ }
20287
+ },
20288
+ {
20289
+ "kind": "method",
20290
+ "name": "_assignValue",
20291
+ "privacy": "private",
20292
+ "return": {
20293
+ "type": {
20294
+ "text": "void"
20295
+ }
20296
+ },
20297
+ "parameters": [
20298
+ {
20299
+ "name": "value",
20300
+ "type": {
20301
+ "text": "string"
20302
+ }
20303
+ }
20304
+ ],
20305
+ "inheritedFrom": {
20306
+ "name": "SbbFormAssociatedInputMixin",
20307
+ "module": "core/mixins/form-associated-input-mixin.js"
20308
+ }
20309
+ },
20310
+ {
20311
+ "kind": "method",
20312
+ "name": "_setCursorAt",
20313
+ "privacy": "private",
20314
+ "return": {
20315
+ "type": {
20316
+ "text": "void"
20317
+ }
20318
+ },
20319
+ "parameters": [
20320
+ {
20321
+ "name": "position",
20322
+ "type": {
20323
+ "text": "number"
20324
+ }
20325
+ }
20326
+ ],
20327
+ "inheritedFrom": {
20328
+ "name": "SbbFormAssociatedInputMixin",
20329
+ "module": "core/mixins/form-associated-input-mixin.js"
20330
+ }
20331
+ },
20223
20332
  {
20224
20333
  "kind": "method",
20225
20334
  "name": "_cleanText",
@@ -55150,6 +55259,52 @@
55150
55259
  }
55151
55260
  ]
55152
55261
  },
55262
+ {
55263
+ "kind": "method",
55264
+ "name": "_requiresEmptyPatch",
55265
+ "privacy": "private",
55266
+ "return": {
55267
+ "type": {
55268
+ "text": "boolean"
55269
+ }
55270
+ }
55271
+ },
55272
+ {
55273
+ "kind": "method",
55274
+ "name": "_assignValue",
55275
+ "privacy": "private",
55276
+ "return": {
55277
+ "type": {
55278
+ "text": "void"
55279
+ }
55280
+ },
55281
+ "parameters": [
55282
+ {
55283
+ "name": "value",
55284
+ "type": {
55285
+ "text": "string"
55286
+ }
55287
+ }
55288
+ ]
55289
+ },
55290
+ {
55291
+ "kind": "method",
55292
+ "name": "_setCursorAt",
55293
+ "privacy": "private",
55294
+ "return": {
55295
+ "type": {
55296
+ "text": "void"
55297
+ }
55298
+ },
55299
+ "parameters": [
55300
+ {
55301
+ "name": "position",
55302
+ "type": {
55303
+ "text": "number"
55304
+ }
55305
+ }
55306
+ ]
55307
+ },
55153
55308
  {
55154
55309
  "kind": "method",
55155
55310
  "name": "_cleanText",
@@ -1 +1 @@
1
- {"version":3,"file":"form-associated-input-mixin.d.ts","sourceRoot":"","sources":["../../../../../src/elements/core/mixins/form-associated-input-mixin.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EAGhB,MAAM,KAAK,CAAC;AAIb,OAAO,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC;AAI1D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAG5D,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EAEtB,MAAM,4BAA4B,CAAC;;AAIpC,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,+BAAgC,SAAQ,oCAErE;IACC,gBAAuB,mBAAmB,QAAQ;IAElD,IAAW,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE;IAChC,IAAW,KAAK,IAAI,MAAM,CAAC;IAE3B,IAAW,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE;IACpC,IAAW,QAAQ,IAAI,OAAO,CAAC;IAE/B,IAAW,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE;IACpC,IAAW,QAAQ,IAAI,OAAO,CAAC;IAE/B,IAAW,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE;IACtC,IAAW,WAAW,IAAI,MAAM,CAAC;IAEjC;;;;OAIG;IACI,MAAM,IAAI,IAAI;IAEd,iBAAiB,IAAI,IAAI;IACzB,wBAAwB,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,EAAE,MAAM,EAAE,iBAAiB,GAAG,IAAI;IAEhG,SAAS,CAAC,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IACjD,SAAS,CAAC,QAAQ,EAAE,qBAAqB,CAAC;CAC3C;AAgBD;;GAEG;AAEH,eAAO,MAAM,2BAA2B,GAAI,CAAC,SAAS,mBAAmB,CAAC,UAAU,CAAC,EACnF,YAAY,CAAC,KACZ,mBAAmB,CAAC,+BAA+B,CAAC,GAAG,CAqXzD,CAAC"}
1
+ {"version":3,"file":"form-associated-input-mixin.d.ts","sourceRoot":"","sources":["../../../../../src/elements/core/mixins/form-associated-input-mixin.ts"],"names":[],"mappings":"AAAA,OAAO,EAGL,KAAK,UAAU,EAGhB,MAAM,KAAK,CAAC;AAIb,OAAO,EAAE,qBAAqB,EAA8B,MAAM,mBAAmB,CAAC;AAItF,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAG5D,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EAEtB,MAAM,4BAA4B,CAAC;;AAIpC,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,+BAAgC,SAAQ,oCAErE;IACC,gBAAuB,mBAAmB,QAAQ;IAElD,IAAW,KAAK,CAAC,KAAK,EAAE,MAAM,EAAE;IAChC,IAAW,KAAK,IAAI,MAAM,CAAC;IAE3B,IAAW,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE;IACpC,IAAW,QAAQ,IAAI,OAAO,CAAC;IAE/B,IAAW,QAAQ,CAAC,KAAK,EAAE,OAAO,EAAE;IACpC,IAAW,QAAQ,IAAI,OAAO,CAAC;IAE/B,IAAW,WAAW,CAAC,KAAK,EAAE,MAAM,EAAE;IACtC,IAAW,WAAW,IAAI,MAAM,CAAC;IAEjC;;;;OAIG;IACI,MAAM,IAAI,IAAI;IAEd,iBAAiB,IAAI,IAAI;IACzB,wBAAwB,CAAC,KAAK,EAAE,gBAAgB,GAAG,IAAI,EAAE,MAAM,EAAE,iBAAiB,GAAG,IAAI;IAEhG,SAAS,CAAC,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM;IACjD,SAAS,CAAC,QAAQ,EAAE,qBAAqB,CAAC;CAC3C;AAgBD;;GAEG;AAEH,eAAO,MAAM,2BAA2B,GAAI,CAAC,SAAS,mBAAmB,CAAC,UAAU,CAAC,EACnF,YAAY,CAAC,KACZ,mBAAmB,CAAC,+BAA+B,CAAC,GAAG,CAmazD,CAAC"}