@cupra/ui-kit 2.0.0-canary.62 → 2.0.0-canary.64

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.
Files changed (104) hide show
  1. package/dist/cjs/components/ds-accordion/ds-accordion.cjs +6 -6
  2. package/dist/cjs/components/ds-button/ds-button.cjs +43 -38
  3. package/dist/cjs/components/ds-button/styles/common.styles.cjs +41 -3
  4. package/dist/cjs/components/ds-chips/styles/common.styles.cjs +9 -2
  5. package/dist/cjs/components/ds-select/ds-select.cjs +4 -3
  6. package/dist/cjs/components/ds-slider/ds-slider.cjs +18 -18
  7. package/dist/cjs/components/ds-text-input/ds-text-input.cjs +3 -2
  8. package/dist/cjs/components/ds-textarea/ds-textarea.cjs +4 -3
  9. package/dist/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
  10. package/dist/cjs/mixins/inputStatesMixin.cjs +1 -1
  11. package/dist/cjs/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive-helpers.cjs +2 -2
  12. package/dist/cjs/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive.cjs +1 -1
  13. package/dist/cjs/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/live.cjs +5 -0
  14. package/dist/cjs/utils/IconsManager.cjs +1 -1
  15. package/dist/cjs/utils/PubSub.cjs +1 -1
  16. package/dist/cjs/utils/StylesRegistry/StylesRegistry.cjs +1 -1
  17. package/dist/cjs/utils/concurrencyLimit.cjs +1 -0
  18. package/dist/cjs/utils/cssWithTokens.cjs +1 -1
  19. package/dist/cjs/utils/htmlWithTokens.cjs +1 -1
  20. package/dist/esm/components/ds-accordion/ds-accordion.js +4 -4
  21. package/dist/esm/components/ds-button/ds-button.js +90 -79
  22. package/dist/esm/components/ds-button/styles/common.styles.js +42 -4
  23. package/dist/esm/components/ds-chips/styles/common.styles.js +7 -0
  24. package/dist/esm/components/ds-select/ds-select.js +38 -32
  25. package/dist/esm/components/ds-slider/ds-slider.js +84 -67
  26. package/dist/esm/components/ds-text-input/ds-text-input.js +38 -30
  27. package/dist/esm/components/ds-textarea/ds-textarea.js +45 -37
  28. package/dist/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
  29. package/dist/esm/mixins/inputStatesMixin.js +4 -3
  30. package/dist/esm/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive-helpers.js +17 -16
  31. package/dist/esm/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive.js +4 -4
  32. package/dist/esm/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/live.js +30 -0
  33. package/dist/esm/utils/IconsManager.js +1 -1
  34. package/dist/esm/utils/PubSub.js +1 -1
  35. package/dist/esm/utils/StylesRegistry/StylesRegistry.js +8 -6
  36. package/dist/esm/utils/concurrencyLimit.js +32 -0
  37. package/dist/esm/utils/cssWithTokens.js +1 -1
  38. package/dist/esm/utils/htmlWithTokens.js +1 -1
  39. package/dist/types/components/ds-accordion/ds-accordion.d.ts +1 -1
  40. package/dist/types/components/ds-button/ds-button.d.ts +2 -0
  41. package/dist/types/components/ds-button/ds-button.types.d.ts +1 -0
  42. package/dist/types/components/ds-select/ds-select.d.ts +2 -0
  43. package/dist/types/components/ds-select/ds-select.types.d.ts +1 -0
  44. package/dist/types/components/ds-slider/ds-slider.d.ts +7 -2
  45. package/dist/types/components/ds-slider/ds-slider.types.d.ts +18 -3
  46. package/dist/types/components/ds-text-input/ds-text-input.d.ts +2 -0
  47. package/dist/types/components/ds-text-input/ds-text-input.types.d.ts +1 -0
  48. package/dist/types/components/ds-textarea/ds-textarea.d.ts +2 -0
  49. package/dist/types/components/ds-textarea/ds-textarea.types.d.ts +1 -0
  50. package/dist/types/mixins/inputStatesMixin.d.ts +1 -0
  51. package/dist/types/utils/concurrencyLimit.d.ts +4 -0
  52. package/dist/types/utils/concurrencyLimit.test.d.ts +1 -0
  53. package/dist-react/cjs/components/ds-accordion/ds-accordion.cjs +6 -6
  54. package/dist-react/cjs/components/ds-button/ds-button.cjs +43 -38
  55. package/dist-react/cjs/components/ds-button/styles/common.styles.cjs +41 -3
  56. package/dist-react/cjs/components/ds-chips/styles/common.styles.cjs +9 -2
  57. package/dist-react/cjs/components/ds-select/ds-select.cjs +4 -3
  58. package/dist-react/cjs/components/ds-slider/ds-slider.cjs +18 -18
  59. package/dist-react/cjs/components/ds-text-input/ds-text-input.cjs +3 -2
  60. package/dist-react/cjs/components/ds-textarea/ds-textarea.cjs +4 -3
  61. package/dist-react/cjs/components/ds-theme-provider/ds-theme-provider.cjs +1 -1
  62. package/dist-react/cjs/mixins/inputStatesMixin.cjs +1 -1
  63. package/dist-react/cjs/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive-helpers.cjs +2 -2
  64. package/dist-react/cjs/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive.cjs +1 -1
  65. package/dist-react/cjs/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/live.cjs +5 -0
  66. package/dist-react/cjs/utils/IconsManager.cjs +1 -1
  67. package/dist-react/cjs/utils/PubSub.cjs +1 -1
  68. package/dist-react/cjs/utils/StylesRegistry/StylesRegistry.cjs +1 -1
  69. package/dist-react/cjs/utils/concurrencyLimit.cjs +1 -0
  70. package/dist-react/cjs/utils/cssWithTokens.cjs +1 -1
  71. package/dist-react/cjs/utils/htmlWithTokens.cjs +1 -1
  72. package/dist-react/esm/components/ds-accordion/ds-accordion.js +4 -4
  73. package/dist-react/esm/components/ds-button/ds-button.js +90 -79
  74. package/dist-react/esm/components/ds-button/styles/common.styles.js +42 -4
  75. package/dist-react/esm/components/ds-chips/styles/common.styles.js +7 -0
  76. package/dist-react/esm/components/ds-select/ds-select.js +38 -32
  77. package/dist-react/esm/components/ds-slider/ds-slider.js +84 -67
  78. package/dist-react/esm/components/ds-text-input/ds-text-input.js +38 -30
  79. package/dist-react/esm/components/ds-textarea/ds-textarea.js +45 -37
  80. package/dist-react/esm/components/ds-theme-provider/ds-theme-provider.js +1 -1
  81. package/dist-react/esm/mixins/inputStatesMixin.js +4 -3
  82. package/dist-react/esm/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive-helpers.js +17 -16
  83. package/dist-react/esm/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directive.js +4 -4
  84. package/dist-react/esm/node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/live.js +30 -0
  85. package/dist-react/esm/utils/IconsManager.js +1 -1
  86. package/dist-react/esm/utils/PubSub.js +1 -1
  87. package/dist-react/esm/utils/StylesRegistry/StylesRegistry.js +8 -6
  88. package/dist-react/esm/utils/concurrencyLimit.js +32 -0
  89. package/dist-react/esm/utils/cssWithTokens.js +1 -1
  90. package/dist-react/esm/utils/htmlWithTokens.js +1 -1
  91. package/dist-react/types/components/ds-accordion/ds-accordion.d.ts +1 -1
  92. package/dist-react/types/components/ds-button/ds-button.d.ts +2 -0
  93. package/dist-react/types/components/ds-button/ds-button.types.d.ts +1 -0
  94. package/dist-react/types/components/ds-select/ds-select.d.ts +2 -0
  95. package/dist-react/types/components/ds-select/ds-select.types.d.ts +1 -0
  96. package/dist-react/types/components/ds-slider/ds-slider.d.ts +7 -2
  97. package/dist-react/types/components/ds-slider/ds-slider.types.d.ts +18 -3
  98. package/dist-react/types/components/ds-text-input/ds-text-input.d.ts +2 -0
  99. package/dist-react/types/components/ds-text-input/ds-text-input.types.d.ts +1 -0
  100. package/dist-react/types/components/ds-textarea/ds-textarea.d.ts +2 -0
  101. package/dist-react/types/components/ds-textarea/ds-textarea.types.d.ts +1 -0
  102. package/dist-react/types/mixins/inputStatesMixin.d.ts +1 -0
  103. package/dist-react/types/utils/concurrencyLimit.d.ts +4 -0
  104. package/package.json +1 -1
