@skf-design-system/ui-components 1.0.0-alpha.38 → 1.0.0-alpha.39
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/README.md +18 -0
- package/dist/components/alert/alert.component.d.ts +3 -2
- package/dist/components/alert/alert.component.js +39 -33
- package/dist/components/breadcrumb/breadcrumb-item.component.js +11 -12
- package/dist/components/button/button.component.js +32 -36
- package/dist/components/button/button.styles.js +3 -3
- package/dist/components/checkbox/checkbox.component.d.ts +6 -5
- package/dist/components/checkbox/checkbox.component.js +67 -69
- package/dist/components/checkbox/checkbox.styles.js +1 -1
- package/dist/components/datepicker/datepicker-calendar.component.d.ts +1 -0
- package/dist/components/datepicker/datepicker-calendar.component.js +107 -116
- package/dist/components/datepicker/datepicker-popup.component.d.ts +4 -0
- package/dist/components/datepicker/datepicker-popup.component.js +112 -100
- package/dist/components/datepicker/datepicker-popup.helpers.js +1 -1
- package/dist/components/datepicker/datepicker.component.d.ts +4 -2
- package/dist/components/datepicker/datepicker.component.js +159 -160
- package/dist/components/dialog/dialog.component.d.ts +3 -2
- package/dist/components/dialog/dialog.component.js +48 -48
- package/dist/components/divider/divider.component.d.ts +3 -0
- package/dist/components/divider/divider.component.js +43 -22
- package/dist/components/divider/divider.styles.js +9 -9
- package/dist/components/drawer/drawer.component.d.ts +12 -4
- package/dist/components/drawer/drawer.component.js +84 -61
- package/dist/components/drawer/drawer.styles.js +47 -40
- package/dist/components/header/header.component.d.ts +4 -2
- package/dist/components/header/header.component.js +64 -57
- package/dist/components/header/header.styles.js +2 -2
- package/dist/components/icon/icon.component.js +26 -16
- package/dist/components/icon/icon.styles.js +4 -4
- package/dist/components/input/input.component.d.ts +11 -10
- package/dist/components/input/input.component.js +115 -111
- package/dist/components/input/input.controllers.d.ts +0 -1
- package/dist/components/input/input.controllers.js +14 -19
- package/dist/components/link/link.component.d.ts +1 -0
- package/dist/components/link/link.component.js +86 -74
- package/dist/components/link/link.styles.js +7 -3
- package/dist/components/loader/loader.component.d.ts +0 -2
- package/dist/components/loader/loader.component.js +27 -30
- package/dist/components/loader/loader.styles.js +1 -1
- package/dist/components/menu/menu-item.styles.js +8 -7
- package/dist/components/menu/menu.component.d.ts +5 -2
- package/dist/components/menu/menu.component.js +7 -7
- package/dist/components/nav/nav.component.d.ts +3 -0
- package/dist/components/nav/nav.component.js +38 -33
- package/dist/components/popover/popover.component.d.ts +6 -7
- package/dist/components/popover/popover.component.js +23 -31
- package/dist/components/progress/progress.styles.js +3 -3
- package/dist/components/radio/radio.component.d.ts +4 -2
- package/dist/components/radio/radio.component.js +96 -91
- package/dist/components/radio/radio.styles.js +1 -1
- package/dist/components/segmented-button/segmented-button-item.component.js +1 -1
- package/dist/components/segmented-button/segmented-button-item.styles.js +1 -1
- package/dist/components/segmented-button/segmented-button.component.js +22 -24
- package/dist/components/select/select-option.component.d.ts +2 -1
- package/dist/components/select/select-option.component.js +31 -36
- package/dist/components/select/select.component.d.ts +20 -10
- package/dist/components/select/select.component.js +139 -104
- package/dist/components/select/select.controllers.js +14 -17
- package/dist/components/select/select.styles.js +8 -3
- package/dist/components/stepper/stepper-item.component.d.ts +1 -1
- package/dist/components/stepper/stepper-item.component.js +26 -23
- package/dist/components/stepper/stepper-item.styles.js +4 -4
- package/dist/components/stepper/stepper.component.js +2 -3
- package/dist/components/stepper/stepper.helpers.js +6 -7
- package/dist/components/switch/switch.component.d.ts +4 -2
- package/dist/components/switch/switch.component.js +64 -58
- package/dist/components/switch/switch.styles.js +1 -1
- package/dist/components/tabs/tab-panel.component.d.ts +1 -1
- package/dist/components/tabs/tab-panel.component.js +19 -16
- package/dist/components/tabs/tab.component.d.ts +1 -1
- package/dist/components/tabs/tab.component.js +17 -14
- package/dist/components/tabs/tab.styles.js +2 -2
- package/dist/components/tabs/tabs.component.js +6 -6
- package/dist/components/tag/tag.component.d.ts +9 -6
- package/dist/components/tag/tag.component.js +78 -72
- package/dist/components/tag/tag.styles.js +5 -0
- package/dist/components/textarea/textarea.component.d.ts +4 -2
- package/dist/components/textarea/textarea.component.js +101 -95
- package/dist/components/toast/toast-item.styles.js +13 -10
- package/dist/components/toast/toast.singleton.js +6 -7
- package/dist/components/tooltip/tooltip.component.d.ts +7 -4
- package/dist/components/tooltip/tooltip.component.js +22 -14
- package/dist/custom-elements.json +835 -422
- package/dist/index.d.ts +2 -2
- package/dist/index.js +20 -20
- package/dist/internal/base-classes/popover/popover.base.d.ts +28 -8
- package/dist/internal/base-classes/popover/popover.base.js +78 -74
- package/dist/internal/components/formBase.d.ts +1 -0
- package/dist/internal/components/formBase.js +11 -19
- package/dist/internal/controllers/popover.controller.d.ts +2 -0
- package/dist/internal/controllers/popover.controller.js +11 -14
- package/dist/internal/helpers/stateMap.js +3 -3
- package/dist/internal/helpers/uuid.d.ts +8 -10
- package/dist/internal/helpers/uuid.js +4 -11
- package/dist/internal/helpers/watch.d.ts +1 -1
- package/dist/internal/templates/asterisk.d.ts +1 -1
- package/dist/internal/templates/asterisk.js +4 -4
- package/dist/internal/types.d.ts +4 -0
- package/dist/styles/global-alt.css +1 -1
- package/dist/styles/global.css +1 -1
- package/dist/translations/en.d.ts +3 -0
- package/dist/translations/en.js +27 -0
- package/dist/translations/es.d.ts +3 -0
- package/dist/translations/es.js +27 -0
- package/dist/translations/index.d.ts +4 -0
- package/dist/translations/pt.d.ts +3 -0
- package/dist/translations/pt.js +27 -0
- package/dist/translations/sv.d.ts +3 -0
- package/dist/translations/sv.js +27 -0
- package/dist/types/jsx/custom-element-jsx.d.ts +1840 -858
- package/dist/types/vue/index.d.ts +69 -64
- package/dist/utilities/localize.d.ts +28 -0
- package/dist/utilities/localize.js +13 -0
- package/dist/vscode.html-custom-data.json +75 -83
- package/dist/web-types.json +229 -190
- package/package.json +29 -35
- package/custom-elements.json +0 -25490
@@ -1,34 +1,40 @@
|
|
1
|
+
var f = (a) => {
|
2
|
+
throw TypeError(a);
|
3
|
+
};
|
4
|
+
var b = (a, n, t) => n.has(a) || f("Cannot " + t);
|
5
|
+
var c = (a, n, t) => (b(a, n, "read from private field"), t ? t.call(a) : n.get(a)), _ = (a, n, t) => n.has(a) ? f("Cannot add the same private member more than once") : n instanceof WeakSet ? n.add(a) : n.set(a, t), g = (a, n, t, r) => (b(a, n, "write to private field"), r ? r.call(a, t) : n.set(a, t), t);
|
1
6
|
import "../icon/icon.js";
|
2
|
-
import { FormBase as
|
7
|
+
import { FormBase as $ } from "../../internal/components/formBase.js";
|
3
8
|
import "../../internal/components/hint/hint.js";
|
4
|
-
import { hintSeverity as
|
5
|
-
import { watch as
|
6
|
-
import { Asterisk as
|
7
|
-
import { componentStyles as
|
8
|
-
import {
|
9
|
-
import {
|
10
|
-
import {
|
11
|
-
import {
|
12
|
-
import {
|
13
|
-
import A from "./input.
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
9
|
+
import { hintSeverity as w } from "../../internal/helpers/hintSeverity.js";
|
10
|
+
import { watch as E } from "../../internal/helpers/watch.js";
|
11
|
+
import { Asterisk as S } from "../../internal/templates/asterisk.js";
|
12
|
+
import { componentStyles as P } from "../../styles/component.styles.js";
|
13
|
+
import { LocalizeController as C } from "../../utilities/localize.js";
|
14
|
+
import { html as p, nothing as m } from "lit";
|
15
|
+
import { state as v, property as s, query as k, queryAssignedNodes as B } from "lit/decorators.js";
|
16
|
+
import { ifDefined as l } from "lit/directives/if-defined.js";
|
17
|
+
import { live as x } from "lit/directives/live.js";
|
18
|
+
import { InputNumberController as A, InputPasswordController as V } from "./input.controllers.js";
|
19
|
+
import I from "./input.styles.js";
|
20
|
+
var L = Object.defineProperty, D = Object.getOwnPropertyDescriptor, e = (a, n, t, r) => {
|
21
|
+
for (var o = r > 1 ? void 0 : r ? D(n, t) : n, h = a.length - 1, u; h >= 0; h--)
|
22
|
+
(u = a[h]) && (o = (r ? u(n, t, o) : u(o)) || o);
|
23
|
+
return r && o && L(n, t, o), o;
|
24
|
+
}, d;
|
25
|
+
const y = class y extends $ {
|
20
26
|
constructor() {
|
21
|
-
super(...arguments)
|
22
|
-
|
23
|
-
|
27
|
+
super(...arguments);
|
28
|
+
_(this, d);
|
29
|
+
g(this, d, new C(this)), this._value = "", this.autofocus = !1, this.debug = !1, this.hideLabel = !1, this.inputmode = "text", this.lang = "en", this.readonly = !1, this.showValid = !1, this.size = "md", this.type = "text", this.validateOn = "change", this.invalid = !1, this._buttonDown = !1, this._numberController = new A(this), this._passwordController = new V(this), this._handleInput = () => {
|
30
|
+
this._value = this.$input?.value ?? "", this.validateOn === "input" && (this._pristine = !1, this.validateInput());
|
24
31
|
}, this._resetValue = (t) => {
|
25
|
-
|
26
|
-
t.stopPropagation(), this.value = ((r = this.getAttribute("value")) == null ? void 0 : r.trim()) ?? "", this._value = this.value, this._internals.setFormValue(this.value), (a = this.$input) == null || a.focus();
|
32
|
+
t.stopPropagation(), this.value = this.getAttribute("value")?.trim() ?? "", this._value = this.value, this._internals.setFormValue(this.value), this.$input?.focus(), this.emitEvent("skf-cleared");
|
27
33
|
}, this._handlePressStart = (t) => {
|
28
34
|
this._buttonDown = !0, this.type === "number" && this._numberController.handleActionBtnLongPressStart(t);
|
29
35
|
}, this._handlePressEnd = () => {
|
30
36
|
this._buttonDown = !1, this.type === "number" && this._numberController.handleActionBtnLongPressEnd();
|
31
|
-
}, this._renderNumberButton = (t) =>
|
37
|
+
}, this._renderNumberButton = (t) => p`
|
32
38
|
<button
|
33
39
|
?disabled=${this.disabled}
|
34
40
|
@click=${(r) => {
|
@@ -43,10 +49,10 @@ const m = class m extends c {
|
|
43
49
|
>
|
44
50
|
<skf-icon name="${t === "inc" ? "chevronUp" : "chevronDown"}" size="sm"></skf-icon>
|
45
51
|
</button>
|
46
|
-
`, this._renderPasswordButton = () =>
|
52
|
+
`, this._renderPasswordButton = () => p`
|
47
53
|
<button
|
48
54
|
@click=${this._passwordController.toggleVisibility}
|
49
|
-
aria-label=${
|
55
|
+
aria-label=${this._passwordController._type === "password" ? c(this, d).term("showPassword") : c(this, d).term("hidePassword")}
|
50
56
|
class="password skf-icon-host"
|
51
57
|
type="button"
|
52
58
|
@mousedown="${this._handlePressStart}"
|
@@ -55,21 +61,20 @@ const m = class m extends c {
|
|
55
61
|
>
|
56
62
|
<skf-icon name=${this._passwordController._icon} size="sm"></skf-icon>
|
57
63
|
</button>
|
58
|
-
`, this._renderSearchButton = () =>
|
64
|
+
`, this._renderSearchButton = () => p`
|
59
65
|
<button
|
60
66
|
@click=${this._resetValue}
|
61
67
|
@mousedown=${this._handlePressStart}
|
62
68
|
@mouseup=${this._handlePressEnd}
|
63
69
|
@mouseleave=${this._handlePressEnd}
|
64
|
-
aria-label=${
|
70
|
+
aria-label=${c(this, d).term("clearEntry")}
|
65
71
|
class="search skf-icon-host"
|
66
72
|
type="button"
|
67
73
|
>
|
68
74
|
<skf-icon name="close" size="sm"></skf-icon>
|
69
75
|
</button>
|
70
76
|
`, this._onBlur = () => {
|
71
|
-
|
72
|
-
this._buttonDown && ((t = this.$input) == null || t.focus());
|
77
|
+
this._buttonDown && this.$input?.focus();
|
73
78
|
};
|
74
79
|
}
|
75
80
|
set customInvalid(t) {
|
@@ -82,17 +87,14 @@ const m = class m extends c {
|
|
82
87
|
this.$input && (this.$input.value = t, this._value = t, this._internals.setFormValue(t), this.validateInput());
|
83
88
|
}
|
84
89
|
get value() {
|
85
|
-
|
86
|
-
return ((t = this.$input) == null ? void 0 : t.value) ?? "";
|
90
|
+
return this.$input?.value ?? "";
|
87
91
|
}
|
88
92
|
firstUpdated() {
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
this.
|
93
|
-
}), this.
|
94
|
-
this._pristine = !1, this.invalid = !0, this.customErrorDisplay && r.preventDefault();
|
95
|
-
}), this.addEventListener("reset", this._resetValue), this.validateInput();
|
93
|
+
this.$input?.addEventListener("change", () => {
|
94
|
+
this.validateOn === "change" && (this.validateOn = "input", this._pristine = !1), this._internals.setFormValue(this.$input?.value ?? ""), this.emitEvent("change"), this.validateInput();
|
95
|
+
}), this.addEventListener("invalid", (t) => {
|
96
|
+
this._pristine = !1, this.invalid = !0, this.customErrorDisplay && t.preventDefault();
|
97
|
+
}), this.value = this.getAttribute("value")?.trim() ?? "", this.autofocus && this.$input?.focus(), this.addEventListener("reset", this._resetValue), this.validateInput();
|
96
98
|
}
|
97
99
|
willUpdate(t) {
|
98
100
|
if (t.has("invalid"))
|
@@ -106,14 +108,23 @@ const m = class m extends c {
|
|
106
108
|
valueChanged() {
|
107
109
|
this._internals.setFormValue(this.value), this.validateInput();
|
108
110
|
}
|
109
|
-
attributeChangedCallback(t, r,
|
110
|
-
if (super.attributeChangedCallback(t, r,
|
111
|
-
if (typeof
|
112
|
-
const
|
113
|
-
this._pristine = !1, this._internals.setValidity({ customError: !0 },
|
111
|
+
attributeChangedCallback(t, r, o) {
|
112
|
+
if (super.attributeChangedCallback(t, r, o), t === "value" && this._internals.setFormValue(o), t === "custom-invalid")
|
113
|
+
if (typeof o == "string") {
|
114
|
+
const u = this.withFallback(o);
|
115
|
+
this._pristine = !1, this._internals.setValidity({ customError: !0 }, u), this.invalid = !0, this.hint = u, this.checkValidity();
|
114
116
|
} else
|
115
117
|
this._internals.setValidity({}), this.validateInput();
|
116
118
|
}
|
119
|
+
focus() {
|
120
|
+
this.$input?.focus();
|
121
|
+
}
|
122
|
+
blur() {
|
123
|
+
this.$input?.blur();
|
124
|
+
}
|
125
|
+
select() {
|
126
|
+
this.$input?.select();
|
127
|
+
}
|
117
128
|
/** @internal */
|
118
129
|
validateInput() {
|
119
130
|
if (this._internals.validity.customError || !this.$input) return;
|
@@ -122,37 +133,36 @@ const m = class m extends c {
|
|
122
133
|
this._internals.setValidity({ customError: this._internals.validity.customError });
|
123
134
|
else {
|
124
135
|
this.invalid = !this._pristine && !r.valid;
|
125
|
-
let
|
126
|
-
for (
|
127
|
-
const
|
128
|
-
if (r[
|
129
|
-
`Add custom message on ${this.localName} using attribute: ${
|
130
|
-
), r[
|
131
|
-
this.validationError =
|
132
|
-
const
|
136
|
+
let o;
|
137
|
+
for (o in r) {
|
138
|
+
const h = `data-${o.toString()}`;
|
139
|
+
if (r[o] && !this.hasAttribute(h) && this.debug && console.log(
|
140
|
+
`Add custom message on ${this.localName} using attribute: ${h.toUpperCase()}="Your custom message"`
|
141
|
+
), r[o]) {
|
142
|
+
this.validationError = o.toString();
|
143
|
+
const u = this.hasAttribute(h) ? this.getAttribute(h) : this.$input.validationMessage;
|
133
144
|
this._internals.setValidity(
|
134
145
|
{ [this.validationError]: !0, customError: this._internals.validity.customError },
|
135
|
-
this.withFallback(
|
146
|
+
this.withFallback(u)
|
136
147
|
), this.invalid && this.customErrorDisplay && this.checkValidity();
|
137
148
|
}
|
138
149
|
}
|
139
150
|
}
|
140
151
|
}
|
141
152
|
render() {
|
142
|
-
|
143
|
-
|
144
|
-
return h`
|
153
|
+
const t = (this._defaultSlot.length === 0 || !this._defaultSlot[0]?.textContent?.trim()) && !this.label;
|
154
|
+
return p`
|
145
155
|
<div id="root">
|
146
156
|
<label>
|
147
157
|
<div class=${this.hideLabel ? "visually-hidden" : ""} ?hidden=${t} id="label">
|
148
158
|
<slot>${this.label}</slot>
|
149
|
-
${this.required ?
|
159
|
+
${this.required ? S(c(this, d).term("required")) : m}
|
150
160
|
</div>
|
151
161
|
<div id="input">
|
152
|
-
${this.type === "search" ?
|
162
|
+
${this.type === "search" ? p`<skf-icon class="skf-icon-host" name="search" size="sm"></skf-icon>` : m}
|
153
163
|
<div
|
154
|
-
data-leading=${
|
155
|
-
data-trailing=${
|
164
|
+
data-leading=${l(this.leading)}
|
165
|
+
data-trailing=${l(this.trailing)}
|
156
166
|
id="affix"
|
157
167
|
>
|
158
168
|
<input
|
@@ -160,41 +170,41 @@ const m = class m extends c {
|
|
160
170
|
?readonly=${this.readonly}
|
161
171
|
?required=${this.required}
|
162
172
|
.autocomplete=${this.autocomplete ?? "off"}
|
163
|
-
.value=${
|
173
|
+
.value=${x(this.value)}
|
164
174
|
@blur=${this._onBlur}
|
165
175
|
@input=${this._handleInput}
|
166
|
-
aria-describedby=${
|
167
|
-
aria-errormessage=${
|
176
|
+
aria-describedby=${l(this.hint?.trim() ? "hint" : m)}
|
177
|
+
aria-errormessage=${l(this.hint?.trim() ? "hint" : m)}
|
168
178
|
aria-invalid=${!!this.invalid}
|
169
179
|
data-testid="field-input"
|
170
|
-
inputmode=${
|
171
|
-
max=${
|
172
|
-
maxlength=${
|
173
|
-
min=${
|
174
|
-
minlength=${
|
175
|
-
name=${
|
176
|
-
pattern=${
|
177
|
-
placeholder=${
|
178
|
-
type=${
|
180
|
+
inputmode=${l(this.inputMode)}
|
181
|
+
max=${l(this.max)}
|
182
|
+
maxlength=${l(this.maxLength)}
|
183
|
+
min=${l(this.min)}
|
184
|
+
minlength=${l(this.minLength)}
|
185
|
+
name=${l(this.name)}
|
186
|
+
pattern=${l(this.pattern)}
|
187
|
+
placeholder=${l(this.placeholder)}
|
188
|
+
type=${l(
|
179
189
|
this.type === "password" ? this._passwordController._type : this.type
|
180
190
|
)}
|
181
191
|
/>
|
182
192
|
</div>
|
183
|
-
${this.type === "number" ?
|
193
|
+
${this.type === "number" ? p`
|
184
194
|
<div id="action">
|
185
195
|
${this._renderNumberButton("inc")} ${this._renderNumberButton("dec")}
|
186
196
|
</div>
|
187
|
-
` :
|
188
|
-
${this.type === "password" ? this._renderPasswordButton() :
|
189
|
-
${this.type === "search" && this._value.length > 0 ? this._renderSearchButton() :
|
197
|
+
` : m}
|
198
|
+
${this.type === "password" ? this._renderPasswordButton() : m}
|
199
|
+
${this.type === "search" && this._value.length > 0 ? this._renderSearchButton() : m}
|
190
200
|
</div>
|
191
201
|
</label>
|
192
|
-
${this.hint &&
|
202
|
+
${this.hint && p`
|
193
203
|
<skf-hint
|
194
204
|
?disabled=${this.disabled}
|
195
205
|
aria-live=${this.invalid ? "assertive" : "polite"}
|
196
206
|
id="hint"
|
197
|
-
severity=${
|
207
|
+
severity=${l(w(this.invalid, this.severity))}
|
198
208
|
>${this.customInvalid ?? this.hint}
|
199
209
|
</skf-hint>
|
200
210
|
`}
|
@@ -202,23 +212,17 @@ const m = class m extends c {
|
|
202
212
|
`;
|
203
213
|
}
|
204
214
|
};
|
205
|
-
|
206
|
-
let i =
|
215
|
+
d = new WeakMap(), y.styles = [P, I];
|
216
|
+
let i = y;
|
207
217
|
e([
|
208
|
-
|
218
|
+
v()
|
209
219
|
], i.prototype, "_value", 2);
|
210
220
|
e([
|
211
221
|
s()
|
212
222
|
], i.prototype, "autocomplete", 2);
|
213
223
|
e([
|
214
|
-
s({
|
215
|
-
], i.prototype, "
|
216
|
-
e([
|
217
|
-
s({ attribute: "button-aria-label-hide" })
|
218
|
-
], i.prototype, "buttonAriaLabelHide", 2);
|
219
|
-
e([
|
220
|
-
s({ attribute: "button-aria-label-show" })
|
221
|
-
], i.prototype, "buttonAriaLabelShow", 2);
|
224
|
+
s({ type: Boolean })
|
225
|
+
], i.prototype, "autofocus", 2);
|
222
226
|
e([
|
223
227
|
s({ attribute: "custom-invalid", reflect: !0 })
|
224
228
|
], i.prototype, "customInvalid", 1);
|
@@ -229,79 +233,79 @@ e([
|
|
229
233
|
s({ type: Boolean, attribute: "hide-label" })
|
230
234
|
], i.prototype, "hideLabel", 2);
|
231
235
|
e([
|
232
|
-
s()
|
236
|
+
s({ type: String })
|
233
237
|
], i.prototype, "hint", 2);
|
234
238
|
e([
|
235
|
-
s()
|
239
|
+
s({ type: String })
|
236
240
|
], i.prototype, "inputmode", 2);
|
237
241
|
e([
|
238
|
-
s()
|
242
|
+
s({ type: String })
|
239
243
|
], i.prototype, "label", 2);
|
240
244
|
e([
|
241
|
-
s()
|
245
|
+
s({ type: String })
|
246
|
+
], i.prototype, "lang", 2);
|
247
|
+
e([
|
248
|
+
s({ type: String })
|
242
249
|
], i.prototype, "leading", 2);
|
243
250
|
e([
|
244
|
-
s()
|
251
|
+
s({ type: String })
|
245
252
|
], i.prototype, "max", 2);
|
246
253
|
e([
|
247
254
|
s({ type: Number, attribute: "maxlength" })
|
248
255
|
], i.prototype, "maxLength", 2);
|
249
256
|
e([
|
250
|
-
s()
|
257
|
+
s({ type: String })
|
251
258
|
], i.prototype, "min", 2);
|
252
259
|
e([
|
253
260
|
s({ type: Number, attribute: "minlength" })
|
254
261
|
], i.prototype, "minLength", 2);
|
255
262
|
e([
|
256
|
-
s({ reflect: !0 })
|
263
|
+
s({ type: String, reflect: !0 })
|
257
264
|
], i.prototype, "name", 2);
|
258
265
|
e([
|
259
|
-
s()
|
266
|
+
s({ type: String })
|
260
267
|
], i.prototype, "pattern", 2);
|
261
268
|
e([
|
262
|
-
s()
|
269
|
+
s({ type: String })
|
263
270
|
], i.prototype, "placeholder", 2);
|
264
271
|
e([
|
265
272
|
s({ type: Boolean })
|
266
273
|
], i.prototype, "readonly", 2);
|
267
274
|
e([
|
268
|
-
s({
|
269
|
-
], i.prototype, "requiredLabel", 2);
|
270
|
-
e([
|
271
|
-
s({ reflect: !0 })
|
275
|
+
s({ type: String, reflect: !0 })
|
272
276
|
], i.prototype, "severity", 2);
|
273
277
|
e([
|
274
278
|
s({ type: Boolean, attribute: "show-valid" })
|
275
279
|
], i.prototype, "showValid", 2);
|
276
280
|
e([
|
277
|
-
s({ reflect: !0 })
|
281
|
+
s({ type: String, reflect: !0 })
|
278
282
|
], i.prototype, "size", 2);
|
279
283
|
e([
|
280
|
-
s()
|
284
|
+
s({ type: String })
|
281
285
|
], i.prototype, "trailing", 2);
|
282
286
|
e([
|
283
|
-
s()
|
287
|
+
s({ type: String })
|
284
288
|
], i.prototype, "type", 2);
|
285
289
|
e([
|
286
|
-
s({ attribute: "validate-on" })
|
290
|
+
s({ type: String, attribute: "validate-on" })
|
287
291
|
], i.prototype, "validateOn", 2);
|
288
292
|
e([
|
289
|
-
s({})
|
293
|
+
s({ type: String })
|
290
294
|
], i.prototype, "value", 1);
|
291
295
|
e([
|
292
|
-
|
296
|
+
v()
|
293
297
|
], i.prototype, "invalid", 2);
|
294
298
|
e([
|
295
|
-
|
299
|
+
v()
|
296
300
|
], i.prototype, "_buttonDown", 2);
|
297
301
|
e([
|
298
|
-
|
302
|
+
k("input")
|
299
303
|
], i.prototype, "$input", 2);
|
300
304
|
e([
|
301
|
-
|
305
|
+
B({ flatten: !0 })
|
302
306
|
], i.prototype, "_defaultSlot", 2);
|
303
307
|
e([
|
304
|
-
|
308
|
+
E("value", { waitUntilFirstUpdate: !0, afterUpdate: !0 })
|
305
309
|
], i.prototype, "valueChanged", 1);
|
306
310
|
export {
|
307
311
|
i as SkfInput
|
@@ -38,7 +38,6 @@ export declare class InputPasswordController implements ReactiveController {
|
|
38
38
|
host?: ReactiveControllerHost & Partial<ControllerHostProps>;
|
39
39
|
_inputElement?: HTMLInputElement;
|
40
40
|
_icon: Extract<Icon, 'visibility' | 'visibilityOff'>;
|
41
|
-
_buttonAriaLabel: string;
|
42
41
|
_type: Extract<SkfInput['type'], 'password' | 'text'>;
|
43
42
|
constructor(host: ReactiveControllerHost);
|
44
43
|
hostUpdated(): void;
|
@@ -1,14 +1,13 @@
|
|
1
|
-
class
|
1
|
+
class n {
|
2
2
|
constructor(t) {
|
3
|
-
this.handleActionBtnClick = (
|
4
|
-
var h, n;
|
3
|
+
this.handleActionBtnClick = (s, i) => {
|
5
4
|
const e = this._inputElement;
|
6
|
-
!e || !this.host || (
|
7
|
-
}, this.handleActionBtnLongPressStart = (
|
8
|
-
const
|
5
|
+
!e || !this.host || (i === "inc" ? e.stepUp() : e.stepDown(), this.host.value = this._inputElement?.value ?? "", this.host._internals?.setFormValue(this.host.value), this.host.validateInput && this.host.validateInput());
|
6
|
+
}, this.handleActionBtnLongPressStart = (s) => {
|
7
|
+
const i = s.target.getAttribute("aria-label") === "Increment" ? "inc" : "dec";
|
9
8
|
this._longPressId = setTimeout(() => {
|
10
9
|
this._repeaterId = setInterval(() => {
|
11
|
-
this.handleActionBtnClick(
|
10
|
+
this.handleActionBtnClick(s, i);
|
12
11
|
}, 50);
|
13
12
|
}, 400);
|
14
13
|
}, this.handleActionBtnLongPressEnd = () => {
|
@@ -16,26 +15,22 @@ class l {
|
|
16
15
|
}, (this.host = t).addController(this);
|
17
16
|
}
|
18
17
|
hostUpdated() {
|
19
|
-
|
20
|
-
this._inputElement = (t = this.host) == null ? void 0 : t.$input;
|
18
|
+
this._inputElement = this.host?.$input;
|
21
19
|
}
|
22
20
|
}
|
23
|
-
class
|
21
|
+
class l {
|
24
22
|
constructor(t) {
|
25
23
|
this._icon = "visibility", this._type = "password", this.handleFieldLoaded = () => {
|
26
|
-
|
27
|
-
!this._inputElement || !((i = this.host) != null && i._handleInput) || (this.host.value = this._inputElement.value, this.host._handleInput());
|
24
|
+
!this._inputElement || !this.host?._handleInput || (this.host.value = this._inputElement.value, this.host._handleInput());
|
28
25
|
}, this.toggleVisibility = () => {
|
29
|
-
|
30
|
-
|
31
|
-
}, (this.host = t).addController(this), this._buttonAriaLabel = this.host.buttonAriaLabelShow ?? "";
|
26
|
+
!this._inputElement || !this.host?._handleInput || (this.host._handleInput(), this._type === "text" ? (this._icon = "visibility", this._type = "password") : (this._icon = "visibilityOff", this._type = "text"), this.host.requestUpdate(), this._inputElement.value = this.host.value ?? "");
|
27
|
+
}, (this.host = t).addController(this);
|
32
28
|
}
|
33
29
|
hostUpdated() {
|
34
|
-
|
35
|
-
this._inputElement = (t = this.host) == null ? void 0 : t.$input;
|
30
|
+
this._inputElement = this.host?.$input;
|
36
31
|
}
|
37
32
|
}
|
38
33
|
export {
|
39
|
-
|
40
|
-
|
34
|
+
n as InputNumberController,
|
35
|
+
l as InputPasswordController
|
41
36
|
};
|
@@ -42,6 +42,7 @@ export declare class SkfLink extends SkfElement {
|
|
42
42
|
target?: '_blank' | '_parent' | '_self' | '_top';
|
43
43
|
connectedCallback(): void;
|
44
44
|
_handleAsChange(): void;
|
45
|
+
_handleDisabledChange(): void;
|
45
46
|
/** @internal */
|
46
47
|
_handleStateChange(property: string, _prev: unknown, next: unknown): void;
|
47
48
|
/** @internal */
|