@ionic/core 8.5.7-dev.11746044124.147aab6c → 8.5.7-nightly.20250501
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/components/checkbox.js +3 -10
- package/components/ion-input.js +3 -14
- package/components/ion-select.js +2 -13
- package/components/ion-textarea.js +2 -13
- package/components/ion-toggle.js +3 -10
- package/dist/cjs/ion-checkbox.cjs.entry.js +3 -10
- package/dist/cjs/ion-input.cjs.entry.js +3 -14
- package/dist/cjs/ion-select_3.cjs.entry.js +2 -13
- package/dist/cjs/ion-textarea.cjs.entry.js +2 -13
- package/dist/cjs/ion-toggle.cjs.entry.js +3 -10
- package/dist/collection/components/checkbox/checkbox.js +3 -10
- package/dist/collection/components/input/input.js +3 -14
- package/dist/collection/components/select/select.js +2 -13
- package/dist/collection/components/textarea/textarea.js +2 -13
- package/dist/collection/components/toggle/toggle.js +3 -10
- package/dist/docs.json +1 -1
- package/dist/esm/ion-checkbox.entry.js +3 -10
- package/dist/esm/ion-input.entry.js +3 -14
- package/dist/esm/ion-select_3.entry.js +2 -13
- package/dist/esm/ion-textarea.entry.js +2 -13
- package/dist/esm/ion-toggle.entry.js +3 -10
- package/dist/esm-es5/ion-checkbox.entry.js +1 -1
- package/dist/esm-es5/ion-input.entry.js +1 -1
- package/dist/esm-es5/ion-select_3.entry.js +1 -1
- package/dist/esm-es5/ion-textarea.entry.js +1 -1
- package/dist/esm-es5/ion-toggle.entry.js +1 -1
- package/dist/ionic/ionic.esm.js +1 -1
- package/dist/ionic/p-1f871cf8.entry.js +4 -0
- package/dist/ionic/{p-a7a97bf4.system.entry.js → p-4dde69d1.system.entry.js} +1 -1
- package/dist/ionic/{p-965287fb.system.entry.js → p-4ec0e961.system.entry.js} +1 -1
- package/dist/ionic/p-5798670a.entry.js +4 -0
- package/dist/ionic/{p-5fac20aa.system.entry.js → p-7c12add8.system.entry.js} +2 -2
- package/dist/ionic/p-a78fa846.entry.js +4 -0
- package/dist/ionic/p-b383d331.entry.js +4 -0
- package/dist/ionic/{p-9df5043e.system.entry.js → p-c6879aa4.system.entry.js} +2 -2
- package/dist/ionic/{p-b904cfe2.system.entry.js → p-d2c3524b.system.entry.js} +1 -1
- package/dist/ionic/p-da6247e5.entry.js +4 -0
- package/dist/ionic/p-f725bf9e.system.js +1 -1
- package/dist/types/components/checkbox/checkbox.d.ts +0 -5
- package/dist/types/components/input/input.d.ts +0 -5
- package/dist/types/components/select/select.d.ts +0 -5
- package/dist/types/components/textarea/textarea.d.ts +0 -5
- package/dist/types/components/toggle/toggle.d.ts +0 -5
- package/hydrate/index.js +13 -60
- package/hydrate/index.mjs +13 -60
- package/package.json +1 -1
- package/dist/ionic/p-11dca959.entry.js +0 -4
- package/dist/ionic/p-57d6e18e.entry.js +0 -4
- package/dist/ionic/p-aad57e35.entry.js +0 -4
- package/dist/ionic/p-d1eb2d7f.entry.js +0 -4
- package/dist/ionic/p-e1678e42.entry.js +0 -4
package/components/checkbox.js
CHANGED
|
@@ -64,13 +64,6 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends HTMLEle
|
|
|
64
64
|
}
|
|
65
65
|
this.toggleChecked(ev);
|
|
66
66
|
};
|
|
67
|
-
/**
|
|
68
|
-
* Stops propagation when the display label is clicked,
|
|
69
|
-
* otherwise, two clicks will be triggered.
|
|
70
|
-
*/
|
|
71
|
-
this.onDivLabelClick = (ev) => {
|
|
72
|
-
ev.stopPropagation();
|
|
73
|
-
};
|
|
74
67
|
this.color = undefined;
|
|
75
68
|
this.name = this.inputId;
|
|
76
69
|
this.checked = false;
|
|
@@ -127,7 +120,7 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends HTMLEle
|
|
|
127
120
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
128
121
|
// The host element must have a checkbox role to ensure proper VoiceOver
|
|
129
122
|
// support in Safari for accessibility.
|
|
130
|
-
return (h(Host, { key: '
|
|
123
|
+
return (h(Host, { key: '90bb17a4fae17088524555968a002327400807cf', role: "checkbox", "aria-checked": indeterminate ? 'mixed' : `${checked}`, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId, "aria-labelledby": hasLabelContent ? this.inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, class: createColorClasses(color, {
|
|
131
124
|
[mode]: true,
|
|
132
125
|
'in-item': hostContext('ion-item', el),
|
|
133
126
|
'checkbox-checked': checked,
|
|
@@ -137,10 +130,10 @@ const Checkbox = /*@__PURE__*/ proxyCustomElement(class Checkbox extends HTMLEle
|
|
|
137
130
|
[`checkbox-justify-${justify}`]: justify !== undefined,
|
|
138
131
|
[`checkbox-alignment-${alignment}`]: alignment !== undefined,
|
|
139
132
|
[`checkbox-label-placement-${labelPlacement}`]: true,
|
|
140
|
-
}), onClick: this.onClick }, h("label", { key: '
|
|
133
|
+
}), onClick: this.onClick }, h("label", { key: '58b5762aa358dff81910874631e06620a2ae1561', class: "checkbox-wrapper", htmlFor: inputId }, h("input", Object.assign({ key: '6abe299d690c345d36d6fd76ab113fdccfbbac52', type: "checkbox", checked: checked ? true : undefined, disabled: disabled, id: inputId, onChange: this.toggleChecked, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl), required: required }, inheritedAttributes)), h("div", { key: '2654168e45ccfdbcfe13af8c97e0e21d61ba0150', class: {
|
|
141
134
|
'label-text-wrapper': true,
|
|
142
135
|
'label-text-wrapper-hidden': !hasLabelContent,
|
|
143
|
-
}, part: "label", id: this.inputLabelId
|
|
136
|
+
}, part: "label", id: this.inputLabelId }, h("slot", { key: 'a91f3f67d9ddd6b616e48799aba11cae3564d1ab' }), this.renderHintText()), h("div", { key: 'd5a9170b084d09df6b02f416e744085b5bcf0dde', class: "native-wrapper" }, h("svg", { key: 'b1968ce4aa9d652a9f2bdc427ea3a65e6c04df51', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container" }, path)))));
|
|
144
137
|
}
|
|
145
138
|
getSVGPath(mode, indeterminate) {
|
|
146
139
|
let path = indeterminate ? (h("path", { d: "M6 12L18 12", part: "mark" })) : (h("path", { d: "M5.9,12.5l3.8,3.8l8.8-8.8", part: "mark" }));
|
package/components/ion-input.js
CHANGED
|
@@ -82,17 +82,6 @@ const Input = /*@__PURE__*/ proxyCustomElement(class Input extends HTMLElement {
|
|
|
82
82
|
this.value = '';
|
|
83
83
|
this.emitInputChange(ev);
|
|
84
84
|
};
|
|
85
|
-
/**
|
|
86
|
-
* Stops propagation when the label is clicked,
|
|
87
|
-
* otherwise, two clicks will be triggered.
|
|
88
|
-
*/
|
|
89
|
-
this.onLabelClick = (ev) => {
|
|
90
|
-
// Only stop propagation if the click was directly on the label
|
|
91
|
-
// and not on the input or other child elements
|
|
92
|
-
if (ev.target === ev.currentTarget) {
|
|
93
|
-
ev.stopPropagation();
|
|
94
|
-
}
|
|
95
|
-
};
|
|
96
85
|
this.hasFocus = false;
|
|
97
86
|
this.color = undefined;
|
|
98
87
|
this.autocapitalize = 'off';
|
|
@@ -453,7 +442,7 @@ const Input = /*@__PURE__*/ proxyCustomElement(class Input extends HTMLElement {
|
|
|
453
442
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
454
443
|
*/
|
|
455
444
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
456
|
-
return (h(Host, { key: '
|
|
445
|
+
return (h(Host, { key: '1094be43093d71694bf0e503d3015401b8cd9574', class: createColorClasses(this.color, {
|
|
457
446
|
[mode]: true,
|
|
458
447
|
'has-value': hasValue,
|
|
459
448
|
'has-focus': hasFocus,
|
|
@@ -464,7 +453,7 @@ const Input = /*@__PURE__*/ proxyCustomElement(class Input extends HTMLElement {
|
|
|
464
453
|
'in-item': inItem,
|
|
465
454
|
'in-item-color': hostContext('ion-item.ion-color', this.el),
|
|
466
455
|
'input-disabled': disabled,
|
|
467
|
-
}) }, h("label", { key: '
|
|
456
|
+
}) }, h("label", { key: '697c6decb1fb8403777db7a37f54853863421ad9', class: "input-wrapper", htmlFor: inputId }, this.renderLabelContainer(), h("div", { key: 'd35f44c3afcf8e075f7f845416cb8500606d3546', class: "native-wrapper" }, h("slot", { key: '41ef868873ffd8262d53fd1a5e506c62030dc3f1', name: "start" }), h("input", Object.assign({ key: 'd98e0aaa285b5424e9589ce36ed4f9910a6859cd', class: "native-input", ref: (input) => (this.nativeInput = input), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, type: this.type, value: value, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (h("button", { key: '367d1a1c2eb69d4887fe29ab96ead3230d7dd513', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
|
|
468
457
|
/**
|
|
469
458
|
* This prevents mobile browsers from
|
|
470
459
|
* blurring the input when the clear
|
|
@@ -479,7 +468,7 @@ const Input = /*@__PURE__*/ proxyCustomElement(class Input extends HTMLElement {
|
|
|
479
468
|
* for screen readers as it means users would be unable to swipe past the clear button.
|
|
480
469
|
*/
|
|
481
470
|
ev.stopPropagation();
|
|
482
|
-
}, onClick: this.clearTextInput }, h("ion-icon", { key: '
|
|
471
|
+
}, onClick: this.clearTextInput }, h("ion-icon", { key: '69afc5c7ea6bfa1bff301635281b536e84277965', "aria-hidden": "true", icon: clearIconData }))), h("slot", { key: '6f770a0ab703b4d19e936a0e1955274bc9f3e941', name: "end" })), shouldRenderHighlight && h("div", { key: 'a048e240432c4d5e11b2c92fa99a0cff07f9a778', class: "input-highlight" })), this.renderBottomContent()));
|
|
483
472
|
}
|
|
484
473
|
get el() { return this; }
|
|
485
474
|
static get watchers() { return {
|
package/components/ion-select.js
CHANGED
|
@@ -100,17 +100,6 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
|
100
100
|
this.hasFocus = false;
|
|
101
101
|
this.ionBlur.emit();
|
|
102
102
|
};
|
|
103
|
-
/**
|
|
104
|
-
* Stops propagation when the label is clicked,
|
|
105
|
-
* otherwise, two clicks will be triggered.
|
|
106
|
-
*/
|
|
107
|
-
this.onLabelClick = (ev) => {
|
|
108
|
-
// Only stop propagation if the click was directly on the label
|
|
109
|
-
// and not on the input or other child elements
|
|
110
|
-
if (ev.target === ev.currentTarget) {
|
|
111
|
-
ev.stopPropagation();
|
|
112
|
-
}
|
|
113
|
-
};
|
|
114
103
|
this.isExpanded = false;
|
|
115
104
|
this.hasFocus = false;
|
|
116
105
|
this.cancelText = 'Cancel';
|
|
@@ -721,7 +710,7 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
|
721
710
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
722
711
|
*/
|
|
723
712
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
|
|
724
|
-
return (h(Host, { key: '
|
|
713
|
+
return (h(Host, { key: 'e6c0498d6c275f89344f4b5146752a047058ad88', onClick: this.onClick, class: createColorClasses(this.color, {
|
|
725
714
|
[mode]: true,
|
|
726
715
|
'in-item': inItem,
|
|
727
716
|
'in-item-color': hostContext('ion-item.ion-color', el),
|
|
@@ -739,7 +728,7 @@ const Select = /*@__PURE__*/ proxyCustomElement(class Select extends HTMLElement
|
|
|
739
728
|
[`select-justify-${justify}`]: justifyEnabled,
|
|
740
729
|
[`select-shape-${shape}`]: shape !== undefined,
|
|
741
730
|
[`select-label-placement-${labelPlacement}`]: true,
|
|
742
|
-
}) }, h("label", { key: '
|
|
731
|
+
}) }, h("label", { key: 'f030b6bd329f8014c7227f5e5f1aeb7efa0e641a', class: "select-wrapper", id: "select-label" }, this.renderLabelContainer(), h("div", { key: '7480e1b40d09e53a2942295d6c9dae474c9de810', class: "select-wrapper-inner" }, h("slot", { key: '250fd2ff08b3e6ed04c7062455a044863481fe1c', name: "start" }), h("div", { key: '11b73ad5b7decfe2d307f9d54293c21c0df3ddb8', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), h("slot", { key: 'ddedafc89061372567bd46354ef972f08c60e19d', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && h("div", { key: '792ce27aea18a0020c17dceb0f0e293171ded3a3', class: "select-highlight" })), this.renderBottomContent()));
|
|
743
732
|
}
|
|
744
733
|
get el() { return this; }
|
|
745
734
|
static get watchers() { return {
|
|
@@ -68,17 +68,6 @@ const Textarea = /*@__PURE__*/ proxyCustomElement(class Textarea extends HTMLEle
|
|
|
68
68
|
this.onKeyDown = (ev) => {
|
|
69
69
|
this.checkClearOnEdit(ev);
|
|
70
70
|
};
|
|
71
|
-
/**
|
|
72
|
-
* Stops propagation when the label is clicked,
|
|
73
|
-
* otherwise, two clicks will be triggered.
|
|
74
|
-
*/
|
|
75
|
-
this.onLabelClick = (ev) => {
|
|
76
|
-
// Only stop propagation if the click was directly on the label
|
|
77
|
-
// and not on the input or other child elements
|
|
78
|
-
if (ev.target === ev.currentTarget) {
|
|
79
|
-
ev.stopPropagation();
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
71
|
this.hasFocus = false;
|
|
83
72
|
this.color = undefined;
|
|
84
73
|
this.autocapitalize = 'none';
|
|
@@ -412,7 +401,7 @@ const Textarea = /*@__PURE__*/ proxyCustomElement(class Textarea extends HTMLEle
|
|
|
412
401
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
413
402
|
*/
|
|
414
403
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
415
|
-
return (h(Host, { key: '
|
|
404
|
+
return (h(Host, { key: 'f53b9060248d885b0b8639401871e52017e497db', class: createColorClasses(this.color, {
|
|
416
405
|
[mode]: true,
|
|
417
406
|
'has-value': hasValue,
|
|
418
407
|
'has-focus': hasFocus,
|
|
@@ -421,7 +410,7 @@ const Textarea = /*@__PURE__*/ proxyCustomElement(class Textarea extends HTMLEle
|
|
|
421
410
|
[`textarea-shape-${shape}`]: shape !== undefined,
|
|
422
411
|
[`textarea-label-placement-${labelPlacement}`]: true,
|
|
423
412
|
'textarea-disabled': disabled,
|
|
424
|
-
}) }, h("label", { key: '
|
|
413
|
+
}) }, h("label", { key: '3bc32a0799d1dd7253eb5a963877964de620ccd0', class: "textarea-wrapper", htmlFor: inputId }, this.renderLabelContainer(), h("div", { key: 'f5302723f4561b179b249cb28f5a31223c5c4394', class: "textarea-wrapper-inner" }, h("div", { key: '75b85c5bd85af72a41da3310f10877a654397eaf', class: "start-slot-wrapper" }, h("slot", { key: '7adc67b4c2917d20c35eecc11a5530e93bc581ea', name: "start" })), h("div", { key: '35cbeca046ec7a40bcbcbc4a70eb83628350ba54', class: "native-wrapper", ref: (el) => (this.textareaWrapper = el) }, h("textarea", Object.assign({ key: 'e3496262d163b70558a0188abdf322cbd8b44dfd', class: "native-textarea", ref: (el) => (this.nativeInput = el), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, minLength: this.minlength, maxLength: this.maxlength, name: this.name, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, cols: this.cols, rows: this.rows, wrap: this.wrap, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeyDown, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId }, this.inheritedAttributes), value)), h("div", { key: 'f274576d2e0bb6dace2ec36c362cb68ecfcd2c69', class: "end-slot-wrapper" }, h("slot", { key: '70c881103410e74b3a3ffda4cc889be66f89bf20', name: "end" }))), shouldRenderHighlight && h("div", { key: 'cf33a473dfb637d284acc2b62ca59c2839ee1104', class: "textarea-highlight" })), this.renderBottomContent()));
|
|
425
414
|
}
|
|
426
415
|
get el() { return this; }
|
|
427
416
|
static get watchers() { return {
|
package/components/ion-toggle.js
CHANGED
|
@@ -65,13 +65,6 @@ const Toggle = /*@__PURE__*/ proxyCustomElement(class Toggle extends HTMLElement
|
|
|
65
65
|
this.toggleChecked();
|
|
66
66
|
}
|
|
67
67
|
};
|
|
68
|
-
/**
|
|
69
|
-
* Stops propagation when the display label is clicked,
|
|
70
|
-
* otherwise, two clicks will be triggered.
|
|
71
|
-
*/
|
|
72
|
-
this.onDivLabelClick = (ev) => {
|
|
73
|
-
ev.stopPropagation();
|
|
74
|
-
};
|
|
75
68
|
this.onFocus = () => {
|
|
76
69
|
this.ionFocus.emit();
|
|
77
70
|
};
|
|
@@ -210,7 +203,7 @@ const Toggle = /*@__PURE__*/ proxyCustomElement(class Toggle extends HTMLElement
|
|
|
210
203
|
const value = this.getValue();
|
|
211
204
|
const rtl = isRTL(el) ? 'rtl' : 'ltr';
|
|
212
205
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
213
|
-
return (h(Host, { key: '
|
|
206
|
+
return (h(Host, { key: '63c67d52dc47661c5758049f6278e873ab867a22', role: "switch", "aria-checked": `${checked}`, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === errorTextId, onClick: this.onClick, "aria-labelledby": hasLabel ? inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, class: createColorClasses(color, {
|
|
214
207
|
[mode]: true,
|
|
215
208
|
'in-item': hostContext('ion-item', el),
|
|
216
209
|
'toggle-activated': activated,
|
|
@@ -220,10 +213,10 @@ const Toggle = /*@__PURE__*/ proxyCustomElement(class Toggle extends HTMLElement
|
|
|
220
213
|
[`toggle-alignment-${alignment}`]: alignment !== undefined,
|
|
221
214
|
[`toggle-label-placement-${labelPlacement}`]: true,
|
|
222
215
|
[`toggle-${rtl}`]: true,
|
|
223
|
-
}) }, h("label", { key: '
|
|
216
|
+
}) }, h("label", { key: '723cfac071ee5ec5c75984fc64762209452e9eea', class: "toggle-wrapper", htmlFor: inputId }, h("input", Object.assign({ key: '8fa79f49348afbce5e083d454b751f7f9cc04d3f', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl), required: required }, inheritedAttributes)), h("div", { key: '00a4415539ef677be9f6981afddcec61f7fe9487', class: {
|
|
224
217
|
'label-text-wrapper': true,
|
|
225
218
|
'label-text-wrapper-hidden': !hasLabel,
|
|
226
|
-
}, part: "label", id: inputLabelId
|
|
219
|
+
}, part: "label", id: inputLabelId }, h("slot", { key: '7ce338bd5116337c9ea90805fdee7285ef7c5811' }), this.renderHintText()), h("div", { key: 'ecb5dfd2c7b534e357cba272dd4f189728555b3a', class: "native-wrapper" }, this.renderToggleControl()))));
|
|
227
220
|
}
|
|
228
221
|
get el() { return this; }
|
|
229
222
|
static get watchers() { return {
|
|
@@ -67,13 +67,6 @@ const Checkbox = class {
|
|
|
67
67
|
}
|
|
68
68
|
this.toggleChecked(ev);
|
|
69
69
|
};
|
|
70
|
-
/**
|
|
71
|
-
* Stops propagation when the display label is clicked,
|
|
72
|
-
* otherwise, two clicks will be triggered.
|
|
73
|
-
*/
|
|
74
|
-
this.onDivLabelClick = (ev) => {
|
|
75
|
-
ev.stopPropagation();
|
|
76
|
-
};
|
|
77
70
|
this.color = undefined;
|
|
78
71
|
this.name = this.inputId;
|
|
79
72
|
this.checked = false;
|
|
@@ -130,7 +123,7 @@ const Checkbox = class {
|
|
|
130
123
|
helpers.renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
131
124
|
// The host element must have a checkbox role to ensure proper VoiceOver
|
|
132
125
|
// support in Safari for accessibility.
|
|
133
|
-
return (index.h(index.Host, { key: '
|
|
126
|
+
return (index.h(index.Host, { key: '90bb17a4fae17088524555968a002327400807cf', role: "checkbox", "aria-checked": indeterminate ? 'mixed' : `${checked}`, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId, "aria-labelledby": hasLabelContent ? this.inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, class: theme.createColorClasses(color, {
|
|
134
127
|
[mode]: true,
|
|
135
128
|
'in-item': theme.hostContext('ion-item', el),
|
|
136
129
|
'checkbox-checked': checked,
|
|
@@ -140,10 +133,10 @@ const Checkbox = class {
|
|
|
140
133
|
[`checkbox-justify-${justify}`]: justify !== undefined,
|
|
141
134
|
[`checkbox-alignment-${alignment}`]: alignment !== undefined,
|
|
142
135
|
[`checkbox-label-placement-${labelPlacement}`]: true,
|
|
143
|
-
}), onClick: this.onClick }, index.h("label", { key: '
|
|
136
|
+
}), onClick: this.onClick }, index.h("label", { key: '58b5762aa358dff81910874631e06620a2ae1561', class: "checkbox-wrapper", htmlFor: inputId }, index.h("input", Object.assign({ key: '6abe299d690c345d36d6fd76ab113fdccfbbac52', type: "checkbox", checked: checked ? true : undefined, disabled: disabled, id: inputId, onChange: this.toggleChecked, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl), required: required }, inheritedAttributes)), index.h("div", { key: '2654168e45ccfdbcfe13af8c97e0e21d61ba0150', class: {
|
|
144
137
|
'label-text-wrapper': true,
|
|
145
138
|
'label-text-wrapper-hidden': !hasLabelContent,
|
|
146
|
-
}, part: "label", id: this.inputLabelId
|
|
139
|
+
}, part: "label", id: this.inputLabelId }, index.h("slot", { key: 'a91f3f67d9ddd6b616e48799aba11cae3564d1ab' }), this.renderHintText()), index.h("div", { key: 'd5a9170b084d09df6b02f416e744085b5bcf0dde', class: "native-wrapper" }, index.h("svg", { key: 'b1968ce4aa9d652a9f2bdc427ea3a65e6c04df51', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container" }, path)))));
|
|
147
140
|
}
|
|
148
141
|
getSVGPath(mode, indeterminate) {
|
|
149
142
|
let path = indeterminate ? (index.h("path", { d: "M6 12L18 12", part: "mark" })) : (index.h("path", { d: "M5.9,12.5l3.8,3.8l8.8-8.8", part: "mark" }));
|
|
@@ -86,17 +86,6 @@ const Input = class {
|
|
|
86
86
|
this.value = '';
|
|
87
87
|
this.emitInputChange(ev);
|
|
88
88
|
};
|
|
89
|
-
/**
|
|
90
|
-
* Stops propagation when the label is clicked,
|
|
91
|
-
* otherwise, two clicks will be triggered.
|
|
92
|
-
*/
|
|
93
|
-
this.onLabelClick = (ev) => {
|
|
94
|
-
// Only stop propagation if the click was directly on the label
|
|
95
|
-
// and not on the input or other child elements
|
|
96
|
-
if (ev.target === ev.currentTarget) {
|
|
97
|
-
ev.stopPropagation();
|
|
98
|
-
}
|
|
99
|
-
};
|
|
100
89
|
this.hasFocus = false;
|
|
101
90
|
this.color = undefined;
|
|
102
91
|
this.autocapitalize = 'off';
|
|
@@ -457,7 +446,7 @@ const Input = class {
|
|
|
457
446
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
458
447
|
*/
|
|
459
448
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
460
|
-
return (index.h(index.Host, { key: '
|
|
449
|
+
return (index.h(index.Host, { key: '1094be43093d71694bf0e503d3015401b8cd9574', class: theme.createColorClasses(this.color, {
|
|
461
450
|
[mode]: true,
|
|
462
451
|
'has-value': hasValue,
|
|
463
452
|
'has-focus': hasFocus,
|
|
@@ -468,7 +457,7 @@ const Input = class {
|
|
|
468
457
|
'in-item': inItem,
|
|
469
458
|
'in-item-color': theme.hostContext('ion-item.ion-color', this.el),
|
|
470
459
|
'input-disabled': disabled,
|
|
471
|
-
}) }, index.h("label", { key: '
|
|
460
|
+
}) }, index.h("label", { key: '697c6decb1fb8403777db7a37f54853863421ad9', class: "input-wrapper", htmlFor: inputId }, this.renderLabelContainer(), index.h("div", { key: 'd35f44c3afcf8e075f7f845416cb8500606d3546', class: "native-wrapper" }, index.h("slot", { key: '41ef868873ffd8262d53fd1a5e506c62030dc3f1', name: "start" }), index.h("input", Object.assign({ key: 'd98e0aaa285b5424e9589ce36ed4f9910a6859cd', class: "native-input", ref: (input) => (this.nativeInput = input), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, type: this.type, value: value, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (index.h("button", { key: '367d1a1c2eb69d4887fe29ab96ead3230d7dd513', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
|
|
472
461
|
/**
|
|
473
462
|
* This prevents mobile browsers from
|
|
474
463
|
* blurring the input when the clear
|
|
@@ -483,7 +472,7 @@ const Input = class {
|
|
|
483
472
|
* for screen readers as it means users would be unable to swipe past the clear button.
|
|
484
473
|
*/
|
|
485
474
|
ev.stopPropagation();
|
|
486
|
-
}, onClick: this.clearTextInput }, index.h("ion-icon", { key: '
|
|
475
|
+
}, onClick: this.clearTextInput }, index.h("ion-icon", { key: '69afc5c7ea6bfa1bff301635281b536e84277965', "aria-hidden": "true", icon: clearIconData }))), index.h("slot", { key: '6f770a0ab703b4d19e936a0e1955274bc9f3e941', name: "end" })), shouldRenderHighlight && index.h("div", { key: 'a048e240432c4d5e11b2c92fa99a0cff07f9a778', class: "input-highlight" })), this.renderBottomContent()));
|
|
487
476
|
}
|
|
488
477
|
get el() { return index.getElement(this); }
|
|
489
478
|
static get watchers() { return {
|
|
@@ -85,17 +85,6 @@ const Select = class {
|
|
|
85
85
|
this.hasFocus = false;
|
|
86
86
|
this.ionBlur.emit();
|
|
87
87
|
};
|
|
88
|
-
/**
|
|
89
|
-
* Stops propagation when the label is clicked,
|
|
90
|
-
* otherwise, two clicks will be triggered.
|
|
91
|
-
*/
|
|
92
|
-
this.onLabelClick = (ev) => {
|
|
93
|
-
// Only stop propagation if the click was directly on the label
|
|
94
|
-
// and not on the input or other child elements
|
|
95
|
-
if (ev.target === ev.currentTarget) {
|
|
96
|
-
ev.stopPropagation();
|
|
97
|
-
}
|
|
98
|
-
};
|
|
99
88
|
this.isExpanded = false;
|
|
100
89
|
this.hasFocus = false;
|
|
101
90
|
this.cancelText = 'Cancel';
|
|
@@ -706,7 +695,7 @@ const Select = class {
|
|
|
706
695
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
707
696
|
*/
|
|
708
697
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
|
|
709
|
-
return (index.h(index.Host, { key: '
|
|
698
|
+
return (index.h(index.Host, { key: 'e6c0498d6c275f89344f4b5146752a047058ad88', onClick: this.onClick, class: theme.createColorClasses(this.color, {
|
|
710
699
|
[mode]: true,
|
|
711
700
|
'in-item': inItem,
|
|
712
701
|
'in-item-color': theme.hostContext('ion-item.ion-color', el),
|
|
@@ -724,7 +713,7 @@ const Select = class {
|
|
|
724
713
|
[`select-justify-${justify}`]: justifyEnabled,
|
|
725
714
|
[`select-shape-${shape}`]: shape !== undefined,
|
|
726
715
|
[`select-label-placement-${labelPlacement}`]: true,
|
|
727
|
-
}) }, index.h("label", { key: '
|
|
716
|
+
}) }, index.h("label", { key: 'f030b6bd329f8014c7227f5e5f1aeb7efa0e641a', class: "select-wrapper", id: "select-label" }, this.renderLabelContainer(), index.h("div", { key: '7480e1b40d09e53a2942295d6c9dae474c9de810', class: "select-wrapper-inner" }, index.h("slot", { key: '250fd2ff08b3e6ed04c7062455a044863481fe1c', name: "start" }), index.h("div", { key: '11b73ad5b7decfe2d307f9d54293c21c0df3ddb8', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), index.h("slot", { key: 'ddedafc89061372567bd46354ef972f08c60e19d', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && index.h("div", { key: '792ce27aea18a0020c17dceb0f0e293171ded3a3', class: "select-highlight" })), this.renderBottomContent()));
|
|
728
717
|
}
|
|
729
718
|
get el() { return index.getElement(this); }
|
|
730
719
|
static get watchers() { return {
|
|
@@ -73,17 +73,6 @@ const Textarea = class {
|
|
|
73
73
|
this.onKeyDown = (ev) => {
|
|
74
74
|
this.checkClearOnEdit(ev);
|
|
75
75
|
};
|
|
76
|
-
/**
|
|
77
|
-
* Stops propagation when the label is clicked,
|
|
78
|
-
* otherwise, two clicks will be triggered.
|
|
79
|
-
*/
|
|
80
|
-
this.onLabelClick = (ev) => {
|
|
81
|
-
// Only stop propagation if the click was directly on the label
|
|
82
|
-
// and not on the input or other child elements
|
|
83
|
-
if (ev.target === ev.currentTarget) {
|
|
84
|
-
ev.stopPropagation();
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
76
|
this.hasFocus = false;
|
|
88
77
|
this.color = undefined;
|
|
89
78
|
this.autocapitalize = 'none';
|
|
@@ -417,7 +406,7 @@ const Textarea = class {
|
|
|
417
406
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
418
407
|
*/
|
|
419
408
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
420
|
-
return (index.h(index.Host, { key: '
|
|
409
|
+
return (index.h(index.Host, { key: 'f53b9060248d885b0b8639401871e52017e497db', class: theme.createColorClasses(this.color, {
|
|
421
410
|
[mode]: true,
|
|
422
411
|
'has-value': hasValue,
|
|
423
412
|
'has-focus': hasFocus,
|
|
@@ -426,7 +415,7 @@ const Textarea = class {
|
|
|
426
415
|
[`textarea-shape-${shape}`]: shape !== undefined,
|
|
427
416
|
[`textarea-label-placement-${labelPlacement}`]: true,
|
|
428
417
|
'textarea-disabled': disabled,
|
|
429
|
-
}) }, index.h("label", { key: '
|
|
418
|
+
}) }, index.h("label", { key: '3bc32a0799d1dd7253eb5a963877964de620ccd0', class: "textarea-wrapper", htmlFor: inputId }, this.renderLabelContainer(), index.h("div", { key: 'f5302723f4561b179b249cb28f5a31223c5c4394', class: "textarea-wrapper-inner" }, index.h("div", { key: '75b85c5bd85af72a41da3310f10877a654397eaf', class: "start-slot-wrapper" }, index.h("slot", { key: '7adc67b4c2917d20c35eecc11a5530e93bc581ea', name: "start" })), index.h("div", { key: '35cbeca046ec7a40bcbcbc4a70eb83628350ba54', class: "native-wrapper", ref: (el) => (this.textareaWrapper = el) }, index.h("textarea", Object.assign({ key: 'e3496262d163b70558a0188abdf322cbd8b44dfd', class: "native-textarea", ref: (el) => (this.nativeInput = el), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, minLength: this.minlength, maxLength: this.maxlength, name: this.name, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, cols: this.cols, rows: this.rows, wrap: this.wrap, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeyDown, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId }, this.inheritedAttributes), value)), index.h("div", { key: 'f274576d2e0bb6dace2ec36c362cb68ecfcd2c69', class: "end-slot-wrapper" }, index.h("slot", { key: '70c881103410e74b3a3ffda4cc889be66f89bf20', name: "end" }))), shouldRenderHighlight && index.h("div", { key: 'cf33a473dfb637d284acc2b62ca59c2839ee1104', class: "textarea-highlight" })), this.renderBottomContent()));
|
|
430
419
|
}
|
|
431
420
|
get el() { return index.getElement(this); }
|
|
432
421
|
static get watchers() { return {
|
|
@@ -68,13 +68,6 @@ const Toggle = class {
|
|
|
68
68
|
this.toggleChecked();
|
|
69
69
|
}
|
|
70
70
|
};
|
|
71
|
-
/**
|
|
72
|
-
* Stops propagation when the display label is clicked,
|
|
73
|
-
* otherwise, two clicks will be triggered.
|
|
74
|
-
*/
|
|
75
|
-
this.onDivLabelClick = (ev) => {
|
|
76
|
-
ev.stopPropagation();
|
|
77
|
-
};
|
|
78
71
|
this.onFocus = () => {
|
|
79
72
|
this.ionFocus.emit();
|
|
80
73
|
};
|
|
@@ -213,7 +206,7 @@ const Toggle = class {
|
|
|
213
206
|
const value = this.getValue();
|
|
214
207
|
const rtl = dir.isRTL(el) ? 'rtl' : 'ltr';
|
|
215
208
|
helpers.renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
216
|
-
return (index.h(index.Host, { key: '
|
|
209
|
+
return (index.h(index.Host, { key: '63c67d52dc47661c5758049f6278e873ab867a22', role: "switch", "aria-checked": `${checked}`, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === errorTextId, onClick: this.onClick, "aria-labelledby": hasLabel ? inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, class: theme.createColorClasses(color, {
|
|
217
210
|
[mode]: true,
|
|
218
211
|
'in-item': theme.hostContext('ion-item', el),
|
|
219
212
|
'toggle-activated': activated,
|
|
@@ -223,10 +216,10 @@ const Toggle = class {
|
|
|
223
216
|
[`toggle-alignment-${alignment}`]: alignment !== undefined,
|
|
224
217
|
[`toggle-label-placement-${labelPlacement}`]: true,
|
|
225
218
|
[`toggle-${rtl}`]: true,
|
|
226
|
-
}) }, index.h("label", { key: '
|
|
219
|
+
}) }, index.h("label", { key: '723cfac071ee5ec5c75984fc64762209452e9eea', class: "toggle-wrapper", htmlFor: inputId }, index.h("input", Object.assign({ key: '8fa79f49348afbce5e083d454b751f7f9cc04d3f', type: "checkbox", role: "switch", "aria-checked": `${checked}`, checked: checked, disabled: disabled, id: inputId, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl), required: required }, inheritedAttributes)), index.h("div", { key: '00a4415539ef677be9f6981afddcec61f7fe9487', class: {
|
|
227
220
|
'label-text-wrapper': true,
|
|
228
221
|
'label-text-wrapper-hidden': !hasLabel,
|
|
229
|
-
}, part: "label", id: inputLabelId
|
|
222
|
+
}, part: "label", id: inputLabelId }, index.h("slot", { key: '7ce338bd5116337c9ea90805fdee7285ef7c5811' }), this.renderHintText()), index.h("div", { key: 'ecb5dfd2c7b534e357cba272dd4f189728555b3a', class: "native-wrapper" }, this.renderToggleControl()))));
|
|
230
223
|
}
|
|
231
224
|
get el() { return index.getElement(this); }
|
|
232
225
|
static get watchers() { return {
|
|
@@ -63,13 +63,6 @@ export class Checkbox {
|
|
|
63
63
|
}
|
|
64
64
|
this.toggleChecked(ev);
|
|
65
65
|
};
|
|
66
|
-
/**
|
|
67
|
-
* Stops propagation when the display label is clicked,
|
|
68
|
-
* otherwise, two clicks will be triggered.
|
|
69
|
-
*/
|
|
70
|
-
this.onDivLabelClick = (ev) => {
|
|
71
|
-
ev.stopPropagation();
|
|
72
|
-
};
|
|
73
66
|
this.color = undefined;
|
|
74
67
|
this.name = this.inputId;
|
|
75
68
|
this.checked = false;
|
|
@@ -126,7 +119,7 @@ export class Checkbox {
|
|
|
126
119
|
renderHiddenInput(true, el, name, checked ? value : '', disabled);
|
|
127
120
|
// The host element must have a checkbox role to ensure proper VoiceOver
|
|
128
121
|
// support in Safari for accessibility.
|
|
129
|
-
return (h(Host, { key: '
|
|
122
|
+
return (h(Host, { key: '90bb17a4fae17088524555968a002327400807cf', role: "checkbox", "aria-checked": indeterminate ? 'mixed' : `${checked}`, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId, "aria-labelledby": hasLabelContent ? this.inputLabelId : null, "aria-label": inheritedAttributes['aria-label'] || null, "aria-disabled": disabled ? 'true' : null, tabindex: disabled ? undefined : 0, onKeyDown: this.onKeyDown, class: createColorClasses(color, {
|
|
130
123
|
[mode]: true,
|
|
131
124
|
'in-item': hostContext('ion-item', el),
|
|
132
125
|
'checkbox-checked': checked,
|
|
@@ -136,10 +129,10 @@ export class Checkbox {
|
|
|
136
129
|
[`checkbox-justify-${justify}`]: justify !== undefined,
|
|
137
130
|
[`checkbox-alignment-${alignment}`]: alignment !== undefined,
|
|
138
131
|
[`checkbox-label-placement-${labelPlacement}`]: true,
|
|
139
|
-
}), onClick: this.onClick }, h("label", { key: '
|
|
132
|
+
}), onClick: this.onClick }, h("label", { key: '58b5762aa358dff81910874631e06620a2ae1561', class: "checkbox-wrapper", htmlFor: inputId }, h("input", Object.assign({ key: '6abe299d690c345d36d6fd76ab113fdccfbbac52', type: "checkbox", checked: checked ? true : undefined, disabled: disabled, id: inputId, onChange: this.toggleChecked, onFocus: () => this.onFocus(), onBlur: () => this.onBlur(), ref: (focusEl) => (this.focusEl = focusEl), required: required }, inheritedAttributes)), h("div", { key: '2654168e45ccfdbcfe13af8c97e0e21d61ba0150', class: {
|
|
140
133
|
'label-text-wrapper': true,
|
|
141
134
|
'label-text-wrapper-hidden': !hasLabelContent,
|
|
142
|
-
}, part: "label", id: this.inputLabelId
|
|
135
|
+
}, part: "label", id: this.inputLabelId }, h("slot", { key: 'a91f3f67d9ddd6b616e48799aba11cae3564d1ab' }), this.renderHintText()), h("div", { key: 'd5a9170b084d09df6b02f416e744085b5bcf0dde', class: "native-wrapper" }, h("svg", { key: 'b1968ce4aa9d652a9f2bdc427ea3a65e6c04df51', class: "checkbox-icon", viewBox: "0 0 24 24", part: "container" }, path)))));
|
|
143
136
|
}
|
|
144
137
|
getSVGPath(mode, indeterminate) {
|
|
145
138
|
let path = indeterminate ? (h("path", { d: "M6 12L18 12", part: "mark" })) : (h("path", { d: "M5.9,12.5l3.8,3.8l8.8-8.8", part: "mark" }));
|
|
@@ -76,17 +76,6 @@ export class Input {
|
|
|
76
76
|
this.value = '';
|
|
77
77
|
this.emitInputChange(ev);
|
|
78
78
|
};
|
|
79
|
-
/**
|
|
80
|
-
* Stops propagation when the label is clicked,
|
|
81
|
-
* otherwise, two clicks will be triggered.
|
|
82
|
-
*/
|
|
83
|
-
this.onLabelClick = (ev) => {
|
|
84
|
-
// Only stop propagation if the click was directly on the label
|
|
85
|
-
// and not on the input or other child elements
|
|
86
|
-
if (ev.target === ev.currentTarget) {
|
|
87
|
-
ev.stopPropagation();
|
|
88
|
-
}
|
|
89
|
-
};
|
|
90
79
|
this.hasFocus = false;
|
|
91
80
|
this.color = undefined;
|
|
92
81
|
this.autocapitalize = 'off';
|
|
@@ -447,7 +436,7 @@ export class Input {
|
|
|
447
436
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
448
437
|
*/
|
|
449
438
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
450
|
-
return (h(Host, { key: '
|
|
439
|
+
return (h(Host, { key: '1094be43093d71694bf0e503d3015401b8cd9574', class: createColorClasses(this.color, {
|
|
451
440
|
[mode]: true,
|
|
452
441
|
'has-value': hasValue,
|
|
453
442
|
'has-focus': hasFocus,
|
|
@@ -458,7 +447,7 @@ export class Input {
|
|
|
458
447
|
'in-item': inItem,
|
|
459
448
|
'in-item-color': hostContext('ion-item.ion-color', this.el),
|
|
460
449
|
'input-disabled': disabled,
|
|
461
|
-
}) }, h("label", { key: '
|
|
450
|
+
}) }, h("label", { key: '697c6decb1fb8403777db7a37f54853863421ad9', class: "input-wrapper", htmlFor: inputId }, this.renderLabelContainer(), h("div", { key: 'd35f44c3afcf8e075f7f845416cb8500606d3546', class: "native-wrapper" }, h("slot", { key: '41ef868873ffd8262d53fd1a5e506c62030dc3f1', name: "start" }), h("input", Object.assign({ key: 'd98e0aaa285b5424e9589ce36ed4f9910a6859cd', class: "native-input", ref: (input) => (this.nativeInput = input), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoComplete: this.autocomplete, autoCorrect: this.autocorrect, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, min: this.min, max: this.max, minLength: this.minlength, maxLength: this.maxlength, multiple: this.multiple, name: this.name, pattern: this.pattern, placeholder: this.placeholder || '', readOnly: readonly, required: this.required, spellcheck: this.spellcheck, step: this.step, type: this.type, value: value, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeydown, onCompositionstart: this.onCompositionStart, onCompositionend: this.onCompositionEnd, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId }, this.inheritedAttributes)), this.clearInput && !readonly && !disabled && (h("button", { key: '367d1a1c2eb69d4887fe29ab96ead3230d7dd513', "aria-label": "reset", type: "button", class: "input-clear-icon", onPointerDown: (ev) => {
|
|
462
451
|
/**
|
|
463
452
|
* This prevents mobile browsers from
|
|
464
453
|
* blurring the input when the clear
|
|
@@ -473,7 +462,7 @@ export class Input {
|
|
|
473
462
|
* for screen readers as it means users would be unable to swipe past the clear button.
|
|
474
463
|
*/
|
|
475
464
|
ev.stopPropagation();
|
|
476
|
-
}, onClick: this.clearTextInput }, h("ion-icon", { key: '
|
|
465
|
+
}, onClick: this.clearTextInput }, h("ion-icon", { key: '69afc5c7ea6bfa1bff301635281b536e84277965', "aria-hidden": "true", icon: clearIconData }))), h("slot", { key: '6f770a0ab703b4d19e936a0e1955274bc9f3e941', name: "end" })), shouldRenderHighlight && h("div", { key: 'a048e240432c4d5e11b2c92fa99a0cff07f9a778', class: "input-highlight" })), this.renderBottomContent()));
|
|
477
466
|
}
|
|
478
467
|
static get is() { return "ion-input"; }
|
|
479
468
|
static get encapsulation() { return "scoped"; }
|
|
@@ -79,17 +79,6 @@ export class Select {
|
|
|
79
79
|
this.hasFocus = false;
|
|
80
80
|
this.ionBlur.emit();
|
|
81
81
|
};
|
|
82
|
-
/**
|
|
83
|
-
* Stops propagation when the label is clicked,
|
|
84
|
-
* otherwise, two clicks will be triggered.
|
|
85
|
-
*/
|
|
86
|
-
this.onLabelClick = (ev) => {
|
|
87
|
-
// Only stop propagation if the click was directly on the label
|
|
88
|
-
// and not on the input or other child elements
|
|
89
|
-
if (ev.target === ev.currentTarget) {
|
|
90
|
-
ev.stopPropagation();
|
|
91
|
-
}
|
|
92
|
-
};
|
|
93
82
|
this.isExpanded = false;
|
|
94
83
|
this.hasFocus = false;
|
|
95
84
|
this.cancelText = 'Cancel';
|
|
@@ -746,7 +735,7 @@ export class Select {
|
|
|
746
735
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
747
736
|
*/
|
|
748
737
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || isExpanded || hasStartEndSlots));
|
|
749
|
-
return (h(Host, { key: '
|
|
738
|
+
return (h(Host, { key: 'e6c0498d6c275f89344f4b5146752a047058ad88', onClick: this.onClick, class: createColorClasses(this.color, {
|
|
750
739
|
[mode]: true,
|
|
751
740
|
'in-item': inItem,
|
|
752
741
|
'in-item-color': hostContext('ion-item.ion-color', el),
|
|
@@ -764,7 +753,7 @@ export class Select {
|
|
|
764
753
|
[`select-justify-${justify}`]: justifyEnabled,
|
|
765
754
|
[`select-shape-${shape}`]: shape !== undefined,
|
|
766
755
|
[`select-label-placement-${labelPlacement}`]: true,
|
|
767
|
-
}) }, h("label", { key: '
|
|
756
|
+
}) }, h("label", { key: 'f030b6bd329f8014c7227f5e5f1aeb7efa0e641a', class: "select-wrapper", id: "select-label" }, this.renderLabelContainer(), h("div", { key: '7480e1b40d09e53a2942295d6c9dae474c9de810', class: "select-wrapper-inner" }, h("slot", { key: '250fd2ff08b3e6ed04c7062455a044863481fe1c', name: "start" }), h("div", { key: '11b73ad5b7decfe2d307f9d54293c21c0df3ddb8', class: "native-wrapper", ref: (el) => (this.nativeWrapperEl = el), part: "container" }, this.renderSelectText(), this.renderListbox()), h("slot", { key: 'ddedafc89061372567bd46354ef972f08c60e19d', name: "end" }), !hasFloatingOrStackedLabel && this.renderSelectIcon()), hasFloatingOrStackedLabel && this.renderSelectIcon(), shouldRenderHighlight && h("div", { key: '792ce27aea18a0020c17dceb0f0e293171ded3a3', class: "select-highlight" })), this.renderBottomContent()));
|
|
768
757
|
}
|
|
769
758
|
static get is() { return "ion-select"; }
|
|
770
759
|
static get encapsulation() { return "shadow"; }
|
|
@@ -63,17 +63,6 @@ export class Textarea {
|
|
|
63
63
|
this.onKeyDown = (ev) => {
|
|
64
64
|
this.checkClearOnEdit(ev);
|
|
65
65
|
};
|
|
66
|
-
/**
|
|
67
|
-
* Stops propagation when the label is clicked,
|
|
68
|
-
* otherwise, two clicks will be triggered.
|
|
69
|
-
*/
|
|
70
|
-
this.onLabelClick = (ev) => {
|
|
71
|
-
// Only stop propagation if the click was directly on the label
|
|
72
|
-
// and not on the input or other child elements
|
|
73
|
-
if (ev.target === ev.currentTarget) {
|
|
74
|
-
ev.stopPropagation();
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
66
|
this.hasFocus = false;
|
|
78
67
|
this.color = undefined;
|
|
79
68
|
this.autocapitalize = 'none';
|
|
@@ -407,7 +396,7 @@ export class Textarea {
|
|
|
407
396
|
* TODO(FW-5592): Remove hasStartEndSlots condition
|
|
408
397
|
*/
|
|
409
398
|
const labelShouldFloat = labelPlacement === 'stacked' || (labelPlacement === 'floating' && (hasValue || hasFocus || hasStartEndSlots));
|
|
410
|
-
return (h(Host, { key: '
|
|
399
|
+
return (h(Host, { key: 'f53b9060248d885b0b8639401871e52017e497db', class: createColorClasses(this.color, {
|
|
411
400
|
[mode]: true,
|
|
412
401
|
'has-value': hasValue,
|
|
413
402
|
'has-focus': hasFocus,
|
|
@@ -416,7 +405,7 @@ export class Textarea {
|
|
|
416
405
|
[`textarea-shape-${shape}`]: shape !== undefined,
|
|
417
406
|
[`textarea-label-placement-${labelPlacement}`]: true,
|
|
418
407
|
'textarea-disabled': disabled,
|
|
419
|
-
}) }, h("label", { key: '
|
|
408
|
+
}) }, h("label", { key: '3bc32a0799d1dd7253eb5a963877964de620ccd0', class: "textarea-wrapper", htmlFor: inputId }, this.renderLabelContainer(), h("div", { key: 'f5302723f4561b179b249cb28f5a31223c5c4394', class: "textarea-wrapper-inner" }, h("div", { key: '75b85c5bd85af72a41da3310f10877a654397eaf', class: "start-slot-wrapper" }, h("slot", { key: '7adc67b4c2917d20c35eecc11a5530e93bc581ea', name: "start" })), h("div", { key: '35cbeca046ec7a40bcbcbc4a70eb83628350ba54', class: "native-wrapper", ref: (el) => (this.textareaWrapper = el) }, h("textarea", Object.assign({ key: 'e3496262d163b70558a0188abdf322cbd8b44dfd', class: "native-textarea", ref: (el) => (this.nativeInput = el), id: inputId, disabled: disabled, autoCapitalize: this.autocapitalize, autoFocus: this.autofocus, enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, minLength: this.minlength, maxLength: this.maxlength, name: this.name, placeholder: this.placeholder || '', readOnly: this.readonly, required: this.required, spellcheck: this.spellcheck, cols: this.cols, rows: this.rows, wrap: this.wrap, onInput: this.onInput, onChange: this.onChange, onBlur: this.onBlur, onFocus: this.onFocus, onKeyDown: this.onKeyDown, "aria-describedby": this.getHintTextID(), "aria-invalid": this.getHintTextID() === this.errorTextId }, this.inheritedAttributes), value)), h("div", { key: 'f274576d2e0bb6dace2ec36c362cb68ecfcd2c69', class: "end-slot-wrapper" }, h("slot", { key: '70c881103410e74b3a3ffda4cc889be66f89bf20', name: "end" }))), shouldRenderHighlight && h("div", { key: 'cf33a473dfb637d284acc2b62ca59c2839ee1104', class: "textarea-highlight" })), this.renderBottomContent()));
|
|
420
409
|
}
|
|
421
410
|
static get is() { return "ion-textarea"; }
|
|
422
411
|
static get encapsulation() { return "scoped"; }
|