@@ -2,46 +2,47 @@ import { UiKitElement as $ } from "../base/UiKitElement.js";
2
2
  import { getStepValue as d } from "./utils/getStepValue/getStepValue.js";
3
3
  import { roundToDecimals as S } from "./utils/roundToDecimals/roundToDecimals.js";
4
4
  import { customUiKitElement as V } from "../../decorators/customUiKitElement.js";
5
- import { ViewportMixin as T } from "../../mixins/ViewportMixin.js";
6
- import { booleanConverter as L } from "../../utils/booleanConverter.js";
7
- import { formatNumber as P } from "../../utils/formatNumber/formatNumber.js";
8
- import { htmlWithTokens as D } from "../../utils/htmlWithTokens.js";
9
- import { objectConverter as k } from "../../utils/objectConverter.js";
5
+ import { ViewportMixin as _ } from "../../mixins/ViewportMixin.js";
6
+ import { booleanConverter as T } from "../../utils/booleanConverter.js";
7
+ import { formatNumber as L } from "../../utils/formatNumber/formatNumber.js";
8
+ import { htmlWithTokens as P } from "../../utils/htmlWithTokens.js";
9
+ import { objectConverter as D } from "../../utils/objectConverter.js";
10
10
  import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
11
11
  import { nothing as h, html as l } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
12
12
  import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
13
13
  import { property as r } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
14
14
  import { state as p } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/state.js";
