agnosticui-core 2.0.0-alpha.26 → 2.0.0-alpha.28
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/{VueInput.vue_vue_type_script_setup_true_lang-wYdAqg-i.js → VueInput.vue_vue_type_script_setup_true_lang-BdQaWK_o.js} +19 -14
- package/dist/components/Input/core/_Input.d.ts +5 -0
- package/dist/components/Input/core/_Input.d.ts.map +1 -1
- package/dist/components/Input/core/_Input.js +33 -22
- package/dist/components/Input/vue/VueInput.js +1 -1
- package/dist/components/Input/vue/VueInput.vue.d.ts.map +1 -1
- package/dist/components/Input/vue/index.js +1 -1
- package/dist/components/SelectionButtonGroup/core/_SelectionButtonGroup.d.ts.map +1 -1
- package/dist/components/SelectionButtonGroup/core/_SelectionButtonGroup.js +24 -23
- package/package.json +1 -1
- package/src/components/Input/core/_Input.ts +22 -0
- package/src/components/Input/vue/VueInput.vue +3 -0
- package/src/components/SelectionButtonGroup/core/_SelectionButtonGroup.ts +2 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { defineComponent as b, createElementBlock as n, openBlock as d, mergeProps as
|
|
1
|
+
import { defineComponent as b, createElementBlock as n, openBlock as d, mergeProps as m, createCommentVNode as o, renderSlot as i } from "vue";
|
|
2
2
|
import "./components/Input/core/Input.js";
|
|
3
|
-
const
|
|
3
|
+
const y = ["name", ".value", ".labelHidden", ".noLabel", ".capsule", ".rounded", ".underlined", ".underlinedWithBackground", ".inline", ".required", ".disabled", ".readonly", ".invalid", "type", "placeholder", "label", "labelPosition", "ariaLabel", "helpText", "errorMessage", "size", "rows", "cols", "min", "max"], g = {
|
|
4
4
|
key: 0,
|
|
5
5
|
slot: "addon-left"
|
|
6
|
-
},
|
|
6
|
+
}, B = {
|
|
7
7
|
key: 1,
|
|
8
8
|
slot: "addon-right"
|
|
9
9
|
}, L = /* @__PURE__ */ b({
|
|
@@ -26,6 +26,8 @@ const g = ["name", ".value", ".labelHidden", ".noLabel", ".capsule", ".rounded",
|
|
|
26
26
|
underlined: { type: Boolean, default: !1 },
|
|
27
27
|
underlinedWithBackground: { type: Boolean, default: !1 },
|
|
28
28
|
inline: { type: Boolean, default: !1 },
|
|
29
|
+
min: {},
|
|
30
|
+
max: {},
|
|
29
31
|
required: { type: Boolean, default: !1 },
|
|
30
32
|
disabled: { type: Boolean, default: !1 },
|
|
31
33
|
readonly: { type: Boolean, default: !1 },
|
|
@@ -34,10 +36,10 @@ const g = ["name", ".value", ".labelHidden", ".noLabel", ".capsule", ".rounded",
|
|
|
34
36
|
helpText: { default: "" }
|
|
35
37
|
},
|
|
36
38
|
emits: ["click", "input", "change", "focus", "blur", "update:value"],
|
|
37
|
-
setup(e, { emit:
|
|
38
|
-
const a =
|
|
39
|
+
setup(e, { emit: u }) {
|
|
40
|
+
const a = u, s = (l) => {
|
|
39
41
|
a("click", l);
|
|
40
|
-
},
|
|
42
|
+
}, r = (l) => {
|
|
41
43
|
a("input", l);
|
|
42
44
|
const t = l.target;
|
|
43
45
|
a("update:value", t.value);
|
|
@@ -48,7 +50,7 @@ const g = ["name", ".value", ".labelHidden", ".noLabel", ".capsule", ".rounded",
|
|
|
48
50
|
}, h = (l) => {
|
|
49
51
|
a("blur", l);
|
|
50
52
|
};
|
|
51
|
-
return (l, t) => (d(), n("ag-input",
|
|
53
|
+
return (l, t) => (d(), n("ag-input", m({
|
|
52
54
|
name: e.name,
|
|
53
55
|
".value": e.value,
|
|
54
56
|
".labelHidden": e.labelHidden,
|
|
@@ -65,25 +67,28 @@ const g = ["name", ".value", ".labelHidden", ".noLabel", ".capsule", ".rounded",
|
|
|
65
67
|
type: e.type,
|
|
66
68
|
placeholder: e.placeholder,
|
|
67
69
|
label: e.label,
|
|
70
|
+
labelPosition: e.labelPosition,
|
|
68
71
|
ariaLabel: e.ariaLabel,
|
|
69
72
|
helpText: e.helpText,
|
|
70
73
|
errorMessage: e.errorMessage,
|
|
71
74
|
size: e.size,
|
|
72
75
|
rows: e.rows,
|
|
73
76
|
cols: e.cols,
|
|
74
|
-
|
|
75
|
-
|
|
77
|
+
min: e.min,
|
|
78
|
+
max: e.max,
|
|
79
|
+
onClick: s,
|
|
80
|
+
onInput: r,
|
|
76
81
|
onChange: c,
|
|
77
82
|
onFocus: f,
|
|
78
83
|
onBlur: h
|
|
79
84
|
}, l.$attrs), [
|
|
80
|
-
l.$slots["addon-left"] ? (d(), n("span",
|
|
81
|
-
|
|
85
|
+
l.$slots["addon-left"] ? (d(), n("span", g, [
|
|
86
|
+
i(l.$slots, "addon-left")
|
|
82
87
|
])) : o("", !0),
|
|
83
|
-
l.$slots["addon-right"] ? (d(), n("span",
|
|
84
|
-
|
|
88
|
+
l.$slots["addon-right"] ? (d(), n("span", B, [
|
|
89
|
+
i(l.$slots, "addon-right")
|
|
85
90
|
])) : o("", !0)
|
|
86
|
-
], 48,
|
|
91
|
+
], 48, y));
|
|
87
92
|
}
|
|
88
93
|
});
|
|
89
94
|
export {
|
|
@@ -24,6 +24,8 @@ export interface InputProps {
|
|
|
24
24
|
underlined?: boolean;
|
|
25
25
|
underlinedWithBackground?: boolean;
|
|
26
26
|
inline?: boolean;
|
|
27
|
+
min?: string;
|
|
28
|
+
max?: string;
|
|
27
29
|
required?: boolean;
|
|
28
30
|
disabled?: boolean;
|
|
29
31
|
readonly?: boolean;
|
|
@@ -65,6 +67,8 @@ export declare class AgInput extends AgInput_base implements InputProps {
|
|
|
65
67
|
underlined: boolean;
|
|
66
68
|
underlinedWithBackground: boolean;
|
|
67
69
|
inline: boolean;
|
|
70
|
+
min: string;
|
|
71
|
+
max: string;
|
|
68
72
|
required: boolean;
|
|
69
73
|
disabled: boolean;
|
|
70
74
|
readonly: boolean;
|
|
@@ -156,6 +160,7 @@ export declare class AgInput extends AgInput_base implements InputProps {
|
|
|
156
160
|
/**
|
|
157
161
|
* Render the input or textarea element
|
|
158
162
|
*/
|
|
163
|
+
private _supportsMinMax;
|
|
159
164
|
private _renderInputElement;
|
|
160
165
|
updated(changedProperties: Map<string, unknown>): void;
|
|
161
166
|
firstUpdated(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_Input.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/core/_Input.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAKrD,OAAO,EAIL,KAAK,aAAa,EACnB,MAAM,oCAAoC,CAAC;AAG5C,MAAM,MAAM,SAAS,GACjB,MAAM,GACN,UAAU,GACV,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,KAAK,GACL,KAAK,GACL,MAAM,GACN,gBAAgB,GAChB,OAAO,GACP,MAAM,GACN,MAAM,GACN,UAAU,CAAC;AAEf,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,OAAO,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,wBAAwB,CAAC,EAAE,OAAO,CAAC;IACnC,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ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,mBAAmB,GAAG,SAAS,CAEvE;IAED;;OAEG;IACH,QAAQ,IAAI,MAAM;IAIlB;;OAEG;IACH,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI;IAO7B;;OAEG;IACH,MAAM,IAAI,IAAI;IASd;;;OAGG;IACM,iBAAiB,IAAI,IAAI;IAOlC;;;OAGG;IACM,wBAAwB,CAC/B,KAAK,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,IAAI,EACtC,KAAK,EAAE,SAAS,GAAG,cAAc,GAChC,IAAI;IAOP;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,WAAW;IAOnB;;;;;OAKG;IACH,OAAO,CAAC,aAAa;IAMrB;;OAEG;IACH,OAAO,CAAC,iBAAiB;IAazB;;OAEG;IACH,OAAO,CAAC,YAAY;IAapB;;OAEG;IACH,OAAO,CAAC,aAAa;IAkBrB;;OAEG;IACH,OAAO,CAAC,YAAY;IAepB;;OAEG;IACH,OAAO,CAAC,WAAW;IAenB;;OAEG;IACH,OAAO,CAAC,YAAY;IAMpB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAS3B;;OAEG;IACH,OAAO,CAAC,eAAe;IAIvB,OAAO,CAAC,mBAAmB;IA8DlB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAY/C,YAAY;IAwBrB;;OAEG;IACH,OAAO,CAAC,YAAY;IAgCpB;;OAEG;IACH,OAAO,CAAC,aAAa;IAcrB;;;;;;OAMG;IACH,OAAO,CAAC,YAAY;IAepB,MAAM;CAkFP"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { LitElement as c, css as v, html as s, nothing as
|
|
1
|
+
import { LitElement as c, css as v, html as s, nothing as l } from "lit";
|
|
2
2
|
import { n as i } from "../../../property-CemaeiRl.js";
|
|
3
|
-
import { r as
|
|
3
|
+
import { r as f } from "../../../state-CovhUvdr.js";
|
|
4
4
|
import { e as y } from "../../../query-BykXNUlT.js";
|
|
5
|
-
import { o
|
|
5
|
+
import { o } from "../../../if-defined-C8i28hSj.js";
|
|
6
6
|
import { hasSlotContent as u } from "../../../utils/slot.js";
|
|
7
7
|
import { formControlStyles as m } from "../../../shared/form-control-styles.js";
|
|
8
|
-
import { createFormControlIds as $, buildAriaDescribedBy as x, isHorizontalLabel as
|
|
8
|
+
import { createFormControlIds as $, buildAriaDescribedBy as x, isHorizontalLabel as b } from "../../../shared/form-control-utils.js";
|
|
9
9
|
import { FaceMixin as w, syncInnerInputValidity as k } from "../../../shared/face-mixin.js";
|
|
10
10
|
var S = Object.defineProperty, a = (g, t, n, r) => {
|
|
11
11
|
for (var d = void 0, p = g.length - 1, _; p >= 0; p--)
|
|
@@ -14,7 +14,7 @@ var S = Object.defineProperty, a = (g, t, n, r) => {
|
|
|
14
14
|
};
|
|
15
15
|
const h = class h extends w(c) {
|
|
16
16
|
constructor() {
|
|
17
|
-
super(), this._ids = $("ag-input"), this._hasLeftAddon = !1, this._hasRightAddon = !1, this.label = "", this.labelHidden = !1, this.labelPosition = "top", this.noLabel = !1, this.ariaLabel = "", this.type = "text", this.value = "", this.placeholder = "", this.rows = 4, this.cols = 50, this.size = "default", this.capsule = !1, this.rounded = !1, this.underlined = !1, this.underlinedWithBackground = !1, this.inline = !1, this.required = !1, this.disabled = !1, this.readonly = !1, this.invalid = !1, this.errorMessage = "", this.helpText = "";
|
|
17
|
+
super(), this._ids = $("ag-input"), this._hasLeftAddon = !1, this._hasRightAddon = !1, this.label = "", this.labelHidden = !1, this.labelPosition = "top", this.noLabel = !1, this.ariaLabel = "", this.type = "text", this.value = "", this.placeholder = "", this.rows = 4, this.cols = 50, this.size = "default", this.capsule = !1, this.rounded = !1, this.underlined = !1, this.underlinedWithBackground = !1, this.inline = !1, this.min = "", this.max = "", this.required = !1, this.disabled = !1, this.readonly = !1, this.invalid = !1, this.errorMessage = "", this.helpText = "";
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* Expose the internal input element for external access
|
|
@@ -102,7 +102,7 @@ const h = class h extends w(c) {
|
|
|
102
102
|
*/
|
|
103
103
|
_handleChange(t) {
|
|
104
104
|
const n = t.target;
|
|
105
|
-
this.value = n.value, this._internals.setFormValue(this.value), this._syncValidity(), this.onChange && this.onChange(t);
|
|
105
|
+
this.value = n.value, this._internals.setFormValue(this.value), this._syncValidity(), this.onChange && this.onChange(t), this.dispatchEvent(new Event("change", { bubbles: !0, composed: !0 }));
|
|
106
106
|
}
|
|
107
107
|
/**
|
|
108
108
|
* Handle focus events
|
|
@@ -148,6 +148,9 @@ const h = class h extends w(c) {
|
|
|
148
148
|
/**
|
|
149
149
|
* Render the input or textarea element
|
|
150
150
|
*/
|
|
151
|
+
_supportsMinMax() {
|
|
152
|
+
return ["date", "datetime-local", "month", "time", "week", "number", "range"].includes(this.type);
|
|
153
|
+
}
|
|
151
154
|
_renderInputElement() {
|
|
152
155
|
const t = this.type === "textarea", n = this._getAriaDescribedBy(), r = [];
|
|
153
156
|
return n && r.push(n), t ? s`
|
|
@@ -156,7 +159,7 @@ const h = class h extends w(c) {
|
|
|
156
159
|
part="ag-textarea"
|
|
157
160
|
class="ag-input__textarea"
|
|
158
161
|
.value="${this.value}"
|
|
159
|
-
placeholder="${
|
|
162
|
+
placeholder="${o(this.placeholder || void 0)}"
|
|
160
163
|
rows="${this.rows}"
|
|
161
164
|
cols="${this.cols}"
|
|
162
165
|
?required="${this.required}"
|
|
@@ -164,8 +167,8 @@ const h = class h extends w(c) {
|
|
|
164
167
|
?readonly="${this.readonly}"
|
|
165
168
|
aria-required="${this.required ? "true" : "false"}"
|
|
166
169
|
aria-invalid="${this.invalid ? "true" : "false"}"
|
|
167
|
-
aria-label="${
|
|
168
|
-
aria-describedby="${r.length > 0 ? r.join(" ") :
|
|
170
|
+
aria-label="${o(this.ariaLabel || void 0)}"
|
|
171
|
+
aria-describedby="${r.length > 0 ? r.join(" ") : o(void 0)}"
|
|
169
172
|
@click=${this._handleClick}
|
|
170
173
|
@input=${this._handleInput}
|
|
171
174
|
@change=${this._handleChange}
|
|
@@ -179,14 +182,16 @@ const h = class h extends w(c) {
|
|
|
179
182
|
part="ag-input"
|
|
180
183
|
class="ag-input__input"
|
|
181
184
|
.value="${this.value}"
|
|
182
|
-
placeholder="${
|
|
185
|
+
placeholder="${o(this.placeholder || void 0)}"
|
|
186
|
+
min="${o(this._supportsMinMax() && this.min ? this.min : void 0)}"
|
|
187
|
+
max="${o(this._supportsMinMax() && this.max ? this.max : void 0)}"
|
|
183
188
|
?required="${this.required}"
|
|
184
189
|
?disabled="${this.disabled}"
|
|
185
190
|
?readonly="${this.readonly}"
|
|
186
191
|
aria-required="${this.required ? "true" : "false"}"
|
|
187
192
|
aria-invalid="${this.invalid ? "true" : "false"}"
|
|
188
|
-
aria-label="${
|
|
189
|
-
aria-describedby="${r.length > 0 ? r.join(" ") :
|
|
193
|
+
aria-label="${o(this.ariaLabel || void 0)}"
|
|
194
|
+
aria-describedby="${r.length > 0 ? r.join(" ") : o(void 0)}"
|
|
190
195
|
@click=${this._handleClick}
|
|
191
196
|
@input=${this._handleInput}
|
|
192
197
|
@change=${this._handleChange}
|
|
@@ -208,9 +213,9 @@ const h = class h extends w(c) {
|
|
|
208
213
|
* Render custom label for Input (using shared utility but customized for Input)
|
|
209
214
|
*/
|
|
210
215
|
_renderLabel() {
|
|
211
|
-
if (!this.label || this.noLabel) return
|
|
216
|
+
if (!this.label || this.noLabel) return l;
|
|
212
217
|
const t = [];
|
|
213
|
-
return
|
|
218
|
+
return b(this.labelPosition) ? (t.push("ag-form-control__label--horizontal"), t.push(`ag-form-control__label--${this.labelPosition}`), t.push("ag-input__label--horizontal"), t.push(`ag-input__label--${this.labelPosition}`)) : this.labelPosition === "bottom" && (t.push(`ag-form-control__label--${this.labelPosition}`), t.push(`ag-input__label--${this.labelPosition}`)), s`
|
|
214
219
|
<label
|
|
215
220
|
id="${this._ids.labelId}"
|
|
216
221
|
for="${this._ids.inputId}"
|
|
@@ -220,7 +225,7 @@ const h = class h extends w(c) {
|
|
|
220
225
|
${this.label}
|
|
221
226
|
${this.required ? s`
|
|
222
227
|
<span class="ag-form-control__required ag-input__required" part="ag-input-required" aria-hidden="true">*</span>
|
|
223
|
-
` :
|
|
228
|
+
` : l}
|
|
224
229
|
</label>
|
|
225
230
|
`;
|
|
226
231
|
}
|
|
@@ -236,7 +241,7 @@ const h = class h extends w(c) {
|
|
|
236
241
|
>
|
|
237
242
|
${this.helpText}
|
|
238
243
|
</div>
|
|
239
|
-
` :
|
|
244
|
+
` : l;
|
|
240
245
|
}
|
|
241
246
|
/**
|
|
242
247
|
* Render custom error message for Input.
|
|
@@ -260,7 +265,7 @@ const h = class h extends w(c) {
|
|
|
260
265
|
`;
|
|
261
266
|
}
|
|
262
267
|
render() {
|
|
263
|
-
const t = this._hasLeftAddon || this._hasRightAddon, n =
|
|
268
|
+
const t = this._hasLeftAddon || this._hasRightAddon, n = b(this.labelPosition), r = ["ag-input"];
|
|
264
269
|
this.size === "small" && r.push("ag-input--small"), this.size === "large" && r.push("ag-input--large"), this.rounded && r.push("ag-input--rounded"), this.underlined && r.push("ag-input--underlined"), this.underlinedWithBackground && r.push("ag-input--underlined-with-background");
|
|
265
270
|
const d = t ? s`
|
|
266
271
|
<div class="ag-input__field" part="ag-input-field-wrapper">
|
|
@@ -293,20 +298,20 @@ const h = class h extends w(c) {
|
|
|
293
298
|
${this._renderLabel()}
|
|
294
299
|
${d}
|
|
295
300
|
</div>
|
|
296
|
-
${this.helpText ? this._renderHelper() :
|
|
301
|
+
${this.helpText ? this._renderHelper() : l}
|
|
297
302
|
${this._renderError()}
|
|
298
303
|
</div>
|
|
299
304
|
` : this.labelPosition === "bottom" ? s`
|
|
300
305
|
<div class="${r.join(" ")}" part="ag-input-wrapper">
|
|
301
306
|
${d}
|
|
302
|
-
${this.helpText ? this._renderHelper() :
|
|
307
|
+
${this.helpText ? this._renderHelper() : l}
|
|
303
308
|
${this._renderError()}
|
|
304
309
|
${this._renderLabel()}
|
|
305
310
|
</div>
|
|
306
311
|
` : s`
|
|
307
312
|
<div class="${r.join(" ")}" part="ag-input-wrapper">
|
|
308
313
|
${this._renderLabel()}
|
|
309
|
-
${this.helpText ? this._renderHelper() :
|
|
314
|
+
${this.helpText ? this._renderHelper() : l}
|
|
310
315
|
${this._renderError()}
|
|
311
316
|
${d}
|
|
312
317
|
</div>
|
|
@@ -610,6 +615,12 @@ a([
|
|
|
610
615
|
a([
|
|
611
616
|
i({ type: Boolean, reflect: !0 })
|
|
612
617
|
], e.prototype, "inline");
|
|
618
|
+
a([
|
|
619
|
+
i({ type: String })
|
|
620
|
+
], e.prototype, "min");
|
|
621
|
+
a([
|
|
622
|
+
i({ type: String })
|
|
623
|
+
], e.prototype, "max");
|
|
613
624
|
a([
|
|
614
625
|
i({ type: Boolean, reflect: !0 })
|
|
615
626
|
], e.prototype, "required");
|
|
@@ -644,10 +655,10 @@ a([
|
|
|
644
655
|
i({ attribute: !1 })
|
|
645
656
|
], e.prototype, "onBlur");
|
|
646
657
|
a([
|
|
647
|
-
|
|
658
|
+
f()
|
|
648
659
|
], e.prototype, "_hasLeftAddon");
|
|
649
660
|
a([
|
|
650
|
-
|
|
661
|
+
f()
|
|
651
662
|
], e.prototype, "_hasRightAddon");
|
|
652
663
|
export {
|
|
653
664
|
e as AgInput
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"VueInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/vue/VueInput.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"VueInput.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/Input/vue/VueInput.vue"],"names":[],"mappings":"AA8CA;AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,eAAe,CAAC;AAEvB;;;;;GAKG;AACH,MAAM,WAAW,aACf,SAAQ,IAAI,CACV,UAAU,EACV,SAAS,GAAG,SAAS,GAAG,UAAU,GAAG,SAAS,GA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EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"_SelectionButtonGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/SelectionButtonGroup/core/_SelectionButtonGroup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAErD,OAAO,EAAa,KAAK,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,KAAK,EAAqB,oBAAoB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAEzJ,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,UAAU,CAAC;AACvD,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,CAAC;AAC7D,MAAM,MAAM,wBAAwB,GAAG,mBAAmB,CAAC;AAC3D,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,CAAC;AAE7D,MAAM,WAAW,gCAAgC;IAC/C,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB,oCAAoC;IACpC,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,MAAM,MAAM,0BAA0B,GAAG,WAAW,CAAC,gCAAgC,CAAC,CAAC;AAEvF,MAAM,WAAW,yBAAyB;IACxC,gEAAgE;IAChE,IAAI,EAAE,mBAAmB,CAAC;IAC1B,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gCAAgC;IAChC,KAAK,CAAC,EAAE,yBAAyB,CAAC;IAClC,+BAA+B;IAC/B,IAAI,CAAC,EAAE,wBAAwB,CAAC;IACh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AAG,cAAc,GAChC,IAAI;IAcP;;;;;;;;;;OAUG;IACH,OAAO,CAAC,WAAW;IAQV,iBAAiB;IAMjB,oBAAoB;IAMpB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAsC/C,YAAY;IAOrB,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,iBAAiB;
|
|
1
|
+
{"version":3,"file":"_SelectionButtonGroup.d.ts","sourceRoot":"","sources":["../../../../src/components/SelectionButtonGroup/core/_SelectionButtonGroup.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAErD,OAAO,EAAa,KAAK,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,KAAK,EAAqB,oBAAoB,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAC;AAEzJ,MAAM,MAAM,mBAAmB,GAAG,OAAO,GAAG,UAAU,CAAC;AACvD,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,CAAC;AAC7D,MAAM,MAAM,wBAAwB,GAAG,mBAAmB,CAAC;AAC3D,MAAM,MAAM,yBAAyB,GAAG,oBAAoB,CAAC;AAE7D,MAAM,WAAW,gCAAgC;IAC/C,wDAAwD;IACxD,KAAK,EAAE,MAAM,CAAC;IACd,yCAAyC;IACzC,OAAO,EAAE,OAAO,CAAC;IACjB,oCAAoC;IACpC,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B;AAED,MAAM,MAAM,0BAA0B,GAAG,WAAW,CAAC,gCAAgC,CAAC,CAAC;AAEvF,MAAM,WAAW,yBAAyB;IACxC,gEAAgE;IAChE,IAAI,EAAE,mBAAmB,CAAC;IAC1B,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,mDAAmD;IACnD,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,2DAA2D;IAC3D,YAAY,CAAC,EAAE,OAAO,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AQlC;;;;OAIG;IACM,wBAAwB,CAC/B,KAAK,EAAE,IAAI,GAAG,MAAM,GAAG,QAAQ,GAAG,IAAI,EACtC,KAAK,EAAE,SAAS,GAAG,cAAc,GAChC,IAAI;IAcP;;;;;;;;;;OAUG;IACH,OAAO,CAAC,WAAW;IAQV,iBAAiB;IAMjB,oBAAoB;IAMpB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,OAAO,CAAC;IAsC/C,YAAY;IAOrB,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,mBAAmB,CAgDzB;IAEF,OAAO,CAAC,cAAc,CAgDpB;IAEF,OAAO,CAAC,iBAAiB;IAIhB,MAAM;CAsBhB"}
|
|
@@ -3,58 +3,58 @@ import { n as r } from "../../../property-CemaeiRl.js";
|
|
|
3
3
|
import { r as y } from "../../../state-CovhUvdr.js";
|
|
4
4
|
import { FaceMixin as f } from "../../../shared/face-mixin.js";
|
|
5
5
|
var m = Object.defineProperty, o = (d, e, t, s) => {
|
|
6
|
-
for (var
|
|
7
|
-
(
|
|
8
|
-
return
|
|
6
|
+
for (var i = void 0, a = d.length - 1, n; a >= 0; a--)
|
|
7
|
+
(n = d[a]) && (i = n(e, t, i) || i);
|
|
8
|
+
return i && m(e, t, i), i;
|
|
9
9
|
};
|
|
10
10
|
const h = class h extends f(p) {
|
|
11
11
|
constructor() {
|
|
12
12
|
super(), this._handleButtonChange = (e) => {
|
|
13
13
|
e.stopPropagation();
|
|
14
14
|
const { value: t, checked: s } = e.detail;
|
|
15
|
-
let
|
|
15
|
+
let i;
|
|
16
16
|
if (this.type === "radio")
|
|
17
|
-
|
|
17
|
+
i = s ? [t] : [];
|
|
18
18
|
else {
|
|
19
|
-
const
|
|
19
|
+
const n = [...this._getSelectedValues()];
|
|
20
20
|
if (s)
|
|
21
|
-
|
|
21
|
+
n.includes(t) || n.push(t);
|
|
22
22
|
else {
|
|
23
|
-
const u =
|
|
24
|
-
u > -1 &&
|
|
23
|
+
const u = n.indexOf(t);
|
|
24
|
+
u > -1 && n.splice(u, 1);
|
|
25
25
|
}
|
|
26
|
-
|
|
26
|
+
i = n;
|
|
27
27
|
}
|
|
28
|
-
this._internalSelectedValues =
|
|
28
|
+
this._internalSelectedValues = i, this._syncFormValue(), this._syncValidity();
|
|
29
29
|
const a = new CustomEvent("selection-change", {
|
|
30
30
|
detail: {
|
|
31
31
|
value: t,
|
|
32
32
|
checked: s,
|
|
33
|
-
selectedValues:
|
|
33
|
+
selectedValues: i
|
|
34
34
|
},
|
|
35
35
|
bubbles: !0,
|
|
36
36
|
composed: !0
|
|
37
37
|
});
|
|
38
38
|
this.dispatchEvent(a), this.onSelectionChange && this.onSelectionChange(a);
|
|
39
39
|
}, this._handleKeyDown = (e) => {
|
|
40
|
-
const t = this._getButtons().filter((
|
|
40
|
+
const t = this._getButtons().filter((n) => !n.disabled);
|
|
41
41
|
if (t.length === 0) return;
|
|
42
|
-
const s = t.find((
|
|
42
|
+
const s = t.find((n) => {
|
|
43
43
|
try {
|
|
44
|
-
return
|
|
44
|
+
return n.shadowRoot?.activeElement || n === document.activeElement;
|
|
45
45
|
} catch {
|
|
46
|
-
return
|
|
46
|
+
return n === document.activeElement;
|
|
47
47
|
}
|
|
48
|
-
}),
|
|
48
|
+
}), i = s ? t.indexOf(s) : -1;
|
|
49
49
|
let a = null;
|
|
50
50
|
switch (e.key) {
|
|
51
51
|
case "ArrowDown":
|
|
52
52
|
case "ArrowRight":
|
|
53
|
-
e.preventDefault(), a =
|
|
53
|
+
e.preventDefault(), a = i === -1 ? 0 : (i + 1) % t.length;
|
|
54
54
|
break;
|
|
55
55
|
case "ArrowUp":
|
|
56
56
|
case "ArrowLeft":
|
|
57
|
-
e.preventDefault(), a =
|
|
57
|
+
e.preventDefault(), a = i === -1 ? t.length - 1 : (i - 1 + t.length) % t.length;
|
|
58
58
|
break;
|
|
59
59
|
case "Home":
|
|
60
60
|
e.preventDefault(), a = 0;
|
|
@@ -64,9 +64,9 @@ const h = class h extends f(p) {
|
|
|
64
64
|
break;
|
|
65
65
|
}
|
|
66
66
|
if (a !== null) {
|
|
67
|
-
const
|
|
68
|
-
|
|
69
|
-
detail: { value:
|
|
67
|
+
const n = t[a];
|
|
68
|
+
n.focus(), this.type === "radio" && this._handleButtonChange(new CustomEvent("selection-button-change", {
|
|
69
|
+
detail: { value: n.value, checked: !0 }
|
|
70
70
|
}));
|
|
71
71
|
}
|
|
72
72
|
}, this.type = "radio", this.legend = "", this.legendHidden = !1, this.theme = "", this.size = "md", this.shape = "", this.value = "", this.values = [], this.disabled = !1, this.required = !1, this._internalSelectedValues = [], this.validationMessages = void 0;
|
|
@@ -148,7 +148,8 @@ const h = class h extends f(p) {
|
|
|
148
148
|
_syncChildButtons() {
|
|
149
149
|
const e = this._getButtons(), t = this._getSelectedValues();
|
|
150
150
|
e.forEach((s) => {
|
|
151
|
-
|
|
151
|
+
const i = t.includes(s.value);
|
|
152
|
+
s._type = this.type, s._name = this.name, s._theme = this.theme, s._size = this.size, s._shape = this.shape, s.checked = i, this.disabled && (s.disabled = !0);
|
|
152
153
|
});
|
|
153
154
|
}
|
|
154
155
|
_handleSlotChange() {
|
package/package.json
CHANGED
|
@@ -56,6 +56,8 @@ export interface InputProps {
|
|
|
56
56
|
underlined?: boolean;
|
|
57
57
|
underlinedWithBackground?: boolean;
|
|
58
58
|
inline?: boolean;
|
|
59
|
+
min?: string;
|
|
60
|
+
max?: string;
|
|
59
61
|
required?: boolean;
|
|
60
62
|
disabled?: boolean;
|
|
61
63
|
readonly?: boolean;
|
|
@@ -377,6 +379,13 @@ export class AgInput extends FaceMixin(LitElement) implements InputProps {
|
|
|
377
379
|
@property({ type: Boolean, reflect: true })
|
|
378
380
|
declare inline: boolean;
|
|
379
381
|
|
|
382
|
+
// Range constraints (for date, number, time inputs)
|
|
383
|
+
@property({ type: String })
|
|
384
|
+
declare min: string;
|
|
385
|
+
|
|
386
|
+
@property({ type: String })
|
|
387
|
+
declare max: string;
|
|
388
|
+
|
|
380
389
|
// Validation and state
|
|
381
390
|
@property({ type: Boolean, reflect: true })
|
|
382
391
|
declare required: boolean;
|
|
@@ -435,6 +444,8 @@ export class AgInput extends FaceMixin(LitElement) implements InputProps {
|
|
|
435
444
|
this.underlined = false;
|
|
436
445
|
this.underlinedWithBackground = false;
|
|
437
446
|
this.inline = false;
|
|
447
|
+
this.min = '';
|
|
448
|
+
this.max = '';
|
|
438
449
|
this.required = false;
|
|
439
450
|
this.disabled = false;
|
|
440
451
|
this.readonly = false;
|
|
@@ -581,6 +592,11 @@ export class AgInput extends FaceMixin(LitElement) implements InputProps {
|
|
|
581
592
|
if (this.onChange) {
|
|
582
593
|
this.onChange(e);
|
|
583
594
|
}
|
|
595
|
+
|
|
596
|
+
// Native `change` is composed:false so it stops at the shadow root.
|
|
597
|
+
// Re-dispatch a composed change from the host so Vue @change listeners
|
|
598
|
+
// and other external DOM listeners receive it.
|
|
599
|
+
this.dispatchEvent(new Event('change', { bubbles: true, composed: true }));
|
|
584
600
|
}
|
|
585
601
|
|
|
586
602
|
/**
|
|
@@ -643,6 +659,10 @@ export class AgInput extends FaceMixin(LitElement) implements InputProps {
|
|
|
643
659
|
/**
|
|
644
660
|
* Render the input or textarea element
|
|
645
661
|
*/
|
|
662
|
+
private _supportsMinMax(): boolean {
|
|
663
|
+
return ['date', 'datetime-local', 'month', 'time', 'week', 'number', 'range'].includes(this.type);
|
|
664
|
+
}
|
|
665
|
+
|
|
646
666
|
private _renderInputElement() {
|
|
647
667
|
const isTextarea = this.type === 'textarea';
|
|
648
668
|
|
|
@@ -687,6 +707,8 @@ export class AgInput extends FaceMixin(LitElement) implements InputProps {
|
|
|
687
707
|
class="ag-input__input"
|
|
688
708
|
.value="${this.value}"
|
|
689
709
|
placeholder="${ifDefined(this.placeholder || undefined)}"
|
|
710
|
+
min="${ifDefined(this._supportsMinMax() && this.min ? this.min : undefined)}"
|
|
711
|
+
max="${ifDefined(this._supportsMinMax() && this.max ? this.max : undefined)}"
|
|
690
712
|
?required="${this.required}"
|
|
691
713
|
?disabled="${this.disabled}"
|
|
692
714
|
?readonly="${this.readonly}"
|
|
@@ -16,12 +16,15 @@
|
|
|
16
16
|
:type="type"
|
|
17
17
|
:placeholder="placeholder"
|
|
18
18
|
:label="label"
|
|
19
|
+
:labelPosition="labelPosition"
|
|
19
20
|
:ariaLabel="ariaLabel"
|
|
20
21
|
:helpText="helpText"
|
|
21
22
|
:errorMessage="errorMessage"
|
|
22
23
|
:size="size"
|
|
23
24
|
:rows="rows"
|
|
24
25
|
:cols="cols"
|
|
26
|
+
:min="min"
|
|
27
|
+
:max="max"
|
|
25
28
|
@click="handleClick"
|
|
26
29
|
@input="handleInput"
|
|
27
30
|
@change="handleChange"
|
|
@@ -330,12 +330,13 @@ export class AgSelectionButtonGroup extends FaceMixin(LitElement) implements Sel
|
|
|
330
330
|
const selectedValues = this._getSelectedValues();
|
|
331
331
|
|
|
332
332
|
buttons.forEach((button) => {
|
|
333
|
+
const newChecked = selectedValues.includes(button.value);
|
|
333
334
|
button._type = this.type;
|
|
334
335
|
button._name = this.name;
|
|
335
336
|
button._theme = this.theme;
|
|
336
337
|
button._size = this.size;
|
|
337
338
|
button._shape = this.shape;
|
|
338
|
-
button.checked =
|
|
339
|
+
button.checked = newChecked;
|
|
339
340
|
if (this.disabled) {
|
|
340
341
|
button.disabled = true;
|
|
341
342
|
}
|