@mhmo91/schmancy 0.2.121 → 0.2.123
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/{chips-DqXt-vj6.js → chips-B9zkOZDr.js} +27 -26
- package/dist/{chips-DqXt-vj6.js.map → chips-B9zkOZDr.js.map} +1 -1
- package/dist/{chips-C6a7NyzB.cjs → chips-bHg3ZS7s.cjs} +11 -11
- package/dist/{chips-C6a7NyzB.cjs.map → chips-bHg3ZS7s.cjs.map} +1 -1
- package/dist/chips.cjs +1 -1
- package/dist/chips.js +1 -1
- package/dist/content-drawer.cjs +1 -1
- package/dist/content-drawer.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/{input-BDXWcxNw.cjs → input-C6lDXLTK.cjs} +3 -3
- package/dist/{input-BDXWcxNw.cjs.map → input-C6lDXLTK.cjs.map} +1 -1
- package/dist/{input-fP8EqcLF.js → input-DHTDgJjW.js} +64 -64
- package/dist/{input-fP8EqcLF.js.map → input-DHTDgJjW.js.map} +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/nav-drawer.cjs +1 -1
- package/dist/nav-drawer.js +1 -1
- package/dist/teleport.cjs +1 -1
- package/dist/{teleport.component-qYuoWGaE.cjs → teleport.component-BpLjxdTV.cjs} +2 -2
- package/dist/{teleport.component-qYuoWGaE.cjs.map → teleport.component-BpLjxdTV.cjs.map} +1 -1
- package/dist/{teleport.component-BhLw5gCA.js → teleport.component-DC1NO73M.js} +3 -3
- package/dist/{teleport.component-BhLw5gCA.js.map → teleport.component-DC1NO73M.js.map} +1 -1
- package/dist/teleport.js +1 -1
- package/package.json +1 -1
- package/types/src/chips/chips.d.ts +1 -0
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import { nothing as E, html as f, LitElement as k } from "lit";
|
|
2
2
|
import { property as i, query as R, state as v, customElement as V } from "lit/decorators.js";
|
|
3
|
-
import { ifDefined as
|
|
3
|
+
import { ifDefined as h } from "lit/directives/if-defined.js";
|
|
4
4
|
import { createRef as S, ref as C } from "lit/directives/ref.js";
|
|
5
5
|
import { when as $ } from "lit/directives/when.js";
|
|
6
|
-
import { fromEvent as
|
|
6
|
+
import { fromEvent as d, map as x, takeUntil as m, distinctUntilChanged as w, filter as g } from "rxjs";
|
|
7
7
|
import "lit/directives/class-map.js";
|
|
8
8
|
import "lit/directives/style-map.js";
|
|
9
|
-
import { T as
|
|
9
|
+
import { T as z } from "./tailwind.mixin-Bn3Brhz1.js";
|
|
10
10
|
import { c as b } from "./ripple-BumgqsDT.js";
|
|
11
|
-
import { S as
|
|
12
|
-
const
|
|
13
|
-
var
|
|
14
|
-
for (var
|
|
15
|
-
return
|
|
11
|
+
import { S as c } from "./theme.interface-C5Kj6WjD.js";
|
|
12
|
+
const I = ":host{border:unset!important;line-height:unset!important;background:unset!important;padding:unset!important;font-size:unset!important;box-shadow:unset!important;width:-webkit-fill-available}:host:focus{box-shadow:unset!important}input:focus-visible{outline:none!important}input{font-family:inherit;font-size:inherit;font-weight:inherit;line-height:inherit;color:inherit;letter-spacing:inherit;text-transform:inherit;text-decoration:inherit;text-indent:inherit;text-shadow:inherit;text-overflow:inherit;text-rendering:inherit;text-size-adjust:inherit;text-align-last:inherit}input[type=number]::-webkit-inner-spin-button,input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}input[type=number]{-moz-appearance:textfield}@keyframes onAutoFillStart{}input:-webkit-autofill{animation-name:onAutoFillStart}input:-webkit-autofill,input:-webkit-autofill:hover,input:-webkit-autofill:focus,input:-webkit-autofill:active{-webkit-box-shadow:0 0 0 30px var(--schmancy-sys-color-surface-highest) inset!important;-webkit-text-fill-color:var(--schmancy-sys-color-surface-on)!important;transition:background-color 5000s ease-in-out 0s}@-moz-document url-prefix(){input:-moz-autofill,input:-moz-autofill:focus{background-color:var(--schmancy-sys-color-surface-highest)!important;color:var(--schmancy-sys-color-surface-on)!important}}input:autofill,input:autofill:hover,input:autofill:focus,input:autofill:active{background-color:var(--schmancy-sys-color-surface-highest)!important;color:var(--schmancy-sys-color-surface-on)!important}";
|
|
13
|
+
var O = Object.defineProperty, A = Object.getOwnPropertyDescriptor, a = (t, e, r, u) => {
|
|
14
|
+
for (var p, l = u > 1 ? void 0 : u ? A(e, r) : e, y = t.length - 1; y >= 0; y--) (p = t[y]) && (l = (u ? p(e, r, l) : p(l)) || l);
|
|
15
|
+
return u && l && O(e, r, l), l;
|
|
16
16
|
};
|
|
17
|
-
let s = class extends I
|
|
17
|
+
let s = class extends z(I) {
|
|
18
18
|
constructor() {
|
|
19
19
|
if (super(), this.id = "", this.label = "", this.type = "text", this.name = `name_${Date.now()}`, this.placeholder = "", this.value = "", this.required = !1, this.disabled = !1, this.readonly = !1, this.clickable = !1, this.spellcheck = !1, this.align = "left", this.autofocus = !1, this.autocomplete = "on", this.tabIndex = 0, this.error = !1, this.size = "md", this.validateOn = "touched", this.validationMessage = "", this.inputRef = S(), this.isAutofilled = !1, this.touched = !1, this.dirty = !1, this.submitted = !1, this.defaultValue = "", "attachInternals" in this) try {
|
|
20
20
|
this.internals = this.attachInternals();
|
|
@@ -87,10 +87,10 @@ let s = class extends I(O) {
|
|
|
87
87
|
this.error ? this.validationMessage ? (t = this.internals) == null || t.setValidity({ customError: !0 }, this.validationMessage, this.inputElement) : (e = this.internals) == null || e.setValidity({ customError: !0 }, "Invalid input", this.inputElement) : (r = this.internals) == null || r.setValidity({});
|
|
88
88
|
}
|
|
89
89
|
validateInput(t = !1) {
|
|
90
|
-
var
|
|
90
|
+
var p, l;
|
|
91
91
|
if (this.disabled) return;
|
|
92
|
-
const e = this.shouldShowValidation(t), r = ((
|
|
93
|
-
e &&
|
|
92
|
+
const e = this.shouldShowValidation(t), r = ((p = this.inputElement) == null ? void 0 : p.validity) ?? { customError: !1, valid: !0 }, u = !r.valid && !r.customError;
|
|
93
|
+
e && u ? (this.error = !0, this.validationMessage = ((l = this.inputElement) == null ? void 0 : l.validationMessage) || "") : r.valid ? (this.error = !1, r.customError || (this.validationMessage = "")) : e || (this.error = !1), this.updateValidityState();
|
|
94
94
|
}
|
|
95
95
|
checkValidity() {
|
|
96
96
|
var e;
|
|
@@ -112,37 +112,37 @@ let s = class extends I(O) {
|
|
|
112
112
|
}, 0), this.setupInputEvents(), this.setupFocusBlurEvents(), this.setupAutofillDetection(), this.setupEnterKeyEvents();
|
|
113
113
|
}
|
|
114
114
|
setupInputEvents() {
|
|
115
|
-
|
|
115
|
+
d(this.inputElement, "input").pipe(x((t) => {
|
|
116
116
|
const e = t;
|
|
117
117
|
return { value: t.target.value, inputType: e.inputType, data: e.data, isComposing: e.isComposing, originalEvent: t };
|
|
118
|
-
}),
|
|
118
|
+
}), m(this.disconnecting)).subscribe((t) => {
|
|
119
119
|
this.value = t.value, this.dirty = this.value !== this.defaultValue;
|
|
120
120
|
const e = new CustomEvent("input", { detail: { value: t.value }, bubbles: !0, composed: !0 });
|
|
121
121
|
Object.defineProperties(e, { inputType: { value: t.inputType }, data: { value: t.data }, isComposing: { value: t.isComposing } }), this.dispatchEvent(e), this.dispatchEvent(new CustomEvent("change", { detail: { value: t.value }, bubbles: !0, composed: !0 })), this.validateInput();
|
|
122
|
-
}),
|
|
122
|
+
}), d(this.inputElement, "change").pipe(x((t) => t.target.value), w(), m(this.disconnecting)).subscribe((t) => {
|
|
123
123
|
this.value = t, this.dirty = this.value !== this.defaultValue, this.dispatchEvent(new CustomEvent("change", { detail: { value: t }, bubbles: !0, composed: !0 })), this.validateInput();
|
|
124
124
|
});
|
|
125
125
|
}
|
|
126
126
|
setupFocusBlurEvents() {
|
|
127
|
-
|
|
127
|
+
d(this.inputElement, "focus").pipe(m(this.disconnecting)).subscribe((t) => {
|
|
128
128
|
const e = new CustomEvent("focus", { bubbles: t.bubbles, cancelable: t.cancelable, composed: t.composed });
|
|
129
129
|
Object.defineProperties(e, { relatedTarget: { value: t.relatedTarget } }), this.dispatchEvent(e);
|
|
130
|
-
}),
|
|
130
|
+
}), d(this.inputElement, "blur").pipe(m(this.disconnecting)).subscribe((t) => {
|
|
131
131
|
this.touched = !0, this.disabled || this.validateInput();
|
|
132
132
|
const e = new CustomEvent("blur", { bubbles: t.bubbles, cancelable: t.cancelable, composed: t.composed });
|
|
133
133
|
Object.defineProperties(e, { relatedTarget: { value: t.relatedTarget } }), this.dispatchEvent(e);
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
136
|
setupAutofillDetection() {
|
|
137
|
-
|
|
137
|
+
d(this.inputElement, "animationstart").pipe(g((t) => t.animationName === "onAutoFillStart"), m(this.disconnecting)).subscribe((t) => {
|
|
138
138
|
const { value: e } = t.target;
|
|
139
139
|
this.value = e, this.isAutofilled = !0, this.dirty = this.value !== this.defaultValue, this.dispatchEvent(new CustomEvent("autofill", { detail: { value: e }, bubbles: !0, composed: !0 })), this.dispatchEvent(new CustomEvent("change", { detail: { value: e }, bubbles: !0, composed: !0 }));
|
|
140
|
-
}),
|
|
140
|
+
}), d(this.inputElement, "animationstart").pipe(g((t) => t.animationName === "onAutoFillCancel"), m(this.disconnecting)).subscribe(() => {
|
|
141
141
|
this.isAutofilled = !1;
|
|
142
142
|
});
|
|
143
143
|
}
|
|
144
144
|
setupEnterKeyEvents() {
|
|
145
|
-
|
|
145
|
+
d(this.inputElement, "keyup").pipe(g((t) => t.key === "Enter"), m(this.disconnecting)).subscribe((t) => {
|
|
146
146
|
const { value: e } = t.target;
|
|
147
147
|
this.value = e, this.dirty = this.value !== this.defaultValue;
|
|
148
148
|
const r = new CustomEvent("enter", { detail: { value: e }, bubbles: !0, composed: !0 });
|
|
@@ -158,8 +158,8 @@ let s = class extends I(O) {
|
|
|
158
158
|
return (t = this.inputRef.value) == null ? void 0 : t.validity;
|
|
159
159
|
}
|
|
160
160
|
setSelectionRange(t, e, r) {
|
|
161
|
-
var
|
|
162
|
-
(
|
|
161
|
+
var u;
|
|
162
|
+
(u = this.inputRef.value) == null || u.setSelectionRange(t, e, r);
|
|
163
163
|
}
|
|
164
164
|
get selectionStart() {
|
|
165
165
|
var t;
|
|
@@ -173,9 +173,9 @@ let s = class extends I(O) {
|
|
|
173
173
|
var t;
|
|
174
174
|
return ((t = this.inputRef.value) == null ? void 0 : t.selectionDirection) ?? null;
|
|
175
175
|
}
|
|
176
|
-
setRangeText(t, e, r,
|
|
177
|
-
var
|
|
178
|
-
e !== void 0 && r !== void 0 ? (
|
|
176
|
+
setRangeText(t, e, r, u) {
|
|
177
|
+
var p, l;
|
|
178
|
+
e !== void 0 && r !== void 0 ? (p = this.inputRef.value) == null || p.setRangeText(t, e, r, u) : (l = this.inputRef.value) == null || l.setRangeText(t);
|
|
179
179
|
}
|
|
180
180
|
focus(t) {
|
|
181
181
|
var e;
|
|
@@ -199,14 +199,14 @@ let s = class extends I(O) {
|
|
|
199
199
|
default:
|
|
200
200
|
return { height: "50px", padding: "0 16px", fontSize: "1rem" };
|
|
201
201
|
}
|
|
202
|
-
})(),
|
|
202
|
+
})(), u = { "w-full flex-1 rounded-[8px] border-0 bg-surface-highest text-surface-on": !0, "outline-secondary-default focus:outline-1 ": !0, "outline-secondary-default focus:outline-1": !0, "disabled:opacity-40 disabled:cursor-not-allowed": !0, "placeholder:text-muted": !0, "ring-0 ring-inset focus:ring-1 focus:ring-inset": !0, "ring-secondary-default ring-outline focus:ring-secondary-default": !this.error, "ring-error-default focus:ring-error-default": this.error, "caret-transparent focus:outline-hidden cursor-pointer text-select-none": this.readonly, "cursor-pointer": this.clickable, "text-center": this.align === "center", "text-right": this.align === "right", autofilled: this.isAutofilled }, p = { "opacity-40": this.disabled, "block mb-[4px]": !0, "text-sm": this.size === "sm", "text-base": this.size === "md", "text-lg": this.size === "lg" }, l = { height: t, padding: e, fontSize: r };
|
|
203
203
|
return f`
|
|
204
204
|
${$(this.label, () => f`
|
|
205
205
|
<label
|
|
206
206
|
for=${this.id}
|
|
207
207
|
id="label-${this.id}"
|
|
208
|
-
class=${this.classMap(
|
|
209
|
-
${b({ color: this.error ?
|
|
208
|
+
class=${this.classMap(p)}
|
|
209
|
+
${b({ color: this.error ? c.sys.color.error.default : c.sys.color.primary.default })}
|
|
210
210
|
>
|
|
211
211
|
<schmancy-typography type="label" token=${this.size === "sm" ? "sm" : this.size === "lg" ? "lg" : "md"}>
|
|
212
212
|
${this.label}
|
|
@@ -215,25 +215,25 @@ let s = class extends I(O) {
|
|
|
215
215
|
`)}
|
|
216
216
|
|
|
217
217
|
<input
|
|
218
|
-
${b({ bgColor:
|
|
218
|
+
${b({ bgColor: c.sys.color.surface.highest, color: c.sys.color.surface.on })}
|
|
219
219
|
${C(this.inputRef)}
|
|
220
220
|
id=${this.id}
|
|
221
221
|
name=${this.name}
|
|
222
|
-
class=${this.classMap(
|
|
222
|
+
class=${this.classMap(u)}
|
|
223
223
|
style=${this.styleMap(l)}
|
|
224
224
|
.value=${this.value}
|
|
225
225
|
.type=${this.type}
|
|
226
226
|
.autocomplete=${this.autocomplete}
|
|
227
227
|
.spellcheck=${this.spellcheck}
|
|
228
228
|
placeholder=${this.placeholder}
|
|
229
|
-
inputmode=${
|
|
230
|
-
pattern=${
|
|
231
|
-
step=${
|
|
232
|
-
minlength=${
|
|
233
|
-
maxlength=${
|
|
234
|
-
min=${
|
|
235
|
-
max=${
|
|
236
|
-
list=${
|
|
229
|
+
inputmode=${h(this.inputmode)}
|
|
230
|
+
pattern=${h(this.pattern)}
|
|
231
|
+
step=${h(this.step)}
|
|
232
|
+
minlength=${h(this.minlength)}
|
|
233
|
+
maxlength=${h(this.maxlength)}
|
|
234
|
+
min=${h(this.min)}
|
|
235
|
+
max=${h(this.max)}
|
|
236
|
+
list=${h(this.list)}
|
|
237
237
|
?required=${this.required}
|
|
238
238
|
?disabled=${this.disabled}
|
|
239
239
|
?readonly=${this.readonly}
|
|
@@ -241,7 +241,7 @@ let s = class extends I(O) {
|
|
|
241
241
|
aria-required=${this.required ? "true" : "false"}
|
|
242
242
|
aria-labelledby=${this.label ? `label-${this.id}` : E}
|
|
243
243
|
aria-describedby=${this.hint ? `hint-${this.id}` : E}
|
|
244
|
-
aria-label=${
|
|
244
|
+
aria-label=${h(this.label ? void 0 : this.placeholder || "Input")}
|
|
245
245
|
aria-autocomplete=${this.list ? "list" : "none"}
|
|
246
246
|
/>
|
|
247
247
|
|
|
@@ -249,7 +249,7 @@ let s = class extends I(O) {
|
|
|
249
249
|
<div
|
|
250
250
|
id="hint-${this.id}"
|
|
251
251
|
class="${this.size === "sm" ? "pt-[1px] text-xs" : this.size === "lg" ? "pt-[3px] text-base" : "pt-[2px] text-sm"}"
|
|
252
|
-
${b({ color: this.error ?
|
|
252
|
+
${b({ color: this.error ? c.sys.color.error.default : c.sys.color.primary.default })}
|
|
253
253
|
>
|
|
254
254
|
<schmancy-typography
|
|
255
255
|
align="left"
|
|
@@ -264,11 +264,11 @@ let s = class extends I(O) {
|
|
|
264
264
|
}
|
|
265
265
|
};
|
|
266
266
|
s._idCounter = 0, s.formAssociated = !0, s.shadowRootOptions = { ...k.shadowRootOptions, delegatesFocus: !0 }, a([i({ reflect: !0 })], s.prototype, "id", 2), a([i({ type: String })], s.prototype, "label", 2), a([i({ reflect: !0 })], s.prototype, "type", 2), a([i()], s.prototype, "name", 2), a([i()], s.prototype, "placeholder", 2), a([i({ type: String, reflect: !0 })], s.prototype, "value", 2), a([i({ type: String, reflect: !0 })], s.prototype, "pattern", 2), a([i({ type: Boolean, reflect: !0 })], s.prototype, "required", 2), a([i({ type: Boolean, reflect: !0 })], s.prototype, "disabled", 2), a([i({ type: Boolean, reflect: !0 })], s.prototype, "readonly", 2), a([i({ type: Boolean, reflect: !0 })], s.prototype, "clickable", 2), a([i({ type: Boolean, reflect: !0 })], s.prototype, "spellcheck", 2), a([i({ type: String, reflect: !0 })], s.prototype, "align", 2), a([i()], s.prototype, "inputmode", 2), a([i({ type: Number, reflect: !0 })], s.prototype, "minlength", 2), a([i({ type: Number })], s.prototype, "maxlength", 2), a([i()], s.prototype, "min", 2), a([i()], s.prototype, "max", 2), a([i({ type: Number, reflect: !0 })], s.prototype, "step", 2), a([i({ type: Boolean })], s.prototype, "autofocus", 2), a([i({ type: String, reflect: !0 })], s.prototype, "autocomplete", 2), a([i({ type: Number, reflect: !0 })], s.prototype, "tabIndex", 2), a([i()], s.prototype, "hint", 2), a([i({ type: Boolean, reflect: !0 })], s.prototype, "error", 2), a([i({ type: String, reflect: !0 })], s.prototype, "size", 2), a([i({ type: String })], s.prototype, "validateOn", 2), a([i({ type: String })], s.prototype, "list", 2), a([i({ type: String })], s.prototype, "validationMessage", 2), a([R("input")], s.prototype, "inputElement", 2), a([v()], s.prototype, "isAutofilled", 2), a([v()], s.prototype, "touched", 2), a([v()], s.prototype, "dirty", 2), a([v()], s.prototype, "submitted", 2), a([v()], s.prototype, "defaultValue", 2), s = a([V("sch-input")], s);
|
|
267
|
-
var B = Object.defineProperty, M = Object.getOwnPropertyDescriptor,
|
|
268
|
-
for (var
|
|
269
|
-
return
|
|
267
|
+
var B = Object.defineProperty, M = Object.getOwnPropertyDescriptor, n = (t, e, r, u) => {
|
|
268
|
+
for (var p, l = u > 1 ? void 0 : u ? M(e, r) : e, y = t.length - 1; y >= 0; y--) (p = t[y]) && (l = (u ? p(e, r, l) : p(l)) || l);
|
|
269
|
+
return u && l && B(e, r, l), l;
|
|
270
270
|
};
|
|
271
|
-
let
|
|
271
|
+
let o = class extends z(I) {
|
|
272
272
|
constructor() {
|
|
273
273
|
if (super(), this.id = "", this.label = "", this.type = "text", this.name = `name_${Date.now()}`, this.placeholder = "", this.value = "", this.required = !1, this.disabled = !1, this.readonly = !1, this.clickable = !1, this.spellcheck = !1, this.align = "left", this.autofocus = !1, this.autocomplete = "on", this.tabIndex = 0, this.error = !1, this.inputRef = S(), "attachInternals" in this) try {
|
|
274
274
|
this.internals = this.attachInternals();
|
|
@@ -277,15 +277,15 @@ let n = class extends I(O) {
|
|
|
277
277
|
}
|
|
278
278
|
}
|
|
279
279
|
willUpdate(t) {
|
|
280
|
-
this.id || (this.id = "schmancy-input-" +
|
|
280
|
+
this.id || (this.id = "schmancy-input-" + o._idCounter++), super.willUpdate(t);
|
|
281
281
|
}
|
|
282
282
|
get form() {
|
|
283
283
|
var t;
|
|
284
284
|
return ((t = this.internals) == null ? void 0 : t.form) ?? null;
|
|
285
285
|
}
|
|
286
286
|
updated(t) {
|
|
287
|
-
var e, r,
|
|
288
|
-
super.updated(t), t.has("value") && ((e = this.internals) == null || e.setFormValue(this.value)), t.has("error") && (this.error ? (r = this.internals) == null || r.setValidity({ customError: !0 }, "Invalid input", this.inputElement) : (
|
|
287
|
+
var e, r, u;
|
|
288
|
+
super.updated(t), t.has("value") && ((e = this.internals) == null || e.setFormValue(this.value)), t.has("error") && (this.error ? (r = this.internals) == null || r.setValidity({ customError: !0 }, "Invalid input", this.inputElement) : (u = this.internals) == null || u.setValidity({}));
|
|
289
289
|
}
|
|
290
290
|
checkValidity() {
|
|
291
291
|
var t;
|
|
@@ -300,14 +300,14 @@ let n = class extends I(O) {
|
|
|
300
300
|
(e = this.inputRef.value) == null || e.setCustomValidity(t);
|
|
301
301
|
}
|
|
302
302
|
firstUpdated() {
|
|
303
|
-
this.autofocus && this.focus(),
|
|
303
|
+
this.autofocus && this.focus(), d(this.inputElement, "input").pipe(x((t) => t.target.value), w(), m(this.disconnecting)).subscribe((t) => {
|
|
304
304
|
this.value = t, this.dispatchEvent(new CustomEvent("input", { detail: { value: t }, bubbles: !0, composed: !0 })), this.dispatchEvent(new CustomEvent("change", { detail: { value: t }, bubbles: !0, composed: !0 }));
|
|
305
|
-
}),
|
|
305
|
+
}), d(this.inputElement, "change").pipe(x((t) => t.target.value), w(), m(this.disconnecting)).subscribe((t) => {
|
|
306
306
|
this.value = t, this.dispatchEvent(new CustomEvent("change", { detail: { value: t }, bubbles: !0, composed: !0 }));
|
|
307
|
-
}),
|
|
307
|
+
}), d(this.inputElement, "keyup").pipe(g((t) => t.key === "Enter"), m(this.disconnecting)).subscribe((t) => {
|
|
308
308
|
const { value: e } = t.target;
|
|
309
309
|
this.value = e, this.dispatchEvent(new CustomEvent("enter", { detail: { value: e }, bubbles: !0, composed: !0 }));
|
|
310
|
-
}),
|
|
310
|
+
}), d(this.inputElement, "animationstart").pipe(g((t) => t.animationName === "onAutoFillStart"), m(this.disconnecting)).subscribe((t) => {
|
|
311
311
|
const { value: e } = t.target;
|
|
312
312
|
this.value = e, this.dispatchEvent(new CustomEvent("change", { detail: { value: e }, bubbles: !0, composed: !0 }));
|
|
313
313
|
});
|
|
@@ -340,14 +340,14 @@ let n = class extends I(O) {
|
|
|
340
340
|
for=${this.id}
|
|
341
341
|
id="label-${this.id}"
|
|
342
342
|
class=${this.classMap(e)}
|
|
343
|
-
${b({ color: this.error ?
|
|
343
|
+
${b({ color: this.error ? c.sys.color.error.default : c.sys.color.primary.default })}
|
|
344
344
|
>
|
|
345
345
|
<schmancy-typography type="label" token="lg">${this.label}</schmancy-typography>
|
|
346
346
|
</label>
|
|
347
347
|
`)}
|
|
348
348
|
|
|
349
349
|
<input
|
|
350
|
-
${b({ bgColor:
|
|
350
|
+
${b({ bgColor: c.sys.color.surface.highest, color: c.sys.color.surface.on })}
|
|
351
351
|
${C(this.inputRef)}
|
|
352
352
|
id=${this.id}
|
|
353
353
|
name=${this.name}
|
|
@@ -357,13 +357,13 @@ let n = class extends I(O) {
|
|
|
357
357
|
.autocomplete=${this.autocomplete}
|
|
358
358
|
.spellcheck=${this.spellcheck}
|
|
359
359
|
placeholder=${this.placeholder}
|
|
360
|
-
inputmode=${
|
|
361
|
-
pattern=${
|
|
362
|
-
step=${
|
|
363
|
-
minlength=${
|
|
364
|
-
maxlength=${
|
|
365
|
-
min=${
|
|
366
|
-
max=${
|
|
360
|
+
inputmode=${h(this.inputmode)}
|
|
361
|
+
pattern=${h(this.pattern)}
|
|
362
|
+
step=${h(this.step)}
|
|
363
|
+
minlength=${h(this.minlength)}
|
|
364
|
+
maxlength=${h(this.maxlength)}
|
|
365
|
+
min=${h(this.min)}
|
|
366
|
+
max=${h(this.max)}
|
|
367
367
|
?required=${this.required}
|
|
368
368
|
?disabled=${this.disabled}
|
|
369
369
|
?readonly=${this.readonly}
|
|
@@ -371,14 +371,14 @@ let n = class extends I(O) {
|
|
|
371
371
|
aria-required=${this.required ? "true" : "false"}
|
|
372
372
|
aria-labelledby=${this.label ? `label-${this.id}` : E}
|
|
373
373
|
aria-describedby=${this.hint ? `hint-${this.id}` : E}
|
|
374
|
-
aria-label=${
|
|
374
|
+
aria-label=${h(this.label ? void 0 : this.placeholder || "Input")}
|
|
375
375
|
/>
|
|
376
376
|
|
|
377
377
|
${$(this.hint, () => f`
|
|
378
378
|
<div
|
|
379
379
|
id="hint-${this.id}"
|
|
380
380
|
class="pt-[2px]"
|
|
381
|
-
${b({ color: this.error ?
|
|
381
|
+
${b({ color: this.error ? c.sys.color.error.default : c.sys.color.primary.default })}
|
|
382
382
|
>
|
|
383
383
|
<schmancy-typography align="left" type="label"> ${this.hint} </schmancy-typography>
|
|
384
384
|
</div>
|
|
@@ -386,5 +386,5 @@ let n = class extends I(O) {
|
|
|
386
386
|
`;
|
|
387
387
|
}
|
|
388
388
|
};
|
|
389
|
-
|
|
390
|
-
//# sourceMappingURL=input-
|
|
389
|
+
o._idCounter = 0, o.formAssociated = !0, o.shadowRootOptions = { ...k.shadowRootOptions, delegatesFocus: !0 }, n([i({ reflect: !0 })], o.prototype, "id", 2), n([i({ type: String })], o.prototype, "label", 2), n([i({ reflect: !0 })], o.prototype, "type", 2), n([i()], o.prototype, "name", 2), n([i()], o.prototype, "placeholder", 2), n([i({ type: String, reflect: !0 })], o.prototype, "value", 2), n([i({ type: String, reflect: !0 })], o.prototype, "pattern", 2), n([i({ type: Boolean, reflect: !0 })], o.prototype, "required", 2), n([i({ type: Boolean, reflect: !0 })], o.prototype, "disabled", 2), n([i({ type: Boolean, reflect: !0 })], o.prototype, "readonly", 2), n([i({ type: Boolean, reflect: !0 })], o.prototype, "clickable", 2), n([i({ type: Boolean, reflect: !0 })], o.prototype, "spellcheck", 2), n([i({ type: String, reflect: !0 })], o.prototype, "align", 2), n([i()], o.prototype, "inputmode", 2), n([i({ type: Number })], o.prototype, "minlength", 2), n([i({ type: Number })], o.prototype, "maxlength", 2), n([i()], o.prototype, "min", 2), n([i()], o.prototype, "max", 2), n([i({ type: Number, reflect: !0 })], o.prototype, "step", 2), n([i({ type: Boolean })], o.prototype, "autofocus", 2), n([i({ type: String, reflect: !0 })], o.prototype, "autocomplete", 2), n([i({ type: Number, reflect: !0 })], o.prototype, "tabIndex", 2), n([i()], o.prototype, "hint", 2), n([i({ type: Boolean, reflect: !0 })], o.prototype, "error", 2), n([R("input")], o.prototype, "inputElement", 2), o = n([V("schmancy-input")], o);
|
|
390
|
+
//# sourceMappingURL=input-DHTDgJjW.js.map
|