15
- import { query as E } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js";
16
- import { classMap as F } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
17
- import { commonStyles as N, trackStyles as I, thumbStyles as C, currentValueStyles as A, rangeValueStyles as O } from "./styles/common.styles.js";
18
- var R = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, a = (t, e, i, o) => {
19
- for (var n = o > 1 ? void 0 : o ? _(e, i) : e, u = t.length - 1, m; u >= 0; u--)
20
- (m = t[u]) && (n = (o ? m(e, i, n) : m(n)) || n);
21
- return o && n && R(e, i, n), n;
15
+ import { query as k } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/query.js";
16
+ import { classMap as E } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
17
+ import { live as F } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/live.js";
18
+ import { commonStyles as N, trackStyles as C, thumbStyles as I, currentValueStyles as R, rangeValueStyles as A } from "./styles/common.styles.js";
19
+ var O = Object.defineProperty, U = Object.getOwnPropertyDescriptor, a = (t, e, i, n) => {
20
+ for (var o = n > 1 ? void 0 : n ? U(e, i) : e, u = t.length - 1, m; u >= 0; u--)
21
+ (m = t[u]) && (o = (n ? m(e, i, o) : m(o)) || o);
22
+ return n && o && O(e, i, o), o;
22
23
  };
23
- let s = class extends T($) {
24
+ let s = class extends _($) {
24
25
  constructor() {
25
26
  super(...arguments), this.min = 0, this.max = 100, this.minLabel = "", this.maxLabel = "", this.step = 1, this.initialValueMin = 0, this.mode = "light", this.locale = void 0, this.localeMatcher = "lookup", this.useGrouping = !0, this.minimumIntegerDigits = 1, this.minimumFractionDigits = 0, this.maximumFractionDigits = 3, this.size = "medium", this.disabled = !1, this.keyboardMode = !1, this.getNewValue = (t) => {
26
- const { width: e, left: i } = this.track.getBoundingClientRect(), o = t.type.indexOf("mouse") !== -1 ? t.clientX : t.touches[0].clientX, u = Math.min(Math.max(0, o - i), e) * 100 / e;
27
+ const { width: e, left: i } = this.track.getBoundingClientRect(), n = t.type.indexOf("mouse") !== -1 ? t.clientX : t.touches[0].clientX, u = Math.min(Math.max(0, n - i), e) * 100 / e;
27
28
  return this.min + u * (this.max - this.min) / 100;
28
29
  }, this.setActiveThumb = (t) => {
29
30
  const e = this.getNewValue(t);
30
- typeof this.valueMax != "number" || e <= this.valueMin ? this.activeThumb = "min" : e >= this.valueMax ? this.activeThumb = "max" : e - this.valueMin < this.valueMax - e ? this.activeThumb = "min" : this.activeThumb = "max";
31
+ typeof this._valueMax != "number" || e <= this._valueMin ? this.activeThumb = "min" : e >= this._valueMax ? this.activeThumb = "max" : e - this._valueMin < this._valueMax - e ? this.activeThumb = "min" : this.activeThumb = "max";
31
32
  }, this.handleMouseMove = (t) => {
32
33
  this.animationFrameRequest && cancelAnimationFrame(this.animationFrameRequest), this.animationFrameRequest = requestAnimationFrame(() => {
33
- const e = this.getNewValue(t), i = this.activeThumb ?? "min", { stepValue: o } = d({
34
+ const e = this.getNewValue(t), i = this.activeThumb ?? "min", { stepValue: n } = d({
34
35
  step: this.step,
35
36
  min: this.min,
36
37
  max: this.max,
37
38
  proposedValue: e,
38
39
  role: i,
39
40
  currentValues: {
40
- 1: this.valueMin,
41
- ...typeof this.valueMax == "number" ? { 2: this.valueMax } : {}
41
+ 1: this._valueMin,
42
+ ...typeof this._valueMax == "number" ? { 2: this._valueMax } : {}
42
43
  }
43
44
  });
44
- this.handleChange({ value: o, role: i });
45
+ this.handleChange({ value: n, role: i });
45
46
  });
46
47
  }, this.handleMouseDown = (t) => {
47
48
  var e;
@@ -53,23 +54,23 @@ let s = class extends T($) {
53
54
  }, this.handlePointerOrMouseDown = () => {
54
55
  this.keyboardMode = !1;
55
56
  }, this.onInputFocus = (t, e) => {
56
- const i = t.currentTarget, o = e === 1 ? "min" : "max";
57
- this.editingField = o, i.type = "number", i.step = String(this.step ?? 1);
58
- const n = o === "min" ? this.valueMin : this.valueMax;
59
- i.value = String(n ?? ""), this.keyboardMode && i.classList.add("focus-visible");
57
+ const i = t.currentTarget, n = e === 1 ? "min" : "max";
58
+ this.editingField = n, i.type = "number", i.step = String(this.step ?? 1);
59
+ const o = n === "min" ? this._valueMin : this._valueMax;
60
+ i.value = String(o ?? ""), this.keyboardMode && i.classList.add("focus-visible");
60
61
  }, this.commitInputValue = (t, e) => {
61
- const i = t.currentTarget, o = e === 1 ? "min" : "max", { stepValue: n } = d({
62
+ const i = t.currentTarget, n = e === 1 ? "min" : "max", { stepValue: o } = d({
62
63
  step: this.step,
63
64
  min: this.min,
64
65
  max: this.max,
65
66
  proposedValue: Number(i.value),
66
- role: o,
67
+ role: n,
67
68
  currentValues: {
68
- 1: this.valueMin,
69
- ...typeof this.valueMax == "number" ? { 2: this.valueMax } : {}
69
+ 1: this._valueMin,
70
+ ...typeof this._valueMax == "number" ? { 2: this._valueMax } : {}
70
71
  }
71
72
  });
72
- this.handleChange({ value: n, role: o }), i.value = String(n);
73
+ this.handleChange({ value: o, role: n }), this.isControlled(n) || (i.value = String(o));
73
74
  }, this.onInputBlur = (t) => {
74
75
  var i;
75
76
  this.editingField = void 0;
@@ -80,40 +81,50 @@ let s = class extends T($) {
80
81
  }, this.onThumbKeyDown = (t, e) => {
81
82
  if (!this.disabled && (t.key === "ArrowLeft" || t.key === "ArrowRight")) {
82
83
  t.preventDefault();
83
- const i = this.step ?? 1, o = t.key === "ArrowLeft" ? -i : i, n = e === 1 ? "min" : "max", m = (n === "min" ? this.valueMin : this.valueMax) + o, { stepValue: b } = d({
84
+ const i = this.step ?? 1, n = t.key === "ArrowLeft" ? -i : i, o = e === 1 ? "min" : "max", m = (o === "min" ? this._valueMin : this._valueMax) + n, { stepValue: b } = d({
84
85
  step: this.step,
85
86
  min: this.min,
86
87
  max: this.max,
87
88
  proposedValue: m,
88
- role: n,
89
+ role: o,
89
90
  currentValues: {
90
- 1: this.valueMin,
91
- ...typeof this.valueMax == "number" ? { 2: this.valueMax } : {}
91
+ 1: this._valueMin,
92
+ ...typeof this._valueMax == "number" ? { 2: this._valueMax } : {}
92
93
  }
93
94
  });
94
- this.handleChange({ value: b, role: n });
95
+ this.handleChange({ value: b, role: o });
95
96
  }
96
97
  };
97
98
  }
99
+ get isRange() {
100
+ return typeof this.initialValueMax == "number" || typeof this.valueMax == "number";
101
+ }
102
+ isControlled(t) {
103
+ return typeof (t === "min" ? this.valueMin : this.valueMax) == "number";
104
+ }
105
+ willUpdate(t) {
106
+ super.willUpdate(t), typeof this.valueMin == "number" && (this._valueMin = this.valueMin), typeof this.valueMax == "number" && (this._valueMax = this.valueMax);
107
+ }
98
108
  disconnectedCallback() {
99
109
  super.disconnectedCallback(), window == null || window.removeEventListener("mousemove", this.handleMouseMove), window == null || window.removeEventListener("touchmove", this.handleMouseMove), window == null || window.removeEventListener("pointerup", this.handlePointerUp), window == null || window.removeEventListener("keydown", this.handleKeydown), window == null || window.removeEventListener("mousedown", this.handlePointerOrMouseDown), window == null || window.removeEventListener("pointerdown", this.handlePointerOrMouseDown);
100
110
  }
101
111
  firstUpdated(t) {
102
112
  super.firstUpdated(t), window == null || window.addEventListener("keydown", this.handleKeydown), window == null || window.addEventListener("mousedown", this.handlePointerOrMouseDown), window == null || window.addEventListener("pointerdown", this.handlePointerOrMouseDown), ["min", "max"].forEach((i) => {
103
- const n = this[i === "min" ? "initialValueMin" : "initialValueMax"];
104
- if (typeof n != "number") return;
113
+ if (this.isControlled(i)) return;
114
+ const o = this[i === "min" ? "initialValueMin" : "initialValueMax"];
115
+ if (typeof o != "number") return;
105
116
  const { stepValue: u } = d({
106
117
  step: this.step,
107
118
  min: this.min,
108
119
  max: this.max,
109
- proposedValue: n,
120
+ proposedValue: o,
110
121
  role: i,
111
122
  currentValues: {
112
- 1: this.valueMin,
113
- ...typeof this.valueMax == "number" ? { 2: this.valueMax } : {}
123
+ 1: this._valueMin,
124
+ ...typeof this._valueMax == "number" ? { 2: this._valueMax } : {}
114
125
  }
115
126
  });
116
- this[i === "min" ? "valueMin" : "valueMax"] !== u && this.handleChange({ value: u, role: i });
127
+ this[i === "min" ? "_valueMin" : "_valueMax"] !== u && this.handleChange({ value: u, role: i });
117
128
  });
118
129
  }
119
130
  getTrackPct(t) {
@@ -121,8 +132,8 @@ let s = class extends T($) {
121
132
  return e === 0 ? 0 : (t - this.min) / e * 100;
122
133
  }
123
134
  handleChange({ value: t, role: e }) {
124
- const i = S({ value: t, fractionDigits: this.maximumFractionDigits }), o = e === "min" ? "valueMin" : "valueMax";
125
- this[o] !== i && (this[o] = i, this.dispatchEvent(
135
+ const i = S({ value: t, fractionDigits: this.maximumFractionDigits }), n = e === "min" ? "_valueMin" : "_valueMax";
136
+ this[n] !== i && (this.isControlled(e) || (this[n] = i), this.dispatchEvent(
126
137
  new CustomEvent("change", {
127
138
  bubbles: !0,
128
139
  composed: !0,
@@ -148,39 +159,39 @@ let s = class extends T($) {
148
159
  fractionSeparator: this.fractionSeparator,
149
160
  useGrouping: this.useGrouping
150
161
  };
151
- return P(e);
162
+ return L(e);
152
163
  }
153
164
  get rangeValuesTemplates() {
154
165
  const {
155
166
  formattedValue: t,
156
167
  unitSymbol: e,
157
168
  unitSymbolPosition: i
158
- } = this.formatNumber(this.min), o = this.unitSymbol ?? e, n = this.unitSymbolPosition ?? i, { formattedValue: u } = this.formatNumber(this.max);
169
+ } = this.formatNumber(this.min), n = this.unitSymbol ?? e, o = this.unitSymbolPosition ?? i, { formattedValue: u } = this.formatNumber(this.max);
159
170
  return l`
160
171
  <div class="range-value-text">
161
172
  ${this.minLabel ? l`<span class="range-value-label">${this.minLabel}</span>` : h}
162
- ${n === "left" ? l`<span>${o}</span>` : h}
173
+ ${o === "left" ? l`<span>${n}</span>` : h}
163
174
  <span>${t}</span>
164
- ${n === "right" ? l`<span>${o}</span>` : h}
175
+ ${o === "right" ? l`<span>${n}</span>` : h}
165
176
  </div>
166
177
  <div class="range-value-text">
167
178
  ${this.maxLabel ? l` <span class="range-value-label">${this.maxLabel}</span>` : h}
168
- ${n === "left" ? l`<span>${o}</span>` : h}
179
+ ${o === "left" ? l`<span>${n}</span>` : h}
169
180
  <span>${u}</span>
170
- ${n === "right" ? l`<span>${o}</span>` : h}
181
+ ${o === "right" ? l`<span>${n}</span>` : h}
171
182
  </div>
172
183
  `;
173
184
  }
174
185
  getThumbTemplate(t) {
175
- const e = t === 1 ? "min" : "max", i = e === "min" ? this.valueMin : this.valueMax, { minLimit: o, maxLimit: n } = d({
186
+ const e = t === 1 ? "min" : "max", i = e === "min" ? this._valueMin : this._valueMax, { minLimit: n, maxLimit: o } = d({
176
187
  step: this.step,
177
188
  min: this.min,
178
189
  max: this.max,
179
190
  proposedValue: i,
180
191
  role: e,
181
192
  currentValues: {
182
- 1: this.valueMin,
183
- ...typeof this.valueMax == "number" ? { 2: this.valueMax } : {}
193
+ 1: this._valueMin,
194
+ ...typeof this._valueMax == "number" ? { 2: this._valueMax } : {}
184
195
  }
185
196
  }), u = this.getTrackPct(i);
186
197
  return l`
@@ -199,8 +210,8 @@ let s = class extends T($) {
199
210
  tabindex=${this.disabled ? -1 : 0}
200
211
  aria-disabled=${String(!!this.disabled)}
201
212
  aria-label=${t === 1 ? "Minumum value" : "Maximum Value"}
202
- aria-valuemin=${o}
203
- aria-valuemax=${n}
213
+ aria-valuemin=${n}
214
+ aria-valuemax=${o}
204
215
  aria-valuenow=${i}
205
216
  >
206
217
  <svg
@@ -217,12 +228,12 @@ let s = class extends T($) {
217
228
  get thumbTemplates() {
218
229
  return l`
219
230
  ${this.getThumbTemplate(1)}
220
- ${typeof this.initialValueMax == "number" ? this.getThumbTemplate(2) : h}
231
+ ${this.isRange ? this.getThumbTemplate(2) : h}
221
232
  `;
222
233
  }
223
234
  get trackRangeTemplate() {
224
235
  let t, e;
225
- return typeof this.initialValueMax != "number" ? (t = 0, e = this.getTrackPct(this.valueMin)) : (t = this.getTrackPct(this.valueMin), e = this.getTrackPct(this.valueMax) - t), l`
236
+ return this.isRange ? (t = this.getTrackPct(this._valueMin), e = this.getTrackPct(this._valueMax) - t) : (t = 0, e = this.getTrackPct(this._valueMin)), l`
226
237
  <style>
227
238
  .track-range {
228
239
  left: ${t}%;
@@ -233,17 +244,17 @@ let s = class extends T($) {
233
244
  `;
234
245
  }
235
246
  getInputTemplate(t) {
236
- const e = t === 1 ? "min" : "max", i = this.editingField === e, o = e === "min" ? this.valueMin : this.valueMax, {
237
- formattedValue: n,
247
+ const e = t === 1 ? "min" : "max", i = this.editingField === e, n = e === "min" ? this._valueMin : this._valueMax, {
248
+ formattedValue: o,
238
249
  unitSymbol: u,
239
250
  unitSymbolPosition: m
240
- } = this.formatNumber(o), b = this.unitSymbolPosition ?? m, y = this.unitSymbol ?? u, g = y ? b === "left" ? `${y} ${n}` : `${n} ${y}` : `${n}`, f = i ? "number" : "text", v = i ? String(o ?? "") : g, M = t === 1 ? this.inputMinAriaLabel : this.inputMaxAriaLabel, x = typeof this.initialValueMax == "number" ? t === 1 ? "Start value" : "End value" : "Value", w = M ?? x;
251
+ } = this.formatNumber(n), b = this.unitSymbolPosition ?? m, y = this.unitSymbol ?? u, g = y ? b === "left" ? `${y} ${o}` : `${o} ${y}` : `${o}`, f = i ? "number" : "text", v = i ? String(n ?? "") : g, M = t === 1 ? this.inputMinAriaLabel : this.inputMaxAriaLabel, x = this.isRange ? t === 1 ? "Start value" : "End value" : "Value", w = M ?? x;
241
252
  return l`
242
253
  <div class="input-wrapper">
243
254
  <input
244
255
  class="input-value input-value-${t}"
245
256
  type=${f}
246
- .value=${v}
257
+ .value=${F(v)}
247
258
  step=${String(this.step ?? 1)}
248
259
  ?disabled=${this.disabled}
249
260
  tabindex=${this.disabled ? -1 : 0}
@@ -263,7 +274,7 @@ let s = class extends T($) {
263
274
  return l`
264
275
  <div class="inputs-container">
265
276
  ${this.getInputTemplate(1)}
266
- ${typeof this.initialValueMax == "number" ? this.getInputTemplate(2) : h}
277
+ ${this.isRange ? this.getInputTemplate(2) : h}
267
278
  </div>
268
279
  `;
269
280
  }
@@ -278,7 +289,7 @@ let s = class extends T($) {
278
289
  };
279
290
  }
280
291
  get styleTokens() {
281
- return D`
292
+ return P`
282
293
  <style>
283
294
  :host{
284
295
  color-scheme: ${this.mode};
@@ -289,7 +300,7 @@ let s = class extends T($) {
289
300
  render() {
290
301
  return l`
291
302
  ${this.styleTokens}
292
- <div class=${F(this.containerClasses)}>
303
+ <div class=${E(this.containerClasses)}>
293
304
  <div @touchstart=${this.handleMouseDown} @mousedown=${this.handleMouseDown} class="track" role="presentation">
294
305
  ${this.thumbTemplates}
295
306
  ${this.trackRangeTemplate}
@@ -300,7 +311,7 @@ let s = class extends T($) {
300
311
  `;
301
312
  }
302
313
  };
303
- s.styles = [N, I, C, A, O];
314
+ s.styles = [N, C, I, R, A];
304
315
  a([
305
316
  r({ type: Number })
306
317
  ], s.prototype, "min", 2);
@@ -322,6 +333,12 @@ a([
322
333
  a([
323
334
  r({ type: Number, attribute: "initial-value-max" })
324
335
  ], s.prototype, "initialValueMax", 2);
336
+ a([
337
+ r({ type: Number, attribute: "value-min" })
338
+ ], s.prototype, "valueMin", 2);
339
+ a([
340
+ r({ type: Number, attribute: "value-max" })
341
+ ], s.prototype, "valueMax", 2);
325
342
  a([
326
343
  r({ type: String, reflect: !0 })
327
344
  ], s.prototype, "mode", 2);
@@ -369,10 +386,10 @@ a([
369
386
  r({ type: String, attribute: "fraction-separator" })
370
387
  ], s.prototype, "fractionSeparator", 2);
371
388
  a([
372
- r({ type: String, converter: k })
389
+ r({ type: String, converter: D })
373
390
  ], s.prototype, "size", 2);
374
391
  a([
375
- r({ type: Boolean, converter: L })
392
+ r({ type: Boolean, converter: T })
376
393
  ], s.prototype, "disabled", 2);
377
394
  a([
378
395
  r({ type: String, attribute: "input-min-aria-label" })
@@ -381,14 +398,14 @@ a([
381
398
  r({ type: String, attribute: "input-max-aria-label" })
382
399
  ], s.prototype, "inputMaxAriaLabel", 2);
383
400
  a([
384
- E(".track")
401
+ k(".track")
385
402
  ], s.prototype, "track", 2);
386
403
  a([
387
404
  p()
388
- ], s.prototype, "valueMin", 2);
405
+ ], s.prototype, "_valueMin", 2);
389
406
  a([
390
407
  p()
391
- ], s.prototype, "valueMax", 2);
408
+ ], s.prototype, "_valueMax", 2);
392
409
  a([
393
410
  p()
394
411
  ], s.prototype, "activeThumb", 2);
@@ -1,21 +1,21 @@
1
- import { UiKitElement as c } from "../base/UiKitElement.js";
2
- import { customUiKitElement as d } from "../../decorators/customUiKitElement.js";
1
+ import { UiKitElement as d } from "../base/UiKitElement.js";
2
+ import { customUiKitElement as c } from "../../decorators/customUiKitElement.js";
3
3
  import { inputStatesMixin as m } from "../../mixins/inputStatesMixin.js";
4
4
  import { validateMaxLength as v } from "../../utils/validateMaxLength.js";
5
5
  import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
6
- import { html as n, nothing as p } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
6
+ import { html as o, nothing as l } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
7
7
  import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
8
- import { property as l } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
8
+ import { property as p } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
9
9
  import { classMap as f } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
10
- import { commonStyles as b } from "./styles/common.styles.js";
11
- var g = Object.defineProperty, E = Object.getOwnPropertyDescriptor, o = (t, e, r, s) => {
12
- for (var a = s > 1 ? void 0 : s ? E(e, r) : e, u = t.length - 1, h; u >= 0; u--)
10
+ import { commonStyles as y } from "./styles/common.styles.js";
11
+ var x = Object.defineProperty, b = Object.getOwnPropertyDescriptor, n = (t, e, r, s) => {
12
+ for (var a = s > 1 ? void 0 : s ? b(e, r) : e, u = t.length - 1, h; u >= 0; u--)
13
13
  (h = t[u]) && (a = (s ? h(e, r, a) : h(a)) || a);
14
- return s && a && g(e, r, a), a;
14
+ return s && a && x(e, r, a), a;
15
15
  };
16
- let i = class extends m(c) {
16
+ let i = class extends m(d) {
17
17
  constructor() {
18
- super(...arguments), this.keyboardMode = !1, this.size = "medium", this.helperText = "", this.forcedError = "", this.invalidError = "", this.dataAriaLabelRemoveButton = "", this.handleClickIcon = () => {
18
+ super(...arguments), this.keyboardMode = !1, this.size = "medium", this.helperText = "", this.forcedError = "", this.invalidError = "", this.readonlyText = "", this.dataAriaLabelRemoveButton = "", this.handleClickIcon = () => {
19
19
  this.nativeInput.value = "", this.nativeInput.focus(), ["input", "change"].forEach(
20
20
  (t) => this.nativeInput.dispatchEvent(new Event(t, { bubbles: !0, composed: !0 }))
21
21
  );
@@ -27,6 +27,7 @@ let i = class extends m(c) {
27
27
  error: !!this.forcedError,
28
28
  [this.size]: !!this.size,
29
29
  disabled: this.inputStates.disabled,
30
+ readonly: this.inputStates.readonly,
30
31
  filled: this.inputStates.filled,
31
32
  invalid: this.inputStates.invalid,
32
33
  focus: this.inputStates.focus,
@@ -34,13 +35,14 @@ let i = class extends m(c) {
34
35
  };
35
36
  }
36
37
  render() {
37
- return n`
38
+ return o`
38
39
  <div class=${f(this.classes)}>
39
40
  <div class="input-container">
40
41
  <div><slot></slot></div>
41
42
  ${this.iconTemplate}
42
43
  </div>
43
44
  <div class="footer">
45
+ ${this.readonlyTextTemplate}
44
46
  ${this.helperTextTemplate}
45
47
  ${this.forcedErrorTemplate}
46
48
  ${this.invalidErrorTemplate}
@@ -51,7 +53,7 @@ let i = class extends m(c) {
51
53
  }
52
54
  get iconTemplate() {
53
55
  var t, e, r;
54
- return (e = (t = this.nativeInput) == null ? void 0 : t.value) != null && e.length ? this.componentFactory.createIconButton({
56
+ return !((e = (t = this.nativeInput) == null ? void 0 : t.value) != null && e.length) || this.inputStates.readonly ? l : this.componentFactory.createIconButton({
55
57
  class: "icon-button",
56
58
  "icon-name": "cross",
57
59
  size: this.size,
@@ -59,41 +61,47 @@ let i = class extends m(c) {
59
61
  variant: "naked",
60
62
  "@click": this.handleClickIcon,
61
63
  "data-aria-label": this.dataAriaLabelRemoveButton || "remove button"
62
- }) : p;
64
+ });
63
65
  }
64
66
  get lengthTemplate() {
65
67
  var e, r, s;
66
68
  const t = (r = (e = this.nativeInput) == null ? void 0 : e.maxLength) == null ? void 0 : r.toString();
67
- return v(t) ? n`<span class="char-counter">${((s = this.inputStates.currentValue) == null ? void 0 : s.length) || 0}/${t}</span>` : p;
69
+ return v(t) ? o`<span class="char-counter">${((s = this.inputStates.currentValue) == null ? void 0 : s.length) || 0}/${t}</span>` : l;
68
70
  }
69
71
  get helperTextTemplate() {
70
- return this.forcedError || this.inputStates.invalid && this.invalidError ? p : n`<span class="support-text helper-text">${this.helperText}</span>`;
72
+ return this.inputStates.readonly || this.forcedError || this.inputStates.invalid && this.invalidError ? l : o`<span class="support-text helper-text">${this.helperText}</span>`;
71
73
  }
72
74
  get forcedErrorTemplate() {
73
- return this.forcedError ? n`<span class="support-text error-text forced-error">${this.forcedError}</span>` : p;
75
+ return this.inputStates.readonly || !this.forcedError ? l : o`<span class="support-text error-text forced-error">${this.forcedError}</span>`;
76
+ }
77
+ get readonlyTextTemplate() {
78
+ return !this.inputStates.readonly || !this.readonlyText ? l : o`<span class="support-text readonly-text">${this.readonlyText}</span>`;
74
79
  }
75
80
  get invalidErrorTemplate() {
76
- return this.forcedError || !this.inputStates.invalid || !this.invalidError ? p : n`<span class="support-text error-text invalid-error">${this.invalidError}</span>`;
81
+ return this.inputStates.readonly || this.forcedError || !this.inputStates.invalid || !this.invalidError ? l : o`<span class="support-text error-text invalid-error">${this.invalidError}</span>`;
77
82
  }
78
83
  };
79
- i.styles = [b];
80
- o([
81
- l({ type: String })
84
+ i.styles = [y];
85
+ n([
86
+ p({ type: String })
82
87
  ], i.prototype, "size", 2);
83
- o([
84
- l({ type: String, attribute: "helper-text" })
88
+ n([
89
+ p({ type: String, attribute: "helper-text" })
85
90
  ], i.prototype, "helperText", 2);
86
- o([
87
- l({ type: String, attribute: "forced-error" })
91
+ n([
92
+ p({ type: String, attribute: "forced-error" })
88
93
  ], i.prototype, "forcedError", 2);
89
- o([
90
- l({ type: String, attribute: "invalid-error" })
94
+ n([
95
+ p({ type: String, attribute: "invalid-error" })
91
96
  ], i.prototype, "invalidError", 2);
92
- o([
93
- l({ type: String, attribute: "data-aria-label-remove-button" })
97
+ n([
98
+ p({ type: String, attribute: "readonly-text" })
99
+ ], i.prototype, "readonlyText", 2);
100
+ n([
101
+ p({ type: String, attribute: "data-aria-label-remove-button" })
94
102
  ], i.prototype, "dataAriaLabelRemoveButton", 2);
95
- i = o([
96
- d("ds-text-input")
103
+ i = n([
104
+ c("ds-text-input")
97
105
  ], i);
98
106
  export {
99
107
  i as DsTextInput
@@ -1,23 +1,23 @@
1
- import { UiKitElement as m } from "../base/UiKitElement.js";
2
- import { customUiKitElement as u } from "../../decorators/customUiKitElement.js";
1
+ import { UiKitElement as u } from "../base/UiKitElement.js";
2
+ import { customUiKitElement as m } from "../../decorators/customUiKitElement.js";
3
3
  import { ViewportMixin as c } from "../../mixins/ViewportMixin.js";
4
4
  import { inputStatesMixin as f } from "../../mixins/inputStatesMixin.js";
5
- import { objectConverter as v } from "../../utils/objectConverter.js";
6
- import { validateMaxLength as x } from "../../utils/validateMaxLength.js";
5
+ import { objectConverter as y } from "../../utils/objectConverter.js";
6
+ import { validateMaxLength as v } from "../../utils/validateMaxLength.js";
7
7
  import "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/reactive-element.js";
8
- import { html as a, nothing as l } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
8
+ import { html as n, nothing as l } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/lit-html.js";
9
9
  import "../../node_modules/.pnpm/lit-element@4.2.1/node_modules/lit-element/lit-element.js";
10
10
  import { property as p } from "../../node_modules/.pnpm/@lit_reactive-element@2.1.1/node_modules/@lit/reactive-element/decorators/property.js";
11
- import { classMap as g } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
12
- import { commonStyles as E } from "./styles/common.styles.js";
13
- var y = Object.defineProperty, S = Object.getOwnPropertyDescriptor, n = (t, e, o, i) => {
14
- for (var s = i > 1 ? void 0 : i ? S(e, o) : e, h = t.length - 1, d; h >= 0; h--)
15
- (d = t[h]) && (s = (i ? d(e, o, s) : d(s)) || s);
16
- return i && s && y(e, o, s), s;
11
+ import { classMap as x } from "../../node_modules/.pnpm/lit-html@3.3.1/node_modules/lit-html/directives/class-map.js";
12
+ import { commonStyles as g } from "./styles/common.styles.js";
13
+ var S = Object.defineProperty, T = Object.getOwnPropertyDescriptor, o = (t, r, a, i) => {
14
+ for (var s = i > 1 ? void 0 : i ? T(r, a) : r, d = t.length - 1, h; d >= 0; d--)
15
+ (h = t[d]) && (s = (i ? h(r, a, s) : h(s)) || s);
16
+ return i && s && S(r, a, s), s;
17
17
  };
18
- let r = class extends f(c(m)) {
18
+ let e = class extends f(c(u)) {
19
19
  constructor() {
20
- super(...arguments), this.keyboardMode = !1, this.size = "medium", this.helperText = "", this.forcedError = "", this.invalidError = "", this.mode = "light";
20
+ super(...arguments), this.keyboardMode = !1, this.size = "medium", this.helperText = "", this.forcedError = "", this.invalidError = "", this.readonlyText = "", this.mode = "light";
21
21
  }
22
22
  onInputReady(t) {
23
23
  t.classList.add("ds-scroll");
@@ -30,6 +30,7 @@ let r = class extends f(c(m)) {
30
30
  [t]: !!t,
31
31
  [this.mode]: !!this.mode,
32
32
  disabled: this.inputStates.disabled,
33
+ readonly: this.inputStates.readonly,
33
34
  filled: this.inputStates.filled,
34
35
  invalid: this.inputStates.invalid,
35
36
  focus: this.inputStates.focus,
@@ -37,12 +38,13 @@ let r = class extends f(c(m)) {
37
38
  };
38
39
  }
39
40
  render() {
40
- return a`
41
- <div class=${g(this.classes)}>
41
+ return n`
42
+ <div class=${x(this.classes)}>
42
43
  <div class="input-container">
43
44
  <slot></slot>
44
45
  </div>
45
46
  <div class="footer">
47
+ ${this.readonlyTextTemplate}
46
48
  ${this.helperTextTemplate}
47
49
  ${this.forcedErrorTemplate}
48
50
  ${this.invalidErrorTemplate}
@@ -52,39 +54,45 @@ let r = class extends f(c(m)) {
52
54
  `;
53
55
  }
54
56
  get lengthTemplate() {
55
- var e, o, i;
56
- const t = (o = (e = this.nativeInput) == null ? void 0 : e.maxLength) == null ? void 0 : o.toString();
57
- return x(t) ? a`<span class="char-counter">${((i = this.inputStates.currentValue) == null ? void 0 : i.length) || 0}/${t}</span>` : l;
57
+ var r, a, i;
58
+ const t = (a = (r = this.nativeInput) == null ? void 0 : r.maxLength) == null ? void 0 : a.toString();
59
+ return v(t) ? n`<span class="char-counter">${((i = this.inputStates.currentValue) == null ? void 0 : i.length) || 0}/${t}</span>` : l;
58
60
  }
59
61
  get helperTextTemplate() {
60
- return this.forcedError || this.inputStates.invalid && this.invalidError ? l : a`<span class="support-text helper-text">${this.helperText}</span>`;
62
+ return this.inputStates.readonly || this.forcedError || this.inputStates.invalid && this.invalidError ? l : n`<span class="support-text helper-text">${this.helperText}</span>`;
61
63
  }
62
64
  get forcedErrorTemplate() {
63
- return this.forcedError ? a`<span class="support-text error-text forced-error">${this.forcedError}</span>` : l;
65
+ return this.inputStates.readonly || !this.forcedError ? l : n`<span class="support-text error-text forced-error">${this.forcedError}</span>`;
66
+ }
67
+ get readonlyTextTemplate() {
68
+ return !this.inputStates.readonly || !this.readonlyText ? l : n`<span class="support-text readonly-text">${this.readonlyText}</span>`;
64
69
  }
65
70
  get invalidErrorTemplate() {
66
- return this.forcedError || !this.inputStates.invalid || !this.invalidError ? l : a`<span class="support-text error-text invalid-error">${this.invalidError}</span>`;
71
+ return this.inputStates.readonly || this.forcedError || !this.inputStates.invalid || !this.invalidError ? l : n`<span class="support-text error-text invalid-error">${this.invalidError}</span>`;
67
72
  }
68
73
  };
69
- r.styles = [E];
70
- n([
71
- p({ type: String, converter: v })
72
- ], r.prototype, "size", 2);
73
- n([
74
+ e.styles = [g];
75
+ o([
76
+ p({ type: String, converter: y })
77
+ ], e.prototype, "size", 2);
78
+ o([
74
79
  p({ type: String, attribute: "helper-text" })
75
- ], r.prototype, "helperText", 2);
76
- n([
80
+ ], e.prototype, "helperText", 2);
81
+ o([
77
82
  p({ type: String, attribute: "forced-error" })
78
- ], r.prototype, "forcedError", 2);
79
- n([
83
+ ], e.prototype, "forcedError", 2);
84
+ o([
80
85
  p({ type: String, attribute: "invalid-error" })
81
- ], r.prototype, "invalidError", 2);
82
- n([
86
+ ], e.prototype, "invalidError", 2);
87
+ o([
88
+ p({ type: String, attribute: "readonly-text" })
89
+ ], e.prototype, "readonlyText", 2);
90
+ o([
83
91
  p({ type: String })
84
- ], r.prototype, "mode", 2);
85
- r = n([
86
- u("ds-textarea")
87
- ], r);
92
+ ], e.prototype, "mode", 2);
93
+ e = o([
94
+ m("ds-textarea")
95
+ ], e);
88
96
  export {
89
- r as DsTextarea
97
+ e as DsTextarea
90
98
  };
@@ -54,7 +54,7 @@ let m = class extends v {
54
54
  }
55
55
  loadThemeStyles() {
56
56
  return this.loadStyles ? new Promise((t, o) => {
57
- const s = "/2.0.0-canary.62", r = `https://ds-assets.cupra.com${s}/styles/${this.theme}/theme.css`;
57
+ const s = "/2.0.0-canary.64", r = `https://ds-assets.cupra.com${s}/styles/${this.theme}/theme.css`;
58
58
  if (document.head.querySelector(`link[href="${r}"]`)) t();
59
59
  else {
60
60
  const e = `ui-kit-theme-${s}`, a = document.getElementById(e), n = document.createElement("link");
@@ -6,10 +6,11 @@ const o = (u) => class extends u {
6
6
  focusVisible: !1,
7
7
  invalid: !1,
8
8
  filled: !1,
9
- disabled: !1
9
+ disabled: !1,
10
+ readonly: !1
10
11
  }, this.keyboardMode = !1, this._updateStates = () => {
11
- var t, e, s, i, n;
12
- this.inputStates.currentValue = (t = this.nativeInput) == null ? void 0 : t.value, this.inputStates.invalid = !((e = this.nativeInput) != null && e.validity.valid), this.inputStates.focus = document.activeElement === this.nativeInput, this.inputStates.disabled = (s = this.nativeInput) == null ? void 0 : s.disabled, this.inputStates.filled = ((n = (i = this.nativeInput) == null ? void 0 : i.value) == null ? void 0 : n.length) > 0, this.requestUpdate();
12
+ var t, e, s, i, n, a;
13
+ this.inputStates.currentValue = (t = this.nativeInput) == null ? void 0 : t.value, this.inputStates.invalid = !((e = this.nativeInput) != null && e.validity.valid), this.inputStates.focus = document.activeElement === this.nativeInput, this.inputStates.disabled = (s = this.nativeInput) == null ? void 0 : s.disabled, this.inputStates.readonly = ((i = this.nativeInput) == null ? void 0 : i.readOnly) ?? !1, this.inputStates.filled = ((a = (n = this.nativeInput) == null ? void 0 : n.value) == null ? void 0 : a.length) > 0, this.requestUpdate();
13
14
  }, this._handleKeydown = () => {
14
15
  this.keyboardMode = !0;
15
16
  }, this._handleMousedown = () => {